diff --git a/README.md b/README.md new file mode 100644 index 0000000..837c275 --- /dev/null +++ b/README.md @@ -0,0 +1,47 @@ +# run the cli +``` +cd bls-eth-go-binary && go run examples/*.go +``` + +# CLI Tool Documentation + +The `sscli` command-line tool is a collection of utilities for analyzing and correcting validator attestations in the Ethereum 2.0 Beacon Chain. Here is the list of available commands: + +## Usage + +To use `sscli`, you can either build the tool from source code or download a prebuilt binary. + +If you choose to download the prebuilt binary, simply add it to your system's `PATH` environment variable, and you can run `sscli` from anywhere in the terminal. You can find the prebuilt binary on GitHub [here](https://github.com///releases). + +## Available Commands + +- `allFalse`: Fetch from Google Drive and verify all atts for all blocks, output failed verification to verificationResult/ +- `args`: Print command-line arguments +- `bf`: Brute-force search pubkey for each 1-val case +- `check`: Check for all interested attestations in double / surround vote detected from beaconcha.in +- `completion`: Generate the autocompletion script for the specified shell +- `csc`: Get computed committee schedule given randaomix etc. +- `dv`: Search in-file duplicated vote from Google Drive after correction +- `fetch`: Fetch epoch for interested block under epochs/ +- `fi`: Get first index of shuffled committee given randaomix etc. +- `help`: Help about any command +- `ndv`: Search duplicated vote without validator index correction, this is for detecting all potentially slashable case directly from beaconcha.in +- `recover`: Correct the wrong validator index for attestation that has false signature verification +- `search`: Brute-force search for correct signer for single validator case +- `show`: Print correction map to the console +- `shuffle`: Shuffle duplicate votes +- `sr`: Compute and print signing root for a specific attestation +- `ss`: Use unvoted validators as a restrained space for faster search pubkey for correcting signing validator sets +- `unvote`: Find all unvoted validators in an epoch defined by input block +- `vc`: Verify all correction made from computed committee schedule by checking the signature +- `vdv`: Search all verifiable in-file double vote after correction from Google Drive, expect all output should be slashed otherwise staking-slashing model has trouble +- `verify`: Verify attestations that identified by validatorIdx and block number, print result to console +- `verifyAll`: Verify all attestations in a specified block, if the block attestation data doesn't exist in local, automatically fetch to test/ +- `verifyDrive`: Fetch from Google Drive and verify all atts for all blocks, output failed verification to verificationResult/ + +## Flags + +- `-h`, `--help`: Show help message for `sscli` + + + diff --git a/sscli b/sscli new file mode 100755 index 0000000..74f1242 Binary files /dev/null and b/sscli differ diff --git a/test/index.js b/test/index.js new file mode 100644 index 0000000..9a53883 --- /dev/null +++ b/test/index.js @@ -0,0 +1,18 @@ +// Setup: npm install @alch/alchemy-sdk +const { Network, Alchemy } = require("alchemy-sdk"); + +// Optional Config object, but defaults to demo api-key and eth-mainnet. +const settings = { + apiKey: "TnL0dWFXfJBaSpWI0-j9jSZdeiBO0Qn5", // Replace with your Alchemy API Key. + network: Network.ETH_MAINNET, // Replace with your network. +}; + +const alchemy = new Alchemy(settings); + +async function main() { + alchemy.core. + const latestBlock = await alchemy.core.getBlockNumber(); + console.log("The latest block number is", latestBlock); +} + +main(); \ No newline at end of file diff --git a/test/node_modules/.bin/node-gyp-build b/test/node_modules/.bin/node-gyp-build new file mode 120000 index 0000000..671c6eb --- /dev/null +++ b/test/node_modules/.bin/node-gyp-build @@ -0,0 +1 @@ +../node-gyp-build/bin.js \ No newline at end of file diff --git a/test/node_modules/.bin/node-gyp-build-optional b/test/node_modules/.bin/node-gyp-build-optional new file mode 120000 index 0000000..46d347e --- /dev/null +++ b/test/node_modules/.bin/node-gyp-build-optional @@ -0,0 +1 @@ +../node-gyp-build/optional.js \ No newline at end of file diff --git a/test/node_modules/.bin/node-gyp-build-test b/test/node_modules/.bin/node-gyp-build-test new file mode 120000 index 0000000..d11de1b --- /dev/null +++ b/test/node_modules/.bin/node-gyp-build-test @@ -0,0 +1 @@ +../node-gyp-build/build-test.js \ No newline at end of file diff --git a/test/node_modules/.package-lock.json b/test/node_modules/.package-lock.json new file mode 100644 index 0000000..6b2f94c --- /dev/null +++ b/test/node_modules/.package-lock.json @@ -0,0 +1,960 @@ +{ + "name": "test", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/@ethersproject/abi": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz", + "integrity": "sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==", + "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.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@ethersproject/abstract-provider": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz", + "integrity": "sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==", + "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.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/networks": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/web": "^5.7.0" + } + }, + "node_modules/@ethersproject/abstract-signer": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz", + "integrity": "sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==", + "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.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0" + } + }, + "node_modules/@ethersproject/address": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.7.0.tgz", + "integrity": "sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==", + "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.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/rlp": "^5.7.0" + } + }, + "node_modules/@ethersproject/base64": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.7.0.tgz", + "integrity": "sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==", + "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.7.0" + } + }, + "node_modules/@ethersproject/basex": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.7.0.tgz", + "integrity": "sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==", + "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.7.0", + "@ethersproject/properties": "^5.7.0" + } + }, + "node_modules/@ethersproject/bignumber": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.7.0.tgz", + "integrity": "sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==", + "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.7.0", + "@ethersproject/logger": "^5.7.0", + "bn.js": "^5.2.1" + } + }, + "node_modules/@ethersproject/bytes": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.7.0.tgz", + "integrity": "sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==", + "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.7.0" + } + }, + "node_modules/@ethersproject/constants": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.7.0.tgz", + "integrity": "sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==", + "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.7.0" + } + }, + "node_modules/@ethersproject/contracts": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.7.0.tgz", + "integrity": "sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg==", + "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.7.0", + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/transactions": "^5.7.0" + } + }, + "node_modules/@ethersproject/hash": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.7.0.tgz", + "integrity": "sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==", + "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.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/base64": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@ethersproject/hdnode": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.7.0.tgz", + "integrity": "sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg==", + "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.7.0", + "@ethersproject/basex": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/pbkdf2": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/sha2": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0", + "@ethersproject/strings": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/wordlists": "^5.7.0" + } + }, + "node_modules/@ethersproject/json-wallets": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz", + "integrity": "sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g==", + "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.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/hdnode": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/pbkdf2": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/random": "^5.7.0", + "@ethersproject/strings": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "aes-js": "3.0.0", + "scrypt-js": "3.0.1" + } + }, + "node_modules/@ethersproject/keccak256": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.7.0.tgz", + "integrity": "sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==", + "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.7.0", + "js-sha3": "0.8.0" + } + }, + "node_modules/@ethersproject/logger": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.7.0.tgz", + "integrity": "sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==", + "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.7.1", + "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.7.1.tgz", + "integrity": "sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==", + "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.7.0" + } + }, + "node_modules/@ethersproject/pbkdf2": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz", + "integrity": "sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw==", + "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.7.0", + "@ethersproject/sha2": "^5.7.0" + } + }, + "node_modules/@ethersproject/properties": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.7.0.tgz", + "integrity": "sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==", + "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.7.0" + } + }, + "node_modules/@ethersproject/providers": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.7.2.tgz", + "integrity": "sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg==", + "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.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/base64": "^5.7.0", + "@ethersproject/basex": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/networks": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/random": "^5.7.0", + "@ethersproject/rlp": "^5.7.0", + "@ethersproject/sha2": "^5.7.0", + "@ethersproject/strings": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/web": "^5.7.0", + "bech32": "1.1.4", + "ws": "7.4.6" + } + }, + "node_modules/@ethersproject/random": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.7.0.tgz", + "integrity": "sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==", + "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.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/rlp": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.7.0.tgz", + "integrity": "sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==", + "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.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/sha2": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.7.0.tgz", + "integrity": "sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==", + "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.7.0", + "@ethersproject/logger": "^5.7.0", + "hash.js": "1.1.7" + } + }, + "node_modules/@ethersproject/signing-key": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.7.0.tgz", + "integrity": "sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==", + "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.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "bn.js": "^5.2.1", + "elliptic": "6.5.4", + "hash.js": "1.1.7" + } + }, + "node_modules/@ethersproject/strings": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.7.0.tgz", + "integrity": "sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==", + "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.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/transactions": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.7.0.tgz", + "integrity": "sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==", + "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.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/rlp": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0" + } + }, + "node_modules/@ethersproject/units": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.7.0.tgz", + "integrity": "sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg==", + "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.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/wallet": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.7.0.tgz", + "integrity": "sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA==", + "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.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/hdnode": "^5.7.0", + "@ethersproject/json-wallets": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/random": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/wordlists": "^5.7.0" + } + }, + "node_modules/@ethersproject/web": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.7.1.tgz", + "integrity": "sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==", + "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.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@ethersproject/wordlists": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.7.0.tgz", + "integrity": "sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA==", + "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.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/aes-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==" + }, + "node_modules/alchemy-sdk": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/alchemy-sdk/-/alchemy-sdk-2.2.5.tgz", + "integrity": "sha512-PUSNyV1bTkSl4fsmDG7H68h2gKETnwKSVjINxuPsj8rv2PpUJuRYTuMFHUdZBEUifQ2WkbciB80OEbwvTl3xAA==", + "dependencies": { + "@ethersproject/abi": "^5.7.0", + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/contracts": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/networks": "^5.7.0", + "@ethersproject/providers": "^5.7.0", + "@ethersproject/units": "^5.7.0", + "@ethersproject/wallet": "^5.7.0", + "@ethersproject/web": "^5.7.0", + "axios": "^0.26.1", + "sturdy-websocket": "^0.2.1", + "websocket": "^1.0.34" + } + }, + "node_modules/axios": { + "version": "0.26.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", + "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", + "dependencies": { + "follow-redirects": "^1.14.8" + } + }, + "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": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" + }, + "node_modules/bufferutil": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.7.tgz", + "integrity": "sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==", + "hasInstallScript": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dependencies": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "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/elliptic/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/es5-ext": { + "version": "0.10.62", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", + "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "hasInstallScript": true, + "dependencies": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dependencies": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "node_modules/ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "dependencies": { + "type": "^2.7.2" + } + }, + "node_modules/ext/node_modules/type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" + }, + "node_modules/follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "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": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "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/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" + }, + "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": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==" + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" + }, + "node_modules/node-gyp-build": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.5.0.tgz", + "integrity": "sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "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/sturdy-websocket": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/sturdy-websocket/-/sturdy-websocket-0.2.1.tgz", + "integrity": "sha512-NnzSOEKyv4I83qbuKw9ROtJrrT6Z/Xt7I0HiP/e6H6GnpeTDvzwGIGeJ8slai+VwODSHQDooW2CAilJwT9SpRg==" + }, + "node_modules/type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + }, + "node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dependencies": { + "is-typedarray": "^1.0.0" + } + }, + "node_modules/utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "hasInstallScript": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/websocket": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz", + "integrity": "sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ==", + "dependencies": { + "bufferutil": "^4.0.1", + "debug": "^2.2.0", + "es5-ext": "^0.10.50", + "typedarray-to-buffer": "^3.1.5", + "utf-8-validate": "^5.0.2", + "yaeti": "^0.0.6" + }, + "engines": { + "node": ">=4.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 + } + } + }, + "node_modules/yaeti": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", + "integrity": "sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug==", + "engines": { + "node": ">=0.10.32" + } + } + } +} diff --git a/test/node_modules/@ethersproject/abi/LICENSE.md b/test/node_modules/@ethersproject/abi/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/README.md b/test/node_modules/@ethersproject/abi/README.md new file mode 100644 index 0000000..ded58c9 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/abi/lib.esm/_version.d.ts new file mode 100644 index 0000000..73440e3 --- /dev/null +++ b/test/node_modules/@ethersproject/abi/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "abi/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/abi/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/abi/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..3c33172 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/_version.js b/test/node_modules/@ethersproject/abi/lib.esm/_version.js new file mode 100644 index 0000000..4fef671 --- /dev/null +++ b/test/node_modules/@ethersproject/abi/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "abi/5.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/abi/lib.esm/_version.js.map b/test/node_modules/@ethersproject/abi/lib.esm/_version.js.map new file mode 100644 index 0000000..4854997 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/abi-coder.d.ts b/test/node_modules/@ethersproject/abi/lib.esm/abi-coder.d.ts new file mode 100644 index 0000000..7bfd727 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/abi-coder.d.ts.map b/test/node_modules/@ethersproject/abi/lib.esm/abi-coder.d.ts.map new file mode 100644 index 0000000..8527db7 --- /dev/null +++ b/test/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;IAInC,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/test/node_modules/@ethersproject/abi/lib.esm/abi-coder.js b/test/node_modules/@ethersproject/abi/lib.esm/abi-coder.js new file mode 100644 index 0000000..4b8ac1d --- /dev/null +++ b/test/node_modules/@ethersproject/abi/lib.esm/abi-coder.js @@ -0,0 +1,96 @@ +"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) { + 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/test/node_modules/@ethersproject/abi/lib.esm/abi-coder.js.map b/test/node_modules/@ethersproject/abi/lib.esm/abi-coder.js.map new file mode 100644 index 0000000..c432335 --- /dev/null +++ b/test/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,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,MAAM,cAAc,GAAG,IAAI,MAAM,CAAC,iBA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AAC,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/test/node_modules/@ethersproject/abi/lib.esm/coders/abstract-coder.d.ts b/test/node_modules/@ethersproject/abi/lib.esm/coders/abstract-coder.d.ts new file mode 100644 index 0000000..f499d13 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/abstract-coder.d.ts.map b/test/node_modules/@ethersproject/abi/lib.esm/coders/abstract-coder.d.ts.map new file mode 100644 index 0000000..2a6c329 --- /dev/null +++ b/test/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;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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UAAU,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,OAAO;IAS7F,IAAI,IAAI,IAAI,MAAM,CAAgC;IAClD,IAAI,QAAQ,IAAI,MAAM,CAAyB;IAG/C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,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/test/node_modules/@ethersproject/abi/lib.esm/coders/abstract-coder.js b/test/node_modules/@ethersproject/abi/lib.esm/coders/abstract-coder.js new file mode 100644 index 0000000..9c48922 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/abstract-coder.js.map b/test/node_modules/@ethersproject/abi/lib.esm/coders/abstract-coder.js.map new file mode 100644 index 0000000..a806e74 --- /dev/null +++ b/test/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":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAa,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACvF,OAAO,EAAE,SAAS,EAAgB,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,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;AAMnC,MAAM,UAAU,iBAAiB,CAAC,MAAc;IAC5C,gCAAgC;IAChC,MAAM,MAAM,GAA0D,EAAG,CAAC;IAE1E,MAAM,WAAW,GAAG,UAAS,IAA4B,EAAE,MAAW;QAClE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EA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AI,CAAC,OAAO,GAAG,aAAa,CAAC,CAAA;IACvE,CAAC;IAED,SAAS,CAAC,MAAc;QACpB,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IACjH,CAAC;IAED,SAAS,CAAC,MAAc,EAAE,KAAe;QACrC,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;QAChD,IAAI,CAAC,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC;QAC7B,oDAAoD;QACpD,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IAClC,CAAC;IAED,SAAS;QACL,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IACzD,CAAC;CACJ"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/abi/lib.esm/coders/address.d.ts b/test/node_modules/@ethersproject/abi/lib.esm/coders/address.d.ts new file mode 100644 index 0000000..05df08a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/address.d.ts.map b/test/node_modules/@ethersproject/abi/lib.esm/coders/address.d.ts.map new file mode 100644 index 0000000..e1d2620 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/address.js b/test/node_modules/@ethersproject/abi/lib.esm/coders/address.js new file mode 100644 index 0000000..39988bd --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/address.js.map b/test/node_modules/@ethersproject/abi/lib.esm/coders/address.js.map new file mode 100644 index 0000000..a9526ea --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/anonymous.d.ts b/test/node_modules/@ethersproject/abi/lib.esm/coders/anonymous.d.ts new file mode 100644 index 0000000..8e02344 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/anonymous.d.ts.map b/test/node_modules/@ethersproject/abi/lib.esm/coders/anonymous.d.ts.map new file mode 100644 index 0000000..21f89b6 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/anonymous.js b/test/node_modules/@ethersproject/abi/lib.esm/coders/anonymous.js new file mode 100644 index 0000000..b4b2a31 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/anonymous.js.map b/test/node_modules/@ethersproject/abi/lib.esm/coders/anonymous.js.map new file mode 100644 index 0000000..af89875 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/array.d.ts b/test/node_modules/@ethersproject/abi/lib.esm/coders/array.d.ts new file mode 100644 index 0000000..62032c5 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/array.d.ts.map b/test/node_modules/@ethersproject/abi/lib.esm/coders/array.d.ts.map new file mode 100644 index 0000000..05f6898 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/array.js b/test/node_modules/@ethersproject/abi/lib.esm/coders/array.js new file mode 100644 index 0000000..662582c --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/array.js.map b/test/node_modules/@ethersproject/abi/lib.esm/coders/array.js.map new file mode 100644 index 0000000..63a12ba --- /dev/null +++ b/test/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,CAAC,KAAK,QAAQ,EAAE;QAC9C,IAAI,MAAM,GAAkC,EAAG,CAAC;QAEhD,WAAW,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YAC/B,MAAM,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC;YAC7B,IAAI,CAAC,IAAI,EAAE;gBACP,MAAM,CAAC,UAAU,CAAC,uDAAuD,EAAE,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE;oBACvG,QAAQ,EAAE,QAAQ;oBAClB,KAAK,EAAE,KAAK;oBACZ,KAAK,EAAE,MAAM;iBAChB,CAAC,CAAC;aACN;YAED,IAAI,MAAM,CAAC,IAAI,CAAC,EAAE;gBACd,MAAM,CAAC,UAAU,CAAC,yDAAyD,EAAE,MAAM,CA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AE,MAAM,EAAE,KAAK,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,CAAC,MAAc;QACjB,IAAI,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;QACxB,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;YACd,KAAK,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC,QAAQ,EAAE,CAAC;YAEtC,sDAAsD;YACtD,wDAAwD;YACxD,yDAAyD;YACzD,sDAAsD;YACtD,4DAA4D;YAC5D,IAAI,KAAK,GAAG,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE;gBAClC,MAAM,CAAC,UAAU,CAAC,0BAA0B,EAAE,MAAM,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,cAAc,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;CACJ"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/abi/lib.esm/coders/boolean.d.ts b/test/node_modules/@ethersproject/abi/lib.esm/coders/boolean.d.ts new file mode 100644 index 0000000..ae83580 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/boolean.d.ts.map b/test/node_modules/@ethersproject/abi/lib.esm/coders/boolean.d.ts.map new file mode 100644 index 0000000..e265fba --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/boolean.js b/test/node_modules/@ethersproject/abi/lib.esm/coders/boolean.js new file mode 100644 index 0000000..5c81c72 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/boolean.js.map b/test/node_modules/@ethersproject/abi/lib.esm/coders/boolean.js.map new file mode 100644 index 0000000..a24d8b0 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/bytes.d.ts b/test/node_modules/@ethersproject/abi/lib.esm/coders/bytes.d.ts new file mode 100644 index 0000000..7fbcf7b --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/bytes.d.ts.map b/test/node_modules/@ethersproject/abi/lib.esm/coders/bytes.d.ts.map new file mode 100644 index 0000000..aec892c --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/bytes.js b/test/node_modules/@ethersproject/abi/lib.esm/coders/bytes.js new file mode 100644 index 0000000..d3264c2 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/bytes.js.map b/test/node_modules/@ethersproject/abi/lib.esm/coders/bytes.js.map new file mode 100644 index 0000000..51480b3 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/fixed-bytes.d.ts b/test/node_modules/@ethersproject/abi/lib.esm/coders/fixed-bytes.d.ts new file mode 100644 index 0000000..e345513 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/fixed-bytes.d.ts.map b/test/node_modules/@ethersproject/abi/lib.esm/coders/fixed-bytes.d.ts.map new file mode 100644 index 0000000..42da7a4 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/fixed-bytes.js b/test/node_modules/@ethersproject/abi/lib.esm/coders/fixed-bytes.js new file mode 100644 index 0000000..d0298e4 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/fixed-bytes.js.map b/test/node_modules/@ethersproject/abi/lib.esm/coders/fixed-bytes.js.map new file mode 100644 index 0000000..2839d22 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/null.d.ts b/test/node_modules/@ethersproject/abi/lib.esm/coders/null.d.ts new file mode 100644 index 0000000..04ff0fa --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/null.d.ts.map b/test/node_modules/@ethersproject/abi/lib.esm/coders/null.d.ts.map new file mode 100644 index 0000000..96ad6ef --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/null.js b/test/node_modules/@ethersproject/abi/lib.esm/coders/null.js new file mode 100644 index 0000000..a58eb49 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/null.js.map b/test/node_modules/@ethersproject/abi/lib.esm/coders/null.js.map new file mode 100644 index 0000000..93886ef --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/number.d.ts b/test/node_modules/@ethersproject/abi/lib.esm/coders/number.d.ts new file mode 100644 index 0000000..f1cd379 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/number.d.ts.map b/test/node_modules/@ethersproject/abi/lib.esm/coders/number.d.ts.map new file mode 100644 index 0000000..c3f5f90 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/number.js b/test/node_modules/@ethersproject/abi/lib.esm/coders/number.js new file mode 100644 index 0000000..8c7dd86 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/number.js.map b/test/node_modules/@ethersproject/abi/lib.esm/coders/number.js.map new file mode 100644 index 0000000..c6515ec --- /dev/null +++ b/test/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,SA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,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,MAAM,CAAC,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;CACJ"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/abi/lib.esm/coders/string.d.ts b/test/node_modules/@ethersproject/abi/lib.esm/coders/string.d.ts new file mode 100644 index 0000000..08d75c3 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/string.d.ts.map b/test/node_modules/@ethersproject/abi/lib.esm/coders/string.d.ts.map new file mode 100644 index 0000000..30d1e61 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/string.js b/test/node_modules/@ethersproject/abi/lib.esm/coders/string.js new file mode 100644 index 0000000..f09c9a2 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/string.js.map b/test/node_modules/@ethersproject/abi/lib.esm/coders/string.js.map new file mode 100644 index 0000000..21dfd0e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/tuple.d.ts b/test/node_modules/@ethersproject/abi/lib.esm/coders/tuple.d.ts new file mode 100644 index 0000000..514d5c2 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/tuple.d.ts.map b/test/node_modules/@ethersproject/abi/lib.esm/coders/tuple.d.ts.map new file mode 100644 index 0000000..47858e1 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/tuple.js b/test/node_modules/@ethersproject/abi/lib.esm/coders/tuple.js new file mode 100644 index 0000000..c8625f8 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/coders/tuple.js.map b/test/node_modules/@ethersproject/abi/lib.esm/coders/tuple.js.map new file mode 100644 index 0000000..0fdc1bc --- /dev/null +++ b/test/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,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;QAEhD,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAED,YAAY;QACR,MAAM,MAAM,GAAQ,EAAG,CAAC;QACxB,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EA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I,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/test/node_modules/@ethersproject/abi/lib.esm/fragments.d.ts b/test/node_modules/@ethersproject/abi/lib.esm/fragments.d.ts new file mode 100644 index 0000000..2b9b253 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/fragments.d.ts.map b/test/node_modules/@ethersproject/abi/lib.esm/fragments.d.ts.map new file mode 100644 index 0000000..b169744 --- /dev/null +++ b/test/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,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,W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a,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/test/node_modules/@ethersproject/abi/lib.esm/fragments.js b/test/node_modules/@ethersproject/abi/lib.esm/fragments.js new file mode 100644 index 0000000..33ef391 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/fragments.js.map b/test/node_modules/@ethersproject/abi/lib.esm/fragments.js.map new file mode 100644 index 0000000..c666b38 --- /dev/null +++ b/test/node_modules/@ethersproject/abi/lib.esm/fragments.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fragments.js","sourceRoot":"","sources":["../src.ts/fragments.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAA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K,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/test/node_modules/@ethersproject/abi/lib.esm/index.d.ts b/test/node_modules/@ethersproject/abi/lib.esm/index.d.ts new file mode 100644 index 0000000..cbdc15d --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/abi/lib.esm/index.d.ts.map new file mode 100644 index 0000000..da4e76f --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/index.js b/test/node_modules/@ethersproject/abi/lib.esm/index.js new file mode 100644 index 0000000..cf52448 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/index.js.map b/test/node_modules/@ethersproject/abi/lib.esm/index.js.map new file mode 100644 index 0000000..f7fae6d --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib.esm/interface.d.ts b/test/node_modules/@ethersproject/abi/lib.esm/interface.d.ts new file mode 100644 index 0000000..c50269e --- /dev/null +++ b/test/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 | string, values: ReadonlyArray): Array>; + encodeEventLog(eventFragment: EventFragment | string, 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/test/node_modules/@ethersproject/abi/lib.esm/interface.d.ts.map b/test/node_modules/@ethersproject/abi/lib.esm/interface.d.ts.map new file mode 100644 index 0000000..3514774 --- /dev/null +++ b/test/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,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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,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/test/node_modules/@ethersproject/abi/lib.esm/interface.js b/test/node_modules/@ethersproject/abi/lib.esm/interface.js new file mode 100644 index 0000000..7f50aa9 --- /dev/null +++ b/test/node_modules/@ethersproject/abi/lib.esm/interface.js @@ -0,0 +1,610 @@ +"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) { + 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 message = ""; + 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]; + } + if (errorName === "Error") { + message = `; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(errorArgs[0])}`; + } + else if (errorName === "Panic") { + message = `; VM Exception while processing transaction: reverted with panic code ${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) { } + } + break; + } + } + return logger.throwError("call revert exception" + message, Logger.errors.CALL_EXCEPTION, { + method: functionFragment.format(), + data: hexlify(data), 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)); + } + if (param.type === "bool" && typeof (value) === "boolean") { + value = (value ? "0x01" : "0x00"); + } + if (param.type.match(/^u?int/)) { + value = BigNumber.from(value).toHexString(); + } + // 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/test/node_modules/@ethersproject/abi/lib.esm/interface.js.map b/test/node_modules/@ethersproject/abi/lib.esm/interface.js.map new file mode 100644 index 0000000..674ba84 --- /dev/null +++ b/test/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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AAA;QAEpE,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;IAEF,MAAM,CAAC,WAAW,CAAC,KAAU;QACzB,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC;IAC3C,CAAC;CACJ"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/abi/lib/_version.d.ts b/test/node_modules/@ethersproject/abi/lib/_version.d.ts new file mode 100644 index 0000000..73440e3 --- /dev/null +++ b/test/node_modules/@ethersproject/abi/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "abi/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/abi/lib/_version.d.ts.map b/test/node_modules/@ethersproject/abi/lib/_version.d.ts.map new file mode 100644 index 0000000..3c33172 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/_version.js b/test/node_modules/@ethersproject/abi/lib/_version.js new file mode 100644 index 0000000..a54b05f --- /dev/null +++ b/test/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.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/abi/lib/_version.js.map b/test/node_modules/@ethersproject/abi/lib/_version.js.map new file mode 100644 index 0000000..b3a3dff --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/abi-coder.d.ts b/test/node_modules/@ethersproject/abi/lib/abi-coder.d.ts new file mode 100644 index 0000000..7bfd727 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/abi-coder.d.ts.map b/test/node_modules/@ethersproject/abi/lib/abi-coder.d.ts.map new file mode 100644 index 0000000..8527db7 --- /dev/null +++ b/test/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;IAInC,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/test/node_modules/@ethersproject/abi/lib/abi-coder.js b/test/node_modules/@ethersproject/abi/lib/abi-coder.js new file mode 100644 index 0000000..ee2417b --- /dev/null +++ b/test/node_modules/@ethersproject/abi/lib/abi-coder.js @@ -0,0 +1,104 @@ +"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) { + (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/test/node_modules/@ethersproject/abi/lib/abi-coder.js.map b/test/node_modules/@ethersproject/abi/lib/abi-coder.js.map new file mode 100644 index 0000000..6d528ee --- /dev/null +++ b/test/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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M,EAAE,GAAG,CAAC,CAAC,CAAC;QAE5C,IAAM,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,yBAAM,GAAN,UAAO,KAAwC,EAAE,IAAe,EAAE,KAAe;QAAjF,iBAIC;QAHG,IAAM,MAAM,GAAiB,KAAK,CAAC,GAAG,CAAC,UAAC,IAAI,IAAK,OAAA,KAAI,CAAC,SAAS,CAAC,qBAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAApC,CAAoC,CAAC,CAAC;QACvF,IAAM,KAAK,GAAG,IAAI,kBAAU,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC1C,OAAO,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,IAAA,gBAAQ,EAAC,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IAChE,CAAC;IACL,eAAC;AAAD,CAAC,AAxFD,IAwFC;AAxFY,4BAAQ;AA0FR,QAAA,eAAe,GAAa,IAAI,QAAQ,EAAE,CAAC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/abi/lib/coders/abstract-coder.d.ts b/test/node_modules/@ethersproject/abi/lib/coders/abstract-coder.d.ts new file mode 100644 index 0000000..f499d13 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/abstract-coder.d.ts.map b/test/node_modules/@ethersproject/abi/lib/coders/abstract-coder.d.ts.map new file mode 100644 index 0000000..2a6c329 --- /dev/null +++ b/test/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,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,UAAU,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM;IAIvC,mBAAmB,IAAI,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI;CAQvD;AAED,qBAAa,MAAM;IACf,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAE7B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,UAAU,CAAC;IAEjC,OAAO,EAAE,MAAM,CAAC;gBAEJ,IAAI,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,OAAO;IAS7F,IAAI,IAAI,IAAI,MAAM,CAAgC;IAClD,IAAI,QAAQ,IAAI,MAAM,CAAyB;IAG/C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,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/test/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js b/test/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js new file mode 100644 index 0000000..2ebc9ba --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js.map b/test/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js.map new file mode 100644 index 0000000..00589ae --- /dev/null +++ b/test/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,sDAAmE;AACnE,wDAA2D;AAE3D,gDAA+C;AAC/C,wCAAsC;AACtC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAMnC,SAAgB,iBAAiB,CAAC,MAAc;IAC5C,gCAAgC;IAChC,IAAM,MAAM,GAA0D,EAAG,CAAC;IAE1E,IAAM,WAAW,GAAG,UAAS,IAA4B,EAAE,MAAW;QAClE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;YAAE,OAAO;SAAE;QACvC,KAAK,IAAI,GAAG,IAAI,MAAM,EAAE;YACpB,IAAM,SAAS,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;YAC/B,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAEpB,IAAI;gBACC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;aACxC;YAAC,OAAO,KAAK,EAAE;gBACZ,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,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vE,CAAC;IAED,0BAAS,GAAT,UAAU,MAAc;QACpB,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IACjH,CAAC;IAED,0BAAS,GAAT,UAAU,MAAc,EAAE,KAAe;QACrC,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;QAChD,IAAI,CAAC,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC;QAC7B,oDAAoD;QACpD,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IAClC,CAAC;IAED,0BAAS,GAAT;QACI,OAAO,qBAAS,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,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/test/node_modules/@ethersproject/abi/lib/coders/address.d.ts b/test/node_modules/@ethersproject/abi/lib/coders/address.d.ts new file mode 100644 index 0000000..05df08a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/address.d.ts.map b/test/node_modules/@ethersproject/abi/lib/coders/address.d.ts.map new file mode 100644 index 0000000..e1d2620 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/address.js b/test/node_modules/@ethersproject/abi/lib/coders/address.js new file mode 100644 index 0000000..118428a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/address.js.map b/test/node_modules/@ethersproject/abi/lib/coders/address.js.map new file mode 100644 index 0000000..dfb8243 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/anonymous.d.ts b/test/node_modules/@ethersproject/abi/lib/coders/anonymous.d.ts new file mode 100644 index 0000000..8e02344 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/anonymous.d.ts.map b/test/node_modules/@ethersproject/abi/lib/coders/anonymous.d.ts.map new file mode 100644 index 0000000..21f89b6 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/anonymous.js b/test/node_modules/@ethersproject/abi/lib/coders/anonymous.js new file mode 100644 index 0000000..f452eb0 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/anonymous.js.map b/test/node_modules/@ethersproject/abi/lib/coders/anonymous.js.map new file mode 100644 index 0000000..e98fdee --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/array.d.ts b/test/node_modules/@ethersproject/abi/lib/coders/array.d.ts new file mode 100644 index 0000000..62032c5 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/array.d.ts.map b/test/node_modules/@ethersproject/abi/lib/coders/array.d.ts.map new file mode 100644 index 0000000..05f6898 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/array.js b/test/node_modules/@ethersproject/abi/lib/coders/array.js new file mode 100644 index 0000000..84d1828 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/array.js.map b/test/node_modules/@ethersproject/abi/lib/coders/array.js.map new file mode 100644 index 0000000..326259c --- /dev/null +++ b/test/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,EAA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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/test/node_modules/@ethersproject/abi/lib/coders/boolean.d.ts b/test/node_modules/@ethersproject/abi/lib/coders/boolean.d.ts new file mode 100644 index 0000000..ae83580 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/boolean.d.ts.map b/test/node_modules/@ethersproject/abi/lib/coders/boolean.d.ts.map new file mode 100644 index 0000000..e265fba --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/boolean.js b/test/node_modules/@ethersproject/abi/lib/coders/boolean.js new file mode 100644 index 0000000..2d8f5c0 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/boolean.js.map b/test/node_modules/@ethersproject/abi/lib/coders/boolean.js.map new file mode 100644 index 0000000..0b2b270 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/bytes.d.ts b/test/node_modules/@ethersproject/abi/lib/coders/bytes.d.ts new file mode 100644 index 0000000..7fbcf7b --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/bytes.d.ts.map b/test/node_modules/@ethersproject/abi/lib/coders/bytes.d.ts.map new file mode 100644 index 0000000..aec892c --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/bytes.js b/test/node_modules/@ethersproject/abi/lib/coders/bytes.js new file mode 100644 index 0000000..8204ad7 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/bytes.js.map b/test/node_modules/@ethersproject/abi/lib/coders/bytes.js.map new file mode 100644 index 0000000..cb92866 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.d.ts b/test/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.d.ts new file mode 100644 index 0000000..e345513 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.d.ts.map b/test/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.d.ts.map new file mode 100644 index 0000000..42da7a4 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.js b/test/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.js new file mode 100644 index 0000000..8756baa --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.js.map b/test/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.js.map new file mode 100644 index 0000000..2eac31e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/null.d.ts b/test/node_modules/@ethersproject/abi/lib/coders/null.d.ts new file mode 100644 index 0000000..04ff0fa --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/null.d.ts.map b/test/node_modules/@ethersproject/abi/lib/coders/null.d.ts.map new file mode 100644 index 0000000..96ad6ef --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/null.js b/test/node_modules/@ethersproject/abi/lib/coders/null.js new file mode 100644 index 0000000..596e4ea --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/null.js.map b/test/node_modules/@ethersproject/abi/lib/coders/null.js.map new file mode 100644 index 0000000..2fcfe65 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/number.d.ts b/test/node_modules/@ethersproject/abi/lib/coders/number.d.ts new file mode 100644 index 0000000..f1cd379 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/number.d.ts.map b/test/node_modules/@ethersproject/abi/lib/coders/number.d.ts.map new file mode 100644 index 0000000..c3f5f90 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/number.js b/test/node_modules/@ethersproject/abi/lib/coders/number.js new file mode 100644 index 0000000..5921505 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/number.js.map b/test/node_modules/@ethersproject/abi/lib/coders/number.js.map new file mode 100644 index 0000000..b978a9c --- /dev/null +++ b/test/node_modules/@ethersproject/abi/lib/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,sDAAmE;AACnE,sDAA8E;AAE9E,mDAAyD;AAEzD;IAAiC,+BAAK;IAIlC,qBAAY,IAAY,EAAE,MAAe,EAAE,SAAiB;QAA5D,iBAMC;QALG,IAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAA,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,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,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/test/node_modules/@ethersproject/abi/lib/coders/string.d.ts b/test/node_modules/@ethersproject/abi/lib/coders/string.d.ts new file mode 100644 index 0000000..08d75c3 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/string.d.ts.map b/test/node_modules/@ethersproject/abi/lib/coders/string.d.ts.map new file mode 100644 index 0000000..30d1e61 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/string.js b/test/node_modules/@ethersproject/abi/lib/coders/string.js new file mode 100644 index 0000000..ad20126 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/string.js.map b/test/node_modules/@ethersproject/abi/lib/coders/string.js.map new file mode 100644 index 0000000..e191ae1 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/tuple.d.ts b/test/node_modules/@ethersproject/abi/lib/coders/tuple.d.ts new file mode 100644 index 0000000..514d5c2 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/tuple.d.ts.map b/test/node_modules/@ethersproject/abi/lib/coders/tuple.d.ts.map new file mode 100644 index 0000000..47858e1 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/tuple.js b/test/node_modules/@ethersproject/abi/lib/coders/tuple.js new file mode 100644 index 0000000..53b86fd --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/coders/tuple.js.map b/test/node_modules/@ethersproject/abi/lib/coders/tuple.js.map new file mode 100644 index 0000000..3d867a6 --- /dev/null +++ b/test/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;AAE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AAE,KAAa;YAC5C,IAAI,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC;YAC3B,IAAI,CAAC,IAAI,IAAI,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;gBAAE,OAAO;aAAE;YAEjD,IAAI,IAAI,KAAK,QAAQ,EAAE;gBAAE,IAAI,GAAG,SAAS,CAAC;aAAE;YAE5C,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE;gBAAE,OAAO;aAAE;YAErC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;IAED,2BAAM,GAAN,UAAO,MAAc,EAAE,KAA6C;QAChE,OAAO,IAAA,YAAI,EAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC5C,CAAC;IAED,2BAAM,GAAN,UAAO,MAAc;QACjB,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAA,cAAM,EAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IACjE,CAAC;IACL,iBAAC;AAAD,CAAC,AAtDD,CAAgC,sBAAK,GAsDpC;AAtDY,gCAAU"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/abi/lib/fragments.d.ts b/test/node_modules/@ethersproject/abi/lib/fragments.d.ts new file mode 100644 index 0000000..2b9b253 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/fragments.d.ts.map b/test/node_modules/@ethersproject/abi/lib/fragments.d.ts.map new file mode 100644 index 0000000..b169744 --- /dev/null +++ b/test/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,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAElC,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;IAClD,QAAQ,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;IAEnD,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACzB;AA2MD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rD,MAAM,CAAC,qBAAqB,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,mBAAmB;CAGzE;AAOD,qBAAa,gBAAiB,SAAQ,mBAAmB;IACrD,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAE3B,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM;IAoD/B,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,gBAAgB,GAAG,YAAY,GAAG,MAAM,GAAG,gBAAgB;IAO9E,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,gBAAgB,GAAG,YAAY,GAAG,gBAAgB;IAuB3E,MAAM,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/test/node_modules/@ethersproject/abi/lib/fragments.js b/test/node_modules/@ethersproject/abi/lib/fragments.js new file mode 100644 index 0000000..9095ad1 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/fragments.js.map b/test/node_modules/@ethersproject/abi/lib/fragments.js.map new file mode 100644 index 0000000..02ff0ed --- /dev/null +++ b/test/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,wDAA2D;AAE3D,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAwBlC,CAAC;AAEF,IAAM,iBAAiB,GAAG,EAAG,CAAC;AAqB9B,IAAI,cAAc,GAAkC,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AACpG,IAAI,aAAa,GAAkC,EAAE,QAAQ,EAAE,I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AAa;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/test/node_modules/@ethersproject/abi/lib/index.d.ts b/test/node_modules/@ethersproject/abi/lib/index.d.ts new file mode 100644 index 0000000..cbdc15d --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/index.d.ts.map b/test/node_modules/@ethersproject/abi/lib/index.d.ts.map new file mode 100644 index 0000000..da4e76f --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/index.js b/test/node_modules/@ethersproject/abi/lib/index.js new file mode 100644 index 0000000..46439c8 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/index.js.map b/test/node_modules/@ethersproject/abi/lib/index.js.map new file mode 100644 index 0000000..c220617 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/lib/interface.d.ts b/test/node_modules/@ethersproject/abi/lib/interface.d.ts new file mode 100644 index 0000000..c50269e --- /dev/null +++ b/test/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 | string, values: ReadonlyArray): Array>; + encodeEventLog(eventFragment: EventFragment | string, 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/test/node_modules/@ethersproject/abi/lib/interface.d.ts.map b/test/node_modules/@ethersproject/abi/lib/interface.d.ts.map new file mode 100644 index 0000000..3514774 --- /dev/null +++ b/test/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,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACxB;AAED,qBAAa,sBAAuB,SAAQ,WAAW,CAAC,sBAAsB,CAAC;IAC3E,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAA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a/test/node_modules/@ethersproject/abi/lib/interface.js b/test/node_modules/@ethersproject/abi/lib/interface.js new file mode 100644 index 0000000..b58a2a9 --- /dev/null +++ b/test/node_modules/@ethersproject/abi/lib/interface.js @@ -0,0 +1,664 @@ +"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; + 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 message = ""; + 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]; + } + if (errorName === "Error") { + message = "; VM Exception while processing transaction: reverted with reason string " + JSON.stringify(errorArgs[0]); + } + else if (errorName === "Panic") { + message = "; VM Exception while processing transaction: reverted with panic code " + 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) { } + } + break; + } + } + return logger.throwError("call revert exception" + message, logger_1.Logger.errors.CALL_EXCEPTION, { + method: functionFragment.format(), + data: (0, bytes_1.hexlify)(data), + 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)); + } + if (param.type === "bool" && typeof (value) === "boolean") { + value = (value ? "0x01" : "0x00"); + } + if (param.type.match(/^u?int/)) { + value = bignumber_1.BigNumber.from(value).toHexString(); + } + // 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/test/node_modules/@ethersproject/abi/lib/interface.js.map b/test/node_modules/@ethersproject/abi/lib/interface.js.map new file mode 100644 index 0000000..a9e8416 --- /dev/null +++ b/test/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;IAA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git a/test/node_modules/@ethersproject/abi/package.json b/test/node_modules/@ethersproject/abi/package.json new file mode 100644 index 0000000..029344f --- /dev/null +++ b/test/node_modules/@ethersproject/abi/package.json @@ -0,0 +1,50 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.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": "ec1b9583039a14a0e0fa15d0a2a6082a2f41cf5b", + "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": "0x76f6fd1617e7f7aacd876957111e5368a7e53b8aebf572b30f0f1a0cd2b4a603", + "types": "./lib/index.d.ts", + "version": "5.7.0" +} diff --git a/test/node_modules/@ethersproject/abi/src.ts/_version.ts b/test/node_modules/@ethersproject/abi/src.ts/_version.ts new file mode 100644 index 0000000..b5869f5 --- /dev/null +++ b/test/node_modules/@ethersproject/abi/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "abi/5.7.0"; diff --git a/test/node_modules/@ethersproject/abi/src.ts/abi-coder.ts b/test/node_modules/@ethersproject/abi/src.ts/abi-coder.ts new file mode 100644 index 0000000..9056ae9 --- /dev/null +++ b/test/node_modules/@ethersproject/abi/src.ts/abi-coder.ts @@ -0,0 +1,123 @@ +"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) { + 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/test/node_modules/@ethersproject/abi/src.ts/coders/abstract-coder.ts b/test/node_modules/@ethersproject/abi/src.ts/coders/abstract-coder.ts new file mode 100644 index 0000000..df6213c --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/src.ts/coders/address.ts b/test/node_modules/@ethersproject/abi/src.ts/coders/address.ts new file mode 100644 index 0000000..6ae2d27 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/src.ts/coders/anonymous.ts b/test/node_modules/@ethersproject/abi/src.ts/coders/anonymous.ts new file mode 100644 index 0000000..9bf778e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/src.ts/coders/array.ts b/test/node_modules/@ethersproject/abi/src.ts/coders/array.ts new file mode 100644 index 0000000..a931037 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/src.ts/coders/boolean.ts b/test/node_modules/@ethersproject/abi/src.ts/coders/boolean.ts new file mode 100644 index 0000000..ff3d1d8 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/src.ts/coders/bytes.ts b/test/node_modules/@ethersproject/abi/src.ts/coders/bytes.ts new file mode 100644 index 0000000..bc2b20a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/src.ts/coders/fixed-bytes.ts b/test/node_modules/@ethersproject/abi/src.ts/coders/fixed-bytes.ts new file mode 100644 index 0000000..ebf4e23 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/src.ts/coders/null.ts b/test/node_modules/@ethersproject/abi/src.ts/coders/null.ts new file mode 100644 index 0000000..c7377be --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/src.ts/coders/number.ts b/test/node_modules/@ethersproject/abi/src.ts/coders/number.ts new file mode 100644 index 0000000..031cbdc --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/src.ts/coders/string.ts b/test/node_modules/@ethersproject/abi/src.ts/coders/string.ts new file mode 100644 index 0000000..c2625f8 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/src.ts/coders/tuple.ts b/test/node_modules/@ethersproject/abi/src.ts/coders/tuple.ts new file mode 100644 index 0000000..9b2cf5c --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/src.ts/fragments.ts b/test/node_modules/@ethersproject/abi/src.ts/fragments.ts new file mode 100644 index 0000000..802a2a9 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/src.ts/index.ts b/test/node_modules/@ethersproject/abi/src.ts/index.ts new file mode 100644 index 0000000..6858409 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abi/src.ts/interface.ts b/test/node_modules/@ethersproject/abi/src.ts/interface.ts new file mode 100644 index 0000000..503dc05 --- /dev/null +++ b/test/node_modules/@ethersproject/abi/src.ts/interface.ts @@ -0,0 +1,715 @@ +"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) { + 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 message = ""; + 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]; } + if (errorName === "Error") { + message = `; VM Exception while processing transaction: reverted with reason string ${ JSON.stringify(errorArgs[0]) }`; + } else if (errorName === "Panic") { + message = `; VM Exception while processing transaction: reverted with panic code ${ 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) { } + } + break; + } + } + + return logger.throwError("call revert exception" + message, Logger.errors.CALL_EXCEPTION, { + method: functionFragment.format(), + data: hexlify(data), 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 | string, 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)); + } + + if (param.type === "bool" && typeof(value) === "boolean") { + value = (value ? "0x01": "0x00"); + } + + if (param.type.match(/^u?int/)) { + value = BigNumber.from(value).toHexString(); + } + + // 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 | string, 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/test/node_modules/@ethersproject/abstract-provider/LICENSE.md b/test/node_modules/@ethersproject/abstract-provider/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abstract-provider/README.md b/test/node_modules/@ethersproject/abstract-provider/README.md new file mode 100644 index 0000000..16ce8cc --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abstract-provider/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/abstract-provider/lib.esm/_version.d.ts new file mode 100644 index 0000000..1d8fafd --- /dev/null +++ b/test/node_modules/@ethersproject/abstract-provider/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "abstract-provider/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/abstract-provider/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/abstract-provider/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..fbdadae --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abstract-provider/lib.esm/_version.js b/test/node_modules/@ethersproject/abstract-provider/lib.esm/_version.js new file mode 100644 index 0000000..1eece40 --- /dev/null +++ b/test/node_modules/@ethersproject/abstract-provider/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "abstract-provider/5.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/abstract-provider/lib.esm/_version.js.map b/test/node_modules/@ethersproject/abstract-provider/lib.esm/_version.js.map new file mode 100644 index 0000000..f068180 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abstract-provider/lib.esm/index.d.ts b/test/node_modules/@ethersproject/abstract-provider/lib.esm/index.d.ts new file mode 100644 index 0000000..3815a3e --- /dev/null +++ b/test/node_modules/@ethersproject/abstract-provider/lib.esm/index.d.ts @@ -0,0 +1,156 @@ +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; + ccipReadEnabled?: boolean; +}; +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 { + lastBaseFeePerGas: null | BigNumber; + 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/test/node_modules/@ethersproject/abstract-provider/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/abstract-provider/lib.esm/index.d.ts.map new file mode 100644 index 0000000..28f9714 --- /dev/null +++ b/test/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,CAAC,CAAC;IACjC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAA;AAED,MAAM,WAAW,mBAAoB,SAAQ,WAAW;IACpD,IAAI,EAAE,MAAM,CAAC;IAGb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAA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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/test/node_modules/@ethersproject/abstract-provider/lib.esm/index.js b/test/node_modules/@ethersproject/abstract-provider/lib.esm/index.js new file mode 100644 index 0000000..2544fbb --- /dev/null +++ b/test/node_modules/@ethersproject/abstract-provider/lib.esm/index.js @@ -0,0 +1,111 @@ +"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 lastBaseFeePerGas = null, 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 + lastBaseFeePerGas = block.baseFeePerGas; + maxPriorityFeePerGas = BigNumber.from("1500000000"); + maxFeePerGas = block.baseFeePerGas.mul(2).add(maxPriorityFeePerGas); + } + return { lastBaseFeePerGas, 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/test/node_modules/@ethersproject/abstract-provider/lib.esm/index.js.map b/test/node_modules/@ethersproject/abstract-provider/lib.esm/index.js.map new file mode 100644 index 0000000..b8fafc5 --- /dev/null +++ b/test/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;AA8ClC,CAAC;AAkED,CAAC;AAuBF,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,MAAM,IAAI,C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\ No newline at end of file diff --git a/test/node_modules/@ethersproject/abstract-provider/lib/_version.d.ts b/test/node_modules/@ethersproject/abstract-provider/lib/_version.d.ts new file mode 100644 index 0000000..1d8fafd --- /dev/null +++ b/test/node_modules/@ethersproject/abstract-provider/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "abstract-provider/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/abstract-provider/lib/_version.d.ts.map b/test/node_modules/@ethersproject/abstract-provider/lib/_version.d.ts.map new file mode 100644 index 0000000..fbdadae --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abstract-provider/lib/_version.js b/test/node_modules/@ethersproject/abstract-provider/lib/_version.js new file mode 100644 index 0000000..7b1c02b --- /dev/null +++ b/test/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.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/abstract-provider/lib/_version.js.map b/test/node_modules/@ethersproject/abstract-provider/lib/_version.js.map new file mode 100644 index 0000000..e2c87f9 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abstract-provider/lib/index.d.ts b/test/node_modules/@ethersproject/abstract-provider/lib/index.d.ts new file mode 100644 index 0000000..3815a3e --- /dev/null +++ b/test/node_modules/@ethersproject/abstract-provider/lib/index.d.ts @@ -0,0 +1,156 @@ +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; + ccipReadEnabled?: boolean; +}; +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 { + lastBaseFeePerGas: null | BigNumber; + 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/test/node_modules/@ethersproject/abstract-provider/lib/index.d.ts.map b/test/node_modules/@ethersproject/abstract-provider/lib/index.d.ts.map new file mode 100644 index 0000000..28f9714 --- /dev/null +++ b/test/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;IAE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,SAAS,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO;IACjE,QAAQ,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE,SAAS,GAAG,MAAM;IACrD,QAAQ,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,SAAS,GAAG,KAAK,CAAC,QAAQ,CAAC;IAC1D,QAAQ,CAAC,GAAG,CAAC,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/test/node_modules/@ethersproject/abstract-provider/lib/index.js b/test/node_modules/@ethersproject/abstract-provider/lib/index.js new file mode 100644 index 0000000..d3a16ca --- /dev/null +++ b/test/node_modules/@ethersproject/abstract-provider/lib/index.js @@ -0,0 +1,186 @@ +"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, lastBaseFeePerGas, 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; + lastBaseFeePerGas = null, 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 + lastBaseFeePerGas = block.baseFeePerGas; + maxPriorityFeePerGas = bignumber_1.BigNumber.from("1500000000"); + maxFeePerGas = block.baseFeePerGas.mul(2).add(maxPriorityFeePerGas); + } + return [2 /*return*/, { lastBaseFeePerGas: lastBaseFeePerGas, 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/test/node_modules/@ethersproject/abstract-provider/lib/index.js.map b/test/node_modules/@ethersproject/abstract-provider/lib/index.js.map new file mode 100644 index 0000000..caf8924 --- /dev/null +++ b/test/node_modules/@ethersproject/abstract-provider/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,sDAAmE;AACnE,8CAA8D;AAE9D,wDAAuG;AAIvG,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AA8ClC,CAAC;AAkED,CAAC;AAuBF,qCAAqC;AACrC,0EAA0E;AAC1E,IAAI;AAEJ;IAAwC,6BAAW;IAAnD;;IAQA,CAAC;IAHU,qBAAW,GAAlB,UAAmB,KAAU;QACzB,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC;IAC3C,CAAC;IACL,gBAAC;AAAD,CAAC,AARD,CAAwC,wBAAW,GAQlD;AARqB,8BAAS;AAU/B;IAAoC,kCAAS;IAKzC,wBAAY,SAAiB,EAAE,MAAe;QAA9C,iBAWC;QAVG,IAAI,CAAC,IAAA,mBAAW,EAAC,SAAS,EAAE,EAAE,CAAC,EAAE;YAC7B,MAAM,CAAC,kBAAkB,CAAC,mBAAmB,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;SAC1E;QAED,QAAA,kBAAM;YACF,YAAY,EAAE,IAAI;YAClB,iBAAiB,EAAE,IAAI;YACvB,MAAM,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AkB;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,AAhID,IAgIC;AAhIqB,4BAAQ"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/abstract-provider/package.json b/test/node_modules/@ethersproject/abstract-provider/package.json new file mode 100644 index 0000000..aa63e2f --- /dev/null +++ b/test/node_modules/@ethersproject/abstract-provider/package.json @@ -0,0 +1,48 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/networks": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/web": "^5.7.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": "ec1b9583039a14a0e0fa15d0a2a6082a2f41cf5b", + "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": "0x952cf2ca65f6e38799386cab1c8595e8f849360128bc61fb28de2b595bbfaad9", + "types": "./lib/index.d.ts", + "version": "5.7.0" +} diff --git a/test/node_modules/@ethersproject/abstract-provider/src.ts/_version.ts b/test/node_modules/@ethersproject/abstract-provider/src.ts/_version.ts new file mode 100644 index 0000000..9b720d9 --- /dev/null +++ b/test/node_modules/@ethersproject/abstract-provider/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "abstract-provider/5.7.0"; diff --git a/test/node_modules/@ethersproject/abstract-provider/src.ts/index.ts b/test/node_modules/@ethersproject/abstract-provider/src.ts/index.ts new file mode 100644 index 0000000..d56958a --- /dev/null +++ b/test/node_modules/@ethersproject/abstract-provider/src.ts/index.ts @@ -0,0 +1,355 @@ +"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; + ccipReadEnabled?: boolean; +} + +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 { + lastBaseFeePerGas: null | BigNumber; + 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 lastBaseFeePerGas = null, 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 + lastBaseFeePerGas = block.baseFeePerGas; + maxPriorityFeePerGas = BigNumber.from("1500000000"); + maxFeePerGas = block.baseFeePerGas.mul(2).add(maxPriorityFeePerGas); + } + + return { lastBaseFeePerGas, 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/test/node_modules/@ethersproject/abstract-signer/LICENSE.md b/test/node_modules/@ethersproject/abstract-signer/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abstract-signer/README.md b/test/node_modules/@ethersproject/abstract-signer/README.md new file mode 100644 index 0000000..0e8be1a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abstract-signer/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/abstract-signer/lib.esm/_version.d.ts new file mode 100644 index 0000000..8dc113c --- /dev/null +++ b/test/node_modules/@ethersproject/abstract-signer/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "abstract-signer/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/abstract-signer/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/abstract-signer/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..85640ad --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abstract-signer/lib.esm/_version.js b/test/node_modules/@ethersproject/abstract-signer/lib.esm/_version.js new file mode 100644 index 0000000..0c9f837 --- /dev/null +++ b/test/node_modules/@ethersproject/abstract-signer/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "abstract-signer/5.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/abstract-signer/lib.esm/_version.js.map b/test/node_modules/@ethersproject/abstract-signer/lib.esm/_version.js.map new file mode 100644 index 0000000..80e36ec --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abstract-signer/lib.esm/index.d.ts b/test/node_modules/@ethersproject/abstract-signer/lib.esm/index.d.ts new file mode 100644 index 0000000..b95db43 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abstract-signer/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/abstract-signer/lib.esm/index.d.ts.map new file mode 100644 index 0000000..dc914c0 --- /dev/null +++ b/test/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,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,KA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AAE,UAAU,CAAC,kBAAkB,CAAC,GAAG,UAAU,CAAC,kBAAkB,CAAC;IAmCvF,mBAAmB,CAAC,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;IAMhD,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/test/node_modules/@ethersproject/abstract-signer/lib.esm/index.js b/test/node_modules/@ethersproject/abstract-signer/lib.esm/index.js new file mode 100644 index 0000000..28442bd --- /dev/null +++ b/test/node_modules/@ethersproject/abstract-signer/lib.esm/index.js @@ -0,0 +1,303 @@ +"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", "ccipReadEnabled", "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) { + 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/test/node_modules/@ethersproject/abstract-signer/lib.esm/index.js.map b/test/node_modules/@ethersproject/abstract-signer/lib.esm/index.js.map new file mode 100644 index 0000000..15b4b5d --- /dev/null +++ b/test/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,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAEnC,MAAM,sBAAsB,GAAkB;IAC1C,YAAY,EAAE,iBAAiB,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,sBAAsB,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO;CAC3K,CAAC;AAEF,MAAM,aAAa,GAAG;IAClB,MAAM,CAAC,MAAM,CAAC,kBAAkB;IAChC,MAAM,CAAC,MAAM,CAAC,aAAa;IAC3B,MAAM,CAAC,MAAM,CAAC,uBAAuB;CACxC,CAAC;AAWD,CAAC;AAKD,CAAC;AAsBF,MAAM,OAAgB,MAAM;IA4BxB,mBAAmB;IACnB,8BAA8B;IAC9B;QACI,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC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;IACvD,CAAC;IAED,UAAU;QACN,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;IAED,KAAK,CAAC,OAAe,EAAE,SAAiB;QACpC,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;YAC/B,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,CAAC;QAC9F,CAAC,CAAC,CAAC;IACP,CAAC;IAED,WAAW,CAAC,OAAuB;QAC/B,OAAO,IAAI,CAAC,KAAK,CAAC,iCAAiC,EAAE,aAAa,CAAC,CAAC;IACxE,CAAC;IAED,eAAe,CAAC,WAA2C;QACvD,OAAO,IAAI,CAAC,KAAK,CAAC,qCAAqC,EAAE,iBAAiB,CAAC,CAAC;IAChF,CAAC;IAED,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/test/node_modules/@ethersproject/abstract-signer/lib/_version.d.ts b/test/node_modules/@ethersproject/abstract-signer/lib/_version.d.ts new file mode 100644 index 0000000..8dc113c --- /dev/null +++ b/test/node_modules/@ethersproject/abstract-signer/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "abstract-signer/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/abstract-signer/lib/_version.d.ts.map b/test/node_modules/@ethersproject/abstract-signer/lib/_version.d.ts.map new file mode 100644 index 0000000..85640ad --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abstract-signer/lib/_version.js b/test/node_modules/@ethersproject/abstract-signer/lib/_version.js new file mode 100644 index 0000000..df2a26c --- /dev/null +++ b/test/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.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/abstract-signer/lib/_version.js.map b/test/node_modules/@ethersproject/abstract-signer/lib/_version.js.map new file mode 100644 index 0000000..2ad9706 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abstract-signer/lib/index.d.ts b/test/node_modules/@ethersproject/abstract-signer/lib/index.d.ts new file mode 100644 index 0000000..b95db43 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/abstract-signer/lib/index.d.ts.map b/test/node_modules/@ethersproject/abstract-signer/lib/index.d.ts.map new file mode 100644 index 0000000..dc914c0 --- /dev/null +++ b/test/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,2BA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,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/test/node_modules/@ethersproject/abstract-signer/lib/index.js b/test/node_modules/@ethersproject/abstract-signer/lib/index.js new file mode 100644 index 0000000..b141aae --- /dev/null +++ b/test/node_modules/@ethersproject/abstract-signer/lib/index.js @@ -0,0 +1,437 @@ +"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", "ccipReadEnabled", "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 _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/test/node_modules/@ethersproject/abstract-signer/lib/index.js.map b/test/node_modules/@ethersproject/abstract-signer/lib/index.js.map new file mode 100644 index 0000000..b1399fc --- /dev/null +++ b/test/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,iBAAiB,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,sBAAsB,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO;CAC3K,CAAC;AAEF,IAAM,aAAa,GAAG;IAClB,eAAM,CAAC,MAAM,CAAC,kBAAkB;IAChC,eAAM,CAAC,MAAM,CAAC,aAAa;IAC3B,eAAM,CAAC,MAAM,CAAC,uBAAuB;CACxC,CAAC;AAWD,CAAC;AAKD,CAAC;AAsBF;IA4BI,mBAAmB;IACnB,8BAA8B;IAC9B;;QACI,MAAM,CAAC,aAAa,aAAa,MAAM,CAAC,CAAC;QACzC,IAAA,2BAAc,EAAC,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;IAC5C,CAAC;IAGD,mBAAmB;IACnB,iCAAiC;IAE3B,2BAAU,GAAhB,UAAiB,QAAmB;;;;;wBAChC,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;wBAC3B,qBAAM,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,QAAQ,CAAC,EAAA;4BAAlE,sBAAO,SAA2D,EAAC;;;;KACtE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EAAE,UAAU,EAAE,QAAQ,IAAI,IAAI,CAAC,CAAC;;IACvD,CAAC;IAED,+BAAU,GAAV;QACI,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;IAED,0BAAK,GAAL,UAAM,OAAe,EAAE,SAAiB;QACpC,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC;YAC1B,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,eAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,CAAC;QAC9F,CAAC,CAAC,CAAC;IACP,CAAC;IAED,gCAAW,GAAX,UAAY,OAAuB;QAC/B,OAAO,IAAI,CAAC,KAAK,CAAC,iCAAiC,EAAE,aAAa,CAAC,CAAC;IACxE,CAAC;IAED,oCAAe,GAAf,UAAgB,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,AAlCD,CAAgC,MAAM,GAkCrC;AAlCY,gCAAU"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/abstract-signer/package.json b/test/node_modules/@ethersproject/abstract-signer/package.json new file mode 100644 index 0000000..67af672 --- /dev/null +++ b/test/node_modules/@ethersproject/abstract-signer/package.json @@ -0,0 +1,46 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.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": "ec1b9583039a14a0e0fa15d0a2a6082a2f41cf5b", + "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": "0x10e5007f2b6467e86fa36292984b8e74bfcd18e6dc1748cf0f62b36c4e4e228a", + "types": "./lib/index.d.ts", + "version": "5.7.0" +} diff --git a/test/node_modules/@ethersproject/abstract-signer/src.ts/_version.ts b/test/node_modules/@ethersproject/abstract-signer/src.ts/_version.ts new file mode 100644 index 0000000..6714a0e --- /dev/null +++ b/test/node_modules/@ethersproject/abstract-signer/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "abstract-signer/5.7.0"; diff --git a/test/node_modules/@ethersproject/abstract-signer/src.ts/index.ts b/test/node_modules/@ethersproject/abstract-signer/src.ts/index.ts new file mode 100644 index 0000000..65979e8 --- /dev/null +++ b/test/node_modules/@ethersproject/abstract-signer/src.ts/index.ts @@ -0,0 +1,375 @@ +"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", "ccipReadEnabled", "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) { + 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/test/node_modules/@ethersproject/address/LICENSE.md b/test/node_modules/@ethersproject/address/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/address/README.md b/test/node_modules/@ethersproject/address/README.md new file mode 100644 index 0000000..80e994d --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/address/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/address/lib.esm/_version.d.ts new file mode 100644 index 0000000..28e6090 --- /dev/null +++ b/test/node_modules/@ethersproject/address/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "address/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/address/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/address/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..4a69186 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/address/lib.esm/_version.js b/test/node_modules/@ethersproject/address/lib.esm/_version.js new file mode 100644 index 0000000..ea12d70 --- /dev/null +++ b/test/node_modules/@ethersproject/address/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "address/5.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/address/lib.esm/_version.js.map b/test/node_modules/@ethersproject/address/lib.esm/_version.js.map new file mode 100644 index 0000000..2d391d7 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/address/lib.esm/index.d.ts b/test/node_modules/@ethersproject/address/lib.esm/index.d.ts new file mode 100644 index 0000000..43a6134 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/address/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/address/lib.esm/index.d.ts.map new file mode 100644 index 0000000..e432764 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/address/lib.esm/index.js b/test/node_modules/@ethersproject/address/lib.esm/index.js new file mode 100644 index 0000000..beb8dd7 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/address/lib.esm/index.js.map b/test/node_modules/@ethersproject/address/lib.esm/index.js.map new file mode 100644 index 0000000..7993c0f --- /dev/null +++ b/test/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,MA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jF,IAAI,IAAI,GAAW,IAAI,CAAC;IACxB,IAAI;QACA,IAAI,GAAG,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;KACvC;IAAC,OAAO,KAAK,EAAE;QACZ,MAAM,CAAC,kBAAkB,CAAC,sBAAsB,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC;KACjF;IAED,MAAM,KAAK,GAAG,UAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IAEpF,OAAO,UAAU,CAAC,YAAY,CAAC,SAAS,CAAC,MAAM,CAAC,CAAE,IAAI,EAAE,KAAK,CAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAC5E,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,IAAY,EAAE,IAAe,EAAE,YAAuB;IACpF,IAAI,aAAa,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE;QAC5B,MAAM,CAAC,kBAAkB,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/test/node_modules/@ethersproject/address/lib/_version.d.ts b/test/node_modules/@ethersproject/address/lib/_version.d.ts new file mode 100644 index 0000000..28e6090 --- /dev/null +++ b/test/node_modules/@ethersproject/address/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "address/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/address/lib/_version.d.ts.map b/test/node_modules/@ethersproject/address/lib/_version.d.ts.map new file mode 100644 index 0000000..4a69186 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/address/lib/_version.js b/test/node_modules/@ethersproject/address/lib/_version.js new file mode 100644 index 0000000..b07df25 --- /dev/null +++ b/test/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.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/address/lib/_version.js.map b/test/node_modules/@ethersproject/address/lib/_version.js.map new file mode 100644 index 0000000..0ce0fea --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/address/lib/index.d.ts b/test/node_modules/@ethersproject/address/lib/index.d.ts new file mode 100644 index 0000000..43a6134 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/address/lib/index.d.ts.map b/test/node_modules/@ethersproject/address/lib/index.d.ts.map new file mode 100644 index 0000000..e432764 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/address/lib/index.js b/test/node_modules/@ethersproject/address/lib/index.js new file mode 100644 index 0000000..21dfad1 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/address/lib/index.js.map b/test/node_modules/@ethersproject/address/lib/index.js.map new file mode 100644 index 0000000..74c3242 --- /dev/null +++ b/test/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,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAE7C,IAAM,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,CAAC,CAAC;KACxC;IAED,IAAM,MAAM,GAAG,IAAA,gBAAQ,EAAC,IAAA,qBAAS,EAAC,QAAQ,CAAC,CAAC,CAAC;IAE7C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE;QAC5B,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,I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AE,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/test/node_modules/@ethersproject/address/package.json b/test/node_modules/@ethersproject/address/package.json new file mode 100644 index 0000000..1f04a03 --- /dev/null +++ b/test/node_modules/@ethersproject/address/package.json @@ -0,0 +1,46 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/rlp": "^5.7.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": "ec1b9583039a14a0e0fa15d0a2a6082a2f41cf5b", + "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": "0x6732663914c6efc33735eb97dc36ecaf0ecf4ff34ad1877ee7b842f1c27f98f4", + "types": "./lib/index.d.ts", + "version": "5.7.0" +} diff --git a/test/node_modules/@ethersproject/address/src.ts/_version.ts b/test/node_modules/@ethersproject/address/src.ts/_version.ts new file mode 100644 index 0000000..a7bd0eb --- /dev/null +++ b/test/node_modules/@ethersproject/address/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "address/5.7.0"; diff --git a/test/node_modules/@ethersproject/address/src.ts/index.ts b/test/node_modules/@ethersproject/address/src.ts/index.ts new file mode 100644 index 0000000..661d70e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/address/thirdparty.d.ts b/test/node_modules/@ethersproject/address/thirdparty.d.ts new file mode 100644 index 0000000..e69de29 diff --git a/test/node_modules/@ethersproject/base64/LICENSE.md b/test/node_modules/@ethersproject/base64/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/README.md b/test/node_modules/@ethersproject/base64/README.md new file mode 100644 index 0000000..9c7d505 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/base64/lib.esm/_version.d.ts new file mode 100644 index 0000000..9437633 --- /dev/null +++ b/test/node_modules/@ethersproject/base64/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "base64/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/base64/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/base64/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..3fd2218 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/lib.esm/_version.js b/test/node_modules/@ethersproject/base64/lib.esm/_version.js new file mode 100644 index 0000000..2b5be3f --- /dev/null +++ b/test/node_modules/@ethersproject/base64/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "base64/5.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/base64/lib.esm/_version.js.map b/test/node_modules/@ethersproject/base64/lib.esm/_version.js.map new file mode 100644 index 0000000..056b924 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/lib.esm/base64.d.ts b/test/node_modules/@ethersproject/base64/lib.esm/base64.d.ts new file mode 100644 index 0000000..3abd5c4 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/lib.esm/base64.d.ts.map b/test/node_modules/@ethersproject/base64/lib.esm/base64.d.ts.map new file mode 100644 index 0000000..65da5bf --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/lib.esm/base64.js b/test/node_modules/@ethersproject/base64/lib.esm/base64.js new file mode 100644 index 0000000..869d25e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/lib.esm/base64.js.map b/test/node_modules/@ethersproject/base64/lib.esm/base64.js.map new file mode 100644 index 0000000..06ca251 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/lib.esm/index.d.ts b/test/node_modules/@ethersproject/base64/lib.esm/index.d.ts new file mode 100644 index 0000000..d0fd1f2 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/base64/lib.esm/index.d.ts.map new file mode 100644 index 0000000..e96cd52 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/lib.esm/index.js b/test/node_modules/@ethersproject/base64/lib.esm/index.js new file mode 100644 index 0000000..9cd503b --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/lib.esm/index.js.map b/test/node_modules/@ethersproject/base64/lib.esm/index.js.map new file mode 100644 index 0000000..39f8d64 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/lib/_version.d.ts b/test/node_modules/@ethersproject/base64/lib/_version.d.ts new file mode 100644 index 0000000..9437633 --- /dev/null +++ b/test/node_modules/@ethersproject/base64/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "base64/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/base64/lib/_version.d.ts.map b/test/node_modules/@ethersproject/base64/lib/_version.d.ts.map new file mode 100644 index 0000000..3fd2218 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/lib/_version.js b/test/node_modules/@ethersproject/base64/lib/_version.js new file mode 100644 index 0000000..acfaa43 --- /dev/null +++ b/test/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.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/base64/lib/_version.js.map b/test/node_modules/@ethersproject/base64/lib/_version.js.map new file mode 100644 index 0000000..e2300dc --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/lib/base64.d.ts b/test/node_modules/@ethersproject/base64/lib/base64.d.ts new file mode 100644 index 0000000..3abd5c4 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/lib/base64.d.ts.map b/test/node_modules/@ethersproject/base64/lib/base64.d.ts.map new file mode 100644 index 0000000..354ba22 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/lib/base64.js b/test/node_modules/@ethersproject/base64/lib/base64.js new file mode 100644 index 0000000..c1a3b8f --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/lib/base64.js.map b/test/node_modules/@ethersproject/base64/lib/base64.js.map new file mode 100644 index 0000000..bc03083 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/lib/browser-base64.d.ts b/test/node_modules/@ethersproject/base64/lib/browser-base64.d.ts new file mode 100644 index 0000000..63ef31d --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/lib/browser-base64.d.ts.map b/test/node_modules/@ethersproject/base64/lib/browser-base64.d.ts.map new file mode 100644 index 0000000..55eb246 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/lib/browser-base64.js b/test/node_modules/@ethersproject/base64/lib/browser-base64.js new file mode 100644 index 0000000..807c862 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/lib/browser-base64.js.map b/test/node_modules/@ethersproject/base64/lib/browser-base64.js.map new file mode 100644 index 0000000..61264d3 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/lib/index.d.ts b/test/node_modules/@ethersproject/base64/lib/index.d.ts new file mode 100644 index 0000000..d0fd1f2 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/lib/index.d.ts.map b/test/node_modules/@ethersproject/base64/lib/index.d.ts.map new file mode 100644 index 0000000..e96cd52 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/lib/index.js b/test/node_modules/@ethersproject/base64/lib/index.js new file mode 100644 index 0000000..39229aa --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/lib/index.js.map b/test/node_modules/@ethersproject/base64/lib/index.js.map new file mode 100644 index 0000000..f72dab6 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/package.json b/test/node_modules/@ethersproject/base64/package.json new file mode 100644 index 0000000..d540613 --- /dev/null +++ b/test/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.7.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": "ec1b9583039a14a0e0fa15d0a2a6082a2f41cf5b", + "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": "0x67fc747be8ad32f055e61ea73984a8a1e7030ea19dff1a8c7d8301ad0139078b", + "types": "./lib/index.d.ts", + "version": "5.7.0" +} diff --git a/test/node_modules/@ethersproject/base64/src.ts/_version.ts b/test/node_modules/@ethersproject/base64/src.ts/_version.ts new file mode 100644 index 0000000..cf5ba16 --- /dev/null +++ b/test/node_modules/@ethersproject/base64/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "base64/5.7.0"; diff --git a/test/node_modules/@ethersproject/base64/src.ts/base64.ts b/test/node_modules/@ethersproject/base64/src.ts/base64.ts new file mode 100644 index 0000000..c6f84a0 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/src.ts/browser-base64.ts b/test/node_modules/@ethersproject/base64/src.ts/browser-base64.ts new file mode 100644 index 0000000..4fb4d83 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/base64/src.ts/index.ts b/test/node_modules/@ethersproject/base64/src.ts/index.ts new file mode 100644 index 0000000..5abfcec --- /dev/null +++ b/test/node_modules/@ethersproject/base64/src.ts/index.ts @@ -0,0 +1,3 @@ +"use strict"; + +export { decode, encode } from "./base64"; diff --git a/test/node_modules/@ethersproject/basex/LICENSE.md b/test/node_modules/@ethersproject/basex/LICENSE.md new file mode 100644 index 0000000..b587c34 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/basex/README.md b/test/node_modules/@ethersproject/basex/README.md new file mode 100644 index 0000000..b5217d1 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/basex/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/basex/lib.esm/_version.d.ts new file mode 100644 index 0000000..dd5d26e --- /dev/null +++ b/test/node_modules/@ethersproject/basex/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "basex/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/basex/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/basex/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..bb29653 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/basex/lib.esm/_version.js b/test/node_modules/@ethersproject/basex/lib.esm/_version.js new file mode 100644 index 0000000..e6c9003 --- /dev/null +++ b/test/node_modules/@ethersproject/basex/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "basex/5.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/basex/lib.esm/_version.js.map b/test/node_modules/@ethersproject/basex/lib.esm/_version.js.map new file mode 100644 index 0000000..2b36b38 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/basex/lib.esm/index.d.ts b/test/node_modules/@ethersproject/basex/lib.esm/index.d.ts new file mode 100644 index 0000000..4fe19f3 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/basex/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/basex/lib.esm/index.d.ts.map new file mode 100644 index 0000000..6371534 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/basex/lib.esm/index.js b/test/node_modules/@ethersproject/basex/lib.esm/index.js new file mode 100644 index 0000000..466ee5d --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/basex/lib.esm/index.js.map b/test/node_modules/@ethersproject/basex/lib.esm/index.js.map new file mode 100644 index 0000000..762932b --- /dev/null +++ b/test/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,CAAC,CAAC,GAAG,CAAC,CAAC;SAC7C;IACL,CAAC;IAED,MAAM,CAAC,KAAgB;QACnB,IAAI,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAE7B,IAAI,MAAM,CAAC,MAAM,KAA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C,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/test/node_modules/@ethersproject/basex/lib/_version.d.ts b/test/node_modules/@ethersproject/basex/lib/_version.d.ts new file mode 100644 index 0000000..dd5d26e --- /dev/null +++ b/test/node_modules/@ethersproject/basex/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "basex/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/basex/lib/_version.d.ts.map b/test/node_modules/@ethersproject/basex/lib/_version.d.ts.map new file mode 100644 index 0000000..bb29653 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/basex/lib/_version.js b/test/node_modules/@ethersproject/basex/lib/_version.js new file mode 100644 index 0000000..358a008 --- /dev/null +++ b/test/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.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/basex/lib/_version.js.map b/test/node_modules/@ethersproject/basex/lib/_version.js.map new file mode 100644 index 0000000..2f9c571 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/basex/lib/index.d.ts b/test/node_modules/@ethersproject/basex/lib/index.d.ts new file mode 100644 index 0000000..4fe19f3 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/basex/lib/index.d.ts.map b/test/node_modules/@ethersproject/basex/lib/index.d.ts.map new file mode 100644 index 0000000..6371534 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/basex/lib/index.js b/test/node_modules/@ethersproject/basex/lib/index.js new file mode 100644 index 0000000..78f7d54 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/basex/lib/index.js.map b/test/node_modules/@ethersproject/basex/lib/index.js.map new file mode 100644 index 0000000..4af694c --- /dev/null +++ b/test/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,MAAM,GAAG,CAAE,CAAC,CAAE,CAAA;QAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MA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AAC,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/test/node_modules/@ethersproject/basex/package.json b/test/node_modules/@ethersproject/basex/package.json new file mode 100644 index 0000000..61141a1 --- /dev/null +++ b/test/node_modules/@ethersproject/basex/package.json @@ -0,0 +1,43 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/properties": "^5.7.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": "ec1b9583039a14a0e0fa15d0a2a6082a2f41cf5b", + "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": "0xa3450b5ccf02165bd79e235cc6803751f8194a7680cfc165c62ff3ee3fa6def5", + "types": "./lib/index.d.ts", + "version": "5.7.0" +} diff --git a/test/node_modules/@ethersproject/basex/src.ts/_version.ts b/test/node_modules/@ethersproject/basex/src.ts/_version.ts new file mode 100644 index 0000000..aa06ec7 --- /dev/null +++ b/test/node_modules/@ethersproject/basex/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "basex/5.7.0"; diff --git a/test/node_modules/@ethersproject/basex/src.ts/index.ts b/test/node_modules/@ethersproject/basex/src.ts/index.ts new file mode 100644 index 0000000..6f93a33 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/bignumber/LICENSE.md b/test/node_modules/@ethersproject/bignumber/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/bignumber/README.md b/test/node_modules/@ethersproject/bignumber/README.md new file mode 100644 index 0000000..9d19325 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/bignumber/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/bignumber/lib.esm/_version.d.ts new file mode 100644 index 0000000..2b94506 --- /dev/null +++ b/test/node_modules/@ethersproject/bignumber/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "bignumber/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/bignumber/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/bignumber/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..7e6271e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/bignumber/lib.esm/_version.js b/test/node_modules/@ethersproject/bignumber/lib.esm/_version.js new file mode 100644 index 0000000..876dbb5 --- /dev/null +++ b/test/node_modules/@ethersproject/bignumber/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "bignumber/5.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/bignumber/lib.esm/_version.js.map b/test/node_modules/@ethersproject/bignumber/lib.esm/_version.js.map new file mode 100644 index 0000000..3f20aac --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/bignumber/lib.esm/bignumber.d.ts b/test/node_modules/@ethersproject/bignumber/lib.esm/bignumber.d.ts new file mode 100644 index 0000000..4864fab --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/bignumber/lib.esm/bignumber.d.ts.map b/test/node_modules/@ethersproject/bignumber/lib.esm/bignumber.d.ts.map new file mode 100644 index 0000000..a934d90 --- /dev/null +++ b/test/node_modules/@ethersproject/bignumber/lib.esm/bignumber.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"bignumber.d.ts","sourceRoot":"","sources":["../src.ts/bignumber.ts"],"names":[],"mappings":"AA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AAE,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/test/node_modules/@ethersproject/bignumber/lib.esm/bignumber.js b/test/node_modules/@ethersproject/bignumber/lib.esm/bignumber.js new file mode 100644 index 0000000..681f625 --- /dev/null +++ b/test/node_modules/@ethersproject/bignumber/lib.esm/bignumber.js @@ -0,0 +1,305 @@ +"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) { + 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("division-by-zero", "mod"); + } + return toBigNumber(toBN(this).umod(value)); + } + pow(other) { + const value = toBN(other); + if (value.isNeg()) { + throwFault("negative-power", "pow"); + } + return toBigNumber(toBN(this).pow(value)); + } + and(other) { + const value = toBN(other); + if (this.isNegative() || value.isNeg()) { + throwFault("unbound-bitwise-result", "and"); + } + return toBigNumber(toBN(this).and(value)); + } + or(other) { + const value = toBN(other); + if (this.isNegative() || value.isNeg()) { + throwFault("unbound-bitwise-result", "or"); + } + return toBigNumber(toBN(this).or(value)); + } + xor(other) { + const value = toBN(other); + if (this.isNegative() || value.isNeg()) { + throwFault("unbound-bitwise-result", "xor"); + } + return toBigNumber(toBN(this).xor(value)); + } + mask(value) { + if (this.isNegative() || value < 0) { + throwFault("negative-width", "mask"); + } + return toBigNumber(toBN(this).maskn(value)); + } + shl(value) { + if (this.isNegative() || value < 0) { + throwFault("negative-width", "shl"); + } + return toBigNumber(toBN(this).shln(value)); + } + shr(value) { + if (this.isNegative() || value < 0) { + throwFault("negative-width", "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/test/node_modules/@ethersproject/bignumber/lib.esm/bignumber.js.map b/test/node_modules/@ethersproject/bignumber/lib.esm/bignumber.js.map new file mode 100644 index 0000000..cca52a9 --- /dev/null +++ b/test/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;QAC5B,OAAO,CAAC,KAAK,CAAC,CACjB,CAAC;AACN,CAAC;AAED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,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/test/node_modules/@ethersproject/bignumber/lib.esm/fixednumber.d.ts b/test/node_modules/@ethersproject/bignumber/lib.esm/fixednumber.d.ts new file mode 100644 index 0000000..71d8de6 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/bignumber/lib.esm/fixednumber.d.ts.map b/test/node_modules/@ethersproject/bignumber/lib.esm/fixednumber.d.ts.map new file mode 100644 index 0000000..670e198 --- /dev/null +++ b/test/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,EAAE,YAAY,EAAkB,MAAM,aAAa,CAAC;AAiCtE,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,EAAE,QAAQ,CAAC,EAAE,MAAM,GAA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,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/test/node_modules/@ethersproject/bignumber/lib.esm/fixednumber.js b/test/node_modules/@ethersproject/bignumber/lib.esm/fixednumber.js new file mode 100644 index 0000000..7e05ed8 --- /dev/null +++ b/test/node_modules/@ethersproject/bignumber/lib.esm/fixednumber.js @@ -0,0 +1,361 @@ +"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) { + 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/test/node_modules/@ethersproject/bignumber/lib.esm/fixednumber.js.map b/test/node_modules/@ethersproject/bignumber/lib.esm/fixednumber.js.map new file mode 100644 index 0000000..ede71dd --- /dev/null +++ b/test/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,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAEvC,SAAS,UAAU,CAAC,OAAe,EAAE,KAAa,EAAE,SAAiB,EAAE,KAA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;QAE3D,OAAO,IAAI,WAAW,CAAC,iBAAiB,EAAE,GAAG,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IACzE,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,KAAU,EAAE,MAAsC;QAC1D,IAAI,OAAM,CAAC,KAAK,CAAC,KAAK,QAAQ,EAAE;YAC5B,OAAO,WAAW,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;SAChD;QAED,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE;YAChB,OAAO,WAAW,CAAC,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;SAC/C;QAED,IAAI;YACA,OAAO,WAAW,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;SAClD;QAAC,OAAO,KAAK,EAAE;YACZ,mCAAmC;YACnC,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE;gBAC/C,MAAM,KAAK,CAAC;aACf;SACJ;QAED,OAAO,MAAM,CAAC,kBAAkB,CAAC,2BAA2B,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IAClF,CAAC;IAED,MAAM,CAAC,aAAa,CAAC,KAAU;QAC3B,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC;IAC7C,CAAC;CACJ;AAED,MAAM,GAAG,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAChC,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/bignumber/lib.esm/index.d.ts b/test/node_modules/@ethersproject/bignumber/lib.esm/index.d.ts new file mode 100644 index 0000000..5d2c2d7 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/bignumber/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/bignumber/lib.esm/index.d.ts.map new file mode 100644 index 0000000..fad2403 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/bignumber/lib.esm/index.js b/test/node_modules/@ethersproject/bignumber/lib.esm/index.js new file mode 100644 index 0000000..a2f81d6 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/bignumber/lib.esm/index.js.map b/test/node_modules/@ethersproject/bignumber/lib.esm/index.js.map new file mode 100644 index 0000000..3ab92f0 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/bignumber/lib/_version.d.ts b/test/node_modules/@ethersproject/bignumber/lib/_version.d.ts new file mode 100644 index 0000000..2b94506 --- /dev/null +++ b/test/node_modules/@ethersproject/bignumber/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "bignumber/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/bignumber/lib/_version.d.ts.map b/test/node_modules/@ethersproject/bignumber/lib/_version.d.ts.map new file mode 100644 index 0000000..7e6271e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/bignumber/lib/_version.js b/test/node_modules/@ethersproject/bignumber/lib/_version.js new file mode 100644 index 0000000..1def421 --- /dev/null +++ b/test/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.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/bignumber/lib/_version.js.map b/test/node_modules/@ethersproject/bignumber/lib/_version.js.map new file mode 100644 index 0000000..438871e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/bignumber/lib/bignumber.d.ts b/test/node_modules/@ethersproject/bignumber/lib/bignumber.d.ts new file mode 100644 index 0000000..4864fab --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/bignumber/lib/bignumber.d.ts.map b/test/node_modules/@ethersproject/bignumber/lib/bignumber.d.ts.map new file mode 100644 index 0000000..a934d90 --- /dev/null +++ b/test/node_modules/@ethersproject/bignumber/lib/bignumber.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"bignumber.d.ts","sourceRoot":"","sources":["../src.ts/bignumber.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAiC,MAAM,sBAAsB,CAAC;AAWrF,oBAAY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IhC,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/test/node_modules/@ethersproject/bignumber/lib/bignumber.js b/test/node_modules/@ethersproject/bignumber/lib/bignumber.js new file mode 100644 index 0000000..3e4a51f --- /dev/null +++ b/test/node_modules/@ethersproject/bignumber/lib/bignumber.js @@ -0,0 +1,315 @@ +"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) { + 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("division-by-zero", "mod"); + } + return toBigNumber(toBN(this).umod(value)); + }; + BigNumber.prototype.pow = function (other) { + var value = toBN(other); + if (value.isNeg()) { + throwFault("negative-power", "pow"); + } + return toBigNumber(toBN(this).pow(value)); + }; + BigNumber.prototype.and = function (other) { + var value = toBN(other); + if (this.isNegative() || value.isNeg()) { + throwFault("unbound-bitwise-result", "and"); + } + return toBigNumber(toBN(this).and(value)); + }; + BigNumber.prototype.or = function (other) { + var value = toBN(other); + if (this.isNegative() || value.isNeg()) { + throwFault("unbound-bitwise-result", "or"); + } + return toBigNumber(toBN(this).or(value)); + }; + BigNumber.prototype.xor = function (other) { + var value = toBN(other); + if (this.isNegative() || value.isNeg()) { + throwFault("unbound-bitwise-result", "xor"); + } + return toBigNumber(toBN(this).xor(value)); + }; + BigNumber.prototype.mask = function (value) { + if (this.isNegative() || value < 0) { + throwFault("negative-width", "mask"); + } + return toBigNumber(toBN(this).maskn(value)); + }; + BigNumber.prototype.shl = function (value) { + if (this.isNegative() || value < 0) { + throwFault("negative-width", "shl"); + } + return toBigNumber(toBN(this).shln(value)); + }; + BigNumber.prototype.shr = function (value) { + if (this.isNegative() || value < 0) { + throwFault("negative-width", "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/test/node_modules/@ethersproject/bignumber/lib/bignumber.js.map b/test/node_modules/@ethersproject/bignumber/lib/bignumber.js.map new file mode 100644 index 0000000..4d3235a --- /dev/null +++ b/test/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,CAAC;;;;;;AAEb;;;;;;GAMG;AAEH,gDAAwB;AACxB,IAAO,EAAE,GAAG,eAAG,CAAC,EAAE,CAAC;AAEnB,8CAAqF;AAErF,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAA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M,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/test/node_modules/@ethersproject/bignumber/lib/fixednumber.d.ts b/test/node_modules/@ethersproject/bignumber/lib/fixednumber.d.ts new file mode 100644 index 0000000..71d8de6 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/bignumber/lib/fixednumber.d.ts.map b/test/node_modules/@ethersproject/bignumber/lib/fixednumber.d.ts.map new file mode 100644 index 0000000..670e198 --- /dev/null +++ b/test/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,OAAO,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;gBAEjB,gBAAgB,EAAE,GAAG,E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E,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/test/node_modules/@ethersproject/bignumber/lib/fixednumber.js b/test/node_modules/@ethersproject/bignumber/lib/fixednumber.js new file mode 100644 index 0000000..d33883d --- /dev/null +++ b/test/node_modules/@ethersproject/bignumber/lib/fixednumber.js @@ -0,0 +1,369 @@ +"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) { + 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/test/node_modules/@ethersproject/bignumber/lib/fixednumber.js.map b/test/node_modules/@ethersproject/bignumber/lib/fixednumber.js.map new file mode 100644 index 0000000..cf7b339 --- /dev/null +++ b/test/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;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,yCAAsE;AAEtE,IAAM,iBAAiB,GAAG,EAAG,CAAC;AAE9B,IAAM,IAAI,GAAG,qBAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC/B,IAAM,WAAW,GAAG,qBAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CA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IAAI,CAAC,KAAK,CAAC,CAAC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/bignumber/lib/index.d.ts b/test/node_modules/@ethersproject/bignumber/lib/index.d.ts new file mode 100644 index 0000000..5d2c2d7 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/bignumber/lib/index.d.ts.map b/test/node_modules/@ethersproject/bignumber/lib/index.d.ts.map new file mode 100644 index 0000000..fad2403 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/bignumber/lib/index.js b/test/node_modules/@ethersproject/bignumber/lib/index.js new file mode 100644 index 0000000..b56a00f --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/bignumber/lib/index.js.map b/test/node_modules/@ethersproject/bignumber/lib/index.js.map new file mode 100644 index 0000000..e4f78cc --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/bignumber/package.json b/test/node_modules/@ethersproject/bignumber/package.json new file mode 100644 index 0000000..c4dffb5 --- /dev/null +++ b/test/node_modules/@ethersproject/bignumber/package.json @@ -0,0 +1,45 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "bn.js": "^5.2.1" + }, + "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": "ec1b9583039a14a0e0fa15d0a2a6082a2f41cf5b", + "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": "0x98470bc3e3f959c3912641c94cfb20b381527a6b4cfa3bdb265d9a2f3b27ff85", + "types": "./lib/index.d.ts", + "version": "5.7.0" +} diff --git a/test/node_modules/@ethersproject/bignumber/src.ts/_version.ts b/test/node_modules/@ethersproject/bignumber/src.ts/_version.ts new file mode 100644 index 0000000..1f1b92d --- /dev/null +++ b/test/node_modules/@ethersproject/bignumber/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "bignumber/5.7.0"; diff --git a/test/node_modules/@ethersproject/bignumber/src.ts/bignumber.ts b/test/node_modules/@ethersproject/bignumber/src.ts/bignumber.ts new file mode 100644 index 0000000..31d4c44 --- /dev/null +++ b/test/node_modules/@ethersproject/bignumber/src.ts/bignumber.ts @@ -0,0 +1,367 @@ +"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) { + 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("division-by-zero", "mod"); + } + return toBigNumber(toBN(this).umod(value)); + } + + pow(other: BigNumberish): BigNumber { + const value = toBN(other); + if (value.isNeg()) { + throwFault("negative-power", "pow"); + } + return toBigNumber(toBN(this).pow(value)); + } + + and(other: BigNumberish): BigNumber { + const value = toBN(other); + if (this.isNegative() || value.isNeg()) { + throwFault("unbound-bitwise-result", "and"); + } + return toBigNumber(toBN(this).and(value)); + } + + or(other: BigNumberish): BigNumber { + const value = toBN(other); + if (this.isNegative() || value.isNeg()) { + throwFault("unbound-bitwise-result", "or"); + } + return toBigNumber(toBN(this).or(value)); + } + + xor(other: BigNumberish): BigNumber { + const value = toBN(other); + if (this.isNegative() || value.isNeg()) { + throwFault("unbound-bitwise-result", "xor"); + } + return toBigNumber(toBN(this).xor(value)); + } + + mask(value: number): BigNumber { + if (this.isNegative() || value < 0) { + throwFault("negative-width", "mask"); + } + return toBigNumber(toBN(this).maskn(value)); + } + + shl(value: number): BigNumber { + if (this.isNegative() || value < 0) { + throwFault("negative-width", "shl"); + } + return toBigNumber(toBN(this).shln(value)); + } + + shr(value: number): BigNumber { + if (this.isNegative() || value < 0) { + throwFault("negative-width", "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/test/node_modules/@ethersproject/bignumber/src.ts/fixednumber.ts b/test/node_modules/@ethersproject/bignumber/src.ts/fixednumber.ts new file mode 100644 index 0000000..de25fd0 --- /dev/null +++ b/test/node_modules/@ethersproject/bignumber/src.ts/fixednumber.ts @@ -0,0 +1,409 @@ +"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) { + 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/test/node_modules/@ethersproject/bignumber/src.ts/index.ts b/test/node_modules/@ethersproject/bignumber/src.ts/index.ts new file mode 100644 index 0000000..b089018 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/bignumber/thirdparty.d.ts b/test/node_modules/@ethersproject/bignumber/thirdparty.d.ts new file mode 100644 index 0000000..376001f --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/bytes/LICENSE.md b/test/node_modules/@ethersproject/bytes/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/bytes/README.md b/test/node_modules/@ethersproject/bytes/README.md new file mode 100644 index 0000000..865325e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/bytes/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/bytes/lib.esm/_version.d.ts new file mode 100644 index 0000000..a9cec34 --- /dev/null +++ b/test/node_modules/@ethersproject/bytes/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "bytes/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/bytes/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/bytes/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..bb29653 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/bytes/lib.esm/_version.js b/test/node_modules/@ethersproject/bytes/lib.esm/_version.js new file mode 100644 index 0000000..1762e0c --- /dev/null +++ b/test/node_modules/@ethersproject/bytes/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "bytes/5.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/bytes/lib.esm/_version.js.map b/test/node_modules/@ethersproject/bytes/lib.esm/_version.js.map new file mode 100644 index 0000000..2b36b38 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/bytes/lib.esm/index.d.ts b/test/node_modules/@ethersproject/bytes/lib.esm/index.d.ts new file mode 100644 index 0000000..d32b3fb --- /dev/null +++ b/test/node_modules/@ethersproject/bytes/lib.esm/index.d.ts @@ -0,0 +1,42 @@ +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; + yParityAndS: string; + compact: string; +} +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/test/node_modules/@ethersproject/bytes/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/bytes/lib.esm/index.d.ts.map new file mode 100644 index 0000000..6b9555f --- /dev/null +++ b/test/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,aAAa,EAAE,MAAM,CAAC;IACtB,CAAC,EAAE,MAAM,CAAC;IAEV,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAC;CACnB;AAoBD,wBAAgB,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,SAAS,CAE1D;AAMD,wBAAgB,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AE,aAAa,GAAG,MAAM,CAQ9D"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/bytes/lib.esm/index.js b/test/node_modules/@ethersproject/bytes/lib.esm/index.js new file mode 100644 index 0000000..940da6e --- /dev/null +++ b/test/node_modules/@ethersproject/bytes/lib.esm/index.js @@ -0,0 +1,409 @@ +"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 = "0" + hex; + } + 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, + yParityAndS: "0x", + compact: "0x" + }; + if (isBytesLike(signature)) { + let bytes = arrayify(signature); + // Get the r, s and v + if (bytes.length === 64) { + // EIP-2098; pull the v from the top bit of s and clear it + result.v = 27 + (bytes[32] >> 7); + bytes[32] &= 0x7f; + result.r = hexlify(bytes.slice(0, 32)); + result.s = hexlify(bytes.slice(32, 64)); + } + else if (bytes.length === 65) { + result.r = hexlify(bytes.slice(0, 32)); + result.s = hexlify(bytes.slice(32, 64)); + result.v = bytes[64]; + } + else { + logger.throwArgumentError("invalid signature string", "signature", signature); + } + // 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); + } + } + result.yParityAndS = result._vs; + result.compact = result.r + result.yParityAndS.substring(2); + 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/test/node_modules/@ethersproject/bytes/lib.esm/index.js.map b/test/node_modules/@ethersproject/bytes/lib.esm/index.js.map new file mode 100644 index 0000000..d3f7dfb --- /dev/null +++ b/test/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;AAiDnC,+BAA+B;AAG/B,SAAS,SAAS,CAAC,KAAU;IACzB,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;A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;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/test/node_modules/@ethersproject/bytes/lib/_version.d.ts b/test/node_modules/@ethersproject/bytes/lib/_version.d.ts new file mode 100644 index 0000000..a9cec34 --- /dev/null +++ b/test/node_modules/@ethersproject/bytes/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "bytes/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/bytes/lib/_version.d.ts.map b/test/node_modules/@ethersproject/bytes/lib/_version.d.ts.map new file mode 100644 index 0000000..bb29653 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/bytes/lib/_version.js b/test/node_modules/@ethersproject/bytes/lib/_version.js new file mode 100644 index 0000000..1084a17 --- /dev/null +++ b/test/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.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/bytes/lib/_version.js.map b/test/node_modules/@ethersproject/bytes/lib/_version.js.map new file mode 100644 index 0000000..2f9c571 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/bytes/lib/index.d.ts b/test/node_modules/@ethersproject/bytes/lib/index.d.ts new file mode 100644 index 0000000..d32b3fb --- /dev/null +++ b/test/node_modules/@ethersproject/bytes/lib/index.d.ts @@ -0,0 +1,42 @@ +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; + yParityAndS: string; + compact: string; +} +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/test/node_modules/@ethersproject/bytes/lib/index.d.ts.map b/test/node_modules/@ethersproject/bytes/lib/index.d.ts.map new file mode 100644 index 0000000..6b9555f --- /dev/null +++ b/test/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,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AAW,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAMhE;AAID,wBAAgB,OAAO,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,MAAM,CAuDnG;AAUD,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,UAQ5C;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAcxF;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,aAAa,CAAC,SAAS,CAAC,GAAG,MAAM,CAMjE;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAI7E;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAUtD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAgBnE;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,aAAa,GAAG,SAAS,CA2IlE;AAED,wBAAgB,aAAa,CAAC,SAAS,EAAE,aAAa,GAAG,MAAM,CAQ9D"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/bytes/lib/index.js b/test/node_modules/@ethersproject/bytes/lib/index.js new file mode 100644 index 0000000..d53f192 --- /dev/null +++ b/test/node_modules/@ethersproject/bytes/lib/index.js @@ -0,0 +1,427 @@ +"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 = "0" + hex; + } + 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, + yParityAndS: "0x", + compact: "0x" + }; + if (isBytesLike(signature)) { + var bytes = arrayify(signature); + // Get the r, s and v + if (bytes.length === 64) { + // EIP-2098; pull the v from the top bit of s and clear it + result.v = 27 + (bytes[32] >> 7); + bytes[32] &= 0x7f; + result.r = hexlify(bytes.slice(0, 32)); + result.s = hexlify(bytes.slice(32, 64)); + } + else if (bytes.length === 65) { + result.r = hexlify(bytes.slice(0, 32)); + result.s = hexlify(bytes.slice(32, 64)); + result.v = bytes[64]; + } + else { + logger.throwArgumentError("invalid signature string", "signature", signature); + } + // 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); + } + } + result.yParityAndS = result._vs; + result.compact = result.r + result.yParityAndS.substring(2); + 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/test/node_modules/@ethersproject/bytes/lib/index.js.map b/test/node_modules/@ethersproject/bytes/lib/index.js.map new file mode 100644 index 0000000..d9cafb4 --- /dev/null +++ b/test/node_modules/@ethersproject/bytes/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;AAiDnC,+BAA+B;AAG/B,SAAS,SAAS,CAAC,KAAU;IACzB,OAAO,CAAC,CAAC,CAAC,K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,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/test/node_modules/@ethersproject/bytes/package.json b/test/node_modules/@ethersproject/bytes/package.json new file mode 100644 index 0000000..53add14 --- /dev/null +++ b/test/node_modules/@ethersproject/bytes/package.json @@ -0,0 +1,44 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/logger": "^5.7.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": "ec1b9583039a14a0e0fa15d0a2a6082a2f41cf5b", + "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": "0x5ce4e7b7716e28697fe07abcee74e4e8b4fa3b919b2807322ad6a282990db523", + "types": "./lib/index.d.ts", + "version": "5.7.0" +} diff --git a/test/node_modules/@ethersproject/bytes/src.ts/_version.ts b/test/node_modules/@ethersproject/bytes/src.ts/_version.ts new file mode 100644 index 0000000..dd496db --- /dev/null +++ b/test/node_modules/@ethersproject/bytes/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "bytes/5.7.0"; diff --git a/test/node_modules/@ethersproject/bytes/src.ts/index.ts b/test/node_modules/@ethersproject/bytes/src.ts/index.ts new file mode 100644 index 0000000..38d8592 --- /dev/null +++ b/test/node_modules/@ethersproject/bytes/src.ts/index.ts @@ -0,0 +1,483 @@ +"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; + + yParityAndS: string + compact: string; +} + +/////////////////////////////// + + +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 = "0" + hex; + } 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, + yParityAndS: "0x", + compact: "0x" + }; + + if (isBytesLike(signature)) { + let bytes: Uint8Array = arrayify(signature); + + // Get the r, s and v + if (bytes.length === 64) { + // EIP-2098; pull the v from the top bit of s and clear it + result.v = 27 + (bytes[32] >> 7); + bytes[32] &= 0x7f; + + result.r = hexlify(bytes.slice(0, 32)); + result.s = hexlify(bytes.slice(32, 64)); + + } else if (bytes.length === 65) { + result.r = hexlify(bytes.slice(0, 32)); + result.s = hexlify(bytes.slice(32, 64)); + result.v = bytes[64]; + } else { + + logger.throwArgumentError("invalid signature string", "signature", signature); + } + + + // 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); + } + } + + result.yParityAndS = result._vs; + result.compact = result.r + result.yParityAndS.substring(2); + + 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/test/node_modules/@ethersproject/constants/LICENSE.md b/test/node_modules/@ethersproject/constants/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/README.md b/test/node_modules/@ethersproject/constants/README.md new file mode 100644 index 0000000..4018a69 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/constants/lib.esm/_version.d.ts new file mode 100644 index 0000000..75e3a9a --- /dev/null +++ b/test/node_modules/@ethersproject/constants/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "constants/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/constants/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/constants/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..7e6271e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib.esm/_version.js b/test/node_modules/@ethersproject/constants/lib.esm/_version.js new file mode 100644 index 0000000..36fdebf --- /dev/null +++ b/test/node_modules/@ethersproject/constants/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "constants/5.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/constants/lib.esm/_version.js.map b/test/node_modules/@ethersproject/constants/lib.esm/_version.js.map new file mode 100644 index 0000000..3f20aac --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib.esm/addresses.d.ts b/test/node_modules/@ethersproject/constants/lib.esm/addresses.d.ts new file mode 100644 index 0000000..6b9a3d0 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib.esm/addresses.d.ts.map b/test/node_modules/@ethersproject/constants/lib.esm/addresses.d.ts.map new file mode 100644 index 0000000..5626d9d --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib.esm/addresses.js b/test/node_modules/@ethersproject/constants/lib.esm/addresses.js new file mode 100644 index 0000000..eb40d2a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib.esm/addresses.js.map b/test/node_modules/@ethersproject/constants/lib.esm/addresses.js.map new file mode 100644 index 0000000..aff8311 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib.esm/bignumbers.d.ts b/test/node_modules/@ethersproject/constants/lib.esm/bignumbers.d.ts new file mode 100644 index 0000000..c5a60ba --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib.esm/bignumbers.d.ts.map b/test/node_modules/@ethersproject/constants/lib.esm/bignumbers.d.ts.map new file mode 100644 index 0000000..7cd1ef2 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib.esm/bignumbers.js b/test/node_modules/@ethersproject/constants/lib.esm/bignumbers.js new file mode 100644 index 0000000..343462a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib.esm/bignumbers.js.map b/test/node_modules/@ethersproject/constants/lib.esm/bignumbers.js.map new file mode 100644 index 0000000..d484111 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib.esm/hashes.d.ts b/test/node_modules/@ethersproject/constants/lib.esm/hashes.d.ts new file mode 100644 index 0000000..57a2802 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib.esm/hashes.d.ts.map b/test/node_modules/@ethersproject/constants/lib.esm/hashes.d.ts.map new file mode 100644 index 0000000..839ee74 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib.esm/hashes.js b/test/node_modules/@ethersproject/constants/lib.esm/hashes.js new file mode 100644 index 0000000..7d339e5 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib.esm/hashes.js.map b/test/node_modules/@ethersproject/constants/lib.esm/hashes.js.map new file mode 100644 index 0000000..ba7a261 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib.esm/index.d.ts b/test/node_modules/@ethersproject/constants/lib.esm/index.d.ts new file mode 100644 index 0000000..e24626e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/constants/lib.esm/index.d.ts.map new file mode 100644 index 0000000..d585444 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib.esm/index.js b/test/node_modules/@ethersproject/constants/lib.esm/index.js new file mode 100644 index 0000000..a384a67 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib.esm/index.js.map b/test/node_modules/@ethersproject/constants/lib.esm/index.js.map new file mode 100644 index 0000000..e90f939 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib.esm/strings.d.ts b/test/node_modules/@ethersproject/constants/lib.esm/strings.d.ts new file mode 100644 index 0000000..8665a83 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib.esm/strings.d.ts.map b/test/node_modules/@ethersproject/constants/lib.esm/strings.d.ts.map new file mode 100644 index 0000000..901e733 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib.esm/strings.js b/test/node_modules/@ethersproject/constants/lib.esm/strings.js new file mode 100644 index 0000000..27131f5 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib.esm/strings.js.map b/test/node_modules/@ethersproject/constants/lib.esm/strings.js.map new file mode 100644 index 0000000..04e2d51 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib/_version.d.ts b/test/node_modules/@ethersproject/constants/lib/_version.d.ts new file mode 100644 index 0000000..75e3a9a --- /dev/null +++ b/test/node_modules/@ethersproject/constants/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "constants/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/constants/lib/_version.d.ts.map b/test/node_modules/@ethersproject/constants/lib/_version.d.ts.map new file mode 100644 index 0000000..7e6271e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib/_version.js b/test/node_modules/@ethersproject/constants/lib/_version.js new file mode 100644 index 0000000..324c840 --- /dev/null +++ b/test/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.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/constants/lib/_version.js.map b/test/node_modules/@ethersproject/constants/lib/_version.js.map new file mode 100644 index 0000000..438871e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib/addresses.d.ts b/test/node_modules/@ethersproject/constants/lib/addresses.d.ts new file mode 100644 index 0000000..6b9a3d0 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib/addresses.d.ts.map b/test/node_modules/@ethersproject/constants/lib/addresses.d.ts.map new file mode 100644 index 0000000..5626d9d --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib/addresses.js b/test/node_modules/@ethersproject/constants/lib/addresses.js new file mode 100644 index 0000000..3fc7ff5 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib/addresses.js.map b/test/node_modules/@ethersproject/constants/lib/addresses.js.map new file mode 100644 index 0000000..d96617d --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib/bignumbers.d.ts b/test/node_modules/@ethersproject/constants/lib/bignumbers.d.ts new file mode 100644 index 0000000..c5a60ba --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib/bignumbers.d.ts.map b/test/node_modules/@ethersproject/constants/lib/bignumbers.d.ts.map new file mode 100644 index 0000000..7cd1ef2 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib/bignumbers.js b/test/node_modules/@ethersproject/constants/lib/bignumbers.js new file mode 100644 index 0000000..3e4d566 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib/bignumbers.js.map b/test/node_modules/@ethersproject/constants/lib/bignumbers.js.map new file mode 100644 index 0000000..b4e6c2a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib/hashes.d.ts b/test/node_modules/@ethersproject/constants/lib/hashes.d.ts new file mode 100644 index 0000000..57a2802 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib/hashes.d.ts.map b/test/node_modules/@ethersproject/constants/lib/hashes.d.ts.map new file mode 100644 index 0000000..839ee74 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib/hashes.js b/test/node_modules/@ethersproject/constants/lib/hashes.js new file mode 100644 index 0000000..4c908e3 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib/hashes.js.map b/test/node_modules/@ethersproject/constants/lib/hashes.js.map new file mode 100644 index 0000000..c70809b --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib/index.d.ts b/test/node_modules/@ethersproject/constants/lib/index.d.ts new file mode 100644 index 0000000..e24626e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib/index.d.ts.map b/test/node_modules/@ethersproject/constants/lib/index.d.ts.map new file mode 100644 index 0000000..d585444 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib/index.js b/test/node_modules/@ethersproject/constants/lib/index.js new file mode 100644 index 0000000..13368eb --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib/index.js.map b/test/node_modules/@ethersproject/constants/lib/index.js.map new file mode 100644 index 0000000..b2c8133 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib/strings.d.ts b/test/node_modules/@ethersproject/constants/lib/strings.d.ts new file mode 100644 index 0000000..8665a83 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib/strings.d.ts.map b/test/node_modules/@ethersproject/constants/lib/strings.d.ts.map new file mode 100644 index 0000000..901e733 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib/strings.js b/test/node_modules/@ethersproject/constants/lib/strings.js new file mode 100644 index 0000000..5b18c45 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/lib/strings.js.map b/test/node_modules/@ethersproject/constants/lib/strings.js.map new file mode 100644 index 0000000..ea78509 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/package.json b/test/node_modules/@ethersproject/constants/package.json new file mode 100644 index 0000000..2a58b77 --- /dev/null +++ b/test/node_modules/@ethersproject/constants/package.json @@ -0,0 +1,42 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/bignumber": "^5.7.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": "ec1b9583039a14a0e0fa15d0a2a6082a2f41cf5b", + "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": "0x579d8352bdd831dce141ec5ba78cbbf6d468ebd55470ebb535bbcb38fc502ec6", + "types": "./lib/index.d.ts", + "version": "5.7.0" +} diff --git a/test/node_modules/@ethersproject/constants/src.ts/_version.ts b/test/node_modules/@ethersproject/constants/src.ts/_version.ts new file mode 100644 index 0000000..b8f4473 --- /dev/null +++ b/test/node_modules/@ethersproject/constants/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "constants/5.7.0"; diff --git a/test/node_modules/@ethersproject/constants/src.ts/addresses.ts b/test/node_modules/@ethersproject/constants/src.ts/addresses.ts new file mode 100644 index 0000000..89a66bb --- /dev/null +++ b/test/node_modules/@ethersproject/constants/src.ts/addresses.ts @@ -0,0 +1,2 @@ +export const AddressZero = "0x0000000000000000000000000000000000000000"; + diff --git a/test/node_modules/@ethersproject/constants/src.ts/bignumbers.ts b/test/node_modules/@ethersproject/constants/src.ts/bignumbers.ts new file mode 100644 index 0000000..7175087 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/src.ts/hashes.ts b/test/node_modules/@ethersproject/constants/src.ts/hashes.ts new file mode 100644 index 0000000..d8c1eed --- /dev/null +++ b/test/node_modules/@ethersproject/constants/src.ts/hashes.ts @@ -0,0 +1,2 @@ +export const HashZero = "0x0000000000000000000000000000000000000000000000000000000000000000"; + diff --git a/test/node_modules/@ethersproject/constants/src.ts/index.ts b/test/node_modules/@ethersproject/constants/src.ts/index.ts new file mode 100644 index 0000000..abc59a0 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/constants/src.ts/strings.ts b/test/node_modules/@ethersproject/constants/src.ts/strings.ts new file mode 100644 index 0000000..bf87422 --- /dev/null +++ b/test/node_modules/@ethersproject/constants/src.ts/strings.ts @@ -0,0 +1,2 @@ +// NFKC (composed) // (decomposed) +export const EtherSymbol = "\u039e"; // "\uD835\uDF63"; diff --git a/test/node_modules/@ethersproject/contracts/LICENSE.md b/test/node_modules/@ethersproject/contracts/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/contracts/README.md b/test/node_modules/@ethersproject/contracts/README.md new file mode 100644 index 0000000..d721e5c --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/contracts/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/contracts/lib.esm/_version.d.ts new file mode 100644 index 0000000..89e9bcf --- /dev/null +++ b/test/node_modules/@ethersproject/contracts/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "contracts/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/contracts/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/contracts/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..7e6271e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/contracts/lib.esm/_version.js b/test/node_modules/@ethersproject/contracts/lib.esm/_version.js new file mode 100644 index 0000000..6b4ac50 --- /dev/null +++ b/test/node_modules/@ethersproject/contracts/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "contracts/5.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/contracts/lib.esm/_version.js.map b/test/node_modules/@ethersproject/contracts/lib.esm/_version.js.map new file mode 100644 index 0000000..3f20aac --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/contracts/lib.esm/index.d.ts b/test/node_modules/@ethersproject/contracts/lib.esm/index.d.ts new file mode 100644 index 0000000..c6c167d --- /dev/null +++ b/test/node_modules/@ethersproject/contracts/lib.esm/index.d.ts @@ -0,0 +1,157 @@ +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; + ccipReadEnabled?: boolean; +} +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; + ccipReadEnabled?: boolean; +} +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 | string, 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/test/node_modules/@ethersproject/contracts/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/contracts/lib.esm/index.d.ts.map new file mode 100644 index 0000000..3f82026 --- /dev/null +++ b/test/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,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC,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,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/test/node_modules/@ethersproject/contracts/lib.esm/index.js b/test/node_modules/@ethersproject/contracts/lib.esm/index.js new file mode 100644 index 0000000..bd5f668 --- /dev/null +++ b/test/node_modules/@ethersproject/contracts/lib.esm/index.js @@ -0,0 +1,1028 @@ +"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, + ccipReadEnabled: 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); + } + if (ro.ccipReadEnabled) { + tx.ccipReadEnabled = !!ro.ccipReadEnabled; + } + // 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; + delete overrides.ccipReadEnabled; + // 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) { + // @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" + }); + } + } + // Swallow bad ENS names to prevent Unhandled Exceptions + this.resolvedAddress.catch((e) => { }); + 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/test/node_modules/@ethersproject/contracts/lib.esm/index.js.map b/test/node_modules/@ethersproject/contracts/lib.esm/index.js.map new file mode 100644 index 0000000..0dfc0cc --- /dev/null +++ b/test/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,6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AAQ,EAAE;YACzB,QAAQ,GAAG,cAAc,CAAC,QAAQ,CAAC;SACtC;aAAM,IAAI,cAAc,CAAC,GAAG,IAAI,cAAc,CAAC,GAAG,CAAC,QAAQ,EAAE;YAC1D,QAAQ,GAAG,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC;SAC1C;QAED,OAAO,IAAI,IAAI,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC3C,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,iBAAoC;QACpD,OAAO,QAAQ,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;IACpD,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/test/node_modules/@ethersproject/contracts/lib/_version.d.ts b/test/node_modules/@ethersproject/contracts/lib/_version.d.ts new file mode 100644 index 0000000..89e9bcf --- /dev/null +++ b/test/node_modules/@ethersproject/contracts/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "contracts/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/contracts/lib/_version.d.ts.map b/test/node_modules/@ethersproject/contracts/lib/_version.d.ts.map new file mode 100644 index 0000000..7e6271e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/contracts/lib/_version.js b/test/node_modules/@ethersproject/contracts/lib/_version.js new file mode 100644 index 0000000..116dbf4 --- /dev/null +++ b/test/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.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/contracts/lib/_version.js.map b/test/node_modules/@ethersproject/contracts/lib/_version.js.map new file mode 100644 index 0000000..438871e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/contracts/lib/index.d.ts b/test/node_modules/@ethersproject/contracts/lib/index.d.ts new file mode 100644 index 0000000..c6c167d --- /dev/null +++ b/test/node_modules/@ethersproject/contracts/lib/index.d.ts @@ -0,0 +1,157 @@ +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; + ccipReadEnabled?: boolean; +} +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; + ccipReadEnabled?: boolean; +} +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 | string, 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/test/node_modules/@ethersproject/contracts/lib/index.d.ts.map b/test/node_modules/@ethersproject/contracts/lib/index.d.ts.map new file mode 100644 index 0000000..3f82026 --- /dev/null +++ b/test/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,EAA6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AAC;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/test/node_modules/@ethersproject/contracts/lib/index.js b/test/node_modules/@ethersproject/contracts/lib/index.js new file mode 100644 index 0000000..ca11c30 --- /dev/null +++ b/test/node_modules/@ethersproject/contracts/lib/index.js @@ -0,0 +1,1203 @@ +"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, + ccipReadEnabled: 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); + } + if (ro.ccipReadEnabled) { + tx.ccipReadEnabled = !!ro.ccipReadEnabled; + } + // 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; + delete overrides.ccipReadEnabled; + 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; + // @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" + }); + } + } + // Swallow bad ENS names to prevent Unhandled Exceptions + this.resolvedAddress.catch(function (e) { }); + 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/test/node_modules/@ethersproject/contracts/lib/index.js.map b/test/node_modules/@ethersproject/contracts/lib/index.js.map new file mode 100644 index 0000000..5202adc --- /dev/null +++ b/test/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;AAYlC,CAAC;AAoCD,CAAC;AA8CF,+BAA+B;AAE/B,IAAM,sBAAsB,GAAiC;IACzD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI;IACxG,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI;IAC5B,YAAY,EAAE,IAAI,EAAE,oBAAoB,EAAE,IAAI;IAC9C,UAAU,EAAE,IAAI;IAChB,eAAe,EAAE,IAAI;CACxB,CAAA;AAED,SAAe,WAAW,CAAC,QAA2B,EAAE,aAAuC;;;;;wBAC9E,qBAAM,aAAa,EAAA;;oBAA1B,IAAI,GAAG,SAAmB;oBAEhC,IAAI,OAAM,CAAC,IAAI,CAAC,KAAK,QAAQ,EAAE;wBAC3B,MAAM,CAAC,kBAAkB,C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No newline at end of file diff --git a/test/node_modules/@ethersproject/contracts/package.json b/test/node_modules/@ethersproject/contracts/package.json new file mode 100644 index 0000000..2cac933 --- /dev/null +++ b/test/node_modules/@ethersproject/contracts/package.json @@ -0,0 +1,51 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/abi": "^5.7.0", + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/transactions": "^5.7.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": "ec1b9583039a14a0e0fa15d0a2a6082a2f41cf5b", + "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": "0x186a0093d358545fe0bf9282147dc719ccce205447b02766489e395d0b8af9fc", + "types": "./lib/index.d.ts", + "version": "5.7.0" +} diff --git a/test/node_modules/@ethersproject/contracts/src.ts/_version.ts b/test/node_modules/@ethersproject/contracts/src.ts/_version.ts new file mode 100644 index 0000000..1b1b38e --- /dev/null +++ b/test/node_modules/@ethersproject/contracts/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "contracts/5.7.0"; diff --git a/test/node_modules/@ethersproject/contracts/src.ts/index.ts b/test/node_modules/@ethersproject/contracts/src.ts/index.ts new file mode 100644 index 0000000..74b84e1 --- /dev/null +++ b/test/node_modules/@ethersproject/contracts/src.ts/index.ts @@ -0,0 +1,1299 @@ +"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; + ccipReadEnabled?: boolean; +}; + +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; + ccipReadEnabled?: boolean; +}; + +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, + ccipReadEnabled: 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); + } + + if (ro.ccipReadEnabled) { + tx.ccipReadEnabled = !!ro.ccipReadEnabled; + } + + // 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; + delete overrides.ccipReadEnabled; + + // 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) { + // @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" + }); + } + } + + // Swallow bad ENS names to prevent Unhandled Exceptions + this.resolvedAddress.catch((e) => { }); + + 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 | string, 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/test/node_modules/@ethersproject/hash/LICENSE.md b/test/node_modules/@ethersproject/hash/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/README.md b/test/node_modules/@ethersproject/hash/README.md new file mode 100644 index 0000000..fde1d64 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/hash/lib.esm/_version.d.ts new file mode 100644 index 0000000..f6fac04 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "hash/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/hash/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..e41e9e6 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/lib.esm/_version.js b/test/node_modules/@ethersproject/hash/lib.esm/_version.js new file mode 100644 index 0000000..6d79dd5 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "hash/5.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib.esm/_version.js.map b/test/node_modules/@ethersproject/hash/lib.esm/_version.js.map new file mode 100644 index 0000000..33a652d --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/decoder.d.ts b/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/decoder.d.ts new file mode 100644 index 0000000..b7ea3b4 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/decoder.d.ts @@ -0,0 +1,50 @@ +/** + * MIT License + * + * Copyright (c) 2021 Andrew Raffensperger + * + * 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 is a near carbon-copy of the original source (link below) with the + * TypeScript typings added and a few tweaks to make it ES3-compatible. + * + * See: https://github.com/adraffy/ens-normalize.js + */ +export declare type Numbers = Uint8Array | Array; +export declare type NextFunc = (...args: Array) => number; +export declare function decode_arithmetic(bytes: Numbers): Array; +export declare function read_payload(v: Numbers): NextFunc; +export declare function read_compressed_payload(bytes: Numbers): NextFunc; +export declare function signed(i: number): number; +export declare function read_member_array(next: NextFunc, lookup?: Record): number[]; +export declare function read_mapped_map(next: NextFunc): Record>; +export declare function read_zero_terminated_array(next: NextFunc): Array; +export declare type Branch = { + set: Set; + node: Node; +}; +export declare type Node = { + branches: Array; + valid: number; + fe0f: boolean; + save: boolean; + check: boolean; +}; +export declare function read_emoji_trie(next: NextFunc): Node; +//# sourceMappingURL=decoder.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/decoder.d.ts.map b/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/decoder.d.ts.map new file mode 100644 index 0000000..97af8cc --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/decoder.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"decoder.d.ts","sourceRoot":"","sources":["../../src.ts/ens-normalize/decoder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;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@ethersproject/hash/lib.esm/ens-normalize/decoder.js new file mode 100644 index 0000000..cf50568 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/decoder.js @@ -0,0 +1,255 @@ +/** + * MIT License + * + * Copyright (c) 2021 Andrew Raffensperger + * + * 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 is a near carbon-copy of the original source (link below) with the + * TypeScript typings added and a few tweaks to make it ES3-compatible. + * + * See: https://github.com/adraffy/ens-normalize.js + */ +// https://github.com/behnammodi/polyfill/blob/master/array.polyfill.js +function flat(array, depth) { + if (depth == null) { + depth = 1; + } + const result = []; + const forEach = result.forEach; + const flatDeep = function (arr, depth) { + forEach.call(arr, function (val) { + if (depth > 0 && Array.isArray(val)) { + flatDeep(val, depth - 1); + } + else { + result.push(val); + } + }); + }; + flatDeep(array, depth); + return result; +} +function fromEntries(array) { + const result = {}; + for (let i = 0; i < array.length; i++) { + const value = array[i]; + result[value[0]] = value[1]; + } + return result; +} +export function decode_arithmetic(bytes) { + let pos = 0; + function u16() { return (bytes[pos++] << 8) | bytes[pos++]; } + // decode the frequency table + let symbol_count = u16(); + let total = 1; + let acc = [0, 1]; // first symbol has frequency 1 + for (let i = 1; i < symbol_count; i++) { + acc.push(total += u16()); + } + // skip the sized-payload that the last 3 symbols index into + let skip = u16(); + let pos_payload = pos; + pos += skip; + let read_width = 0; + let read_buffer = 0; + function read_bit() { + if (read_width == 0) { + // this will read beyond end of buffer + // but (undefined|0) => zero pad + read_buffer = (read_buffer << 8) | bytes[pos++]; + read_width = 8; + } + return (read_buffer >> --read_width) & 1; + } + const N = 31; + const FULL = Math.pow(2, N); + const HALF = FULL >>> 1; + const QRTR = HALF >> 1; + const MASK = FULL - 1; + // fill register + let register = 0; + for (let i = 0; i < N; i++) + register = (register << 1) | read_bit(); + let symbols = []; + let low = 0; + let range = FULL; // treat like a float + while (true) { + let value = Math.floor((((register - low + 1) * total) - 1) / range); + let start = 0; + let end = symbol_count; + while (end - start > 1) { // binary search + let mid = (start + end) >>> 1; + if (value < acc[mid]) { + end = mid; + } + else { + start = mid; + } + } + if (start == 0) + break; // first symbol is end mark + symbols.push(start); + let a = low + Math.floor(range * acc[start] / total); + let b = low + Math.floor(range * acc[start + 1] / total) - 1; + while (((a ^ b) & HALF) == 0) { + register = (register << 1) & MASK | read_bit(); + a = (a << 1) & MASK; + b = (b << 1) & MASK | 1; + } + while (a & ~b & QRTR) { + register = (register & HALF) | ((register << 1) & (MASK >>> 1)) | read_bit(); + a = (a << 1) ^ HALF; + b = ((b ^ HALF) << 1) | HALF | 1; + } + low = a; + range = 1 + b - a; + } + let offset = symbol_count - 4; + return symbols.map(x => { + switch (x - offset) { + case 3: return offset + 0x10100 + ((bytes[pos_payload++] << 16) | (bytes[pos_payload++] << 8) | bytes[pos_payload++]); + case 2: return offset + 0x100 + ((bytes[pos_payload++] << 8) | bytes[pos_payload++]); + case 1: return offset + bytes[pos_payload++]; + default: return x - 1; + } + }); +} +// returns an iterator which returns the next symbol +export function read_payload(v) { + let pos = 0; + return () => v[pos++]; +} +export function read_compressed_payload(bytes) { + return read_payload(decode_arithmetic(bytes)); +} +// eg. [0,1,2,3...] => [0,-1,1,-2,...] +export function signed(i) { + return (i & 1) ? (~i >> 1) : (i >> 1); +} +function read_counts(n, next) { + let v = Array(n); + for (let i = 0; i < n; i++) + v[i] = 1 + next(); + return v; +} +function read_ascending(n, next) { + let v = Array(n); + for (let i = 0, x = -1; i < n; i++) + v[i] = x += 1 + next(); + return v; +} +function read_deltas(n, next) { + let v = Array(n); + for (let i = 0, x = 0; i < n; i++) + v[i] = x += signed(next()); + return v; +} +export function read_member_array(next, lookup) { + let v = read_ascending(next(), next); + let n = next(); + let vX = read_ascending(n, next); + let vN = read_counts(n, next); + for (let i = 0; i < n; i++) { + for (let j = 0; j < vN[i]; j++) { + v.push(vX[i] + j); + } + } + return lookup ? v.map(x => lookup[x]) : v; +} +// returns array of +// [x, ys] => single replacement rule +// [x, ys, n, dx, dx] => linear map +export function read_mapped_map(next) { + let ret = []; + while (true) { + let w = next(); + if (w == 0) + break; + ret.push(read_linear_table(w, next)); + } + while (true) { + let w = next() - 1; + if (w < 0) + break; + ret.push(read_replacement_table(w, next)); + } + return fromEntries(flat(ret)); +} +export function read_zero_terminated_array(next) { + let v = []; + while (true) { + let i = next(); + if (i == 0) + break; + v.push(i); + } + return v; +} +function read_transposed(n, w, next) { + let m = Array(n).fill(undefined).map(() => []); + for (let i = 0; i < w; i++) { + read_deltas(n, next).forEach((x, j) => m[j].push(x)); + } + return m; +} +function read_linear_table(w, next) { + let dx = 1 + next(); + let dy = next(); + let vN = read_zero_terminated_array(next); + let m = read_transposed(vN.length, 1 + w, next); + return flat(m.map((v, i) => { + const x = v[0], ys = v.slice(1); + //let [x, ...ys] = v; + //return Array(vN[i]).fill().map((_, j) => { + return Array(vN[i]).fill(undefined).map((_, j) => { + let j_dy = j * dy; + return [x + j * dx, ys.map(y => y + j_dy)]; + }); + })); +} +function read_replacement_table(w, next) { + let n = 1 + next(); + let m = read_transposed(n, 1 + w, next); + return m.map(v => [v[0], v.slice(1)]); +} +export function read_emoji_trie(next) { + let sorted = read_member_array(next).sort((a, b) => a - b); + return read(); + function read() { + let branches = []; + while (true) { + let keys = read_member_array(next, sorted); + if (keys.length == 0) + break; + branches.push({ set: new Set(keys), node: read() }); + } + branches.sort((a, b) => b.set.size - a.set.size); // sort by likelihood + let temp = next(); + let valid = temp % 3; + temp = (temp / 3) | 0; + let fe0f = !!(temp & 1); + temp >>= 1; + let save = temp == 1; + let check = temp == 2; + return { branches, valid, fe0f, save, check }; + } +} +//# sourceMappingURL=decoder.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/decoder.js.map b/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/decoder.js.map new file mode 100644 index 0000000..63b4941 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/decoder.js.map @@ -0,0 +1 @@ +{"version":3,"file":"decoder.js","sourceRoot":"","sources":["../../src.ts/ens-normalize/decoder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAKH,uEAAuE;AACvE,SAAS,IAAI,CAAC,KAAiB,EAAE,KAAc;IAC3C,IAAI,KAAK,IAAI,IAAI,EAAE;QAAE,KAAK,GAAG,CAAC,CAAC;KAAE;IACjC,MAAM,MAAM,GAAe,EAAE,CAAC;IAE9B,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IAE/B,MAAM,QAAQ,GAAG,UAAU,GAAe,EAAE,KAAa;QACrD,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,GAAQ;YAChC,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;gBACjC,QAAQ,CAAC,GAAG,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;aAC5B;iBAAM;gBACJ,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aACnB;QACL,CAAC,CAAC,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G,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,qBAAqB;QACxE,IAAI,IAAI,GAAG,IAAI,EAAE,CAAC;QAClB,IAAI,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC;QACrB,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,GAAC,CAAC,CAAC;QACpB,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;QACxB,IAAI,KAAK,CAAC,CAAC;QACX,IAAI,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC;QACrB,IAAI,KAAK,GAAG,IAAI,IAAI,CAAC,CAAC;QACtB,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAC,CAAC;IAC9C,CAAC;AACF,CAAC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/include.d.ts b/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/include.d.ts new file mode 100644 index 0000000..176b7f3 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/include.d.ts @@ -0,0 +1,30 @@ +/** + * MIT License + * + * Copyright (c) 2021 Andrew Raffensperger + * + * 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 is a near carbon-copy of the original source (link below) with the + * TypeScript typings added and a few tweaks to make it ES3-compatible. + * + * See: https://github.com/adraffy/ens-normalize.js + */ +export declare function getData(): () => number; +//# sourceMappingURL=include.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/include.d.ts.map b/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/include.d.ts.map new file mode 100644 index 0000000..0be889e --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/include.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"include.d.ts","sourceRoot":"","sources":["../../src.ts/ens-normalize/include.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAMH,wBAAgB,OAAO,IAAI,MAAM,MAAM,CAEtC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/include.js b/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/include.js new file mode 100644 index 0000000..c1b0b6d --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/include.js @@ -0,0 +1,34 @@ +/** + * MIT License + * + * Copyright (c) 2021 Andrew Raffensperger + * + * 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 is a near carbon-copy of the original source (link below) with the + * TypeScript typings added and a few tweaks to make it ES3-compatible. + * + * See: https://github.com/adraffy/ens-normalize.js + */ +import { decode } from "@ethersproject/base64"; +import { read_compressed_payload } from './decoder.js'; +export function getData() { + return read_compressed_payload(decode('AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVB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DqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==')); +} +//# sourceMappingURL=include.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/include.js.map b/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/include.js.map new file mode 100644 index 0000000..4150a7b --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/include.js.map @@ -0,0 +1 @@ +{"version":3,"file":"include.js","sourceRoot":"","sources":["../../src.ts/ens-normalize/include.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,OAAO,EAAC,uBAAuB,EAAC,MAAM,cAAc,CAAC;AAErD,MAAM,UAAU,OAAO;IACnB,OAAO,uBAAuB,CAAC,MAAM,CAAC,k6cAAk6c,CAAC,CAAC,CAAC;AAC/8c,CAAC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/lib.d.ts b/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/lib.d.ts new file mode 100644 index 0000000..20bd038 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/lib.d.ts @@ -0,0 +1,31 @@ +/** + * MIT License + * + * Copyright (c) 2021 Andrew Raffensperger + * + * 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 is a near carbon-copy of the original source (link below) with the + * TypeScript typings added and a few tweaks to make it ES3-compatible. + * + * See: https://github.com/adraffy/ens-normalize.js + */ +export declare function ens_normalize_post_check(name: string): string; +export declare function ens_normalize(name: string): string; +//# sourceMappingURL=lib.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/lib.d.ts.map b/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/lib.d.ts.map new file mode 100644 index 0000000..4dc0aa1 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/lib.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src.ts/ens-normalize/lib.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AA6BH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAiB7D;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/lib.js b/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/lib.js new file mode 100644 index 0000000..149ae8c --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/lib.js @@ -0,0 +1,137 @@ +/** + * MIT License + * + * Copyright (c) 2021 Andrew Raffensperger + * + * 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 is a near carbon-copy of the original source (link below) with the + * TypeScript typings added and a few tweaks to make it ES3-compatible. + * + * See: https://github.com/adraffy/ens-normalize.js + */ +import { toUtf8CodePoints } from "@ethersproject/strings"; +import { getData } from './include.js'; +const r = getData(); +import { read_member_array, read_mapped_map, read_emoji_trie } from './decoder.js'; +// @TODO: This should be lazily loaded +const VALID = new Set(read_member_array(r)); +const IGNORED = new Set(read_member_array(r)); +const MAPPED = read_mapped_map(r); +const EMOJI_ROOT = read_emoji_trie(r); +//const NFC_CHECK = new Set(read_member_array(r, Array.from(VALID.values()).sort((a, b) => a - b))); +//const STOP = 0x2E; +const HYPHEN = 0x2D; +const UNDERSCORE = 0x5F; +function explode_cp(name) { + return toUtf8CodePoints(name); +} +function filter_fe0f(cps) { + return cps.filter(cp => cp != 0xFE0F); +} +export function ens_normalize_post_check(name) { + for (let label of name.split('.')) { + let cps = explode_cp(label); + try { + for (let i = cps.lastIndexOf(UNDERSCORE) - 1; i >= 0; i--) { + if (cps[i] !== UNDERSCORE) { + throw new Error(`underscore only allowed at start`); + } + } + if (cps.length >= 4 && cps.every(cp => cp < 0x80) && cps[2] === HYPHEN && cps[3] === HYPHEN) { + throw new Error(`invalid label extension`); + } + } + catch (err) { + throw new Error(`Invalid label "${label}": ${err.message}`); + } + } + return name; +} +export function ens_normalize(name) { + return ens_normalize_post_check(normalize(name, filter_fe0f)); +} +function normalize(name, emoji_filter) { + let input = explode_cp(name).reverse(); // flip for pop + let output = []; + while (input.length) { + let emoji = consume_emoji_reversed(input); + if (emoji) { + output.push(...emoji_filter(emoji)); + continue; + } + let cp = input.pop(); + if (VALID.has(cp)) { + output.push(cp); + continue; + } + if (IGNORED.has(cp)) { + continue; + } + let cps = MAPPED[cp]; + if (cps) { + output.push(...cps); + continue; + } + throw new Error(`Disallowed codepoint: 0x${cp.toString(16).toUpperCase()}`); + } + return ens_normalize_post_check(nfc(String.fromCodePoint(...output))); +} +function nfc(s) { + return s.normalize('NFC'); +} +function consume_emoji_reversed(cps, eaten) { + var _a; + let node = EMOJI_ROOT; + let emoji; + let saved; + let stack = []; + let pos = cps.length; + if (eaten) + eaten.length = 0; // clear input buffer (if needed) + while (pos) { + let cp = cps[--pos]; + node = (_a = node.branches.find(x => x.set.has(cp))) === null || _a === void 0 ? void 0 : _a.node; + if (!node) + break; + if (node.save) { // remember + saved = cp; + } + else if (node.check) { // check exclusion + if (cp === saved) + break; + } + stack.push(cp); + if (node.fe0f) { + stack.push(0xFE0F); + if (pos > 0 && cps[pos - 1] == 0xFE0F) + pos--; // consume optional FE0F + } + if (node.valid) { // this is a valid emoji (so far) + emoji = stack.slice(); // copy stack + if (node.valid == 2) + emoji.splice(1, 1); // delete FE0F at position 1 (RGI ZWJ don't follow spec!) + if (eaten) + eaten.push(...cps.slice(pos).reverse()); // copy input (if needed) + cps.length = pos; // truncate + } + } + return emoji; +} +//# sourceMappingURL=lib.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/lib.js.map b/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/lib.js.map new file mode 100644 index 0000000..46bc07c --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib.esm/ens-normalize/lib.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lib.js","sourceRoot":"","sources":["../../src.ts/ens-normalize/lib.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;AAEpB,OAAO,EAAC,iBAAiB,EAAE,eAAe,EAAE,eAAe,EAAC,MAAM,cAAc,CAAC;AAEjF,sCAAsC;AAEtC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5C,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9C,MAAM,MAAM,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;AAClC,MAAM,UAAU,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;AACtC,oGAAoG;AAEpG,oBAAoB;AACpB,MAAM,MAAM,GAAG,IAAI,CAAC;AACpB,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,SAAS,UAAU,CAAC,IAAY;IAC5B,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAED,SAAS,WAAW,CAAC,GAAkB;IACnC,OAAO,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,MAAM,CAAC,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,IAAY;IACpD,KAAK,IAAI,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;QAClC,IAAI,GAAG,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;QAC5B,IAAI;YACH,KAAK,IAAI,CAAC,GAAG,GAAG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B,KAAK,GAAG,EAAE,CAAC;SACX;aAAM,IAAI,IAAI,CAAC,KAAK,EAAE,EAAE,kBAAkB;YAC1C,IAAI,EAAE,KAAK,KAAK;gBAAE,MAAM;SACxB;QACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,IAAI,IAAI,CAAC,IAAI,EAAE;YACd,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACnB,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,MAAM;gBAAE,GAAG,EAAE,CAAC,CAAC,wBAAwB;SACtE;QACD,IAAI,IAAI,CAAC,KAAK,EAAE,EAAE,iCAAiC;YAClD,KAAK,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,aAAa;YACpC,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC;gBAAE,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,yDAAyD;YAClG,IAAI,KAAK;gBAAE,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,yBAAyB;YAC7E,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,WAAW;SAC7B;KACD;IACD,OAAO,KAAK,CAAC;AACd,CAAC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib.esm/id.d.ts b/test/node_modules/@ethersproject/hash/lib.esm/id.d.ts new file mode 100644 index 0000000..6477953 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/lib.esm/id.d.ts.map b/test/node_modules/@ethersproject/hash/lib.esm/id.d.ts.map new file mode 100644 index 0000000..2f23438 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/lib.esm/id.js b/test/node_modules/@ethersproject/hash/lib.esm/id.js new file mode 100644 index 0000000..8ae89e4 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/lib.esm/id.js.map b/test/node_modules/@ethersproject/hash/lib.esm/id.js.map new file mode 100644 index 0000000..db337ca --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/lib.esm/index.d.ts b/test/node_modules/@ethersproject/hash/lib.esm/index.d.ts new file mode 100644 index 0000000..1dac433 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib.esm/index.d.ts @@ -0,0 +1,7 @@ +import { id } from "./id"; +import { dnsEncode, isValidName, namehash } from "./namehash"; +import { hashMessage, messagePrefix } from "./message"; +import { ensNormalize } from "./namehash"; +import { TypedDataEncoder as _TypedDataEncoder } from "./typed-data"; +export { id, dnsEncode, namehash, isValidName, ensNormalize, messagePrefix, hashMessage, _TypedDataEncoder, }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/hash/lib.esm/index.d.ts.map new file mode 100644 index 0000000..d0f38f4 --- /dev/null +++ b/test/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,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAE,gBAAgB,IAAI,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAErE,OAAO,EACH,EAAE,EAEF,SAAS,EACT,QAAQ,EACR,WAAW,EAEX,YAAY,EAEZ,aAAa,EACb,WAAW,EAEX,iBAAiB,GACpB,CAAA"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib.esm/index.js b/test/node_modules/@ethersproject/hash/lib.esm/index.js new file mode 100644 index 0000000..1f1f6b6 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib.esm/index.js @@ -0,0 +1,8 @@ +"use strict"; +import { id } from "./id"; +import { dnsEncode, isValidName, namehash } from "./namehash"; +import { hashMessage, messagePrefix } from "./message"; +import { ensNormalize } from "./namehash"; +import { TypedDataEncoder as _TypedDataEncoder } from "./typed-data"; +export { id, dnsEncode, namehash, isValidName, ensNormalize, messagePrefix, hashMessage, _TypedDataEncoder, }; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib.esm/index.js.map b/test/node_modules/@ethersproject/hash/lib.esm/index.js.map new file mode 100644 index 0000000..dfe78aa --- /dev/null +++ b/test/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,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAE,gBAAgB,IAAI,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAErE,OAAO,EACH,EAAE,EAEF,SAAS,EACT,QAAQ,EACR,WAAW,EAEX,YAAY,EAEZ,aAAa,EACb,WAAW,EAEX,iBAAiB,GACpB,CAAA"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib.esm/message.d.ts b/test/node_modules/@ethersproject/hash/lib.esm/message.d.ts new file mode 100644 index 0000000..613ccd3 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/lib.esm/message.d.ts.map b/test/node_modules/@ethersproject/hash/lib.esm/message.d.ts.map new file mode 100644 index 0000000..abbe140 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/lib.esm/message.js b/test/node_modules/@ethersproject/hash/lib.esm/message.js new file mode 100644 index 0000000..6fd8c3f --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/lib.esm/message.js.map b/test/node_modules/@ethersproject/hash/lib.esm/message.js.map new file mode 100644 index 0000000..e14f54d --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/lib.esm/namehash.d.ts b/test/node_modules/@ethersproject/hash/lib.esm/namehash.d.ts new file mode 100644 index 0000000..3ccc70a --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib.esm/namehash.d.ts @@ -0,0 +1,5 @@ +export declare function ensNormalize(name: string): string; +export declare function isValidName(name: string): boolean; +export declare function namehash(name: string): string; +export declare function dnsEncode(name: string): string; +//# sourceMappingURL=namehash.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib.esm/namehash.d.ts.map b/test/node_modules/@ethersproject/hash/lib.esm/namehash.d.ts.map new file mode 100644 index 0000000..b061633 --- /dev/null +++ b/test/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":"AA0CA,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAKjD;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAc7C;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAa9C"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib.esm/namehash.js b/test/node_modules/@ethersproject/hash/lib.esm/namehash.js new file mode 100644 index 0000000..c36bf83 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib.esm/namehash.js @@ -0,0 +1,72 @@ +import { concat, hexlify } from "@ethersproject/bytes"; +import { toUtf8Bytes, toUtf8String } from "@ethersproject/strings"; +import { keccak256 } from "@ethersproject/keccak256"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +import { ens_normalize } from "./ens-normalize/lib"; +const Zeros = new Uint8Array(32); +Zeros.fill(0); +function checkComponent(comp) { + if (comp.length === 0) { + throw new Error("invalid ENS name; empty component"); + } + return comp; +} +function ensNameSplit(name) { + const bytes = toUtf8Bytes(ens_normalize(name)); + const comps = []; + if (name.length === 0) { + return comps; + } + let last = 0; + for (let i = 0; i < bytes.length; i++) { + const d = bytes[i]; + // A separator (i.e. "."); copy this component + if (d === 0x2e) { + comps.push(checkComponent(bytes.slice(last, i))); + last = i + 1; + } + } + // There was a stray separator at the end of the name + if (last >= bytes.length) { + throw new Error("invalid ENS name; empty component"); + } + comps.push(checkComponent(bytes.slice(last))); + return comps; +} +export function ensNormalize(name) { + return ensNameSplit(name).map((comp) => toUtf8String(comp)).join("."); +} +export function isValidName(name) { + try { + return (ensNameSplit(name).length !== 0); + } + 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 result = Zeros; + const comps = ensNameSplit(name); + while (comps.length) { + result = keccak256(concat([result, keccak256(comps.pop())])); + } + return hexlify(result); +} +export function dnsEncode(name) { + return hexlify(concat(ensNameSplit(name).map((comp) => { + // DNS does not allow components over 63 bytes in length + if (comp.length > 63) { + throw new Error("invalid DNS encoded entry; length exceeds 63 bytes"); + } + const bytes = new Uint8Array(comp.length + 1); + bytes.set(comp, 1); + bytes[0] = bytes.length - 1; + return bytes; + }))) + "00"; +} +//# sourceMappingURL=namehash.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib.esm/namehash.js.map b/test/node_modules/@ethersproject/hash/lib.esm/namehash.js.map new file mode 100644 index 0000000..c09c616 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib.esm/namehash.js.map @@ -0,0 +1 @@ +{"version":3,"file":"namehash.js","sourceRoot":"","sources":["../src.ts/namehash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,WAA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CAAC,CAAC,IAAI,EAAE,EAAE;QAClD,wDAAwD;QACxD,IAAI,IAAI,CAAC,MAAM,GAAG,EAAE,EAAE;YAClB,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;SACzE;QAED,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC9C,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QACnB,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;QAC5B,OAAO,KAAK,CAAC;IAEjB,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib.esm/typed-data.d.ts b/test/node_modules/@ethersproject/hash/lib.esm/typed-data.d.ts new file mode 100644 index 0000000..0e07dfd --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/lib.esm/typed-data.d.ts.map b/test/node_modules/@ethersproject/hash/lib.esm/typed-data.d.ts.map new file mode 100644 index 0000000..6854776 --- /dev/null +++ b/test/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,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAQhC,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,MAAM;IAI5C,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM;IAI5D,MAAM,CAAC,KAAK,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,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/test/node_modules/@ethersproject/hash/lib.esm/typed-data.js b/test/node_modules/@ethersproject/hash/lib.esm/typed-data.js new file mode 100644 index 0000000..f5f024f --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/lib.esm/typed-data.js.map b/test/node_modules/@ethersproject/hash/lib.esm/typed-data.js.map new file mode 100644 index 0000000..ca12c92 --- /dev/null +++ b/test/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,OAAO,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;AACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAEhB,MAAM,WAAW,GAAc,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAClD,MAAM,IAAI,GAAc,SAAS,CAAC,IAAI,CAAC,CAAC,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C,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/test/node_modules/@ethersproject/hash/lib/_version.d.ts b/test/node_modules/@ethersproject/hash/lib/_version.d.ts new file mode 100644 index 0000000..f6fac04 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "hash/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib/_version.d.ts.map b/test/node_modules/@ethersproject/hash/lib/_version.d.ts.map new file mode 100644 index 0000000..e41e9e6 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/lib/_version.js b/test/node_modules/@ethersproject/hash/lib/_version.js new file mode 100644 index 0000000..e97cd5b --- /dev/null +++ b/test/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.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib/_version.js.map b/test/node_modules/@ethersproject/hash/lib/_version.js.map new file mode 100644 index 0000000..9d275b7 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/lib/ens-normalize/decoder.d.ts b/test/node_modules/@ethersproject/hash/lib/ens-normalize/decoder.d.ts new file mode 100644 index 0000000..b7ea3b4 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib/ens-normalize/decoder.d.ts @@ -0,0 +1,50 @@ +/** + * MIT License + * + * Copyright (c) 2021 Andrew Raffensperger + * + * 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 is a near carbon-copy of the original source (link below) with the + * TypeScript typings added and a few tweaks to make it ES3-compatible. + * + * See: https://github.com/adraffy/ens-normalize.js + */ +export declare type Numbers = Uint8Array | Array; +export declare type NextFunc = (...args: Array) => number; +export declare function decode_arithmetic(bytes: Numbers): Array; +export declare function read_payload(v: Numbers): NextFunc; +export declare function read_compressed_payload(bytes: Numbers): NextFunc; +export declare function signed(i: number): number; +export declare function read_member_array(next: NextFunc, lookup?: Record): number[]; +export declare function read_mapped_map(next: NextFunc): Record>; +export declare function read_zero_terminated_array(next: NextFunc): Array; +export declare type Branch = { + set: Set; + node: Node; +}; +export declare type Node = { + branches: Array; + valid: number; + fe0f: boolean; + save: boolean; + check: boolean; +}; +export declare function read_emoji_trie(next: NextFunc): Node; +//# sourceMappingURL=decoder.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib/ens-normalize/decoder.d.ts.map b/test/node_modules/@ethersproject/hash/lib/ens-normalize/decoder.d.ts.map new file mode 100644 index 0000000..97af8cc --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib/ens-normalize/decoder.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"decoder.d.ts","sourceRoot":"","sources":["../../src.ts/ens-normalize/decoder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,oBAAY,OAAO,GAAG,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AACjD,oBAAY,QAAQ,GAAG,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,MAAM,CAAC;AAgCvD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAgF/D;AAID,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,GAAG,QAAQ,CAGjD;AACD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAEhE;AAGD,wBAAgB,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAExC;AAoBD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,YAWhF;AAKD,wBAAgB,eAAe,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAa7E;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,CAQxE;AAiCD,oBAAY,MAAM,GAAG;IACjB,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;CACd,CAAC;AAEF,oBAAY,IAAI,GAAG;IACf,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,wBAAgB,eAAe,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,CAoBpD"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib/ens-normalize/decoder.js b/test/node_modules/@ethersproject/hash/lib/ens-normalize/decoder.js new file mode 100644 index 0000000..eb8ede2 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib/ens-normalize/decoder.js @@ -0,0 +1,266 @@ +"use strict"; +/** + * MIT License + * + * Copyright (c) 2021 Andrew Raffensperger + * + * 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 is a near carbon-copy of the original source (link below) with the + * TypeScript typings added and a few tweaks to make it ES3-compatible. + * + * See: https://github.com/adraffy/ens-normalize.js + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.read_emoji_trie = exports.read_zero_terminated_array = exports.read_mapped_map = exports.read_member_array = exports.signed = exports.read_compressed_payload = exports.read_payload = exports.decode_arithmetic = void 0; +// https://github.com/behnammodi/polyfill/blob/master/array.polyfill.js +function flat(array, depth) { + if (depth == null) { + depth = 1; + } + var result = []; + var forEach = result.forEach; + var flatDeep = function (arr, depth) { + forEach.call(arr, function (val) { + if (depth > 0 && Array.isArray(val)) { + flatDeep(val, depth - 1); + } + else { + result.push(val); + } + }); + }; + flatDeep(array, depth); + return result; +} +function fromEntries(array) { + var result = {}; + for (var i = 0; i < array.length; i++) { + var value = array[i]; + result[value[0]] = value[1]; + } + return result; +} +function decode_arithmetic(bytes) { + var pos = 0; + function u16() { return (bytes[pos++] << 8) | bytes[pos++]; } + // decode the frequency table + var symbol_count = u16(); + var total = 1; + var acc = [0, 1]; // first symbol has frequency 1 + for (var i = 1; i < symbol_count; i++) { + acc.push(total += u16()); + } + // skip the sized-payload that the last 3 symbols index into + var skip = u16(); + var pos_payload = pos; + pos += skip; + var read_width = 0; + var read_buffer = 0; + function read_bit() { + if (read_width == 0) { + // this will read beyond end of buffer + // but (undefined|0) => zero pad + read_buffer = (read_buffer << 8) | bytes[pos++]; + read_width = 8; + } + return (read_buffer >> --read_width) & 1; + } + var N = 31; + var FULL = Math.pow(2, N); + var HALF = FULL >>> 1; + var QRTR = HALF >> 1; + var MASK = FULL - 1; + // fill register + var register = 0; + for (var i = 0; i < N; i++) + register = (register << 1) | read_bit(); + var symbols = []; + var low = 0; + var range = FULL; // treat like a float + while (true) { + var value = Math.floor((((register - low + 1) * total) - 1) / range); + var start = 0; + var end = symbol_count; + while (end - start > 1) { // binary search + var mid = (start + end) >>> 1; + if (value < acc[mid]) { + end = mid; + } + else { + start = mid; + } + } + if (start == 0) + break; // first symbol is end mark + symbols.push(start); + var a = low + Math.floor(range * acc[start] / total); + var b = low + Math.floor(range * acc[start + 1] / total) - 1; + while (((a ^ b) & HALF) == 0) { + register = (register << 1) & MASK | read_bit(); + a = (a << 1) & MASK; + b = (b << 1) & MASK | 1; + } + while (a & ~b & QRTR) { + register = (register & HALF) | ((register << 1) & (MASK >>> 1)) | read_bit(); + a = (a << 1) ^ HALF; + b = ((b ^ HALF) << 1) | HALF | 1; + } + low = a; + range = 1 + b - a; + } + var offset = symbol_count - 4; + return symbols.map(function (x) { + switch (x - offset) { + case 3: return offset + 0x10100 + ((bytes[pos_payload++] << 16) | (bytes[pos_payload++] << 8) | bytes[pos_payload++]); + case 2: return offset + 0x100 + ((bytes[pos_payload++] << 8) | bytes[pos_payload++]); + case 1: return offset + bytes[pos_payload++]; + default: return x - 1; + } + }); +} +exports.decode_arithmetic = decode_arithmetic; +// returns an iterator which returns the next symbol +function read_payload(v) { + var pos = 0; + return function () { return v[pos++]; }; +} +exports.read_payload = read_payload; +function read_compressed_payload(bytes) { + return read_payload(decode_arithmetic(bytes)); +} +exports.read_compressed_payload = read_compressed_payload; +// eg. [0,1,2,3...] => [0,-1,1,-2,...] +function signed(i) { + return (i & 1) ? (~i >> 1) : (i >> 1); +} +exports.signed = signed; +function read_counts(n, next) { + var v = Array(n); + for (var i = 0; i < n; i++) + v[i] = 1 + next(); + return v; +} +function read_ascending(n, next) { + var v = Array(n); + for (var i = 0, x = -1; i < n; i++) + v[i] = x += 1 + next(); + return v; +} +function read_deltas(n, next) { + var v = Array(n); + for (var i = 0, x = 0; i < n; i++) + v[i] = x += signed(next()); + return v; +} +function read_member_array(next, lookup) { + var v = read_ascending(next(), next); + var n = next(); + var vX = read_ascending(n, next); + var vN = read_counts(n, next); + for (var i = 0; i < n; i++) { + for (var j = 0; j < vN[i]; j++) { + v.push(vX[i] + j); + } + } + return lookup ? v.map(function (x) { return lookup[x]; }) : v; +} +exports.read_member_array = read_member_array; +// returns array of +// [x, ys] => single replacement rule +// [x, ys, n, dx, dx] => linear map +function read_mapped_map(next) { + var ret = []; + while (true) { + var w = next(); + if (w == 0) + break; + ret.push(read_linear_table(w, next)); + } + while (true) { + var w = next() - 1; + if (w < 0) + break; + ret.push(read_replacement_table(w, next)); + } + return fromEntries(flat(ret)); +} +exports.read_mapped_map = read_mapped_map; +function read_zero_terminated_array(next) { + var v = []; + while (true) { + var i = next(); + if (i == 0) + break; + v.push(i); + } + return v; +} +exports.read_zero_terminated_array = read_zero_terminated_array; +function read_transposed(n, w, next) { + var m = Array(n).fill(undefined).map(function () { return []; }); + for (var i = 0; i < w; i++) { + read_deltas(n, next).forEach(function (x, j) { return m[j].push(x); }); + } + return m; +} +function read_linear_table(w, next) { + var dx = 1 + next(); + var dy = next(); + var vN = read_zero_terminated_array(next); + var m = read_transposed(vN.length, 1 + w, next); + return flat(m.map(function (v, i) { + var x = v[0], ys = v.slice(1); + //let [x, ...ys] = v; + //return Array(vN[i]).fill().map((_, j) => { + return Array(vN[i]).fill(undefined).map(function (_, j) { + var j_dy = j * dy; + return [x + j * dx, ys.map(function (y) { return y + j_dy; })]; + }); + })); +} +function read_replacement_table(w, next) { + var n = 1 + next(); + var m = read_transposed(n, 1 + w, next); + return m.map(function (v) { return [v[0], v.slice(1)]; }); +} +function read_emoji_trie(next) { + var sorted = read_member_array(next).sort(function (a, b) { return a - b; }); + return read(); + function read() { + var branches = []; + while (true) { + var keys = read_member_array(next, sorted); + if (keys.length == 0) + break; + branches.push({ set: new Set(keys), node: read() }); + } + branches.sort(function (a, b) { return b.set.size - a.set.size; }); // sort by likelihood + var temp = next(); + var valid = temp % 3; + temp = (temp / 3) | 0; + var fe0f = !!(temp & 1); + temp >>= 1; + var save = temp == 1; + var check = temp == 2; + return { branches: branches, valid: valid, fe0f: fe0f, save: save, check: check }; + } +} +exports.read_emoji_trie = read_emoji_trie; +//# sourceMappingURL=decoder.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib/ens-normalize/decoder.js.map b/test/node_modules/@ethersproject/hash/lib/ens-normalize/decoder.js.map new file mode 100644 index 0000000..f7545f6 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib/ens-normalize/decoder.js.map @@ -0,0 +1 @@ +{"version":3,"file":"decoder.js","sourceRoot":"","sources":["../../src.ts/ens-normalize/decoder.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;;;AAKH,uEAAuE;AACvE,SAAS,IAAI,CAAC,KAAiB,EAAE,KAAc;IAC3C,IAAI,KAAK,IAAI,IAAI,EAAE;QAAE,KAAK,GAAG,CAAC,CAAC;KAAE;IACjC,IAAM,MAAM,GAAe,EAAE,CAAC;IAE9B,IAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IAE/B,IAAM,QAAQ,GAAG,UAAU,GAAe,EAAE,KAAa;QACrD,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,GAAQ;YAChC,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;gBACjC,QAAQ,CAAC,GAAG,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;aAC5B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,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAC,CAAC,CAAC;SAClD;QACC,QAAQ,CAAC,IAAI,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,EAAvB,CAAuB,CAAC,CAAC,CAAC,qBAAqB;QACxE,IAAI,IAAI,GAAG,IAAI,EAAE,CAAC;QAClB,IAAI,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC;QACrB,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,GAAC,CAAC,CAAC;QACpB,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;QACxB,IAAI,KAAK,CAAC,CAAC;QACX,IAAI,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC;QACrB,IAAI,KAAK,GAAG,IAAI,IAAI,CAAC,CAAC;QACtB,OAAO,EAAC,QAAQ,UAAA,EAAE,KAAK,OAAA,EAAE,IAAI,MAAA,EAAE,IAAI,MAAA,EAAE,KAAK,OAAA,EAAC,CAAC;IAC9C,CAAC;AACF,CAAC;AApBD,0CAoBC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib/ens-normalize/include.d.ts b/test/node_modules/@ethersproject/hash/lib/ens-normalize/include.d.ts new file mode 100644 index 0000000..176b7f3 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib/ens-normalize/include.d.ts @@ -0,0 +1,30 @@ +/** + * MIT License + * + * Copyright (c) 2021 Andrew Raffensperger + * + * 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 is a near carbon-copy of the original source (link below) with the + * TypeScript typings added and a few tweaks to make it ES3-compatible. + * + * See: https://github.com/adraffy/ens-normalize.js + */ +export declare function getData(): () => number; +//# sourceMappingURL=include.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib/ens-normalize/include.d.ts.map b/test/node_modules/@ethersproject/hash/lib/ens-normalize/include.d.ts.map new file mode 100644 index 0000000..0be889e --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib/ens-normalize/include.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"include.d.ts","sourceRoot":"","sources":["../../src.ts/ens-normalize/include.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAMH,wBAAgB,OAAO,IAAI,MAAM,MAAM,CAEtC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib/ens-normalize/include.js b/test/node_modules/@ethersproject/hash/lib/ens-normalize/include.js new file mode 100644 index 0000000..4f13d88 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib/ens-normalize/include.js @@ -0,0 +1,38 @@ +"use strict"; +/** + * MIT License + * + * Copyright (c) 2021 Andrew Raffensperger + * + * 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 is a near carbon-copy of the original source (link below) with the + * TypeScript typings added and a few tweaks to make it ES3-compatible. + * + * See: https://github.com/adraffy/ens-normalize.js + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getData = void 0; +var base64_1 = require("@ethersproject/base64"); +var decoder_js_1 = require("./decoder.js"); +function getData() { + return (0, decoder_js_1.read_compressed_payload)((0, base64_1.decode)('AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivw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m5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==')); +} +exports.getData = getData; +//# sourceMappingURL=include.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib/ens-normalize/include.js.map b/test/node_modules/@ethersproject/hash/lib/ens-normalize/include.js.map new file mode 100644 index 0000000..7c8dfc5 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib/ens-normalize/include.js.map @@ -0,0 +1 @@ +{"version":3,"file":"include.js","sourceRoot":"","sources":["../../src.ts/ens-normalize/include.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;;;AAEH,gDAA+C;AAE/C,2CAAqD;AAErD,SAAgB,OAAO;IACnB,OAAO,IAAA,oCAAuB,EAAC,IAAA,eAAM,EAAC,k6cAAk6c,CAAC,CAAC,CAAC;AAC/8c,CAAC;AAFD,0BAEC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib/ens-normalize/lib.d.ts b/test/node_modules/@ethersproject/hash/lib/ens-normalize/lib.d.ts new file mode 100644 index 0000000..20bd038 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib/ens-normalize/lib.d.ts @@ -0,0 +1,31 @@ +/** + * MIT License + * + * Copyright (c) 2021 Andrew Raffensperger + * + * 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 is a near carbon-copy of the original source (link below) with the + * TypeScript typings added and a few tweaks to make it ES3-compatible. + * + * See: https://github.com/adraffy/ens-normalize.js + */ +export declare function ens_normalize_post_check(name: string): string; +export declare function ens_normalize(name: string): string; +//# sourceMappingURL=lib.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib/ens-normalize/lib.d.ts.map b/test/node_modules/@ethersproject/hash/lib/ens-normalize/lib.d.ts.map new file mode 100644 index 0000000..4dc0aa1 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib/ens-normalize/lib.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src.ts/ens-normalize/lib.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AA6BH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAiB7D;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib/ens-normalize/lib.js b/test/node_modules/@ethersproject/hash/lib/ens-normalize/lib.js new file mode 100644 index 0000000..ae5f492 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib/ens-normalize/lib.js @@ -0,0 +1,148 @@ +"use strict"; +/** + * MIT License + * + * Copyright (c) 2021 Andrew Raffensperger + * + * 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 is a near carbon-copy of the original source (link below) with the + * TypeScript typings added and a few tweaks to make it ES3-compatible. + * + * See: https://github.com/adraffy/ens-normalize.js + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ens_normalize = exports.ens_normalize_post_check = void 0; +var strings_1 = require("@ethersproject/strings"); +var include_js_1 = require("./include.js"); +var r = (0, include_js_1.getData)(); +var decoder_js_1 = require("./decoder.js"); +// @TODO: This should be lazily loaded +var VALID = new Set((0, decoder_js_1.read_member_array)(r)); +var IGNORED = new Set((0, decoder_js_1.read_member_array)(r)); +var MAPPED = (0, decoder_js_1.read_mapped_map)(r); +var EMOJI_ROOT = (0, decoder_js_1.read_emoji_trie)(r); +//const NFC_CHECK = new Set(read_member_array(r, Array.from(VALID.values()).sort((a, b) => a - b))); +//const STOP = 0x2E; +var HYPHEN = 0x2D; +var UNDERSCORE = 0x5F; +function explode_cp(name) { + return (0, strings_1.toUtf8CodePoints)(name); +} +function filter_fe0f(cps) { + return cps.filter(function (cp) { return cp != 0xFE0F; }); +} +function ens_normalize_post_check(name) { + for (var _i = 0, _a = name.split('.'); _i < _a.length; _i++) { + var label = _a[_i]; + var cps = explode_cp(label); + try { + for (var i = cps.lastIndexOf(UNDERSCORE) - 1; i >= 0; i--) { + if (cps[i] !== UNDERSCORE) { + throw new Error("underscore only allowed at start"); + } + } + if (cps.length >= 4 && cps.every(function (cp) { return cp < 0x80; }) && cps[2] === HYPHEN && cps[3] === HYPHEN) { + throw new Error("invalid label extension"); + } + } + catch (err) { + throw new Error("Invalid label \"" + label + "\": " + err.message); + } + } + return name; +} +exports.ens_normalize_post_check = ens_normalize_post_check; +function ens_normalize(name) { + return ens_normalize_post_check(normalize(name, filter_fe0f)); +} +exports.ens_normalize = ens_normalize; +function normalize(name, emoji_filter) { + var input = explode_cp(name).reverse(); // flip for pop + var output = []; + while (input.length) { + var emoji = consume_emoji_reversed(input); + if (emoji) { + output.push.apply(output, emoji_filter(emoji)); + continue; + } + var cp = input.pop(); + if (VALID.has(cp)) { + output.push(cp); + continue; + } + if (IGNORED.has(cp)) { + continue; + } + var cps = MAPPED[cp]; + if (cps) { + output.push.apply(output, cps); + continue; + } + throw new Error("Disallowed codepoint: 0x" + cp.toString(16).toUpperCase()); + } + return ens_normalize_post_check(nfc(String.fromCodePoint.apply(String, output))); +} +function nfc(s) { + return s.normalize('NFC'); +} +function consume_emoji_reversed(cps, eaten) { + var _a; + var node = EMOJI_ROOT; + var emoji; + var saved; + var stack = []; + var pos = cps.length; + if (eaten) + eaten.length = 0; // clear input buffer (if needed) + var _loop_1 = function () { + var cp = cps[--pos]; + node = (_a = node.branches.find(function (x) { return x.set.has(cp); })) === null || _a === void 0 ? void 0 : _a.node; + if (!node) + return "break"; + if (node.save) { // remember + saved = cp; + } + else if (node.check) { // check exclusion + if (cp === saved) + return "break"; + } + stack.push(cp); + if (node.fe0f) { + stack.push(0xFE0F); + if (pos > 0 && cps[pos - 1] == 0xFE0F) + pos--; // consume optional FE0F + } + if (node.valid) { // this is a valid emoji (so far) + emoji = stack.slice(); // copy stack + if (node.valid == 2) + emoji.splice(1, 1); // delete FE0F at position 1 (RGI ZWJ don't follow spec!) + if (eaten) + eaten.push.apply(eaten, cps.slice(pos).reverse()); // copy input (if needed) + cps.length = pos; // truncate + } + }; + while (pos) { + var state_1 = _loop_1(); + if (state_1 === "break") + break; + } + return emoji; +} +//# sourceMappingURL=lib.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib/ens-normalize/lib.js.map b/test/node_modules/@ethersproject/hash/lib/ens-normalize/lib.js.map new file mode 100644 index 0000000..6acec99 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib/ens-normalize/lib.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lib.js","sourceRoot":"","sources":["../../src.ts/ens-normalize/lib.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;;;AAEH,kDAA0D;AAE1D,2CAAuC;AACvC,IAAM,CAAC,GAAG,IAAA,oBAAO,GAAE,CAAC;AAEpB,2CAAiF;AAEjF,sCAAsC;AAEtC,IAAM,KAAK,GAAG,IAAI,GAAG,CAAC,IAAA,8BAAiB,EAAC,CAAC,CAAC,CAAC,CAAC;AAC5C,IAAM,OAAO,GAAG,IAAI,GAAG,CAAC,IAAA,8BAAiB,EAAC,CAAC,CAAC,CAAC,CAAC;AAC9C,IAAM,MAAM,GAAG,IAAA,4BAAe,EAAC,CAAC,CAAC,CAAC;AAClC,IAAM,UAAU,GAAG,IAAA,4BAAe,EAAC,CAAC,CAAC,CAAC;AACtC,oGAAoG;AAEpG,oBAAoB;AACpB,IAAM,MAAM,GAAG,IAAI,CAAC;AACpB,IAAM,UAAU,GAAG,IAAI,CAAC;AAExB,SAAS,UAAU,CAAC,IAAY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7E,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,WAAW;SAC7B;;IAnBF,OAAO,GAAG;;;;KAoBT;IACD,OAAO,KAAK,CAAC;AACd,CAAC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib/id.d.ts b/test/node_modules/@ethersproject/hash/lib/id.d.ts new file mode 100644 index 0000000..6477953 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/lib/id.d.ts.map b/test/node_modules/@ethersproject/hash/lib/id.d.ts.map new file mode 100644 index 0000000..2f23438 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/lib/id.js b/test/node_modules/@ethersproject/hash/lib/id.js new file mode 100644 index 0000000..3093444 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/lib/id.js.map b/test/node_modules/@ethersproject/hash/lib/id.js.map new file mode 100644 index 0000000..15846c0 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/lib/index.d.ts b/test/node_modules/@ethersproject/hash/lib/index.d.ts new file mode 100644 index 0000000..1dac433 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib/index.d.ts @@ -0,0 +1,7 @@ +import { id } from "./id"; +import { dnsEncode, isValidName, namehash } from "./namehash"; +import { hashMessage, messagePrefix } from "./message"; +import { ensNormalize } from "./namehash"; +import { TypedDataEncoder as _TypedDataEncoder } from "./typed-data"; +export { id, dnsEncode, namehash, isValidName, ensNormalize, messagePrefix, hashMessage, _TypedDataEncoder, }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib/index.d.ts.map b/test/node_modules/@ethersproject/hash/lib/index.d.ts.map new file mode 100644 index 0000000..d0f38f4 --- /dev/null +++ b/test/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,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAE,gBAAgB,IAAI,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAErE,OAAO,EACH,EAAE,EAEF,SAAS,EACT,QAAQ,EACR,WAAW,EAEX,YAAY,EAEZ,aAAa,EACb,WAAW,EAEX,iBAAiB,GACpB,CAAA"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib/index.js b/test/node_modules/@ethersproject/hash/lib/index.js new file mode 100644 index 0000000..3bdab55 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib/index.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports._TypedDataEncoder = exports.hashMessage = exports.messagePrefix = exports.ensNormalize = exports.isValidName = exports.namehash = exports.dnsEncode = 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, "dnsEncode", { enumerable: true, get: function () { return namehash_1.dnsEncode; } }); +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 namehash_2 = require("./namehash"); +Object.defineProperty(exports, "ensNormalize", { enumerable: true, get: function () { return namehash_2.ensNormalize; } }); +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/test/node_modules/@ethersproject/hash/lib/index.js.map b/test/node_modules/@ethersproject/hash/lib/index.js.map new file mode 100644 index 0000000..809eab7 --- /dev/null +++ b/test/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;AAStB,mFATK,OAAE,OASL;AARN,uCAA8D;AAU1D,0FAVK,oBAAS,OAUL;AAET,4FAZgB,sBAAW,OAYhB;AADX,yFAX6B,mBAAQ,OAW7B;AAVZ,qCAAuD;AAgBnD,4FAhBK,qBAAW,OAgBL;AADX,8FAfkB,uBAAa,OAelB;AAbjB,uCAA0C;AAWtC,6FAXK,uBAAY,OAWL;AAThB,2CAAqE;AAcjE,kGAdyB,6BAAiB,OAczB"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib/message.d.ts b/test/node_modules/@ethersproject/hash/lib/message.d.ts new file mode 100644 index 0000000..613ccd3 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/lib/message.d.ts.map b/test/node_modules/@ethersproject/hash/lib/message.d.ts.map new file mode 100644 index 0000000..abbe140 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/lib/message.js b/test/node_modules/@ethersproject/hash/lib/message.js new file mode 100644 index 0000000..f193110 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/lib/message.js.map b/test/node_modules/@ethersproject/hash/lib/message.js.map new file mode 100644 index 0000000..dae70cd --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/lib/namehash.d.ts b/test/node_modules/@ethersproject/hash/lib/namehash.d.ts new file mode 100644 index 0000000..3ccc70a --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib/namehash.d.ts @@ -0,0 +1,5 @@ +export declare function ensNormalize(name: string): string; +export declare function isValidName(name: string): boolean; +export declare function namehash(name: string): string; +export declare function dnsEncode(name: string): string; +//# sourceMappingURL=namehash.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib/namehash.d.ts.map b/test/node_modules/@ethersproject/hash/lib/namehash.d.ts.map new file mode 100644 index 0000000..b061633 --- /dev/null +++ b/test/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":"AA0CA,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAKjD;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAc7C;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAa9C"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib/namehash.js b/test/node_modules/@ethersproject/hash/lib/namehash.js new file mode 100644 index 0000000..619fb23 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/lib/namehash.js @@ -0,0 +1,79 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.dnsEncode = exports.namehash = exports.isValidName = exports.ensNormalize = 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 lib_1 = require("./ens-normalize/lib"); +var Zeros = new Uint8Array(32); +Zeros.fill(0); +function checkComponent(comp) { + if (comp.length === 0) { + throw new Error("invalid ENS name; empty component"); + } + return comp; +} +function ensNameSplit(name) { + var bytes = (0, strings_1.toUtf8Bytes)((0, lib_1.ens_normalize)(name)); + var comps = []; + if (name.length === 0) { + return comps; + } + var last = 0; + for (var i = 0; i < bytes.length; i++) { + var d = bytes[i]; + // A separator (i.e. "."); copy this component + if (d === 0x2e) { + comps.push(checkComponent(bytes.slice(last, i))); + last = i + 1; + } + } + // There was a stray separator at the end of the name + if (last >= bytes.length) { + throw new Error("invalid ENS name; empty component"); + } + comps.push(checkComponent(bytes.slice(last))); + return comps; +} +function ensNormalize(name) { + return ensNameSplit(name).map(function (comp) { return (0, strings_1.toUtf8String)(comp); }).join("."); +} +exports.ensNormalize = ensNormalize; +function isValidName(name) { + try { + return (ensNameSplit(name).length !== 0); + } + 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 result = Zeros; + var comps = ensNameSplit(name); + while (comps.length) { + result = (0, keccak256_1.keccak256)((0, bytes_1.concat)([result, (0, keccak256_1.keccak256)(comps.pop())])); + } + return (0, bytes_1.hexlify)(result); +} +exports.namehash = namehash; +function dnsEncode(name) { + return (0, bytes_1.hexlify)((0, bytes_1.concat)(ensNameSplit(name).map(function (comp) { + // DNS does not allow components over 63 bytes in length + if (comp.length > 63) { + throw new Error("invalid DNS encoded entry; length exceeds 63 bytes"); + } + var bytes = new Uint8Array(comp.length + 1); + bytes.set(comp, 1); + bytes[0] = bytes.length - 1; + return bytes; + }))) + "00"; +} +exports.dnsEncode = dnsEncode; +//# sourceMappingURL=namehash.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib/namehash.js.map b/test/node_modules/@ethersproject/hash/lib/namehash.js.map new file mode 100644 index 0000000..a09839f --- /dev/null +++ b/test/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,kDAAmE;AACnE,sDAAqD;AAErD,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,2CAAoD;AAEpD,IAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;AACjC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAEd,S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AAM,GAAG,CAAC,CAAC;QAC5B,OAAO,KAAK,CAAC;IAEjB,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;AAChB,CAAC;AAbD,8BAaC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hash/lib/typed-data.d.ts b/test/node_modules/@ethersproject/hash/lib/typed-data.d.ts new file mode 100644 index 0000000..0e07dfd --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/lib/typed-data.d.ts.map b/test/node_modules/@ethersproject/hash/lib/typed-data.d.ts.map new file mode 100644 index 0000000..6854776 --- /dev/null +++ b/test/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,OA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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/test/node_modules/@ethersproject/hash/lib/typed-data.js b/test/node_modules/@ethersproject/hash/lib/typed-data.js new file mode 100644 index 0000000..e3e85db --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/lib/typed-data.js.map b/test/node_modules/@ethersproject/hash/lib/typed-data.js.map new file mode 100644 index 0000000..40e1f29 --- /dev/null +++ b/test/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,CAA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_modules/@ethersproject/hash/package.json b/test/node_modules/@ethersproject/hash/package.json new file mode 100644 index 0000000..26d2163 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/package.json @@ -0,0 +1,50 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/base64": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.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": "ec1b9583039a14a0e0fa15d0a2a6082a2f41cf5b", + "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": "0x6e7a2a4f4c5a722640a0904a3f015a410699e60655329f11148be6267b5d4c6c", + "types": "./lib/index.d.ts", + "version": "5.7.0" +} diff --git a/test/node_modules/@ethersproject/hash/src.ts/_version.ts b/test/node_modules/@ethersproject/hash/src.ts/_version.ts new file mode 100644 index 0000000..1cafc58 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "hash/5.7.0"; diff --git a/test/node_modules/@ethersproject/hash/src.ts/ens-normalize/decoder.ts b/test/node_modules/@ethersproject/hash/src.ts/ens-normalize/decoder.ts new file mode 100644 index 0000000..bc6d8c3 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/src.ts/ens-normalize/decoder.ts @@ -0,0 +1,283 @@ +/** + * MIT License + * + * Copyright (c) 2021 Andrew Raffensperger + * + * 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 is a near carbon-copy of the original source (link below) with the + * TypeScript typings added and a few tweaks to make it ES3-compatible. + * + * See: https://github.com/adraffy/ens-normalize.js + */ + +export type Numbers = Uint8Array | Array; +export type NextFunc = (...args: Array) => number; + +// https://github.com/behnammodi/polyfill/blob/master/array.polyfill.js +function flat(array: Array, depth?: number): Array { + if (depth == null) { depth = 1; } + const result: Array = []; + + const forEach = result.forEach; + + const flatDeep = function (arr: Array, depth: number) { + forEach.call(arr, function (val: any) { + if (depth > 0 && Array.isArray(val)) { + flatDeep(val, depth - 1); + } else { + result.push(val); + } + }); + }; + + flatDeep(array, depth); + return result; +} + +function fromEntries(array: Array<[T, U]>): Record { + const result: Record = >{ }; + for (let i = 0; i < array.length; i++) { + const value = array[i]; + result[value[0]] = value[1]; + } + return result; +} + +export function decode_arithmetic(bytes: Numbers): Array { + let pos = 0; + function u16() { return (bytes[pos++] << 8) | bytes[pos++]; } + + // decode the frequency table + let symbol_count = u16(); + let total = 1; + let acc = [0, 1]; // first symbol has frequency 1 + for (let i = 1; i < symbol_count; i++) { + acc.push(total += u16()); + } + + // skip the sized-payload that the last 3 symbols index into + let skip = u16(); + let pos_payload = pos; + pos += skip; + + let read_width = 0; + let read_buffer = 0; + function read_bit() { + if (read_width == 0) { + // this will read beyond end of buffer + // but (undefined|0) => zero pad + read_buffer = (read_buffer << 8) | bytes[pos++]; + read_width = 8; + } + return (read_buffer >> --read_width) & 1; + } + + const N = 31; + const FULL = 2**N; + const HALF = FULL >>> 1; + const QRTR = HALF >> 1; + const MASK = FULL - 1; + + // fill register + let register = 0; + for (let i = 0; i < N; i++) register = (register << 1) | read_bit(); + + let symbols = []; + let low = 0; + let range = FULL; // treat like a float + while (true) { + let value = Math.floor((((register - low + 1) * total) - 1) / range); + let start = 0; + let end = symbol_count; + while (end - start > 1) { // binary search + let mid = (start + end) >>> 1; + if (value < acc[mid]) { + end = mid; + } else { + start = mid; + } + } + if (start == 0) break; // first symbol is end mark + symbols.push(start); + let a = low + Math.floor(range * acc[start] / total); + let b = low + Math.floor(range * acc[start+1] / total) - 1 + while (((a ^ b) & HALF) == 0) { + register = (register << 1) & MASK | read_bit(); + a = (a << 1) & MASK; + b = (b << 1) & MASK | 1; + } + while (a & ~b & QRTR) { + register = (register & HALF) | ((register << 1) & (MASK >>> 1)) | read_bit(); + a = (a << 1) ^ HALF; + b = ((b ^ HALF) << 1) | HALF | 1; + } + low = a; + range = 1 + b - a; + } + let offset = symbol_count - 4; + return symbols.map(x => { // index into payload + switch (x - offset) { + case 3: return offset + 0x10100 + ((bytes[pos_payload++] << 16) | (bytes[pos_payload++] << 8) | bytes[pos_payload++]); + case 2: return offset + 0x100 + ((bytes[pos_payload++] << 8) | bytes[pos_payload++]); + case 1: return offset + bytes[pos_payload++]; + default: return x - 1; + } + }); +} + + +// returns an iterator which returns the next symbol +export function read_payload(v: Numbers): NextFunc { + let pos = 0; + return () => v[pos++]; +} +export function read_compressed_payload(bytes: Numbers): NextFunc { + return read_payload(decode_arithmetic(bytes)); +} + +// eg. [0,1,2,3...] => [0,-1,1,-2,...] +export function signed(i: number): number { + return (i & 1) ? (~i >> 1) : (i >> 1); +} + +function read_counts(n: number, next: NextFunc): Array { + let v = Array(n); + for (let i = 0; i < n; i++) v[i] = 1 + next(); + return v; +} + +function read_ascending(n: number, next: NextFunc): Array { + let v = Array(n); + for (let i = 0, x = -1; i < n; i++) v[i] = x += 1 + next(); + return v; +} + +function read_deltas(n: number, next: NextFunc): Array { + let v = Array(n); + for (let i = 0, x = 0; i < n; i++) v[i] = x += signed(next()); + return v; +} + +export function read_member_array(next: NextFunc, lookup?: Record) { + let v = read_ascending(next(), next); + let n = next(); + let vX = read_ascending(n, next); + let vN = read_counts(n, next); + for (let i = 0; i < n; i++) { + for (let j = 0; j < vN[i]; j++) { + v.push(vX[i] + j); + } + } + return lookup ? v.map(x => lookup[x]) : v; +} + +// returns array of +// [x, ys] => single replacement rule +// [x, ys, n, dx, dx] => linear map +export function read_mapped_map(next: NextFunc): Record> { + let ret = []; + while (true) { + let w = next(); + if (w == 0) break; + ret.push(read_linear_table(w, next)); + } + while (true) { + let w = next() - 1; + if (w < 0) break; + ret.push(read_replacement_table(w, next)); + } + return fromEntries>(flat(ret)); +} + +export function read_zero_terminated_array(next: NextFunc): Array { + let v = []; + while (true) { + let i = next(); + if (i == 0) break; + v.push(i); + } + return v; +} + +function read_transposed(n: number, w: number, next: NextFunc): Array> { + let m = Array(n).fill(undefined).map(() => []); + for (let i = 0; i < w; i++) { + read_deltas(n, next).forEach((x, j) => m[j].push(x)); + } + return m; +} + + +function read_linear_table(w: number, next: NextFunc): Array>> { + let dx = 1 + next(); + let dy = next(); + let vN = read_zero_terminated_array(next); + let m = read_transposed(vN.length, 1+w, next); + return flat(m.map((v, i) => { + const x = v[0], ys = v.slice(1); + //let [x, ...ys] = v; + //return Array(vN[i]).fill().map((_, j) => { + return Array(vN[i]).fill(undefined).map((_, j) => { + let j_dy = j * dy; + return [x + j * dx, ys.map(y => y + j_dy)]; + }); + })); +} + +function read_replacement_table(w: number, next: NextFunc): Array<[ number, Array ]> { + let n = 1 + next(); + let m = read_transposed(n, 1+w, next); + return m.map(v => [v[0], v.slice(1)]); +} + +export type Branch = { + set: Set; + node: Node; +}; + +export type Node = { + branches: Array; + valid: number; + fe0f: boolean; + save: boolean; + check: boolean; +}; + +export function read_emoji_trie(next: NextFunc): Node { + let sorted = read_member_array(next).sort((a, b) => a - b); + return read(); + function read(): Node { + let branches = []; + while (true) { + let keys = read_member_array(next, sorted); + if (keys.length == 0) break; + branches.push({set: new Set(keys), node: read()}); + } + branches.sort((a, b) => b.set.size - a.set.size); // sort by likelihood + let temp = next(); + let valid = temp % 3; + temp = (temp / 3)|0; + let fe0f = !!(temp & 1); + temp >>= 1; + let save = temp == 1; + let check = temp == 2; + return {branches, valid, fe0f, save, check}; + } +} diff --git a/test/node_modules/@ethersproject/hash/src.ts/ens-normalize/include.ts b/test/node_modules/@ethersproject/hash/src.ts/ens-normalize/include.ts new file mode 100644 index 0000000..5eb56ca --- /dev/null +++ b/test/node_modules/@ethersproject/hash/src.ts/ens-normalize/include.ts @@ -0,0 +1,37 @@ +/** + * MIT License + * + * Copyright (c) 2021 Andrew Raffensperger + * + * 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 is a near carbon-copy of the original source (link below) with the + * TypeScript typings added and a few tweaks to make it ES3-compatible. + * + * See: https://github.com/adraffy/ens-normalize.js + */ + +import { decode } from "@ethersproject/base64"; + +import {read_compressed_payload} from './decoder.js'; + +export function getData(): () => number { + return read_compressed_payload(decode('AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0v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39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==')); +} + diff --git a/test/node_modules/@ethersproject/hash/src.ts/ens-normalize/lib.ts b/test/node_modules/@ethersproject/hash/src.ts/ens-normalize/lib.ts new file mode 100644 index 0000000..a2007bc --- /dev/null +++ b/test/node_modules/@ethersproject/hash/src.ts/ens-normalize/lib.ts @@ -0,0 +1,140 @@ +/** + * MIT License + * + * Copyright (c) 2021 Andrew Raffensperger + * + * 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 is a near carbon-copy of the original source (link below) with the + * TypeScript typings added and a few tweaks to make it ES3-compatible. + * + * See: https://github.com/adraffy/ens-normalize.js + */ + +import { toUtf8CodePoints } from "@ethersproject/strings"; + +import { getData } from './include.js'; +const r = getData(); + +import {read_member_array, read_mapped_map, read_emoji_trie} from './decoder.js'; + +// @TODO: This should be lazily loaded + +const VALID = new Set(read_member_array(r)); +const IGNORED = new Set(read_member_array(r)); +const MAPPED = read_mapped_map(r); +const EMOJI_ROOT = read_emoji_trie(r); +//const NFC_CHECK = new Set(read_member_array(r, Array.from(VALID.values()).sort((a, b) => a - b))); + +//const STOP = 0x2E; +const HYPHEN = 0x2D; +const UNDERSCORE = 0x5F; + +function explode_cp(name: string): Array { + return toUtf8CodePoints(name); +} + +function filter_fe0f(cps: Array): Array { + return cps.filter(cp => cp != 0xFE0F); +} + +export function ens_normalize_post_check(name: string): string { + for (let label of name.split('.')) { + let cps = explode_cp(label); + try { + for (let i = cps.lastIndexOf(UNDERSCORE) - 1; i >= 0; i--) { + if (cps[i] !== UNDERSCORE) { + throw new Error(`underscore only allowed at start`); + } + } + if (cps.length >= 4 && cps.every(cp => cp < 0x80) && cps[2] === HYPHEN && cps[3] === HYPHEN) { + throw new Error(`invalid label extension`); + } + } catch (err) { + throw new Error(`Invalid label "${label}": ${err.message}`); + } + } + return name; +} + +export function ens_normalize(name: string): string { + return ens_normalize_post_check(normalize(name, filter_fe0f)); +} + +function normalize(name: string, emoji_filter: (a: Array) => Array): string { + let input = explode_cp(name).reverse(); // flip for pop + let output = []; + while (input.length) { + let emoji = consume_emoji_reversed(input); + if (emoji) { + output.push(...emoji_filter(emoji)); + continue; + } + let cp = input.pop(); + if (VALID.has(cp)) { + output.push(cp); + continue; + } + if (IGNORED.has(cp)) { + continue; + } + let cps = MAPPED[cp]; + if (cps) { + output.push(...cps); + continue; + } + throw new Error(`Disallowed codepoint: 0x${cp.toString(16).toUpperCase()}`); + } + return ens_normalize_post_check(nfc(String.fromCodePoint(...output))); +} + +function nfc(s: string): string { + return s.normalize('NFC'); +} + +function consume_emoji_reversed(cps: Array, eaten?: Array) { + let node = EMOJI_ROOT; + let emoji; + let saved; + let stack = []; + let pos = cps.length; + if (eaten) eaten.length = 0; // clear input buffer (if needed) + while (pos) { + let cp = cps[--pos]; + node = node.branches.find(x => x.set.has(cp))?.node; + if (!node) break; + if (node.save) { // remember + saved = cp; + } else if (node.check) { // check exclusion + if (cp === saved) break; + } + stack.push(cp); + if (node.fe0f) { + stack.push(0xFE0F); + if (pos > 0 && cps[pos - 1] == 0xFE0F) pos--; // consume optional FE0F + } + if (node.valid) { // this is a valid emoji (so far) + emoji = stack.slice(); // copy stack + if (node.valid == 2) emoji.splice(1, 1); // delete FE0F at position 1 (RGI ZWJ don't follow spec!) + if (eaten) eaten.push(...cps.slice(pos).reverse()); // copy input (if needed) + cps.length = pos; // truncate + } + } + return emoji; +} diff --git a/test/node_modules/@ethersproject/hash/src.ts/id.ts b/test/node_modules/@ethersproject/hash/src.ts/id.ts new file mode 100644 index 0000000..13c71d5 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/src.ts/index.ts b/test/node_modules/@ethersproject/hash/src.ts/index.ts new file mode 100644 index 0000000..6efbd8d --- /dev/null +++ b/test/node_modules/@ethersproject/hash/src.ts/index.ts @@ -0,0 +1,24 @@ +"use strict"; + +import { id } from "./id"; +import { dnsEncode, isValidName, namehash } from "./namehash"; +import { hashMessage, messagePrefix } from "./message"; + +import { ensNormalize } from "./namehash"; + +import { TypedDataEncoder as _TypedDataEncoder } from "./typed-data"; + +export { + id, + + dnsEncode, + namehash, + isValidName, + + ensNormalize, + + messagePrefix, + hashMessage, + + _TypedDataEncoder, +} diff --git a/test/node_modules/@ethersproject/hash/src.ts/message.ts b/test/node_modules/@ethersproject/hash/src.ts/message.ts new file mode 100644 index 0000000..f5650a4 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hash/src.ts/namehash.ts b/test/node_modules/@ethersproject/hash/src.ts/namehash.ts new file mode 100644 index 0000000..5e38be5 --- /dev/null +++ b/test/node_modules/@ethersproject/hash/src.ts/namehash.ts @@ -0,0 +1,83 @@ +import { concat, hexlify } from "@ethersproject/bytes"; +import { toUtf8Bytes, toUtf8String } from "@ethersproject/strings"; +import { keccak256 } from "@ethersproject/keccak256"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + +import { ens_normalize } from "./ens-normalize/lib"; + +const Zeros = new Uint8Array(32); +Zeros.fill(0); + +function checkComponent(comp: Uint8Array): Uint8Array { + if (comp.length === 0) { throw new Error("invalid ENS name; empty component"); } + return comp; +} + +function ensNameSplit(name: string): Array { + const bytes = toUtf8Bytes(ens_normalize(name)); + const comps: Array = [ ]; + + if (name.length === 0) { return comps; } + + let last = 0; + for (let i = 0; i < bytes.length; i++) { + const d = bytes[i]; + + // A separator (i.e. "."); copy this component + if (d === 0x2e) { + comps.push(checkComponent(bytes.slice(last, i))); + last = i + 1; + } + } + + // There was a stray separator at the end of the name + if (last >= bytes.length) { throw new Error("invalid ENS name; empty component"); } + + comps.push(checkComponent(bytes.slice(last))); + return comps; +} + +export function ensNormalize(name: string): string { + return ensNameSplit(name).map((comp) => toUtf8String(comp)).join("."); +} + +export function isValidName(name: string): boolean { + try { + return (ensNameSplit(name).length !== 0); + } 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 result: string | Uint8Array = Zeros; + + const comps = ensNameSplit(name); + while (comps.length) { + result = keccak256(concat([result, keccak256(comps.pop())])); + } + + return hexlify(result); +} + +export function dnsEncode(name: string): string { + return hexlify(concat(ensNameSplit(name).map((comp) => { + // DNS does not allow components over 63 bytes in length + if (comp.length > 63) { + throw new Error("invalid DNS encoded entry; length exceeds 63 bytes"); + } + + const bytes = new Uint8Array(comp.length + 1); + bytes.set(comp, 1); + bytes[0] = bytes.length - 1; + return bytes; + + }))) + "00"; +} diff --git a/test/node_modules/@ethersproject/hash/src.ts/typed-data.ts b/test/node_modules/@ethersproject/hash/src.ts/typed-data.ts new file mode 100644 index 0000000..a1758ec --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hdnode/LICENSE.md b/test/node_modules/@ethersproject/hdnode/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hdnode/README.md b/test/node_modules/@ethersproject/hdnode/README.md new file mode 100644 index 0000000..f61ba72 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hdnode/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/hdnode/lib.esm/_version.d.ts new file mode 100644 index 0000000..1ee90ef --- /dev/null +++ b/test/node_modules/@ethersproject/hdnode/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "hdnode/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hdnode/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/hdnode/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..3fd2218 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hdnode/lib.esm/_version.js b/test/node_modules/@ethersproject/hdnode/lib.esm/_version.js new file mode 100644 index 0000000..2d873ec --- /dev/null +++ b/test/node_modules/@ethersproject/hdnode/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "hdnode/5.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hdnode/lib.esm/_version.js.map b/test/node_modules/@ethersproject/hdnode/lib.esm/_version.js.map new file mode 100644 index 0000000..056b924 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hdnode/lib.esm/index.d.ts b/test/node_modules/@ethersproject/hdnode/lib.esm/index.d.ts new file mode 100644 index 0000000..23c283b --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hdnode/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/hdnode/lib.esm/index.d.ts.map new file mode 100644 index 0000000..2224afc --- /dev/null +++ b/test/node_modules/@ethersproject/hdn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AAI,MAAM;IAIhB,OAAO,CAAC,OAAO;IA2Df,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IA6BhC,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAG,MAAM;IAS7D,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM;IAe9F,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM;IAIxC,MAAM,CAAC,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,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/test/node_modules/@ethersproject/hdnode/lib.esm/index.js b/test/node_modules/@ethersproject/hdnode/lib.esm/index.js new file mode 100644 index 0000000..5426859 --- /dev/null +++ b/test/node_modules/@ethersproject/hdnode/lib.esm/index.js @@ -0,0 +1,330 @@ +"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) { + /* 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/test/node_modules/@ethersproject/hdnode/lib.esm/index.js.map b/test/node_modules/@ethersproject/hdnode/lib.esm/index.js.map new file mode 100644 index 0000000..81ce40e --- /dev/null +++ b/test/node_modules/@ethersproject/hdnode/lib.esm/index.js.map @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AC7C,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,CAAC,KAAK,EAAE,EAAE,CAAY,QAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACtF,CAAC;AAED,MAAM,UAAU,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;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/test/node_modules/@ethersproject/hdnode/lib/_version.d.ts b/test/node_modules/@ethersproject/hdnode/lib/_version.d.ts new file mode 100644 index 0000000..1ee90ef --- /dev/null +++ b/test/node_modules/@ethersproject/hdnode/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "hdnode/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hdnode/lib/_version.d.ts.map b/test/node_modules/@ethersproject/hdnode/lib/_version.d.ts.map new file mode 100644 index 0000000..3fd2218 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hdnode/lib/_version.js b/test/node_modules/@ethersproject/hdnode/lib/_version.js new file mode 100644 index 0000000..1b459b6 --- /dev/null +++ b/test/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.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hdnode/lib/_version.js.map b/test/node_modules/@ethersproject/hdnode/lib/_version.js.map new file mode 100644 index 0000000..e2300dc --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hdnode/lib/index.d.ts b/test/node_modules/@ethersproject/hdnode/lib/index.d.ts new file mode 100644 index 0000000..23c283b --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/hdnode/lib/index.d.ts.map b/test/node_modules/@ethersproject/hdnode/lib/index.d.ts.map new file mode 100644 index 0000000..2224afc --- /dev/null +++ b/test/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,WAA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AAE,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/test/node_modules/@ethersproject/hdnode/lib/index.js b/test/node_modules/@ethersproject/hdnode/lib/index.js new file mode 100644 index 0000000..39f4312 --- /dev/null +++ b/test/node_modules/@ethersproject/hdnode/lib/index.js @@ -0,0 +1,343 @@ +"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) { + /* 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/test/node_modules/@ethersproject/hdnode/lib/index.js.map b/test/node_modules/@ethersproject/hdnode/lib/index.js.map new file mode 100644 index 0000000..109259b --- /dev/null +++ b/test/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,O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;AALD,wCAKC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/hdnode/package.json b/test/node_modules/@ethersproject/hdnode/package.json new file mode 100644 index 0000000..6659e96 --- /dev/null +++ b/test/node_modules/@ethersproject/hdnode/package.json @@ -0,0 +1,53 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/basex": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/pbkdf2": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/sha2": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0", + "@ethersproject/strings": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/wordlists": "^5.7.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": "ec1b9583039a14a0e0fa15d0a2a6082a2f41cf5b", + "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": "0xca4bad80837378d07524f450188a449b1a6578b8bbc733dea50146488c8143e0", + "types": "./lib/index.d.ts", + "version": "5.7.0" +} diff --git a/test/node_modules/@ethersproject/hdnode/src.ts/_version.ts b/test/node_modules/@ethersproject/hdnode/src.ts/_version.ts new file mode 100644 index 0000000..80df2c0 --- /dev/null +++ b/test/node_modules/@ethersproject/hdnode/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "hdnode/5.7.0"; diff --git a/test/node_modules/@ethersproject/hdnode/src.ts/index.ts b/test/node_modules/@ethersproject/hdnode/src.ts/index.ts new file mode 100644 index 0000000..194a70f --- /dev/null +++ b/test/node_modules/@ethersproject/hdnode/src.ts/index.ts @@ -0,0 +1,410 @@ +"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) { + /* 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/test/node_modules/@ethersproject/json-wallets/LICENSE.md b/test/node_modules/@ethersproject/json-wallets/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/README.md b/test/node_modules/@ethersproject/json-wallets/README.md new file mode 100644 index 0000000..f460484 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/json-wallets/lib.esm/_version.d.ts new file mode 100644 index 0000000..66eaf8b --- /dev/null +++ b/test/node_modules/@ethersproject/json-wallets/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "json-wallets/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/json-wallets/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/json-wallets/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..84552f7 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib.esm/_version.js b/test/node_modules/@ethersproject/json-wallets/lib.esm/_version.js new file mode 100644 index 0000000..1d3eed6 --- /dev/null +++ b/test/node_modules/@ethersproject/json-wallets/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "json-wallets/5.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/json-wallets/lib.esm/_version.js.map b/test/node_modules/@ethersproject/json-wallets/lib.esm/_version.js.map new file mode 100644 index 0000000..a4db61b --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib.esm/crowdsale.d.ts b/test/node_modules/@ethersproject/json-wallets/lib.esm/crowdsale.d.ts new file mode 100644 index 0000000..35615f9 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib.esm/crowdsale.d.ts.map b/test/node_modules/@ethersproject/json-wallets/lib.esm/crowdsale.d.ts.map new file mode 100644 index 0000000..a55220a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib.esm/crowdsale.js b/test/node_modules/@ethersproject/json-wallets/lib.esm/crowdsale.js new file mode 100644 index 0000000..97b0639 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib.esm/crowdsale.js.map b/test/node_modules/@ethersproject/json-wallets/lib.esm/crowdsale.js.map new file mode 100644 index 0000000..3d23ec7 --- /dev/null +++ b/test/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,sBAAsB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,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,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AASjE,MAAM,OAAO,gBAAiB,SAAQ,WAA8B;IAQhE,kBAAkB,CAAC,KAAU;QACzB,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;IAClD,CAAC;CACJ;AAED,iDAAiD;AACjD,MAAM,UAAU,OAAO,CAAC,IAAY,EAAE,QAAwB;IAC1D,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAE9B,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IAEjC,mBAAmB;IACnB,MAAM,OAAO,GAAG,UAAU,CAAC,UAAU,CAAC,I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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/test/node_modules/@ethersproject/json-wallets/lib.esm/index.d.ts b/test/node_modules/@ethersproject/json-wallets/lib.esm/index.d.ts new file mode 100644 index 0000000..7510048 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/json-wallets/lib.esm/index.d.ts.map new file mode 100644 index 0000000..f5ea80a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib.esm/index.js b/test/node_modules/@ethersproject/json-wallets/lib.esm/index.js new file mode 100644 index 0000000..b575b3a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib.esm/index.js.map b/test/node_modules/@ethersproject/json-wallets/lib.esm/index.js.map new file mode 100644 index 0000000..8e1f3b7 --- /dev/null +++ b/test/node_modules/@ethersproject/json-wallets/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,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,EAAoC,MAAM,YAAY,CAAC;AAE1J,SAAS,iBAAiB,CAAC,IAAY,EAAE,QAAwB,EAAE,gBAAmC;IAClG,IAAI,iBAAiB,CAAC,IAAI,CAAC,EAAE;QACzB,IAAI,gBAAgB,EAAE;YAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;SAAE;QAC9C,MAAM,OAAO,GAAG,gBAAgB,CAAC,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,gBAAgB,CAAC,IAAI,CAAC,EAAE;QACxB,OAAO,eAAe,CAAC,IAAI,EAAE,QAAQ,EAAE,gBAAgB,CAAC,CAAC;KAC5D;IAED,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC;AAC5D,CAAC;AAED,SAAS,qBAAqB,CAAC,IAAY,EAAE,QAAwB;IACjE,IAAI,iBAAiB,CAAC,IAAI,CAAC,EAAE;QACzB,OAAO,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;KAC1C;IAED,IAAI,gBAAgB,CAAC,IAAI,CAAC,EAAE;QACxB,OAAO,mBAAmB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;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/test/node_modules/@ethersproject/json-wallets/lib.esm/inspect.d.ts b/test/node_modules/@ethersproject/json-wallets/lib.esm/inspect.d.ts new file mode 100644 index 0000000..197ac18 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib.esm/inspect.d.ts.map b/test/node_modules/@ethersproject/json-wallets/lib.esm/inspect.d.ts.map new file mode 100644 index 0000000..ca15e91 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib.esm/inspect.js b/test/node_modules/@ethersproject/json-wallets/lib.esm/inspect.js new file mode 100644 index 0000000..cbdfd67 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib.esm/inspect.js.map b/test/node_modules/@ethersproject/json-wallets/lib.esm/inspect.js.map new file mode 100644 index 0000000..8346a38 --- /dev/null +++ b/test/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,CA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AC;SAAE;KACnC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/json-wallets/lib.esm/keystore.d.ts b/test/node_modules/@ethersproject/json-wallets/lib.esm/keystore.d.ts new file mode 100644 index 0000000..33cddcb --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib.esm/keystore.d.ts.map b/test/node_modules/@ethersproject/json-wallets/lib.esm/keystore.d.ts.map new file mode 100644 index 0000000..08e992d --- /dev/null +++ b/test/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,sBAA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AAO,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/test/node_modules/@ethersproject/json-wallets/lib.esm/keystore.js b/test/node_modules/@ethersproject/json-wallets/lib.esm/keystore.js new file mode 100644 index 0000000..c0eee41 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib.esm/keystore.js.map b/test/node_modules/@ethersproject/json-wallets/lib.esm/keystore.js.map new file mode 100644 index 0000000..93b3171 --- /dev/null +++ b/test/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,O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CAAC,EAAE,CAAC,CAAC,GAAG,GAAG;gBACpC,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,GAAG,GAAG;gBAC/B,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,GAAG,GAAG;gBAChC,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC,GAAG,GAAG;gBAClC,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC,GAAG,KAAK,CACpC,CAAC;YACpB,IAAI,CAAC,UAAU,CAAC,GAAG;gBACf,MAAM,EAAE,MAAM;gBACd,YAAY,EAAE,CAAC,OAAO,GAAG,SAAS,GAAG,IAAI,GAAG,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/test/node_modules/@ethersproject/json-wallets/lib.esm/utils.d.ts b/test/node_modules/@ethersproject/json-wallets/lib.esm/utils.d.ts new file mode 100644 index 0000000..2feb728 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib.esm/utils.d.ts.map b/test/node_modules/@ethersproject/json-wallets/lib.esm/utils.d.ts.map new file mode 100644 index 0000000..02a6c93 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib.esm/utils.js b/test/node_modules/@ethersproject/json-wallets/lib.esm/utils.js new file mode 100644 index 0000000..97b4711 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib.esm/utils.js.map b/test/node_modules/@ethersproject/json-wallets/lib.esm/utils.js.map new file mode 100644 index 0000000..841f743 --- /dev/null +++ b/test/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,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,MAAM,KAAK,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;IAEpC,kBAAkB;IAClB,wCAAwC;IACxC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;IAEpC,cAAc;IACd,uCAAuC;IACvC,uCAAuC;IACvC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;IAEpC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAE7B,OAAO;QACJ,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC;QACtB,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;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/test/node_modules/@ethersproject/json-wallets/lib/_version.d.ts b/test/node_modules/@ethersproject/json-wallets/lib/_version.d.ts new file mode 100644 index 0000000..66eaf8b --- /dev/null +++ b/test/node_modules/@ethersproject/json-wallets/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "json-wallets/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/json-wallets/lib/_version.d.ts.map b/test/node_modules/@ethersproject/json-wallets/lib/_version.d.ts.map new file mode 100644 index 0000000..84552f7 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib/_version.js b/test/node_modules/@ethersproject/json-wallets/lib/_version.js new file mode 100644 index 0000000..79ca2f7 --- /dev/null +++ b/test/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.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/json-wallets/lib/_version.js.map b/test/node_modules/@ethersproject/json-wallets/lib/_version.js.map new file mode 100644 index 0000000..cb386e2 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib/crowdsale.d.ts b/test/node_modules/@ethersproject/json-wallets/lib/crowdsale.d.ts new file mode 100644 index 0000000..35615f9 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib/crowdsale.d.ts.map b/test/node_modules/@ethersproject/json-wallets/lib/crowdsale.d.ts.map new file mode 100644 index 0000000..a55220a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib/crowdsale.js b/test/node_modules/@ethersproject/json-wallets/lib/crowdsale.js new file mode 100644 index 0000000..40c730b --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib/crowdsale.js.map b/test/node_modules/@ethersproject/json-wallets/lib/crowdsale.js.map new file mode 100644 index 0000000..1d8a1c6 --- /dev/null +++ b/test/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,4C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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/test/node_modules/@ethersproject/json-wallets/lib/index.d.ts b/test/node_modules/@ethersproject/json-wallets/lib/index.d.ts new file mode 100644 index 0000000..7510048 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib/index.d.ts.map b/test/node_modules/@ethersproject/json-wallets/lib/index.d.ts.map new file mode 100644 index 0000000..f5ea80a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib/index.js b/test/node_modules/@ethersproject/json-wallets/lib/index.js new file mode 100644 index 0000000..040f715 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib/index.js.map b/test/node_modules/@ethersproject/json-wallets/lib/index.js.map new file mode 100644 index 0000000..08f116e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib/inspect.d.ts b/test/node_modules/@ethersproject/json-wallets/lib/inspect.d.ts new file mode 100644 index 0000000..197ac18 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib/inspect.d.ts.map b/test/node_modules/@ethersproject/json-wallets/lib/inspect.d.ts.map new file mode 100644 index 0000000..ca15e91 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib/inspect.js b/test/node_modules/@ethersproject/json-wallets/lib/inspect.js new file mode 100644 index 0000000..74b9ebc --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib/inspect.js.map b/test/node_modules/@ethersproject/json-wallets/lib/inspect.js.map new file mode 100644 index 0000000..5d384b8 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib/keystore.d.ts b/test/node_modules/@ethersproject/json-wallets/lib/keystore.d.ts new file mode 100644 index 0000000..33cddcb --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib/keystore.d.ts.map b/test/node_modules/@ethersproject/json-wallets/lib/keystore.d.ts.map new file mode 100644 index 0000000..08e992d --- /dev/null +++ b/test/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,E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C,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAsJjK"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/json-wallets/lib/keystore.js b/test/node_modules/@ethersproject/json-wallets/lib/keystore.js new file mode 100644 index 0000000..e981cf3 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib/keystore.js.map b/test/node_modules/@ethersproject/json-wallets/lib/keystore.js.map new file mode 100644 index 0000000..c65c95c --- /dev/null +++ b/test/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;AAE/E,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,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;IAAqC,mCAA6B;IAAlE;;IAUA,CAAC;IAHG,2CAAiB,GAAjB,UAAkB,KAAU;QACxB,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACjD,CAAC;IACL,sBAAC;AAAD,CAAC,AAVD,CAAqC,wBAAW,GAU/C;AAVY,0CAAe;AA2B5B,SAAS,QAAQ,CAAC,IAAS,EAAE,GAAe,EAAE,UAAsB;IAChE,IAAM,MAAM,GAAG,IAAA,kBAAU,EAAC,IA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EAAE,CAAC,CAAC,GAAG,GAAG;gBAClC,IAAA,YAAI,EAAC,GAAG,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC,GAAG,KAAK,CACpC,CAAC;YACpB,IAAI,CAAC,UAAU,CAAC,GAAG;gBACf,MAAM,EAAE,MAAM;gBACd,YAAY,EAAE,CAAC,OAAO,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC;gBACzD,eAAe,EAAE,IAAA,eAAO,EAAC,UAAU,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;gBACjD,kBAAkB,EAAE,IAAA,eAAO,EAAC,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;AAtJD,0BAsJC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/json-wallets/lib/utils.d.ts b/test/node_modules/@ethersproject/json-wallets/lib/utils.d.ts new file mode 100644 index 0000000..2feb728 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib/utils.d.ts.map b/test/node_modules/@ethersproject/json-wallets/lib/utils.d.ts.map new file mode 100644 index 0000000..02a6c93 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib/utils.js b/test/node_modules/@ethersproject/json-wallets/lib/utils.js new file mode 100644 index 0000000..e931eae --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/lib/utils.js.map b/test/node_modules/@ethersproject/json-wallets/lib/utils.js.map new file mode 100644 index 0000000..ddd1193 --- /dev/null +++ b/test/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,GAA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IAClB,wCAAwC;IACxC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;IAEpC,cAAc;IACd,uCAAuC;IACvC,uCAAuC;IACvC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;IAEpC,IAAM,KAAK,GAAG,IAAA,eAAO,EAAC,KAAK,CAAC,CAAC;IAE7B,OAAO;QACJ,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC;QACtB,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;QACvB,KAAK,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC;KACzB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAChB,CAAC;AArBD,wBAqBC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/json-wallets/package.json b/test/node_modules/@ethersproject/json-wallets/package.json new file mode 100644 index 0000000..6877c89 --- /dev/null +++ b/test/node_modules/@ethersproject/json-wallets/package.json @@ -0,0 +1,54 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/hdnode": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/pbkdf2": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/random": "^5.7.0", + "@ethersproject/strings": "^5.7.0", + "@ethersproject/transactions": "^5.7.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": "ec1b9583039a14a0e0fa15d0a2a6082a2f41cf5b", + "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": "0x5fdee49e317ed39fd61f164ae5ee21dce0011a86a12f6eb6f58618fa2b2a3a5e", + "types": "./lib/index.d.ts", + "version": "5.7.0" +} diff --git a/test/node_modules/@ethersproject/json-wallets/src.ts/_version.ts b/test/node_modules/@ethersproject/json-wallets/src.ts/_version.ts new file mode 100644 index 0000000..318977c --- /dev/null +++ b/test/node_modules/@ethersproject/json-wallets/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "json-wallets/5.7.0"; diff --git a/test/node_modules/@ethersproject/json-wallets/src.ts/crowdsale.ts b/test/node_modules/@ethersproject/json-wallets/src.ts/crowdsale.ts new file mode 100644 index 0000000..0b4e6f2 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/src.ts/index.ts b/test/node_modules/@ethersproject/json-wallets/src.ts/index.ts new file mode 100644 index 0000000..37e2ad3 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/src.ts/inspect.ts b/test/node_modules/@ethersproject/json-wallets/src.ts/inspect.ts new file mode 100644 index 0000000..eac413a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/src.ts/keystore.ts b/test/node_modules/@ethersproject/json-wallets/src.ts/keystore.ts new file mode 100644 index 0000000..938cb82 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/src.ts/utils.ts b/test/node_modules/@ethersproject/json-wallets/src.ts/utils.ts new file mode 100644 index 0000000..2140503 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/json-wallets/thirdparty.d.ts b/test/node_modules/@ethersproject/json-wallets/thirdparty.d.ts new file mode 100644 index 0000000..a50468d --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/keccak256/LICENSE.md b/test/node_modules/@ethersproject/keccak256/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/keccak256/README.md b/test/node_modules/@ethersproject/keccak256/README.md new file mode 100644 index 0000000..bc9da64 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/keccak256/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/keccak256/lib.esm/_version.d.ts new file mode 100644 index 0000000..38af90f --- /dev/null +++ b/test/node_modules/@ethersproject/keccak256/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "keccak256/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/keccak256/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/keccak256/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..7e6271e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/keccak256/lib.esm/_version.js b/test/node_modules/@ethersproject/keccak256/lib.esm/_version.js new file mode 100644 index 0000000..e5a2066 --- /dev/null +++ b/test/node_modules/@ethersproject/keccak256/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "keccak256/5.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/keccak256/lib.esm/_version.js.map b/test/node_modules/@ethersproject/keccak256/lib.esm/_version.js.map new file mode 100644 index 0000000..3f20aac --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/keccak256/lib.esm/index.d.ts b/test/node_modules/@ethersproject/keccak256/lib.esm/index.d.ts new file mode 100644 index 0000000..0274dde --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/keccak256/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/keccak256/lib.esm/index.d.ts.map new file mode 100644 index 0000000..12db101 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/keccak256/lib.esm/index.js b/test/node_modules/@ethersproject/keccak256/lib.esm/index.js new file mode 100644 index 0000000..760d8bb --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/keccak256/lib.esm/index.js.map b/test/node_modules/@ethersproject/keccak256/lib.esm/index.js.map new file mode 100644 index 0000000..336db67 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/keccak256/lib/_version.d.ts b/test/node_modules/@ethersproject/keccak256/lib/_version.d.ts new file mode 100644 index 0000000..38af90f --- /dev/null +++ b/test/node_modules/@ethersproject/keccak256/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "keccak256/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/keccak256/lib/_version.d.ts.map b/test/node_modules/@ethersproject/keccak256/lib/_version.d.ts.map new file mode 100644 index 0000000..7e6271e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/keccak256/lib/_version.js b/test/node_modules/@ethersproject/keccak256/lib/_version.js new file mode 100644 index 0000000..d269e1a --- /dev/null +++ b/test/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.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/keccak256/lib/_version.js.map b/test/node_modules/@ethersproject/keccak256/lib/_version.js.map new file mode 100644 index 0000000..438871e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/keccak256/lib/index.d.ts b/test/node_modules/@ethersproject/keccak256/lib/index.d.ts new file mode 100644 index 0000000..0274dde --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/keccak256/lib/index.d.ts.map b/test/node_modules/@ethersproject/keccak256/lib/index.d.ts.map new file mode 100644 index 0000000..12db101 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/keccak256/lib/index.js b/test/node_modules/@ethersproject/keccak256/lib/index.js new file mode 100644 index 0000000..c08f2ed --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/keccak256/lib/index.js.map b/test/node_modules/@ethersproject/keccak256/lib/index.js.map new file mode 100644 index 0000000..eb93cf2 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/keccak256/package.json b/test/node_modules/@ethersproject/keccak256/package.json new file mode 100644 index 0000000..3cdd5f5 --- /dev/null +++ b/test/node_modules/@ethersproject/keccak256/package.json @@ -0,0 +1,43 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/bytes": "^5.7.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": "ec1b9583039a14a0e0fa15d0a2a6082a2f41cf5b", + "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": "0x37a7d1dd604198317d0d61c892bbdcff7f8c88420f5e6f5dd9c73c2dc0de026a", + "types": "./lib/index.d.ts", + "version": "5.7.0" +} diff --git a/test/node_modules/@ethersproject/keccak256/src.ts/_version.ts b/test/node_modules/@ethersproject/keccak256/src.ts/_version.ts new file mode 100644 index 0000000..d369f62 --- /dev/null +++ b/test/node_modules/@ethersproject/keccak256/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "keccak256/5.7.0"; diff --git a/test/node_modules/@ethersproject/keccak256/src.ts/index.ts b/test/node_modules/@ethersproject/keccak256/src.ts/index.ts new file mode 100644 index 0000000..f3e979a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/logger/README.md b/test/node_modules/@ethersproject/logger/README.md new file mode 100644 index 0000000..114b2fd --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/logger/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/logger/lib.esm/_version.d.ts new file mode 100644 index 0000000..a369f4e --- /dev/null +++ b/test/node_modules/@ethersproject/logger/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "logger/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/logger/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/logger/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..3fd2218 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/logger/lib.esm/_version.js b/test/node_modules/@ethersproject/logger/lib.esm/_version.js new file mode 100644 index 0000000..ba60af0 --- /dev/null +++ b/test/node_modules/@ethersproject/logger/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "logger/5.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/logger/lib.esm/_version.js.map b/test/node_modules/@ethersproject/logger/lib.esm/_version.js.map new file mode 100644 index 0000000..056b924 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/logger/lib.esm/index.d.ts b/test/node_modules/@ethersproject/logger/lib.esm/index.d.ts new file mode 100644 index 0000000..328efa4 --- /dev/null +++ b/test/node_modules/@ethersproject/logger/lib.esm/index.d.ts @@ -0,0 +1,53 @@ +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", + ACTION_REJECTED = "ACTION_REJECTED" +} +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/test/node_modules/@ethersproject/logger/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/logger/lib.esm/index.d.ts.map new file mode 100644 index 0000000..6cf9df1 --- /dev/null +++ b/test/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,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,wBA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AAO,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/test/node_modules/@ethersproject/logger/lib.esm/index.js b/test/node_modules/@ethersproject/logger/lib.esm/index.js new file mode 100644 index 0000000..d5230cd --- /dev/null +++ b/test/node_modules/@ethersproject/logger/lib.esm/index.js @@ -0,0 +1,355 @@ +"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"; + /////////////////// + // Interaction Errors + // The user rejected the action, such as signing a message or sending + // a transaction + ErrorCode["ACTION_REJECTED"] = "ACTION_REJECTED"; +})(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; + let url = ""; + switch (code) { + case ErrorCode.NUMERIC_FAULT: { + url = "NUMERIC_FAULT"; + const fault = message; + switch (fault) { + case "overflow": + case "underflow": + case "division-by-zero": + url += "-" + fault; + break; + case "negative-power": + case "negative-width": + url += "-unsupported"; + break; + case "unbound-bitwise-result": + url += "-unbound-result"; + break; + } + break; + } + case ErrorCode.CALL_EXCEPTION: + case ErrorCode.INSUFFICIENT_FUNDS: + case ErrorCode.MISSING_NEW: + case ErrorCode.NONCE_EXPIRED: + case ErrorCode.REPLACEMENT_UNDERPRICED: + case ErrorCode.TRANSACTION_REPLACED: + case ErrorCode.UNPREDICTABLE_GAS_LIMIT: + url = code; + break; + } + if (url) { + message += " [ See: https:/\/links.ethers.org/v5-errors-" + url + " ]"; + } + 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/test/node_modules/@ethersproject/logger/lib.esm/index.js.map b/test/node_modules/@ethersproject/logger/lib.esm/index.js.map new file mode 100644 index 0000000..c5706a6 --- /dev/null +++ b/test/node_modules/@ethersproject/logger/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,IAAI,sBAAsB,GAAG,KAAK,CAAC;AACnC,IAAI,aAAa,GAAG,KAAK,CAAC;AAE1B,MAAM,SAAS,GAAiC,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;AAClH,IAAI,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,IAAI,aAAa,GAAW,IAAI,CAAC;AAEjC,SAAS,eAAe;IACpB,IAAI;QACA,MAAM,OAAO,GAAkB,EAAG,CAAC;QAEnC,qDAAqD;QACrD,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YAC5C,IAAI;gBACA,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,MAAM,EAAE;oBACnC,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;iBACpC;gBAAA,CAAC;aACL;YAAC,OAAM,KAAK,EAAE;gBACX,OAAO,CAAC,IAAI,CAAC,IAAI,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AAI,CAAC,sBAAsB,GAAG,QAAQ,CAAC,CAAC;YAC9D,OAAO;SACV;QACD,SAAS,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,OAAe;QACvB,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;;AAlPM,aAAM,GAAG,SAAS,CAAC;AAEnB,aAAM,GAAG,QAAQ,CAAC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/logger/lib/_version.d.ts b/test/node_modules/@ethersproject/logger/lib/_version.d.ts new file mode 100644 index 0000000..a369f4e --- /dev/null +++ b/test/node_modules/@ethersproject/logger/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "logger/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/logger/lib/_version.d.ts.map b/test/node_modules/@ethersproject/logger/lib/_version.d.ts.map new file mode 100644 index 0000000..3fd2218 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/logger/lib/_version.js b/test/node_modules/@ethersproject/logger/lib/_version.js new file mode 100644 index 0000000..0d84896 --- /dev/null +++ b/test/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.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/logger/lib/_version.js.map b/test/node_modules/@ethersproject/logger/lib/_version.js.map new file mode 100644 index 0000000..e2300dc --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/logger/lib/index.d.ts b/test/node_modules/@ethersproject/logger/lib/index.d.ts new file mode 100644 index 0000000..328efa4 --- /dev/null +++ b/test/node_modules/@ethersproject/logger/lib/index.d.ts @@ -0,0 +1,53 @@ +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", + ACTION_REJECTED = "ACTION_REJECTED" +} +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/test/node_modules/@ethersproject/logger/lib/index.d.ts.map b/test/node_modules/@ethersproject/logger/lib/index.d.ts.map new file mode 100644 index 0000000..6cf9df1 --- /dev/null +++ b/test/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;IAQ7C,eAAe,oBAAoB;CACtC;AAID,qBAAa,MAAM;IACf,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,MAAM,CAAC,MAAM,mBAAa;IAE1B,MAAM,CAAC,MAAM,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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/test/node_modules/@ethersproject/logger/lib/index.js b/test/node_modules/@ethersproject/logger/lib/index.js new file mode 100644 index 0000000..8aec8a5 --- /dev/null +++ b/test/node_modules/@ethersproject/logger/lib/index.js @@ -0,0 +1,371 @@ +"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"; + /////////////////// + // Interaction Errors + // The user rejected the action, such as signing a message or sending + // a transaction + ErrorCode["ACTION_REJECTED"] = "ACTION_REJECTED"; +})(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; + var url = ""; + switch (code) { + case ErrorCode.NUMERIC_FAULT: { + url = "NUMERIC_FAULT"; + var fault = message; + switch (fault) { + case "overflow": + case "underflow": + case "division-by-zero": + url += "-" + fault; + break; + case "negative-power": + case "negative-width": + url += "-unsupported"; + break; + case "unbound-bitwise-result": + url += "-unbound-result"; + break; + } + break; + } + case ErrorCode.CALL_EXCEPTION: + case ErrorCode.INSUFFICIENT_FUNDS: + case ErrorCode.MISSING_NEW: + case ErrorCode.NONCE_EXPIRED: + case ErrorCode.REPLACEMENT_UNDERPRICED: + case ErrorCode.TRANSACTION_REPLACED: + case ErrorCode.UNPREDICTABLE_GAS_LIMIT: + url = code; + break; + } + if (url) { + message += " [ See: https:/\/links.ethers.org/v5-errors-" + url + " ]"; + } + 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/test/node_modules/@ethersproject/logger/lib/index.js.map b/test/node_modules/@ethersproject/logger/lib/index.js.map new file mode 100644 index 0000000..6046a84 --- /dev/null +++ b/test/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,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;AAClH,IAAI,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC;AAErC,uCAAqC;AAErC,IAAI,aAAa,GAAW,IAAI,CAAC;AAEjC,SAAS,eAAe;IACpB,IAAI;QACA,IAAM,SAAO,GAAkB,EAAG,CAAC;QAEnC,qDAAqD;QACrD,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,UAAC,IAAI;YACxC,IAAI;gBACA,IAAI,MAAM,CAAC,SAAS,CAA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,CAAC,UAAU,CAAC,4BAA4B,EAAE,MAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE;gBAC9F,SAAS,EAAE,eAAe;aAC7B,CAAC,CAAC;SACN;QAED,aAAa,GAAG,CAAC,CAAC,UAAU,CAAC;QAC7B,sBAAsB,GAAG,CAAC,CAAC,SAAS,CAAC;IACzC,CAAC;IAEM,kBAAW,GAAlB,UAAmB,QAAkB;QACjC,IAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;QAChD,IAAI,KAAK,IAAI,IAAI,EAAE;YACf,MAAM,CAAC,YAAY,EAAE,CAAC,IAAI,CAAC,sBAAsB,GAAG,QAAQ,CAAC,CAAC;YAC9D,OAAO;SACV;QACD,SAAS,GAAG,KAAK,CAAC;IACtB,CAAC;IAEM,WAAI,GAAX,UAAY,OAAe;QACvB,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;IAlPM,aAAM,GAAG,SAAS,CAAC;IAEnB,aAAM,GAAG,QAAQ,CAAC;IAiP7B,aAAC;CAAA,AAtPD,IAsPC;AAtPY,wBAAM"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/logger/package.json b/test/node_modules/@ethersproject/logger/package.json new file mode 100644 index 0000000..2da6062 --- /dev/null +++ b/test/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": "ec1b9583039a14a0e0fa15d0a2a6082a2f41cf5b", + "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": "0x0e4fe629df0eded870b7750df05006454d92ebaa1c57279e846f5c41c131b816", + "types": "./lib/index.d.ts", + "version": "5.7.0" +} diff --git a/test/node_modules/@ethersproject/logger/src.ts/_version.ts b/test/node_modules/@ethersproject/logger/src.ts/_version.ts new file mode 100644 index 0000000..3af295d --- /dev/null +++ b/test/node_modules/@ethersproject/logger/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "logger/5.7.0"; diff --git a/test/node_modules/@ethersproject/logger/src.ts/index.ts b/test/node_modules/@ethersproject/logger/src.ts/index.ts new file mode 100644 index 0000000..7a1d0c3 --- /dev/null +++ b/test/node_modules/@ethersproject/logger/src.ts/index.ts @@ -0,0 +1,407 @@ +"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", + + + /////////////////// + // Interaction Errors + + // The user rejected the action, such as signing a message or sending + // a transaction + ACTION_REJECTED = "ACTION_REJECTED", +}; + +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; + + let url = ""; + + switch (code) { + case ErrorCode.NUMERIC_FAULT: { + url = "NUMERIC_FAULT"; + const fault = message; + + switch (fault) { + case "overflow": case "underflow": case "division-by-zero": + url += "-" + fault; + break; + case "negative-power": case "negative-width": + url += "-unsupported"; + break; + case "unbound-bitwise-result": + url += "-unbound-result"; + break; + } + break; + } + case ErrorCode.CALL_EXCEPTION: + case ErrorCode.INSUFFICIENT_FUNDS: + case ErrorCode.MISSING_NEW: + case ErrorCode.NONCE_EXPIRED: + case ErrorCode.REPLACEMENT_UNDERPRICED: + case ErrorCode.TRANSACTION_REPLACED: + case ErrorCode.UNPREDICTABLE_GAS_LIMIT: + url = code; + break; + } + + if (url) { + message += " [ See: https:/\/links.ethers.org/v5-errors-" + url + " ]"; + } + + 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/test/node_modules/@ethersproject/networks/LICENSE.md b/test/node_modules/@ethersproject/networks/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/networks/README.md b/test/node_modules/@ethersproject/networks/README.md new file mode 100644 index 0000000..1b93a51 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/networks/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/networks/lib.esm/_version.d.ts new file mode 100644 index 0000000..6c810d6 --- /dev/null +++ b/test/node_modules/@ethersproject/networks/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "networks/5.7.1"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/networks/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/networks/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..7ec6ea1 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/networks/lib.esm/_version.js b/test/node_modules/@ethersproject/networks/lib.esm/_version.js new file mode 100644 index 0000000..051e600 --- /dev/null +++ b/test/node_modules/@ethersproject/networks/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "networks/5.7.1"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/networks/lib.esm/_version.js.map b/test/node_modules/@ethersproject/networks/lib.esm/_version.js.map new file mode 100644 index 0000000..5e52401 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/networks/lib.esm/index.d.ts b/test/node_modules/@ethersproject/networks/lib.esm/index.d.ts new file mode 100644 index 0000000..8dde38b --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/networks/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/networks/lib.esm/index.d.ts.map new file mode 100644 index 0000000..4ae55b3 --- /dev/null +++ b/test/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;AA+MF;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAmEvD"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/networks/lib.esm/index.js b/test/node_modules/@ethersproject/networks/lib.esm/index.js new file mode 100644 index 0000000..5c232b8 --- /dev/null +++ b/test/node_modules/@ethersproject/networks/lib.esm/index.js @@ -0,0 +1,248 @@ +"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 && options.infura !== "-") { + try { + providerList.push(new providers.InfuraProvider(network, options.infura)); + } + catch (error) { } + } + if (providers.EtherscanProvider && options.etherscan !== "-") { + try { + providerList.push(new providers.EtherscanProvider(network, options.etherscan)); + } + catch (error) { } + } + if (providers.AlchemyProvider && options.alchemy !== "-") { + try { + providerList.push(new providers.AlchemyProvider(network, options.alchemy)); + } + catch (error) { } + } + if (providers.PocketProvider && options.pocket !== "-") { + // 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", "sepolia"]; + try { + const provider = new providers.PocketProvider(network, options.pocket); + if (provider.network && skip.indexOf(provider.network.name) === -1) { + providerList.push(provider); + } + } + catch (error) { } + } + if (providers.CloudflareProvider && options.cloudflare !== "-") { + try { + providerList.push(new providers.CloudflareProvider(network)); + } + catch (error) { } + } + if (providers.AnkrProvider && options.ankr !== "-") { + try { + const skip = ["ropsten"]; + const provider = new providers.AnkrProvider(network, options.ankr); + if (provider.network && skip.indexOf(provider.network.name) === -1) { + providerList.push(provider); + } + } + 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") + }, + kintsugi: { chainId: 1337702, name: "kintsugi" }, + sepolia: { + chainId: 11155111, + name: "sepolia", + _defaultProvider: ethDefaultProvider("sepolia") + }, + // 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", + _defaultProvider: ethDefaultProvider("matic") + }, + maticmum: { chainId: 80001, name: "maticmum" }, + optimism: { + chainId: 10, + name: "optimism", + _defaultProvider: ethDefaultProvider("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" }, + "arbitrum-goerli": { chainId: 421613, name: "arbitrum-goerli" }, + 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/test/node_modules/@ethersproject/networks/lib.esm/index.js.map b/test/node_modules/@ethersproject/networks/lib.esm/index.js.map new file mode 100644 index 0000000..b0e773d --- /dev/null +++ b/test/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,CA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BAAgB,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"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/networks/lib.esm/types.d.ts b/test/node_modules/@ethersproject/networks/lib.esm/types.d.ts new file mode 100644 index 0000000..417982f --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/networks/lib.esm/types.d.ts.map b/test/node_modules/@ethersproject/networks/lib.esm/types.d.ts.map new file mode 100644 index 0000000..ec8bc09 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/networks/lib.esm/types.js b/test/node_modules/@ethersproject/networks/lib.esm/types.js new file mode 100644 index 0000000..f50a4bb --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/networks/lib.esm/types.js.map b/test/node_modules/@ethersproject/networks/lib.esm/types.js.map new file mode 100644 index 0000000..8111c2c --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/networks/lib/_version.d.ts b/test/node_modules/@ethersproject/networks/lib/_version.d.ts new file mode 100644 index 0000000..6c810d6 --- /dev/null +++ b/test/node_modules/@ethersproject/networks/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "networks/5.7.1"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/networks/lib/_version.d.ts.map b/test/node_modules/@ethersproject/networks/lib/_version.d.ts.map new file mode 100644 index 0000000..7ec6ea1 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/networks/lib/_version.js b/test/node_modules/@ethersproject/networks/lib/_version.js new file mode 100644 index 0000000..d8c53a6 --- /dev/null +++ b/test/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.7.1"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/networks/lib/_version.js.map b/test/node_modules/@ethersproject/networks/lib/_version.js.map new file mode 100644 index 0000000..fca74f2 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/networks/lib/index.d.ts b/test/node_modules/@ethersproject/networks/lib/index.d.ts new file mode 100644 index 0000000..8dde38b --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/networks/lib/index.d.ts.map b/test/node_modules/@ethersproject/networks/lib/index.d.ts.map new file mode 100644 index 0000000..4ae55b3 --- /dev/null +++ b/test/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;AA+MF;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAmEvD"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/networks/lib/index.js b/test/node_modules/@ethersproject/networks/lib/index.js new file mode 100644 index 0000000..693a671 --- /dev/null +++ b/test/node_modules/@ethersproject/networks/lib/index.js @@ -0,0 +1,251 @@ +"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 && options.infura !== "-") { + try { + providerList.push(new providers.InfuraProvider(network, options.infura)); + } + catch (error) { } + } + if (providers.EtherscanProvider && options.etherscan !== "-") { + try { + providerList.push(new providers.EtherscanProvider(network, options.etherscan)); + } + catch (error) { } + } + if (providers.AlchemyProvider && options.alchemy !== "-") { + try { + providerList.push(new providers.AlchemyProvider(network, options.alchemy)); + } + catch (error) { } + } + if (providers.PocketProvider && options.pocket !== "-") { + // 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", "sepolia"]; + try { + var provider = new providers.PocketProvider(network, options.pocket); + if (provider.network && skip.indexOf(provider.network.name) === -1) { + providerList.push(provider); + } + } + catch (error) { } + } + if (providers.CloudflareProvider && options.cloudflare !== "-") { + try { + providerList.push(new providers.CloudflareProvider(network)); + } + catch (error) { } + } + if (providers.AnkrProvider && options.ankr !== "-") { + try { + var skip = ["ropsten"]; + var provider = new providers.AnkrProvider(network, options.ankr); + if (provider.network && skip.indexOf(provider.network.name) === -1) { + providerList.push(provider); + } + } + 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") + }, + kintsugi: { chainId: 1337702, name: "kintsugi" }, + sepolia: { + chainId: 11155111, + name: "sepolia", + _defaultProvider: ethDefaultProvider("sepolia") + }, + // 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", + _defaultProvider: ethDefaultProvider("matic") + }, + maticmum: { chainId: 80001, name: "maticmum" }, + optimism: { + chainId: 10, + name: "optimism", + _defaultProvider: ethDefaultProvider("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" }, + "arbitrum-goerli": { chainId: 421613, name: "arbitrum-goerli" }, + 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/test/node_modules/@ethersproject/networks/lib/index.js.map b/test/node_modules/@ethersproject/networks/lib/index.js.map new file mode 100644 index 0000000..b9134a7 --- /dev/null +++ b/test/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,cAAc,IAAI,OAAO,CAAC,MAAM,KAAK,GAAG,EAAE;YACpD,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,IAAI,OAAO,CAAC,SAAS,KAAK,GAAG,EAAE;YAC1D,IAAI;gBACA,YAAY,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;aAClF;YAAC,OAAM,KAAK,EAAE,GAAG;SACrB;QAED,IAAI,SAAS,CAAC,eAAe,IAAI,OAAO,CAAC,OAAO,KAAK,GAAG,EAAE;YACtD,IAAI;gBACA,YAAY,CAAC,IA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AAC,QAAQ,EAAE;QACX,IAAI,OAAM,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,QAAQ,EAAE;YACtC,MAAM,CAAC,kBAAkB,CAAC,yBAAyB,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;SAC5E;QACD,OAAO,OAAO,CAAC;KAClB;IAED,wFAAwF;IACxF,IAAI,OAAO,CAAC,OAAO,KAAK,CAAC,IAAI,OAAO,CAAC,OAAO,KAAK,QAAQ,CAAC,OAAO,EAAE;QAC/D,MAAM,CAAC,kBAAkB,CAAC,0BAA0B,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;KAC7E;IAED,+EAA+E;IAC/E,6EAA6E;IAC7E,IAAI,eAAe,GAAwB,OAAO,CAAC,gBAAgB,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/test/node_modules/@ethersproject/networks/lib/types.d.ts b/test/node_modules/@ethersproject/networks/lib/types.d.ts new file mode 100644 index 0000000..417982f --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/networks/lib/types.d.ts.map b/test/node_modules/@ethersproject/networks/lib/types.d.ts.map new file mode 100644 index 0000000..ec8bc09 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/networks/lib/types.js b/test/node_modules/@ethersproject/networks/lib/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/networks/lib/types.js.map b/test/node_modules/@ethersproject/networks/lib/types.js.map new file mode 100644 index 0000000..8111c2c --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/networks/package.json b/test/node_modules/@ethersproject/networks/package.json new file mode 100644 index 0000000..524a89d --- /dev/null +++ b/test/node_modules/@ethersproject/networks/package.json @@ -0,0 +1,42 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/logger": "^5.7.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": "44cbc7fa4e199c1d6113ceec3c5162f53def5bb8", + "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": "0x7d5f9d59cb0cbfaba26d9dc4d43610a2d647ee7ce211f07b180a8c5e347f5724", + "types": "./lib/index.d.ts", + "version": "5.7.1" +} diff --git a/test/node_modules/@ethersproject/networks/src.ts/_version.ts b/test/node_modules/@ethersproject/networks/src.ts/_version.ts new file mode 100644 index 0000000..e022f58 --- /dev/null +++ b/test/node_modules/@ethersproject/networks/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "networks/5.7.1"; diff --git a/test/node_modules/@ethersproject/networks/src.ts/index.ts b/test/node_modules/@ethersproject/networks/src.ts/index.ts new file mode 100644 index 0000000..cb1b8e5 --- /dev/null +++ b/test/node_modules/@ethersproject/networks/src.ts/index.ts @@ -0,0 +1,292 @@ +"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 && options.infura !== "-") { + try { + providerList.push(new providers.InfuraProvider(network, options.infura)); + } catch(error) { } + } + + if (providers.EtherscanProvider && options.etherscan !== "-") { + try { + providerList.push(new providers.EtherscanProvider(network, options.etherscan)); + } catch(error) { } + } + + if (providers.AlchemyProvider && options.alchemy !== "-") { + try { + providerList.push(new providers.AlchemyProvider(network, options.alchemy)); + } catch(error) { } + } + + if (providers.PocketProvider && options.pocket !== "-") { + // 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", "sepolia" ]; + try { + const provider = new providers.PocketProvider(network, options.pocket); + if (provider.network && skip.indexOf(provider.network.name) === -1) { + providerList.push(provider); + } + } catch(error) { } + } + + if (providers.CloudflareProvider && options.cloudflare !== "-") { + try { + providerList.push(new providers.CloudflareProvider(network)); + } catch(error) { } + } + + if (providers.AnkrProvider && options.ankr !== "-") { + try { + const skip = [ "ropsten" ]; + const provider = new providers.AnkrProvider(network, options.ankr); + if (provider.network && skip.indexOf(provider.network.name) === -1) { + providerList.push(provider); + } + } 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") + }, + + kintsugi: { chainId: 1337702, name: "kintsugi" }, + + sepolia: { + chainId: 11155111, + name: "sepolia", + _defaultProvider: ethDefaultProvider("sepolia") + }, + + + // 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", + _defaultProvider: ethDefaultProvider("matic") + }, + maticmum: { chainId: 80001, name: "maticmum" }, + + optimism: { + chainId: 10, + name: "optimism", + _defaultProvider: ethDefaultProvider("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" }, + "arbitrum-goerli": { chainId: 421613, name: "arbitrum-goerli" }, + + 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/test/node_modules/@ethersproject/networks/src.ts/types.ts b/test/node_modules/@ethersproject/networks/src.ts/types.ts new file mode 100644 index 0000000..4e048d0 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/pbkdf2/LICENSE.md b/test/node_modules/@ethersproject/pbkdf2/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/pbkdf2/README.md b/test/node_modules/@ethersproject/pbkdf2/README.md new file mode 100644 index 0000000..722c23c --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/pbkdf2/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/pbkdf2/lib.esm/_version.d.ts new file mode 100644 index 0000000..a60e32b --- /dev/null +++ b/test/node_modules/@ethersproject/pbkdf2/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "pbkdf2/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/pbkdf2/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/pbkdf2/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..3fd2218 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/pbkdf2/lib.esm/_version.js b/test/node_modules/@ethersproject/pbkdf2/lib.esm/_version.js new file mode 100644 index 0000000..8cc591d --- /dev/null +++ b/test/node_modules/@ethersproject/pbkdf2/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "pbkdf2/5.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/pbkdf2/lib.esm/_version.js.map b/test/node_modules/@ethersproject/pbkdf2/lib.esm/_version.js.map new file mode 100644 index 0000000..056b924 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/pbkdf2/lib.esm/index.d.ts b/test/node_modules/@ethersproject/pbkdf2/lib.esm/index.d.ts new file mode 100644 index 0000000..d64bbb6 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/pbkdf2/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/pbkdf2/lib.esm/index.d.ts.map new file mode 100644 index 0000000..25de5b8 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/pbkdf2/lib.esm/index.js b/test/node_modules/@ethersproject/pbkdf2/lib.esm/index.js new file mode 100644 index 0000000..00bee6f --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/pbkdf2/lib.esm/index.js.map b/test/node_modules/@ethersproject/pbkdf2/lib.esm/index.js.map new file mode 100644 index 0000000..c76b34d --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/pbkdf2/lib.esm/pbkdf2.d.ts b/test/node_modules/@ethersproject/pbkdf2/lib.esm/pbkdf2.d.ts new file mode 100644 index 0000000..73bcd8d --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/pbkdf2/lib.esm/pbkdf2.d.ts.map b/test/node_modules/@ethersproject/pbkdf2/lib.esm/pbkdf2.d.ts.map new file mode 100644 index 0000000..ac97400 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/pbkdf2/lib.esm/pbkdf2.js b/test/node_modules/@ethersproject/pbkdf2/lib.esm/pbkdf2.js new file mode 100644 index 0000000..e211793 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/pbkdf2/lib.esm/pbkdf2.js.map b/test/node_modules/@ethersproject/pbkdf2/lib.esm/pbkdf2.js.map new file mode 100644 index 0000000..bd082d4 --- /dev/null +++ b/test/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,CAAC,CAAC;IAC9B,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IACtB,IAAI,IAAI,CAAC;IACT,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,MAAM,EAAE,GAAG,IAAI,UAAU,CAAC,MAAM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E,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/test/node_modules/@ethersproject/pbkdf2/lib/_version.d.ts b/test/node_modules/@ethersproject/pbkdf2/lib/_version.d.ts new file mode 100644 index 0000000..a60e32b --- /dev/null +++ b/test/node_modules/@ethersproject/pbkdf2/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "pbkdf2/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/pbkdf2/lib/_version.d.ts.map b/test/node_modules/@ethersproject/pbkdf2/lib/_version.d.ts.map new file mode 100644 index 0000000..3fd2218 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/pbkdf2/lib/_version.js b/test/node_modules/@ethersproject/pbkdf2/lib/_version.js new file mode 100644 index 0000000..1482985 --- /dev/null +++ b/test/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.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/pbkdf2/lib/_version.js.map b/test/node_modules/@ethersproject/pbkdf2/lib/_version.js.map new file mode 100644 index 0000000..e2300dc --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.d.ts b/test/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.d.ts new file mode 100644 index 0000000..2547d72 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.d.ts.map b/test/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.d.ts.map new file mode 100644 index 0000000..1cef99c --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.js b/test/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.js new file mode 100644 index 0000000..45c6f03 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.js.map b/test/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.js.map new file mode 100644 index 0000000..7cd23ac --- /dev/null +++ b/test/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,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC;QACvC,MAAM,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,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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/test/node_modules/@ethersproject/pbkdf2/lib/index.d.ts b/test/node_modules/@ethersproject/pbkdf2/lib/index.d.ts new file mode 100644 index 0000000..d64bbb6 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/pbkdf2/lib/index.d.ts.map b/test/node_modules/@ethersproject/pbkdf2/lib/index.d.ts.map new file mode 100644 index 0000000..25de5b8 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/pbkdf2/lib/index.js b/test/node_modules/@ethersproject/pbkdf2/lib/index.js new file mode 100644 index 0000000..f18cc5c --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/pbkdf2/lib/index.js.map b/test/node_modules/@ethersproject/pbkdf2/lib/index.js.map new file mode 100644 index 0000000..a8f7b73 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/pbkdf2/lib/pbkdf2.d.ts b/test/node_modules/@ethersproject/pbkdf2/lib/pbkdf2.d.ts new file mode 100644 index 0000000..73bcd8d --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/pbkdf2/lib/pbkdf2.d.ts.map b/test/node_modules/@ethersproject/pbkdf2/lib/pbkdf2.d.ts.map new file mode 100644 index 0000000..a475543 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/pbkdf2/lib/pbkdf2.js b/test/node_modules/@ethersproject/pbkdf2/lib/pbkdf2.js new file mode 100644 index 0000000..0cf23f7 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/pbkdf2/lib/pbkdf2.js.map b/test/node_modules/@ethersproject/pbkdf2/lib/pbkdf2.js.map new file mode 100644 index 0000000..d621e4c --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/pbkdf2/package.json b/test/node_modules/@ethersproject/pbkdf2/package.json new file mode 100644 index 0000000..9863a42 --- /dev/null +++ b/test/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.7.0", + "@ethersproject/sha2": "^5.7.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": "ec1b9583039a14a0e0fa15d0a2a6082a2f41cf5b", + "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": "0x56b0994e0126486fe570d5ce41d58a0ad8e46ead8509d235b4cde119d7b4fe21", + "types": "./lib/index.d.ts", + "version": "5.7.0" +} diff --git a/test/node_modules/@ethersproject/pbkdf2/src.ts/_version.ts b/test/node_modules/@ethersproject/pbkdf2/src.ts/_version.ts new file mode 100644 index 0000000..8e13573 --- /dev/null +++ b/test/node_modules/@ethersproject/pbkdf2/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "pbkdf2/5.7.0"; diff --git a/test/node_modules/@ethersproject/pbkdf2/src.ts/browser-pbkdf2.ts b/test/node_modules/@ethersproject/pbkdf2/src.ts/browser-pbkdf2.ts new file mode 100644 index 0000000..9203fb8 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/pbkdf2/src.ts/index.ts b/test/node_modules/@ethersproject/pbkdf2/src.ts/index.ts new file mode 100644 index 0000000..a19a781 --- /dev/null +++ b/test/node_modules/@ethersproject/pbkdf2/src.ts/index.ts @@ -0,0 +1,2 @@ + +export { pbkdf2 } from "./pbkdf2"; diff --git a/test/node_modules/@ethersproject/pbkdf2/src.ts/pbkdf2.ts b/test/node_modules/@ethersproject/pbkdf2/src.ts/pbkdf2.ts new file mode 100644 index 0000000..b67190e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/properties/LICENSE.md b/test/node_modules/@ethersproject/properties/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/properties/README.md b/test/node_modules/@ethersproject/properties/README.md new file mode 100644 index 0000000..a31e298 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/properties/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/properties/lib.esm/_version.d.ts new file mode 100644 index 0000000..23c3fe7 --- /dev/null +++ b/test/node_modules/@ethersproject/properties/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "properties/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/properties/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/properties/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..eb4d84f --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/properties/lib.esm/_version.js b/test/node_modules/@ethersproject/properties/lib.esm/_version.js new file mode 100644 index 0000000..709b2aa --- /dev/null +++ b/test/node_modules/@ethersproject/properties/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "properties/5.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/properties/lib.esm/_version.js.map b/test/node_modules/@ethersproject/properties/lib.esm/_version.js.map new file mode 100644 index 0000000..2533847 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/properties/lib.esm/index.d.ts b/test/node_modules/@ethersproject/properties/lib.esm/index.d.ts new file mode 100644 index 0000000..2cc44d4 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/properties/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/properties/lib.esm/index.d.ts.map new file mode 100644 index 0000000..f6f9f66 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/properties/lib.esm/index.js b/test/node_modules/@ethersproject/properties/lib.esm/index.js new file mode 100644 index 0000000..7f160b2 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/properties/lib.esm/index.js.map b/test/node_modules/@ethersproject/properties/lib.esm/index.js.map new file mode 100644 index 0000000..bb1a0b7 --- /dev/null +++ b/test/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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AAC/C,SAAS,SAAS,CAAC,MAAW;IAE1B,IAAI,SAAS,CAAC,MAAM,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/test/node_modules/@ethersproject/properties/lib/_version.d.ts b/test/node_modules/@ethersproject/properties/lib/_version.d.ts new file mode 100644 index 0000000..23c3fe7 --- /dev/null +++ b/test/node_modules/@ethersproject/properties/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "properties/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/properties/lib/_version.d.ts.map b/test/node_modules/@ethersproject/properties/lib/_version.d.ts.map new file mode 100644 index 0000000..eb4d84f --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/properties/lib/_version.js b/test/node_modules/@ethersproject/properties/lib/_version.js new file mode 100644 index 0000000..1105f8d --- /dev/null +++ b/test/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.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/properties/lib/_version.js.map b/test/node_modules/@ethersproject/properties/lib/_version.js.map new file mode 100644 index 0000000..dfdfe76 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/properties/lib/index.d.ts b/test/node_modules/@ethersproject/properties/lib/index.d.ts new file mode 100644 index 0000000..2cc44d4 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/properties/lib/index.d.ts.map b/test/node_modules/@ethersproject/properties/lib/index.d.ts.map new file mode 100644 index 0000000..f6f9f66 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/properties/lib/index.js b/test/node_modules/@ethersproject/properties/lib/index.js new file mode 100644 index 0000000..41e0b52 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/properties/lib/index.js.map b/test/node_modules/@ethersproject/properties/lib/index.js.map new file mode 100644 index 0000000..eb3f312 --- /dev/null +++ b/test/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,MA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AK,QAAQ,EAAE;QAC7B,IAAM,MAAM,GAA6B,EAAE,CAAC;QAC5C,KAAK,IAAM,GAAG,IAAI,MAAM,EAAE;YACtB,IAAM,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,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/test/node_modules/@ethersproject/properties/package.json b/test/node_modules/@ethersproject/properties/package.json new file mode 100644 index 0000000..8d999b6 --- /dev/null +++ b/test/node_modules/@ethersproject/properties/package.json @@ -0,0 +1,44 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/logger": "^5.7.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": "ec1b9583039a14a0e0fa15d0a2a6082a2f41cf5b", + "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": "0xae19a78858ce5d385611b26f4f7d576681f7352281e38f0916bba8f3fa04f5b5", + "types": "./lib/index.d.ts", + "version": "5.7.0" +} diff --git a/test/node_modules/@ethersproject/properties/src.ts/_version.ts b/test/node_modules/@ethersproject/properties/src.ts/_version.ts new file mode 100644 index 0000000..65ec8c6 --- /dev/null +++ b/test/node_modules/@ethersproject/properties/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "properties/5.7.0"; diff --git a/test/node_modules/@ethersproject/properties/src.ts/index.ts b/test/node_modules/@ethersproject/properties/src.ts/index.ts new file mode 100644 index 0000000..6dc7ead --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/LICENSE.md b/test/node_modules/@ethersproject/providers/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/README.md b/test/node_modules/@ethersproject/providers/README.md new file mode 100644 index 0000000..e200aaf --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/providers/lib.esm/_version.d.ts new file mode 100644 index 0000000..4fb87e3 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "providers/5.7.2"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/providers/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..7e6271e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/_version.js b/test/node_modules/@ethersproject/providers/lib.esm/_version.js new file mode 100644 index 0000000..0bfb1e9 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "providers/5.7.2"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib.esm/_version.js.map b/test/node_modules/@ethersproject/providers/lib.esm/_version.js.map new file mode 100644 index 0000000..3f20aac --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/alchemy-provider.d.ts b/test/node_modules/@ethersproject/providers/lib.esm/alchemy-provider.d.ts new file mode 100644 index 0000000..8f0e23a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/alchemy-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib.esm/alchemy-provider.d.ts.map new file mode 100644 index 0000000..6643f73 --- /dev/null +++ b/test/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;IA2C/D,mBAAmB,IAAI,OAAO;CAGjC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib.esm/alchemy-provider.js b/test/node_modules/@ethersproject/providers/lib.esm/alchemy-provider.js new file mode 100644 index 0000000..9c80426 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib.esm/alchemy-provider.js @@ -0,0 +1,84 @@ +"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 "goerli": + host = "eth-goerli.g.alchemy.com/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-goerli": + host = "arb-goerli.g.alchemy.com/v2/"; + break; + case "optimism": + host = "opt-mainnet.g.alchemy.com/v2/"; + break; + case "optimism-goerli": + host = "opt-goerli.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/test/node_modules/@ethersproject/providers/lib.esm/alchemy-provider.js.map b/test/node_modules/@ethersproject/providers/lib.esm/alchemy-provider.js.map new file mode 100644 index 0000000..db0574a --- /dev/null +++ b/test/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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AC;CACJ"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib.esm/ankr-provider.d.ts b/test/node_modules/@ethersproject/providers/lib.esm/ankr-provider.d.ts new file mode 100644 index 0000000..5aa8a46 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib.esm/ankr-provider.d.ts @@ -0,0 +1,10 @@ +import { Network } from "@ethersproject/networks"; +import { UrlJsonRpcProvider } from "./url-json-rpc-provider"; +import type { ConnectionInfo } from "@ethersproject/web"; +export declare class AnkrProvider extends UrlJsonRpcProvider { + readonly apiKey: string; + isCommunityResource(): boolean; + static getApiKey(apiKey: any): any; + static getUrl(network: Network, apiKey: any): ConnectionInfo; +} +//# sourceMappingURL=ankr-provider.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib.esm/ankr-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib.esm/ankr-provider.d.ts.map new file mode 100644 index 0000000..139457b --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib.esm/ankr-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ankr-provider.d.ts","sourceRoot":"","sources":["../src.ts/ankr-provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAGlD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AA6BzD,qBAAa,YAAa,SAAQ,kBAAkB;IAChD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,mBAAmB,IAAI,OAAO;IAI9B,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG;IAKlC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,GAAG,cAAc;CAoB/D"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib.esm/ankr-provider.js b/test/node_modules/@ethersproject/providers/lib.esm/ankr-provider.js new file mode 100644 index 0000000..5cd2636 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib.esm/ankr-provider.js @@ -0,0 +1,55 @@ +import { showThrottleMessage } from "./formatter"; +import { UrlJsonRpcProvider } from "./url-json-rpc-provider"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +const defaultApiKey = "9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972"; +function getHost(name) { + switch (name) { + case "homestead": + return "rpc.ankr.com/eth/"; + case "ropsten": + return "rpc.ankr.com/eth_ropsten/"; + case "rinkeby": + return "rpc.ankr.com/eth_rinkeby/"; + case "goerli": + return "rpc.ankr.com/eth_goerli/"; + case "matic": + return "rpc.ankr.com/polygon/"; + case "arbitrum": + return "rpc.ankr.com/arbitrum/"; + } + return logger.throwArgumentError("unsupported network", "name", name); +} +export class AnkrProvider extends UrlJsonRpcProvider { + isCommunityResource() { + return (this.apiKey === defaultApiKey); + } + static getApiKey(apiKey) { + if (apiKey == null) { + return defaultApiKey; + } + return apiKey; + } + static getUrl(network, apiKey) { + if (apiKey == null) { + apiKey = defaultApiKey; + } + const connection = { + allowGzip: true, + url: ("https:/\/" + getHost(network.name) + apiKey), + throttleCallback: (attempt, url) => { + if (apiKey.apiKey === defaultApiKey) { + showThrottleMessage(); + } + return Promise.resolve(true); + } + }; + if (apiKey.projectSecret != null) { + connection.user = ""; + connection.password = apiKey.projectSecret; + } + return connection; + } +} +//# sourceMappingURL=ankr-provider.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib.esm/ankr-provider.js.map b/test/node_modules/@ethersproject/providers/lib.esm/ankr-provider.js.map new file mode 100644 index 0000000..a36260f --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib.esm/ankr-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ankr-provider.js","sourceRoot":"","sources":["../src.ts/ankr-provider.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mB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YACnD,gBAAgB,EAAE,CAAC,OAAe,EAAE,GAAW,EAAE,EAAE;gBAC/C,IAAI,MAAM,CAAC,MAAM,KAAK,aAAa,EAAE;oBACjC,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;CACJ"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib.esm/base-provider.d.ts b/test/node_modules/@ethersproject/providers/lib.esm/base-provider.d.ts new file mode 100644 index 0000000..a0a0fe1 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib.esm/base-provider.d.ts @@ -0,0 +1,156 @@ +/// +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; + _lastBlockNumber: number; + _inflight: boolean; + 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; + _supportsEip2544: null | Promise; + constructor(provider: BaseProvider, address: string, name: string, resolvedAddress?: string); + supportsWildcard(): Promise; + _fetch(selector: string, parameters?: string): Promise; + _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; + _maxFilterBlockRange: number; + _fastBlockNumber: number; + _fastBlockNumberPromise: Promise; + _fastQueryDate: number; + _maxInternalBlockNumber: number; + _internalBlockNumber: Promise<{ + blockNumber: number; + reqTime: number; + respTime: number; + }>; + readonly anyNetwork: boolean; + disableCcipRead: 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; + ccipReadFetch(tx: Transaction, calldata: string, urls: Array): Promise; + _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: TransactionRequest, blockTag: BlockTag, attempt: number): 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, operation?: 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/test/node_modules/@ethersproject/providers/lib.esm/base-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib.esm/base-provider.d.ts.map new file mode 100644 index 0000000..4ead0d0 --- /dev/null +++ b/test/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;AAG1C,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;AAiHxC,qBAAa,KAAK;IACd,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAErB,gBAAgB,EAAE,MAAM,CAAA;IACxB,SAAS,EAAE,OAAO,CAAC;gBAEP,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO;IAS1D,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,Q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AAI;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/test/node_modules/@ethersproject/providers/lib.esm/base-provider.js b/test/node_modules/@ethersproject/providers/lib.esm/base-provider.js new file mode 100644 index 0000000..f67f5ca --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib.esm/base-provider.js @@ -0,0 +1,2007 @@ +"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 { encode as base64Encode } from "@ethersproject/base64"; +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 { dnsEncode, 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"; +const MAX_CCIP_REDIRECTS = 10; +////////////////////////////// +// 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); + this._lastBlockNumber = -2; + this._inflight = false; + } + 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 matcherIpfs = new RegExp("^(ipfs):/\/(.*)$", "i"); +const matchers = [ + new RegExp("^(https):/\/(.*)$", "i"), + new RegExp("^(data):(.*)$", "i"), + matcherIpfs, + new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$", "i"), +]; +function _parseString(result, start) { + try { + return toUtf8String(_parseBytes(result, start)); + } + catch (error) { } + return null; +} +function _parseBytes(result, start) { + if (result === "0x") { + return null; + } + const offset = BigNumber.from(hexDataSlice(result, start, start + 32)).toNumber(); + const length = BigNumber.from(hexDataSlice(result, offset, offset + 32)).toNumber(); + return hexDataSlice(result, offset + 32, offset + 32 + length); +} +// Trim off the ipfs:// prefix and return the default gateway URL +function getIpfsLink(link) { + if (link.match(/^ipfs:\/\/ipfs\//i)) { + link = link.substring(12); + } + else if (link.match(/^ipfs:\/\//i)) { + link = link.substring(7); + } + else { + logger.throwArgumentError("unsupported IPFS format", "link", link); + } + return `https:/\/gateway.ipfs.io/ipfs/${link}`; +} +function numPad(value) { + const result = arrayify(value); + if (result.length > 32) { + throw new Error("internal; should not happen"); + } + const padded = new Uint8Array(32); + padded.set(result, 32 - result.length); + return padded; +} +function bytesPad(value) { + if ((value.length % 32) === 0) { + return value; + } + const result = new Uint8Array(Math.ceil(value.length / 32) * 32); + result.set(value); + return result; +} +// ABI Encodes a series of (bytes, bytes, ...) +function encodeBytes(datas) { + const result = []; + let byteCount = 0; + // Add place-holders for pointers as we add items + for (let i = 0; i < datas.length; i++) { + result.push(null); + byteCount += 32; + } + for (let i = 0; i < datas.length; i++) { + const data = arrayify(datas[i]); + // Update the bytes offset + result[i] = numPad(byteCount); + // The length and padded value of data + result.push(numPad(data.length)); + result.push(bytesPad(data)); + byteCount += 32 + Math.ceil(data.length / 32) * 32; + } + return hexConcat(result); +} +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); + } + supportsWildcard() { + if (!this._supportsEip2544) { + // supportsInterface(bytes4 = selector("resolve(bytes,bytes)")) + this._supportsEip2544 = this.provider.call({ + to: this.address, + data: "0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000" + }).then((result) => { + return BigNumber.from(result).eq(1); + }).catch((error) => { + if (error.code === Logger.errors.CALL_EXCEPTION) { + return false; + } + // Rethrow the error: link is down, etc. Let future attempts retry. + this._supportsEip2544 = null; + throw error; + }); + } + return this._supportsEip2544; + } + _fetch(selector, parameters) { + return __awaiter(this, void 0, void 0, function* () { + // e.g. keccak256("addr(bytes32,uint256)") + const tx = { + to: this.address, + ccipReadEnabled: true, + data: hexConcat([selector, namehash(this.name), (parameters || "0x")]) + }; + // Wildcard support; use EIP-2544 to resolve the request + let parseBytes = false; + if (yield this.supportsWildcard()) { + parseBytes = true; + // selector("resolve(bytes,bytes)") + tx.data = hexConcat(["0x9061b923", encodeBytes([dnsEncode(this.name), tx.data])]); + } + try { + let result = yield this.provider.call(tx); + if ((arrayify(result).length % 32) === 4) { + logger.throwError("resolver threw error", Logger.errors.CALL_EXCEPTION, { + transaction: tx, data: result + }); + } + if (parseBytes) { + result = _parseBytes(result, 0); + } + return result; + } + catch (error) { + if (error.code === Logger.errors.CALL_EXCEPTION) { + return null; + } + throw error; + } + }); + } + _fetchBytes(selector, parameters) { + return __awaiter(this, void 0, void 0, function* () { + const result = yield this._fetch(selector, parameters); + if (result != null) { + return _parseBytes(result, 0); + } + 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 result = yield this._fetch("0x3b3b57de"); + // No address + if (result === "0x" || result === HashZero) { + return null; + } + return this.provider.formatter.callAddress(result); + } + 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 = [{ type: "name", content: this.name }]; + 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; + } + const scheme = match[1].toLowerCase(); + switch (scheme) { + 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: getIpfsLink(avatar) }; + case "erc721": + case "erc1155": { + // Depending on the ERC type, use tokenURI(uint256) or url(uint256) + const selector = (scheme === "erc721") ? "0xc87b56dd" : "0x0e89341c"; + linkage.push({ type: scheme, 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 (scheme === "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 (scheme === "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), 0); + if (metadataUrl == null) { + return null; + } + linkage.push({ type: "metadata-url-base", content: metadataUrl }); + // ERC-1155 allows a generic {id} in the URL + if (scheme === "erc1155") { + metadataUrl = metadataUrl.replace("{id}", tokenId.substring(2)); + linkage.push({ type: "metadata-url-expanded", content: metadataUrl }); + } + // Transform IPFS metadata links + if (metadataUrl.match(/^ipfs:/i)) { + metadataUrl = getIpfsLink(metadataUrl); + } + linkage.push({ type: "metadata-url", content: metadataUrl }); + // Get the token metadata + const metadata = yield fetchJson(metadataUrl); + if (!metadata) { + return null; + } + linkage.push({ type: "metadata", content: JSON.stringify(metadata) }); + // Pull the image URL out + let imageUrl = metadata.image; + if (typeof (imageUrl) !== "string") { + return null; + } + if (imageUrl.match(/^(https:\/\/|data:)/i)) { + // Allow + } + else { + // Transform IPFS link to gateway + const ipfs = imageUrl.match(matcherIpfs); + if (ipfs == null) { + return null; + } + linkage.push({ type: "url-ipfs", content: imageUrl }); + imageUrl = getIpfsLink(imageUrl); + } + linkage.push({ type: "url", content: imageUrl }); + return { linkage, url: imageUrl }; + } + } + } + } + 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]); + } + } + // IPNS (CID: 1, Type: libp2p-key) + const ipns = hexBytes.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/); + if (ipns) { + const length = parseInt(ipns[3], 16); + if (ipns[4].length === length * 2) { + return "ipns:/\/" + Base58.encode("0x" + ipns[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]; + } + } + const skynet = hexBytes.match(/^0x90b2c605([0-9a-f]*)$/); + if (skynet) { + if (skynet[1].length === (34 * 2)) { + // URL Safe base64; https://datatracker.ietf.org/doc/html/rfc4648#section-5 + const urlSafe = { "=": "", "+": "-", "/": "_" }; + const hash = base64Encode("0x" + skynet[1]).replace(/[=+\/]/g, (a) => (urlSafe[a])); + return "sia:/\/" + hash; + } + } + 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) { + super(); + // Events being listened to + this._events = []; + this._emitted = { block: -2 }; + this.disableCcipRead = false; + 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._maxFilterBlockRange = 10; + 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); + } + ccipReadFetch(tx, calldata, urls) { + return __awaiter(this, void 0, void 0, function* () { + if (this.disableCcipRead || urls.length === 0) { + return null; + } + const sender = tx.to.toLowerCase(); + const data = calldata.toLowerCase(); + const errorMessages = []; + for (let i = 0; i < urls.length; i++) { + const url = urls[i]; + // URL expansion + const href = url.replace("{sender}", sender).replace("{data}", data); + // If no {data} is present, use POST; otherwise GET + const json = (url.indexOf("{data}") >= 0) ? null : JSON.stringify({ data, sender }); + const result = yield fetchJson({ url: href, errorPassThrough: true }, json, (value, response) => { + value.status = response.statusCode; + return value; + }); + if (result.data) { + return result.data; + } + const errorMessage = (result.message || "unknown error"); + // 4xx indicates the result is not present; stop + if (result.status >= 400 && result.status < 500) { + return logger.throwError(`response not found during CCIP fetch: ${errorMessage}`, Logger.errors.SERVER_ERROR, { url, errorMessage }); + } + // 5xx indicates server issue; try the next url + errorMessages.push(errorMessage); + } + return logger.throwError(`error encountered during CCIP fetch: ${errorMessages.map((m) => JSON.stringify(m)).join(", ")}`, Logger.errors.SERVER_ERROR, { + urls, errorMessages + }); + }); + } + // 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": { + // We only allow a single getLogs to be in-flight at a time + if (!event._inflight) { + event._inflight = true; + // This is the first filter for this event, so we want to + // restrict events to events that happened no earlier than now + if (event._lastBlockNumber === -2) { + event._lastBlockNumber = blockNumber - 1; + } + // Filter from the last *known* event; due to load-balancing + // and some nodes returning updated block numbers before + // indexing events, a logs result with 0 entries cannot be + // trusted and we must retry a range which includes it again + const filter = event.filter; + filter.fromBlock = event._lastBlockNumber + 1; + filter.toBlock = blockNumber; + // Prevent fitler ranges from growing too wild, since it is quite + // likely there just haven't been any events to move the lastBlockNumber. + const minFromBlock = filter.toBlock - this._maxFilterBlockRange; + if (minFromBlock > filter.fromBlock) { + filter.fromBlock = minFromBlock; + } + if (filter.fromBlock < 0) { + filter.fromBlock = 0; + } + const runner = this.getLogs(filter).then((logs) => { + // Allow the next getLogs + event._inflight = false; + if (logs.length === 0) { + return; + } + logs.forEach((log) => { + // Only when we get an event for a given block number + // can we trust the events are indexed + if (log.blockNumber > event._lastBlockNumber) { + event._lastBlockNumber = log.blockNumber; + } + // Make sure we stall requests to fetch blocks and txs + this._emitted["b:" + log.blockHash] = log.blockNumber; + this._emitted["t:" + log.transactionHash] = log.blockNumber; + this.emit(filter, log); + }); + }).catch((error) => { + this.emit("error", error); + // Allow another getLogs (the range was not updated) + event._inflight = false; + }); + 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, attempt) { + return __awaiter(this, void 0, void 0, function* () { + if (attempt >= MAX_CCIP_REDIRECTS) { + logger.throwError("CCIP read exceeded maximum redirections", Logger.errors.SERVER_ERROR, { + redirects: attempt, transaction + }); + } + const txSender = transaction.to; + const result = yield this.perform("call", { transaction, blockTag }); + // CCIP Read request via OffchainLookup(address,string[],bytes,bytes4,bytes) + if (attempt >= 0 && blockTag === "latest" && txSender != null && result.substring(0, 10) === "0x556f1830" && (hexDataLength(result) % 32 === 4)) { + try { + const data = hexDataSlice(result, 4); + // Check the sender of the OffchainLookup matches the transaction + const sender = hexDataSlice(data, 0, 32); + if (!BigNumber.from(sender).eq(txSender)) { + logger.throwError("CCIP Read sender did not match", Logger.errors.CALL_EXCEPTION, { + name: "OffchainLookup", + signature: "OffchainLookup(address,string[],bytes,bytes4,bytes)", + transaction, data: result + }); + } + // Read the URLs from the response + const urls = []; + const urlsOffset = BigNumber.from(hexDataSlice(data, 32, 64)).toNumber(); + const urlsLength = BigNumber.from(hexDataSlice(data, urlsOffset, urlsOffset + 32)).toNumber(); + const urlsData = hexDataSlice(data, urlsOffset + 32); + for (let u = 0; u < urlsLength; u++) { + const url = _parseString(urlsData, u * 32); + if (url == null) { + logger.throwError("CCIP Read contained corrupt URL string", Logger.errors.CALL_EXCEPTION, { + name: "OffchainLookup", + signature: "OffchainLookup(address,string[],bytes,bytes4,bytes)", + transaction, data: result + }); + } + urls.push(url); + } + // Get the CCIP calldata to forward + const calldata = _parseBytes(data, 64); + // Get the callbackSelector (bytes4) + if (!BigNumber.from(hexDataSlice(data, 100, 128)).isZero()) { + logger.throwError("CCIP Read callback selector included junk", Logger.errors.CALL_EXCEPTION, { + name: "OffchainLookup", + signature: "OffchainLookup(address,string[],bytes,bytes4,bytes)", + transaction, data: result + }); + } + const callbackSelector = hexDataSlice(data, 96, 100); + // Get the extra data to send back to the contract as context + const extraData = _parseBytes(data, 128); + const ccipResult = yield this.ccipReadFetch(transaction, calldata, urls); + if (ccipResult == null) { + logger.throwError("CCIP Read disabled or provided no URLs", Logger.errors.CALL_EXCEPTION, { + name: "OffchainLookup", + signature: "OffchainLookup(address,string[],bytes,bytes4,bytes)", + transaction, data: result + }); + } + const tx = { + to: txSender, + data: hexConcat([callbackSelector, encodeBytes([ccipResult, extraData])]) + }; + return this._call(tx, blockTag, attempt + 1); + } + catch (error) { + if (error.code === Logger.errors.SERVER_ERROR) { + throw error; + } + } + } + try { + return hexlify(result); + } + catch (error) { + return logger.throwError("bad result from backend", Logger.errors.SERVER_ERROR, { + method: "call", + params: { transaction, blockTag }, result, error + }); + } + }); + } + call(transaction, blockTag) { + return __awaiter(this, void 0, void 0, function* () { + yield this.getNetwork(); + const resolved = yield resolveProperties({ + transaction: this._getTransactionRequest(transaction), + blockTag: this._getBlockTag(blockTag), + ccipReadEnabled: Promise.resolve(transaction.ccipReadEnabled) + }); + return this._call(resolved.transaction, resolved.blockTag, resolved.ccipReadEnabled ? 0 : -1); + }); + } + 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* () { + let currentName = name; + while (true) { + if (currentName === "" || currentName === ".") { + return null; + } + // Optimization since the eth node cannot change and does + // not have a wildcard resolver + if (name !== "eth" && currentName === "eth") { + return null; + } + // Check the current node for a resolver + const addr = yield this._getResolver(currentName, "getResolver"); + // Found a resolver! + if (addr != null) { + const resolver = new Resolver(this, addr, name); + // Legacy resolver found, using EIP-2544 so it isn't safe to use + if (currentName !== name && !(yield resolver.supportsWildcard())) { + return null; + } + return resolver; + } + // Get the parent node + currentName = currentName.split(".").slice(1).join("."); + } + }); + } + _getResolver(name, operation) { + return __awaiter(this, void 0, void 0, function* () { + if (operation == null) { + operation = "ENS"; + } + const network = yield this.getNetwork(); + // No ENS... + if (!network.ensAddress) { + logger.throwError("network does not support ENS", Logger.errors.UNSUPPORTED_OPERATION, { operation, network: network.name }); + } + try { + // keccak256("resolver(bytes32)") + const addrData = yield this.call({ + to: network.ensAddress, + data: ("0x0178b8bf" + namehash(name).substring(2)) + }); + return this.formatter.callAddress(addrData); + } + catch (error) { + // ENS registry cannot throw errors on resolver(bytes32) + } + return null; + }); + } + 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 resolver + 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 node = address.substring(2).toLowerCase() + ".addr.reverse"; + const resolverAddr = yield this._getResolver(node, "lookupAddress"); + if (resolverAddr == null) { + return null; + } + // keccak("name(bytes32)") + const name = _parseString(yield this.call({ + to: resolverAddr, + data: ("0x691f3431" + namehash(node).substring(2)) + }), 0); + 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 node = address.substring(2).toLowerCase() + ".addr.reverse"; + const resolverAddress = yield this._getResolver(node, "getAvatar"); + if (!resolverAddress) { + return null; + } + // Try resolving the avatar against the addr.reverse resolver + resolver = new Resolver(this, resolverAddress, node); + try { + const avatar = yield resolver.getAvatar(); + if (avatar) { + return avatar.url; + } + } + catch (error) { + if (error.code !== Logger.errors.CALL_EXCEPTION) { + throw error; + } + } + // Try getting the name and performing forward lookup; allowing wildcards + try { + // keccak("name(bytes32)") + const name = _parseString(yield this.call({ + to: resolverAddress, + data: ("0x691f3431" + namehash(node).substring(2)) + }), 0); + resolver = yield this.getResolver(name); + } + catch (error) { + if (error.code !== Logger.errors.CALL_EXCEPTION) { + throw error; + } + return null; + } + } + else { + // ENS name; forward lookup with wildcard + 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/test/node_modules/@ethersproject/providers/lib.esm/base-provider.js.map b/test/node_modules/@ethersproject/providers/lib.esm/base-provider.js.map new file mode 100644 index 0000000..b462161 --- /dev/null +++ b/test/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,E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,CAAC,CAAC,CAAC,CAAC,CAAC;QAExD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib.esm/cloudflare-provider.d.ts b/test/node_modules/@ethersproject/providers/lib.esm/cloudflare-provider.d.ts new file mode 100644 index 0000000..f209dd3 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/cloudflare-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib.esm/cloudflare-provider.d.ts.map new file mode 100644 index 0000000..2a3ef84 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/cloudflare-provider.js b/test/node_modules/@ethersproject/providers/lib.esm/cloudflare-provider.js new file mode 100644 index 0000000..a819c0b --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/cloudflare-provider.js.map b/test/node_modules/@ethersproject/providers/lib.esm/cloudflare-provider.js.map new file mode 100644 index 0000000..9489462 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/etherscan-provider.d.ts b/test/node_modules/@ethersproject/providers/lib.esm/etherscan-provider.d.ts new file mode 100644 index 0000000..07e90a1 --- /dev/null +++ b/test/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 | null; + 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/test/node_modules/@ethersproject/providers/lib.esm/etherscan-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib.esm/etherscan-provider.d.ts.map new file mode 100644 index 0000000..dc23bfb --- /dev/null +++ b/test/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;AA+I/C,qBAAa,iBAAkB,SAAQ,YAAY;IAC/C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;gBAEnB,OAAO,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM;IAOjD,UAAU,IAAI,MAAM;IA0BpB,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/test/node_modules/@ethersproject/providers/lib.esm/etherscan-provider.js b/test/node_modules/@ethersproject/providers/lib.esm/etherscan-provider.js new file mode 100644 index 0000000..925947f --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib.esm/etherscan-provider.js @@ -0,0 +1,425 @@ +"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 || typeof (result.message) !== "string" || !result.message.match(/^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); +} +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) { + super(network); + defineReadOnly(this, "baseUrl", this.getBaseUrl()); + defineReadOnly(this, "apiKey", apiKey || null); + } + getBaseUrl() { + switch (this.network ? this.network.name : "invalid") { + case "homestead": + return "https:/\/api.etherscan.io"; + case "goerli": + return "https:/\/api-goerli.etherscan.io"; + case "sepolia": + return "https:/\/api-sepolia.etherscan.io"; + case "matic": + return "https:/\/api.polygonscan.com"; + case "maticmum": + return "https:/\/api-testnet.polygonscan.com"; + case "arbitrum": + return "https:/\/api.arbiscan.io"; + case "arbitrum-goerli": + return "https:/\/api-goerli.arbiscan.io"; + case "optimism": + return "https:/\/api-optimistic.etherscan.io"; + case "optimism-goerli": + return "https:/\/api-goerli-optimistic.etherscan.io"; + default: + } + return logger.throwArgumentError("unsupported network", "network", this.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 == null); + } +} +//# sourceMappingURL=etherscan-provider.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib.esm/etherscan-provider.js.map b/test/node_modules/@ethersproject/providers/lib.esm/etherscan-provider.js.map new file mode 100644 index 0000000..1caff70 --- /dev/null +++ b/test/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":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;AAGb,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEtE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAkB,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/D,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,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG/C,sEAAsE;AACtE,SAAS,sBAAsB,CAAC,WAA+B;IAC3D,MAAM,MAAM,GAA2B,EAAG,CAAC;IAC3C,KAAK,IAAI,GAAG,IAAI,WAAW,EAAE;QACzB,IAAU,WAAY,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE;YAAE,SAAS;SAAE;QAClD,IAAI,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AAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;YAEnD,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,EAAO,EAAE,EAAE;gBAC1B,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,UAAS,GAAG;oBAC1C,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE;wBAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;qBAAE;gBAC1C,CAAC,CAAC,CAAC;gBACH,IAAI,EAAE,CAAC,OAAO,IAAI,IAAI,IAAI,EAAE,CAAC,eAAe,IAAI,IAAI,EAAE;oBAClD,EAAE,CAAC,OAAO,GAAG,EAAE,CAAC,eAAe,CAAC;iBACnC;gBACD,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAC;gBACpD,IAAI,EAAE,CAAC,SAAS,EAAE;oBAAE,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;iBAAE;gBAC9D,OAAO,IAAI,CAAC;YAChB,CAAC,CAAC,CAAC;QACP,CAAC;KAAA;IAED,mBAAmB;QACf,OAAO,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC;IACjC,CAAC;CACJ"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib.esm/fallback-provider.d.ts b/test/node_modules/@ethersproject/providers/lib.esm/fallback-provider.d.ts new file mode 100644 index 0000000..b9f38da --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/fallback-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib.esm/fallback-provider.d.ts.map new file mode 100644 index 0000000..aabaafb --- /dev/null +++ b/test/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;AAmSD,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;IAyD1E,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/test/node_modules/@ethersproject/providers/lib.esm/fallback-provider.js b/test/node_modules/@ethersproject/providers/lib.esm/fallback-provider.js new file mode 100644 index 0000000..a2459de --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib.esm/fallback-provider.js @@ -0,0 +1,584 @@ +"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); + } + if (method === "call" && params.blockTag) { + return provider[method](params.transaction, params.blockTag); + } + 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) { + 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/test/node_modules/@ethersproject/providers/lib.esm/fallback-provider.js.map b/test/node_modules/@ethersproject/providers/lib.esm/fallback-provider.js.map new file mode 100644 index 0000000..ad943b8 --- /dev/null +++ b/test/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,CA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AE,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/test/node_modules/@ethersproject/providers/lib.esm/formatter.d.ts b/test/node_modules/@ethersproject/providers/lib.esm/formatter.d.ts new file mode 100644 index 0000000..8d7f2f6 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/formatter.d.ts.map b/test/node_modules/@ethersproject/providers/lib.esm/formatter.d.ts.map new file mode 100644 index 0000000..5a244c1 --- /dev/null +++ b/test/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;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,WAAW,CAAC;IACrB,UAAU,EAAE,WAAW,CAAC;IACxB,KAAK,EAAE,WAAW,CAAC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InC,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/test/node_modules/@ethersproject/providers/lib.esm/formatter.js b/test/node_modules/@ethersproject/providers/lib.esm/formatter.js new file mode 100644 index 0000000..f89fbce --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib.esm/formatter.js @@ -0,0 +1,447 @@ +"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() { + 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: Formatter.allowNull(hash), + parentHash: hash, + number: number, + timestamp: number, + nonce: Formatter.allowNull(hex), + difficulty: this.difficulty.bind(this), + gasLimit: bigNumber, + gasUsed: bigNumber, + miner: Formatter.allowNull(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"; + } + switch (blockTag) { + case "earliest": return "0x0"; + case "latest": + case "pending": + case "safe": + case "finalized": + 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/test/node_modules/@ethersproject/providers/lib.esm/formatter.js.map b/test/node_modules/@ethersproject/providers/lib.esm/formatter.js.map new file mode 100644 index 0000000..02e0b94 --- /dev/null +++ b/test/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,EAAE,MAAM,6BAA6B,CAAC;AAEnG,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;AAiBnC,MAAM,OAAO,SAAS;IAGlB;QACI,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC5C,CAAC;IAED,iBAAiB;QACb,MAAM,OAAO,GAAqB,CAAC,EAAG,CAAC,CAAC;QAExC,MAAM,OAAO,GAAG,IAA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,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/test/node_modules/@ethersproject/providers/lib.esm/index.d.ts b/test/node_modules/@ethersproject/providers/lib.esm/index.d.ts new file mode 100644 index 0000000..5b70b27 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib.esm/index.d.ts @@ -0,0 +1,23 @@ +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 { AnkrProvider } from "./ankr-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, AnkrProvider, 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/test/node_modules/@ethersproject/providers/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/providers/lib.esm/index.d.ts.map new file mode 100644 index 0000000..52cd8b4 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib.esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sour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AAE,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,CA4C7E;AAKD,OAAO,EAGH,QAAQ,EACR,YAAY,EAEZ,QAAQ,EAER,kBAAkB,EAKlB,gBAAgB,EAEhB,eAAe,EACf,wBAAwB,EACxB,YAAY,EACZ,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/test/node_modules/@ethersproject/providers/lib.esm/index.js b/test/node_modules/@ethersproject/providers/lib.esm/index.js new file mode 100644 index 0000000..189a475 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib.esm/index.js @@ -0,0 +1,85 @@ +"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 { AnkrProvider } from "./ankr-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].toLowerCase()) { + case "http": + case "https": + return new JsonRpcProvider(network); + case "ws": + case "wss": + 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, + AnkrProvider, + 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, AnkrProvider, 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/test/node_modules/@ethersproject/providers/lib.esm/index.js.map b/test/node_modules/@ethersproject/providers/lib.esm/index.js.map new file mode 100644 index 0000000..e8a53e1 --- /dev/null +++ b/test/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,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,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;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,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AO,CAAC,CAAC;IAC9B,IAAI,CAAC,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,YAAY;QACZ,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,YAAY,EACZ,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/test/node_modules/@ethersproject/providers/lib.esm/infura-provider.d.ts b/test/node_modules/@ethersproject/providers/lib.esm/infura-provider.d.ts new file mode 100644 index 0000000..2f4e297 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/infura-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib.esm/infura-provider.d.ts.map new file mode 100644 index 0000000..2a11fc3 --- /dev/null +++ b/test/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;IAwD5D,mBAAmB,IAAI,OAAO;CAGjC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib.esm/infura-provider.js b/test/node_modules/@ethersproject/providers/lib.esm/infura-provider.js new file mode 100644 index 0000000..2df55a0 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib.esm/infura-provider.js @@ -0,0 +1,113 @@ +"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 "goerli": + host = "goerli.infura.io"; + break; + case "sepolia": + host = "sepolia.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-goerli": + host = "optimism-goerli.infura.io"; + break; + case "arbitrum": + host = "arbitrum-mainnet.infura.io"; + break; + case "arbitrum-goerli": + host = "arbitrum-goerli.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/test/node_modules/@ethersproject/providers/lib.esm/infura-provider.js.map b/test/node_modules/@ethersproject/providers/lib.esm/infura-provider.js.map new file mode 100644 index 0000000..6bda026 --- /dev/null +++ b/test/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,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AG,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/test/node_modules/@ethersproject/providers/lib.esm/ipc-provider.d.ts b/test/node_modules/@ethersproject/providers/lib.esm/ipc-provider.d.ts new file mode 100644 index 0000000..798c348 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/ipc-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib.esm/ipc-provider.d.ts.map new file mode 100644 index 0000000..95cc75c --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/ipc-provider.js b/test/node_modules/@ethersproject/providers/lib.esm/ipc-provider.js new file mode 100644 index 0000000..7a24a7f --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/ipc-provider.js.map b/test/node_modules/@ethersproject/providers/lib.esm/ipc-provider.js.map new file mode 100644 index 0000000..ccd82c3 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/json-rpc-batch-provider.d.ts b/test/node_modules/@ethersproject/providers/lib.esm/json-rpc-batch-provider.d.ts new file mode 100644 index 0000000..2ad7763 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/json-rpc-batch-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib.esm/json-rpc-batch-provider.d.ts.map new file mode 100644 index 0000000..c2efbf0 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/json-rpc-batch-provider.js b/test/node_modules/@ethersproject/providers/lib.esm/json-rpc-batch-provider.js new file mode 100644 index 0000000..7db7f78 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/json-rpc-batch-provider.js.map b/test/node_modules/@ethersproject/providers/lib.esm/json-rpc-batch-provider.js.map new file mode 100644 index 0000000..7a19ad4 --- /dev/null +++ b/test/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,MAAc,EAAE,MAAkB;QACnC,MAAM,OAAO,GAAG;YACZ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"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib.esm/json-rpc-provider.d.ts b/test/node_modules/@ethersproject/providers/lib.esm/json-rpc-provider.d.ts new file mode 100644 index 0000000..c3ef0af --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/json-rpc-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib.esm/json-rpc-provider.d.ts.map new file mode 100644 index 0000000..258875a --- /dev/null +++ b/test/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,EAA8C,MAAM,sBAAsB,CAAC;AAEzF,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;AA0ItD,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,EAAE,eAAe,EAAE,cAAc,CAAC,EAAE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AM,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAKzC;gBAEW,GAAG,CAAC,EAAE,cAAc,GAAG,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU;IAgC/D,MAAM,CAAC,UAAU,IAAI,MAAM;IAI3B,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;IAY3B,sBAAsB,IAAI,OAAO,CAAC,OAAO,CAAC;IA8BhD,SAAS,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,aAAa;IAI1D,kBAAkB,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,sBAAsB;IAI5E,YAAY,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAMtC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,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/test/node_modules/@ethersproject/providers/lib.esm/json-rpc-provider.js b/test/node_modules/@ethersproject/providers/lib.esm/json-rpc-provider.js new file mode 100644 index 0000000..02f6b39 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib.esm/json-rpc-provider.js @@ -0,0 +1,675 @@ +"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, hexZeroPad, 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 spelunk(value, requireData) { + if (value == null) { + return null; + } + // These *are* the droids we're looking for. + if (typeof (value.message) === "string" && value.message.match("reverted")) { + const data = isHexString(value.data) ? value.data : null; + if (!requireData || data) { + return { message: value.message, data }; + } + } + // Spelunk further... + if (typeof (value) === "object") { + for (const key in value) { + const result = spelunk(value[key], requireData); + if (result) { + return result; + } + } + return null; + } + // Might be a JSON string we can further descend... + if (typeof (value) === "string") { + try { + return spelunk(JSON.parse(value), requireData); + } + catch (error) { } + } + return null; +} +function checkError(method, error, params) { + const transaction = params.transaction || params.signedTransaction; + // Undo the "convenience" some nodes are attempting to prevent backwards + // incompatibility; maybe for v6 consider forwarding reverts as errors + if (method === "call") { + const result = spelunk(error, true); + if (result) { + return result.data; + } + // Nothing descriptive.. + logger.throwError("missing revert data in call exception; Transaction reverted without a reason string", Logger.errors.CALL_EXCEPTION, { + data: "0x", transaction, error + }); + } + if (method === "estimateGas") { + // Try to find something, with a preference on SERVER_ERROR body + let result = spelunk(error.body, false); + if (result == null) { + result = spelunk(error, false); + } + // Found "reverted", this is a CALL_EXCEPTION + if (result) { + logger.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", Logger.errors.UNPREDICTABLE_GAS_LIMIT, { + reason: result.message, method, transaction, error + }); + } + } + // @TODO: Should we spelunk for message too? + 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(); + // "insufficient funds for gas * price + value + cost(data)" + if (message.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)) { + logger.throwError("insufficient funds for intrinsic transaction cost", Logger.errors.INSUFFICIENT_FUNDS, { + error, method, transaction + }); + } + // "nonce too low" + if (message.match(/nonce (is )?too low/i)) { + logger.throwError("nonce has already been used", Logger.errors.NONCE_EXPIRED, { + error, method, transaction + }); + } + // "replacement transaction underpriced" + if (message.match(/replacement transaction underpriced|transaction gas price.*too low/i)) { + logger.throwError("replacement fee too low", Logger.errors.REPLACEMENT_UNDERPRICED, { + error, method, transaction + }); + } + // "replacement transaction underpriced" + if (message.match(/only replay-protected/i)) { + 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|revert/)) { + 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) { + 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) => { + if (typeof (error.message) === "string" && error.message.match(/user denied/i)) { + logger.throwError("user rejected transaction", Logger.errors.ACTION_REJECTED, { + action: "sendTransaction", + transaction: tx + }); + } + 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(); + try { + return yield this.provider.send("personal_sign", [hexlify(data), address.toLowerCase()]); + } + catch (error) { + if (typeof (error.message) === "string" && error.message.match(/user denied/i)) { + logger.throwError("user rejected signing", Logger.errors.ACTION_REJECTED, { + action: "signMessage", + from: address, + messageData: message + }); + } + throw error; + } + }); + } + _legacySignMessage(message) { + return __awaiter(this, void 0, void 0, function* () { + const data = ((typeof (message) === "string") ? toUtf8Bytes(message) : message); + const address = yield this.getAddress(); + try { + // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign + return yield this.provider.send("eth_sign", [address.toLowerCase(), hexlify(data)]); + } + catch (error) { + if (typeof (error.message) === "string" && error.message.match(/user denied/i)) { + logger.throwError("user rejected signing", Logger.errors.ACTION_REJECTED, { + action: "_legacySignMessage", + from: address, + messageData: message + }); + } + throw error; + } + }); + } + _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(); + try { + return yield this.provider.send("eth_signTypedData_v4", [ + address.toLowerCase(), + JSON.stringify(_TypedDataEncoder.getPayload(populated.domain, types, populated.value)) + ]); + } + catch (error) { + if (typeof (error.message) === "string" && error.message.match(/user denied/i)) { + logger.throwError("user rejected signing", Logger.errors.ACTION_REJECTED, { + action: "_signTypedData", + from: address, + messageData: { domain: populated.domain, types, value: populated.value } + }); + } + throw error; + } + }); + } + 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) { + 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), hexZeroPad(params.position, 32), 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-1559 + 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 = {}; + // JSON-RPC now requires numeric values to be "quantity" values + ["chainId", "gasLimit", "gasPrice", "type", "maxFeePerGas", "maxPriorityFeePerGas", "nonce", "value"].forEach(function (key) { + if (transaction[key] == null) { + return; + } + const value = hexValue(BigNumber.from(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/test/node_modules/@ethersproject/providers/lib.esm/json-rpc-provider.js.map b/test/node_modules/@ethersproject/providers/lib.esm/json-rpc-provider.js.map new file mode 100644 index 0000000..4fb772d --- /dev/null +++ b/test/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,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAS,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qB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AAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,sBAAsB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,UAAS,GAAG;YACtH,IAAU,WAAY,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE;gBAAE,OAAO;aAAE;YAChD,MAAM,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAO,WAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAChE,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/test/node_modules/@ethersproject/providers/lib.esm/nodesmith-provider.d.ts b/test/node_modules/@ethersproject/providers/lib.esm/nodesmith-provider.d.ts new file mode 100644 index 0000000..3f20d33 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/nodesmith-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib.esm/nodesmith-provider.d.ts.map new file mode 100644 index 0000000..c0a3493 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/nodesmith-provider.js b/test/node_modules/@ethersproject/providers/lib.esm/nodesmith-provider.js new file mode 100644 index 0000000..3a4d64d --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/nodesmith-provider.js.map b/test/node_modules/@ethersproject/providers/lib.esm/nodesmith-provider.js.map new file mode 100644 index 0000000..125a016 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/pocket-provider.d.ts b/test/node_modules/@ethersproject/providers/lib.esm/pocket-provider.d.ts new file mode 100644 index 0000000..7376e70 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib.esm/pocket-provider.d.ts @@ -0,0 +1,12 @@ +import { Network } 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; + 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/test/node_modules/@ethersproject/providers/lib.esm/pocket-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib.esm/pocket-provider.d.ts.map new file mode 100644 index 0000000..fcbc793 --- /dev/null +++ b/test/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,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAMpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAK7D,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;IAE/B,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG;IA4BlC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,GAAG,cAAc;IA0C5D,mBAAmB,IAAI,OAAO;CAGjC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib.esm/pocket-provider.js b/test/node_modules/@ethersproject/providers/lib.esm/pocket-provider.js new file mode 100644 index 0000000..ce23288 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib.esm/pocket-provider.js @@ -0,0 +1,75 @@ +"use strict"; +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); +import { UrlJsonRpcProvider } from "./url-json-rpc-provider"; +const defaultApplicationId = "62e1ad51b37b8e00394bda3b"; +export class PocketProvider extends UrlJsonRpcProvider { + static getApiKey(apiKey) { + const apiKeyObj = { + applicationId: null, + loadBalancer: true, + applicationSecretKey: null + }; + // Parse applicationId and applicationSecretKey + if (apiKey == null) { + apiKeyObj.applicationId = defaultApplicationId; + } + else if (typeof (apiKey) === "string") { + apiKeyObj.applicationId = apiKey; + } + else if (apiKey.applicationSecretKey != null) { + apiKeyObj.applicationId = apiKey.applicationId; + apiKeyObj.applicationSecretKey = apiKey.applicationSecretKey; + } + else if (apiKey.applicationId) { + apiKeyObj.applicationId = apiKey.applicationId; + } + else { + logger.throwArgumentError("unsupported PocketProvider apiKey", "apiKey", apiKey); + } + return apiKeyObj; + } + static getUrl(network, apiKey) { + let host = null; + switch (network ? network.name : "unknown") { + case "goerli": + host = "eth-goerli.gateway.pokt.network"; + break; + case "homestead": + host = "eth-mainnet.gateway.pokt.network"; + break; + case "kovan": + host = "poa-kovan.gateway.pokt.network"; + break; + case "matic": + host = "poly-mainnet.gateway.pokt.network"; + break; + case "maticmum": + host = "polygon-mumbai-rpc.gateway.pokt.network"; + break; + case "rinkeby": + host = "eth-rinkeby.gateway.pokt.network"; + break; + case "ropsten": + host = "eth-ropsten.gateway.pokt.network"; + break; + default: + logger.throwError("unsupported network", Logger.errors.INVALID_ARGUMENT, { + argument: "network", + value: network + }); + } + const url = `https:/\/${host}/v1/lb/${apiKey.applicationId}`; + const connection = { headers: {}, url }; + if (apiKey.applicationSecretKey != null) { + connection.user = ""; + connection.password = apiKey.applicationSecretKey; + } + return connection; + } + isCommunityResource() { + return (this.applicationId === defaultApplicationId); + } +} +//# sourceMappingURL=pocket-provider.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib.esm/pocket-provider.js.map b/test/node_modules/@ethersproject/providers/lib.esm/pocket-provider.js.map new file mode 100644 index 0000000..4babd8a --- /dev/null +++ b/test/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;AAKb,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;AAE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AC;gBACxC,MAAM;YACV,KAAK,OAAO;gBACR,IAAI,GAAG,mCAAmC,CAAC;gBAC3C,MAAM;YACV,KAAK,UAAU;gBACX,IAAI,GAAG,yCAAyC,CAAC;gBACjD,MAAM;YACV,KAAK,SAAS;gBACV,IAAI,GAAG,kCAAkC,CAAC;gBAC1C,MAAM;YACV,KAAK,SAAS;gBACV,IAAI,GAAG,kCAAkC,CAAC;gBAC1C,MAAM;YACV;gBACI,MAAM,CAAC,UAAU,CAAC,qBAAqB,EAAE,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE;oBACrE,QAAQ,EAAE,SAAS;oBACnB,KAAK,EAAE,OAAO;iBACjB,CAAC,CAAC;SACV;QAED,MAAM,GAAG,GAAG,YAAa,IAAK,UAAW,MAAM,CAAC,aAAc,EAAE,CAAA;QAEhE,MAAM,UAAU,GAAmB,EAAE,OAAO,EAAE,EAAG,EAAE,GAAG,EAAE,CAAC;QACzD,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,oBAAoB,CAAC,CAAC;IACzD,CAAC;CACJ"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib.esm/url-json-rpc-provider.d.ts b/test/node_modules/@ethersproject/providers/lib.esm/url-json-rpc-provider.d.ts new file mode 100644 index 0000000..1ddde45 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/url-json-rpc-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib.esm/url-json-rpc-provider.d.ts.map new file mode 100644 index 0000000..74542cd --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/url-json-rpc-provider.js b/test/node_modules/@ethersproject/providers/lib.esm/url-json-rpc-provider.js new file mode 100644 index 0000000..bcb31bd --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/url-json-rpc-provider.js.map b/test/node_modules/@ethersproject/providers/lib.esm/url-json-rpc-provider.js.map new file mode 100644 index 0000000..c9b8557 --- /dev/null +++ b/test/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,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;SACtB,CAAC,CAAC;IACP,CAAC;CACJ"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib.esm/web3-provider.d.ts b/test/node_modules/@ethersproject/providers/lib.esm/web3-provider.d.ts new file mode 100644 index 0000000..690b300 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/web3-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib.esm/web3-provider.d.ts.map new file mode 100644 index 0000000..54cf94b --- /dev/null +++ b/test/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;IAyC/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/test/node_modules/@ethersproject/providers/lib.esm/web3-provider.js b/test/node_modules/@ethersproject/providers/lib.esm/web3-provider.js new file mode 100644 index 0000000..aa4b118 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib.esm/web3-provider.js @@ -0,0 +1,131 @@ +"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) { + 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/test/node_modules/@ethersproject/providers/lib.esm/web3-provider.js.map b/test/node_modules/@ethersproject/providers/lib.esm/web3-provider.js.map new file mode 100644 index 0000000..2dbde3a --- /dev/null +++ b/test/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,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m/websocket-provider.d.ts b/test/node_modules/@ethersproject/providers/lib.esm/websocket-provider.d.ts new file mode 100644 index 0000000..4ba6bc5 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib.esm/websocket-provider.d.ts @@ -0,0 +1,48 @@ +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 interface WebSocketLike { + onopen: ((...args: Array) => any) | null; + onmessage: ((...args: Array) => any) | null; + onerror: ((...args: Array) => any) | null; + readyState: number; + send(payload: any): void; + close(code?: number, reason?: string): 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 | WebSocketLike, network?: Networkish); + get websocket(): WebSocketLike; + 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/test/node_modules/@ethersproject/providers/lib.esm/websocket-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib.esm/websocket-provider.d.ts.map new file mode 100644 index 0000000..0b61df6 --- /dev/null +++ b/test/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,UA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G,EAAE,MAAM,GAAI,OAAO,CAAC,MAAM,CAAC,CAAA;KAAE,CAAC;IAGvD,QAAQ,CAAC,KAAK,EAAE;QAAE,CAAE,IAAI,EAAE,MAAM,GAAI,YAAY,CAAA;KAAE,CAAC;IAEnD,QAAQ,EAAE,OAAO,CAAC;gBAEN,GAAG,EAAE,MAAM,GAAG,aAAa,EAAE,OAAO,CAAC,EAAE,UAAU;IAqG7D,IAAI,SAAS,IAAI,aAAa,CAA4B;IAE1D,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;IAIjC,IAAI,eAAe,IAAI,MAAM,CAE5B;IAED,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAM3C,IAAI,eAAe,CAAC,KAAK,EAAE,MAAM,EAIhC;IAEK,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B,IAAI,OAAO,CAAC,KAAK,EAAE,OAAO,EAMzB;IAED,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;IA4BvD,MAAM,CAAC,UAAU,IAAI,MAAM;IAIrB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAYnG,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IA2D/B,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAyBxB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAkBjC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib.esm/websocket-provider.js b/test/node_modules/@ethersproject/providers/lib.esm/websocket-provider.js new file mode 100644 index 0000000..0d5966c --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib.esm/websocket-provider.js @@ -0,0 +1,299 @@ +"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" + }); + } + if (typeof (url) === "string") { + super(url, network); + } + else { + super("_websocket", network); + } + this._pollingInterval = -1; + this._wsReady = false; + if (typeof (url) === "string") { + defineReadOnly(this, "_websocket", new WebSocket(this.connection.url)); + } + else { + defineReadOnly(this, "_websocket", 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(); + } + } + // Cannot narrow the type of _websocket, as that is not backwards compatible + // so we add a getter and let the WebSocket be a public API. + get websocket() { return this._websocket; } + 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/test/node_modules/@ethersproject/providers/lib.esm/websocket-provider.js.map b/test/node_modules/@ethersproject/providers/lib.esm/websocket-provider.js.map new file mode 100644 index 0000000..51b50e9 --- /dev/null +++ b/test/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,GAAG,CAAC,CAAC;AAuBf,mDAAmD;AACnD,8CAA8C;AAE9C,MAAM,OAAO,iBAAkB,SAAQ,eAAe;IAalD,YAAY,GAA2B,EAAE,OAAoB;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,IAAI,CAAC,iBAAiB,EAAE,CAAE,KAAK,CAAE,CAAC,CAAC;QAC5C,CAAC,CAAC,CAAC;IACP,CAAC;IAEK,OAAO;;YACT,2DAA2D;YAC3D,IAAI,IAAI,CAAC,SAAS,CAAC,UAAU,KAAK,SAAS,CAAC,UAAU,EAAE;gBACpD,MAAM,CAAC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;oBAC3B,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG;wBACpB,OAAO,CAAC,IAAI,CAAC,CAAC;oBAClB,CAAC,CAAC;oBAEF,IAAI,CAAC,SAAS,CAAC,OAAO,GAAG;wBACrB,OAAO,CAAC,KAAK,CAAC,CAAC;oBACnB,CAAC,CAAC;gBACN,CAAC,CAAC,CAAC,CAAC;aACP;YAED,SAAS;YACT,gFAAgF;YAChF,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC;KAAA;CACJ"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib.esm/ws.d.ts b/test/node_modules/@ethersproject/providers/lib.esm/ws.d.ts new file mode 100644 index 0000000..15d79fe --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/ws.d.ts.map b/test/node_modules/@ethersproject/providers/lib.esm/ws.d.ts.map new file mode 100644 index 0000000..80d6745 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/ws.js b/test/node_modules/@ethersproject/providers/lib.esm/ws.js new file mode 100644 index 0000000..0a05653 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib.esm/ws.js.map b/test/node_modules/@ethersproject/providers/lib.esm/ws.js.map new file mode 100644 index 0000000..2756283 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/_version.d.ts b/test/node_modules/@ethersproject/providers/lib/_version.d.ts new file mode 100644 index 0000000..4fb87e3 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "providers/5.7.2"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib/_version.d.ts.map b/test/node_modules/@ethersproject/providers/lib/_version.d.ts.map new file mode 100644 index 0000000..7e6271e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/_version.js b/test/node_modules/@ethersproject/providers/lib/_version.js new file mode 100644 index 0000000..71b770a --- /dev/null +++ b/test/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.7.2"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib/_version.js.map b/test/node_modules/@ethersproject/providers/lib/_version.js.map new file mode 100644 index 0000000..438871e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/alchemy-provider.d.ts b/test/node_modules/@ethersproject/providers/lib/alchemy-provider.d.ts new file mode 100644 index 0000000..8f0e23a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/alchemy-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib/alchemy-provider.d.ts.map new file mode 100644 index 0000000..6643f73 --- /dev/null +++ b/test/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;IA2C/D,mBAAmB,IAAI,OAAO;CAGjC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib/alchemy-provider.js b/test/node_modules/@ethersproject/providers/lib/alchemy-provider.js new file mode 100644 index 0000000..5958d23 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib/alchemy-provider.js @@ -0,0 +1,112 @@ +"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 "goerli": + host = "eth-goerli.g.alchemy.com/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-goerli": + host = "arb-goerli.g.alchemy.com/v2/"; + break; + case "optimism": + host = "opt-mainnet.g.alchemy.com/v2/"; + break; + case "optimism-goerli": + host = "opt-goerli.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/test/node_modules/@ethersproject/providers/lib/alchemy-provider.js.map b/test/node_modules/@ethersproject/providers/lib/alchemy-provider.js.map new file mode 100644 index 0000000..7cd7d00 --- /dev/null +++ b/test/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,C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8BAA8B,CAAA;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,AA5DD,CAAqC,0CAAkB,GA4DtD;AA5DY,0CAAe"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib/ankr-provider.d.ts b/test/node_modules/@ethersproject/providers/lib/ankr-provider.d.ts new file mode 100644 index 0000000..5aa8a46 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib/ankr-provider.d.ts @@ -0,0 +1,10 @@ +import { Network } from "@ethersproject/networks"; +import { UrlJsonRpcProvider } from "./url-json-rpc-provider"; +import type { ConnectionInfo } from "@ethersproject/web"; +export declare class AnkrProvider extends UrlJsonRpcProvider { + readonly apiKey: string; + isCommunityResource(): boolean; + static getApiKey(apiKey: any): any; + static getUrl(network: Network, apiKey: any): ConnectionInfo; +} +//# sourceMappingURL=ankr-provider.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib/ankr-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib/ankr-provider.d.ts.map new file mode 100644 index 0000000..139457b --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib/ankr-provider.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ankr-provider.d.ts","sourceRoot":"","sources":["../src.ts/ankr-provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAGlD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AA6BzD,qBAAa,YAAa,SAAQ,kBAAkB;IAChD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,mBAAmB,IAAI,OAAO;IAI9B,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG;IAKlC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,GAAG,cAAc;CAoB/D"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib/ankr-provider.js b/test/node_modules/@ethersproject/providers/lib/ankr-provider.js new file mode 100644 index 0000000..3d3e5de --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib/ankr-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.AnkrProvider = void 0; +var formatter_1 = require("./formatter"); +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 defaultApiKey = "9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972"; +function getHost(name) { + switch (name) { + case "homestead": + return "rpc.ankr.com/eth/"; + case "ropsten": + return "rpc.ankr.com/eth_ropsten/"; + case "rinkeby": + return "rpc.ankr.com/eth_rinkeby/"; + case "goerli": + return "rpc.ankr.com/eth_goerli/"; + case "matic": + return "rpc.ankr.com/polygon/"; + case "arbitrum": + return "rpc.ankr.com/arbitrum/"; + } + return logger.throwArgumentError("unsupported network", "name", name); +} +var AnkrProvider = /** @class */ (function (_super) { + __extends(AnkrProvider, _super); + function AnkrProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + AnkrProvider.prototype.isCommunityResource = function () { + return (this.apiKey === defaultApiKey); + }; + AnkrProvider.getApiKey = function (apiKey) { + if (apiKey == null) { + return defaultApiKey; + } + return apiKey; + }; + AnkrProvider.getUrl = function (network, apiKey) { + if (apiKey == null) { + apiKey = defaultApiKey; + } + var connection = { + allowGzip: true, + url: ("https:/\/" + getHost(network.name) + apiKey), + throttleCallback: function (attempt, url) { + if (apiKey.apiKey === defaultApiKey) { + (0, formatter_1.showThrottleMessage)(); + } + return Promise.resolve(true); + } + }; + if (apiKey.projectSecret != null) { + connection.user = ""; + connection.password = apiKey.projectSecret; + } + return connection; + }; + return AnkrProvider; +}(url_json_rpc_provider_1.UrlJsonRpcProvider)); +exports.AnkrProvider = AnkrProvider; +//# sourceMappingURL=ankr-provider.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib/ankr-provider.js.map b/test/node_modules/@ethersproject/providers/lib/ankr-provider.js.map new file mode 100644 index 0000000..93a57bf --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib/ankr-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ankr-provider.js","sourceRoot":"","sources":["../src.ts/ankr-provider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAGA,yCAAkD;AAClD,iEAA6D;AAI7D,gDAA+C;AAC/C,uCAAqC;AACrC,I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AAC;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;IACL,mBAAC;AAAD,CAAC,AAhCD,CAAkC,0CAAkB,GAgCnD;AAhCY,oCAAY"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib/base-provider.d.ts b/test/node_modules/@ethersproject/providers/lib/base-provider.d.ts new file mode 100644 index 0000000..a0a0fe1 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib/base-provider.d.ts @@ -0,0 +1,156 @@ +/// +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; + _lastBlockNumber: number; + _inflight: boolean; + 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; + _supportsEip2544: null | Promise; + constructor(provider: BaseProvider, address: string, name: string, resolvedAddress?: string); + supportsWildcard(): Promise; + _fetch(selector: string, parameters?: string): Promise; + _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; + _maxFilterBlockRange: number; + _fastBlockNumber: number; + _fastBlockNumberPromise: Promise; + _fastQueryDate: number; + _maxInternalBlockNumber: number; + _internalBlockNumber: Promise<{ + blockNumber: number; + reqTime: number; + respTime: number; + }>; + readonly anyNetwork: boolean; + disableCcipRead: 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; + ccipReadFetch(tx: Transaction, calldata: string, urls: Array): Promise; + _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: TransactionRequest, blockTag: BlockTag, attempt: number): 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, operation?: 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/test/node_modules/@ethersproject/providers/lib/base-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib/base-provider.d.ts.map new file mode 100644 index 0000000..4ead0d0 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib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,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/test/node_modules/@ethersproject/providers/lib/base-provider.js b/test/node_modules/@ethersproject/providers/lib/base-provider.js new file mode 100644 index 0000000..95762d7 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib/base-provider.js @@ -0,0 +1,2585 @@ +"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 base64_1 = require("@ethersproject/base64"); +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"); +var MAX_CCIP_REDIRECTS = 10; +////////////////////////////// +// 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); + this._lastBlockNumber = -2; + this._inflight = false; + } + 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 matcherIpfs = new RegExp("^(ipfs):/\/(.*)$", "i"); +var matchers = [ + new RegExp("^(https):/\/(.*)$", "i"), + new RegExp("^(data):(.*)$", "i"), + matcherIpfs, + new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$", "i"), +]; +function _parseString(result, start) { + try { + return (0, strings_1.toUtf8String)(_parseBytes(result, start)); + } + catch (error) { } + return null; +} +function _parseBytes(result, start) { + if (result === "0x") { + return null; + } + var offset = bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(result, start, start + 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); +} +// Trim off the ipfs:// prefix and return the default gateway URL +function getIpfsLink(link) { + if (link.match(/^ipfs:\/\/ipfs\//i)) { + link = link.substring(12); + } + else if (link.match(/^ipfs:\/\//i)) { + link = link.substring(7); + } + else { + logger.throwArgumentError("unsupported IPFS format", "link", link); + } + return "https://gateway.ipfs.io/ipfs/" + link; +} +function numPad(value) { + var result = (0, bytes_1.arrayify)(value); + if (result.length > 32) { + throw new Error("internal; should not happen"); + } + var padded = new Uint8Array(32); + padded.set(result, 32 - result.length); + return padded; +} +function bytesPad(value) { + if ((value.length % 32) === 0) { + return value; + } + var result = new Uint8Array(Math.ceil(value.length / 32) * 32); + result.set(value); + return result; +} +// ABI Encodes a series of (bytes, bytes, ...) +function encodeBytes(datas) { + var result = []; + var byteCount = 0; + // Add place-holders for pointers as we add items + for (var i = 0; i < datas.length; i++) { + result.push(null); + byteCount += 32; + } + for (var i = 0; i < datas.length; i++) { + var data = (0, bytes_1.arrayify)(datas[i]); + // Update the bytes offset + result[i] = numPad(byteCount); + // The length and padded value of data + result.push(numPad(data.length)); + result.push(bytesPad(data)); + byteCount += 32 + Math.ceil(data.length / 32) * 32; + } + return (0, bytes_1.hexConcat)(result); +} +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.supportsWildcard = function () { + var _this = this; + if (!this._supportsEip2544) { + // supportsInterface(bytes4 = selector("resolve(bytes,bytes)")) + this._supportsEip2544 = this.provider.call({ + to: this.address, + data: "0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000" + }).then(function (result) { + return bignumber_1.BigNumber.from(result).eq(1); + }).catch(function (error) { + if (error.code === logger_1.Logger.errors.CALL_EXCEPTION) { + return false; + } + // Rethrow the error: link is down, etc. Let future attempts retry. + _this._supportsEip2544 = null; + throw error; + }); + } + return this._supportsEip2544; + }; + Resolver.prototype._fetch = function (selector, parameters) { + return __awaiter(this, void 0, void 0, function () { + var tx, parseBytes, result, error_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + tx = { + to: this.address, + ccipReadEnabled: true, + data: (0, bytes_1.hexConcat)([selector, (0, hash_1.namehash)(this.name), (parameters || "0x")]) + }; + parseBytes = false; + return [4 /*yield*/, this.supportsWildcard()]; + case 1: + if (_a.sent()) { + parseBytes = true; + // selector("resolve(bytes,bytes)") + tx.data = (0, bytes_1.hexConcat)(["0x9061b923", encodeBytes([(0, hash_1.dnsEncode)(this.name), tx.data])]); + } + _a.label = 2; + case 2: + _a.trys.push([2, 4, , 5]); + return [4 /*yield*/, this.provider.call(tx)]; + case 3: + result = _a.sent(); + if (((0, bytes_1.arrayify)(result).length % 32) === 4) { + logger.throwError("resolver threw error", logger_1.Logger.errors.CALL_EXCEPTION, { + transaction: tx, data: result + }); + } + if (parseBytes) { + result = _parseBytes(result, 0); + } + return [2 /*return*/, result]; + case 4: + error_1 = _a.sent(); + if (error_1.code === logger_1.Logger.errors.CALL_EXCEPTION) { + return [2 /*return*/, null]; + } + throw error_1; + case 5: return [2 /*return*/]; + } + }); + }); + }; + Resolver.prototype._fetchBytes = function (selector, parameters) { + return __awaiter(this, void 0, void 0, function () { + var result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this._fetch(selector, parameters)]; + case 1: + result = _a.sent(); + if (result != null) { + return [2 /*return*/, _parseBytes(result, 0)]; + } + return [2 /*return*/, null]; + } + }); + }); + }; + 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 result, 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]); + return [4 /*yield*/, this._fetch("0x3b3b57de")]; + case 2: + result = _a.sent(); + // No address + if (result === "0x" || result === constants_1.HashZero) { + return [2 /*return*/, null]; + } + return [2 /*return*/, this.provider.formatter.callAddress(result)]; + 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, scheme, _a, selector, owner, _b, comps, addr, tokenId, tokenOwner, _c, _d, balance, _e, _f, tx, metadataUrl, _g, metadata, imageUrl, ipfs, error_3; + return __generator(this, function (_h) { + switch (_h.label) { + case 0: + linkage = [{ type: "name", content: this.name }]; + _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]; + } + scheme = match[1].toLowerCase(); + _a = scheme; + 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: getIpfsLink(avatar) }]; + case 7: + selector = (scheme === "erc721") ? "0xc87b56dd" : "0x0e89341c"; + linkage.push({ type: scheme, 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 (!(scheme === "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 (!(scheme === "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(), 0]); + if (metadataUrl == null) { + return [2 /*return*/, null]; + } + linkage.push({ type: "metadata-url-base", content: metadataUrl }); + // ERC-1155 allows a generic {id} in the URL + if (scheme === "erc1155") { + metadataUrl = metadataUrl.replace("{id}", tokenId.substring(2)); + linkage.push({ type: "metadata-url-expanded", content: metadataUrl }); + } + // Transform IPFS metadata links + if (metadataUrl.match(/^ipfs:/i)) { + metadataUrl = getIpfsLink(metadataUrl); + } + linkage.push({ type: "metadata-url", content: metadataUrl }); + return [4 /*yield*/, (0, web_1.fetchJson)(metadataUrl)]; + case 16: + metadata = _h.sent(); + if (!metadata) { + return [2 /*return*/, null]; + } + linkage.push({ type: "metadata", content: JSON.stringify(metadata) }); + imageUrl = metadata.image; + if (typeof (imageUrl) !== "string") { + return [2 /*return*/, null]; + } + if (imageUrl.match(/^(https:\/\/|data:)/i)) { + // Allow + } + else { + ipfs = imageUrl.match(matcherIpfs); + if (ipfs == null) { + return [2 /*return*/, null]; + } + linkage.push({ type: "url-ipfs", content: imageUrl }); + imageUrl = getIpfsLink(imageUrl); + } + linkage.push({ type: "url", content: imageUrl }); + return [2 /*return*/, { linkage: linkage, url: imageUrl }]; + 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, ipns, length_5, swarm, skynet, urlSafe_1, hash; + 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])]; + } + } + ipns = hexBytes.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/); + if (ipns) { + length_5 = parseInt(ipns[3], 16); + if (ipns[4].length === length_5 * 2) { + return [2 /*return*/, "ipns:/\/" + basex_1.Base58.encode("0x" + ipns[1])]; + } + } + swarm = hexBytes.match(/^0xe40101fa011b20([0-9a-f]*)$/); + if (swarm) { + if (swarm[1].length === (32 * 2)) { + return [2 /*return*/, "bzz:/\/" + swarm[1]]; + } + } + skynet = hexBytes.match(/^0x90b2c605([0-9a-f]*)$/); + if (skynet) { + if (skynet[1].length === (34 * 2)) { + urlSafe_1 = { "=": "", "+": "-", "/": "_" }; + hash = (0, base64_1.encode)("0x" + skynet[1]).replace(/[=+\/]/g, function (a) { return (urlSafe_1[a]); }); + return [2 /*return*/, "sia:/\/" + hash]; + } + } + 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 = _super.call(this) || this; + // Events being listened to + _this._events = []; + _this._emitted = { block: -2 }; + _this.disableCcipRead = false; + _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._maxFilterBlockRange = 10; + _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); + }; + BaseProvider.prototype.ccipReadFetch = function (tx, calldata, urls) { + return __awaiter(this, void 0, void 0, function () { + var sender, data, errorMessages, i, url, href, json, result, errorMessage; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (this.disableCcipRead || urls.length === 0) { + return [2 /*return*/, null]; + } + sender = tx.to.toLowerCase(); + data = calldata.toLowerCase(); + errorMessages = []; + i = 0; + _a.label = 1; + case 1: + if (!(i < urls.length)) return [3 /*break*/, 4]; + url = urls[i]; + href = url.replace("{sender}", sender).replace("{data}", data); + json = (url.indexOf("{data}") >= 0) ? null : JSON.stringify({ data: data, sender: sender }); + return [4 /*yield*/, (0, web_1.fetchJson)({ url: href, errorPassThrough: true }, json, function (value, response) { + value.status = response.statusCode; + return value; + })]; + case 2: + result = _a.sent(); + if (result.data) { + return [2 /*return*/, result.data]; + } + errorMessage = (result.message || "unknown error"); + // 4xx indicates the result is not present; stop + if (result.status >= 400 && result.status < 500) { + return [2 /*return*/, logger.throwError("response not found during CCIP fetch: " + errorMessage, logger_1.Logger.errors.SERVER_ERROR, { url: url, errorMessage: errorMessage })]; + } + // 5xx indicates server issue; try the next url + errorMessages.push(errorMessage); + _a.label = 3; + case 3: + i++; + return [3 /*break*/, 1]; + case 4: return [2 /*return*/, logger.throwError("error encountered during CCIP fetch: " + errorMessages.map(function (m) { return JSON.stringify(m); }).join(", "), logger_1.Logger.errors.SERVER_ERROR, { + urls: urls, + errorMessages: errorMessages + })]; + } + }); + }); + }; + // 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": { + // We only allow a single getLogs to be in-flight at a time + if (!event._inflight) { + event._inflight = true; + // This is the first filter for this event, so we want to + // restrict events to events that happened no earlier than now + if (event._lastBlockNumber === -2) { + event._lastBlockNumber = blockNumber - 1; + } + // Filter from the last *known* event; due to load-balancing + // and some nodes returning updated block numbers before + // indexing events, a logs result with 0 entries cannot be + // trusted and we must retry a range which includes it again + var filter_1 = event.filter; + filter_1.fromBlock = event._lastBlockNumber + 1; + filter_1.toBlock = blockNumber; + // Prevent fitler ranges from growing too wild, since it is quite + // likely there just haven't been any events to move the lastBlockNumber. + var minFromBlock = filter_1.toBlock - _this._maxFilterBlockRange; + if (minFromBlock > filter_1.fromBlock) { + filter_1.fromBlock = minFromBlock; + } + if (filter_1.fromBlock < 0) { + filter_1.fromBlock = 0; + } + var runner = _this.getLogs(filter_1).then(function (logs) { + // Allow the next getLogs + event._inflight = false; + if (logs.length === 0) { + return; + } + logs.forEach(function (log) { + // Only when we get an event for a given block number + // can we trust the events are indexed + if (log.blockNumber > event._lastBlockNumber) { + event._lastBlockNumber = log.blockNumber; + } + // Make sure we stall requests to fetch blocks and txs + _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); + // Allow another getLogs (the range was not updated) + event._inflight = false; + }); + 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, attempt) { + return __awaiter(this, void 0, void 0, function () { + var txSender, result, data, sender, urls, urlsOffset, urlsLength, urlsData, u, url, calldata, callbackSelector, extraData, ccipResult, tx, error_8; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (attempt >= MAX_CCIP_REDIRECTS) { + logger.throwError("CCIP read exceeded maximum redirections", logger_1.Logger.errors.SERVER_ERROR, { + redirects: attempt, + transaction: transaction + }); + } + txSender = transaction.to; + return [4 /*yield*/, this.perform("call", { transaction: transaction, blockTag: blockTag })]; + case 1: + result = _a.sent(); + if (!(attempt >= 0 && blockTag === "latest" && txSender != null && result.substring(0, 10) === "0x556f1830" && ((0, bytes_1.hexDataLength)(result) % 32 === 4))) return [3 /*break*/, 5]; + _a.label = 2; + case 2: + _a.trys.push([2, 4, , 5]); + data = (0, bytes_1.hexDataSlice)(result, 4); + sender = (0, bytes_1.hexDataSlice)(data, 0, 32); + if (!bignumber_1.BigNumber.from(sender).eq(txSender)) { + logger.throwError("CCIP Read sender did not match", logger_1.Logger.errors.CALL_EXCEPTION, { + name: "OffchainLookup", + signature: "OffchainLookup(address,string[],bytes,bytes4,bytes)", + transaction: transaction, + data: result + }); + } + urls = []; + urlsOffset = bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(data, 32, 64)).toNumber(); + urlsLength = bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(data, urlsOffset, urlsOffset + 32)).toNumber(); + urlsData = (0, bytes_1.hexDataSlice)(data, urlsOffset + 32); + for (u = 0; u < urlsLength; u++) { + url = _parseString(urlsData, u * 32); + if (url == null) { + logger.throwError("CCIP Read contained corrupt URL string", logger_1.Logger.errors.CALL_EXCEPTION, { + name: "OffchainLookup", + signature: "OffchainLookup(address,string[],bytes,bytes4,bytes)", + transaction: transaction, + data: result + }); + } + urls.push(url); + } + calldata = _parseBytes(data, 64); + // Get the callbackSelector (bytes4) + if (!bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(data, 100, 128)).isZero()) { + logger.throwError("CCIP Read callback selector included junk", logger_1.Logger.errors.CALL_EXCEPTION, { + name: "OffchainLookup", + signature: "OffchainLookup(address,string[],bytes,bytes4,bytes)", + transaction: transaction, + data: result + }); + } + callbackSelector = (0, bytes_1.hexDataSlice)(data, 96, 100); + extraData = _parseBytes(data, 128); + return [4 /*yield*/, this.ccipReadFetch(transaction, calldata, urls)]; + case 3: + ccipResult = _a.sent(); + if (ccipResult == null) { + logger.throwError("CCIP Read disabled or provided no URLs", logger_1.Logger.errors.CALL_EXCEPTION, { + name: "OffchainLookup", + signature: "OffchainLookup(address,string[],bytes,bytes4,bytes)", + transaction: transaction, + data: result + }); + } + tx = { + to: txSender, + data: (0, bytes_1.hexConcat)([callbackSelector, encodeBytes([ccipResult, extraData])]) + }; + return [2 /*return*/, this._call(tx, blockTag, attempt + 1)]; + case 4: + error_8 = _a.sent(); + if (error_8.code === logger_1.Logger.errors.SERVER_ERROR) { + throw error_8; + } + return [3 /*break*/, 5]; + case 5: + 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: { transaction: transaction, blockTag: blockTag }, + result: result, + error: error + })]; + } + return [2 /*return*/]; + } + }); + }); + }; + BaseProvider.prototype.call = function (transaction, blockTag) { + return __awaiter(this, void 0, void 0, function () { + var resolved; + 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), + ccipReadEnabled: Promise.resolve(transaction.ccipReadEnabled) + })]; + case 2: + resolved = _a.sent(); + return [2 /*return*/, this._call(resolved.transaction, resolved.blockTag, resolved.ccipReadEnabled ? 0 : -1)]; + } + }); + }); + }; + 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_9; + 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_9 = _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 currentName, addr, resolver, _a; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + currentName = name; + _b.label = 1; + case 1: + if (!true) return [3 /*break*/, 6]; + if (currentName === "" || currentName === ".") { + return [2 /*return*/, null]; + } + // Optimization since the eth node cannot change and does + // not have a wildcard resolver + if (name !== "eth" && currentName === "eth") { + return [2 /*return*/, null]; + } + return [4 /*yield*/, this._getResolver(currentName, "getResolver")]; + case 2: + addr = _b.sent(); + if (!(addr != null)) return [3 /*break*/, 5]; + resolver = new Resolver(this, addr, name); + _a = currentName !== name; + if (!_a) return [3 /*break*/, 4]; + return [4 /*yield*/, resolver.supportsWildcard()]; + case 3: + _a = !(_b.sent()); + _b.label = 4; + case 4: + // Legacy resolver found, using EIP-2544 so it isn't safe to use + if (_a) { + return [2 /*return*/, null]; + } + return [2 /*return*/, resolver]; + case 5: + // Get the parent node + currentName = currentName.split(".").slice(1).join("."); + return [3 /*break*/, 1]; + case 6: return [2 /*return*/]; + } + }); + }); + }; + BaseProvider.prototype._getResolver = function (name, operation) { + return __awaiter(this, void 0, void 0, function () { + var network, addrData, error_10; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (operation == null) { + operation = "ENS"; + } + return [4 /*yield*/, this.getNetwork()]; + case 1: + network = _a.sent(); + // No ENS... + if (!network.ensAddress) { + logger.throwError("network does not support ENS", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: operation, network: network.name }); + } + _a.label = 2; + case 2: + _a.trys.push([2, 4, , 5]); + return [4 /*yield*/, this.call({ + to: network.ensAddress, + data: ("0x0178b8bf" + (0, hash_1.namehash)(name).substring(2)) + })]; + case 3: + addrData = _a.sent(); + return [2 /*return*/, this.formatter.callAddress(addrData)]; + case 4: + error_10 = _a.sent(); + return [3 /*break*/, 5]; + case 5: return [2 /*return*/, null]; + } + }); + }); + }; + 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 node, resolverAddr, name, _a, 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); + node = address.substring(2).toLowerCase() + ".addr.reverse"; + return [4 /*yield*/, this._getResolver(node, "lookupAddress")]; + case 2: + resolverAddr = _b.sent(); + if (resolverAddr == null) { + return [2 /*return*/, null]; + } + _a = _parseString; + return [4 /*yield*/, this.call({ + to: resolverAddr, + data: ("0x691f3431" + (0, hash_1.namehash)(node).substring(2)) + })]; + case 3: + name = _a.apply(void 0, [_b.sent(), 0]); + 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, node, resolverAddress, avatar_1, error_11, name_1, _a, error_12, avatar; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + resolver = null; + if (!(0, bytes_1.isHexString)(nameOrAddress)) return [3 /*break*/, 10]; + address = this.formatter.address(nameOrAddress); + node = address.substring(2).toLowerCase() + ".addr.reverse"; + return [4 /*yield*/, this._getResolver(node, "getAvatar")]; + case 1: + resolverAddress = _b.sent(); + if (!resolverAddress) { + return [2 /*return*/, null]; + } + // Try resolving the avatar against the addr.reverse resolver + resolver = new Resolver(this, resolverAddress, node); + _b.label = 2; + case 2: + _b.trys.push([2, 4, , 5]); + return [4 /*yield*/, resolver.getAvatar()]; + case 3: + avatar_1 = _b.sent(); + if (avatar_1) { + return [2 /*return*/, avatar_1.url]; + } + return [3 /*break*/, 5]; + case 4: + error_11 = _b.sent(); + if (error_11.code !== logger_1.Logger.errors.CALL_EXCEPTION) { + throw error_11; + } + return [3 /*break*/, 5]; + case 5: + _b.trys.push([5, 8, , 9]); + _a = _parseString; + return [4 /*yield*/, this.call({ + to: resolverAddress, + data: ("0x691f3431" + (0, hash_1.namehash)(node).substring(2)) + })]; + case 6: + name_1 = _a.apply(void 0, [_b.sent(), 0]); + return [4 /*yield*/, this.getResolver(name_1)]; + case 7: + resolver = _b.sent(); + return [3 /*break*/, 9]; + case 8: + error_12 = _b.sent(); + if (error_12.code !== logger_1.Logger.errors.CALL_EXCEPTION) { + throw error_12; + } + return [2 /*return*/, null]; + case 9: return [3 /*break*/, 12]; + case 10: return [4 /*yield*/, this.getResolver(nameOrAddress)]; + case 11: + // ENS name; forward lookup with wildcard + resolver = _b.sent(); + if (!resolver) { + return [2 /*return*/, null]; + } + _b.label = 12; + case 12: return [4 /*yield*/, resolver.getAvatar()]; + case 13: + avatar = _b.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/test/node_modules/@ethersproject/providers/lib/base-provider.js.map b/test/node_modules/@ethersproject/providers/lib/base-provider.js.map new file mode 100644 index 0000000..4b58523 --- /dev/null +++ b/test/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,gDAA+D;AAC/D,8CAA8C;AAC9C,sDAAmE;AACnE,8CAAuJ;AACvJ,sDAAoD;AACpD,4CAA0D;AAC1D,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,IAAM,kBAAkB,GAAG,EAAE,CAAC;AAE9B,8BAA8B;AAC9B,qBAAqB;AAErB,SAAS,UAAU,CAAC,KAAa;IAC5B,IAAI,KAAK,IAAI,IAAI,EAAE;QAAE,OAAO,MAAM,CAAC;KAAE;IACrC,IAAI,IAAA,qBAAa,EAAC,KAAK,CAAC,KAAK,EAAE,EAAE;QAC7B,MAAM,CAAC,kBAAkB,CAAC,eAAe,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;KAC9D;IACD,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC;AAChC,CAAC;AAED,SAAS,eAAe,CAAC,MAAqC;IAC1D,sDAAsD;IACtD,MAAM,GAAG,MAAM,CA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C;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,AA3+CD,CAAkC,4BAAQ,GA2+CzC;AA3+CY,oCAAY"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib/browser-ipc-provider.d.ts b/test/node_modules/@ethersproject/providers/lib/browser-ipc-provider.d.ts new file mode 100644 index 0000000..ea20770 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/browser-ipc-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib/browser-ipc-provider.d.ts.map new file mode 100644 index 0000000..708316d --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/browser-ipc-provider.js b/test/node_modules/@ethersproject/providers/lib/browser-ipc-provider.js new file mode 100644 index 0000000..094898f --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/browser-ipc-provider.js.map b/test/node_modules/@ethersproject/providers/lib/browser-ipc-provider.js.map new file mode 100644 index 0000000..0205e00 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/browser-net.d.ts b/test/node_modules/@ethersproject/providers/lib/browser-net.d.ts new file mode 100644 index 0000000..96ee0f6 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/browser-net.d.ts.map b/test/node_modules/@ethersproject/providers/lib/browser-net.d.ts.map new file mode 100644 index 0000000..23f075f --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/browser-net.js b/test/node_modules/@ethersproject/providers/lib/browser-net.js new file mode 100644 index 0000000..c039b70 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/browser-net.js.map b/test/node_modules/@ethersproject/providers/lib/browser-net.js.map new file mode 100644 index 0000000..a97cf8c --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/browser-ws.d.ts b/test/node_modules/@ethersproject/providers/lib/browser-ws.d.ts new file mode 100644 index 0000000..a9d6598 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/browser-ws.d.ts.map b/test/node_modules/@ethersproject/providers/lib/browser-ws.d.ts.map new file mode 100644 index 0000000..56b5add --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/browser-ws.js b/test/node_modules/@ethersproject/providers/lib/browser-ws.js new file mode 100644 index 0000000..2588e01 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/browser-ws.js.map b/test/node_modules/@ethersproject/providers/lib/browser-ws.js.map new file mode 100644 index 0000000..d3f8ff1 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/cloudflare-provider.d.ts b/test/node_modules/@ethersproject/providers/lib/cloudflare-provider.d.ts new file mode 100644 index 0000000..f209dd3 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/cloudflare-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib/cloudflare-provider.d.ts.map new file mode 100644 index 0000000..2a3ef84 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/cloudflare-provider.js b/test/node_modules/@ethersproject/providers/lib/cloudflare-provider.js new file mode 100644 index 0000000..63b2452 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/cloudflare-provider.js.map b/test/node_modules/@ethersproject/providers/lib/cloudflare-provider.js.map new file mode 100644 index 0000000..33a9a99 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/etherscan-provider.d.ts b/test/node_modules/@ethersproject/providers/lib/etherscan-provider.d.ts new file mode 100644 index 0000000..07e90a1 --- /dev/null +++ b/test/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 | null; + 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/test/node_modules/@ethersproject/providers/lib/etherscan-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib/etherscan-provider.d.ts.map new file mode 100644 index 0000000..dc23bfb --- /dev/null +++ b/test/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,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;AA+I/C,qBAAa,iBAAkB,SAAQ,YAAY;IAC/C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;gBAEnB,OAAO,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM;IAOjD,UAAU,IAAI,MAAM;IA0BpB,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/test/node_modules/@ethersproject/providers/lib/etherscan-provider.js b/test/node_modules/@ethersproject/providers/lib/etherscan-provider.js new file mode 100644 index 0000000..b386700 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib/etherscan-provider.js @@ -0,0 +1,528 @@ +"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 || typeof (result.message) !== "string" || !result.message.match(/^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); +} +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 _this = _super.call(this, network) || this; + (0, properties_1.defineReadOnly)(_this, "baseUrl", _this.getBaseUrl()); + (0, properties_1.defineReadOnly)(_this, "apiKey", apiKey || null); + return _this; + } + EtherscanProvider.prototype.getBaseUrl = function () { + switch (this.network ? this.network.name : "invalid") { + case "homestead": + return "https:/\/api.etherscan.io"; + case "goerli": + return "https:/\/api-goerli.etherscan.io"; + case "sepolia": + return "https:/\/api-sepolia.etherscan.io"; + case "matic": + return "https:/\/api.polygonscan.com"; + case "maticmum": + return "https:/\/api-testnet.polygonscan.com"; + case "arbitrum": + return "https:/\/api.arbiscan.io"; + case "arbitrum-goerli": + return "https:/\/api-goerli.arbiscan.io"; + case "optimism": + return "https:/\/api-optimistic.etherscan.io"; + case "optimism-goerli": + return "https:/\/api-goerli-optimistic.etherscan.io"; + default: + } + return logger.throwArgumentError("unsupported network", "network", this.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 == null); + }; + return EtherscanProvider; +}(base_provider_1.BaseProvider)); +exports.EtherscanProvider = EtherscanProvider; +//# sourceMappingURL=etherscan-provider.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib/etherscan-provider.js.map b/test/node_modules/@ethersproject/providers/lib/etherscan-provider.js.map new file mode 100644 index 0000000..b927622 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib/etherscan-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"etherscan-provider.js","sourceRoot":"","sources":["../src.ts/etherscan-provider.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGb,8CAAsE;AAEtE,wDAAqE;AACrE,4DAA4D;AAC5D,0CAA+D;AAE/D,yCAAkD;AAElD,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,iDAA+C;AAG/C,sEAAsE;AACtE,SAAS,sBAAsB,CAAC,WAA+B;IAC3D,IAAM,M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;IACL,wBAAC;AAAD,CAAC,AAvSD,CAAuC,4BAAY,GAuSlD;AAvSY,8CAAiB"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib/fallback-provider.d.ts b/test/node_modules/@ethersproject/providers/lib/fallback-provider.d.ts new file mode 100644 index 0000000..b9f38da --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/fallback-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib/fallback-provider.d.ts.map new file mode 100644 index 0000000..aabaafb --- /dev/null +++ b/test/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;AAmSD,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;IAyD1E,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/test/node_modules/@ethersproject/providers/lib/fallback-provider.js b/test/node_modules/@ethersproject/providers/lib/fallback-provider.js new file mode 100644 index 0000000..53b5d8a --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib/fallback-provider.js @@ -0,0 +1,699 @@ +"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: + if (method === "call" && params.blockTag) { + return [2 /*return*/, provider[method](params.transaction, params.blockTag)]; + } + 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 _this = this; + 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/test/node_modules/@ethersproject/providers/lib/fallback-provider.js.map b/test/node_modules/@ethersproject/providers/lib/fallback-provider.js.map new file mode 100644 index 0000000..e969b38 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib/fallback-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"f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C,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,AAxPD,CAAsC,4BAAY,GAwPjD;AAxPY,4CAAgB"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib/formatter.d.ts b/test/node_modules/@ethersproject/providers/lib/formatter.d.ts new file mode 100644 index 0000000..8d7f2f6 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/formatter.d.ts.map b/test/node_modules/@ethersproject/providers/lib/formatter.d.ts.map new file mode 100644 index 0000000..5a244c1 --- /dev/null +++ b/test/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,WAAW,CAAC;IACrB,UAAU,EAAE,WAAW,CAAC;IACxB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AE,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/test/node_modules/@ethersproject/providers/lib/formatter.js b/test/node_modules/@ethersproject/providers/lib/formatter.js new file mode 100644 index 0000000..7f118ae --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib/formatter.js @@ -0,0 +1,456 @@ +"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() { + 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: Formatter.allowNull(hash), + parentHash: hash, + number: number, + timestamp: number, + nonce: Formatter.allowNull(hex), + difficulty: this.difficulty.bind(this), + gasLimit: bigNumber, + gasUsed: bigNumber, + miner: Formatter.allowNull(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"; + } + switch (blockTag) { + case "earliest": return "0x0"; + case "latest": + case "pending": + case "safe": + case "finalized": + 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/test/node_modules/@ethersproject/providers/lib/formatter.js.map b/test/node_modules/@ethersproject/providers/lib/formatter.js.map new file mode 100644 index 0000000..1accd5c --- /dev/null +++ b/test/node_modules/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AG,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;AAhBD,kDAgBC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib/index.d.ts b/test/node_modules/@ethersproject/providers/lib/index.d.ts new file mode 100644 index 0000000..5b70b27 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib/index.d.ts @@ -0,0 +1,23 @@ +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 { AnkrProvider } from "./ankr-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, AnkrProvider, 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/test/node_modules/@ethersproject/providers/lib/index.d.ts.map b/test/node_modules/@ethersproject/providers/lib/index.d.ts.map new file mode 100644 index 0000000..52cd8b4 --- /dev/null +++ b/test/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,EAA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EACf,wBAAwB,EACxB,YAAY,EACZ,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/test/node_modules/@ethersproject/providers/lib/index.js b/test/node_modules/@ethersproject/providers/lib/index.js new file mode 100644 index 0000000..ccad1d6 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib/index.js @@ -0,0 +1,97 @@ +"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.AnkrProvider = 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 ankr_provider_1 = require("./ankr-provider"); +Object.defineProperty(exports, "AnkrProvider", { enumerable: true, get: function () { return ankr_provider_1.AnkrProvider; } }); +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].toLowerCase()) { + case "http": + case "https": + return new json_rpc_provider_1.JsonRpcProvider(network); + case "ws": + case "wss": + 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, + AnkrProvider: ankr_provider_1.AnkrProvider, + 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/test/node_modules/@ethersproject/providers/lib/index.js.map b/test/node_modules/@ethersproject/providers/lib/index.js.map new file mode 100644 index 0000000..fd0ddd7 --- /dev/null +++ b/test/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;AAoFtC,yFAxFA,4BAAQ,OAwFA;AAlFZ,oDAAqD;AA0HjD,2FA1HK,qBAAU,OA0HL;AAvHd,iDAAmF;AAgF/E,6FAhFK,4BAAY,OAgFL;AAEZ,yFAlF6C,wBAAQ,OAkF7C;AAhFZ,uDAA+E;AAyF3E,gGAzFK,kCAAe,OAyFL;AACf,yGA1FsB,2CAAwB,OA0FtB;A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AAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;QAC9C,IAAI,KAAK,EAAE;YACP,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,EAAE;gBAC5B,KAAK,MAAM,CAAC;gBAAC,KAAK,OAAO;oBACrB,OAAO,IAAI,mCAAe,CAAC,OAAO,CAAC,CAAC;gBACxC,KAAK,IAAI,CAAC;gBAAC,KAAK,KAAK;oBACjB,OAAO,IAAI,sCAAiB,CAAC,OAAO,CAAC,CAAC;gBAC1C;oBACI,MAAM,CAAC,kBAAkB,CAAC,wBAAwB,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;aAC/E;SACJ;KACJ;IAED,IAAM,CAAC,GAAG,IAAA,qBAAU,EAAC,OAAO,CAAC,CAAC;IAC9B,IAAI,CAAC,CAAC,IAAI,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,YAAY,8BAAA;QACZ,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;AA+CG,gDAAkB"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib/infura-provider.d.ts b/test/node_modules/@ethersproject/providers/lib/infura-provider.d.ts new file mode 100644 index 0000000..2f4e297 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/infura-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib/infura-provider.d.ts.map new file mode 100644 index 0000000..2a11fc3 --- /dev/null +++ b/test/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;IAwD5D,mBAAmB,IAAI,OAAO;CAGjC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib/infura-provider.js b/test/node_modules/@ethersproject/providers/lib/infura-provider.js new file mode 100644 index 0000000..7c360c3 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib/infura-provider.js @@ -0,0 +1,141 @@ +"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 "goerli": + host = "goerli.infura.io"; + break; + case "sepolia": + host = "sepolia.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-goerli": + host = "optimism-goerli.infura.io"; + break; + case "arbitrum": + host = "arbitrum-mainnet.infura.io"; + break; + case "arbitrum-goerli": + host = "arbitrum-goerli.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/test/node_modules/@ethersproject/providers/lib/infura-provider.js.map b/test/node_modules/@ethersproject/providers/lib/infura-provider.js.map new file mode 100644 index 0000000..a5b3c33 --- /dev/null +++ b/test/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,MA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I,OAAO,CAAC,IAAI,CAAC,SAAS,KAAK,gBAAgB,CAAC,CAAC;IACjD,CAAC;IACL,qBAAC;AAAD,CAAC,AAjGD,CAAoC,0CAAkB,GAiGrD;AAjGY,wCAAc"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib/ipc-provider.d.ts b/test/node_modules/@ethersproject/providers/lib/ipc-provider.d.ts new file mode 100644 index 0000000..21fc4d3 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/ipc-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib/ipc-provider.d.ts.map new file mode 100644 index 0000000..1867e85 --- /dev/null +++ b/test/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;IAY9C,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/test/node_modules/@ethersproject/providers/lib/ipc-provider.js b/test/node_modules/@ethersproject/providers/lib/ipc-provider.js new file mode 100644 index 0000000..31ae4f1 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib/ipc-provider.js @@ -0,0 +1,77 @@ +"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 _this = this; + 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/test/node_modules/@ethersproject/providers/lib/ipc-provider.js.map b/test/node_modules/@ethersproject/providers/lib/ipc-provider.js.map new file mode 100644 index 0000000..1f44984 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib/ipc-provider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ipc-provider.js","sourceRoot":"","sources":["../src.ts/ipc-provider.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;AAEb,2BAA8B;AAE9B,wDAA2D;AAG3D,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,yDAAsD;AAGtD;IAAiC,+BAAe;IAG5C,qBAAY,IAAY,EAAE,OAAoB;QAA9C,iBAQC;QAPG,IAAI,IAAI,IAAI,IAAI,EAAE;YACd,MAAM,CAAC,UAAU,CAAC,cAAc,EAAE,eAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAC;SACtF;QAED,QAAA,kBAAM,QAAQ,GAAG,IAAI,EAAE,OAAO,CAAC,SAAC;QAEhC,IAAA,2BAAc,EAAC,KAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;;IACvC,CAAC;IAED,0FAA0F;IAE1F,0BAAI,GAAJ,UAAK,MAAc,EAAE,MAAkB;QACnC,+DAA+D;QAC/D,0DAA0D;QAC1D,+DAA+D;QAC/D,6DAA6D;QAJjE,iBAyCC;QAnCG,IAAI,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC;YACzB,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,MAAM;YACd,EAAE,EAAE,EAAE;YACN,OAAO,EAAE,KAAK;SACjB,CAAC,CAAC;QAEH,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;YAC/B,IAAI,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAE/B,IAAI,MAAM,GAAG,IAAA,aAAO,EAAC,KAAI,CAAC,IAAI,CAAC,CAAC;YAEhC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,UAAC,IAAI;gBACnB,QAAQ,GAAG,MAAM,CAAC,MAAM,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,AAzDD,CAAiC,mCAAe,GAyD/C;AAzDY,kCAAW"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.d.ts b/test/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.d.ts new file mode 100644 index 0000000..2ad7763 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.d.ts.map new file mode 100644 index 0000000..c2efbf0 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.js b/test/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.js new file mode 100644 index 0000000..20f35c5 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.js.map b/test/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.js.map new file mode 100644 index 0000000..3ba7722 --- /dev/null +++ b/test/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;Y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EAAE,KAAI;qBACjB,CAAC,CAAC;oBAEH,6DAA6D;oBAC7D,uCAAuC;oBACvC,KAAK,CAAC,OAAO,CAAC,UAAC,eAAe,EAAE,KAAK;wBACjC,IAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;wBAC9B,IAAI,OAAO,CAAC,KAAK,EAAE;4BACf,IAAM,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;4BACzC,KAAM,CAAC,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,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/test/node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts b/test/node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts new file mode 100644 index 0000000..c3ef0af --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib/json-rpc-provider.d.ts.map new file mode 100644 index 0000000..258875a --- /dev/null +++ b/test/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,EAAE,MAAM,kCAAkC,CAAC;AACrG,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAE1G,OAAO,EAAE,KAAK,EAA8C,MAAM,sBAAsB,CAAC;AAEzF,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;AA0ItD,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,EAAE,eAAe,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM;IAwB9F,OAAO,CAAC,QAAQ,EAAE,QAAQ,GAAG,aAAa;IAM1C,gBAAgB,IAAI,aAAa;IAIjC,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC;IAe7B,wBAAwB,CAAC,WAAW,EAAE,UAAU,CA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I3B,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;IAY3B,sBAAsB,IAAI,OAAO,CAAC,OAAO,CAAC;IA8BhD,SAAS,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,aAAa;IAI1D,kBAAkB,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,sBAAsB;IAI5E,YAAY,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAMtC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,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/test/node_modules/@ethersproject/providers/lib/json-rpc-provider.js b/test/node_modules/@ethersproject/providers/lib/json-rpc-provider.js new file mode 100644 index 0000000..ef2d95b --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib/json-rpc-provider.js @@ -0,0 +1,855 @@ +"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 spelunk(value, requireData) { + if (value == null) { + return null; + } + // These *are* the droids we're looking for. + if (typeof (value.message) === "string" && value.message.match("reverted")) { + var data = (0, bytes_1.isHexString)(value.data) ? value.data : null; + if (!requireData || data) { + return { message: value.message, data: data }; + } + } + // Spelunk further... + if (typeof (value) === "object") { + for (var key in value) { + var result = spelunk(value[key], requireData); + if (result) { + return result; + } + } + return null; + } + // Might be a JSON string we can further descend... + if (typeof (value) === "string") { + try { + return spelunk(JSON.parse(value), requireData); + } + catch (error) { } + } + return null; +} +function checkError(method, error, params) { + var transaction = params.transaction || params.signedTransaction; + // Undo the "convenience" some nodes are attempting to prevent backwards + // incompatibility; maybe for v6 consider forwarding reverts as errors + if (method === "call") { + var result = spelunk(error, true); + if (result) { + return result.data; + } + // Nothing descriptive.. + logger.throwError("missing revert data in call exception; Transaction reverted without a reason string", logger_1.Logger.errors.CALL_EXCEPTION, { + data: "0x", + transaction: transaction, + error: error + }); + } + if (method === "estimateGas") { + // Try to find something, with a preference on SERVER_ERROR body + var result = spelunk(error.body, false); + if (result == null) { + result = spelunk(error, false); + } + // Found "reverted", this is a CALL_EXCEPTION + if (result) { + logger.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT, { + reason: result.message, + method: method, + transaction: transaction, + error: error + }); + } + } + // @TODO: Should we spelunk for message too? + 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(); + // "insufficient funds for gas * price + value + cost(data)" + if (message.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)) { + 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 (is )?too low/i)) { + 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|transaction gas price.*too low/i)) { + 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/i)) { + 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|revert/)) { + 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 _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) { + if (typeof (error.message) === "string" && error.message.match(/user denied/i)) { + logger.throwError("user rejected transaction", logger_1.Logger.errors.ACTION_REJECTED, { + action: "sendTransaction", + transaction: tx + }); + } + 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, error_2; + 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(); + _a.label = 2; + case 2: + _a.trys.push([2, 4, , 5]); + return [4 /*yield*/, this.provider.send("personal_sign", [(0, bytes_1.hexlify)(data), address.toLowerCase()])]; + case 3: return [2 /*return*/, _a.sent()]; + case 4: + error_2 = _a.sent(); + if (typeof (error_2.message) === "string" && error_2.message.match(/user denied/i)) { + logger.throwError("user rejected signing", logger_1.Logger.errors.ACTION_REJECTED, { + action: "signMessage", + from: address, + messageData: message + }); + } + throw error_2; + case 5: return [2 /*return*/]; + } + }); + }); + }; + JsonRpcSigner.prototype._legacySignMessage = function (message) { + return __awaiter(this, void 0, void 0, function () { + var data, address, error_3; + 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(); + _a.label = 2; + case 2: + _a.trys.push([2, 4, , 5]); + return [4 /*yield*/, this.provider.send("eth_sign", [address.toLowerCase(), (0, bytes_1.hexlify)(data)])]; + case 3: + // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign + return [2 /*return*/, _a.sent()]; + case 4: + error_3 = _a.sent(); + if (typeof (error_3.message) === "string" && error_3.message.match(/user denied/i)) { + logger.throwError("user rejected signing", logger_1.Logger.errors.ACTION_REJECTED, { + action: "_legacySignMessage", + from: address, + messageData: message + }); + } + throw error_3; + case 5: return [2 /*return*/]; + } + }); + }); + }; + JsonRpcSigner.prototype._signTypedData = function (domain, types, value) { + return __awaiter(this, void 0, void 0, function () { + var populated, address, error_4; + 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(); + _a.label = 3; + case 3: + _a.trys.push([3, 5, , 6]); + return [4 /*yield*/, this.provider.send("eth_signTypedData_v4", [ + address.toLowerCase(), + JSON.stringify(hash_1._TypedDataEncoder.getPayload(populated.domain, types, populated.value)) + ])]; + case 4: return [2 /*return*/, _a.sent()]; + case 5: + error_4 = _a.sent(); + if (typeof (error_4.message) === "string" && error_4.message.match(/user denied/i)) { + logger.throwError("user rejected signing", logger_1.Logger.errors.ACTION_REJECTED, { + action: "_signTypedData", + from: address, + messageData: { domain: populated.domain, types: types, value: populated.value } + }); + } + throw error_4; + case 6: return [2 /*return*/]; + } + }); + }); + }; + 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 _this = this; + 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_5, error_6, 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_5 = _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_6 = _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), (0, bytes_1.hexZeroPad)(params.position, 32), 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_7; + 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_7 = _a.sent(); + return [2 /*return*/, checkError(method, error_7, 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 = {}; + // JSON-RPC now requires numeric values to be "quantity" values + ["chainId", "gasLimit", "gasPrice", "type", "maxFeePerGas", "maxPriorityFeePerGas", "nonce", "value"].forEach(function (key) { + if (transaction[key] == null) { + return; + } + var value = (0, bytes_1.hexValue)(bignumber_1.BigNumber.from(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/test/node_modules/@ethersproject/providers/lib/json-rpc-provider.js.map b/test/node_modules/@ethersproject/providers/lib/json-rpc-provider.js.map new file mode 100644 index 0000000..f8c86e2 --- /dev/null +++ b/test/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,8CAAyF;AACzF,4CAAwD;AAExD,wDAA6I;AAC7I,kDAAqD;AACrD,4DAAwE;AACxE,0CAAqE;AAErE,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,iDAAsD;AAGtD,IAAM,QAAQ,GAAG,CAAE,MAAM,EAAE,aAAa,CAAE,CAAC;AAE3C,SAAS,OAAO,CAAC,KAAU,EAAE,WAAoB;IAC7C,IAAI,KAAK,IAAI,IAAI,EAAE;QAAE,OAAO,IAAI,CAAC;KAAE;IAEnC,4CAA4C;IAC5C,IAAI,OAAM,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE;QACvE,IAAM,IAAI,GAAG,IAAA,mBAAW,EAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAA,CAAC,CAAC,IAAI,CAAC;QACxD,IAAI,CAAC,WAAW,IAAI,IAAI,EAAE;YACtB,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,MAAA,EAAE,CAAC;SAC3C;KACJ;IAED,qBAAqB;IACrB,IAAI,OAAM,CAA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D,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,AA7VD,CAAqC,4BAAY,GA6VhD;AA7VY,0CAAe"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib/nodesmith-provider.d.ts b/test/node_modules/@ethersproject/providers/lib/nodesmith-provider.d.ts new file mode 100644 index 0000000..3f20d33 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/nodesmith-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib/nodesmith-provider.d.ts.map new file mode 100644 index 0000000..c0a3493 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/nodesmith-provider.js b/test/node_modules/@ethersproject/providers/lib/nodesmith-provider.js new file mode 100644 index 0000000..d0b788a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/nodesmith-provider.js.map b/test/node_modules/@ethersproject/providers/lib/nodesmith-provider.js.map new file mode 100644 index 0000000..2ca4dff --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/pocket-provider.d.ts b/test/node_modules/@ethersproject/providers/lib/pocket-provider.d.ts new file mode 100644 index 0000000..7376e70 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib/pocket-provider.d.ts @@ -0,0 +1,12 @@ +import { Network } 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; + 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/test/node_modules/@ethersproject/providers/lib/pocket-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib/pocket-provider.d.ts.map new file mode 100644 index 0000000..fcbc793 --- /dev/null +++ b/test/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,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAMpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAK7D,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;IAE/B,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG;IA4BlC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,GAAG,cAAc;IA0C5D,mBAAmB,IAAI,OAAO;CAGjC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib/pocket-provider.js b/test/node_modules/@ethersproject/providers/lib/pocket-provider.js new file mode 100644 index 0000000..a2e4348 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib/pocket-provider.js @@ -0,0 +1,98 @@ +"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 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 defaultApplicationId = "62e1ad51b37b8e00394bda3b"; +var PocketProvider = /** @class */ (function (_super) { + __extends(PocketProvider, _super); + function PocketProvider() { + return _super !== null && _super.apply(this, arguments) || this; + } + PocketProvider.getApiKey = function (apiKey) { + var apiKeyObj = { + applicationId: null, + loadBalancer: true, + applicationSecretKey: null + }; + // Parse applicationId and applicationSecretKey + if (apiKey == null) { + apiKeyObj.applicationId = defaultApplicationId; + } + else if (typeof (apiKey) === "string") { + apiKeyObj.applicationId = apiKey; + } + else if (apiKey.applicationSecretKey != null) { + apiKeyObj.applicationId = apiKey.applicationId; + apiKeyObj.applicationSecretKey = apiKey.applicationSecretKey; + } + else if (apiKey.applicationId) { + apiKeyObj.applicationId = apiKey.applicationId; + } + else { + logger.throwArgumentError("unsupported PocketProvider apiKey", "apiKey", apiKey); + } + return apiKeyObj; + }; + PocketProvider.getUrl = function (network, apiKey) { + var host = null; + switch (network ? network.name : "unknown") { + case "goerli": + host = "eth-goerli.gateway.pokt.network"; + break; + case "homestead": + host = "eth-mainnet.gateway.pokt.network"; + break; + case "kovan": + host = "poa-kovan.gateway.pokt.network"; + break; + case "matic": + host = "poly-mainnet.gateway.pokt.network"; + break; + case "maticmum": + host = "polygon-mumbai-rpc.gateway.pokt.network"; + break; + case "rinkeby": + host = "eth-rinkeby.gateway.pokt.network"; + break; + case "ropsten": + host = "eth-ropsten.gateway.pokt.network"; + break; + default: + logger.throwError("unsupported network", logger_1.Logger.errors.INVALID_ARGUMENT, { + argument: "network", + value: network + }); + } + var url = "https://" + host + "/v1/lb/" + apiKey.applicationId; + var connection = { headers: {}, url: url }; + if (apiKey.applicationSecretKey != null) { + connection.user = ""; + connection.password = apiKey.applicationSecretKey; + } + return connection; + }; + PocketProvider.prototype.isCommunityResource = function () { + return (this.applicationId === defaultApplicationId); + }; + 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/test/node_modules/@ethersproject/providers/lib/pocket-provider.js.map b/test/node_modules/@ethersproject/providers/lib/pocket-provider.js.map new file mode 100644 index 0000000..ad7e487 --- /dev/null +++ b/test/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;;;;;;;;;;;;;;;;;;AAKb,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAEnC,iEAA6D;AAE7D,IAAM,oBAAoB,GAAG,0BAA0B,CAAC;AAGxD;IAAoC,kCAAkB;IAAtD;;IA8EA,CAAC;IAzEU,wBAAS,GAAhB,UAAiB,MAAW;QACxB,IAAM,SAAS,GAAmF;YAC9F,aAAa,EAAE,IAAI;YACnB,YAAY,EAAE,IAAI;YAClB,oBAAoB,EAAE,IAAI;SAC7B,CAAC;QAEF,+CAA+C;QAC/C,IAAI,MAAM,IAAI,IAAI,EAAE;YAChB,SAAS,CAAC,aAAa,GAAG,oBAAoB,CAAC;SAElD;aAAM,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,QAAQ,EAAE;YACrC,SAAS,CAAC,aAAa,GAAG,MAAM,CAAC;SAEpC;aAAM,IAAI,MAAM,CAAC,oBAAoB,IAAI,IAAI,EAAE;YAC5C,SAAS,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;YAC/C,SAAS,CAAC,oBAAoB,GAAG,MAAM,CAAC,oBAAoB,CAAC;SAEhE;aAAM,IAAI,MAAM,CAAC,aAAa,EAAE;YAC7B,SAAS,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;SAElD;aAAM;YACH,MAAM,CAAC,kBAAkB,CAAC,mCAAmC,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;SACpF;QAED,OAAO,SAAS,CA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AC;AAAD,CAAC,AA9ED,CAAoC,0CAAkB,GA8ErD;AA9EY,wCAAc"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.d.ts b/test/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.d.ts new file mode 100644 index 0000000..1ddde45 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.d.ts.map new file mode 100644 index 0000000..74542cd --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.js b/test/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.js new file mode 100644 index 0000000..f535db3 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.js.map b/test/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.js.map new file mode 100644 index 0000000..1e3bdc4 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib/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,wDAAsE;AAGtE,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAGnC,yDAAqE;AAIrE,qEAAqE;AACrE,kEAAkE;AAClE,uEAAuE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provider.d.ts b/test/node_modules/@ethersproject/providers/lib/web3-provider.d.ts new file mode 100644 index 0000000..690b300 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/web3-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib/web3-provider.d.ts.map new file mode 100644 index 0000000..54cf94b --- /dev/null +++ b/test/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,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;IAyC/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/test/node_modules/@ethersproject/providers/lib/web3-provider.js b/test/node_modules/@ethersproject/providers/lib/web3-provider.js new file mode 100644 index 0000000..c6f99f2 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib/web3-provider.js @@ -0,0 +1,155 @@ +"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 _this = this; + 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/test/node_modules/@ethersproject/providers/lib/web3-provider.js.map b/test/node_modules/@ethersproject/providers/lib/web3-provider.js.map new file mode 100644 index 0000000..b1653d1 --- /dev/null +++ b/test/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;AACr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,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,AAhDD,CAAkC,mCAAe,GAgDhD;AAhDY,oCAAY"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib/websocket-provider.d.ts b/test/node_modules/@ethersproject/providers/lib/websocket-provider.d.ts new file mode 100644 index 0000000..4ba6bc5 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib/websocket-provider.d.ts @@ -0,0 +1,48 @@ +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 interface WebSocketLike { + onopen: ((...args: Array) => any) | null; + onmessage: ((...args: Array) => any) | null; + onerror: ((...args: Array) => any) | null; + readyState: number; + send(payload: any): void; + close(code?: number, reason?: string): 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 | WebSocketLike, network?: Networkish); + get websocket(): WebSocketLike; + 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/test/node_modules/@ethersproject/providers/lib/websocket-provider.d.ts.map b/test/node_modules/@ethersproject/providers/lib/websocket-provider.d.ts.map new file mode 100644 index 0000000..0b61df6 --- /dev/null +++ b/test/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;AAEF,MAAM,WAAW,aAAa;IAC1B,MAAM,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,GAAG,IAAI,CAAC;IAC9C,SAAS,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,GAAG,IAAI,CAAC;IACjD,OAAO,EAAE,CAAC,CAA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vD,MAAM,CAAC,UAAU,IAAI,MAAM;IAIrB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAYnG,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IA2D/B,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAyBxB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAkBjC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib/websocket-provider.js b/test/node_modules/@ethersproject/providers/lib/websocket-provider.js new file mode 100644 index 0000000..640d84f --- /dev/null +++ b/test/node_modules/@ethersproject/providers/lib/websocket-provider.js @@ -0,0 +1,384 @@ +"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" + }); + } + if (typeof (url) === "string") { + _this = _super.call(this, url, network) || this; + } + else { + _this = _super.call(this, "_websocket", network) || this; + } + _this._pollingInterval = -1; + _this._wsReady = false; + if (typeof (url) === "string") { + (0, properties_1.defineReadOnly)(_this, "_websocket", new ws_1.WebSocket(_this.connection.url)); + } + else { + (0, properties_1.defineReadOnly)(_this, "_websocket", 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; + } + Object.defineProperty(WebSocketProvider.prototype, "websocket", { + // Cannot narrow the type of _websocket, as that is not backwards compatible + // so we add a getter and let the WebSocket be a public API. + get: function () { return this._websocket; }, + enumerable: false, + configurable: true + }); + 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/test/node_modules/@ethersproject/providers/lib/websocket-provider.js.map b/test/node_modules/@ethersproject/providers/lib/websocket-provider.js.map new file mode 100644 index 0000000..1c535c2 --- /dev/null +++ b/test/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,CA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EAAE;YAAE,OAAO;SAAE;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACzB,KAAK,CAAC,IAAI,CAAC,UAAC,KAAK;YACZ,IAAI,CAAC,KAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;gBAAE,OAAO;aAAE;YACnC,OAAO,KAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACzB,KAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAE,KAAK,CAAE,CAAC,CAAC;QAC5C,CAAC,CAAC,CAAC;IACP,CAAC;IAEK,mCAAO,GAAb;;;;;;6BAEQ,CAAA,IAAI,CAAC,SAAS,CAAC,UAAU,KAAK,cAAS,CAAC,UAAU,CAAA,EAAlD,wBAAkD;wBAClD,qBAAM,CAAC,IAAI,OAAO,CAAC,UAAC,OAAO;gCACvB,KAAI,CAAC,SAAS,CAAC,MAAM,GAAG;oCACpB,OAAO,CAAC,IAAI,CAAC,CAAC;gCAClB,CAAC,CAAC;gCAEF,KAAI,CAAC,SAAS,CAAC,OAAO,GAAG;oCACrB,OAAO,CAAC,KAAK,CAAC,CAAC;gCACnB,CAAC,CAAC;4BACN,CAAC,CAAC,CAAC,EAAA;;wBARH,SAQG,CAAC;;;wBAGR,SAAS;wBACT,gFAAgF;wBAChF,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;;;;;KAC9B;IACL,wBAAC;AAAD,CAAC,AAtSD,CAAuC,mCAAe,GAsSrD;AAtSY,8CAAiB"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/providers/lib/ws.d.ts b/test/node_modules/@ethersproject/providers/lib/ws.d.ts new file mode 100644 index 0000000..f7e08bf --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/ws.d.ts.map b/test/node_modules/@ethersproject/providers/lib/ws.d.ts.map new file mode 100644 index 0000000..76bbaa1 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/ws.js b/test/node_modules/@ethersproject/providers/lib/ws.js new file mode 100644 index 0000000..1028345 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/lib/ws.js.map b/test/node_modules/@ethersproject/providers/lib/ws.js.map new file mode 100644 index 0000000..65c1c7c --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/package.json b/test/node_modules/@ethersproject/providers/package.json new file mode 100644 index 0000000..f7995bc --- /dev/null +++ b/test/node_modules/@ethersproject/providers/package.json @@ -0,0 +1,74 @@ +{ + "_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.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/base64": "^5.7.0", + "@ethersproject/basex": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/networks": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/random": "^5.7.0", + "@ethersproject/rlp": "^5.7.0", + "@ethersproject/sha2": "^5.7.0", + "@ethersproject/strings": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/web": "^5.7.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": "60248f32491b13e914f801402d3041a37e4bf44a", + "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": "0x7cd2809b100a1f50c6855245bf6ee7e848535447206f8fb83837445400204372", + "types": "./lib/index.d.ts", + "version": "5.7.2" +} diff --git a/test/node_modules/@ethersproject/providers/src.ts/_version.ts b/test/node_modules/@ethersproject/providers/src.ts/_version.ts new file mode 100644 index 0000000..b4f0d0e --- /dev/null +++ b/test/node_modules/@ethersproject/providers/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "providers/5.7.2"; diff --git a/test/node_modules/@ethersproject/providers/src.ts/alchemy-provider.ts b/test/node_modules/@ethersproject/providers/src.ts/alchemy-provider.ts new file mode 100644 index 0000000..f23b494 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/src.ts/alchemy-provider.ts @@ -0,0 +1,101 @@ +"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 "goerli": + host = "eth-goerli.g.alchemy.com/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-goerli": + host = "arb-goerli.g.alchemy.com/v2/"; + break; + case "optimism": + host = "opt-mainnet.g.alchemy.com/v2/"; + break; + case "optimism-goerli": + host = "opt-goerli.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/test/node_modules/@ethersproject/providers/src.ts/ankr-provider.ts b/test/node_modules/@ethersproject/providers/src.ts/ankr-provider.ts new file mode 100644 index 0000000..844322f --- /dev/null +++ b/test/node_modules/@ethersproject/providers/src.ts/ankr-provider.ts @@ -0,0 +1,68 @@ + +import { Network } from "@ethersproject/networks"; + +import { showThrottleMessage } from "./formatter"; +import { UrlJsonRpcProvider } from "./url-json-rpc-provider"; + +import type { ConnectionInfo } from "@ethersproject/web"; + +import { Logger } from "@ethersproject/logger"; +import { version } from "./_version"; +const logger = new Logger(version); + + +const defaultApiKey = "9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972"; + +function getHost(name: string): string { + switch (name) { + case "homestead": + return "rpc.ankr.com/eth/"; + case "ropsten": + return "rpc.ankr.com/eth_ropsten/"; + case "rinkeby": + return "rpc.ankr.com/eth_rinkeby/"; + case "goerli": + return "rpc.ankr.com/eth_goerli/"; + + case "matic": + return "rpc.ankr.com/polygon/"; + + case "arbitrum": + return "rpc.ankr.com/arbitrum/"; + } + return logger.throwArgumentError("unsupported network", "name", name); +} + +export class AnkrProvider extends UrlJsonRpcProvider { + readonly apiKey: string; + + isCommunityResource(): boolean { + return (this.apiKey === defaultApiKey); + } + + static getApiKey(apiKey: any): any { + if (apiKey == null) { return defaultApiKey; } + return apiKey; + } + + static getUrl(network: Network, apiKey: any): ConnectionInfo { + if (apiKey == null) { apiKey = defaultApiKey; } + const connection: ConnectionInfo = { + allowGzip: true, + url: ("https:/\/" + getHost(network.name) + apiKey), + throttleCallback: (attempt: number, url: string) => { + if (apiKey.apiKey === defaultApiKey) { + showThrottleMessage(); + } + return Promise.resolve(true); + } + }; + + if (apiKey.projectSecret != null) { + connection.user = ""; + connection.password = apiKey.projectSecret + } + + return connection; + } +} diff --git a/test/node_modules/@ethersproject/providers/src.ts/base-provider.ts b/test/node_modules/@ethersproject/providers/src.ts/base-provider.ts new file mode 100644 index 0000000..c9ef59f --- /dev/null +++ b/test/node_modules/@ethersproject/providers/src.ts/base-provider.ts @@ -0,0 +1,2217 @@ +"use strict"; + +import { + Block, BlockTag, BlockWithTransactions, EventType, Filter, FilterByBlockHash, ForkEvent, + Listener, Log, Provider, TransactionReceipt, TransactionRequest, TransactionResponse +} from "@ethersproject/abstract-provider"; +import { encode as base64Encode } from "@ethersproject/base64"; +import { Base58 } from "@ethersproject/basex"; +import { BigNumber, BigNumberish } from "@ethersproject/bignumber"; +import { arrayify, BytesLike, concat, hexConcat, hexDataLength, hexDataSlice, hexlify, hexValue, hexZeroPad, isHexString } from "@ethersproject/bytes"; +import { HashZero } from "@ethersproject/constants"; +import { dnsEncode, 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"; + +const MAX_CCIP_REDIRECTS = 10; + +////////////////////////////// +// 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; + + _lastBlockNumber: number + _inflight: boolean; + + constructor(tag: string, listener: Listener, once: boolean) { + defineReadOnly(this, "tag", tag); + defineReadOnly(this, "listener", listener); + defineReadOnly(this, "once", once); + + this._lastBlockNumber = -2; + this._inflight = false; + } + + 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 matcherIpfs = new RegExp("^(ipfs):/\/(.*)$", "i"); +const matchers = [ + new RegExp("^(https):/\/(.*)$", "i"), + new RegExp("^(data):(.*)$", "i"), + matcherIpfs, + new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$", "i"), +]; + +function _parseString(result: string, start: number): null | string { + try { + return toUtf8String(_parseBytes(result, start)); + } catch(error) { } + return null; +} + +function _parseBytes(result: string, start: number): null | string { + if (result === "0x") { return null; } + + const offset = BigNumber.from(hexDataSlice(result, start, start + 32)).toNumber(); + const length = BigNumber.from(hexDataSlice(result, offset, offset + 32)).toNumber(); + + return hexDataSlice(result, offset + 32, offset + 32 + length); +} + +// Trim off the ipfs:// prefix and return the default gateway URL +function getIpfsLink(link: string): string { + if (link.match(/^ipfs:\/\/ipfs\//i)) { + link = link.substring(12); + } else if (link.match(/^ipfs:\/\//i)) { + link = link.substring(7); + } else { + logger.throwArgumentError("unsupported IPFS format", "link", link); + } + + return `https:/\/gateway.ipfs.io/ipfs/${ link }`; +} + +function numPad(value: number): Uint8Array { + const result = arrayify(value); + if (result.length > 32) { throw new Error("internal; should not happen"); } + + const padded = new Uint8Array(32); + padded.set(result, 32 - result.length); + return padded; +} + +function bytesPad(value: Uint8Array): Uint8Array { + if ((value.length % 32) === 0) { return value; } + + const result = new Uint8Array(Math.ceil(value.length / 32) * 32); + result.set(value); + return result; +} + +// ABI Encodes a series of (bytes, bytes, ...) +function encodeBytes(datas: Array) { + const result: Array = [ ]; + + let byteCount = 0; + + // Add place-holders for pointers as we add items + for (let i = 0; i < datas.length; i++) { + result.push(null); + byteCount += 32; + } + + for (let i = 0; i < datas.length; i++) { + const data = arrayify(datas[i]); + + // Update the bytes offset + result[i] = numPad(byteCount); + + // The length and padded value of data + result.push(numPad(data.length)); + result.push(bytesPad(data)); + byteCount += 32 + Math.ceil(data.length / 32) * 32; + } + + return hexConcat(result); +} + +export class Resolver implements EnsResolver { + readonly provider: BaseProvider; + + readonly name: string; + readonly address: string; + + readonly _resolvedAddress: null | string; + + // For EIP-2544 names, the ancestor that provided the resolver + _supportsEip2544: null | Promise; + + // 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); + } + + supportsWildcard(): Promise { + if (!this._supportsEip2544) { + // supportsInterface(bytes4 = selector("resolve(bytes,bytes)")) + this._supportsEip2544 = this.provider.call({ + to: this.address, + data: "0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000" + }).then((result) => { + return BigNumber.from(result).eq(1); + }).catch((error) => { + if (error.code === Logger.errors.CALL_EXCEPTION) { return false; } + // Rethrow the error: link is down, etc. Let future attempts retry. + this._supportsEip2544 = null; + throw error; + }); + } + + return this._supportsEip2544; + } + + async _fetch(selector: string, parameters?: string): Promise { + + // e.g. keccak256("addr(bytes32,uint256)") + const tx = { + to: this.address, + ccipReadEnabled: true, + data: hexConcat([ selector, namehash(this.name), (parameters || "0x") ]) + }; + + // Wildcard support; use EIP-2544 to resolve the request + let parseBytes = false; + if (await this.supportsWildcard()) { + parseBytes = true; + + // selector("resolve(bytes,bytes)") + tx.data = hexConcat([ "0x9061b923", encodeBytes([ dnsEncode(this.name), tx.data ]) ]); + } + + try { + let result = await this.provider.call(tx); + if ((arrayify(result).length % 32) === 4) { + logger.throwError("resolver threw error", Logger.errors.CALL_EXCEPTION, { + transaction: tx, data: result + }); + } + if (parseBytes) { result = _parseBytes(result, 0); } + return result; + } catch (error) { + if (error.code === Logger.errors.CALL_EXCEPTION) { return null; } + throw error; + } + } + + async _fetchBytes(selector: string, parameters?: string): Promise { + const result = await this._fetch(selector, parameters); + if (result != null) { return _parseBytes(result, 0); } + 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 result = await this._fetch("0x3b3b57de"); + + // No address + if (result === "0x" || result === HashZero) { return null; } + + return this.provider.formatter.callAddress(result); + } 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 }> = [ { type: "name", content: this.name } ]; + 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; } + + const scheme = match[1].toLowerCase(); + + switch (scheme) { + 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: getIpfsLink(avatar) }; + + case "erc721": + case "erc1155": { + // Depending on the ERC type, use tokenURI(uint256) or url(uint256) + const selector = (scheme === "erc721") ? "0xc87b56dd": "0x0e89341c"; + linkage.push({ type: scheme, 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 (scheme === "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 (scheme === "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), 0); + if (metadataUrl == null) { return null; } + linkage.push({ type: "metadata-url-base", content: metadataUrl }); + + // ERC-1155 allows a generic {id} in the URL + if (scheme === "erc1155") { + metadataUrl = metadataUrl.replace("{id}", tokenId.substring(2)); + linkage.push({ type: "metadata-url-expanded", content: metadataUrl }); + } + + // Transform IPFS metadata links + if (metadataUrl.match(/^ipfs:/i)) { + metadataUrl = getIpfsLink(metadataUrl); + } + + linkage.push({ type: "metadata-url", content: metadataUrl }); + + // Get the token metadata + const metadata = await fetchJson(metadataUrl); + if (!metadata) { return null; } + linkage.push({ type: "metadata", content: JSON.stringify(metadata) }); + + // Pull the image URL out + let imageUrl = metadata.image; + if (typeof(imageUrl) !== "string") { return null; } + + if (imageUrl.match(/^(https:\/\/|data:)/i)) { + // Allow + } else { + // Transform IPFS link to gateway + const ipfs = imageUrl.match(matcherIpfs); + if (ipfs == null) { return null; } + + linkage.push({ type: "url-ipfs", content: imageUrl }); + imageUrl = getIpfsLink(imageUrl); + } + + linkage.push({ type: "url", content: imageUrl }); + + return { linkage, url: imageUrl }; + } + } + } + } 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]); + } + } + + // IPNS (CID: 1, Type: libp2p-key) + const ipns = hexBytes.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/); + if (ipns) { + const length = parseInt(ipns[3], 16); + if (ipns[4].length === length * 2) { + return "ipns:/\/" + Base58.encode("0x" + ipns[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] + } + } + + const skynet = hexBytes.match(/^0x90b2c605([0-9a-f]*)$/); + if (skynet) { + if (skynet[1].length === (34 * 2)) { + // URL Safe base64; https://datatracker.ietf.org/doc/html/rfc4648#section-5 + const urlSafe: Record = { "=": "", "+": "-", "/": "_" }; + const hash = base64Encode("0x" + skynet[1]).replace(/[=+\/]/g, (a) => (urlSafe[a])); + return "sia:/\/" + hash; + } + } + + 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; + _maxFilterBlockRange: number; + + _fastBlockNumber: number; + _fastBlockNumberPromise: Promise; + _fastQueryDate: number; + + _maxInternalBlockNumber: number; + _internalBlockNumber: Promise<{ blockNumber: number, reqTime: number, respTime: number }>; + + readonly anyNetwork: boolean; + + disableCcipRead: 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) { + super(); + + // Events being listened to + this._events = []; + + this._emitted = { block: -2 }; + + this.disableCcipRead = false; + + 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._maxFilterBlockRange = 10; + + 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); + } + + async ccipReadFetch(tx: Transaction, calldata: string, urls: Array): Promise { + if (this.disableCcipRead || urls.length === 0) { return null; } + + const sender = tx.to.toLowerCase(); + const data = calldata.toLowerCase(); + + const errorMessages: Array = [ ]; + + for (let i = 0; i < urls.length; i++) { + const url = urls[i]; + + // URL expansion + const href = url.replace("{sender}", sender).replace("{data}", data); + + // If no {data} is present, use POST; otherwise GET + const json: string | null = (url.indexOf("{data}") >= 0) ? null: JSON.stringify({ data, sender }); + + const result = await fetchJson({ url: href, errorPassThrough: true }, json, (value, response) => { + value.status = response.statusCode; + return value; + }); + + if (result.data) { return result.data; } + + const errorMessage = (result.message || "unknown error"); + + // 4xx indicates the result is not present; stop + if (result.status >= 400 && result.status < 500) { + return logger.throwError(`response not found during CCIP fetch: ${ errorMessage }`, Logger.errors.SERVER_ERROR, { url, errorMessage }); + } + + // 5xx indicates server issue; try the next url + errorMessages.push(errorMessage); + } + + return logger.throwError(`error encountered during CCIP fetch: ${ errorMessages.map((m) => JSON.stringify(m)).join(", ") }`, Logger.errors.SERVER_ERROR, { + urls, errorMessages + }); + } + + // 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": { + // We only allow a single getLogs to be in-flight at a time + if (!event._inflight) { + event._inflight = true; + + // This is the first filter for this event, so we want to + // restrict events to events that happened no earlier than now + if (event._lastBlockNumber === -2) { + event._lastBlockNumber = blockNumber - 1; + } + + // Filter from the last *known* event; due to load-balancing + // and some nodes returning updated block numbers before + // indexing events, a logs result with 0 entries cannot be + // trusted and we must retry a range which includes it again + const filter = event.filter; + filter.fromBlock = event._lastBlockNumber + 1; + filter.toBlock = blockNumber; + + // Prevent fitler ranges from growing too wild, since it is quite + // likely there just haven't been any events to move the lastBlockNumber. + const minFromBlock = filter.toBlock - this._maxFilterBlockRange; + if (minFromBlock > filter.fromBlock) { filter.fromBlock = minFromBlock; } + + if (filter.fromBlock < 0) { filter.fromBlock = 0; } + + const runner = this.getLogs(filter).then((logs) => { + // Allow the next getLogs + event._inflight = false; + + if (logs.length === 0) { return; } + + logs.forEach((log: Log) => { + // Only when we get an event for a given block number + // can we trust the events are indexed + if (log.blockNumber > event._lastBlockNumber) { + event._lastBlockNumber = log.blockNumber; + } + + // Make sure we stall requests to fetch blocks and txs + 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); + + // Allow another getLogs (the range was not updated) + event._inflight = false; + }); + 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: TransactionRequest, blockTag: BlockTag, attempt: number): Promise { + if (attempt >= MAX_CCIP_REDIRECTS) { + logger.throwError("CCIP read exceeded maximum redirections", Logger.errors.SERVER_ERROR, { + redirects: attempt, transaction + }); + } + + const txSender = transaction.to; + + const result = await this.perform("call", { transaction, blockTag }); + + // CCIP Read request via OffchainLookup(address,string[],bytes,bytes4,bytes) + if (attempt >= 0 && blockTag === "latest" && txSender != null && result.substring(0, 10) === "0x556f1830" && (hexDataLength(result) % 32 === 4)) { + try { + const data = hexDataSlice(result, 4); + + // Check the sender of the OffchainLookup matches the transaction + const sender = hexDataSlice(data, 0, 32); + if (!BigNumber.from(sender).eq(txSender)) { + logger.throwError("CCIP Read sender did not match", Logger.errors.CALL_EXCEPTION, { + name: "OffchainLookup", + signature: "OffchainLookup(address,string[],bytes,bytes4,bytes)", + transaction, data: result + }); + } + + // Read the URLs from the response + const urls: Array = []; + const urlsOffset = BigNumber.from(hexDataSlice(data, 32, 64)).toNumber(); + const urlsLength = BigNumber.from(hexDataSlice(data, urlsOffset, urlsOffset + 32)).toNumber(); + const urlsData = hexDataSlice(data, urlsOffset + 32); + for (let u = 0; u < urlsLength; u++) { + const url = _parseString(urlsData, u * 32); + if (url == null) { + logger.throwError("CCIP Read contained corrupt URL string", Logger.errors.CALL_EXCEPTION, { + name: "OffchainLookup", + signature: "OffchainLookup(address,string[],bytes,bytes4,bytes)", + transaction, data: result + }); + } + urls.push(url); + } + + // Get the CCIP calldata to forward + const calldata = _parseBytes(data, 64); + + // Get the callbackSelector (bytes4) + if (!BigNumber.from(hexDataSlice(data, 100, 128)).isZero()) { + logger.throwError("CCIP Read callback selector included junk", Logger.errors.CALL_EXCEPTION, { + name: "OffchainLookup", + signature: "OffchainLookup(address,string[],bytes,bytes4,bytes)", + transaction, data: result + }); + } + const callbackSelector = hexDataSlice(data, 96, 100); + + // Get the extra data to send back to the contract as context + const extraData = _parseBytes(data, 128); + + const ccipResult = await this.ccipReadFetch(transaction, calldata, urls); + if (ccipResult == null) { + logger.throwError("CCIP Read disabled or provided no URLs", Logger.errors.CALL_EXCEPTION, { + name: "OffchainLookup", + signature: "OffchainLookup(address,string[],bytes,bytes4,bytes)", + transaction, data: result + }); + } + + const tx = { + to: txSender, + data: hexConcat([ callbackSelector, encodeBytes([ ccipResult, extraData ]) ]) + }; + + return this._call(tx, blockTag, attempt + 1); + + } catch (error) { + if (error.code === Logger.errors.SERVER_ERROR) { throw error; } + } + } + + try { + return hexlify(result); + } catch (error) { + return logger.throwError("bad result from backend", Logger.errors.SERVER_ERROR, { + method: "call", + params: { transaction, blockTag }, result, error + }); + } + + } + + async call(transaction: Deferrable, blockTag?: BlockTag | Promise): Promise { + await this.getNetwork(); + const resolved = await resolveProperties({ + transaction: this._getTransactionRequest(transaction), + blockTag: this._getBlockTag(blockTag), + ccipReadEnabled: Promise.resolve(transaction.ccipReadEnabled) + }); + return this._call(resolved.transaction, resolved.blockTag, resolved.ccipReadEnabled ? 0: -1); + } + + 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 { + let currentName = name; + while (true) { + if (currentName === "" || currentName === ".") { return null; } + + // Optimization since the eth node cannot change and does + // not have a wildcard resolver + if (name !== "eth" && currentName === "eth") { return null; } + + // Check the current node for a resolver + const addr = await this._getResolver(currentName, "getResolver"); + + // Found a resolver! + if (addr != null) { + const resolver = new Resolver(this, addr, name); + + // Legacy resolver found, using EIP-2544 so it isn't safe to use + if (currentName !== name && !(await resolver.supportsWildcard())) { return null; } + + return resolver; + } + + // Get the parent node + currentName = currentName.split(".").slice(1).join("."); + } + + } + + async _getResolver(name: string, operation?: string): Promise { + if (operation == null) { operation = "ENS"; } + + const network = await this.getNetwork(); + + // No ENS... + if (!network.ensAddress) { + logger.throwError( + "network does not support ENS", + Logger.errors.UNSUPPORTED_OPERATION, + { operation, network: network.name } + ); + } + + try { + // keccak256("resolver(bytes32)") + const addrData = await this.call({ + to: network.ensAddress, + data: ("0x0178b8bf" + namehash(name).substring(2)) + }); + return this.formatter.callAddress(addrData); + } catch (error) { + // ENS registry cannot throw errors on resolver(bytes32) + } + + return null; + } + + 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 resolver + 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 node = address.substring(2).toLowerCase() + ".addr.reverse"; + + const resolverAddr = await this._getResolver(node, "lookupAddress"); + if (resolverAddr == null) { return null; } + + // keccak("name(bytes32)") + const name = _parseString(await this.call({ + to: resolverAddr, + data: ("0x691f3431" + namehash(node).substring(2)) + }), 0); + + 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 node = address.substring(2).toLowerCase() + ".addr.reverse"; + + const resolverAddress = await this._getResolver(node, "getAvatar"); + if (!resolverAddress) { return null; } + + // Try resolving the avatar against the addr.reverse resolver + resolver = new Resolver(this, resolverAddress, node); + try { + const avatar = await resolver.getAvatar(); + if (avatar) { return avatar.url; } + } catch (error) { + if (error.code !== Logger.errors.CALL_EXCEPTION) { throw error; } + } + + // Try getting the name and performing forward lookup; allowing wildcards + try { + // keccak("name(bytes32)") + const name = _parseString(await this.call({ + to: resolverAddress, + data: ("0x691f3431" + namehash(node).substring(2)) + }), 0); + resolver = await this.getResolver(name); + } catch (error) { + if (error.code !== Logger.errors.CALL_EXCEPTION) { throw error; } + return null; + } + + } else { + // ENS name; forward lookup with wildcard + 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/test/node_modules/@ethersproject/providers/src.ts/browser-ipc-provider.ts b/test/node_modules/@ethersproject/providers/src.ts/browser-ipc-provider.ts new file mode 100644 index 0000000..1759a56 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/src.ts/browser-net.ts b/test/node_modules/@ethersproject/providers/src.ts/browser-net.ts new file mode 100644 index 0000000..a347d85 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/src.ts/browser-net.ts @@ -0,0 +1,3 @@ +"use strict"; + +export function connect() { } diff --git a/test/node_modules/@ethersproject/providers/src.ts/browser-ws.ts b/test/node_modules/@ethersproject/providers/src.ts/browser-ws.ts new file mode 100644 index 0000000..3f6f8db --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/src.ts/cloudflare-provider.ts b/test/node_modules/@ethersproject/providers/src.ts/cloudflare-provider.ts new file mode 100644 index 0000000..b2c5f84 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/src.ts/etherscan-provider.ts b/test/node_modules/@ethersproject/providers/src.ts/etherscan-provider.ts new file mode 100644 index 0000000..46f8275 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/src.ts/etherscan-provider.ts @@ -0,0 +1,454 @@ +"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 || typeof(result.message) !== "string" || !result.message.match(/^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); +} + + +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 | null; + + constructor(network?: Networkish, apiKey?: string) { + super(network); + + defineReadOnly(this, "baseUrl", this.getBaseUrl()); + defineReadOnly(this, "apiKey", apiKey || null); + } + + getBaseUrl(): string { + switch(this.network ? this.network.name: "invalid") { + case "homestead": + return "https:/\/api.etherscan.io"; + case "goerli": + return "https:/\/api-goerli.etherscan.io"; + case "sepolia": + return "https:/\/api-sepolia.etherscan.io"; + case "matic": + return "https:/\/api.polygonscan.com"; + case "maticmum": + return "https:/\/api-testnet.polygonscan.com"; + case "arbitrum": + return "https:/\/api.arbiscan.io"; + case "arbitrum-goerli": + return "https:/\/api-goerli.arbiscan.io"; + case "optimism": + return "https:/\/api-optimistic.etherscan.io"; + case "optimism-goerli": + return "https:/\/api-goerli-optimistic.etherscan.io"; + default: + } + + return logger.throwArgumentError("unsupported network", "network", this.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 == null); + } +} diff --git a/test/node_modules/@ethersproject/providers/src.ts/fallback-provider.ts b/test/node_modules/@ethersproject/providers/src.ts/fallback-provider.ts new file mode 100644 index 0000000..699b32a --- /dev/null +++ b/test/node_modules/@ethersproject/providers/src.ts/fallback-provider.ts @@ -0,0 +1,654 @@ +"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) + } + if (method === "call" && params.blockTag) { + return provider[method](params.transaction, params.blockTag); + } + 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) { + 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/test/node_modules/@ethersproject/providers/src.ts/formatter.ts b/test/node_modules/@ethersproject/providers/src.ts/formatter.ts new file mode 100644 index 0000000..8905197 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/src.ts/formatter.ts @@ -0,0 +1,524 @@ +"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() { + 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: Formatter.allowNull(hash), + parentHash: hash, + number: number, + + timestamp: number, + nonce: Formatter.allowNull(hex), + difficulty: this.difficulty.bind(this), + + gasLimit: bigNumber, + gasUsed: bigNumber, + + miner: Formatter.allowNull(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"; } + + switch (blockTag) { + case "earliest": return "0x0"; + case "latest": case "pending": case "safe": case "finalized": + 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/test/node_modules/@ethersproject/providers/src.ts/index.ts b/test/node_modules/@ethersproject/providers/src.ts/index.ts new file mode 100644 index 0000000..0b7d4db --- /dev/null +++ b/test/node_modules/@ethersproject/providers/src.ts/index.ts @@ -0,0 +1,178 @@ +"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 { AnkrProvider } from "./ankr-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].toLowerCase()) { + case "http": case "https": + return new JsonRpcProvider(network); + case "ws": case "wss": + 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, + AnkrProvider, + 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, + AnkrProvider, + 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/test/node_modules/@ethersproject/providers/src.ts/infura-provider.ts b/test/node_modules/@ethersproject/providers/src.ts/infura-provider.ts new file mode 100644 index 0000000..c344045 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/src.ts/infura-provider.ts @@ -0,0 +1,143 @@ +"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 "goerli": + host = "goerli.infura.io"; + break; + case "sepolia": + host = "sepolia.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-goerli": + host = "optimism-goerli.infura.io"; + break; + case "arbitrum": + host = "arbitrum-mainnet.infura.io"; + break; + case "arbitrum-goerli": + host = "arbitrum-goerli.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/test/node_modules/@ethersproject/providers/src.ts/ipc-provider.ts b/test/node_modules/@ethersproject/providers/src.ts/ipc-provider.ts new file mode 100644 index 0000000..6f0e58c --- /dev/null +++ b/test/node_modules/@ethersproject/providers/src.ts/ipc-provider.ts @@ -0,0 +1,72 @@ +"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) { + 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/test/node_modules/@ethersproject/providers/src.ts/json-rpc-batch-provider.ts b/test/node_modules/@ethersproject/providers/src.ts/json-rpc-batch-provider.ts new file mode 100644 index 0000000..d2bf8c8 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts b/test/node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts new file mode 100644 index 0000000..de4957f --- /dev/null +++ b/test/node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts @@ -0,0 +1,742 @@ +"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, hexZeroPad, 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 spelunk(value: any, requireData: boolean): null | { message: string, data: null | string } { + if (value == null) { return null; } + + // These *are* the droids we're looking for. + if (typeof(value.message) === "string" && value.message.match("reverted")) { + const data = isHexString(value.data) ? value.data: null; + if (!requireData || data) { + return { message: value.message, data }; + } + } + + // Spelunk further... + if (typeof(value) === "object") { + for (const key in value) { + const result = spelunk(value[key], requireData); + if (result) { return result; } + } + return null; + } + + // Might be a JSON string we can further descend... + if (typeof(value) === "string") { + try { + return spelunk(JSON.parse(value), requireData); + } catch (error) { } + } + + return null; +} + +function checkError(method: string, error: any, params: any): any { + + const transaction = params.transaction || params.signedTransaction; + + // Undo the "convenience" some nodes are attempting to prevent backwards + // incompatibility; maybe for v6 consider forwarding reverts as errors + if (method === "call") { + const result = spelunk(error, true); + if (result) { return result.data; } + + // Nothing descriptive.. + logger.throwError("missing revert data in call exception; Transaction reverted without a reason string", Logger.errors.CALL_EXCEPTION, { + data: "0x", transaction, error + }); + } + + if (method === "estimateGas") { + // Try to find something, with a preference on SERVER_ERROR body + let result = spelunk(error.body, false); + if (result == null) { result = spelunk(error, false); } + + // Found "reverted", this is a CALL_EXCEPTION + if (result) { + logger.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", Logger.errors.UNPREDICTABLE_GAS_LIMIT, { + reason: result.message, method, transaction, error + }); + } + } + + // @TODO: Should we spelunk for message too? + + 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(); + + // "insufficient funds for gas * price + value + cost(data)" + if (message.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)) { + logger.throwError("insufficient funds for intrinsic transaction cost", Logger.errors.INSUFFICIENT_FUNDS, { + error, method, transaction + }); + } + + // "nonce too low" + if (message.match(/nonce (is )?too low/i)) { + logger.throwError("nonce has already been used", Logger.errors.NONCE_EXPIRED, { + error, method, transaction + }); + } + + // "replacement transaction underpriced" + if (message.match(/replacement transaction underpriced|transaction gas price.*too low/i)) { + logger.throwError("replacement fee too low", Logger.errors.REPLACEMENT_UNDERPRICED, { + error, method, transaction + }); + } + + // "replacement transaction underpriced" + if (message.match(/only replay-protected/i)) { + 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|revert/)) { + 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) { + 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) => { + if (typeof(error.message) === "string" && error.message.match(/user denied/i)) { + logger.throwError("user rejected transaction", Logger.errors.ACTION_REJECTED, { + action: "sendTransaction", + transaction: tx + }); + } + + 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(); + try { + return await this.provider.send("personal_sign", [ hexlify(data), address.toLowerCase() ]); + } catch (error) { + if (typeof(error.message) === "string" && error.message.match(/user denied/i)) { + logger.throwError("user rejected signing", Logger.errors.ACTION_REJECTED, { + action: "signMessage", + from: address, + messageData: message + }); + } + throw error; + } + } + + async _legacySignMessage(message: Bytes | string): Promise { + const data = ((typeof(message) === "string") ? toUtf8Bytes(message): message); + const address = await this.getAddress(); + + try { + // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign + return await this.provider.send("eth_sign", [ address.toLowerCase(), hexlify(data) ]); + } catch (error) { + if (typeof(error.message) === "string" && error.message.match(/user denied/i)) { + logger.throwError("user rejected signing", Logger.errors.ACTION_REJECTED, { + action: "_legacySignMessage", + from: address, + messageData: message + }); + } + throw error; + } + } + + 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(); + + try { + return await this.provider.send("eth_signTypedData_v4", [ + address.toLowerCase(), + JSON.stringify(_TypedDataEncoder.getPayload(populated.domain, types, populated.value)) + ]); + } catch (error) { + if (typeof(error.message) === "string" && error.message.match(/user denied/i)) { + logger.throwError("user rejected signing", Logger.errors.ACTION_REJECTED, { + action: "_signTypedData", + from: address, + messageData: { domain: populated.domain, types, value: populated.value } + }); + } + throw error; + } + } + + 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) { + 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), hexZeroPad(params.position, 32), 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-1559 + 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 } = {}; + + // JSON-RPC now requires numeric values to be "quantity" values + ["chainId", "gasLimit", "gasPrice", "type", "maxFeePerGas", "maxPriorityFeePerGas", "nonce", "value"].forEach(function(key) { + if ((transaction)[key] == null) { return; } + const value = hexValue(BigNumber.from((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/test/node_modules/@ethersproject/providers/src.ts/nodesmith-provider.ts b/test/node_modules/@ethersproject/providers/src.ts/nodesmith-provider.ts new file mode 100644 index 0000000..f712b9b --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/src.ts/pocket-provider.ts b/test/node_modules/@ethersproject/providers/src.ts/pocket-provider.ts new file mode 100644 index 0000000..20460e5 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/src.ts/pocket-provider.ts @@ -0,0 +1,93 @@ +"use strict"; + +import { Network } from "@ethersproject/networks"; +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"; + +const defaultApplicationId = "62e1ad51b37b8e00394bda3b"; + + +export class PocketProvider extends UrlJsonRpcProvider { + readonly applicationId: string; + readonly applicationSecretKey: string; + readonly loadBalancer: boolean; + + static getApiKey(apiKey: any): any { + const apiKeyObj: { applicationId: string, applicationSecretKey: string, loadBalancer: boolean } = { + applicationId: null, + loadBalancer: true, + applicationSecretKey: null + }; + + // Parse applicationId and applicationSecretKey + if (apiKey == null) { + apiKeyObj.applicationId = defaultApplicationId; + + } else if (typeof (apiKey) === "string") { + apiKeyObj.applicationId = apiKey; + + } else if (apiKey.applicationSecretKey != null) { + apiKeyObj.applicationId = apiKey.applicationId; + apiKeyObj.applicationSecretKey = apiKey.applicationSecretKey; + + } else if (apiKey.applicationId) { + apiKeyObj.applicationId = apiKey.applicationId; + + } 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 "goerli": + host = "eth-goerli.gateway.pokt.network"; + break; + case "homestead": + host = "eth-mainnet.gateway.pokt.network"; + break; + case "kovan": + host = "poa-kovan.gateway.pokt.network"; + break; + case "matic": + host = "poly-mainnet.gateway.pokt.network"; + break; + case "maticmum": + host = "polygon-mumbai-rpc.gateway.pokt.network"; + break; + case "rinkeby": + host = "eth-rinkeby.gateway.pokt.network"; + break; + case "ropsten": + host = "eth-ropsten.gateway.pokt.network"; + break; + default: + logger.throwError("unsupported network", Logger.errors.INVALID_ARGUMENT, { + argument: "network", + value: network + }); + } + + const url = `https:/\/${ host }/v1/lb/${ apiKey.applicationId }` + + const connection: ConnectionInfo = { headers: { }, url }; + if (apiKey.applicationSecretKey != null) { + connection.user = ""; + connection.password = apiKey.applicationSecretKey + } + + return connection; + } + + isCommunityResource(): boolean { + return (this.applicationId === defaultApplicationId); + } +} diff --git a/test/node_modules/@ethersproject/providers/src.ts/url-json-rpc-provider.ts b/test/node_modules/@ethersproject/providers/src.ts/url-json-rpc-provider.ts new file mode 100644 index 0000000..cbb924e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/providers/src.ts/web3-provider.ts b/test/node_modules/@ethersproject/providers/src.ts/web3-provider.ts new file mode 100644 index 0000000..352a67b --- /dev/null +++ b/test/node_modules/@ethersproject/providers/src.ts/web3-provider.ts @@ -0,0 +1,169 @@ +"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) { + 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/test/node_modules/@ethersproject/providers/src.ts/websocket-provider.ts b/test/node_modules/@ethersproject/providers/src.ts/websocket-provider.ts new file mode 100644 index 0000000..b720549 --- /dev/null +++ b/test/node_modules/@ethersproject/providers/src.ts/websocket-provider.ts @@ -0,0 +1,350 @@ +"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; +}; + +export interface WebSocketLike { + onopen: ((...args: Array) => any) | null; + onmessage: ((...args: Array) => any) | null; + onerror: ((...args: Array) => any) | null; + + readyState: number; + + send(payload: any): void; + close(code?: number, reason?: string): 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 | WebSocketLike, 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" + }); + } + + if (typeof(url) === "string") { + super(url, network); + } else { + super("_websocket", network); + } + + this._pollingInterval = -1; + + this._wsReady = false; + + if (typeof(url) === "string") { + defineReadOnly(this, "_websocket", new WebSocket(this.connection.url)); + } else { + defineReadOnly(this, "_websocket", 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(); } + } + + // Cannot narrow the type of _websocket, as that is not backwards compatible + // so we add a getter and let the WebSocket be a public API. + get websocket(): WebSocketLike { return this._websocket; } + + 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/test/node_modules/@ethersproject/providers/src.ts/ws.ts b/test/node_modules/@ethersproject/providers/src.ts/ws.ts new file mode 100644 index 0000000..b3b7a2e --- /dev/null +++ b/test/node_modules/@ethersproject/providers/src.ts/ws.ts @@ -0,0 +1,3 @@ +import WebSocket from "ws"; + +export { WebSocket } diff --git a/test/node_modules/@ethersproject/providers/thirdparty.d.ts b/test/node_modules/@ethersproject/providers/thirdparty.d.ts new file mode 100644 index 0000000..89a5155 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/LICENSE.md b/test/node_modules/@ethersproject/random/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/README.md b/test/node_modules/@ethersproject/random/README.md new file mode 100644 index 0000000..0ab3743 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/random/lib.esm/_version.d.ts new file mode 100644 index 0000000..41a5f9c --- /dev/null +++ b/test/node_modules/@ethersproject/random/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "random/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/random/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/random/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..3fd2218 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/lib.esm/_version.js b/test/node_modules/@ethersproject/random/lib.esm/_version.js new file mode 100644 index 0000000..9573243 --- /dev/null +++ b/test/node_modules/@ethersproject/random/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "random/5.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/random/lib.esm/_version.js.map b/test/node_modules/@ethersproject/random/lib.esm/_version.js.map new file mode 100644 index 0000000..056b924 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/lib.esm/index.d.ts b/test/node_modules/@ethersproject/random/lib.esm/index.d.ts new file mode 100644 index 0000000..b464ff9 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/random/lib.esm/index.d.ts.map new file mode 100644 index 0000000..b0c7499 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/lib.esm/index.js b/test/node_modules/@ethersproject/random/lib.esm/index.js new file mode 100644 index 0000000..74b0146 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/lib.esm/index.js.map b/test/node_modules/@ethersproject/random/lib.esm/index.js.map new file mode 100644 index 0000000..1720229 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/lib.esm/random.d.ts b/test/node_modules/@ethersproject/random/lib.esm/random.d.ts new file mode 100644 index 0000000..6065693 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/lib.esm/random.d.ts.map b/test/node_modules/@ethersproject/random/lib.esm/random.d.ts.map new file mode 100644 index 0000000..339c17b --- /dev/null +++ b/test/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":"AAmCA,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAQtD"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/random/lib.esm/random.js b/test/node_modules/@ethersproject/random/lib.esm/random.js new file mode 100644 index 0000000..8d7cb8f --- /dev/null +++ b/test/node_modules/@ethersproject/random/lib.esm/random.js @@ -0,0 +1,43 @@ +"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: () => { } } }; +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis +function getGlobal() { + 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'); +} +; +const anyGlobal = getGlobal(); +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/test/node_modules/@ethersproject/random/lib.esm/random.js.map b/test/node_modules/@ethersproject/random/lib.esm/random.js.map new file mode 100644 index 0000000..320e767 --- /dev/null +++ b/test/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,8FAA8F;AAC9F,SAAS,SAAS;IAChB,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;QAAE,OAAO,IAAI,CAAC;KAAE;IACjD,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QAAE,OAAO,MAAM,CAAC;KAAE;IACrD,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QAAE,OAAO,MAAM,CAAC;KAAE;IACrD,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;AACpD,CAAC;AAAA,CAAC;AAEF,MAAM,SAAS,GAAG,SAAS,EAAE,CAAC;AAE9B,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/test/node_modules/@ethersproject/random/lib.esm/shuffle.d.ts b/test/node_modules/@ethersproject/random/lib.esm/shuffle.d.ts new file mode 100644 index 0000000..89835b1 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/lib.esm/shuffle.d.ts.map b/test/node_modules/@ethersproject/random/lib.esm/shuffle.d.ts.map new file mode 100644 index 0000000..92d1144 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/lib.esm/shuffle.js b/test/node_modules/@ethersproject/random/lib.esm/shuffle.js new file mode 100644 index 0000000..7da5935 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/lib.esm/shuffle.js.map b/test/node_modules/@ethersproject/random/lib.esm/shuffle.js.map new file mode 100644 index 0000000..c8f9cdb --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/lib/_version.d.ts b/test/node_modules/@ethersproject/random/lib/_version.d.ts new file mode 100644 index 0000000..41a5f9c --- /dev/null +++ b/test/node_modules/@ethersproject/random/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "random/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/random/lib/_version.d.ts.map b/test/node_modules/@ethersproject/random/lib/_version.d.ts.map new file mode 100644 index 0000000..3fd2218 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/lib/_version.js b/test/node_modules/@ethersproject/random/lib/_version.js new file mode 100644 index 0000000..b35e4fb --- /dev/null +++ b/test/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.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/random/lib/_version.js.map b/test/node_modules/@ethersproject/random/lib/_version.js.map new file mode 100644 index 0000000..e2300dc --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/lib/browser-random.d.ts b/test/node_modules/@ethersproject/random/lib/browser-random.d.ts new file mode 100644 index 0000000..1862266 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/lib/browser-random.d.ts.map b/test/node_modules/@ethersproject/random/lib/browser-random.d.ts.map new file mode 100644 index 0000000..607d58d --- /dev/null +++ b/test/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":"AAmCA,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAQtD"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/random/lib/browser-random.js b/test/node_modules/@ethersproject/random/lib/browser-random.js new file mode 100644 index 0000000..1a1b9df --- /dev/null +++ b/test/node_modules/@ethersproject/random/lib/browser-random.js @@ -0,0 +1,46 @@ +"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: () => { } } }; +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis +function getGlobal() { + 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 anyGlobal = getGlobal(); +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/test/node_modules/@ethersproject/random/lib/browser-random.js.map b/test/node_modules/@ethersproject/random/lib/browser-random.js.map new file mode 100644 index 0000000..9ab9d56 --- /dev/null +++ b/test/node_modules/@ethersproject/random/lib/browser-random.js.map @@ -0,0 +1 @@ +{"version":3,"file":"browser-random.js","sourceRoot":"","sources":["../src.ts/browser-random.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;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AM,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/test/node_modules/@ethersproject/random/lib/index.d.ts b/test/node_modules/@ethersproject/random/lib/index.d.ts new file mode 100644 index 0000000..b464ff9 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/lib/index.d.ts.map b/test/node_modules/@ethersproject/random/lib/index.d.ts.map new file mode 100644 index 0000000..b0c7499 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/lib/index.js b/test/node_modules/@ethersproject/random/lib/index.js new file mode 100644 index 0000000..25787cc --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/lib/index.js.map b/test/node_modules/@ethersproject/random/lib/index.js.map new file mode 100644 index 0000000..7967720 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/lib/random.d.ts b/test/node_modules/@ethersproject/random/lib/random.d.ts new file mode 100644 index 0000000..6065693 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/lib/random.d.ts.map b/test/node_modules/@ethersproject/random/lib/random.d.ts.map new file mode 100644 index 0000000..33770ca --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/lib/random.js b/test/node_modules/@ethersproject/random/lib/random.js new file mode 100644 index 0000000..9cb86d3 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/lib/random.js.map b/test/node_modules/@ethersproject/random/lib/random.js.map new file mode 100644 index 0000000..46cabf5 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/lib/shuffle.d.ts b/test/node_modules/@ethersproject/random/lib/shuffle.d.ts new file mode 100644 index 0000000..89835b1 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/lib/shuffle.d.ts.map b/test/node_modules/@ethersproject/random/lib/shuffle.d.ts.map new file mode 100644 index 0000000..92d1144 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/lib/shuffle.js b/test/node_modules/@ethersproject/random/lib/shuffle.js new file mode 100644 index 0000000..d3b524f --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/lib/shuffle.js.map b/test/node_modules/@ethersproject/random/lib/shuffle.js.map new file mode 100644 index 0000000..56657da --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/package.json b/test/node_modules/@ethersproject/random/package.json new file mode 100644 index 0000000..13cfa82 --- /dev/null +++ b/test/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.7.0", + "@ethersproject/logger": "^5.7.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": "ec1b9583039a14a0e0fa15d0a2a6082a2f41cf5b", + "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": "0xb91a9e0289e2dcbc8a1521cc785465161f4ae4aad01aea6ddf3a1a3f2c29a4da", + "types": "./lib/index.d.ts", + "version": "5.7.0" +} diff --git a/test/node_modules/@ethersproject/random/src.ts/_version.ts b/test/node_modules/@ethersproject/random/src.ts/_version.ts new file mode 100644 index 0000000..1d5ad1d --- /dev/null +++ b/test/node_modules/@ethersproject/random/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "random/5.7.0"; diff --git a/test/node_modules/@ethersproject/random/src.ts/browser-random.ts b/test/node_modules/@ethersproject/random/src.ts/browser-random.ts new file mode 100644 index 0000000..fe58a28 --- /dev/null +++ b/test/node_modules/@ethersproject/random/src.ts/browser-random.ts @@ -0,0 +1,44 @@ +"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: () => { } } }; + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis +function getGlobal(): any { + 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'); +}; + +const anyGlobal = getGlobal(); + +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/test/node_modules/@ethersproject/random/src.ts/index.ts b/test/node_modules/@ethersproject/random/src.ts/index.ts new file mode 100644 index 0000000..fb11db4 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/src.ts/random.ts b/test/node_modules/@ethersproject/random/src.ts/random.ts new file mode 100644 index 0000000..1f7dca0 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/random/src.ts/shuffle.ts b/test/node_modules/@ethersproject/random/src.ts/shuffle.ts new file mode 100644 index 0000000..7092259 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/rlp/LICENSE.md b/test/node_modules/@ethersproject/rlp/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/rlp/README.md b/test/node_modules/@ethersproject/rlp/README.md new file mode 100644 index 0000000..bffb363 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/rlp/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/rlp/lib.esm/_version.d.ts new file mode 100644 index 0000000..a25eb69 --- /dev/null +++ b/test/node_modules/@ethersproject/rlp/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "rlp/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/rlp/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/rlp/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..3c33172 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/rlp/lib.esm/_version.js b/test/node_modules/@ethersproject/rlp/lib.esm/_version.js new file mode 100644 index 0000000..4c88c12 --- /dev/null +++ b/test/node_modules/@ethersproject/rlp/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "rlp/5.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/rlp/lib.esm/_version.js.map b/test/node_modules/@ethersproject/rlp/lib.esm/_version.js.map new file mode 100644 index 0000000..4854997 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/rlp/lib.esm/index.d.ts b/test/node_modules/@ethersproject/rlp/lib.esm/index.d.ts new file mode 100644 index 0000000..fec4e35 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/rlp/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/rlp/lib.esm/index.d.ts.map new file mode 100644 index 0000000..59057d4 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/rlp/lib.esm/index.js b/test/node_modules/@ethersproject/rlp/lib.esm/index.js new file mode 100644 index 0000000..a56722c --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/rlp/lib.esm/index.js.map b/test/node_modules/@ethersproject/rlp/lib.esm/index.js.map new file mode 100644 index 0000000..ebc21b2 --- /dev/null +++ b/test/node_modules/@ethersproject/rlp/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,gDAAgD;AAEhD,OAAO,EAAE,QAAQ,EAAa,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEjF,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,eAAe,CAAC,KAAa;IAClC,MAAM,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,MAAM,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;KAC9C;IACD,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,SAAS,OAAO,CAAC,MAA2B;IACxC,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QACvB,IAAI,OAAO,GAAkB,EAAE,CAAC;QAChC,MAAM,CAAC,OAAO,CAAC,UAAS,KAAK;YACzB,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,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,EAAE,IAAI,CAAC,CAAC;KAC/D;IACD,OAAO,OAAO,CAAC,MAAM,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/rlp/lib/_version.d.ts b/test/node_modules/@ethersproject/rlp/lib/_version.d.ts new file mode 100644 index 0000000..a25eb69 --- /dev/null +++ b/test/node_modules/@ethersproject/rlp/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "rlp/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/rlp/lib/_version.d.ts.map b/test/node_modules/@ethersproject/rlp/lib/_version.d.ts.map new file mode 100644 index 0000000..3c33172 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/rlp/lib/_version.js b/test/node_modules/@ethersproject/rlp/lib/_version.js new file mode 100644 index 0000000..ec21a8f --- /dev/null +++ b/test/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.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/rlp/lib/_version.js.map b/test/node_modules/@ethersproject/rlp/lib/_version.js.map new file mode 100644 index 0000000..b3a3dff --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/rlp/lib/index.d.ts b/test/node_modules/@ethersproject/rlp/lib/index.d.ts new file mode 100644 index 0000000..fec4e35 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/rlp/lib/index.d.ts.map b/test/node_modules/@ethersproject/rlp/lib/index.d.ts.map new file mode 100644 index 0000000..59057d4 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/rlp/lib/index.js b/test/node_modules/@ethersproject/rlp/lib/index.js new file mode 100644 index 0000000..a7141fe --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/rlp/lib/index.js.map b/test/node_modules/@ethersproject/rlp/lib/index.js.map new file mode 100644 index 0000000..f383ee8 --- /dev/null +++ b/test/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;AA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AC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,GAAG,QAAM,CAAC,CAAC,CAAC;QACpE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC,GAAG,QAAM,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAA;KACpD;IACD,OAAO,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/test/node_modules/@ethersproject/rlp/package.json b/test/node_modules/@ethersproject/rlp/package.json new file mode 100644 index 0000000..2a3faf7 --- /dev/null +++ b/test/node_modules/@ethersproject/rlp/package.json @@ -0,0 +1,44 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.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": "ec1b9583039a14a0e0fa15d0a2a6082a2f41cf5b", + "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": "0x93c77ed49afe2043ac918ada4f24d3d1edbb4ce4f0f40e62eeeeed396d30ef45", + "types": "./lib/index.d.ts", + "version": "5.7.0" +} diff --git a/test/node_modules/@ethersproject/rlp/src.ts/_version.ts b/test/node_modules/@ethersproject/rlp/src.ts/_version.ts new file mode 100644 index 0000000..2344508 --- /dev/null +++ b/test/node_modules/@ethersproject/rlp/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "rlp/5.7.0"; diff --git a/test/node_modules/@ethersproject/rlp/src.ts/index.ts b/test/node_modules/@ethersproject/rlp/src.ts/index.ts new file mode 100644 index 0000000..8485e3a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/LICENSE.md b/test/node_modules/@ethersproject/sha2/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/README.md b/test/node_modules/@ethersproject/sha2/README.md new file mode 100644 index 0000000..901e51f --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/sha2/lib.esm/_version.d.ts new file mode 100644 index 0000000..23beab3 --- /dev/null +++ b/test/node_modules/@ethersproject/sha2/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "sha2/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/sha2/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/sha2/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..e41e9e6 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/lib.esm/_version.js b/test/node_modules/@ethersproject/sha2/lib.esm/_version.js new file mode 100644 index 0000000..9b94b72 --- /dev/null +++ b/test/node_modules/@ethersproject/sha2/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "sha2/5.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/sha2/lib.esm/_version.js.map b/test/node_modules/@ethersproject/sha2/lib.esm/_version.js.map new file mode 100644 index 0000000..33a652d --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/lib.esm/index.d.ts b/test/node_modules/@ethersproject/sha2/lib.esm/index.d.ts new file mode 100644 index 0000000..3a04ec0 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/sha2/lib.esm/index.d.ts.map new file mode 100644 index 0000000..1bdb9f7 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/lib.esm/index.js b/test/node_modules/@ethersproject/sha2/lib.esm/index.js new file mode 100644 index 0000000..b4fb354 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/lib.esm/index.js.map b/test/node_modules/@ethersproject/sha2/lib.esm/index.js.map new file mode 100644 index 0000000..1ee9694 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/lib.esm/sha2.d.ts b/test/node_modules/@ethersproject/sha2/lib.esm/sha2.d.ts new file mode 100644 index 0000000..3ace707 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/lib.esm/sha2.d.ts.map b/test/node_modules/@ethersproject/sha2/lib.esm/sha2.d.ts.map new file mode 100644 index 0000000..bd88ade --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/lib.esm/sha2.js b/test/node_modules/@ethersproject/sha2/lib.esm/sha2.js new file mode 100644 index 0000000..6ecbafe --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/lib.esm/sha2.js.map b/test/node_modules/@ethersproject/sha2/lib.esm/sha2.js.map new file mode 100644 index 0000000..d4fa44b --- /dev/null +++ b/test/node_modules/@ethersproject/sha2/lib.esm/sha2.js.map @@ -0,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AAS,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/test/node_modules/@ethersproject/sha2/lib.esm/types.d.ts b/test/node_modules/@ethersproject/sha2/lib.esm/types.d.ts new file mode 100644 index 0000000..458baee --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/lib.esm/types.d.ts.map b/test/node_modules/@ethersproject/sha2/lib.esm/types.d.ts.map new file mode 100644 index 0000000..57ad20a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/lib.esm/types.js b/test/node_modules/@ethersproject/sha2/lib.esm/types.js new file mode 100644 index 0000000..cf79cb4 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/lib.esm/types.js.map b/test/node_modules/@ethersproject/sha2/lib.esm/types.js.map new file mode 100644 index 0000000..c596013 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/lib/_version.d.ts b/test/node_modules/@ethersproject/sha2/lib/_version.d.ts new file mode 100644 index 0000000..23beab3 --- /dev/null +++ b/test/node_modules/@ethersproject/sha2/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "sha2/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/sha2/lib/_version.d.ts.map b/test/node_modules/@ethersproject/sha2/lib/_version.d.ts.map new file mode 100644 index 0000000..e41e9e6 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/lib/_version.js b/test/node_modules/@ethersproject/sha2/lib/_version.js new file mode 100644 index 0000000..5cb050c --- /dev/null +++ b/test/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.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/sha2/lib/_version.js.map b/test/node_modules/@ethersproject/sha2/lib/_version.js.map new file mode 100644 index 0000000..9d275b7 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/lib/browser-sha2.d.ts b/test/node_modules/@ethersproject/sha2/lib/browser-sha2.d.ts new file mode 100644 index 0000000..4076c92 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/lib/browser-sha2.d.ts.map b/test/node_modules/@ethersproject/sha2/lib/browser-sha2.d.ts.map new file mode 100644 index 0000000..5596101 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/lib/browser-sha2.js b/test/node_modules/@ethersproject/sha2/lib/browser-sha2.js new file mode 100644 index 0000000..2288fac --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/lib/browser-sha2.js.map b/test/node_modules/@ethersproject/sha2/lib/browser-sha2.js.map new file mode 100644 index 0000000..a9259ab --- /dev/null +++ b/test/node_modules/@ethersproject/sha2/lib/browser-sha2.js.map @@ -0,0 +1 @@ +{"version":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,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/test/node_modules/@ethersproject/sha2/lib/index.d.ts b/test/node_modules/@ethersproject/sha2/lib/index.d.ts new file mode 100644 index 0000000..3a04ec0 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/lib/index.d.ts.map b/test/node_modules/@ethersproject/sha2/lib/index.d.ts.map new file mode 100644 index 0000000..1bdb9f7 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/lib/index.js b/test/node_modules/@ethersproject/sha2/lib/index.js new file mode 100644 index 0000000..0c3c296 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/lib/index.js.map b/test/node_modules/@ethersproject/sha2/lib/index.js.map new file mode 100644 index 0000000..cb5f68a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/lib/sha2.d.ts b/test/node_modules/@ethersproject/sha2/lib/sha2.d.ts new file mode 100644 index 0000000..3ace707 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/lib/sha2.d.ts.map b/test/node_modules/@ethersproject/sha2/lib/sha2.d.ts.map new file mode 100644 index 0000000..25eeddd --- /dev/null +++ b/test/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":"AAMA,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/test/node_modules/@ethersproject/sha2/lib/sha2.js b/test/node_modules/@ethersproject/sha2/lib/sha2.js new file mode 100644 index 0000000..66e5716 --- /dev/null +++ b/test/node_modules/@ethersproject/sha2/lib/sha2.js @@ -0,0 +1,37 @@ +"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 crypto_1 = require("crypto"); +var hash_js_1 = __importDefault(require("hash.js")); +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" + (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/test/node_modules/@ethersproject/sha2/lib/sha2.js.map b/test/node_modules/@ethersproject/sha2/lib/sha2.js.map new file mode 100644 index 0000000..b92b73c --- /dev/null +++ b/test/node_modules/@ethersproject/sha2/lib/sha2.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sha2.js","sourceRoot":"","sources":["../src.ts/sha2.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;AAEb,iCAAgD;AAEhD,oDAA2B;AAE3B,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,IAAA,mBAAU,EAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACxF,CAAC;AAFD,wBAEC;AAED,SAAgB,MAAM,CAAC,IAAe;IAClC,OAAO,IAAI,GAAG,IAAA,mBAAU,EAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACxF,CAAC;AAFD,wBAEC;AAED,SAAgB,WAAW,CAAC,SAA6B,EAAE,GAAc,EAAE,IAAe;IACtF,wBAAwB;IACxB,IAAI,CAAC,0BAAkB,CAAC,SAAS,CAAC,EAAE;QAChC,MAAM,CAAC,UAAU,CAAC,0BAA0B,GAAG,SAAS,EAAE,eAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE;YAC3F,SAAS,EAAE,aAAa;YACxB,SAAS,EAAE,SAAS;SACvB,CAAC,CAAC;KACN;IAED,OAAO,IAAI,GAAG,IAAA,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/test/node_modules/@ethersproject/sha2/lib/types.d.ts b/test/node_modules/@ethersproject/sha2/lib/types.d.ts new file mode 100644 index 0000000..458baee --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/lib/types.d.ts.map b/test/node_modules/@ethersproject/sha2/lib/types.d.ts.map new file mode 100644 index 0000000..57ad20a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/lib/types.js b/test/node_modules/@ethersproject/sha2/lib/types.js new file mode 100644 index 0000000..276987a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/lib/types.js.map b/test/node_modules/@ethersproject/sha2/lib/types.js.map new file mode 100644 index 0000000..b76d215 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/package.json b/test/node_modules/@ethersproject/sha2/package.json new file mode 100644 index 0000000..1d30121 --- /dev/null +++ b/test/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.7.0", + "@ethersproject/logger": "^5.7.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": "ec1b9583039a14a0e0fa15d0a2a6082a2f41cf5b", + "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": "0xf4e98e42d47de50b1a899374350f5257d0ea9a604d59546ab0acbed6d89eceb6", + "types": "./lib/index.d.ts", + "version": "5.7.0" +} diff --git a/test/node_modules/@ethersproject/sha2/src.ts/_version.ts b/test/node_modules/@ethersproject/sha2/src.ts/_version.ts new file mode 100644 index 0000000..0c06c5f --- /dev/null +++ b/test/node_modules/@ethersproject/sha2/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "sha2/5.7.0"; diff --git a/test/node_modules/@ethersproject/sha2/src.ts/browser-sha2.ts b/test/node_modules/@ethersproject/sha2/src.ts/browser-sha2.ts new file mode 100644 index 0000000..f72ac95 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/src.ts/index.ts b/test/node_modules/@ethersproject/sha2/src.ts/index.ts new file mode 100644 index 0000000..ac50daa --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/sha2/src.ts/sha2.ts b/test/node_modules/@ethersproject/sha2/src.ts/sha2.ts new file mode 100644 index 0000000..a3cb107 --- /dev/null +++ b/test/node_modules/@ethersproject/sha2/src.ts/sha2.ts @@ -0,0 +1,38 @@ +"use strict"; + +import { createHash, createHmac } from "crypto"; + +import hash from "hash.js"; + +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" + 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/test/node_modules/@ethersproject/sha2/src.ts/types.ts b/test/node_modules/@ethersproject/sha2/src.ts/types.ts new file mode 100644 index 0000000..7560be8 --- /dev/null +++ b/test/node_modules/@ethersproject/sha2/src.ts/types.ts @@ -0,0 +1,2 @@ +export enum SupportedAlgorithm { sha256 = "sha256", sha512 = "sha512" }; + diff --git a/test/node_modules/@ethersproject/sha2/thirdparty.d.ts b/test/node_modules/@ethersproject/sha2/thirdparty.d.ts new file mode 100644 index 0000000..e69de29 diff --git a/test/node_modules/@ethersproject/signing-key/LICENSE.md b/test/node_modules/@ethersproject/signing-key/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/signing-key/README.md b/test/node_modules/@ethersproject/signing-key/README.md new file mode 100644 index 0000000..dbd6a02 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/signing-key/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/signing-key/lib.esm/_version.d.ts new file mode 100644 index 0000000..8682a64 --- /dev/null +++ b/test/node_modules/@ethersproject/signing-key/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "signing-key/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/signing-key/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/signing-key/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..cfa4fb8 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/signing-key/lib.esm/_version.js b/test/node_modules/@ethersproject/signing-key/lib.esm/_version.js new file mode 100644 index 0000000..a1addf7 --- /dev/null +++ b/test/node_modules/@ethersproject/signing-key/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "signing-key/5.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/signing-key/lib.esm/_version.js.map b/test/node_modules/@ethersproject/signing-key/lib.esm/_version.js.map new file mode 100644 index 0000000..c25a48c --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/signing-key/lib.esm/elliptic.d.ts b/test/node_modules/@ethersproject/signing-key/lib.esm/elliptic.d.ts new file mode 100644 index 0000000..cda6878 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/signing-key/lib.esm/elliptic.d.ts.map b/test/node_modules/@ethersproject/signing-key/lib.esm/elliptic.d.ts.map new file mode 100644 index 0000000..902c23d --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/signing-key/lib.esm/elliptic.js b/test/node_modules/@ethersproject/signing-key/lib.esm/elliptic.js new file mode 100644 index 0000000..83c3ea3 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/signing-key/lib.esm/elliptic.js.map b/test/node_modules/@ethersproject/signing-key/lib.esm/elliptic.js.map new file mode 100644 index 0000000..33404c3 --- /dev/null +++ b/test/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,KAAK,CAAC,GAAG,KAAK,oBAAoB,GAAG,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;AACpE,CAAC;;;ACVD,YAAY,CAAC;AACb;AACA,IAAI,KAAK,GAAG,OAAO,CAAC;AACpB;AACA,SAAS,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE;AAC3B,EAAE,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;AACxB,IAAI,OAAO,GAAG,CAAC,KAAK,EAAE,CAAC;AACvB,EAAE,IAAI,CAAC,GAAG;AACV,IAAI,OAAO,EAAE,CAAC;AACd,EAAE,IAAI,GAAG,GAAG,EAAE,CAAC;AACf,EAAE,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;AAC/B,IAAI,KAAK,IAAI,CAAC,GA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A4B,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/test/node_modules/@ethersproject/signing-key/lib.esm/index.d.ts b/test/node_modules/@ethersproject/signing-key/lib.esm/index.d.ts new file mode 100644 index 0000000..23fb6b9 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/signing-key/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/signing-key/lib.esm/index.d.ts.map new file mode 100644 index 0000000..bb9eecb --- /dev/null +++ b/test/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,EAAsC,SAAS,EAAE,aAAa,EAAkB,MAAM,sBAAsB,CAAC;AAezI,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;IAgBjC,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/test/node_modules/@ethersproject/signing-key/lib.esm/index.js b/test/node_modules/@ethersproject/signing-key/lib.esm/index.js new file mode 100644 index 0000000..6a54045 --- /dev/null +++ b/test/node_modules/@ethersproject/signing-key/lib.esm/index.js @@ -0,0 +1,82 @@ +"use strict"; +import { EC } from "./elliptic"; +import { arrayify, hexDataLength, 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)); + if (hexDataLength(this.privateKey) !== 32) { + logger.throwArgumentError("invalid private key", "privateKey", "[[ REDACTED ]]"); + } + 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/test/node_modules/@ethersproject/signing-key/lib.esm/index.js.map b/test/node_modules/@ethersproject/signing-key/lib.esm/index.js.map new file mode 100644 index 0000000..47226f3 --- /dev/null +++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AAI,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/test/node_modules/@ethersproject/signing-key/lib/_version.d.ts b/test/node_modules/@ethersproject/signing-key/lib/_version.d.ts new file mode 100644 index 0000000..8682a64 --- /dev/null +++ b/test/node_modules/@ethersproject/signing-key/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "signing-key/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/signing-key/lib/_version.d.ts.map b/test/node_modules/@ethersproject/signing-key/lib/_version.d.ts.map new file mode 100644 index 0000000..cfa4fb8 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/signing-key/lib/_version.js b/test/node_modules/@ethersproject/signing-key/lib/_version.js new file mode 100644 index 0000000..89ee17e --- /dev/null +++ b/test/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.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/signing-key/lib/_version.js.map b/test/node_modules/@ethersproject/signing-key/lib/_version.js.map new file mode 100644 index 0000000..527926e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/signing-key/lib/browser-elliptic.d.ts b/test/node_modules/@ethersproject/signing-key/lib/browser-elliptic.d.ts new file mode 100644 index 0000000..a826152 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/signing-key/lib/browser-elliptic.d.ts.map b/test/node_modules/@ethersproject/signing-key/lib/browser-elliptic.d.ts.map new file mode 100644 index 0000000..530906b --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/signing-key/lib/browser-elliptic.js b/test/node_modules/@ethersproject/signing-key/lib/browser-elliptic.js new file mode 100644 index 0000000..6e42974 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/signing-key/lib/browser-elliptic.js.map b/test/node_modules/@ethersproject/signing-key/lib/browser-elliptic.js.map new file mode 100644 index 0000000..2ecdb51 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/signing-key/lib/elliptic.d.ts b/test/node_modules/@ethersproject/signing-key/lib/elliptic.d.ts new file mode 100644 index 0000000..2eb5bf0 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/signing-key/lib/elliptic.d.ts.map b/test/node_modules/@ethersproject/signing-key/lib/elliptic.d.ts.map new file mode 100644 index 0000000..2cc1ae6 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/signing-key/lib/elliptic.js b/test/node_modules/@ethersproject/signing-key/lib/elliptic.js new file mode 100644 index 0000000..1ed1eb5 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/signing-key/lib/elliptic.js.map b/test/node_modules/@ethersproject/signing-key/lib/elliptic.js.map new file mode 100644 index 0000000..55d65e2 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/signing-key/lib/index.d.ts b/test/node_modules/@ethersproject/signing-key/lib/index.d.ts new file mode 100644 index 0000000..23fb6b9 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/signing-key/lib/index.d.ts.map b/test/node_modules/@ethersproject/signing-key/lib/index.d.ts.map new file mode 100644 index 0000000..bb9eecb --- /dev/null +++ b/test/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,EAAsC,SAAS,EAAE,aAAa,EAAkB,MAAM,sBAAsB,CAAC;AAezI,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;IAgBjC,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/test/node_modules/@ethersproject/signing-key/lib/index.js b/test/node_modules/@ethersproject/signing-key/lib/index.js new file mode 100644 index 0000000..01fb618 --- /dev/null +++ b/test/node_modules/@ethersproject/signing-key/lib/index.js @@ -0,0 +1,88 @@ +"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)); + if ((0, bytes_1.hexDataLength)(this.privateKey) !== 32) { + logger.throwArgumentError("invalid private key", "privateKey", "[[ REDACTED ]]"); + } + 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/test/node_modules/@ethersproject/signing-key/lib/index.js.map b/test/node_modules/@ethersproject/signing-key/lib/index.js.map new file mode 100644 index 0000000..1814a5c --- /dev/null +++ b/test/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,8CAAyI;AACzI,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,EAAE;QACT,MAAM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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,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/test/node_modules/@ethersproject/signing-key/package.json b/test/node_modules/@ethersproject/signing-key/package.json new file mode 100644 index 0000000..8ee85d3 --- /dev/null +++ b/test/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.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "bn.js": "^5.2.1", + "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": "ec1b9583039a14a0e0fa15d0a2a6082a2f41cf5b", + "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": "0xff1f808724833f5688798be9713ffc54260b28d51d001eda774f11d6babc4f35", + "types": "./lib/index.d.ts", + "version": "5.7.0" +} diff --git a/test/node_modules/@ethersproject/signing-key/src.ts/_version.ts b/test/node_modules/@ethersproject/signing-key/src.ts/_version.ts new file mode 100644 index 0000000..f1871f5 --- /dev/null +++ b/test/node_modules/@ethersproject/signing-key/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "signing-key/5.7.0"; diff --git a/test/node_modules/@ethersproject/signing-key/src.ts/browser-elliptic.ts b/test/node_modules/@ethersproject/signing-key/src.ts/browser-elliptic.ts new file mode 100644 index 0000000..76291ac --- /dev/null +++ b/test/node_modules/@ethersproject/signing-key/src.ts/browser-elliptic.ts @@ -0,0 +1,2 @@ + +// Empty File for build process diff --git a/test/node_modules/@ethersproject/signing-key/src.ts/elliptic.ts b/test/node_modules/@ethersproject/signing-key/src.ts/elliptic.ts new file mode 100644 index 0000000..2c08ede --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/signing-key/src.ts/index.ts b/test/node_modules/@ethersproject/signing-key/src.ts/index.ts new file mode 100644 index 0000000..1452316 --- /dev/null +++ b/test/node_modules/@ethersproject/signing-key/src.ts/index.ts @@ -0,0 +1,106 @@ +"use strict"; + +import { EC } from "./elliptic"; + +import { arrayify, BytesLike, hexDataLength, 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)); + if (hexDataLength(this.privateKey) !== 32) { + logger.throwArgumentError("invalid private key", "privateKey", "[[ REDACTED ]]"); + } + + 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/test/node_modules/@ethersproject/signing-key/thirdparty.d.ts b/test/node_modules/@ethersproject/signing-key/thirdparty.d.ts new file mode 100644 index 0000000..b7c9f70 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/LICENSE.md b/test/node_modules/@ethersproject/strings/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/README.md b/test/node_modules/@ethersproject/strings/README.md new file mode 100644 index 0000000..f00aaa4 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/strings/lib.esm/_version.d.ts new file mode 100644 index 0000000..23c0ebf --- /dev/null +++ b/test/node_modules/@ethersproject/strings/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "strings/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/strings/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/strings/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..4a69186 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib.esm/_version.js b/test/node_modules/@ethersproject/strings/lib.esm/_version.js new file mode 100644 index 0000000..3900cfe --- /dev/null +++ b/test/node_modules/@ethersproject/strings/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "strings/5.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/strings/lib.esm/_version.js.map b/test/node_modules/@ethersproject/strings/lib.esm/_version.js.map new file mode 100644 index 0000000..2d391d7 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib.esm/bytes32.d.ts b/test/node_modules/@ethersproject/strings/lib.esm/bytes32.d.ts new file mode 100644 index 0000000..52cb7d6 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib.esm/bytes32.d.ts.map b/test/node_modules/@ethersproject/strings/lib.esm/bytes32.d.ts.map new file mode 100644 index 0000000..7325c33 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib.esm/bytes32.js b/test/node_modules/@ethersproject/strings/lib.esm/bytes32.js new file mode 100644 index 0000000..65391f0 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib.esm/bytes32.js.map b/test/node_modules/@ethersproject/strings/lib.esm/bytes32.js.map new file mode 100644 index 0000000..f4d3e6c --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib.esm/idna.d.ts b/test/node_modules/@ethersproject/strings/lib.esm/idna.d.ts new file mode 100644 index 0000000..d3acedc --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib.esm/idna.d.ts.map b/test/node_modules/@ethersproject/strings/lib.esm/idna.d.ts.map new file mode 100644 index 0000000..584e839 --- /dev/null +++ b/test/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,CAiD9C"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/strings/lib.esm/idna.js b/test/node_modules/@ethersproject/strings/lib.esm/idna.js new file mode 100644 index 0000000..078529a --- /dev/null +++ b/test/node_modules/@ethersproject/strings/lib.esm/idna.js @@ -0,0 +1,184 @@ +"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"); + } + return name; +} +//# sourceMappingURL=idna.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/strings/lib.esm/idna.js.map b/test/node_modules/@ethersproject/strings/lib.esm/idna.js.map new file mode 100644 index 0000000..b1f9090 --- /dev/null +++ b/test/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,EAAE,CAAC,IAAI,CAAC,EAAE;QACrC,MAAM,CAAC,IA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CAAgC,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,OAAO,IAAI,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/strings/lib.esm/index.d.ts b/test/node_modules/@ethersproject/strings/lib.esm/index.d.ts new file mode 100644 index 0000000..419be18 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/strings/lib.esm/index.d.ts.map new file mode 100644 index 0000000..e7fd468 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib.esm/index.js b/test/node_modules/@ethersproject/strings/lib.esm/index.js new file mode 100644 index 0000000..f6b60f7 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib.esm/index.js.map b/test/node_modules/@ethersproject/strings/lib.esm/index.js.map new file mode 100644 index 0000000..167579a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib.esm/utf8.d.ts b/test/node_modules/@ethersproject/strings/lib.esm/utf8.d.ts new file mode 100644 index 0000000..e13133f --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib.esm/utf8.d.ts.map b/test/node_modules/@ethersproject/strings/lib.esm/utf8.d.ts.map new file mode 100644 index 0000000..a97f173 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib.esm/utf8.js b/test/node_modules/@ethersproject/strings/lib.esm/utf8.js new file mode 100644 index 0000000..340d38d --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib.esm/utf8.js.map b/test/node_modules/@ethersproject/strings/lib.esm/utf8.js.map new file mode 100644 index 0000000..68e8ba1 --- /dev/null +++ b/test/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;IAClE,uDAAiD,CAAA;AACrD,CAAC,EA/BW,eAAe,KAAf,eAAe,QA+B1B;AAAA,CAAC;AAKF,SAAS,SAAS,CAAC,MAAu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AE,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/test/node_modules/@ethersproject/strings/lib/_version.d.ts b/test/node_modules/@ethersproject/strings/lib/_version.d.ts new file mode 100644 index 0000000..23c0ebf --- /dev/null +++ b/test/node_modules/@ethersproject/strings/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "strings/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/strings/lib/_version.d.ts.map b/test/node_modules/@ethersproject/strings/lib/_version.d.ts.map new file mode 100644 index 0000000..4a69186 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib/_version.js b/test/node_modules/@ethersproject/strings/lib/_version.js new file mode 100644 index 0000000..12c8ae1 --- /dev/null +++ b/test/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.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/strings/lib/_version.js.map b/test/node_modules/@ethersproject/strings/lib/_version.js.map new file mode 100644 index 0000000..0ce0fea --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib/bytes32.d.ts b/test/node_modules/@ethersproject/strings/lib/bytes32.d.ts new file mode 100644 index 0000000..52cb7d6 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib/bytes32.d.ts.map b/test/node_modules/@ethersproject/strings/lib/bytes32.d.ts.map new file mode 100644 index 0000000..7325c33 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib/bytes32.js b/test/node_modules/@ethersproject/strings/lib/bytes32.js new file mode 100644 index 0000000..827822c --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib/bytes32.js.map b/test/node_modules/@ethersproject/strings/lib/bytes32.js.map new file mode 100644 index 0000000..d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"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/strings/lib/idna.d.ts b/test/node_modules/@ethersproject/strings/lib/idna.d.ts new file mode 100644 index 0000000..d3acedc --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib/idna.d.ts.map b/test/node_modules/@ethersproject/strings/lib/idna.d.ts.map new file mode 100644 index 0000000..584e839 --- /dev/null +++ b/test/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,CAiD9C"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/strings/lib/idna.js b/test/node_modules/@ethersproject/strings/lib/idna.js new file mode 100644 index 0000000..f748d1f --- /dev/null +++ b/test/node_modules/@ethersproject/strings/lib/idna.js @@ -0,0 +1,190 @@ +"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"); + } + return name; +} +exports.nameprep = nameprep; +//# sourceMappingURL=idna.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/strings/lib/idna.js.map b/test/node_modules/@ethersproject/strings/lib/idna.js.map new file mode 100644 index 0000000..2872a91 --- /dev/null +++ b/test/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,IAAI,EAAE;QACP,IAAI,GAAG,UAAS,KAAa,IAAI,OAAO,CAAE,QAAQ,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GAAG,CAAC,CAAC,KAAK,GAAG,EAAE;QAC1G,MAAM,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;KACrC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC;AAjDD,4BAiDC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/strings/lib/index.d.ts b/test/node_modules/@ethersproject/strings/lib/index.d.ts new file mode 100644 index 0000000..419be18 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib/index.d.ts.map b/test/node_modules/@ethersproject/strings/lib/index.d.ts.map new file mode 100644 index 0000000..e7fd468 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib/index.js b/test/node_modules/@ethersproject/strings/lib/index.js new file mode 100644 index 0000000..a266861 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib/index.js.map b/test/node_modules/@ethersproject/strings/lib/index.js.map new file mode 100644 index 0000000..8022cad --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib/utf8.d.ts b/test/node_modules/@ethersproject/strings/lib/utf8.d.ts new file mode 100644 index 0000000..e13133f --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib/utf8.d.ts.map b/test/node_modules/@ethersproject/strings/lib/utf8.d.ts.map new file mode 100644 index 0000000..a97f173 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib/utf8.js b/test/node_modules/@ethersproject/strings/lib/utf8.js new file mode 100644 index 0000000..ecdd72d --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/lib/utf8.js.map b/test/node_modules/@ethersproject/strings/lib/utf8.js.map new file mode 100644 index 0000000..70111d6 --- /dev/null +++ b/test/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,CAAA;IACjB,yCAAiB,CAAA;AACrB,CAAC,EANW,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAMnC;AAAA,CAAC;AAEF,IAAY,eA+BX;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,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/test/node_modules/@ethersproject/strings/package.json b/test/node_modules/@ethersproject/strings/package.json new file mode 100644 index 0000000..5e6e4ac --- /dev/null +++ b/test/node_modules/@ethersproject/strings/package.json @@ -0,0 +1,46 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.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": "ec1b9583039a14a0e0fa15d0a2a6082a2f41cf5b", + "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": "0xbde9a4dad59a25a6b1956cf36146ddcceb251b39b2761ac4899b24876656c496", + "types": "./lib/index.d.ts", + "version": "5.7.0" +} diff --git a/test/node_modules/@ethersproject/strings/src.ts/_version.ts b/test/node_modules/@ethersproject/strings/src.ts/_version.ts new file mode 100644 index 0000000..a1195a2 --- /dev/null +++ b/test/node_modules/@ethersproject/strings/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "strings/5.7.0"; diff --git a/test/node_modules/@ethersproject/strings/src.ts/bytes32.ts b/test/node_modules/@ethersproject/strings/src.ts/bytes32.ts new file mode 100644 index 0000000..0d79431 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/src.ts/idna.ts b/test/node_modules/@ethersproject/strings/src.ts/idna.ts new file mode 100644 index 0000000..c639d9e --- /dev/null +++ b/test/node_modules/@ethersproject/strings/src.ts/idna.ts @@ -0,0 +1,207 @@ +"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"); + } + + return name; +} + diff --git a/test/node_modules/@ethersproject/strings/src.ts/index.ts b/test/node_modules/@ethersproject/strings/src.ts/index.ts new file mode 100644 index 0000000..4984d67 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/strings/src.ts/utf8.ts b/test/node_modules/@ethersproject/strings/src.ts/utf8.ts new file mode 100644 index 0000000..2d52dec --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/transactions/LICENSE.md b/test/node_modules/@ethersproject/transactions/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/transactions/README.md b/test/node_modules/@ethersproject/transactions/README.md new file mode 100644 index 0000000..225a166 --- /dev/null +++ b/test/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/transactions"); +``` + + +License +------- + +MIT License diff --git a/test/node_modules/@ethersproject/transactions/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/transactions/lib.esm/_version.d.ts new file mode 100644 index 0000000..5d90719 --- /dev/null +++ b/test/node_modules/@ethersproject/transactions/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "transactions/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/transactions/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/transactions/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..84552f7 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/transactions/lib.esm/_version.js b/test/node_modules/@ethersproject/transactions/lib.esm/_version.js new file mode 100644 index 0000000..7e2f6b7 --- /dev/null +++ b/test/node_modules/@ethersproject/transactions/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "transactions/5.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/transactions/lib.esm/_version.js.map b/test/node_modules/@ethersproject/transactions/lib.esm/_version.js.map new file mode 100644 index 0000000..a4db61b --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/transactions/lib.esm/index.d.ts b/test/node_modules/@ethersproject/transactions/lib.esm/index.d.ts new file mode 100644 index 0000000..011ecc2 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/transactions/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/transactions/lib.esm/index.d.ts.map new file mode 100644 index 0000000..a911f8e --- /dev/null +++ b/test/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,CAAC,EAAE,MAAM,CAAC;IAEf,QAAQ,CAAC,EAAE,Y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GAAG,MAAM,CAuB7F;AAsJD,wBAAgB,KAAK,CAAC,cAAc,EAAE,SAAS,GAAG,WAAW,CAoB5D"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/transactions/lib.esm/index.js b/test/node_modules/@ethersproject/transactions/lib.esm/index.js new file mode 100644 index 0000000..8aea4b1 --- /dev/null +++ b/test/node_modules/@ethersproject/transactions/lib.esm/index.js @@ -0,0 +1,385 @@ +"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) { } +} +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) { + // @TODO: What makes snese to do? The v is too big + 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) { } + 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/test/node_modules/@ethersproject/transactions/lib.esm/index.js.map b/test/node_modules/@ethersproject/transactions/lib.esm/index.js.map new file mode 100644 index 0000000..6f7b144 --- /dev/null +++ b/test/node_modules/@ethersproject/transactions/lib.esm/index.js.map @@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C;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/test/node_modules/@ethersproject/transactions/lib/_version.d.ts b/test/node_modules/@ethersproject/transactions/lib/_version.d.ts new file mode 100644 index 0000000..5d90719 --- /dev/null +++ b/test/node_modules/@ethersproject/transactions/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "transactions/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/transactions/lib/_version.d.ts.map b/test/node_modules/@ethersproject/transactions/lib/_version.d.ts.map new file mode 100644 index 0000000..84552f7 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/transactions/lib/_version.js b/test/node_modules/@ethersproject/transactions/lib/_version.js new file mode 100644 index 0000000..a6f84d0 --- /dev/null +++ b/test/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.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/transactions/lib/_version.js.map b/test/node_modules/@ethersproject/transactions/lib/_version.js.map new file mode 100644 index 0000000..cb386e2 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/transactions/lib/index.d.ts b/test/node_modules/@ethersproject/transactions/lib/index.d.ts new file mode 100644 index 0000000..011ecc2 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/transactions/lib/index.d.ts.map b/test/node_modules/@ethersproject/transactions/lib/index.d.ts.map new file mode 100644 index 0000000..a911f8e --- /dev/null +++ b/test/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,EAAE,MAAM,CAAC;IAGjB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGrB,UAAU,CAAC,EAAE,aAAa,CAAC;IAG3B,oBAAoB,CAAC,EAAE,YAAY,CAAC;IACpC,YAAY,CAAC,EAAE,YAAY,CAAC;CAC/B,CAAA;AAED,MAAM,WAAW,WAAW;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IAEd,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAEhB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IAGX,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGrB,UAAU,CAAC,EAAE,UAAU,CAAC;IAGxB,oBAAoB,CAAC,EAAE,SAAS,CAAC;IACjC,YAAY,CAAC,EAAE,SAAS,CAAC;CAC5B;AA4BD,wBAAgB,cAAc,CAAC,GAAG,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,CAG9D;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,GAAG,MAAM,CAElF;AAsBD,wBAAgB,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,UAAU,CAsB9D;AAiJD,wBAAgB,SAAS,CAAC,WAAW,EAAE,mBAAmB,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,MAAM,CAuB7F;AAsJD,wBAAgB,KAAK,CAAC,cAAc,EAAE,SAAS,GAAG,WAAW,CAoB5D"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/transactions/lib/index.js b/test/node_modules/@ethersproject/transactions/lib/index.js new file mode 100644 index 0000000..8483312 --- /dev/null +++ b/test/node_modules/@ethersproject/transactions/lib/index.js @@ -0,0 +1,412 @@ +"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) { } +} +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) { + // @TODO: What makes snese to do? The v is too big + 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) { } + 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/test/node_modules/@ethersproject/transactions/lib/index.js.map b/test/node_modules/@ethersproject/transactions/lib/index.js.map new file mode 100644 index 0000000..1ed6ccd --- /dev/null +++ b/test/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;AACnE,8CAA8L;AAC9L,sDAAgD;AAChD,sDAAqD;AACrD,wDAA4D;AAC5D,sDAA0C;AAC1C,0DAAgF;AAEhF,gDAA+C;AAC/C,uCAAqC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U,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/test/node_modules/@ethersproject/transactions/package.json b/test/node_modules/@ethersproject/transactions/package.json new file mode 100644 index 0000000..8fe51b9 --- /dev/null +++ b/test/node_modules/@ethersproject/transactions/package.json @@ -0,0 +1,50 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/rlp": "^5.7.0", + "@ethersproject/signing-key": "^5.7.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": "ec1b9583039a14a0e0fa15d0a2a6082a2f41cf5b", + "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": "0xee56f11b91fcfc6020d9009981cd8276eeeda4883bdc9ee8eecf8eb9b726c457", + "types": "./lib/index.d.ts", + "version": "5.7.0" +} diff --git a/test/node_modules/@ethersproject/transactions/src.ts/_version.ts b/test/node_modules/@ethersproject/transactions/src.ts/_version.ts new file mode 100644 index 0000000..70da314 --- /dev/null +++ b/test/node_modules/@ethersproject/transactions/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "transactions/5.7.0"; diff --git a/test/node_modules/@ethersproject/transactions/src.ts/index.ts b/test/node_modules/@ethersproject/transactions/src.ts/index.ts new file mode 100644 index 0000000..5dad727 --- /dev/null +++ b/test/node_modules/@ethersproject/transactions/src.ts/index.ts @@ -0,0 +1,499 @@ +"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) { } +} + +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) { + // @TODO: What makes snese to do? The v is too big + 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) { } + + 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/test/node_modules/@ethersproject/units/LICENSE.md b/test/node_modules/@ethersproject/units/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/units/README.md b/test/node_modules/@ethersproject/units/README.md new file mode 100644 index 0000000..140220f --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/units/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/units/lib.esm/_version.d.ts new file mode 100644 index 0000000..87417c6 --- /dev/null +++ b/test/node_modules/@ethersproject/units/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "units/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/units/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/units/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..bb29653 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/units/lib.esm/_version.js b/test/node_modules/@ethersproject/units/lib.esm/_version.js new file mode 100644 index 0000000..9d3fdf6 --- /dev/null +++ b/test/node_modules/@ethersproject/units/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "units/5.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/units/lib.esm/_version.js.map b/test/node_modules/@ethersproject/units/lib.esm/_version.js.map new file mode 100644 index 0000000..2b36b38 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/units/lib.esm/index.d.ts b/test/node_modules/@ethersproject/units/lib.esm/index.d.ts new file mode 100644 index 0000000..eb7e66d --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/units/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/units/lib.esm/index.d.ts.map new file mode 100644 index 0000000..b63548b --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/units/lib.esm/index.js b/test/node_modules/@ethersproject/units/lib.esm/index.js new file mode 100644 index 0000000..43cda85 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/units/lib.esm/index.js.map b/test/node_modules/@ethersproject/units/lib.esm/index.js.map new file mode 100644 index 0000000..dc4a967 --- /dev/null +++ b/test/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;IACV,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,OAAO;IACP,QAAQ;IACR,OAAO;CACV,CAAC;AAGF,oFAAoF;AACpF,YAAY;AACZ,MAAM,UAAU,OAAO,C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ACD,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/test/node_modules/@ethersproject/units/lib/_version.d.ts b/test/node_modules/@ethersproject/units/lib/_version.d.ts new file mode 100644 index 0000000..87417c6 --- /dev/null +++ b/test/node_modules/@ethersproject/units/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "units/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/units/lib/_version.d.ts.map b/test/node_modules/@ethersproject/units/lib/_version.d.ts.map new file mode 100644 index 0000000..bb29653 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/units/lib/_version.js b/test/node_modules/@ethersproject/units/lib/_version.js new file mode 100644 index 0000000..ae43d3f --- /dev/null +++ b/test/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.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/units/lib/_version.js.map b/test/node_modules/@ethersproject/units/lib/_version.js.map new file mode 100644 index 0000000..2f9c571 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/units/lib/index.d.ts b/test/node_modules/@ethersproject/units/lib/index.d.ts new file mode 100644 index 0000000..eb7e66d --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/units/lib/index.d.ts.map b/test/node_modules/@ethersproject/units/lib/index.d.ts.map new file mode 100644 index 0000000..b63548b --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/units/lib/index.js b/test/node_modules/@ethersproject/units/lib/index.js new file mode 100644 index 0000000..dcbf23a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/units/lib/index.js.map b/test/node_modules/@ethersproject/units/lib/index.js.map new file mode 100644 index 0000000..492bf55 --- /dev/null +++ b/test/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,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,KAA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AAK,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/test/node_modules/@ethersproject/units/package.json b/test/node_modules/@ethersproject/units/package.json new file mode 100644 index 0000000..5729d02 --- /dev/null +++ b/test/node_modules/@ethersproject/units/package.json @@ -0,0 +1,46 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.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": "ec1b9583039a14a0e0fa15d0a2a6082a2f41cf5b", + "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": "0x213811ac8c90bcf07e0baff3a6e583b9a25bbda6f0e8372773d7c1c85d894fa8", + "types": "./lib/index.d.ts", + "version": "5.7.0" +} diff --git a/test/node_modules/@ethersproject/units/src.ts/_version.ts b/test/node_modules/@ethersproject/units/src.ts/_version.ts new file mode 100644 index 0000000..07bd9db --- /dev/null +++ b/test/node_modules/@ethersproject/units/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "units/5.7.0"; diff --git a/test/node_modules/@ethersproject/units/src.ts/index.ts b/test/node_modules/@ethersproject/units/src.ts/index.ts new file mode 100644 index 0000000..5b2cdad --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/wallet/LICENSE.md b/test/node_modules/@ethersproject/wallet/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/wallet/README.md b/test/node_modules/@ethersproject/wallet/README.md new file mode 100644 index 0000000..d6fea3e --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/wallet/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/wallet/lib.esm/_version.d.ts new file mode 100644 index 0000000..c6c478f --- /dev/null +++ b/test/node_modules/@ethersproject/wallet/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "wallet/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/wallet/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/wallet/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..3fd2218 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/wallet/lib.esm/_version.js b/test/node_modules/@ethersproject/wallet/lib.esm/_version.js new file mode 100644 index 0000000..6b32eb2 --- /dev/null +++ b/test/node_modules/@ethersproject/wallet/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "wallet/5.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/wallet/lib.esm/_version.js.map b/test/node_modules/@ethersproject/wallet/lib.esm/_version.js.map new file mode 100644 index 0000000..056b924 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/wallet/lib.esm/index.d.ts b/test/node_modules/@ethersproject/wallet/lib.esm/index.d.ts new file mode 100644 index 0000000..2c2723c --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/wallet/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/wallet/lib.esm/index.d.ts.map new file mode 100644 index 0000000..3234cdb --- /dev/null +++ b/test/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;IA+D5F,IAAI,QAAQ,IAAI,QAAQ,CAA6B;IACrD,IAAI,UAAU,IAAI,MAAM,CAA0C;IAClE,IAAI,SAAS,IAAI,MAAM,CAAyC;IAEhE,UAAU,IAAI,OAAO,CA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AC,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/test/node_modules/@ethersproject/wallet/lib.esm/index.js b/test/node_modules/@ethersproject/wallet/lib.esm/index.js new file mode 100644 index 0000000..686e2ae --- /dev/null +++ b/test/node_modules/@ethersproject/wallet/lib.esm/index.js @@ -0,0 +1,176 @@ +"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) { + 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/test/node_modules/@ethersproject/wallet/lib.esm/index.js.map b/test/node_modules/@ethersproject/wallet/lib.esm/index.js.map new file mode 100644 index 0000000..675f5a7 --- /dev/null +++ b/test/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,SAAS,CAAC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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/test/node_modules/@ethersproject/wallet/lib/_version.d.ts b/test/node_modules/@ethersproject/wallet/lib/_version.d.ts new file mode 100644 index 0000000..c6c478f --- /dev/null +++ b/test/node_modules/@ethersproject/wallet/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "wallet/5.7.0"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/wallet/lib/_version.d.ts.map b/test/node_modules/@ethersproject/wallet/lib/_version.d.ts.map new file mode 100644 index 0000000..3fd2218 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/wallet/lib/_version.js b/test/node_modules/@ethersproject/wallet/lib/_version.js new file mode 100644 index 0000000..662ca8f --- /dev/null +++ b/test/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.7.0"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/wallet/lib/_version.js.map b/test/node_modules/@ethersproject/wallet/lib/_version.js.map new file mode 100644 index 0000000..e2300dc --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/wallet/lib/index.d.ts b/test/node_modules/@ethersproject/wallet/lib/index.d.ts new file mode 100644 index 0000000..2c2723c --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/wallet/lib/index.d.ts.map b/test/node_modules/@ethersproject/wallet/lib/index.d.ts.map new file mode 100644 index 0000000..3234cdb --- /dev/null +++ b/test/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,MAAM,QAAQ,CAAC;gBAEvB,UAAU,EAAE,SAA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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/test/node_modules/@ethersproject/wallet/lib/index.js b/test/node_modules/@ethersproject/wallet/lib/index.js new file mode 100644 index 0000000..b32bb9c --- /dev/null +++ b/test/node_modules/@ethersproject/wallet/lib/index.js @@ -0,0 +1,248 @@ +"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 _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/test/node_modules/@ethersproject/wallet/lib/index.js.map b/test/node_modules/@ethersproject/wallet/lib/index.js.map new file mode 100644 index 0000000..da0d2b8 --- /dev/null +++ b/test/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,YACI,iBAAO,SA4DV;QA1DG,IAAI,SAAS,CAAC,UAAU,CAAC,EAAE;YACvB,IAAM,YAAU,GAAG,IAAI,wBAAU,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;YACzD,IAAA,2BAAc,EAAC,KAAI,EAAE,aAAa,EAAE,cAAM,OAAA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B,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/test/node_modules/@ethersproject/wallet/package.json b/test/node_modules/@ethersproject/wallet/package.json new file mode 100644 index 0000000..93c5263 --- /dev/null +++ b/test/node_modules/@ethersproject/wallet/package.json @@ -0,0 +1,56 @@ +{ + "author": "Richard Moore ", + "dependencies": { + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/hdnode": "^5.7.0", + "@ethersproject/json-wallets": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/random": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/wordlists": "^5.7.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": "ec1b9583039a14a0e0fa15d0a2a6082a2f41cf5b", + "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": "0x9f0366a56a1e73f4f47b37c7167c0491792f347492688f07f964e12fc10b5a1a", + "types": "./lib/index.d.ts", + "version": "5.7.0" +} diff --git a/test/node_modules/@ethersproject/wallet/src.ts/_version.ts b/test/node_modules/@ethersproject/wallet/src.ts/_version.ts new file mode 100644 index 0000000..8a4aba3 --- /dev/null +++ b/test/node_modules/@ethersproject/wallet/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "wallet/5.7.0"; diff --git a/test/node_modules/@ethersproject/wallet/src.ts/index.ts b/test/node_modules/@ethersproject/wallet/src.ts/index.ts new file mode 100644 index 0000000..eccf458 --- /dev/null +++ b/test/node_modules/@ethersproject/wallet/src.ts/index.ts @@ -0,0 +1,202 @@ +"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) { + 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/test/node_modules/@ethersproject/web/LICENSE.md b/test/node_modules/@ethersproject/web/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/web/README.md b/test/node_modules/@ethersproject/web/README.md new file mode 100644 index 0000000..5ed09d1 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/web/lib.esm/_version.d.ts b/test/node_modules/@ethersproject/web/lib.esm/_version.d.ts new file mode 100644 index 0000000..8eaf677 --- /dev/null +++ b/test/node_modules/@ethersproject/web/lib.esm/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "web/5.7.1"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/web/lib.esm/_version.d.ts.map b/test/node_modules/@ethersproject/web/lib.esm/_version.d.ts.map new file mode 100644 index 0000000..3c33172 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/web/lib.esm/_version.js b/test/node_modules/@ethersproject/web/lib.esm/_version.js new file mode 100644 index 0000000..187bffa --- /dev/null +++ b/test/node_modules/@ethersproject/web/lib.esm/_version.js @@ -0,0 +1,2 @@ +export const version = "web/5.7.1"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/web/lib.esm/_version.js.map b/test/node_modules/@ethersproject/web/lib.esm/_version.js.map new file mode 100644 index 0000000..4854997 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/web/lib.esm/geturl.d.ts b/test/node_modules/@ethersproject/web/lib.esm/geturl.d.ts new file mode 100644 index 0000000..5259bc5 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/web/lib.esm/geturl.d.ts.map b/test/node_modules/@ethersproject/web/lib.esm/geturl.d.ts.map new file mode 100644 index 0000000..0176f92 --- /dev/null +++ b/test/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,CA8CrF"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/web/lib.esm/geturl.js b/test/node_modules/@ethersproject/web/lib.esm/geturl.js new file mode 100644 index 0000000..67395d0 --- /dev/null +++ b/test/node_modules/@ethersproject/web/lib.esm/geturl.js @@ -0,0 +1,69 @@ +"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 + } + ; + if (options.fetchOptions != null) { + const opts = options.fetchOptions; + if (opts.mode) { + request.mode = (opts.mode); + } + if (opts.cache) { + request.cache = (opts.cache); + } + if (opts.credentials) { + request.credentials = (opts.credentials); + } + if (opts.redirect) { + request.redirect = (opts.redirect); + } + if (opts.referrer) { + request.referrer = opts.referrer; + } + } + 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/test/node_modules/@ethersproject/web/lib.esm/geturl.js.map b/test/node_modules/@ethersproject/web/lib.esm/geturl.js.map new file mode 100644 index 0000000..4bddb81 --- /dev/null +++ b/test/node_modules/@ethersproject/web/lib.esm/geturl.js.map @@ -0,0 +1 @@ +{"version":3,"file":"geturl.js","sourceRoot":"","sources":["../src.ts/browser-geturl.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAMhD,MAAM,UAAgB,MAAM,CAAC,IAAY,EAAE,OAAiB;;QACxD,IAAI,OAAO,IAAI,IAAI,EAAE;YAAE,OAAO,GAAG,EAAG,CAAC;SAAE;QAEvC,MAAM,OAAO,GAAgB;YACzB,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,IAAI,KAAK,CAAC;YACjC,OAAO,EAAE,CAAC,OAAO,CAAC,OAAO,IAAI,EAAG,CAAC;YACjC,IAAI,EAAE,CAAC,OAAO,CAAC,IAAI,IAAI,SAAS,CAAC;SACpC,CAAC;QAEF,IAAI,OAAO,CAAC,cAAc,KAAK,IAAI,EAAE;YACjC,OAAO,CAAC,IAAI,GAAgB,MAAM,CAAC,CAAc,8BAA8B;YAC/E,OAAO,CAAC,KAAK,GAAiB,UAAU,CAAC,CAAQ,0DAA0D;YAC3G,OAAO,CAAC,WAAW,GAAuB,aAAa,CAAC,CAAE,8BAA8B;YACxF,OAAO,CAAC,QAAQ,GAAoB,QAAQ,CAAC,CAAI,yBAAyB;YAC1E,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC,CAAqB,uBAAuB;SAC3E;QAAA,CAAC;QAEF,IAAI,OAAO,CAAC,YAAY,IAAI,IAAI,EAAE;YAC9B,MAAM,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC;YAClC,IAAI,IAAI,CAAC,IAAI,EAAE;gBAAE,OAAO,CAAC,IAAI,GAAgB,CAAC,IAAI,CAAC,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AAU;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/test/node_modules/@ethersproject/web/lib.esm/index.d.ts b/test/node_modules/@ethersproject/web/lib.esm/index.d.ts new file mode 100644 index 0000000..2647083 --- /dev/null +++ b/test/node_modules/@ethersproject/web/lib.esm/index.d.ts @@ -0,0 +1,42 @@ +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; + skipFetchSetup?: boolean; + fetchOptions?: Record; + errorPassThrough?: boolean; + 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/test/node_modules/@ethersproject/web/lib.esm/index.d.ts.map b/test/node_modules/@ethersproject/web/lib.esm/index.d.ts.map new file mode 100644 index 0000000..8142dec --- /dev/null +++ b/test/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,GA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AO,EAAE;QAAE,CAAE,MAAM,EAAE,MAAM,GAAI,MAAM,CAAA;KAAE,CAAC;CAC3C,CAAC;AAiBF,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,CA6QlL;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/test/node_modules/@ethersproject/web/lib.esm/index.js b/test/node_modules/@ethersproject/web/lib.esm/index.js new file mode 100644 index 0000000..2f0277d --- /dev/null +++ b/test/node_modules/@ethersproject/web/lib.esm/index.js @@ -0,0 +1,404 @@ +"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; +} +function unpercent(value) { + return toUtf8Bytes(value.replace(/%([0-9a-f][0-9a-f])/gi, (all, code) => { + return String.fromCharCode(parseInt(code, 16)); + })); +} +// 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 errorPassThrough = ((typeof (connection) === "object") ? !!(connection.errorPassThrough) : false); + 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)) + }; + } + if (connection.skipFetchSetup != null) { + options.skipFetchSetup = !!connection.skipFetchSetup; + } + if (connection.fetchOptions != null) { + options.fetchOptions = shallowCopy(connection.fetchOptions); + } + } + const reData = new RegExp("^data:([^;:]*)?(;base64)?,(.*)$", "i"); + const dataMatch = ((url) ? url.match(reData) : null); + if (dataMatch) { + try { + const response = { + statusCode: 200, + statusMessage: "OK", + headers: { "content-type": (dataMatch[1] || "text/plain") }, + body: (dataMatch[2] ? base64Decode(dataMatch[3]) : unpercent(dataMatch[3])) + }; + 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 (!errorPassThrough && (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/test/node_modules/@ethersproject/web/lib.esm/index.js.map b/test/node_modules/@ethersproject/web/lib.esm/index.js.map new file mode 100644 index 0000000..711a048 --- /dev/null +++ b/test/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,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C;AACP,CAAC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/web/lib.esm/types.d.ts b/test/node_modules/@ethersproject/web/lib.esm/types.d.ts new file mode 100644 index 0000000..2c7576b --- /dev/null +++ b/test/node_modules/@ethersproject/web/lib.esm/types.d.ts @@ -0,0 +1,19 @@ +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; + fetchOptions?: Record; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/web/lib.esm/types.d.ts.map b/test/node_modules/@ethersproject/web/lib.esm/types.d.ts.map new file mode 100644 index 0000000..d65dd29 --- /dev/null +++ b/test/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;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACzC,CAAC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/web/lib.esm/types.js b/test/node_modules/@ethersproject/web/lib.esm/types.js new file mode 100644 index 0000000..f50a4bb --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/web/lib.esm/types.js.map b/test/node_modules/@ethersproject/web/lib.esm/types.js.map new file mode 100644 index 0000000..8111c2c --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/web/lib/_version.d.ts b/test/node_modules/@ethersproject/web/lib/_version.d.ts new file mode 100644 index 0000000..8eaf677 --- /dev/null +++ b/test/node_modules/@ethersproject/web/lib/_version.d.ts @@ -0,0 +1,2 @@ +export declare const version = "web/5.7.1"; +//# sourceMappingURL=_version.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/web/lib/_version.d.ts.map b/test/node_modules/@ethersproject/web/lib/_version.d.ts.map new file mode 100644 index 0000000..3c33172 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/web/lib/_version.js b/test/node_modules/@ethersproject/web/lib/_version.js new file mode 100644 index 0000000..1934ee8 --- /dev/null +++ b/test/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.7.1"; +//# sourceMappingURL=_version.js.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/web/lib/_version.js.map b/test/node_modules/@ethersproject/web/lib/_version.js.map new file mode 100644 index 0000000..b3a3dff --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/web/lib/browser-geturl.d.ts b/test/node_modules/@ethersproject/web/lib/browser-geturl.d.ts new file mode 100644 index 0000000..8107a7c --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/web/lib/browser-geturl.d.ts.map b/test/node_modules/@ethersproject/web/lib/browser-geturl.d.ts.map new file mode 100644 index 0000000..8864220 --- /dev/null +++ b/test/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,CA8CrF"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/web/lib/browser-geturl.js b/test/node_modules/@ethersproject/web/lib/browser-geturl.js new file mode 100644 index 0000000..7ef6c6e --- /dev/null +++ b/test/node_modules/@ethersproject/web/lib/browser-geturl.js @@ -0,0 +1,109 @@ +"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, opts, 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 + } + ; + if (options.fetchOptions != null) { + opts = options.fetchOptions; + if (opts.mode) { + request.mode = (opts.mode); + } + if (opts.cache) { + request.cache = (opts.cache); + } + if (opts.credentials) { + request.credentials = (opts.credentials); + } + if (opts.redirect) { + request.redirect = (opts.redirect); + } + if (opts.referrer) { + request.referrer = opts.referrer; + } + } + 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/test/node_modules/@ethersproject/web/lib/browser-geturl.js.map b/test/node_modules/@ethersproject/web/lib/browser-geturl.js.map new file mode 100644 index 0000000..9dfc428 --- /dev/null +++ b/test/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,S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CAAC,QAAQ,CAAC,CAAC;yBAAE;wBAC3E,IAAI,IAAI,CAAC,QAAQ,EAAE;4BAAE,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;yBAAE;qBAC3D;oBAEgB,qBAAM,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,EAAA;;oBAArC,QAAQ,GAAG,SAA0B;oBAC9B,qBAAM,QAAQ,CAAC,WAAW,EAAE,EAAA;;oBAAnC,IAAI,GAAG,SAA4B;oBAEnC,OAAO,GAAiC,EAAG,CAAC;oBAClD,IAAI,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE;wBAC1B,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,UAAC,KAAK,EAAE,GAAG;4BAChC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,KAAK,CAAC;wBACvC,CAAC,CAAC,CAAC;qBACN;yBAAM;wBACmB,CAAO,CAAC,QAAQ,CAAC,OAAO,CAAE,CAAC,IAAI,CAAE,EAAE,CAAC,OAAO,CAAC,UAAC,GAAG;4BAClE,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,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;AA9CD,wBA8CC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/web/lib/geturl.d.ts b/test/node_modules/@ethersproject/web/lib/geturl.d.ts new file mode 100644 index 0000000..5259bc5 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/web/lib/geturl.d.ts.map b/test/node_modules/@ethersproject/web/lib/geturl.d.ts.map new file mode 100644 index 0000000..127be6a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/web/lib/geturl.js b/test/node_modules/@ethersproject/web/lib/geturl.js new file mode 100644 index 0000000..71ccf37 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/web/lib/geturl.js.map b/test/node_modules/@ethersproject/web/lib/geturl.js.map new file mode 100644 index 0000000..bbef417 --- /dev/null +++ b/test/node_modules/@ethersproject/web/lib/geturl.js.map @@ -0,0 +1 @@ +{"version":3,"file":"getur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node_modules/@ethersproject/web/lib/index.d.ts b/test/node_modules/@ethersproject/web/lib/index.d.ts new file mode 100644 index 0000000..2647083 --- /dev/null +++ b/test/node_modules/@ethersproject/web/lib/index.d.ts @@ -0,0 +1,42 @@ +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; + skipFetchSetup?: boolean; + fetchOptions?: Record; + errorPassThrough?: boolean; + 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/test/node_modules/@ethersproject/web/lib/index.d.ts.map b/test/node_modules/@ethersproject/web/lib/index.d.ts.map new file mode 100644 index 0000000..8142dec --- /dev/null +++ b/test/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,M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E,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,CA6QlL;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/test/node_modules/@ethersproject/web/lib/index.js b/test/node_modules/@ethersproject/web/lib/index.js new file mode 100644 index 0000000..a99c503 --- /dev/null +++ b/test/node_modules/@ethersproject/web/lib/index.js @@ -0,0 +1,463 @@ +"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; +} +function unpercent(value) { + return (0, strings_1.toUtf8Bytes)(value.replace(/%([0-9a-f][0-9a-f])/gi, function (all, code) { + return String.fromCharCode(parseInt(code, 16)); + })); +} +// 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 errorPassThrough = ((typeof (connection) === "object") ? !!(connection.errorPassThrough) : false); + 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)) + }; + } + if (connection.skipFetchSetup != null) { + options.skipFetchSetup = !!connection.skipFetchSetup; + } + if (connection.fetchOptions != null) { + options.fetchOptions = (0, properties_1.shallowCopy)(connection.fetchOptions); + } + } + var reData = new RegExp("^data:([^;:]*)?(;base64)?,(.*)$", "i"); + var dataMatch = ((url) ? url.match(reData) : null); + if (dataMatch) { + try { + var response = { + statusCode: 200, + statusMessage: "OK", + headers: { "content-type": (dataMatch[1] || "text/plain") }, + body: (dataMatch[2] ? (0, base64_1.decode)(dataMatch[3]) : unpercent(dataMatch[3])) + }; + 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 (!errorPassThrough && (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/test/node_modules/@ethersproject/web/lib/index.js.map b/test/node_modules/@ethersproject/web/lib/index.js.map new file mode 100644 index 0000000..0cacb35 --- /dev/null +++ b/test/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,E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AAO,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/test/node_modules/@ethersproject/web/lib/types.d.ts b/test/node_modules/@ethersproject/web/lib/types.d.ts new file mode 100644 index 0000000..2c7576b --- /dev/null +++ b/test/node_modules/@ethersproject/web/lib/types.d.ts @@ -0,0 +1,19 @@ +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; + fetchOptions?: Record; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/test/node_modules/@ethersproject/web/lib/types.d.ts.map b/test/node_modules/@ethersproject/web/lib/types.d.ts.map new file mode 100644 index 0000000..d65dd29 --- /dev/null +++ b/test/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;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACzC,CAAC"} \ No newline at end of file diff --git a/test/node_modules/@ethersproject/web/lib/types.js b/test/node_modules/@ethersproject/web/lib/types.js new file mode 100644 index 0000000..11e638d --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/web/lib/types.js.map b/test/node_modules/@ethersproject/web/lib/types.js.map new file mode 100644 index 0000000..8111c2c --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/web/package.json b/test/node_modules/@ethersproject/web/package.json new file mode 100644 index 0000000..1b067eb --- /dev/null +++ b/test/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.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.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": "44cbc7fa4e199c1d6113ceec3c5162f53def5bb8", + "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": "0x37945bd0bcbf905a641db7e631bb538570042dbe6513e1e4cdd088f25b4ec274", + "types": "./lib/index.d.ts", + "version": "5.7.1" +} diff --git a/test/node_modules/@ethersproject/web/src.ts/_version.ts b/test/node_modules/@ethersproject/web/src.ts/_version.ts new file mode 100644 index 0000000..eb87b5e --- /dev/null +++ b/test/node_modules/@ethersproject/web/src.ts/_version.ts @@ -0,0 +1 @@ +export const version = "web/5.7.1"; diff --git a/test/node_modules/@ethersproject/web/src.ts/browser-geturl.ts b/test/node_modules/@ethersproject/web/src.ts/browser-geturl.ts new file mode 100644 index 0000000..88d5424 --- /dev/null +++ b/test/node_modules/@ethersproject/web/src.ts/browser-geturl.ts @@ -0,0 +1,55 @@ +"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 + }; + + if (options.fetchOptions != null) { + const opts = options.fetchOptions; + if (opts.mode) { request.mode = (opts.mode); } + if (opts.cache) { request.cache = (opts.cache); } + if (opts.credentials) { request.credentials = (opts.credentials); } + if (opts.redirect) { request.redirect = (opts.redirect); } + if (opts.referrer) { request.referrer = opts.referrer; } + } + + 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/test/node_modules/@ethersproject/web/src.ts/geturl.ts b/test/node_modules/@ethersproject/web/src.ts/geturl.ts new file mode 100644 index 0000000..286ccdf --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/web/src.ts/index.ts b/test/node_modules/@ethersproject/web/src.ts/index.ts new file mode 100644 index 0000000..0c0871e --- /dev/null +++ b/test/node_modules/@ethersproject/web/src.ts/index.ts @@ -0,0 +1,478 @@ +"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, + + skipFetchSetup?: boolean; + fetchOptions?: Record; + errorPassThrough?: boolean; + + 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 }; + +function unpercent(value: string): Uint8Array { + return toUtf8Bytes(value.replace(/%([0-9a-f][0-9a-f])/gi, (all, code) => { + return String.fromCharCode(parseInt(code, 16)); + })); +} + +// 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 errorPassThrough = ((typeof(connection) === "object") ? !!(connection.errorPassThrough): false); + + 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)) + }; + } + + if (connection.skipFetchSetup != null) { + options.skipFetchSetup = !!connection.skipFetchSetup; + } + + if (connection.fetchOptions != null) { + options.fetchOptions = shallowCopy(connection.fetchOptions); + } + } + + const reData = new RegExp("^data:([^;:]*)?(;base64)?,(.*)$", "i"); + const dataMatch = ((url) ? url.match(reData): null); + if (dataMatch) { + try { + const response = { + statusCode: 200, + statusMessage: "OK", + headers: { "content-type": (dataMatch[1] || "text/plain")}, + body: (dataMatch[2] ? base64Decode(dataMatch[3]): unpercent(dataMatch[3])) + }; + + 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 (!errorPassThrough && (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/test/node_modules/@ethersproject/web/src.ts/types.ts b/test/node_modules/@ethersproject/web/src.ts/types.ts new file mode 100644 index 0000000..f43cf75 --- /dev/null +++ b/test/node_modules/@ethersproject/web/src.ts/types.ts @@ -0,0 +1,18 @@ +"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; + fetchOptions?: Record; +}; + diff --git a/test/node_modules/@ethersproject/web/thirdparty.d.ts b/test/node_modules/@ethersproject/web/thirdparty.d.ts new file mode 100644 index 0000000..689c7e6 --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/wordlists/LICENSE.md b/test/node_modules/@ethersproject/wordlists/LICENSE.md new file mode 100644 index 0000000..989e34a --- /dev/null +++ b/test/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/test/node_modules/@ethersproject/wordlists/README.md b/test/node_modules/@ethersproject/wordlists/README.md new file mode 100644 index 0000000..ac3cec4 --- /dev/null +++ b/test/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/test/node_modules/aes-js/bower.json b/test/node_modules/aes-js/bower.json new file mode 100644 index 0000000..63b313d --- /dev/null +++ b/test/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/test/node_modules/aes-js/generate-tests.py b/test/node_modules/aes-js/generate-tests.py new file mode 100644 index 0000000..3e3bcc9 --- /dev/null +++ b/test/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/test/node_modules/aes-js/index.js b/test/node_modules/aes-js/index.js new file mode 100644 index 0000000..6fbdfe7 --- /dev/null +++ b/test/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, 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, 0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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/test/node_modules/aes-js/package.json b/test/node_modules/aes-js/package.json new file mode 100644 index 0000000..81023a9 --- /dev/null +++ b/test/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/test/node_modules/aes-js/run-readme.py b/test/node_modules/aes-js/run-readme.py new file mode 100644 index 0000000..7f8d948 --- /dev/null +++ b/test/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/test/node_modules/aes-js/test/index.js b/test/node_modules/aes-js/test/index.js new file mode 100644 index 0000000..87f25e7 --- /dev/null +++ b/test/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/test/node_modules/aes-js/test/test-aes.js b/test/node_modules/aes-js/test/test-aes.js new file mode 100644 index 0000000..fbfe401 --- /dev/null +++ b/test/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/test/node_modules/aes-js/test/test-buffer.js b/test/node_modules/aes-js/test/test-buffer.js new file mode 100644 index 0000000..78b9ea6 --- /dev/null +++ b/test/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/test/node_modules/aes-js/test/test-counter.js b/test/node_modules/aes-js/test/test-counter.js new file mode 100644 index 0000000..f6643b0 --- /dev/null +++ b/test/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/test/node_modules/aes-js/test/test-errors.js b/test/node_modules/aes-js/test/test-errors.js new file mode 100644 index 0000000..9876328 --- /dev/null +++ b/test/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/test/node_modules/aes-js/test/test-padding.js b/test/node_modules/aes-js/test/test-padding.js new file mode 100644 index 0000000..1390b3d --- /dev/null +++ b/test/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/test/node_modules/aes-js/test/test-vectors.json b/test/node_modules/aes-js/test/test-vectors.json new file mode 100644 index 0000000..0a42b8e --- /dev/null +++ b/test/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/test/node_modules/aes-js/test/test.html b/test/node_modules/aes-js/test/test.html new file mode 100644 index 0000000..348d45a --- /dev/null +++ b/test/node_modules/aes-js/test/test.html @@ -0,0 +1,104 @@ + + +
+ + + + diff --git a/test/node_modules/alchemy-sdk/CHANGELOG.md b/test/node_modules/alchemy-sdk/CHANGELOG.md new file mode 100644 index 0000000..bbd9f8d --- /dev/null +++ b/test/node_modules/alchemy-sdk/CHANGELOG.md @@ -0,0 +1,154 @@ +# Changelog for Alchemy SDK for JavaScript + +## Unreleased + +### Major Changes + +- Added `TransactNamespace.sendGasOptimizedTransaction()`. Instead of sending a single transaction that might not get mined, this method allows you to send the same transaction multiple times, with different gas prices and gas limits. This should result in lower fees paid. + +### Minor Changes + +## 2.2.5 + +### Major Changes + +- Added `NftNamespace.getContractsForOwner()` to fetch all NFT contracts for a specified owner address. + +### Minor Changes + +- Fixed a bug in `NftNamespace.getNftsForOwner()` where the `openSea` metadata was not included in the returned NFT. +- Marked the `NftExcludeFilters` type as deprecated. Please use `NftFilters` instead. +- Added support for the `orderBy` param to `NftNamespace.getNftsForOwner()` and `NftNamespace.getContractsForOwner()`. + +## 2.2.4 + +### Major Changes + +### Minor Changes + +- Fixed a bug where `newHeads` subscriptions would error and crash when reconnecting to the websocket. +- Fixed a bug where certain subscriptions would not reconnect after the websocket reconnected. +- Added exports for `toUtf8Bytes` and `toUtf8String` in `Utils`. + +## 2.2.3 + +### Major Changes + +### Minor Changes + +- Fixed a typo with the `AlchemySettings.batchRequests` property. + +## 2.2.2 (DEPRECATED) + +### Major Changes + +### Minor Changes + +- Added support for ENS resolution to the `NotifyNamespace` and `WebsocketNamespace` methods. +- Added the `batchRequests` setting in `AlchemySettings`. Enabling this setting will automatically batch and send json-rpc requests to reduce network overhead. +- Included new export for the `Interface` class from ethers to simplify encoding ABI when using `eth_call`. +- Added support for the `NftNamespace.getNftMetadataBatch()` method to fetch metadata for multiple NFTs in a single call. +- Added support for the `NftNamespace.getNftSales()` method to fetch NFT sales across different marketplaces. Thanks @xeno097! + +## 2.2.1 + +### Major Changes + +### Minor Changes + +- Fixed a bug where `AlchemyConfig.getWebsocketProvider()` was not exported as a public method. This method allows you get the underlying `WebsocketProvider` that is implemented by ethers. +- Added the `NftNamespace.summarizeNftAttributes()` method to get the summary of attribute prevalence for all NFTs in a contract. +- Added the `NftNamespace.searchContractMetadata()` method to search for a keyword across ERC721 and ERC1155 contract metadata. +- Added support for ENS resolution on several `CoreNamespace` methods. You should now be able to pass in an ENS domain into any param that requires an owner address. +- Added the `CoreNamespace.resolveName()` and `CoreNamespace.lookupAddress()` methods to resolve and lookup ENS domains and their owner addresses. +- Fixed a bug where the `Accept-Encoding` header was incorrectly included in requests that originated from the browser (#174). +- Added the `openSea` response to `NftNamespace.getContractMetadata()`to match the REST endpoint (#162). + +## 2.2.0 + +### Major Changes + +- Added the `NotifyNamespace` to the top-level `Alchemy` object. The `NotifyNamespace` is used to perform CRUD operations on webhooks in the Notify API. +- Added the `alchemy_minedTransactions` subscription event to the `WebsocketNamespace`. This subscription emits full transaction objects or hashes that are mined on the network based on provided filters. +- Added the `NftNamespace.computeRarity()` method to get the rarity attributes of the provided NFT. Thanks @xeno097! + +### Minor Changes + +## 2.1.1 + +### Minor Changes + +- Added the `AIDROPS` enum to `NftNamespace.getNftsForOwner()`. +- Added the `spamInfo` field to the response for `getNftsForOwner()` and `getNftsForContract()`. +- Fixed a bug where type declarations were not available when using `NodeNext` module resolution. Thanks @quentinverlhac! +- Marked Ropsten, Rinkeby, and Kovan `Network` enums as deprecated. Please switch over to Goerli. + +## 2.1.0 + +### Major Changes + +- POTENTIALLY BREAKING: Fixed a typing bug where the `totalSupply` field in an `NftContract` should have type `string` instead of `number`. +- Updated the `Nft` class to include the contract metadata in the `Nft.contract` field. +- Added commonly used utility methods from ethers.js into a top-level `Utils` export. +- Added the `NftNamespace.verifyNftOwnership()` method to replace the deprecated `checkNftOwnership()` method. +- Added `Contract` and `ContractFactory` exports from ethers into the top-level exports. + +### Minor Changes + +- Added support for `withTokenBalances` in `NftNamespace.getOwnersForContract()`. +- Added support for the `erc20` token type and pagination for `CoreNamespace.getTokenBalances()`. +- Added `bytes` field to the `Media` object in the NFT metadata responses to indicate the size of the media in bytes. Note that the `size` field is not supported by the backend and will be removed in the next version. + +## 2.0.4 + +### Minor Changes + +- Added a `size` field to the `Media` object in the NFT metadata responses to indicate the size of the media in bytes. +- Bumped `@ethersproject` dependencies to `v5.7.0` to support `safe` and `finalized` blocks. + +## 2.0.3 + +### Minor Changes + +- Added support for the `pageSize` parameter in `GetNftsForOwnerOptions` to specify the number of NFTs fetched when using `alchemy.nft.getNftsForOwner()`. +- Added support for a Wallet object. This object is identical to the Ethers `Wallet` class. +- Added support for Arbitrum Goerli network via the `Network.ARB_GOERLI` enum. +- Added support for the AStar Mainnet network via the `Network.ASTAR_MAINNET` enum. +- Added typed request/response overloads for `CoreNamespace.getAssetTransfers()` for when the `withMetadata` param is true. +- Added support the `tokenUriTimeoutInMs` parameter on `getNftsForOwner()`, `getNftMetadata()`, and `getNftsForContract()`. + +## 2.0.2 + +### Major Changes + +- Added the `transact` namespace for functionality relating to sending transactions. This includes the Flashbots methods `sendPrivateTransaction` and `cancelPrivateTransaction`. + +### Minor Changes + +- Removed the deprecated `TOKEN` enum from `AssetTransfersCategory`. +- Added support for Optimism Goerli network via the `Network.OPT_GOERLI` enum. +- Added the `pageSize` parameter in `GetNftsForContractOptions` to specify the number of NFTs fetched when using `alchemy.nft.getNftsForContract`. +- Added correct `withMetadata` typing to `AssetTransfersResponse`. + +## 2.0.1 + +### Minor Changes + +- Added an optional `url` setting to `AlchemySettings` to allow specifying a custom hardcoded URL to send all requests to. +- Fixed a bug where the SDK would incorrectly include a gzip header in browser environments + +## 2.0.0 + +### Major Changes + +- Top level package has moved from `@alch/alchemy-sdk` to `alchemy-sdk` for convenience. New command to install is `npm install alchemy-sdk` +- Updated instantiation syntax: `initializeAlchemy(settings)` is now `new Alchemy(settings)` +- Added three namespaces under the Alchemy object: `core`, `nft`, and `ws`. All Ethers.js provider methods and Alchemy Enhanced APIs (other than NFT) are under `core`. +- Moved top-level methods under the Alchemy object. Instead of `getNftsByOwner(alchemy, 'vitalik.eth')`, now methods are called using `alchemy.nft.getNftsByOwner('vitalik.eth')` +- Ethers.js Alchemy Provider methods are now directly embedded under `alchemy.core` +- Ethers.js WebSocket Provider methods are now directly embedded under `alchemy.ws` +- The settings object is now a config module under `alchemy.config`. +- If necessary, the full Ethers.js Provider is now available under `alchemy.config.getProvider()` as a promise to reduce bundle size. +- If necessary, the full WebSocket Provider is now available under `alchemy.config.getWebSocketProvider()` as a promise to reduce bundle size. +- Dynamic imports for large methods (in particular, Ethers.js methods) are now supported. Initial package size for the Alchemy SDK is 20kB, and will only download Ethers.js packages when a relevant method is called. +- Methods including Collection in the NFT package have been renamed to `Contract`: for instance, `getNftsForCollection` is now `getNftsForContract`. diff --git a/test/node_modules/alchemy-sdk/LICENSE b/test/node_modules/alchemy-sdk/LICENSE new file mode 100644 index 0000000..9f883a8 --- /dev/null +++ b/test/node_modules/alchemy-sdk/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Alchemy + +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/test/node_modules/alchemy-sdk/README.md b/test/node_modules/alchemy-sdk/README.md new file mode 100644 index 0000000..d5656b7 --- /dev/null +++ b/test/node_modules/alchemy-sdk/README.md @@ -0,0 +1,362 @@ +# Alchemy SDK for Javascript + +The Alchemy SDK is the most comprehensive, stable, and powerful Javascript SDK available today to interact with the blockchain. + +It supports the exact same syntax and functionality of the Ethers.js `AlchemyProvider` and `WebSocketProvider`, making it a 1:1 mapping for anyone using the Ethers.js `Provider`. However, it adds a significant amount of improved functionality on top of Ethers, such as easy access to Alchemy’s Enhanced and NFT APIs, robust WebSockets, and quality-of-life improvements such as automated retries. + +The SDK leverages Alchemy's hardened node infrastructure, guaranteeing best-in-class node reliability, scalability, and data correctness, and is undergoing active development by Alchemy's engineers. + +> 🙋‍♀️ **FEATURE REQUESTS:** +> +> We'd love your thoughts on what would improve your web3 dev process the most! If you have 5 minutes, tell us what you want on our [Feature Request feedback form](https://alchemyapi.typeform.com/sdk-feedback), and we'd love to build it for you. + +The SDK currently supports the following chains: + +- **Ethereum**: Mainnet, Goerli +- **Polygon**: Mainnet, Mumbai +- **Optimism**: Mainnet, Goerli, Kovan +- **Arbitrum**: Mainnet, Goerli, Rinkeby +- **Astar**: Mainnet + +You can find per-method documentation of the Alchemy SDK endpoints at the [Alchemy Docs linked in the sidebar](https://docs.alchemy.com/reference/alchemy-sdk-quickstart). + +## Getting started + +``` +npm install alchemy-sdk +``` + +After installing the app, you can then import and use the SDK: + +```ts +import { Alchemy, Network } from 'alchemy-sdk'; + +// Optional config object, but defaults to the API key 'demo' and Network 'eth-mainnet'. +const settings = { + apiKey: 'demo', // Replace with your Alchemy API key. + network: Network.ETH_MAINNET // Replace with your network. +}; + +const alchemy = new Alchemy(settings); +``` + +> **ℹ️ Creating a unique Alchemy API Key** +> +> The public "demo" API key may be rate limited based on traffic. To create your own API key, **[sign up for an Alchemy account here](https://alchemy.com/?a=SDKquickstart)** and use the key created on your dashboard for the first app. + +The `Alchemy` object returned by `new Alchemy()` provides access to the Alchemy API. An optional config object can be passed in when initializing to set your API key, change the network, or specify the max number of retries. + +## Using the Alchemy SDK + +The Alchemy SDK currently supports five different namespaces, including: + +- `core`: All commonly-used Ethers.js Provider methods and Alchemy Enhanced API methods +- `nft`: All Alchemy NFT API methods +- `ws`: All WebSockets methods +- `transact`: All Alchemy Transaction API methods +- `notify`: CRUD endpoints for modifying Alchemy Notify Webhooks + +If you are already using Ethers.js, you should be simply able to replace the Ethers.js Provider object with `alchemy.core` and it should work properly. + +> **ℹ️ ENS Name Resolution** +> +> The Alchemy SDK now supports ENS names (e.g. `vitalik.eth`) for every parameter where you can pass in a Externally Owned Address, or user address (e.g. `0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045`). + +```ts +import { Alchemy, AlchemySubscription } from 'alchemy-sdk'; + +// Using default settings - pass in a settings object to specify your API key and network +const alchemy = new Alchemy(); + +// Access standard Ethers.js JSON-RPC node request +alchemy.core.getBlockNumber().then(console.log); + +// Access Alchemy Enhanced API requests +alchemy.core + .getTokenBalances('0x3f5CE5FBFe3E9af3971dD833D26bA9b5C936f0bE') + .then(console.log); + +// Access the Alchemy NFT API +alchemy.nft.getNftsForOwner('vitalik.eth').then(console.log); + +// Access WebSockets and Alchemy-specific WS methods +alchemy.ws.on( + { + method: AlchemySubscription.PENDING_TRANSACTIONS + }, + res => console.log(res) +); +``` + +The Alchemy SDK also supports a number of Ethers.js objects that streamline the development process: + +- [`Utils`](https://docs.ethers.io/v5/api/utils/): Equivalent to `ethers.utils`, this provides a number of common Ethers.js utility methods for developers. + - [`Interface`](https://docs.ethers.io/v5/api/utils/abi/interface/): Found in `Utils.Interface`, this class abstracts the encoding and decoding required to interact with contracts on the Ethereum network. +- [`Contract`](https://docs.ethers.io/v5/api/contract/contract/): An abstraction for smart contract code deployed to the blockchain. +- [`ContractFactory`](https://docs.ethers.io/v5/api/contract/contract-factory/): Allows developers to build a `Contract` object. +- [`Wallet`](https://docs.ethers.io/v5/api/signer/#Wallet): An implementation of `Signer` that can sign transactions and messages using a private key as a standard Externally Owned Account. + +## Alchemy Settings + +An `AlchemySettings` object can be passed on instantiation to the Alchemy object, with the following optional parameters: + +- `apiKey`: API key that can be found in the Alchemy dashboard. Defaults to `demo`: a rate-limited public key. +- `network`: Name of the network. Defaults to `Network.ETH_MAINNET` +- `maxRetries`: The maximum number of retries to attempt if a request fails. Defaults to 5. +- `url`: Optional URL endpoint to use for all requests. Setting this field will override the URL generated by the `network` and`apiKey` fields. +- `authToken`: Alchemy auth token required to use the Notify API. This token can be found in the Alchemy Dashboard on the Notify tab. +- `batchRequests`: Optional setting that automatically batches and sends json-rpc requests for higher throughput and reduced network IO. Defaults to false. + +## Alchemy Core + +The core namespace contains all commonly-used [Ethers.js Provider](https://docs.ethers.io/v5/api/providers/api-providers/#AlchemyProvider) methods. If you are already using Ethers.js, you should be simply able to replace the Ethers.js Provider object with `alchemy.core` when accessing provider methods and it should just work. + +It also includes the majority of Alchemy Enhanced APIs, including: + +- `getTokenMetadata()`: Get the metadata for a token contract address. +- `getTokenBalances()`: Gets the token balances for an owner given a list of contracts. +- `getAssetTransfers()`: Get transactions for specific addresses. +- `getTransactionReceipts()`: Gets all transaction receipts for a given block. + +You will also find the following utility methods: + +- `findContractDeployer()`: Find the contract deployer and block number for a given contract address. + +### Accessing the full Ethers.js Provider + +To keep the package clean, we don't support certain uncommonly-used Ethers.js Provider methods as top-level methods in the Alchemy `core` namespace - for example, `provider.formatter`. If you'd like to access these methods, simply use the `alchemy.config.getProvider()` function to configure the +Ethers.js Provider [AlchemyProvider](https://docs.ethers.io/v5/api/providers/api-providers/#AlchemyProvider) and return it. + +```ts +import { Alchemy } from 'alchemy-sdk'; + +const alchemy = new Alchemy(); + +async function runAlchemy() { + const ethersProvider = await alchemy.config.getProvider(); + console.log(ethersProvider.formatter); +} +runAlchemy(); +``` + +## Alchemy WebSockets + +In addition to the built-in Ethers.js listeners, the Alchemy SDK includes support for [Alchemy's Subscription API](https://docs.alchemy.com/alchemy/enhanced-apis/subscription-api-websockets). This allows you to subscribe to events and receive updates as they occur. + +The `alchemy.ws` instance can be used like the standard Ethers.js [WebSocketProvider](https://docs.ethers.io/v5/api/providers/other/#WebSocketProvider) to add listeners for Alchemy events: + +```ts +import { Alchemy, AlchemySubscription } from 'alchemy-sdk'; + +const alchemy = new Alchemy(); + +// Listen to all new pending transactions. +alchemy.ws.on('block', res => console.log(res)); + +// Listen to only the next transaction on the USDC contract. +alchemy.ws.once( + { + method: AlchemySubscription.PENDING_TRANSACTIONS, + toAddress: 'vitalik.eth' + }, + res => console.log(res) +); + +// Remove all listeners. +alchemy.ws.removeAllListeners(); +``` + +The SDK brings multiple improvements to ensure correct WebSocket behavior in cases of temporary network failure or +dropped connections. As with any network connection, you should not assume that a WebSocket will remain open forever +without interruption, but correctly handling dropped connections and reconnection by hand can be challenging to get +right. The Alchemy SDK automatically handles these failures with no configuration necessary. The main benefits are: + +- Resilient event delivery: Unlike standard Web3.js or Ethers.js, you will not permanently miss events which arrive + while the backing WebSocket is temporarily down. Instead, you will receive these events as soon as the connection + is reopened. Note that if the connection is down for more than 120 blocks (approximately 20 minutes), you may + still miss some events that were not part of the most recent 120 blocks. +- Lowered rate of failure: Compared to standard Web3.js or Ethers.js, there are fewer failures when sending requests + over the WebSocket while the connection is down. The Alchemy SDK will attempt to send the requests once the connection + is reopened. Note that it is still possible, with a lower likelihood, for outgoing requests to be lost, + so you should still have error handling as with any network request. + +## Alchemy Transact + +The `transact` namespace contains methods used for sending transactions. The unique methods to the `transact` namespace are: + +- `sendPrivateTransaction()`: Send a private transaction through Flashbots. +- `cancelPrivateTransaction()`: Cancel a private transaction sent with Flashbots. + +The `transact` namespace also aliases over several commonly used methods from the `core` namespace for convenience: + +- `getTransaction()`: Returns the transaction for the given transaction hash. +- `sendTransaction()`: Sends a standard transaction to the network to be mined. +- `waitForTransaction()`: Waits for a transaction to be mined and returns the transaction receipt. + +## Alchemy NFT API + +The SDK currently supports the following [NFT API](https://docs.alchemy.com/alchemy/enhanced-apis/nft-api) endpoints +under the `alchemy.nft` namespace: + +- `getNftMetadata()`: Get the NFT metadata for an NFT contract address and tokenId. +- `getNftMetadataBatch()`: Get the NFT metadata for multiple NFT contract addresses/token id pairs. +- `getContractMetadata()`: Get the metadata associated with an NFT contract +- `getContractsForOwner()`: Get all NFT contracts that the provided owner address owns. +- `getNftsForOwner()`: Get NFTs for an owner address. +- `getNftsForOwnerIterator()`: Get NFTs for an owner address as an async iterator (handles paging automatically). +- `getNftsForContract()`: Get all NFTs for a contract address. +- `getNftForContractIterator()`: Get all NFTs for a contract address as an async iterator (handles paging + automatically). +- `getOwnersForNft()`: Get all the owners for a given NFT contract address and a particular token ID. +- `getOwnersForContract()`: Get all the owners for a given NFT contract address. +- `verifyNftOwnership()`: Check whether the provided owner address owns the provided NFT contract addresses. +- `isSpamContract()`: Check whether the given NFT contract address is a spam contract as defined by Alchemy (see the [NFT API FAQ](https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification)) +- `getSpamContracts()`: Returns a list of all spam contracts marked by Alchemy. +- `refreshNftMetadata()`: Refresh the cached NFT metadata for a contract address and a single tokenId. +- `refreshContract()`: Enqueues the specified contract address to have all token ids' metadata refreshed. +- `getFloorPrice()`: Return the floor prices of a NFT contract by marketplace. +- `computeRarity()`: Get the rarity of each attribute of an NFT. +- `getNftSales()`: Returns NFT sales that have happened through on-chain marketplaces. +- `summarizeNftAttributes()`: Get the summary of attribute prevalence for all NFTs in a contract. +- `searchContractMetadata()`: Search for a keyword across metadata of all ERC-721 and ERC-1155 smart contracts. + +### Pagination + +The Alchemy NFT endpoints return 100 results per page. To get the next page, you can pass in the `pageKey` returned by +the +previous call. To simplify paginating through all results, the SDK provides the `getNftsIterator()` +and `getNftsForContractIterator()` functions that automatically paginate through all NFTs and yields them via +an `AsyncIterable`. + +Here's an example of how to paginate through all the NFTs in Vitalik's ENS address: + +```ts +import { Alchemy } from 'alchemy-sdk'; + +const alchemy = new Alchemy(); + +async function main() { + const ownerAddress = 'vitalik.eth'; + for await (const nft of alchemy.nft.getNftsForOwnerIterator(ownerAddress)) { + console.log('ownedNft:', nft); + } +} + +main(); +``` + +### SDK vs API Differences + +The NFT API in the SDK standardizes response types to reduce developer friction, but note this results in some +differences compared to the Alchemy REST endpoints: + +- Methods referencing `Collection` have been renamed to use the name `Contract` for greater accuracy: e.g. `getNftsForContract`. +- Some methods have different naming that the REST API counterparts in order to provide a consistent API interface ( + e.g. `getNftsForOwner()` is `alchemy_getNfts`, `getOwnersForNft()` is `alchemy_getOwnersForToken`). +- SDK standardizes to `omitMetadata` parameter (vs. `withMetadata`). +- Standardization to `pageKey` parameter for pagination (vs. `nextToken`/`startToken`) +- Empty `TokenUri` fields are omitted. +- Token ID is always normalized to an integer string on `BaseNft` and `Nft`. +- Some fields omitted in the REST response are included in the SDK response in order to return an `Nft` object. +- Some fields in the SDK's `Nft` object are named differently than the REST response. + +## Alchemy Notify + +The [Alchemy Notify API](https://docs.alchemy.com/reference/notify-api-quickstart) helps developers set up webhooks in their apps. The namespace provides methods to programmatically create, read, update, and delete your webhooks along with typings for the different webhooks. To learn more about Webhooks, please refer to the [Alchemy documentation](https://docs.alchemy.com/reference/notify-api-quickstart#what-are-webhooks). + +Methods on the `NotifyNamespace` can be accessed via `alchemy.notify`. To use the methods, you must include your team's auth token in the `authToken` field of `AlchemySettings` when instantiating the SDK. The auth token can be found on the Alchemy Dashboard in the Notify Tab. + +Methods include: + +- `getAllWebhooks()`: Get all webhooks on your team. +- `getAddresses()`: Get all addresses tracked for the provided Address Activity Webhook. +- `getNftFilters()`: Get all NFT filters tracked for the provided NFT Activity Webhook. +- `createWebhook()`: Create a new webhook. +- `updateWebhook()`: Update an existing webhook's active status or tracked addresses and NFT filters. +- `deleteWebhook()`: Delete the provided webhook. + +## Documentation + +The SDK is documented via `tsdoc` comments in the source code. The generated types and documentation are included when +using an IDE. To browse the documentation separately, you can view the generated API interfaces +in `etc/alchemy-sdk.api.md`. You can view generated Markdown files for each endpoint in the `docs-md` directory, +or as a webpage by opening `docs/index.html` in your browser. + +## Usage Examples + +Below are a few usage examples. + +> **ℹ️ More Examples ** +> +> You can also go here: [Examples Using the Alchemy SDK](https://docs.alchemy.com/reference/using-the-alchemy-sdk). + +### Getting the NFTs owned by an address + +```ts +import { Alchemy, NftExcludeFilters } from 'alchemy-sdk'; + +const alchemy = new Alchemy(); + +// Get how many NFTs an address owns. +alchemy.nft.getNftsForOwner('vitalik.eth').then(nfts => { + console.log(nfts.totalCount); +}); + +// Get all the image urls for all the NFTs an address owns. +async function main() { + for await (const nft of alchemy.nft.getNftsForOwnerIterator('vitalik.eth')) { + console.log(nft.media); + } +} + +main(); + +// Filter out spam NFTs. +alchemy.nft + .getNftsForOwner('vitalik.eth', { + excludeFilters: [NftExcludeFilters.SPAM] + }) + .then(console.log); +``` + +### Getting all the owners of the BAYC NFT + +```ts +import { Alchemy } from 'alchemy-sdk'; + +const alchemy = new Alchemy(); + +// Bored Ape Yacht Club contract address. +const baycAddress = '0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D'; + +async function main() { + for await (const nft of alchemy.nft.getNftsForContractIterator(baycAddress, { + // Omit the NFT metadata for smaller payloads. + omitMetadata: true + })) { + await alchemy.nft + .getOwnersForNft(nft.contract.address, nft.tokenId) + .then(response => + console.log('owners:', response.owners, 'tokenId:', nft.tokenId) + ); + } +} + +main(); +``` + +### Get all outbound transfers for a provided address + +```ts +import { Alchemy } from 'alchemy-sdk'; + +const alchemy = new Alchemy(); + +alchemy.core.getTokenBalances('vitalik.eth').then(console.log); +``` + +## Questions and Feedback + +If you have any questions, issues, or feedback, please file an issue +on [GitHub](https://github.com/alchemyplatform/alchemy-sdk-js/issues), or drop us a message on +our [Discord](https://discord.com/channels/735965332958871634/983472322998575174) channel for the SDK. diff --git a/test/node_modules/alchemy-sdk/dist/cjs/alchemy-provider-ef251598.js b/test/node_modules/alchemy-sdk/dist/cjs/alchemy-provider-ef251598.js new file mode 100644 index 0000000..6ab7144 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/alchemy-provider-ef251598.js @@ -0,0 +1,771 @@ +'use strict'; + +var index = require('./index-e8114eb4.js'); +var networks = require('@ethersproject/networks'); +var providers = require('@ethersproject/providers'); +var web = require('@ethersproject/web'); +require('./api/utils'); +require('@ethersproject/bignumber'); +require('axios'); +require('@ethersproject/abstract-provider'); +require('@ethersproject/wallet'); +require('@ethersproject/contracts'); + +const version$1 = "logger/5.7.0"; + +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"; + /////////////////// + // Interaction Errors + // The user rejected the action, such as signing a message or sending + // a transaction + ErrorCode["ACTION_REJECTED"] = "ACTION_REJECTED"; +})(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; + let url = ""; + switch (code) { + case ErrorCode.NUMERIC_FAULT: { + url = "NUMERIC_FAULT"; + const fault = message; + switch (fault) { + case "overflow": + case "underflow": + case "division-by-zero": + url += "-" + fault; + break; + case "negative-power": + case "negative-width": + url += "-unsupported"; + break; + case "unbound-bitwise-result": + url += "-unbound-result"; + break; + } + break; + } + case ErrorCode.CALL_EXCEPTION: + case ErrorCode.INSUFFICIENT_FUNDS: + case ErrorCode.MISSING_NEW: + case ErrorCode.NONCE_EXPIRED: + case ErrorCode.REPLACEMENT_UNDERPRICED: + case ErrorCode.TRANSACTION_REPLACED: + case ErrorCode.UNPREDICTABLE_GAS_LIMIT: + url = code; + break; + } + if (url) { + message += " [ See: https:/\/links.ethers.org/v5-errors-" + url + " ]"; + } + 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 (_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$1); + } + 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 = "properties/5.7.0"; + +(undefined && undefined.__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 = new Logger(version); +function defineReadOnly(object, name, value) { + Object.defineProperty(object, name, { + enumerable: true, + value: value, + writable: false, + }); +} +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); +} +function deepCopy(object) { + return _deepCopy(object); +} + +/** Maximum size of a batch on the rpc provider. */ +const DEFAULT_MAX_REQUEST_BATCH_SIZE = 100; +/** Timeout interval before the pending batch is sent. */ +const DEFAULT_REQUEST_BATCH_DELAY_MS = 10; +/** + * Internal class to enqueue requests and automatically send/process batches. + * + * The underlying batching mechanism is loosely based on ethers.js's + * `JsonRpcBatchProvider`. + * + * @internal + */ +class RequestBatcher { + constructor(sendBatchFn, maxBatchSize = DEFAULT_MAX_REQUEST_BATCH_SIZE) { + this.sendBatchFn = sendBatchFn; + this.maxBatchSize = maxBatchSize; + /** + * Array of enqueued requests along with the constructed promise handlers for + * each request. + */ + this.pendingBatch = []; + } + /** + * Enqueues the provided request. The batch is immediately sent if the maximum + * batch size is reached. Otherwise, the request is enqueued onto a batch that + * is sent after 10ms. + * + * Returns a promise that resolves with the result of the request. + */ + enqueueRequest(request) { + return index.__awaiter(this, void 0, void 0, function* () { + const inflightRequest = { + request, + resolve: undefined, + reject: undefined + }; + const promise = new Promise((resolve, reject) => { + inflightRequest.resolve = resolve; + inflightRequest.reject = reject; + }); + this.pendingBatch.push(inflightRequest); + if (this.pendingBatch.length === this.maxBatchSize) { + // Send batch immediately if we are at the maximum batch size. + void this.sendBatchRequest(); + } + else if (!this.pendingBatchTimer) { + // Schedule batch for next event loop + short duration + this.pendingBatchTimer = setTimeout(() => this.sendBatchRequest(), DEFAULT_REQUEST_BATCH_DELAY_MS); + } + return promise; + }); + } + /** + * Sends the currently queued batches and resets the batch and timer. Processes + * the batched response results back to the original promises. + */ + sendBatchRequest() { + return index.__awaiter(this, void 0, void 0, function* () { + // Get the current batch and clear it, so new requests + // go into the next batch + const batch = this.pendingBatch; + this.pendingBatch = []; + if (this.pendingBatchTimer) { + clearTimeout(this.pendingBatchTimer); + this.pendingBatchTimer = undefined; + } + // Get the request as an array of requests + const request = batch.map(inflight => inflight.request); + return this.sendBatchFn(request).then(result => { + // 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 => { + batch.forEach(inflightRequest => { + inflightRequest.reject(error); + }); + }); + }); + } +} + +/** + * SDK's custom implementation of ethers.js's 'AlchemyProvider'. + * + * Do not call this constructor directly. Instead, instantiate an instance of + * {@link Alchemy} and call {@link Alchemy.config.getProvider()}. + * + * @public + */ +class AlchemyProvider extends providers.JsonRpcProvider { + /** @internal */ + constructor(config) { + // Normalize the API Key to a string. + const apiKey = AlchemyProvider.getApiKey(config.apiKey); + // Generate our own connection info with the correct endpoint URLs. + const alchemyNetwork = AlchemyProvider.getAlchemyNetwork(config.network); + const connection = AlchemyProvider.getAlchemyConnectionInfo(alchemyNetwork, apiKey, 'http'); + // If a hardcoded url was specified in the config, use that instead of the + // provided apiKey or network. + if (config.url !== undefined) { + connection.url = config.url; + } + connection.throttleLimit = config.maxRetries; + // Normalize the Alchemy named network input to the network names used by + // ethers. This allows the parent super constructor in JsonRpcProvider to + // correctly set the network. + const ethersNetwork = index.EthersNetwork[alchemyNetwork]; + super(connection, ethersNetwork); + this.apiKey = config.apiKey; + this.maxRetries = config.maxRetries; + this.batchRequests = config.batchRequests; + // TODO: support individual headers when calling batch + const batcherConnection = Object.assign({}, this.connection); + batcherConnection.headers['Alchemy-Ethers-Sdk-Method'] = 'batchSend'; + const sendBatchFn = (requests) => { + return web.fetchJson(batcherConnection, JSON.stringify(requests)); + }; + this.batcher = new RequestBatcher(sendBatchFn); + } + /** + * Overrides the `UrlJsonRpcProvider.getApiKey` method as implemented by + * ethers.js. Returns the API key for an Alchemy provider. + * + * @internal + * @override + */ + static getApiKey(apiKey) { + if (apiKey == null) { + return index.DEFAULT_ALCHEMY_API_KEY; + } + if (apiKey && typeof apiKey !== 'string') { + throw new Error(`Invalid apiKey '${apiKey}' provided. apiKey must be a string.`); + } + return apiKey; + } + /** + * Overrides the `BaseProvider.getNetwork` method as implemented by ethers.js. + * + * This override allows the SDK to set the provider's network to values not + * yet supported by ethers.js. + * + * @internal + * @override + */ + static getNetwork(network) { + if (typeof network === 'string' && network in index.CustomNetworks) { + return index.CustomNetworks[network]; + } + // Call the standard ethers.js getNetwork method for other networks. + return networks.getNetwork(network); + } + /** + * Converts the `Networkish` input to the network enum used by Alchemy. + * + * @internal + */ + static getAlchemyNetwork(network) { + if (network === undefined) { + return index.DEFAULT_NETWORK; + } + if (typeof network === 'number') { + throw new Error(`Invalid network '${network}' provided. Network must be a string.`); + } + // Guaranteed that `typeof network === 'string`. + const isValidNetwork = Object.values(index.Network).includes(network); + if (!isValidNetwork) { + throw new Error(`Invalid network '${network}' provided. Network must be one of: ` + + `${Object.values(index.Network).join(', ')}.`); + } + return network; + } + /** + * Returns a {@link ConnectionInfo} object compatible with ethers that contains + * the correct URLs for Alchemy. + * + * @internal + */ + static getAlchemyConnectionInfo(network, apiKey, type) { + const url = type === 'http' + ? index.getAlchemyHttpUrl(network, apiKey) + : index.getAlchemyWsUrl(network, apiKey); + return { + headers: index.IS_BROWSER + ? { + 'Alchemy-Ethers-Sdk-Version': index.VERSION + } + : { + 'Alchemy-Ethers-Sdk-Version': index.VERSION, + 'Accept-Encoding': 'gzip' + }, + allowGzip: true, + url + }; + } + /** + * Overrides the method in ethers.js's `StaticJsonRpcProvider` class. This + * method is called when calling methods on the parent class `BaseProvider`. + * + * @override + */ + detectNetwork() { + const _super = Object.create(null, { + detectNetwork: { get: () => super.detectNetwork } + }); + return index.__awaiter(this, void 0, void 0, function* () { + let network = this.network; + if (network == null) { + network = yield _super.detectNetwork.call(this); + if (!network) { + throw new Error('No network detected'); + } + } + return network; + }); + } + _startPending() { + index.logWarn('WARNING: Alchemy Provider does not support pending filters'); + } + /** + * Overrides the ether's `isCommunityResource()` method. Returns true if the + * current api key is the default key. + * + * @override + */ + isCommunityResource() { + return this.apiKey === index.DEFAULT_ALCHEMY_API_KEY; + } + /** + * Overrides the base {@link JsonRpcProvider.send} method to implement custom + * logic for sending requests to Alchemy. + * + * @param method The method name to use for the request. + * @param params The parameters to use for the request. + * @override + * @public + */ + // TODO: Add headers for `perform()` override. + send(method, params) { + return this._send(method, params, 'send'); + } + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `JsonRpcProvider.send()`. + * + * This method is copied over directly in order to implement custom headers + * + * @internal + */ + _send(method, params, methodName, forceBatch = false) { + const request = { + method, + params, + id: this._nextId++, + jsonrpc: '2.0' + }; + // START MODIFIED CODE + const connection = Object.assign({}, this.connection); + connection.headers['Alchemy-Ethers-Sdk-Method'] = methodName; + if (this.batchRequests || forceBatch) { + return this.batcher.enqueueRequest(request); + } + // END MODIFIED CODE + 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 = web.fetchJson(this.connection, JSON.stringify(request), getResult).then(result => { + this.emit('debug', { + action: 'response', + request, + response: result, + provider: this + }); + return result; + }, error => { + this.emit('debug', { + action: 'response', + error, + request, + provider: this + }); + throw error; + }); + // Cache the fetch, but clear it on the next event loop + if (cache) { + this._cache[method] = result; + setTimeout(() => { + // @ts-ignore - This is done by ethers. + this._cache[method] = null; + }, 0); + } + return result; + } +} +/** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's + * `@ethersproject/web/src.ts/index.ts`. Used to support + * {@link AlchemyProvider._send}, which is also copied over. + */ +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; +} + +exports.AlchemyProvider = AlchemyProvider; +//# sourceMappingURL=alchemy-provider-ef251598.js.map diff --git a/test/node_modules/alchemy-sdk/dist/cjs/alchemy-provider-ef251598.js.map b/test/node_modules/alchemy-sdk/dist/cjs/alchemy-provider-ef251598.js.map new file mode 100644 index 0000000..a38c8cb --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/alchemy-provider-ef251598.js.map @@ -0,0 +1 @@ +{"version":3,"file":"alchemy-provider-ef251598.js","sources":["../../node_modules/@ethersproject/logger/lib.esm/_version.js","../../node_modules/@ethersproject/logger/lib.esm/index.js","../../node_modules/@ethersproject/properties/lib.esm/_version.js","../../node_modules/@ethersproject/properties/lib.esm/index.js","../../src/internal/request-batcher.ts","../../src/api/alchemy-provider.ts"],"sourcesContent":["export const version = \"logger/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nlet _permanentCensorErrors = false;\nlet _censorErrors = false;\nconst LogLevels = { debug: 1, \"default\": 2, info: 2, warning: 3, error: 4, off: 5 };\nlet _logLevel = LogLevels[\"default\"];\nimport { version } from \"./_version\";\nlet _globalLogger = null;\nfunction _checkNormalize() {\n try {\n const missing = [];\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 ;\n }\n catch (error) {\n missing.push(form);\n }\n });\n if (missing.length) {\n throw new Error(\"missing \" + missing.join(\", \"));\n }\n if (String.fromCharCode(0xe9).normalize(\"NFD\") !== String.fromCharCode(0x65, 0x0301)) {\n throw new Error(\"broken implementation\");\n }\n }\n catch (error) {\n return error.message;\n }\n return null;\n}\nconst _normalizeError = _checkNormalize();\nexport var LogLevel;\n(function (LogLevel) {\n LogLevel[\"DEBUG\"] = \"DEBUG\";\n LogLevel[\"INFO\"] = \"INFO\";\n LogLevel[\"WARNING\"] = \"WARNING\";\n LogLevel[\"ERROR\"] = \"ERROR\";\n LogLevel[\"OFF\"] = \"OFF\";\n})(LogLevel || (LogLevel = {}));\nexport var ErrorCode;\n(function (ErrorCode) {\n ///////////////////\n // Generic Errors\n // Unknown Error\n ErrorCode[\"UNKNOWN_ERROR\"] = \"UNKNOWN_ERROR\";\n // Not Implemented\n ErrorCode[\"NOT_IMPLEMENTED\"] = \"NOT_IMPLEMENTED\";\n // Unsupported Operation\n // - operation\n ErrorCode[\"UNSUPPORTED_OPERATION\"] = \"UNSUPPORTED_OPERATION\";\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 ErrorCode[\"NETWORK_ERROR\"] = \"NETWORK_ERROR\";\n // Some sort of bad response from the server\n ErrorCode[\"SERVER_ERROR\"] = \"SERVER_ERROR\";\n // Timeout\n ErrorCode[\"TIMEOUT\"] = \"TIMEOUT\";\n ///////////////////\n // Operational Errors\n // Buffer Overrun\n ErrorCode[\"BUFFER_OVERRUN\"] = \"BUFFER_OVERRUN\";\n // Numeric Fault\n // - operation: the operation being executed\n // - fault: the reason this faulted\n ErrorCode[\"NUMERIC_FAULT\"] = \"NUMERIC_FAULT\";\n ///////////////////\n // Argument Errors\n // Missing new operator to an object\n // - name: The name of the class\n ErrorCode[\"MISSING_NEW\"] = \"MISSING_NEW\";\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 ErrorCode[\"INVALID_ARGUMENT\"] = \"INVALID_ARGUMENT\";\n // Missing argument to a function:\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n ErrorCode[\"MISSING_ARGUMENT\"] = \"MISSING_ARGUMENT\";\n // Too many arguments\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n ErrorCode[\"UNEXPECTED_ARGUMENT\"] = \"UNEXPECTED_ARGUMENT\";\n ///////////////////\n // Blockchain Errors\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 ErrorCode[\"CALL_EXCEPTION\"] = \"CALL_EXCEPTION\";\n // Insufficient funds (< value + gasLimit * gasPrice)\n // - transaction: the transaction attempted\n ErrorCode[\"INSUFFICIENT_FUNDS\"] = \"INSUFFICIENT_FUNDS\";\n // Nonce has already been used\n // - transaction: the transaction attempted\n ErrorCode[\"NONCE_EXPIRED\"] = \"NONCE_EXPIRED\";\n // The replacement fee for the transaction is too low\n // - transaction: the transaction attempted\n ErrorCode[\"REPLACEMENT_UNDERPRICED\"] = \"REPLACEMENT_UNDERPRICED\";\n // The gas limit could not be estimated\n // - transaction: the transaction passed to estimateGas\n ErrorCode[\"UNPREDICTABLE_GAS_LIMIT\"] = \"UNPREDICTABLE_GAS_LIMIT\";\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 ErrorCode[\"TRANSACTION_REPLACED\"] = \"TRANSACTION_REPLACED\";\n ///////////////////\n // Interaction Errors\n // The user rejected the action, such as signing a message or sending\n // a transaction\n ErrorCode[\"ACTION_REJECTED\"] = \"ACTION_REJECTED\";\n})(ErrorCode || (ErrorCode = {}));\n;\nconst HEX = \"0123456789abcdef\";\nexport class Logger {\n constructor(version) {\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n value: version,\n writable: false\n });\n }\n _log(logLevel, args) {\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]) {\n return;\n }\n console.log.apply(console, args);\n }\n debug(...args) {\n this._log(Logger.levels.DEBUG, args);\n }\n info(...args) {\n this._log(Logger.levels.INFO, args);\n }\n warn(...args) {\n this._log(Logger.levels.WARNING, args);\n }\n makeError(message, code, params) {\n // Errors are being censored\n if (_censorErrors) {\n return this.makeError(\"censored error\", code, {});\n }\n if (!code) {\n code = Logger.errors.UNKNOWN_ERROR;\n }\n if (!params) {\n params = {};\n }\n const messageDetails = [];\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 }\n else {\n messageDetails.push(key + \"=\" + JSON.stringify(value));\n }\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 const reason = message;\n let url = \"\";\n switch (code) {\n case ErrorCode.NUMERIC_FAULT: {\n url = \"NUMERIC_FAULT\";\n const fault = message;\n switch (fault) {\n case \"overflow\":\n case \"underflow\":\n case \"division-by-zero\":\n url += \"-\" + fault;\n break;\n case \"negative-power\":\n case \"negative-width\":\n url += \"-unsupported\";\n break;\n case \"unbound-bitwise-result\":\n url += \"-unbound-result\";\n break;\n }\n break;\n }\n case ErrorCode.CALL_EXCEPTION:\n case ErrorCode.INSUFFICIENT_FUNDS:\n case ErrorCode.MISSING_NEW:\n case ErrorCode.NONCE_EXPIRED:\n case ErrorCode.REPLACEMENT_UNDERPRICED:\n case ErrorCode.TRANSACTION_REPLACED:\n case ErrorCode.UNPREDICTABLE_GAS_LIMIT:\n url = code;\n break;\n }\n if (url) {\n message += \" [ See: https:/\\/links.ethers.org/v5-errors-\" + url + \" ]\";\n }\n if (messageDetails.length) {\n message += \" (\" + messageDetails.join(\", \") + \")\";\n }\n // @TODO: Any??\n const error = new Error(message);\n error.reason = reason;\n error.code = code;\n Object.keys(params).forEach(function (key) {\n error[key] = params[key];\n });\n return error;\n }\n throwError(message, code, params) {\n throw this.makeError(message, code, params);\n }\n throwArgumentError(message, name, value) {\n return this.throwError(message, Logger.errors.INVALID_ARGUMENT, {\n argument: name,\n value: value\n });\n }\n assert(condition, message, code, params) {\n if (!!condition) {\n return;\n }\n this.throwError(message, code, params);\n }\n assertArgument(condition, message, name, value) {\n if (!!condition) {\n return;\n }\n this.throwArgumentError(message, name, value);\n }\n checkNormalize(message) {\n if (message == null) {\n message = \"platform missing String.prototype.normalize\";\n }\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 checkSafeUint53(value, message) {\n if (typeof (value) !== \"number\") {\n return;\n }\n if (message == null) {\n 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 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 checkArgumentCount(count, expectedCount, message) {\n if (message) {\n message = \": \" + message;\n }\n else {\n message = \"\";\n }\n if (count < expectedCount) {\n this.throwError(\"missing argument\" + message, Logger.errors.MISSING_ARGUMENT, {\n count: count,\n expectedCount: expectedCount\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 checkNew(target, kind) {\n if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n checkAbstract(target, kind) {\n if (target === kind) {\n this.throwError(\"cannot instantiate abstract class \" + JSON.stringify(kind.name) + \" directly; use a sub-class\", Logger.errors.UNSUPPORTED_OPERATION, { 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 static globalLogger() {\n if (!_globalLogger) {\n _globalLogger = new Logger(version);\n }\n return _globalLogger;\n }\n static setCensorship(censorship, permanent) {\n if (!censorship && permanent) {\n this.globalLogger().throwError(\"cannot permanently disable censorship\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n if (_permanentCensorErrors) {\n if (!censorship) {\n return;\n }\n this.globalLogger().throwError(\"error censorship permanent\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n _censorErrors = !!censorship;\n _permanentCensorErrors = !!permanent;\n }\n static setLogLevel(logLevel) {\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 static from(version) {\n return new Logger(version);\n }\n}\nLogger.errors = ErrorCode;\nLogger.levels = LogLevel;\n//# sourceMappingURL=index.js.map","export const version = \"properties/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nexport function defineReadOnly(object, name, value) {\n Object.defineProperty(object, name, {\n enumerable: true,\n value: value,\n writable: false,\n });\n}\n// Crawl up the constructor chain to find a static method\nexport function getStatic(ctor, key) {\n for (let i = 0; i < 32; i++) {\n if (ctor[key]) {\n return ctor[key];\n }\n if (!ctor.prototype || typeof (ctor.prototype) !== \"object\") {\n break;\n }\n ctor = Object.getPrototypeOf(ctor.prototype).constructor;\n }\n return null;\n}\nexport function resolveProperties(object) {\n return __awaiter(this, void 0, void 0, function* () {\n const promises = Object.keys(object).map((key) => {\n const value = object[key];\n return Promise.resolve(value).then((v) => ({ key: key, value: v }));\n });\n const results = yield Promise.all(promises);\n return results.reduce((accum, result) => {\n accum[(result.key)] = result.value;\n return accum;\n }, {});\n });\n}\nexport function checkProperties(object, properties) {\n if (!object || typeof (object) !== \"object\") {\n logger.throwArgumentError(\"invalid object\", \"object\", object);\n }\n Object.keys(object).forEach((key) => {\n if (!properties[key]) {\n logger.throwArgumentError(\"invalid object key - \" + key, \"transaction:\" + key, object);\n }\n });\n}\nexport function shallowCopy(object) {\n const result = {};\n for (const key in object) {\n result[key] = object[key];\n }\n return result;\n}\nconst opaque = { bigint: true, boolean: true, \"function\": true, number: true, string: true };\nfunction _isFrozen(object) {\n // Opaque objects are not mutable, so safe to copy by assignment\n if (object === undefined || object === null || opaque[typeof (object)]) {\n return true;\n }\n if (Array.isArray(object) || typeof (object) === \"object\") {\n if (!Object.isFrozen(object)) {\n return false;\n }\n const keys = Object.keys(object);\n for (let i = 0; i < keys.length; i++) {\n let value = null;\n try {\n value = object[keys[i]];\n }\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 if (!_isFrozen(value)) {\n return false;\n }\n }\n return true;\n }\n return logger.throwArgumentError(`Cannot deepCopy ${typeof (object)}`, \"object\", object);\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) {\n if (_isFrozen(object)) {\n 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 if (typeof (object) === \"object\") {\n const result = {};\n for (const key in object) {\n const value = object[key];\n if (value === undefined) {\n continue;\n }\n defineReadOnly(result, key, deepCopy(value));\n }\n return result;\n }\n return logger.throwArgumentError(`Cannot deepCopy ${typeof (object)}`, \"object\", object);\n}\nexport function deepCopy(object) {\n return _deepCopy(object);\n}\nexport class Description {\n constructor(info) {\n for (const key in info) {\n this[key] = deepCopy(info[key]);\n }\n }\n}\n//# sourceMappingURL=index.js.map","import { JsonRpcRequest, JsonRpcResponse } from './internal-types';\n\n/** Maximum size of a batch on the rpc provider. */\nconst DEFAULT_MAX_REQUEST_BATCH_SIZE = 100;\n\n/** Timeout interval before the pending batch is sent. */\nconst DEFAULT_REQUEST_BATCH_DELAY_MS = 10;\n\n/**\n * Internal class to enqueue requests and automatically send/process batches.\n *\n * The underlying batching mechanism is loosely based on ethers.js's\n * `JsonRpcBatchProvider`.\n *\n * @internal\n */\nexport class RequestBatcher {\n /** Timeout timer that periodically sends the pending batch. */\n private pendingBatchTimer: NodeJS.Timer | undefined;\n\n /**\n * Array of enqueued requests along with the constructed promise handlers for\n * each request.\n */\n private pendingBatch: Array = [];\n\n constructor(\n private readonly sendBatchFn: SendBatchFn,\n private readonly maxBatchSize = DEFAULT_MAX_REQUEST_BATCH_SIZE\n ) {}\n\n /**\n * Enqueues the provided request. The batch is immediately sent if the maximum\n * batch size is reached. Otherwise, the request is enqueued onto a batch that\n * is sent after 10ms.\n *\n * Returns a promise that resolves with the result of the request.\n */\n async enqueueRequest(request: JsonRpcRequest): Promise {\n const inflightRequest: BatchRequest = {\n request,\n resolve: undefined,\n reject: undefined\n };\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.pendingBatch.length === this.maxBatchSize) {\n // Send batch immediately if we are at the maximum batch size.\n void this.sendBatchRequest();\n } else if (!this.pendingBatchTimer) {\n // Schedule batch for next event loop + short duration\n this.pendingBatchTimer = setTimeout(\n () => this.sendBatchRequest(),\n DEFAULT_REQUEST_BATCH_DELAY_MS\n );\n }\n\n return promise;\n }\n\n /**\n * Sends the currently queued batches and resets the batch and timer. Processes\n * the batched response results back to the original promises.\n */\n private async sendBatchRequest(): Promise {\n // Get the current batch and clear it, so new requests\n // go into the next batch\n const batch = this.pendingBatch;\n this.pendingBatch = [];\n if (this.pendingBatchTimer) {\n clearTimeout(this.pendingBatchTimer);\n this.pendingBatchTimer = undefined;\n }\n\n // Get the request as an array of requests\n const request = batch.map(inflight => inflight.request);\n\n return this.sendBatchFn(request).then(\n result => {\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 as any).code = payload.error.code;\n (error as any).data = payload.error.data;\n inflightRequest.reject!(error);\n } else {\n inflightRequest.resolve!(payload.result);\n }\n });\n },\n error => {\n batch.forEach(inflightRequest => {\n inflightRequest.reject!(error);\n });\n }\n );\n }\n}\n\n/** Function type to match the `fetchJson` function in ethers. */\ntype SendBatchFn = (reqs: JsonRpcRequest[]) => Promise;\n\n/**\n * Internal interface to represent a request on a batch along with the promises to resolve it.\n */\ninterface BatchRequest {\n request: JsonRpcRequest;\n resolve?: (result: any) => void;\n reject?: (error: Error) => void;\n}\n","import {\n Network as NetworkFromEthers,\n Networkish,\n getNetwork as getNetworkFromEthers\n} from '@ethersproject/networks';\nimport { deepCopy } from '@ethersproject/properties';\nimport {\n CommunityResourcable,\n JsonRpcProvider\n} from '@ethersproject/providers';\nimport { ConnectionInfo, fetchJson } from '@ethersproject/web';\n\nimport { JsonRpcRequest, JsonRpcResponse } from '../internal/internal-types';\nimport { RequestBatcher } from '../internal/request-batcher';\nimport { Network } from '../types/types';\nimport {\n CustomNetworks,\n DEFAULT_ALCHEMY_API_KEY,\n DEFAULT_NETWORK,\n EthersNetwork,\n getAlchemyHttpUrl,\n getAlchemyWsUrl\n} from '../util/const';\nimport { logWarn } from '../util/logger';\nimport { IS_BROWSER } from '../util/util';\nimport { VERSION } from '../version';\nimport { AlchemyConfig } from './alchemy-config';\n\n/**\n * SDK's custom implementation of ethers.js's 'AlchemyProvider'.\n *\n * Do not call this constructor directly. Instead, instantiate an instance of\n * {@link Alchemy} and call {@link Alchemy.config.getProvider()}.\n *\n * @public\n */\nexport class AlchemyProvider\n extends JsonRpcProvider\n implements CommunityResourcable\n{\n readonly apiKey: string;\n readonly maxRetries: number;\n readonly batchRequests: boolean;\n\n /**\n * VISIBLE ONLY FOR TESTING\n *@internal\n */\n readonly batcher: RequestBatcher;\n\n /** @internal */\n constructor(config: AlchemyConfig) {\n // Normalize the API Key to a string.\n const apiKey = AlchemyProvider.getApiKey(config.apiKey);\n\n // Generate our own connection info with the correct endpoint URLs.\n const alchemyNetwork = AlchemyProvider.getAlchemyNetwork(config.network);\n const connection = AlchemyProvider.getAlchemyConnectionInfo(\n alchemyNetwork,\n apiKey,\n 'http'\n );\n\n // If a hardcoded url was specified in the config, use that instead of the\n // provided apiKey or network.\n if (config.url !== undefined) {\n connection.url = config.url;\n }\n\n connection.throttleLimit = config.maxRetries;\n\n // Normalize the Alchemy named network input to the network names used by\n // ethers. This allows the parent super constructor in JsonRpcProvider to\n // correctly set the network.\n const ethersNetwork = EthersNetwork[alchemyNetwork];\n super(connection, ethersNetwork);\n\n this.apiKey = config.apiKey;\n this.maxRetries = config.maxRetries;\n this.batchRequests = config.batchRequests;\n\n // TODO: support individual headers when calling batch\n const batcherConnection = { ...this.connection };\n batcherConnection.headers!['Alchemy-Ethers-Sdk-Method'] = 'batchSend';\n const sendBatchFn = (\n requests: JsonRpcRequest[]\n ): Promise => {\n return fetchJson(batcherConnection, JSON.stringify(requests));\n };\n this.batcher = new RequestBatcher(sendBatchFn);\n }\n\n /**\n * Overrides the `UrlJsonRpcProvider.getApiKey` method as implemented by\n * ethers.js. Returns the API key for an Alchemy provider.\n *\n * @internal\n * @override\n */\n static getApiKey(apiKey: any): string {\n if (apiKey == null) {\n return DEFAULT_ALCHEMY_API_KEY;\n }\n if (apiKey && typeof apiKey !== 'string') {\n throw new Error(\n `Invalid apiKey '${apiKey}' provided. apiKey must be a string.`\n );\n }\n return apiKey;\n }\n\n /**\n * Overrides the `BaseProvider.getNetwork` method as implemented by ethers.js.\n *\n * This override allows the SDK to set the provider's network to values not\n * yet supported by ethers.js.\n *\n * @internal\n * @override\n */\n static getNetwork(network: Networkish): NetworkFromEthers {\n if (typeof network === 'string' && network in CustomNetworks) {\n return CustomNetworks[network];\n }\n\n // Call the standard ethers.js getNetwork method for other networks.\n return getNetworkFromEthers(network);\n }\n\n /**\n * Converts the `Networkish` input to the network enum used by Alchemy.\n *\n * @internal\n */\n static getAlchemyNetwork(network?: Networkish): Network {\n if (network === undefined) {\n return DEFAULT_NETWORK;\n }\n\n if (typeof network === 'number') {\n throw new Error(\n `Invalid network '${network}' provided. Network must be a string.`\n );\n }\n\n // Guaranteed that `typeof network === 'string`.\n const isValidNetwork = Object.values(Network).includes(network as Network);\n if (!isValidNetwork) {\n throw new Error(\n `Invalid network '${network}' provided. Network must be one of: ` +\n `${Object.values(Network).join(', ')}.`\n );\n }\n return network as Network;\n }\n\n /**\n * Returns a {@link ConnectionInfo} object compatible with ethers that contains\n * the correct URLs for Alchemy.\n *\n * @internal\n */\n static getAlchemyConnectionInfo(\n network: Network,\n apiKey: string,\n type: 'wss' | 'http'\n ): ConnectionInfo {\n const url =\n type === 'http'\n ? getAlchemyHttpUrl(network, apiKey)\n : getAlchemyWsUrl(network, apiKey);\n return {\n headers: IS_BROWSER\n ? {\n 'Alchemy-Ethers-Sdk-Version': VERSION\n }\n : {\n 'Alchemy-Ethers-Sdk-Version': VERSION,\n 'Accept-Encoding': 'gzip'\n },\n allowGzip: true,\n url\n };\n }\n\n /**\n * Overrides the method in ethers.js's `StaticJsonRpcProvider` class. This\n * method is called when calling methods on the parent class `BaseProvider`.\n *\n * @override\n */\n async detectNetwork(): Promise {\n let network = this.network;\n if (network == null) {\n network = await super.detectNetwork();\n\n if (!network) {\n throw new Error('No network detected');\n }\n }\n return network;\n }\n\n _startPending(): void {\n logWarn('WARNING: Alchemy Provider does not support pending filters');\n }\n\n /**\n * Overrides the ether's `isCommunityResource()` method. Returns true if the\n * current api key is the default key.\n *\n * @override\n */\n isCommunityResource(): boolean {\n return this.apiKey === DEFAULT_ALCHEMY_API_KEY;\n }\n\n /**\n * Overrides the base {@link JsonRpcProvider.send} method to implement custom\n * logic for sending requests to Alchemy.\n *\n * @param method The method name to use for the request.\n * @param params The parameters to use for the request.\n * @override\n * @public\n */\n // TODO: Add headers for `perform()` override.\n send(method: string, params: Array): Promise {\n return this._send(method, params, 'send');\n }\n\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `JsonRpcProvider.send()`.\n *\n * This method is copied over directly in order to implement custom headers\n *\n * @internal\n */\n _send(\n method: string,\n params: Array,\n methodName: string,\n forceBatch = false\n ): Promise {\n const request = {\n method,\n params,\n id: this._nextId++,\n jsonrpc: '2.0'\n };\n\n // START MODIFIED CODE\n const connection = { ...this.connection };\n connection.headers!['Alchemy-Ethers-Sdk-Method'] = methodName;\n\n if (this.batchRequests || forceBatch) {\n return this.batcher.enqueueRequest(request as JsonRpcRequest);\n }\n // END MODIFIED CODE\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(\n this.connection,\n JSON.stringify(request),\n getResult\n ).then(\n result => {\n this.emit('debug', {\n action: 'response',\n request,\n response: result,\n provider: this\n });\n\n return result;\n },\n error => {\n this.emit('debug', {\n action: 'response',\n error,\n request,\n provider: this\n });\n\n throw error;\n }\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 // @ts-ignore - This is done by ethers.\n this._cache[method] = null;\n }, 0);\n }\n\n return result;\n }\n}\n\n/**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's\n * `@ethersproject/web/src.ts/index.ts`. Used to support\n * {@link AlchemyProvider._send}, which is also copied over.\n */\nfunction getResult(payload: {\n error?: { code?: number; data?: any; message?: string };\n result?: any;\n}): any {\n if (payload.error) {\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"],"names":["version","this","JsonRpcProvider","EthersNetwork","fetchJson","DEFAULT_ALCHEMY_API_KEY","CustomNetworks","getNetworkFromEthers","DEFAULT_NETWORK","Network","getAlchemyHttpUrl","getAlchemyWsUrl","IS_BROWSER","VERSION","logWarn"],"mappings":";;;;;;;;;;;;;AAAO,MAAMA,SAAO,GAAG,cAAc;;ACCrC,IAAI,sBAAsB,GAAG,KAAK,CAAC;AACnC,IAAI,aAAa,GAAG,KAAK,CAAC;AAC1B,MAAM,SAAS,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK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cjs/alchemy-websocket-provider-c17e9225.js b/test/node_modules/alchemy-sdk/dist/cjs/alchemy-websocket-provider-c17e9225.js new file mode 100644 index 0000000..0fb6f82 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/alchemy-websocket-provider-c17e9225.js @@ -0,0 +1,1152 @@ +'use strict'; + +var index = require('./index-e8114eb4.js'); +var SturdyWebSocket = require('sturdy-websocket'); +var bignumber = require('@ethersproject/bignumber'); +var networks = require('@ethersproject/networks'); +var providers = require('@ethersproject/providers'); +var alchemyProvider = require('./alchemy-provider-ef251598.js'); +require('./api/utils'); +require('axios'); +require('@ethersproject/abstract-provider'); +require('@ethersproject/wallet'); +require('@ethersproject/contracts'); +require('@ethersproject/web'); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var SturdyWebSocket__default = /*#__PURE__*/_interopDefaultLegacy(SturdyWebSocket); + +/** + * The maximum number of blocks to backfill. If more than this many blocks have + * been missed, then we'll sadly miss data, but we want to make sure we don't + * end up requesting thousands of blocks if somebody left their laptop closed for a week. + */ +const MAX_BACKFILL_BLOCKS = 120; +/** + * The WebsocketBackfiller fetches events that were sent since a provided block + * number. This is used in the {@link AlchemyWebSocketProvider} to backfill + * events that were transmitted while the websocket connection was down. + * + * The backfiller backfills two main eth_subscribe events: `logs` and `newHeads`. + * + * @internal + */ +class WebsocketBackfiller { + constructor(provider) { + this.provider = provider; + // TODO: Use HTTP provider to do backfill. + this.maxBackfillBlocks = MAX_BACKFILL_BLOCKS; + } + /** + * Runs backfill for `newHeads` events. + * + * @param isCancelled Whether the backfill request is cancelled. + * @param previousHeads Previous head requests that were sent. + * @param fromBlockNumber The block number to start backfilling from. + * @returns A list of `newHeads` events that were sent since the last backfill. + */ + getNewHeadsBackfill(isCancelled, previousHeads, fromBlockNumber) { + return index.__awaiter(this, void 0, void 0, function* () { + throwIfCancelled(isCancelled); + const toBlockNumber = yield this.getBlockNumber(); + throwIfCancelled(isCancelled); + // If there are no previous heads to fetch, return new heads since + // `fromBlockNumber`, or up to maxBackfillBlocks from the current head. + if (previousHeads.length === 0) { + return this.getHeadEventsInRange(Math.max(fromBlockNumber, toBlockNumber - this.maxBackfillBlocks) + 1, toBlockNumber + 1); + } + // If the last emitted event is too far back in the past, there's no need + // to backfill for reorgs. Just fetch the last `maxBackfillBlocks` worth of + // new heads. + const lastSeenBlockNumber = index.fromHex(previousHeads[previousHeads.length - 1].number); + const minBlockNumber = toBlockNumber - this.maxBackfillBlocks + 1; + if (lastSeenBlockNumber <= minBlockNumber) { + return this.getHeadEventsInRange(minBlockNumber, toBlockNumber + 1); + } + // To capture all `newHeads` events, return all head events from the last + // seen block number to current + any of the previous heads that were re-orged. + const reorgHeads = yield this.getReorgHeads(isCancelled, previousHeads); + throwIfCancelled(isCancelled); + const intermediateHeads = yield this.getHeadEventsInRange(lastSeenBlockNumber + 1, toBlockNumber + 1); + throwIfCancelled(isCancelled); + return [...reorgHeads, ...intermediateHeads]; + }); + } + /** + * Runs backfill for `logs` events. + * + * @param isCancelled Whether the backfill request is cancelled. + * @param filter The filter object that accompanies a logs subscription. + * @param previousLogs Previous log requests that were sent. + * @param fromBlockNumber The block number to start backfilling from. + */ + getLogsBackfill(isCancelled, filter, previousLogs, fromBlockNumber) { + return index.__awaiter(this, void 0, void 0, function* () { + throwIfCancelled(isCancelled); + const toBlockNumber = yield this.getBlockNumber(); + throwIfCancelled(isCancelled); + // If there are no previous logs to fetch, return new logs since + // `fromBlockNumber`, or up to `maxBackfillBlocks` from the current head. + if (previousLogs.length === 0) { + return this.getLogsInRange(filter, Math.max(fromBlockNumber, toBlockNumber - this.maxBackfillBlocks) + 1, toBlockNumber + 1); + } + // If the last emitted log is too far back in the past, there's no need + // to backfill for removed logs. Just fetch the last `maxBackfillBlocks` + // worth of logs. + const lastSeenBlockNumber = index.fromHex(previousLogs[previousLogs.length - 1].blockNumber); + const minBlockNumber = toBlockNumber - this.maxBackfillBlocks + 1; + if (lastSeenBlockNumber < minBlockNumber) { + return this.getLogsInRange(filter, minBlockNumber, toBlockNumber + 1); + } + // Return all log events that have happened along with log events that have + // been removed due to a chain reorg. + const commonAncestor = yield this.getCommonAncestor(isCancelled, previousLogs); + throwIfCancelled(isCancelled); + // All previous logs with a block number greater than the common ancestor + // were part of a re-org, so mark them as such. + const removedLogs = previousLogs + .filter(log => index.fromHex(log.blockNumber) > commonAncestor.blockNumber) + .map(log => (Object.assign(Object.assign({}, log), { removed: true }))); + // If no common ancestor was found, start backfill from the oldest log's + // block number. + const fromBlockInclusive = commonAncestor.blockNumber === Number.NEGATIVE_INFINITY + ? index.fromHex(previousLogs[0].blockNumber) + : commonAncestor.blockNumber; + let addedLogs = yield this.getLogsInRange(filter, fromBlockInclusive, toBlockNumber + 1); + // De-dupe any logs that were already emitted. + addedLogs = addedLogs.filter(log => log && + (index.fromHex(log.blockNumber) > commonAncestor.blockNumber || + index.fromHex(log.logIndex) > commonAncestor.logIndex)); + throwIfCancelled(isCancelled); + return [...removedLogs, ...addedLogs]; + }); + } + /** + * Sets a new max backfill blocks. VISIBLE ONLY FOR TESTING. + * + * @internal + */ + setMaxBackfillBlock(newMax) { + this.maxBackfillBlocks = newMax; + } + /** + * Gets the current block number as a number. + * + * @private + */ + getBlockNumber() { + return index.__awaiter(this, void 0, void 0, function* () { + const blockNumberHex = yield this.provider.send('eth_blockNumber'); + return index.fromHex(blockNumberHex); + }); + } + /** + * Gets all `newHead` events in the provided range. Note that the returned + * heads do not include re-orged heads. Use {@link getReorgHeads} to find heads + * that were part of a re-org. + * + * @private + */ + getHeadEventsInRange(fromBlockInclusive, toBlockExclusive) { + return index.__awaiter(this, void 0, void 0, function* () { + if (fromBlockInclusive >= toBlockExclusive) { + return []; + } + const batchParts = []; + for (let i = fromBlockInclusive; i < toBlockExclusive; i++) { + batchParts.push({ + method: 'eth_getBlockByNumber', + params: [index.toHex(i), false] + }); + } + // TODO: handle errors + const blockHeads = yield this.provider.sendBatch(batchParts); + return blockHeads.map(toNewHeadsEvent); + }); + } + /** + * Returns all heads that were part of a reorg event. + * + * @private + */ + getReorgHeads(isCancelled, previousHeads) { + return index.__awaiter(this, void 0, void 0, function* () { + const result = []; + // Iterate from the most recent head backwards in order to find the first + // block that was part of a re-org. + for (let i = previousHeads.length - 1; i >= 0; i--) { + const oldEvent = previousHeads[i]; + const blockHead = yield this.getBlockByNumber(index.fromHex(oldEvent.number)); + throwIfCancelled(isCancelled); + // If the hashes match, then current head in the iteration was not re-orged. + if (oldEvent.hash === blockHead.hash) { + break; + } + result.push(toNewHeadsEvent(blockHead)); + } + return result.reverse(); + }); + } + /** + * Simple wrapper around `eth_getBlockByNumber` that returns the complete + * block information for the provided block number. + * + * @private + */ + getBlockByNumber(blockNumber) { + return index.__awaiter(this, void 0, void 0, function* () { + return this.provider.send('eth_getBlockByNumber', [ + index.toHex(blockNumber), + false + ]); + }); + } + /** + * Given a list of previous log events, finds the common block number from the + * logs that matches the block head. + * + * This can be used to identify which logs are part of a re-org. + * + * Returns 1 less than the oldest log's block number if no common ancestor was found. + * + * @private + */ + getCommonAncestor(isCancelled, previousLogs) { + return index.__awaiter(this, void 0, void 0, function* () { + // Iterate from the most recent head backwards in order to find the first + // block that was part of a re-org. + let blockHead = yield this.getBlockByNumber(index.fromHex(previousLogs[previousLogs.length - 1].blockNumber)); + throwIfCancelled(isCancelled); + for (let i = previousLogs.length - 1; i >= 0; i--) { + const oldLog = previousLogs[i]; + // Ensure that updated blocks are fetched every time the log's block number + // changes. + if (oldLog.blockNumber !== blockHead.number) { + blockHead = yield this.getBlockByNumber(index.fromHex(oldLog.blockNumber)); + } + // Since logs are ordered in ascending order, the first log that matches + // the hash should be the largest logIndex. + if (oldLog.blockHash === blockHead.hash) { + return { + blockNumber: index.fromHex(oldLog.blockNumber), + logIndex: index.fromHex(oldLog.logIndex) + }; + } + } + return { + blockNumber: Number.NEGATIVE_INFINITY, + logIndex: Number.NEGATIVE_INFINITY + }; + }); + } + /** + * Gets all `logs` events in the provided range. Note that the returned logs + * do not include removed logs. + * + * @private + */ getLogsInRange(filter, fromBlockInclusive, toBlockExclusive) { + return index.__awaiter(this, void 0, void 0, function* () { + if (fromBlockInclusive >= toBlockExclusive) { + return []; + } + const rangeFilter = Object.assign(Object.assign({}, filter), { fromBlock: index.toHex(fromBlockInclusive), toBlock: index.toHex(toBlockExclusive - 1) }); + return this.provider.send('eth_getLogs', [rangeFilter]); + }); + } +} +function toNewHeadsEvent(head) { + const result = Object.assign({}, head); + delete result.totalDifficulty; + delete result.transactions; + delete result.uncles; + return result; +} +function dedupeNewHeads(events) { + return dedupe(events, event => event.hash); +} +function dedupeLogs(events) { + return dedupe(events, event => `${event.blockHash}/${event.logIndex}`); +} +function dedupe(items, getKey) { + const keysSeen = new Set(); + const result = []; + items.forEach(item => { + const key = getKey(item); + if (!keysSeen.has(key)) { + keysSeen.add(key); + result.push(item); + } + }); + return result; +} +const CANCELLED = new Error('Cancelled'); +function throwIfCancelled(isCancelled) { + if (isCancelled()) { + throw CANCELLED; + } +} + +const HEARTBEAT_INTERVAL = 30000; +const HEARTBEAT_WAIT_TIME = 10000; +const BACKFILL_TIMEOUT = 60000; +const BACKFILL_RETRIES = 5; +/** + * Subscriptions have a memory of recent events they have sent so that in the + * event that they disconnect and need to backfill, they can detect re-orgs. + * Keep a buffer that goes back at least these many blocks, the maximum amount + * at which we might conceivably see a re-org. + * + * Note that while our buffer goes back this many blocks, it may contain more + * than this many elements, since in the case of logs subscriptions more than + * one event may be emitted for a block. + */ +const RETAINED_EVENT_BLOCK_COUNT = 10; +/** + * SDK's custom implementation fo the ethers.js's 'AlchemyWebSocketProvider'. + * + * Do not call this constructor directly. Instead, instantiate an instance of + * {@link Alchemy} and call {@link Alchemy.config.getWebSocketProvider()}. + * + * @public + */ +class AlchemyWebSocketProvider extends providers.WebSocketProvider { + /** @internal */ + constructor(config, wsConstructor) { + var _a; + // Normalize the API Key to a string. + const apiKey = alchemyProvider.AlchemyProvider.getApiKey(config.apiKey); + // Generate our own connection info with the correct endpoint URLs. + const alchemyNetwork = alchemyProvider.AlchemyProvider.getAlchemyNetwork(config.network); + const connection = alchemyProvider.AlchemyProvider.getAlchemyConnectionInfo(alchemyNetwork, apiKey, 'wss'); + const protocol = `alchemy-sdk-${index.VERSION}`; + // Use the provided config URL override if it exists, otherwise use the created one. + const ws = new SturdyWebSocket__default["default"]((_a = config.url) !== null && _a !== void 0 ? _a : connection.url, protocol, { + wsConstructor: wsConstructor !== null && wsConstructor !== void 0 ? wsConstructor : getWebsocketConstructor() + }); + // Normalize the Alchemy named network input to the network names used by + // ethers. This allows the parent super constructor in JsonRpcProvider to + // correctly set the network. + const ethersNetwork = index.EthersNetwork[alchemyNetwork]; + super(ws, ethersNetwork); + this._events = []; + // In the case of a WebSocket reconnection, all subscriptions are lost and we + // create new ones to replace them, but we want to create the illusion that + // the original subscriptions persist. Thus, maintain a mapping from the + // "virtual" subscription ids which are visible to the consumer to the + // "physical" subscription ids of the actual connections. This terminology is + // borrowed from virtual and physical memory, which has a similar mapping. + /** @internal */ + this.virtualSubscriptionsById = new Map(); + /** @internal */ + this.virtualIdsByPhysicalId = new Map(); + /** + * The underlying ethers {@link WebSocketProvider} already handles and emits + * messages. To allow backfilling, track all messages that are emitted. + * + * This is a field arrow function in order to preserve `this` context when + * passing the method as an event listener. + * + * @internal + */ + this.handleMessage = (event) => { + const message = JSON.parse(event.data); + if (!isSubscriptionEvent(message)) { + return; + } + const physicalId = message.params.subscription; + const virtualId = this.virtualIdsByPhysicalId.get(physicalId); + if (!virtualId) { + return; + } + const subscription = this.virtualSubscriptionsById.get(virtualId); + if (subscription.method !== 'eth_subscribe') { + return; + } + switch (subscription.params[0]) { + case 'newHeads': { + const newHeadsSubscription = subscription; + const newHeadsMessage = message; + const { isBackfilling, backfillBuffer } = newHeadsSubscription; + const { result } = newHeadsMessage.params; + if (isBackfilling) { + addToNewHeadsEventsBuffer(backfillBuffer, result); + } + else if (physicalId !== virtualId) { + // In the case of a re-opened subscription, ethers will not emit the + // event, so the SDK has to. + this.emitAndRememberEvent(virtualId, result, getNewHeadsBlockNumber); + } + else { + // Ethers subscription mapping will emit the event, just store it. + this.rememberEvent(virtualId, result, getNewHeadsBlockNumber); + } + break; + } + case 'logs': { + const logsSubscription = subscription; + const logsMessage = message; + const { isBackfilling, backfillBuffer } = logsSubscription; + const { result } = logsMessage.params; + if (isBackfilling) { + addToLogsEventsBuffer(backfillBuffer, result); + } + else if (virtualId !== physicalId) { + this.emitAndRememberEvent(virtualId, result, getLogsBlockNumber); + } + else { + this.rememberEvent(virtualId, result, getLogsBlockNumber); + } + break; + } + default: + if (physicalId !== virtualId) { + // In the case of a re-opened subscription, ethers will not emit the + // event, so the SDK has to. + const { result } = message.params; + this.emitEvent(virtualId, result); + } + } + }; + /** + * When the websocket connection reopens: + * + * 1. Resubscribe to all existing subscriptions and start backfilling + * 2. Restart heart beat. + * + * This is a field arrow function in order to preserve `this` context when + * passing the method as an event listener. + * + * @internal + */ + this.handleReopen = () => { + this.virtualIdsByPhysicalId.clear(); + const { cancel, isCancelled } = makeCancelToken(); + this.cancelBackfill = cancel; + for (const subscription of this.virtualSubscriptionsById.values()) { + void (() => index.__awaiter(this, void 0, void 0, function* () { + try { + yield this.resubscribeAndBackfill(isCancelled, subscription); + } + catch (error) { + if (!isCancelled()) { + console.error(`Error while backfilling "${subscription.params[0]}" subscription. Some events may be missing.`, error); + } + } + }))(); + } + this.startHeartbeat(); + }; + /** + * Cancels the heartbeat and any pending backfills being performed. This is + * called when the websocket connection goes down or is disconnected. + * + * This is a field arrow function in order to preserve `this` context when + * passing the method as an event listener. + * + * @internal + */ + this.stopHeartbeatAndBackfill = () => { + if (this.heartbeatIntervalId != null) { + clearInterval(this.heartbeatIntervalId); + this.heartbeatIntervalId = undefined; + } + this.cancelBackfill(); + }; + this.apiKey = apiKey; + // Start heartbeat and backfiller for the websocket connection. + this.backfiller = new WebsocketBackfiller(this); + this.addSocketListeners(); + this.startHeartbeat(); + this.cancelBackfill = index.noop; + } + /** + * Overrides the `BaseProvider.getNetwork` method as implemented by ethers.js. + * + * This override allows the SDK to set the provider's network to values not + * yet supported by ethers.js. + * + * @internal + * @override + */ + static getNetwork(network) { + if (typeof network === 'string' && network in index.CustomNetworks) { + return index.CustomNetworks[network]; + } + // Call the standard ethers.js getNetwork method for other networks. + return networks.getNetwork(network); + } + /** + * Overridden implementation of ethers that includes Alchemy based subscriptions. + * + * @param eventName Event to subscribe to + * @param listener The listener function to call when the event is triggered. + * @override + * @public + */ + // TODO: Override `Listener` type to get type autocompletions. + on(eventName, listener) { + return this._addEventListener(eventName, listener, false); + } + /** + * Overridden implementation of ethers that includes Alchemy based + * subscriptions. Adds a listener to the triggered for only the next + * {@link eventName} event, after which it will be removed. + * + * @param eventName Event to subscribe to + * @param listener The listener function to call when the event is triggered. + * @override + * @public + */ + // TODO: Override `Listener` type to get type autocompletions. + once(eventName, listener) { + return this._addEventListener(eventName, listener, true); + } + /** + * Removes the provided {@link listener} for the {@link eventName} event. If no + * listener is provided, all listeners for the event will be removed. + * + * @param eventName Event to unlisten to. + * @param listener The listener function to remove. + * @override + * @public + */ + off(eventName, listener) { + if (index.isAlchemyEvent(eventName)) { + return this._off(eventName, listener); + } + else { + return super.off(eventName, listener); + } + } + /** + * Remove all listeners for the provided {@link eventName} event. If no event + * is provided, all events and their listeners are removed. + * + * @param eventName The event to remove all listeners for. + * @override + * @public + */ + removeAllListeners(eventName) { + if (eventName !== undefined && index.isAlchemyEvent(eventName)) { + return this._removeAllListeners(eventName); + } + else { + return super.removeAllListeners(eventName); + } + } + /** + * Returns the number of listeners for the provided {@link eventName} event. If + * no event is provided, the total number of listeners for all events is returned. + * + * @param eventName The event to get the number of listeners for. + * @public + * @override + */ + listenerCount(eventName) { + if (eventName !== undefined && index.isAlchemyEvent(eventName)) { + return this._listenerCount(eventName); + } + else { + return super.listenerCount(eventName); + } + } + /** + * Returns an array of listeners for the provided {@link eventName} event. If + * no event is provided, all listeners will be included. + * + * @param eventName The event to get the listeners for. + * @public + * @override + */ + listeners(eventName) { + if (eventName !== undefined && index.isAlchemyEvent(eventName)) { + return this._listeners(eventName); + } + else { + return super.listeners(eventName); + } + } + /** + * Overrides the method in `BaseProvider` in order to properly format the + * Alchemy subscription events. + * + * @internal + * @override + */ + _addEventListener(eventName, listener, once) { + if (index.isAlchemyEvent(eventName)) { + index.verifyAlchemyEventName(eventName); + const event = new index.EthersEvent(index.getAlchemyEventTag(eventName), listener, once); + this._events.push(event); + this._startEvent(event); + return this; + } + else { + return super._addEventListener(eventName, listener, once); + } + } + /** + * Overrides the `_startEvent()` method in ethers.js's + * {@link WebSocketProvider} to include additional alchemy methods. + * + * @param event + * @override + * @internal + */ + _startEvent(event) { + // Check if the event type is a custom Alchemy subscription. + const customLogicTypes = [...index.ALCHEMY_EVENT_TYPES, 'block', 'filter']; + if (customLogicTypes.includes(event.type)) { + this.customStartEvent(event); + } + else { + super._startEvent(event); + } + } + /** + * Overridden from ethers.js's {@link WebSocketProvider} + * + * Modified in order to add mappings for backfilling. + * + * @internal + * @override + */ + _subscribe(tag, param, processFunc, event) { + return index.__awaiter(this, void 0, void 0, function* () { + let subIdPromise = this._subIds[tag]; + // BEGIN MODIFIED CODE + const startingBlockNumber = yield this.getBlockNumber(); + // END MODIFIED CODE + if (subIdPromise == null) { + subIdPromise = Promise.all(param).then(param => { + return this.send('eth_subscribe', param); + }); + this._subIds[tag] = subIdPromise; + } + const subId = yield subIdPromise; + // BEGIN MODIFIED CODE + const resolvedParams = yield Promise.all(param); + this.virtualSubscriptionsById.set(subId, { + event: event, + method: 'eth_subscribe', + params: resolvedParams, + startingBlockNumber, + virtualId: subId, + physicalId: subId, + sentEvents: [], + isBackfilling: false, + backfillBuffer: [] + }); + this.virtualIdsByPhysicalId.set(subId, subId); + // END MODIFIED CODE + this._subs[subId] = { tag, processFunc }; + }); + } + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @internal + * @override + */ + emit(eventName, ...args) { + if (index.isAlchemyEvent(eventName)) { + let result = false; + const stopped = []; + // This line is the only modified line from the original method. + const eventTag = index.getAlchemyEventTag(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; + } + else { + return super.emit(eventName, ...args); + } + } + /** @internal */ + sendBatch(parts) { + return index.__awaiter(this, void 0, void 0, function* () { + let nextId = 0; + const payload = parts.map(({ method, params }) => { + return { + method, + params, + jsonrpc: '2.0', + id: `alchemy-sdk:${nextId++}` + }; + }); + return this.sendBatchConcurrently(payload); + }); + } + /** @override */ + destroy() { + this.removeSocketListeners(); + this.stopHeartbeatAndBackfill(); + return super.destroy(); + } + /** + * Overrides the ether's `isCommunityResource()` method. Returns true if the + * current api key is the default key. + * + * @override + */ + isCommunityResource() { + return this.apiKey === index.DEFAULT_ALCHEMY_API_KEY; + } + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `WebSocketProvider._stopEvent()`. + * + * This method is copied over directly in order to support Alchemy's + * subscription type by allowing the provider to properly stop Alchemy's + * subscription events. + * + * @internal + */ + _stopEvent(event) { + let tag = event.tag; + // START MODIFIED CODE + if (index.ALCHEMY_EVENT_TYPES.includes(event.type)) { + // There are remaining pending transaction listeners. + if (this._events.filter(e => index.ALCHEMY_EVENT_TYPES.includes(e.type)).length) { + return; + } + // END MODIFIED CODE + } + else 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]; + void subId.then(subId => { + if (!this._subs[subId]) { + return; + } + delete this._subs[subId]; + void this.send('eth_unsubscribe', [subId]); + }); + } + /** @internal */ + addSocketListeners() { + this._websocket.addEventListener('message', this.handleMessage); + this._websocket.addEventListener('reopen', this.handleReopen); + this._websocket.addEventListener('down', this.stopHeartbeatAndBackfill); + } + /** @internal */ + removeSocketListeners() { + this._websocket.removeEventListener('message', this.handleMessage); + this._websocket.removeEventListener('reopen', this.handleReopen); + this._websocket.removeEventListener('down', this.stopHeartbeatAndBackfill); + } + /** + * Reopens the backfill based on + * + * @param isCancelled + * @param subscription + * @internal + */ + resubscribeAndBackfill(isCancelled, subscription) { + return index.__awaiter(this, void 0, void 0, function* () { + const { virtualId, method, params, sentEvents, backfillBuffer, startingBlockNumber } = subscription; + subscription.isBackfilling = true; + backfillBuffer.length = 0; + try { + const physicalId = yield this.send(method, params); + throwIfCancelled(isCancelled); + subscription.physicalId = physicalId; + this.virtualIdsByPhysicalId.set(physicalId, virtualId); + switch (params[0]) { + case 'newHeads': { + const backfillEvents = yield withBackoffRetries(() => withTimeout(this.backfiller.getNewHeadsBackfill(isCancelled, sentEvents, startingBlockNumber), BACKFILL_TIMEOUT), BACKFILL_RETRIES, () => !isCancelled()); + throwIfCancelled(isCancelled); + const events = dedupeNewHeads([...backfillEvents, ...backfillBuffer]); + events.forEach(event => this.emitNewHeadsEvent(virtualId, event)); + break; + } + case 'logs': { + const filter = params[1] || {}; + const backfillEvents = yield withBackoffRetries(() => withTimeout(this.backfiller.getLogsBackfill(isCancelled, filter, sentEvents, startingBlockNumber), BACKFILL_TIMEOUT), BACKFILL_RETRIES, () => !isCancelled()); + throwIfCancelled(isCancelled); + const events = dedupeLogs([...backfillEvents, ...backfillBuffer]); + events.forEach(event => this.emitLogsEvent(virtualId, event)); + break; + } + default: + break; + } + } + finally { + subscription.isBackfilling = false; + backfillBuffer.length = 0; + } + }); + } + /** @internal */ + emitNewHeadsEvent(virtualId, result) { + this.emitAndRememberEvent(virtualId, result, getNewHeadsBlockNumber); + } + /** @internal */ + emitLogsEvent(virtualId, result) { + this.emitAndRememberEvent(virtualId, result, getLogsBlockNumber); + } + /** + * Emits an event to consumers, but also remembers it in its subscriptions's + * `sentEvents` buffer so that we can detect re-orgs if the connection drops + * and needs to be reconnected. + * + * @internal + */ + emitAndRememberEvent(virtualId, result, getBlockNumber) { + this.rememberEvent(virtualId, result, getBlockNumber); + this.emitEvent(virtualId, result); + } + emitEvent(virtualId, result) { + const subscription = this.virtualSubscriptionsById.get(virtualId); + if (!subscription) { + return; + } + this.emitGenericEvent(subscription, result); + } + /** @internal */ + rememberEvent(virtualId, result, getBlockNumber) { + const subscription = this.virtualSubscriptionsById.get(virtualId); + if (!subscription) { + return; + } + // Web3 modifies these event objects once we pass them on (changing hex + // numbers to numbers). We want the original event, so make a defensive + // copy. + addToPastEventsBuffer(subscription.sentEvents, Object.assign({}, result), getBlockNumber); + } + /** @internal */ + emitGenericEvent(subscription, result) { + const emitFunction = this.emitProcessFn(subscription.event); + emitFunction(result); + } + /** + * Starts a heartbeat that pings the websocket server periodically to ensure + * that the connection stays open. + * + * @internal + */ + startHeartbeat() { + if (this.heartbeatIntervalId != null) { + return; + } + this.heartbeatIntervalId = setInterval(() => index.__awaiter(this, void 0, void 0, function* () { + try { + yield withTimeout(this.send('net_version'), HEARTBEAT_WAIT_TIME); + } + catch (_a) { + this._websocket.reconnect(); + } + }), HEARTBEAT_INTERVAL); + } + /** + * This method sends the batch concurrently as individual requests rather than + * as a batch, which was the original implementation. The original batch logic + * is preserved in this implementation in order for faster porting. + * + * @param payload + * @internal + */ + // TODO(cleanup): Refactor and remove usages of `sendBatch()`. + // TODO(errors): Use allSettled() once we have more error handling. + sendBatchConcurrently(payload) { + return index.__awaiter(this, void 0, void 0, function* () { + return Promise.all(payload.map(req => this.send(req.method, req.params))); + }); + } + /** @internal */ + customStartEvent(event) { + if (event.type === index.ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE) { + const { fromAddress, toAddress, hashesOnly } = event; + void this._subscribe(event.tag, [ + index.AlchemySubscription.PENDING_TRANSACTIONS, + { fromAddress, toAddress, hashesOnly } + ], this.emitProcessFn(event), event); + } + else if (event.type === index.ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE) { + const { addresses, includeRemoved, hashesOnly } = event; + void this._subscribe(event.tag, [ + index.AlchemySubscription.MINED_TRANSACTIONS, + { addresses, includeRemoved, hashesOnly } + ], this.emitProcessFn(event), event); + } + else if (event.type === 'block') { + void this._subscribe('block', ['newHeads'], this.emitProcessFn(event), event); + } + else if (event.type === 'filter') { + void this._subscribe(event.tag, ['logs', this._getFilter(event.filter)], this.emitProcessFn(event), event); + } + } + /** @internal */ + emitProcessFn(event) { + switch (event.type) { + case index.ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE: + return result => this.emit({ + method: index.AlchemySubscription.PENDING_TRANSACTIONS, + fromAddress: event.fromAddress, + toAddress: event.toAddress, + hashesOnly: event.hashesOnly + }, result); + case index.ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE: + return result => this.emit({ + method: index.AlchemySubscription.MINED_TRANSACTIONS, + addresses: event.addresses, + includeRemoved: event.includeRemoved, + hashesOnly: event.hashesOnly + }, result); + case 'block': + return result => { + const blockNumber = bignumber.BigNumber.from(result.number).toNumber(); + this._emitted.block = blockNumber; + this.emit('block', blockNumber); + }; + case 'filter': + return result => { + if (result.removed == null) { + result.removed = false; + } + this.emit(event.filter, this.formatter.filterLog(result)); + }; + default: + throw new Error('Invalid event type to `emitProcessFn()`'); + } + } + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.off()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + _off(eventName, listener) { + if (listener == null) { + return this.removeAllListeners(eventName); + } + const stopped = []; + let found = false; + const eventTag = index.getAlchemyEventTag(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; + } + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.removeAllListeners()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + _removeAllListeners(eventName) { + let stopped = []; + if (eventName == null) { + stopped = this._events; + this._events = []; + } + else { + const eventTag = index.getAlchemyEventTag(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; + } + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.listenerCount()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + _listenerCount(eventName) { + if (!eventName) { + return this._events.length; + } + const eventTag = index.getAlchemyEventTag(eventName); + return this._events.filter(event => { + return event.tag === eventTag; + }).length; + } + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.listeners()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + _listeners(eventName) { + if (eventName == null) { + return this._events.map(event => event.listener); + } + const eventTag = index.getAlchemyEventTag(eventName); + return this._events + .filter(event => event.tag === eventTag) + .map(event => event.listener); + } +} +function getWebsocketConstructor() { + return isNodeEnvironment() ? require('websocket').w3cwebsocket : WebSocket; +} +function isNodeEnvironment() { + return (typeof process !== 'undefined' && + process != null && + process.versions != null && + process.versions.node != null); +} +// TODO(cleanup): Use class variable rather than passing `isCancelled` everywhere. +function makeCancelToken() { + let cancelled = false; + return { cancel: () => (cancelled = true), isCancelled: () => cancelled }; +} +// TODO(cleanup): replace with SDK's backoff implementation +const MIN_RETRY_DELAY = 1000; +const RETRY_BACKOFF_FACTOR = 2; +const MAX_RETRY_DELAY = 30000; +function withBackoffRetries(f, retryCount, shouldRetry = () => true) { + return index.__awaiter(this, void 0, void 0, function* () { + let nextWaitTime = 0; + let i = 0; + while (true) { + try { + return yield f(); + } + catch (error) { + i++; + if (i >= retryCount || !shouldRetry(error)) { + throw error; + } + yield delay(nextWaitTime); + if (!shouldRetry(error)) { + throw error; + } + nextWaitTime = + nextWaitTime === 0 + ? MIN_RETRY_DELAY + : Math.min(MAX_RETRY_DELAY, RETRY_BACKOFF_FACTOR * nextWaitTime); + } + } + }); +} +function delay(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); +} +function withTimeout(promise, ms) { + return Promise.race([ + promise, + new Promise((_, reject) => setTimeout(() => reject(new Error('Timeout')), ms)) + ]); +} +function getNewHeadsBlockNumber(event) { + return index.fromHex(event.number); +} +function getLogsBlockNumber(event) { + return index.fromHex(event.blockNumber); +} +function isResponse(message) { + return (Array.isArray(message) || + (message.jsonrpc === '2.0' && message.id !== undefined)); +} +function isSubscriptionEvent(message) { + return !isResponse(message); +} +function addToNewHeadsEventsBuffer(pastEvents, event) { + addToPastEventsBuffer(pastEvents, event, getNewHeadsBlockNumber); +} +function addToLogsEventsBuffer(pastEvents, event) { + addToPastEventsBuffer(pastEvents, event, getLogsBlockNumber); +} +/** + * Adds a new event to an array of events, evicting any events which are so old + * that they will no longer feasibly be part of a reorg. + */ +function addToPastEventsBuffer(pastEvents, event, getBlockNumber) { + const currentBlockNumber = getBlockNumber(event); + // Find first index of an event recent enough to retain, then drop everything + // at a lower index. + const firstGoodIndex = pastEvents.findIndex(e => getBlockNumber(e) > currentBlockNumber - RETAINED_EVENT_BLOCK_COUNT); + if (firstGoodIndex === -1) { + pastEvents.length = 0; + } + else { + pastEvents.splice(0, firstGoodIndex); + } + pastEvents.push(event); +} + +exports.AlchemyWebSocketProvider = AlchemyWebSocketProvider; +//# sourceMappingURL=alchemy-websocket-provider-c17e9225.js.map diff --git a/test/node_modules/alchemy-sdk/dist/cjs/alchemy-websocket-provider-c17e9225.js.map b/test/node_modules/alchemy-sdk/dist/cjs/alchemy-websocket-provider-c17e9225.js.map new file mode 100644 index 0000000..b8ab7d5 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/alchemy-websocket-provider-c17e9225.js.map @@ -0,0 +1 @@ +{"version":3,"file":"alchemy-websocket-provider-c17e9225.js","sources":["../../src/internal/websocket-backfiller.ts","../../src/api/alchemy-websocket-provider.ts"],"sourcesContent":["import { AlchemyWebSocketProvider } from '../api/alchemy-websocket-provider';\nimport { fromHex, toHex } from '../api/util';\n\nexport interface BatchPart {\n method: string;\n params?: any;\n}\n\nexport interface NewHeadsEvent {\n author: string;\n difficulty: string;\n extraData: string;\n gasLimit: string;\n gasUsed: string;\n hash: string;\n logsBloom: string;\n miner: string;\n mixHash: string;\n nonce: string;\n number: string;\n parentHash: string;\n receiptsRoot: string;\n sealFields: string[];\n sha3Uncles: string;\n size: string;\n stateRoot: string;\n timestamp: string;\n transactionsRoot: string;\n}\n\n/** The return type of eth_getBlocksByHash. */\nexport interface BlockHead extends NewHeadsEvent {\n totalDifficulty: string;\n transactions: any[];\n uncles: string[];\n}\n\nexport interface LogsEvent {\n address: string;\n blockHash: string;\n blockNumber: string;\n data: string;\n logIndex: string;\n topics: string[];\n transactionHash: string;\n transactionIndex: string;\n removed?: boolean;\n}\n\nexport interface LogsSubscriptionFilter {\n address?: string | string[];\n topics?: Array;\n}\n\nexport interface GetLogsOptions extends LogsSubscriptionFilter {\n fromBlock?: string;\n toBlock?: string;\n}\n\ninterface CommonAncestor {\n blockNumber: number;\n logIndex: number;\n}\n\n/**\n * The maximum number of blocks to backfill. If more than this many blocks have\n * been missed, then we'll sadly miss data, but we want to make sure we don't\n * end up requesting thousands of blocks if somebody left their laptop closed for a week.\n */\nconst MAX_BACKFILL_BLOCKS = 120;\n\n/**\n * The WebsocketBackfiller fetches events that were sent since a provided block\n * number. This is used in the {@link AlchemyWebSocketProvider} to backfill\n * events that were transmitted while the websocket connection was down.\n *\n * The backfiller backfills two main eth_subscribe events: `logs` and `newHeads`.\n *\n * @internal\n */\nexport class WebsocketBackfiller {\n // TODO: Use HTTP provider to do backfill.\n private maxBackfillBlocks = MAX_BACKFILL_BLOCKS;\n constructor(private readonly provider: AlchemyWebSocketProvider) {}\n\n /**\n * Runs backfill for `newHeads` events.\n *\n * @param isCancelled Whether the backfill request is cancelled.\n * @param previousHeads Previous head requests that were sent.\n * @param fromBlockNumber The block number to start backfilling from.\n * @returns A list of `newHeads` events that were sent since the last backfill.\n */\n async getNewHeadsBackfill(\n isCancelled: () => boolean,\n previousHeads: NewHeadsEvent[],\n fromBlockNumber: number\n ): Promise {\n throwIfCancelled(isCancelled);\n const toBlockNumber = await this.getBlockNumber();\n throwIfCancelled(isCancelled);\n\n // If there are no previous heads to fetch, return new heads since\n // `fromBlockNumber`, or up to maxBackfillBlocks from the current head.\n if (previousHeads.length === 0) {\n return this.getHeadEventsInRange(\n Math.max(fromBlockNumber, toBlockNumber - this.maxBackfillBlocks) + 1,\n toBlockNumber + 1\n );\n }\n\n // If the last emitted event is too far back in the past, there's no need\n // to backfill for reorgs. Just fetch the last `maxBackfillBlocks` worth of\n // new heads.\n const lastSeenBlockNumber = fromHex(\n previousHeads[previousHeads.length - 1].number\n );\n const minBlockNumber = toBlockNumber - this.maxBackfillBlocks + 1;\n if (lastSeenBlockNumber <= minBlockNumber) {\n return this.getHeadEventsInRange(minBlockNumber, toBlockNumber + 1);\n }\n\n // To capture all `newHeads` events, return all head events from the last\n // seen block number to current + any of the previous heads that were re-orged.\n const reorgHeads: NewHeadsEvent[] = await this.getReorgHeads(\n isCancelled,\n previousHeads\n );\n throwIfCancelled(isCancelled);\n const intermediateHeads: NewHeadsEvent[] = await this.getHeadEventsInRange(\n lastSeenBlockNumber + 1,\n toBlockNumber + 1\n );\n throwIfCancelled(isCancelled);\n return [...reorgHeads, ...intermediateHeads];\n }\n\n /**\n * Runs backfill for `logs` events.\n *\n * @param isCancelled Whether the backfill request is cancelled.\n * @param filter The filter object that accompanies a logs subscription.\n * @param previousLogs Previous log requests that were sent.\n * @param fromBlockNumber The block number to start backfilling from.\n */\n async getLogsBackfill(\n isCancelled: () => boolean,\n filter: LogsSubscriptionFilter,\n previousLogs: LogsEvent[],\n fromBlockNumber: number\n ): Promise {\n throwIfCancelled(isCancelled);\n const toBlockNumber = await this.getBlockNumber();\n throwIfCancelled(isCancelled);\n\n // If there are no previous logs to fetch, return new logs since\n // `fromBlockNumber`, or up to `maxBackfillBlocks` from the current head.\n if (previousLogs.length === 0) {\n return this.getLogsInRange(\n filter,\n Math.max(fromBlockNumber, toBlockNumber - this.maxBackfillBlocks) + 1,\n toBlockNumber + 1\n );\n }\n\n // If the last emitted log is too far back in the past, there's no need\n // to backfill for removed logs. Just fetch the last `maxBackfillBlocks`\n // worth of logs.\n const lastSeenBlockNumber = fromHex(\n previousLogs[previousLogs.length - 1].blockNumber\n );\n const minBlockNumber = toBlockNumber - this.maxBackfillBlocks + 1;\n if (lastSeenBlockNumber < minBlockNumber) {\n return this.getLogsInRange(filter, minBlockNumber, toBlockNumber + 1);\n }\n\n // Return all log events that have happened along with log events that have\n // been removed due to a chain reorg.\n const commonAncestor = await this.getCommonAncestor(\n isCancelled,\n previousLogs\n );\n throwIfCancelled(isCancelled);\n\n // All previous logs with a block number greater than the common ancestor\n // were part of a re-org, so mark them as such.\n const removedLogs = previousLogs\n .filter(log => fromHex(log.blockNumber) > commonAncestor.blockNumber)\n .map(log => ({ ...log, removed: true }));\n\n // If no common ancestor was found, start backfill from the oldest log's\n // block number.\n const fromBlockInclusive =\n commonAncestor.blockNumber === Number.NEGATIVE_INFINITY\n ? fromHex(previousLogs[0].blockNumber)\n : commonAncestor.blockNumber;\n let addedLogs = await this.getLogsInRange(\n filter,\n fromBlockInclusive,\n toBlockNumber + 1\n );\n\n // De-dupe any logs that were already emitted.\n addedLogs = addedLogs.filter(\n log =>\n log &&\n (fromHex(log.blockNumber) > commonAncestor.blockNumber ||\n fromHex(log.logIndex) > commonAncestor.logIndex)\n );\n\n throwIfCancelled(isCancelled);\n return [...removedLogs, ...addedLogs];\n }\n\n /**\n * Sets a new max backfill blocks. VISIBLE ONLY FOR TESTING.\n *\n * @internal\n */\n setMaxBackfillBlock(newMax: number): void {\n this.maxBackfillBlocks = newMax;\n }\n\n /**\n * Gets the current block number as a number.\n *\n * @private\n */\n private async getBlockNumber(): Promise {\n const blockNumberHex: string = await this.provider.send('eth_blockNumber');\n return fromHex(blockNumberHex);\n }\n\n /**\n * Gets all `newHead` events in the provided range. Note that the returned\n * heads do not include re-orged heads. Use {@link getReorgHeads} to find heads\n * that were part of a re-org.\n *\n * @private\n */\n private async getHeadEventsInRange(\n fromBlockInclusive: number,\n toBlockExclusive: number\n ): Promise {\n if (fromBlockInclusive >= toBlockExclusive) {\n return [];\n }\n const batchParts: BatchPart[] = [];\n for (let i = fromBlockInclusive; i < toBlockExclusive; i++) {\n batchParts.push({\n method: 'eth_getBlockByNumber',\n params: [toHex(i), false]\n });\n }\n\n // TODO: handle errors\n const blockHeads = await this.provider.sendBatch(batchParts);\n return blockHeads.map(toNewHeadsEvent);\n }\n\n /**\n * Returns all heads that were part of a reorg event.\n *\n * @private\n */\n private async getReorgHeads(\n isCancelled: () => boolean,\n previousHeads: NewHeadsEvent[]\n ): Promise {\n const result: NewHeadsEvent[] = [];\n // Iterate from the most recent head backwards in order to find the first\n // block that was part of a re-org.\n for (let i = previousHeads.length - 1; i >= 0; i--) {\n const oldEvent = previousHeads[i];\n const blockHead = await this.getBlockByNumber(fromHex(oldEvent.number));\n throwIfCancelled(isCancelled);\n\n // If the hashes match, then current head in the iteration was not re-orged.\n if (oldEvent.hash === blockHead.hash) {\n break;\n }\n\n result.push(toNewHeadsEvent(blockHead));\n }\n return result.reverse();\n }\n\n /**\n * Simple wrapper around `eth_getBlockByNumber` that returns the complete\n * block information for the provided block number.\n *\n * @private\n */\n private async getBlockByNumber(blockNumber: number): Promise {\n return this.provider.send('eth_getBlockByNumber', [\n toHex(blockNumber),\n false\n ]);\n }\n\n /**\n * Given a list of previous log events, finds the common block number from the\n * logs that matches the block head.\n *\n * This can be used to identify which logs are part of a re-org.\n *\n * Returns 1 less than the oldest log's block number if no common ancestor was found.\n *\n * @private\n */\n private async getCommonAncestor(\n isCancelled: () => boolean,\n previousLogs: LogsEvent[]\n ): Promise {\n // Iterate from the most recent head backwards in order to find the first\n // block that was part of a re-org.\n let blockHead = await this.getBlockByNumber(\n fromHex(previousLogs[previousLogs.length - 1].blockNumber)\n );\n throwIfCancelled(isCancelled);\n for (let i = previousLogs.length - 1; i >= 0; i--) {\n const oldLog = previousLogs[i];\n\n // Ensure that updated blocks are fetched every time the log's block number\n // changes.\n if (oldLog.blockNumber !== blockHead.number) {\n blockHead = await this.getBlockByNumber(fromHex(oldLog.blockNumber));\n }\n\n // Since logs are ordered in ascending order, the first log that matches\n // the hash should be the largest logIndex.\n if (oldLog.blockHash === blockHead.hash) {\n return {\n blockNumber: fromHex(oldLog.blockNumber),\n logIndex: fromHex(oldLog.logIndex)\n };\n }\n }\n return {\n blockNumber: Number.NEGATIVE_INFINITY,\n logIndex: Number.NEGATIVE_INFINITY\n };\n }\n\n /**\n * Gets all `logs` events in the provided range. Note that the returned logs\n * do not include removed logs.\n *\n * @private\n */ private async getLogsInRange(\n filter: LogsSubscriptionFilter,\n fromBlockInclusive: number,\n toBlockExclusive: number\n ): Promise {\n if (fromBlockInclusive >= toBlockExclusive) {\n return [];\n }\n const rangeFilter: GetLogsOptions = {\n ...filter,\n fromBlock: toHex(fromBlockInclusive),\n toBlock: toHex(toBlockExclusive - 1)\n };\n return this.provider.send('eth_getLogs', [rangeFilter]);\n }\n}\n\nfunction toNewHeadsEvent(head: BlockHead): NewHeadsEvent {\n const result: NewHeadsEvent & Partial = { ...head };\n delete result.totalDifficulty;\n delete result.transactions;\n delete result.uncles;\n return result;\n}\n\nexport function dedupeNewHeads(events: NewHeadsEvent[]): NewHeadsEvent[] {\n return dedupe(events, event => event.hash);\n}\n\nexport function dedupeLogs(events: LogsEvent[]): LogsEvent[] {\n return dedupe(events, event => `${event.blockHash}/${event.logIndex}`);\n}\n\nfunction dedupe(items: T[], getKey: (item: T) => any): T[] {\n const keysSeen: Set = new Set();\n const result: T[] = [];\n items.forEach(item => {\n const key = getKey(item);\n if (!keysSeen.has(key)) {\n keysSeen.add(key);\n result.push(item);\n }\n });\n return result;\n}\n\nconst CANCELLED = new Error('Cancelled');\nexport function throwIfCancelled(isCancelled: () => boolean): void {\n if (isCancelled()) {\n throw CANCELLED;\n }\n}\n","import SturdyWebSocket from 'sturdy-websocket';\n\nimport { Listener } from '@ethersproject/abstract-provider';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport {\n Networkish,\n getNetwork as getNetworkFromEthers\n} from '@ethersproject/networks';\nimport { Network as NetworkFromEthers } from '@ethersproject/networks/lib/types';\nimport {\n CommunityResourcable,\n WebSocketProvider\n} from '@ethersproject/providers';\n\nimport {\n EthersEvent,\n getAlchemyEventTag,\n isAlchemyEvent,\n verifyAlchemyEventName\n} from '../internal/ethers-event';\nimport {\n ALCHEMY_EVENT_TYPES,\n ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE,\n ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE,\n JsonRpcRequest,\n JsonRpcResponse,\n SingleOrBatchResponse,\n SubscriptionEvent,\n WebSocketMessage\n} from '../internal/internal-types';\nimport {\n BatchPart,\n LogsEvent,\n LogsSubscriptionFilter,\n NewHeadsEvent,\n WebsocketBackfiller,\n dedupeLogs,\n dedupeNewHeads,\n throwIfCancelled\n} from '../internal/websocket-backfiller';\nimport { AlchemyEventType, AlchemySubscription } from '../types/types';\nimport {\n CustomNetworks,\n DEFAULT_ALCHEMY_API_KEY,\n EthersNetwork,\n noop\n} from '../util/const';\nimport { VERSION } from '../version';\nimport { AlchemyConfig } from './alchemy-config';\nimport { AlchemyProvider } from './alchemy-provider';\nimport { fromHex } from './util';\n\nconst HEARTBEAT_INTERVAL = 30000;\nconst HEARTBEAT_WAIT_TIME = 10000;\nconst BACKFILL_TIMEOUT = 60000;\nconst BACKFILL_RETRIES = 5;\n/**\n * Subscriptions have a memory of recent events they have sent so that in the\n * event that they disconnect and need to backfill, they can detect re-orgs.\n * Keep a buffer that goes back at least these many blocks, the maximum amount\n * at which we might conceivably see a re-org.\n *\n * Note that while our buffer goes back this many blocks, it may contain more\n * than this many elements, since in the case of logs subscriptions more than\n * one event may be emitted for a block.\n */\nconst RETAINED_EVENT_BLOCK_COUNT = 10;\n\n/**\n * SDK's custom implementation fo the ethers.js's 'AlchemyWebSocketProvider'.\n *\n * Do not call this constructor directly. Instead, instantiate an instance of\n * {@link Alchemy} and call {@link Alchemy.config.getWebSocketProvider()}.\n *\n * @public\n */\nexport class AlchemyWebSocketProvider\n extends WebSocketProvider\n implements CommunityResourcable\n{\n _events: Array = [];\n readonly apiKey: string;\n\n // In the case of a WebSocket reconnection, all subscriptions are lost and we\n // create new ones to replace them, but we want to create the illusion that\n // the original subscriptions persist. Thus, maintain a mapping from the\n // \"virtual\" subscription ids which are visible to the consumer to the\n // \"physical\" subscription ids of the actual connections. This terminology is\n // borrowed from virtual and physical memory, which has a similar mapping.\n /** @internal */\n private readonly virtualSubscriptionsById: Map =\n new Map();\n /** @internal */\n private readonly virtualIdsByPhysicalId: Map = new Map();\n /** @internal */\n private readonly backfiller: WebsocketBackfiller;\n /** @internal */\n private heartbeatIntervalId?: NodeJS.Timeout;\n /** @internal */\n private cancelBackfill: () => void;\n\n /** @internal */\n constructor(config: AlchemyConfig, wsConstructor?: any) {\n // Normalize the API Key to a string.\n const apiKey = AlchemyProvider.getApiKey(config.apiKey);\n\n // Generate our own connection info with the correct endpoint URLs.\n const alchemyNetwork = AlchemyProvider.getAlchemyNetwork(config.network);\n const connection = AlchemyProvider.getAlchemyConnectionInfo(\n alchemyNetwork,\n apiKey,\n 'wss'\n );\n\n const protocol = `alchemy-sdk-${VERSION}`;\n\n // Use the provided config URL override if it exists, otherwise use the created one.\n const ws = new SturdyWebSocket(config.url ?? connection.url, protocol, {\n wsConstructor: wsConstructor ?? getWebsocketConstructor()\n });\n\n // Normalize the Alchemy named network input to the network names used by\n // ethers. This allows the parent super constructor in JsonRpcProvider to\n // correctly set the network.\n const ethersNetwork = EthersNetwork[alchemyNetwork];\n super(ws as any, ethersNetwork);\n this.apiKey = apiKey;\n\n // Start heartbeat and backfiller for the websocket connection.\n this.backfiller = new WebsocketBackfiller(this);\n this.addSocketListeners();\n this.startHeartbeat();\n this.cancelBackfill = noop;\n }\n\n /**\n * Overrides the `BaseProvider.getNetwork` method as implemented by ethers.js.\n *\n * This override allows the SDK to set the provider's network to values not\n * yet supported by ethers.js.\n *\n * @internal\n * @override\n */\n static getNetwork(network: Networkish): NetworkFromEthers {\n if (typeof network === 'string' && network in CustomNetworks) {\n return CustomNetworks[network];\n }\n\n // Call the standard ethers.js getNetwork method for other networks.\n return getNetworkFromEthers(network);\n }\n\n /**\n * Overridden implementation of ethers that includes Alchemy based subscriptions.\n *\n * @param eventName Event to subscribe to\n * @param listener The listener function to call when the event is triggered.\n * @override\n * @public\n */\n // TODO: Override `Listener` type to get type autocompletions.\n on(eventName: AlchemyEventType, listener: Listener): this {\n return this._addEventListener(eventName, listener, false);\n }\n\n /**\n * Overridden implementation of ethers that includes Alchemy based\n * subscriptions. Adds a listener to the triggered for only the next\n * {@link eventName} event, after which it will be removed.\n *\n * @param eventName Event to subscribe to\n * @param listener The listener function to call when the event is triggered.\n * @override\n * @public\n */\n // TODO: Override `Listener` type to get type autocompletions.\n once(eventName: AlchemyEventType, listener: Listener): this {\n return this._addEventListener(eventName, listener, true);\n }\n\n /**\n * Removes the provided {@link listener} for the {@link eventName} event. If no\n * listener is provided, all listeners for the event will be removed.\n *\n * @param eventName Event to unlisten to.\n * @param listener The listener function to remove.\n * @override\n * @public\n */\n off(eventName: AlchemyEventType, listener?: Listener): this {\n if (isAlchemyEvent(eventName)) {\n return this._off(eventName, listener);\n } else {\n return super.off(eventName, listener);\n }\n }\n\n /**\n * Remove all listeners for the provided {@link eventName} event. If no event\n * is provided, all events and their listeners are removed.\n *\n * @param eventName The event to remove all listeners for.\n * @override\n * @public\n */\n removeAllListeners(eventName?: AlchemyEventType): this {\n if (eventName !== undefined && isAlchemyEvent(eventName)) {\n return this._removeAllListeners(eventName);\n } else {\n return super.removeAllListeners(eventName);\n }\n }\n\n /**\n * Returns the number of listeners for the provided {@link eventName} event. If\n * no event is provided, the total number of listeners for all events is returned.\n *\n * @param eventName The event to get the number of listeners for.\n * @public\n * @override\n */\n listenerCount(eventName?: AlchemyEventType): number {\n if (eventName !== undefined && isAlchemyEvent(eventName)) {\n return this._listenerCount(eventName);\n } else {\n return super.listenerCount(eventName);\n }\n }\n\n /**\n * Returns an array of listeners for the provided {@link eventName} event. If\n * no event is provided, all listeners will be included.\n *\n * @param eventName The event to get the listeners for.\n * @public\n * @override\n */\n listeners(eventName?: AlchemyEventType): Array {\n if (eventName !== undefined && isAlchemyEvent(eventName)) {\n return this._listeners(eventName);\n } else {\n return super.listeners(eventName);\n }\n }\n\n /**\n * Overrides the method in `BaseProvider` in order to properly format the\n * Alchemy subscription events.\n *\n * @internal\n * @override\n */\n _addEventListener(\n eventName: AlchemyEventType,\n listener: Listener,\n once: boolean\n ): this {\n if (isAlchemyEvent(eventName)) {\n verifyAlchemyEventName(eventName);\n const event = new EthersEvent(\n getAlchemyEventTag(eventName),\n listener,\n once\n );\n this._events.push(event);\n this._startEvent(event);\n return this;\n } else {\n return super._addEventListener(eventName, listener, once);\n }\n }\n\n /**\n * Overrides the `_startEvent()` method in ethers.js's\n * {@link WebSocketProvider} to include additional alchemy methods.\n *\n * @param event\n * @override\n * @internal\n */\n _startEvent(event: EthersEvent): void {\n // Check if the event type is a custom Alchemy subscription.\n const customLogicTypes = [...ALCHEMY_EVENT_TYPES, 'block', 'filter'];\n if (customLogicTypes.includes(event.type)) {\n this.customStartEvent(event);\n } else {\n super._startEvent(event);\n }\n }\n\n /**\n * Overridden from ethers.js's {@link WebSocketProvider}\n *\n * Modified in order to add mappings for backfilling.\n *\n * @internal\n * @override\n */\n async _subscribe(\n tag: string,\n param: Array,\n processFunc: (result: any) => void,\n event?: EthersEvent\n ): Promise {\n let subIdPromise = this._subIds[tag];\n\n // BEGIN MODIFIED CODE\n const startingBlockNumber = await this.getBlockNumber();\n // END MODIFIED CODE\n\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\n // BEGIN MODIFIED CODE\n const resolvedParams = await Promise.all(param);\n this.virtualSubscriptionsById.set(subId, {\n event: event!,\n method: 'eth_subscribe',\n params: resolvedParams,\n startingBlockNumber,\n virtualId: subId,\n physicalId: subId,\n sentEvents: [],\n isBackfilling: false,\n backfillBuffer: []\n });\n this.virtualIdsByPhysicalId.set(subId, subId);\n\n // END MODIFIED CODE\n\n this._subs[subId] = { tag, processFunc };\n }\n\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `BaseProvider`.\n *\n * This method is copied over directly in order to implement Alchemy's unique\n * subscription types. The only difference is that this method calls\n * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in\n * order to parse the Alchemy subscription event.\n *\n * @internal\n * @override\n */\n emit(eventName: AlchemyEventType, ...args: Array): boolean {\n if (isAlchemyEvent(eventName)) {\n let result = false;\n\n const stopped: Array = [];\n\n // This line is the only modified line from the original method.\n const eventTag = getAlchemyEventTag(eventName);\n\n this._events = this._events.filter(event => {\n if (event.tag !== eventTag) {\n return true;\n }\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 => {\n this._stopEvent(event);\n });\n\n return result;\n } else {\n return super.emit(eventName, ...args);\n }\n }\n\n /** @internal */\n async sendBatch(parts: BatchPart[]): Promise {\n let nextId = 0;\n const payload: JsonRpcRequest[] = parts.map(({ method, params }) => {\n return {\n method,\n params,\n jsonrpc: '2.0',\n id: `alchemy-sdk:${nextId++}`\n };\n });\n\n return this.sendBatchConcurrently(payload);\n }\n\n /** @override */\n destroy(): Promise {\n this.removeSocketListeners();\n this.stopHeartbeatAndBackfill();\n return super.destroy();\n }\n\n /**\n * Overrides the ether's `isCommunityResource()` method. Returns true if the\n * current api key is the default key.\n *\n * @override\n */\n isCommunityResource(): boolean {\n return this.apiKey === DEFAULT_ALCHEMY_API_KEY;\n }\n\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `WebSocketProvider._stopEvent()`.\n *\n * This method is copied over directly in order to support Alchemy's\n * subscription type by allowing the provider to properly stop Alchemy's\n * subscription events.\n *\n * @internal\n */\n _stopEvent(event: EthersEvent): void {\n let tag = event.tag;\n\n // START MODIFIED CODE\n if (ALCHEMY_EVENT_TYPES.includes(event.type)) {\n // There are remaining pending transaction listeners.\n if (\n this._events.filter(e => ALCHEMY_EVENT_TYPES.includes(e.type)).length\n ) {\n return;\n }\n // END MODIFIED CODE\n } else 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) {\n return;\n }\n\n delete this._subIds[tag];\n void subId.then(subId => {\n if (!this._subs[subId]) {\n return;\n }\n delete this._subs[subId];\n void this.send('eth_unsubscribe', [subId]);\n });\n }\n\n /** @internal */\n private addSocketListeners(): void {\n this._websocket.addEventListener('message', this.handleMessage);\n this._websocket.addEventListener('reopen', this.handleReopen);\n this._websocket.addEventListener('down', this.stopHeartbeatAndBackfill);\n }\n\n /** @internal */\n private removeSocketListeners(): void {\n this._websocket.removeEventListener('message', this.handleMessage);\n this._websocket.removeEventListener('reopen', this.handleReopen);\n this._websocket.removeEventListener('down', this.stopHeartbeatAndBackfill);\n }\n\n /**\n * The underlying ethers {@link WebSocketProvider} already handles and emits\n * messages. To allow backfilling, track all messages that are emitted.\n *\n * This is a field arrow function in order to preserve `this` context when\n * passing the method as an event listener.\n *\n * @internal\n */\n private handleMessage = (event: MessageEvent): void => {\n const message: WebSocketMessage = JSON.parse(event.data);\n if (!isSubscriptionEvent(message)) {\n return;\n }\n const physicalId = message.params.subscription;\n const virtualId = this.virtualIdsByPhysicalId.get(physicalId);\n if (!virtualId) {\n return;\n }\n const subscription = this.virtualSubscriptionsById.get(virtualId)!;\n if (subscription.method !== 'eth_subscribe') {\n return;\n }\n\n switch (subscription.params[0]) {\n case 'newHeads': {\n const newHeadsSubscription = subscription as NewHeadsSubscription;\n const newHeadsMessage = message as SubscriptionEvent;\n const { isBackfilling, backfillBuffer } = newHeadsSubscription;\n const { result } = newHeadsMessage.params;\n if (isBackfilling) {\n addToNewHeadsEventsBuffer(backfillBuffer, result);\n } else if (physicalId !== virtualId) {\n // In the case of a re-opened subscription, ethers will not emit the\n // event, so the SDK has to.\n this.emitAndRememberEvent(virtualId, result, getNewHeadsBlockNumber);\n } else {\n // Ethers subscription mapping will emit the event, just store it.\n this.rememberEvent(virtualId, result, getNewHeadsBlockNumber);\n }\n break;\n }\n case 'logs': {\n const logsSubscription = subscription as LogsSubscription;\n const logsMessage = message as SubscriptionEvent;\n const { isBackfilling, backfillBuffer } = logsSubscription;\n const { result } = logsMessage.params;\n if (isBackfilling) {\n addToLogsEventsBuffer(backfillBuffer, result);\n } else if (virtualId !== physicalId) {\n this.emitAndRememberEvent(virtualId, result, getLogsBlockNumber);\n } else {\n this.rememberEvent(virtualId, result, getLogsBlockNumber);\n }\n break;\n }\n default:\n if (physicalId !== virtualId) {\n // In the case of a re-opened subscription, ethers will not emit the\n // event, so the SDK has to.\n const { result } = (message as SubscriptionEvent).params;\n this.emitEvent(virtualId, result);\n }\n }\n };\n\n /**\n * When the websocket connection reopens:\n *\n * 1. Resubscribe to all existing subscriptions and start backfilling\n * 2. Restart heart beat.\n *\n * This is a field arrow function in order to preserve `this` context when\n * passing the method as an event listener.\n *\n * @internal\n */\n private handleReopen = () => {\n this.virtualIdsByPhysicalId.clear();\n const { cancel, isCancelled } = makeCancelToken();\n this.cancelBackfill = cancel;\n for (const subscription of this.virtualSubscriptionsById.values()) {\n void (async () => {\n try {\n await this.resubscribeAndBackfill(isCancelled, subscription);\n } catch (error) {\n if (!isCancelled()) {\n console.error(\n `Error while backfilling \"${subscription.params[0]}\" subscription. Some events may be missing.`,\n error\n );\n }\n }\n })();\n }\n this.startHeartbeat();\n };\n\n /**\n * Reopens the backfill based on\n *\n * @param isCancelled\n * @param subscription\n * @internal\n */\n private async resubscribeAndBackfill(\n isCancelled: () => boolean,\n subscription: VirtualSubscription\n ): Promise {\n const {\n virtualId,\n method,\n params,\n sentEvents,\n backfillBuffer,\n startingBlockNumber\n } = subscription;\n subscription.isBackfilling = true;\n backfillBuffer.length = 0;\n try {\n const physicalId = await this.send(method, params);\n throwIfCancelled(isCancelled);\n subscription.physicalId = physicalId;\n this.virtualIdsByPhysicalId.set(physicalId, virtualId);\n switch (params[0]) {\n case 'newHeads': {\n const backfillEvents = await withBackoffRetries(\n () =>\n withTimeout(\n this.backfiller.getNewHeadsBackfill(\n isCancelled,\n sentEvents,\n startingBlockNumber\n ),\n BACKFILL_TIMEOUT\n ),\n BACKFILL_RETRIES,\n () => !isCancelled()\n );\n throwIfCancelled(isCancelled);\n const events = dedupeNewHeads([...backfillEvents, ...backfillBuffer]);\n events.forEach(event => this.emitNewHeadsEvent(virtualId, event));\n break;\n }\n case 'logs': {\n const filter: LogsSubscriptionFilter = params[1] || {};\n const backfillEvents = await withBackoffRetries(\n () =>\n withTimeout(\n this.backfiller.getLogsBackfill(\n isCancelled,\n filter,\n sentEvents,\n startingBlockNumber\n ),\n BACKFILL_TIMEOUT\n ),\n BACKFILL_RETRIES,\n () => !isCancelled()\n );\n throwIfCancelled(isCancelled);\n const events = dedupeLogs([...backfillEvents, ...backfillBuffer]);\n events.forEach(event => this.emitLogsEvent(virtualId, event));\n break;\n }\n default:\n break;\n }\n } finally {\n subscription.isBackfilling = false;\n backfillBuffer.length = 0;\n }\n }\n\n /**\n * Cancels the heartbeat and any pending backfills being performed. This is\n * called when the websocket connection goes down or is disconnected.\n *\n * This is a field arrow function in order to preserve `this` context when\n * passing the method as an event listener.\n *\n * @internal\n */\n private stopHeartbeatAndBackfill = () => {\n if (this.heartbeatIntervalId != null) {\n clearInterval(this.heartbeatIntervalId);\n this.heartbeatIntervalId = undefined;\n }\n this.cancelBackfill();\n };\n\n /** @internal */\n private emitNewHeadsEvent(virtualId: string, result: NewHeadsEvent): void {\n this.emitAndRememberEvent(virtualId, result, getNewHeadsBlockNumber);\n }\n\n /** @internal */\n private emitLogsEvent(virtualId: string, result: LogsEvent): void {\n this.emitAndRememberEvent(virtualId, result, getLogsBlockNumber);\n }\n\n /**\n * Emits an event to consumers, but also remembers it in its subscriptions's\n * `sentEvents` buffer so that we can detect re-orgs if the connection drops\n * and needs to be reconnected.\n *\n * @internal\n */\n private emitAndRememberEvent(\n virtualId: string,\n result: T,\n getBlockNumber: (result: T) => number\n ): void {\n this.rememberEvent(virtualId, result, getBlockNumber);\n this.emitEvent(virtualId, result);\n }\n\n private emitEvent(virtualId: string, result: T): void {\n const subscription = this.virtualSubscriptionsById.get(virtualId);\n if (!subscription) {\n return;\n }\n this.emitGenericEvent(subscription, result);\n }\n\n /** @internal */\n private rememberEvent(\n virtualId: string,\n result: T,\n getBlockNumber: (result: T) => number\n ): void {\n const subscription = this.virtualSubscriptionsById.get(virtualId);\n if (!subscription) {\n return;\n }\n // Web3 modifies these event objects once we pass them on (changing hex\n // numbers to numbers). We want the original event, so make a defensive\n // copy.\n addToPastEventsBuffer(\n subscription.sentEvents,\n { ...result },\n getBlockNumber\n );\n }\n\n /** @internal */\n private emitGenericEvent(\n subscription: VirtualSubscription,\n result: any\n ): void {\n const emitFunction = this.emitProcessFn(subscription.event);\n emitFunction(result);\n }\n\n /**\n * Starts a heartbeat that pings the websocket server periodically to ensure\n * that the connection stays open.\n *\n * @internal\n */\n private startHeartbeat(): void {\n if (this.heartbeatIntervalId != null) {\n return;\n }\n this.heartbeatIntervalId = setInterval(async () => {\n try {\n await withTimeout(this.send('net_version'), HEARTBEAT_WAIT_TIME);\n } catch {\n this._websocket.reconnect();\n }\n }, HEARTBEAT_INTERVAL);\n }\n\n /**\n * This method sends the batch concurrently as individual requests rather than\n * as a batch, which was the original implementation. The original batch logic\n * is preserved in this implementation in order for faster porting.\n *\n * @param payload\n * @internal\n */\n // TODO(cleanup): Refactor and remove usages of `sendBatch()`.\n // TODO(errors): Use allSettled() once we have more error handling.\n private async sendBatchConcurrently(\n payload: JsonRpcRequest[]\n ): Promise {\n return Promise.all(payload.map(req => this.send(req.method, req.params)));\n }\n\n /** @internal */\n private customStartEvent(event: EthersEvent): void {\n if (event.type === ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE) {\n const { fromAddress, toAddress, hashesOnly } = event;\n void this._subscribe(\n event.tag,\n [\n AlchemySubscription.PENDING_TRANSACTIONS,\n { fromAddress, toAddress, hashesOnly }\n ],\n this.emitProcessFn(event),\n event\n );\n } else if (event.type === ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE) {\n const { addresses, includeRemoved, hashesOnly } = event;\n void this._subscribe(\n event.tag,\n [\n AlchemySubscription.MINED_TRANSACTIONS,\n { addresses, includeRemoved, hashesOnly }\n ],\n this.emitProcessFn(event),\n event\n );\n } else if (event.type === 'block') {\n void this._subscribe(\n 'block',\n ['newHeads'],\n this.emitProcessFn(event),\n event\n );\n } else if (event.type === 'filter') {\n void this._subscribe(\n event.tag,\n ['logs', this._getFilter(event.filter)],\n this.emitProcessFn(event),\n event\n );\n }\n }\n\n /** @internal */\n private emitProcessFn(event: EthersEvent): (result: any) => void {\n switch (event.type) {\n case ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE:\n return result =>\n this.emit(\n {\n method: AlchemySubscription.PENDING_TRANSACTIONS,\n fromAddress: event.fromAddress,\n toAddress: event.toAddress,\n hashesOnly: event.hashesOnly\n },\n result\n );\n case ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE:\n return result =>\n this.emit(\n {\n method: AlchemySubscription.MINED_TRANSACTIONS,\n addresses: event.addresses,\n includeRemoved: event.includeRemoved,\n hashesOnly: event.hashesOnly\n },\n result\n );\n case 'block':\n return result => {\n const blockNumber = BigNumber.from(result.number).toNumber();\n this._emitted.block = blockNumber;\n this.emit('block', blockNumber);\n };\n case 'filter':\n return result => {\n if (result.removed == null) {\n result.removed = false;\n }\n this.emit(event.filter, this.formatter.filterLog(result));\n };\n default:\n throw new Error('Invalid event type to `emitProcessFn()`');\n }\n }\n\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `BaseProvider.off()`.\n *\n * This method is copied over directly in order to implement Alchemy's unique\n * subscription types. The only difference is that this method calls\n * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in\n * order to parse the Alchemy subscription event.\n *\n * @private\n */\n private _off(eventName: AlchemyEventType, listener?: Listener): this {\n if (listener == null) {\n return this.removeAllListeners(eventName);\n }\n\n const stopped: Array = [];\n\n let found = false;\n const eventTag = getAlchemyEventTag(eventName);\n this._events = this._events.filter(event => {\n if (event.tag !== eventTag || event.listener != listener) {\n return true;\n }\n if (found) {\n return true;\n }\n found = true;\n stopped.push(event);\n return false;\n });\n\n stopped.forEach(event => {\n this._stopEvent(event);\n });\n\n return this;\n }\n\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `BaseProvider.removeAllListeners()`.\n *\n * This method is copied over directly in order to implement Alchemy's unique\n * subscription types. The only difference is that this method calls\n * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in\n * order to parse the Alchemy subscription event.\n *\n * @private\n */\n private _removeAllListeners(eventName: AlchemyEventType): this {\n let stopped: Array = [];\n if (eventName == null) {\n stopped = this._events;\n\n this._events = [];\n } else {\n const eventTag = getAlchemyEventTag(eventName);\n this._events = this._events.filter(event => {\n if (event.tag !== eventTag) {\n return true;\n }\n stopped.push(event);\n return false;\n });\n }\n\n stopped.forEach(event => {\n this._stopEvent(event);\n });\n\n return this;\n }\n\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `BaseProvider.listenerCount()`.\n *\n * This method is copied over directly in order to implement Alchemy's unique\n * subscription types. The only difference is that this method calls\n * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in\n * order to parse the Alchemy subscription event.\n *\n * @private\n */\n private _listenerCount(eventName?: AlchemyEventType): number {\n if (!eventName) {\n return this._events.length;\n }\n\n const eventTag = getAlchemyEventTag(eventName);\n return this._events.filter(event => {\n return event.tag === eventTag;\n }).length;\n }\n\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `BaseProvider.listeners()`.\n *\n * This method is copied over directly in order to implement Alchemy's unique\n * subscription types. The only difference is that this method calls\n * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in\n * order to parse the Alchemy subscription event.\n *\n * @private\n */\n private _listeners(eventName?: AlchemyEventType): Array {\n if (eventName == null) {\n return this._events.map(event => event.listener);\n }\n\n const eventTag = getAlchemyEventTag(eventName);\n return this._events\n .filter(event => event.tag === eventTag)\n .map(event => event.listener);\n }\n}\n\nfunction getWebsocketConstructor(): any {\n return isNodeEnvironment() ? require('websocket').w3cwebsocket : WebSocket;\n}\n\nfunction isNodeEnvironment(): boolean {\n return (\n typeof process !== 'undefined' &&\n process != null &&\n process.versions != null &&\n process.versions.node != null\n );\n}\n\n/** @internal */\ninterface CancelToken {\n cancel(): void;\n isCancelled(): boolean;\n}\n\ninterface VirtualSubscription {\n event: EthersEvent;\n virtualId: string;\n physicalId: string;\n method: string;\n params: any[];\n isBackfilling: boolean;\n startingBlockNumber: number;\n sentEvents: any[];\n backfillBuffer: any[];\n}\n\ninterface NewHeadsSubscription extends VirtualSubscription {\n method: 'eth_subscribe';\n params: ['newHeads'];\n isBackfilling: boolean;\n sentEvents: NewHeadsEvent[];\n backfillBuffer: NewHeadsEvent[];\n}\n\ninterface LogsSubscription extends VirtualSubscription {\n method: 'eth_subscribe';\n params: ['logs', LogsSubscriptionFilter?];\n isBackfilling: boolean;\n sentEvents: LogsEvent[];\n backfillBuffer: LogsEvent[];\n}\n\n// TODO(cleanup): Use class variable rather than passing `isCancelled` everywhere.\nfunction makeCancelToken(): CancelToken {\n let cancelled = false;\n return { cancel: () => (cancelled = true), isCancelled: () => cancelled };\n}\n\n// TODO(cleanup): replace with SDK's backoff implementation\nconst MIN_RETRY_DELAY = 1000;\nconst RETRY_BACKOFF_FACTOR = 2;\nconst MAX_RETRY_DELAY = 30000;\n\nasync function withBackoffRetries(\n f: () => Promise,\n retryCount: number,\n shouldRetry: (error: unknown) => boolean = () => true\n): Promise {\n let nextWaitTime = 0;\n let i = 0;\n while (true) {\n try {\n return await f();\n } catch (error) {\n i++;\n if (i >= retryCount || !shouldRetry(error)) {\n throw error;\n }\n await delay(nextWaitTime);\n if (!shouldRetry(error)) {\n throw error;\n }\n nextWaitTime =\n nextWaitTime === 0\n ? MIN_RETRY_DELAY\n : Math.min(MAX_RETRY_DELAY, RETRY_BACKOFF_FACTOR * nextWaitTime);\n }\n }\n}\n\nfunction delay(ms: number): Promise {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n\nfunction withTimeout(promise: Promise, ms: number): Promise {\n return Promise.race([\n promise,\n new Promise((_, reject) =>\n setTimeout(() => reject(new Error('Timeout')), ms)\n )\n ]);\n}\n\nfunction getNewHeadsBlockNumber(event: NewHeadsEvent): number {\n return fromHex(event.number);\n}\n\nfunction getLogsBlockNumber(event: LogsEvent): number {\n return fromHex(event.blockNumber);\n}\n\nfunction isResponse(\n message: WebSocketMessage\n): message is SingleOrBatchResponse {\n return (\n Array.isArray(message) ||\n (message.jsonrpc === '2.0' && (message as JsonRpcResponse).id !== undefined)\n );\n}\n\nfunction isSubscriptionEvent(\n message: WebSocketMessage\n): message is SubscriptionEvent {\n return !isResponse(message);\n}\n\nfunction addToNewHeadsEventsBuffer(\n pastEvents: NewHeadsEvent[],\n event: NewHeadsEvent\n): void {\n addToPastEventsBuffer(pastEvents, event, getNewHeadsBlockNumber);\n}\n\nfunction addToLogsEventsBuffer(\n pastEvents: LogsEvent[],\n event: LogsEvent\n): void {\n addToPastEventsBuffer(pastEvents, event, getLogsBlockNumber);\n}\n\n/**\n * Adds a new event to an array of events, evicting any events which are so old\n * that they will no longer feasibly be part of a reorg.\n */\nfunction addToPastEventsBuffer(\n pastEvents: T[],\n event: T,\n getBlockNumber: (event: T) => number\n): void {\n const currentBlockNumber = getBlockNumber(event);\n // Find first index of an event recent enough to retain, then drop everything\n // at a lower index.\n const firstGoodIndex = pastEvents.findIndex(\n e => getBlockNumber(e) > currentBlockNumber - RETAINED_EVENT_BLOCK_COUNT\n );\n if (firstGoodIndex === -1) {\n pastEvents.length = 0;\n } else {\n pastEvents.splice(0, firstGoodIndex);\n }\n pastEvents.push(event);\n}\n"],"names":["fromHex","toHex","WebSocketProvider","AlchemyProvider","VERSION","SturdyWebSocket","EthersNetwork","__awaiter","noop","CustomNetworks","getNetworkFromEthers","isAlchemyEvent","verifyAlchemyEventName","EthersEvent","getAlchemyEventTag","ALCHEMY_EVENT_TYPES","DEFAULT_ALCHEMY_API_KEY","ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE","AlchemySubscription","ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE","BigNumber"],"mappings":";;;;;;;;;;;;;;;;;;;AAgEA;;;;AAIG;AACH,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC;;;;;;;;AAQG;MACU,mBAAmB,CAAA;AAG9B,IAAA,WAAA,CAA6B,QAAkC,EAAA;QAAlC,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAA0B;;Q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S,CAAC,EAC5E;AACJ,CAAC;AAED,SAAS,mBAAmB,CAC1B,OAAyB,EAAA;AAEzB,IAAA,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AAC9B,CAAC;AAED,SAAS,yBAAyB,CAChC,UAA2B,EAC3B,KAAoB,EAAA;AAEpB,IAAA,qBAAqB,CAAC,UAAU,EAAE,KAAK,EAAE,sBAAsB,CAAC,CAAC;AACnE,CAAC;AAED,SAAS,qBAAqB,CAC5B,UAAuB,EACvB,KAAgB,EAAA;AAEhB,IAAA,qBAAqB,CAAC,UAAU,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC;AAC/D,CAAC;AAED;;;AAGG;AACH,SAAS,qBAAqB,CAC5B,UAAe,EACf,KAAQ,EACR,cAAoC,EAAA;AAEpC,IAAA,MAAM,kBAAkB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;;;AAGjD,IAAA,MAAM,cAAc,GAAG,UAAU,CAAC,SAAS,CACzC,CAAC,IAAI,cAAc,CAAC,CAAC,CAAC,GAAG,kBAAkB,GAAG,0BAA0B,CACzE,CAAC;AACF,IAAA,IAAI,cAAc,KAAK,CAAC,CAAC,EAAE;AACzB,QAAA,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;AACvB,KAAA;AAAM,SAAA;AACL,QAAA,UAAU,CAAC,MAAM,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;AACtC,KAAA;AACD,IAAA,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACzB;;;;"} \ No newline at end of file diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/alchemy-config.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/alchemy-config.d.ts new file mode 100644 index 0000000..0ba461a --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/alchemy-config.d.ts @@ -0,0 +1,54 @@ +import { AlchemySettings, Network } from '../types/types'; +import type { AlchemyProvider } from './alchemy-provider'; +import type { AlchemyWebSocketProvider } from './alchemy-websocket-provider'; +/** + * This class holds the config information for the SDK client instance and + * exposes the underlying providers for more advanced use cases. + * + * @public + */ +export declare class AlchemyConfig { + /** The Alchemy API key. */ + readonly apiKey: string; + /** The Network that this SDK is associated with. */ + readonly network: Network; + /** The maximum number of retries to perform. */ + readonly maxRetries: number; + /** Setting to enable automatic batching on json-rpc requests. Defaults to false.*/ + readonly batchRequests: boolean; + /** + * The optional hardcoded URL to send requests to instead of using the network + * and apiKey. + */ + readonly url?: string; + /** The optional Alchemy auth token to use when sending requests with the Notify API. */ + readonly authToken?: string; + constructor(config?: AlchemySettings); + /** + * Returns an AlchemyProvider instance. Only one provider is created per + * Alchemy instance. + * + * The AlchemyProvider is a wrapper around ether's `AlchemyProvider` class and + * has been expanded to support Alchemy's Enhanced APIs. + * + * Most common methods on the provider are available as top-level methods on + * the {@link Alchemy} instance, but the provider is exposed here to access + * other less-common methods. + * + * @public + */ + getProvider(): Promise; + /** + * Returns an AlchemyWebsocketProvider instance. Only one provider is created + * per Alchemy instance. + * + * The AlchemyWebSocketProvider is a wrapper around ether's + * `AlchemyWebSocketProvider` class and has been expanded to support Alchemy's + * Subscription APIs, automatic backfilling, and other performance improvements. + * + * Most common methods on the provider are available as top-level methods on + * the {@link Alchemy} instance, but the provider is exposed here to access + * other less-common methods. + */ + getWebSocketProvider(): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/alchemy-contract.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/alchemy-contract.d.ts new file mode 100644 index 0000000..a1766ad --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/alchemy-contract.d.ts @@ -0,0 +1,17 @@ +import { Contract as EthersContract, ContractFactory as EthersContractFactory } from '@ethersproject/contracts'; +/** + * The Contract class is a wrapper around the Contract class from ethers.js and + * is exported here for convenience. + * + * @public + */ +export declare class Contract extends EthersContract { +} +/** + * The ContractFactory class is a wrapper around the ContractFactory class from + * ethers.js and is exported here for convenience. + * + * @public + */ +export declare class ContractFactory extends EthersContractFactory { +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/alchemy-provider.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/alchemy-provider.d.ts new file mode 100644 index 0000000..4e2d71e --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/alchemy-provider.d.ts @@ -0,0 +1,40 @@ +import { Network as NetworkFromEthers } from '@ethersproject/networks'; +import { CommunityResourcable, JsonRpcProvider } from '@ethersproject/providers'; +/** + * SDK's custom implementation of ethers.js's 'AlchemyProvider'. + * + * Do not call this constructor directly. Instead, instantiate an instance of + * {@link Alchemy} and call {@link Alchemy.config.getProvider()}. + * + * @public + */ +export declare class AlchemyProvider extends JsonRpcProvider implements CommunityResourcable { + readonly apiKey: string; + readonly maxRetries: number; + readonly batchRequests: boolean; + /** + * Overrides the method in ethers.js's `StaticJsonRpcProvider` class. This + * method is called when calling methods on the parent class `BaseProvider`. + * + * @override + */ + detectNetwork(): Promise; + _startPending(): void; + /** + * Overrides the ether's `isCommunityResource()` method. Returns true if the + * current api key is the default key. + * + * @override + */ + isCommunityResource(): boolean; + /** + * Overrides the base {@link JsonRpcProvider.send} method to implement custom + * logic for sending requests to Alchemy. + * + * @param method The method name to use for the request. + * @param params The parameters to use for the request. + * @override + * @public + */ + send(method: string, params: Array): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/alchemy-wallet.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/alchemy-wallet.d.ts new file mode 100644 index 0000000..026d469 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/alchemy-wallet.d.ts @@ -0,0 +1,103 @@ +import { BlockTag, FeeData, Provider, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; +import { ExternallyOwnedAccount } from '@ethersproject/abstract-signer'; +import { BigNumber } from '@ethersproject/bignumber'; +import { BytesLike } from '@ethersproject/bytes'; +import { Deferrable } from '@ethersproject/properties'; +import { SigningKey } from '@ethersproject/signing-key'; +import { Wallet as EthersWallet } from '@ethersproject/wallet'; +import { Alchemy } from './alchemy'; +/** + * The Wallet class inherits Signer and can sign transactions and messages using + * a private key as a standard Externally Owned Account (EOA). + * + * SDK's custom implementation of Ethers.js's 'Wallet'. + * + * Primary difference from Ethers.js 'Wallet' is that you can pass in either a + * Provider or an Alchemy object. This implementation will intelligently detect + * the format and set the provider accordingly. + * + * @public + * @override + */ +export declare class Wallet extends EthersWallet { + private alchemyProviderPromise?; + /** + * Overload permits users to pass in either a standard Provider or an Alchemy + * object. The constructor will detect the object type and handle appropriately. + * + * @override + */ + constructor(privateKey: BytesLike | ExternallyOwnedAccount | SigningKey, alchemyOrProvider?: Alchemy | Provider); + /** + * Returns the balance of this wallet at blockTag. + * + * @param blockTag The block to check the balance of + * @override + */ + getBalance(blockTag?: BlockTag): Promise; + /** + * Returns the number of transactions this account has ever sent. This is the + * value required to be included in transactions as the nonce. + * + * @param blockTag The block to check the transaction count on + * @override + */ + getTransactionCount(blockTag?: BlockTag): Promise; + /** + * Returns the result of estimating the cost to send the transactionRequest, + * with this account address being used as the from field. + * + * @param transaction Transaction to estimate the gas on + * @override + */ + estimateGas(transaction: Deferrable): Promise; + /** + * Returns the result of calling using the transactionRequest, with this + * account address being used as the from field. + * + * @param transaction To make a call on + * @param blockTag The block to make the call on + * @override + */ + call(transaction: Deferrable, blockTag?: BlockTag): Promise; + /** + * Populates all fields in a transaction, signs it and sends it to the network + * + * @override + */ + sendTransaction(transaction: Deferrable): Promise; + /** + * Returns the chain ID this wallet is connected to. + * + * @override + */ + getChainId(): Promise; + /** + * Returns the current gas price. + * + * @override + */ + getGasPrice(): Promise; + /** + * Returns the current recommended FeeData to use in a transaction. + * + * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas + * should be used. + * + * For legacy transactions and networks which do not support EIP-1559, the + * gasPrice should be used. + * + * @override + */ + getFeeData(): Promise; + /** + * Looks up the address of name. If the name is not owned, or does not have a + * Resolver configured, or the Resolver does not have an address configured, + * null is returned. + * + * @param name Name of the ENS address + * @override + */ + resolveName(name: string): Promise; + private getWallet; +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/alchemy-websocket-provider.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/alchemy-websocket-provider.d.ts new file mode 100644 index 0000000..ce7a704 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/alchemy-websocket-provider.d.ts @@ -0,0 +1,135 @@ +import { Listener } from '@ethersproject/abstract-provider'; +import { CommunityResourcable, WebSocketProvider } from '@ethersproject/providers'; +import { EthersEvent } from '../internal/ethers-event'; +import { AlchemyEventType } from '../types/types'; +/** + * SDK's custom implementation fo the ethers.js's 'AlchemyWebSocketProvider'. + * + * Do not call this constructor directly. Instead, instantiate an instance of + * {@link Alchemy} and call {@link Alchemy.config.getWebSocketProvider()}. + * + * @public + */ +export declare class AlchemyWebSocketProvider extends WebSocketProvider implements CommunityResourcable { + _events: Array; + readonly apiKey: string; + /** + * Overridden implementation of ethers that includes Alchemy based subscriptions. + * + * @param eventName Event to subscribe to + * @param listener The listener function to call when the event is triggered. + * @override + * @public + */ + on(eventName: AlchemyEventType, listener: Listener): this; + /** + * Overridden implementation of ethers that includes Alchemy based + * subscriptions. Adds a listener to the triggered for only the next + * {@link eventName} event, after which it will be removed. + * + * @param eventName Event to subscribe to + * @param listener The listener function to call when the event is triggered. + * @override + * @public + */ + once(eventName: AlchemyEventType, listener: Listener): this; + /** + * Removes the provided {@link listener} for the {@link eventName} event. If no + * listener is provided, all listeners for the event will be removed. + * + * @param eventName Event to unlisten to. + * @param listener The listener function to remove. + * @override + * @public + */ + off(eventName: AlchemyEventType, listener?: Listener): this; + /** + * Remove all listeners for the provided {@link eventName} event. If no event + * is provided, all events and their listeners are removed. + * + * @param eventName The event to remove all listeners for. + * @override + * @public + */ + removeAllListeners(eventName?: AlchemyEventType): this; + /** + * Returns the number of listeners for the provided {@link eventName} event. If + * no event is provided, the total number of listeners for all events is returned. + * + * @param eventName The event to get the number of listeners for. + * @public + * @override + */ + listenerCount(eventName?: AlchemyEventType): number; + /** + * Returns an array of listeners for the provided {@link eventName} event. If + * no event is provided, all listeners will be included. + * + * @param eventName The event to get the listeners for. + * @public + * @override + */ + listeners(eventName?: AlchemyEventType): Array; + /** @override */ + destroy(): Promise; + /** + * Overrides the ether's `isCommunityResource()` method. Returns true if the + * current api key is the default key. + * + * @override + */ + isCommunityResource(): boolean; + private emitEvent; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.off()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _off; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.removeAllListeners()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _removeAllListeners; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.listenerCount()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _listenerCount; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.listeners()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _listeners; +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/alchemy.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/alchemy.d.ts new file mode 100644 index 0000000..edc191f --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/alchemy.d.ts @@ -0,0 +1,49 @@ +import { AlchemySettings } from '../types/types'; +import { AlchemyConfig } from './alchemy-config'; +import { CoreNamespace } from './core-namespace'; +import { NftNamespace } from './nft-namespace'; +import { NotifyNamespace } from './notify-namespace'; +import { TransactNamespace } from './transact-namespace'; +import { WebSocketNamespace } from './websocket-namespace'; +/** + * The Alchemy SDK client. This class is the main entry point into Alchemy's + * APIs and separates functionality into different namespaces. + * + * Each SDK instance is associated with a specific network and API key. To use a + * different network or API key, create a new instance of {@link Alchemy}. + * + * @public + */ +export declare class Alchemy { + /** + * The `core` namespace contains the core eth json-rpc calls and Alchemy's + * Enhanced APIs. + */ + readonly core: CoreNamespace; + /** The `nft` namespace contains methods for Alchemy's NFT API. */ + readonly nft: NftNamespace; + /** The `ws` namespace contains methods for using WebSockets and creating subscriptions. */ + readonly ws: WebSocketNamespace; + /** + * The `transact` namespace contains methods for sending transactions and + * checking on the state of submitted transasctions. + */ + readonly transact: TransactNamespace; + /** + * Holds the setting information for the instance of the Alchemy SDK client + * and allows access to the underlying providers. + */ + readonly config: AlchemyConfig; + /** + * The `notify` namespace contains methods for creating and managing webhooks + * as part of the Notify API. + */ + readonly notify: NotifyNamespace; + /** + * @param {string} [settings.apiKey] - The API key to use for Alchemy + * @param {Network} [settings.network] - The network to use for Alchemy + * @param {number} [settings.maxRetries] - The maximum number of retries to attempt + * @public + */ + constructor(settings?: AlchemySettings); +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/core-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/core-namespace.d.ts new file mode 100644 index 0000000..5a5827d --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/core-namespace.d.ts @@ -0,0 +1,311 @@ +import type { Block, BlockTag, BlockWithTransactions, FeeData, Filter, FilterByBlockHash, Log, TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; +import type { BigNumber, BigNumberish } from '@ethersproject/bignumber'; +import type { Network as EthersNetworkAlias } from '@ethersproject/networks/lib/types'; +import type { Deferrable } from '@ethersproject/properties'; +import { AssetTransfersParams, AssetTransfersResponse, AssetTransfersWithMetadataParams, AssetTransfersWithMetadataResponse, DeployResult, TokenBalancesOptionsDefaultTokens, TokenBalancesOptionsErc20, TokenBalancesResponse, TokenBalancesResponseErc20, TokenMetadataResponse, TransactionReceiptsParams, TransactionReceiptsResponse } from '../types/types'; +/** + * The core namespace contains all commonly-used [Ethers.js + * Provider](https://docs.ethers.io/v5/api/providers/api-providers/#AlchemyProvider) + * methods. If you are already using Ethers.js, you should be simply able to + * replace the Ethers.js Provider object with `alchemy.core` when accessing + * provider methods and it should just work. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.core`. + */ +export declare class CoreNamespace { + private readonly config; + /** + * Returns the balance of a given address as of the provided block. + * + * @param addressOrName The address or name of the account to get the balance for. + * @param blockTag The optional block number or hash to get the balance for. + * Defaults to 'latest' if unspecified. + * @public + */ + getBalance(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Returns the contract code of the provided address at the block. If there is + * no contract deployed, the result is `0x`. + * + * @param addressOrName The address or name of the account to get the code for. + * @param blockTag The optional block number or hash to get the code for. + * Defaults to 'latest' if unspecified. + * @public + */ + getCode(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Return the value of the provided position at the provided address, at the + * provided block in `Bytes32` format. + * + * @param addressOrName The address or name of the account to get the code for. + * @param position The position of the storage slot to get. + * @param blockTag The optional block number or hash to get the code for. + * Defaults to 'latest' if unspecified. + * @public + */ + getStorageAt(addressOrName: string | Promise, position: BigNumberish | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Returns the number of transactions ever sent from the provided address, as + * of the provided block tag. This value is used as the nonce for the next + * transaction from the address sent to the network. + * + * @param addressOrName The address or name of the account to get the nonce for. + * @param blockTag The optional block number or hash to get the nonce for. + * @public + */ + getTransactionCount(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Returns the block from the network based on the provided block number or + * hash. Transactions on the block are represented as an array of transaction + * hashes. To get the full transaction details on the block, use + * {@link getBlockWithTransactions} instead. + * + * @param blockHashOrBlockTag The block number or hash to get the block for. + * @public + */ + getBlock(blockHashOrBlockTag: BlockTag | string | Promise): Promise; + /** + * Returns the block from the network based on the provided block number or + * hash. Transactions on the block are represented as an array of + * {@link TransactionResponse} objects. + * + * @param blockHashOrBlockTag The block number or hash to get the block for. + * @public + */ + getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise): Promise; + /** + * Returns the {@link EthersNetworkAlias} Alchemy is connected to. + * + * @public + */ + getNetwork(): Promise; + /** + * Returns the block number of the most recently mined block. + * + * @public + */ + getBlockNumber(): Promise; + /** + * Returns the best guess of the current gas price to use in a transaction. + * + * @public + */ + getGasPrice(): Promise; + /** + * Returns the recommended fee data to use in a transaction. + * + * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas + * should be used. + * + * For legacy transactions and networks which do not support EIP-1559, the + * gasPrice should be used. + * + * @public + */ + getFeeData(): Promise; + /** + * Returns a Promise which will stall until the network has heen established, + * ignoring errors due to the target node not being active yet. + * + * This can be used for testing or attaching scripts to wait until the node is + * up and running smoothly. + * + * @public + */ + ready(): Promise; + /** + * Returns the result of executing the transaction, using call. A call does + * not require any ether, but cannot change any state. This is useful for + * calling getters on Contracts. + * + * @param transaction The transaction to execute. + * @param blockTag The optional block number or hash to get the call for. + * @public + */ + call(transaction: Deferrable, blockTag?: BlockTag | Promise): Promise; + /** + * Returns an estimate of the amount of gas that would be required to submit + * transaction to the network. + * + * An estimate may not be accurate since there could be another transaction on + * the network that was not accounted for, but after being mined affects the + * relevant state. + * + * This is an alias for {@link TransactNamespace.estimateGas}. + * + * @param transaction The transaction to estimate gas for. + * @public + */ + estimateGas(transaction: Deferrable): Promise; + /** + * Returns the transaction with hash or null if the transaction is unknown. + * + * If a transaction has not been mined, this method will search the + * transaction pool. Various backends may have more restrictive transaction + * pool access (e.g. if the gas price is too low or the transaction was only + * recently sent and not yet indexed) in which case this method may also return null. + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransaction(transactionHash: string | Promise): Promise; + /** + * Returns the transaction receipt for hash or null if the transaction has not + * been mined. + * + * To stall until the transaction has been mined, consider the + * waitForTransaction method below. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransactionReceipt(transactionHash: string | Promise): Promise; + /** + * Submits transaction to the network to be mined. The transaction must be + * signed, and be valid (i.e. the nonce is correct and the account has + * sufficient balance to pay for the transaction). + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param signedTransaction The signed transaction to send. + * @public + */ + sendTransaction(signedTransaction: string | Promise): Promise; + /** + * Returns a promise which will not resolve until specified transaction hash is mined. + * + * If {@link confirmations} is 0, this method is non-blocking and if the + * transaction has not been mined returns null. Otherwise, this method will + * block until the transaction has confirmed blocks mined on top of the block + * in which it was mined. + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to wait for. + * @param confirmations The number of blocks to wait for. + * @param timeout The maximum time to wait for the transaction to confirm. + * @public + */ + waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise; + /** + * Returns an array of logs that match the provided filter. + * + * @param filter The filter object to use. + * @public + */ + getLogs(filter: Filter | FilterByBlockHash | Promise): Promise>; + /** + * Allows sending a raw message to the Alchemy backend. + * + * @param method The method to call. + * @param params The parameters to pass to the method. + * @public + */ + send(method: string, params: Array): Promise; + /** + * Finds the address that deployed the provided contract and block number it + * was deployed in. + * + * NOTE: This method performs a binary search across all blocks since genesis + * and can take a long time to complete. This method is a convenience method + * that will eventually be replaced by a single call to an Alchemy endpoint + * with this information cached. + * + * @param contractAddress - The contract address to find the deployer for. + * @beta + */ + findContractDeployer(contractAddress: string): Promise; + /** + * Returns the ERC-20 token balances for a specific owner address. + * + * @param addressOrName The owner address to get the token balances for. + * @public + */ + getTokenBalances(addressOrName: string): Promise; + /** + * Returns the token balances for a specific owner address given a list of contracts. + * + * @param addressOrName The owner address to get the token balances for. + * @param contractAddresses A list of contract addresses to check. If omitted, + * all ERC-20 tokens will be checked. + * @public + */ + getTokenBalances(addressOrName: string, contractAddresses?: string[]): Promise; + /** + * Returns the ERC-20 token balances for a specific owner. + * + * This overload covers the erc-20 token type which includes a page key in the response. + * + * @param addressOrName The owner address to get the token balances for. + * @param options Token type options set to ERC-20 with optional page key. + * @public + */ + getTokenBalances(addressOrName: string, options: TokenBalancesOptionsErc20): Promise; + /** + * Returns the token balances for a specific owner, fetching from the top 100 + * tokens by 24 hour volume. + * + * This overload covers the default token type which includes a page key in + * the response. + * + * @param addressOrName The owner address to get the token balances for. + * @param options Token type options set to ERC-20 with optional page key. + * @public + */ + getTokenBalances(addressOrName: string, options: TokenBalancesOptionsDefaultTokens): Promise; + /** + * Returns metadata for a given token contract address. + * + * @param address The contract address to get metadata for. + * @public + */ + getTokenMetadata(address: string): Promise; + /** + * Get transactions for specific addresses. See the web documentation for the + * full details: + * https://docs.alchemy.com/alchemy/enhanced-apis/transfers-api#alchemy_getassettransfers + * + * This overload requires {@link AssetTransfersWithMetadataParams.withMetadata} + * to be set to `true`, which results in additional metadata returned in the + * response object. + * + * @param params An object containing fields for the asset transfer query + * @public + */ + getAssetTransfers(params: AssetTransfersWithMetadataParams): Promise; + /** + * Get transactions for specific addresses. See the web documentation for the + * full details: + * https://docs.alchemy.com/alchemy/enhanced-apis/transfers-api#alchemy_getassettransfers + * + * @param params An object containing fields for the asset transfer query. + * @public + */ + getAssetTransfers(params: AssetTransfersParams): Promise; + /** + * Gets all transaction receipts for a given block by number or block hash. + * + * @param params An object containing fields for the transaction receipt query. + * @public + */ + getTransactionReceipts(params: TransactionReceiptsParams): Promise; + /** + * Returns the underlying owner address for the provided ENS address, or `null` + * if the ENS name does not have an underlying address. + * + * @param name The ENS address name to resolve. + */ + resolveName(name: string): Promise; + /** + * Performs a reverse lookup of the address in ENS using the Reverse Registrar. If the name does not exist, or the forward lookup does not match, null is returned. + * + * An ENS name requires additional configuration to setup a reverse record, so not all ENS addresses will map back to the original ENS domain. + * + * @param address The address to look up the ENS domain name for. + */ + lookupAddress(address: string): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/nft-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/nft-namespace.d.ts new file mode 100644 index 0000000..09e756e --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/nft-namespace.d.ts @@ -0,0 +1,275 @@ +import type { BigNumberish } from '@ethersproject/bignumber'; +import { GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftResponse, NftAttributeRarity, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, NftTokenType, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult } from '../types/types'; +import { BaseNft, Nft, NftContract } from './nft'; +/** + * The NFT namespace contains all the functionality related to NFTs. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.nft`. + */ +export declare class NftNamespace { + private readonly config; + /** + * Get the NFT metadata associated with the provided parameters. + * + * @param contractAddress - The contract address of the NFT. + * @param tokenId - Token id of the NFT. + * @param tokenType - Optionally specify the type of token to speed up the query. + * @param tokenUriTimeoutInMs - No set timeout by default - When metadata is + * requested, this parameter is the timeout (in milliseconds) for the + * website hosting the metadata to respond. If you want to only access the + * cache and not live fetch any metadata for cache misses then set this value to 0. + * @public + */ + getNftMetadata(contractAddress: string, tokenId: BigNumberish, tokenType?: NftTokenType, tokenUriTimeoutInMs?: number): Promise; + /** + * Gets the NFT metadata for multiple NFT tokens. + * + * @param tokens An array of NFT tokens to fetch metadata for. + * @param options Configuration options for making the request. + */ + getNftMetadataBatch(tokens: Array, options?: NftMetadataBatchOptions): Promise; + /** + * Get the NFT collection metadata associated with the provided parameters. + * + * @param contractAddress - The contract address of the NFT. + * @public + */ + getContractMetadata(contractAddress: string): Promise; + /** + * Fetches all NFTs for a given owner and yields them in an async iterable. + * + * This method returns the full NFT for the owner and pages through all page + * keys until all NFTs have been fetched. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwnerIterator(owner: string, options?: GetNftsForOwnerOptions): AsyncIterable; + /** + * Fetches all NFTs for a given owner and yields them in an async iterable. + * + * This method returns the base NFTs that omit the associated metadata and + * pages through all page keys until all NFTs have been fetched. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwnerIterator(owner: string, options?: GetBaseNftsForOwnerOptions): AsyncIterable; + /** + * Get all NFTs for an owner. + * + * This method returns the full NFTs in the contract. To get all NFTs without + * their associated metadata, use {@link GetBaseNftsForOwnerOptions}. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwner(owner: string, options?: GetNftsForOwnerOptions): Promise; + /** + * Get all base NFTs for an owner. + * + * This method returns the base NFTs that omit the associated metadata. To get + * all NFTs with their associated metadata, use {@link GetNftsForOwnerOptions}. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwner(owner: string, options?: GetBaseNftsForOwnerOptions): Promise; + /** + * Get all NFTs for a given contract address. + * + * This method returns the full NFTs in the contract. To get all NFTs without + * their associated metadata, use {@link GetBaseNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The parameters to use for the request. or + * {@link NftContractNftsResponse} response. + * @beta + */ + getNftsForContract(contractAddress: string, options?: GetNftsForContractOptions): Promise; + /** + * Get all base NFTs for a given contract address. + * + * This method returns the base NFTs that omit the associated metadata. To get + * all NFTs with their associated metadata, use {@link GetNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftsForContract(contractAddress: string, options?: GetBaseNftsForContractOptions): Promise; + /** + * Fetches all NFTs for a given contract address and yields them in an async iterable. + * + * This method returns the full NFTs in the contract and pages through all + * page keys until all NFTs have been fetched. To get all NFTs without their + * associated metadata, use {@link GetBaseNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftsForContractIterator(contractAddress: string, options?: GetNftsForContractOptions): AsyncIterable; + /** + * Fetches all base NFTs for a given contract address and yields them in an + * async iterable. + * + * This method returns the base NFTs that omit the associated metadata and + * pages through all page keys until all NFTs have been fetched. To get all + * NFTs with their associated metadata, use {@link GetNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftsForContractIterator(contractAddress: string, options?: GetBaseNftsForContractOptions): AsyncIterable; + /** + * Gets all the owners for a given NFT contract along with the token balance. + * + * @param contractAddress - The NFT contract to get the owners for. + * @param options Optional parameters to use for the request. + * @public + */ + getOwnersForContract(contractAddress: string, options: GetOwnersForContractWithTokenBalancesOptions): Promise; + /** + * Gets all the owners for a given NFT contract. + * + * Note that token balances are omitted by default. To include token balances + * for each owner, use {@link GetOwnersForContractWithTokenBalancesOptions}, + * which has the `withTokenBalances` field set to `true`. + * + * @param contractAddress - The NFT contract to get the owners for. + * @param options Optional parameters to use for the request. + * @public + */ + getOwnersForContract(contractAddress: string, options?: GetOwnersForContractOptions): Promise; + /** + * Gets all the owners for a given NFT contract address and token ID. + * + * @param contractAddress - The NFT contract address. + * @param tokenId - Token id of the NFT. + * @beta + */ + getOwnersForNft(contractAddress: string, tokenId: BigNumberish): Promise; + /** + * Gets all NFT contracts held by the specified owner address. + * + * @param owner - Address for NFT owner (can be in ENS format!). + * @param options - The optional parameters to use for the request. + * @public + */ + getContractsForOwner(owner: string, options?: GetContractsForOwnerOptions): Promise; + /** + * DEPRECATED - Checks that the provided owner address owns one of more of the + * provided NFTs. + * + * @deprecated - Use {@link verifyNftOwnership} instead. This method will be + * removed in a future release. + * @param owner - The owner address to check. + * @param contractAddresses - An array of NFT contract addresses to check ownership for. + */ + checkNftOwnership(owner: string, contractAddresses: string[]): Promise; + /** + * Checks that the provided owner address owns one of more of the provided + * NFT. Returns a boolean indicating whether the owner address owns the provided NFT. + * + * @param owner - The owner address to check. + * @param contractAddress - An NFT contract address to check ownership for. + */ + verifyNftOwnership(owner: string, contractAddress: string): Promise; + /** + * Checks which of the provided NFTs the owner address owns. Returns a map of + * contract address to a boolean indicating whether the owner address owns the NFT. + * + * @param owner - The owner address to check. + * @param contractAddresses - An array NFT contract address to check ownership for. + */ + verifyNftOwnership(owner: string, contractAddresses: string[]): Promise<{ + [contractAddress: string]: boolean; + }>; + /** + * Returns whether a contract is marked as spam or not by Alchemy. For more + * information on how we classify spam, go to our NFT API FAQ at + * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification. + * + * @param contractAddress - The contract address to check. + * @beta + */ + isSpamContract(contractAddress: string): Promise; + /** + * Returns a list of all spam contracts marked by Alchemy. For details on how + * Alchemy marks spam contracts, go to + * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification. + * + * @beta + */ + getSpamContracts(): Promise; + /** + * Returns the floor prices of a NFT contract by marketplace. + * + * @param contractAddress - The contract address for the NFT collection. + * @beta + */ + getFloorPrice(contractAddress: string): Promise; + /** + * Returns NFT sales that have happened through on-chain marketplaces. + * + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftSales(options?: GetNftSalesOptions): Promise; + getNftSales(options?: GetNftSalesOptionsByContractAddress): Promise; + /** + * Get the rarity of each attribute of an NFT. + * + * @param contractAddress - Contract address for the NFT collection. + * @param tokenId - Token id of the NFT. + */ + computeRarity(contractAddress: string, tokenId: BigNumberish): Promise; + /** + * Search for a keyword across metadata of all ERC-721 and ERC-1155 smart contracts. + * + * @param query - The search string that you want to search for in contract metadata. + */ + searchContractMetadata(query: string): Promise; + /** + * Get a summary of attribute prevalence for an NFT collection. + * + * @param contractAddress - Contract address for the NFT collection. + */ + summarizeNftAttributes(contractAddress: string): Promise; + /** + * Refreshes the cached metadata for a provided NFT contract address and token + * id. Returns a boolean value indicating whether the metadata was refreshed. + * + * This method is useful when you want to refresh the metadata for a NFT that + * has been updated since the last time it was fetched. Note that the backend + * only allows one refresh per token every 15 minutes, globally for all users. + * The last refresh time for an NFT can be accessed on the + * {@link Nft.timeLastUpdated} field. + * + * To trigger a refresh for all NFTs in a contract, use {@link refreshContract} instead. + * + * @param contractAddress - The contract address of the NFT. + * @param tokenId - The token id of the NFT. + */ + refreshNftMetadata(contractAddress: string, tokenId: BigNumberish): Promise; + /** + * Triggers a metadata refresh all NFTs in the provided contract address. This + * method is useful after an NFT collection is revealed. + * + * Refreshes are queued on the Alchemy backend and may take time to fully + * process. To refresh the metadata for a specific token, use the + * {@link refreshNftMetadata} method instead. + * + * @param contractAddress - The contract address of the NFT collection. + * @beta + */ + refreshContract(contractAddress: string): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/nft.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/nft.d.ts new file mode 100644 index 0000000..b51d2bd --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/nft.d.ts @@ -0,0 +1,86 @@ +import { Media, NftMetadata, NftTokenType, OpenSeaCollectionMetadata, SpamInfo, TokenUri } from '../types/types'; +/** + * Alchemy representation of a base NFT contract that doesn't contain metadata. + * + * The BaseNftContract does not hold any metadata information and only contains + * the address. The NftContract additionally contains the tokenType, name, + * symbol, and more. + * + * @public + */ +export interface BaseNftContract { + /** The address of the contract. */ + address: string; +} +/** + * Alchemy representation of an NFT contract. + * + * The BaseNftContract does not hold any metadata information and only contains + * the address. The NftContract additionally contains the tokenType, name, + * symbol, and more. + * + * @public + */ +export interface NftContract extends BaseNftContract { + /** The type of the token in the contract. */ + tokenType: NftTokenType; + /** The name of the contract. */ + name?: string; + /** The symbol of the contract. */ + symbol?: string; + /** + * The number of NFTs in the contract as an integer string. This field is only + * available on ERC-721 contracts. + */ + totalSupply?: string; + /** OpenSea's metadata for the contract. */ + openSea?: OpenSeaCollectionMetadata; +} +/** + * Alchemy representation of an NFT that doesn't contain metadata. + * + * The BaseNft object does not hold any metadata information and only contains + * the NFT contract and token ID. The Nft object additionally contains the NFT + * metadata, token URI information, and media. + * + * @public + */ +export interface BaseNft { + contract: BaseNftContract; + /** The NFT token ID as an integer string. */ + tokenId: string; + /** The type of ERC token, if known. */ + tokenType: NftTokenType; +} +/** + * Alchemy representation of an NFT. + * + * The BaseNft object does not hold any metadata information and only contains + * the NFT contract and token ID. The Nft object additionally contains the NFT + * metadata, token URI information, and media. + * + * @public + */ +export interface Nft extends BaseNft { + /** The NFT's underlying contract and relevant contract metadata. */ + contract: NftContract; + /** The NFT title. */ + title: string; + /** The NFT description. */ + description: string; + /** When the NFT was last updated in the blockchain. Represented in ISO-8601 format. */ + timeLastUpdated: string; + /** Holds an error message if there was an issue fetching metadata. */ + metadataError: string | undefined; + /** + * The raw metadata fetched from the metadata URL specified by the NFT. The + * field is undefined if Alchemy was unable to fetch metadata. + */ + rawMetadata: NftMetadata | undefined; + /** URIs for accessing the NFT's metadata blob. */ + tokenUri: TokenUri | undefined; + /** URIs for accessing the NFT's media assets. */ + media: Media[]; + /** Detailed information on why an NFT was classified as spam. */ + spamInfo?: SpamInfo; +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/notify-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/notify-namespace.d.ts new file mode 100644 index 0000000..c70f03d --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/notify-namespace.d.ts @@ -0,0 +1,143 @@ +import { AddressActivityResponse, AddressActivityWebhook, AddressWebhookParams, AddressWebhookUpdate, DroppedTransactionWebhook, GetAddressesOptions, GetAllWebhooksResponse, MinedTransactionWebhook, NftActivityWebhook, NftFiltersResponse, NftWebhookParams, NftWebhookUpdate, TransactionWebhookParams, Webhook, WebhookType } from '../types/types'; +/** + * The Notify namespace contains methods used for creating, reading, updating, + * and deleting webhooks in the Notify API. + * + * To use the methods in the API, you must provide your team's auth token in the + * {@link AlchemySettings.authToken} field when configuring + * {@link AlchemySettings}. The auth token can be found in the Alchemy Dashboard + * on the Notify tab. + * + * Note that not all networks are supported in the Notify API. Please consult + * the documentation for which networks are supported. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the notify + * namespace via `alchemy.notify`. + */ +export declare class NotifyNamespace { + private readonly config; + /** + * Get all webhooks on your team. + * + * The team is determined by the `authToken` provided into the {@link AlchemySettings} + * object when creating a new {@link Alchemy} instance. + * + * This method returns a response object containing all the webhooks + */ + getAllWebhooks(): Promise; + /** + * Get all addresses tracked for the provided {@link AddressActivityWebhook}. + * + * @param addressWebhook The Address Activity webhook. + * @param options Pagination options when fetching addresses. + */ + getAddresses(addressWebhook: AddressActivityWebhook, options?: GetAddressesOptions): Promise; + /** + * Get all addresses tracked for the provided {@link AddressActivityWebhook}. + * + * @param webhookId The id of the address activity webhook. Passing in an id + * of a non-address-activity webhook will result in a response object with + * no addresses. + * @param options Pagination options when fetching addresses. + */ + getAddresses(webhookId: string, options?: GetAddressesOptions): Promise; + /** + * Get all NFTs tracked for the provided {@link NftActivityWebhook}. + * + * @param nftWebhook The NFT Activity webhook. + * @param options Pagination options when fetching NFT filters. + */ + getNftFilters(nftWebhook: NftActivityWebhook, options?: GetAddressesOptions): Promise; + /** + * Get all NFT filters tracked for the provided {@link NftActivityWebhook}. + * + * @param webhookId The id of the NFT activity webhook. Passing in an + * incorrect id of a non-NFT webhook will result in a response object with + * no filters. + * @param options Pagination options when fetching nft filters. + */ + getNftFilters(webhookId: string, options?: GetAddressesOptions): Promise; + /** + * Update a {@link NftActivityWebhook}'s active status or NFT filters. + * + * @param nftWebhook The NFT activity webhook to update. + * @param update Object containing the update. + */ + updateWebhook(nftWebhook: NftActivityWebhook, update: NftWebhookUpdate): Promise; + /** + * Update a {@link NftActivityWebhook}'s active status or NFT filters. + * + * @param nftWebhookId The id of the NFT activity webhook. + * @param update Object containing the update. + */ + updateWebhook(nftWebhookId: string, update: NftWebhookUpdate): Promise; + /** + * Update a {@link AddressActivityWebhook}'s active status or addresses. + * + * @param addressWebhook The address activity webhook to update. + * @param update Object containing the update. + */ + updateWebhook(addressWebhook: AddressActivityWebhook, update: AddressWebhookUpdate): Promise; + /** + * Update a {@link AddressActivityWebhook}'s active status or addresses. + * + * @param addressWebhookId The id of the address activity webhook. + * @param update Object containing the update. + */ + updateWebhook(addressWebhookId: string, update: AddressWebhookUpdate): Promise; + /** + * Create a new {@link MinedTransactionWebhook} to track mined transactions + * sent by the app associated with the app id. + * + * Note that the webhook will be created in the app network of the provided app id. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the app id. + */ + createWebhook(url: string, type: WebhookType.MINED_TRANSACTION, params: TransactionWebhookParams): Promise; + /** + * Create a new {@link DroppedTransactionWebhook} to track dropped transactions + * sent by the app associated with the app id. + * + * Note that the webhook will be created in the app network of the provided app id. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the app id. + */ + createWebhook(url: string, type: WebhookType.DROPPED_TRANSACTION, params: TransactionWebhookParams): Promise; + /** + * Create a new {@link NftActivityWebhook} to track NFT transfers. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the NFTs to track and the + * network the webhook should be created on. + */ + createWebhook(url: string, type: WebhookType.NFT_ACTIVITY, params: NftWebhookParams): Promise; + /** + * Create a new {@link AddressActivityWebhook} to track address activity. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the addresses to track and the + * network the webhook should be created on. + */ + createWebhook(url: string, type: WebhookType.ADDRESS_ACTIVITY, params: AddressWebhookParams): Promise; + /** + * Delete the provided webhook. + * + * @param webhook The webhook to delete. + */ + deleteWebhook(webhook: Webhook): Promise; + /** + * Delete the provided webhook. + * + * @param webhookId The id of the webhook to delete. + */ + deleteWebhook(webhookId: string): Promise; + private verifyConfig; + private sendWebhookRequest; +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/transact-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/transact-namespace.d.ts new file mode 100644 index 0000000..85525ad --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/transact-namespace.d.ts @@ -0,0 +1,105 @@ +import { TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; +import type { BigNumber } from '@ethersproject/bignumber'; +import { Deferrable } from '@ethersproject/properties'; +import { SendPrivateTransactionOptions } from '../types/types'; +/** + * The Transact namespace contains methods used for sending transactions and + * checking on the state of submitted transactions. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the transact + * namespace via `alchemy.transact`. + */ +export declare class TransactNamespace { + private readonly config; + /** + * Used to send a single transaction to Flashbots. Flashbots will attempt to + * send the transaction to miners for the next 25 blocks. + * + * Returns the transaction hash of the submitted transaction. + * + * @param signedTransaction The raw, signed transaction as a hash. + * @param maxBlockNumber Optional highest block number in which the + * transaction should be included. + * @param options Options to configure the request. + */ + sendPrivateTransaction(signedTransaction: string, maxBlockNumber?: number, options?: SendPrivateTransactionOptions): Promise; + /** + * Stops the provided private transaction from being submitted for future + * blocks. A transaction can only be cancelled if the request is signed by the + * same key as the {@link sendPrivateTransaction} call submitting the + * transaction in first place. + * + * Please note that fast mode transactions cannot be cancelled using this method. + * + * Returns a boolean indicating whether the cancellation was successful. + * + * @param transactionHash Transaction hash of private tx to be cancelled + */ + cancelPrivateTransaction(transactionHash: string): Promise; + /** + * Returns the transaction with hash or null if the transaction is unknown. + * + * If a transaction has not been mined, this method will search the + * transaction pool. Various backends may have more restrictive transaction + * pool access (e.g. if the gas price is too low or the transaction was only + * recently sent and not yet indexed) in which case this method may also return null. + * + * NOTE: This is an alias for {@link CoreNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransaction(transactionHash: string | Promise): Promise; + /** + * Submits transaction to the network to be mined. The transaction must be + * signed, and be valid (i.e. the nonce is correct and the account has + * sufficient balance to pay for the transaction). + * + * NOTE: This is an alias for {@link CoreNamespace.sendTransaction}. + * + * @param signedTransaction The signed transaction to send. + * @public + */ + sendTransaction(signedTransaction: string | Promise): Promise; + /** + * Returns an estimate of the amount of gas that would be required to submit + * transaction to the network. + * + * An estimate may not be accurate since there could be another transaction on + * the network that was not accounted for, but after being mined affects the + * relevant state. + * + * This is an alias for {@link CoreNamespace.estimateGas}. + * + * @param transaction The transaction to estimate gas for. + * @public + */ + estimateGas(transaction: Deferrable): Promise; + /** + * Returns a fee per gas (in wei) that is an estimate of how much you can pay + * as a priority fee, or "tip", to get a transaction included in the current block. + * + * This number is generally used to set the `maxPriorityFeePerGas` field in a + * transaction request. + * + * @public + */ + getMaxPriorityFeePerGas(): Promise; + /** + * Returns a promise which will not resolve until specified transaction hash is mined. + * + * If {@link confirmations} is 0, this method is non-blocking and if the + * transaction has not been mined returns null. Otherwise, this method will + * block until the transaction has confirmed blocks mined on top of the block + * in which it was mined. + * + * NOTE: This is an alias for {@link CoreNamespace.waitForTransaction}. + * + * @param transactionHash The hash of the transaction to wait for. + * @param confirmations The number of blocks to wait for. + * @param timeout The maximum time to wait for the transaction to confirm. + * @public + */ + waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/util.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/util.d.ts new file mode 100644 index 0000000..10ac7c3 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/util.d.ts @@ -0,0 +1,21 @@ +/** + * Converts a hex string to a decimal number. + * + * @param hexString - The hex string to convert. + * @public + */ +export declare function fromHex(hexString: string): number; +/** + * Converts a number to a hex string. + * + * @param num - The number to convert to hex. + * @public + */ +export declare function toHex(num: number): string; +/** + * Checks if a value is a hex string. + * + * @param possibleHexString - The value to check. + * @public + */ +export declare function isHex(possibleHexString: string): boolean; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/utils.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/utils.d.ts new file mode 100644 index 0000000..2582187 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/utils.d.ts @@ -0,0 +1,5 @@ +export { dnsEncode, hashMessage, id, isValidName, namehash } from '@ethersproject/hash'; +export { arrayify, concat, hexConcat, hexDataSlice, hexDataLength, hexlify, hexStripZeros, hexValue, hexZeroPad, isBytes, isBytesLike, isHexString, joinSignature, zeroPad, splitSignature, stripZeros } from '@ethersproject/bytes'; +export { formatEther, parseEther, parseUnits, formatUnits } from '@ethersproject/units'; +export { toUtf8Bytes, toUtf8String } from '@ethersproject/strings'; +export { Interface } from '@ethersproject/abi'; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/websocket-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/websocket-namespace.d.ts new file mode 100644 index 0000000..7c179bc --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/api/websocket-namespace.d.ts @@ -0,0 +1,67 @@ +import type { Listener } from '@ethersproject/abstract-provider'; +import { AlchemyEventType } from '../types/types'; +/** + * The Websocket namespace contains all subscription related functions that + * allow you to subscribe to events and receive updates as they occur. The + * underlying WebSocket provider has additional logic to handle reconnections + * and automatically backfills missed events. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.ws`. + */ +export declare class WebSocketNamespace { + private readonly config; + /** + * Adds a listener to be triggered for each {@link eventName} event. Also + * includes Alchemy's Subscription API events. See {@link AlchemyEventType} for + * how to use them. + * + * @param eventName The event to listen for. + * @param listener The listener to call when the event is triggered. + * @public + */ + on(eventName: AlchemyEventType, listener: Listener): this; + /** + * Adds a listener to be triggered for only the next {@link eventName} event, + * after which it will be removed. Also includes Alchemy's Subscription API + * events. See {@link AlchemyEventType} for how to use them. + * + * @param eventName The event to listen for. + * @param listener The listener to call when the event is triggered. + * @public + */ + once(eventName: AlchemyEventType, listener: Listener): this; + /** + * Removes the provided {@link listener} for the {@link eventName} event. If no + * listener is provided, all listeners for the event will be removed. + * + * @param eventName The event to unlisten to. + * @param listener The listener to remove. + * @public + */ + off(eventName: AlchemyEventType, listener?: Listener): this; + /** + * Remove all listeners for the provided {@link eventName} event. If no event + * is provided, all events and their listeners are removed. + * + * @param eventName The event to remove all listeners for. + * @public + */ + removeAllListeners(eventName?: AlchemyEventType): this; + /** + * Returns the number of listeners for the provided {@link eventName} event. If + * no event is provided, the total number of listeners for all events is returned. + * + * @param eventName The event to get the number of listeners for. + * @public + */ + listenerCount(eventName?: AlchemyEventType): Promise; + /** + * Returns an array of listeners for the provided {@link eventName} event. If + * no event is provided, all listeners will be included. + * + * @param eventName The event to get the listeners for. + */ + listeners(eventName?: AlchemyEventType): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/index.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/index.d.ts new file mode 100644 index 0000000..a5d9de9 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/index.d.ts @@ -0,0 +1,18 @@ +/** This is the main entry point for the library and exports user-facing API. */ +import * as Utils from './api/utils'; +export { Utils }; +export * from './types/types'; +export { Alchemy } from './api/alchemy'; +export { Wallet } from './api/alchemy-wallet'; +export { Contract, ContractFactory } from './api/alchemy-contract'; +export type { AlchemyConfig } from './api/alchemy-config'; +export type { AlchemyProvider } from './api/alchemy-provider'; +export type { AlchemyWebSocketProvider } from './api/alchemy-websocket-provider'; +export type { NftNamespace } from './api/nft-namespace'; +export type { WebSocketNamespace } from './api/websocket-namespace'; +export type { CoreNamespace } from './api/core-namespace'; +export type { TransactNamespace } from './api/transact-namespace'; +export type { NotifyNamespace } from './api/notify-namespace'; +export type { BaseNftContract, NftContract, Nft, BaseNft } from './api/nft'; +export { fromHex, toHex, isHex } from './api/util'; +export { setLogLevel, LogLevelString as LogLevel } from './util/logger'; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/internal/backoff.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/internal/backoff.d.ts new file mode 100644 index 0000000..ed9cad8 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/internal/backoff.d.ts @@ -0,0 +1,4 @@ +export declare const DEFAULT_BACKOFF_INITIAL_DELAY_MS = 1000; +export declare const DEFAULT_BACKOFF_MULTIPLIER = 1.5; +export declare const DEFAULT_BACKOFF_MAX_DELAY_MS: number; +export declare const DEFAULT_BACKOFF_MAX_ATTEMPTS = 5; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/internal/dispatch.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/internal/dispatch.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/internal/dispatch.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/internal/ethers-event.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/internal/ethers-event.d.ts new file mode 100644 index 0000000..0676f4c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/internal/ethers-event.d.ts @@ -0,0 +1,60 @@ +import { EventType, Filter, Listener } from '@ethersproject/abstract-provider'; +import { AlchemyEventFilter, AlchemyEventType, AlchemyMinedTransactionsAddress, AlchemyMinedTransactionsEventFilter, AlchemyPendingTransactionsEventFilter, NonEmptyArray } from '../types/types'; +/** + * DO NOT MODIFY. + * + * Event class copied directly over from ethers.js's `BaseProvider` class. + * + * This class is used to represent events and their corresponding listeners. The + * SDK needs to extend this class in order to support Alchemy's custom + * Subscription API types. The original class is not exported by ethers. Minimal + * changes have been made in order to get TS to compile. + */ +declare class Event { + readonly listener: Listener; + readonly once: boolean; + readonly tag: string; + _lastBlockNumber: number; + _inflight: boolean; + constructor(tag: string, listener: Listener, once: boolean); + get event(): EventType; + get type(): string; + get hash(): string; + get filter(): Filter; + pollable(): boolean; +} +/** + * Wrapper class around the ethers `Event` class in order to add support for + * Alchemy's custom subscriptions types. + * + * The serialization and deserialization mechanism requires the order of the + * fields to be the same across different {@link ALCHEMY_EVENT_TYPES}. Before + * using a getter on a new event filter, make sure that the position of the + * field in serialization is correct. + * + * The getters on this class deserialize the event tag generated by + * {@link getAlchemyEventTag} into the original fields passed into the event. + */ +export declare class EthersEvent extends Event { + /** + * Converts the event tag into the original `fromAddress` field in + * {@link AlchemyPendingTransactionsEventFilter}. + */ + get fromAddress(): string | string[] | undefined; + /** + * Converts the event tag into the original `toAddress` field in + * {@link AlchemyPendingTransactionsEventFilter}. + */ + get toAddress(): string | string[] | undefined; + /** + * Converts the event tag into the original `hashesOnly` field in + * {@link AlchemyPendingTransactionsEventFilter} and {@link AlchemyMinedTransactionsEventFilter}. + */ + get hashesOnly(): boolean | undefined; + get includeRemoved(): boolean | undefined; + get addresses(): NonEmptyArray | undefined; +} +export declare function isAlchemyEvent(event: AlchemyEventType): event is AlchemyMinedTransactionsEventFilter | AlchemyPendingTransactionsEventFilter; +export declare function verifyAlchemyEventName(eventName: AlchemyEventFilter): void; +export declare function deserializeTopics(data: string): any; +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/internal/internal-types.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/internal/internal-types.d.ts new file mode 100644 index 0000000..48cbe2f --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/internal/internal-types.d.ts @@ -0,0 +1,48 @@ +/** This file contains internal types used by the SDK and are not exposed to the end user. */ +declare type JsonRpcId = string | number | null; +/** + * Prefix for `alchemy_pendingTransactions` subscriptions when serializing to + * ethers events. + * + * This tag is used internally by ethers to track different event filters. + */ +export declare const ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE = "alchemy-pending-transactions"; +/** + * Prefix for `alchemy_minedTransactions` subscriptions when serializing to ethers events. + * + * This tag is used internally by ethers to track different event filters. + */ +export declare const ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE = "alchemy-mined-transactions"; +/** + * Array containing all the custom event tags used internally by ethers to track + * event filters. + */ +export declare const ALCHEMY_EVENT_TYPES: string[]; +export interface JsonRpcRequest { + jsonrpc: '2.0'; + method: string; + params?: any[]; + id?: JsonRpcId; +} +export interface JsonRpcResponse { + jsonrpc: '2.0'; + result?: T; + error?: JsonRpcError; + id: JsonRpcId; +} +interface JsonRpcError { + code: number; + message: string; + data?: T; +} +export declare type WebSocketMessage = SingleOrBatchResponse | SubscriptionEvent; +export declare type SingleOrBatchResponse = JsonRpcResponse | JsonRpcResponse[]; +export interface SubscriptionEvent { + jsonrpc: '2.0'; + method: 'eth_subscription'; + params: { + subscription: string; + result: T; + }; +} +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/internal/nft-api.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/internal/nft-api.d.ts new file mode 100644 index 0000000..8eaf6e1 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/internal/nft-api.d.ts @@ -0,0 +1,27 @@ +import { BigNumberish } from '@ethersproject/bignumber'; +import { AlchemyConfig } from '../api/alchemy-config'; +import { BaseNft, Nft, NftContract } from '../api/nft'; +import { GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftResponse, NftAttributeRarity, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, NftTokenType, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult } from '../types/types'; +export declare function getNftMetadata(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, tokenType?: NftTokenType, tokenUriTimeoutInMs?: number, srcMethod?: string): Promise; +export declare function getNftMetadataBatch(config: AlchemyConfig, tokens: Array, options?: NftMetadataBatchOptions): Promise; +export declare function getContractMetadata(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function getNftsForOwnerIterator(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): AsyncIterable; +export declare function getNftsForOwner(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): Promise; +export declare function getNftsForContract(config: AlchemyConfig, contractAddress: string, options?: GetBaseNftsForContractOptions | GetNftsForContractOptions, srcMethod?: string): Promise; +export declare function getNftsForContractIterator(config: AlchemyConfig, contractAddress: string, options?: GetBaseNftsForContractOptions | GetNftsForContractOptions, srcMethod?: string): AsyncIterable; +export declare function getOwnersForContract(config: AlchemyConfig, contractAddress: string, options?: GetOwnersForContractWithTokenBalancesOptions | GetOwnersForContractOptions, srcMethod?: string): Promise; +export declare function getContractsForOwner(config: AlchemyConfig, owner: string, options?: GetContractsForOwnerOptions, srcMethod?: string): Promise; +export declare function getOwnersForNft(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, srcMethod?: string): Promise; +export declare function checkNftOwnership(config: AlchemyConfig, owner: string, contractAddresses: string[], srcMethod?: string): Promise; +export declare function verifyNftOwnership(config: AlchemyConfig, owner: string, contractAddresses: string | string[], srcMethod?: string): Promise; +export declare function isSpamContract(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function getSpamContracts(config: AlchemyConfig, srcMethod?: string): Promise; +export declare function getFloorPrice(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function getNftSales(config: AlchemyConfig, options?: GetNftSalesOptions | GetNftSalesOptionsByContractAddress, srcMethod?: string): Promise; +export declare function computeRarity(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, srcMethod?: string): Promise; +export declare function searchContractMetadata(config: AlchemyConfig, query: string, srcMethod?: string): Promise; +export declare function summarizeNftAttributes(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function refreshNftMetadata(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, srcMethod?: string): Promise; +export declare function refreshContract(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/internal/raw-interfaces.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/internal/raw-interfaces.d.ts new file mode 100644 index 0000000..0b85271 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/internal/raw-interfaces.d.ts @@ -0,0 +1,113 @@ +import { Media, NftSaleFeeData, NftSpamClassification } from '../types/types'; +export interface RawSpamInfo { + isSpam: string; + /** A list of reasons why an NFT contract was marked as spam. */ + classifications: NftSpamClassification[]; +} +/** OpenSea's metadata for an NFT collection. */ +export interface RawOpenSeaCollectionMetadata { + floorPrice?: number; + collectionName?: string; + safelistRequestStatus?: string; + imageUrl?: string; + description?: string; + externalUrl?: string; + twitterUsername?: string; + discordUrl?: string; + lastIngestedAt?: string; +} +export interface RawGetOwnersForContractWithTokenBalancesResponse { + ownerAddresses: RawOwnerAddress[]; + pageKey?: string; +} +export interface RawOwnerAddress { + ownerAddress: string; + tokenBalances: RawTokenBalances[]; +} +export interface RawTokenBalances { + tokenId: string; + balance: number; +} +export interface RawReingestContractResponse { + contractAddress: string; + reingestionState: string; + progress: string | null; +} +export interface RawWebhook { + id: string; + network: string; + webhook_type: string; + webhook_url: string; + is_active: boolean; + time_created: number; + signing_key: string; + version: string; + app_id?: string; +} +export interface RawWebhookPagination { + cursors: { + after?: string; + }; + total_count: number; +} +export interface RawGetAllWebhooksResponse { + data: RawWebhook[]; +} +export interface RawAddressActivityResponse { + data: string[]; + pagination: RawWebhookPagination; +} +export interface RawNftFilter { + contract_address: string; + token_id: string; +} +export interface RawNftFiltersResponse { + data: RawNftFilter[]; + pagination: RawWebhookPagination; +} +export interface RawCreateWebhookResponse { + data: RawWebhook; +} +export interface RawNftFilterParam { + contract_address: string; + token_id: string; +} +export interface RawNftAttributeRarity { + value: string; + trait_type: string; + prevalence: number; +} +export interface RawGetNftSalesResponse { + pageKey?: string; + nftSales: RawNftSale[]; +} +export interface RawNftSale { + marketplace: string; + contractAddress: string; + tokenId: string; + quantity: string; + buyerAddress: string; + sellerAddress: string; + taker: string; + sellerFee: NftSaleFeeData; + marketplaceFee?: NftSaleFeeData; + royaltyFee?: NftSaleFeeData; + blockNumber: number; + logIndex: number; + bundleIndex: number; + transactionHash: string; +} +export interface RawGetContractsForOwnerResponse { + contracts: RawContractForOwner[]; + pageKey?: string; + totalCount: number; +} +export interface RawContractForOwner extends Omit { + address: string; + totalBalance: number; + numDistinctTokensOwned: number; + isSpam: boolean; + tokenId: string; + media: Media; + opensea?: RawOpenSeaCollectionMetadata; +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/internal/request-batcher.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/internal/request-batcher.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/internal/request-batcher.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/internal/websocket-backfiller.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/internal/websocket-backfiller.d.ts new file mode 100644 index 0000000..63730de --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/internal/websocket-backfiller.d.ts @@ -0,0 +1,53 @@ +export interface BatchPart { + method: string; + params?: any; +} +export interface NewHeadsEvent { + author: string; + difficulty: string; + extraData: string; + gasLimit: string; + gasUsed: string; + hash: string; + logsBloom: string; + miner: string; + mixHash: string; + nonce: string; + number: string; + parentHash: string; + receiptsRoot: string; + sealFields: string[]; + sha3Uncles: string; + size: string; + stateRoot: string; + timestamp: string; + transactionsRoot: string; +} +/** The return type of eth_getBlocksByHash. */ +export interface BlockHead extends NewHeadsEvent { + totalDifficulty: string; + transactions: any[]; + uncles: string[]; +} +export interface LogsEvent { + address: string; + blockHash: string; + blockNumber: string; + data: string; + logIndex: string; + topics: string[]; + transactionHash: string; + transactionIndex: string; + removed?: boolean; +} +export interface LogsSubscriptionFilter { + address?: string | string[]; + topics?: Array; +} +export interface GetLogsOptions extends LogsSubscriptionFilter { + fromBlock?: string; + toBlock?: string; +} +export declare function dedupeNewHeads(events: NewHeadsEvent[]): NewHeadsEvent[]; +export declare function dedupeLogs(events: LogsEvent[]): LogsEvent[]; +export declare function throwIfCancelled(isCancelled: () => boolean): void; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/types/types.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/types/types.d.ts new file mode 100644 index 0000000..ed47247 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/types/types.d.ts @@ -0,0 +1,1523 @@ +import { EventType, TransactionReceipt } from '@ethersproject/abstract-provider'; +import { BigNumberish } from '@ethersproject/bignumber'; +import { BaseNft, Nft, NftContract } from '../api/nft'; +/** + * Options object used to configure the Alchemy SDK. + * + * @public + */ +export interface AlchemySettings { + /** + * The Alchemy API key that can be found in the Alchemy dashboard. + * + * Defaults to: "demo" (a rate-limited public API key) + */ + apiKey?: string; + /** + * The name of the network. Once configured, the network cannot be changed. To + * use a different network, instantiate a new `Alchemy` instance. + * + * Defaults to: Network.ETH_MAINNET + */ + network?: Network; + /** The maximum number of retries to attempt if a request fails. Defaults to 5. */ + maxRetries?: number; + /** + * Optional URL endpoint to use for all requests. Setting this field will + * override the URL generated by the {@link network} and {@link apiKey} fields. + * + * This field is useful for testing or for using a custom node endpoint. Note + * that not all methods will work with custom URLs. + */ + url?: string; + /** + * Alchemy auth token required to use the Notify API. This token can be found + * in the Alchemy Dashboard on the Notify tab. + */ + authToken?: string; + /** + * Optional setting that automatically batches and sends json-rpc requests for + * higher throughput and reduced network IO. Defaults to false. + * + * This implementation is based on the `JsonRpcBatchProvider` in ethers. + */ + batchRequests?: boolean; +} +/** + * The supported networks by Alchemy. Note that some functions are not available + * on all networks. Please refer to the Alchemy documentation for which APIs are + * available on which networks + * {@link https://docs.alchemy.com/alchemy/apis/feature-support-by-chain} + * + * @public + */ +export declare enum Network { + ETH_MAINNET = "eth-mainnet", + /** @deprecated - Will be removed in subsequent versions */ + ETH_ROPSTEN = "eth-ropsten", + ETH_GOERLI = "eth-goerli", + /** @deprecated - Will be removed in subsequent versions */ + ETH_KOVAN = "eth-kovan", + /** @deprecated - Will be removed in subsequent versions */ + ETH_RINKEBY = "eth-rinkeby", + OPT_MAINNET = "opt-mainnet", + /** @deprecated - Will be removed in subsequent versions */ + OPT_KOVAN = "opt-kovan", + OPT_GOERLI = "opt-goerli", + ARB_MAINNET = "arb-mainnet", + /** @deprecated - Will be removed in subsequent versions */ + ARB_RINKEBY = "arb-rinkeby", + ARB_GOERLI = "arb-goerli", + MATIC_MAINNET = "polygon-mainnet", + MATIC_MUMBAI = "polygon-mumbai", + ASTAR_MAINNET = "astar-mainnet" +} +/** Token Types for the `getTokenBalances()` endpoint. */ +export declare enum TokenBalanceType { + /** + * Option to fetch the top 100 tokens by 24-hour volume. This option is only + * available on Mainnet in Ethereum, Polygon, and Arbitrum. + */ + DEFAULT_TOKENS = "DEFAULT_TOKENS", + /** + * Option to fetch the set of ERC-20 tokens that the address as ever held. his + * list is produced by an address's historical transfer activity and includes + * all tokens that the address has ever received. + */ + ERC20 = "erc20" +} +/** + * Optional params to pass into `getTokenBalances()` to fetch all ERC-20 tokens + * instead of passing in an array of contract addresses to fetch balances for. + */ +export interface TokenBalancesOptionsErc20 { + /** The ERC-20 token type. */ + type: TokenBalanceType.ERC20; + /** Optional page key for pagination (only applicable to TokenBalanceType.ERC20) */ + pageKey?: string; +} +/** + * Optional params to pass into `getTokenBalances()` to fetch the top 100 tokens + * instead of passing in an array of contract addresses to fetch balances for. + */ +export interface TokenBalancesOptionsDefaultTokens { + /** The top 100 token type. */ + type: TokenBalanceType.DEFAULT_TOKENS; +} +/** + * Response object for when the {@link TokenBalancesOptionsErc20} options are + * used. A page key may be returned if the provided address has many transfers. + */ +export interface TokenBalancesResponseErc20 extends TokenBalancesResponse { + /** + * An optional page key to passed into the next request to fetch the next page + * of token balances. + */ + pageKey?: string; +} +/** @public */ +export interface TokenBalancesResponse { + address: string; + tokenBalances: TokenBalance[]; +} +/** @public */ +export declare type TokenBalance = TokenBalanceSuccess | TokenBalanceFailure; +/** @public */ +export interface TokenBalanceSuccess { + contractAddress: string; + tokenBalance: string; + error: null; +} +/** @public */ +export interface TokenBalanceFailure { + contractAddress: string; + tokenBalance: null; + error: string; +} +/** + * Response object for the {@link CoreNamespace.getTokenMetadata} method. + * + * @public + */ +export interface TokenMetadataResponse { + /** + * The token's name. Is `null` if the name is not defined in the contract and + * not available from other sources. + */ + name: string | null; + /** + * The token's symbol. Is `null` if the symbol is not defined in the contract + * and not available from other sources. + */ + symbol: string | null; + /** + * The number of decimals of the token. Returns `null` if not defined in the + * contract and not available from other sources. + */ + decimals: number | null; + /** URL link to the token's logo. Is `null` if the logo is not available. */ + logo: string | null; +} +/** + * Parameters for the {@link CoreNamespace.getAssetTransfers} method. + * + * @public + */ +export interface AssetTransfersParams { + /** + * The starting block to check for transfers. This value is inclusive and + * defaults to `0x0` if omitted. + */ + fromBlock?: string; + /** + * The ending block to check for transfers. This value is inclusive and + * defaults to the latest block if omitted. + */ + toBlock?: string; + /** + * Whether to return results in ascending or descending order by block number. + * Defaults to ascending if omitted. + */ + order?: SortingOrder; + /** + * The from address to filter transfers by. This value defaults to a wildcard + * for all addresses if omitted. + */ + fromAddress?: string; + /** + * The to address to filter transfers by. This value defaults to a wildcard + * for all address if omitted. + */ + toAddress?: string; + /** + * List of contract addresses to filter for - only applies to "erc20", + * "erc721", "erc1155" transfers. Defaults to all address if omitted. + */ + contractAddresses?: string[]; + /** + * Whether to exclude transfers with zero value. Note that zero value is + * different than null value. Defaults to `false` if omitted. + */ + excludeZeroValue?: boolean; + /** REQUIRED field. An array of categories to get transfers for. */ + category: AssetTransfersCategory[]; + /** The maximum number of results to return per page. Defaults to 1000 if omitted. */ + maxCount?: number; + /** + * Optional page key from an existing {@link OwnedBaseNftsResponse} + * {@link AssetTransfersResult}to use for pagination. + */ + pageKey?: string; + /** + * Whether to include additional metadata about each transfer event. Defaults + * to `false` if omitted. + */ + withMetadata?: boolean; +} +/** + * Parameters for the {@link CoreNamespace.getAssetTransfers} method that + * includes metadata. + * + * @public + */ +export interface AssetTransfersWithMetadataParams extends AssetTransfersParams { + withMetadata: true; +} +/** + * Categories of transfers to use with the {@link AssetTransfersParams} request + * object when using {@link CoreNamespace.getAssetTransfers}. + * + * @public + */ +export declare enum AssetTransfersCategory { + /** + * Top level ETH transactions that occur where the `fromAddress` is an + * external user-created address. External addresses have private keys and are + * accessed by users. + */ + EXTERNAL = "external", + /** + * Top level ETH transactions that occur where the `fromAddress` is an + * internal, smart contract address. For example, a smart contract calling + * another smart contract or sending + */ + INTERNAL = "internal", + /** ERC20 transfers. */ + ERC20 = "erc20", + /** ERC721 transfers. */ + ERC721 = "erc721", + /** ERC1155 transfers. */ + ERC1155 = "erc1155", + /** Special contracts that don't follow ERC 721/1155, (ex: CryptoKitties). */ + SPECIALNFT = "specialnft" +} +/** + * Enum for the order of the {@link AssetTransfersParams} request object when + * using {@link CoreNamespace.getAssetTransfers}. + * + * @deprecated Use {@link SortingOrder} instead. This enum will be removed in a + * future version. + * @public + */ +export declare enum AssetTransfersOrder { + ASCENDING = "asc", + DESCENDING = "desc" +} +/** + * An enum for specifying the token type on NFTs. + * + * @public + */ +export declare enum NftTokenType { + ERC721 = "ERC721", + ERC1155 = "ERC1155", + UNKNOWN = "UNKNOWN" +} +/** + * Response object for the {@link CoreNamespace.getAssetTransfers} method. + * + * @public + */ +export interface AssetTransfersResponse { + transfers: AssetTransfersResult[]; + /** Page key for the next page of results, if one exists. */ + pageKey?: string; +} +/** + * Response object for the {@link CoreNamespace.getAssetTransfers} method when + * the {@link AssetTransfersWithMetadataParams} are used. + * + * @public + */ +export interface AssetTransfersWithMetadataResponse { + transfers: AssetTransfersWithMetadataResult[]; + pageKey?: string; +} +/** + * Represents a transfer event that is returned in a {@link AssetTransfersResponse}. + * + * @public + */ +export interface AssetTransfersResult { + /** The unique ID of the transfer. */ + uniqueId: string; + /** The category of the transfer. */ + category: AssetTransfersCategory; + /** The block number where the transfer occurred. */ + blockNum: string; + /** The from address of the transfer. */ + from: string; + /** The to address of the transfer. */ + to: string | null; + /** + * Converted asset transfer value as a number (raw value divided by contract + * decimal). `null` if ERC721 transfer or contract decimal not available. + */ + value: number | null; + /** + * The raw ERC721 token id of the transfer as a hex string. `null` if not an + * ERC721 transfer. + */ + erc721TokenId: string | null; + /** + * A list of ERC1155 metadata objects if the asset transferred is an ERC1155 + * token. `null` if not an ERC1155 transfer. + */ + erc1155Metadata: ERC1155Metadata[] | null; + /** The token id of the token transferred. */ + tokenId: string | null; + /** + * Returns the token's symbol or ETH for other transfers. `null` if the + * information was not available. + */ + asset: string | null; + /** The transaction hash of the transfer transaction. */ + hash: string; + /** Information about the raw contract of the asset transferred. */ + rawContract: RawContract; +} +/** + * Represents a transfer event that is returned in a + * {@link AssetTransfersResponse} when {@link AssetTransfersWithMetadataParams} are used. + * + * @public + */ +export interface AssetTransfersWithMetadataResult extends AssetTransfersResult { + /** Additional metadata about the transfer event. */ + metadata: AssetTransfersMetadata; +} +/** + * The metadata object for a {@link AssetTransfersResult} when the + * {@link AssetTransfersParams.withMetadata} field is set to true. + * + * @public + */ +export interface AssetTransfersMetadata { + /** Timestamp of the block from which the transaction event originated. */ + blockTimestamp: string; +} +/** + * Represents NFT metadata that holds fields. Note that since there is no + * standard metadata format, the fields are not guaranteed to be present. + * + * @public + */ +export interface NftMetadata extends Record { + /** Name of the NFT asset. */ + name?: string; + /** A human-readable description of the NFT asset. */ + description?: string; + /** URL to the NFT asset image. */ + image?: string; + /** + * The image URL that appears along the top of the NFT asset page. This tends + * to be the highest resolution image. + */ + external_url?: string; + /** Background color of the NFT item. Usually defined as a 6 character hex string. */ + background_color?: string; + /** The traits, attributes, and characteristics for the NFT asset. */ + attributes?: Array>; +} +/** + * Represents the URI information the NFT's metadata. + * + * @public + */ +export interface TokenUri { + /** + * URI for the location of the NFT's original metadata blob (ex: the original + * IPFS link). + */ + raw: string; + /** Public gateway URI for the raw URI. Generally offers better performance. */ + gateway: string; +} +/** + * Represents the URI information for the NFT's media assets. + * + * @public + */ +export interface Media { + /** + * URI for the location of the NFT's original metadata blob for media (ex: the + * original IPFS link). + */ + raw: string; + /** Public gateway URI for the raw URI. Generally offers better performance. */ + gateway: string; + /** URL for a resized thumbnail of the NFT media asset. */ + thumbnail?: string; + /** + * The media format (ex: jpg, gif, png) of the {@link gateway} and + * {@link thumbnail} assets. + */ + format?: string; + /** + * DEPRECATED - The size of the media asset in bytes + * + * @deprecated - Please use {@link bytes} instead. This field will be removed + * in a subsequent release. + */ + size?: number; + /** The size of the media asset in bytes. */ + bytes?: number; +} +/** Potential reasons why an NFT contract was classified as spam. */ +export declare enum NftSpamClassification { + Erc721TooManyOwners = "Erc721TooManyOwners", + Erc721TooManyTokens = "Erc721TooManyTokens", + Erc721DishonestTotalSupply = "Erc721DishonestTotalSupply", + MostlyHoneyPotOwners = "MostlyHoneyPotOwners", + OwnedByMostHoneyPots = "OwnedByMostHoneyPots" +} +/** Detailed information on whether and why an NFT contract was classified as spam. */ +export interface SpamInfo { + isSpam: boolean; + /** A list of reasons why an NFT contract was marked as spam. */ + classifications: NftSpamClassification[]; +} +/** + * Optional parameters object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. + * + * This interface is used to fetch NFTs with their associated metadata. To get + * Nfts without their associated metadata, use {@link GetBaseNftsForOwnerOptions}. + * + * @public + */ +export interface GetNftsForOwnerOptions { + /** + * Optional page key from an existing {@link OwnedBaseNftsResponse} or + * {@link OwnedNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional list of contract addresses to filter the results by. Limit is 20. */ + contractAddresses?: string[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are excluded from the response. + */ + excludeFilters?: NftFilters[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are included in the response. + */ + includeFilters?: NftFilters[]; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; + /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */ + omitMetadata?: boolean; + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; + /** + * Order in which to return results. By default, results are ordered by + * contract address and token ID in lexicographic order. + */ + orderBy?: NftOrdering; +} +/** + * Optional parameters object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. + * + * This interface is used to fetch NFTs without their associated metadata. To + * get Nfts with their associated metadata, use {@link GetNftsForOwnerOptions}. + * + * @public + */ +export interface GetBaseNftsForOwnerOptions { + /** + * Optional page key from an existing {@link OwnedBaseNftsResponse} or + * {@link OwnedNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional list of contract addresses to filter the results by. Limit is 20. */ + contractAddresses?: string[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are excluded from the response. + */ + excludeFilters?: NftFilters[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are included in the response. + */ + includeFilters?: NftFilters[]; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; + /** Optional boolean flag to include NFT metadata. Defaults to `false`. */ + omitMetadata: true; + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; + /** + * Order in which to return results. By default, results are ordered by + * contract address and token ID in lexicographic order. + */ + orderBy?: NftOrdering; +} +/** + * Enum of NFT filters that can be applied to a {@link getNftsForOwner} request. + * NFTs that match one or more of these filters are excluded from the response. + * + * - @deprecated Use {@link NftFilters} instead. This enum will be removed in a + * future version. + * + * @beta + */ +export declare enum NftExcludeFilters { + /** Exclude NFTs that have been classified as spam. */ + SPAM = "SPAM", + /** Exclude NFTs that have been airdropped to a user. */ + AIRDROPS = "AIRDROPS" +} +/** + * Enum of NFT filters that can be applied to a {@link getNftsForOwner} or a + * {@link getContractsForOwner} request. + * + * @beta + */ +export declare enum NftFilters { + /** NFTs that have been classified as spam. */ + SPAM = "SPAM", + /** NFTs that have been airdropped to a user. */ + AIRDROPS = "AIRDROPS" +} +/** + * Enum of ordering that can be applied to a {@link getNftsForOwner} or a + * {@link getContractsForOwner} response. + * + * @beta + */ +export declare enum NftOrdering { + TRANSFERTIME = "TRANSFERTIME" +} +/** + * The response object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. The object contains the NFTs with + * metadata owned by the provided address, along with pagination information and + * the total count. + * + * @public + */ +export interface OwnedNftsResponse { + /** The NFTs owned by the provided address. */ + readonly ownedNfts: OwnedNft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + readonly pageKey?: string; + /** The total count of NFTs owned by the provided address. */ + readonly totalCount: number; +} +/** + * The response object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. The object contains the NFTs + * without metadata owned by the provided address, along with pagination + * information and the total count. + * + * @public + */ +export interface OwnedBaseNftsResponse { + /** The NFTs owned by the provided address. */ + readonly ownedNfts: OwnedBaseNft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + readonly pageKey?: string; + /** The total count of NFTs owned by the provided address. */ + readonly totalCount: number; +} +/** + * Represents an NFT with metadata owned by an address. + * + * @public + */ +export interface OwnedNft extends Nft { + /** The token balance of the NFT. */ + readonly balance: number; +} +/** + * Represents an NFT without metadata owned by an address. + * + * @public + */ +export interface OwnedBaseNft extends BaseNft { + /** The token balance of the NFT. */ + readonly balance: number; +} +/** + * The response object for the {@link getOwnersForNft}. + * + * @public + */ +export interface GetOwnersForNftResponse { + /** An array of owner addresses for the provided token. */ + readonly owners: string[]; +} +/** + * The response object for the {@link getOwnersForContract}. + * + * @public + */ +export interface GetOwnersForContractResponse { + /** An array of owner addresses for the provided contract address */ + owners: string[]; +} +/** + * The response object for the {@link getOwnersForContract}. + * + * @public + */ +export interface GetOwnersForContractWithTokenBalancesResponse { + /** An array of owner addresses for the provided contract address */ + owners: NftContractOwner[]; + /** Optional page key that is returned when a collection has more than 50,000 owners. */ + pageKey?: string; +} +/** + * An object representing the owner of an NFT and its corresponding token + * balances in a {@link GetOwnersForContractWithTokenBalancesResponse} object. + */ +export interface NftContractOwner { + /** The NFT's owner address. */ + ownerAddress: string; + /** A list of objects containing token balances for the provided NFT contract. */ + tokenBalances: NftContractTokenBalance[]; +} +/** + * An object representing the owned token and balance values in a + * {@link GetOwnersForContractWithTokenBalancesResponse} object. + */ +export interface NftContractTokenBalance { + /** The token id owned in the NFT contract. */ + tokenId: string; + /** The token Id balance for the provided owner. */ + balance: number; +} +/** + * Represents an NFT token to fetch metadata for in a + * {@link NftNamespace.getNftMetadataBatch} method. + */ +export interface NftMetadataBatchToken { + /** The NFT contract address. Limited to ERC721 and ERC1155 tokens. */ + contractAddress: string; + /** The id of the NFT. */ + tokenId: BigNumberish; + /** Optional field to specify the type of token to speed up the query. */ + tokenType?: NftTokenType.ERC1155 | NftTokenType.ERC721; +} +/** Additional options for the {@link NftNamespace.getNftMetadataBatch} method. */ +export interface NftMetadataBatchOptions { + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; + /** + * Whether to refresh the metadata for the given NFT token before returning + * the response. Defaults to false for faster response times. + */ + refreshCache?: boolean; +} +/** + * The successful object returned by the {@link getFloorPrice} call for each + * marketplace (e.g. looksRare). + * + * @public + */ +export interface FloorPriceMarketplace { + /** The floor price of the collection on the given marketplace */ + readonly floorPrice: number; + /** The currency in which the floor price is denominated */ + readonly priceCurrency: string; + /** The link to the collection on the given marketplace */ + readonly collectionUrl: string; + /** UTC timestamp of when the floor price was retrieved from the marketplace */ + readonly retrievedAt: string; +} +/** + * The failing object returned by the {@link getFloorPrice} call for each + * marketplace (e.g. looksRare). + * + * @public + */ +export interface FloorPriceError { + /** Error fetching floor prices from the given marketplace */ + readonly error: string; +} +/** + * The response object for the {@link getFloorPrice} method. + * + * @public + */ +export interface GetFloorPriceResponse { + /** + * Name of the NFT marketplace where the collection is listed. Current + * marketplaces supported: OpenSea, LooksRare + */ + readonly openSea: FloorPriceMarketplace | FloorPriceError; + readonly looksRare: FloorPriceMarketplace | FloorPriceError; +} +/** + * Optional parameters object for the the {@link getContractsForOwner} method + * + * @public + */ +export interface GetContractsForOwnerOptions { + /** Key for pagination to use to fetch results from the next page if available. */ + pageKey?: string; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are included in the response. May not be used in + * conjunction with {@link excludeFilters}. + */ + includeFilters?: NftFilters[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are excluded from the response. May not be used in + * conjunction with {@link includeFilters} + */ + excludeFilters?: NftFilters[]; + /** + * Order in which to return results. By default, results are ordered by + * contract address and token ID in lexicographic order. + */ + orderBy?: NftOrdering; +} +/** + * The response for the {@link NftNamespace.getContractsForOwner} method. + * + * @public + */ +export interface GetContractsForOwnerResponse { + /** The list of contracts, that match the query, held by the given address. */ + contracts: ContractForOwner[]; + /** Key for pagination to use to fetch results from the next page if available. */ + pageKey?: string; + /** Total number of NFT contracts held by the given address. */ + totalCount: number; +} +/** Represents a single NFT contract data in the {@link GetContractsForOwnerResponse}. */ +export interface ContractForOwner extends NftContract { + /** + * Sum of NFT balances across all token IDs held by the owner. For + * non-fungible tokens this will be equal to the numDistinctTokensOwned, but + * it may be higher if the user holds some fungible ERC1155 tokens. + */ + totalBalance: number; + /** + * Number of distinct token IDs held by the owner. For non-fungible tokens + * this will be equal to the totalBalance, but it may be lower if the user + * holds some fungible ERC1155 tokens. + */ + numDistinctTokensOwned: number; + isSpam: boolean; + /** One of the tokens from this contract held by the owner. */ + tokenId: string; + /** Alternative NFT metadata for this contract to be parsed manually. */ + media: Media; +} +/** + * Optional parameters object for the {@link getNftSales} endpoint. + * + * This interface is used to filter the NFT sales data. + * + * @public + */ +export interface GetNftSalesOptions { + /** The block number to start fetching NFT sales data from. */ + fromBlock?: number | 'latest'; + /** The block number limit to fetch NFT sales data from. */ + toBlock?: number | 'latest'; + /** Whether to return the results in ascending or descending order by block number. */ + order?: SortingOrder; + /** The NFT marketplace to filter sales by. */ + marketplace?: NftSaleMarketplace; + /** The address of the NFT buyer to filter sales by. */ + buyerAddress?: string; + /** The address of the NFT seller to filter sales by. */ + sellerAddress?: string; + /** + * Filter by whether the buyer or seller was the taker in the NFT trade. + * Defaults to returning both buyer and seller taker trades. + */ + taker?: NftSaleTakerType; + /** The maximum number of NFT sales to return. */ + limit?: number; + /** Key for pagination to use to fetch results from the next page if available. */ + pageKey?: string; +} +/** + * Alternative optional parameters object for the {@link getNftSales} endpoint + * that allows filtering results by contractAddress. + * + * This interface is used to filter the NFT sales data. + * + * @public + */ +export interface GetNftSalesOptionsByContractAddress extends GetNftSalesOptions { + /** The contract address of a NFT collection to filter sales by. */ + contractAddress: string; + /** The token ID of an NFT within the specified contractAddress to filter sales by. */ + tokenId?: BigNumberish; +} +/** + * The response for the {@link NftNamespace.getNftSales} method. + * + * @public + */ +export interface GetNftSalesResponse { + /** The page key to use to fetch the next page if more results are available. */ + pageKey?: string; + /** List of NFT sales that match the query */ + nftSales: NftSale[]; +} +/** Represents a single NFT sale data in the {@link GetNftSalesResponse}. */ +export interface NftSale { + /** The marketplace the sale took place on. */ + marketplace: NftSaleMarketplace; + /** The NFT contract address. */ + contractAddress: string; + /** The decimal token ID of the NFT being sold. */ + tokenId: string; + /** The number of tokens sold in the sale as a decimal integer string. */ + quantity: string; + /** The address of the buyer in the NFT sale. */ + buyerAddress: string; + /** The address of the seller in the NFT sale. */ + sellerAddress: string; + /** Whether the price taker in the trade was the buyer or the seller. */ + taker: NftSaleTakerType; + /** The payment from buyer to the seller. */ + sellerFee: NftSaleFeeData; + /** The payment from buyer to the marketplace. */ + marketplaceFee?: NftSaleFeeData; + /** The payment from buyer to the royalty address of the NFT collection. */ + royaltyFee?: NftSaleFeeData; + /** The block number the NFT sale took place in. */ + blockNumber: number; + /** The log number of the sale event emitted within the block. */ + logIndex: number; + /** The index of the token within the bundle of NFTs sold in the sale. */ + bundleIndex: number; + /** The transactionHash of the NFT sale. */ + transactionHash: string; +} +/** + * Fee detail for an NFT sale. + * + * @public + */ +export interface NftSaleFeeData { + /** The fee payment amount as a decimal integer string. */ + amount: string; + /** The symbol of the token used for the payment. */ + symbol: string; + /** The number of decimals of the token used for the payment. */ + decimal: number; +} +/** + * Enum for representing the supported sorting orders of the API. + * + * @public + */ +export declare enum SortingOrder { + ASCENDING = "asc", + DESCENDING = "desc" +} +/** + * Enum representing the supported NFT marketplaces by the {@link getNftSales} endpoint. + * + * @public + */ +export declare enum NftSaleMarketplace { + SEAPORT = "seaport", + LOOKSRARE = "looksrare", + X2Y2 = "x2y2", + UNKNOWN = "unknown" +} +/** + * Enum for specifing the taker type for the {@link getNftSales} endpoint. + * + * @public + */ +export declare enum NftSaleTakerType { + BUYER = "buyer", + SELLER = "seller" +} +/** + * Information about the rarity of an NFT's attribute in the specified collection. + * + * @public + */ +export interface NftAttributeRarity { + /** Name of the NFT's attribute. */ + value: string; + /** The type of NFT attribute. */ + traitType: string; + /** + * A number from 0 to 1 representing the prevalence of this value for this + * trait type in the current collection. + */ + prevalence: number; +} +/** + * Summary of the attribute prevalence for the specified NFT contract. + * + * @public + */ +export interface NftAttributesResponse { + /** The specified NFT contract's address. */ + contractAddress: string; + /** The specified NFT contract's total supply. */ + totalSupply: number; + /** + * The attribute prevalence of each trait grouped by the trait type for the + * provided NFT. + */ + summary: Record>; +} +/** The refresh result response object returned by {@link refreshContract}. */ +export interface RefreshContractResult { + /** The NFT contract address that was passed in to be refreshed. */ + contractAddress: string; + /** The current state of the refresh request. */ + refreshState: RefreshState; + /** + * Percentage of tokens currently refreshed, represented as an integer string. + * Field can be null if the refresh has not occurred. + */ + progress: string | null; +} +/** The current state of the NFT contract refresh process. */ +export declare enum RefreshState { + /** The provided contract is not an NFT or does not contain metadata. */ + DOES_NOT_EXIST = "does_not_exist", + /** The contract has already been queued for refresh. */ + ALREADY_QUEUED = "already_queued", + /** The contract is currently being refreshed. */ + IN_PROGRESS = "in_progress", + /** The contract refresh is complete. */ + FINISHED = "finished", + /** The contract refresh has been queued and await execution. */ + QUEUED = "queued", + /** The contract was unable to be queued due to an internal error. */ + QUEUE_FAILED = "queue_failed" +} +/** + * The parameter field of {@link TransactionReceiptsParams}. + * + * @public + */ +export interface TransactionReceiptsBlockNumber { + /** The block number to get transaction receipts for. */ + blockNumber: string; +} +/** + * The parameter field of {@link TransactionReceiptsParams}. + * + * @public + */ +export interface TransactionReceiptsBlockHash { + /** The block hash to get transaction receipts for. */ + blockHash: string; +} +/** + * The parameters to use with the {@link CoreNamespace.getTransactionReceipts} method. + * + * @public + */ +export declare type TransactionReceiptsParams = TransactionReceiptsBlockNumber | TransactionReceiptsBlockHash; +/** + * Response object for a {@link CoreNamespace.getTransactionReceipts} call. + * + * @public + */ +export interface TransactionReceiptsResponse { + /** A list of transaction receipts for the queried block. */ + receipts: TransactionReceipt[] | null; +} +/** + * Metadata object returned in a {@link AssetTransfersResult} object if the asset + * transferred is an ERC1155. + * + * @public + */ +export interface ERC1155Metadata { + tokenId: string; + value: string; +} +/** + * Information about the underlying contract for the asset that was transferred + * in a {@link AssetTransfersResult} object. + * + * @public + */ +export interface RawContract { + /** + * The raw transfer value as a hex string. `null` if the transfer was for an + * ERC721 or ERC1155 token. + */ + value: string | null; + /** The contract address. `null` if it was an internal or external transfer. */ + address: string | null; + /** + * The number of decimals in the contract as a hex string. `null` if the value + * is not in the contract and not available from other sources. + */ + decimal: string | null; +} +/** + * Optional parameters object for the {@link getNftsForContract} and + * {@link getNftsForContractIterator} functions. + * + * This interface is used to fetch NFTs with their associated metadata. To get + * Nfts without their associated metadata, use {@link GetBaseNftsForContractOptions}. + * + * @public + */ +export interface GetNftsForContractOptions { + /** + * Optional page key from an existing {@link NftContractBaseNftsResponse} or + * {@link NftContractNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */ + omitMetadata?: boolean; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; +} +/** + * Optional parameters object for the {@link getNftsForContract} and + * {@link getNftsForContractIterator} functions. + * + * This interface is used to fetch NFTs without their associated metadata. To + * get Nfts with their associated metadata, use {@link GetNftsForContractOptions}. + * + * @public + */ +export interface GetBaseNftsForContractOptions { + /** + * Optional page key from an existing {@link NftContractBaseNftsResponse} or + * {@link NftContractNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */ + omitMetadata: false; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; +} +/** + * Optional parameters object for the {@link getNftsForContract} method. + * + * This interface configures options when fetching the owner addresses of the + * provided contract. + * + * @public + */ +export interface GetOwnersForContractOptions { + /** + * Whether to include the token balances per token id for each owner. Defaults + * to false when omitted. + */ + withTokenBalances?: boolean; + /** The block number in hex or decimal to fetch owners for. */ + block?: string; + /** Optional page key to paginate the next page for large requests. */ + pageKey?: string; +} +/** + * Optional parameters object for the {@link getNftsForContract} method. + * + * This interface configures options when fetching the owner addresses of the + * provided contract. + * + * @public + */ +export interface GetOwnersForContractWithTokenBalancesOptions { + /** + * Whether to include the token balances per token id for each owner. Defaults + * to false when omitted. + */ + withTokenBalances: true; + /** The block number in hex or decimal to fetch owners for. */ + block?: string; + /** Optional page key to paginate the next page for large requests. */ + pageKey?: string; +} +/** + * The response object for the {@link getNftsForContract} function. The object + * contains the NFTs without metadata inside the NFT contract. + * + * @public + */ +export interface NftContractBaseNftsResponse { + /** An array of NFTs without metadata. */ + nfts: BaseNft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + pageKey?: string; +} +/** + * The response object for the {@link getNftsForContract} function. The object + * contains the NFTs with metadata inside the NFT contract. + * + * @public + */ +export interface NftContractNftsResponse { + /** An array of NFTs with metadata. */ + nfts: Nft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + pageKey?: string; +} +/** OpenSea's metadata for an NFT collection. */ +export interface OpenSeaCollectionMetadata { + /** The floor price of the NFT. */ + floorPrice?: number; + /** The name of the collection on OpenSea. */ + collectionName?: string; + /** The approval status of the collection on OpenSea. */ + safelistRequestStatus?: OpenSeaSafelistRequestStatus; + /** The image URL determined by OpenSea. */ + imageUrl?: string; + /** The description of the collection on OpenSea. */ + description?: string; + /** The homepage of the collection as determined by OpenSea. */ + externalUrl?: string; + /** The Twitter handle of the collection. */ + twitterUsername?: string; + /** The Discord URL of the collection. */ + discordUrl?: string; + /** Timestamp of when the OpenSea metadata was last ingested by Alchemy. */ + lastIngestedAt?: string; +} +/** An OpenSea collection's approval status. */ +export declare enum OpenSeaSafelistRequestStatus { + /** Verified collection. */ + VERIFIED = "verified", + /** Collections that are approved on open sea and can be found in search results. */ + APPROVED = "approved", + /** Collections that requested safelisting on OpenSea. */ + REQUESTED = "requested", + /** Brand new collections. */ + NOT_REQUESTED = "not_requested" +} +/** + * The response object for the {@link findContractDeployer} function. + * + * @public + */ +export interface DeployResult { + /** The address of the contract deployer, if it is available. */ + readonly deployerAddress?: string; + /** The block number the contract was deployed in. */ + readonly blockNumber: number; +} +/** + * Method names for Alchemy's custom Subscription API endpoints. + * + * This value is provided in the `method` field when creating an event filter on + * the Websocket Namespace. + */ +export declare enum AlchemySubscription { + PENDING_TRANSACTIONS = "alchemy_pendingTransactions", + MINED_TRANSACTIONS = "alchemy_minedTransactions" +} +/** + * Event filter for the {@link AlchemyWebSocketProvider.on} and + * {@link AlchemyWebSocketProvider.once} methods to use Alchemy's custom + * `alchemy_pendingTransactions` endpoint. + * + * Returns the transaction information for all pending transactions that match a + * given filter. For full documentation, see: + * {@link https://docs.alchemy.com/reference/alchemy-pendingtransactions} + * + * Note that excluding all optional parameters will return transaction + * information for ALL pending transactions that are added to the mempool. + * + * @public + */ +export interface AlchemyPendingTransactionsEventFilter { + method: AlchemySubscription.PENDING_TRANSACTIONS; + /** Filter pending transactions sent FROM the provided address or array of addresses. */ + fromAddress?: string | string[]; + /** Filter pending transactions sent TO the provided address or array of addresses. */ + toAddress?: string | string[]; + /** + * Whether to only include transaction hashes and exclude the rest of the + * transaction response for a smaller payload. Defaults to false (by default, + * the entire transaction response is included). + * + * Note that setting only {@link hashesOnly} to true will return the same + * response as subscribing to `newPendingTransactions`. + */ + hashesOnly?: boolean; +} +/** + * Event filter for the {@link AlchemyWebSocketProvider.on} and + * {@link AlchemyWebSocketProvider.once} methods to use Alchemy's custom + * `alchemy_minedTransactions` endpoint. + * + * Returns the transaction information for all mined transactions that match the + * provided filter. For full documentation, see: + * {@link https://docs.alchemy.com/reference/alchemy-minedtransactions} + * + * Note that excluding all optional parameters will return transaction + * information for ALL mined transactions. + * + * @public + */ +export interface AlchemyMinedTransactionsEventFilter { + method: AlchemySubscription.MINED_TRANSACTIONS; + /** + * Address filters to subscribe to. Defaults to all transactions if omitted. + * Limit 100 address filters. Requires a non-empty array. + */ + addresses?: NonEmptyArray; + /** + * Whether to include transactions that were removed from the mempool. + * Defaults to false. + */ + includeRemoved?: boolean; + /** + * Whether to only include transaction hashes and exclude the rest of the + * transaction response for a smaller payload. Defaults to false (by default, + * the entire transaction response is included). + */ + hashesOnly?: boolean; +} +/** + * Address filters for {@link AlchemyMinedTransactionsEventFilter}. Requires at + * least one of the fields to be set. + */ +export declare type AlchemyMinedTransactionsAddress = RequireAtLeastOne<{ + to?: string; + from?: string; +}>; +/** + * Alchemy's event type that extends the default {@link EventType} interface to + * also include Alchemy's Subscription API. + * + * @public + */ +export declare type AlchemyEventType = EventType | AlchemyEventFilter; +/** + * This type represents the Alchemy's Subscription API endpoints as event + * filters compatible with other ethers events. + */ +export declare type AlchemyEventFilter = AlchemyMinedTransactionsEventFilter | AlchemyPendingTransactionsEventFilter; +/** Options for the {@link TransactNamespace.sendPrivateTransaction} method. */ +export interface SendPrivateTransactionOptions { + /** + * Whether to use fast-mode. Defaults to false. Please note that fast mode + * transactions cannot be cancelled using + * {@link TransactNamespace.cancelPrivateTransaction}. method. + * + * See {@link https://docs.flashbots.net/flashbots-protect/rpc/fast-mode} for + * more details. + */ + fast: boolean; +} +/** SDK representation of a Webhook in the Notify API. */ +export interface Webhook { + /** The webhook's unique id. */ + id: string; + /** The network the webhook is on. */ + network: Network; + /** The type of webhook. */ + type: WebhookType; + /** The url that the webhook sends its payload to. */ + url: string; + /** Whether the webhook is currently active */ + isActive: boolean; + /** The creation time of the webhook as an ISO string. */ + timeCreated: string; + /** The signing key used to verify payloads for the webhook. */ + signingKey: string; + /** The webhook version. All newly created webhooks default to V2. */ + version: WebhookVersion; + /** + * The app id of the app used for the webhook. This field is only present on + * {@link MinedTransactionWebhook} and {@link DroppedTransactionWebhook} + */ + appId?: string; +} +/** The version of the webhook. All newly created webhooks default to V2. */ +export declare enum WebhookVersion { + V1 = "V1", + V2 = "V2" +} +/** The type of {@link Webhook}. */ +export declare enum WebhookType { + MINED_TRANSACTION = "MINED_TRANSACTION", + DROPPED_TRANSACTION = "DROPPED_TRANSACTION", + ADDRESS_ACTIVITY = "ADDRESS_ACTIVITY", + NFT_ACTIVITY = "NFT_ACTIVITY" +} +/** + * A Mined Transaction Webhook is used to notify your app whenever a transaction + * sent through your API key gets successfully mined. This is useful if you want + * to notify customers that their transaction went through. + */ +export interface MinedTransactionWebhook extends Webhook { + type: WebhookType.MINED_TRANSACTION; +} +/** + * A Dropped Transaction webhook is used to notify your app whenever a + * transaction sent through your API key gets dropped. This can be useful if you + * want to notify customers that their transactions were dropped. + */ +export interface DroppedTransactionWebhook extends Webhook { + type: WebhookType.DROPPED_TRANSACTION; +} +/** + * An Address Activity Webhook tracks ETH, ERC20, ERC721, and ERC1155 transfers + * for the provided addresses. This can be used to notify your app with + * real-time state changes when your tracked addresses send or receive tokens. + */ +export interface AddressActivityWebhook extends Webhook { + type: WebhookType.ADDRESS_ACTIVITY; +} +/** + * The NFT Activity Webhook tracks all ERC721 and ERC1155 activity. This can be + * used to notify your app with real time state changes when an NFT is + * transferred between addresses. + */ +export interface NftActivityWebhook extends Webhook { + type: WebhookType.NFT_ACTIVITY; +} +/** The response for a {@link NotifyNamespace.getAllWebhooks} method. */ +export interface GetAllWebhooksResponse { + /** All webhooks attached to the provided auth token. */ + webhooks: Webhook[]; + /** The total number of webhooks. */ + totalCount: number; +} +/** Options object for the {@link NotifyNamespace.getAddresses} method. */ +export interface GetAddressesOptions { + /** Number of addresses to fetch. */ + limit?: number; + /** Page */ + pageKey?: string; +} +/** Response object for the {@link NotifyNamespace.getAddresses} method. */ +export interface AddressActivityResponse { + /** The addresses for the webhook. */ + addresses: string[]; + /** The total number of addresses. */ + totalCount: number; + /** Optional page key used to fetch the remaining addresses. */ + pageKey?: string; +} +/** + * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order + * to create a {@link MinedTransactionWebhook} or {@link DroppedTransactionWebhook}. + * + * The webhook will be created on the app and network associated with the appId. + * To find the app id of a project, go to the Alchemy Dashboard in the Apps tab. + * After clicking on an app, the app id is the string in the URL following 'apps/'. + * + * This is a temporary workaround for now. We're planning on detecting the app + * id from the provided api key directly. Stay tuned! + */ +export interface TransactionWebhookParams { + /** The app id of the project to create the webhook on. */ + appId: string; +} +/** + * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order + * to create a {@link NftActivityWebhook}. + */ +export interface NftWebhookParams { + /** Array of NFT filters the webhook should track. */ + filters: NftFilter[]; + /** + * Optional network to create the webhook on. If omitted, the webhook will be + * created on network of the app provided in the api key config. + */ + network?: Network; +} +/** + * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order + * to create a {@link AddressActivityWebhook}. + */ +export interface AddressWebhookParams { + /** Array of addresses the webhook should activity for. */ + addresses: string[]; + /** + * Optional network to create the webhook on. If omitted, the webhook will be + * created on network of the app provided in the api key config. + */ + network?: Network; +} +/** NFT to track on a {@link NftActivityWebhook}. */ +export interface NftFilter { + /** The contract address of the NFT. */ + contractAddress: string; + /** The token id of the NFT. */ + tokenId: BigNumberish; +} +/** Response object for the {@link NotifyNamespace.getNftFilters} method. */ +export interface NftFiltersResponse { + /** The NFT filters on the provided webhook. */ + filters: NftFilter[]; + /** The total number of NFT filters on the webhook. */ + totalCount: number; + /** Optional page key used to fetch the remaining filters. */ + pageKey?: string; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to mark a + * webhook as active or inactive. + */ +export interface WebhookStatusUpdate { + /** Whether the webhook is active. */ + isActive: boolean; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to add and + * remove NFT filters for a {@link NftActivityWebhook}. + */ +export interface WebhookNftFilterUpdate { + /** The filters to additionally track. */ + addFilters: NftFilter[]; + /** Existing filters to remove. */ + removeFilters: NftFilter[]; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to add and + * remove addresses for a {@link AddressActivityWebhook}. + */ +export interface WebhookAddressUpdate { + /** The addresses to additionally track. */ + addAddresses: string[]; + /** Existing addresses to remove. */ + removeAddresses: string[]; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to replace + * all existing addresses for a {@link AddressActivityWebhook}. + */ +export interface WebhookAddressOverride { + /** The new addresses to track. Existing addresses will be removed. */ + newAddresses: string[]; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to update a + * {@link NftActivityWebhook}. + */ +export declare type NftWebhookUpdate = WebhookStatusUpdate | RequireAtLeastOne; +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to update a + * {@link AddressActivityWebhook}. + */ +export declare type AddressWebhookUpdate = WebhookStatusUpdate | RequireAtLeastOne | WebhookAddressOverride; +/** + * Requires at least one of the properties to be set. + * + * Implementation copied over from + * {@link https://learn.microsoft.com/en-us/javascript/api/@azure/keyvault-certificates/requireatleastone?view=azure-node-latest} + */ +export declare type RequireAtLeastOne = { + [K in keyof T]-?: Required> & Partial>>; +}[keyof T]; +/** Requires an array with at least one value. */ +export declare type NonEmptyArray = [T, ...T[]]; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/util/const.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/util/const.d.ts new file mode 100644 index 0000000..1269128 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/util/const.d.ts @@ -0,0 +1,43 @@ +import { Network as NetworkFromEthers } from '@ethersproject/networks'; +import { Network } from '../types/types'; +export declare const DEFAULT_ALCHEMY_API_KEY = "demo"; +export declare const DEFAULT_NETWORK = Network.ETH_MAINNET; +export declare const DEFAULT_MAX_RETRIES = 5; +export declare function getAlchemyNftHttpUrl(network: Network, apiKey: string): string; +export declare function getAlchemyWsUrl(network: Network, apiKey: string): string; +export declare function getAlchemyWebhookHttpUrl(): string; +export declare enum AlchemyApiType { + BASE = 0, + NFT = 1, + WEBHOOK = 2 +} +/** + * Mapping of network names to their corresponding Network strings used to + * create an Ethers.js Provider instance. + */ +export declare const EthersNetwork: { + "eth-mainnet": string; + "eth-ropsten": string; + "eth-goerli": string; + "eth-kovan": string; + "eth-rinkeby": string; + "opt-mainnet": string; + "opt-kovan": string; + "opt-goerli": string; + "arb-mainnet": string; + "arb-rinkeby": string; + "arb-goerli": string; + "polygon-mainnet": string; + "polygon-mumbai": string; + "astar-mainnet": string; +}; +/** + * Mapping of network names to their corresponding Ethers Network objects. These + * networks are not yet supported by Ethers and are listed here to be overriden + * in the provider. + */ +export declare const CustomNetworks: { + [key: string]: NetworkFromEthers; +}; +export declare function noop(): void; +export declare const ETH_NULL_VALUE = "0x"; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/util/logger.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/util/logger.d.ts new file mode 100644 index 0000000..7e8cda8 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/util/logger.d.ts @@ -0,0 +1,55 @@ +/** + * The SDK has 4 log levels and a 5th option for disabling all logging. By + * default, the log level is set to INFO. + * + * The order is a follows: DEBUG < INFO < WARN < ERROR + * + * All log types above the current log level will be outputted. + */ +export declare enum LogLevel { + DEBUG = 0, + INFO = 1, + WARN = 2, + ERROR = 3, + SILENT = 4 +} +/** + * The level of verbosity for the logger. + * + * @public + */ +export declare type LogLevelString = 'debug' | 'info' | 'warn' | 'error' | 'silent'; +/** + * Configures the verbosity of logging. The default log level is `info`. + * + * @param logLevel - The verbosity of logging. Can be any of the following values: + * + * - `debug`: The most verbose logging level. + * - `info`: The default logging level. + * - `warn`: A logging level for non-critical issues. + * - `error`: A logging level for critical issues. + * - `silent`: Turn off all logging. + * + * @public + */ +export declare function setLogLevel(logLevel: LogLevelString): void; +export declare function logDebug(message: string, ...args: unknown[]): void; +export declare function logInfo(message: string, ...args: unknown[]): void; +export declare function logWarn(message: string, ...args: unknown[]): void; +export declare function logError(message: string, ...args: unknown[]): void; +export declare class Logger { + /** The log level of the given Logger instance. */ + private _logLevel; + constructor(); + get logLevel(): LogLevel; + set logLevel(val: LogLevel); + debug(...args: unknown[]): void; + info(...args: unknown[]): void; + warn(...args: unknown[]): void; + error(...args: unknown[]): void; + /** + * Forwards log messages to their corresponding console counterparts if the + * log level allows it. + */ + private _log; +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/util/sendRest.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/util/sendRest.d.ts new file mode 100644 index 0000000..e356e41 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/util/sendRest.d.ts @@ -0,0 +1,11 @@ +/** + * Given a REST endpoint, method, and params, sends the request with axios and + * returns the response. + */ +import { AxiosRequestConfig, AxiosResponse } from 'axios'; +/** + * Helper function to send http requests using Axis. + * + * @private + */ +export declare function sendAxiosRequest(baseUrl: string, restApiName: string, methodName: string, params: Req, overrides?: AxiosRequestConfig): Promise>; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/util/util.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/util/util.d.ts new file mode 100644 index 0000000..7ce652d --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/util/util.d.ts @@ -0,0 +1,13 @@ +import { BaseNft, Nft, NftContract } from '../api/nft'; +import { RawBaseNft, RawContractBaseNft, RawGetContractsForOwnerResponse, RawGetNftSalesResponse, RawNft, RawNftAttributeRarity, RawNftContract, RawOpenSeaCollectionMetadata } from '../internal/raw-interfaces'; +import { GetContractsForOwnerResponse, GetNftSalesResponse, NftAttributeRarity, OpenSeaCollectionMetadata } from '../types/types'; +export declare function formatBlock(block: string | number): string; +export declare function getNftContractFromRaw(rawNftContract: RawNftContract): NftContract; +export declare function getBaseNftFromRaw(rawBaseNft: RawBaseNft): BaseNft; +export declare function getBaseNftFromRaw(rawContractBaseNft: RawContractBaseNft, contractAddress: string): BaseNft; +export declare function getNftFromRaw(rawNft: RawNft): Nft; +export declare function getNftSalesFromRaw(rawNftSales: RawGetNftSalesResponse): GetNftSalesResponse; +export declare function getNftRarityFromRaw(rawNftRarity: RawNftAttributeRarity[]): NftAttributeRarity[]; +export declare function getContractsForOwnerFromRaw(rawContractsForOwner: RawGetContractsForOwnerResponse): GetContractsForOwnerResponse; +export declare function parseOpenSeaMetadata(openSea: RawOpenSeaCollectionMetadata | undefined): OpenSeaCollectionMetadata | undefined; +export declare const IS_BROWSER: boolean; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/src/version.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/src/version.d.ts new file mode 100644 index 0000000..86a14fc --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/src/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "2.2.5"; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/test/integration/alchemy.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/test/integration/alchemy.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/test/integration/alchemy.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/test/integration/core.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/test/integration/core.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/test/integration/core.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/test/integration/nft.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/test/integration/nft.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/test/integration/nft.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/test/integration/notify.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/test/integration/notify.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/test/integration/notify.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/test/integration/provider.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/test/integration/provider.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/test/integration/provider.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/test/integration/transact.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/test/integration/transact.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/test/integration/transact.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/test/integration/wallet.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/test/integration/wallet.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/test/integration/wallet.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/test/test-util.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/test/test-util.d.ts new file mode 100644 index 0000000..52fd8cd --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/test/test-util.d.ts @@ -0,0 +1,45 @@ +/// +import { BaseNft, Media, Nft, NftContract, NftSaleMarketplace, NftSaleTakerType, NftTokenType, OwnedBaseNft, OwnedNft, TokenUri } from '../src'; +import { RawBaseNft, RawContractBaseNft, RawContractForOwner, RawNft, RawNftContract, RawNftContractMetadata, RawNftSale, RawOpenSeaCollectionMetadata, RawOwnedBaseNft, RawOwnedNft } from '../src/internal/raw-interfaces'; +import { BlockHead, LogsEvent } from '../src/internal/websocket-backfiller'; +export declare const TEST_WALLET_PRIVATE_KEY = "dd5bdf09397b1fdf98e4f72c66047d5104b1511fa7dc1b8fdddd61a150f732c9"; +export declare const TEST_WALLET_PUBLIC_ADDRESS = "0x4b9007B0BcE78cfB634032ec31Ed56adB464287b"; +/** Creates a dummy response for the `getContractMetadata` endpoint. */ +export declare function createRawNftContract(address: string, tokenType: NftTokenType, name?: string, symbol?: string, totalSupply?: string, openSea?: RawOpenSeaCollectionMetadata): RawNftContract; +export declare function createRawOpenSeaCollectionMetadata(): RawOpenSeaCollectionMetadata; +export declare function createRawOwnedBaseNft(address: string, tokenId: string, balance: string, tokenType?: NftTokenType): RawOwnedBaseNft; +export declare function createOwnedBaseNft(address: string, tokenId: string, balance: number, tokenType?: NftTokenType): OwnedBaseNft; +export declare function createRawBaseNft(contractAddress: string, tokenId: string | number, tokenType?: NftTokenType): RawBaseNft; +export declare function createBaseNft(address: string, tokenId: string | number, tokenType?: NftTokenType): BaseNft; +export declare function createNft(title: string, address: string, tokenId: string, tokenType?: NftTokenType, tokenUri?: TokenUri, media?: TokenUri[] | undefined): Nft; +interface RawNftOptions { + tokenUri?: TokenUri; + media?: TokenUri[] | undefined; + timeLastUpdated?: string; + description?: string | Array; + contractMetadata?: RawNftContractMetadata; +} +export declare function createRawNft(contractAddress: string, title: string, tokenId: string, tokenType?: NftTokenType, options?: RawNftOptions): RawNft; +export declare function createRawOwnedNft(title: string, address: string, tokenId: string, balance: string, tokenType?: NftTokenType, contractMetadata?: RawNftContractMetadata): RawOwnedNft; +export declare function createOwnedNft(title: string, address: string, tokenId: string, balance: number, tokenType?: NftTokenType): OwnedNft; +export declare function createRawNftContractBaseNft(tokenId: string): RawContractBaseNft; +export declare function createRawNftSale(contractAddress: string, tokenId: string, marketplace: NftSaleMarketplace, taker: NftSaleTakerType, buyerAddress: string, sellerAddress: string): RawNftSale; +export declare function createRawContractForOwner(address: string, tokenId: string, media: Media, isSpam?: boolean, name?: string, tokenType?: NftTokenType, symbol?: string, totalSupply?: string, opensea?: RawOpenSeaCollectionMetadata): RawContractForOwner; +export declare function createNftMediaData(bytes?: number, format?: string, thumbnail?: string): Media; +export declare function verifyNftContractMetadata(actualNftContract: NftContract, expectedNftContract: NftContract, address: string, name: string, symbol: string, totalSupply: string, tokenType?: NftTokenType, openSea?: RawOpenSeaCollectionMetadata): void; +export declare type Mocked = T & { + [K in keyof T]: T[K] extends Function ? T[K] & jest.Mock : T[K]; +}; +/** A Promise implementation for deferred resolution. */ +export declare class Deferred { + promise: Promise; + constructor(); + resolve: (value: R | Promise) => void; + reject: (reason: Error) => void; +} +export declare function makeNewHeadsEvent(blockNumber: number, hash: string): BlockHead; +export declare function makeLogsEvent(blockNumber: number, blockHash: string, isRemoved?: boolean, logIndex?: number): LogsEvent; +export declare const TESTING_PRIVATE_KEY = "dd5bdf09397b1fdf98e4f72c66047d5104b1511fa7dc1b8fdddd61a150f732c9"; +export declare const TESTING_PUBLIC_ADDRESS = "0x4b9007B0BcE78cfB634032ec31Ed56adB464287b"; +export declare function loadAlchemyEnv(): Promise; +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/alchemy.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/alchemy.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/alchemy.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/backoff.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/backoff.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/backoff.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/contract.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/contract.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/contract.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/core-namespace.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/core-namespace.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/core-namespace.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/logger.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/logger.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/logger.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/nft-api.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/nft-api.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/nft-api.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/nft.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/nft.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/nft.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/provider.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/provider.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/provider.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/request-batcher.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/request-batcher.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/request-batcher.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/transact.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/transact.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/transact.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/wallet.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/wallet.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/wallet.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/websocket-backfiller.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/websocket-backfiller.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/websocket-backfiller.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/websocket-provider.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/websocket-provider.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/test/unit/websocket-provider.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/utils.js b/test/node_modules/alchemy-sdk/dist/cjs/api/utils.js new file mode 100644 index 0000000..dc155a3 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/utils.js @@ -0,0 +1,727 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var hash = require('@ethersproject/hash'); +var bytes = require('@ethersproject/bytes'); +var units = require('@ethersproject/units'); +require('@ethersproject/bignumber'); +var abi = require('@ethersproject/abi'); + +const version$1 = "logger/5.7.0"; + +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"; + /////////////////// + // Interaction Errors + // The user rejected the action, such as signing a message or sending + // a transaction + ErrorCode["ACTION_REJECTED"] = "ACTION_REJECTED"; +})(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; + let url = ""; + switch (code) { + case ErrorCode.NUMERIC_FAULT: { + url = "NUMERIC_FAULT"; + const fault = message; + switch (fault) { + case "overflow": + case "underflow": + case "division-by-zero": + url += "-" + fault; + break; + case "negative-power": + case "negative-width": + url += "-unsupported"; + break; + case "unbound-bitwise-result": + url += "-unbound-result"; + break; + } + break; + } + case ErrorCode.CALL_EXCEPTION: + case ErrorCode.INSUFFICIENT_FUNDS: + case ErrorCode.MISSING_NEW: + case ErrorCode.NONCE_EXPIRED: + case ErrorCode.REPLACEMENT_UNDERPRICED: + case ErrorCode.TRANSACTION_REPLACED: + case ErrorCode.UNPREDICTABLE_GAS_LIMIT: + url = code; + break; + } + if (url) { + message += " [ See: https:/\/links.ethers.org/v5-errors-" + url + " ]"; + } + 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 (_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$1); + } + 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 = "strings/5.7.0"; + +const logger = new Logger(version); +/////////////////////////////// +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.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); +} +// 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$1, onError) { + if (onError == null) { + onError = Utf8ErrorFuncs.error; + } + bytes$1 = bytes.arrayify(bytes$1); + const result = []; + let i = 0; + // Invalid bytes are ignored + while (i < bytes$1.length) { + const c = bytes$1[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$1, result); + } + else { + i += onError(Utf8ErrorReason.BAD_PREFIX, i - 1, bytes$1, result); + } + continue; + } + // Do we have enough bytes in our data? + if (i - 1 + extraLength >= bytes$1.length) { + i += onError(Utf8ErrorReason.OVERRUN, i - 1, bytes$1, 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$1[i]; + // Invalid continuation byte + if ((nextChar & 0xc0) != 0x80) { + i += onError(Utf8ErrorReason.MISSING_CONTINUE, i, bytes$1, 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$1, result, res); + continue; + } + // Reserved for UTF-16 surrogate halves + if (res >= 0xd800 && res <= 0xdfff) { + i += onError(Utf8ErrorReason.UTF16_SURROGATE, i - 1 - extraLength, bytes$1, result, res); + continue; + } + // Check for overlong sequences (more bytes than needed) + if (res <= overlongMask) { + i += onError(Utf8ErrorReason.OVERLONG, i - 1 - extraLength, bytes$1, 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.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 bytes.arrayify(result); +} +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 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 }; + }); +} +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... +"ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((v) => parseInt(v, 16)); +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"); +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"); +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); +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"); + +Object.defineProperty(exports, 'dnsEncode', { + enumerable: true, + get: function () { return hash.dnsEncode; } +}); +Object.defineProperty(exports, 'hashMessage', { + enumerable: true, + get: function () { return hash.hashMessage; } +}); +Object.defineProperty(exports, 'id', { + enumerable: true, + get: function () { return hash.id; } +}); +Object.defineProperty(exports, 'isValidName', { + enumerable: true, + get: function () { return hash.isValidName; } +}); +Object.defineProperty(exports, 'namehash', { + enumerable: true, + get: function () { return hash.namehash; } +}); +Object.defineProperty(exports, 'arrayify', { + enumerable: true, + get: function () { return bytes.arrayify; } +}); +Object.defineProperty(exports, 'concat', { + enumerable: true, + get: function () { return bytes.concat; } +}); +Object.defineProperty(exports, 'hexConcat', { + enumerable: true, + get: function () { return bytes.hexConcat; } +}); +Object.defineProperty(exports, 'hexDataLength', { + enumerable: true, + get: function () { return bytes.hexDataLength; } +}); +Object.defineProperty(exports, 'hexDataSlice', { + enumerable: true, + get: function () { return bytes.hexDataSlice; } +}); +Object.defineProperty(exports, 'hexStripZeros', { + enumerable: true, + get: function () { return bytes.hexStripZeros; } +}); +Object.defineProperty(exports, 'hexValue', { + enumerable: true, + get: function () { return bytes.hexValue; } +}); +Object.defineProperty(exports, 'hexZeroPad', { + enumerable: true, + get: function () { return bytes.hexZeroPad; } +}); +Object.defineProperty(exports, 'hexlify', { + enumerable: true, + get: function () { return bytes.hexlify; } +}); +Object.defineProperty(exports, 'isBytes', { + enumerable: true, + get: function () { return bytes.isBytes; } +}); +Object.defineProperty(exports, 'isBytesLike', { + enumerable: true, + get: function () { return bytes.isBytesLike; } +}); +Object.defineProperty(exports, 'isHexString', { + enumerable: true, + get: function () { return bytes.isHexString; } +}); +Object.defineProperty(exports, 'joinSignature', { + enumerable: true, + get: function () { return bytes.joinSignature; } +}); +Object.defineProperty(exports, 'splitSignature', { + enumerable: true, + get: function () { return bytes.splitSignature; } +}); +Object.defineProperty(exports, 'stripZeros', { + enumerable: true, + get: function () { return bytes.stripZeros; } +}); +Object.defineProperty(exports, 'zeroPad', { + enumerable: true, + get: function () { return bytes.zeroPad; } +}); +Object.defineProperty(exports, 'formatEther', { + enumerable: true, + get: function () { return units.formatEther; } +}); +Object.defineProperty(exports, 'formatUnits', { + enumerable: true, + get: function () { return units.formatUnits; } +}); +Object.defineProperty(exports, 'parseEther', { + enumerable: true, + get: function () { return units.parseEther; } +}); +Object.defineProperty(exports, 'parseUnits', { + enumerable: true, + get: function () { return units.parseUnits; } +}); +Object.defineProperty(exports, 'Interface', { + enumerable: true, + get: function () { return abi.Interface; } +}); +exports.toUtf8Bytes = toUtf8Bytes; +exports.toUtf8String = toUtf8String; +//# sourceMappingURL=utils.js.map diff --git a/test/node_modules/alchemy-sdk/dist/cjs/api/utils.js.map b/test/node_modules/alchemy-sdk/dist/cjs/api/utils.js.map new file mode 100644 index 0000000..6236c44 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/api/utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.js","sources":["../../../node_modules/@ethersproject/logger/lib.esm/_version.js","../../../node_modules/@ethersproject/logger/lib.esm/index.js","../../../node_modules/@ethersproject/strings/lib.esm/_version.js","../../../node_modules/@ethersproject/strings/lib.esm/utf8.js","../../../node_modules/@ethersproject/strings/lib.esm/idna.js"],"sourcesContent":["export const version = \"logger/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nlet _permanentCensorErrors = false;\nlet _censorErrors = false;\nconst LogLevels = { debug: 1, \"default\": 2, info: 2, warning: 3, error: 4, off: 5 };\nlet _logLevel = LogLevels[\"default\"];\nimport { version } from \"./_version\";\nlet _globalLogger = null;\nfunction _checkNormalize() {\n try {\n const missing = [];\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 ;\n }\n catch (error) {\n missing.push(form);\n }\n });\n if (missing.length) {\n throw new Error(\"missing \" + missing.join(\", \"));\n }\n if (String.fromCharCode(0xe9).normalize(\"NFD\") !== String.fromCharCode(0x65, 0x0301)) {\n throw new Error(\"broken implementation\");\n }\n }\n catch (error) {\n return error.message;\n }\n return null;\n}\nconst _normalizeError = _checkNormalize();\nexport var LogLevel;\n(function (LogLevel) {\n LogLevel[\"DEBUG\"] = \"DEBUG\";\n LogLevel[\"INFO\"] = \"INFO\";\n LogLevel[\"WARNING\"] = \"WARNING\";\n LogLevel[\"ERROR\"] = \"ERROR\";\n LogLevel[\"OFF\"] = \"OFF\";\n})(LogLevel || (LogLevel = {}));\nexport var ErrorCode;\n(function (ErrorCode) {\n ///////////////////\n // Generic Errors\n // Unknown Error\n ErrorCode[\"UNKNOWN_ERROR\"] = \"UNKNOWN_ERROR\";\n // Not Implemented\n ErrorCode[\"NOT_IMPLEMENTED\"] = \"NOT_IMPLEMENTED\";\n // Unsupported Operation\n // - operation\n ErrorCode[\"UNSUPPORTED_OPERATION\"] = \"UNSUPPORTED_OPERATION\";\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 ErrorCode[\"NETWORK_ERROR\"] = \"NETWORK_ERROR\";\n // Some sort of bad response from the server\n ErrorCode[\"SERVER_ERROR\"] = \"SERVER_ERROR\";\n // Timeout\n ErrorCode[\"TIMEOUT\"] = \"TIMEOUT\";\n ///////////////////\n // Operational Errors\n // Buffer Overrun\n ErrorCode[\"BUFFER_OVERRUN\"] = \"BUFFER_OVERRUN\";\n // Numeric Fault\n // - operation: the operation being executed\n // - fault: the reason this faulted\n ErrorCode[\"NUMERIC_FAULT\"] = \"NUMERIC_FAULT\";\n ///////////////////\n // Argument Errors\n // Missing new operator to an object\n // - name: The name of the class\n ErrorCode[\"MISSING_NEW\"] = \"MISSING_NEW\";\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 ErrorCode[\"INVALID_ARGUMENT\"] = \"INVALID_ARGUMENT\";\n // Missing argument to a function:\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n ErrorCode[\"MISSING_ARGUMENT\"] = \"MISSING_ARGUMENT\";\n // Too many arguments\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n ErrorCode[\"UNEXPECTED_ARGUMENT\"] = \"UNEXPECTED_ARGUMENT\";\n ///////////////////\n // Blockchain Errors\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 ErrorCode[\"CALL_EXCEPTION\"] = \"CALL_EXCEPTION\";\n // Insufficient funds (< value + gasLimit * gasPrice)\n // - transaction: the transaction attempted\n ErrorCode[\"INSUFFICIENT_FUNDS\"] = \"INSUFFICIENT_FUNDS\";\n // Nonce has already been used\n // - transaction: the transaction attempted\n ErrorCode[\"NONCE_EXPIRED\"] = \"NONCE_EXPIRED\";\n // The replacement fee for the transaction is too low\n // - transaction: the transaction attempted\n ErrorCode[\"REPLACEMENT_UNDERPRICED\"] = \"REPLACEMENT_UNDERPRICED\";\n // The gas limit could not be estimated\n // - transaction: the transaction passed to estimateGas\n ErrorCode[\"UNPREDICTABLE_GAS_LIMIT\"] = \"UNPREDICTABLE_GAS_LIMIT\";\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 ErrorCode[\"TRANSACTION_REPLACED\"] = \"TRANSACTION_REPLACED\";\n ///////////////////\n // Interaction Errors\n // The user rejected the action, such as signing a message or sending\n // a transaction\n ErrorCode[\"ACTION_REJECTED\"] = \"ACTION_REJECTED\";\n})(ErrorCode || (ErrorCode = {}));\n;\nconst HEX = \"0123456789abcdef\";\nexport class Logger {\n constructor(version) {\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n value: version,\n writable: false\n });\n }\n _log(logLevel, args) {\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]) {\n return;\n }\n console.log.apply(console, args);\n }\n debug(...args) {\n this._log(Logger.levels.DEBUG, args);\n }\n info(...args) {\n this._log(Logger.levels.INFO, args);\n }\n warn(...args) {\n this._log(Logger.levels.WARNING, args);\n }\n makeError(message, code, params) {\n // Errors are being censored\n if (_censorErrors) {\n return this.makeError(\"censored error\", code, {});\n }\n if (!code) {\n code = Logger.errors.UNKNOWN_ERROR;\n }\n if (!params) {\n params = {};\n }\n const messageDetails = [];\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 }\n else {\n messageDetails.push(key + \"=\" + JSON.stringify(value));\n }\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 const reason = message;\n let url = \"\";\n switch (code) {\n case ErrorCode.NUMERIC_FAULT: {\n url = \"NUMERIC_FAULT\";\n const fault = message;\n switch (fault) {\n case \"overflow\":\n case \"underflow\":\n case \"division-by-zero\":\n url += \"-\" + fault;\n break;\n case \"negative-power\":\n case \"negative-width\":\n url += \"-unsupported\";\n break;\n case \"unbound-bitwise-result\":\n url += \"-unbound-result\";\n break;\n }\n break;\n }\n case ErrorCode.CALL_EXCEPTION:\n case ErrorCode.INSUFFICIENT_FUNDS:\n case ErrorCode.MISSING_NEW:\n case ErrorCode.NONCE_EXPIRED:\n case ErrorCode.REPLACEMENT_UNDERPRICED:\n case ErrorCode.TRANSACTION_REPLACED:\n case ErrorCode.UNPREDICTABLE_GAS_LIMIT:\n url = code;\n break;\n }\n if (url) {\n message += \" [ See: https:/\\/links.ethers.org/v5-errors-\" + url + \" ]\";\n }\n if (messageDetails.length) {\n message += \" (\" + messageDetails.join(\", \") + \")\";\n }\n // @TODO: Any??\n const error = new Error(message);\n error.reason = reason;\n error.code = code;\n Object.keys(params).forEach(function (key) {\n error[key] = params[key];\n });\n return error;\n }\n throwError(message, code, params) {\n throw this.makeError(message, code, params);\n }\n throwArgumentError(message, name, value) {\n return this.throwError(message, Logger.errors.INVALID_ARGUMENT, {\n argument: name,\n value: value\n });\n }\n assert(condition, message, code, params) {\n if (!!condition) {\n return;\n }\n this.throwError(message, code, params);\n }\n assertArgument(condition, message, name, value) {\n if (!!condition) {\n return;\n }\n this.throwArgumentError(message, name, value);\n }\n checkNormalize(message) {\n if (message == null) {\n message = \"platform missing String.prototype.normalize\";\n }\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 checkSafeUint53(value, message) {\n if (typeof (value) !== \"number\") {\n return;\n }\n if (message == null) {\n 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 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 checkArgumentCount(count, expectedCount, message) {\n if (message) {\n message = \": \" + message;\n }\n else {\n message = \"\";\n }\n if (count < expectedCount) {\n this.throwError(\"missing argument\" + message, Logger.errors.MISSING_ARGUMENT, {\n count: count,\n expectedCount: expectedCount\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 checkNew(target, kind) {\n if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n checkAbstract(target, kind) {\n if (target === kind) {\n this.throwError(\"cannot instantiate abstract class \" + JSON.stringify(kind.name) + \" directly; use a sub-class\", Logger.errors.UNSUPPORTED_OPERATION, { 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 static globalLogger() {\n if (!_globalLogger) {\n _globalLogger = new Logger(version);\n }\n return _globalLogger;\n }\n static setCensorship(censorship, permanent) {\n if (!censorship && permanent) {\n this.globalLogger().throwError(\"cannot permanently disable censorship\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n if (_permanentCensorErrors) {\n if (!censorship) {\n return;\n }\n this.globalLogger().throwError(\"error censorship permanent\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n _censorErrors = !!censorship;\n _permanentCensorErrors = !!permanent;\n }\n static setLogLevel(logLevel) {\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 static from(version) {\n return new Logger(version);\n }\n}\nLogger.errors = ErrorCode;\nLogger.levels = LogLevel;\n//# sourceMappingURL=index.js.map","export const version = \"strings/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { arrayify } from \"@ethersproject/bytes\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n///////////////////////////////\nexport var UnicodeNormalizationForm;\n(function (UnicodeNormalizationForm) {\n UnicodeNormalizationForm[\"current\"] = \"\";\n UnicodeNormalizationForm[\"NFC\"] = \"NFC\";\n UnicodeNormalizationForm[\"NFD\"] = \"NFD\";\n UnicodeNormalizationForm[\"NFKC\"] = \"NFKC\";\n UnicodeNormalizationForm[\"NFKD\"] = \"NFKD\";\n})(UnicodeNormalizationForm || (UnicodeNormalizationForm = {}));\n;\nexport var Utf8ErrorReason;\n(function (Utf8ErrorReason) {\n // A continuation byte was present where there was nothing to continue\n // - offset = the index the codepoint began in\n Utf8ErrorReason[\"UNEXPECTED_CONTINUE\"] = \"unexpected continuation byte\";\n // An invalid (non-continuation) byte to start a UTF-8 codepoint was found\n // - offset = the index the codepoint began in\n Utf8ErrorReason[\"BAD_PREFIX\"] = \"bad codepoint prefix\";\n // The string is too short to process the expected codepoint\n // - offset = the index the codepoint began in\n Utf8ErrorReason[\"OVERRUN\"] = \"string overrun\";\n // A missing continuation byte was expected but not found\n // - offset = the index the continuation byte was expected at\n Utf8ErrorReason[\"MISSING_CONTINUE\"] = \"missing continuation byte\";\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 Utf8ErrorReason[\"OUT_OF_RANGE\"] = \"out of UTF-8 range\";\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 Utf8ErrorReason[\"UTF16_SURROGATE\"] = \"UTF-16 surrogate\";\n // The string is an overlong representation\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; already bounds checked\n Utf8ErrorReason[\"OVERLONG\"] = \"overlong representation\";\n})(Utf8ErrorReason || (Utf8ErrorReason = {}));\n;\nfunction errorFunc(reason, offset, bytes, output, badCodepoint) {\n return logger.throwArgumentError(`invalid codepoint at offset ${offset}; ${reason}`, \"bytes\", bytes);\n}\nfunction ignoreFunc(reason, offset, bytes, output, badCodepoint) {\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) {\n break;\n }\n i++;\n }\n return i;\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 // Nothing to skip\n return 0;\n}\nfunction replaceFunc(reason, offset, bytes, output, badCodepoint) {\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 // Put the replacement character into the output\n output.push(0xfffd);\n // Otherwise, process as if ignoring errors\n return ignoreFunc(reason, offset, bytes, output, badCodepoint);\n}\n// Common error handing strategies\nexport const Utf8ErrorFuncs = Object.freeze({\n error: errorFunc,\n ignore: ignoreFunc,\n replace: replaceFunc\n});\n// http://stackoverflow.com/questions/13356493/decode-utf-8-with-javascript#13691499\nfunction getUtf8CodePoints(bytes, onError) {\n if (onError == null) {\n onError = Utf8ErrorFuncs.error;\n }\n bytes = arrayify(bytes);\n const result = [];\n let i = 0;\n // Invalid bytes are ignored\n while (i < bytes.length) {\n const c = bytes[i++];\n // 0xxx xxxx\n if (c >> 7 === 0) {\n result.push(c);\n continue;\n }\n // Multibyte; how many bytes left for this character?\n let extraLength = null;\n let overlongMask = null;\n // 110x xxxx 10xx xxxx\n if ((c & 0xe0) === 0xc0) {\n extraLength = 1;\n overlongMask = 0x7f;\n // 1110 xxxx 10xx xxxx 10xx xxxx\n }\n else if ((c & 0xf0) === 0xe0) {\n extraLength = 2;\n overlongMask = 0x7ff;\n // 1111 0xxx 10xx xxxx 10xx xxxx 10xx xxxx\n }\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 }\n else {\n i += onError(Utf8ErrorReason.BAD_PREFIX, i - 1, bytes, result);\n }\n continue;\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 // Remove the length prefix from the char\n let res = c & ((1 << (8 - extraLength - 1)) - 1);\n for (let j = 0; j < extraLength; j++) {\n let nextChar = bytes[i];\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 // See above loop for invalid continuation byte\n if (res === null) {\n 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 // 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 // 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 result.push(res);\n }\n return result;\n}\n// http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array\nexport function toUtf8Bytes(str, form = UnicodeNormalizationForm.current) {\n if (form != UnicodeNormalizationForm.current) {\n logger.checkNormalize();\n str = str.normalize(form);\n }\n let result = [];\n for (let i = 0; i < str.length; i++) {\n const c = str.charCodeAt(i);\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 if (i >= str.length || (c2 & 0xfc00) !== 0xdc00) {\n throw new Error(\"invalid utf-8 string\");\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 return arrayify(result);\n}\n;\nfunction escapeChar(value) {\n const hex = (\"0000\" + value.toString(16));\n return \"\\\\u\" + hex.substring(hex.length - 4);\n}\nexport function _toEscapedUtf8String(bytes, onError) {\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 if (codePoint >= 32 && codePoint < 127) {\n return String.fromCharCode(codePoint);\n }\n }\n if (codePoint <= 0xffff) {\n return escapeChar(codePoint);\n }\n codePoint -= 0x10000;\n return escapeChar(((codePoint >> 10) & 0x3ff) + 0xd800) + escapeChar((codePoint & 0x3ff) + 0xdc00);\n }).join(\"\") + '\"';\n}\nexport function _toUtf8String(codePoints) {\n return codePoints.map((codePoint) => {\n if (codePoint <= 0xffff) {\n return String.fromCharCode(codePoint);\n }\n codePoint -= 0x10000;\n return String.fromCharCode((((codePoint >> 10) & 0x3ff) + 0xd800), ((codePoint & 0x3ff) + 0xdc00));\n }).join(\"\");\n}\nexport function toUtf8String(bytes, onError) {\n return _toUtf8String(getUtf8CodePoints(bytes, onError));\n}\nexport function toUtf8CodePoints(str, form = UnicodeNormalizationForm.current) {\n return getUtf8CodePoints(toUtf8Bytes(str, form));\n}\n//# sourceMappingURL=utf8.js.map","\"use strict\";\nimport { toUtf8CodePoints, _toUtf8String, UnicodeNormalizationForm } from \"./utf8\";\nfunction bytes2(data) {\n if ((data.length % 4) !== 0) {\n throw new Error(\"bad data\");\n }\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}\nfunction createTable(data, func) {\n if (!func) {\n func = function (value) { return [parseInt(value, 16)]; };\n }\n let lo = 0;\n let result = {};\n data.split(\",\").forEach((pair) => {\n let comps = pair.split(\":\");\n lo += parseInt(comps[0], 16);\n result[lo] = func(comps[1]);\n });\n return result;\n}\nfunction createRangeTable(data) {\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 }\n else if (comps[1] === \"\") {\n comps[1] = \"1\";\n }\n let lo = hi + parseInt(comps[0], 16);\n hi = parseInt(comps[1], 16);\n return { l: lo, h: hi };\n });\n}\nfunction matchMap(value, ranges) {\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) {\n continue;\n }\n return range;\n }\n }\n return null;\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// @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));\nconst Table_B_2_ranges = [\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);\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\");\nfunction flatten(values) {\n return values.reduce((accum, value) => {\n value.forEach((value) => { accum.push(value); });\n return accum;\n }, []);\n}\nexport function _nameprepTableA1(codepoint) {\n return !!matchMap(codepoint, Table_A_1_ranges);\n}\nexport function _nameprepTableB2(codepoint) {\n let range = matchMap(codepoint, Table_B_2_ranges);\n if (range) {\n return [codepoint + range.s];\n }\n let codes = Table_B_2_lut_abs[codepoint];\n if (codes) {\n return codes;\n }\n let shift = Table_B_2_lut_rel[codepoint];\n if (shift) {\n return [codepoint + shift[0]];\n }\n let complex = Table_B_2_complex[codepoint];\n if (complex) {\n return complex;\n }\n return null;\n}\nexport function _nameprepTableC(codepoint) {\n return !!matchMap(codepoint, Table_C_ranges);\n}\nexport function nameprep(value) {\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) {\n return value.toLowerCase();\n }\n // Get the code points (keeping the current normalization)\n let codes = toUtf8CodePoints(value);\n codes = flatten(codes.map((code) => {\n // Substitute Table B.1 (Maps to Nothing)\n if (Table_B_1_flags.indexOf(code) >= 0) {\n return [];\n }\n if (code >= 0xfe00 && code <= 0xfe0f) {\n return [];\n }\n // Substitute Table B.2 (Case Folding)\n let codesTableB2 = _nameprepTableB2(code);\n if (codesTableB2) {\n return codesTableB2;\n }\n // No Substitution\n return [code];\n }));\n // Normalize using form KC\n codes = toUtf8CodePoints(_toUtf8String(codes), UnicodeNormalizationForm.NFKC);\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 // 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 // IDNA extras\n let name = _toUtf8String(codes);\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 return name;\n}\n//# sourceMappingURL=idna.js.map"],"names":["version","bytes","arrayify"],"mappings":";;;;;;;;;;AAAO,MAAMA,SAAO,GAAG,cAAc;;ACCrC,IAAI,sBAAsB,GAAG,KAAK,CAAC;AACnC,IAAI,aAAa,GAAG,KAAK,CAAC;AAC1B,MAAM,SAAS,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;AACpF,IAAI,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC;AAErC,IAAI,aAAa,GAAG,IAAI,CAAC;AACzB,SAAS,eAAe,GAAG;AAC3B,IAAI,IAAI;AACR,QAAQ,MAAM,OAAO,GAAG,EAAE,CAAC;AAC3B;AACA,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK;AACzD,YAAY,IAAI;AAChB,gBAAgB,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,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C,GAAG,GAAG,CAAC;AAC3B,SAAS;AACT,aAAa,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE;AAClC,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;AAC3B,SAAS;AACT,QAAQ,IAAI,EAAE,GAAG,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAC7C,QAAQ,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACpC,QAAQ,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;AAChC,KAAK,CAAC,CAAC;AACP,CAAC;AAewB,gBAAgB,CAAC,87CAA87C,EAAE;AAC1+C;AACwB,qDAAqD,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE;AA6C3F,WAAW,CAAC,ufAAuf,EAAE;AACrgB,WAAW,CAAC,wdAAwd,EAAE;AACte,WAAW,CAAC,w3DAAw3D,EAAE,MAAM,EAAE;AACj5D,gBAAgB,CAAC,yLAAyL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/test/node_modules/alchemy-sdk/dist/cjs/index-e8114eb4.js b/test/node_modules/alchemy-sdk/dist/cjs/index-e8114eb4.js new file mode 100644 index 0000000..7ab3bdb --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/index-e8114eb4.js @@ -0,0 +1,3176 @@ +'use strict'; + +require('./api/utils'); +var bignumber = require('@ethersproject/bignumber'); +var axios = require('axios'); +var abstractProvider = require('@ethersproject/abstract-provider'); +var wallet = require('@ethersproject/wallet'); +var contracts = require('@ethersproject/contracts'); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios); + +/** + * The supported networks by Alchemy. Note that some functions are not available + * on all networks. Please refer to the Alchemy documentation for which APIs are + * available on which networks + * {@link https://docs.alchemy.com/alchemy/apis/feature-support-by-chain} + * + * @public + */ +exports.Network = void 0; +(function (Network) { + Network["ETH_MAINNET"] = "eth-mainnet"; + /** @deprecated - Will be removed in subsequent versions */ + Network["ETH_ROPSTEN"] = "eth-ropsten"; + Network["ETH_GOERLI"] = "eth-goerli"; + /** @deprecated - Will be removed in subsequent versions */ + Network["ETH_KOVAN"] = "eth-kovan"; + /** @deprecated - Will be removed in subsequent versions */ + Network["ETH_RINKEBY"] = "eth-rinkeby"; + Network["OPT_MAINNET"] = "opt-mainnet"; + /** @deprecated - Will be removed in subsequent versions */ + Network["OPT_KOVAN"] = "opt-kovan"; + Network["OPT_GOERLI"] = "opt-goerli"; + Network["ARB_MAINNET"] = "arb-mainnet"; + /** @deprecated - Will be removed in subsequent versions */ + Network["ARB_RINKEBY"] = "arb-rinkeby"; + Network["ARB_GOERLI"] = "arb-goerli"; + Network["MATIC_MAINNET"] = "polygon-mainnet"; + Network["MATIC_MUMBAI"] = "polygon-mumbai"; + Network["ASTAR_MAINNET"] = "astar-mainnet"; +})(exports.Network || (exports.Network = {})); +/** Token Types for the `getTokenBalances()` endpoint. */ +exports.TokenBalanceType = void 0; +(function (TokenBalanceType) { + /** + * Option to fetch the top 100 tokens by 24-hour volume. This option is only + * available on Mainnet in Ethereum, Polygon, and Arbitrum. + */ + TokenBalanceType["DEFAULT_TOKENS"] = "DEFAULT_TOKENS"; + /** + * Option to fetch the set of ERC-20 tokens that the address as ever held. his + * list is produced by an address's historical transfer activity and includes + * all tokens that the address has ever received. + */ + TokenBalanceType["ERC20"] = "erc20"; +})(exports.TokenBalanceType || (exports.TokenBalanceType = {})); +/** + * Categories of transfers to use with the {@link AssetTransfersParams} request + * object when using {@link CoreNamespace.getAssetTransfers}. + * + * @public + */ +exports.AssetTransfersCategory = void 0; +(function (AssetTransfersCategory) { + /** + * Top level ETH transactions that occur where the `fromAddress` is an + * external user-created address. External addresses have private keys and are + * accessed by users. + */ + AssetTransfersCategory["EXTERNAL"] = "external"; + /** + * Top level ETH transactions that occur where the `fromAddress` is an + * internal, smart contract address. For example, a smart contract calling + * another smart contract or sending + */ + AssetTransfersCategory["INTERNAL"] = "internal"; + /** ERC20 transfers. */ + AssetTransfersCategory["ERC20"] = "erc20"; + /** ERC721 transfers. */ + AssetTransfersCategory["ERC721"] = "erc721"; + /** ERC1155 transfers. */ + AssetTransfersCategory["ERC1155"] = "erc1155"; + /** Special contracts that don't follow ERC 721/1155, (ex: CryptoKitties). */ + AssetTransfersCategory["SPECIALNFT"] = "specialnft"; +})(exports.AssetTransfersCategory || (exports.AssetTransfersCategory = {})); +/** + * Enum for the order of the {@link AssetTransfersParams} request object when + * using {@link CoreNamespace.getAssetTransfers}. + * + * @deprecated Use {@link SortingOrder} instead. This enum will be removed in a + * future version. + * @public + */ +exports.AssetTransfersOrder = void 0; +(function (AssetTransfersOrder) { + AssetTransfersOrder["ASCENDING"] = "asc"; + AssetTransfersOrder["DESCENDING"] = "desc"; +})(exports.AssetTransfersOrder || (exports.AssetTransfersOrder = {})); +/** + * An enum for specifying the token type on NFTs. + * + * @public + */ +exports.NftTokenType = void 0; +(function (NftTokenType) { + NftTokenType["ERC721"] = "ERC721"; + NftTokenType["ERC1155"] = "ERC1155"; + NftTokenType["UNKNOWN"] = "UNKNOWN"; +})(exports.NftTokenType || (exports.NftTokenType = {})); +/** Potential reasons why an NFT contract was classified as spam. */ +exports.NftSpamClassification = void 0; +(function (NftSpamClassification) { + NftSpamClassification["Erc721TooManyOwners"] = "Erc721TooManyOwners"; + NftSpamClassification["Erc721TooManyTokens"] = "Erc721TooManyTokens"; + NftSpamClassification["Erc721DishonestTotalSupply"] = "Erc721DishonestTotalSupply"; + NftSpamClassification["MostlyHoneyPotOwners"] = "MostlyHoneyPotOwners"; + NftSpamClassification["OwnedByMostHoneyPots"] = "OwnedByMostHoneyPots"; +})(exports.NftSpamClassification || (exports.NftSpamClassification = {})); +/** + * Enum of NFT filters that can be applied to a {@link getNftsForOwner} request. + * NFTs that match one or more of these filters are excluded from the response. + * + * - @deprecated Use {@link NftFilters} instead. This enum will be removed in a + * future version. + * + * @beta + */ +exports.NftExcludeFilters = void 0; +(function (NftExcludeFilters) { + /** Exclude NFTs that have been classified as spam. */ + NftExcludeFilters["SPAM"] = "SPAM"; + /** Exclude NFTs that have been airdropped to a user. */ + NftExcludeFilters["AIRDROPS"] = "AIRDROPS"; +})(exports.NftExcludeFilters || (exports.NftExcludeFilters = {})); +/** + * Enum of NFT filters that can be applied to a {@link getNftsForOwner} or a + * {@link getContractsForOwner} request. + * + * @beta + */ +exports.NftFilters = void 0; +(function (NftFilters) { + /** NFTs that have been classified as spam. */ + NftFilters["SPAM"] = "SPAM"; + /** NFTs that have been airdropped to a user. */ + NftFilters["AIRDROPS"] = "AIRDROPS"; +})(exports.NftFilters || (exports.NftFilters = {})); +/** + * Enum of ordering that can be applied to a {@link getNftsForOwner} or a + * {@link getContractsForOwner} response. + * + * @beta + */ +exports.NftOrdering = void 0; +(function (NftOrdering) { + NftOrdering["TRANSFERTIME"] = "TRANSFERTIME"; +})(exports.NftOrdering || (exports.NftOrdering = {})); +/** + * Enum for representing the supported sorting orders of the API. + * + * @public + */ +exports.SortingOrder = void 0; +(function (SortingOrder) { + SortingOrder["ASCENDING"] = "asc"; + SortingOrder["DESCENDING"] = "desc"; +})(exports.SortingOrder || (exports.SortingOrder = {})); +/** + * Enum representing the supported NFT marketplaces by the {@link getNftSales} endpoint. + * + * @public + */ +exports.NftSaleMarketplace = void 0; +(function (NftSaleMarketplace) { + NftSaleMarketplace["SEAPORT"] = "seaport"; + NftSaleMarketplace["LOOKSRARE"] = "looksrare"; + NftSaleMarketplace["X2Y2"] = "x2y2"; + NftSaleMarketplace["UNKNOWN"] = "unknown"; +})(exports.NftSaleMarketplace || (exports.NftSaleMarketplace = {})); +/** + * Enum for specifing the taker type for the {@link getNftSales} endpoint. + * + * @public + */ +exports.NftSaleTakerType = void 0; +(function (NftSaleTakerType) { + NftSaleTakerType["BUYER"] = "buyer"; + NftSaleTakerType["SELLER"] = "seller"; +})(exports.NftSaleTakerType || (exports.NftSaleTakerType = {})); +/** The current state of the NFT contract refresh process. */ +exports.RefreshState = void 0; +(function (RefreshState) { + /** The provided contract is not an NFT or does not contain metadata. */ + RefreshState["DOES_NOT_EXIST"] = "does_not_exist"; + /** The contract has already been queued for refresh. */ + RefreshState["ALREADY_QUEUED"] = "already_queued"; + /** The contract is currently being refreshed. */ + RefreshState["IN_PROGRESS"] = "in_progress"; + /** The contract refresh is complete. */ + RefreshState["FINISHED"] = "finished"; + /** The contract refresh has been queued and await execution. */ + RefreshState["QUEUED"] = "queued"; + /** The contract was unable to be queued due to an internal error. */ + RefreshState["QUEUE_FAILED"] = "queue_failed"; +})(exports.RefreshState || (exports.RefreshState = {})); +/** An OpenSea collection's approval status. */ +exports.OpenSeaSafelistRequestStatus = void 0; +(function (OpenSeaSafelistRequestStatus) { + /** Verified collection. */ + OpenSeaSafelistRequestStatus["VERIFIED"] = "verified"; + /** Collections that are approved on open sea and can be found in search results. */ + OpenSeaSafelistRequestStatus["APPROVED"] = "approved"; + /** Collections that requested safelisting on OpenSea. */ + OpenSeaSafelistRequestStatus["REQUESTED"] = "requested"; + /** Brand new collections. */ + OpenSeaSafelistRequestStatus["NOT_REQUESTED"] = "not_requested"; +})(exports.OpenSeaSafelistRequestStatus || (exports.OpenSeaSafelistRequestStatus = {})); +/** + * Method names for Alchemy's custom Subscription API endpoints. + * + * This value is provided in the `method` field when creating an event filter on + * the Websocket Namespace. + */ +exports.AlchemySubscription = void 0; +(function (AlchemySubscription) { + AlchemySubscription["PENDING_TRANSACTIONS"] = "alchemy_pendingTransactions"; + AlchemySubscription["MINED_TRANSACTIONS"] = "alchemy_minedTransactions"; +})(exports.AlchemySubscription || (exports.AlchemySubscription = {})); +/** + * Potential transaction job statuses for a {@link GasOptimizedTransactionResponse} + * + * @internal + */ +// TODO(txjob): Remove internal tag once this feature is released. +exports.GasOptimizedTransactionStatus = void 0; +(function (GasOptimizedTransactionStatus) { + GasOptimizedTransactionStatus["UNSPECIFIED"] = "TRANSACTION_JOB_STATUS_UNSPECIFIED"; + GasOptimizedTransactionStatus["IN_PROGRESS"] = "IN_PROGRESS"; + GasOptimizedTransactionStatus["COMPLETE"] = "COMPLETE"; + GasOptimizedTransactionStatus["ABANDONED"] = "ABANDONED"; +})(exports.GasOptimizedTransactionStatus || (exports.GasOptimizedTransactionStatus = {})); +/** The version of the webhook. All newly created webhooks default to V2. */ +exports.WebhookVersion = void 0; +(function (WebhookVersion) { + WebhookVersion["V1"] = "V1"; + WebhookVersion["V2"] = "V2"; +})(exports.WebhookVersion || (exports.WebhookVersion = {})); +/** The type of {@link Webhook}. */ +exports.WebhookType = void 0; +(function (WebhookType) { + WebhookType["MINED_TRANSACTION"] = "MINED_TRANSACTION"; + WebhookType["DROPPED_TRANSACTION"] = "DROPPED_TRANSACTION"; + WebhookType["ADDRESS_ACTIVITY"] = "ADDRESS_ACTIVITY"; + WebhookType["NFT_ACTIVITY"] = "NFT_ACTIVITY"; +})(exports.WebhookType || (exports.WebhookType = {})); + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +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. +***************************************************************************** */ + +function __awaiter(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 __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +const DEFAULT_ALCHEMY_API_KEY = 'demo'; +const DEFAULT_NETWORK = exports.Network.ETH_MAINNET; +const DEFAULT_MAX_RETRIES = 5; +/** + * Returns the base URL for making Alchemy API requests. The `alchemy.com` + * endpoints only work with non eth json-rpc requests. + * + * @internal + */ +function getAlchemyHttpUrl(network, apiKey) { + return `https://${network}.g.alchemy.com/v2/${apiKey}`; +} +function getAlchemyNftHttpUrl(network, apiKey) { + return `https://${network}.g.alchemy.com/nft/v2/${apiKey}`; +} +function getAlchemyWsUrl(network, apiKey) { + return `wss://${network}.g.alchemy.com/v2/${apiKey}`; +} +function getAlchemyWebhookHttpUrl() { + return 'https://dashboard.alchemy.com/api'; +} +var AlchemyApiType; +(function (AlchemyApiType) { + AlchemyApiType[AlchemyApiType["BASE"] = 0] = "BASE"; + AlchemyApiType[AlchemyApiType["NFT"] = 1] = "NFT"; + AlchemyApiType[AlchemyApiType["WEBHOOK"] = 2] = "WEBHOOK"; +})(AlchemyApiType || (AlchemyApiType = {})); +/** + * Mapping of network names to their corresponding Network strings used to + * create an Ethers.js Provider instance. + */ +const EthersNetwork = { + [exports.Network.ETH_MAINNET]: 'mainnet', + [exports.Network.ETH_ROPSTEN]: 'ropsten', + [exports.Network.ETH_GOERLI]: 'goerli', + [exports.Network.ETH_KOVAN]: 'kovan', + [exports.Network.ETH_RINKEBY]: 'rinkeby', + [exports.Network.OPT_MAINNET]: 'optimism', + [exports.Network.OPT_KOVAN]: 'optimism-kovan', + [exports.Network.OPT_GOERLI]: 'optimism-goerli', + [exports.Network.ARB_MAINNET]: 'arbitrum', + [exports.Network.ARB_RINKEBY]: 'arbitrum-rinkeby', + [exports.Network.ARB_GOERLI]: 'arbitrum-goerli', + [exports.Network.MATIC_MAINNET]: 'matic', + [exports.Network.MATIC_MUMBAI]: 'maticmum', + [exports.Network.ASTAR_MAINNET]: 'astar-mainnet' +}; +/** + * Mapping of network names to their corresponding Ethers Network objects. These + * networks are not yet supported by Ethers and are listed here to be overriden + * in the provider. + */ +const CustomNetworks = { + 'arbitrum-goerli': { + chainId: 421613, + name: 'arbitrum-goerli' + }, + 'astar-mainnet': { + chainId: 592, + name: 'astar-mainnet' + } +}; +function noop() { + // It's a no-op +} +const ETH_NULL_VALUE = '0x'; + +/** + * This class holds the config information for the SDK client instance and + * exposes the underlying providers for more advanced use cases. + * + * @public + */ +class AlchemyConfig { + constructor(config) { + this.apiKey = (config === null || config === void 0 ? void 0 : config.apiKey) || DEFAULT_ALCHEMY_API_KEY; + this.network = (config === null || config === void 0 ? void 0 : config.network) || DEFAULT_NETWORK; + this.maxRetries = (config === null || config === void 0 ? void 0 : config.maxRetries) || DEFAULT_MAX_RETRIES; + this.url = config === null || config === void 0 ? void 0 : config.url; + this.authToken = config === null || config === void 0 ? void 0 : config.authToken; + this.batchRequests = (config === null || config === void 0 ? void 0 : config.batchRequests) || false; + } + /** + * Returns the URL endpoint to send the HTTP request to. If a custom URL was + * provided in the config, that URL is returned. Otherwise, the default URL is + * from the network and API key. + * + * @param apiType - The type of API to get the URL for. + * @internal + */ + _getRequestUrl(apiType) { + if (this.url !== undefined) { + return this.url; + } + else if (apiType === AlchemyApiType.NFT) { + return getAlchemyNftHttpUrl(this.network, this.apiKey); + } + else if (apiType === AlchemyApiType.WEBHOOK) { + return getAlchemyWebhookHttpUrl(); + } + else { + return getAlchemyHttpUrl(this.network, this.apiKey); + } + } + /** + * Returns an AlchemyProvider instance. Only one provider is created per + * Alchemy instance. + * + * The AlchemyProvider is a wrapper around ether's `AlchemyProvider` class and + * has been expanded to support Alchemy's Enhanced APIs. + * + * Most common methods on the provider are available as top-level methods on + * the {@link Alchemy} instance, but the provider is exposed here to access + * other less-common methods. + * + * @public + */ + getProvider() { + if (!this._baseAlchemyProvider) { + this._baseAlchemyProvider = (() => __awaiter(this, void 0, void 0, function* () { + const { AlchemyProvider } = yield Promise.resolve().then(function () { return require('./alchemy-provider-ef251598.js'); }); + return new AlchemyProvider(this); + }))(); + } + return this._baseAlchemyProvider; + } + /** + * Returns an AlchemyWebsocketProvider instance. Only one provider is created + * per Alchemy instance. + * + * The AlchemyWebSocketProvider is a wrapper around ether's + * `AlchemyWebSocketProvider` class and has been expanded to support Alchemy's + * Subscription APIs, automatic backfilling, and other performance improvements. + * + * Most common methods on the provider are available as top-level methods on + * the {@link Alchemy} instance, but the provider is exposed here to access + * other less-common methods. + */ + getWebSocketProvider() { + if (!this._baseAlchemyWssProvider) { + this._baseAlchemyWssProvider = (() => __awaiter(this, void 0, void 0, function* () { + const { AlchemyWebSocketProvider } = yield Promise.resolve().then(function () { return require('./alchemy-websocket-provider-c17e9225.js'); }); + return new AlchemyWebSocketProvider(this); + }))(); + } + return this._baseAlchemyWssProvider; + } +} + +/** + * Converts a hex string to a decimal number. + * + * @param hexString - The hex string to convert. + * @public + */ +function fromHex(hexString) { + return bignumber.BigNumber.from(hexString).toNumber(); +} +/** + * Converts a number to a hex string. + * + * @param num - The number to convert to hex. + * @public + */ +function toHex(num) { + return bignumber.BigNumber.from(num).toHexString(); +} +/** + * Checks if a value is a hex string. + * + * @param possibleHexString - The value to check. + * @public + */ +function isHex(possibleHexString) { + return /^0x[0-9a-fA-F]+$/.test(possibleHexString); +} + +function formatBlock(block) { + if (typeof block === 'string') { + return block; + } + else if (Number.isInteger(block)) { + return toHex(block); + } + return block.toString(); +} +function stringToEnum(x, enumb) { + return Object.values(enumb).includes(x) ? x : undefined; +} +function getNftContractFromRaw(rawNftContract) { + return { + address: rawNftContract.address, + name: rawNftContract.contractMetadata.name, + symbol: rawNftContract.contractMetadata.symbol, + totalSupply: rawNftContract.contractMetadata.totalSupply, + tokenType: parseNftTokenType(rawNftContract.contractMetadata.tokenType), + openSea: parseOpenSeaMetadata(rawNftContract.contractMetadata.openSea) + }; +} +function getBaseNftFromRaw(rawBaseNft, contractAddress) { + var _a; + return { + contract: contractAddress + ? { address: contractAddress } + : rawBaseNft.contract, + tokenId: bignumber.BigNumber.from(rawBaseNft.id.tokenId).toString(), + tokenType: parseNftTokenType((_a = rawBaseNft.id.tokenMetadata) === null || _a === void 0 ? void 0 : _a.tokenType) + }; +} +function getNftFromRaw(rawNft) { + var _a, _b, _c, _d, _e; + try { + const tokenType = parseNftTokenType((_a = rawNft.id.tokenMetadata) === null || _a === void 0 ? void 0 : _a.tokenType); + const spamInfo = parseSpamInfo(rawNft.spamInfo); + return { + contract: { + address: rawNft.contract.address, + name: (_b = rawNft.contractMetadata) === null || _b === void 0 ? void 0 : _b.name, + symbol: (_c = rawNft.contractMetadata) === null || _c === void 0 ? void 0 : _c.symbol, + totalSupply: (_d = rawNft.contractMetadata) === null || _d === void 0 ? void 0 : _d.totalSupply, + tokenType, + openSea: parseOpenSeaMetadata((_e = rawNft.contractMetadata) === null || _e === void 0 ? void 0 : _e.openSea) + }, + tokenId: parseNftTokenId(rawNft.id.tokenId), + tokenType, + title: rawNft.title, + description: parseNftDescription(rawNft.description), + timeLastUpdated: rawNft.timeLastUpdated, + metadataError: rawNft.error, + rawMetadata: rawNft.metadata, + tokenUri: parseNftTokenUri(rawNft.tokenUri), + media: parseNftTokenUriArray(rawNft.media), + spamInfo + }; + } + catch (e) { + throw new Error('Error parsing the NFT response: ' + e); + } +} +function getNftSalesFromRaw(rawNftSales) { + return { + pageKey: rawNftSales === null || rawNftSales === void 0 ? void 0 : rawNftSales.pageKey, + nftSales: rawNftSales.nftSales.map(rawNftSale => ({ + marketplace: parseNftSaleMarketplace(rawNftSale.marketplace), + contractAddress: rawNftSale.contractAddress, + tokenId: rawNftSale.tokenId, + quantity: rawNftSale.quantity, + buyerAddress: rawNftSale.buyerAddress, + sellerAddress: rawNftSale.sellerAddress, + taker: parseNftTaker(rawNftSale.taker), + sellerFee: rawNftSale === null || rawNftSale === void 0 ? void 0 : rawNftSale.sellerFee, + marketplaceFee: rawNftSale === null || rawNftSale === void 0 ? void 0 : rawNftSale.marketplaceFee, + royaltyFee: rawNftSale === null || rawNftSale === void 0 ? void 0 : rawNftSale.royaltyFee, + blockNumber: rawNftSale === null || rawNftSale === void 0 ? void 0 : rawNftSale.blockNumber, + logIndex: rawNftSale.logIndex, + bundleIndex: rawNftSale.bundleIndex, + transactionHash: rawNftSale.transactionHash + })) + }; +} +function parseNftSaleMarketplace(marketplace) { + switch (marketplace) { + case 'looksrare': + return exports.NftSaleMarketplace.LOOKSRARE; + case 'seaport': + return exports.NftSaleMarketplace.SEAPORT; + case 'x2y2': + return exports.NftSaleMarketplace.X2Y2; + default: + return exports.NftSaleMarketplace.UNKNOWN; + } +} +function parseNftTaker(taker) { + // The `.toLowerCase()` call is needed because the API returns the capitalized values + switch (taker.toLowerCase()) { + case 'buyer': + return exports.NftSaleTakerType.BUYER; + case 'seller': + return exports.NftSaleTakerType.SELLER; + default: + throw new Error(`Unsupported NftSaleTakerType ${taker}`); + } +} +function getNftRarityFromRaw(rawNftRarity) { + return rawNftRarity.map(({ prevalence, trait_type, value }) => ({ + prevalence, + traitType: trait_type, + value + })); +} +function getContractsForOwnerFromRaw(rawContractsForOwner) { + return { + pageKey: rawContractsForOwner === null || rawContractsForOwner === void 0 ? void 0 : rawContractsForOwner.pageKey, + totalCount: rawContractsForOwner.totalCount, + contracts: rawContractsForOwner.contracts.map(contract => { + return { + address: contract.address, + totalSupply: contract.totalSupply, + isSpam: contract.isSpam, + media: contract.media, + numDistinctTokensOwned: contract.numDistinctTokensOwned, + tokenId: contract.tokenId, + totalBalance: contract.totalBalance, + name: contract.name, + openSea: parseOpenSeaMetadata(contract === null || contract === void 0 ? void 0 : contract.opensea), + symbol: contract === null || contract === void 0 ? void 0 : contract.symbol, + tokenType: parseNftTokenType(contract === null || contract === void 0 ? void 0 : contract.tokenType) + }; + }) + }; +} +function parseNftTokenId(tokenId) { + // We have to normalize the token id here since the backend sometimes + // returns the token ID as a hex string and sometimes as an integer. + return bignumber.BigNumber.from(tokenId).toString(); +} +function parseNftTokenType(tokenType) { + switch (tokenType) { + case 'erc721': + case 'ERC721': + return exports.NftTokenType.ERC721; + case 'erc1155': + case 'ERC1155': + return exports.NftTokenType.ERC1155; + default: + return exports.NftTokenType.UNKNOWN; + } +} +function parseSpamInfo(spamInfo) { + if (!spamInfo) { + return undefined; + } + const { isSpam, classifications } = spamInfo; + return { + isSpam: isSpam === 'true', + classifications + }; +} +function parseNftDescription(description) { + if (description === undefined) { + return ''; + } + // TODO: Remove after backend adds JSON stringification. + if (!Array.isArray(description) && typeof description === 'object') { + return JSON.stringify(description); + } + return typeof description === 'string' ? description : description.join(' '); +} +function parseNftTokenUri(uri) { + if (uri && uri.raw.length === 0 && uri.gateway.length == 0) { + return undefined; + } + return uri; +} +function parseNftTokenUriArray(arr) { + if (arr === undefined) { + return []; + } + return arr.filter(uri => parseNftTokenUri(uri) !== undefined); +} +function parseOpenSeaMetadata(openSea) { + if (openSea === undefined) { + return undefined; + } + return { + floorPrice: openSea.floorPrice, + collectionName: openSea.collectionName, + safelistRequestStatus: openSea.safelistRequestStatus !== undefined + ? stringToEnum(openSea.safelistRequestStatus, exports.OpenSeaSafelistRequestStatus) + : undefined, + imageUrl: openSea.imageUrl, + description: openSea.description, + externalUrl: openSea.externalUrl, + twitterUsername: openSea.twitterUsername, + discordUrl: openSea.discordUrl, + lastIngestedAt: openSea.lastIngestedAt + }; +} +const IS_BROWSER = typeof window !== 'undefined' && window !== null; + +/** + * The core namespace contains all commonly-used [Ethers.js + * Provider](https://docs.ethers.io/v5/api/providers/api-providers/#AlchemyProvider) + * methods. If you are already using Ethers.js, you should be simply able to + * replace the Ethers.js Provider object with `alchemy.core` when accessing + * provider methods and it should just work. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.core`. + */ +class CoreNamespace { + /** @internal */ + constructor(config) { + this.config = config; + } + /** + * Returns the balance of a given address as of the provided block. + * + * @param addressOrName The address or name of the account to get the balance for. + * @param blockTag The optional block number or hash to get the balance for. + * Defaults to 'latest' if unspecified. + * @public + */ + getBalance(addressOrName, blockTag) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getBalance(addressOrName, blockTag); + }); + } + /** + * Returns the contract code of the provided address at the block. If there is + * no contract deployed, the result is `0x`. + * + * @param addressOrName The address or name of the account to get the code for. + * @param blockTag The optional block number or hash to get the code for. + * Defaults to 'latest' if unspecified. + * @public + */ + getCode(addressOrName, blockTag) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getCode(addressOrName, blockTag); + }); + } + /** + * Return the value of the provided position at the provided address, at the + * provided block in `Bytes32` format. + * + * @param addressOrName The address or name of the account to get the code for. + * @param position The position of the storage slot to get. + * @param blockTag The optional block number or hash to get the code for. + * Defaults to 'latest' if unspecified. + * @public + */ + getStorageAt(addressOrName, position, blockTag) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getStorageAt(addressOrName, position, blockTag); + }); + } + /** + * Returns the number of transactions ever sent from the provided address, as + * of the provided block tag. This value is used as the nonce for the next + * transaction from the address sent to the network. + * + * @param addressOrName The address or name of the account to get the nonce for. + * @param blockTag The optional block number or hash to get the nonce for. + * @public + */ + getTransactionCount(addressOrName, blockTag) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getTransactionCount(addressOrName, blockTag); + }); + } + /** + * Returns the block from the network based on the provided block number or + * hash. Transactions on the block are represented as an array of transaction + * hashes. To get the full transaction details on the block, use + * {@link getBlockWithTransactions} instead. + * + * @param blockHashOrBlockTag The block number or hash to get the block for. + * @public + */ + getBlock(blockHashOrBlockTag) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getBlock(blockHashOrBlockTag); + }); + } + /** + * Returns the block from the network based on the provided block number or + * hash. Transactions on the block are represented as an array of + * {@link TransactionResponse} objects. + * + * @param blockHashOrBlockTag The block number or hash to get the block for. + * @public + */ + getBlockWithTransactions(blockHashOrBlockTag) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getBlockWithTransactions(blockHashOrBlockTag); + }); + } + /** + * Returns the {@link EthersNetworkAlias} Alchemy is connected to. + * + * @public + */ + getNetwork() { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getNetwork(); + }); + } + /** + * Returns the block number of the most recently mined block. + * + * @public + */ + getBlockNumber() { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getBlockNumber(); + }); + } + /** + * Returns the best guess of the current gas price to use in a transaction. + * + * @public + */ + getGasPrice() { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getGasPrice(); + }); + } + /** + * Returns the recommended fee data to use in a transaction. + * + * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas + * should be used. + * + * For legacy transactions and networks which do not support EIP-1559, the + * gasPrice should be used. + * + * @public + */ + getFeeData() { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getFeeData(); + }); + } + /** + * Returns a Promise which will stall until the network has heen established, + * ignoring errors due to the target node not being active yet. + * + * This can be used for testing or attaching scripts to wait until the node is + * up and running smoothly. + * + * @public + */ + ready() { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.ready; + }); + } + /** + * Returns the result of executing the transaction, using call. A call does + * not require any ether, but cannot change any state. This is useful for + * calling getters on Contracts. + * + * @param transaction The transaction to execute. + * @param blockTag The optional block number or hash to get the call for. + * @public + */ + call(transaction, blockTag) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.call(transaction, blockTag); + }); + } + /** + * Returns an estimate of the amount of gas that would be required to submit + * transaction to the network. + * + * An estimate may not be accurate since there could be another transaction on + * the network that was not accounted for, but after being mined affects the + * relevant state. + * + * This is an alias for {@link TransactNamespace.estimateGas}. + * + * @param transaction The transaction to estimate gas for. + * @public + */ + estimateGas(transaction) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.estimateGas(transaction); + }); + } + /** + * Returns the transaction with hash or null if the transaction is unknown. + * + * If a transaction has not been mined, this method will search the + * transaction pool. Various backends may have more restrictive transaction + * pool access (e.g. if the gas price is too low or the transaction was only + * recently sent and not yet indexed) in which case this method may also return null. + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransaction(transactionHash) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getTransaction(transactionHash); + }); + } + /** + * Returns the transaction receipt for hash or null if the transaction has not + * been mined. + * + * To stall until the transaction has been mined, consider the + * waitForTransaction method below. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransactionReceipt(transactionHash) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getTransactionReceipt(transactionHash); + }); + } + /** + * Submits transaction to the network to be mined. The transaction must be + * signed, and be valid (i.e. the nonce is correct and the account has + * sufficient balance to pay for the transaction). + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param signedTransaction The signed transaction to send. + * @public + */ + sendTransaction(signedTransaction) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.sendTransaction(signedTransaction); + }); + } + /** + * Returns a promise which will not resolve until specified transaction hash is mined. + * + * If {@link confirmations} is 0, this method is non-blocking and if the + * transaction has not been mined returns null. Otherwise, this method will + * block until the transaction has confirmed blocks mined on top of the block + * in which it was mined. + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to wait for. + * @param confirmations The number of blocks to wait for. + * @param timeout The maximum time to wait for the transaction to confirm. + * @public + */ + waitForTransaction(transactionHash, confirmations, timeout) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.waitForTransaction(transactionHash, confirmations, timeout); + }); + } + /** + * Returns an array of logs that match the provided filter. + * + * @param filter The filter object to use. + * @public + */ + getLogs(filter) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getLogs(filter); + }); + } + /** + * Allows sending a raw message to the Alchemy backend. + * + * @param method The method to call. + * @param params The parameters to pass to the method. + * @public + */ + send(method, params) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.send(method, params); + }); + } + /** + * Finds the address that deployed the provided contract and block number it + * was deployed in. + * + * NOTE: This method performs a binary search across all blocks since genesis + * and can take a long time to complete. This method is a convenience method + * that will eventually be replaced by a single call to an Alchemy endpoint + * with this information cached. + * + * @param contractAddress - The contract address to find the deployer for. + * @beta + */ + findContractDeployer(contractAddress) { + var _a; + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + const currentBlockNum = yield provider.getBlockNumber(); + if ((yield provider.getCode(contractAddress, currentBlockNum)) === + ETH_NULL_VALUE) { + throw new Error(`Contract '${contractAddress}' does not exist`); + } + // Binary search for the block number that the contract was deployed in. + const firstBlock = yield binarySearchFirstBlock(0, currentBlockNum + 1, contractAddress, this.config); + // Find the first transaction in the block that matches the provided address. + const txReceipts = yield this.getTransactionReceipts({ + blockNumber: toHex(firstBlock) + }); + const matchingReceipt = (_a = txReceipts.receipts) === null || _a === void 0 ? void 0 : _a.find(receipt => receipt.contractAddress === contractAddress.toLowerCase()); + return { + deployerAddress: matchingReceipt === null || matchingReceipt === void 0 ? void 0 : matchingReceipt.from, + blockNumber: firstBlock + }; + }); + } + getTokenBalances(addressOrName, contractAddressesOrOptions) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + const address = yield provider._getAddress(addressOrName); + if (Array.isArray(contractAddressesOrOptions)) { + if (contractAddressesOrOptions.length > 1500) { + throw new Error('You cannot pass in more than 1500 contract addresses to getTokenBalances()'); + } + if (contractAddressesOrOptions.length === 0) { + throw new Error('getTokenBalances() requires at least one contractAddress when using an array'); + } + return provider._send('alchemy_getTokenBalances', [address, contractAddressesOrOptions], 'getTokenBalances'); + } + else { + const tokenType = contractAddressesOrOptions === undefined + ? exports.TokenBalanceType.ERC20 + : contractAddressesOrOptions.type; + const params = [address, tokenType]; + if ((contractAddressesOrOptions === null || contractAddressesOrOptions === void 0 ? void 0 : contractAddressesOrOptions.type) === exports.TokenBalanceType.ERC20 && + contractAddressesOrOptions.pageKey) { + params.push({ pageKey: contractAddressesOrOptions.pageKey }); + } + return provider._send('alchemy_getTokenBalances', params, 'getTokenBalances'); + } + }); + } + /** + * Returns metadata for a given token contract address. + * + * @param address The contract address to get metadata for. + * @public + */ + getTokenMetadata(address) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider._send('alchemy_getTokenMetadata', [address], 'getTokenMetadata'); + }); + } + getAssetTransfers(params) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + if (params.fromAddress) { + params.fromAddress = yield provider._getAddress(params.fromAddress); + } + if (params.toAddress) { + params.toAddress = yield provider._getAddress(params.toAddress); + } + return provider._send('alchemy_getAssetTransfers', [ + Object.assign(Object.assign({}, params), { fromBlock: params.fromBlock != null + ? formatBlock(params.fromBlock) + : undefined, toBlock: params.toBlock != null ? formatBlock(params.toBlock) : undefined, maxCount: params.maxCount != null ? toHex(params.maxCount) : undefined }) + ], 'getAssetTransfers'); + }); + } + /** + * Gets all transaction receipts for a given block by number or block hash. + * + * @param params An object containing fields for the transaction receipt query. + * @public + */ + getTransactionReceipts(params) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider._send('alchemy_getTransactionReceipts', [params], 'getTransactionReceipts'); + }); + } + /** + * Returns the underlying owner address for the provided ENS address, or `null` + * if the ENS name does not have an underlying address. + * + * @param name The ENS address name to resolve. + */ + resolveName(name) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.resolveName(name); + }); + } + /** + * Performs a reverse lookup of the address in ENS using the Reverse Registrar. If the name does not exist, or the forward lookup does not match, null is returned. + * + * An ENS name requires additional configuration to setup a reverse record, so not all ENS addresses will map back to the original ENS domain. + * + * @param address The address to look up the ENS domain name for. + */ + lookupAddress(address) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.lookupAddress(address); + }); + } +} +/** + * Perform a binary search between an integer range of block numbers to find the + * block number where the contract was deployed. + * + * @internal + */ +function binarySearchFirstBlock(start, end, address, config) { + return __awaiter(this, void 0, void 0, function* () { + if (start >= end) { + return end; + } + const mid = Math.floor((start + end) / 2); + const provider = yield config.getProvider(); + const code = yield provider.getCode(address, mid); + if (code === ETH_NULL_VALUE) { + return binarySearchFirstBlock(mid + 1, end, address, config); + } + return binarySearchFirstBlock(start, mid, address, config); + }); +} + +/** + * The SDK has 4 log levels and a 5th option for disabling all logging. By + * default, the log level is set to INFO. + * + * The order is a follows: DEBUG < INFO < WARN < ERROR + * + * All log types above the current log level will be outputted. + */ +var LogLevel; +(function (LogLevel) { + LogLevel[LogLevel["DEBUG"] = 0] = "DEBUG"; + LogLevel[LogLevel["INFO"] = 1] = "INFO"; + LogLevel[LogLevel["WARN"] = 2] = "WARN"; + LogLevel[LogLevel["ERROR"] = 3] = "ERROR"; + LogLevel[LogLevel["SILENT"] = 4] = "SILENT"; +})(LogLevel || (LogLevel = {})); +const logLevelStringToEnum = { + debug: LogLevel.DEBUG, + info: LogLevel.INFO, + warn: LogLevel.WARN, + error: LogLevel.ERROR, + silent: LogLevel.SILENT +}; +// HACKY: Use the console method as a string rather than the function itself +// in order to allow for mocking in tests. +const logLevelToConsoleFn = { + [LogLevel.DEBUG]: 'log', + [LogLevel.INFO]: 'info', + [LogLevel.WARN]: 'warn', + [LogLevel.ERROR]: 'error' +}; +const DEFAULT_LOG_LEVEL = LogLevel.INFO; +/** + * Configures the verbosity of logging. The default log level is `info`. + * + * @param logLevel - The verbosity of logging. Can be any of the following values: + * + * - `debug`: The most verbose logging level. + * - `info`: The default logging level. + * - `warn`: A logging level for non-critical issues. + * - `error`: A logging level for critical issues. + * - `silent`: Turn off all logging. + * + * @public + */ +function setLogLevel(logLevel) { + loggerClient.logLevel = logLevelStringToEnum[logLevel]; +} +function logDebug(message, ...args) { + loggerClient.debug(message, args); +} +function logInfo(message, ...args) { + loggerClient.info(message, args); +} +function logWarn(message, ...args) { + loggerClient.warn(message, args); +} +class Logger { + constructor() { + /** The log level of the given Logger instance. */ + this._logLevel = DEFAULT_LOG_LEVEL; + } + get logLevel() { + return this._logLevel; + } + set logLevel(val) { + if (!(val in LogLevel)) { + throw new TypeError(`Invalid value "${val}" assigned to \`logLevel\``); + } + this._logLevel = val; + } + debug(...args) { + this._log(LogLevel.DEBUG, ...args); + } + info(...args) { + this._log(LogLevel.INFO, ...args); + } + warn(...args) { + this._log(LogLevel.WARN, ...args); + } + error(...args) { + this._log(LogLevel.ERROR, ...args); + } + /** + * Forwards log messages to their corresponding console counterparts if the + * log level allows it. + */ + _log(logLevel, ...args) { + if (logLevel < this._logLevel) { + return; + } + const now = new Date().toISOString(); + const method = logLevelToConsoleFn[logLevel]; + if (method) { + console[method](`[${now}] Alchemy:`, ...args.map(stringify)); + } + else { + throw new Error(`Logger received an invalid logLevel (value: ${logLevel})`); + } + } +} +function stringify(obj) { + if (typeof obj === 'string') { + return obj; + } + else { + try { + return JSON.stringify(obj); + } + catch (e) { + // Failed to convert to JSON, log the object directly. + return obj; + } + } +} +// Instantiate default logger for the SDK. +const loggerClient = new Logger(); + +// This file is autogenerated by injectVersion.js. Any changes will be +// overwritten on commit! +const VERSION = '2.2.5'; + +/** + * Given a REST endpoint, method, and params, sends the request with axios and + * returns the response. + */ +/** + * Helper function to send http requests using Axis. + * + * @private + */ +function sendAxiosRequest(baseUrl, restApiName, methodName, params, overrides) { + var _a; + const requestUrl = baseUrl + '/' + restApiName; + const config = Object.assign(Object.assign({}, overrides), { headers: Object.assign(Object.assign(Object.assign({}, overrides === null || overrides === void 0 ? void 0 : overrides.headers), (!IS_BROWSER && { 'Accept-Encoding': 'gzip' })), { 'Alchemy-Ethers-Sdk-Version': VERSION, 'Alchemy-Ethers-Sdk-Method': methodName }), method: (_a = overrides === null || overrides === void 0 ? void 0 : overrides.method) !== null && _a !== void 0 ? _a : 'GET', url: requestUrl, params }); + return axios__default["default"](config); +} + +const DEFAULT_BACKOFF_INITIAL_DELAY_MS = 1000; +const DEFAULT_BACKOFF_MULTIPLIER = 1.5; +const DEFAULT_BACKOFF_MAX_DELAY_MS = 30 * 1000; +const DEFAULT_BACKOFF_MAX_ATTEMPTS = 5; +/** + * Helper class for implementing exponential backoff and max retry attempts. + * + * @private + * @internal + */ +class ExponentialBackoff { + constructor(maxAttempts = DEFAULT_BACKOFF_MAX_ATTEMPTS) { + this.maxAttempts = maxAttempts; + this.initialDelayMs = DEFAULT_BACKOFF_INITIAL_DELAY_MS; + this.backoffMultiplier = DEFAULT_BACKOFF_MULTIPLIER; + this.maxDelayMs = DEFAULT_BACKOFF_MAX_DELAY_MS; + this.numAttempts = 0; + this.currentDelayMs = 0; + this.isInBackoff = false; + } + /** + * Returns a promise that resolves after the the backoff delay. The delay is + * increased for each attempt. The promise is rejected if the maximum number + * of attempts is exceeded. + */ + // TODO: beautify this into an async iterator. + backoff() { + if (this.numAttempts >= this.maxAttempts) { + return Promise.reject(new Error(`Exceeded maximum number of attempts: ${this.maxAttempts}`)); + } + if (this.isInBackoff) { + return Promise.reject(new Error('A backoff operation is already in progress')); + } + const backoffDelayWithJitterMs = this.withJitterMs(this.currentDelayMs); + if (backoffDelayWithJitterMs > 0) { + logDebug('ExponentialBackoff.backoff', `Backing off for ${backoffDelayWithJitterMs}ms`); + } + // Calculate the next delay. + this.currentDelayMs *= this.backoffMultiplier; + this.currentDelayMs = Math.max(this.currentDelayMs, this.initialDelayMs); + this.currentDelayMs = Math.min(this.currentDelayMs, this.maxDelayMs); + this.numAttempts += 1; + return new Promise(resolve => { + this.isInBackoff = true; + setTimeout(() => { + this.isInBackoff = false; + resolve(); + }, backoffDelayWithJitterMs); + }); + } + /** + * Applies +/- 50% jitter to the backoff delay, up to the max delay cap. + * + * @private + * @param delayMs + */ + withJitterMs(delayMs) { + return Math.min(delayMs + (Math.random() - 0.5) * delayMs, this.maxDelayMs); + } +} + +/** + * A wrapper function to make http requests and retry if the request fails. + * + * @internal + */ +// TODO: Wrap Axios error in AlchemyError. +function requestHttpWithBackoff(config, apiType, restApiName, methodName, params, overrides) { + return __awaiter(this, void 0, void 0, function* () { + let lastError = undefined; + const backoff = new ExponentialBackoff(config.maxRetries); + for (let attempt = 0; attempt < config.maxRetries + 1; attempt++) { + try { + if (lastError !== undefined) { + logInfo('requestHttp', `Retrying after error: ${lastError.message}`); + } + try { + yield backoff.backoff(); + } + catch (err) { + // Backoff errors when the maximum number of attempts is reached. Break + // out of the loop to preserve the last error. + break; + } + const response = yield sendAxiosRequest(config._getRequestUrl(apiType), restApiName, methodName, params, overrides); + if (response.status === 200) { + logDebug(restApiName, `Successful request: ${restApiName}`); + return response.data; + } + else { + logInfo(restApiName, `Request failed: ${restApiName}, ${response.status}, ${response.data}`); + lastError = new Error(response.status + ': ' + response.data); + } + } + catch (err) { + if (!axios__default["default"].isAxiosError(err) || err.response === undefined) { + throw err; + } + // TODO: Standardize all errors into AlchemyError + lastError = new Error(err.response.status + ': ' + err.response.data); + if (!isRetryableHttpError(err, apiType)) { + break; + } + } + } + return Promise.reject(lastError); + }); +} +function isRetryableHttpError(err, apiType) { + // TODO: remove 500s after webhooks are more stable. + const retryableCodes = apiType === AlchemyApiType.WEBHOOK ? [429, 500] : [429]; + return (err.response !== undefined && retryableCodes.includes(err.response.status)); +} +/** + * Fetches all pages in a paginated endpoint, given a `pageKey` field that + * represents the property name containing the next page token. + * + * @internal + */ +function paginateEndpoint(config, apiType, restApiName, methodName, reqPageKey, resPageKey, params) { + return __asyncGenerator(this, arguments, function* paginateEndpoint_1() { + let hasNext = true; + const requestParams = Object.assign({}, params); + while (hasNext) { + const response = yield __await(requestHttpWithBackoff(config, apiType, restApiName, methodName, requestParams)); + yield yield __await(response); + if (response[resPageKey] !== undefined) { + requestParams[reqPageKey] = response[resPageKey]; + } + else { + hasNext = false; + } + } + }); +} + +function getNftMetadata(config, contractAddress, tokenId, tokenType, tokenUriTimeoutInMs, srcMethod = 'getNftMetadata') { + return __awaiter(this, void 0, void 0, function* () { + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getNFTMetadata', srcMethod, { + contractAddress, + tokenId: bignumber.BigNumber.from(tokenId).toString(), + tokenType: tokenType !== exports.NftTokenType.UNKNOWN ? tokenType : undefined, + tokenUriTimeoutInMs + }); + return getNftFromRaw(response); + }); +} +function getNftMetadataBatch(config, tokens, options) { + return __awaiter(this, void 0, void 0, function* () { + const data = { + tokens, + tokenUriTimeoutInMs: options === null || options === void 0 ? void 0 : options.tokenUriTimeoutInMs, + refreshCache: options === null || options === void 0 ? void 0 : options.refreshCache + }; + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getNFTMetadataBatch', 'getNftMetadataBatch', {}, { + method: 'POST', + data + }); + return response.map(getNftFromRaw); + }); +} +function getContractMetadata(config, contractAddress, srcMethod = 'getContractMetadata') { + return __awaiter(this, void 0, void 0, function* () { + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getContractMetadata', srcMethod, { + contractAddress + }); + return getNftContractFromRaw(response); + }); +} +function getNftsForOwnerIterator(config, owner, options, srcMethod = 'getNftsForOwnerIterator') { + return __asyncGenerator(this, arguments, function* getNftsForOwnerIterator_1() { + var e_1, _a; + const withMetadata = omitMetadataToWithMetadata(options === null || options === void 0 ? void 0 : options.omitMetadata); + try { + for (var _b = __asyncValues(paginateEndpoint(config, AlchemyApiType.NFT, 'getNFTs', srcMethod, 'pageKey', 'pageKey', { + contractAddresses: options === null || options === void 0 ? void 0 : options.contractAddresses, + pageKey: options === null || options === void 0 ? void 0 : options.pageKey, + filters: options === null || options === void 0 ? void 0 : options.excludeFilters, + owner, + withMetadata + })), _c; _c = yield __await(_b.next()), !_c.done;) { + const response = _c.value; + for (const ownedNft of response.ownedNfts) { + yield yield __await(Object.assign(Object.assign({}, nftFromGetNftResponse(ownedNft)), { balance: parseInt(ownedNft.balance) })); + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b)); + } + finally { if (e_1) throw e_1.error; } + } + }); +} +function getNftsForOwner(config, owner, options, srcMethod = 'getNftsForOwner') { + return __awaiter(this, void 0, void 0, function* () { + const withMetadata = omitMetadataToWithMetadata(options === null || options === void 0 ? void 0 : options.omitMetadata); + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getNFTs', srcMethod, { + contractAddresses: options === null || options === void 0 ? void 0 : options.contractAddresses, + pageKey: options === null || options === void 0 ? void 0 : options.pageKey, + filters: options === null || options === void 0 ? void 0 : options.excludeFilters, + excludeFilters: options === null || options === void 0 ? void 0 : options.excludeFilters, + includeFilters: options === null || options === void 0 ? void 0 : options.includeFilters, + owner, + pageSize: options === null || options === void 0 ? void 0 : options.pageSize, + withMetadata, + tokenUriTimeoutInMs: options === null || options === void 0 ? void 0 : options.tokenUriTimeoutInMs, + orderBy: options === null || options === void 0 ? void 0 : options.orderBy + }); + return { + ownedNfts: response.ownedNfts.map(res => (Object.assign(Object.assign({}, nftFromGetNftResponse(res)), { balance: parseInt(res.balance) }))), + pageKey: response.pageKey, + totalCount: response.totalCount + }; + }); +} +function getNftsForContract(config, contractAddress, options, srcMethod = 'getNftsForContract') { + var _a; + return __awaiter(this, void 0, void 0, function* () { + const withMetadata = omitMetadataToWithMetadata(options === null || options === void 0 ? void 0 : options.omitMetadata); + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getNFTsForCollection', srcMethod, { + contractAddress, + startToken: options === null || options === void 0 ? void 0 : options.pageKey, + withMetadata, + limit: (_a = options === null || options === void 0 ? void 0 : options.pageSize) !== null && _a !== void 0 ? _a : undefined, + tokenUriTimeoutInMs: 50 + }); + return { + nfts: response.nfts.map(res => nftFromGetNftContractResponse(res, contractAddress)), + pageKey: response.nextToken + }; + }); +} +function getNftsForContractIterator(config, contractAddress, options, srcMethod = 'getNftsForContractIterator') { + return __asyncGenerator(this, arguments, function* getNftsForContractIterator_1() { + var e_2, _a; + const withMetadata = omitMetadataToWithMetadata(options === null || options === void 0 ? void 0 : options.omitMetadata); + try { + for (var _b = __asyncValues(paginateEndpoint(config, AlchemyApiType.NFT, 'getNFTsForCollection', srcMethod, 'startToken', 'nextToken', { + contractAddress, + startToken: options === null || options === void 0 ? void 0 : options.pageKey, + withMetadata + })), _c; _c = yield __await(_b.next()), !_c.done;) { + const response = _c.value; + for (const nft of response.nfts) { + yield yield __await(nftFromGetNftContractResponse(nft, contractAddress)); + } + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b)); + } + finally { if (e_2) throw e_2.error; } + } + }); +} +function getOwnersForContract(config, contractAddress, options, srcMethod = 'getOwnersForContract') { + return __awaiter(this, void 0, void 0, function* () { + // Cast to `any` to avoid more type wrangling. + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getOwnersForCollection', srcMethod, Object.assign(Object.assign({}, options), { contractAddress })); + return Object.assign({ owners: response.ownerAddresses }, (response.pageKey !== undefined && { pageKey: response.pageKey })); + }); +} +function getContractsForOwner(config, owner, options, srcMethod = 'getContractsForOwner') { + return __awaiter(this, void 0, void 0, function* () { + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getContractsForOwner', srcMethod, { + owner, + excludeFilters: options === null || options === void 0 ? void 0 : options.excludeFilters, + includeFilters: options === null || options === void 0 ? void 0 : options.includeFilters, + pageKey: options === null || options === void 0 ? void 0 : options.pageKey, + orderBy: options === null || options === void 0 ? void 0 : options.orderBy + }); + return getContractsForOwnerFromRaw(response); + }); +} +function getOwnersForNft(config, contractAddress, tokenId, srcMethod = 'getOwnersForNft') { + return __awaiter(this, void 0, void 0, function* () { + return requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getOwnersForToken', srcMethod, { + contractAddress, + tokenId: bignumber.BigNumber.from(tokenId).toString() + }); + }); +} +function checkNftOwnership(config, owner, contractAddresses, srcMethod = 'checkNftOwnership') { + return __awaiter(this, void 0, void 0, function* () { + if (contractAddresses.length === 0) { + throw new Error('Must provide at least one contract address'); + } + const response = yield getNftsForOwner(config, owner, { + contractAddresses, + omitMetadata: true + }, srcMethod); + return response.ownedNfts.length > 0; + }); +} +function verifyNftOwnership(config, owner, contractAddresses, srcMethod = 'verifyNftOwnership') { + return __awaiter(this, void 0, void 0, function* () { + if (typeof contractAddresses === 'string') { + const response = yield getNftsForOwner(config, owner, { + contractAddresses: [contractAddresses], + omitMetadata: true + }, srcMethod); + return response.ownedNfts.length > 0; + } + else { + if (contractAddresses.length === 0) { + throw new Error('Must provide at least one contract address'); + } + const response = yield getNftsForOwner(config, owner, { + contractAddresses, + omitMetadata: true + }, srcMethod); + // Create map where all input contract addresses are set to false, then flip + // owned nfts to true. + const result = contractAddresses.reduce((acc, curr) => { + acc[curr] = false; + return acc; + }, {}); + for (const nft of response.ownedNfts) { + result[nft.contract.address] = true; + } + return result; + } + }); +} +function isSpamContract(config, contractAddress, srcMethod = 'isSpamContract') { + return __awaiter(this, void 0, void 0, function* () { + return requestHttpWithBackoff(config, AlchemyApiType.NFT, 'isSpamContract', srcMethod, { + contractAddress + }); + }); +} +function getSpamContracts(config, srcMethod = 'getSpamContracts') { + return __awaiter(this, void 0, void 0, function* () { + return requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getSpamContracts', srcMethod, undefined); + }); +} +function getFloorPrice(config, contractAddress, srcMethod = 'getFloorPrice') { + return __awaiter(this, void 0, void 0, function* () { + return requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getFloorPrice', srcMethod, { + contractAddress + }); + }); +} +function getNftSales(config, options = {}, srcMethod = 'getNftSales') { + return __awaiter(this, void 0, void 0, function* () { + // Avoid ts compiler complaining about the contractAddress field. + const params = Object.assign({}, options); + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getNFTSales', srcMethod, { + fromBlock: params === null || params === void 0 ? void 0 : params.fromBlock, + toBlock: params === null || params === void 0 ? void 0 : params.toBlock, + order: params === null || params === void 0 ? void 0 : params.order, + marketplace: params === null || params === void 0 ? void 0 : params.marketplace, + contractAddress: params === null || params === void 0 ? void 0 : params.contractAddress, + tokenId: (params === null || params === void 0 ? void 0 : params.tokenId) + ? bignumber.BigNumber.from(params === null || params === void 0 ? void 0 : params.tokenId).toString() + : undefined, + sellerAddress: params === null || params === void 0 ? void 0 : params.sellerAddress, + buyerAddress: params === null || params === void 0 ? void 0 : params.buyerAddress, + taker: params === null || params === void 0 ? void 0 : params.taker, + limit: params === null || params === void 0 ? void 0 : params.limit, + pageKey: params === null || params === void 0 ? void 0 : params.pageKey + }); + return getNftSalesFromRaw(response); + }); +} +function computeRarity(config, contractAddress, tokenId, srcMethod = 'computeRarity') { + return __awaiter(this, void 0, void 0, function* () { + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'computeRarity', srcMethod, { + contractAddress, + tokenId: bignumber.BigNumber.from(tokenId).toString() + }); + return getNftRarityFromRaw(response); + }); +} +function searchContractMetadata(config, query, srcMethod = 'searchContractMetadata') { + return __awaiter(this, void 0, void 0, function* () { + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'searchContractMetadata', srcMethod, { + query + }); + return response.map(getNftContractFromRaw); + }); +} +function summarizeNftAttributes(config, contractAddress, srcMethod = 'summarizeNftAttributes') { + return __awaiter(this, void 0, void 0, function* () { + return requestHttpWithBackoff(config, AlchemyApiType.NFT, 'summarizeNftAttributes', srcMethod, { + contractAddress + }); + }); +} +function refreshNftMetadata(config, contractAddress, tokenId, srcMethod = 'refreshNftMetadata') { + return __awaiter(this, void 0, void 0, function* () { + const tokenIdString = bignumber.BigNumber.from(tokenId).toString(); + const first = yield getNftMetadata(config, contractAddress, tokenIdString, undefined, undefined, srcMethod); + const second = yield refresh(config, contractAddress, tokenIdString, srcMethod); + return first.timeLastUpdated !== second.timeLastUpdated; + }); +} +function refreshContract(config, contractAddress, srcMethod = 'refreshContract') { + return __awaiter(this, void 0, void 0, function* () { + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'reingestContract', srcMethod, { + contractAddress + }); + return { + contractAddress: response.contractAddress, + refreshState: parseReingestionState(response.reingestionState), + progress: response.progress + }; + }); +} +function refresh(config, contractAddress, tokenId, srcMethod) { + return __awaiter(this, void 0, void 0, function* () { + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getNFTMetadata', srcMethod, { + contractAddress, + tokenId: bignumber.BigNumber.from(tokenId).toString(), + refreshCache: true + }); + return getNftFromRaw(response); + }); +} +/** + * Helper method to convert a NFT response received from Alchemy backend to an + * SDK NFT type. + * + * @internal + */ +function nftFromGetNftResponse(ownedNft) { + if (isNftWithMetadata(ownedNft)) { + return getNftFromRaw(ownedNft); + } + else { + return getBaseNftFromRaw(ownedNft); + } +} +/** + * Helper method to convert a NFT response received from Alchemy backend to an + * SDK NFT type. + * + * @internal + */ +function nftFromGetNftContractResponse(ownedNft, contractAddress) { + if (isNftWithMetadata(ownedNft)) { + return getNftFromRaw(ownedNft); + } + else { + return getBaseNftFromRaw(ownedNft, contractAddress); + } +} +/** @internal */ +// TODO: more comprehensive type check +function isNftWithMetadata(response) { + return response.title !== undefined; +} +/** + * Flips the `omitMetadata` SDK parameter type to the `withMetadata` parameter + * required by the Alchemy API. If `omitMetadata` is undefined, the SDK defaults + * to including metadata. + * + * @internal + */ +function omitMetadataToWithMetadata(omitMetadata) { + return omitMetadata === undefined ? true : !omitMetadata; +} +function parseReingestionState(reingestionState) { + switch (reingestionState) { + case 'does_not_exist': + return exports.RefreshState.DOES_NOT_EXIST; + case 'already_queued': + return exports.RefreshState.ALREADY_QUEUED; + case 'in_progress': + return exports.RefreshState.IN_PROGRESS; + case 'finished': + return exports.RefreshState.FINISHED; + case 'queued': + return exports.RefreshState.QUEUED; + case 'queue_failed': + return exports.RefreshState.QUEUE_FAILED; + default: + throw new Error('Unknown reingestion state: ' + reingestionState); + } +} + +/** + * The NFT namespace contains all the functionality related to NFTs. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.nft`. + */ +class NftNamespace { + /** @internal */ + constructor(config) { + this.config = config; + } + /** + * Get the NFT metadata associated with the provided parameters. + * + * @param contractAddress - The contract address of the NFT. + * @param tokenId - Token id of the NFT. + * @param tokenType - Optionally specify the type of token to speed up the query. + * @param tokenUriTimeoutInMs - No set timeout by default - When metadata is + * requested, this parameter is the timeout (in milliseconds) for the + * website hosting the metadata to respond. If you want to only access the + * cache and not live fetch any metadata for cache misses then set this value to 0. + * @public + */ + getNftMetadata(contractAddress, tokenId, tokenType, tokenUriTimeoutInMs) { + return getNftMetadata(this.config, contractAddress, tokenId, tokenType, tokenUriTimeoutInMs); + } + /** + * Gets the NFT metadata for multiple NFT tokens. + * + * @param tokens An array of NFT tokens to fetch metadata for. + * @param options Configuration options for making the request. + */ + getNftMetadataBatch(tokens, options) { + return getNftMetadataBatch(this.config, tokens, options); + } + /** + * Get the NFT collection metadata associated with the provided parameters. + * + * @param contractAddress - The contract address of the NFT. + * @public + */ + getContractMetadata(contractAddress) { + return getContractMetadata(this.config, contractAddress); + } + getNftsForOwnerIterator(owner, options) { + return getNftsForOwnerIterator(this.config, owner, options); + } + getNftsForOwner(owner, options) { + return getNftsForOwner(this.config, owner, options); + } + getNftsForContract(contractAddress, options) { + return getNftsForContract(this.config, contractAddress, options); + } + getNftsForContractIterator(contractAddress, options) { + return getNftsForContractIterator(this.config, contractAddress, options); + } + getOwnersForContract(contractAddress, options) { + return getOwnersForContract(this.config, contractAddress, options); + } + /** + * Gets all the owners for a given NFT contract address and token ID. + * + * @param contractAddress - The NFT contract address. + * @param tokenId - Token id of the NFT. + * @beta + */ + getOwnersForNft(contractAddress, tokenId) { + return getOwnersForNft(this.config, contractAddress, tokenId); + } + /** + * Gets all NFT contracts held by the specified owner address. + * + * @param owner - Address for NFT owner (can be in ENS format!). + * @param options - The optional parameters to use for the request. + * @public + */ + getContractsForOwner(owner, options) { + return getContractsForOwner(this.config, owner, options); + } + /** + * DEPRECATED - Checks that the provided owner address owns one of more of the + * provided NFTs. + * + * @deprecated - Use {@link verifyNftOwnership} instead. This method will be + * removed in a future release. + * @param owner - The owner address to check. + * @param contractAddresses - An array of NFT contract addresses to check ownership for. + */ + checkNftOwnership(owner, contractAddresses) { + return checkNftOwnership(this.config, owner, contractAddresses); + } + verifyNftOwnership(owner, contractAddress) { + return verifyNftOwnership(this.config, owner, contractAddress); + } + /** + * Returns whether a contract is marked as spam or not by Alchemy. For more + * information on how we classify spam, go to our NFT API FAQ at + * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification. + * + * @param contractAddress - The contract address to check. + * @beta + */ + isSpamContract(contractAddress) { + return isSpamContract(this.config, contractAddress); + } + /** + * Returns a list of all spam contracts marked by Alchemy. For details on how + * Alchemy marks spam contracts, go to + * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification. + * + * @beta + */ + getSpamContracts() { + return getSpamContracts(this.config); + } + /** + * Returns the floor prices of a NFT contract by marketplace. + * + * @param contractAddress - The contract address for the NFT collection. + * @beta + */ + getFloorPrice(contractAddress) { + return getFloorPrice(this.config, contractAddress); + } + getNftSales(options) { + return getNftSales(this.config, options); + } + /** + * Get the rarity of each attribute of an NFT. + * + * @param contractAddress - Contract address for the NFT collection. + * @param tokenId - Token id of the NFT. + */ + computeRarity(contractAddress, tokenId) { + return computeRarity(this.config, contractAddress, tokenId); + } + /** + * Search for a keyword across metadata of all ERC-721 and ERC-1155 smart contracts. + * + * @param query - The search string that you want to search for in contract metadata. + */ + searchContractMetadata(query) { + return searchContractMetadata(this.config, query); + } + /** + * Get a summary of attribute prevalence for an NFT collection. + * + * @param contractAddress - Contract address for the NFT collection. + */ + summarizeNftAttributes(contractAddress) { + return summarizeNftAttributes(this.config, contractAddress); + } + /** + * Refreshes the cached metadata for a provided NFT contract address and token + * id. Returns a boolean value indicating whether the metadata was refreshed. + * + * This method is useful when you want to refresh the metadata for a NFT that + * has been updated since the last time it was fetched. Note that the backend + * only allows one refresh per token every 15 minutes, globally for all users. + * The last refresh time for an NFT can be accessed on the + * {@link Nft.timeLastUpdated} field. + * + * To trigger a refresh for all NFTs in a contract, use {@link refreshContract} instead. + * + * @param contractAddress - The contract address of the NFT. + * @param tokenId - The token id of the NFT. + */ + refreshNftMetadata(contractAddress, tokenId) { + return refreshNftMetadata(this.config, contractAddress, tokenId); + } + /** + * Triggers a metadata refresh all NFTs in the provided contract address. This + * method is useful after an NFT collection is revealed. + * + * Refreshes are queued on the Alchemy backend and may take time to fully + * process. To refresh the metadata for a specific token, use the + * {@link refreshNftMetadata} method instead. + * + * @param contractAddress - The contract address of the NFT collection. + * @beta + */ + refreshContract(contractAddress) { + return refreshContract(this.config, contractAddress); + } +} + +/** + * The Notify namespace contains methods used for creating, reading, updating, + * and deleting webhooks in the Notify API. + * + * To use the methods in the API, you must provide your team's auth token in the + * {@link AlchemySettings.authToken} field when configuring + * {@link AlchemySettings}. The auth token can be found in the Alchemy Dashboard + * on the Notify tab. + * + * Note that not all networks are supported in the Notify API. Please consult + * the documentation for which networks are supported. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the notify + * namespace via `alchemy.notify`. + */ +class NotifyNamespace { + /** @internal */ + constructor(config) { + this.config = config; + } + /** + * Get all webhooks on your team. + * + * The team is determined by the `authToken` provided into the {@link AlchemySettings} + * object when creating a new {@link Alchemy} instance. + * + * This method returns a response object containing all the webhooks + */ + getAllWebhooks() { + return __awaiter(this, void 0, void 0, function* () { + this.verifyConfig(); + const response = yield this.sendWebhookRequest('team-webhooks', 'getAllWebhooks', {}); + return { + webhooks: parseRawWebhookResponse(response), + totalCount: response.data.length + }; + }); + } + getAddresses(webhookOrId, options) { + return __awaiter(this, void 0, void 0, function* () { + this.verifyConfig(); + const webhookId = typeof webhookOrId === 'string' ? webhookOrId : webhookOrId.id; + const response = yield this.sendWebhookRequest('webhook-addresses', 'getAddresses', { + webhook_id: webhookId, + limit: options === null || options === void 0 ? void 0 : options.limit, + after: options === null || options === void 0 ? void 0 : options.pageKey + }); + return parseRawAddressActivityResponse(response); + }); + } + getNftFilters(webhookOrId, options) { + return __awaiter(this, void 0, void 0, function* () { + this.verifyConfig(); + const webhookId = typeof webhookOrId === 'string' ? webhookOrId : webhookOrId.id; + const response = yield this.sendWebhookRequest('webhook-nft-filters', 'getNftFilters', { + webhook_id: webhookId, + limit: options === null || options === void 0 ? void 0 : options.limit, + after: options === null || options === void 0 ? void 0 : options.pageKey + }); + return parseRawNftFiltersResponse(response); + }); + } + updateWebhook(webhookOrId, update) { + return __awaiter(this, void 0, void 0, function* () { + const webhookId = typeof webhookOrId === 'string' ? webhookOrId : webhookOrId.id; + let restApiName; + let methodName; + let method; + let data; + if ('isActive' in update) { + restApiName = 'update-webhook'; + methodName = 'updateWebhook'; + method = 'PUT'; + data = { + webhook_id: webhookId, + is_active: update.isActive + }; + } + else if ('addFilters' in update || 'removeFilters' in update) { + restApiName = 'update-webhook-nft-filters'; + methodName = 'updateWebhookNftFilters'; + method = 'PATCH'; + data = { + webhook_id: webhookId, + nft_filters_to_add: update.addFilters + ? update.addFilters.map(nftFilterToParam) + : [], + nft_filters_to_remove: update.removeFilters + ? update.removeFilters.map(nftFilterToParam) + : [] + }; + } + else if ('addAddresses' in update || 'removeAddresses' in update) { + restApiName = 'update-webhook-addresses'; + methodName = 'webhook:updateWebhookAddresses'; + method = 'PATCH'; + data = { + webhook_id: webhookId, + addresses_to_add: yield this.resolveAddresses(update.addAddresses), + addresses_to_remove: yield this.resolveAddresses(update.removeAddresses) + }; + } + else if ('newAddresses' in update) { + restApiName = 'update-webhook-addresses'; + methodName = 'webhook:updateWebhookAddress'; + method = 'PUT'; + data = { + webhook_id: webhookId, + addresses: yield this.resolveAddresses(update.newAddresses) + }; + } + else { + throw new Error('Invalid `update` param passed into `updateWebhook`'); + } + yield this.sendWebhookRequest(restApiName, methodName, {}, { + method, + data + }); + }); + } + createWebhook(url, type, params) { + return __awaiter(this, void 0, void 0, function* () { + let appId; + if (type === exports.WebhookType.MINED_TRANSACTION || + type === exports.WebhookType.DROPPED_TRANSACTION) { + if (!('appId' in params)) { + throw new Error('Transaction Webhooks require an app id.'); + } + appId = params.appId; + } + let network = NETWORK_TO_WEBHOOK_NETWORK.get(this.config.network); + let filters; + let addresses; + if (type === exports.WebhookType.NFT_ACTIVITY) { + if (!('filters' in params) || params.filters.length === 0) { + throw new Error('Nft Activity Webhooks require a non-empty array input.'); + } + network = params.network + ? NETWORK_TO_WEBHOOK_NETWORK.get(params.network) + : network; + filters = params.filters.map(filter => ({ + contract_address: filter.contractAddress, + token_id: bignumber.BigNumber.from(filter.tokenId).toString() + })); + } + else if (type === exports.WebhookType.ADDRESS_ACTIVITY) { + if (params === undefined || + !('addresses' in params) || + params.addresses.length === 0) { + throw new Error('Address Activity Webhooks require a non-empty array input.'); + } + network = params.network + ? NETWORK_TO_WEBHOOK_NETWORK.get(params.network) + : network; + addresses = yield this.resolveAddresses(params.addresses); + } + const data = Object.assign(Object.assign(Object.assign({ network, webhook_type: type, webhook_url: url }, (appId && { app_id: appId })), (filters && { nft_filters: filters })), (addresses && { addresses })); + const response = yield this.sendWebhookRequest('create-webhook', 'createWebhook', {}, { + method: 'POST', + data + }); + return parseRawWebhook(response.data); + }); + } + deleteWebhook(webhookOrId) { + return __awaiter(this, void 0, void 0, function* () { + this.verifyConfig(); + const webhookId = typeof webhookOrId === 'string' ? webhookOrId : webhookOrId.id; + const response = yield this.sendWebhookRequest('delete-webhook', 'deleteWebhook', { + webhook_id: webhookId + }, { + method: 'DELETE' + }); + if ('message' in response) { + throw new Error(`Webhook not found. Failed to delete webhook: ${webhookId}`); + } + }); + } + verifyConfig() { + if (this.config.authToken === undefined) { + throw new Error('Using the Notify API requires setting the Alchemy Auth Token in ' + + 'the settings object when initializing Alchemy.'); + } + } + sendWebhookRequest(restApiName, methodName, params, overrides) { + return requestHttpWithBackoff(this.config, AlchemyApiType.WEBHOOK, restApiName, methodName, params, Object.assign(Object.assign({}, overrides), { headers: Object.assign({ 'X-Alchemy-Token': this.config.authToken }, overrides === null || overrides === void 0 ? void 0 : overrides.headers) })); + } + /** Resolves ENS addresses to the raw address. + * @internal */ + resolveAddresses(addresses) { + return __awaiter(this, void 0, void 0, function* () { + if (addresses === undefined) { + return []; + } + const resolvedAddresses = []; + const provider = yield this.config.getProvider(); + for (const address of addresses) { + const rawAddress = yield provider.resolveName(address); + if (rawAddress === null) { + throw new Error(`Unable to resolve the ENS address: ${address}`); + } + resolvedAddresses.push(rawAddress); + } + return resolvedAddresses; + }); + } +} +/** + * Mapping of webhook network representations to the SDK's network representation. + * + * @internal + */ +const WEBHOOK_NETWORK_TO_NETWORK = { + ETH_MAINNET: exports.Network.ETH_MAINNET, + ETH_GOERLI: exports.Network.ETH_GOERLI, + ETH_ROPSTEN: exports.Network.ETH_ROPSTEN, + ETH_RINKEBY: exports.Network.ETH_RINKEBY, + ETH_KOVAN: exports.Network.ETH_KOVAN, + MATIC_MAINNET: exports.Network.MATIC_MAINNET, + MATIC_MUMBAI: exports.Network.MATIC_MUMBAI, + ARB_MAINNET: exports.Network.ARB_MAINNET, + ARB_RINKEBY: exports.Network.ARB_RINKEBY, + OPT_MAINNET: exports.Network.OPT_MAINNET, + OPT_KOVAN: exports.Network.OPT_KOVAN +}; +/** Mapping of the SDK's network representation the webhook API's network representation. */ +const NETWORK_TO_WEBHOOK_NETWORK = Object.keys(exports.Network).reduce((map, key) => { + if (key in WEBHOOK_NETWORK_TO_NETWORK) { + map.set(WEBHOOK_NETWORK_TO_NETWORK[key], key); + } + return map; +}, new Map()); +function parseRawWebhookResponse(response) { + return response.data.map(parseRawWebhook); +} +function parseRawWebhook(rawWebhook) { + return Object.assign({ id: rawWebhook.id, network: WEBHOOK_NETWORK_TO_NETWORK[rawWebhook.network], type: rawWebhook.webhook_type, url: rawWebhook.webhook_url, isActive: rawWebhook.is_active, timeCreated: new Date(rawWebhook.time_created).toISOString(), signingKey: rawWebhook.signing_key, version: rawWebhook.version }, (rawWebhook.app_id !== undefined && { appId: rawWebhook.app_id })); +} +function parseRawAddressActivityResponse(response) { + return { + addresses: response.data, + totalCount: response.pagination.total_count, + pageKey: response.pagination.cursors.after + }; +} +function parseRawNftFiltersResponse(response) { + return { + filters: response.data.map(f => ({ + contractAddress: f.contract_address, + tokenId: bignumber.BigNumber.from(f.token_id).toString() + })), + totalCount: response.pagination.total_count, + pageKey: response.pagination.cursors.after + }; +} +function nftFilterToParam(filter) { + return { + contract_address: filter.contractAddress, + token_id: bignumber.BigNumber.from(filter.tokenId).toString() + }; +} + +/** + * Multiples to increment fee per gas when using + * {@link TransactNamespace.sendGasOptimizedTransaction}. + * + * @internal + */ +const GAS_OPTIMIZED_TX_FEE_MULTIPLES = [0.9, 1, 1.1, 1.2, 1.3]; +/** + * The Transact namespace contains methods used for sending transactions and + * checking on the state of submitted transactions. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the transact + * namespace via `alchemy.transact`. + */ +class TransactNamespace { + /** @internal */ + constructor(config) { + this.config = config; + } + /** + * Used to send a single transaction to Flashbots. Flashbots will attempt to + * send the transaction to miners for the next 25 blocks. + * + * Returns the transaction hash of the submitted transaction. + * + * @param signedTransaction The raw, signed transaction as a hash. + * @param maxBlockNumber Optional highest block number in which the + * transaction should be included. + * @param options Options to configure the request. + */ + sendPrivateTransaction(signedTransaction, maxBlockNumber, options) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + const hexBlockNumber = maxBlockNumber ? toHex(maxBlockNumber) : undefined; + return provider._send('eth_sendPrivateTransaction', [ + { + tx: signedTransaction, + maxBlockNumber: hexBlockNumber, + preferences: options + } + ], 'sendPrivateTransaction'); + }); + } + /** + * Stops the provided private transaction from being submitted for future + * blocks. A transaction can only be cancelled if the request is signed by the + * same key as the {@link sendPrivateTransaction} call submitting the + * transaction in first place. + * + * Please note that fast mode transactions cannot be cancelled using this method. + * + * Returns a boolean indicating whether the cancellation was successful. + * + * @param transactionHash Transaction hash of private tx to be cancelled + */ + cancelPrivateTransaction(transactionHash) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider._send('eth_cancelPrivateTransaction', [ + { + txHash: transactionHash + } + ], 'cancelPrivateTransaction'); + }); + } + /** + * Returns the transaction with hash or null if the transaction is unknown. + * + * If a transaction has not been mined, this method will search the + * transaction pool. Various backends may have more restrictive transaction + * pool access (e.g. if the gas price is too low or the transaction was only + * recently sent and not yet indexed) in which case this method may also return null. + * + * NOTE: This is an alias for {@link CoreNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransaction(transactionHash) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getTransaction(transactionHash); + }); + } + /** + * Submits transaction to the network to be mined. The transaction must be + * signed, and be valid (i.e. the nonce is correct and the account has + * sufficient balance to pay for the transaction). + * + * NOTE: This is an alias for {@link CoreNamespace.sendTransaction}. + * + * @param signedTransaction The signed transaction to send. + * @public + */ + sendTransaction(signedTransaction) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.sendTransaction(signedTransaction); + }); + } + /** + * Returns an estimate of the amount of gas that would be required to submit + * transaction to the network. + * + * An estimate may not be accurate since there could be another transaction on + * the network that was not accounted for, but after being mined affects the + * relevant state. + * + * This is an alias for {@link CoreNamespace.estimateGas}. + * + * @param transaction The transaction to estimate gas for. + * @public + */ + estimateGas(transaction) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.estimateGas(transaction); + }); + } + /** + * Returns a fee per gas (in wei) that is an estimate of how much you can pay + * as a priority fee, or "tip", to get a transaction included in the current block. + * + * This number is generally used to set the `maxPriorityFeePerGas` field in a + * transaction request. + * + * @public + */ + getMaxPriorityFeePerGas() { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + const feeHex = yield provider._send('eth_maxPriorityFeePerGas', [], 'getMaxPriorityFeePerGas'); + return fromHex(feeHex); + }); + } + /** + * Returns a promise which will not resolve until specified transaction hash is mined. + * + * If {@link confirmations} is 0, this method is non-blocking and if the + * transaction has not been mined returns null. Otherwise, this method will + * block until the transaction has confirmed blocks mined on top of the block + * in which it was mined. + * + * NOTE: This is an alias for {@link CoreNamespace.waitForTransaction}. + * + * @param transactionHash The hash of the transaction to wait for. + * @param confirmations The number of blocks to wait for. + * @param timeout The maximum time to wait for the transaction to confirm. + * @public + */ + waitForTransaction(transactionHash, confirmations, timeout) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.waitForTransaction(transactionHash, confirmations, timeout); + }); + } + sendGasOptimizedTransaction(transactionOrSignedTxs, wallet) { + return __awaiter(this, void 0, void 0, function* () { + if (Array.isArray(transactionOrSignedTxs)) { + return this._sendGasOptimizedTransaction(transactionOrSignedTxs, 'sendGasOptimizedTransactionPreSigned'); + } + let gasLimit; + let priorityFee; + let baseFee; + const provider = yield this.config.getProvider(); + try { + gasLimit = yield this.estimateGas(transactionOrSignedTxs); + priorityFee = yield this.getMaxPriorityFeePerGas(); + const currentBlock = yield provider.getBlock('latest'); + baseFee = currentBlock.baseFeePerGas.toNumber(); + } + catch (e) { + throw new Error(`Failed to estimate gas for transaction: ${e}`); + } + const gasSpreadTransactions = generateGasSpreadTransactions(transactionOrSignedTxs, gasLimit.toNumber(), baseFee, priorityFee); + const signedTransactions = yield Promise.all(gasSpreadTransactions.map(tx => wallet.signTransaction(tx))); + return this._sendGasOptimizedTransaction(signedTransactions, 'sendGasOptimizedTransactionGenerated'); + }); + } + /** + * Returns the state of the transaction job returned by the + * {@link sendGasOptimizedTransaction}. + * + * @param trackingId The tracking id from the response of the sent gas optimized transaction. + * @internal + */ + // TODO(txjob): Remove internal tag once this feature is released. + getGasOptimizedTransactionStatus(trackingId) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider._send('alchemy_getGasOptimizedTransactionStatus', [trackingId], 'getGasOptimizedTransactionStatus'); + }); + } + /** @internal */ + _sendGasOptimizedTransaction(signedTransactions, methodName) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider._send('alchemy_sendGasOptimizedTransaction', [ + { + rawTransactions: signedTransactions + } + ], methodName); + }); + } +} +/** + * Helper method to generate the raw transaction with the given gas limit and + * priority fee across a spread of different gas prices. + * + * @internal + */ +// Visible for testing +function generateGasSpreadTransactions(transaction, gasLimit, baseFee, priorityFee) { + return GAS_OPTIMIZED_TX_FEE_MULTIPLES.map(feeMultiplier => { + return Object.assign(Object.assign({}, transaction), { gasLimit, maxFeePerGas: Math.round(baseFee * feeMultiplier + priorityFee * feeMultiplier), maxPriorityFeePerGas: Math.round(feeMultiplier * priorityFee) }); + }); +} + +/** This file contains internal types used by the SDK and are not exposed to the end user. */ +/** + * Prefix for `alchemy_pendingTransactions` subscriptions when serializing to + * ethers events. + * + * This tag is used internally by ethers to track different event filters. + */ +const ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE = 'alchemy-pending-transactions'; +/** + * Prefix for `alchemy_minedTransactions` subscriptions when serializing to ethers events. + * + * This tag is used internally by ethers to track different event filters. + */ +const ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE = 'alchemy-mined-transactions'; +/** + * Array containing all the custom event tags used internally by ethers to track + * event filters. + */ +const ALCHEMY_EVENT_TYPES = [ + ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE, + ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE +]; + +/** + * DO NOT MODIFY. + * + * Event class copied directly over from ethers.js's `BaseProvider` class. + * + * This class is used to represent events and their corresponding listeners. The + * SDK needs to extend this class in order to support Alchemy's custom + * Subscription API types. The original class is not exported by ethers. Minimal + * changes have been made in order to get TS to compile. + */ +class Event { + constructor(tag, listener, once) { + this.listener = listener; + this.tag = tag; + this.once = once; + this._lastBlockNumber = -2; + this._inflight = false; + } + get event() { + switch (this.type) { + case 'tx': + return this.hash; + case 'filter': + return this.filter; + default: + return this.tag; + } + } + get type() { + return this.tag.split(':')[0]; + } + get hash() { + const comps = this.tag.split(':'); + if (comps[0] !== 'tx') { + throw new Error('Not a transaction event'); + } + return comps[1]; + } + get filter() { + const comps = this.tag.split(':'); + if (comps[0] !== 'filter') { + throw new Error('Not a transaction event'); + } + 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() { + const PollableEvents = ['block', 'network', 'pending', 'poll']; + return this.tag.indexOf(':') >= 0 || PollableEvents.indexOf(this.tag) >= 0; + } +} +/** + * Wrapper class around the ethers `Event` class in order to add support for + * Alchemy's custom subscriptions types. + * + * The serialization and deserialization mechanism requires the order of the + * fields to be the same across different {@link ALCHEMY_EVENT_TYPES}. Before + * using a getter on a new event filter, make sure that the position of the + * field in serialization is correct. + * + * The getters on this class deserialize the event tag generated by + * {@link getAlchemyEventTag} into the original fields passed into the event. + */ +class EthersEvent extends Event { + /** + * Converts the event tag into the original `fromAddress` field in + * {@link AlchemyPendingTransactionsEventFilter}. + */ + get fromAddress() { + const comps = this.tag.split(':'); + if (comps[0] !== ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE) { + return undefined; + } + if (comps[1] && comps[1] !== '*') { + return deserializeAddressField(comps[1]); + } + else { + return undefined; + } + } + /** + * Converts the event tag into the original `toAddress` field in + * {@link AlchemyPendingTransactionsEventFilter}. + */ + get toAddress() { + const comps = this.tag.split(':'); + if (comps[0] !== ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE) { + return undefined; + } + if (comps[2] && comps[2] !== '*') { + return deserializeAddressField(comps[2]); + } + else { + return undefined; + } + } + /** + * Converts the event tag into the original `hashesOnly` field in + * {@link AlchemyPendingTransactionsEventFilter} and {@link AlchemyMinedTransactionsEventFilter}. + */ + get hashesOnly() { + const comps = this.tag.split(':'); + if (!ALCHEMY_EVENT_TYPES.includes(comps[0])) { + return undefined; + } + if (comps[3] && comps[3] !== '*') { + return comps[3] === 'true'; + } + else { + return undefined; + } + } + get includeRemoved() { + const comps = this.tag.split(':'); + if (comps[0] !== ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE) { + return undefined; + } + if (comps[2] && comps[2] !== '*') { + return comps[2] === 'true'; + } + else { + return undefined; + } + } + get addresses() { + const comps = this.tag.split(':'); + if (comps[0] !== ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE) { + return undefined; + } + if (comps[1] && comps[1] !== '*') { + return deserializeAddressesField(comps[1]); + } + else { + return undefined; + } + } +} +function isAlchemyEvent(event) { + return typeof event === 'object' && 'method' in event; +} +/** + * Creates a string representation of an `alchemy_pendingTransaction` + * subscription filter that is compatible with the ethers implementation of + * `getEventTag()`. The method is not an exported function in ethers, which is + * why the SDK has its own implementation. + * + * The event tag is then deserialized by the SDK's {@link EthersEvent} getters. + * + * @example + * ```js + * // Returns 'alchemy-pending-transactions:0xABC:0xDEF|0xGHI:true' + * const eventTag = getAlchemyEventTag( + * { + * "method": "alchemy_pendingTransactions", + * "fromAddress": "0xABC", + * "toAddress": ["0xDEF", "0xGHI"], + * "hashesOnly: true + * }); + * ```; + * + * @param event + * @internal + */ +function getAlchemyEventTag(event) { + if (!isAlchemyEvent(event)) { + throw new Error('Event tag requires AlchemyEventType'); + } + if (event.method === exports.AlchemySubscription.PENDING_TRANSACTIONS) { + return serializePendingTransactionsEvent(event); + } + else if (event.method === exports.AlchemySubscription.MINED_TRANSACTIONS) { + return serializeMinedTransactionsEvent(event); + } + else { + throw new Error(`Unrecognized AlchemyFilterEvent: ${event}`); + } +} +function verifyAlchemyEventName(eventName) { + if (!Object.values(exports.AlchemySubscription).includes(eventName.method)) { + throw new Error(`Invalid method name ${eventName.method}. Accepted method names: ${Object.values(exports.AlchemySubscription)}`); + } +} +/** + * Serializes the provided {@link AlchemyPendingTransactionsEventFilter} into an ethers + * compatible event tag. + * + * For the example event: + * ``` + * { + * "method": "alchemy_pendingTransactions", + * "fromAddress": "0xABC", + * "toAddress": ["0xDEF", "0xGHI"], + * "hashesOnly: true + * } + * ``` + * + * The resulting serialization is: + * `alchemy_pendingTransactions:0xABC:0xDEF|0xGHI:true` + * + * If a field is omitted, it is replaced with a `*`. + */ +function serializePendingTransactionsEvent(event) { + const fromAddress = serializeAddressField(event.fromAddress); + const toAddress = serializeAddressField(event.toAddress); + const hashesOnly = serializeBooleanField(event.hashesOnly); + return (ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE + + ':' + + fromAddress + + ':' + + toAddress + + ':' + + hashesOnly); +} +/** + * Serializes the provided {@link AlchemyPendingTransactionsEventFilter} into an ethers + * compatible event tag. + * + * For the example event: + * ``` + * { + * "method": "alchemy_minedTransactions", + * "addresses": [ + * { + * from: "0xABC" + * }, + * { + * to: "0xDEF", + * from: "0x123" + * } + * ] + * "includeRemoved": false + * "hashesOnly: true + * } + * ``` + * + * The resulting serialization is: + * `alchemy_minedTransactions:*,0xABC|0xDEF,0x123:false:true` + * + * If a field is omitted, it is replaced with a `*`. + * + * The `addresses` array is split by the '|' character, and each to/from address + * pair is separated by a ',' character. + * + */ +function serializeMinedTransactionsEvent(event) { + const addresses = serializeAddressesField(event.addresses); + const includeRemoved = serializeBooleanField(event.includeRemoved); + const hashesOnly = serializeBooleanField(event.hashesOnly); + return (ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE + + ':' + + addresses + + ':' + + includeRemoved + + ':' + + hashesOnly); +} +function serializeAddressesField(addresses) { + if (addresses === undefined) { + return '*'; + } + return addresses + .map(filter => serializeAddressField(filter.to) + + ',' + + serializeAddressField(filter.from)) + .join('|'); +} +function serializeAddressField(field) { + if (field === undefined) { + return '*'; + } + else if (Array.isArray(field)) { + return field.join('|'); + } + else { + return field; + } +} +function serializeBooleanField(field) { + if (field === undefined) { + return '*'; + } + else { + return field.toString(); + } +} +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 deserializeAddressField(data) { + if (data === '') { + return undefined; + } + const addresses = data.split('|'); + return addresses.length === 1 ? addresses[0] : addresses; +} +function deserializeAddressesField(data) { + if (data === '') { + return undefined; + } + // Perform a cast here since TS doesn't know we're guaranteed a non-empty + // array from deserializing. + return data + .split('|') + .map(addressStr => addressStr.split(',')) + .map(addressPair => (Object.assign(Object.assign({}, (addressPair[0] !== '*' && { to: addressPair[0] })), (addressPair[1] !== '*' && { from: addressPair[1] })))); +} + +/** + * The Websocket namespace contains all subscription related functions that + * allow you to subscribe to events and receive updates as they occur. The + * underlying WebSocket provider has additional logic to handle reconnections + * and automatically backfills missed events. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.ws`. + */ +class WebSocketNamespace { + /** @internal */ + constructor(config) { + this.config = config; + } + /** + * Adds a listener to be triggered for each {@link eventName} event. Also + * includes Alchemy's Subscription API events. See {@link AlchemyEventType} for + * how to use them. + * + * @param eventName The event to listen for. + * @param listener The listener to call when the event is triggered. + * @public + */ + on(eventName, listener) { + void (() => __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getWebSocketProvider(); + const processedEvent = yield this._resolveEnsAlchemyEvent(eventName); + provider.on(processedEvent, listener); + }))(); + return this; + } + /** + * Adds a listener to be triggered for only the next {@link eventName} event, + * after which it will be removed. Also includes Alchemy's Subscription API + * events. See {@link AlchemyEventType} for how to use them. + * + * @param eventName The event to listen for. + * @param listener The listener to call when the event is triggered. + * @public + */ + once(eventName, listener) { + void (() => __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getWebSocketProvider(); + const processedEvent = yield this._resolveEnsAlchemyEvent(eventName); + provider.once(processedEvent, listener); + }))(); + return this; + } + /** + * Removes the provided {@link listener} for the {@link eventName} event. If no + * listener is provided, all listeners for the event will be removed. + * + * @param eventName The event to unlisten to. + * @param listener The listener to remove. + * @public + */ + off(eventName, listener) { + void (() => __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getWebSocketProvider(); + const processedEvent = yield this._resolveEnsAlchemyEvent(eventName); + return provider.off(processedEvent, listener); + }))(); + return this; + } + /** + * Remove all listeners for the provided {@link eventName} event. If no event + * is provided, all events and their listeners are removed. + * + * @param eventName The event to remove all listeners for. + * @public + */ + removeAllListeners(eventName) { + void (() => __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getWebSocketProvider(); + const processedEvent = eventName + ? yield this._resolveEnsAlchemyEvent(eventName) + : undefined; + provider.removeAllListeners(processedEvent); + }))(); + return this; + } + /** + * Returns the number of listeners for the provided {@link eventName} event. If + * no event is provided, the total number of listeners for all events is returned. + * + * @param eventName The event to get the number of listeners for. + * @public + */ + listenerCount(eventName) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getWebSocketProvider(); + const processedEvent = eventName + ? yield this._resolveEnsAlchemyEvent(eventName) + : undefined; + return provider.listenerCount(processedEvent); + }); + } + /** + * Returns an array of listeners for the provided {@link eventName} event. If + * no event is provided, all listeners will be included. + * + * @param eventName The event to get the listeners for. + */ + listeners(eventName) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getWebSocketProvider(); + const processedEvent = eventName + ? yield this._resolveEnsAlchemyEvent(eventName) + : undefined; + return provider.listeners(processedEvent); + }); + } + /** + * Converts ENS addresses in an Alchemy Event to the underlying resolved + * address. + * + * VISIBLE ONLY FOR TESTING. + * + * @internal + */ + _resolveEnsAlchemyEvent(eventName) { + return __awaiter(this, void 0, void 0, function* () { + if (!isAlchemyEvent(eventName)) { + return eventName; + } + if (eventName.method === exports.AlchemySubscription.MINED_TRANSACTIONS && + eventName.addresses) { + const processedAddresses = []; + for (const address of eventName.addresses) { + if (address.to) { + address.to = yield this._resolveNameOrError(address.to); + } + if (address.from) { + address.from = yield this._resolveNameOrError(address.from); + } + processedAddresses.push(address); + } + eventName.addresses = + processedAddresses; + } + else if (eventName.method === exports.AlchemySubscription.PENDING_TRANSACTIONS) { + if (eventName.fromAddress) { + if (typeof eventName.fromAddress === 'string') { + eventName.fromAddress = yield this._resolveNameOrError(eventName.fromAddress); + } + else { + eventName.fromAddress = yield Promise.all(eventName.fromAddress.map(this._resolveNameOrError)); + } + } + if (eventName.toAddress) { + if (typeof eventName.toAddress === 'string') { + eventName.toAddress = yield this._resolveNameOrError(eventName.toAddress); + } + else { + eventName.toAddress = yield Promise.all(eventName.toAddress.map(this._resolveNameOrError)); + } + } + } + return eventName; + }); + } + /** + * Converts the provided ENS address or throws an error. This improves code + * readability and type safety in other methods. + * + * VISIBLE ONLY FOR TESTING. + * + * @internal + */ + _resolveNameOrError(name) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + const resolved = yield provider.resolveName(name); + if (resolved === null) { + throw new Error(`Unable to resolve the ENS address: ${name}`); + } + return resolved; + }); + } +} + +/** + * The Alchemy SDK client. This class is the main entry point into Alchemy's + * APIs and separates functionality into different namespaces. + * + * Each SDK instance is associated with a specific network and API key. To use a + * different network or API key, create a new instance of {@link Alchemy}. + * + * @public + */ +class Alchemy { + /** + * @param {string} [settings.apiKey] - The API key to use for Alchemy + * @param {Network} [settings.network] - The network to use for Alchemy + * @param {number} [settings.maxRetries] - The maximum number of retries to attempt + * @public + */ + constructor(settings) { + this.config = new AlchemyConfig(settings); + this.core = new CoreNamespace(this.config); + this.nft = new NftNamespace(this.config); + this.ws = new WebSocketNamespace(this.config); + this.transact = new TransactNamespace(this.config); + this.notify = new NotifyNamespace(this.config); + } +} + +/** + * The Wallet class inherits Signer and can sign transactions and messages using + * a private key as a standard Externally Owned Account (EOA). + * + * SDK's custom implementation of Ethers.js's 'Wallet'. + * + * Primary difference from Ethers.js 'Wallet' is that you can pass in either a + * Provider or an Alchemy object. This implementation will intelligently detect + * the format and set the provider accordingly. + * + * @public + * @override + */ +class Wallet extends wallet.Wallet { + /** + * Overload permits users to pass in either a standard Provider or an Alchemy + * object. The constructor will detect the object type and handle appropriately. + * + * @override + */ + constructor(privateKey, alchemyOrProvider) { + // If object passed in is a provider, send to super + let superProvider; + if (alchemyOrProvider && abstractProvider.Provider.isProvider(alchemyOrProvider)) { + superProvider = alchemyOrProvider; + } + super(privateKey, superProvider); + // If object passed in is an Alchemy object, just set Alchemy + if (alchemyOrProvider && !abstractProvider.Provider.isProvider(alchemyOrProvider)) { + this.alchemyProviderPromise = alchemyOrProvider.config.getProvider(); + } + } + ////////////////////////////////////////////////////////////////// + // Set of overrides from Signer to handle async provider retrieval. + ////////////////////////////////////////////////////////////////// + /** + * Returns the balance of this wallet at blockTag. + * + * @param blockTag The block to check the balance of + * @override + */ + getBalance(blockTag) { + return this.getWallet().then(wallet => wallet.getBalance(blockTag)); + } + /** + * Returns the number of transactions this account has ever sent. This is the + * value required to be included in transactions as the nonce. + * + * @param blockTag The block to check the transaction count on + * @override + */ + getTransactionCount(blockTag) { + return this.getWallet().then(wallet => wallet.getTransactionCount(blockTag)); + } + /** + * Returns the result of estimating the cost to send the transactionRequest, + * with this account address being used as the from field. + * + * @param transaction Transaction to estimate the gas on + * @override + */ + estimateGas(transaction) { + return this.getWallet().then(wallet => wallet.estimateGas(transaction)); + } + /** + * Returns the result of calling using the transactionRequest, with this + * account address being used as the from field. + * + * @param transaction To make a call on + * @param blockTag The block to make the call on + * @override + */ + call(transaction, blockTag) { + return this.getWallet().then(wallet => wallet.call(transaction, blockTag)); + } + /** + * Populates all fields in a transaction, signs it and sends it to the network + * + * @override + */ + sendTransaction(transaction) { + return this.getWallet().then(wallet => wallet.sendTransaction(transaction)); + } + /** + * Returns the chain ID this wallet is connected to. + * + * @override + */ + getChainId() { + return this.getWallet().then(wallet => wallet.getChainId()); + } + /** + * Returns the current gas price. + * + * @override + */ + getGasPrice() { + return this.getWallet().then(wallet => wallet.getGasPrice()); + } + /** + * Returns the current recommended FeeData to use in a transaction. + * + * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas + * should be used. + * + * For legacy transactions and networks which do not support EIP-1559, the + * gasPrice should be used. + * + * @override + */ + getFeeData() { + return this.getWallet().then(wallet => wallet.getFeeData()); + } + /** + * Looks up the address of name. If the name is not owned, or does not have a + * Resolver configured, or the Resolver does not have an address configured, + * null is returned. + * + * @param name Name of the ENS address + * @override + */ + resolveName(name) { + return this.getWallet().then(wallet => wallet.resolveName(name)); + } + getWallet() { + return __awaiter(this, void 0, void 0, function* () { + if (!this.alchemyProviderPromise) { + return this.connect(this.provider); + } + return this.connect(yield this.alchemyProviderPromise); + }); + } +} + +/** + * The Contract class is a wrapper around the Contract class from ethers.js and + * is exported here for convenience. + * + * @public + */ +// TODO: support passing in Alchemy instance into the contract. +class Contract extends contracts.Contract { +} +/** + * The ContractFactory class is a wrapper around the ContractFactory class from + * ethers.js and is exported here for convenience. + * + * @public + */ +class ContractFactory extends contracts.ContractFactory { +} + +exports.ALCHEMY_EVENT_TYPES = ALCHEMY_EVENT_TYPES; +exports.ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE = ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE; +exports.ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE = ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE; +exports.Alchemy = Alchemy; +exports.Contract = Contract; +exports.ContractFactory = ContractFactory; +exports.CustomNetworks = CustomNetworks; +exports.DEFAULT_ALCHEMY_API_KEY = DEFAULT_ALCHEMY_API_KEY; +exports.DEFAULT_NETWORK = DEFAULT_NETWORK; +exports.EthersEvent = EthersEvent; +exports.EthersNetwork = EthersNetwork; +exports.IS_BROWSER = IS_BROWSER; +exports.VERSION = VERSION; +exports.Wallet = Wallet; +exports.__awaiter = __awaiter; +exports.fromHex = fromHex; +exports.getAlchemyEventTag = getAlchemyEventTag; +exports.getAlchemyHttpUrl = getAlchemyHttpUrl; +exports.getAlchemyWsUrl = getAlchemyWsUrl; +exports.isAlchemyEvent = isAlchemyEvent; +exports.isHex = isHex; +exports.logWarn = logWarn; +exports.noop = noop; +exports.setLogLevel = setLogLevel; +exports.toHex = toHex; +exports.verifyAlchemyEventName = verifyAlchemyEventName; +//# sourceMappingURL=index-e8114eb4.js.map diff --git a/test/node_modules/alchemy-sdk/dist/cjs/index-e8114eb4.js.map b/test/node_modules/alchemy-sdk/dist/cjs/index-e8114eb4.js.map new file mode 100644 index 0000000..8f962db --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/index-e8114eb4.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index-e8114eb4.js","sources":["../../src/types/types.ts","../../src/util/const.ts","../../src/api/alchemy-config.ts","../../src/api/util.ts","../../src/util/util.ts","../../src/api/core-namespace.ts","../../src/util/logger.ts","../../src/version.ts","../../src/util/sendRest.ts","../../src/internal/backoff.ts","../../src/internal/dispatch.ts","../../src/internal/nft-api.ts","../../src/api/nft-namespace.ts","../../src/api/notify-namespace.ts","../../src/api/transact-namespace.ts","../../src/internal/internal-types.ts","../../src/internal/ethers-event.ts","../../src/api/websocket-namespace.ts","../../src/api/alchemy.ts","../../src/api/alchemy-wallet.ts","../../src/api/alchemy-contract.ts"],"sourcesContent":["import {\n EventType,\n TransactionReceipt\n} from '@ethersproject/abstract-provider';\nimport { BigNumberish } from '@ethersproject/bignumber';\n\nimport { BaseNft, Nft, NftContract } from '../api/nft';\n\n// TODO: separate this file into other files.\n\n/**\n * Options object used to configure the Alchemy SDK.\n *\n * @public\n */\nexport interface AlchemySettings {\n /**\n * The Alchemy API key that can be found in the Alchemy dashboard.\n *\n * Defaults to: \"demo\" (a rate-limited public API key)\n */\n apiKey?: string;\n\n /**\n * The name of the network. Once configured, the network cannot be changed. To\n * use a different network, instantiate a new `Alchemy` instance.\n *\n * Defaults to: Network.ETH_MAINNET\n */\n network?: Network;\n\n /** The maximum number of retries to attempt if a request fails. Defaults to 5. */\n maxRetries?: number;\n\n /**\n * Optional URL endpoint to use for all requests. Setting this field will\n * override the URL generated by the {@link network} and {@link apiKey} fields.\n *\n * This field is useful for testing or for using a custom node endpoint. Note\n * that not all methods will work with custom URLs.\n */\n url?: string;\n\n /**\n * Alchemy auth token required to use the Notify API. This token can be found\n * in the Alchemy Dashboard on the Notify tab.\n */\n authToken?: string;\n\n /**\n * Optional setting that automatically batches and sends json-rpc requests for\n * higher throughput and reduced network IO. Defaults to false.\n *\n * This implementation is based on the `JsonRpcBatchProvider` in ethers.\n */\n batchRequests?: boolean;\n}\n\n/**\n * The supported networks by Alchemy. Note that some functions are not available\n * on all networks. Please refer to the Alchemy documentation for which APIs are\n * available on which networks\n * {@link https://docs.alchemy.com/alchemy/apis/feature-support-by-chain}\n *\n * @public\n */\nexport enum Network {\n ETH_MAINNET = 'eth-mainnet',\n /** @deprecated - Will be removed in subsequent versions */\n ETH_ROPSTEN = 'eth-ropsten',\n ETH_GOERLI = 'eth-goerli',\n /** @deprecated - Will be removed in subsequent versions */\n ETH_KOVAN = 'eth-kovan',\n /** @deprecated - Will be removed in subsequent versions */\n ETH_RINKEBY = 'eth-rinkeby',\n OPT_MAINNET = 'opt-mainnet',\n /** @deprecated - Will be removed in subsequent versions */\n OPT_KOVAN = 'opt-kovan',\n OPT_GOERLI = 'opt-goerli',\n ARB_MAINNET = 'arb-mainnet',\n /** @deprecated - Will be removed in subsequent versions */\n ARB_RINKEBY = 'arb-rinkeby',\n ARB_GOERLI = 'arb-goerli',\n MATIC_MAINNET = 'polygon-mainnet',\n MATIC_MUMBAI = 'polygon-mumbai',\n ASTAR_MAINNET = 'astar-mainnet'\n}\n\n/** Token Types for the `getTokenBalances()` endpoint. */\nexport enum TokenBalanceType {\n /**\n * Option to fetch the top 100 tokens by 24-hour volume. This option is only\n * available on Mainnet in Ethereum, Polygon, and Arbitrum.\n */\n DEFAULT_TOKENS = 'DEFAULT_TOKENS',\n\n /**\n * Option to fetch the set of ERC-20 tokens that the address as ever held. his\n * list is produced by an address's historical transfer activity and includes\n * all tokens that the address has ever received.\n */\n ERC20 = 'erc20'\n}\n\n/**\n * Optional params to pass into `getTokenBalances()` to fetch all ERC-20 tokens\n * instead of passing in an array of contract addresses to fetch balances for.\n */\nexport interface TokenBalancesOptionsErc20 {\n /** The ERC-20 token type. */\n type: TokenBalanceType.ERC20;\n\n /** Optional page key for pagination (only applicable to TokenBalanceType.ERC20) */\n pageKey?: string;\n}\n\n/**\n * Optional params to pass into `getTokenBalances()` to fetch the top 100 tokens\n * instead of passing in an array of contract addresses to fetch balances for.\n */\nexport interface TokenBalancesOptionsDefaultTokens {\n /** The top 100 token type. */\n type: TokenBalanceType.DEFAULT_TOKENS;\n}\n\n/**\n * Response object for when the {@link TokenBalancesOptionsErc20} options are\n * used. A page key may be returned if the provided address has many transfers.\n */\nexport interface TokenBalancesResponseErc20 extends TokenBalancesResponse {\n /**\n * An optional page key to passed into the next request to fetch the next page\n * of token balances.\n */\n pageKey?: string;\n}\n\n/** @public */\nexport interface TokenBalancesResponse {\n address: string;\n tokenBalances: TokenBalance[];\n}\n\n/** @public */\nexport type TokenBalance = TokenBalanceSuccess | TokenBalanceFailure;\n\n/** @public */\nexport interface TokenBalanceSuccess {\n contractAddress: string;\n tokenBalance: string;\n error: null;\n}\n\n/** @public */\nexport interface TokenBalanceFailure {\n contractAddress: string;\n tokenBalance: null;\n error: string;\n}\n\n/**\n * Response object for the {@link CoreNamespace.getTokenMetadata} method.\n *\n * @public\n */\nexport interface TokenMetadataResponse {\n /**\n * The token's name. Is `null` if the name is not defined in the contract and\n * not available from other sources.\n */\n name: string | null;\n\n /**\n * The token's symbol. Is `null` if the symbol is not defined in the contract\n * and not available from other sources.\n */\n symbol: string | null;\n\n /**\n * The number of decimals of the token. Returns `null` if not defined in the\n * contract and not available from other sources.\n */\n decimals: number | null;\n\n /** URL link to the token's logo. Is `null` if the logo is not available. */\n logo: string | null;\n}\n\n/**\n * Parameters for the {@link CoreNamespace.getAssetTransfers} method.\n *\n * @public\n */\nexport interface AssetTransfersParams {\n /**\n * The starting block to check for transfers. This value is inclusive and\n * defaults to `0x0` if omitted.\n */\n fromBlock?: string;\n\n /**\n * The ending block to check for transfers. This value is inclusive and\n * defaults to the latest block if omitted.\n */\n toBlock?: string;\n\n /**\n * Whether to return results in ascending or descending order by block number.\n * Defaults to ascending if omitted.\n */\n order?: SortingOrder;\n\n /**\n * The from address to filter transfers by. This value defaults to a wildcard\n * for all addresses if omitted.\n */\n fromAddress?: string;\n\n /**\n * The to address to filter transfers by. This value defaults to a wildcard\n * for all address if omitted.\n */\n toAddress?: string;\n\n /**\n * List of contract addresses to filter for - only applies to \"erc20\",\n * \"erc721\", \"erc1155\" transfers. Defaults to all address if omitted.\n */\n contractAddresses?: string[];\n\n /**\n * Whether to exclude transfers with zero value. Note that zero value is\n * different than null value. Defaults to `false` if omitted.\n */\n excludeZeroValue?: boolean;\n\n /** REQUIRED field. An array of categories to get transfers for. */\n category: AssetTransfersCategory[];\n\n /** The maximum number of results to return per page. Defaults to 1000 if omitted. */\n maxCount?: number;\n\n /**\n * Optional page key from an existing {@link OwnedBaseNftsResponse}\n * {@link AssetTransfersResult}to use for pagination.\n */\n pageKey?: string;\n\n /**\n * Whether to include additional metadata about each transfer event. Defaults\n * to `false` if omitted.\n */\n withMetadata?: boolean;\n}\n\n/**\n * Parameters for the {@link CoreNamespace.getAssetTransfers} method that\n * includes metadata.\n *\n * @public\n */\nexport interface AssetTransfersWithMetadataParams extends AssetTransfersParams {\n withMetadata: true;\n}\n\n/**\n * Categories of transfers to use with the {@link AssetTransfersParams} request\n * object when using {@link CoreNamespace.getAssetTransfers}.\n *\n * @public\n */\nexport enum AssetTransfersCategory {\n /**\n * Top level ETH transactions that occur where the `fromAddress` is an\n * external user-created address. External addresses have private keys and are\n * accessed by users.\n */\n EXTERNAL = 'external',\n\n /**\n * Top level ETH transactions that occur where the `fromAddress` is an\n * internal, smart contract address. For example, a smart contract calling\n * another smart contract or sending\n */\n INTERNAL = 'internal',\n\n /** ERC20 transfers. */\n ERC20 = 'erc20',\n\n /** ERC721 transfers. */\n ERC721 = 'erc721',\n\n /** ERC1155 transfers. */\n ERC1155 = 'erc1155',\n\n /** Special contracts that don't follow ERC 721/1155, (ex: CryptoKitties). */\n SPECIALNFT = 'specialnft'\n}\n\n/**\n * Enum for the order of the {@link AssetTransfersParams} request object when\n * using {@link CoreNamespace.getAssetTransfers}.\n *\n * @deprecated Use {@link SortingOrder} instead. This enum will be removed in a\n * future version.\n * @public\n */\nexport enum AssetTransfersOrder {\n ASCENDING = 'asc',\n DESCENDING = 'desc'\n}\n\n/**\n * An enum for specifying the token type on NFTs.\n *\n * @public\n */\nexport enum NftTokenType {\n ERC721 = 'ERC721',\n ERC1155 = 'ERC1155',\n UNKNOWN = 'UNKNOWN'\n}\n\n/**\n * Response object for the {@link CoreNamespace.getAssetTransfers} method.\n *\n * @public\n */\nexport interface AssetTransfersResponse {\n transfers: AssetTransfersResult[];\n /** Page key for the next page of results, if one exists. */\n pageKey?: string;\n}\n\n/**\n * Response object for the {@link CoreNamespace.getAssetTransfers} method when\n * the {@link AssetTransfersWithMetadataParams} are used.\n *\n * @public\n */\nexport interface AssetTransfersWithMetadataResponse {\n transfers: AssetTransfersWithMetadataResult[];\n pageKey?: string;\n}\n\n/**\n * Represents a transfer event that is returned in a {@link AssetTransfersResponse}.\n *\n * @public\n */\nexport interface AssetTransfersResult {\n /** The unique ID of the transfer. */\n uniqueId: string;\n\n /** The category of the transfer. */\n category: AssetTransfersCategory;\n\n /** The block number where the transfer occurred. */\n blockNum: string;\n\n /** The from address of the transfer. */\n from: string;\n\n /** The to address of the transfer. */\n to: string | null;\n\n /**\n * Converted asset transfer value as a number (raw value divided by contract\n * decimal). `null` if ERC721 transfer or contract decimal not available.\n */\n value: number | null;\n\n /**\n * The raw ERC721 token id of the transfer as a hex string. `null` if not an\n * ERC721 transfer.\n */\n erc721TokenId: string | null;\n\n /**\n * A list of ERC1155 metadata objects if the asset transferred is an ERC1155\n * token. `null` if not an ERC1155 transfer.\n */\n erc1155Metadata: ERC1155Metadata[] | null;\n\n /** The token id of the token transferred. */\n tokenId: string | null;\n\n /**\n * Returns the token's symbol or ETH for other transfers. `null` if the\n * information was not available.\n */\n asset: string | null;\n\n /** The transaction hash of the transfer transaction. */\n hash: string;\n\n /** Information about the raw contract of the asset transferred. */\n rawContract: RawContract;\n}\n\n/**\n * Represents a transfer event that is returned in a\n * {@link AssetTransfersResponse} when {@link AssetTransfersWithMetadataParams} are used.\n *\n * @public\n */\nexport interface AssetTransfersWithMetadataResult extends AssetTransfersResult {\n /** Additional metadata about the transfer event. */\n metadata: AssetTransfersMetadata;\n}\n\n/**\n * The metadata object for a {@link AssetTransfersResult} when the\n * {@link AssetTransfersParams.withMetadata} field is set to true.\n *\n * @public\n */\nexport interface AssetTransfersMetadata {\n /** Timestamp of the block from which the transaction event originated. */\n blockTimestamp: string;\n}\n\n/**\n * Represents NFT metadata that holds fields. Note that since there is no\n * standard metadata format, the fields are not guaranteed to be present.\n *\n * @public\n */\nexport interface NftMetadata extends Record {\n /** Name of the NFT asset. */\n name?: string;\n\n /** A human-readable description of the NFT asset. */\n description?: string;\n\n /** URL to the NFT asset image. */\n image?: string;\n\n /**\n * The image URL that appears along the top of the NFT asset page. This tends\n * to be the highest resolution image.\n */\n external_url?: string;\n\n /** Background color of the NFT item. Usually defined as a 6 character hex string. */\n background_color?: string;\n\n /** The traits, attributes, and characteristics for the NFT asset. */\n attributes?: Array>;\n}\n\n/**\n * Represents the URI information the NFT's metadata.\n *\n * @public\n */\nexport interface TokenUri {\n /**\n * URI for the location of the NFT's original metadata blob (ex: the original\n * IPFS link).\n */\n raw: string;\n\n /** Public gateway URI for the raw URI. Generally offers better performance. */\n gateway: string;\n}\n\n/**\n * Represents the URI information for the NFT's media assets.\n *\n * @public\n */\nexport interface Media {\n /**\n * URI for the location of the NFT's original metadata blob for media (ex: the\n * original IPFS link).\n */\n raw: string;\n\n /** Public gateway URI for the raw URI. Generally offers better performance. */\n gateway: string;\n\n /** URL for a resized thumbnail of the NFT media asset. */\n thumbnail?: string;\n\n /**\n * The media format (ex: jpg, gif, png) of the {@link gateway} and\n * {@link thumbnail} assets.\n */\n format?: string;\n\n /**\n * DEPRECATED - The size of the media asset in bytes\n *\n * @deprecated - Please use {@link bytes} instead. This field will be removed\n * in a subsequent release.\n */\n size?: number;\n\n /** The size of the media asset in bytes. */\n bytes?: number;\n}\n\n/** Potential reasons why an NFT contract was classified as spam. */\nexport enum NftSpamClassification {\n Erc721TooManyOwners = 'Erc721TooManyOwners',\n Erc721TooManyTokens = 'Erc721TooManyTokens',\n Erc721DishonestTotalSupply = 'Erc721DishonestTotalSupply',\n MostlyHoneyPotOwners = 'MostlyHoneyPotOwners',\n OwnedByMostHoneyPots = 'OwnedByMostHoneyPots'\n}\n\n/** Detailed information on whether and why an NFT contract was classified as spam. */\nexport interface SpamInfo {\n isSpam: boolean;\n\n /** A list of reasons why an NFT contract was marked as spam. */\n classifications: NftSpamClassification[];\n}\n\n/**\n * Optional parameters object for the {@link getNftsForOwner} and\n * {@link getNftsForOwnerIterator} functions.\n *\n * This interface is used to fetch NFTs with their associated metadata. To get\n * Nfts without their associated metadata, use {@link GetBaseNftsForOwnerOptions}.\n *\n * @public\n */\nexport interface GetNftsForOwnerOptions {\n /**\n * Optional page key from an existing {@link OwnedBaseNftsResponse} or\n * {@link OwnedNftsResponse}to use for pagination.\n */\n pageKey?: string;\n\n /** Optional list of contract addresses to filter the results by. Limit is 20. */\n contractAddresses?: string[];\n\n /**\n * Optional list of filters applied to the query. NFTs that match one or more\n * of these filters are excluded from the response.\n */\n excludeFilters?: NftFilters[];\n\n /**\n * Optional list of filters applied to the query. NFTs that match one or more\n * of these filters are included in the response.\n */\n includeFilters?: NftFilters[];\n\n /**\n * Sets the total number of NFTs to return in the response. Defaults to 100.\n * Maximum page size is 100.\n */\n pageSize?: number;\n\n /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */\n omitMetadata?: boolean;\n\n /**\n * No set timeout by default - When metadata is requested, this parameter is\n * the timeout (in milliseconds) for the website hosting the metadata to\n * respond. If you want to only access the cache and not live fetch any\n * metadata for cache misses then set this value to 0.\n */\n tokenUriTimeoutInMs?: number;\n\n /**\n * Order in which to return results. By default, results are ordered by\n * contract address and token ID in lexicographic order.\n */\n orderBy?: NftOrdering;\n}\n\n/**\n * Optional parameters object for the {@link getNftsForOwner} and\n * {@link getNftsForOwnerIterator} functions.\n *\n * This interface is used to fetch NFTs without their associated metadata. To\n * get Nfts with their associated metadata, use {@link GetNftsForOwnerOptions}.\n *\n * @public\n */\nexport interface GetBaseNftsForOwnerOptions {\n /**\n * Optional page key from an existing {@link OwnedBaseNftsResponse} or\n * {@link OwnedNftsResponse}to use for pagination.\n */\n pageKey?: string;\n\n /** Optional list of contract addresses to filter the results by. Limit is 20. */\n contractAddresses?: string[];\n\n /**\n * Optional list of filters applied to the query. NFTs that match one or more\n * of these filters are excluded from the response.\n */\n excludeFilters?: NftFilters[];\n\n /**\n * Optional list of filters applied to the query. NFTs that match one or more\n * of these filters are included in the response.\n */\n includeFilters?: NftFilters[];\n\n /**\n * Sets the total number of NFTs to return in the response. Defaults to 100.\n * Maximum page size is 100.\n */\n pageSize?: number;\n\n /** Optional boolean flag to include NFT metadata. Defaults to `false`. */\n omitMetadata: true;\n\n /**\n * No set timeout by default - When metadata is requested, this parameter is\n * the timeout (in milliseconds) for the website hosting the metadata to\n * respond. If you want to only access the cache and not live fetch any\n * metadata for cache misses then set this value to 0.\n */\n tokenUriTimeoutInMs?: number;\n\n /**\n * Order in which to return results. By default, results are ordered by\n * contract address and token ID in lexicographic order.\n */\n orderBy?: NftOrdering;\n}\n\n/**\n * Enum of NFT filters that can be applied to a {@link getNftsForOwner} request.\n * NFTs that match one or more of these filters are excluded from the response.\n *\n * - @deprecated Use {@link NftFilters} instead. This enum will be removed in a\n * future version.\n *\n * @beta\n */\nexport enum NftExcludeFilters {\n /** Exclude NFTs that have been classified as spam. */\n SPAM = 'SPAM',\n\n /** Exclude NFTs that have been airdropped to a user. */\n AIRDROPS = 'AIRDROPS'\n}\n\n/**\n * Enum of NFT filters that can be applied to a {@link getNftsForOwner} or a\n * {@link getContractsForOwner} request.\n *\n * @beta\n */\nexport enum NftFilters {\n /** NFTs that have been classified as spam. */\n SPAM = 'SPAM',\n\n /** NFTs that have been airdropped to a user. */\n AIRDROPS = 'AIRDROPS'\n}\n\n/**\n * Enum of ordering that can be applied to a {@link getNftsForOwner} or a\n * {@link getContractsForOwner} response.\n *\n * @beta\n */\nexport enum NftOrdering {\n TRANSFERTIME = 'TRANSFERTIME'\n}\n\n/**\n * The response object for the {@link getNftsForOwner} and\n * {@link getNftsForOwnerIterator} functions. The object contains the NFTs with\n * metadata owned by the provided address, along with pagination information and\n * the total count.\n *\n * @public\n */\nexport interface OwnedNftsResponse {\n /** The NFTs owned by the provided address. */\n readonly ownedNfts: OwnedNft[];\n\n /**\n * Pagination token that can be passed into another request to fetch the next\n * NFTs. If there is no page key, then there are no more NFTs to fetch.\n */\n readonly pageKey?: string;\n\n /** The total count of NFTs owned by the provided address. */\n readonly totalCount: number;\n}\n\n/**\n * The response object for the {@link getNftsForOwner} and\n * {@link getNftsForOwnerIterator} functions. The object contains the NFTs\n * without metadata owned by the provided address, along with pagination\n * information and the total count.\n *\n * @public\n */\nexport interface OwnedBaseNftsResponse {\n /** The NFTs owned by the provided address. */\n readonly ownedNfts: OwnedBaseNft[];\n\n /**\n * Pagination token that can be passed into another request to fetch the next\n * NFTs. If there is no page key, then there are no more NFTs to fetch.\n */\n readonly pageKey?: string;\n\n /** The total count of NFTs owned by the provided address. */\n readonly totalCount: number;\n}\n\n/**\n * Represents an NFT with metadata owned by an address.\n *\n * @public\n */\nexport interface OwnedNft extends Nft {\n /** The token balance of the NFT. */\n readonly balance: number;\n}\n\n/**\n * Represents an NFT without metadata owned by an address.\n *\n * @public\n */\nexport interface OwnedBaseNft extends BaseNft {\n /** The token balance of the NFT. */\n readonly balance: number;\n}\n\n/**\n * The response object for the {@link getOwnersForNft}.\n *\n * @public\n */\nexport interface GetOwnersForNftResponse {\n /** An array of owner addresses for the provided token. */\n readonly owners: string[];\n}\n\n/**\n * The response object for the {@link getOwnersForContract}.\n *\n * @public\n */\nexport interface GetOwnersForContractResponse {\n /** An array of owner addresses for the provided contract address */\n owners: string[];\n}\n\n/**\n * The response object for the {@link getOwnersForContract}.\n *\n * @public\n */\nexport interface GetOwnersForContractWithTokenBalancesResponse {\n /** An array of owner addresses for the provided contract address */\n owners: NftContractOwner[];\n\n /** Optional page key that is returned when a collection has more than 50,000 owners. */\n pageKey?: string;\n}\n\n/**\n * An object representing the owner of an NFT and its corresponding token\n * balances in a {@link GetOwnersForContractWithTokenBalancesResponse} object.\n */\nexport interface NftContractOwner {\n /** The NFT's owner address. */\n ownerAddress: string;\n\n /** A list of objects containing token balances for the provided NFT contract. */\n tokenBalances: NftContractTokenBalance[];\n}\n\n/**\n * An object representing the owned token and balance values in a\n * {@link GetOwnersForContractWithTokenBalancesResponse} object.\n */\nexport interface NftContractTokenBalance {\n /** The token id owned in the NFT contract. */\n tokenId: string;\n\n /** The token Id balance for the provided owner. */\n balance: number;\n}\n\n/**\n * Represents an NFT token to fetch metadata for in a\n * {@link NftNamespace.getNftMetadataBatch} method.\n */\nexport interface NftMetadataBatchToken {\n /** The NFT contract address. Limited to ERC721 and ERC1155 tokens. */\n contractAddress: string;\n\n /** The id of the NFT. */\n tokenId: BigNumberish;\n\n /** Optional field to specify the type of token to speed up the query. */\n tokenType?: NftTokenType.ERC1155 | NftTokenType.ERC721;\n}\n\n/** Additional options for the {@link NftNamespace.getNftMetadataBatch} method. */\nexport interface NftMetadataBatchOptions {\n /**\n * No set timeout by default - When metadata is requested, this parameter is\n * the timeout (in milliseconds) for the website hosting the metadata to\n * respond. If you want to only access the cache and not live fetch any\n * metadata for cache misses then set this value to 0.\n */\n tokenUriTimeoutInMs?: number;\n\n /**\n * Whether to refresh the metadata for the given NFT token before returning\n * the response. Defaults to false for faster response times.\n */\n refreshCache?: boolean;\n}\n\n/**\n * The successful object returned by the {@link getFloorPrice} call for each\n * marketplace (e.g. looksRare).\n *\n * @public\n */\nexport interface FloorPriceMarketplace {\n /** The floor price of the collection on the given marketplace */\n readonly floorPrice: number;\n /** The currency in which the floor price is denominated */\n readonly priceCurrency: string;\n /** The link to the collection on the given marketplace */\n readonly collectionUrl: string;\n /** UTC timestamp of when the floor price was retrieved from the marketplace */\n readonly retrievedAt: string;\n}\n\n/**\n * The failing object returned by the {@link getFloorPrice} call for each\n * marketplace (e.g. looksRare).\n *\n * @public\n */\nexport interface FloorPriceError {\n /** Error fetching floor prices from the given marketplace */\n readonly error: string;\n}\n\n/**\n * The response object for the {@link getFloorPrice} method.\n *\n * @public\n */\nexport interface GetFloorPriceResponse {\n /**\n * Name of the NFT marketplace where the collection is listed. Current\n * marketplaces supported: OpenSea, LooksRare\n */\n readonly openSea: FloorPriceMarketplace | FloorPriceError;\n readonly looksRare: FloorPriceMarketplace | FloorPriceError;\n}\n\n/**\n * Optional parameters object for the the {@link getContractsForOwner} method\n *\n * @public\n */\nexport interface GetContractsForOwnerOptions {\n /** Key for pagination to use to fetch results from the next page if available. */\n pageKey?: string;\n\n /**\n * Optional list of filters applied to the query. NFTs that match one or more\n * of these filters are included in the response. May not be used in\n * conjunction with {@link excludeFilters}.\n */\n includeFilters?: NftFilters[];\n\n /**\n * Optional list of filters applied to the query. NFTs that match one or more\n * of these filters are excluded from the response. May not be used in\n * conjunction with {@link includeFilters}\n */\n excludeFilters?: NftFilters[];\n\n /**\n * Order in which to return results. By default, results are ordered by\n * contract address and token ID in lexicographic order.\n */\n orderBy?: NftOrdering;\n}\n\n/**\n * The response for the {@link NftNamespace.getContractsForOwner} method.\n *\n * @public\n */\nexport interface GetContractsForOwnerResponse {\n /** The list of contracts, that match the query, held by the given address. */\n contracts: ContractForOwner[];\n\n /** Key for pagination to use to fetch results from the next page if available. */\n pageKey?: string;\n\n /** Total number of NFT contracts held by the given address. */\n totalCount: number;\n}\n\n/** Represents a single NFT contract data in the {@link GetContractsForOwnerResponse}. */\nexport interface ContractForOwner extends NftContract {\n /**\n * Sum of NFT balances across all token IDs held by the owner. For\n * non-fungible tokens this will be equal to the numDistinctTokensOwned, but\n * it may be higher if the user holds some fungible ERC1155 tokens.\n */\n totalBalance: number;\n\n /**\n * Number of distinct token IDs held by the owner. For non-fungible tokens\n * this will be equal to the totalBalance, but it may be lower if the user\n * holds some fungible ERC1155 tokens.\n */\n numDistinctTokensOwned: number;\n\n isSpam: boolean;\n\n /** One of the tokens from this contract held by the owner. */\n tokenId: string;\n\n /** Alternative NFT metadata for this contract to be parsed manually. */\n media: Media;\n}\n\n/**\n * Optional parameters object for the {@link getNftSales} endpoint.\n *\n * This interface is used to filter the NFT sales data.\n *\n * @public\n */\nexport interface GetNftSalesOptions {\n /** The block number to start fetching NFT sales data from. */\n fromBlock?: number | 'latest';\n\n /** The block number limit to fetch NFT sales data from. */\n toBlock?: number | 'latest';\n\n /** Whether to return the results in ascending or descending order by block number. */\n order?: SortingOrder;\n\n /** The NFT marketplace to filter sales by. */\n marketplace?: NftSaleMarketplace;\n\n /** The address of the NFT buyer to filter sales by. */\n buyerAddress?: string;\n\n /** The address of the NFT seller to filter sales by. */\n sellerAddress?: string;\n\n /**\n * Filter by whether the buyer or seller was the taker in the NFT trade.\n * Defaults to returning both buyer and seller taker trades.\n */\n taker?: NftSaleTakerType;\n\n /** The maximum number of NFT sales to return. */\n limit?: number;\n\n /** Key for pagination to use to fetch results from the next page if available. */\n pageKey?: string;\n}\n\n/**\n * Alternative optional parameters object for the {@link getNftSales} endpoint\n * that allows filtering results by contractAddress.\n *\n * This interface is used to filter the NFT sales data.\n *\n * @public\n */\nexport interface GetNftSalesOptionsByContractAddress\n extends GetNftSalesOptions {\n /** The contract address of a NFT collection to filter sales by. */\n contractAddress: string;\n\n /** The token ID of an NFT within the specified contractAddress to filter sales by. */\n tokenId?: BigNumberish;\n}\n\n/**\n * The response for the {@link NftNamespace.getNftSales} method.\n *\n * @public\n */\nexport interface GetNftSalesResponse {\n /** The page key to use to fetch the next page if more results are available. */\n pageKey?: string;\n\n /** List of NFT sales that match the query */\n nftSales: NftSale[];\n}\n\n/** Represents a single NFT sale data in the {@link GetNftSalesResponse}. */\nexport interface NftSale {\n /** The marketplace the sale took place on. */\n marketplace: NftSaleMarketplace;\n\n /** The NFT contract address. */\n contractAddress: string;\n\n /** The decimal token ID of the NFT being sold. */\n tokenId: string;\n\n /** The number of tokens sold in the sale as a decimal integer string. */\n quantity: string;\n\n /** The address of the buyer in the NFT sale. */\n buyerAddress: string;\n\n /** The address of the seller in the NFT sale. */\n sellerAddress: string;\n\n /** Whether the price taker in the trade was the buyer or the seller. */\n taker: NftSaleTakerType;\n\n /** The payment from buyer to the seller. */\n sellerFee: NftSaleFeeData;\n\n /** The payment from buyer to the marketplace. */\n marketplaceFee?: NftSaleFeeData;\n\n /** The payment from buyer to the royalty address of the NFT collection. */\n royaltyFee?: NftSaleFeeData;\n\n /** The block number the NFT sale took place in. */\n blockNumber: number;\n\n /** The log number of the sale event emitted within the block. */\n logIndex: number;\n\n /** The index of the token within the bundle of NFTs sold in the sale. */\n bundleIndex: number;\n\n /** The transactionHash of the NFT sale. */\n transactionHash: string;\n}\n\n/**\n * Fee detail for an NFT sale.\n *\n * @public\n */\nexport interface NftSaleFeeData {\n /** The fee payment amount as a decimal integer string. */\n amount: string;\n\n /** The symbol of the token used for the payment. */\n symbol: string;\n\n /** The number of decimals of the token used for the payment. */\n decimal: number;\n}\n\n/**\n * Enum for representing the supported sorting orders of the API.\n *\n * @public\n */\nexport enum SortingOrder {\n ASCENDING = 'asc',\n DESCENDING = 'desc'\n}\n\n/**\n * Enum representing the supported NFT marketplaces by the {@link getNftSales} endpoint.\n *\n * @public\n */\nexport enum NftSaleMarketplace {\n SEAPORT = 'seaport',\n LOOKSRARE = 'looksrare',\n X2Y2 = 'x2y2',\n UNKNOWN = 'unknown'\n}\n\n/**\n * Enum for specifing the taker type for the {@link getNftSales} endpoint.\n *\n * @public\n */\nexport enum NftSaleTakerType {\n BUYER = 'buyer',\n SELLER = 'seller'\n}\n\n/**\n * Information about the rarity of an NFT's attribute in the specified collection.\n *\n * @public\n */\nexport interface NftAttributeRarity {\n /** Name of the NFT's attribute. */\n value: string;\n\n /** The type of NFT attribute. */\n traitType: string;\n\n /**\n * A number from 0 to 1 representing the prevalence of this value for this\n * trait type in the current collection.\n */\n prevalence: number;\n}\n\n/**\n * Summary of the attribute prevalence for the specified NFT contract.\n *\n * @public\n */\nexport interface NftAttributesResponse {\n /** The specified NFT contract's address. */\n contractAddress: string;\n\n /** The specified NFT contract's total supply. */\n totalSupply: number;\n\n /**\n * The attribute prevalence of each trait grouped by the trait type for the\n * provided NFT.\n */\n summary: Record>;\n}\n\n/** The refresh result response object returned by {@link refreshContract}. */\nexport interface RefreshContractResult {\n /** The NFT contract address that was passed in to be refreshed. */\n contractAddress: string;\n\n /** The current state of the refresh request. */\n refreshState: RefreshState;\n\n /**\n * Percentage of tokens currently refreshed, represented as an integer string.\n * Field can be null if the refresh has not occurred.\n */\n progress: string | null;\n}\n\n/** The current state of the NFT contract refresh process. */\nexport enum RefreshState {\n /** The provided contract is not an NFT or does not contain metadata. */\n DOES_NOT_EXIST = 'does_not_exist',\n\n /** The contract has already been queued for refresh. */\n ALREADY_QUEUED = 'already_queued',\n\n /** The contract is currently being refreshed. */\n IN_PROGRESS = 'in_progress',\n\n /** The contract refresh is complete. */\n FINISHED = 'finished',\n\n /** The contract refresh has been queued and await execution. */\n QUEUED = 'queued',\n\n /** The contract was unable to be queued due to an internal error. */\n QUEUE_FAILED = 'queue_failed'\n}\n\n/**\n * The parameter field of {@link TransactionReceiptsParams}.\n *\n * @public\n */\nexport interface TransactionReceiptsBlockNumber {\n /** The block number to get transaction receipts for. */\n blockNumber: string;\n}\n\n/**\n * The parameter field of {@link TransactionReceiptsParams}.\n *\n * @public\n */\nexport interface TransactionReceiptsBlockHash {\n /** The block hash to get transaction receipts for. */\n blockHash: string;\n}\n\n/**\n * The parameters to use with the {@link CoreNamespace.getTransactionReceipts} method.\n *\n * @public\n */\nexport type TransactionReceiptsParams =\n | TransactionReceiptsBlockNumber\n | TransactionReceiptsBlockHash;\n\n/**\n * Response object for a {@link CoreNamespace.getTransactionReceipts} call.\n *\n * @public\n */\nexport interface TransactionReceiptsResponse {\n /** A list of transaction receipts for the queried block. */\n receipts: TransactionReceipt[] | null;\n}\n\n/**\n * Metadata object returned in a {@link AssetTransfersResult} object if the asset\n * transferred is an ERC1155.\n *\n * @public\n */\nexport interface ERC1155Metadata {\n tokenId: string;\n value: string;\n}\n\n/**\n * Information about the underlying contract for the asset that was transferred\n * in a {@link AssetTransfersResult} object.\n *\n * @public\n */\nexport interface RawContract {\n /**\n * The raw transfer value as a hex string. `null` if the transfer was for an\n * ERC721 or ERC1155 token.\n */\n value: string | null;\n\n /** The contract address. `null` if it was an internal or external transfer. */\n address: string | null;\n\n /**\n * The number of decimals in the contract as a hex string. `null` if the value\n * is not in the contract and not available from other sources.\n */\n decimal: string | null;\n}\n\n/**\n * Optional parameters object for the {@link getNftsForContract} and\n * {@link getNftsForContractIterator} functions.\n *\n * This interface is used to fetch NFTs with their associated metadata. To get\n * Nfts without their associated metadata, use {@link GetBaseNftsForContractOptions}.\n *\n * @public\n */\nexport interface GetNftsForContractOptions {\n /**\n * Optional page key from an existing {@link NftContractBaseNftsResponse} or\n * {@link NftContractNftsResponse}to use for pagination.\n */\n pageKey?: string;\n\n /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */\n omitMetadata?: boolean;\n\n /**\n * Sets the total number of NFTs to return in the response. Defaults to 100.\n * Maximum page size is 100.\n */\n pageSize?: number;\n\n /**\n * No set timeout by default - When metadata is requested, this parameter is\n * the timeout (in milliseconds) for the website hosting the metadata to\n * respond. If you want to only access the cache and not live fetch any\n * metadata for cache misses then set this value to 0.\n */\n tokenUriTimeoutInMs?: number;\n}\n\n/**\n * Optional parameters object for the {@link getNftsForContract} and\n * {@link getNftsForContractIterator} functions.\n *\n * This interface is used to fetch NFTs without their associated metadata. To\n * get Nfts with their associated metadata, use {@link GetNftsForContractOptions}.\n *\n * @public\n */\nexport interface GetBaseNftsForContractOptions {\n /**\n * Optional page key from an existing {@link NftContractBaseNftsResponse} or\n * {@link NftContractNftsResponse}to use for pagination.\n */\n pageKey?: string;\n\n /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */\n omitMetadata: false;\n\n /**\n * Sets the total number of NFTs to return in the response. Defaults to 100.\n * Maximum page size is 100.\n */\n pageSize?: number;\n}\n\n/**\n * Optional parameters object for the {@link getNftsForContract} method.\n *\n * This interface configures options when fetching the owner addresses of the\n * provided contract.\n *\n * @public\n */\nexport interface GetOwnersForContractOptions {\n /**\n * Whether to include the token balances per token id for each owner. Defaults\n * to false when omitted.\n */\n withTokenBalances?: boolean;\n\n /** The block number in hex or decimal to fetch owners for. */\n block?: string;\n\n /** Optional page key to paginate the next page for large requests. */\n pageKey?: string;\n}\n\n/**\n * Optional parameters object for the {@link getNftsForContract} method.\n *\n * This interface configures options when fetching the owner addresses of the\n * provided contract.\n *\n * @public\n */\nexport interface GetOwnersForContractWithTokenBalancesOptions {\n /**\n * Whether to include the token balances per token id for each owner. Defaults\n * to false when omitted.\n */\n withTokenBalances: true;\n\n /** The block number in hex or decimal to fetch owners for. */\n block?: string;\n\n /** Optional page key to paginate the next page for large requests. */\n pageKey?: string;\n}\n\n/**\n * The response object for the {@link getNftsForContract} function. The object\n * contains the NFTs without metadata inside the NFT contract.\n *\n * @public\n */\nexport interface NftContractBaseNftsResponse {\n /** An array of NFTs without metadata. */\n nfts: BaseNft[];\n\n /**\n * Pagination token that can be passed into another request to fetch the next\n * NFTs. If there is no page key, then there are no more NFTs to fetch.\n */\n pageKey?: string;\n}\n\n/**\n * The response object for the {@link getNftsForContract} function. The object\n * contains the NFTs with metadata inside the NFT contract.\n *\n * @public\n */\nexport interface NftContractNftsResponse {\n /** An array of NFTs with metadata. */\n nfts: Nft[];\n\n /**\n * Pagination token that can be passed into another request to fetch the next\n * NFTs. If there is no page key, then there are no more NFTs to fetch.\n */\n pageKey?: string;\n}\n\n/** OpenSea's metadata for an NFT collection. */\nexport interface OpenSeaCollectionMetadata {\n /** The floor price of the NFT. */\n floorPrice?: number;\n /** The name of the collection on OpenSea. */\n collectionName?: string;\n /** The approval status of the collection on OpenSea. */\n safelistRequestStatus?: OpenSeaSafelistRequestStatus;\n /** The image URL determined by OpenSea. */\n imageUrl?: string;\n /** The description of the collection on OpenSea. */\n description?: string;\n /** The homepage of the collection as determined by OpenSea. */\n externalUrl?: string;\n /** The Twitter handle of the collection. */\n twitterUsername?: string;\n /** The Discord URL of the collection. */\n discordUrl?: string;\n /** Timestamp of when the OpenSea metadata was last ingested by Alchemy. */\n lastIngestedAt?: string;\n}\n\n/** An OpenSea collection's approval status. */\nexport enum OpenSeaSafelistRequestStatus {\n /** Verified collection. */\n VERIFIED = 'verified',\n /** Collections that are approved on open sea and can be found in search results. */\n APPROVED = 'approved',\n /** Collections that requested safelisting on OpenSea. */\n REQUESTED = 'requested',\n /** Brand new collections. */\n NOT_REQUESTED = 'not_requested'\n}\n\n/**\n * The response object for the {@link findContractDeployer} function.\n *\n * @public\n */\nexport interface DeployResult {\n /** The address of the contract deployer, if it is available. */\n readonly deployerAddress?: string;\n\n /** The block number the contract was deployed in. */\n readonly blockNumber: number;\n}\n\n/**\n * Method names for Alchemy's custom Subscription API endpoints.\n *\n * This value is provided in the `method` field when creating an event filter on\n * the Websocket Namespace.\n */\nexport enum AlchemySubscription {\n PENDING_TRANSACTIONS = 'alchemy_pendingTransactions',\n MINED_TRANSACTIONS = 'alchemy_minedTransactions'\n}\n\n/**\n * Event filter for the {@link AlchemyWebSocketProvider.on} and\n * {@link AlchemyWebSocketProvider.once} methods to use Alchemy's custom\n * `alchemy_pendingTransactions` endpoint.\n *\n * Returns the transaction information for all pending transactions that match a\n * given filter. For full documentation, see:\n * {@link https://docs.alchemy.com/reference/alchemy-pendingtransactions}\n *\n * Note that excluding all optional parameters will return transaction\n * information for ALL pending transactions that are added to the mempool.\n *\n * @public\n */\nexport interface AlchemyPendingTransactionsEventFilter {\n method: AlchemySubscription.PENDING_TRANSACTIONS;\n\n /** Filter pending transactions sent FROM the provided address or array of addresses. */\n fromAddress?: string | string[];\n\n /** Filter pending transactions sent TO the provided address or array of addresses. */\n toAddress?: string | string[];\n\n /**\n * Whether to only include transaction hashes and exclude the rest of the\n * transaction response for a smaller payload. Defaults to false (by default,\n * the entire transaction response is included).\n *\n * Note that setting only {@link hashesOnly} to true will return the same\n * response as subscribing to `newPendingTransactions`.\n */\n hashesOnly?: boolean;\n}\n\n/**\n * Event filter for the {@link AlchemyWebSocketProvider.on} and\n * {@link AlchemyWebSocketProvider.once} methods to use Alchemy's custom\n * `alchemy_minedTransactions` endpoint.\n *\n * Returns the transaction information for all mined transactions that match the\n * provided filter. For full documentation, see:\n * {@link https://docs.alchemy.com/reference/alchemy-minedtransactions}\n *\n * Note that excluding all optional parameters will return transaction\n * information for ALL mined transactions.\n *\n * @public\n */\nexport interface AlchemyMinedTransactionsEventFilter {\n method: AlchemySubscription.MINED_TRANSACTIONS;\n\n /**\n * Address filters to subscribe to. Defaults to all transactions if omitted.\n * Limit 100 address filters. Requires a non-empty array.\n */\n addresses?: NonEmptyArray;\n\n /**\n * Whether to include transactions that were removed from the mempool.\n * Defaults to false.\n */\n includeRemoved?: boolean;\n\n /**\n * Whether to only include transaction hashes and exclude the rest of the\n * transaction response for a smaller payload. Defaults to false (by default,\n * the entire transaction response is included).\n */\n hashesOnly?: boolean;\n}\n\n/**\n * Address filters for {@link AlchemyMinedTransactionsEventFilter}. Requires at\n * least one of the fields to be set.\n */\nexport type AlchemyMinedTransactionsAddress = RequireAtLeastOne<{\n to?: string;\n from?: string;\n}>;\n\n/**\n * Alchemy's event type that extends the default {@link EventType} interface to\n * also include Alchemy's Subscription API.\n *\n * @public\n */\nexport type AlchemyEventType = EventType | AlchemyEventFilter;\n\n/**\n * This type represents the Alchemy's Subscription API endpoints as event\n * filters compatible with other ethers events.\n */\nexport type AlchemyEventFilter =\n | AlchemyMinedTransactionsEventFilter\n | AlchemyPendingTransactionsEventFilter;\n\n/** Options for the {@link TransactNamespace.sendPrivateTransaction} method. */\nexport interface SendPrivateTransactionOptions {\n /**\n * Whether to use fast-mode. Defaults to false. Please note that fast mode\n * transactions cannot be cancelled using\n * {@link TransactNamespace.cancelPrivateTransaction}. method.\n *\n * See {@link https://docs.flashbots.net/flashbots-protect/rpc/fast-mode} for\n * more details.\n */\n fast: boolean;\n}\n\n/**\n * Response object for the {@link TransactNamespace.sendGasOptimizedTransaction} method.\n *\n * @internal\n */\n// TODO(txjob): Remove internal tag once this feature is released.\nexport interface GasOptimizedTransactionResponse {\n /**\n * The tracking id. This can be used to check the status of the transaction\n * via {@link TransactNamespace.getGasOptimizedTransactionStatus}.\n */\n trackingId: string;\n\n /* An array of the transaction hashes from submitted transactions. */\n transactionHashes: string[];\n}\n\n/**\n * Response object for the\n * {@link TransactNamespace.getGasOptimizedTransactionStatus} method.\n *\n * @internal\n */\n// TODO(txjob): Remove internal tag once this feature is released.\nexport interface GasOptimizedTransactionStatusResponse {\n /** The status of the submitted transaction job. */\n jobStatus: GasOptimizedTransactionStatus;\n\n /** An array of the submitted transactions hashes that have been attempted. */\n transactionHashesAttempted: string[];\n\n /** The final mined transaction hash if the job was completed successfully. */\n minedTransactionHash?: string;\n}\n\n/**\n * Potential transaction job statuses for a {@link GasOptimizedTransactionResponse}\n *\n * @internal\n */\n// TODO(txjob): Remove internal tag once this feature is released.\nexport enum GasOptimizedTransactionStatus {\n UNSPECIFIED = 'TRANSACTION_JOB_STATUS_UNSPECIFIED',\n IN_PROGRESS = 'IN_PROGRESS',\n COMPLETE = 'COMPLETE',\n ABANDONED = 'ABANDONED'\n}\n\n/** SDK representation of a Webhook in the Notify API. */\nexport interface Webhook {\n /** The webhook's unique id. */\n id: string;\n /** The network the webhook is on. */\n network: Network;\n /** The type of webhook. */\n type: WebhookType;\n /** The url that the webhook sends its payload to. */\n url: string;\n /** Whether the webhook is currently active */\n isActive: boolean;\n /** The creation time of the webhook as an ISO string. */\n timeCreated: string;\n /** The signing key used to verify payloads for the webhook. */\n signingKey: string;\n /** The webhook version. All newly created webhooks default to V2. */\n version: WebhookVersion;\n /**\n * The app id of the app used for the webhook. This field is only present on\n * {@link MinedTransactionWebhook} and {@link DroppedTransactionWebhook}\n */\n appId?: string;\n}\n\n/** The version of the webhook. All newly created webhooks default to V2. */\nexport enum WebhookVersion {\n V1 = 'V1',\n V2 = 'V2'\n}\n\n/** The type of {@link Webhook}. */\nexport enum WebhookType {\n MINED_TRANSACTION = 'MINED_TRANSACTION',\n DROPPED_TRANSACTION = 'DROPPED_TRANSACTION',\n ADDRESS_ACTIVITY = 'ADDRESS_ACTIVITY',\n NFT_ACTIVITY = 'NFT_ACTIVITY'\n}\n\n/**\n * A Mined Transaction Webhook is used to notify your app whenever a transaction\n * sent through your API key gets successfully mined. This is useful if you want\n * to notify customers that their transaction went through.\n */\nexport interface MinedTransactionWebhook extends Webhook {\n type: WebhookType.MINED_TRANSACTION;\n}\n\n/**\n * A Dropped Transaction webhook is used to notify your app whenever a\n * transaction sent through your API key gets dropped. This can be useful if you\n * want to notify customers that their transactions were dropped.\n */\nexport interface DroppedTransactionWebhook extends Webhook {\n type: WebhookType.DROPPED_TRANSACTION;\n}\n\n/**\n * An Address Activity Webhook tracks ETH, ERC20, ERC721, and ERC1155 transfers\n * for the provided addresses. This can be used to notify your app with\n * real-time state changes when your tracked addresses send or receive tokens.\n */\nexport interface AddressActivityWebhook extends Webhook {\n type: WebhookType.ADDRESS_ACTIVITY;\n}\n\n/**\n * The NFT Activity Webhook tracks all ERC721 and ERC1155 activity. This can be\n * used to notify your app with real time state changes when an NFT is\n * transferred between addresses.\n */\nexport interface NftActivityWebhook extends Webhook {\n type: WebhookType.NFT_ACTIVITY;\n}\n\n/** The response for a {@link NotifyNamespace.getAllWebhooks} method. */\nexport interface GetAllWebhooksResponse {\n /** All webhooks attached to the provided auth token. */\n webhooks: Webhook[];\n /** The total number of webhooks. */\n totalCount: number;\n}\n\n/** Options object for the {@link NotifyNamespace.getAddresses} method. */\nexport interface GetAddressesOptions {\n /** Number of addresses to fetch. */\n limit?: number;\n\n /** Page */\n pageKey?: string;\n}\n\n/** Response object for the {@link NotifyNamespace.getAddresses} method. */\nexport interface AddressActivityResponse {\n /** The addresses for the webhook. */\n addresses: string[];\n /** The total number of addresses. */\n totalCount: number;\n /** Optional page key used to fetch the remaining addresses. */\n pageKey?: string;\n}\n\n/**\n * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order\n * to create a {@link MinedTransactionWebhook} or {@link DroppedTransactionWebhook}.\n *\n * The webhook will be created on the app and network associated with the appId.\n * To find the app id of a project, go to the Alchemy Dashboard in the Apps tab.\n * After clicking on an app, the app id is the string in the URL following 'apps/'.\n *\n * This is a temporary workaround for now. We're planning on detecting the app\n * id from the provided api key directly. Stay tuned!\n */\nexport interface TransactionWebhookParams {\n /** The app id of the project to create the webhook on. */\n appId: string;\n}\n\n/**\n * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order\n * to create a {@link NftActivityWebhook}.\n */\nexport interface NftWebhookParams {\n /** Array of NFT filters the webhook should track. */\n filters: NftFilter[];\n /**\n * Optional network to create the webhook on. If omitted, the webhook will be\n * created on network of the app provided in the api key config.\n */\n network?: Network;\n}\n\n/**\n * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order\n * to create a {@link AddressActivityWebhook}.\n */\nexport interface AddressWebhookParams {\n /** Array of addresses the webhook should activity for. */\n addresses: string[];\n /**\n * Optional network to create the webhook on. If omitted, the webhook will be\n * created on network of the app provided in the api key config.\n */\n network?: Network;\n}\n\n/** NFT to track on a {@link NftActivityWebhook}. */\nexport interface NftFilter {\n /** The contract address of the NFT. */\n contractAddress: string;\n /** The token id of the NFT. */\n tokenId: BigNumberish;\n}\n\n/** Response object for the {@link NotifyNamespace.getNftFilters} method. */\nexport interface NftFiltersResponse {\n /** The NFT filters on the provided webhook. */\n filters: NftFilter[];\n /** The total number of NFT filters on the webhook. */\n totalCount: number;\n /** Optional page key used to fetch the remaining filters. */\n pageKey?: string;\n}\n\n/**\n * Params object when calling {@link NotifyNamespace.updateWebhook} to mark a\n * webhook as active or inactive.\n */\nexport interface WebhookStatusUpdate {\n /** Whether the webhook is active. */\n isActive: boolean;\n}\n\n/**\n * Params object when calling {@link NotifyNamespace.updateWebhook} to add and\n * remove NFT filters for a {@link NftActivityWebhook}.\n */\nexport interface WebhookNftFilterUpdate {\n /** The filters to additionally track. */\n addFilters: NftFilter[];\n /** Existing filters to remove. */\n removeFilters: NftFilter[];\n}\n\n/**\n * Params object when calling {@link NotifyNamespace.updateWebhook} to add and\n * remove addresses for a {@link AddressActivityWebhook}.\n */\nexport interface WebhookAddressUpdate {\n /** The addresses to additionally track. */\n addAddresses: string[];\n /** Existing addresses to remove. */\n removeAddresses: string[];\n}\n\n/**\n * Params object when calling {@link NotifyNamespace.updateWebhook} to replace\n * all existing addresses for a {@link AddressActivityWebhook}.\n */\nexport interface WebhookAddressOverride {\n /** The new addresses to track. Existing addresses will be removed. */\n newAddresses: string[];\n}\n\n/**\n * Params object when calling {@link NotifyNamespace.updateWebhook} to update a\n * {@link NftActivityWebhook}.\n */\n\nexport type NftWebhookUpdate =\n | WebhookStatusUpdate\n | RequireAtLeastOne;\n\n/**\n * Params object when calling {@link NotifyNamespace.updateWebhook} to update a\n * {@link AddressActivityWebhook}.\n */\nexport type AddressWebhookUpdate =\n | WebhookStatusUpdate\n | RequireAtLeastOne\n | WebhookAddressOverride;\n\n/**\n * Requires at least one of the properties to be set.\n *\n * Implementation copied over from\n * {@link https://learn.microsoft.com/en-us/javascript/api/@azure/keyvault-certificates/requireatleastone?view=azure-node-latest}\n */\nexport type RequireAtLeastOne = {\n [K in keyof T]-?: Required> &\n Partial>>;\n}[keyof T];\n\n/** Requires an array with at least one value. */\nexport type NonEmptyArray = [T, ...T[]];\n","import { Network as NetworkFromEthers } from '@ethersproject/networks';\n\nimport { Network } from '../types/types';\n\nexport const DEFAULT_ALCHEMY_API_KEY = 'demo';\nexport const DEFAULT_NETWORK = Network.ETH_MAINNET;\nexport const DEFAULT_MAX_RETRIES = 5;\n\n/**\n * Returns the base URL for making Alchemy API requests. The `alchemy.com`\n * endpoints only work with non eth json-rpc requests.\n *\n * @internal\n */\nexport function getAlchemyHttpUrl(network: Network, apiKey: string): string {\n return `https://${network}.g.alchemy.com/v2/${apiKey}`;\n}\n\nexport function getAlchemyNftHttpUrl(network: Network, apiKey: string): string {\n return `https://${network}.g.alchemy.com/nft/v2/${apiKey}`;\n}\n\nexport function getAlchemyWsUrl(network: Network, apiKey: string): string {\n return `wss://${network}.g.alchemy.com/v2/${apiKey}`;\n}\n\nexport function getAlchemyWebhookHttpUrl(): string {\n return 'https://dashboard.alchemy.com/api';\n}\n\nexport enum AlchemyApiType {\n BASE,\n NFT,\n WEBHOOK\n}\n\n/**\n * Mapping of network names to their corresponding Network strings used to\n * create an Ethers.js Provider instance.\n */\nexport const EthersNetwork = {\n [Network.ETH_MAINNET]: 'mainnet',\n [Network.ETH_ROPSTEN]: 'ropsten',\n [Network.ETH_GOERLI]: 'goerli',\n [Network.ETH_KOVAN]: 'kovan',\n [Network.ETH_RINKEBY]: 'rinkeby',\n [Network.OPT_MAINNET]: 'optimism',\n [Network.OPT_KOVAN]: 'optimism-kovan',\n [Network.OPT_GOERLI]: 'optimism-goerli',\n [Network.ARB_MAINNET]: 'arbitrum',\n [Network.ARB_RINKEBY]: 'arbitrum-rinkeby',\n [Network.ARB_GOERLI]: 'arbitrum-goerli',\n [Network.MATIC_MAINNET]: 'matic',\n [Network.MATIC_MUMBAI]: 'maticmum',\n [Network.ASTAR_MAINNET]: 'astar-mainnet'\n};\n\n/**\n * Mapping of network names to their corresponding Ethers Network objects. These\n * networks are not yet supported by Ethers and are listed here to be overriden\n * in the provider.\n */\nexport const CustomNetworks: { [key: string]: NetworkFromEthers } = {\n 'arbitrum-goerli': {\n chainId: 421613,\n name: 'arbitrum-goerli'\n },\n 'astar-mainnet': {\n chainId: 592,\n name: 'astar-mainnet'\n }\n};\n\nexport function noop(): void {\n // It's a no-op\n}\n\nexport const ETH_NULL_VALUE = '0x';\n","import { AlchemySettings, Network } from '../types/types';\nimport {\n AlchemyApiType,\n DEFAULT_ALCHEMY_API_KEY,\n DEFAULT_MAX_RETRIES,\n DEFAULT_NETWORK,\n getAlchemyHttpUrl,\n getAlchemyNftHttpUrl,\n getAlchemyWebhookHttpUrl\n} from '../util/const';\nimport type { AlchemyProvider } from './alchemy-provider';\nimport type { AlchemyWebSocketProvider } from './alchemy-websocket-provider';\n\n/**\n * This class holds the config information for the SDK client instance and\n * exposes the underlying providers for more advanced use cases.\n *\n * @public\n */\nexport class AlchemyConfig {\n /** The Alchemy API key. */\n readonly apiKey: string;\n\n /** The Network that this SDK is associated with. */\n readonly network: Network;\n\n /** The maximum number of retries to perform. */\n readonly maxRetries: number;\n\n /** Setting to enable automatic batching on json-rpc requests. Defaults to false.*/\n readonly batchRequests: boolean;\n\n /**\n * The optional hardcoded URL to send requests to instead of using the network\n * and apiKey.\n */\n readonly url?: string;\n\n /** The optional Alchemy auth token to use when sending requests with the Notify API. */\n readonly authToken?: string;\n\n /**\n * Dynamically imported provider instance.\n *\n * @internal\n */\n private _baseAlchemyProvider: Promise | undefined;\n\n /**\n * Dynamically imported provider instance.\n *\n * @internal\n */\n private _baseAlchemyWssProvider:\n | Promise\n | undefined;\n\n constructor(config?: AlchemySettings) {\n this.apiKey = config?.apiKey || DEFAULT_ALCHEMY_API_KEY;\n this.network = config?.network || DEFAULT_NETWORK;\n this.maxRetries = config?.maxRetries || DEFAULT_MAX_RETRIES;\n this.url = config?.url;\n this.authToken = config?.authToken;\n this.batchRequests = config?.batchRequests || false;\n }\n\n /**\n * Returns the URL endpoint to send the HTTP request to. If a custom URL was\n * provided in the config, that URL is returned. Otherwise, the default URL is\n * from the network and API key.\n *\n * @param apiType - The type of API to get the URL for.\n * @internal\n */\n _getRequestUrl(apiType: AlchemyApiType): string {\n if (this.url !== undefined) {\n return this.url;\n } else if (apiType === AlchemyApiType.NFT) {\n return getAlchemyNftHttpUrl(this.network, this.apiKey);\n } else if (apiType === AlchemyApiType.WEBHOOK) {\n return getAlchemyWebhookHttpUrl();\n } else {\n return getAlchemyHttpUrl(this.network, this.apiKey);\n }\n }\n\n /**\n * Returns an AlchemyProvider instance. Only one provider is created per\n * Alchemy instance.\n *\n * The AlchemyProvider is a wrapper around ether's `AlchemyProvider` class and\n * has been expanded to support Alchemy's Enhanced APIs.\n *\n * Most common methods on the provider are available as top-level methods on\n * the {@link Alchemy} instance, but the provider is exposed here to access\n * other less-common methods.\n *\n * @public\n */\n getProvider(): Promise {\n if (!this._baseAlchemyProvider) {\n this._baseAlchemyProvider = (async () => {\n const { AlchemyProvider } = await import('./alchemy-provider');\n return new AlchemyProvider(this);\n })();\n }\n return this._baseAlchemyProvider;\n }\n\n /**\n * Returns an AlchemyWebsocketProvider instance. Only one provider is created\n * per Alchemy instance.\n *\n * The AlchemyWebSocketProvider is a wrapper around ether's\n * `AlchemyWebSocketProvider` class and has been expanded to support Alchemy's\n * Subscription APIs, automatic backfilling, and other performance improvements.\n *\n * Most common methods on the provider are available as top-level methods on\n * the {@link Alchemy} instance, but the provider is exposed here to access\n * other less-common methods.\n */\n getWebSocketProvider(): Promise {\n if (!this._baseAlchemyWssProvider) {\n this._baseAlchemyWssProvider = (async () => {\n const { AlchemyWebSocketProvider } = await import(\n './alchemy-websocket-provider'\n );\n return new AlchemyWebSocketProvider(this);\n })();\n }\n return this._baseAlchemyWssProvider;\n }\n}\n","import { BigNumber } from '@ethersproject/bignumber';\n\n/**\n * Converts a hex string to a decimal number.\n *\n * @param hexString - The hex string to convert.\n * @public\n */\nexport function fromHex(hexString: string): number {\n return BigNumber.from(hexString).toNumber();\n}\n\n/**\n * Converts a number to a hex string.\n *\n * @param num - The number to convert to hex.\n * @public\n */\nexport function toHex(num: number): string {\n return BigNumber.from(num).toHexString();\n}\n\n/**\n * Checks if a value is a hex string.\n *\n * @param possibleHexString - The value to check.\n * @public\n */\nexport function isHex(possibleHexString: string): boolean {\n return /^0x[0-9a-fA-F]+$/.test(possibleHexString);\n}\n","import { BigNumber } from '@ethersproject/bignumber';\n\nimport { BaseNft, Nft, NftContract } from '../api/nft';\nimport { toHex } from '../api/util';\nimport {\n RawBaseNft,\n RawContractBaseNft,\n RawGetContractsForOwnerResponse,\n RawGetNftSalesResponse,\n RawNft,\n RawNftAttributeRarity,\n RawNftContract,\n RawOpenSeaCollectionMetadata,\n RawSpamInfo\n} from '../internal/raw-interfaces';\nimport {\n GetContractsForOwnerResponse,\n GetNftSalesResponse,\n NftAttributeRarity,\n NftSaleMarketplace,\n NftSaleTakerType,\n NftTokenType,\n OpenSeaCollectionMetadata,\n OpenSeaSafelistRequestStatus,\n SpamInfo,\n TokenUri\n} from '../types/types';\n\nexport function formatBlock(block: string | number): string {\n if (typeof block === 'string') {\n return block;\n } else if (Number.isInteger(block)) {\n return toHex(block);\n }\n return block.toString();\n}\n\nfunction stringToEnum(\n x: string,\n enumb: Record\n): T | undefined {\n return Object.values(enumb).includes(x as T) ? (x as T) : undefined;\n}\n\nexport function getNftContractFromRaw(\n rawNftContract: RawNftContract\n): NftContract {\n return {\n address: rawNftContract.address,\n name: rawNftContract.contractMetadata.name,\n symbol: rawNftContract.contractMetadata.symbol,\n totalSupply: rawNftContract.contractMetadata.totalSupply,\n tokenType: parseNftTokenType(rawNftContract.contractMetadata.tokenType),\n openSea: parseOpenSeaMetadata(rawNftContract.contractMetadata.openSea)\n };\n}\n\nexport function getBaseNftFromRaw(rawBaseNft: RawBaseNft): BaseNft;\nexport function getBaseNftFromRaw(\n rawContractBaseNft: RawContractBaseNft,\n contractAddress: string\n): BaseNft;\nexport function getBaseNftFromRaw(\n rawBaseNft: RawBaseNft | RawContractBaseNft,\n contractAddress?: string\n): BaseNft {\n return {\n contract: contractAddress\n ? { address: contractAddress }\n : (rawBaseNft as RawBaseNft).contract,\n tokenId: BigNumber.from(rawBaseNft.id.tokenId).toString(),\n tokenType: parseNftTokenType(rawBaseNft.id.tokenMetadata?.tokenType)\n };\n}\n\nexport function getNftFromRaw(rawNft: RawNft): Nft {\n try {\n const tokenType = parseNftTokenType(rawNft.id.tokenMetadata?.tokenType);\n const spamInfo = parseSpamInfo(rawNft.spamInfo);\n\n return {\n contract: {\n address: rawNft.contract.address,\n name: rawNft.contractMetadata?.name,\n symbol: rawNft.contractMetadata?.symbol,\n totalSupply: rawNft.contractMetadata?.totalSupply,\n tokenType,\n openSea: parseOpenSeaMetadata(rawNft.contractMetadata?.openSea)\n },\n tokenId: parseNftTokenId(rawNft.id.tokenId),\n tokenType,\n title: rawNft.title,\n description: parseNftDescription(rawNft.description),\n timeLastUpdated: rawNft.timeLastUpdated,\n metadataError: rawNft.error,\n rawMetadata: rawNft.metadata,\n tokenUri: parseNftTokenUri(rawNft.tokenUri),\n media: parseNftTokenUriArray(rawNft.media),\n spamInfo\n };\n } catch (e) {\n throw new Error('Error parsing the NFT response: ' + e);\n }\n}\n\nexport function getNftSalesFromRaw(\n rawNftSales: RawGetNftSalesResponse\n): GetNftSalesResponse {\n return {\n pageKey: rawNftSales?.pageKey,\n nftSales: rawNftSales.nftSales.map(rawNftSale => ({\n marketplace: parseNftSaleMarketplace(rawNftSale.marketplace),\n contractAddress: rawNftSale.contractAddress,\n tokenId: rawNftSale.tokenId,\n quantity: rawNftSale.quantity,\n buyerAddress: rawNftSale.buyerAddress,\n sellerAddress: rawNftSale.sellerAddress,\n taker: parseNftTaker(rawNftSale.taker),\n sellerFee: rawNftSale?.sellerFee,\n marketplaceFee: rawNftSale?.marketplaceFee,\n royaltyFee: rawNftSale?.royaltyFee,\n blockNumber: rawNftSale?.blockNumber,\n logIndex: rawNftSale.logIndex,\n bundleIndex: rawNftSale.bundleIndex,\n transactionHash: rawNftSale.transactionHash\n }))\n };\n}\n\nfunction parseNftSaleMarketplace(marketplace: string): NftSaleMarketplace {\n switch (marketplace) {\n case 'looksrare':\n return NftSaleMarketplace.LOOKSRARE;\n case 'seaport':\n return NftSaleMarketplace.SEAPORT;\n case 'x2y2':\n return NftSaleMarketplace.X2Y2;\n default:\n return NftSaleMarketplace.UNKNOWN;\n }\n}\n\nfunction parseNftTaker(taker: string): NftSaleTakerType {\n // The `.toLowerCase()` call is needed because the API returns the capitalized values\n switch (taker.toLowerCase()) {\n case 'buyer':\n return NftSaleTakerType.BUYER;\n case 'seller':\n return NftSaleTakerType.SELLER;\n default:\n throw new Error(`Unsupported NftSaleTakerType ${taker}`);\n }\n}\n\nexport function getNftRarityFromRaw(\n rawNftRarity: RawNftAttributeRarity[]\n): NftAttributeRarity[] {\n return rawNftRarity.map(({ prevalence, trait_type, value }) => ({\n prevalence,\n traitType: trait_type,\n value\n }));\n}\n\nexport function getContractsForOwnerFromRaw(\n rawContractsForOwner: RawGetContractsForOwnerResponse\n): GetContractsForOwnerResponse {\n return {\n pageKey: rawContractsForOwner?.pageKey,\n totalCount: rawContractsForOwner.totalCount,\n contracts: rawContractsForOwner.contracts.map(contract => {\n return {\n address: contract.address,\n totalSupply: contract.totalSupply,\n isSpam: contract.isSpam,\n media: contract.media,\n numDistinctTokensOwned: contract.numDistinctTokensOwned,\n tokenId: contract.tokenId,\n totalBalance: contract.totalBalance,\n name: contract.name,\n openSea: parseOpenSeaMetadata(contract?.opensea),\n symbol: contract?.symbol,\n tokenType: parseNftTokenType(contract?.tokenType)\n };\n })\n };\n}\n\nfunction parseNftTokenId(tokenId: string): string {\n // We have to normalize the token id here since the backend sometimes\n // returns the token ID as a hex string and sometimes as an integer.\n return BigNumber.from(tokenId).toString();\n}\n\nfunction parseNftTokenType(tokenType: string | undefined): NftTokenType {\n switch (tokenType) {\n case 'erc721':\n case 'ERC721':\n return NftTokenType.ERC721;\n case 'erc1155':\n case 'ERC1155':\n return NftTokenType.ERC1155;\n default:\n return NftTokenType.UNKNOWN;\n }\n}\n\nfunction parseSpamInfo(\n spamInfo: RawSpamInfo | undefined\n): SpamInfo | undefined {\n if (!spamInfo) {\n return undefined;\n }\n const { isSpam, classifications } = spamInfo;\n return {\n isSpam: isSpam === 'true',\n classifications\n };\n}\n\nfunction parseNftDescription(description?: string | string[]): string {\n if (description === undefined) {\n return '';\n }\n\n // TODO: Remove after backend adds JSON stringification.\n if (!Array.isArray(description) && typeof description === 'object') {\n return JSON.stringify(description);\n }\n\n return typeof description === 'string' ? description : description.join(' ');\n}\n\nfunction parseNftTokenUri(uri: TokenUri | undefined): TokenUri | undefined {\n if (uri && uri.raw.length === 0 && uri.gateway.length == 0) {\n return undefined;\n }\n return uri;\n}\n\nfunction parseNftTokenUriArray(arr: TokenUri[] | undefined): TokenUri[] {\n if (arr === undefined) {\n return [];\n }\n return arr.filter(uri => parseNftTokenUri(uri) !== undefined);\n}\n\nexport function parseOpenSeaMetadata(\n openSea: RawOpenSeaCollectionMetadata | undefined\n): OpenSeaCollectionMetadata | undefined {\n if (openSea === undefined) {\n return undefined;\n }\n return {\n floorPrice: openSea.floorPrice,\n collectionName: openSea.collectionName,\n safelistRequestStatus:\n openSea.safelistRequestStatus !== undefined\n ? stringToEnum(\n openSea.safelistRequestStatus,\n OpenSeaSafelistRequestStatus\n )\n : undefined,\n imageUrl: openSea.imageUrl,\n description: openSea.description,\n externalUrl: openSea.externalUrl,\n twitterUsername: openSea.twitterUsername,\n discordUrl: openSea.discordUrl,\n lastIngestedAt: openSea.lastIngestedAt\n };\n}\n\nexport const IS_BROWSER = typeof window !== 'undefined' && window !== null;\n","import type {\n Block,\n BlockTag,\n BlockWithTransactions,\n FeeData,\n Filter,\n FilterByBlockHash,\n Log,\n TransactionReceipt,\n TransactionRequest,\n TransactionResponse\n} from '@ethersproject/abstract-provider';\nimport type { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport type { Network as EthersNetworkAlias } from '@ethersproject/networks/lib/types';\nimport type { Deferrable } from '@ethersproject/properties';\n\nimport {\n AssetTransfersParams,\n AssetTransfersResponse,\n AssetTransfersWithMetadataParams,\n AssetTransfersWithMetadataResponse,\n DeployResult,\n TokenBalanceType,\n TokenBalancesOptionsDefaultTokens,\n TokenBalancesOptionsErc20,\n TokenBalancesResponse,\n TokenBalancesResponseErc20,\n TokenMetadataResponse,\n TransactionReceiptsParams,\n TransactionReceiptsResponse\n} from '../types/types';\nimport { ETH_NULL_VALUE } from '../util/const';\nimport { formatBlock } from '../util/util';\nimport { AlchemyConfig } from './alchemy-config';\nimport { toHex } from './util';\n\n/**\n * The core namespace contains all commonly-used [Ethers.js\n * Provider](https://docs.ethers.io/v5/api/providers/api-providers/#AlchemyProvider)\n * methods. If you are already using Ethers.js, you should be simply able to\n * replace the Ethers.js Provider object with `alchemy.core` when accessing\n * provider methods and it should just work.\n *\n * Do not call this constructor directly. Instead, instantiate an Alchemy object\n * with `const alchemy = new Alchemy(config)` and then access the core namespace\n * via `alchemy.core`.\n */\nexport class CoreNamespace {\n /** @internal */\n constructor(private readonly config: AlchemyConfig) {}\n\n /**\n * Returns the balance of a given address as of the provided block.\n *\n * @param addressOrName The address or name of the account to get the balance for.\n * @param blockTag The optional block number or hash to get the balance for.\n * Defaults to 'latest' if unspecified.\n * @public\n */\n async getBalance(\n addressOrName: string | Promise,\n blockTag?: BlockTag | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.getBalance(addressOrName, blockTag);\n }\n\n /**\n * Returns the contract code of the provided address at the block. If there is\n * no contract deployed, the result is `0x`.\n *\n * @param addressOrName The address or name of the account to get the code for.\n * @param blockTag The optional block number or hash to get the code for.\n * Defaults to 'latest' if unspecified.\n * @public\n */\n async getCode(\n addressOrName: string | Promise,\n blockTag?: BlockTag | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.getCode(addressOrName, blockTag);\n }\n\n /**\n * Return the value of the provided position at the provided address, at the\n * provided block in `Bytes32` format.\n *\n * @param addressOrName The address or name of the account to get the code for.\n * @param position The position of the storage slot to get.\n * @param blockTag The optional block number or hash to get the code for.\n * Defaults to 'latest' if unspecified.\n * @public\n */\n async getStorageAt(\n addressOrName: string | Promise,\n position: BigNumberish | Promise,\n blockTag?: BlockTag | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.getStorageAt(addressOrName, position, blockTag);\n }\n\n /**\n * Returns the number of transactions ever sent from the provided address, as\n * of the provided block tag. This value is used as the nonce for the next\n * transaction from the address sent to the network.\n *\n * @param addressOrName The address or name of the account to get the nonce for.\n * @param blockTag The optional block number or hash to get the nonce for.\n * @public\n */\n async getTransactionCount(\n addressOrName: string | Promise,\n blockTag?: BlockTag | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.getTransactionCount(addressOrName, blockTag);\n }\n\n /**\n * Returns the block from the network based on the provided block number or\n * hash. Transactions on the block are represented as an array of transaction\n * hashes. To get the full transaction details on the block, use\n * {@link getBlockWithTransactions} instead.\n *\n * @param blockHashOrBlockTag The block number or hash to get the block for.\n * @public\n */\n async getBlock(\n blockHashOrBlockTag: BlockTag | string | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.getBlock(blockHashOrBlockTag);\n }\n\n /**\n * Returns the block from the network based on the provided block number or\n * hash. Transactions on the block are represented as an array of\n * {@link TransactionResponse} objects.\n *\n * @param blockHashOrBlockTag The block number or hash to get the block for.\n * @public\n */\n async getBlockWithTransactions(\n blockHashOrBlockTag: BlockTag | string | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.getBlockWithTransactions(blockHashOrBlockTag);\n }\n\n /**\n * Returns the {@link EthersNetworkAlias} Alchemy is connected to.\n *\n * @public\n */\n async getNetwork(): Promise {\n const provider = await this.config.getProvider();\n return provider.getNetwork();\n }\n\n /**\n * Returns the block number of the most recently mined block.\n *\n * @public\n */\n async getBlockNumber(): Promise {\n const provider = await this.config.getProvider();\n return provider.getBlockNumber();\n }\n\n /**\n * Returns the best guess of the current gas price to use in a transaction.\n *\n * @public\n */\n async getGasPrice(): Promise {\n const provider = await this.config.getProvider();\n return provider.getGasPrice();\n }\n\n /**\n * Returns the recommended fee data to use in a transaction.\n *\n * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas\n * should be used.\n *\n * For legacy transactions and networks which do not support EIP-1559, the\n * gasPrice should be used.\n *\n * @public\n */\n async getFeeData(): Promise {\n const provider = await this.config.getProvider();\n return provider.getFeeData();\n }\n\n /**\n * Returns a Promise which will stall until the network has heen established,\n * ignoring errors due to the target node not being active yet.\n *\n * This can be used for testing or attaching scripts to wait until the node is\n * up and running smoothly.\n *\n * @public\n */\n async ready(): Promise {\n const provider = await this.config.getProvider();\n return provider.ready;\n }\n\n /**\n * Returns the result of executing the transaction, using call. A call does\n * not require any ether, but cannot change any state. This is useful for\n * calling getters on Contracts.\n *\n * @param transaction The transaction to execute.\n * @param blockTag The optional block number or hash to get the call for.\n * @public\n */\n async call(\n transaction: Deferrable,\n blockTag?: BlockTag | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.call(transaction, blockTag);\n }\n\n /**\n * Returns an estimate of the amount of gas that would be required to submit\n * transaction to the network.\n *\n * An estimate may not be accurate since there could be another transaction on\n * the network that was not accounted for, but after being mined affects the\n * relevant state.\n *\n * This is an alias for {@link TransactNamespace.estimateGas}.\n *\n * @param transaction The transaction to estimate gas for.\n * @public\n */\n async estimateGas(\n transaction: Deferrable\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.estimateGas(transaction);\n }\n\n /**\n * Returns the transaction with hash or null if the transaction is unknown.\n *\n * If a transaction has not been mined, this method will search the\n * transaction pool. Various backends may have more restrictive transaction\n * pool access (e.g. if the gas price is too low or the transaction was only\n * recently sent and not yet indexed) in which case this method may also return null.\n *\n * NOTE: This is an alias for {@link TransactNamespace.getTransaction}.\n *\n * @param transactionHash The hash of the transaction to get.\n * @public\n */\n async getTransaction(\n transactionHash: string | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.getTransaction(transactionHash);\n }\n\n /**\n * Returns the transaction receipt for hash or null if the transaction has not\n * been mined.\n *\n * To stall until the transaction has been mined, consider the\n * waitForTransaction method below.\n *\n * @param transactionHash The hash of the transaction to get.\n * @public\n */\n async getTransactionReceipt(\n transactionHash: string | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.getTransactionReceipt(transactionHash);\n }\n\n /**\n * Submits transaction to the network to be mined. The transaction must be\n * signed, and be valid (i.e. the nonce is correct and the account has\n * sufficient balance to pay for the transaction).\n *\n * NOTE: This is an alias for {@link TransactNamespace.getTransaction}.\n *\n * @param signedTransaction The signed transaction to send.\n * @public\n */\n async sendTransaction(\n signedTransaction: string | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.sendTransaction(signedTransaction);\n }\n\n /**\n * Returns a promise which will not resolve until specified transaction hash is mined.\n *\n * If {@link confirmations} is 0, this method is non-blocking and if the\n * transaction has not been mined returns null. Otherwise, this method will\n * block until the transaction has confirmed blocks mined on top of the block\n * in which it was mined.\n *\n * NOTE: This is an alias for {@link TransactNamespace.getTransaction}.\n *\n * @param transactionHash The hash of the transaction to wait for.\n * @param confirmations The number of blocks to wait for.\n * @param timeout The maximum time to wait for the transaction to confirm.\n * @public\n */\n async waitForTransaction(\n transactionHash: string,\n confirmations?: number,\n timeout?: number\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.waitForTransaction(transactionHash, confirmations, timeout);\n }\n\n /**\n * Returns an array of logs that match the provided filter.\n *\n * @param filter The filter object to use.\n * @public\n */\n async getLogs(\n filter: Filter | FilterByBlockHash | Promise\n ): Promise> {\n const provider = await this.config.getProvider();\n return provider.getLogs(filter);\n }\n\n /**\n * Allows sending a raw message to the Alchemy backend.\n *\n * @param method The method to call.\n * @param params The parameters to pass to the method.\n * @public\n */\n async send(method: string, params: Array): Promise {\n const provider = await this.config.getProvider();\n return provider.send(method, params);\n }\n\n /**\n * Finds the address that deployed the provided contract and block number it\n * was deployed in.\n *\n * NOTE: This method performs a binary search across all blocks since genesis\n * and can take a long time to complete. This method is a convenience method\n * that will eventually be replaced by a single call to an Alchemy endpoint\n * with this information cached.\n *\n * @param contractAddress - The contract address to find the deployer for.\n * @beta\n */\n async findContractDeployer(contractAddress: string): Promise {\n const provider = await this.config.getProvider();\n const currentBlockNum = await provider.getBlockNumber();\n if (\n (await provider.getCode(contractAddress, currentBlockNum)) ===\n ETH_NULL_VALUE\n ) {\n throw new Error(`Contract '${contractAddress}' does not exist`);\n }\n\n // Binary search for the block number that the contract was deployed in.\n const firstBlock = await binarySearchFirstBlock(\n 0,\n currentBlockNum + 1,\n contractAddress,\n this.config\n );\n\n // Find the first transaction in the block that matches the provided address.\n const txReceipts = await this.getTransactionReceipts({\n blockNumber: toHex(firstBlock)\n });\n const matchingReceipt = txReceipts.receipts?.find(\n receipt => receipt.contractAddress === contractAddress.toLowerCase()\n );\n return {\n deployerAddress: matchingReceipt?.from,\n blockNumber: firstBlock\n };\n }\n\n /**\n * Returns the ERC-20 token balances for a specific owner address.\n *\n * @param addressOrName The owner address to get the token balances for.\n * @public\n */\n async getTokenBalances(\n addressOrName: string\n ): Promise;\n\n /**\n * Returns the token balances for a specific owner address given a list of contracts.\n *\n * @param addressOrName The owner address to get the token balances for.\n * @param contractAddresses A list of contract addresses to check. If omitted,\n * all ERC-20 tokens will be checked.\n * @public\n */\n async getTokenBalances(\n addressOrName: string,\n contractAddresses?: string[]\n ): Promise;\n\n /**\n * Returns the ERC-20 token balances for a specific owner.\n *\n * This overload covers the erc-20 token type which includes a page key in the response.\n *\n * @param addressOrName The owner address to get the token balances for.\n * @param options Token type options set to ERC-20 with optional page key.\n * @public\n */\n async getTokenBalances(\n addressOrName: string,\n options: TokenBalancesOptionsErc20\n ): Promise;\n\n /**\n * Returns the token balances for a specific owner, fetching from the top 100\n * tokens by 24 hour volume.\n *\n * This overload covers the default token type which includes a page key in\n * the response.\n *\n * @param addressOrName The owner address to get the token balances for.\n * @param options Token type options set to ERC-20 with optional page key.\n * @public\n */\n async getTokenBalances(\n addressOrName: string,\n options: TokenBalancesOptionsDefaultTokens\n ): Promise;\n async getTokenBalances(\n addressOrName: string,\n contractAddressesOrOptions?:\n | string[]\n | TokenBalancesOptionsDefaultTokens\n | TokenBalancesOptionsErc20\n ) {\n const provider = await this.config.getProvider();\n const address = await provider._getAddress(addressOrName);\n if (Array.isArray(contractAddressesOrOptions)) {\n if (contractAddressesOrOptions.length > 1500) {\n throw new Error(\n 'You cannot pass in more than 1500 contract addresses to getTokenBalances()'\n );\n }\n if (contractAddressesOrOptions.length === 0) {\n throw new Error(\n 'getTokenBalances() requires at least one contractAddress when using an array'\n );\n }\n return provider._send(\n 'alchemy_getTokenBalances',\n [address, contractAddressesOrOptions],\n 'getTokenBalances'\n );\n } else {\n const tokenType =\n contractAddressesOrOptions === undefined\n ? TokenBalanceType.ERC20\n : contractAddressesOrOptions.type;\n const params: Array = [address, tokenType];\n if (\n contractAddressesOrOptions?.type === TokenBalanceType.ERC20 &&\n contractAddressesOrOptions.pageKey\n ) {\n params.push({ pageKey: contractAddressesOrOptions.pageKey });\n }\n return provider._send(\n 'alchemy_getTokenBalances',\n params,\n 'getTokenBalances'\n );\n }\n }\n\n /**\n * Returns metadata for a given token contract address.\n *\n * @param address The contract address to get metadata for.\n * @public\n */\n async getTokenMetadata(address: string): Promise {\n const provider = await this.config.getProvider();\n return provider._send(\n 'alchemy_getTokenMetadata',\n [address],\n 'getTokenMetadata'\n );\n }\n\n /**\n * Get transactions for specific addresses. See the web documentation for the\n * full details:\n * https://docs.alchemy.com/alchemy/enhanced-apis/transfers-api#alchemy_getassettransfers\n *\n * This overload requires {@link AssetTransfersWithMetadataParams.withMetadata}\n * to be set to `true`, which results in additional metadata returned in the\n * response object.\n *\n * @param params An object containing fields for the asset transfer query\n * @public\n */\n async getAssetTransfers(\n params: AssetTransfersWithMetadataParams\n ): Promise;\n\n /**\n * Get transactions for specific addresses. See the web documentation for the\n * full details:\n * https://docs.alchemy.com/alchemy/enhanced-apis/transfers-api#alchemy_getassettransfers\n *\n * @param params An object containing fields for the asset transfer query.\n * @public\n */\n async getAssetTransfers(\n params: AssetTransfersParams\n ): Promise;\n async getAssetTransfers(\n params: AssetTransfersWithMetadataParams | AssetTransfersParams\n ): Promise {\n const provider = await this.config.getProvider();\n if (params.fromAddress) {\n params.fromAddress = await provider._getAddress(params.fromAddress);\n }\n if (params.toAddress) {\n params.toAddress = await provider._getAddress(params.toAddress);\n }\n return provider._send(\n 'alchemy_getAssetTransfers',\n [\n {\n ...params,\n fromBlock:\n params.fromBlock != null\n ? formatBlock(params.fromBlock)\n : undefined,\n toBlock:\n params.toBlock != null ? formatBlock(params.toBlock) : undefined,\n maxCount: params.maxCount != null ? toHex(params.maxCount) : undefined\n }\n ],\n 'getAssetTransfers'\n );\n }\n\n /**\n * Gets all transaction receipts for a given block by number or block hash.\n *\n * @param params An object containing fields for the transaction receipt query.\n * @public\n */\n async getTransactionReceipts(\n params: TransactionReceiptsParams\n ): Promise {\n const provider = await this.config.getProvider();\n return provider._send(\n 'alchemy_getTransactionReceipts',\n [params],\n 'getTransactionReceipts'\n );\n }\n\n /**\n * Returns the underlying owner address for the provided ENS address, or `null`\n * if the ENS name does not have an underlying address.\n *\n * @param name The ENS address name to resolve.\n */\n async resolveName(name: string): Promise {\n const provider = await this.config.getProvider();\n return provider.resolveName(name);\n }\n\n /**\n * Performs a reverse lookup of the address in ENS using the Reverse Registrar. If the name does not exist, or the forward lookup does not match, null is returned.\n *\n * An ENS name requires additional configuration to setup a reverse record, so not all ENS addresses will map back to the original ENS domain.\n *\n * @param address The address to look up the ENS domain name for.\n */\n async lookupAddress(address: string): Promise {\n const provider = await this.config.getProvider();\n return provider.lookupAddress(address);\n }\n}\n\n/**\n * Perform a binary search between an integer range of block numbers to find the\n * block number where the contract was deployed.\n *\n * @internal\n */\nasync function binarySearchFirstBlock(\n start: number,\n end: number,\n address: string,\n config: AlchemyConfig\n): Promise {\n if (start >= end) {\n return end;\n }\n\n const mid = Math.floor((start + end) / 2);\n const provider = await config.getProvider();\n const code = await provider.getCode(address, mid);\n if (code === ETH_NULL_VALUE) {\n return binarySearchFirstBlock(mid + 1, end, address, config);\n }\n return binarySearchFirstBlock(start, mid, address, config);\n}\n","/**\n * The SDK has 4 log levels and a 5th option for disabling all logging. By\n * default, the log level is set to INFO.\n *\n * The order is a follows: DEBUG < INFO < WARN < ERROR\n *\n * All log types above the current log level will be outputted.\n */\nexport enum LogLevel {\n DEBUG,\n INFO,\n WARN,\n ERROR,\n SILENT\n}\n\n/**\n * The level of verbosity for the logger.\n *\n * @public\n */\nexport type LogLevelString = 'debug' | 'info' | 'warn' | 'error' | 'silent';\n\nconst logLevelStringToEnum: { [key in LogLevelString]: LogLevel } = {\n debug: LogLevel.DEBUG,\n info: LogLevel.INFO,\n warn: LogLevel.WARN,\n error: LogLevel.ERROR,\n silent: LogLevel.SILENT\n};\n\n// HACKY: Use the console method as a string rather than the function itself\n// in order to allow for mocking in tests.\nconst logLevelToConsoleFn = {\n [LogLevel.DEBUG]: 'log',\n [LogLevel.INFO]: 'info',\n [LogLevel.WARN]: 'warn',\n [LogLevel.ERROR]: 'error'\n};\n\nconst DEFAULT_LOG_LEVEL = LogLevel.INFO;\n\n/**\n * Configures the verbosity of logging. The default log level is `info`.\n *\n * @param logLevel - The verbosity of logging. Can be any of the following values:\n *\n * - `debug`: The most verbose logging level.\n * - `info`: The default logging level.\n * - `warn`: A logging level for non-critical issues.\n * - `error`: A logging level for critical issues.\n * - `silent`: Turn off all logging.\n *\n * @public\n */\nexport function setLogLevel(logLevel: LogLevelString): void {\n loggerClient.logLevel = logLevelStringToEnum[logLevel];\n}\n\nexport function logDebug(message: string, ...args: unknown[]): void {\n loggerClient.debug(message, args);\n}\n\nexport function logInfo(message: string, ...args: unknown[]): void {\n loggerClient.info(message, args);\n}\n\nexport function logWarn(message: string, ...args: unknown[]): void {\n loggerClient.warn(message, args);\n}\n\nexport function logError(message: string, ...args: unknown[]): void {\n loggerClient.error(message, args);\n}\n\nexport class Logger {\n /** The log level of the given Logger instance. */\n private _logLevel = DEFAULT_LOG_LEVEL;\n\n constructor() {}\n\n get logLevel(): LogLevel {\n return this._logLevel;\n }\n\n set logLevel(val: LogLevel) {\n if (!(val in LogLevel)) {\n throw new TypeError(`Invalid value \"${val}\" assigned to \\`logLevel\\``);\n }\n this._logLevel = val;\n }\n\n debug(...args: unknown[]): void {\n this._log(LogLevel.DEBUG, ...args);\n }\n\n info(...args: unknown[]): void {\n this._log(LogLevel.INFO, ...args);\n }\n\n warn(...args: unknown[]): void {\n this._log(LogLevel.WARN, ...args);\n }\n\n error(...args: unknown[]): void {\n this._log(LogLevel.ERROR, ...args);\n }\n\n /**\n * Forwards log messages to their corresponding console counterparts if the\n * log level allows it.\n */\n private _log(logLevel: LogLevel, ...args: unknown[]): void {\n if (logLevel < this._logLevel) {\n return;\n }\n const now = new Date().toISOString();\n const method =\n logLevelToConsoleFn[logLevel as keyof typeof logLevelToConsoleFn];\n if (method) {\n console[method as 'log' | 'info' | 'warn' | 'error'](\n `[${now}] Alchemy:`,\n ...args.map(stringify)\n );\n } else {\n throw new Error(\n `Logger received an invalid logLevel (value: ${logLevel})`\n );\n }\n }\n}\n\nfunction stringify(obj: unknown): string | unknown {\n if (typeof obj === 'string') {\n return obj;\n } else {\n try {\n return JSON.stringify(obj);\n } catch (e) {\n // Failed to convert to JSON, log the object directly.\n return obj;\n }\n }\n}\n\n// Instantiate default logger for the SDK.\nconst loggerClient: Logger = new Logger();\n","// This file is autogenerated by injectVersion.js. Any changes will be\n// overwritten on commit!\nexport const VERSION = '2.2.5';\n","/**\n * Given a REST endpoint, method, and params, sends the request with axios and\n * returns the response.\n */\nimport axios, { AxiosRequestConfig, AxiosResponse } from 'axios';\n\nimport { VERSION } from '../version';\nimport { IS_BROWSER } from './util';\n\n/**\n * Helper function to send http requests using Axis.\n *\n * @private\n */\nexport function sendAxiosRequest(\n baseUrl: string,\n restApiName: string,\n methodName: string,\n params: Req,\n overrides?: AxiosRequestConfig\n): Promise> {\n const requestUrl = baseUrl + '/' + restApiName;\n const config: AxiosRequestConfig = {\n ...overrides,\n headers: {\n ...overrides?.headers,\n ...(!IS_BROWSER && { 'Accept-Encoding': 'gzip' }),\n 'Alchemy-Ethers-Sdk-Version': VERSION,\n 'Alchemy-Ethers-Sdk-Method': methodName\n },\n method: overrides?.method ?? 'GET',\n url: requestUrl,\n params\n };\n return axios(config);\n}\n","import { logDebug } from '../util/logger';\n\nexport const DEFAULT_BACKOFF_INITIAL_DELAY_MS = 1000;\nexport const DEFAULT_BACKOFF_MULTIPLIER = 1.5;\nexport const DEFAULT_BACKOFF_MAX_DELAY_MS = 30 * 1000;\nexport const DEFAULT_BACKOFF_MAX_ATTEMPTS = 5;\n\n/**\n * Helper class for implementing exponential backoff and max retry attempts.\n *\n * @private\n * @internal\n */\nexport class ExponentialBackoff {\n private readonly initialDelayMs = DEFAULT_BACKOFF_INITIAL_DELAY_MS;\n private readonly backoffMultiplier = DEFAULT_BACKOFF_MULTIPLIER;\n private readonly maxDelayMs = DEFAULT_BACKOFF_MAX_DELAY_MS;\n\n private numAttempts = 0;\n private currentDelayMs = 0;\n private isInBackoff = false;\n\n constructor(private readonly maxAttempts = DEFAULT_BACKOFF_MAX_ATTEMPTS) {}\n\n /**\n * Returns a promise that resolves after the the backoff delay. The delay is\n * increased for each attempt. The promise is rejected if the maximum number\n * of attempts is exceeded.\n */\n // TODO: beautify this into an async iterator.\n backoff(): Promise {\n if (this.numAttempts >= this.maxAttempts) {\n return Promise.reject(\n new Error(`Exceeded maximum number of attempts: ${this.maxAttempts}`)\n );\n }\n if (this.isInBackoff) {\n return Promise.reject(\n new Error('A backoff operation is already in progress')\n );\n }\n\n const backoffDelayWithJitterMs = this.withJitterMs(this.currentDelayMs);\n if (backoffDelayWithJitterMs > 0) {\n logDebug(\n 'ExponentialBackoff.backoff',\n `Backing off for ${backoffDelayWithJitterMs}ms`\n );\n }\n\n // Calculate the next delay.\n this.currentDelayMs *= this.backoffMultiplier;\n this.currentDelayMs = Math.max(this.currentDelayMs, this.initialDelayMs);\n this.currentDelayMs = Math.min(this.currentDelayMs, this.maxDelayMs);\n this.numAttempts += 1;\n\n return new Promise(resolve => {\n this.isInBackoff = true;\n setTimeout(() => {\n this.isInBackoff = false;\n resolve();\n }, backoffDelayWithJitterMs);\n });\n }\n\n /**\n * Applies +/- 50% jitter to the backoff delay, up to the max delay cap.\n *\n * @private\n * @param delayMs\n */\n private withJitterMs(delayMs: number): number {\n return Math.min(delayMs + (Math.random() - 0.5) * delayMs, this.maxDelayMs);\n }\n}\n","import axios, { AxiosError, AxiosRequestConfig } from 'axios';\n\nimport { AlchemyConfig } from '../api/alchemy-config';\nimport { AlchemyApiType } from '../util/const';\nimport { logDebug, logInfo } from '../util/logger';\nimport { sendAxiosRequest } from '../util/sendRest';\nimport { ExponentialBackoff } from './backoff';\n\n/**\n * A wrapper function to make http requests and retry if the request fails.\n *\n * @internal\n */\n// TODO: Wrap Axios error in AlchemyError.\nexport async function requestHttpWithBackoff(\n config: AlchemyConfig,\n apiType: AlchemyApiType,\n restApiName: string,\n methodName: string,\n params: Req,\n overrides?: AxiosRequestConfig\n): Promise {\n let lastError: Error | undefined = undefined;\n const backoff = new ExponentialBackoff(config.maxRetries);\n for (let attempt = 0; attempt < config.maxRetries + 1; attempt++) {\n try {\n if (lastError !== undefined) {\n logInfo('requestHttp', `Retrying after error: ${lastError.message}`);\n }\n\n try {\n await backoff.backoff();\n } catch (err) {\n // Backoff errors when the maximum number of attempts is reached. Break\n // out of the loop to preserve the last error.\n break;\n }\n\n const response = await sendAxiosRequest(\n config._getRequestUrl(apiType),\n restApiName,\n methodName,\n params,\n overrides\n );\n\n if (response.status === 200) {\n logDebug(restApiName, `Successful request: ${restApiName}`);\n return response.data;\n } else {\n logInfo(\n restApiName,\n `Request failed: ${restApiName}, ${response.status}, ${response.data}`\n );\n lastError = new Error(response.status + ': ' + response.data);\n }\n } catch (err) {\n if (!axios.isAxiosError(err) || err.response === undefined) {\n throw err;\n }\n // TODO: Standardize all errors into AlchemyError\n lastError = new Error(err.response.status + ': ' + err.response.data);\n if (!isRetryableHttpError(err, apiType)) {\n break;\n }\n }\n }\n return Promise.reject(lastError);\n}\n\nfunction isRetryableHttpError(\n err: AxiosError,\n apiType: AlchemyApiType\n): boolean {\n // TODO: remove 500s after webhooks are more stable.\n const retryableCodes =\n apiType === AlchemyApiType.WEBHOOK ? [429, 500] : [429];\n return (\n err.response !== undefined && retryableCodes.includes(err.response.status)\n );\n}\n\n/**\n * Fetches all pages in a paginated endpoint, given a `pageKey` field that\n * represents the property name containing the next page token.\n *\n * @internal\n */\nexport async function* paginateEndpoint<\n ReqPageKey extends string,\n ResPageKey extends string,\n Req extends Partial & Record>,\n Res extends Partial & Record>\n>(\n config: AlchemyConfig,\n apiType: AlchemyApiType,\n restApiName: string,\n methodName: string,\n reqPageKey: ReqPageKey,\n resPageKey: ResPageKey,\n params: Req\n): AsyncIterable {\n let hasNext = true;\n const requestParams = { ...params };\n while (hasNext) {\n const response = await requestHttpWithBackoff(\n config,\n apiType,\n restApiName,\n methodName,\n requestParams\n );\n yield response;\n if (response[resPageKey] !== undefined) {\n requestParams[reqPageKey] = response[resPageKey] as any;\n } else {\n hasNext = false;\n }\n }\n}\n","import { BigNumber, BigNumberish } from '@ethersproject/bignumber';\n\nimport { AlchemyConfig } from '../api/alchemy-config';\nimport { BaseNft, Nft, NftContract } from '../api/nft';\nimport {\n GetBaseNftsForContractOptions,\n GetBaseNftsForOwnerOptions,\n GetContractsForOwnerOptions,\n GetContractsForOwnerResponse,\n GetFloorPriceResponse,\n GetNftSalesOptions,\n GetNftSalesOptionsByContractAddress,\n GetNftSalesResponse,\n GetNftsForContractOptions,\n GetNftsForOwnerOptions,\n GetOwnersForContractOptions,\n GetOwnersForContractResponse,\n GetOwnersForContractWithTokenBalancesOptions,\n GetOwnersForContractWithTokenBalancesResponse,\n GetOwnersForNftResponse,\n NftAttributeRarity,\n NftAttributesResponse,\n NftContractBaseNftsResponse,\n NftContractNftsResponse,\n NftFilters,\n NftMetadataBatchOptions,\n NftMetadataBatchToken,\n NftOrdering,\n NftSaleMarketplace,\n NftSaleTakerType,\n NftTokenType,\n OwnedBaseNft,\n OwnedBaseNftsResponse,\n OwnedNft,\n OwnedNftsResponse,\n RefreshContractResult,\n RefreshState,\n SortingOrder\n} from '../types/types';\nimport { AlchemyApiType } from '../util/const';\nimport {\n getBaseNftFromRaw,\n getContractsForOwnerFromRaw,\n getNftContractFromRaw,\n getNftFromRaw,\n getNftRarityFromRaw,\n getNftSalesFromRaw\n} from '../util/util';\nimport { paginateEndpoint, requestHttpWithBackoff } from './dispatch';\nimport {\n RawBaseNft,\n RawContractBaseNft,\n RawGetBaseNftsForContractResponse,\n RawGetBaseNftsResponse,\n RawGetContractsForOwnerResponse,\n RawGetNftSalesResponse,\n RawGetNftsForContractResponse,\n RawGetNftsResponse,\n RawGetOwnersForContractResponse,\n RawNft,\n RawNftAttributeRarity,\n RawNftContract,\n RawOwnedBaseNft,\n RawOwnedNft,\n RawReingestContractResponse\n} from './raw-interfaces';\n\nexport async function getNftMetadata(\n config: AlchemyConfig,\n contractAddress: string,\n tokenId: BigNumberish,\n tokenType?: NftTokenType,\n tokenUriTimeoutInMs?: number,\n srcMethod = 'getNftMetadata'\n): Promise {\n const response = await requestHttpWithBackoff(\n config,\n AlchemyApiType.NFT,\n 'getNFTMetadata',\n srcMethod,\n {\n contractAddress,\n tokenId: BigNumber.from(tokenId!).toString(),\n tokenType: tokenType !== NftTokenType.UNKNOWN ? tokenType : undefined,\n tokenUriTimeoutInMs\n }\n );\n return getNftFromRaw(response);\n}\n\nexport async function getNftMetadataBatch(\n config: AlchemyConfig,\n tokens: Array,\n options?: NftMetadataBatchOptions\n): Promise {\n const data = {\n tokens,\n tokenUriTimeoutInMs: options?.tokenUriTimeoutInMs,\n refreshCache: options?.refreshCache\n };\n const response = await requestHttpWithBackoff<{}, RawNft[]>(\n config,\n AlchemyApiType.NFT,\n 'getNFTMetadataBatch',\n 'getNftMetadataBatch',\n {},\n {\n method: 'POST',\n data\n }\n );\n return response.map(getNftFromRaw);\n}\n\nexport async function getContractMetadata(\n config: AlchemyConfig,\n contractAddress: string,\n srcMethod = 'getContractMetadata'\n): Promise {\n const response = await requestHttpWithBackoff<\n GetContractMetadataParams,\n RawNftContract\n >(config, AlchemyApiType.NFT, 'getContractMetadata', srcMethod, {\n contractAddress\n });\n\n return getNftContractFromRaw(response);\n}\n\nexport async function* getNftsForOwnerIterator(\n config: AlchemyConfig,\n owner: string,\n options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions,\n srcMethod = 'getNftsForOwnerIterator'\n): AsyncIterable {\n const withMetadata = omitMetadataToWithMetadata(options?.omitMetadata);\n for await (const response of paginateEndpoint(\n config,\n AlchemyApiType.NFT,\n 'getNFTs',\n srcMethod,\n 'pageKey',\n 'pageKey',\n {\n contractAddresses: options?.contractAddresses,\n pageKey: options?.pageKey,\n filters: options?.excludeFilters,\n owner,\n withMetadata\n }\n )) {\n for (const ownedNft of response.ownedNfts as\n | RawOwnedNft[]\n | RawOwnedBaseNft[]) {\n yield {\n ...nftFromGetNftResponse(ownedNft),\n balance: parseInt(ownedNft.balance)\n };\n }\n }\n}\n\nexport async function getNftsForOwner(\n config: AlchemyConfig,\n owner: string,\n options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions,\n srcMethod = 'getNftsForOwner'\n): Promise {\n const withMetadata = omitMetadataToWithMetadata(options?.omitMetadata);\n const response = await requestHttpWithBackoff<\n GetNftsAlchemyParams,\n RawGetBaseNftsResponse | RawGetNftsResponse\n >(config, AlchemyApiType.NFT, 'getNFTs', srcMethod, {\n contractAddresses: options?.contractAddresses,\n pageKey: options?.pageKey,\n filters: options?.excludeFilters,\n excludeFilters: options?.excludeFilters,\n includeFilters: options?.includeFilters,\n owner,\n pageSize: options?.pageSize,\n withMetadata,\n tokenUriTimeoutInMs: options?.tokenUriTimeoutInMs,\n orderBy: options?.orderBy\n });\n return {\n ownedNfts: response.ownedNfts.map(res => ({\n ...nftFromGetNftResponse(res),\n balance: parseInt(res.balance)\n })),\n pageKey: response.pageKey,\n totalCount: response.totalCount\n };\n}\n\nexport async function getNftsForContract(\n config: AlchemyConfig,\n contractAddress: string,\n options?: GetBaseNftsForContractOptions | GetNftsForContractOptions,\n srcMethod = 'getNftsForContract'\n): Promise {\n const withMetadata = omitMetadataToWithMetadata(options?.omitMetadata);\n const response = await requestHttpWithBackoff<\n GetNftsForContractAlchemyParams,\n RawGetBaseNftsForContractResponse | RawGetNftsForContractResponse\n >(config, AlchemyApiType.NFT, 'getNFTsForCollection', srcMethod, {\n contractAddress,\n startToken: options?.pageKey,\n withMetadata,\n limit: options?.pageSize ?? undefined,\n tokenUriTimeoutInMs: 50\n });\n\n return {\n nfts: response.nfts.map(res =>\n nftFromGetNftContractResponse(res, contractAddress)\n ),\n pageKey: response.nextToken\n };\n}\n\nexport async function* getNftsForContractIterator(\n config: AlchemyConfig,\n contractAddress: string,\n options?: GetBaseNftsForContractOptions | GetNftsForContractOptions,\n srcMethod = 'getNftsForContractIterator'\n): AsyncIterable {\n const withMetadata = omitMetadataToWithMetadata(options?.omitMetadata);\n for await (const response of paginateEndpoint(\n config,\n AlchemyApiType.NFT,\n 'getNFTsForCollection',\n srcMethod,\n 'startToken',\n 'nextToken',\n {\n contractAddress,\n startToken: options?.pageKey,\n withMetadata\n }\n )) {\n for (const nft of response.nfts as RawContractBaseNft[] | RawNft[]) {\n yield nftFromGetNftContractResponse(nft, contractAddress);\n }\n }\n}\n\nexport async function getOwnersForContract(\n config: AlchemyConfig,\n contractAddress: string,\n options?:\n | GetOwnersForContractWithTokenBalancesOptions\n | GetOwnersForContractOptions,\n srcMethod = 'getOwnersForContract'\n): Promise<\n GetOwnersForContractResponse | GetOwnersForContractWithTokenBalancesResponse\n> {\n // Cast to `any` to avoid more type wrangling.\n const response: any = await requestHttpWithBackoff<\n GetOwnersForNftContractAlchemyParams,\n RawGetOwnersForContractResponse\n >(config, AlchemyApiType.NFT, 'getOwnersForCollection', srcMethod, {\n ...options,\n contractAddress\n });\n\n return {\n owners: response.ownerAddresses,\n\n // Only include the pageKey in the final response if it's defined\n ...(response.pageKey !== undefined && { pageKey: response.pageKey })\n };\n}\n\nexport async function getContractsForOwner(\n config: AlchemyConfig,\n owner: string,\n options?: GetContractsForOwnerOptions,\n srcMethod = 'getContractsForOwner'\n): Promise {\n const response = await requestHttpWithBackoff<\n GetContractsForOwnerParams,\n RawGetContractsForOwnerResponse\n >(config, AlchemyApiType.NFT, 'getContractsForOwner', srcMethod, {\n owner,\n excludeFilters: options?.excludeFilters,\n includeFilters: options?.includeFilters,\n pageKey: options?.pageKey,\n orderBy: options?.orderBy\n });\n\n return getContractsForOwnerFromRaw(response);\n}\n\nexport async function getOwnersForNft(\n config: AlchemyConfig,\n contractAddress: string,\n tokenId: BigNumberish,\n srcMethod = 'getOwnersForNft'\n): Promise {\n return requestHttpWithBackoff(\n config,\n AlchemyApiType.NFT,\n 'getOwnersForToken',\n srcMethod,\n {\n contractAddress,\n tokenId: BigNumber.from(tokenId!).toString()\n }\n );\n}\n\nexport async function checkNftOwnership(\n config: AlchemyConfig,\n owner: string,\n contractAddresses: string[],\n srcMethod = 'checkNftOwnership'\n): Promise {\n if (contractAddresses.length === 0) {\n throw new Error('Must provide at least one contract address');\n }\n const response = await getNftsForOwner(\n config,\n owner,\n {\n contractAddresses,\n omitMetadata: true\n },\n srcMethod\n );\n return response.ownedNfts.length > 0;\n}\n\nexport async function verifyNftOwnership(\n config: AlchemyConfig,\n owner: string,\n contractAddresses: string | string[],\n srcMethod = 'verifyNftOwnership'\n): Promise {\n if (typeof contractAddresses === 'string') {\n const response = await getNftsForOwner(\n config,\n owner,\n {\n contractAddresses: [contractAddresses],\n omitMetadata: true\n },\n srcMethod\n );\n return response.ownedNfts.length > 0;\n } else {\n if (contractAddresses.length === 0) {\n throw new Error('Must provide at least one contract address');\n }\n const response = await getNftsForOwner(\n config,\n owner,\n {\n contractAddresses,\n omitMetadata: true\n },\n srcMethod\n );\n\n // Create map where all input contract addresses are set to false, then flip\n // owned nfts to true.\n const result = contractAddresses.reduce(\n (acc: { [contractAddress: string]: boolean }, curr) => {\n acc[curr] = false;\n return acc;\n },\n {}\n );\n for (const nft of response.ownedNfts) {\n result[nft.contract.address] = true;\n }\n return result;\n }\n}\n\nexport async function isSpamContract(\n config: AlchemyConfig,\n contractAddress: string,\n srcMethod = 'isSpamContract'\n): Promise {\n return requestHttpWithBackoff(\n config,\n AlchemyApiType.NFT,\n 'isSpamContract',\n srcMethod,\n {\n contractAddress\n }\n );\n}\n\nexport async function getSpamContracts(\n config: AlchemyConfig,\n srcMethod = 'getSpamContracts'\n): Promise {\n return requestHttpWithBackoff(\n config,\n AlchemyApiType.NFT,\n 'getSpamContracts',\n srcMethod,\n undefined\n );\n}\n\nexport async function getFloorPrice(\n config: AlchemyConfig,\n contractAddress: string,\n srcMethod = 'getFloorPrice'\n): Promise {\n return requestHttpWithBackoff(\n config,\n AlchemyApiType.NFT,\n 'getFloorPrice',\n srcMethod,\n {\n contractAddress\n }\n );\n}\n\nexport async function getNftSales(\n config: AlchemyConfig,\n options: GetNftSalesOptions | GetNftSalesOptionsByContractAddress = {},\n srcMethod = 'getNftSales'\n): Promise {\n // Avoid ts compiler complaining about the contractAddress field.\n const params: Partial = {\n ...options\n };\n\n const response = await requestHttpWithBackoff<\n GetNftSalesParams,\n RawGetNftSalesResponse\n >(config, AlchemyApiType.NFT, 'getNFTSales', srcMethod, {\n fromBlock: params?.fromBlock,\n toBlock: params?.toBlock,\n order: params?.order,\n marketplace: params?.marketplace,\n contractAddress: params?.contractAddress,\n tokenId: params?.tokenId\n ? BigNumber.from(params?.tokenId).toString()\n : undefined,\n sellerAddress: params?.sellerAddress,\n buyerAddress: params?.buyerAddress,\n taker: params?.taker,\n limit: params?.limit,\n pageKey: params?.pageKey\n });\n\n return getNftSalesFromRaw(response);\n}\n\nexport async function computeRarity(\n config: AlchemyConfig,\n contractAddress: string,\n tokenId: BigNumberish,\n srcMethod = 'computeRarity'\n): Promise {\n const response = await requestHttpWithBackoff<\n ComputeRarityParams,\n RawNftAttributeRarity[]\n >(config, AlchemyApiType.NFT, 'computeRarity', srcMethod, {\n contractAddress,\n tokenId: BigNumber.from(tokenId).toString()\n });\n\n return getNftRarityFromRaw(response);\n}\n\nexport async function searchContractMetadata(\n config: AlchemyConfig,\n query: string,\n srcMethod = 'searchContractMetadata'\n): Promise {\n const response = await requestHttpWithBackoff<\n SearchContractMetadataParams,\n RawNftContract[]\n >(config, AlchemyApiType.NFT, 'searchContractMetadata', srcMethod, {\n query\n });\n\n return response.map(getNftContractFromRaw);\n}\n\nexport async function summarizeNftAttributes(\n config: AlchemyConfig,\n contractAddress: string,\n srcMethod = 'summarizeNftAttributes'\n): Promise {\n return requestHttpWithBackoff<\n SummarizeNftAttributesParams,\n NftAttributesResponse\n >(config, AlchemyApiType.NFT, 'summarizeNftAttributes', srcMethod, {\n contractAddress\n });\n}\n\nexport async function refreshNftMetadata(\n config: AlchemyConfig,\n contractAddress: string,\n tokenId: BigNumberish,\n srcMethod = 'refreshNftMetadata'\n): Promise {\n const tokenIdString = BigNumber.from(tokenId!).toString();\n const first = await getNftMetadata(\n config,\n contractAddress,\n tokenIdString,\n undefined,\n undefined,\n srcMethod\n );\n const second = await refresh(\n config,\n contractAddress,\n tokenIdString,\n srcMethod\n );\n return first.timeLastUpdated !== second.timeLastUpdated;\n}\n\nexport async function refreshContract(\n config: AlchemyConfig,\n contractAddress: string,\n srcMethod = 'refreshContract'\n): Promise {\n const response = await requestHttpWithBackoff<\n ReingestContractParams,\n RawReingestContractResponse\n >(config, AlchemyApiType.NFT, 'reingestContract', srcMethod, {\n contractAddress\n });\n\n return {\n contractAddress: response.contractAddress,\n refreshState: parseReingestionState(response.reingestionState),\n progress: response.progress\n };\n}\n\nasync function refresh(\n config: AlchemyConfig,\n contractAddress: string,\n tokenId: BigNumberish,\n srcMethod: string\n): Promise {\n const response = await requestHttpWithBackoff(\n config,\n AlchemyApiType.NFT,\n 'getNFTMetadata',\n srcMethod,\n {\n contractAddress,\n tokenId: BigNumber.from(tokenId!).toString(),\n refreshCache: true\n }\n );\n return getNftFromRaw(response);\n}\n\n/**\n * Helper method to convert a NFT response received from Alchemy backend to an\n * SDK NFT type.\n *\n * @internal\n */\nfunction nftFromGetNftResponse(\n ownedNft: RawOwnedBaseNft | RawOwnedNft\n): Nft | BaseNft {\n if (isNftWithMetadata(ownedNft)) {\n return getNftFromRaw(ownedNft);\n } else {\n return getBaseNftFromRaw(ownedNft);\n }\n}\n\n/**\n * Helper method to convert a NFT response received from Alchemy backend to an\n * SDK NFT type.\n *\n * @internal\n */\nfunction nftFromGetNftContractResponse(\n ownedNft: RawContractBaseNft | RawNft,\n contractAddress: string\n): Nft | BaseNft {\n if (isNftWithMetadata(ownedNft)) {\n return getNftFromRaw(ownedNft);\n } else {\n return getBaseNftFromRaw(ownedNft, contractAddress);\n }\n}\n\n/** @internal */\n// TODO: more comprehensive type check\nfunction isNftWithMetadata(\n response: RawBaseNft | RawContractBaseNft | RawNft\n): response is RawNft {\n return (response as RawNft).title !== undefined;\n}\n\n/**\n * Flips the `omitMetadata` SDK parameter type to the `withMetadata` parameter\n * required by the Alchemy API. If `omitMetadata` is undefined, the SDK defaults\n * to including metadata.\n *\n * @internal\n */\nfunction omitMetadataToWithMetadata(\n omitMetadata: boolean | undefined\n): boolean {\n return omitMetadata === undefined ? true : !omitMetadata;\n}\n\nfunction parseReingestionState(reingestionState: string): RefreshState {\n switch (reingestionState) {\n case 'does_not_exist':\n return RefreshState.DOES_NOT_EXIST;\n case 'already_queued':\n return RefreshState.ALREADY_QUEUED;\n case 'in_progress':\n return RefreshState.IN_PROGRESS;\n case 'finished':\n return RefreshState.FINISHED;\n case 'queued':\n return RefreshState.QUEUED;\n case 'queue_failed':\n return RefreshState.QUEUE_FAILED;\n default:\n throw new Error('Unknown reingestion state: ' + reingestionState);\n }\n}\n\n/**\n * Interface for the `getNftsForNftContract` endpoint. The main difference is\n * that the endpoint has a `startToken` parameter, but the SDK standardizes all\n * pagination parameters to `pageKey`.\n *\n * @internal\n */\ninterface GetNftsForContractAlchemyParams {\n contractAddress: string;\n startToken?: string;\n withMetadata: boolean;\n limit?: number;\n tokenUriTimeoutInMs?: number;\n}\n\n/**\n * Interface for the `getNfts` endpoint. The main difference is that the\n * endpoint has a `withMetadata` parameter, but the SDK exposes the parameter as\n * `omitMetadata`.\n *\n * @internal\n */\ninterface GetNftsAlchemyParams {\n owner: string;\n pageKey?: string;\n contractAddresses?: string[];\n /** @deprecated - Please use `excludeFilters` instead. */\n filters?: string[];\n excludeFilters?: NftFilters[];\n includeFilters?: NftFilters[];\n pageSize?: number;\n withMetadata: boolean;\n tokenUriTimeoutInMs?: number;\n orderBy?: string;\n}\n\n/**\n * Interface for the `getNftMetadata` endpoint.\n *\n * @internal\n */\ninterface GetNftMetadataParams {\n contractAddress: string;\n tokenId: string;\n tokenType?: NftTokenType;\n refreshCache?: boolean;\n tokenUriTimeoutInMs?: number;\n}\n\n/**\n * Interface for the `isSpamContract` endpoint.\n *\n * @internal\n */\ninterface IsSpamContractParams {\n contractAddress: string;\n}\n\n/**\n * Interface for the `getNftContractMetadata` endpoint.\n *\n * @internal\n */\ninterface GetContractMetadataParams {\n contractAddress: string;\n}\n\n/**\n * Interface for the `getOwnersForNftContract` endpoint.\n *\n * @internal\n */\ninterface GetOwnersForNftContractAlchemyParams {\n contractAddress: string;\n}\n\n/**\n * Interface for the `getOwnersForContract` endpoint.\n *\n * @internal\n */\ninterface GetContractsForOwnerParams {\n owner: string;\n pageKey?: string;\n includeFilters?: NftFilters[];\n excludeFilters?: NftFilters[];\n orderBy?: NftOrdering;\n}\n\n/**\n * Interface for the `getFloorPrice` endpoint.\n *\n * @internal\n */\ninterface GetFloorPriceParams {\n contractAddress: string;\n}\n\n/**\n * Interface for the `getNftSales` endpoint.\n *\n * @internal\n */\ninterface GetNftSalesParams {\n fromBlock?: number | 'latest';\n toBlock?: number | 'latest';\n order?: SortingOrder;\n marketplace?: NftSaleMarketplace;\n contractAddress?: string;\n tokenId?: string;\n sellerAddress?: string;\n buyerAddress?: string;\n taker?: NftSaleTakerType;\n limit?: number;\n pageKey?: string;\n}\n\n/**\n * Interface for the `computeRarity` endpoint.\n *\n * @internal\n */\ninterface ComputeRarityParams {\n contractAddress: string;\n tokenId: string;\n}\n\n/**\n * Interface for the `searchContractMetadata` endpoint.\n *\n * @internal\n */\ninterface SearchContractMetadataParams {\n query: string;\n}\n\n/**\n * Interface for the `summarizeNFTAttributes` endpoint.\n *\n * @internal\n */\ninterface SummarizeNftAttributesParams {\n contractAddress: string;\n}\n\ninterface ReingestContractParams {\n contractAddress: string;\n}\n","import type { BigNumberish } from '@ethersproject/bignumber';\n\nimport {\n checkNftOwnership,\n computeRarity,\n getContractMetadata,\n getContractsForOwner,\n getFloorPrice,\n getNftMetadata,\n getNftMetadataBatch,\n getNftSales,\n getNftsForContract,\n getNftsForContractIterator,\n getNftsForOwner,\n getNftsForOwnerIterator,\n getOwnersForContract,\n getOwnersForNft,\n getSpamContracts,\n isSpamContract,\n refreshContract,\n refreshNftMetadata,\n searchContractMetadata,\n summarizeNftAttributes,\n verifyNftOwnership\n} from '../internal/nft-api';\nimport {\n GetBaseNftsForContractOptions,\n GetBaseNftsForOwnerOptions,\n GetContractsForOwnerOptions,\n GetContractsForOwnerResponse,\n GetFloorPriceResponse,\n GetNftSalesOptions,\n GetNftSalesOptionsByContractAddress,\n GetNftSalesResponse,\n GetNftsForContractOptions,\n GetNftsForOwnerOptions,\n GetOwnersForContractOptions,\n GetOwnersForContractResponse,\n GetOwnersForContractWithTokenBalancesOptions,\n GetOwnersForContractWithTokenBalancesResponse,\n GetOwnersForNftResponse,\n NftAttributeRarity,\n NftAttributesResponse,\n NftContractBaseNftsResponse,\n NftContractNftsResponse,\n NftMetadataBatchOptions,\n NftMetadataBatchToken,\n NftTokenType,\n OwnedBaseNft,\n OwnedBaseNftsResponse,\n OwnedNft,\n OwnedNftsResponse,\n RefreshContractResult\n} from '../types/types';\nimport { AlchemyConfig } from './alchemy-config';\nimport { BaseNft, Nft, NftContract } from './nft';\n\n/**\n * The NFT namespace contains all the functionality related to NFTs.\n *\n * Do not call this constructor directly. Instead, instantiate an Alchemy object\n * with `const alchemy = new Alchemy(config)` and then access the core namespace\n * via `alchemy.nft`.\n */\nexport class NftNamespace {\n /** @internal */\n constructor(private readonly config: AlchemyConfig) {}\n\n /**\n * Get the NFT metadata associated with the provided parameters.\n *\n * @param contractAddress - The contract address of the NFT.\n * @param tokenId - Token id of the NFT.\n * @param tokenType - Optionally specify the type of token to speed up the query.\n * @param tokenUriTimeoutInMs - No set timeout by default - When metadata is\n * requested, this parameter is the timeout (in milliseconds) for the\n * website hosting the metadata to respond. If you want to only access the\n * cache and not live fetch any metadata for cache misses then set this value to 0.\n * @public\n */\n getNftMetadata(\n contractAddress: string,\n tokenId: BigNumberish,\n tokenType?: NftTokenType,\n tokenUriTimeoutInMs?: number\n ): Promise {\n return getNftMetadata(\n this.config,\n contractAddress,\n tokenId,\n tokenType,\n tokenUriTimeoutInMs\n );\n }\n\n /**\n * Gets the NFT metadata for multiple NFT tokens.\n *\n * @param tokens An array of NFT tokens to fetch metadata for.\n * @param options Configuration options for making the request.\n */\n getNftMetadataBatch(\n tokens: Array,\n options?: NftMetadataBatchOptions\n ): Promise {\n return getNftMetadataBatch(this.config, tokens, options);\n }\n\n /**\n * Get the NFT collection metadata associated with the provided parameters.\n *\n * @param contractAddress - The contract address of the NFT.\n * @public\n */\n getContractMetadata(contractAddress: string): Promise {\n return getContractMetadata(this.config, contractAddress);\n }\n\n /**\n * Fetches all NFTs for a given owner and yields them in an async iterable.\n *\n * This method returns the full NFT for the owner and pages through all page\n * keys until all NFTs have been fetched.\n *\n * @param owner - The address of the owner.\n * @param options - The optional parameters to use for the request.\n * @public\n */\n getNftsForOwnerIterator(\n owner: string,\n options?: GetNftsForOwnerOptions\n ): AsyncIterable;\n /**\n * Fetches all NFTs for a given owner and yields them in an async iterable.\n *\n * This method returns the base NFTs that omit the associated metadata and\n * pages through all page keys until all NFTs have been fetched.\n *\n * @param owner - The address of the owner.\n * @param options - The optional parameters to use for the request.\n * @public\n */\n getNftsForOwnerIterator(\n owner: string,\n options?: GetBaseNftsForOwnerOptions\n ): AsyncIterable;\n getNftsForOwnerIterator(\n owner: string,\n options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions\n ): AsyncIterable {\n return getNftsForOwnerIterator(this.config, owner, options);\n }\n\n /**\n * Get all NFTs for an owner.\n *\n * This method returns the full NFTs in the contract. To get all NFTs without\n * their associated metadata, use {@link GetBaseNftsForOwnerOptions}.\n *\n * @param owner - The address of the owner.\n * @param options - The optional parameters to use for the request.\n * @public\n */\n getNftsForOwner(\n owner: string,\n options?: GetNftsForOwnerOptions\n ): Promise;\n /**\n * Get all base NFTs for an owner.\n *\n * This method returns the base NFTs that omit the associated metadata. To get\n * all NFTs with their associated metadata, use {@link GetNftsForOwnerOptions}.\n *\n * @param owner - The address of the owner.\n * @param options - The optional parameters to use for the request.\n * @public\n */\n getNftsForOwner(\n owner: string,\n options?: GetBaseNftsForOwnerOptions\n ): Promise;\n getNftsForOwner(\n owner: string,\n options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions\n ): Promise {\n return getNftsForOwner(this.config, owner, options);\n }\n\n /**\n * Get all NFTs for a given contract address.\n *\n * This method returns the full NFTs in the contract. To get all NFTs without\n * their associated metadata, use {@link GetBaseNftsForContractOptions}.\n *\n * @param contractAddress - The contract address of the NFT contract.\n * @param options - The parameters to use for the request. or\n * {@link NftContractNftsResponse} response.\n * @beta\n */\n getNftsForContract(\n contractAddress: string,\n options?: GetNftsForContractOptions\n ): Promise;\n /**\n * Get all base NFTs for a given contract address.\n *\n * This method returns the base NFTs that omit the associated metadata. To get\n * all NFTs with their associated metadata, use {@link GetNftsForContractOptions}.\n *\n * @param contractAddress - The contract address of the NFT contract.\n * @param options - The optional parameters to use for the request.\n * @beta\n */\n getNftsForContract(\n contractAddress: string,\n options?: GetBaseNftsForContractOptions\n ): Promise;\n getNftsForContract(\n contractAddress: string,\n options?: GetBaseNftsForContractOptions | GetNftsForContractOptions\n ): Promise {\n return getNftsForContract(this.config, contractAddress, options);\n }\n\n /**\n * Fetches all NFTs for a given contract address and yields them in an async iterable.\n *\n * This method returns the full NFTs in the contract and pages through all\n * page keys until all NFTs have been fetched. To get all NFTs without their\n * associated metadata, use {@link GetBaseNftsForContractOptions}.\n *\n * @param contractAddress - The contract address of the NFT contract.\n * @param options - The optional parameters to use for the request.\n * @beta\n */\n getNftsForContractIterator(\n contractAddress: string,\n options?: GetNftsForContractOptions\n ): AsyncIterable;\n /**\n * Fetches all base NFTs for a given contract address and yields them in an\n * async iterable.\n *\n * This method returns the base NFTs that omit the associated metadata and\n * pages through all page keys until all NFTs have been fetched. To get all\n * NFTs with their associated metadata, use {@link GetNftsForContractOptions}.\n *\n * @param contractAddress - The contract address of the NFT contract.\n * @param options - The optional parameters to use for the request.\n * @beta\n */\n getNftsForContractIterator(\n contractAddress: string,\n options?: GetBaseNftsForContractOptions\n ): AsyncIterable;\n getNftsForContractIterator(\n contractAddress: string,\n options?: GetBaseNftsForContractOptions | GetNftsForContractOptions\n ): AsyncIterable {\n return getNftsForContractIterator(this.config, contractAddress, options);\n }\n\n /**\n * Gets all the owners for a given NFT contract along with the token balance.\n *\n * @param contractAddress - The NFT contract to get the owners for.\n * @param options Optional parameters to use for the request.\n * @public\n */\n getOwnersForContract(\n contractAddress: string,\n options: GetOwnersForContractWithTokenBalancesOptions\n ): Promise;\n\n /**\n * Gets all the owners for a given NFT contract.\n *\n * Note that token balances are omitted by default. To include token balances\n * for each owner, use {@link GetOwnersForContractWithTokenBalancesOptions},\n * which has the `withTokenBalances` field set to `true`.\n *\n * @param contractAddress - The NFT contract to get the owners for.\n * @param options Optional parameters to use for the request.\n * @public\n */\n getOwnersForContract(\n contractAddress: string,\n options?: GetOwnersForContractOptions\n ): Promise;\n getOwnersForContract(\n contractAddress: string,\n options?:\n | GetOwnersForContractOptions\n | GetOwnersForContractWithTokenBalancesOptions\n ): Promise<\n GetOwnersForContractResponse | GetOwnersForContractWithTokenBalancesResponse\n > {\n return getOwnersForContract(this.config, contractAddress, options);\n }\n\n /**\n * Gets all the owners for a given NFT contract address and token ID.\n *\n * @param contractAddress - The NFT contract address.\n * @param tokenId - Token id of the NFT.\n * @beta\n */\n getOwnersForNft(\n contractAddress: string,\n tokenId: BigNumberish\n ): Promise {\n return getOwnersForNft(this.config, contractAddress, tokenId);\n }\n\n /**\n * Gets all NFT contracts held by the specified owner address.\n *\n * @param owner - Address for NFT owner (can be in ENS format!).\n * @param options - The optional parameters to use for the request.\n * @public\n */\n getContractsForOwner(\n owner: string,\n options?: GetContractsForOwnerOptions\n ): Promise {\n return getContractsForOwner(this.config, owner, options);\n }\n\n /**\n * DEPRECATED - Checks that the provided owner address owns one of more of the\n * provided NFTs.\n *\n * @deprecated - Use {@link verifyNftOwnership} instead. This method will be\n * removed in a future release.\n * @param owner - The owner address to check.\n * @param contractAddresses - An array of NFT contract addresses to check ownership for.\n */\n checkNftOwnership(\n owner: string,\n contractAddresses: string[]\n ): Promise {\n return checkNftOwnership(this.config, owner, contractAddresses);\n }\n\n /**\n * Checks that the provided owner address owns one of more of the provided\n * NFT. Returns a boolean indicating whether the owner address owns the provided NFT.\n *\n * @param owner - The owner address to check.\n * @param contractAddress - An NFT contract address to check ownership for.\n */\n verifyNftOwnership(owner: string, contractAddress: string): Promise;\n\n /**\n * Checks which of the provided NFTs the owner address owns. Returns a map of\n * contract address to a boolean indicating whether the owner address owns the NFT.\n *\n * @param owner - The owner address to check.\n * @param contractAddresses - An array NFT contract address to check ownership for.\n */\n verifyNftOwnership(\n owner: string,\n contractAddresses: string[]\n ): Promise<{ [contractAddress: string]: boolean }>;\n verifyNftOwnership(\n owner: string,\n contractAddress: string | string[]\n ): Promise {\n return verifyNftOwnership(this.config, owner, contractAddress);\n }\n\n /**\n * Returns whether a contract is marked as spam or not by Alchemy. For more\n * information on how we classify spam, go to our NFT API FAQ at\n * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification.\n *\n * @param contractAddress - The contract address to check.\n * @beta\n */\n isSpamContract(contractAddress: string): Promise {\n return isSpamContract(this.config, contractAddress);\n }\n\n /**\n * Returns a list of all spam contracts marked by Alchemy. For details on how\n * Alchemy marks spam contracts, go to\n * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification.\n *\n * @beta\n */\n getSpamContracts(): Promise {\n return getSpamContracts(this.config);\n }\n\n /**\n * Returns the floor prices of a NFT contract by marketplace.\n *\n * @param contractAddress - The contract address for the NFT collection.\n * @beta\n */\n getFloorPrice(contractAddress: string): Promise {\n return getFloorPrice(this.config, contractAddress);\n }\n\n /**\n * Returns NFT sales that have happened through on-chain marketplaces.\n *\n * @param options - The optional parameters to use for the request.\n * @beta\n */\n getNftSales(options?: GetNftSalesOptions): Promise;\n getNftSales(\n options?: GetNftSalesOptionsByContractAddress\n ): Promise;\n getNftSales(\n options?: GetNftSalesOptions | GetNftSalesOptionsByContractAddress\n ): Promise {\n return getNftSales(this.config, options);\n }\n\n /**\n * Get the rarity of each attribute of an NFT.\n *\n * @param contractAddress - Contract address for the NFT collection.\n * @param tokenId - Token id of the NFT.\n */\n computeRarity(\n contractAddress: string,\n tokenId: BigNumberish\n ): Promise {\n return computeRarity(this.config, contractAddress, tokenId);\n }\n\n /**\n * Search for a keyword across metadata of all ERC-721 and ERC-1155 smart contracts.\n *\n * @param query - The search string that you want to search for in contract metadata.\n */\n searchContractMetadata(query: string): Promise {\n return searchContractMetadata(this.config, query);\n }\n\n /**\n * Get a summary of attribute prevalence for an NFT collection.\n *\n * @param contractAddress - Contract address for the NFT collection.\n */\n summarizeNftAttributes(\n contractAddress: string\n ): Promise {\n return summarizeNftAttributes(this.config, contractAddress);\n }\n\n /**\n * Refreshes the cached metadata for a provided NFT contract address and token\n * id. Returns a boolean value indicating whether the metadata was refreshed.\n *\n * This method is useful when you want to refresh the metadata for a NFT that\n * has been updated since the last time it was fetched. Note that the backend\n * only allows one refresh per token every 15 minutes, globally for all users.\n * The last refresh time for an NFT can be accessed on the\n * {@link Nft.timeLastUpdated} field.\n *\n * To trigger a refresh for all NFTs in a contract, use {@link refreshContract} instead.\n *\n * @param contractAddress - The contract address of the NFT.\n * @param tokenId - The token id of the NFT.\n */\n refreshNftMetadata(\n contractAddress: string,\n tokenId: BigNumberish\n ): Promise {\n return refreshNftMetadata(this.config, contractAddress, tokenId);\n }\n\n /**\n * Triggers a metadata refresh all NFTs in the provided contract address. This\n * method is useful after an NFT collection is revealed.\n *\n * Refreshes are queued on the Alchemy backend and may take time to fully\n * process. To refresh the metadata for a specific token, use the\n * {@link refreshNftMetadata} method instead.\n *\n * @param contractAddress - The contract address of the NFT collection.\n * @beta\n */\n refreshContract(contractAddress: string): Promise {\n return refreshContract(this.config, contractAddress);\n }\n}\n","import { AxiosRequestConfig, Method } from 'axios';\n\nimport { BigNumber } from '@ethersproject/bignumber';\n\nimport { requestHttpWithBackoff } from '../internal/dispatch';\nimport {\n RawAddressActivityResponse,\n RawCreateWebhookResponse,\n RawGetAllWebhooksResponse,\n RawNftFilterParam,\n RawNftFiltersResponse,\n RawWebhook\n} from '../internal/raw-interfaces';\nimport {\n AddressActivityResponse,\n AddressActivityWebhook,\n AddressWebhookParams,\n AddressWebhookUpdate,\n DroppedTransactionWebhook,\n GetAddressesOptions,\n GetAllWebhooksResponse,\n MinedTransactionWebhook,\n Network,\n NftActivityWebhook,\n NftFilter,\n NftFiltersResponse,\n NftWebhookParams,\n NftWebhookUpdate,\n TransactionWebhookParams,\n Webhook,\n WebhookType,\n WebhookVersion\n} from '../types/types';\nimport { AlchemyApiType } from '../util/const';\nimport { AlchemyConfig } from './alchemy-config';\n\n/**\n * The Notify namespace contains methods used for creating, reading, updating,\n * and deleting webhooks in the Notify API.\n *\n * To use the methods in the API, you must provide your team's auth token in the\n * {@link AlchemySettings.authToken} field when configuring\n * {@link AlchemySettings}. The auth token can be found in the Alchemy Dashboard\n * on the Notify tab.\n *\n * Note that not all networks are supported in the Notify API. Please consult\n * the documentation for which networks are supported.\n *\n * Do not call this constructor directly. Instead, instantiate an Alchemy object\n * with `const alchemy = new Alchemy(config)` and then access the notify\n * namespace via `alchemy.notify`.\n */\nexport class NotifyNamespace {\n /** @internal */\n constructor(private readonly config: AlchemyConfig) {}\n\n /**\n * Get all webhooks on your team.\n *\n * The team is determined by the `authToken` provided into the {@link AlchemySettings}\n * object when creating a new {@link Alchemy} instance.\n *\n * This method returns a response object containing all the webhooks\n */\n async getAllWebhooks(): Promise {\n this.verifyConfig();\n const response = await this.sendWebhookRequest(\n 'team-webhooks',\n 'getAllWebhooks',\n {}\n );\n return {\n webhooks: parseRawWebhookResponse(response),\n totalCount: response.data.length\n };\n }\n\n /**\n * Get all addresses tracked for the provided {@link AddressActivityWebhook}.\n *\n * @param addressWebhook The Address Activity webhook.\n * @param options Pagination options when fetching addresses.\n */\n getAddresses(\n addressWebhook: AddressActivityWebhook,\n options?: GetAddressesOptions\n ): Promise;\n\n /**\n * Get all addresses tracked for the provided {@link AddressActivityWebhook}.\n *\n * @param webhookId The id of the address activity webhook. Passing in an id\n * of a non-address-activity webhook will result in a response object with\n * no addresses.\n * @param options Pagination options when fetching addresses.\n */\n getAddresses(\n webhookId: string,\n options?: GetAddressesOptions\n ): Promise;\n async getAddresses(\n webhookOrId: AddressActivityWebhook | string,\n options?: GetAddressesOptions\n ): Promise {\n this.verifyConfig();\n const webhookId =\n typeof webhookOrId === 'string' ? webhookOrId : webhookOrId.id;\n const response = await this.sendWebhookRequest(\n 'webhook-addresses',\n 'getAddresses',\n {\n webhook_id: webhookId,\n limit: options?.limit,\n after: options?.pageKey\n }\n );\n return parseRawAddressActivityResponse(response);\n }\n\n /**\n * Get all NFTs tracked for the provided {@link NftActivityWebhook}.\n *\n * @param nftWebhook The NFT Activity webhook.\n * @param options Pagination options when fetching NFT filters.\n */\n getNftFilters(\n nftWebhook: NftActivityWebhook,\n options?: GetAddressesOptions\n ): Promise;\n\n /**\n * Get all NFT filters tracked for the provided {@link NftActivityWebhook}.\n *\n * @param webhookId The id of the NFT activity webhook. Passing in an\n * incorrect id of a non-NFT webhook will result in a response object with\n * no filters.\n * @param options Pagination options when fetching nft filters.\n */\n getNftFilters(\n webhookId: string,\n options?: GetAddressesOptions\n ): Promise;\n async getNftFilters(\n webhookOrId: NftActivityWebhook | string,\n options?: GetAddressesOptions\n ): Promise {\n this.verifyConfig();\n const webhookId =\n typeof webhookOrId === 'string' ? webhookOrId : webhookOrId.id;\n const response = await this.sendWebhookRequest(\n 'webhook-nft-filters',\n 'getNftFilters',\n {\n webhook_id: webhookId,\n limit: options?.limit,\n after: options?.pageKey\n }\n );\n return parseRawNftFiltersResponse(response);\n }\n\n /**\n * Update a {@link NftActivityWebhook}'s active status or NFT filters.\n *\n * @param nftWebhook The NFT activity webhook to update.\n * @param update Object containing the update.\n */\n updateWebhook(\n nftWebhook: NftActivityWebhook,\n update: NftWebhookUpdate\n ): Promise;\n\n /**\n * Update a {@link NftActivityWebhook}'s active status or NFT filters.\n *\n * @param nftWebhookId The id of the NFT activity webhook.\n * @param update Object containing the update.\n */\n updateWebhook(nftWebhookId: string, update: NftWebhookUpdate): Promise;\n\n /**\n * Update a {@link AddressActivityWebhook}'s active status or addresses.\n *\n * @param addressWebhook The address activity webhook to update.\n * @param update Object containing the update.\n */\n updateWebhook(\n addressWebhook: AddressActivityWebhook,\n update: AddressWebhookUpdate\n ): Promise;\n\n /**\n * Update a {@link AddressActivityWebhook}'s active status or addresses.\n *\n * @param addressWebhookId The id of the address activity webhook.\n * @param update Object containing the update.\n */\n updateWebhook(\n addressWebhookId: string,\n update: AddressWebhookUpdate\n ): Promise;\n async updateWebhook(\n webhookOrId: NftActivityWebhook | AddressActivityWebhook | string,\n update: NftWebhookUpdate | AddressWebhookUpdate\n ): Promise {\n const webhookId =\n typeof webhookOrId === 'string' ? webhookOrId : webhookOrId.id;\n let restApiName;\n let methodName;\n let method: Method;\n let data;\n if ('isActive' in update) {\n restApiName = 'update-webhook';\n methodName = 'updateWebhook';\n method = 'PUT';\n data = {\n webhook_id: webhookId,\n is_active: update.isActive\n };\n } else if ('addFilters' in update || 'removeFilters' in update) {\n restApiName = 'update-webhook-nft-filters';\n methodName = 'updateWebhookNftFilters';\n method = 'PATCH';\n data = {\n webhook_id: webhookId,\n nft_filters_to_add: update.addFilters\n ? update.addFilters.map(nftFilterToParam)\n : [],\n nft_filters_to_remove: update.removeFilters\n ? update.removeFilters.map(nftFilterToParam)\n : []\n };\n } else if ('addAddresses' in update || 'removeAddresses' in update) {\n restApiName = 'update-webhook-addresses';\n methodName = 'webhook:updateWebhookAddresses';\n method = 'PATCH';\n data = {\n webhook_id: webhookId,\n addresses_to_add: await this.resolveAddresses(update.addAddresses),\n addresses_to_remove: await this.resolveAddresses(update.removeAddresses)\n };\n } else if ('newAddresses' in update) {\n restApiName = 'update-webhook-addresses';\n methodName = 'webhook:updateWebhookAddress';\n method = 'PUT';\n data = {\n webhook_id: webhookId,\n addresses: await this.resolveAddresses(update.newAddresses)\n };\n } else {\n throw new Error('Invalid `update` param passed into `updateWebhook`');\n }\n\n await this.sendWebhookRequest(\n restApiName,\n methodName,\n {},\n {\n method,\n data\n }\n );\n }\n\n /**\n * Create a new {@link MinedTransactionWebhook} to track mined transactions\n * sent by the app associated with the app id.\n *\n * Note that the webhook will be created in the app network of the provided app id.\n *\n * @param url The URL that the webhook should send events to.\n * @param type The type of webhook to create.\n * @param params Parameters object containing the app id.\n */\n // TODO(webhook): Automatically populate app id from api key.\n createWebhook(\n url: string,\n type: WebhookType.MINED_TRANSACTION,\n params: TransactionWebhookParams\n ): Promise;\n\n /**\n * Create a new {@link DroppedTransactionWebhook} to track dropped transactions\n * sent by the app associated with the app id.\n *\n * Note that the webhook will be created in the app network of the provided app id.\n *\n * @param url The URL that the webhook should send events to.\n * @param type The type of webhook to create.\n * @param params Parameters object containing the app id.\n */\n // TODO(webhook): Automatically populate app id from api key.\n createWebhook(\n url: string,\n type: WebhookType.DROPPED_TRANSACTION,\n params: TransactionWebhookParams\n ): Promise;\n\n /**\n * Create a new {@link NftActivityWebhook} to track NFT transfers.\n *\n * @param url The URL that the webhook should send events to.\n * @param type The type of webhook to create.\n * @param params Parameters object containing the NFTs to track and the\n * network the webhook should be created on.\n */\n createWebhook(\n url: string,\n type: WebhookType.NFT_ACTIVITY,\n params: NftWebhookParams\n ): Promise;\n\n /**\n * Create a new {@link AddressActivityWebhook} to track address activity.\n *\n * @param url The URL that the webhook should send events to.\n * @param type The type of webhook to create.\n * @param params Parameters object containing the addresses to track and the\n * network the webhook should be created on.\n */\n createWebhook(\n url: string,\n type: WebhookType.ADDRESS_ACTIVITY,\n params: AddressWebhookParams\n ): Promise;\n async createWebhook(\n url: string,\n type: WebhookType,\n params: NftWebhookParams | AddressWebhookParams | TransactionWebhookParams\n ): Promise<\n | MinedTransactionWebhook\n | DroppedTransactionWebhook\n | NftActivityWebhook\n | AddressActivityWebhook\n > {\n let appId;\n if (\n type === WebhookType.MINED_TRANSACTION ||\n type === WebhookType.DROPPED_TRANSACTION\n ) {\n if (!('appId' in params)) {\n throw new Error('Transaction Webhooks require an app id.');\n }\n appId = params.appId;\n }\n\n let network = NETWORK_TO_WEBHOOK_NETWORK.get(this.config.network);\n let filters;\n let addresses;\n if (type === WebhookType.NFT_ACTIVITY) {\n if (!('filters' in params) || params.filters.length === 0) {\n throw new Error(\n 'Nft Activity Webhooks require a non-empty array input.'\n );\n }\n network = params.network\n ? NETWORK_TO_WEBHOOK_NETWORK.get(params.network)\n : network;\n filters = (params.filters as NftFilter[]).map(filter => ({\n contract_address: filter.contractAddress,\n token_id: BigNumber.from(filter.tokenId).toString()\n }));\n } else if (type === WebhookType.ADDRESS_ACTIVITY) {\n if (\n params === undefined ||\n !('addresses' in params) ||\n params.addresses.length === 0\n ) {\n throw new Error(\n 'Address Activity Webhooks require a non-empty array input.'\n );\n }\n network = params.network\n ? NETWORK_TO_WEBHOOK_NETWORK.get(params.network)\n : network;\n addresses = await this.resolveAddresses(params.addresses);\n }\n\n const data = {\n network,\n webhook_type: type,\n webhook_url: url,\n ...(appId && { app_id: appId }),\n\n // Only include the filters/addresses in the final response if it's defined\n ...(filters && { nft_filters: filters }),\n ...(addresses && { addresses })\n };\n\n const response = await this.sendWebhookRequest(\n 'create-webhook',\n 'createWebhook',\n {},\n {\n method: 'POST',\n data\n }\n );\n\n return parseRawWebhook(response.data);\n }\n\n /**\n * Delete the provided webhook.\n *\n * @param webhook The webhook to delete.\n */\n deleteWebhook(webhook: Webhook): Promise;\n\n /**\n * Delete the provided webhook.\n *\n * @param webhookId The id of the webhook to delete.\n */\n deleteWebhook(webhookId: string): Promise;\n async deleteWebhook(webhookOrId: Webhook | string): Promise {\n this.verifyConfig();\n const webhookId =\n typeof webhookOrId === 'string' ? webhookOrId : webhookOrId.id;\n const response = await this.sendWebhookRequest(\n 'delete-webhook',\n 'deleteWebhook',\n {\n webhook_id: webhookId\n },\n {\n method: 'DELETE'\n }\n );\n\n if ('message' in response) {\n throw new Error(\n `Webhook not found. Failed to delete webhook: ${webhookId}`\n );\n }\n }\n\n private verifyConfig() {\n if (this.config.authToken === undefined) {\n throw new Error(\n 'Using the Notify API requires setting the Alchemy Auth Token in ' +\n 'the settings object when initializing Alchemy.'\n );\n }\n }\n\n private sendWebhookRequest(\n restApiName: string,\n methodName: string,\n params: {},\n overrides?: AxiosRequestConfig\n ): Promise {\n return requestHttpWithBackoff(\n this.config,\n AlchemyApiType.WEBHOOK,\n restApiName,\n methodName,\n params,\n {\n ...overrides,\n headers: {\n 'X-Alchemy-Token': this.config.authToken!,\n ...overrides?.headers\n }\n }\n );\n }\n\n /** Resolves ENS addresses to the raw address.\n * @internal */\n private async resolveAddresses(\n addresses: string[] | undefined\n ): Promise {\n if (addresses === undefined) {\n return [];\n }\n const resolvedAddresses: string[] = [];\n const provider = await this.config.getProvider();\n for (const address of addresses) {\n const rawAddress = await provider.resolveName(address);\n if (rawAddress === null) {\n throw new Error(`Unable to resolve the ENS address: ${address}`);\n }\n resolvedAddresses.push(rawAddress);\n }\n\n return resolvedAddresses;\n }\n}\n\n/**\n * Mapping of webhook network representations to the SDK's network representation.\n *\n * @internal\n */\nconst WEBHOOK_NETWORK_TO_NETWORK: { [key: string]: Network } = {\n ETH_MAINNET: Network.ETH_MAINNET,\n ETH_GOERLI: Network.ETH_GOERLI,\n ETH_ROPSTEN: Network.ETH_ROPSTEN,\n ETH_RINKEBY: Network.ETH_RINKEBY,\n ETH_KOVAN: Network.ETH_KOVAN,\n MATIC_MAINNET: Network.MATIC_MAINNET,\n MATIC_MUMBAI: Network.MATIC_MUMBAI,\n ARB_MAINNET: Network.ARB_MAINNET,\n ARB_RINKEBY: Network.ARB_RINKEBY,\n OPT_MAINNET: Network.OPT_MAINNET,\n OPT_KOVAN: Network.OPT_KOVAN\n};\n\n/** Mapping of the SDK's network representation the webhook API's network representation. */\nconst NETWORK_TO_WEBHOOK_NETWORK: Map = Object.keys(\n Network\n).reduce((map: Map, key) => {\n if (key in WEBHOOK_NETWORK_TO_NETWORK) {\n map.set(WEBHOOK_NETWORK_TO_NETWORK[key], key);\n }\n return map;\n}, new Map());\n\nfunction parseRawWebhookResponse(\n response: RawGetAllWebhooksResponse\n): Webhook[] {\n return response.data.map(parseRawWebhook);\n}\n\nfunction parseRawWebhook(rawWebhook: RawWebhook): Webhook {\n return {\n id: rawWebhook.id,\n network: WEBHOOK_NETWORK_TO_NETWORK[rawWebhook.network],\n type: rawWebhook.webhook_type as WebhookType,\n url: rawWebhook.webhook_url,\n isActive: rawWebhook.is_active,\n timeCreated: new Date(rawWebhook.time_created).toISOString(),\n signingKey: rawWebhook.signing_key,\n version: rawWebhook.version as WebhookVersion,\n // Only include the appId in the final response if it's defined\n ...(rawWebhook.app_id !== undefined && { appId: rawWebhook.app_id })\n };\n}\n\nfunction parseRawAddressActivityResponse(\n response: RawAddressActivityResponse\n): AddressActivityResponse {\n return {\n addresses: response.data,\n totalCount: response.pagination.total_count,\n pageKey: response.pagination.cursors.after\n };\n}\n\nfunction parseRawNftFiltersResponse(\n response: RawNftFiltersResponse\n): NftFiltersResponse {\n return {\n filters: response.data.map(f => ({\n contractAddress: f.contract_address,\n tokenId: BigNumber.from(f.token_id).toString()\n })),\n totalCount: response.pagination.total_count,\n pageKey: response.pagination.cursors.after\n };\n}\n\nfunction nftFilterToParam(filter: NftFilter): RawNftFilterParam {\n return {\n contract_address: filter.contractAddress,\n token_id: BigNumber.from(filter.tokenId).toString()\n };\n}\n","import {\n TransactionReceipt,\n TransactionRequest,\n TransactionResponse\n} from '@ethersproject/abstract-provider';\nimport type { BigNumber } from '@ethersproject/bignumber';\nimport { Deferrable } from '@ethersproject/properties';\n\nimport {\n GasOptimizedTransactionResponse,\n GasOptimizedTransactionStatusResponse,\n SendPrivateTransactionOptions\n} from '../types/types';\nimport { AlchemyConfig } from './alchemy-config';\nimport { Wallet } from './alchemy-wallet';\nimport { fromHex, toHex } from './util';\n\n/**\n * Multiples to increment fee per gas when using\n * {@link TransactNamespace.sendGasOptimizedTransaction}.\n *\n * @internal\n */\nexport const GAS_OPTIMIZED_TX_FEE_MULTIPLES = [0.9, 1, 1.1, 1.2, 1.3];\n\n/**\n * The Transact namespace contains methods used for sending transactions and\n * checking on the state of submitted transactions.\n *\n * Do not call this constructor directly. Instead, instantiate an Alchemy object\n * with `const alchemy = new Alchemy(config)` and then access the transact\n * namespace via `alchemy.transact`.\n */\nexport class TransactNamespace {\n /** @internal */\n constructor(private readonly config: AlchemyConfig) {}\n\n /**\n * Used to send a single transaction to Flashbots. Flashbots will attempt to\n * send the transaction to miners for the next 25 blocks.\n *\n * Returns the transaction hash of the submitted transaction.\n *\n * @param signedTransaction The raw, signed transaction as a hash.\n * @param maxBlockNumber Optional highest block number in which the\n * transaction should be included.\n * @param options Options to configure the request.\n */\n async sendPrivateTransaction(\n signedTransaction: string,\n maxBlockNumber?: number,\n options?: SendPrivateTransactionOptions\n ): Promise {\n const provider = await this.config.getProvider();\n const hexBlockNumber = maxBlockNumber ? toHex(maxBlockNumber) : undefined;\n return provider._send(\n 'eth_sendPrivateTransaction',\n [\n {\n tx: signedTransaction,\n maxBlockNumber: hexBlockNumber,\n preferences: options\n }\n ],\n 'sendPrivateTransaction'\n );\n }\n\n /**\n * Stops the provided private transaction from being submitted for future\n * blocks. A transaction can only be cancelled if the request is signed by the\n * same key as the {@link sendPrivateTransaction} call submitting the\n * transaction in first place.\n *\n * Please note that fast mode transactions cannot be cancelled using this method.\n *\n * Returns a boolean indicating whether the cancellation was successful.\n *\n * @param transactionHash Transaction hash of private tx to be cancelled\n */\n async cancelPrivateTransaction(transactionHash: string): Promise {\n const provider = await this.config.getProvider();\n return provider._send(\n 'eth_cancelPrivateTransaction',\n [\n {\n txHash: transactionHash\n }\n ],\n 'cancelPrivateTransaction'\n );\n }\n\n /**\n * Returns the transaction with hash or null if the transaction is unknown.\n *\n * If a transaction has not been mined, this method will search the\n * transaction pool. Various backends may have more restrictive transaction\n * pool access (e.g. if the gas price is too low or the transaction was only\n * recently sent and not yet indexed) in which case this method may also return null.\n *\n * NOTE: This is an alias for {@link CoreNamespace.getTransaction}.\n *\n * @param transactionHash The hash of the transaction to get.\n * @public\n */\n async getTransaction(\n transactionHash: string | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.getTransaction(transactionHash);\n }\n\n /**\n * Submits transaction to the network to be mined. The transaction must be\n * signed, and be valid (i.e. the nonce is correct and the account has\n * sufficient balance to pay for the transaction).\n *\n * NOTE: This is an alias for {@link CoreNamespace.sendTransaction}.\n *\n * @param signedTransaction The signed transaction to send.\n * @public\n */\n async sendTransaction(\n signedTransaction: string | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.sendTransaction(signedTransaction);\n }\n\n /**\n * Returns an estimate of the amount of gas that would be required to submit\n * transaction to the network.\n *\n * An estimate may not be accurate since there could be another transaction on\n * the network that was not accounted for, but after being mined affects the\n * relevant state.\n *\n * This is an alias for {@link CoreNamespace.estimateGas}.\n *\n * @param transaction The transaction to estimate gas for.\n * @public\n */\n async estimateGas(\n transaction: Deferrable\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.estimateGas(transaction);\n }\n\n /**\n * Returns a fee per gas (in wei) that is an estimate of how much you can pay\n * as a priority fee, or \"tip\", to get a transaction included in the current block.\n *\n * This number is generally used to set the `maxPriorityFeePerGas` field in a\n * transaction request.\n *\n * @public\n */\n async getMaxPriorityFeePerGas(): Promise {\n const provider = await this.config.getProvider();\n const feeHex = await provider._send(\n 'eth_maxPriorityFeePerGas',\n [],\n 'getMaxPriorityFeePerGas'\n );\n return fromHex(feeHex);\n }\n\n /**\n * Returns a promise which will not resolve until specified transaction hash is mined.\n *\n * If {@link confirmations} is 0, this method is non-blocking and if the\n * transaction has not been mined returns null. Otherwise, this method will\n * block until the transaction has confirmed blocks mined on top of the block\n * in which it was mined.\n *\n * NOTE: This is an alias for {@link CoreNamespace.waitForTransaction}.\n *\n * @param transactionHash The hash of the transaction to wait for.\n * @param confirmations The number of blocks to wait for.\n * @param timeout The maximum time to wait for the transaction to confirm.\n * @public\n */\n async waitForTransaction(\n transactionHash: string,\n confirmations?: number,\n timeout?: number\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.waitForTransaction(transactionHash, confirmations, timeout);\n }\n\n /**\n * Instead of sending a single transaction that might not get mined, this\n * method allows you to send the same transaction multiple times, with\n * different gas prices and gas limits. This should result in lower fees paid.\n *\n * Alchemy will submit the cheapest transaction, and if it does not get mined,\n * the next cheapest transaction will be submitted. This process will continue\n * until one of the transactions is mined, or until all transactions are rejected.\n *\n * To have Alchemy automatically generate a fee and gas spread, pass in a\n * {@link TransactionRequest} object and a {@link Wallet} as a signer.\n *\n * This method returns a response object containing the transaction hash for\n * each of the signed transactions and a transaction job id that can be used\n * to track the state of the transaction job.\n *\n * @param signedTransactions An array of signed transactions to send. Each\n * transaction in the array must have the same values, but with different\n * gas and fee values.\n * @internal\n */\n // TODO(txjob): Remove internal tag once this feature is released.\n async sendGasOptimizedTransaction(\n signedTransactions: string[]\n ): Promise;\n\n /**\n * Instead of sending a single transaction that might not get mined, this\n * method will generate a series of five EIP-1559 transactions with different\n * gas prices in order to minimize the final fees paid.\n *\n * Alchemy will submit the cheapest transaction, and if it does not get mined,\n * the next cheapest transaction will be submitted. This process will continue\n * until one of the transactions is mined, or until all transactions are rejected.\n *\n * To calculate the fee, gas, and gas spread for each transaction, this method\n * first calculates the base fee from the latest block, estimates the gas for\n * the transaction, and then calculates the fee and gas spread for the\n * transaction. The five transactions will have 90%, 100%, 110%, 120%, and\n * 130% of the max priority fee per gas.\n *\n * Note that you can also pass in an array of pre-signed transactions with set\n * gas levels for more granular control over gas.\n *\n * This method returns a response object containing the transaction hash for\n * each of the signed transactions and a transaction job id that can be used\n * to track the state of the transaction job.\n *\n * @param transaction The raw transaction to send.\n * @param wallet A wallet to use to sign the transaction.\n * @internal\n */\n // TODO(txjob): Remove internal tag once this feature is released.\n async sendGasOptimizedTransaction(\n transaction: TransactionRequest,\n wallet: Wallet\n ): Promise;\n async sendGasOptimizedTransaction(\n transactionOrSignedTxs: TransactionRequest | string[],\n wallet?: Wallet\n ): Promise {\n if (Array.isArray(transactionOrSignedTxs)) {\n return this._sendGasOptimizedTransaction(\n transactionOrSignedTxs,\n 'sendGasOptimizedTransactionPreSigned'\n );\n }\n\n let gasLimit;\n let priorityFee;\n let baseFee;\n const provider = await this.config.getProvider();\n try {\n gasLimit = await this.estimateGas(transactionOrSignedTxs);\n priorityFee = await this.getMaxPriorityFeePerGas();\n const currentBlock = await provider.getBlock('latest');\n baseFee = currentBlock.baseFeePerGas!.toNumber();\n } catch (e) {\n throw new Error(`Failed to estimate gas for transaction: ${e}`);\n }\n\n const gasSpreadTransactions = generateGasSpreadTransactions(\n transactionOrSignedTxs,\n gasLimit.toNumber(),\n baseFee,\n priorityFee\n );\n const signedTransactions = await Promise.all(\n gasSpreadTransactions.map(tx => wallet!.signTransaction(tx))\n );\n\n return this._sendGasOptimizedTransaction(\n signedTransactions,\n 'sendGasOptimizedTransactionGenerated'\n );\n }\n\n /**\n * Returns the state of the transaction job returned by the\n * {@link sendGasOptimizedTransaction}.\n *\n * @param trackingId The tracking id from the response of the sent gas optimized transaction.\n * @internal\n */\n // TODO(txjob): Remove internal tag once this feature is released.\n async getGasOptimizedTransactionStatus(\n trackingId: string\n ): Promise {\n const provider = await this.config.getProvider();\n return provider._send(\n 'alchemy_getGasOptimizedTransactionStatus',\n [trackingId],\n 'getGasOptimizedTransactionStatus'\n );\n }\n\n /** @internal */\n private async _sendGasOptimizedTransaction(\n signedTransactions: string[],\n methodName: string\n ): Promise {\n const provider = await this.config.getProvider();\n return provider._send(\n 'alchemy_sendGasOptimizedTransaction',\n [\n {\n rawTransactions: signedTransactions\n }\n ],\n methodName\n );\n }\n}\n\n/**\n * Helper method to generate the raw transaction with the given gas limit and\n * priority fee across a spread of different gas prices.\n *\n * @internal\n */\n// Visible for testing\nexport function generateGasSpreadTransactions(\n transaction: TransactionRequest,\n gasLimit: number,\n baseFee: number,\n priorityFee: number\n): TransactionRequest[] {\n return GAS_OPTIMIZED_TX_FEE_MULTIPLES.map(feeMultiplier => {\n return {\n ...transaction,\n gasLimit,\n maxFeePerGas: Math.round(\n baseFee * feeMultiplier + priorityFee * feeMultiplier\n ),\n maxPriorityFeePerGas: Math.round(feeMultiplier * priorityFee)\n };\n });\n}\n","/** This file contains internal types used by the SDK and are not exposed to the end user. */\n\ntype JsonRpcId = string | number | null;\n\n/**\n * Prefix for `alchemy_pendingTransactions` subscriptions when serializing to\n * ethers events.\n *\n * This tag is used internally by ethers to track different event filters.\n */\nexport const ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE =\n 'alchemy-pending-transactions';\n\n/**\n * Prefix for `alchemy_minedTransactions` subscriptions when serializing to ethers events.\n *\n * This tag is used internally by ethers to track different event filters.\n */\nexport const ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE =\n 'alchemy-mined-transactions';\n\n/**\n * Array containing all the custom event tags used internally by ethers to track\n * event filters.\n */\nexport const ALCHEMY_EVENT_TYPES = [\n ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE,\n ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE\n];\n\nexport interface JsonRpcRequest {\n jsonrpc: '2.0';\n method: string;\n params?: any[];\n id?: JsonRpcId;\n}\n\nexport interface JsonRpcResponse {\n jsonrpc: '2.0';\n result?: T;\n error?: JsonRpcError;\n id: JsonRpcId;\n}\n\ninterface JsonRpcError {\n code: number;\n message: string;\n data?: T;\n}\n\nexport type WebSocketMessage = SingleOrBatchResponse | SubscriptionEvent;\nexport type SingleOrBatchResponse = JsonRpcResponse | JsonRpcResponse[];\nexport interface SubscriptionEvent {\n jsonrpc: '2.0';\n method: 'eth_subscription';\n params: {\n subscription: string;\n result: T;\n };\n}\n","import { EventType, Filter, Listener } from '@ethersproject/abstract-provider';\n\nimport {\n AlchemyEventFilter,\n AlchemyEventType,\n AlchemyMinedTransactionsAddress,\n AlchemyMinedTransactionsEventFilter,\n AlchemyPendingTransactionsEventFilter,\n AlchemySubscription,\n NonEmptyArray\n} from '../types/types';\nimport {\n ALCHEMY_EVENT_TYPES,\n ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE,\n ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE\n} from './internal-types';\n\n/**\n * DO NOT MODIFY.\n *\n * Event class copied directly over from ethers.js's `BaseProvider` class.\n *\n * This class is used to represent events and their corresponding listeners. The\n * SDK needs to extend this class in order to support Alchemy's custom\n * Subscription API types. The original class is not exported by ethers. Minimal\n * changes have been made in order to get TS to compile.\n */\nclass Event {\n readonly listener: Listener;\n readonly once: boolean;\n readonly tag: string;\n\n _lastBlockNumber: number;\n _inflight: boolean;\n\n constructor(tag: string, listener: Listener, once: boolean) {\n this.listener = listener;\n this.tag = tag;\n this.once = once;\n this._lastBlockNumber = -2;\n this._inflight = false;\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 default:\n return this.tag;\n }\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') {\n throw new Error('Not a transaction event');\n }\n return comps[1];\n }\n\n get filter(): Filter {\n const comps = this.tag.split(':');\n if (comps[0] !== 'filter') {\n throw new Error('Not a transaction event');\n }\n const address = comps[1];\n\n const topics = deserializeTopics(comps[2]);\n const filter: Filter = {};\n\n if (topics.length > 0) {\n filter.topics = topics;\n }\n if (address && address !== '*') {\n filter.address = address;\n }\n\n return filter;\n }\n\n pollable(): boolean {\n const PollableEvents = ['block', 'network', 'pending', 'poll'];\n return this.tag.indexOf(':') >= 0 || PollableEvents.indexOf(this.tag) >= 0;\n }\n}\n\n/**\n * Wrapper class around the ethers `Event` class in order to add support for\n * Alchemy's custom subscriptions types.\n *\n * The serialization and deserialization mechanism requires the order of the\n * fields to be the same across different {@link ALCHEMY_EVENT_TYPES}. Before\n * using a getter on a new event filter, make sure that the position of the\n * field in serialization is correct.\n *\n * The getters on this class deserialize the event tag generated by\n * {@link getAlchemyEventTag} into the original fields passed into the event.\n */\nexport class EthersEvent extends Event {\n /**\n * Converts the event tag into the original `fromAddress` field in\n * {@link AlchemyPendingTransactionsEventFilter}.\n */\n get fromAddress(): string | string[] | undefined {\n const comps = this.tag.split(':');\n if (comps[0] !== ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE) {\n return undefined;\n }\n if (comps[1] && comps[1] !== '*') {\n return deserializeAddressField(comps[1]);\n } else {\n return undefined;\n }\n }\n\n /**\n * Converts the event tag into the original `toAddress` field in\n * {@link AlchemyPendingTransactionsEventFilter}.\n */\n get toAddress(): string | string[] | undefined {\n const comps = this.tag.split(':');\n if (comps[0] !== ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE) {\n return undefined;\n }\n if (comps[2] && comps[2] !== '*') {\n return deserializeAddressField(comps[2]);\n } else {\n return undefined;\n }\n }\n\n /**\n * Converts the event tag into the original `hashesOnly` field in\n * {@link AlchemyPendingTransactionsEventFilter} and {@link AlchemyMinedTransactionsEventFilter}.\n */\n get hashesOnly(): boolean | undefined {\n const comps = this.tag.split(':');\n if (!ALCHEMY_EVENT_TYPES.includes(comps[0])) {\n return undefined;\n }\n if (comps[3] && comps[3] !== '*') {\n return comps[3] === 'true';\n } else {\n return undefined;\n }\n }\n\n get includeRemoved(): boolean | undefined {\n const comps = this.tag.split(':');\n if (comps[0] !== ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE) {\n return undefined;\n }\n if (comps[2] && comps[2] !== '*') {\n return comps[2] === 'true';\n } else {\n return undefined;\n }\n }\n\n get addresses(): NonEmptyArray | undefined {\n const comps = this.tag.split(':');\n if (comps[0] !== ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE) {\n return undefined;\n }\n if (comps[1] && comps[1] !== '*') {\n return deserializeAddressesField(comps[1]);\n } else {\n return undefined;\n }\n }\n}\n\nexport function isAlchemyEvent(\n event: AlchemyEventType\n): event is\n | AlchemyMinedTransactionsEventFilter\n | AlchemyPendingTransactionsEventFilter {\n return typeof event === 'object' && 'method' in event;\n}\n\n/**\n * Creates a string representation of an `alchemy_pendingTransaction`\n * subscription filter that is compatible with the ethers implementation of\n * `getEventTag()`. The method is not an exported function in ethers, which is\n * why the SDK has its own implementation.\n *\n * The event tag is then deserialized by the SDK's {@link EthersEvent} getters.\n *\n * @example\n * ```js\n * // Returns 'alchemy-pending-transactions:0xABC:0xDEF|0xGHI:true'\n * const eventTag = getAlchemyEventTag(\n * {\n * \"method\": \"alchemy_pendingTransactions\",\n * \"fromAddress\": \"0xABC\",\n * \"toAddress\": [\"0xDEF\", \"0xGHI\"],\n * \"hashesOnly: true\n * });\n * ```;\n *\n * @param event\n * @internal\n */\nexport function getAlchemyEventTag(event: AlchemyEventType): string {\n if (!isAlchemyEvent(event)) {\n throw new Error('Event tag requires AlchemyEventType');\n }\n\n if (event.method === AlchemySubscription.PENDING_TRANSACTIONS) {\n return serializePendingTransactionsEvent(event);\n } else if (event.method === AlchemySubscription.MINED_TRANSACTIONS) {\n return serializeMinedTransactionsEvent(event);\n } else {\n throw new Error(`Unrecognized AlchemyFilterEvent: ${event}`);\n }\n}\n\nexport function verifyAlchemyEventName(eventName: AlchemyEventFilter): void {\n if (!Object.values(AlchemySubscription).includes(eventName.method)) {\n throw new Error(\n `Invalid method name ${\n eventName.method\n }. Accepted method names: ${Object.values(AlchemySubscription)}`\n );\n }\n}\n\n/**\n * Serializes the provided {@link AlchemyPendingTransactionsEventFilter} into an ethers\n * compatible event tag.\n *\n * For the example event:\n * ```\n * {\n * \"method\": \"alchemy_pendingTransactions\",\n * \"fromAddress\": \"0xABC\",\n * \"toAddress\": [\"0xDEF\", \"0xGHI\"],\n * \"hashesOnly: true\n * }\n * ```\n *\n * The resulting serialization is:\n * `alchemy_pendingTransactions:0xABC:0xDEF|0xGHI:true`\n *\n * If a field is omitted, it is replaced with a `*`.\n */\nfunction serializePendingTransactionsEvent(\n event: AlchemyPendingTransactionsEventFilter\n): string {\n const fromAddress = serializeAddressField(event.fromAddress);\n const toAddress = serializeAddressField(event.toAddress);\n const hashesOnly = serializeBooleanField(event.hashesOnly);\n return (\n ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE +\n ':' +\n fromAddress +\n ':' +\n toAddress +\n ':' +\n hashesOnly\n );\n}\n\n/**\n * Serializes the provided {@link AlchemyPendingTransactionsEventFilter} into an ethers\n * compatible event tag.\n *\n * For the example event:\n * ```\n * {\n * \"method\": \"alchemy_minedTransactions\",\n * \"addresses\": [\n * {\n * from: \"0xABC\"\n * },\n * {\n * to: \"0xDEF\",\n * from: \"0x123\"\n * }\n * ]\n * \"includeRemoved\": false\n * \"hashesOnly: true\n * }\n * ```\n *\n * The resulting serialization is:\n * `alchemy_minedTransactions:*,0xABC|0xDEF,0x123:false:true`\n *\n * If a field is omitted, it is replaced with a `*`.\n *\n * The `addresses` array is split by the '|' character, and each to/from address\n * pair is separated by a ',' character.\n *\n */\nfunction serializeMinedTransactionsEvent(\n event: AlchemyMinedTransactionsEventFilter\n): string {\n const addresses = serializeAddressesField(event.addresses);\n const includeRemoved = serializeBooleanField(event.includeRemoved);\n const hashesOnly = serializeBooleanField(event.hashesOnly);\n return (\n ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE +\n ':' +\n addresses +\n ':' +\n includeRemoved +\n ':' +\n hashesOnly\n );\n}\n\nfunction serializeAddressesField(\n addresses: AlchemyMinedTransactionsAddress[] | undefined\n): string {\n if (addresses === undefined) {\n return '*';\n }\n\n return addresses\n .map(\n filter =>\n serializeAddressField(filter.to) +\n ',' +\n serializeAddressField(filter.from)\n )\n .join('|');\n}\n\nfunction serializeAddressField(\n field: string | Array | undefined\n): string {\n if (field === undefined) {\n return '*';\n } else if (Array.isArray(field)) {\n return field.join('|');\n } else {\n return field;\n }\n}\n\nfunction serializeBooleanField(field: boolean | undefined): string | undefined {\n if (field === undefined) {\n return '*';\n } else {\n return field.toString();\n }\n}\n\nexport function deserializeTopics(data: string): any {\n if (data === '') {\n return [];\n }\n\n return data.split(/&/g).map(topic => {\n if (topic === '') {\n return [];\n }\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 deserializeAddressField(data: string): string | string[] | undefined {\n if (data === '') {\n return undefined;\n }\n\n const addresses = data.split('|');\n return addresses.length === 1 ? addresses[0] : addresses;\n}\n\nfunction deserializeAddressesField(\n data: string\n): NonEmptyArray | undefined {\n if (data === '') {\n return undefined;\n }\n\n // Perform a cast here since TS doesn't know we're guaranteed a non-empty\n // array from deserializing.\n return data\n .split('|')\n .map(addressStr => addressStr.split(','))\n .map(addressPair => ({\n ...(addressPair[0] !== '*' && { to: addressPair[0] }),\n ...(addressPair[1] !== '*' && { from: addressPair[1] })\n })) as NonEmptyArray;\n}\n","import type { Listener } from '@ethersproject/abstract-provider';\n\nimport { isAlchemyEvent } from '../internal/ethers-event';\nimport {\n AlchemyEventType,\n AlchemyMinedTransactionsAddress,\n AlchemySubscription,\n NonEmptyArray\n} from '../types/types';\nimport { AlchemyConfig } from './alchemy-config';\n\n/**\n * The Websocket namespace contains all subscription related functions that\n * allow you to subscribe to events and receive updates as they occur. The\n * underlying WebSocket provider has additional logic to handle reconnections\n * and automatically backfills missed events.\n *\n * Do not call this constructor directly. Instead, instantiate an Alchemy object\n * with `const alchemy = new Alchemy(config)` and then access the core namespace\n * via `alchemy.ws`.\n */\nexport class WebSocketNamespace {\n /** @internal */\n constructor(private readonly config: AlchemyConfig) {}\n\n /**\n * Adds a listener to be triggered for each {@link eventName} event. Also\n * includes Alchemy's Subscription API events. See {@link AlchemyEventType} for\n * how to use them.\n *\n * @param eventName The event to listen for.\n * @param listener The listener to call when the event is triggered.\n * @public\n */\n on(eventName: AlchemyEventType, listener: Listener): this {\n void (async () => {\n const provider = await this.config.getWebSocketProvider();\n const processedEvent = await this._resolveEnsAlchemyEvent(eventName);\n provider.on(processedEvent, listener);\n })();\n return this;\n }\n\n /**\n * Adds a listener to be triggered for only the next {@link eventName} event,\n * after which it will be removed. Also includes Alchemy's Subscription API\n * events. See {@link AlchemyEventType} for how to use them.\n *\n * @param eventName The event to listen for.\n * @param listener The listener to call when the event is triggered.\n * @public\n */\n once(eventName: AlchemyEventType, listener: Listener): this {\n void (async () => {\n const provider = await this.config.getWebSocketProvider();\n const processedEvent = await this._resolveEnsAlchemyEvent(eventName);\n provider.once(processedEvent, listener);\n })();\n return this;\n }\n\n /**\n * Removes the provided {@link listener} for the {@link eventName} event. If no\n * listener is provided, all listeners for the event will be removed.\n *\n * @param eventName The event to unlisten to.\n * @param listener The listener to remove.\n * @public\n */\n off(eventName: AlchemyEventType, listener?: Listener): this {\n void (async () => {\n const provider = await this.config.getWebSocketProvider();\n const processedEvent = await this._resolveEnsAlchemyEvent(eventName);\n return provider.off(processedEvent, listener);\n })();\n return this;\n }\n\n /**\n * Remove all listeners for the provided {@link eventName} event. If no event\n * is provided, all events and their listeners are removed.\n *\n * @param eventName The event to remove all listeners for.\n * @public\n */\n removeAllListeners(eventName?: AlchemyEventType): this {\n void (async () => {\n const provider = await this.config.getWebSocketProvider();\n const processedEvent = eventName\n ? await this._resolveEnsAlchemyEvent(eventName)\n : undefined;\n provider.removeAllListeners(processedEvent);\n })();\n return this;\n }\n\n /**\n * Returns the number of listeners for the provided {@link eventName} event. If\n * no event is provided, the total number of listeners for all events is returned.\n *\n * @param eventName The event to get the number of listeners for.\n * @public\n */\n async listenerCount(eventName?: AlchemyEventType): Promise {\n const provider = await this.config.getWebSocketProvider();\n const processedEvent = eventName\n ? await this._resolveEnsAlchemyEvent(eventName)\n : undefined;\n return provider.listenerCount(processedEvent);\n }\n\n /**\n * Returns an array of listeners for the provided {@link eventName} event. If\n * no event is provided, all listeners will be included.\n *\n * @param eventName The event to get the listeners for.\n */\n async listeners(eventName?: AlchemyEventType): Promise {\n const provider = await this.config.getWebSocketProvider();\n const processedEvent = eventName\n ? await this._resolveEnsAlchemyEvent(eventName)\n : undefined;\n return provider.listeners(processedEvent);\n }\n\n /**\n * Converts ENS addresses in an Alchemy Event to the underlying resolved\n * address.\n *\n * VISIBLE ONLY FOR TESTING.\n *\n * @internal\n */\n async _resolveEnsAlchemyEvent(\n eventName: AlchemyEventType\n ): Promise {\n if (!isAlchemyEvent(eventName)) {\n return eventName;\n }\n\n if (\n eventName.method === AlchemySubscription.MINED_TRANSACTIONS &&\n eventName.addresses\n ) {\n const processedAddresses: AlchemyMinedTransactionsAddress[] = [];\n for (const address of eventName.addresses) {\n if (address.to) {\n address.to = await this._resolveNameOrError(address.to);\n }\n if (address.from) {\n address.from = await this._resolveNameOrError(address.from);\n }\n processedAddresses.push(address);\n }\n eventName.addresses =\n processedAddresses as NonEmptyArray;\n } else if (eventName.method === AlchemySubscription.PENDING_TRANSACTIONS) {\n if (eventName.fromAddress) {\n if (typeof eventName.fromAddress === 'string') {\n eventName.fromAddress = await this._resolveNameOrError(\n eventName.fromAddress\n );\n } else {\n eventName.fromAddress = await Promise.all(\n eventName.fromAddress.map(this._resolveNameOrError)\n );\n }\n }\n if (eventName.toAddress) {\n if (typeof eventName.toAddress === 'string') {\n eventName.toAddress = await this._resolveNameOrError(\n eventName.toAddress\n );\n } else {\n eventName.toAddress = await Promise.all(\n eventName.toAddress.map(this._resolveNameOrError)\n );\n }\n }\n }\n\n return eventName;\n }\n\n /**\n * Converts the provided ENS address or throws an error. This improves code\n * readability and type safety in other methods.\n *\n * VISIBLE ONLY FOR TESTING.\n *\n * @internal\n */\n async _resolveNameOrError(name: string): Promise {\n const provider = await this.config.getProvider();\n const resolved = await provider.resolveName(name);\n if (resolved === null) {\n throw new Error(`Unable to resolve the ENS address: ${name}`);\n }\n return resolved;\n }\n}\n","import { AlchemySettings } from '../types/types';\nimport { AlchemyConfig } from './alchemy-config';\nimport { CoreNamespace } from './core-namespace';\nimport { NftNamespace } from './nft-namespace';\nimport { NotifyNamespace } from './notify-namespace';\nimport { TransactNamespace } from './transact-namespace';\nimport { WebSocketNamespace } from './websocket-namespace';\n\n/**\n * The Alchemy SDK client. This class is the main entry point into Alchemy's\n * APIs and separates functionality into different namespaces.\n *\n * Each SDK instance is associated with a specific network and API key. To use a\n * different network or API key, create a new instance of {@link Alchemy}.\n *\n * @public\n */\nexport class Alchemy {\n /**\n * The `core` namespace contains the core eth json-rpc calls and Alchemy's\n * Enhanced APIs.\n */\n readonly core: CoreNamespace;\n\n /** The `nft` namespace contains methods for Alchemy's NFT API. */\n readonly nft: NftNamespace;\n\n /** The `ws` namespace contains methods for using WebSockets and creating subscriptions. */\n readonly ws: WebSocketNamespace;\n\n /**\n * The `transact` namespace contains methods for sending transactions and\n * checking on the state of submitted transasctions.\n */\n readonly transact: TransactNamespace;\n\n /**\n * Holds the setting information for the instance of the Alchemy SDK client\n * and allows access to the underlying providers.\n */\n readonly config: AlchemyConfig;\n\n /**\n * The `notify` namespace contains methods for creating and managing webhooks\n * as part of the Notify API.\n */\n readonly notify: NotifyNamespace;\n\n /**\n * @param {string} [settings.apiKey] - The API key to use for Alchemy\n * @param {Network} [settings.network] - The network to use for Alchemy\n * @param {number} [settings.maxRetries] - The maximum number of retries to attempt\n * @public\n */\n constructor(settings?: AlchemySettings) {\n this.config = new AlchemyConfig(settings);\n\n this.core = new CoreNamespace(this.config);\n this.nft = new NftNamespace(this.config);\n this.ws = new WebSocketNamespace(this.config);\n this.transact = new TransactNamespace(this.config);\n this.notify = new NotifyNamespace(this.config);\n }\n}\n","import {\n BlockTag,\n FeeData,\n Provider,\n TransactionRequest,\n TransactionResponse\n} from '@ethersproject/abstract-provider';\nimport { ExternallyOwnedAccount } from '@ethersproject/abstract-signer';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { BytesLike } from '@ethersproject/bytes';\nimport { Deferrable } from '@ethersproject/properties';\nimport { SigningKey } from '@ethersproject/signing-key';\nimport { Wallet as EthersWallet } from '@ethersproject/wallet';\n\nimport { Alchemy } from './alchemy';\n\n/**\n * The Wallet class inherits Signer and can sign transactions and messages using\n * a private key as a standard Externally Owned Account (EOA).\n *\n * SDK's custom implementation of Ethers.js's 'Wallet'.\n *\n * Primary difference from Ethers.js 'Wallet' is that you can pass in either a\n * Provider or an Alchemy object. This implementation will intelligently detect\n * the format and set the provider accordingly.\n *\n * @public\n * @override\n */\nexport class Wallet extends EthersWallet {\n private alchemyProviderPromise?: Promise;\n\n /**\n * Overload permits users to pass in either a standard Provider or an Alchemy\n * object. The constructor will detect the object type and handle appropriately.\n *\n * @override\n */\n constructor(\n privateKey: BytesLike | ExternallyOwnedAccount | SigningKey,\n alchemyOrProvider?: Alchemy | Provider\n ) {\n // If object passed in is a provider, send to super\n let superProvider: Provider | undefined;\n if (alchemyOrProvider && Provider.isProvider(alchemyOrProvider)) {\n superProvider = alchemyOrProvider;\n }\n super(privateKey, superProvider);\n\n // If object passed in is an Alchemy object, just set Alchemy\n if (alchemyOrProvider && !Provider.isProvider(alchemyOrProvider)) {\n this.alchemyProviderPromise = alchemyOrProvider.config.getProvider();\n }\n }\n\n //////////////////////////////////////////////////////////////////\n // Set of overrides from Signer to handle async provider retrieval.\n //////////////////////////////////////////////////////////////////\n\n /**\n * Returns the balance of this wallet at blockTag.\n *\n * @param blockTag The block to check the balance of\n * @override\n */\n getBalance(blockTag?: BlockTag): Promise {\n return this.getWallet().then(wallet => wallet.getBalance(blockTag));\n }\n\n /**\n * Returns the number of transactions this account has ever sent. This is the\n * value required to be included in transactions as the nonce.\n *\n * @param blockTag The block to check the transaction count on\n * @override\n */\n getTransactionCount(blockTag?: BlockTag): Promise {\n return this.getWallet().then(wallet =>\n wallet.getTransactionCount(blockTag)\n );\n }\n\n /**\n * Returns the result of estimating the cost to send the transactionRequest,\n * with this account address being used as the from field.\n *\n * @param transaction Transaction to estimate the gas on\n * @override\n */\n estimateGas(transaction: Deferrable): Promise {\n return this.getWallet().then(wallet => wallet.estimateGas(transaction));\n }\n\n /**\n * Returns the result of calling using the transactionRequest, with this\n * account address being used as the from field.\n *\n * @param transaction To make a call on\n * @param blockTag The block to make the call on\n * @override\n */\n call(\n transaction: Deferrable,\n blockTag?: BlockTag\n ): Promise {\n return this.getWallet().then(wallet => wallet.call(transaction, blockTag));\n }\n\n /**\n * Populates all fields in a transaction, signs it and sends it to the network\n *\n * @override\n */\n sendTransaction(\n transaction: Deferrable\n ): Promise {\n return this.getWallet().then(wallet => wallet.sendTransaction(transaction));\n }\n\n /**\n * Returns the chain ID this wallet is connected to.\n *\n * @override\n */\n getChainId(): Promise {\n return this.getWallet().then(wallet => wallet.getChainId());\n }\n\n /**\n * Returns the current gas price.\n *\n * @override\n */\n getGasPrice(): Promise {\n return this.getWallet().then(wallet => wallet.getGasPrice());\n }\n\n /**\n * Returns the current recommended FeeData to use in a transaction.\n *\n * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas\n * should be used.\n *\n * For legacy transactions and networks which do not support EIP-1559, the\n * gasPrice should be used.\n *\n * @override\n */\n getFeeData(): Promise {\n return this.getWallet().then(wallet => wallet.getFeeData());\n }\n\n /**\n * Looks up the address of name. If the name is not owned, or does not have a\n * Resolver configured, or the Resolver does not have an address configured,\n * null is returned.\n *\n * @param name Name of the ENS address\n * @override\n */\n resolveName(name: string): Promise {\n return this.getWallet().then(wallet => wallet.resolveName(name));\n }\n\n private async getWallet() {\n if (!this.alchemyProviderPromise) {\n return this.connect(this.provider);\n }\n return this.connect(await this.alchemyProviderPromise);\n }\n}\n","import {\n Contract as EthersContract,\n ContractFactory as EthersContractFactory\n} from '@ethersproject/contracts';\n\n/**\n * The Contract class is a wrapper around the Contract class from ethers.js and\n * is exported here for convenience.\n *\n * @public\n */\n// TODO: support passing in Alchemy instance into the contract.\nexport class Contract extends EthersContract {}\n\n/**\n * The ContractFactory class is a wrapper around the ContractFactory class from\n * ethers.js and is exported here for convenience.\n *\n * @public\n */\nexport class ContractFactory extends EthersContractFactory {}\n"],"names":["Network","TokenBalanceType","AssetTransfersCategory","AssetTransfersOrder","NftTokenType","NftSpamClassification","NftExcludeFilters","NftFilters","NftOrdering","SortingOrder","NftSaleMarketplace","NftSaleTakerType","RefreshState","OpenSeaSafelistRequestStatus","AlchemySubscription","GasOptimizedTransactionStatus","WebhookVersion","WebhookType","BigNumber","axios","EthersWallet","Provider","EthersContract","EthersContractFactory"],"mappings":";;;;;;;;;;;;;AA0DA;;;;;;;AAOG;AACSA,yBAoBX;AApBD,CAAA,UAAY,OAAO,EAAA;AACjB,IAAA,OAAA,CAAA,aAAA,CAAA,GAAA,aAA2B,CAAA;;AAE3B,IAAA,OAAA,CAAA,aAAA,CAAA,GAAA,aAA2B,CAAA;AAC3B,IAAA,OAAA,CAAA,YAAA,CAAA,GAAA,YAAyB,CAAA;;AAEzB,IAAA,OAAA,CAAA,WAAA,CAAA,GAAA,WAAuB,CAAA;;AAEvB,IAAA,OAAA,CAAA,aAAA,CAAA,GAAA,aAA2B,CAAA;AAC3B,IAAA,OAAA,CAAA,aAAA,CAAA,GAAA,aAA2B,CAAA;;AAE3B,IAAA,OAAA,CAAA,WAAA,CAAA,GAAA,WAAuB,CAAA;AACvB,IAAA,OAAA,CAAA,YAAA,CAAA,GAAA,YAAyB,CAAA;AACzB,IAAA,OAAA,CAAA,aAAA,CAAA,GAAA,aAA2B,CAAA;;AAE3B,IAAA,OAAA,CAAA,aAAA,CAAA,GAAA,aAA2B,CAAA;AAC3B,IAAA,OAAA,CAAA,YAAA,CAAA,GAAA,YAAyB,CAAA;AACzB,IAAA,OAAA,CAAA,eAAA,CAAA,GAAA,iBAAiC,CAAA;AACjC,IAAA,OAAA,CAAA,cAAA,CAAA,GAAA,gBAA+B,CAAA;AAC/B,IAAA,OAAA,CAAA,eAAA,CAAA,GAAA,eAA+B,CAAA;AACjC,CAAC,EApBWA,eAAO,KAAPA,eAAO,GAoBlB,EAAA,CAAA,CAAA,CAAA;AAED;AACYC,kCAaX;AAbD,CAAA,UAAY,gBAAgB,EAAA;AAC1B;;;AAGG;AACH,IAAA,gBAAA,CAAA,gBAAA,CAAA,GAAA,gBAAiC,CAAA;AAEjC;;;;AAIG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U,EAAE,CAAC,CAAC;KAC7D;AAED;;;;;;;AAOG;AACH,IAAA,WAAW,CAAC,IAAY,EAAA;AACtB,QAAA,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;KAClE;IAEa,SAAS,GAAA;;AACrB,YAAA,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE;gBAChC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACpC,aAAA;YACD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,sBAAsB,CAAC,CAAC;SACxD,CAAA,CAAA;AAAA,KAAA;AACF;;ACrKD;;;;;AAKG;AACH;AACM,MAAO,QAAS,SAAQC,kBAAc,CAAA;AAAG,CAAA;AAE/C;;;;;AAKG;AACG,MAAO,eAAgB,SAAQC,yBAAqB,CAAA;AAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/test/node_modules/alchemy-sdk/dist/cjs/index.js b/test/node_modules/alchemy-sdk/dist/cjs/index.js new file mode 100644 index 0000000..378ac72 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/index.js @@ -0,0 +1,116 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var utils = require('./api/utils'); +var index = require('./index-e8114eb4.js'); +require('@ethersproject/bignumber'); +require('axios'); +require('@ethersproject/abstract-provider'); +require('@ethersproject/wallet'); +require('@ethersproject/contracts'); + +function _interopNamespace(e) { + if (e && e.__esModule) return e; + var n = Object.create(null); + if (e) { + Object.keys(e).forEach(function (k) { + if (k !== 'default') { + var d = Object.getOwnPropertyDescriptor(e, k); + Object.defineProperty(n, k, d.get ? d : { + enumerable: true, + get: function () { return e[k]; } + }); + } + }); + } + n["default"] = e; + return Object.freeze(n); +} + +var utils__namespace = /*#__PURE__*/_interopNamespace(utils); + + + +exports.Utils = utils__namespace; +exports.Alchemy = index.Alchemy; +Object.defineProperty(exports, 'AlchemySubscription', { + enumerable: true, + get: function () { return index.AlchemySubscription; } +}); +Object.defineProperty(exports, 'AssetTransfersCategory', { + enumerable: true, + get: function () { return index.AssetTransfersCategory; } +}); +Object.defineProperty(exports, 'AssetTransfersOrder', { + enumerable: true, + get: function () { return index.AssetTransfersOrder; } +}); +exports.Contract = index.Contract; +exports.ContractFactory = index.ContractFactory; +Object.defineProperty(exports, 'GasOptimizedTransactionStatus', { + enumerable: true, + get: function () { return index.GasOptimizedTransactionStatus; } +}); +Object.defineProperty(exports, 'Network', { + enumerable: true, + get: function () { return index.Network; } +}); +Object.defineProperty(exports, 'NftExcludeFilters', { + enumerable: true, + get: function () { return index.NftExcludeFilters; } +}); +Object.defineProperty(exports, 'NftFilters', { + enumerable: true, + get: function () { return index.NftFilters; } +}); +Object.defineProperty(exports, 'NftOrdering', { + enumerable: true, + get: function () { return index.NftOrdering; } +}); +Object.defineProperty(exports, 'NftSaleMarketplace', { + enumerable: true, + get: function () { return index.NftSaleMarketplace; } +}); +Object.defineProperty(exports, 'NftSaleTakerType', { + enumerable: true, + get: function () { return index.NftSaleTakerType; } +}); +Object.defineProperty(exports, 'NftSpamClassification', { + enumerable: true, + get: function () { return index.NftSpamClassification; } +}); +Object.defineProperty(exports, 'NftTokenType', { + enumerable: true, + get: function () { return index.NftTokenType; } +}); +Object.defineProperty(exports, 'OpenSeaSafelistRequestStatus', { + enumerable: true, + get: function () { return index.OpenSeaSafelistRequestStatus; } +}); +Object.defineProperty(exports, 'RefreshState', { + enumerable: true, + get: function () { return index.RefreshState; } +}); +Object.defineProperty(exports, 'SortingOrder', { + enumerable: true, + get: function () { return index.SortingOrder; } +}); +Object.defineProperty(exports, 'TokenBalanceType', { + enumerable: true, + get: function () { return index.TokenBalanceType; } +}); +exports.Wallet = index.Wallet; +Object.defineProperty(exports, 'WebhookType', { + enumerable: true, + get: function () { return index.WebhookType; } +}); +Object.defineProperty(exports, 'WebhookVersion', { + enumerable: true, + get: function () { return index.WebhookVersion; } +}); +exports.fromHex = index.fromHex; +exports.isHex = index.isHex; +exports.setLogLevel = index.setLogLevel; +exports.toHex = index.toHex; +//# sourceMappingURL=index.js.map diff --git a/test/node_modules/alchemy-sdk/dist/cjs/index.js.map b/test/node_modules/alchemy-sdk/dist/cjs/index.js.map new file mode 100644 index 0000000..d6f8d15 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/api/alchemy-config.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/api/alchemy-config.d.ts new file mode 100644 index 0000000..0ba461a --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/api/alchemy-config.d.ts @@ -0,0 +1,54 @@ +import { AlchemySettings, Network } from '../types/types'; +import type { AlchemyProvider } from './alchemy-provider'; +import type { AlchemyWebSocketProvider } from './alchemy-websocket-provider'; +/** + * This class holds the config information for the SDK client instance and + * exposes the underlying providers for more advanced use cases. + * + * @public + */ +export declare class AlchemyConfig { + /** The Alchemy API key. */ + readonly apiKey: string; + /** The Network that this SDK is associated with. */ + readonly network: Network; + /** The maximum number of retries to perform. */ + readonly maxRetries: number; + /** Setting to enable automatic batching on json-rpc requests. Defaults to false.*/ + readonly batchRequests: boolean; + /** + * The optional hardcoded URL to send requests to instead of using the network + * and apiKey. + */ + readonly url?: string; + /** The optional Alchemy auth token to use when sending requests with the Notify API. */ + readonly authToken?: string; + constructor(config?: AlchemySettings); + /** + * Returns an AlchemyProvider instance. Only one provider is created per + * Alchemy instance. + * + * The AlchemyProvider is a wrapper around ether's `AlchemyProvider` class and + * has been expanded to support Alchemy's Enhanced APIs. + * + * Most common methods on the provider are available as top-level methods on + * the {@link Alchemy} instance, but the provider is exposed here to access + * other less-common methods. + * + * @public + */ + getProvider(): Promise; + /** + * Returns an AlchemyWebsocketProvider instance. Only one provider is created + * per Alchemy instance. + * + * The AlchemyWebSocketProvider is a wrapper around ether's + * `AlchemyWebSocketProvider` class and has been expanded to support Alchemy's + * Subscription APIs, automatic backfilling, and other performance improvements. + * + * Most common methods on the provider are available as top-level methods on + * the {@link Alchemy} instance, but the provider is exposed here to access + * other less-common methods. + */ + getWebSocketProvider(): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/api/alchemy-contract.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/api/alchemy-contract.d.ts new file mode 100644 index 0000000..a1766ad --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/api/alchemy-contract.d.ts @@ -0,0 +1,17 @@ +import { Contract as EthersContract, ContractFactory as EthersContractFactory } from '@ethersproject/contracts'; +/** + * The Contract class is a wrapper around the Contract class from ethers.js and + * is exported here for convenience. + * + * @public + */ +export declare class Contract extends EthersContract { +} +/** + * The ContractFactory class is a wrapper around the ContractFactory class from + * ethers.js and is exported here for convenience. + * + * @public + */ +export declare class ContractFactory extends EthersContractFactory { +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/api/alchemy-provider.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/api/alchemy-provider.d.ts new file mode 100644 index 0000000..4e2d71e --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/api/alchemy-provider.d.ts @@ -0,0 +1,40 @@ +import { Network as NetworkFromEthers } from '@ethersproject/networks'; +import { CommunityResourcable, JsonRpcProvider } from '@ethersproject/providers'; +/** + * SDK's custom implementation of ethers.js's 'AlchemyProvider'. + * + * Do not call this constructor directly. Instead, instantiate an instance of + * {@link Alchemy} and call {@link Alchemy.config.getProvider()}. + * + * @public + */ +export declare class AlchemyProvider extends JsonRpcProvider implements CommunityResourcable { + readonly apiKey: string; + readonly maxRetries: number; + readonly batchRequests: boolean; + /** + * Overrides the method in ethers.js's `StaticJsonRpcProvider` class. This + * method is called when calling methods on the parent class `BaseProvider`. + * + * @override + */ + detectNetwork(): Promise; + _startPending(): void; + /** + * Overrides the ether's `isCommunityResource()` method. Returns true if the + * current api key is the default key. + * + * @override + */ + isCommunityResource(): boolean; + /** + * Overrides the base {@link JsonRpcProvider.send} method to implement custom + * logic for sending requests to Alchemy. + * + * @param method The method name to use for the request. + * @param params The parameters to use for the request. + * @override + * @public + */ + send(method: string, params: Array): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/api/alchemy-wallet.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/api/alchemy-wallet.d.ts new file mode 100644 index 0000000..026d469 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/api/alchemy-wallet.d.ts @@ -0,0 +1,103 @@ +import { BlockTag, FeeData, Provider, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; +import { ExternallyOwnedAccount } from '@ethersproject/abstract-signer'; +import { BigNumber } from '@ethersproject/bignumber'; +import { BytesLike } from '@ethersproject/bytes'; +import { Deferrable } from '@ethersproject/properties'; +import { SigningKey } from '@ethersproject/signing-key'; +import { Wallet as EthersWallet } from '@ethersproject/wallet'; +import { Alchemy } from './alchemy'; +/** + * The Wallet class inherits Signer and can sign transactions and messages using + * a private key as a standard Externally Owned Account (EOA). + * + * SDK's custom implementation of Ethers.js's 'Wallet'. + * + * Primary difference from Ethers.js 'Wallet' is that you can pass in either a + * Provider or an Alchemy object. This implementation will intelligently detect + * the format and set the provider accordingly. + * + * @public + * @override + */ +export declare class Wallet extends EthersWallet { + private alchemyProviderPromise?; + /** + * Overload permits users to pass in either a standard Provider or an Alchemy + * object. The constructor will detect the object type and handle appropriately. + * + * @override + */ + constructor(privateKey: BytesLike | ExternallyOwnedAccount | SigningKey, alchemyOrProvider?: Alchemy | Provider); + /** + * Returns the balance of this wallet at blockTag. + * + * @param blockTag The block to check the balance of + * @override + */ + getBalance(blockTag?: BlockTag): Promise; + /** + * Returns the number of transactions this account has ever sent. This is the + * value required to be included in transactions as the nonce. + * + * @param blockTag The block to check the transaction count on + * @override + */ + getTransactionCount(blockTag?: BlockTag): Promise; + /** + * Returns the result of estimating the cost to send the transactionRequest, + * with this account address being used as the from field. + * + * @param transaction Transaction to estimate the gas on + * @override + */ + estimateGas(transaction: Deferrable): Promise; + /** + * Returns the result of calling using the transactionRequest, with this + * account address being used as the from field. + * + * @param transaction To make a call on + * @param blockTag The block to make the call on + * @override + */ + call(transaction: Deferrable, blockTag?: BlockTag): Promise; + /** + * Populates all fields in a transaction, signs it and sends it to the network + * + * @override + */ + sendTransaction(transaction: Deferrable): Promise; + /** + * Returns the chain ID this wallet is connected to. + * + * @override + */ + getChainId(): Promise; + /** + * Returns the current gas price. + * + * @override + */ + getGasPrice(): Promise; + /** + * Returns the current recommended FeeData to use in a transaction. + * + * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas + * should be used. + * + * For legacy transactions and networks which do not support EIP-1559, the + * gasPrice should be used. + * + * @override + */ + getFeeData(): Promise; + /** + * Looks up the address of name. If the name is not owned, or does not have a + * Resolver configured, or the Resolver does not have an address configured, + * null is returned. + * + * @param name Name of the ENS address + * @override + */ + resolveName(name: string): Promise; + private getWallet; +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/api/alchemy-websocket-provider.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/api/alchemy-websocket-provider.d.ts new file mode 100644 index 0000000..ce7a704 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/api/alchemy-websocket-provider.d.ts @@ -0,0 +1,135 @@ +import { Listener } from '@ethersproject/abstract-provider'; +import { CommunityResourcable, WebSocketProvider } from '@ethersproject/providers'; +import { EthersEvent } from '../internal/ethers-event'; +import { AlchemyEventType } from '../types/types'; +/** + * SDK's custom implementation fo the ethers.js's 'AlchemyWebSocketProvider'. + * + * Do not call this constructor directly. Instead, instantiate an instance of + * {@link Alchemy} and call {@link Alchemy.config.getWebSocketProvider()}. + * + * @public + */ +export declare class AlchemyWebSocketProvider extends WebSocketProvider implements CommunityResourcable { + _events: Array; + readonly apiKey: string; + /** + * Overridden implementation of ethers that includes Alchemy based subscriptions. + * + * @param eventName Event to subscribe to + * @param listener The listener function to call when the event is triggered. + * @override + * @public + */ + on(eventName: AlchemyEventType, listener: Listener): this; + /** + * Overridden implementation of ethers that includes Alchemy based + * subscriptions. Adds a listener to the triggered for only the next + * {@link eventName} event, after which it will be removed. + * + * @param eventName Event to subscribe to + * @param listener The listener function to call when the event is triggered. + * @override + * @public + */ + once(eventName: AlchemyEventType, listener: Listener): this; + /** + * Removes the provided {@link listener} for the {@link eventName} event. If no + * listener is provided, all listeners for the event will be removed. + * + * @param eventName Event to unlisten to. + * @param listener The listener function to remove. + * @override + * @public + */ + off(eventName: AlchemyEventType, listener?: Listener): this; + /** + * Remove all listeners for the provided {@link eventName} event. If no event + * is provided, all events and their listeners are removed. + * + * @param eventName The event to remove all listeners for. + * @override + * @public + */ + removeAllListeners(eventName?: AlchemyEventType): this; + /** + * Returns the number of listeners for the provided {@link eventName} event. If + * no event is provided, the total number of listeners for all events is returned. + * + * @param eventName The event to get the number of listeners for. + * @public + * @override + */ + listenerCount(eventName?: AlchemyEventType): number; + /** + * Returns an array of listeners for the provided {@link eventName} event. If + * no event is provided, all listeners will be included. + * + * @param eventName The event to get the listeners for. + * @public + * @override + */ + listeners(eventName?: AlchemyEventType): Array; + /** @override */ + destroy(): Promise; + /** + * Overrides the ether's `isCommunityResource()` method. Returns true if the + * current api key is the default key. + * + * @override + */ + isCommunityResource(): boolean; + private emitEvent; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.off()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _off; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.removeAllListeners()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _removeAllListeners; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.listenerCount()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _listenerCount; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.listeners()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _listeners; +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/api/alchemy.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/api/alchemy.d.ts new file mode 100644 index 0000000..edc191f --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/api/alchemy.d.ts @@ -0,0 +1,49 @@ +import { AlchemySettings } from '../types/types'; +import { AlchemyConfig } from './alchemy-config'; +import { CoreNamespace } from './core-namespace'; +import { NftNamespace } from './nft-namespace'; +import { NotifyNamespace } from './notify-namespace'; +import { TransactNamespace } from './transact-namespace'; +import { WebSocketNamespace } from './websocket-namespace'; +/** + * The Alchemy SDK client. This class is the main entry point into Alchemy's + * APIs and separates functionality into different namespaces. + * + * Each SDK instance is associated with a specific network and API key. To use a + * different network or API key, create a new instance of {@link Alchemy}. + * + * @public + */ +export declare class Alchemy { + /** + * The `core` namespace contains the core eth json-rpc calls and Alchemy's + * Enhanced APIs. + */ + readonly core: CoreNamespace; + /** The `nft` namespace contains methods for Alchemy's NFT API. */ + readonly nft: NftNamespace; + /** The `ws` namespace contains methods for using WebSockets and creating subscriptions. */ + readonly ws: WebSocketNamespace; + /** + * The `transact` namespace contains methods for sending transactions and + * checking on the state of submitted transasctions. + */ + readonly transact: TransactNamespace; + /** + * Holds the setting information for the instance of the Alchemy SDK client + * and allows access to the underlying providers. + */ + readonly config: AlchemyConfig; + /** + * The `notify` namespace contains methods for creating and managing webhooks + * as part of the Notify API. + */ + readonly notify: NotifyNamespace; + /** + * @param {string} [settings.apiKey] - The API key to use for Alchemy + * @param {Network} [settings.network] - The network to use for Alchemy + * @param {number} [settings.maxRetries] - The maximum number of retries to attempt + * @public + */ + constructor(settings?: AlchemySettings); +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/api/core-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/api/core-namespace.d.ts new file mode 100644 index 0000000..5a5827d --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/api/core-namespace.d.ts @@ -0,0 +1,311 @@ +import type { Block, BlockTag, BlockWithTransactions, FeeData, Filter, FilterByBlockHash, Log, TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; +import type { BigNumber, BigNumberish } from '@ethersproject/bignumber'; +import type { Network as EthersNetworkAlias } from '@ethersproject/networks/lib/types'; +import type { Deferrable } from '@ethersproject/properties'; +import { AssetTransfersParams, AssetTransfersResponse, AssetTransfersWithMetadataParams, AssetTransfersWithMetadataResponse, DeployResult, TokenBalancesOptionsDefaultTokens, TokenBalancesOptionsErc20, TokenBalancesResponse, TokenBalancesResponseErc20, TokenMetadataResponse, TransactionReceiptsParams, TransactionReceiptsResponse } from '../types/types'; +/** + * The core namespace contains all commonly-used [Ethers.js + * Provider](https://docs.ethers.io/v5/api/providers/api-providers/#AlchemyProvider) + * methods. If you are already using Ethers.js, you should be simply able to + * replace the Ethers.js Provider object with `alchemy.core` when accessing + * provider methods and it should just work. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.core`. + */ +export declare class CoreNamespace { + private readonly config; + /** + * Returns the balance of a given address as of the provided block. + * + * @param addressOrName The address or name of the account to get the balance for. + * @param blockTag The optional block number or hash to get the balance for. + * Defaults to 'latest' if unspecified. + * @public + */ + getBalance(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Returns the contract code of the provided address at the block. If there is + * no contract deployed, the result is `0x`. + * + * @param addressOrName The address or name of the account to get the code for. + * @param blockTag The optional block number or hash to get the code for. + * Defaults to 'latest' if unspecified. + * @public + */ + getCode(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Return the value of the provided position at the provided address, at the + * provided block in `Bytes32` format. + * + * @param addressOrName The address or name of the account to get the code for. + * @param position The position of the storage slot to get. + * @param blockTag The optional block number or hash to get the code for. + * Defaults to 'latest' if unspecified. + * @public + */ + getStorageAt(addressOrName: string | Promise, position: BigNumberish | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Returns the number of transactions ever sent from the provided address, as + * of the provided block tag. This value is used as the nonce for the next + * transaction from the address sent to the network. + * + * @param addressOrName The address or name of the account to get the nonce for. + * @param blockTag The optional block number or hash to get the nonce for. + * @public + */ + getTransactionCount(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Returns the block from the network based on the provided block number or + * hash. Transactions on the block are represented as an array of transaction + * hashes. To get the full transaction details on the block, use + * {@link getBlockWithTransactions} instead. + * + * @param blockHashOrBlockTag The block number or hash to get the block for. + * @public + */ + getBlock(blockHashOrBlockTag: BlockTag | string | Promise): Promise; + /** + * Returns the block from the network based on the provided block number or + * hash. Transactions on the block are represented as an array of + * {@link TransactionResponse} objects. + * + * @param blockHashOrBlockTag The block number or hash to get the block for. + * @public + */ + getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise): Promise; + /** + * Returns the {@link EthersNetworkAlias} Alchemy is connected to. + * + * @public + */ + getNetwork(): Promise; + /** + * Returns the block number of the most recently mined block. + * + * @public + */ + getBlockNumber(): Promise; + /** + * Returns the best guess of the current gas price to use in a transaction. + * + * @public + */ + getGasPrice(): Promise; + /** + * Returns the recommended fee data to use in a transaction. + * + * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas + * should be used. + * + * For legacy transactions and networks which do not support EIP-1559, the + * gasPrice should be used. + * + * @public + */ + getFeeData(): Promise; + /** + * Returns a Promise which will stall until the network has heen established, + * ignoring errors due to the target node not being active yet. + * + * This can be used for testing or attaching scripts to wait until the node is + * up and running smoothly. + * + * @public + */ + ready(): Promise; + /** + * Returns the result of executing the transaction, using call. A call does + * not require any ether, but cannot change any state. This is useful for + * calling getters on Contracts. + * + * @param transaction The transaction to execute. + * @param blockTag The optional block number or hash to get the call for. + * @public + */ + call(transaction: Deferrable, blockTag?: BlockTag | Promise): Promise; + /** + * Returns an estimate of the amount of gas that would be required to submit + * transaction to the network. + * + * An estimate may not be accurate since there could be another transaction on + * the network that was not accounted for, but after being mined affects the + * relevant state. + * + * This is an alias for {@link TransactNamespace.estimateGas}. + * + * @param transaction The transaction to estimate gas for. + * @public + */ + estimateGas(transaction: Deferrable): Promise; + /** + * Returns the transaction with hash or null if the transaction is unknown. + * + * If a transaction has not been mined, this method will search the + * transaction pool. Various backends may have more restrictive transaction + * pool access (e.g. if the gas price is too low or the transaction was only + * recently sent and not yet indexed) in which case this method may also return null. + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransaction(transactionHash: string | Promise): Promise; + /** + * Returns the transaction receipt for hash or null if the transaction has not + * been mined. + * + * To stall until the transaction has been mined, consider the + * waitForTransaction method below. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransactionReceipt(transactionHash: string | Promise): Promise; + /** + * Submits transaction to the network to be mined. The transaction must be + * signed, and be valid (i.e. the nonce is correct and the account has + * sufficient balance to pay for the transaction). + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param signedTransaction The signed transaction to send. + * @public + */ + sendTransaction(signedTransaction: string | Promise): Promise; + /** + * Returns a promise which will not resolve until specified transaction hash is mined. + * + * If {@link confirmations} is 0, this method is non-blocking and if the + * transaction has not been mined returns null. Otherwise, this method will + * block until the transaction has confirmed blocks mined on top of the block + * in which it was mined. + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to wait for. + * @param confirmations The number of blocks to wait for. + * @param timeout The maximum time to wait for the transaction to confirm. + * @public + */ + waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise; + /** + * Returns an array of logs that match the provided filter. + * + * @param filter The filter object to use. + * @public + */ + getLogs(filter: Filter | FilterByBlockHash | Promise): Promise>; + /** + * Allows sending a raw message to the Alchemy backend. + * + * @param method The method to call. + * @param params The parameters to pass to the method. + * @public + */ + send(method: string, params: Array): Promise; + /** + * Finds the address that deployed the provided contract and block number it + * was deployed in. + * + * NOTE: This method performs a binary search across all blocks since genesis + * and can take a long time to complete. This method is a convenience method + * that will eventually be replaced by a single call to an Alchemy endpoint + * with this information cached. + * + * @param contractAddress - The contract address to find the deployer for. + * @beta + */ + findContractDeployer(contractAddress: string): Promise; + /** + * Returns the ERC-20 token balances for a specific owner address. + * + * @param addressOrName The owner address to get the token balances for. + * @public + */ + getTokenBalances(addressOrName: string): Promise; + /** + * Returns the token balances for a specific owner address given a list of contracts. + * + * @param addressOrName The owner address to get the token balances for. + * @param contractAddresses A list of contract addresses to check. If omitted, + * all ERC-20 tokens will be checked. + * @public + */ + getTokenBalances(addressOrName: string, contractAddresses?: string[]): Promise; + /** + * Returns the ERC-20 token balances for a specific owner. + * + * This overload covers the erc-20 token type which includes a page key in the response. + * + * @param addressOrName The owner address to get the token balances for. + * @param options Token type options set to ERC-20 with optional page key. + * @public + */ + getTokenBalances(addressOrName: string, options: TokenBalancesOptionsErc20): Promise; + /** + * Returns the token balances for a specific owner, fetching from the top 100 + * tokens by 24 hour volume. + * + * This overload covers the default token type which includes a page key in + * the response. + * + * @param addressOrName The owner address to get the token balances for. + * @param options Token type options set to ERC-20 with optional page key. + * @public + */ + getTokenBalances(addressOrName: string, options: TokenBalancesOptionsDefaultTokens): Promise; + /** + * Returns metadata for a given token contract address. + * + * @param address The contract address to get metadata for. + * @public + */ + getTokenMetadata(address: string): Promise; + /** + * Get transactions for specific addresses. See the web documentation for the + * full details: + * https://docs.alchemy.com/alchemy/enhanced-apis/transfers-api#alchemy_getassettransfers + * + * This overload requires {@link AssetTransfersWithMetadataParams.withMetadata} + * to be set to `true`, which results in additional metadata returned in the + * response object. + * + * @param params An object containing fields for the asset transfer query + * @public + */ + getAssetTransfers(params: AssetTransfersWithMetadataParams): Promise; + /** + * Get transactions for specific addresses. See the web documentation for the + * full details: + * https://docs.alchemy.com/alchemy/enhanced-apis/transfers-api#alchemy_getassettransfers + * + * @param params An object containing fields for the asset transfer query. + * @public + */ + getAssetTransfers(params: AssetTransfersParams): Promise; + /** + * Gets all transaction receipts for a given block by number or block hash. + * + * @param params An object containing fields for the transaction receipt query. + * @public + */ + getTransactionReceipts(params: TransactionReceiptsParams): Promise; + /** + * Returns the underlying owner address for the provided ENS address, or `null` + * if the ENS name does not have an underlying address. + * + * @param name The ENS address name to resolve. + */ + resolveName(name: string): Promise; + /** + * Performs a reverse lookup of the address in ENS using the Reverse Registrar. If the name does not exist, or the forward lookup does not match, null is returned. + * + * An ENS name requires additional configuration to setup a reverse record, so not all ENS addresses will map back to the original ENS domain. + * + * @param address The address to look up the ENS domain name for. + */ + lookupAddress(address: string): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/api/nft-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/api/nft-namespace.d.ts new file mode 100644 index 0000000..09e756e --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/api/nft-namespace.d.ts @@ -0,0 +1,275 @@ +import type { BigNumberish } from '@ethersproject/bignumber'; +import { GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftResponse, NftAttributeRarity, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, NftTokenType, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult } from '../types/types'; +import { BaseNft, Nft, NftContract } from './nft'; +/** + * The NFT namespace contains all the functionality related to NFTs. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.nft`. + */ +export declare class NftNamespace { + private readonly config; + /** + * Get the NFT metadata associated with the provided parameters. + * + * @param contractAddress - The contract address of the NFT. + * @param tokenId - Token id of the NFT. + * @param tokenType - Optionally specify the type of token to speed up the query. + * @param tokenUriTimeoutInMs - No set timeout by default - When metadata is + * requested, this parameter is the timeout (in milliseconds) for the + * website hosting the metadata to respond. If you want to only access the + * cache and not live fetch any metadata for cache misses then set this value to 0. + * @public + */ + getNftMetadata(contractAddress: string, tokenId: BigNumberish, tokenType?: NftTokenType, tokenUriTimeoutInMs?: number): Promise; + /** + * Gets the NFT metadata for multiple NFT tokens. + * + * @param tokens An array of NFT tokens to fetch metadata for. + * @param options Configuration options for making the request. + */ + getNftMetadataBatch(tokens: Array, options?: NftMetadataBatchOptions): Promise; + /** + * Get the NFT collection metadata associated with the provided parameters. + * + * @param contractAddress - The contract address of the NFT. + * @public + */ + getContractMetadata(contractAddress: string): Promise; + /** + * Fetches all NFTs for a given owner and yields them in an async iterable. + * + * This method returns the full NFT for the owner and pages through all page + * keys until all NFTs have been fetched. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwnerIterator(owner: string, options?: GetNftsForOwnerOptions): AsyncIterable; + /** + * Fetches all NFTs for a given owner and yields them in an async iterable. + * + * This method returns the base NFTs that omit the associated metadata and + * pages through all page keys until all NFTs have been fetched. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwnerIterator(owner: string, options?: GetBaseNftsForOwnerOptions): AsyncIterable; + /** + * Get all NFTs for an owner. + * + * This method returns the full NFTs in the contract. To get all NFTs without + * their associated metadata, use {@link GetBaseNftsForOwnerOptions}. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwner(owner: string, options?: GetNftsForOwnerOptions): Promise; + /** + * Get all base NFTs for an owner. + * + * This method returns the base NFTs that omit the associated metadata. To get + * all NFTs with their associated metadata, use {@link GetNftsForOwnerOptions}. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwner(owner: string, options?: GetBaseNftsForOwnerOptions): Promise; + /** + * Get all NFTs for a given contract address. + * + * This method returns the full NFTs in the contract. To get all NFTs without + * their associated metadata, use {@link GetBaseNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The parameters to use for the request. or + * {@link NftContractNftsResponse} response. + * @beta + */ + getNftsForContract(contractAddress: string, options?: GetNftsForContractOptions): Promise; + /** + * Get all base NFTs for a given contract address. + * + * This method returns the base NFTs that omit the associated metadata. To get + * all NFTs with their associated metadata, use {@link GetNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftsForContract(contractAddress: string, options?: GetBaseNftsForContractOptions): Promise; + /** + * Fetches all NFTs for a given contract address and yields them in an async iterable. + * + * This method returns the full NFTs in the contract and pages through all + * page keys until all NFTs have been fetched. To get all NFTs without their + * associated metadata, use {@link GetBaseNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftsForContractIterator(contractAddress: string, options?: GetNftsForContractOptions): AsyncIterable; + /** + * Fetches all base NFTs for a given contract address and yields them in an + * async iterable. + * + * This method returns the base NFTs that omit the associated metadata and + * pages through all page keys until all NFTs have been fetched. To get all + * NFTs with their associated metadata, use {@link GetNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftsForContractIterator(contractAddress: string, options?: GetBaseNftsForContractOptions): AsyncIterable; + /** + * Gets all the owners for a given NFT contract along with the token balance. + * + * @param contractAddress - The NFT contract to get the owners for. + * @param options Optional parameters to use for the request. + * @public + */ + getOwnersForContract(contractAddress: string, options: GetOwnersForContractWithTokenBalancesOptions): Promise; + /** + * Gets all the owners for a given NFT contract. + * + * Note that token balances are omitted by default. To include token balances + * for each owner, use {@link GetOwnersForContractWithTokenBalancesOptions}, + * which has the `withTokenBalances` field set to `true`. + * + * @param contractAddress - The NFT contract to get the owners for. + * @param options Optional parameters to use for the request. + * @public + */ + getOwnersForContract(contractAddress: string, options?: GetOwnersForContractOptions): Promise; + /** + * Gets all the owners for a given NFT contract address and token ID. + * + * @param contractAddress - The NFT contract address. + * @param tokenId - Token id of the NFT. + * @beta + */ + getOwnersForNft(contractAddress: string, tokenId: BigNumberish): Promise; + /** + * Gets all NFT contracts held by the specified owner address. + * + * @param owner - Address for NFT owner (can be in ENS format!). + * @param options - The optional parameters to use for the request. + * @public + */ + getContractsForOwner(owner: string, options?: GetContractsForOwnerOptions): Promise; + /** + * DEPRECATED - Checks that the provided owner address owns one of more of the + * provided NFTs. + * + * @deprecated - Use {@link verifyNftOwnership} instead. This method will be + * removed in a future release. + * @param owner - The owner address to check. + * @param contractAddresses - An array of NFT contract addresses to check ownership for. + */ + checkNftOwnership(owner: string, contractAddresses: string[]): Promise; + /** + * Checks that the provided owner address owns one of more of the provided + * NFT. Returns a boolean indicating whether the owner address owns the provided NFT. + * + * @param owner - The owner address to check. + * @param contractAddress - An NFT contract address to check ownership for. + */ + verifyNftOwnership(owner: string, contractAddress: string): Promise; + /** + * Checks which of the provided NFTs the owner address owns. Returns a map of + * contract address to a boolean indicating whether the owner address owns the NFT. + * + * @param owner - The owner address to check. + * @param contractAddresses - An array NFT contract address to check ownership for. + */ + verifyNftOwnership(owner: string, contractAddresses: string[]): Promise<{ + [contractAddress: string]: boolean; + }>; + /** + * Returns whether a contract is marked as spam or not by Alchemy. For more + * information on how we classify spam, go to our NFT API FAQ at + * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification. + * + * @param contractAddress - The contract address to check. + * @beta + */ + isSpamContract(contractAddress: string): Promise; + /** + * Returns a list of all spam contracts marked by Alchemy. For details on how + * Alchemy marks spam contracts, go to + * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification. + * + * @beta + */ + getSpamContracts(): Promise; + /** + * Returns the floor prices of a NFT contract by marketplace. + * + * @param contractAddress - The contract address for the NFT collection. + * @beta + */ + getFloorPrice(contractAddress: string): Promise; + /** + * Returns NFT sales that have happened through on-chain marketplaces. + * + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftSales(options?: GetNftSalesOptions): Promise; + getNftSales(options?: GetNftSalesOptionsByContractAddress): Promise; + /** + * Get the rarity of each attribute of an NFT. + * + * @param contractAddress - Contract address for the NFT collection. + * @param tokenId - Token id of the NFT. + */ + computeRarity(contractAddress: string, tokenId: BigNumberish): Promise; + /** + * Search for a keyword across metadata of all ERC-721 and ERC-1155 smart contracts. + * + * @param query - The search string that you want to search for in contract metadata. + */ + searchContractMetadata(query: string): Promise; + /** + * Get a summary of attribute prevalence for an NFT collection. + * + * @param contractAddress - Contract address for the NFT collection. + */ + summarizeNftAttributes(contractAddress: string): Promise; + /** + * Refreshes the cached metadata for a provided NFT contract address and token + * id. Returns a boolean value indicating whether the metadata was refreshed. + * + * This method is useful when you want to refresh the metadata for a NFT that + * has been updated since the last time it was fetched. Note that the backend + * only allows one refresh per token every 15 minutes, globally for all users. + * The last refresh time for an NFT can be accessed on the + * {@link Nft.timeLastUpdated} field. + * + * To trigger a refresh for all NFTs in a contract, use {@link refreshContract} instead. + * + * @param contractAddress - The contract address of the NFT. + * @param tokenId - The token id of the NFT. + */ + refreshNftMetadata(contractAddress: string, tokenId: BigNumberish): Promise; + /** + * Triggers a metadata refresh all NFTs in the provided contract address. This + * method is useful after an NFT collection is revealed. + * + * Refreshes are queued on the Alchemy backend and may take time to fully + * process. To refresh the metadata for a specific token, use the + * {@link refreshNftMetadata} method instead. + * + * @param contractAddress - The contract address of the NFT collection. + * @beta + */ + refreshContract(contractAddress: string): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/api/nft.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/api/nft.d.ts new file mode 100644 index 0000000..b51d2bd --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/api/nft.d.ts @@ -0,0 +1,86 @@ +import { Media, NftMetadata, NftTokenType, OpenSeaCollectionMetadata, SpamInfo, TokenUri } from '../types/types'; +/** + * Alchemy representation of a base NFT contract that doesn't contain metadata. + * + * The BaseNftContract does not hold any metadata information and only contains + * the address. The NftContract additionally contains the tokenType, name, + * symbol, and more. + * + * @public + */ +export interface BaseNftContract { + /** The address of the contract. */ + address: string; +} +/** + * Alchemy representation of an NFT contract. + * + * The BaseNftContract does not hold any metadata information and only contains + * the address. The NftContract additionally contains the tokenType, name, + * symbol, and more. + * + * @public + */ +export interface NftContract extends BaseNftContract { + /** The type of the token in the contract. */ + tokenType: NftTokenType; + /** The name of the contract. */ + name?: string; + /** The symbol of the contract. */ + symbol?: string; + /** + * The number of NFTs in the contract as an integer string. This field is only + * available on ERC-721 contracts. + */ + totalSupply?: string; + /** OpenSea's metadata for the contract. */ + openSea?: OpenSeaCollectionMetadata; +} +/** + * Alchemy representation of an NFT that doesn't contain metadata. + * + * The BaseNft object does not hold any metadata information and only contains + * the NFT contract and token ID. The Nft object additionally contains the NFT + * metadata, token URI information, and media. + * + * @public + */ +export interface BaseNft { + contract: BaseNftContract; + /** The NFT token ID as an integer string. */ + tokenId: string; + /** The type of ERC token, if known. */ + tokenType: NftTokenType; +} +/** + * Alchemy representation of an NFT. + * + * The BaseNft object does not hold any metadata information and only contains + * the NFT contract and token ID. The Nft object additionally contains the NFT + * metadata, token URI information, and media. + * + * @public + */ +export interface Nft extends BaseNft { + /** The NFT's underlying contract and relevant contract metadata. */ + contract: NftContract; + /** The NFT title. */ + title: string; + /** The NFT description. */ + description: string; + /** When the NFT was last updated in the blockchain. Represented in ISO-8601 format. */ + timeLastUpdated: string; + /** Holds an error message if there was an issue fetching metadata. */ + metadataError: string | undefined; + /** + * The raw metadata fetched from the metadata URL specified by the NFT. The + * field is undefined if Alchemy was unable to fetch metadata. + */ + rawMetadata: NftMetadata | undefined; + /** URIs for accessing the NFT's metadata blob. */ + tokenUri: TokenUri | undefined; + /** URIs for accessing the NFT's media assets. */ + media: Media[]; + /** Detailed information on why an NFT was classified as spam. */ + spamInfo?: SpamInfo; +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/api/notify-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/api/notify-namespace.d.ts new file mode 100644 index 0000000..c70f03d --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/api/notify-namespace.d.ts @@ -0,0 +1,143 @@ +import { AddressActivityResponse, AddressActivityWebhook, AddressWebhookParams, AddressWebhookUpdate, DroppedTransactionWebhook, GetAddressesOptions, GetAllWebhooksResponse, MinedTransactionWebhook, NftActivityWebhook, NftFiltersResponse, NftWebhookParams, NftWebhookUpdate, TransactionWebhookParams, Webhook, WebhookType } from '../types/types'; +/** + * The Notify namespace contains methods used for creating, reading, updating, + * and deleting webhooks in the Notify API. + * + * To use the methods in the API, you must provide your team's auth token in the + * {@link AlchemySettings.authToken} field when configuring + * {@link AlchemySettings}. The auth token can be found in the Alchemy Dashboard + * on the Notify tab. + * + * Note that not all networks are supported in the Notify API. Please consult + * the documentation for which networks are supported. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the notify + * namespace via `alchemy.notify`. + */ +export declare class NotifyNamespace { + private readonly config; + /** + * Get all webhooks on your team. + * + * The team is determined by the `authToken` provided into the {@link AlchemySettings} + * object when creating a new {@link Alchemy} instance. + * + * This method returns a response object containing all the webhooks + */ + getAllWebhooks(): Promise; + /** + * Get all addresses tracked for the provided {@link AddressActivityWebhook}. + * + * @param addressWebhook The Address Activity webhook. + * @param options Pagination options when fetching addresses. + */ + getAddresses(addressWebhook: AddressActivityWebhook, options?: GetAddressesOptions): Promise; + /** + * Get all addresses tracked for the provided {@link AddressActivityWebhook}. + * + * @param webhookId The id of the address activity webhook. Passing in an id + * of a non-address-activity webhook will result in a response object with + * no addresses. + * @param options Pagination options when fetching addresses. + */ + getAddresses(webhookId: string, options?: GetAddressesOptions): Promise; + /** + * Get all NFTs tracked for the provided {@link NftActivityWebhook}. + * + * @param nftWebhook The NFT Activity webhook. + * @param options Pagination options when fetching NFT filters. + */ + getNftFilters(nftWebhook: NftActivityWebhook, options?: GetAddressesOptions): Promise; + /** + * Get all NFT filters tracked for the provided {@link NftActivityWebhook}. + * + * @param webhookId The id of the NFT activity webhook. Passing in an + * incorrect id of a non-NFT webhook will result in a response object with + * no filters. + * @param options Pagination options when fetching nft filters. + */ + getNftFilters(webhookId: string, options?: GetAddressesOptions): Promise; + /** + * Update a {@link NftActivityWebhook}'s active status or NFT filters. + * + * @param nftWebhook The NFT activity webhook to update. + * @param update Object containing the update. + */ + updateWebhook(nftWebhook: NftActivityWebhook, update: NftWebhookUpdate): Promise; + /** + * Update a {@link NftActivityWebhook}'s active status or NFT filters. + * + * @param nftWebhookId The id of the NFT activity webhook. + * @param update Object containing the update. + */ + updateWebhook(nftWebhookId: string, update: NftWebhookUpdate): Promise; + /** + * Update a {@link AddressActivityWebhook}'s active status or addresses. + * + * @param addressWebhook The address activity webhook to update. + * @param update Object containing the update. + */ + updateWebhook(addressWebhook: AddressActivityWebhook, update: AddressWebhookUpdate): Promise; + /** + * Update a {@link AddressActivityWebhook}'s active status or addresses. + * + * @param addressWebhookId The id of the address activity webhook. + * @param update Object containing the update. + */ + updateWebhook(addressWebhookId: string, update: AddressWebhookUpdate): Promise; + /** + * Create a new {@link MinedTransactionWebhook} to track mined transactions + * sent by the app associated with the app id. + * + * Note that the webhook will be created in the app network of the provided app id. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the app id. + */ + createWebhook(url: string, type: WebhookType.MINED_TRANSACTION, params: TransactionWebhookParams): Promise; + /** + * Create a new {@link DroppedTransactionWebhook} to track dropped transactions + * sent by the app associated with the app id. + * + * Note that the webhook will be created in the app network of the provided app id. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the app id. + */ + createWebhook(url: string, type: WebhookType.DROPPED_TRANSACTION, params: TransactionWebhookParams): Promise; + /** + * Create a new {@link NftActivityWebhook} to track NFT transfers. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the NFTs to track and the + * network the webhook should be created on. + */ + createWebhook(url: string, type: WebhookType.NFT_ACTIVITY, params: NftWebhookParams): Promise; + /** + * Create a new {@link AddressActivityWebhook} to track address activity. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the addresses to track and the + * network the webhook should be created on. + */ + createWebhook(url: string, type: WebhookType.ADDRESS_ACTIVITY, params: AddressWebhookParams): Promise; + /** + * Delete the provided webhook. + * + * @param webhook The webhook to delete. + */ + deleteWebhook(webhook: Webhook): Promise; + /** + * Delete the provided webhook. + * + * @param webhookId The id of the webhook to delete. + */ + deleteWebhook(webhookId: string): Promise; + private verifyConfig; + private sendWebhookRequest; +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/api/transact-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/api/transact-namespace.d.ts new file mode 100644 index 0000000..85525ad --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/api/transact-namespace.d.ts @@ -0,0 +1,105 @@ +import { TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; +import type { BigNumber } from '@ethersproject/bignumber'; +import { Deferrable } from '@ethersproject/properties'; +import { SendPrivateTransactionOptions } from '../types/types'; +/** + * The Transact namespace contains methods used for sending transactions and + * checking on the state of submitted transactions. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the transact + * namespace via `alchemy.transact`. + */ +export declare class TransactNamespace { + private readonly config; + /** + * Used to send a single transaction to Flashbots. Flashbots will attempt to + * send the transaction to miners for the next 25 blocks. + * + * Returns the transaction hash of the submitted transaction. + * + * @param signedTransaction The raw, signed transaction as a hash. + * @param maxBlockNumber Optional highest block number in which the + * transaction should be included. + * @param options Options to configure the request. + */ + sendPrivateTransaction(signedTransaction: string, maxBlockNumber?: number, options?: SendPrivateTransactionOptions): Promise; + /** + * Stops the provided private transaction from being submitted for future + * blocks. A transaction can only be cancelled if the request is signed by the + * same key as the {@link sendPrivateTransaction} call submitting the + * transaction in first place. + * + * Please note that fast mode transactions cannot be cancelled using this method. + * + * Returns a boolean indicating whether the cancellation was successful. + * + * @param transactionHash Transaction hash of private tx to be cancelled + */ + cancelPrivateTransaction(transactionHash: string): Promise; + /** + * Returns the transaction with hash or null if the transaction is unknown. + * + * If a transaction has not been mined, this method will search the + * transaction pool. Various backends may have more restrictive transaction + * pool access (e.g. if the gas price is too low or the transaction was only + * recently sent and not yet indexed) in which case this method may also return null. + * + * NOTE: This is an alias for {@link CoreNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransaction(transactionHash: string | Promise): Promise; + /** + * Submits transaction to the network to be mined. The transaction must be + * signed, and be valid (i.e. the nonce is correct and the account has + * sufficient balance to pay for the transaction). + * + * NOTE: This is an alias for {@link CoreNamespace.sendTransaction}. + * + * @param signedTransaction The signed transaction to send. + * @public + */ + sendTransaction(signedTransaction: string | Promise): Promise; + /** + * Returns an estimate of the amount of gas that would be required to submit + * transaction to the network. + * + * An estimate may not be accurate since there could be another transaction on + * the network that was not accounted for, but after being mined affects the + * relevant state. + * + * This is an alias for {@link CoreNamespace.estimateGas}. + * + * @param transaction The transaction to estimate gas for. + * @public + */ + estimateGas(transaction: Deferrable): Promise; + /** + * Returns a fee per gas (in wei) that is an estimate of how much you can pay + * as a priority fee, or "tip", to get a transaction included in the current block. + * + * This number is generally used to set the `maxPriorityFeePerGas` field in a + * transaction request. + * + * @public + */ + getMaxPriorityFeePerGas(): Promise; + /** + * Returns a promise which will not resolve until specified transaction hash is mined. + * + * If {@link confirmations} is 0, this method is non-blocking and if the + * transaction has not been mined returns null. Otherwise, this method will + * block until the transaction has confirmed blocks mined on top of the block + * in which it was mined. + * + * NOTE: This is an alias for {@link CoreNamespace.waitForTransaction}. + * + * @param transactionHash The hash of the transaction to wait for. + * @param confirmations The number of blocks to wait for. + * @param timeout The maximum time to wait for the transaction to confirm. + * @public + */ + waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/api/util.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/api/util.d.ts new file mode 100644 index 0000000..10ac7c3 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/api/util.d.ts @@ -0,0 +1,21 @@ +/** + * Converts a hex string to a decimal number. + * + * @param hexString - The hex string to convert. + * @public + */ +export declare function fromHex(hexString: string): number; +/** + * Converts a number to a hex string. + * + * @param num - The number to convert to hex. + * @public + */ +export declare function toHex(num: number): string; +/** + * Checks if a value is a hex string. + * + * @param possibleHexString - The value to check. + * @public + */ +export declare function isHex(possibleHexString: string): boolean; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/api/utils.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/api/utils.d.ts new file mode 100644 index 0000000..2582187 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/api/utils.d.ts @@ -0,0 +1,5 @@ +export { dnsEncode, hashMessage, id, isValidName, namehash } from '@ethersproject/hash'; +export { arrayify, concat, hexConcat, hexDataSlice, hexDataLength, hexlify, hexStripZeros, hexValue, hexZeroPad, isBytes, isBytesLike, isHexString, joinSignature, zeroPad, splitSignature, stripZeros } from '@ethersproject/bytes'; +export { formatEther, parseEther, parseUnits, formatUnits } from '@ethersproject/units'; +export { toUtf8Bytes, toUtf8String } from '@ethersproject/strings'; +export { Interface } from '@ethersproject/abi'; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/api/websocket-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/api/websocket-namespace.d.ts new file mode 100644 index 0000000..7c179bc --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/api/websocket-namespace.d.ts @@ -0,0 +1,67 @@ +import type { Listener } from '@ethersproject/abstract-provider'; +import { AlchemyEventType } from '../types/types'; +/** + * The Websocket namespace contains all subscription related functions that + * allow you to subscribe to events and receive updates as they occur. The + * underlying WebSocket provider has additional logic to handle reconnections + * and automatically backfills missed events. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.ws`. + */ +export declare class WebSocketNamespace { + private readonly config; + /** + * Adds a listener to be triggered for each {@link eventName} event. Also + * includes Alchemy's Subscription API events. See {@link AlchemyEventType} for + * how to use them. + * + * @param eventName The event to listen for. + * @param listener The listener to call when the event is triggered. + * @public + */ + on(eventName: AlchemyEventType, listener: Listener): this; + /** + * Adds a listener to be triggered for only the next {@link eventName} event, + * after which it will be removed. Also includes Alchemy's Subscription API + * events. See {@link AlchemyEventType} for how to use them. + * + * @param eventName The event to listen for. + * @param listener The listener to call when the event is triggered. + * @public + */ + once(eventName: AlchemyEventType, listener: Listener): this; + /** + * Removes the provided {@link listener} for the {@link eventName} event. If no + * listener is provided, all listeners for the event will be removed. + * + * @param eventName The event to unlisten to. + * @param listener The listener to remove. + * @public + */ + off(eventName: AlchemyEventType, listener?: Listener): this; + /** + * Remove all listeners for the provided {@link eventName} event. If no event + * is provided, all events and their listeners are removed. + * + * @param eventName The event to remove all listeners for. + * @public + */ + removeAllListeners(eventName?: AlchemyEventType): this; + /** + * Returns the number of listeners for the provided {@link eventName} event. If + * no event is provided, the total number of listeners for all events is returned. + * + * @param eventName The event to get the number of listeners for. + * @public + */ + listenerCount(eventName?: AlchemyEventType): Promise; + /** + * Returns an array of listeners for the provided {@link eventName} event. If + * no event is provided, all listeners will be included. + * + * @param eventName The event to get the listeners for. + */ + listeners(eventName?: AlchemyEventType): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/index.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/index.d.ts new file mode 100644 index 0000000..a5d9de9 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/index.d.ts @@ -0,0 +1,18 @@ +/** This is the main entry point for the library and exports user-facing API. */ +import * as Utils from './api/utils'; +export { Utils }; +export * from './types/types'; +export { Alchemy } from './api/alchemy'; +export { Wallet } from './api/alchemy-wallet'; +export { Contract, ContractFactory } from './api/alchemy-contract'; +export type { AlchemyConfig } from './api/alchemy-config'; +export type { AlchemyProvider } from './api/alchemy-provider'; +export type { AlchemyWebSocketProvider } from './api/alchemy-websocket-provider'; +export type { NftNamespace } from './api/nft-namespace'; +export type { WebSocketNamespace } from './api/websocket-namespace'; +export type { CoreNamespace } from './api/core-namespace'; +export type { TransactNamespace } from './api/transact-namespace'; +export type { NotifyNamespace } from './api/notify-namespace'; +export type { BaseNftContract, NftContract, Nft, BaseNft } from './api/nft'; +export { fromHex, toHex, isHex } from './api/util'; +export { setLogLevel, LogLevelString as LogLevel } from './util/logger'; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/internal/backoff.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/internal/backoff.d.ts new file mode 100644 index 0000000..ed9cad8 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/internal/backoff.d.ts @@ -0,0 +1,4 @@ +export declare const DEFAULT_BACKOFF_INITIAL_DELAY_MS = 1000; +export declare const DEFAULT_BACKOFF_MULTIPLIER = 1.5; +export declare const DEFAULT_BACKOFF_MAX_DELAY_MS: number; +export declare const DEFAULT_BACKOFF_MAX_ATTEMPTS = 5; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/internal/dispatch.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/internal/dispatch.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/internal/dispatch.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/internal/ethers-event.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/internal/ethers-event.d.ts new file mode 100644 index 0000000..0676f4c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/internal/ethers-event.d.ts @@ -0,0 +1,60 @@ +import { EventType, Filter, Listener } from '@ethersproject/abstract-provider'; +import { AlchemyEventFilter, AlchemyEventType, AlchemyMinedTransactionsAddress, AlchemyMinedTransactionsEventFilter, AlchemyPendingTransactionsEventFilter, NonEmptyArray } from '../types/types'; +/** + * DO NOT MODIFY. + * + * Event class copied directly over from ethers.js's `BaseProvider` class. + * + * This class is used to represent events and their corresponding listeners. The + * SDK needs to extend this class in order to support Alchemy's custom + * Subscription API types. The original class is not exported by ethers. Minimal + * changes have been made in order to get TS to compile. + */ +declare class Event { + readonly listener: Listener; + readonly once: boolean; + readonly tag: string; + _lastBlockNumber: number; + _inflight: boolean; + constructor(tag: string, listener: Listener, once: boolean); + get event(): EventType; + get type(): string; + get hash(): string; + get filter(): Filter; + pollable(): boolean; +} +/** + * Wrapper class around the ethers `Event` class in order to add support for + * Alchemy's custom subscriptions types. + * + * The serialization and deserialization mechanism requires the order of the + * fields to be the same across different {@link ALCHEMY_EVENT_TYPES}. Before + * using a getter on a new event filter, make sure that the position of the + * field in serialization is correct. + * + * The getters on this class deserialize the event tag generated by + * {@link getAlchemyEventTag} into the original fields passed into the event. + */ +export declare class EthersEvent extends Event { + /** + * Converts the event tag into the original `fromAddress` field in + * {@link AlchemyPendingTransactionsEventFilter}. + */ + get fromAddress(): string | string[] | undefined; + /** + * Converts the event tag into the original `toAddress` field in + * {@link AlchemyPendingTransactionsEventFilter}. + */ + get toAddress(): string | string[] | undefined; + /** + * Converts the event tag into the original `hashesOnly` field in + * {@link AlchemyPendingTransactionsEventFilter} and {@link AlchemyMinedTransactionsEventFilter}. + */ + get hashesOnly(): boolean | undefined; + get includeRemoved(): boolean | undefined; + get addresses(): NonEmptyArray | undefined; +} +export declare function isAlchemyEvent(event: AlchemyEventType): event is AlchemyMinedTransactionsEventFilter | AlchemyPendingTransactionsEventFilter; +export declare function verifyAlchemyEventName(eventName: AlchemyEventFilter): void; +export declare function deserializeTopics(data: string): any; +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/internal/internal-types.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/internal/internal-types.d.ts new file mode 100644 index 0000000..48cbe2f --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/internal/internal-types.d.ts @@ -0,0 +1,48 @@ +/** This file contains internal types used by the SDK and are not exposed to the end user. */ +declare type JsonRpcId = string | number | null; +/** + * Prefix for `alchemy_pendingTransactions` subscriptions when serializing to + * ethers events. + * + * This tag is used internally by ethers to track different event filters. + */ +export declare const ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE = "alchemy-pending-transactions"; +/** + * Prefix for `alchemy_minedTransactions` subscriptions when serializing to ethers events. + * + * This tag is used internally by ethers to track different event filters. + */ +export declare const ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE = "alchemy-mined-transactions"; +/** + * Array containing all the custom event tags used internally by ethers to track + * event filters. + */ +export declare const ALCHEMY_EVENT_TYPES: string[]; +export interface JsonRpcRequest { + jsonrpc: '2.0'; + method: string; + params?: any[]; + id?: JsonRpcId; +} +export interface JsonRpcResponse { + jsonrpc: '2.0'; + result?: T; + error?: JsonRpcError; + id: JsonRpcId; +} +interface JsonRpcError { + code: number; + message: string; + data?: T; +} +export declare type WebSocketMessage = SingleOrBatchResponse | SubscriptionEvent; +export declare type SingleOrBatchResponse = JsonRpcResponse | JsonRpcResponse[]; +export interface SubscriptionEvent { + jsonrpc: '2.0'; + method: 'eth_subscription'; + params: { + subscription: string; + result: T; + }; +} +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/internal/nft-api.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/internal/nft-api.d.ts new file mode 100644 index 0000000..8eaf6e1 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/internal/nft-api.d.ts @@ -0,0 +1,27 @@ +import { BigNumberish } from '@ethersproject/bignumber'; +import { AlchemyConfig } from '../api/alchemy-config'; +import { BaseNft, Nft, NftContract } from '../api/nft'; +import { GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftResponse, NftAttributeRarity, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, NftTokenType, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult } from '../types/types'; +export declare function getNftMetadata(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, tokenType?: NftTokenType, tokenUriTimeoutInMs?: number, srcMethod?: string): Promise; +export declare function getNftMetadataBatch(config: AlchemyConfig, tokens: Array, options?: NftMetadataBatchOptions): Promise; +export declare function getContractMetadata(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function getNftsForOwnerIterator(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): AsyncIterable; +export declare function getNftsForOwner(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): Promise; +export declare function getNftsForContract(config: AlchemyConfig, contractAddress: string, options?: GetBaseNftsForContractOptions | GetNftsForContractOptions, srcMethod?: string): Promise; +export declare function getNftsForContractIterator(config: AlchemyConfig, contractAddress: string, options?: GetBaseNftsForContractOptions | GetNftsForContractOptions, srcMethod?: string): AsyncIterable; +export declare function getOwnersForContract(config: AlchemyConfig, contractAddress: string, options?: GetOwnersForContractWithTokenBalancesOptions | GetOwnersForContractOptions, srcMethod?: string): Promise; +export declare function getContractsForOwner(config: AlchemyConfig, owner: string, options?: GetContractsForOwnerOptions, srcMethod?: string): Promise; +export declare function getOwnersForNft(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, srcMethod?: string): Promise; +export declare function checkNftOwnership(config: AlchemyConfig, owner: string, contractAddresses: string[], srcMethod?: string): Promise; +export declare function verifyNftOwnership(config: AlchemyConfig, owner: string, contractAddresses: string | string[], srcMethod?: string): Promise; +export declare function isSpamContract(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function getSpamContracts(config: AlchemyConfig, srcMethod?: string): Promise; +export declare function getFloorPrice(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function getNftSales(config: AlchemyConfig, options?: GetNftSalesOptions | GetNftSalesOptionsByContractAddress, srcMethod?: string): Promise; +export declare function computeRarity(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, srcMethod?: string): Promise; +export declare function searchContractMetadata(config: AlchemyConfig, query: string, srcMethod?: string): Promise; +export declare function summarizeNftAttributes(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function refreshNftMetadata(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, srcMethod?: string): Promise; +export declare function refreshContract(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/internal/raw-interfaces.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/internal/raw-interfaces.d.ts new file mode 100644 index 0000000..0b85271 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/internal/raw-interfaces.d.ts @@ -0,0 +1,113 @@ +import { Media, NftSaleFeeData, NftSpamClassification } from '../types/types'; +export interface RawSpamInfo { + isSpam: string; + /** A list of reasons why an NFT contract was marked as spam. */ + classifications: NftSpamClassification[]; +} +/** OpenSea's metadata for an NFT collection. */ +export interface RawOpenSeaCollectionMetadata { + floorPrice?: number; + collectionName?: string; + safelistRequestStatus?: string; + imageUrl?: string; + description?: string; + externalUrl?: string; + twitterUsername?: string; + discordUrl?: string; + lastIngestedAt?: string; +} +export interface RawGetOwnersForContractWithTokenBalancesResponse { + ownerAddresses: RawOwnerAddress[]; + pageKey?: string; +} +export interface RawOwnerAddress { + ownerAddress: string; + tokenBalances: RawTokenBalances[]; +} +export interface RawTokenBalances { + tokenId: string; + balance: number; +} +export interface RawReingestContractResponse { + contractAddress: string; + reingestionState: string; + progress: string | null; +} +export interface RawWebhook { + id: string; + network: string; + webhook_type: string; + webhook_url: string; + is_active: boolean; + time_created: number; + signing_key: string; + version: string; + app_id?: string; +} +export interface RawWebhookPagination { + cursors: { + after?: string; + }; + total_count: number; +} +export interface RawGetAllWebhooksResponse { + data: RawWebhook[]; +} +export interface RawAddressActivityResponse { + data: string[]; + pagination: RawWebhookPagination; +} +export interface RawNftFilter { + contract_address: string; + token_id: string; +} +export interface RawNftFiltersResponse { + data: RawNftFilter[]; + pagination: RawWebhookPagination; +} +export interface RawCreateWebhookResponse { + data: RawWebhook; +} +export interface RawNftFilterParam { + contract_address: string; + token_id: string; +} +export interface RawNftAttributeRarity { + value: string; + trait_type: string; + prevalence: number; +} +export interface RawGetNftSalesResponse { + pageKey?: string; + nftSales: RawNftSale[]; +} +export interface RawNftSale { + marketplace: string; + contractAddress: string; + tokenId: string; + quantity: string; + buyerAddress: string; + sellerAddress: string; + taker: string; + sellerFee: NftSaleFeeData; + marketplaceFee?: NftSaleFeeData; + royaltyFee?: NftSaleFeeData; + blockNumber: number; + logIndex: number; + bundleIndex: number; + transactionHash: string; +} +export interface RawGetContractsForOwnerResponse { + contracts: RawContractForOwner[]; + pageKey?: string; + totalCount: number; +} +export interface RawContractForOwner extends Omit { + address: string; + totalBalance: number; + numDistinctTokensOwned: number; + isSpam: boolean; + tokenId: string; + media: Media; + opensea?: RawOpenSeaCollectionMetadata; +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/internal/request-batcher.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/internal/request-batcher.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/internal/request-batcher.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/internal/websocket-backfiller.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/internal/websocket-backfiller.d.ts new file mode 100644 index 0000000..63730de --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/internal/websocket-backfiller.d.ts @@ -0,0 +1,53 @@ +export interface BatchPart { + method: string; + params?: any; +} +export interface NewHeadsEvent { + author: string; + difficulty: string; + extraData: string; + gasLimit: string; + gasUsed: string; + hash: string; + logsBloom: string; + miner: string; + mixHash: string; + nonce: string; + number: string; + parentHash: string; + receiptsRoot: string; + sealFields: string[]; + sha3Uncles: string; + size: string; + stateRoot: string; + timestamp: string; + transactionsRoot: string; +} +/** The return type of eth_getBlocksByHash. */ +export interface BlockHead extends NewHeadsEvent { + totalDifficulty: string; + transactions: any[]; + uncles: string[]; +} +export interface LogsEvent { + address: string; + blockHash: string; + blockNumber: string; + data: string; + logIndex: string; + topics: string[]; + transactionHash: string; + transactionIndex: string; + removed?: boolean; +} +export interface LogsSubscriptionFilter { + address?: string | string[]; + topics?: Array; +} +export interface GetLogsOptions extends LogsSubscriptionFilter { + fromBlock?: string; + toBlock?: string; +} +export declare function dedupeNewHeads(events: NewHeadsEvent[]): NewHeadsEvent[]; +export declare function dedupeLogs(events: LogsEvent[]): LogsEvent[]; +export declare function throwIfCancelled(isCancelled: () => boolean): void; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/types/types.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/types/types.d.ts new file mode 100644 index 0000000..ed47247 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/types/types.d.ts @@ -0,0 +1,1523 @@ +import { EventType, TransactionReceipt } from '@ethersproject/abstract-provider'; +import { BigNumberish } from '@ethersproject/bignumber'; +import { BaseNft, Nft, NftContract } from '../api/nft'; +/** + * Options object used to configure the Alchemy SDK. + * + * @public + */ +export interface AlchemySettings { + /** + * The Alchemy API key that can be found in the Alchemy dashboard. + * + * Defaults to: "demo" (a rate-limited public API key) + */ + apiKey?: string; + /** + * The name of the network. Once configured, the network cannot be changed. To + * use a different network, instantiate a new `Alchemy` instance. + * + * Defaults to: Network.ETH_MAINNET + */ + network?: Network; + /** The maximum number of retries to attempt if a request fails. Defaults to 5. */ + maxRetries?: number; + /** + * Optional URL endpoint to use for all requests. Setting this field will + * override the URL generated by the {@link network} and {@link apiKey} fields. + * + * This field is useful for testing or for using a custom node endpoint. Note + * that not all methods will work with custom URLs. + */ + url?: string; + /** + * Alchemy auth token required to use the Notify API. This token can be found + * in the Alchemy Dashboard on the Notify tab. + */ + authToken?: string; + /** + * Optional setting that automatically batches and sends json-rpc requests for + * higher throughput and reduced network IO. Defaults to false. + * + * This implementation is based on the `JsonRpcBatchProvider` in ethers. + */ + batchRequests?: boolean; +} +/** + * The supported networks by Alchemy. Note that some functions are not available + * on all networks. Please refer to the Alchemy documentation for which APIs are + * available on which networks + * {@link https://docs.alchemy.com/alchemy/apis/feature-support-by-chain} + * + * @public + */ +export declare enum Network { + ETH_MAINNET = "eth-mainnet", + /** @deprecated - Will be removed in subsequent versions */ + ETH_ROPSTEN = "eth-ropsten", + ETH_GOERLI = "eth-goerli", + /** @deprecated - Will be removed in subsequent versions */ + ETH_KOVAN = "eth-kovan", + /** @deprecated - Will be removed in subsequent versions */ + ETH_RINKEBY = "eth-rinkeby", + OPT_MAINNET = "opt-mainnet", + /** @deprecated - Will be removed in subsequent versions */ + OPT_KOVAN = "opt-kovan", + OPT_GOERLI = "opt-goerli", + ARB_MAINNET = "arb-mainnet", + /** @deprecated - Will be removed in subsequent versions */ + ARB_RINKEBY = "arb-rinkeby", + ARB_GOERLI = "arb-goerli", + MATIC_MAINNET = "polygon-mainnet", + MATIC_MUMBAI = "polygon-mumbai", + ASTAR_MAINNET = "astar-mainnet" +} +/** Token Types for the `getTokenBalances()` endpoint. */ +export declare enum TokenBalanceType { + /** + * Option to fetch the top 100 tokens by 24-hour volume. This option is only + * available on Mainnet in Ethereum, Polygon, and Arbitrum. + */ + DEFAULT_TOKENS = "DEFAULT_TOKENS", + /** + * Option to fetch the set of ERC-20 tokens that the address as ever held. his + * list is produced by an address's historical transfer activity and includes + * all tokens that the address has ever received. + */ + ERC20 = "erc20" +} +/** + * Optional params to pass into `getTokenBalances()` to fetch all ERC-20 tokens + * instead of passing in an array of contract addresses to fetch balances for. + */ +export interface TokenBalancesOptionsErc20 { + /** The ERC-20 token type. */ + type: TokenBalanceType.ERC20; + /** Optional page key for pagination (only applicable to TokenBalanceType.ERC20) */ + pageKey?: string; +} +/** + * Optional params to pass into `getTokenBalances()` to fetch the top 100 tokens + * instead of passing in an array of contract addresses to fetch balances for. + */ +export interface TokenBalancesOptionsDefaultTokens { + /** The top 100 token type. */ + type: TokenBalanceType.DEFAULT_TOKENS; +} +/** + * Response object for when the {@link TokenBalancesOptionsErc20} options are + * used. A page key may be returned if the provided address has many transfers. + */ +export interface TokenBalancesResponseErc20 extends TokenBalancesResponse { + /** + * An optional page key to passed into the next request to fetch the next page + * of token balances. + */ + pageKey?: string; +} +/** @public */ +export interface TokenBalancesResponse { + address: string; + tokenBalances: TokenBalance[]; +} +/** @public */ +export declare type TokenBalance = TokenBalanceSuccess | TokenBalanceFailure; +/** @public */ +export interface TokenBalanceSuccess { + contractAddress: string; + tokenBalance: string; + error: null; +} +/** @public */ +export interface TokenBalanceFailure { + contractAddress: string; + tokenBalance: null; + error: string; +} +/** + * Response object for the {@link CoreNamespace.getTokenMetadata} method. + * + * @public + */ +export interface TokenMetadataResponse { + /** + * The token's name. Is `null` if the name is not defined in the contract and + * not available from other sources. + */ + name: string | null; + /** + * The token's symbol. Is `null` if the symbol is not defined in the contract + * and not available from other sources. + */ + symbol: string | null; + /** + * The number of decimals of the token. Returns `null` if not defined in the + * contract and not available from other sources. + */ + decimals: number | null; + /** URL link to the token's logo. Is `null` if the logo is not available. */ + logo: string | null; +} +/** + * Parameters for the {@link CoreNamespace.getAssetTransfers} method. + * + * @public + */ +export interface AssetTransfersParams { + /** + * The starting block to check for transfers. This value is inclusive and + * defaults to `0x0` if omitted. + */ + fromBlock?: string; + /** + * The ending block to check for transfers. This value is inclusive and + * defaults to the latest block if omitted. + */ + toBlock?: string; + /** + * Whether to return results in ascending or descending order by block number. + * Defaults to ascending if omitted. + */ + order?: SortingOrder; + /** + * The from address to filter transfers by. This value defaults to a wildcard + * for all addresses if omitted. + */ + fromAddress?: string; + /** + * The to address to filter transfers by. This value defaults to a wildcard + * for all address if omitted. + */ + toAddress?: string; + /** + * List of contract addresses to filter for - only applies to "erc20", + * "erc721", "erc1155" transfers. Defaults to all address if omitted. + */ + contractAddresses?: string[]; + /** + * Whether to exclude transfers with zero value. Note that zero value is + * different than null value. Defaults to `false` if omitted. + */ + excludeZeroValue?: boolean; + /** REQUIRED field. An array of categories to get transfers for. */ + category: AssetTransfersCategory[]; + /** The maximum number of results to return per page. Defaults to 1000 if omitted. */ + maxCount?: number; + /** + * Optional page key from an existing {@link OwnedBaseNftsResponse} + * {@link AssetTransfersResult}to use for pagination. + */ + pageKey?: string; + /** + * Whether to include additional metadata about each transfer event. Defaults + * to `false` if omitted. + */ + withMetadata?: boolean; +} +/** + * Parameters for the {@link CoreNamespace.getAssetTransfers} method that + * includes metadata. + * + * @public + */ +export interface AssetTransfersWithMetadataParams extends AssetTransfersParams { + withMetadata: true; +} +/** + * Categories of transfers to use with the {@link AssetTransfersParams} request + * object when using {@link CoreNamespace.getAssetTransfers}. + * + * @public + */ +export declare enum AssetTransfersCategory { + /** + * Top level ETH transactions that occur where the `fromAddress` is an + * external user-created address. External addresses have private keys and are + * accessed by users. + */ + EXTERNAL = "external", + /** + * Top level ETH transactions that occur where the `fromAddress` is an + * internal, smart contract address. For example, a smart contract calling + * another smart contract or sending + */ + INTERNAL = "internal", + /** ERC20 transfers. */ + ERC20 = "erc20", + /** ERC721 transfers. */ + ERC721 = "erc721", + /** ERC1155 transfers. */ + ERC1155 = "erc1155", + /** Special contracts that don't follow ERC 721/1155, (ex: CryptoKitties). */ + SPECIALNFT = "specialnft" +} +/** + * Enum for the order of the {@link AssetTransfersParams} request object when + * using {@link CoreNamespace.getAssetTransfers}. + * + * @deprecated Use {@link SortingOrder} instead. This enum will be removed in a + * future version. + * @public + */ +export declare enum AssetTransfersOrder { + ASCENDING = "asc", + DESCENDING = "desc" +} +/** + * An enum for specifying the token type on NFTs. + * + * @public + */ +export declare enum NftTokenType { + ERC721 = "ERC721", + ERC1155 = "ERC1155", + UNKNOWN = "UNKNOWN" +} +/** + * Response object for the {@link CoreNamespace.getAssetTransfers} method. + * + * @public + */ +export interface AssetTransfersResponse { + transfers: AssetTransfersResult[]; + /** Page key for the next page of results, if one exists. */ + pageKey?: string; +} +/** + * Response object for the {@link CoreNamespace.getAssetTransfers} method when + * the {@link AssetTransfersWithMetadataParams} are used. + * + * @public + */ +export interface AssetTransfersWithMetadataResponse { + transfers: AssetTransfersWithMetadataResult[]; + pageKey?: string; +} +/** + * Represents a transfer event that is returned in a {@link AssetTransfersResponse}. + * + * @public + */ +export interface AssetTransfersResult { + /** The unique ID of the transfer. */ + uniqueId: string; + /** The category of the transfer. */ + category: AssetTransfersCategory; + /** The block number where the transfer occurred. */ + blockNum: string; + /** The from address of the transfer. */ + from: string; + /** The to address of the transfer. */ + to: string | null; + /** + * Converted asset transfer value as a number (raw value divided by contract + * decimal). `null` if ERC721 transfer or contract decimal not available. + */ + value: number | null; + /** + * The raw ERC721 token id of the transfer as a hex string. `null` if not an + * ERC721 transfer. + */ + erc721TokenId: string | null; + /** + * A list of ERC1155 metadata objects if the asset transferred is an ERC1155 + * token. `null` if not an ERC1155 transfer. + */ + erc1155Metadata: ERC1155Metadata[] | null; + /** The token id of the token transferred. */ + tokenId: string | null; + /** + * Returns the token's symbol or ETH for other transfers. `null` if the + * information was not available. + */ + asset: string | null; + /** The transaction hash of the transfer transaction. */ + hash: string; + /** Information about the raw contract of the asset transferred. */ + rawContract: RawContract; +} +/** + * Represents a transfer event that is returned in a + * {@link AssetTransfersResponse} when {@link AssetTransfersWithMetadataParams} are used. + * + * @public + */ +export interface AssetTransfersWithMetadataResult extends AssetTransfersResult { + /** Additional metadata about the transfer event. */ + metadata: AssetTransfersMetadata; +} +/** + * The metadata object for a {@link AssetTransfersResult} when the + * {@link AssetTransfersParams.withMetadata} field is set to true. + * + * @public + */ +export interface AssetTransfersMetadata { + /** Timestamp of the block from which the transaction event originated. */ + blockTimestamp: string; +} +/** + * Represents NFT metadata that holds fields. Note that since there is no + * standard metadata format, the fields are not guaranteed to be present. + * + * @public + */ +export interface NftMetadata extends Record { + /** Name of the NFT asset. */ + name?: string; + /** A human-readable description of the NFT asset. */ + description?: string; + /** URL to the NFT asset image. */ + image?: string; + /** + * The image URL that appears along the top of the NFT asset page. This tends + * to be the highest resolution image. + */ + external_url?: string; + /** Background color of the NFT item. Usually defined as a 6 character hex string. */ + background_color?: string; + /** The traits, attributes, and characteristics for the NFT asset. */ + attributes?: Array>; +} +/** + * Represents the URI information the NFT's metadata. + * + * @public + */ +export interface TokenUri { + /** + * URI for the location of the NFT's original metadata blob (ex: the original + * IPFS link). + */ + raw: string; + /** Public gateway URI for the raw URI. Generally offers better performance. */ + gateway: string; +} +/** + * Represents the URI information for the NFT's media assets. + * + * @public + */ +export interface Media { + /** + * URI for the location of the NFT's original metadata blob for media (ex: the + * original IPFS link). + */ + raw: string; + /** Public gateway URI for the raw URI. Generally offers better performance. */ + gateway: string; + /** URL for a resized thumbnail of the NFT media asset. */ + thumbnail?: string; + /** + * The media format (ex: jpg, gif, png) of the {@link gateway} and + * {@link thumbnail} assets. + */ + format?: string; + /** + * DEPRECATED - The size of the media asset in bytes + * + * @deprecated - Please use {@link bytes} instead. This field will be removed + * in a subsequent release. + */ + size?: number; + /** The size of the media asset in bytes. */ + bytes?: number; +} +/** Potential reasons why an NFT contract was classified as spam. */ +export declare enum NftSpamClassification { + Erc721TooManyOwners = "Erc721TooManyOwners", + Erc721TooManyTokens = "Erc721TooManyTokens", + Erc721DishonestTotalSupply = "Erc721DishonestTotalSupply", + MostlyHoneyPotOwners = "MostlyHoneyPotOwners", + OwnedByMostHoneyPots = "OwnedByMostHoneyPots" +} +/** Detailed information on whether and why an NFT contract was classified as spam. */ +export interface SpamInfo { + isSpam: boolean; + /** A list of reasons why an NFT contract was marked as spam. */ + classifications: NftSpamClassification[]; +} +/** + * Optional parameters object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. + * + * This interface is used to fetch NFTs with their associated metadata. To get + * Nfts without their associated metadata, use {@link GetBaseNftsForOwnerOptions}. + * + * @public + */ +export interface GetNftsForOwnerOptions { + /** + * Optional page key from an existing {@link OwnedBaseNftsResponse} or + * {@link OwnedNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional list of contract addresses to filter the results by. Limit is 20. */ + contractAddresses?: string[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are excluded from the response. + */ + excludeFilters?: NftFilters[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are included in the response. + */ + includeFilters?: NftFilters[]; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; + /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */ + omitMetadata?: boolean; + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; + /** + * Order in which to return results. By default, results are ordered by + * contract address and token ID in lexicographic order. + */ + orderBy?: NftOrdering; +} +/** + * Optional parameters object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. + * + * This interface is used to fetch NFTs without their associated metadata. To + * get Nfts with their associated metadata, use {@link GetNftsForOwnerOptions}. + * + * @public + */ +export interface GetBaseNftsForOwnerOptions { + /** + * Optional page key from an existing {@link OwnedBaseNftsResponse} or + * {@link OwnedNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional list of contract addresses to filter the results by. Limit is 20. */ + contractAddresses?: string[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are excluded from the response. + */ + excludeFilters?: NftFilters[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are included in the response. + */ + includeFilters?: NftFilters[]; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; + /** Optional boolean flag to include NFT metadata. Defaults to `false`. */ + omitMetadata: true; + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; + /** + * Order in which to return results. By default, results are ordered by + * contract address and token ID in lexicographic order. + */ + orderBy?: NftOrdering; +} +/** + * Enum of NFT filters that can be applied to a {@link getNftsForOwner} request. + * NFTs that match one or more of these filters are excluded from the response. + * + * - @deprecated Use {@link NftFilters} instead. This enum will be removed in a + * future version. + * + * @beta + */ +export declare enum NftExcludeFilters { + /** Exclude NFTs that have been classified as spam. */ + SPAM = "SPAM", + /** Exclude NFTs that have been airdropped to a user. */ + AIRDROPS = "AIRDROPS" +} +/** + * Enum of NFT filters that can be applied to a {@link getNftsForOwner} or a + * {@link getContractsForOwner} request. + * + * @beta + */ +export declare enum NftFilters { + /** NFTs that have been classified as spam. */ + SPAM = "SPAM", + /** NFTs that have been airdropped to a user. */ + AIRDROPS = "AIRDROPS" +} +/** + * Enum of ordering that can be applied to a {@link getNftsForOwner} or a + * {@link getContractsForOwner} response. + * + * @beta + */ +export declare enum NftOrdering { + TRANSFERTIME = "TRANSFERTIME" +} +/** + * The response object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. The object contains the NFTs with + * metadata owned by the provided address, along with pagination information and + * the total count. + * + * @public + */ +export interface OwnedNftsResponse { + /** The NFTs owned by the provided address. */ + readonly ownedNfts: OwnedNft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + readonly pageKey?: string; + /** The total count of NFTs owned by the provided address. */ + readonly totalCount: number; +} +/** + * The response object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. The object contains the NFTs + * without metadata owned by the provided address, along with pagination + * information and the total count. + * + * @public + */ +export interface OwnedBaseNftsResponse { + /** The NFTs owned by the provided address. */ + readonly ownedNfts: OwnedBaseNft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + readonly pageKey?: string; + /** The total count of NFTs owned by the provided address. */ + readonly totalCount: number; +} +/** + * Represents an NFT with metadata owned by an address. + * + * @public + */ +export interface OwnedNft extends Nft { + /** The token balance of the NFT. */ + readonly balance: number; +} +/** + * Represents an NFT without metadata owned by an address. + * + * @public + */ +export interface OwnedBaseNft extends BaseNft { + /** The token balance of the NFT. */ + readonly balance: number; +} +/** + * The response object for the {@link getOwnersForNft}. + * + * @public + */ +export interface GetOwnersForNftResponse { + /** An array of owner addresses for the provided token. */ + readonly owners: string[]; +} +/** + * The response object for the {@link getOwnersForContract}. + * + * @public + */ +export interface GetOwnersForContractResponse { + /** An array of owner addresses for the provided contract address */ + owners: string[]; +} +/** + * The response object for the {@link getOwnersForContract}. + * + * @public + */ +export interface GetOwnersForContractWithTokenBalancesResponse { + /** An array of owner addresses for the provided contract address */ + owners: NftContractOwner[]; + /** Optional page key that is returned when a collection has more than 50,000 owners. */ + pageKey?: string; +} +/** + * An object representing the owner of an NFT and its corresponding token + * balances in a {@link GetOwnersForContractWithTokenBalancesResponse} object. + */ +export interface NftContractOwner { + /** The NFT's owner address. */ + ownerAddress: string; + /** A list of objects containing token balances for the provided NFT contract. */ + tokenBalances: NftContractTokenBalance[]; +} +/** + * An object representing the owned token and balance values in a + * {@link GetOwnersForContractWithTokenBalancesResponse} object. + */ +export interface NftContractTokenBalance { + /** The token id owned in the NFT contract. */ + tokenId: string; + /** The token Id balance for the provided owner. */ + balance: number; +} +/** + * Represents an NFT token to fetch metadata for in a + * {@link NftNamespace.getNftMetadataBatch} method. + */ +export interface NftMetadataBatchToken { + /** The NFT contract address. Limited to ERC721 and ERC1155 tokens. */ + contractAddress: string; + /** The id of the NFT. */ + tokenId: BigNumberish; + /** Optional field to specify the type of token to speed up the query. */ + tokenType?: NftTokenType.ERC1155 | NftTokenType.ERC721; +} +/** Additional options for the {@link NftNamespace.getNftMetadataBatch} method. */ +export interface NftMetadataBatchOptions { + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; + /** + * Whether to refresh the metadata for the given NFT token before returning + * the response. Defaults to false for faster response times. + */ + refreshCache?: boolean; +} +/** + * The successful object returned by the {@link getFloorPrice} call for each + * marketplace (e.g. looksRare). + * + * @public + */ +export interface FloorPriceMarketplace { + /** The floor price of the collection on the given marketplace */ + readonly floorPrice: number; + /** The currency in which the floor price is denominated */ + readonly priceCurrency: string; + /** The link to the collection on the given marketplace */ + readonly collectionUrl: string; + /** UTC timestamp of when the floor price was retrieved from the marketplace */ + readonly retrievedAt: string; +} +/** + * The failing object returned by the {@link getFloorPrice} call for each + * marketplace (e.g. looksRare). + * + * @public + */ +export interface FloorPriceError { + /** Error fetching floor prices from the given marketplace */ + readonly error: string; +} +/** + * The response object for the {@link getFloorPrice} method. + * + * @public + */ +export interface GetFloorPriceResponse { + /** + * Name of the NFT marketplace where the collection is listed. Current + * marketplaces supported: OpenSea, LooksRare + */ + readonly openSea: FloorPriceMarketplace | FloorPriceError; + readonly looksRare: FloorPriceMarketplace | FloorPriceError; +} +/** + * Optional parameters object for the the {@link getContractsForOwner} method + * + * @public + */ +export interface GetContractsForOwnerOptions { + /** Key for pagination to use to fetch results from the next page if available. */ + pageKey?: string; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are included in the response. May not be used in + * conjunction with {@link excludeFilters}. + */ + includeFilters?: NftFilters[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are excluded from the response. May not be used in + * conjunction with {@link includeFilters} + */ + excludeFilters?: NftFilters[]; + /** + * Order in which to return results. By default, results are ordered by + * contract address and token ID in lexicographic order. + */ + orderBy?: NftOrdering; +} +/** + * The response for the {@link NftNamespace.getContractsForOwner} method. + * + * @public + */ +export interface GetContractsForOwnerResponse { + /** The list of contracts, that match the query, held by the given address. */ + contracts: ContractForOwner[]; + /** Key for pagination to use to fetch results from the next page if available. */ + pageKey?: string; + /** Total number of NFT contracts held by the given address. */ + totalCount: number; +} +/** Represents a single NFT contract data in the {@link GetContractsForOwnerResponse}. */ +export interface ContractForOwner extends NftContract { + /** + * Sum of NFT balances across all token IDs held by the owner. For + * non-fungible tokens this will be equal to the numDistinctTokensOwned, but + * it may be higher if the user holds some fungible ERC1155 tokens. + */ + totalBalance: number; + /** + * Number of distinct token IDs held by the owner. For non-fungible tokens + * this will be equal to the totalBalance, but it may be lower if the user + * holds some fungible ERC1155 tokens. + */ + numDistinctTokensOwned: number; + isSpam: boolean; + /** One of the tokens from this contract held by the owner. */ + tokenId: string; + /** Alternative NFT metadata for this contract to be parsed manually. */ + media: Media; +} +/** + * Optional parameters object for the {@link getNftSales} endpoint. + * + * This interface is used to filter the NFT sales data. + * + * @public + */ +export interface GetNftSalesOptions { + /** The block number to start fetching NFT sales data from. */ + fromBlock?: number | 'latest'; + /** The block number limit to fetch NFT sales data from. */ + toBlock?: number | 'latest'; + /** Whether to return the results in ascending or descending order by block number. */ + order?: SortingOrder; + /** The NFT marketplace to filter sales by. */ + marketplace?: NftSaleMarketplace; + /** The address of the NFT buyer to filter sales by. */ + buyerAddress?: string; + /** The address of the NFT seller to filter sales by. */ + sellerAddress?: string; + /** + * Filter by whether the buyer or seller was the taker in the NFT trade. + * Defaults to returning both buyer and seller taker trades. + */ + taker?: NftSaleTakerType; + /** The maximum number of NFT sales to return. */ + limit?: number; + /** Key for pagination to use to fetch results from the next page if available. */ + pageKey?: string; +} +/** + * Alternative optional parameters object for the {@link getNftSales} endpoint + * that allows filtering results by contractAddress. + * + * This interface is used to filter the NFT sales data. + * + * @public + */ +export interface GetNftSalesOptionsByContractAddress extends GetNftSalesOptions { + /** The contract address of a NFT collection to filter sales by. */ + contractAddress: string; + /** The token ID of an NFT within the specified contractAddress to filter sales by. */ + tokenId?: BigNumberish; +} +/** + * The response for the {@link NftNamespace.getNftSales} method. + * + * @public + */ +export interface GetNftSalesResponse { + /** The page key to use to fetch the next page if more results are available. */ + pageKey?: string; + /** List of NFT sales that match the query */ + nftSales: NftSale[]; +} +/** Represents a single NFT sale data in the {@link GetNftSalesResponse}. */ +export interface NftSale { + /** The marketplace the sale took place on. */ + marketplace: NftSaleMarketplace; + /** The NFT contract address. */ + contractAddress: string; + /** The decimal token ID of the NFT being sold. */ + tokenId: string; + /** The number of tokens sold in the sale as a decimal integer string. */ + quantity: string; + /** The address of the buyer in the NFT sale. */ + buyerAddress: string; + /** The address of the seller in the NFT sale. */ + sellerAddress: string; + /** Whether the price taker in the trade was the buyer or the seller. */ + taker: NftSaleTakerType; + /** The payment from buyer to the seller. */ + sellerFee: NftSaleFeeData; + /** The payment from buyer to the marketplace. */ + marketplaceFee?: NftSaleFeeData; + /** The payment from buyer to the royalty address of the NFT collection. */ + royaltyFee?: NftSaleFeeData; + /** The block number the NFT sale took place in. */ + blockNumber: number; + /** The log number of the sale event emitted within the block. */ + logIndex: number; + /** The index of the token within the bundle of NFTs sold in the sale. */ + bundleIndex: number; + /** The transactionHash of the NFT sale. */ + transactionHash: string; +} +/** + * Fee detail for an NFT sale. + * + * @public + */ +export interface NftSaleFeeData { + /** The fee payment amount as a decimal integer string. */ + amount: string; + /** The symbol of the token used for the payment. */ + symbol: string; + /** The number of decimals of the token used for the payment. */ + decimal: number; +} +/** + * Enum for representing the supported sorting orders of the API. + * + * @public + */ +export declare enum SortingOrder { + ASCENDING = "asc", + DESCENDING = "desc" +} +/** + * Enum representing the supported NFT marketplaces by the {@link getNftSales} endpoint. + * + * @public + */ +export declare enum NftSaleMarketplace { + SEAPORT = "seaport", + LOOKSRARE = "looksrare", + X2Y2 = "x2y2", + UNKNOWN = "unknown" +} +/** + * Enum for specifing the taker type for the {@link getNftSales} endpoint. + * + * @public + */ +export declare enum NftSaleTakerType { + BUYER = "buyer", + SELLER = "seller" +} +/** + * Information about the rarity of an NFT's attribute in the specified collection. + * + * @public + */ +export interface NftAttributeRarity { + /** Name of the NFT's attribute. */ + value: string; + /** The type of NFT attribute. */ + traitType: string; + /** + * A number from 0 to 1 representing the prevalence of this value for this + * trait type in the current collection. + */ + prevalence: number; +} +/** + * Summary of the attribute prevalence for the specified NFT contract. + * + * @public + */ +export interface NftAttributesResponse { + /** The specified NFT contract's address. */ + contractAddress: string; + /** The specified NFT contract's total supply. */ + totalSupply: number; + /** + * The attribute prevalence of each trait grouped by the trait type for the + * provided NFT. + */ + summary: Record>; +} +/** The refresh result response object returned by {@link refreshContract}. */ +export interface RefreshContractResult { + /** The NFT contract address that was passed in to be refreshed. */ + contractAddress: string; + /** The current state of the refresh request. */ + refreshState: RefreshState; + /** + * Percentage of tokens currently refreshed, represented as an integer string. + * Field can be null if the refresh has not occurred. + */ + progress: string | null; +} +/** The current state of the NFT contract refresh process. */ +export declare enum RefreshState { + /** The provided contract is not an NFT or does not contain metadata. */ + DOES_NOT_EXIST = "does_not_exist", + /** The contract has already been queued for refresh. */ + ALREADY_QUEUED = "already_queued", + /** The contract is currently being refreshed. */ + IN_PROGRESS = "in_progress", + /** The contract refresh is complete. */ + FINISHED = "finished", + /** The contract refresh has been queued and await execution. */ + QUEUED = "queued", + /** The contract was unable to be queued due to an internal error. */ + QUEUE_FAILED = "queue_failed" +} +/** + * The parameter field of {@link TransactionReceiptsParams}. + * + * @public + */ +export interface TransactionReceiptsBlockNumber { + /** The block number to get transaction receipts for. */ + blockNumber: string; +} +/** + * The parameter field of {@link TransactionReceiptsParams}. + * + * @public + */ +export interface TransactionReceiptsBlockHash { + /** The block hash to get transaction receipts for. */ + blockHash: string; +} +/** + * The parameters to use with the {@link CoreNamespace.getTransactionReceipts} method. + * + * @public + */ +export declare type TransactionReceiptsParams = TransactionReceiptsBlockNumber | TransactionReceiptsBlockHash; +/** + * Response object for a {@link CoreNamespace.getTransactionReceipts} call. + * + * @public + */ +export interface TransactionReceiptsResponse { + /** A list of transaction receipts for the queried block. */ + receipts: TransactionReceipt[] | null; +} +/** + * Metadata object returned in a {@link AssetTransfersResult} object if the asset + * transferred is an ERC1155. + * + * @public + */ +export interface ERC1155Metadata { + tokenId: string; + value: string; +} +/** + * Information about the underlying contract for the asset that was transferred + * in a {@link AssetTransfersResult} object. + * + * @public + */ +export interface RawContract { + /** + * The raw transfer value as a hex string. `null` if the transfer was for an + * ERC721 or ERC1155 token. + */ + value: string | null; + /** The contract address. `null` if it was an internal or external transfer. */ + address: string | null; + /** + * The number of decimals in the contract as a hex string. `null` if the value + * is not in the contract and not available from other sources. + */ + decimal: string | null; +} +/** + * Optional parameters object for the {@link getNftsForContract} and + * {@link getNftsForContractIterator} functions. + * + * This interface is used to fetch NFTs with their associated metadata. To get + * Nfts without their associated metadata, use {@link GetBaseNftsForContractOptions}. + * + * @public + */ +export interface GetNftsForContractOptions { + /** + * Optional page key from an existing {@link NftContractBaseNftsResponse} or + * {@link NftContractNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */ + omitMetadata?: boolean; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; +} +/** + * Optional parameters object for the {@link getNftsForContract} and + * {@link getNftsForContractIterator} functions. + * + * This interface is used to fetch NFTs without their associated metadata. To + * get Nfts with their associated metadata, use {@link GetNftsForContractOptions}. + * + * @public + */ +export interface GetBaseNftsForContractOptions { + /** + * Optional page key from an existing {@link NftContractBaseNftsResponse} or + * {@link NftContractNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */ + omitMetadata: false; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; +} +/** + * Optional parameters object for the {@link getNftsForContract} method. + * + * This interface configures options when fetching the owner addresses of the + * provided contract. + * + * @public + */ +export interface GetOwnersForContractOptions { + /** + * Whether to include the token balances per token id for each owner. Defaults + * to false when omitted. + */ + withTokenBalances?: boolean; + /** The block number in hex or decimal to fetch owners for. */ + block?: string; + /** Optional page key to paginate the next page for large requests. */ + pageKey?: string; +} +/** + * Optional parameters object for the {@link getNftsForContract} method. + * + * This interface configures options when fetching the owner addresses of the + * provided contract. + * + * @public + */ +export interface GetOwnersForContractWithTokenBalancesOptions { + /** + * Whether to include the token balances per token id for each owner. Defaults + * to false when omitted. + */ + withTokenBalances: true; + /** The block number in hex or decimal to fetch owners for. */ + block?: string; + /** Optional page key to paginate the next page for large requests. */ + pageKey?: string; +} +/** + * The response object for the {@link getNftsForContract} function. The object + * contains the NFTs without metadata inside the NFT contract. + * + * @public + */ +export interface NftContractBaseNftsResponse { + /** An array of NFTs without metadata. */ + nfts: BaseNft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + pageKey?: string; +} +/** + * The response object for the {@link getNftsForContract} function. The object + * contains the NFTs with metadata inside the NFT contract. + * + * @public + */ +export interface NftContractNftsResponse { + /** An array of NFTs with metadata. */ + nfts: Nft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + pageKey?: string; +} +/** OpenSea's metadata for an NFT collection. */ +export interface OpenSeaCollectionMetadata { + /** The floor price of the NFT. */ + floorPrice?: number; + /** The name of the collection on OpenSea. */ + collectionName?: string; + /** The approval status of the collection on OpenSea. */ + safelistRequestStatus?: OpenSeaSafelistRequestStatus; + /** The image URL determined by OpenSea. */ + imageUrl?: string; + /** The description of the collection on OpenSea. */ + description?: string; + /** The homepage of the collection as determined by OpenSea. */ + externalUrl?: string; + /** The Twitter handle of the collection. */ + twitterUsername?: string; + /** The Discord URL of the collection. */ + discordUrl?: string; + /** Timestamp of when the OpenSea metadata was last ingested by Alchemy. */ + lastIngestedAt?: string; +} +/** An OpenSea collection's approval status. */ +export declare enum OpenSeaSafelistRequestStatus { + /** Verified collection. */ + VERIFIED = "verified", + /** Collections that are approved on open sea and can be found in search results. */ + APPROVED = "approved", + /** Collections that requested safelisting on OpenSea. */ + REQUESTED = "requested", + /** Brand new collections. */ + NOT_REQUESTED = "not_requested" +} +/** + * The response object for the {@link findContractDeployer} function. + * + * @public + */ +export interface DeployResult { + /** The address of the contract deployer, if it is available. */ + readonly deployerAddress?: string; + /** The block number the contract was deployed in. */ + readonly blockNumber: number; +} +/** + * Method names for Alchemy's custom Subscription API endpoints. + * + * This value is provided in the `method` field when creating an event filter on + * the Websocket Namespace. + */ +export declare enum AlchemySubscription { + PENDING_TRANSACTIONS = "alchemy_pendingTransactions", + MINED_TRANSACTIONS = "alchemy_minedTransactions" +} +/** + * Event filter for the {@link AlchemyWebSocketProvider.on} and + * {@link AlchemyWebSocketProvider.once} methods to use Alchemy's custom + * `alchemy_pendingTransactions` endpoint. + * + * Returns the transaction information for all pending transactions that match a + * given filter. For full documentation, see: + * {@link https://docs.alchemy.com/reference/alchemy-pendingtransactions} + * + * Note that excluding all optional parameters will return transaction + * information for ALL pending transactions that are added to the mempool. + * + * @public + */ +export interface AlchemyPendingTransactionsEventFilter { + method: AlchemySubscription.PENDING_TRANSACTIONS; + /** Filter pending transactions sent FROM the provided address or array of addresses. */ + fromAddress?: string | string[]; + /** Filter pending transactions sent TO the provided address or array of addresses. */ + toAddress?: string | string[]; + /** + * Whether to only include transaction hashes and exclude the rest of the + * transaction response for a smaller payload. Defaults to false (by default, + * the entire transaction response is included). + * + * Note that setting only {@link hashesOnly} to true will return the same + * response as subscribing to `newPendingTransactions`. + */ + hashesOnly?: boolean; +} +/** + * Event filter for the {@link AlchemyWebSocketProvider.on} and + * {@link AlchemyWebSocketProvider.once} methods to use Alchemy's custom + * `alchemy_minedTransactions` endpoint. + * + * Returns the transaction information for all mined transactions that match the + * provided filter. For full documentation, see: + * {@link https://docs.alchemy.com/reference/alchemy-minedtransactions} + * + * Note that excluding all optional parameters will return transaction + * information for ALL mined transactions. + * + * @public + */ +export interface AlchemyMinedTransactionsEventFilter { + method: AlchemySubscription.MINED_TRANSACTIONS; + /** + * Address filters to subscribe to. Defaults to all transactions if omitted. + * Limit 100 address filters. Requires a non-empty array. + */ + addresses?: NonEmptyArray; + /** + * Whether to include transactions that were removed from the mempool. + * Defaults to false. + */ + includeRemoved?: boolean; + /** + * Whether to only include transaction hashes and exclude the rest of the + * transaction response for a smaller payload. Defaults to false (by default, + * the entire transaction response is included). + */ + hashesOnly?: boolean; +} +/** + * Address filters for {@link AlchemyMinedTransactionsEventFilter}. Requires at + * least one of the fields to be set. + */ +export declare type AlchemyMinedTransactionsAddress = RequireAtLeastOne<{ + to?: string; + from?: string; +}>; +/** + * Alchemy's event type that extends the default {@link EventType} interface to + * also include Alchemy's Subscription API. + * + * @public + */ +export declare type AlchemyEventType = EventType | AlchemyEventFilter; +/** + * This type represents the Alchemy's Subscription API endpoints as event + * filters compatible with other ethers events. + */ +export declare type AlchemyEventFilter = AlchemyMinedTransactionsEventFilter | AlchemyPendingTransactionsEventFilter; +/** Options for the {@link TransactNamespace.sendPrivateTransaction} method. */ +export interface SendPrivateTransactionOptions { + /** + * Whether to use fast-mode. Defaults to false. Please note that fast mode + * transactions cannot be cancelled using + * {@link TransactNamespace.cancelPrivateTransaction}. method. + * + * See {@link https://docs.flashbots.net/flashbots-protect/rpc/fast-mode} for + * more details. + */ + fast: boolean; +} +/** SDK representation of a Webhook in the Notify API. */ +export interface Webhook { + /** The webhook's unique id. */ + id: string; + /** The network the webhook is on. */ + network: Network; + /** The type of webhook. */ + type: WebhookType; + /** The url that the webhook sends its payload to. */ + url: string; + /** Whether the webhook is currently active */ + isActive: boolean; + /** The creation time of the webhook as an ISO string. */ + timeCreated: string; + /** The signing key used to verify payloads for the webhook. */ + signingKey: string; + /** The webhook version. All newly created webhooks default to V2. */ + version: WebhookVersion; + /** + * The app id of the app used for the webhook. This field is only present on + * {@link MinedTransactionWebhook} and {@link DroppedTransactionWebhook} + */ + appId?: string; +} +/** The version of the webhook. All newly created webhooks default to V2. */ +export declare enum WebhookVersion { + V1 = "V1", + V2 = "V2" +} +/** The type of {@link Webhook}. */ +export declare enum WebhookType { + MINED_TRANSACTION = "MINED_TRANSACTION", + DROPPED_TRANSACTION = "DROPPED_TRANSACTION", + ADDRESS_ACTIVITY = "ADDRESS_ACTIVITY", + NFT_ACTIVITY = "NFT_ACTIVITY" +} +/** + * A Mined Transaction Webhook is used to notify your app whenever a transaction + * sent through your API key gets successfully mined. This is useful if you want + * to notify customers that their transaction went through. + */ +export interface MinedTransactionWebhook extends Webhook { + type: WebhookType.MINED_TRANSACTION; +} +/** + * A Dropped Transaction webhook is used to notify your app whenever a + * transaction sent through your API key gets dropped. This can be useful if you + * want to notify customers that their transactions were dropped. + */ +export interface DroppedTransactionWebhook extends Webhook { + type: WebhookType.DROPPED_TRANSACTION; +} +/** + * An Address Activity Webhook tracks ETH, ERC20, ERC721, and ERC1155 transfers + * for the provided addresses. This can be used to notify your app with + * real-time state changes when your tracked addresses send or receive tokens. + */ +export interface AddressActivityWebhook extends Webhook { + type: WebhookType.ADDRESS_ACTIVITY; +} +/** + * The NFT Activity Webhook tracks all ERC721 and ERC1155 activity. This can be + * used to notify your app with real time state changes when an NFT is + * transferred between addresses. + */ +export interface NftActivityWebhook extends Webhook { + type: WebhookType.NFT_ACTIVITY; +} +/** The response for a {@link NotifyNamespace.getAllWebhooks} method. */ +export interface GetAllWebhooksResponse { + /** All webhooks attached to the provided auth token. */ + webhooks: Webhook[]; + /** The total number of webhooks. */ + totalCount: number; +} +/** Options object for the {@link NotifyNamespace.getAddresses} method. */ +export interface GetAddressesOptions { + /** Number of addresses to fetch. */ + limit?: number; + /** Page */ + pageKey?: string; +} +/** Response object for the {@link NotifyNamespace.getAddresses} method. */ +export interface AddressActivityResponse { + /** The addresses for the webhook. */ + addresses: string[]; + /** The total number of addresses. */ + totalCount: number; + /** Optional page key used to fetch the remaining addresses. */ + pageKey?: string; +} +/** + * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order + * to create a {@link MinedTransactionWebhook} or {@link DroppedTransactionWebhook}. + * + * The webhook will be created on the app and network associated with the appId. + * To find the app id of a project, go to the Alchemy Dashboard in the Apps tab. + * After clicking on an app, the app id is the string in the URL following 'apps/'. + * + * This is a temporary workaround for now. We're planning on detecting the app + * id from the provided api key directly. Stay tuned! + */ +export interface TransactionWebhookParams { + /** The app id of the project to create the webhook on. */ + appId: string; +} +/** + * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order + * to create a {@link NftActivityWebhook}. + */ +export interface NftWebhookParams { + /** Array of NFT filters the webhook should track. */ + filters: NftFilter[]; + /** + * Optional network to create the webhook on. If omitted, the webhook will be + * created on network of the app provided in the api key config. + */ + network?: Network; +} +/** + * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order + * to create a {@link AddressActivityWebhook}. + */ +export interface AddressWebhookParams { + /** Array of addresses the webhook should activity for. */ + addresses: string[]; + /** + * Optional network to create the webhook on. If omitted, the webhook will be + * created on network of the app provided in the api key config. + */ + network?: Network; +} +/** NFT to track on a {@link NftActivityWebhook}. */ +export interface NftFilter { + /** The contract address of the NFT. */ + contractAddress: string; + /** The token id of the NFT. */ + tokenId: BigNumberish; +} +/** Response object for the {@link NotifyNamespace.getNftFilters} method. */ +export interface NftFiltersResponse { + /** The NFT filters on the provided webhook. */ + filters: NftFilter[]; + /** The total number of NFT filters on the webhook. */ + totalCount: number; + /** Optional page key used to fetch the remaining filters. */ + pageKey?: string; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to mark a + * webhook as active or inactive. + */ +export interface WebhookStatusUpdate { + /** Whether the webhook is active. */ + isActive: boolean; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to add and + * remove NFT filters for a {@link NftActivityWebhook}. + */ +export interface WebhookNftFilterUpdate { + /** The filters to additionally track. */ + addFilters: NftFilter[]; + /** Existing filters to remove. */ + removeFilters: NftFilter[]; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to add and + * remove addresses for a {@link AddressActivityWebhook}. + */ +export interface WebhookAddressUpdate { + /** The addresses to additionally track. */ + addAddresses: string[]; + /** Existing addresses to remove. */ + removeAddresses: string[]; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to replace + * all existing addresses for a {@link AddressActivityWebhook}. + */ +export interface WebhookAddressOverride { + /** The new addresses to track. Existing addresses will be removed. */ + newAddresses: string[]; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to update a + * {@link NftActivityWebhook}. + */ +export declare type NftWebhookUpdate = WebhookStatusUpdate | RequireAtLeastOne; +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to update a + * {@link AddressActivityWebhook}. + */ +export declare type AddressWebhookUpdate = WebhookStatusUpdate | RequireAtLeastOne | WebhookAddressOverride; +/** + * Requires at least one of the properties to be set. + * + * Implementation copied over from + * {@link https://learn.microsoft.com/en-us/javascript/api/@azure/keyvault-certificates/requireatleastone?view=azure-node-latest} + */ +export declare type RequireAtLeastOne = { + [K in keyof T]-?: Required> & Partial>>; +}[keyof T]; +/** Requires an array with at least one value. */ +export declare type NonEmptyArray = [T, ...T[]]; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/util/const.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/util/const.d.ts new file mode 100644 index 0000000..1269128 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/util/const.d.ts @@ -0,0 +1,43 @@ +import { Network as NetworkFromEthers } from '@ethersproject/networks'; +import { Network } from '../types/types'; +export declare const DEFAULT_ALCHEMY_API_KEY = "demo"; +export declare const DEFAULT_NETWORK = Network.ETH_MAINNET; +export declare const DEFAULT_MAX_RETRIES = 5; +export declare function getAlchemyNftHttpUrl(network: Network, apiKey: string): string; +export declare function getAlchemyWsUrl(network: Network, apiKey: string): string; +export declare function getAlchemyWebhookHttpUrl(): string; +export declare enum AlchemyApiType { + BASE = 0, + NFT = 1, + WEBHOOK = 2 +} +/** + * Mapping of network names to their corresponding Network strings used to + * create an Ethers.js Provider instance. + */ +export declare const EthersNetwork: { + "eth-mainnet": string; + "eth-ropsten": string; + "eth-goerli": string; + "eth-kovan": string; + "eth-rinkeby": string; + "opt-mainnet": string; + "opt-kovan": string; + "opt-goerli": string; + "arb-mainnet": string; + "arb-rinkeby": string; + "arb-goerli": string; + "polygon-mainnet": string; + "polygon-mumbai": string; + "astar-mainnet": string; +}; +/** + * Mapping of network names to their corresponding Ethers Network objects. These + * networks are not yet supported by Ethers and are listed here to be overriden + * in the provider. + */ +export declare const CustomNetworks: { + [key: string]: NetworkFromEthers; +}; +export declare function noop(): void; +export declare const ETH_NULL_VALUE = "0x"; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/util/logger.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/util/logger.d.ts new file mode 100644 index 0000000..7e8cda8 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/util/logger.d.ts @@ -0,0 +1,55 @@ +/** + * The SDK has 4 log levels and a 5th option for disabling all logging. By + * default, the log level is set to INFO. + * + * The order is a follows: DEBUG < INFO < WARN < ERROR + * + * All log types above the current log level will be outputted. + */ +export declare enum LogLevel { + DEBUG = 0, + INFO = 1, + WARN = 2, + ERROR = 3, + SILENT = 4 +} +/** + * The level of verbosity for the logger. + * + * @public + */ +export declare type LogLevelString = 'debug' | 'info' | 'warn' | 'error' | 'silent'; +/** + * Configures the verbosity of logging. The default log level is `info`. + * + * @param logLevel - The verbosity of logging. Can be any of the following values: + * + * - `debug`: The most verbose logging level. + * - `info`: The default logging level. + * - `warn`: A logging level for non-critical issues. + * - `error`: A logging level for critical issues. + * - `silent`: Turn off all logging. + * + * @public + */ +export declare function setLogLevel(logLevel: LogLevelString): void; +export declare function logDebug(message: string, ...args: unknown[]): void; +export declare function logInfo(message: string, ...args: unknown[]): void; +export declare function logWarn(message: string, ...args: unknown[]): void; +export declare function logError(message: string, ...args: unknown[]): void; +export declare class Logger { + /** The log level of the given Logger instance. */ + private _logLevel; + constructor(); + get logLevel(): LogLevel; + set logLevel(val: LogLevel); + debug(...args: unknown[]): void; + info(...args: unknown[]): void; + warn(...args: unknown[]): void; + error(...args: unknown[]): void; + /** + * Forwards log messages to their corresponding console counterparts if the + * log level allows it. + */ + private _log; +} diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/util/sendRest.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/util/sendRest.d.ts new file mode 100644 index 0000000..e356e41 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/util/sendRest.d.ts @@ -0,0 +1,11 @@ +/** + * Given a REST endpoint, method, and params, sends the request with axios and + * returns the response. + */ +import { AxiosRequestConfig, AxiosResponse } from 'axios'; +/** + * Helper function to send http requests using Axis. + * + * @private + */ +export declare function sendAxiosRequest(baseUrl: string, restApiName: string, methodName: string, params: Req, overrides?: AxiosRequestConfig): Promise>; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/util/util.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/util/util.d.ts new file mode 100644 index 0000000..7ce652d --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/util/util.d.ts @@ -0,0 +1,13 @@ +import { BaseNft, Nft, NftContract } from '../api/nft'; +import { RawBaseNft, RawContractBaseNft, RawGetContractsForOwnerResponse, RawGetNftSalesResponse, RawNft, RawNftAttributeRarity, RawNftContract, RawOpenSeaCollectionMetadata } from '../internal/raw-interfaces'; +import { GetContractsForOwnerResponse, GetNftSalesResponse, NftAttributeRarity, OpenSeaCollectionMetadata } from '../types/types'; +export declare function formatBlock(block: string | number): string; +export declare function getNftContractFromRaw(rawNftContract: RawNftContract): NftContract; +export declare function getBaseNftFromRaw(rawBaseNft: RawBaseNft): BaseNft; +export declare function getBaseNftFromRaw(rawContractBaseNft: RawContractBaseNft, contractAddress: string): BaseNft; +export declare function getNftFromRaw(rawNft: RawNft): Nft; +export declare function getNftSalesFromRaw(rawNftSales: RawGetNftSalesResponse): GetNftSalesResponse; +export declare function getNftRarityFromRaw(rawNftRarity: RawNftAttributeRarity[]): NftAttributeRarity[]; +export declare function getContractsForOwnerFromRaw(rawContractsForOwner: RawGetContractsForOwnerResponse): GetContractsForOwnerResponse; +export declare function parseOpenSeaMetadata(openSea: RawOpenSeaCollectionMetadata | undefined): OpenSeaCollectionMetadata | undefined; +export declare const IS_BROWSER: boolean; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/src/version.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/src/version.d.ts new file mode 100644 index 0000000..86a14fc --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/src/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "2.2.5"; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/test/integration/alchemy.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/test/integration/alchemy.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/test/integration/alchemy.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/test/integration/core.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/test/integration/core.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/test/integration/core.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/test/integration/nft.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/test/integration/nft.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/test/integration/nft.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/test/integration/notify.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/test/integration/notify.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/test/integration/notify.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/test/integration/provider.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/test/integration/provider.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/test/integration/provider.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/test/integration/transact.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/test/integration/transact.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/test/integration/transact.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/test/integration/wallet.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/test/integration/wallet.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/test/integration/wallet.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/test/test-util.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/test/test-util.d.ts new file mode 100644 index 0000000..52fd8cd --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/test/test-util.d.ts @@ -0,0 +1,45 @@ +/// +import { BaseNft, Media, Nft, NftContract, NftSaleMarketplace, NftSaleTakerType, NftTokenType, OwnedBaseNft, OwnedNft, TokenUri } from '../src'; +import { RawBaseNft, RawContractBaseNft, RawContractForOwner, RawNft, RawNftContract, RawNftContractMetadata, RawNftSale, RawOpenSeaCollectionMetadata, RawOwnedBaseNft, RawOwnedNft } from '../src/internal/raw-interfaces'; +import { BlockHead, LogsEvent } from '../src/internal/websocket-backfiller'; +export declare const TEST_WALLET_PRIVATE_KEY = "dd5bdf09397b1fdf98e4f72c66047d5104b1511fa7dc1b8fdddd61a150f732c9"; +export declare const TEST_WALLET_PUBLIC_ADDRESS = "0x4b9007B0BcE78cfB634032ec31Ed56adB464287b"; +/** Creates a dummy response for the `getContractMetadata` endpoint. */ +export declare function createRawNftContract(address: string, tokenType: NftTokenType, name?: string, symbol?: string, totalSupply?: string, openSea?: RawOpenSeaCollectionMetadata): RawNftContract; +export declare function createRawOpenSeaCollectionMetadata(): RawOpenSeaCollectionMetadata; +export declare function createRawOwnedBaseNft(address: string, tokenId: string, balance: string, tokenType?: NftTokenType): RawOwnedBaseNft; +export declare function createOwnedBaseNft(address: string, tokenId: string, balance: number, tokenType?: NftTokenType): OwnedBaseNft; +export declare function createRawBaseNft(contractAddress: string, tokenId: string | number, tokenType?: NftTokenType): RawBaseNft; +export declare function createBaseNft(address: string, tokenId: string | number, tokenType?: NftTokenType): BaseNft; +export declare function createNft(title: string, address: string, tokenId: string, tokenType?: NftTokenType, tokenUri?: TokenUri, media?: TokenUri[] | undefined): Nft; +interface RawNftOptions { + tokenUri?: TokenUri; + media?: TokenUri[] | undefined; + timeLastUpdated?: string; + description?: string | Array; + contractMetadata?: RawNftContractMetadata; +} +export declare function createRawNft(contractAddress: string, title: string, tokenId: string, tokenType?: NftTokenType, options?: RawNftOptions): RawNft; +export declare function createRawOwnedNft(title: string, address: string, tokenId: string, balance: string, tokenType?: NftTokenType, contractMetadata?: RawNftContractMetadata): RawOwnedNft; +export declare function createOwnedNft(title: string, address: string, tokenId: string, balance: number, tokenType?: NftTokenType): OwnedNft; +export declare function createRawNftContractBaseNft(tokenId: string): RawContractBaseNft; +export declare function createRawNftSale(contractAddress: string, tokenId: string, marketplace: NftSaleMarketplace, taker: NftSaleTakerType, buyerAddress: string, sellerAddress: string): RawNftSale; +export declare function createRawContractForOwner(address: string, tokenId: string, media: Media, isSpam?: boolean, name?: string, tokenType?: NftTokenType, symbol?: string, totalSupply?: string, opensea?: RawOpenSeaCollectionMetadata): RawContractForOwner; +export declare function createNftMediaData(bytes?: number, format?: string, thumbnail?: string): Media; +export declare function verifyNftContractMetadata(actualNftContract: NftContract, expectedNftContract: NftContract, address: string, name: string, symbol: string, totalSupply: string, tokenType?: NftTokenType, openSea?: RawOpenSeaCollectionMetadata): void; +export declare type Mocked = T & { + [K in keyof T]: T[K] extends Function ? T[K] & jest.Mock : T[K]; +}; +/** A Promise implementation for deferred resolution. */ +export declare class Deferred { + promise: Promise; + constructor(); + resolve: (value: R | Promise) => void; + reject: (reason: Error) => void; +} +export declare function makeNewHeadsEvent(blockNumber: number, hash: string): BlockHead; +export declare function makeLogsEvent(blockNumber: number, blockHash: string, isRemoved?: boolean, logIndex?: number): LogsEvent; +export declare const TESTING_PRIVATE_KEY = "dd5bdf09397b1fdf98e4f72c66047d5104b1511fa7dc1b8fdddd61a150f732c9"; +export declare const TESTING_PUBLIC_ADDRESS = "0x4b9007B0BcE78cfB634032ec31Ed56adB464287b"; +export declare function loadAlchemyEnv(): Promise; +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/test/unit/alchemy.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/test/unit/alchemy.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/test/unit/alchemy.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/test/unit/backoff.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/test/unit/backoff.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/test/unit/backoff.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/test/unit/contract.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/test/unit/contract.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/test/unit/contract.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/test/unit/core-namespace.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/test/unit/core-namespace.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/test/unit/core-namespace.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/test/unit/logger.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/test/unit/logger.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/test/unit/logger.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/test/unit/nft-api.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/test/unit/nft-api.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/test/unit/nft-api.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/test/unit/nft.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/test/unit/nft.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/test/unit/nft.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/test/unit/provider.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/test/unit/provider.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/test/unit/provider.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/test/unit/request-batcher.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/test/unit/request-batcher.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/test/unit/request-batcher.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/test/unit/transact.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/test/unit/transact.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/test/unit/transact.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/test/unit/wallet.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/test/unit/wallet.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/test/unit/wallet.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/test/unit/websocket-backfiller.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/test/unit/websocket-backfiller.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/test/unit/websocket-backfiller.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/cjs/test/unit/websocket-provider.test.d.ts b/test/node_modules/alchemy-sdk/dist/cjs/test/unit/websocket-provider.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/cjs/test/unit/websocket-provider.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/alchemy-provider-a776ca8a.js b/test/node_modules/alchemy-sdk/dist/es/alchemy-provider-a776ca8a.js new file mode 100644 index 0000000..5e0d4c8 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/alchemy-provider-a776ca8a.js @@ -0,0 +1,769 @@ +import { _ as __awaiter, D as DEFAULT_ALCHEMY_API_KEY, C as CustomNetworks, a as DEFAULT_NETWORK, N as Network, I as IS_BROWSER, V as VERSION, l as logWarn, E as EthersNetwork, g as getAlchemyHttpUrl, b as getAlchemyWsUrl } from './index-02af91ae.js'; +import { getNetwork } from '@ethersproject/networks'; +import { JsonRpcProvider } from '@ethersproject/providers'; +import { fetchJson } from '@ethersproject/web'; +import './api/utils'; +import '@ethersproject/bignumber'; +import 'axios'; +import '@ethersproject/abstract-provider'; +import '@ethersproject/wallet'; +import '@ethersproject/contracts'; + +const version$1 = "logger/5.7.0"; + +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"; + /////////////////// + // Interaction Errors + // The user rejected the action, such as signing a message or sending + // a transaction + ErrorCode["ACTION_REJECTED"] = "ACTION_REJECTED"; +})(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; + let url = ""; + switch (code) { + case ErrorCode.NUMERIC_FAULT: { + url = "NUMERIC_FAULT"; + const fault = message; + switch (fault) { + case "overflow": + case "underflow": + case "division-by-zero": + url += "-" + fault; + break; + case "negative-power": + case "negative-width": + url += "-unsupported"; + break; + case "unbound-bitwise-result": + url += "-unbound-result"; + break; + } + break; + } + case ErrorCode.CALL_EXCEPTION: + case ErrorCode.INSUFFICIENT_FUNDS: + case ErrorCode.MISSING_NEW: + case ErrorCode.NONCE_EXPIRED: + case ErrorCode.REPLACEMENT_UNDERPRICED: + case ErrorCode.TRANSACTION_REPLACED: + case ErrorCode.UNPREDICTABLE_GAS_LIMIT: + url = code; + break; + } + if (url) { + message += " [ See: https:/\/links.ethers.org/v5-errors-" + url + " ]"; + } + 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 (_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$1); + } + 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 = "properties/5.7.0"; + +(undefined && undefined.__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 = new Logger(version); +function defineReadOnly(object, name, value) { + Object.defineProperty(object, name, { + enumerable: true, + value: value, + writable: false, + }); +} +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); +} +function deepCopy(object) { + return _deepCopy(object); +} + +/** Maximum size of a batch on the rpc provider. */ +const DEFAULT_MAX_REQUEST_BATCH_SIZE = 100; +/** Timeout interval before the pending batch is sent. */ +const DEFAULT_REQUEST_BATCH_DELAY_MS = 10; +/** + * Internal class to enqueue requests and automatically send/process batches. + * + * The underlying batching mechanism is loosely based on ethers.js's + * `JsonRpcBatchProvider`. + * + * @internal + */ +class RequestBatcher { + constructor(sendBatchFn, maxBatchSize = DEFAULT_MAX_REQUEST_BATCH_SIZE) { + this.sendBatchFn = sendBatchFn; + this.maxBatchSize = maxBatchSize; + /** + * Array of enqueued requests along with the constructed promise handlers for + * each request. + */ + this.pendingBatch = []; + } + /** + * Enqueues the provided request. The batch is immediately sent if the maximum + * batch size is reached. Otherwise, the request is enqueued onto a batch that + * is sent after 10ms. + * + * Returns a promise that resolves with the result of the request. + */ + enqueueRequest(request) { + return __awaiter(this, void 0, void 0, function* () { + const inflightRequest = { + request, + resolve: undefined, + reject: undefined + }; + const promise = new Promise((resolve, reject) => { + inflightRequest.resolve = resolve; + inflightRequest.reject = reject; + }); + this.pendingBatch.push(inflightRequest); + if (this.pendingBatch.length === this.maxBatchSize) { + // Send batch immediately if we are at the maximum batch size. + void this.sendBatchRequest(); + } + else if (!this.pendingBatchTimer) { + // Schedule batch for next event loop + short duration + this.pendingBatchTimer = setTimeout(() => this.sendBatchRequest(), DEFAULT_REQUEST_BATCH_DELAY_MS); + } + return promise; + }); + } + /** + * Sends the currently queued batches and resets the batch and timer. Processes + * the batched response results back to the original promises. + */ + sendBatchRequest() { + return __awaiter(this, void 0, void 0, function* () { + // Get the current batch and clear it, so new requests + // go into the next batch + const batch = this.pendingBatch; + this.pendingBatch = []; + if (this.pendingBatchTimer) { + clearTimeout(this.pendingBatchTimer); + this.pendingBatchTimer = undefined; + } + // Get the request as an array of requests + const request = batch.map(inflight => inflight.request); + return this.sendBatchFn(request).then(result => { + // 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 => { + batch.forEach(inflightRequest => { + inflightRequest.reject(error); + }); + }); + }); + } +} + +/** + * SDK's custom implementation of ethers.js's 'AlchemyProvider'. + * + * Do not call this constructor directly. Instead, instantiate an instance of + * {@link Alchemy} and call {@link Alchemy.config.getProvider()}. + * + * @public + */ +class AlchemyProvider extends JsonRpcProvider { + /** @internal */ + constructor(config) { + // Normalize the API Key to a string. + const apiKey = AlchemyProvider.getApiKey(config.apiKey); + // Generate our own connection info with the correct endpoint URLs. + const alchemyNetwork = AlchemyProvider.getAlchemyNetwork(config.network); + const connection = AlchemyProvider.getAlchemyConnectionInfo(alchemyNetwork, apiKey, 'http'); + // If a hardcoded url was specified in the config, use that instead of the + // provided apiKey or network. + if (config.url !== undefined) { + connection.url = config.url; + } + connection.throttleLimit = config.maxRetries; + // Normalize the Alchemy named network input to the network names used by + // ethers. This allows the parent super constructor in JsonRpcProvider to + // correctly set the network. + const ethersNetwork = EthersNetwork[alchemyNetwork]; + super(connection, ethersNetwork); + this.apiKey = config.apiKey; + this.maxRetries = config.maxRetries; + this.batchRequests = config.batchRequests; + // TODO: support individual headers when calling batch + const batcherConnection = Object.assign({}, this.connection); + batcherConnection.headers['Alchemy-Ethers-Sdk-Method'] = 'batchSend'; + const sendBatchFn = (requests) => { + return fetchJson(batcherConnection, JSON.stringify(requests)); + }; + this.batcher = new RequestBatcher(sendBatchFn); + } + /** + * Overrides the `UrlJsonRpcProvider.getApiKey` method as implemented by + * ethers.js. Returns the API key for an Alchemy provider. + * + * @internal + * @override + */ + static getApiKey(apiKey) { + if (apiKey == null) { + return DEFAULT_ALCHEMY_API_KEY; + } + if (apiKey && typeof apiKey !== 'string') { + throw new Error(`Invalid apiKey '${apiKey}' provided. apiKey must be a string.`); + } + return apiKey; + } + /** + * Overrides the `BaseProvider.getNetwork` method as implemented by ethers.js. + * + * This override allows the SDK to set the provider's network to values not + * yet supported by ethers.js. + * + * @internal + * @override + */ + static getNetwork(network) { + if (typeof network === 'string' && network in CustomNetworks) { + return CustomNetworks[network]; + } + // Call the standard ethers.js getNetwork method for other networks. + return getNetwork(network); + } + /** + * Converts the `Networkish` input to the network enum used by Alchemy. + * + * @internal + */ + static getAlchemyNetwork(network) { + if (network === undefined) { + return DEFAULT_NETWORK; + } + if (typeof network === 'number') { + throw new Error(`Invalid network '${network}' provided. Network must be a string.`); + } + // Guaranteed that `typeof network === 'string`. + const isValidNetwork = Object.values(Network).includes(network); + if (!isValidNetwork) { + throw new Error(`Invalid network '${network}' provided. Network must be one of: ` + + `${Object.values(Network).join(', ')}.`); + } + return network; + } + /** + * Returns a {@link ConnectionInfo} object compatible with ethers that contains + * the correct URLs for Alchemy. + * + * @internal + */ + static getAlchemyConnectionInfo(network, apiKey, type) { + const url = type === 'http' + ? getAlchemyHttpUrl(network, apiKey) + : getAlchemyWsUrl(network, apiKey); + return { + headers: IS_BROWSER + ? { + 'Alchemy-Ethers-Sdk-Version': VERSION + } + : { + 'Alchemy-Ethers-Sdk-Version': VERSION, + 'Accept-Encoding': 'gzip' + }, + allowGzip: true, + url + }; + } + /** + * Overrides the method in ethers.js's `StaticJsonRpcProvider` class. This + * method is called when calling methods on the parent class `BaseProvider`. + * + * @override + */ + 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) { + throw new Error('No network detected'); + } + } + return network; + }); + } + _startPending() { + logWarn('WARNING: Alchemy Provider does not support pending filters'); + } + /** + * Overrides the ether's `isCommunityResource()` method. Returns true if the + * current api key is the default key. + * + * @override + */ + isCommunityResource() { + return this.apiKey === DEFAULT_ALCHEMY_API_KEY; + } + /** + * Overrides the base {@link JsonRpcProvider.send} method to implement custom + * logic for sending requests to Alchemy. + * + * @param method The method name to use for the request. + * @param params The parameters to use for the request. + * @override + * @public + */ + // TODO: Add headers for `perform()` override. + send(method, params) { + return this._send(method, params, 'send'); + } + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `JsonRpcProvider.send()`. + * + * This method is copied over directly in order to implement custom headers + * + * @internal + */ + _send(method, params, methodName, forceBatch = false) { + const request = { + method, + params, + id: this._nextId++, + jsonrpc: '2.0' + }; + // START MODIFIED CODE + const connection = Object.assign({}, this.connection); + connection.headers['Alchemy-Ethers-Sdk-Method'] = methodName; + if (this.batchRequests || forceBatch) { + return this.batcher.enqueueRequest(request); + } + // END MODIFIED CODE + 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, + response: result, + provider: this + }); + return result; + }, error => { + this.emit('debug', { + action: 'response', + error, + request, + provider: this + }); + throw error; + }); + // Cache the fetch, but clear it on the next event loop + if (cache) { + this._cache[method] = result; + setTimeout(() => { + // @ts-ignore - This is done by ethers. + this._cache[method] = null; + }, 0); + } + return result; + } +} +/** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's + * `@ethersproject/web/src.ts/index.ts`. Used to support + * {@link AlchemyProvider._send}, which is also copied over. + */ +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; +} + +export { AlchemyProvider }; +//# sourceMappingURL=alchemy-provider-a776ca8a.js.map diff --git a/test/node_modules/alchemy-sdk/dist/es/alchemy-provider-a776ca8a.js.map b/test/node_modules/alchemy-sdk/dist/es/alchemy-provider-a776ca8a.js.map new file mode 100644 index 0000000..c26912f --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/alchemy-provider-a776ca8a.js.map @@ -0,0 +1 @@ +{"version":3,"file":"alchemy-provider-a776ca8a.js","sources":["../../node_modules/@ethersproject/logger/lib.esm/_version.js","../../node_modules/@ethersproject/logger/lib.esm/index.js","../../node_modules/@ethersproject/properties/lib.esm/_version.js","../../node_modules/@ethersproject/properties/lib.esm/index.js","../../src/internal/request-batcher.ts","../../src/api/alchemy-provider.ts"],"sourcesContent":["export const version = \"logger/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nlet _permanentCensorErrors = false;\nlet _censorErrors = false;\nconst LogLevels = { debug: 1, \"default\": 2, info: 2, warning: 3, error: 4, off: 5 };\nlet _logLevel = LogLevels[\"default\"];\nimport { version } from \"./_version\";\nlet _globalLogger = null;\nfunction _checkNormalize() {\n try {\n const missing = [];\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 ;\n }\n catch (error) {\n missing.push(form);\n }\n });\n if (missing.length) {\n throw new Error(\"missing \" + missing.join(\", \"));\n }\n if (String.fromCharCode(0xe9).normalize(\"NFD\") !== String.fromCharCode(0x65, 0x0301)) {\n throw new Error(\"broken implementation\");\n }\n }\n catch (error) {\n return error.message;\n }\n return null;\n}\nconst _normalizeError = _checkNormalize();\nexport var LogLevel;\n(function (LogLevel) {\n LogLevel[\"DEBUG\"] = \"DEBUG\";\n LogLevel[\"INFO\"] = \"INFO\";\n LogLevel[\"WARNING\"] = \"WARNING\";\n LogLevel[\"ERROR\"] = \"ERROR\";\n LogLevel[\"OFF\"] = \"OFF\";\n})(LogLevel || (LogLevel = {}));\nexport var ErrorCode;\n(function (ErrorCode) {\n ///////////////////\n // Generic Errors\n // Unknown Error\n ErrorCode[\"UNKNOWN_ERROR\"] = \"UNKNOWN_ERROR\";\n // Not Implemented\n ErrorCode[\"NOT_IMPLEMENTED\"] = \"NOT_IMPLEMENTED\";\n // Unsupported Operation\n // - operation\n ErrorCode[\"UNSUPPORTED_OPERATION\"] = \"UNSUPPORTED_OPERATION\";\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 ErrorCode[\"NETWORK_ERROR\"] = \"NETWORK_ERROR\";\n // Some sort of bad response from the server\n ErrorCode[\"SERVER_ERROR\"] = \"SERVER_ERROR\";\n // Timeout\n ErrorCode[\"TIMEOUT\"] = \"TIMEOUT\";\n ///////////////////\n // Operational Errors\n // Buffer Overrun\n ErrorCode[\"BUFFER_OVERRUN\"] = \"BUFFER_OVERRUN\";\n // Numeric Fault\n // - operation: the operation being executed\n // - fault: the reason this faulted\n ErrorCode[\"NUMERIC_FAULT\"] = \"NUMERIC_FAULT\";\n ///////////////////\n // Argument Errors\n // Missing new operator to an object\n // - name: The name of the class\n ErrorCode[\"MISSING_NEW\"] = \"MISSING_NEW\";\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 ErrorCode[\"INVALID_ARGUMENT\"] = \"INVALID_ARGUMENT\";\n // Missing argument to a function:\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n ErrorCode[\"MISSING_ARGUMENT\"] = \"MISSING_ARGUMENT\";\n // Too many arguments\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n ErrorCode[\"UNEXPECTED_ARGUMENT\"] = \"UNEXPECTED_ARGUMENT\";\n ///////////////////\n // Blockchain Errors\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 ErrorCode[\"CALL_EXCEPTION\"] = \"CALL_EXCEPTION\";\n // Insufficient funds (< value + gasLimit * gasPrice)\n // - transaction: the transaction attempted\n ErrorCode[\"INSUFFICIENT_FUNDS\"] = \"INSUFFICIENT_FUNDS\";\n // Nonce has already been used\n // - transaction: the transaction attempted\n ErrorCode[\"NONCE_EXPIRED\"] = \"NONCE_EXPIRED\";\n // The replacement fee for the transaction is too low\n // - transaction: the transaction attempted\n ErrorCode[\"REPLACEMENT_UNDERPRICED\"] = \"REPLACEMENT_UNDERPRICED\";\n // The gas limit could not be estimated\n // - transaction: the transaction passed to estimateGas\n ErrorCode[\"UNPREDICTABLE_GAS_LIMIT\"] = \"UNPREDICTABLE_GAS_LIMIT\";\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 ErrorCode[\"TRANSACTION_REPLACED\"] = \"TRANSACTION_REPLACED\";\n ///////////////////\n // Interaction Errors\n // The user rejected the action, such as signing a message or sending\n // a transaction\n ErrorCode[\"ACTION_REJECTED\"] = \"ACTION_REJECTED\";\n})(ErrorCode || (ErrorCode = {}));\n;\nconst HEX = \"0123456789abcdef\";\nexport class Logger {\n constructor(version) {\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n value: version,\n writable: false\n });\n }\n _log(logLevel, args) {\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]) {\n return;\n }\n console.log.apply(console, args);\n }\n debug(...args) {\n this._log(Logger.levels.DEBUG, args);\n }\n info(...args) {\n this._log(Logger.levels.INFO, args);\n }\n warn(...args) {\n this._log(Logger.levels.WARNING, args);\n }\n makeError(message, code, params) {\n // Errors are being censored\n if (_censorErrors) {\n return this.makeError(\"censored error\", code, {});\n }\n if (!code) {\n code = Logger.errors.UNKNOWN_ERROR;\n }\n if (!params) {\n params = {};\n }\n const messageDetails = [];\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 }\n else {\n messageDetails.push(key + \"=\" + JSON.stringify(value));\n }\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 const reason = message;\n let url = \"\";\n switch (code) {\n case ErrorCode.NUMERIC_FAULT: {\n url = \"NUMERIC_FAULT\";\n const fault = message;\n switch (fault) {\n case \"overflow\":\n case \"underflow\":\n case \"division-by-zero\":\n url += \"-\" + fault;\n break;\n case \"negative-power\":\n case \"negative-width\":\n url += \"-unsupported\";\n break;\n case \"unbound-bitwise-result\":\n url += \"-unbound-result\";\n break;\n }\n break;\n }\n case ErrorCode.CALL_EXCEPTION:\n case ErrorCode.INSUFFICIENT_FUNDS:\n case ErrorCode.MISSING_NEW:\n case ErrorCode.NONCE_EXPIRED:\n case ErrorCode.REPLACEMENT_UNDERPRICED:\n case ErrorCode.TRANSACTION_REPLACED:\n case ErrorCode.UNPREDICTABLE_GAS_LIMIT:\n url = code;\n break;\n }\n if (url) {\n message += \" [ See: https:/\\/links.ethers.org/v5-errors-\" + url + \" ]\";\n }\n if (messageDetails.length) {\n message += \" (\" + messageDetails.join(\", \") + \")\";\n }\n // @TODO: Any??\n const error = new Error(message);\n error.reason = reason;\n error.code = code;\n Object.keys(params).forEach(function (key) {\n error[key] = params[key];\n });\n return error;\n }\n throwError(message, code, params) {\n throw this.makeError(message, code, params);\n }\n throwArgumentError(message, name, value) {\n return this.throwError(message, Logger.errors.INVALID_ARGUMENT, {\n argument: name,\n value: value\n });\n }\n assert(condition, message, code, params) {\n if (!!condition) {\n return;\n }\n this.throwError(message, code, params);\n }\n assertArgument(condition, message, name, value) {\n if (!!condition) {\n return;\n }\n this.throwArgumentError(message, name, value);\n }\n checkNormalize(message) {\n if (message == null) {\n message = \"platform missing String.prototype.normalize\";\n }\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 checkSafeUint53(value, message) {\n if (typeof (value) !== \"number\") {\n return;\n }\n if (message == null) {\n 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 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 checkArgumentCount(count, expectedCount, message) {\n if (message) {\n message = \": \" + message;\n }\n else {\n message = \"\";\n }\n if (count < expectedCount) {\n this.throwError(\"missing argument\" + message, Logger.errors.MISSING_ARGUMENT, {\n count: count,\n expectedCount: expectedCount\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 checkNew(target, kind) {\n if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n checkAbstract(target, kind) {\n if (target === kind) {\n this.throwError(\"cannot instantiate abstract class \" + JSON.stringify(kind.name) + \" directly; use a sub-class\", Logger.errors.UNSUPPORTED_OPERATION, { 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 static globalLogger() {\n if (!_globalLogger) {\n _globalLogger = new Logger(version);\n }\n return _globalLogger;\n }\n static setCensorship(censorship, permanent) {\n if (!censorship && permanent) {\n this.globalLogger().throwError(\"cannot permanently disable censorship\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n if (_permanentCensorErrors) {\n if (!censorship) {\n return;\n }\n this.globalLogger().throwError(\"error censorship permanent\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n _censorErrors = !!censorship;\n _permanentCensorErrors = !!permanent;\n }\n static setLogLevel(logLevel) {\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 static from(version) {\n return new Logger(version);\n }\n}\nLogger.errors = ErrorCode;\nLogger.levels = LogLevel;\n//# sourceMappingURL=index.js.map","export const version = \"properties/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nexport function defineReadOnly(object, name, value) {\n Object.defineProperty(object, name, {\n enumerable: true,\n value: value,\n writable: false,\n });\n}\n// Crawl up the constructor chain to find a static method\nexport function getStatic(ctor, key) {\n for (let i = 0; i < 32; i++) {\n if (ctor[key]) {\n return ctor[key];\n }\n if (!ctor.prototype || typeof (ctor.prototype) !== \"object\") {\n break;\n }\n ctor = Object.getPrototypeOf(ctor.prototype).constructor;\n }\n return null;\n}\nexport function resolveProperties(object) {\n return __awaiter(this, void 0, void 0, function* () {\n const promises = Object.keys(object).map((key) => {\n const value = object[key];\n return Promise.resolve(value).then((v) => ({ key: key, value: v }));\n });\n const results = yield Promise.all(promises);\n return results.reduce((accum, result) => {\n accum[(result.key)] = result.value;\n return accum;\n }, {});\n });\n}\nexport function checkProperties(object, properties) {\n if (!object || typeof (object) !== \"object\") {\n logger.throwArgumentError(\"invalid object\", \"object\", object);\n }\n Object.keys(object).forEach((key) => {\n if (!properties[key]) {\n logger.throwArgumentError(\"invalid object key - \" + key, \"transaction:\" + key, object);\n }\n });\n}\nexport function shallowCopy(object) {\n const result = {};\n for (const key in object) {\n result[key] = object[key];\n }\n return result;\n}\nconst opaque = { bigint: true, boolean: true, \"function\": true, number: true, string: true };\nfunction _isFrozen(object) {\n // Opaque objects are not mutable, so safe to copy by assignment\n if (object === undefined || object === null || opaque[typeof (object)]) {\n return true;\n }\n if (Array.isArray(object) || typeof (object) === \"object\") {\n if (!Object.isFrozen(object)) {\n return false;\n }\n const keys = Object.keys(object);\n for (let i = 0; i < keys.length; i++) {\n let value = null;\n try {\n value = object[keys[i]];\n }\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 if (!_isFrozen(value)) {\n return false;\n }\n }\n return true;\n }\n return logger.throwArgumentError(`Cannot deepCopy ${typeof (object)}`, \"object\", object);\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) {\n if (_isFrozen(object)) {\n 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 if (typeof (object) === \"object\") {\n const result = {};\n for (const key in object) {\n const value = object[key];\n if (value === undefined) {\n continue;\n }\n defineReadOnly(result, key, deepCopy(value));\n }\n return result;\n }\n return logger.throwArgumentError(`Cannot deepCopy ${typeof (object)}`, \"object\", object);\n}\nexport function deepCopy(object) {\n return _deepCopy(object);\n}\nexport class Description {\n constructor(info) {\n for (const key in info) {\n this[key] = deepCopy(info[key]);\n }\n }\n}\n//# sourceMappingURL=index.js.map","import { JsonRpcRequest, JsonRpcResponse } from './internal-types';\n\n/** Maximum size of a batch on the rpc provider. */\nconst DEFAULT_MAX_REQUEST_BATCH_SIZE = 100;\n\n/** Timeout interval before the pending batch is sent. */\nconst DEFAULT_REQUEST_BATCH_DELAY_MS = 10;\n\n/**\n * Internal class to enqueue requests and automatically send/process batches.\n *\n * The underlying batching mechanism is loosely based on ethers.js's\n * `JsonRpcBatchProvider`.\n *\n * @internal\n */\nexport class RequestBatcher {\n /** Timeout timer that periodically sends the pending batch. */\n private pendingBatchTimer: NodeJS.Timer | undefined;\n\n /**\n * Array of enqueued requests along with the constructed promise handlers for\n * each request.\n */\n private pendingBatch: Array = [];\n\n constructor(\n private readonly sendBatchFn: SendBatchFn,\n private readonly maxBatchSize = DEFAULT_MAX_REQUEST_BATCH_SIZE\n ) {}\n\n /**\n * Enqueues the provided request. The batch is immediately sent if the maximum\n * batch size is reached. Otherwise, the request is enqueued onto a batch that\n * is sent after 10ms.\n *\n * Returns a promise that resolves with the result of the request.\n */\n async enqueueRequest(request: JsonRpcRequest): Promise {\n const inflightRequest: BatchRequest = {\n request,\n resolve: undefined,\n reject: undefined\n };\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.pendingBatch.length === this.maxBatchSize) {\n // Send batch immediately if we are at the maximum batch size.\n void this.sendBatchRequest();\n } else if (!this.pendingBatchTimer) {\n // Schedule batch for next event loop + short duration\n this.pendingBatchTimer = setTimeout(\n () => this.sendBatchRequest(),\n DEFAULT_REQUEST_BATCH_DELAY_MS\n );\n }\n\n return promise;\n }\n\n /**\n * Sends the currently queued batches and resets the batch and timer. Processes\n * the batched response results back to the original promises.\n */\n private async sendBatchRequest(): Promise {\n // Get the current batch and clear it, so new requests\n // go into the next batch\n const batch = this.pendingBatch;\n this.pendingBatch = [];\n if (this.pendingBatchTimer) {\n clearTimeout(this.pendingBatchTimer);\n this.pendingBatchTimer = undefined;\n }\n\n // Get the request as an array of requests\n const request = batch.map(inflight => inflight.request);\n\n return this.sendBatchFn(request).then(\n result => {\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 as any).code = payload.error.code;\n (error as any).data = payload.error.data;\n inflightRequest.reject!(error);\n } else {\n inflightRequest.resolve!(payload.result);\n }\n });\n },\n error => {\n batch.forEach(inflightRequest => {\n inflightRequest.reject!(error);\n });\n }\n );\n }\n}\n\n/** Function type to match the `fetchJson` function in ethers. */\ntype SendBatchFn = (reqs: JsonRpcRequest[]) => Promise;\n\n/**\n * Internal interface to represent a request on a batch along with the promises to resolve it.\n */\ninterface BatchRequest {\n request: JsonRpcRequest;\n resolve?: (result: any) => void;\n reject?: (error: Error) => void;\n}\n","import {\n Network as NetworkFromEthers,\n Networkish,\n getNetwork as getNetworkFromEthers\n} from '@ethersproject/networks';\nimport { deepCopy } from '@ethersproject/properties';\nimport {\n CommunityResourcable,\n JsonRpcProvider\n} from '@ethersproject/providers';\nimport { ConnectionInfo, fetchJson } from '@ethersproject/web';\n\nimport { JsonRpcRequest, JsonRpcResponse } from '../internal/internal-types';\nimport { RequestBatcher } from '../internal/request-batcher';\nimport { Network } from '../types/types';\nimport {\n CustomNetworks,\n DEFAULT_ALCHEMY_API_KEY,\n DEFAULT_NETWORK,\n EthersNetwork,\n getAlchemyHttpUrl,\n getAlchemyWsUrl\n} from '../util/const';\nimport { logWarn } from '../util/logger';\nimport { IS_BROWSER } from '../util/util';\nimport { VERSION } from '../version';\nimport { AlchemyConfig } from './alchemy-config';\n\n/**\n * SDK's custom implementation of ethers.js's 'AlchemyProvider'.\n *\n * Do not call this constructor directly. Instead, instantiate an instance of\n * {@link Alchemy} and call {@link Alchemy.config.getProvider()}.\n *\n * @public\n */\nexport class AlchemyProvider\n extends JsonRpcProvider\n implements CommunityResourcable\n{\n readonly apiKey: string;\n readonly maxRetries: number;\n readonly batchRequests: boolean;\n\n /**\n * VISIBLE ONLY FOR TESTING\n *@internal\n */\n readonly batcher: RequestBatcher;\n\n /** @internal */\n constructor(config: AlchemyConfig) {\n // Normalize the API Key to a string.\n const apiKey = AlchemyProvider.getApiKey(config.apiKey);\n\n // Generate our own connection info with the correct endpoint URLs.\n const alchemyNetwork = AlchemyProvider.getAlchemyNetwork(config.network);\n const connection = AlchemyProvider.getAlchemyConnectionInfo(\n alchemyNetwork,\n apiKey,\n 'http'\n );\n\n // If a hardcoded url was specified in the config, use that instead of the\n // provided apiKey or network.\n if (config.url !== undefined) {\n connection.url = config.url;\n }\n\n connection.throttleLimit = config.maxRetries;\n\n // Normalize the Alchemy named network input to the network names used by\n // ethers. This allows the parent super constructor in JsonRpcProvider to\n // correctly set the network.\n const ethersNetwork = EthersNetwork[alchemyNetwork];\n super(connection, ethersNetwork);\n\n this.apiKey = config.apiKey;\n this.maxRetries = config.maxRetries;\n this.batchRequests = config.batchRequests;\n\n // TODO: support individual headers when calling batch\n const batcherConnection = { ...this.connection };\n batcherConnection.headers!['Alchemy-Ethers-Sdk-Method'] = 'batchSend';\n const sendBatchFn = (\n requests: JsonRpcRequest[]\n ): Promise => {\n return fetchJson(batcherConnection, JSON.stringify(requests));\n };\n this.batcher = new RequestBatcher(sendBatchFn);\n }\n\n /**\n * Overrides the `UrlJsonRpcProvider.getApiKey` method as implemented by\n * ethers.js. Returns the API key for an Alchemy provider.\n *\n * @internal\n * @override\n */\n static getApiKey(apiKey: any): string {\n if (apiKey == null) {\n return DEFAULT_ALCHEMY_API_KEY;\n }\n if (apiKey && typeof apiKey !== 'string') {\n throw new Error(\n `Invalid apiKey '${apiKey}' provided. apiKey must be a string.`\n );\n }\n return apiKey;\n }\n\n /**\n * Overrides the `BaseProvider.getNetwork` method as implemented by ethers.js.\n *\n * This override allows the SDK to set the provider's network to values not\n * yet supported by ethers.js.\n *\n * @internal\n * @override\n */\n static getNetwork(network: Networkish): NetworkFromEthers {\n if (typeof network === 'string' && network in CustomNetworks) {\n return CustomNetworks[network];\n }\n\n // Call the standard ethers.js getNetwork method for other networks.\n return getNetworkFromEthers(network);\n }\n\n /**\n * Converts the `Networkish` input to the network enum used by Alchemy.\n *\n * @internal\n */\n static getAlchemyNetwork(network?: Networkish): Network {\n if (network === undefined) {\n return DEFAULT_NETWORK;\n }\n\n if (typeof network === 'number') {\n throw new Error(\n `Invalid network '${network}' provided. Network must be a string.`\n );\n }\n\n // Guaranteed that `typeof network === 'string`.\n const isValidNetwork = Object.values(Network).includes(network as Network);\n if (!isValidNetwork) {\n throw new Error(\n `Invalid network '${network}' provided. Network must be one of: ` +\n `${Object.values(Network).join(', ')}.`\n );\n }\n return network as Network;\n }\n\n /**\n * Returns a {@link ConnectionInfo} object compatible with ethers that contains\n * the correct URLs for Alchemy.\n *\n * @internal\n */\n static getAlchemyConnectionInfo(\n network: Network,\n apiKey: string,\n type: 'wss' | 'http'\n ): ConnectionInfo {\n const url =\n type === 'http'\n ? getAlchemyHttpUrl(network, apiKey)\n : getAlchemyWsUrl(network, apiKey);\n return {\n headers: IS_BROWSER\n ? {\n 'Alchemy-Ethers-Sdk-Version': VERSION\n }\n : {\n 'Alchemy-Ethers-Sdk-Version': VERSION,\n 'Accept-Encoding': 'gzip'\n },\n allowGzip: true,\n url\n };\n }\n\n /**\n * Overrides the method in ethers.js's `StaticJsonRpcProvider` class. This\n * method is called when calling methods on the parent class `BaseProvider`.\n *\n * @override\n */\n async detectNetwork(): Promise {\n let network = this.network;\n if (network == null) {\n network = await super.detectNetwork();\n\n if (!network) {\n throw new Error('No network detected');\n }\n }\n return network;\n }\n\n _startPending(): void {\n logWarn('WARNING: Alchemy Provider does not support pending filters');\n }\n\n /**\n * Overrides the ether's `isCommunityResource()` method. Returns true if the\n * current api key is the default key.\n *\n * @override\n */\n isCommunityResource(): boolean {\n return this.apiKey === DEFAULT_ALCHEMY_API_KEY;\n }\n\n /**\n * Overrides the base {@link JsonRpcProvider.send} method to implement custom\n * logic for sending requests to Alchemy.\n *\n * @param method The method name to use for the request.\n * @param params The parameters to use for the request.\n * @override\n * @public\n */\n // TODO: Add headers for `perform()` override.\n send(method: string, params: Array): Promise {\n return this._send(method, params, 'send');\n }\n\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `JsonRpcProvider.send()`.\n *\n * This method is copied over directly in order to implement custom headers\n *\n * @internal\n */\n _send(\n method: string,\n params: Array,\n methodName: string,\n forceBatch = false\n ): Promise {\n const request = {\n method,\n params,\n id: this._nextId++,\n jsonrpc: '2.0'\n };\n\n // START MODIFIED CODE\n const connection = { ...this.connection };\n connection.headers!['Alchemy-Ethers-Sdk-Method'] = methodName;\n\n if (this.batchRequests || forceBatch) {\n return this.batcher.enqueueRequest(request as JsonRpcRequest);\n }\n // END MODIFIED CODE\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(\n this.connection,\n JSON.stringify(request),\n getResult\n ).then(\n result => {\n this.emit('debug', {\n action: 'response',\n request,\n response: result,\n provider: this\n });\n\n return result;\n },\n error => {\n this.emit('debug', {\n action: 'response',\n error,\n request,\n provider: this\n });\n\n throw error;\n }\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 // @ts-ignore - This is done by ethers.\n this._cache[method] = null;\n }, 0);\n }\n\n return result;\n }\n}\n\n/**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's\n * `@ethersproject/web/src.ts/index.ts`. Used to support\n * {@link AlchemyProvider._send}, which is also copied over.\n */\nfunction getResult(payload: {\n error?: { code?: number; data?: any; message?: string };\n result?: any;\n}): any {\n if (payload.error) {\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"],"names":["version","this","getNetworkFromEthers"],"mappings":";;;;;;;;;;;AAAO,MAAMA,SAAO,GAAG,cAAc;;ACCrC,IAAI,sBAAsB,GAAG,KAAK,CAAC;AACnC,IAAI,aAAa,GAAG,KAAK,CAAC;AAC1B,MAAM,SAAS,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;AACpF,IAAI,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC;AAErC,IAAI,aAAa,GAAG,IAAI,CAAC;AACzB,SAAS,eAAe,GAAG;AAC3B,IAAI,IAAI;AACR,QAAQ,MAAM,OAAO,GAAG,EAAE,CAAC;AAC3B;AACA,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK;AACzD,YAAY,IAAI;AAChB,gBAAgB,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,MAAM,EAAE;AACvD,oBAAoB,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;AACrD,iBAAiB;AACjB,gBAAgB,CAAC;AACjB,aAAa;AACb,YAAY,OAAO,KAAK,EAAE;AAC1B,gBAAgB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACnC,a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BAAA,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;aAC5B,EAAE,CAAC,CAAC,CAAC;AACP,SAAA;AAED,QAAA,OAAO,MAAM,CAAC;KACf;AACF,CAAA;AAED;;;;;;AAMG;AACH,SAAS,SAAS,CAAC,OAGlB,EAAA;IACC,IAAI,OAAO,CAAC,KAAK,EAAE;QACjB,MAAM,KAAK,GAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACpD,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;QAChC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;AAChC,QAAA,MAAM,KAAK,CAAC;AACb,KAAA;IAED,OAAO,OAAO,CAAC,MAAM,CAAC;AACxB;;;;"} \ No newline at end of file diff --git a/test/node_modules/alchemy-sdk/dist/es/alchemy-websocket-provider-35c345f7.js b/test/node_modules/alchemy-sdk/dist/es/alchemy-websocket-provider-35c345f7.js new file mode 100644 index 0000000..6d5aec2 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/alchemy-websocket-provider-35c345f7.js @@ -0,0 +1,1146 @@ +import { _ as __awaiter, f as fromHex, t as toHex, n as noop, C as CustomNetworks, i as isAlchemyEvent, v as verifyAlchemyEventName, c as EthersEvent, d as getAlchemyEventTag, D as DEFAULT_ALCHEMY_API_KEY, A as ALCHEMY_EVENT_TYPES, e as ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE, h as AlchemySubscription, j as ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE, V as VERSION, E as EthersNetwork } from './index-02af91ae.js'; +import SturdyWebSocket from 'sturdy-websocket'; +import { BigNumber } from '@ethersproject/bignumber'; +import { getNetwork } from '@ethersproject/networks'; +import { WebSocketProvider } from '@ethersproject/providers'; +import { AlchemyProvider } from './alchemy-provider-a776ca8a.js'; +import './api/utils'; +import 'axios'; +import '@ethersproject/abstract-provider'; +import '@ethersproject/wallet'; +import '@ethersproject/contracts'; +import '@ethersproject/web'; + +/** + * The maximum number of blocks to backfill. If more than this many blocks have + * been missed, then we'll sadly miss data, but we want to make sure we don't + * end up requesting thousands of blocks if somebody left their laptop closed for a week. + */ +const MAX_BACKFILL_BLOCKS = 120; +/** + * The WebsocketBackfiller fetches events that were sent since a provided block + * number. This is used in the {@link AlchemyWebSocketProvider} to backfill + * events that were transmitted while the websocket connection was down. + * + * The backfiller backfills two main eth_subscribe events: `logs` and `newHeads`. + * + * @internal + */ +class WebsocketBackfiller { + constructor(provider) { + this.provider = provider; + // TODO: Use HTTP provider to do backfill. + this.maxBackfillBlocks = MAX_BACKFILL_BLOCKS; + } + /** + * Runs backfill for `newHeads` events. + * + * @param isCancelled Whether the backfill request is cancelled. + * @param previousHeads Previous head requests that were sent. + * @param fromBlockNumber The block number to start backfilling from. + * @returns A list of `newHeads` events that were sent since the last backfill. + */ + getNewHeadsBackfill(isCancelled, previousHeads, fromBlockNumber) { + return __awaiter(this, void 0, void 0, function* () { + throwIfCancelled(isCancelled); + const toBlockNumber = yield this.getBlockNumber(); + throwIfCancelled(isCancelled); + // If there are no previous heads to fetch, return new heads since + // `fromBlockNumber`, or up to maxBackfillBlocks from the current head. + if (previousHeads.length === 0) { + return this.getHeadEventsInRange(Math.max(fromBlockNumber, toBlockNumber - this.maxBackfillBlocks) + 1, toBlockNumber + 1); + } + // If the last emitted event is too far back in the past, there's no need + // to backfill for reorgs. Just fetch the last `maxBackfillBlocks` worth of + // new heads. + const lastSeenBlockNumber = fromHex(previousHeads[previousHeads.length - 1].number); + const minBlockNumber = toBlockNumber - this.maxBackfillBlocks + 1; + if (lastSeenBlockNumber <= minBlockNumber) { + return this.getHeadEventsInRange(minBlockNumber, toBlockNumber + 1); + } + // To capture all `newHeads` events, return all head events from the last + // seen block number to current + any of the previous heads that were re-orged. + const reorgHeads = yield this.getReorgHeads(isCancelled, previousHeads); + throwIfCancelled(isCancelled); + const intermediateHeads = yield this.getHeadEventsInRange(lastSeenBlockNumber + 1, toBlockNumber + 1); + throwIfCancelled(isCancelled); + return [...reorgHeads, ...intermediateHeads]; + }); + } + /** + * Runs backfill for `logs` events. + * + * @param isCancelled Whether the backfill request is cancelled. + * @param filter The filter object that accompanies a logs subscription. + * @param previousLogs Previous log requests that were sent. + * @param fromBlockNumber The block number to start backfilling from. + */ + getLogsBackfill(isCancelled, filter, previousLogs, fromBlockNumber) { + return __awaiter(this, void 0, void 0, function* () { + throwIfCancelled(isCancelled); + const toBlockNumber = yield this.getBlockNumber(); + throwIfCancelled(isCancelled); + // If there are no previous logs to fetch, return new logs since + // `fromBlockNumber`, or up to `maxBackfillBlocks` from the current head. + if (previousLogs.length === 0) { + return this.getLogsInRange(filter, Math.max(fromBlockNumber, toBlockNumber - this.maxBackfillBlocks) + 1, toBlockNumber + 1); + } + // If the last emitted log is too far back in the past, there's no need + // to backfill for removed logs. Just fetch the last `maxBackfillBlocks` + // worth of logs. + const lastSeenBlockNumber = fromHex(previousLogs[previousLogs.length - 1].blockNumber); + const minBlockNumber = toBlockNumber - this.maxBackfillBlocks + 1; + if (lastSeenBlockNumber < minBlockNumber) { + return this.getLogsInRange(filter, minBlockNumber, toBlockNumber + 1); + } + // Return all log events that have happened along with log events that have + // been removed due to a chain reorg. + const commonAncestor = yield this.getCommonAncestor(isCancelled, previousLogs); + throwIfCancelled(isCancelled); + // All previous logs with a block number greater than the common ancestor + // were part of a re-org, so mark them as such. + const removedLogs = previousLogs + .filter(log => fromHex(log.blockNumber) > commonAncestor.blockNumber) + .map(log => (Object.assign(Object.assign({}, log), { removed: true }))); + // If no common ancestor was found, start backfill from the oldest log's + // block number. + const fromBlockInclusive = commonAncestor.blockNumber === Number.NEGATIVE_INFINITY + ? fromHex(previousLogs[0].blockNumber) + : commonAncestor.blockNumber; + let addedLogs = yield this.getLogsInRange(filter, fromBlockInclusive, toBlockNumber + 1); + // De-dupe any logs that were already emitted. + addedLogs = addedLogs.filter(log => log && + (fromHex(log.blockNumber) > commonAncestor.blockNumber || + fromHex(log.logIndex) > commonAncestor.logIndex)); + throwIfCancelled(isCancelled); + return [...removedLogs, ...addedLogs]; + }); + } + /** + * Sets a new max backfill blocks. VISIBLE ONLY FOR TESTING. + * + * @internal + */ + setMaxBackfillBlock(newMax) { + this.maxBackfillBlocks = newMax; + } + /** + * Gets the current block number as a number. + * + * @private + */ + getBlockNumber() { + return __awaiter(this, void 0, void 0, function* () { + const blockNumberHex = yield this.provider.send('eth_blockNumber'); + return fromHex(blockNumberHex); + }); + } + /** + * Gets all `newHead` events in the provided range. Note that the returned + * heads do not include re-orged heads. Use {@link getReorgHeads} to find heads + * that were part of a re-org. + * + * @private + */ + getHeadEventsInRange(fromBlockInclusive, toBlockExclusive) { + return __awaiter(this, void 0, void 0, function* () { + if (fromBlockInclusive >= toBlockExclusive) { + return []; + } + const batchParts = []; + for (let i = fromBlockInclusive; i < toBlockExclusive; i++) { + batchParts.push({ + method: 'eth_getBlockByNumber', + params: [toHex(i), false] + }); + } + // TODO: handle errors + const blockHeads = yield this.provider.sendBatch(batchParts); + return blockHeads.map(toNewHeadsEvent); + }); + } + /** + * Returns all heads that were part of a reorg event. + * + * @private + */ + getReorgHeads(isCancelled, previousHeads) { + return __awaiter(this, void 0, void 0, function* () { + const result = []; + // Iterate from the most recent head backwards in order to find the first + // block that was part of a re-org. + for (let i = previousHeads.length - 1; i >= 0; i--) { + const oldEvent = previousHeads[i]; + const blockHead = yield this.getBlockByNumber(fromHex(oldEvent.number)); + throwIfCancelled(isCancelled); + // If the hashes match, then current head in the iteration was not re-orged. + if (oldEvent.hash === blockHead.hash) { + break; + } + result.push(toNewHeadsEvent(blockHead)); + } + return result.reverse(); + }); + } + /** + * Simple wrapper around `eth_getBlockByNumber` that returns the complete + * block information for the provided block number. + * + * @private + */ + getBlockByNumber(blockNumber) { + return __awaiter(this, void 0, void 0, function* () { + return this.provider.send('eth_getBlockByNumber', [ + toHex(blockNumber), + false + ]); + }); + } + /** + * Given a list of previous log events, finds the common block number from the + * logs that matches the block head. + * + * This can be used to identify which logs are part of a re-org. + * + * Returns 1 less than the oldest log's block number if no common ancestor was found. + * + * @private + */ + getCommonAncestor(isCancelled, previousLogs) { + return __awaiter(this, void 0, void 0, function* () { + // Iterate from the most recent head backwards in order to find the first + // block that was part of a re-org. + let blockHead = yield this.getBlockByNumber(fromHex(previousLogs[previousLogs.length - 1].blockNumber)); + throwIfCancelled(isCancelled); + for (let i = previousLogs.length - 1; i >= 0; i--) { + const oldLog = previousLogs[i]; + // Ensure that updated blocks are fetched every time the log's block number + // changes. + if (oldLog.blockNumber !== blockHead.number) { + blockHead = yield this.getBlockByNumber(fromHex(oldLog.blockNumber)); + } + // Since logs are ordered in ascending order, the first log that matches + // the hash should be the largest logIndex. + if (oldLog.blockHash === blockHead.hash) { + return { + blockNumber: fromHex(oldLog.blockNumber), + logIndex: fromHex(oldLog.logIndex) + }; + } + } + return { + blockNumber: Number.NEGATIVE_INFINITY, + logIndex: Number.NEGATIVE_INFINITY + }; + }); + } + /** + * Gets all `logs` events in the provided range. Note that the returned logs + * do not include removed logs. + * + * @private + */ getLogsInRange(filter, fromBlockInclusive, toBlockExclusive) { + return __awaiter(this, void 0, void 0, function* () { + if (fromBlockInclusive >= toBlockExclusive) { + return []; + } + const rangeFilter = Object.assign(Object.assign({}, filter), { fromBlock: toHex(fromBlockInclusive), toBlock: toHex(toBlockExclusive - 1) }); + return this.provider.send('eth_getLogs', [rangeFilter]); + }); + } +} +function toNewHeadsEvent(head) { + const result = Object.assign({}, head); + delete result.totalDifficulty; + delete result.transactions; + delete result.uncles; + return result; +} +function dedupeNewHeads(events) { + return dedupe(events, event => event.hash); +} +function dedupeLogs(events) { + return dedupe(events, event => `${event.blockHash}/${event.logIndex}`); +} +function dedupe(items, getKey) { + const keysSeen = new Set(); + const result = []; + items.forEach(item => { + const key = getKey(item); + if (!keysSeen.has(key)) { + keysSeen.add(key); + result.push(item); + } + }); + return result; +} +const CANCELLED = new Error('Cancelled'); +function throwIfCancelled(isCancelled) { + if (isCancelled()) { + throw CANCELLED; + } +} + +const HEARTBEAT_INTERVAL = 30000; +const HEARTBEAT_WAIT_TIME = 10000; +const BACKFILL_TIMEOUT = 60000; +const BACKFILL_RETRIES = 5; +/** + * Subscriptions have a memory of recent events they have sent so that in the + * event that they disconnect and need to backfill, they can detect re-orgs. + * Keep a buffer that goes back at least these many blocks, the maximum amount + * at which we might conceivably see a re-org. + * + * Note that while our buffer goes back this many blocks, it may contain more + * than this many elements, since in the case of logs subscriptions more than + * one event may be emitted for a block. + */ +const RETAINED_EVENT_BLOCK_COUNT = 10; +/** + * SDK's custom implementation fo the ethers.js's 'AlchemyWebSocketProvider'. + * + * Do not call this constructor directly. Instead, instantiate an instance of + * {@link Alchemy} and call {@link Alchemy.config.getWebSocketProvider()}. + * + * @public + */ +class AlchemyWebSocketProvider extends WebSocketProvider { + /** @internal */ + constructor(config, wsConstructor) { + var _a; + // Normalize the API Key to a string. + const apiKey = AlchemyProvider.getApiKey(config.apiKey); + // Generate our own connection info with the correct endpoint URLs. + const alchemyNetwork = AlchemyProvider.getAlchemyNetwork(config.network); + const connection = AlchemyProvider.getAlchemyConnectionInfo(alchemyNetwork, apiKey, 'wss'); + const protocol = `alchemy-sdk-${VERSION}`; + // Use the provided config URL override if it exists, otherwise use the created one. + const ws = new SturdyWebSocket((_a = config.url) !== null && _a !== void 0 ? _a : connection.url, protocol, { + wsConstructor: wsConstructor !== null && wsConstructor !== void 0 ? wsConstructor : getWebsocketConstructor() + }); + // Normalize the Alchemy named network input to the network names used by + // ethers. This allows the parent super constructor in JsonRpcProvider to + // correctly set the network. + const ethersNetwork = EthersNetwork[alchemyNetwork]; + super(ws, ethersNetwork); + this._events = []; + // In the case of a WebSocket reconnection, all subscriptions are lost and we + // create new ones to replace them, but we want to create the illusion that + // the original subscriptions persist. Thus, maintain a mapping from the + // "virtual" subscription ids which are visible to the consumer to the + // "physical" subscription ids of the actual connections. This terminology is + // borrowed from virtual and physical memory, which has a similar mapping. + /** @internal */ + this.virtualSubscriptionsById = new Map(); + /** @internal */ + this.virtualIdsByPhysicalId = new Map(); + /** + * The underlying ethers {@link WebSocketProvider} already handles and emits + * messages. To allow backfilling, track all messages that are emitted. + * + * This is a field arrow function in order to preserve `this` context when + * passing the method as an event listener. + * + * @internal + */ + this.handleMessage = (event) => { + const message = JSON.parse(event.data); + if (!isSubscriptionEvent(message)) { + return; + } + const physicalId = message.params.subscription; + const virtualId = this.virtualIdsByPhysicalId.get(physicalId); + if (!virtualId) { + return; + } + const subscription = this.virtualSubscriptionsById.get(virtualId); + if (subscription.method !== 'eth_subscribe') { + return; + } + switch (subscription.params[0]) { + case 'newHeads': { + const newHeadsSubscription = subscription; + const newHeadsMessage = message; + const { isBackfilling, backfillBuffer } = newHeadsSubscription; + const { result } = newHeadsMessage.params; + if (isBackfilling) { + addToNewHeadsEventsBuffer(backfillBuffer, result); + } + else if (physicalId !== virtualId) { + // In the case of a re-opened subscription, ethers will not emit the + // event, so the SDK has to. + this.emitAndRememberEvent(virtualId, result, getNewHeadsBlockNumber); + } + else { + // Ethers subscription mapping will emit the event, just store it. + this.rememberEvent(virtualId, result, getNewHeadsBlockNumber); + } + break; + } + case 'logs': { + const logsSubscription = subscription; + const logsMessage = message; + const { isBackfilling, backfillBuffer } = logsSubscription; + const { result } = logsMessage.params; + if (isBackfilling) { + addToLogsEventsBuffer(backfillBuffer, result); + } + else if (virtualId !== physicalId) { + this.emitAndRememberEvent(virtualId, result, getLogsBlockNumber); + } + else { + this.rememberEvent(virtualId, result, getLogsBlockNumber); + } + break; + } + default: + if (physicalId !== virtualId) { + // In the case of a re-opened subscription, ethers will not emit the + // event, so the SDK has to. + const { result } = message.params; + this.emitEvent(virtualId, result); + } + } + }; + /** + * When the websocket connection reopens: + * + * 1. Resubscribe to all existing subscriptions and start backfilling + * 2. Restart heart beat. + * + * This is a field arrow function in order to preserve `this` context when + * passing the method as an event listener. + * + * @internal + */ + this.handleReopen = () => { + this.virtualIdsByPhysicalId.clear(); + const { cancel, isCancelled } = makeCancelToken(); + this.cancelBackfill = cancel; + for (const subscription of this.virtualSubscriptionsById.values()) { + void (() => __awaiter(this, void 0, void 0, function* () { + try { + yield this.resubscribeAndBackfill(isCancelled, subscription); + } + catch (error) { + if (!isCancelled()) { + console.error(`Error while backfilling "${subscription.params[0]}" subscription. Some events may be missing.`, error); + } + } + }))(); + } + this.startHeartbeat(); + }; + /** + * Cancels the heartbeat and any pending backfills being performed. This is + * called when the websocket connection goes down or is disconnected. + * + * This is a field arrow function in order to preserve `this` context when + * passing the method as an event listener. + * + * @internal + */ + this.stopHeartbeatAndBackfill = () => { + if (this.heartbeatIntervalId != null) { + clearInterval(this.heartbeatIntervalId); + this.heartbeatIntervalId = undefined; + } + this.cancelBackfill(); + }; + this.apiKey = apiKey; + // Start heartbeat and backfiller for the websocket connection. + this.backfiller = new WebsocketBackfiller(this); + this.addSocketListeners(); + this.startHeartbeat(); + this.cancelBackfill = noop; + } + /** + * Overrides the `BaseProvider.getNetwork` method as implemented by ethers.js. + * + * This override allows the SDK to set the provider's network to values not + * yet supported by ethers.js. + * + * @internal + * @override + */ + static getNetwork(network) { + if (typeof network === 'string' && network in CustomNetworks) { + return CustomNetworks[network]; + } + // Call the standard ethers.js getNetwork method for other networks. + return getNetwork(network); + } + /** + * Overridden implementation of ethers that includes Alchemy based subscriptions. + * + * @param eventName Event to subscribe to + * @param listener The listener function to call when the event is triggered. + * @override + * @public + */ + // TODO: Override `Listener` type to get type autocompletions. + on(eventName, listener) { + return this._addEventListener(eventName, listener, false); + } + /** + * Overridden implementation of ethers that includes Alchemy based + * subscriptions. Adds a listener to the triggered for only the next + * {@link eventName} event, after which it will be removed. + * + * @param eventName Event to subscribe to + * @param listener The listener function to call when the event is triggered. + * @override + * @public + */ + // TODO: Override `Listener` type to get type autocompletions. + once(eventName, listener) { + return this._addEventListener(eventName, listener, true); + } + /** + * Removes the provided {@link listener} for the {@link eventName} event. If no + * listener is provided, all listeners for the event will be removed. + * + * @param eventName Event to unlisten to. + * @param listener The listener function to remove. + * @override + * @public + */ + off(eventName, listener) { + if (isAlchemyEvent(eventName)) { + return this._off(eventName, listener); + } + else { + return super.off(eventName, listener); + } + } + /** + * Remove all listeners for the provided {@link eventName} event. If no event + * is provided, all events and their listeners are removed. + * + * @param eventName The event to remove all listeners for. + * @override + * @public + */ + removeAllListeners(eventName) { + if (eventName !== undefined && isAlchemyEvent(eventName)) { + return this._removeAllListeners(eventName); + } + else { + return super.removeAllListeners(eventName); + } + } + /** + * Returns the number of listeners for the provided {@link eventName} event. If + * no event is provided, the total number of listeners for all events is returned. + * + * @param eventName The event to get the number of listeners for. + * @public + * @override + */ + listenerCount(eventName) { + if (eventName !== undefined && isAlchemyEvent(eventName)) { + return this._listenerCount(eventName); + } + else { + return super.listenerCount(eventName); + } + } + /** + * Returns an array of listeners for the provided {@link eventName} event. If + * no event is provided, all listeners will be included. + * + * @param eventName The event to get the listeners for. + * @public + * @override + */ + listeners(eventName) { + if (eventName !== undefined && isAlchemyEvent(eventName)) { + return this._listeners(eventName); + } + else { + return super.listeners(eventName); + } + } + /** + * Overrides the method in `BaseProvider` in order to properly format the + * Alchemy subscription events. + * + * @internal + * @override + */ + _addEventListener(eventName, listener, once) { + if (isAlchemyEvent(eventName)) { + verifyAlchemyEventName(eventName); + const event = new EthersEvent(getAlchemyEventTag(eventName), listener, once); + this._events.push(event); + this._startEvent(event); + return this; + } + else { + return super._addEventListener(eventName, listener, once); + } + } + /** + * Overrides the `_startEvent()` method in ethers.js's + * {@link WebSocketProvider} to include additional alchemy methods. + * + * @param event + * @override + * @internal + */ + _startEvent(event) { + // Check if the event type is a custom Alchemy subscription. + const customLogicTypes = [...ALCHEMY_EVENT_TYPES, 'block', 'filter']; + if (customLogicTypes.includes(event.type)) { + this.customStartEvent(event); + } + else { + super._startEvent(event); + } + } + /** + * Overridden from ethers.js's {@link WebSocketProvider} + * + * Modified in order to add mappings for backfilling. + * + * @internal + * @override + */ + _subscribe(tag, param, processFunc, event) { + return __awaiter(this, void 0, void 0, function* () { + let subIdPromise = this._subIds[tag]; + // BEGIN MODIFIED CODE + const startingBlockNumber = yield this.getBlockNumber(); + // END MODIFIED CODE + if (subIdPromise == null) { + subIdPromise = Promise.all(param).then(param => { + return this.send('eth_subscribe', param); + }); + this._subIds[tag] = subIdPromise; + } + const subId = yield subIdPromise; + // BEGIN MODIFIED CODE + const resolvedParams = yield Promise.all(param); + this.virtualSubscriptionsById.set(subId, { + event: event, + method: 'eth_subscribe', + params: resolvedParams, + startingBlockNumber, + virtualId: subId, + physicalId: subId, + sentEvents: [], + isBackfilling: false, + backfillBuffer: [] + }); + this.virtualIdsByPhysicalId.set(subId, subId); + // END MODIFIED CODE + this._subs[subId] = { tag, processFunc }; + }); + } + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @internal + * @override + */ + emit(eventName, ...args) { + if (isAlchemyEvent(eventName)) { + let result = false; + const stopped = []; + // This line is the only modified line from the original method. + const eventTag = getAlchemyEventTag(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; + } + else { + return super.emit(eventName, ...args); + } + } + /** @internal */ + sendBatch(parts) { + return __awaiter(this, void 0, void 0, function* () { + let nextId = 0; + const payload = parts.map(({ method, params }) => { + return { + method, + params, + jsonrpc: '2.0', + id: `alchemy-sdk:${nextId++}` + }; + }); + return this.sendBatchConcurrently(payload); + }); + } + /** @override */ + destroy() { + this.removeSocketListeners(); + this.stopHeartbeatAndBackfill(); + return super.destroy(); + } + /** + * Overrides the ether's `isCommunityResource()` method. Returns true if the + * current api key is the default key. + * + * @override + */ + isCommunityResource() { + return this.apiKey === DEFAULT_ALCHEMY_API_KEY; + } + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `WebSocketProvider._stopEvent()`. + * + * This method is copied over directly in order to support Alchemy's + * subscription type by allowing the provider to properly stop Alchemy's + * subscription events. + * + * @internal + */ + _stopEvent(event) { + let tag = event.tag; + // START MODIFIED CODE + if (ALCHEMY_EVENT_TYPES.includes(event.type)) { + // There are remaining pending transaction listeners. + if (this._events.filter(e => ALCHEMY_EVENT_TYPES.includes(e.type)).length) { + return; + } + // END MODIFIED CODE + } + else 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]; + void subId.then(subId => { + if (!this._subs[subId]) { + return; + } + delete this._subs[subId]; + void this.send('eth_unsubscribe', [subId]); + }); + } + /** @internal */ + addSocketListeners() { + this._websocket.addEventListener('message', this.handleMessage); + this._websocket.addEventListener('reopen', this.handleReopen); + this._websocket.addEventListener('down', this.stopHeartbeatAndBackfill); + } + /** @internal */ + removeSocketListeners() { + this._websocket.removeEventListener('message', this.handleMessage); + this._websocket.removeEventListener('reopen', this.handleReopen); + this._websocket.removeEventListener('down', this.stopHeartbeatAndBackfill); + } + /** + * Reopens the backfill based on + * + * @param isCancelled + * @param subscription + * @internal + */ + resubscribeAndBackfill(isCancelled, subscription) { + return __awaiter(this, void 0, void 0, function* () { + const { virtualId, method, params, sentEvents, backfillBuffer, startingBlockNumber } = subscription; + subscription.isBackfilling = true; + backfillBuffer.length = 0; + try { + const physicalId = yield this.send(method, params); + throwIfCancelled(isCancelled); + subscription.physicalId = physicalId; + this.virtualIdsByPhysicalId.set(physicalId, virtualId); + switch (params[0]) { + case 'newHeads': { + const backfillEvents = yield withBackoffRetries(() => withTimeout(this.backfiller.getNewHeadsBackfill(isCancelled, sentEvents, startingBlockNumber), BACKFILL_TIMEOUT), BACKFILL_RETRIES, () => !isCancelled()); + throwIfCancelled(isCancelled); + const events = dedupeNewHeads([...backfillEvents, ...backfillBuffer]); + events.forEach(event => this.emitNewHeadsEvent(virtualId, event)); + break; + } + case 'logs': { + const filter = params[1] || {}; + const backfillEvents = yield withBackoffRetries(() => withTimeout(this.backfiller.getLogsBackfill(isCancelled, filter, sentEvents, startingBlockNumber), BACKFILL_TIMEOUT), BACKFILL_RETRIES, () => !isCancelled()); + throwIfCancelled(isCancelled); + const events = dedupeLogs([...backfillEvents, ...backfillBuffer]); + events.forEach(event => this.emitLogsEvent(virtualId, event)); + break; + } + default: + break; + } + } + finally { + subscription.isBackfilling = false; + backfillBuffer.length = 0; + } + }); + } + /** @internal */ + emitNewHeadsEvent(virtualId, result) { + this.emitAndRememberEvent(virtualId, result, getNewHeadsBlockNumber); + } + /** @internal */ + emitLogsEvent(virtualId, result) { + this.emitAndRememberEvent(virtualId, result, getLogsBlockNumber); + } + /** + * Emits an event to consumers, but also remembers it in its subscriptions's + * `sentEvents` buffer so that we can detect re-orgs if the connection drops + * and needs to be reconnected. + * + * @internal + */ + emitAndRememberEvent(virtualId, result, getBlockNumber) { + this.rememberEvent(virtualId, result, getBlockNumber); + this.emitEvent(virtualId, result); + } + emitEvent(virtualId, result) { + const subscription = this.virtualSubscriptionsById.get(virtualId); + if (!subscription) { + return; + } + this.emitGenericEvent(subscription, result); + } + /** @internal */ + rememberEvent(virtualId, result, getBlockNumber) { + const subscription = this.virtualSubscriptionsById.get(virtualId); + if (!subscription) { + return; + } + // Web3 modifies these event objects once we pass them on (changing hex + // numbers to numbers). We want the original event, so make a defensive + // copy. + addToPastEventsBuffer(subscription.sentEvents, Object.assign({}, result), getBlockNumber); + } + /** @internal */ + emitGenericEvent(subscription, result) { + const emitFunction = this.emitProcessFn(subscription.event); + emitFunction(result); + } + /** + * Starts a heartbeat that pings the websocket server periodically to ensure + * that the connection stays open. + * + * @internal + */ + startHeartbeat() { + if (this.heartbeatIntervalId != null) { + return; + } + this.heartbeatIntervalId = setInterval(() => __awaiter(this, void 0, void 0, function* () { + try { + yield withTimeout(this.send('net_version'), HEARTBEAT_WAIT_TIME); + } + catch (_a) { + this._websocket.reconnect(); + } + }), HEARTBEAT_INTERVAL); + } + /** + * This method sends the batch concurrently as individual requests rather than + * as a batch, which was the original implementation. The original batch logic + * is preserved in this implementation in order for faster porting. + * + * @param payload + * @internal + */ + // TODO(cleanup): Refactor and remove usages of `sendBatch()`. + // TODO(errors): Use allSettled() once we have more error handling. + sendBatchConcurrently(payload) { + return __awaiter(this, void 0, void 0, function* () { + return Promise.all(payload.map(req => this.send(req.method, req.params))); + }); + } + /** @internal */ + customStartEvent(event) { + if (event.type === ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE) { + const { fromAddress, toAddress, hashesOnly } = event; + void this._subscribe(event.tag, [ + AlchemySubscription.PENDING_TRANSACTIONS, + { fromAddress, toAddress, hashesOnly } + ], this.emitProcessFn(event), event); + } + else if (event.type === ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE) { + const { addresses, includeRemoved, hashesOnly } = event; + void this._subscribe(event.tag, [ + AlchemySubscription.MINED_TRANSACTIONS, + { addresses, includeRemoved, hashesOnly } + ], this.emitProcessFn(event), event); + } + else if (event.type === 'block') { + void this._subscribe('block', ['newHeads'], this.emitProcessFn(event), event); + } + else if (event.type === 'filter') { + void this._subscribe(event.tag, ['logs', this._getFilter(event.filter)], this.emitProcessFn(event), event); + } + } + /** @internal */ + emitProcessFn(event) { + switch (event.type) { + case ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE: + return result => this.emit({ + method: AlchemySubscription.PENDING_TRANSACTIONS, + fromAddress: event.fromAddress, + toAddress: event.toAddress, + hashesOnly: event.hashesOnly + }, result); + case ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE: + return result => this.emit({ + method: AlchemySubscription.MINED_TRANSACTIONS, + addresses: event.addresses, + includeRemoved: event.includeRemoved, + hashesOnly: event.hashesOnly + }, result); + case 'block': + return result => { + const blockNumber = BigNumber.from(result.number).toNumber(); + this._emitted.block = blockNumber; + this.emit('block', blockNumber); + }; + case 'filter': + return result => { + if (result.removed == null) { + result.removed = false; + } + this.emit(event.filter, this.formatter.filterLog(result)); + }; + default: + throw new Error('Invalid event type to `emitProcessFn()`'); + } + } + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.off()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + _off(eventName, listener) { + if (listener == null) { + return this.removeAllListeners(eventName); + } + const stopped = []; + let found = false; + const eventTag = getAlchemyEventTag(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; + } + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.removeAllListeners()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + _removeAllListeners(eventName) { + let stopped = []; + if (eventName == null) { + stopped = this._events; + this._events = []; + } + else { + const eventTag = getAlchemyEventTag(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; + } + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.listenerCount()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + _listenerCount(eventName) { + if (!eventName) { + return this._events.length; + } + const eventTag = getAlchemyEventTag(eventName); + return this._events.filter(event => { + return event.tag === eventTag; + }).length; + } + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.listeners()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + _listeners(eventName) { + if (eventName == null) { + return this._events.map(event => event.listener); + } + const eventTag = getAlchemyEventTag(eventName); + return this._events + .filter(event => event.tag === eventTag) + .map(event => event.listener); + } +} +function getWebsocketConstructor() { + return isNodeEnvironment() ? require('websocket').w3cwebsocket : WebSocket; +} +function isNodeEnvironment() { + return (typeof process !== 'undefined' && + process != null && + process.versions != null && + process.versions.node != null); +} +// TODO(cleanup): Use class variable rather than passing `isCancelled` everywhere. +function makeCancelToken() { + let cancelled = false; + return { cancel: () => (cancelled = true), isCancelled: () => cancelled }; +} +// TODO(cleanup): replace with SDK's backoff implementation +const MIN_RETRY_DELAY = 1000; +const RETRY_BACKOFF_FACTOR = 2; +const MAX_RETRY_DELAY = 30000; +function withBackoffRetries(f, retryCount, shouldRetry = () => true) { + return __awaiter(this, void 0, void 0, function* () { + let nextWaitTime = 0; + let i = 0; + while (true) { + try { + return yield f(); + } + catch (error) { + i++; + if (i >= retryCount || !shouldRetry(error)) { + throw error; + } + yield delay(nextWaitTime); + if (!shouldRetry(error)) { + throw error; + } + nextWaitTime = + nextWaitTime === 0 + ? MIN_RETRY_DELAY + : Math.min(MAX_RETRY_DELAY, RETRY_BACKOFF_FACTOR * nextWaitTime); + } + } + }); +} +function delay(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); +} +function withTimeout(promise, ms) { + return Promise.race([ + promise, + new Promise((_, reject) => setTimeout(() => reject(new Error('Timeout')), ms)) + ]); +} +function getNewHeadsBlockNumber(event) { + return fromHex(event.number); +} +function getLogsBlockNumber(event) { + return fromHex(event.blockNumber); +} +function isResponse(message) { + return (Array.isArray(message) || + (message.jsonrpc === '2.0' && message.id !== undefined)); +} +function isSubscriptionEvent(message) { + return !isResponse(message); +} +function addToNewHeadsEventsBuffer(pastEvents, event) { + addToPastEventsBuffer(pastEvents, event, getNewHeadsBlockNumber); +} +function addToLogsEventsBuffer(pastEvents, event) { + addToPastEventsBuffer(pastEvents, event, getLogsBlockNumber); +} +/** + * Adds a new event to an array of events, evicting any events which are so old + * that they will no longer feasibly be part of a reorg. + */ +function addToPastEventsBuffer(pastEvents, event, getBlockNumber) { + const currentBlockNumber = getBlockNumber(event); + // Find first index of an event recent enough to retain, then drop everything + // at a lower index. + const firstGoodIndex = pastEvents.findIndex(e => getBlockNumber(e) > currentBlockNumber - RETAINED_EVENT_BLOCK_COUNT); + if (firstGoodIndex === -1) { + pastEvents.length = 0; + } + else { + pastEvents.splice(0, firstGoodIndex); + } + pastEvents.push(event); +} + +export { AlchemyWebSocketProvider }; +//# sourceMappingURL=alchemy-websocket-provider-35c345f7.js.map diff --git a/test/node_modules/alchemy-sdk/dist/es/alchemy-websocket-provider-35c345f7.js.map b/test/node_modules/alchemy-sdk/dist/es/alchemy-websocket-provider-35c345f7.js.map new file mode 100644 index 0000000..8cb4ab5 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/alchemy-websocket-provider-35c345f7.js.map @@ -0,0 +1 @@ +{"version":3,"file":"alchemy-websocket-provider-35c345f7.js","sources":["../../src/internal/websocket-backfiller.ts","../../src/api/alchemy-websocket-provider.ts"],"sourcesContent":["import { AlchemyWebSocketProvider } from '../api/alchemy-websocket-provider';\nimport { fromHex, toHex } from '../api/util';\n\nexport interface BatchPart {\n method: string;\n params?: any;\n}\n\nexport interface NewHeadsEvent {\n author: string;\n difficulty: string;\n extraData: string;\n gasLimit: string;\n gasUsed: string;\n hash: string;\n logsBloom: string;\n miner: string;\n mixHash: string;\n nonce: string;\n number: string;\n parentHash: string;\n receiptsRoot: string;\n sealFields: string[];\n sha3Uncles: string;\n size: string;\n stateRoot: string;\n timestamp: string;\n transactionsRoot: string;\n}\n\n/** The return type of eth_getBlocksByHash. */\nexport interface BlockHead extends NewHeadsEvent {\n totalDifficulty: string;\n transactions: any[];\n uncles: string[];\n}\n\nexport interface LogsEvent {\n address: string;\n blockHash: string;\n blockNumber: string;\n data: string;\n logIndex: string;\n topics: string[];\n transactionHash: string;\n transactionIndex: string;\n removed?: boolean;\n}\n\nexport interface LogsSubscriptionFilter {\n address?: string | string[];\n topics?: Array;\n}\n\nexport interface GetLogsOptions extends LogsSubscriptionFilter {\n fromBlock?: string;\n toBlock?: string;\n}\n\ninterface CommonAncestor {\n blockNumber: number;\n logIndex: number;\n}\n\n/**\n * The maximum number of blocks to backfill. If more than this many blocks have\n * been missed, then we'll sadly miss data, but we want to make sure we don't\n * end up requesting thousands of blocks if somebody left their laptop closed for a week.\n */\nconst MAX_BACKFILL_BLOCKS = 120;\n\n/**\n * The WebsocketBackfiller fetches events that were sent since a provided block\n * number. This is used in the {@link AlchemyWebSocketProvider} to backfill\n * events that were transmitted while the websocket connection was down.\n *\n * The backfiller backfills two main eth_subscribe events: `logs` and `newHeads`.\n *\n * @internal\n */\nexport class WebsocketBackfiller {\n // TODO: Use HTTP provider to do backfill.\n private maxBackfillBlocks = MAX_BACKFILL_BLOCKS;\n constructor(private readonly provider: AlchemyWebSocketProvider) {}\n\n /**\n * Runs backfill for `newHeads` events.\n *\n * @param isCancelled Whether the backfill request is cancelled.\n * @param previousHeads Previous head requests that were sent.\n * @param fromBlockNumber The block number to start backfilling from.\n * @returns A list of `newHeads` events that were sent since the last backfill.\n */\n async getNewHeadsBackfill(\n isCancelled: () => boolean,\n previousHeads: NewHeadsEvent[],\n fromBlockNumber: number\n ): Promise {\n throwIfCancelled(isCancelled);\n const toBlockNumber = await this.getBlockNumber();\n throwIfCancelled(isCancelled);\n\n // If there are no previous heads to fetch, return new heads since\n // `fromBlockNumber`, or up to maxBackfillBlocks from the current head.\n if (previousHeads.length === 0) {\n return this.getHeadEventsInRange(\n Math.max(fromBlockNumber, toBlockNumber - this.maxBackfillBlocks) + 1,\n toBlockNumber + 1\n );\n }\n\n // If the last emitted event is too far back in the past, there's no need\n // to backfill for reorgs. Just fetch the last `maxBackfillBlocks` worth of\n // new heads.\n const lastSeenBlockNumber = fromHex(\n previousHeads[previousHeads.length - 1].number\n );\n const minBlockNumber = toBlockNumber - this.maxBackfillBlocks + 1;\n if (lastSeenBlockNumber <= minBlockNumber) {\n return this.getHeadEventsInRange(minBlockNumber, toBlockNumber + 1);\n }\n\n // To capture all `newHeads` events, return all head events from the last\n // seen block number to current + any of the previous heads that were re-orged.\n const reorgHeads: NewHeadsEvent[] = await this.getReorgHeads(\n isCancelled,\n previousHeads\n );\n throwIfCancelled(isCancelled);\n const intermediateHeads: NewHeadsEvent[] = await this.getHeadEventsInRange(\n lastSeenBlockNumber + 1,\n toBlockNumber + 1\n );\n throwIfCancelled(isCancelled);\n return [...reorgHeads, ...intermediateHeads];\n }\n\n /**\n * Runs backfill for `logs` events.\n *\n * @param isCancelled Whether the backfill request is cancelled.\n * @param filter The filter object that accompanies a logs subscription.\n * @param previousLogs Previous log requests that were sent.\n * @param fromBlockNumber The block number to start backfilling from.\n */\n async getLogsBackfill(\n isCancelled: () => boolean,\n filter: LogsSubscriptionFilter,\n previousLogs: LogsEvent[],\n fromBlockNumber: number\n ): Promise {\n throwIfCancelled(isCancelled);\n const toBlockNumber = await this.getBlockNumber();\n throwIfCancelled(isCancelled);\n\n // If there are no previous logs to fetch, return new logs since\n // `fromBlockNumber`, or up to `maxBackfillBlocks` from the current head.\n if (previousLogs.length === 0) {\n return this.getLogsInRange(\n filter,\n Math.max(fromBlockNumber, toBlockNumber - this.maxBackfillBlocks) + 1,\n toBlockNumber + 1\n );\n }\n\n // If the last emitted log is too far back in the past, there's no need\n // to backfill for removed logs. Just fetch the last `maxBackfillBlocks`\n // worth of logs.\n const lastSeenBlockNumber = fromHex(\n previousLogs[previousLogs.length - 1].blockNumber\n );\n const minBlockNumber = toBlockNumber - this.maxBackfillBlocks + 1;\n if (lastSeenBlockNumber < minBlockNumber) {\n return this.getLogsInRange(filter, minBlockNumber, toBlockNumber + 1);\n }\n\n // Return all log events that have happened along with log events that have\n // been removed due to a chain reorg.\n const commonAncestor = await this.getCommonAncestor(\n isCancelled,\n previousLogs\n );\n throwIfCancelled(isCancelled);\n\n // All previous logs with a block number greater than the common ancestor\n // were part of a re-org, so mark them as such.\n const removedLogs = previousLogs\n .filter(log => fromHex(log.blockNumber) > commonAncestor.blockNumber)\n .map(log => ({ ...log, removed: true }));\n\n // If no common ancestor was found, start backfill from the oldest log's\n // block number.\n const fromBlockInclusive =\n commonAncestor.blockNumber === Number.NEGATIVE_INFINITY\n ? fromHex(previousLogs[0].blockNumber)\n : commonAncestor.blockNumber;\n let addedLogs = await this.getLogsInRange(\n filter,\n fromBlockInclusive,\n toBlockNumber + 1\n );\n\n // De-dupe any logs that were already emitted.\n addedLogs = addedLogs.filter(\n log =>\n log &&\n (fromHex(log.blockNumber) > commonAncestor.blockNumber ||\n fromHex(log.logIndex) > commonAncestor.logIndex)\n );\n\n throwIfCancelled(isCancelled);\n return [...removedLogs, ...addedLogs];\n }\n\n /**\n * Sets a new max backfill blocks. VISIBLE ONLY FOR TESTING.\n *\n * @internal\n */\n setMaxBackfillBlock(newMax: number): void {\n this.maxBackfillBlocks = newMax;\n }\n\n /**\n * Gets the current block number as a number.\n *\n * @private\n */\n private async getBlockNumber(): Promise {\n const blockNumberHex: string = await this.provider.send('eth_blockNumber');\n return fromHex(blockNumberHex);\n }\n\n /**\n * Gets all `newHead` events in the provided range. Note that the returned\n * heads do not include re-orged heads. Use {@link getReorgHeads} to find heads\n * that were part of a re-org.\n *\n * @private\n */\n private async getHeadEventsInRange(\n fromBlockInclusive: number,\n toBlockExclusive: number\n ): Promise {\n if (fromBlockInclusive >= toBlockExclusive) {\n return [];\n }\n const batchParts: BatchPart[] = [];\n for (let i = fromBlockInclusive; i < toBlockExclusive; i++) {\n batchParts.push({\n method: 'eth_getBlockByNumber',\n params: [toHex(i), false]\n });\n }\n\n // TODO: handle errors\n const blockHeads = await this.provider.sendBatch(batchParts);\n return blockHeads.map(toNewHeadsEvent);\n }\n\n /**\n * Returns all heads that were part of a reorg event.\n *\n * @private\n */\n private async getReorgHeads(\n isCancelled: () => boolean,\n previousHeads: NewHeadsEvent[]\n ): Promise {\n const result: NewHeadsEvent[] = [];\n // Iterate from the most recent head backwards in order to find the first\n // block that was part of a re-org.\n for (let i = previousHeads.length - 1; i >= 0; i--) {\n const oldEvent = previousHeads[i];\n const blockHead = await this.getBlockByNumber(fromHex(oldEvent.number));\n throwIfCancelled(isCancelled);\n\n // If the hashes match, then current head in the iteration was not re-orged.\n if (oldEvent.hash === blockHead.hash) {\n break;\n }\n\n result.push(toNewHeadsEvent(blockHead));\n }\n return result.reverse();\n }\n\n /**\n * Simple wrapper around `eth_getBlockByNumber` that returns the complete\n * block information for the provided block number.\n *\n * @private\n */\n private async getBlockByNumber(blockNumber: number): Promise {\n return this.provider.send('eth_getBlockByNumber', [\n toHex(blockNumber),\n false\n ]);\n }\n\n /**\n * Given a list of previous log events, finds the common block number from the\n * logs that matches the block head.\n *\n * This can be used to identify which logs are part of a re-org.\n *\n * Returns 1 less than the oldest log's block number if no common ancestor was found.\n *\n * @private\n */\n private async getCommonAncestor(\n isCancelled: () => boolean,\n previousLogs: LogsEvent[]\n ): Promise {\n // Iterate from the most recent head backwards in order to find the first\n // block that was part of a re-org.\n let blockHead = await this.getBlockByNumber(\n fromHex(previousLogs[previousLogs.length - 1].blockNumber)\n );\n throwIfCancelled(isCancelled);\n for (let i = previousLogs.length - 1; i >= 0; i--) {\n const oldLog = previousLogs[i];\n\n // Ensure that updated blocks are fetched every time the log's block number\n // changes.\n if (oldLog.blockNumber !== blockHead.number) {\n blockHead = await this.getBlockByNumber(fromHex(oldLog.blockNumber));\n }\n\n // Since logs are ordered in ascending order, the first log that matches\n // the hash should be the largest logIndex.\n if (oldLog.blockHash === blockHead.hash) {\n return {\n blockNumber: fromHex(oldLog.blockNumber),\n logIndex: fromHex(oldLog.logIndex)\n };\n }\n }\n return {\n blockNumber: Number.NEGATIVE_INFINITY,\n logIndex: Number.NEGATIVE_INFINITY\n };\n }\n\n /**\n * Gets all `logs` events in the provided range. Note that the returned logs\n * do not include removed logs.\n *\n * @private\n */ private async getLogsInRange(\n filter: LogsSubscriptionFilter,\n fromBlockInclusive: number,\n toBlockExclusive: number\n ): Promise {\n if (fromBlockInclusive >= toBlockExclusive) {\n return [];\n }\n const rangeFilter: GetLogsOptions = {\n ...filter,\n fromBlock: toHex(fromBlockInclusive),\n toBlock: toHex(toBlockExclusive - 1)\n };\n return this.provider.send('eth_getLogs', [rangeFilter]);\n }\n}\n\nfunction toNewHeadsEvent(head: BlockHead): NewHeadsEvent {\n const result: NewHeadsEvent & Partial = { ...head };\n delete result.totalDifficulty;\n delete result.transactions;\n delete result.uncles;\n return result;\n}\n\nexport function dedupeNewHeads(events: NewHeadsEvent[]): NewHeadsEvent[] {\n return dedupe(events, event => event.hash);\n}\n\nexport function dedupeLogs(events: LogsEvent[]): LogsEvent[] {\n return dedupe(events, event => `${event.blockHash}/${event.logIndex}`);\n}\n\nfunction dedupe(items: T[], getKey: (item: T) => any): T[] {\n const keysSeen: Set = new Set();\n const result: T[] = [];\n items.forEach(item => {\n const key = getKey(item);\n if (!keysSeen.has(key)) {\n keysSeen.add(key);\n result.push(item);\n }\n });\n return result;\n}\n\nconst CANCELLED = new Error('Cancelled');\nexport function throwIfCancelled(isCancelled: () => boolean): void {\n if (isCancelled()) {\n throw CANCELLED;\n }\n}\n","import SturdyWebSocket from 'sturdy-websocket';\n\nimport { Listener } from '@ethersproject/abstract-provider';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport {\n Networkish,\n getNetwork as getNetworkFromEthers\n} from '@ethersproject/networks';\nimport { Network as NetworkFromEthers } from '@ethersproject/networks/lib/types';\nimport {\n CommunityResourcable,\n WebSocketProvider\n} from '@ethersproject/providers';\n\nimport {\n EthersEvent,\n getAlchemyEventTag,\n isAlchemyEvent,\n verifyAlchemyEventName\n} from '../internal/ethers-event';\nimport {\n ALCHEMY_EVENT_TYPES,\n ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE,\n ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE,\n JsonRpcRequest,\n JsonRpcResponse,\n SingleOrBatchResponse,\n SubscriptionEvent,\n WebSocketMessage\n} from '../internal/internal-types';\nimport {\n BatchPart,\n LogsEvent,\n LogsSubscriptionFilter,\n NewHeadsEvent,\n WebsocketBackfiller,\n dedupeLogs,\n dedupeNewHeads,\n throwIfCancelled\n} from '../internal/websocket-backfiller';\nimport { AlchemyEventType, AlchemySubscription } from '../types/types';\nimport {\n CustomNetworks,\n DEFAULT_ALCHEMY_API_KEY,\n EthersNetwork,\n noop\n} from '../util/const';\nimport { VERSION } from '../version';\nimport { AlchemyConfig } from './alchemy-config';\nimport { AlchemyProvider } from './alchemy-provider';\nimport { fromHex } from './util';\n\nconst HEARTBEAT_INTERVAL = 30000;\nconst HEARTBEAT_WAIT_TIME = 10000;\nconst BACKFILL_TIMEOUT = 60000;\nconst BACKFILL_RETRIES = 5;\n/**\n * Subscriptions have a memory of recent events they have sent so that in the\n * event that they disconnect and need to backfill, they can detect re-orgs.\n * Keep a buffer that goes back at least these many blocks, the maximum amount\n * at which we might conceivably see a re-org.\n *\n * Note that while our buffer goes back this many blocks, it may contain more\n * than this many elements, since in the case of logs subscriptions more than\n * one event may be emitted for a block.\n */\nconst RETAINED_EVENT_BLOCK_COUNT = 10;\n\n/**\n * SDK's custom implementation fo the ethers.js's 'AlchemyWebSocketProvider'.\n *\n * Do not call this constructor directly. Instead, instantiate an instance of\n * {@link Alchemy} and call {@link Alchemy.config.getWebSocketProvider()}.\n *\n * @public\n */\nexport class AlchemyWebSocketProvider\n extends WebSocketProvider\n implements CommunityResourcable\n{\n _events: Array = [];\n readonly apiKey: string;\n\n // In the case of a WebSocket reconnection, all subscriptions are lost and we\n // create new ones to replace them, but we want to create the illusion that\n // the original subscriptions persist. Thus, maintain a mapping from the\n // \"virtual\" subscription ids which are visible to the consumer to the\n // \"physical\" subscription ids of the actual connections. This terminology is\n // borrowed from virtual and physical memory, which has a similar mapping.\n /** @internal */\n private readonly virtualSubscriptionsById: Map =\n new Map();\n /** @internal */\n private readonly virtualIdsByPhysicalId: Map = new Map();\n /** @internal */\n private readonly backfiller: WebsocketBackfiller;\n /** @internal */\n private heartbeatIntervalId?: NodeJS.Timeout;\n /** @internal */\n private cancelBackfill: () => void;\n\n /** @internal */\n constructor(config: AlchemyConfig, wsConstructor?: any) {\n // Normalize the API Key to a string.\n const apiKey = AlchemyProvider.getApiKey(config.apiKey);\n\n // Generate our own connection info with the correct endpoint URLs.\n const alchemyNetwork = AlchemyProvider.getAlchemyNetwork(config.network);\n const connection = AlchemyProvider.getAlchemyConnectionInfo(\n alchemyNetwork,\n apiKey,\n 'wss'\n );\n\n const protocol = `alchemy-sdk-${VERSION}`;\n\n // Use the provided config URL override if it exists, otherwise use the created one.\n const ws = new SturdyWebSocket(config.url ?? connection.url, protocol, {\n wsConstructor: wsConstructor ?? getWebsocketConstructor()\n });\n\n // Normalize the Alchemy named network input to the network names used by\n // ethers. This allows the parent super constructor in JsonRpcProvider to\n // correctly set the network.\n const ethersNetwork = EthersNetwork[alchemyNetwork];\n super(ws as any, ethersNetwork);\n this.apiKey = apiKey;\n\n // Start heartbeat and backfiller for the websocket connection.\n this.backfiller = new WebsocketBackfiller(this);\n this.addSocketListeners();\n this.startHeartbeat();\n this.cancelBackfill = noop;\n }\n\n /**\n * Overrides the `BaseProvider.getNetwork` method as implemented by ethers.js.\n *\n * This override allows the SDK to set the provider's network to values not\n * yet supported by ethers.js.\n *\n * @internal\n * @override\n */\n static getNetwork(network: Networkish): NetworkFromEthers {\n if (typeof network === 'string' && network in CustomNetworks) {\n return CustomNetworks[network];\n }\n\n // Call the standard ethers.js getNetwork method for other networks.\n return getNetworkFromEthers(network);\n }\n\n /**\n * Overridden implementation of ethers that includes Alchemy based subscriptions.\n *\n * @param eventName Event to subscribe to\n * @param listener The listener function to call when the event is triggered.\n * @override\n * @public\n */\n // TODO: Override `Listener` type to get type autocompletions.\n on(eventName: AlchemyEventType, listener: Listener): this {\n return this._addEventListener(eventName, listener, false);\n }\n\n /**\n * Overridden implementation of ethers that includes Alchemy based\n * subscriptions. Adds a listener to the triggered for only the next\n * {@link eventName} event, after which it will be removed.\n *\n * @param eventName Event to subscribe to\n * @param listener The listener function to call when the event is triggered.\n * @override\n * @public\n */\n // TODO: Override `Listener` type to get type autocompletions.\n once(eventName: AlchemyEventType, listener: Listener): this {\n return this._addEventListener(eventName, listener, true);\n }\n\n /**\n * Removes the provided {@link listener} for the {@link eventName} event. If no\n * listener is provided, all listeners for the event will be removed.\n *\n * @param eventName Event to unlisten to.\n * @param listener The listener function to remove.\n * @override\n * @public\n */\n off(eventName: AlchemyEventType, listener?: Listener): this {\n if (isAlchemyEvent(eventName)) {\n return this._off(eventName, listener);\n } else {\n return super.off(eventName, listener);\n }\n }\n\n /**\n * Remove all listeners for the provided {@link eventName} event. If no event\n * is provided, all events and their listeners are removed.\n *\n * @param eventName The event to remove all listeners for.\n * @override\n * @public\n */\n removeAllListeners(eventName?: AlchemyEventType): this {\n if (eventName !== undefined && isAlchemyEvent(eventName)) {\n return this._removeAllListeners(eventName);\n } else {\n return super.removeAllListeners(eventName);\n }\n }\n\n /**\n * Returns the number of listeners for the provided {@link eventName} event. If\n * no event is provided, the total number of listeners for all events is returned.\n *\n * @param eventName The event to get the number of listeners for.\n * @public\n * @override\n */\n listenerCount(eventName?: AlchemyEventType): number {\n if (eventName !== undefined && isAlchemyEvent(eventName)) {\n return this._listenerCount(eventName);\n } else {\n return super.listenerCount(eventName);\n }\n }\n\n /**\n * Returns an array of listeners for the provided {@link eventName} event. If\n * no event is provided, all listeners will be included.\n *\n * @param eventName The event to get the listeners for.\n * @public\n * @override\n */\n listeners(eventName?: AlchemyEventType): Array {\n if (eventName !== undefined && isAlchemyEvent(eventName)) {\n return this._listeners(eventName);\n } else {\n return super.listeners(eventName);\n }\n }\n\n /**\n * Overrides the method in `BaseProvider` in order to properly format the\n * Alchemy subscription events.\n *\n * @internal\n * @override\n */\n _addEventListener(\n eventName: AlchemyEventType,\n listener: Listener,\n once: boolean\n ): this {\n if (isAlchemyEvent(eventName)) {\n verifyAlchemyEventName(eventName);\n const event = new EthersEvent(\n getAlchemyEventTag(eventName),\n listener,\n once\n );\n this._events.push(event);\n this._startEvent(event);\n return this;\n } else {\n return super._addEventListener(eventName, listener, once);\n }\n }\n\n /**\n * Overrides the `_startEvent()` method in ethers.js's\n * {@link WebSocketProvider} to include additional alchemy methods.\n *\n * @param event\n * @override\n * @internal\n */\n _startEvent(event: EthersEvent): void {\n // Check if the event type is a custom Alchemy subscription.\n const customLogicTypes = [...ALCHEMY_EVENT_TYPES, 'block', 'filter'];\n if (customLogicTypes.includes(event.type)) {\n this.customStartEvent(event);\n } else {\n super._startEvent(event);\n }\n }\n\n /**\n * Overridden from ethers.js's {@link WebSocketProvider}\n *\n * Modified in order to add mappings for backfilling.\n *\n * @internal\n * @override\n */\n async _subscribe(\n tag: string,\n param: Array,\n processFunc: (result: any) => void,\n event?: EthersEvent\n ): Promise {\n let subIdPromise = this._subIds[tag];\n\n // BEGIN MODIFIED CODE\n const startingBlockNumber = await this.getBlockNumber();\n // END MODIFIED CODE\n\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\n // BEGIN MODIFIED CODE\n const resolvedParams = await Promise.all(param);\n this.virtualSubscriptionsById.set(subId, {\n event: event!,\n method: 'eth_subscribe',\n params: resolvedParams,\n startingBlockNumber,\n virtualId: subId,\n physicalId: subId,\n sentEvents: [],\n isBackfilling: false,\n backfillBuffer: []\n });\n this.virtualIdsByPhysicalId.set(subId, subId);\n\n // END MODIFIED CODE\n\n this._subs[subId] = { tag, processFunc };\n }\n\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `BaseProvider`.\n *\n * This method is copied over directly in order to implement Alchemy's unique\n * subscription types. The only difference is that this method calls\n * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in\n * order to parse the Alchemy subscription event.\n *\n * @internal\n * @override\n */\n emit(eventName: AlchemyEventType, ...args: Array): boolean {\n if (isAlchemyEvent(eventName)) {\n let result = false;\n\n const stopped: Array = [];\n\n // This line is the only modified line from the original method.\n const eventTag = getAlchemyEventTag(eventName);\n\n this._events = this._events.filter(event => {\n if (event.tag !== eventTag) {\n return true;\n }\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 => {\n this._stopEvent(event);\n });\n\n return result;\n } else {\n return super.emit(eventName, ...args);\n }\n }\n\n /** @internal */\n async sendBatch(parts: BatchPart[]): Promise {\n let nextId = 0;\n const payload: JsonRpcRequest[] = parts.map(({ method, params }) => {\n return {\n method,\n params,\n jsonrpc: '2.0',\n id: `alchemy-sdk:${nextId++}`\n };\n });\n\n return this.sendBatchConcurrently(payload);\n }\n\n /** @override */\n destroy(): Promise {\n this.removeSocketListeners();\n this.stopHeartbeatAndBackfill();\n return super.destroy();\n }\n\n /**\n * Overrides the ether's `isCommunityResource()` method. Returns true if the\n * current api key is the default key.\n *\n * @override\n */\n isCommunityResource(): boolean {\n return this.apiKey === DEFAULT_ALCHEMY_API_KEY;\n }\n\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `WebSocketProvider._stopEvent()`.\n *\n * This method is copied over directly in order to support Alchemy's\n * subscription type by allowing the provider to properly stop Alchemy's\n * subscription events.\n *\n * @internal\n */\n _stopEvent(event: EthersEvent): void {\n let tag = event.tag;\n\n // START MODIFIED CODE\n if (ALCHEMY_EVENT_TYPES.includes(event.type)) {\n // There are remaining pending transaction listeners.\n if (\n this._events.filter(e => ALCHEMY_EVENT_TYPES.includes(e.type)).length\n ) {\n return;\n }\n // END MODIFIED CODE\n } else 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) {\n return;\n }\n\n delete this._subIds[tag];\n void subId.then(subId => {\n if (!this._subs[subId]) {\n return;\n }\n delete this._subs[subId];\n void this.send('eth_unsubscribe', [subId]);\n });\n }\n\n /** @internal */\n private addSocketListeners(): void {\n this._websocket.addEventListener('message', this.handleMessage);\n this._websocket.addEventListener('reopen', this.handleReopen);\n this._websocket.addEventListener('down', this.stopHeartbeatAndBackfill);\n }\n\n /** @internal */\n private removeSocketListeners(): void {\n this._websocket.removeEventListener('message', this.handleMessage);\n this._websocket.removeEventListener('reopen', this.handleReopen);\n this._websocket.removeEventListener('down', this.stopHeartbeatAndBackfill);\n }\n\n /**\n * The underlying ethers {@link WebSocketProvider} already handles and emits\n * messages. To allow backfilling, track all messages that are emitted.\n *\n * This is a field arrow function in order to preserve `this` context when\n * passing the method as an event listener.\n *\n * @internal\n */\n private handleMessage = (event: MessageEvent): void => {\n const message: WebSocketMessage = JSON.parse(event.data);\n if (!isSubscriptionEvent(message)) {\n return;\n }\n const physicalId = message.params.subscription;\n const virtualId = this.virtualIdsByPhysicalId.get(physicalId);\n if (!virtualId) {\n return;\n }\n const subscription = this.virtualSubscriptionsById.get(virtualId)!;\n if (subscription.method !== 'eth_subscribe') {\n return;\n }\n\n switch (subscription.params[0]) {\n case 'newHeads': {\n const newHeadsSubscription = subscription as NewHeadsSubscription;\n const newHeadsMessage = message as SubscriptionEvent;\n const { isBackfilling, backfillBuffer } = newHeadsSubscription;\n const { result } = newHeadsMessage.params;\n if (isBackfilling) {\n addToNewHeadsEventsBuffer(backfillBuffer, result);\n } else if (physicalId !== virtualId) {\n // In the case of a re-opened subscription, ethers will not emit the\n // event, so the SDK has to.\n this.emitAndRememberEvent(virtualId, result, getNewHeadsBlockNumber);\n } else {\n // Ethers subscription mapping will emit the event, just store it.\n this.rememberEvent(virtualId, result, getNewHeadsBlockNumber);\n }\n break;\n }\n case 'logs': {\n const logsSubscription = subscription as LogsSubscription;\n const logsMessage = message as SubscriptionEvent;\n const { isBackfilling, backfillBuffer } = logsSubscription;\n const { result } = logsMessage.params;\n if (isBackfilling) {\n addToLogsEventsBuffer(backfillBuffer, result);\n } else if (virtualId !== physicalId) {\n this.emitAndRememberEvent(virtualId, result, getLogsBlockNumber);\n } else {\n this.rememberEvent(virtualId, result, getLogsBlockNumber);\n }\n break;\n }\n default:\n if (physicalId !== virtualId) {\n // In the case of a re-opened subscription, ethers will not emit the\n // event, so the SDK has to.\n const { result } = (message as SubscriptionEvent).params;\n this.emitEvent(virtualId, result);\n }\n }\n };\n\n /**\n * When the websocket connection reopens:\n *\n * 1. Resubscribe to all existing subscriptions and start backfilling\n * 2. Restart heart beat.\n *\n * This is a field arrow function in order to preserve `this` context when\n * passing the method as an event listener.\n *\n * @internal\n */\n private handleReopen = () => {\n this.virtualIdsByPhysicalId.clear();\n const { cancel, isCancelled } = makeCancelToken();\n this.cancelBackfill = cancel;\n for (const subscription of this.virtualSubscriptionsById.values()) {\n void (async () => {\n try {\n await this.resubscribeAndBackfill(isCancelled, subscription);\n } catch (error) {\n if (!isCancelled()) {\n console.error(\n `Error while backfilling \"${subscription.params[0]}\" subscription. Some events may be missing.`,\n error\n );\n }\n }\n })();\n }\n this.startHeartbeat();\n };\n\n /**\n * Reopens the backfill based on\n *\n * @param isCancelled\n * @param subscription\n * @internal\n */\n private async resubscribeAndBackfill(\n isCancelled: () => boolean,\n subscription: VirtualSubscription\n ): Promise {\n const {\n virtualId,\n method,\n params,\n sentEvents,\n backfillBuffer,\n startingBlockNumber\n } = subscription;\n subscription.isBackfilling = true;\n backfillBuffer.length = 0;\n try {\n const physicalId = await this.send(method, params);\n throwIfCancelled(isCancelled);\n subscription.physicalId = physicalId;\n this.virtualIdsByPhysicalId.set(physicalId, virtualId);\n switch (params[0]) {\n case 'newHeads': {\n const backfillEvents = await withBackoffRetries(\n () =>\n withTimeout(\n this.backfiller.getNewHeadsBackfill(\n isCancelled,\n sentEvents,\n startingBlockNumber\n ),\n BACKFILL_TIMEOUT\n ),\n BACKFILL_RETRIES,\n () => !isCancelled()\n );\n throwIfCancelled(isCancelled);\n const events = dedupeNewHeads([...backfillEvents, ...backfillBuffer]);\n events.forEach(event => this.emitNewHeadsEvent(virtualId, event));\n break;\n }\n case 'logs': {\n const filter: LogsSubscriptionFilter = params[1] || {};\n const backfillEvents = await withBackoffRetries(\n () =>\n withTimeout(\n this.backfiller.getLogsBackfill(\n isCancelled,\n filter,\n sentEvents,\n startingBlockNumber\n ),\n BACKFILL_TIMEOUT\n ),\n BACKFILL_RETRIES,\n () => !isCancelled()\n );\n throwIfCancelled(isCancelled);\n const events = dedupeLogs([...backfillEvents, ...backfillBuffer]);\n events.forEach(event => this.emitLogsEvent(virtualId, event));\n break;\n }\n default:\n break;\n }\n } finally {\n subscription.isBackfilling = false;\n backfillBuffer.length = 0;\n }\n }\n\n /**\n * Cancels the heartbeat and any pending backfills being performed. This is\n * called when the websocket connection goes down or is disconnected.\n *\n * This is a field arrow function in order to preserve `this` context when\n * passing the method as an event listener.\n *\n * @internal\n */\n private stopHeartbeatAndBackfill = () => {\n if (this.heartbeatIntervalId != null) {\n clearInterval(this.heartbeatIntervalId);\n this.heartbeatIntervalId = undefined;\n }\n this.cancelBackfill();\n };\n\n /** @internal */\n private emitNewHeadsEvent(virtualId: string, result: NewHeadsEvent): void {\n this.emitAndRememberEvent(virtualId, result, getNewHeadsBlockNumber);\n }\n\n /** @internal */\n private emitLogsEvent(virtualId: string, result: LogsEvent): void {\n this.emitAndRememberEvent(virtualId, result, getLogsBlockNumber);\n }\n\n /**\n * Emits an event to consumers, but also remembers it in its subscriptions's\n * `sentEvents` buffer so that we can detect re-orgs if the connection drops\n * and needs to be reconnected.\n *\n * @internal\n */\n private emitAndRememberEvent(\n virtualId: string,\n result: T,\n getBlockNumber: (result: T) => number\n ): void {\n this.rememberEvent(virtualId, result, getBlockNumber);\n this.emitEvent(virtualId, result);\n }\n\n private emitEvent(virtualId: string, result: T): void {\n const subscription = this.virtualSubscriptionsById.get(virtualId);\n if (!subscription) {\n return;\n }\n this.emitGenericEvent(subscription, result);\n }\n\n /** @internal */\n private rememberEvent(\n virtualId: string,\n result: T,\n getBlockNumber: (result: T) => number\n ): void {\n const subscription = this.virtualSubscriptionsById.get(virtualId);\n if (!subscription) {\n return;\n }\n // Web3 modifies these event objects once we pass them on (changing hex\n // numbers to numbers). We want the original event, so make a defensive\n // copy.\n addToPastEventsBuffer(\n subscription.sentEvents,\n { ...result },\n getBlockNumber\n );\n }\n\n /** @internal */\n private emitGenericEvent(\n subscription: VirtualSubscription,\n result: any\n ): void {\n const emitFunction = this.emitProcessFn(subscription.event);\n emitFunction(result);\n }\n\n /**\n * Starts a heartbeat that pings the websocket server periodically to ensure\n * that the connection stays open.\n *\n * @internal\n */\n private startHeartbeat(): void {\n if (this.heartbeatIntervalId != null) {\n return;\n }\n this.heartbeatIntervalId = setInterval(async () => {\n try {\n await withTimeout(this.send('net_version'), HEARTBEAT_WAIT_TIME);\n } catch {\n this._websocket.reconnect();\n }\n }, HEARTBEAT_INTERVAL);\n }\n\n /**\n * This method sends the batch concurrently as individual requests rather than\n * as a batch, which was the original implementation. The original batch logic\n * is preserved in this implementation in order for faster porting.\n *\n * @param payload\n * @internal\n */\n // TODO(cleanup): Refactor and remove usages of `sendBatch()`.\n // TODO(errors): Use allSettled() once we have more error handling.\n private async sendBatchConcurrently(\n payload: JsonRpcRequest[]\n ): Promise {\n return Promise.all(payload.map(req => this.send(req.method, req.params)));\n }\n\n /** @internal */\n private customStartEvent(event: EthersEvent): void {\n if (event.type === ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE) {\n const { fromAddress, toAddress, hashesOnly } = event;\n void this._subscribe(\n event.tag,\n [\n AlchemySubscription.PENDING_TRANSACTIONS,\n { fromAddress, toAddress, hashesOnly }\n ],\n this.emitProcessFn(event),\n event\n );\n } else if (event.type === ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE) {\n const { addresses, includeRemoved, hashesOnly } = event;\n void this._subscribe(\n event.tag,\n [\n AlchemySubscription.MINED_TRANSACTIONS,\n { addresses, includeRemoved, hashesOnly }\n ],\n this.emitProcessFn(event),\n event\n );\n } else if (event.type === 'block') {\n void this._subscribe(\n 'block',\n ['newHeads'],\n this.emitProcessFn(event),\n event\n );\n } else if (event.type === 'filter') {\n void this._subscribe(\n event.tag,\n ['logs', this._getFilter(event.filter)],\n this.emitProcessFn(event),\n event\n );\n }\n }\n\n /** @internal */\n private emitProcessFn(event: EthersEvent): (result: any) => void {\n switch (event.type) {\n case ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE:\n return result =>\n this.emit(\n {\n method: AlchemySubscription.PENDING_TRANSACTIONS,\n fromAddress: event.fromAddress,\n toAddress: event.toAddress,\n hashesOnly: event.hashesOnly\n },\n result\n );\n case ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE:\n return result =>\n this.emit(\n {\n method: AlchemySubscription.MINED_TRANSACTIONS,\n addresses: event.addresses,\n includeRemoved: event.includeRemoved,\n hashesOnly: event.hashesOnly\n },\n result\n );\n case 'block':\n return result => {\n const blockNumber = BigNumber.from(result.number).toNumber();\n this._emitted.block = blockNumber;\n this.emit('block', blockNumber);\n };\n case 'filter':\n return result => {\n if (result.removed == null) {\n result.removed = false;\n }\n this.emit(event.filter, this.formatter.filterLog(result));\n };\n default:\n throw new Error('Invalid event type to `emitProcessFn()`');\n }\n }\n\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `BaseProvider.off()`.\n *\n * This method is copied over directly in order to implement Alchemy's unique\n * subscription types. The only difference is that this method calls\n * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in\n * order to parse the Alchemy subscription event.\n *\n * @private\n */\n private _off(eventName: AlchemyEventType, listener?: Listener): this {\n if (listener == null) {\n return this.removeAllListeners(eventName);\n }\n\n const stopped: Array = [];\n\n let found = false;\n const eventTag = getAlchemyEventTag(eventName);\n this._events = this._events.filter(event => {\n if (event.tag !== eventTag || event.listener != listener) {\n return true;\n }\n if (found) {\n return true;\n }\n found = true;\n stopped.push(event);\n return false;\n });\n\n stopped.forEach(event => {\n this._stopEvent(event);\n });\n\n return this;\n }\n\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `BaseProvider.removeAllListeners()`.\n *\n * This method is copied over directly in order to implement Alchemy's unique\n * subscription types. The only difference is that this method calls\n * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in\n * order to parse the Alchemy subscription event.\n *\n * @private\n */\n private _removeAllListeners(eventName: AlchemyEventType): this {\n let stopped: Array = [];\n if (eventName == null) {\n stopped = this._events;\n\n this._events = [];\n } else {\n const eventTag = getAlchemyEventTag(eventName);\n this._events = this._events.filter(event => {\n if (event.tag !== eventTag) {\n return true;\n }\n stopped.push(event);\n return false;\n });\n }\n\n stopped.forEach(event => {\n this._stopEvent(event);\n });\n\n return this;\n }\n\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `BaseProvider.listenerCount()`.\n *\n * This method is copied over directly in order to implement Alchemy's unique\n * subscription types. The only difference is that this method calls\n * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in\n * order to parse the Alchemy subscription event.\n *\n * @private\n */\n private _listenerCount(eventName?: AlchemyEventType): number {\n if (!eventName) {\n return this._events.length;\n }\n\n const eventTag = getAlchemyEventTag(eventName);\n return this._events.filter(event => {\n return event.tag === eventTag;\n }).length;\n }\n\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `BaseProvider.listeners()`.\n *\n * This method is copied over directly in order to implement Alchemy's unique\n * subscription types. The only difference is that this method calls\n * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in\n * order to parse the Alchemy subscription event.\n *\n * @private\n */\n private _listeners(eventName?: AlchemyEventType): Array {\n if (eventName == null) {\n return this._events.map(event => event.listener);\n }\n\n const eventTag = getAlchemyEventTag(eventName);\n return this._events\n .filter(event => event.tag === eventTag)\n .map(event => event.listener);\n }\n}\n\nfunction getWebsocketConstructor(): any {\n return isNodeEnvironment() ? require('websocket').w3cwebsocket : WebSocket;\n}\n\nfunction isNodeEnvironment(): boolean {\n return (\n typeof process !== 'undefined' &&\n process != null &&\n process.versions != null &&\n process.versions.node != null\n );\n}\n\n/** @internal */\ninterface CancelToken {\n cancel(): void;\n isCancelled(): boolean;\n}\n\ninterface VirtualSubscription {\n event: EthersEvent;\n virtualId: string;\n physicalId: string;\n method: string;\n params: any[];\n isBackfilling: boolean;\n startingBlockNumber: number;\n sentEvents: any[];\n backfillBuffer: any[];\n}\n\ninterface NewHeadsSubscription extends VirtualSubscription {\n method: 'eth_subscribe';\n params: ['newHeads'];\n isBackfilling: boolean;\n sentEvents: NewHeadsEvent[];\n backfillBuffer: NewHeadsEvent[];\n}\n\ninterface LogsSubscription extends VirtualSubscription {\n method: 'eth_subscribe';\n params: ['logs', LogsSubscriptionFilter?];\n isBackfilling: boolean;\n sentEvents: LogsEvent[];\n backfillBuffer: LogsEvent[];\n}\n\n// TODO(cleanup): Use class variable rather than passing `isCancelled` everywhere.\nfunction makeCancelToken(): CancelToken {\n let cancelled = false;\n return { cancel: () => (cancelled = true), isCancelled: () => cancelled };\n}\n\n// TODO(cleanup): replace with SDK's backoff implementation\nconst MIN_RETRY_DELAY = 1000;\nconst RETRY_BACKOFF_FACTOR = 2;\nconst MAX_RETRY_DELAY = 30000;\n\nasync function withBackoffRetries(\n f: () => Promise,\n retryCount: number,\n shouldRetry: (error: unknown) => boolean = () => true\n): Promise {\n let nextWaitTime = 0;\n let i = 0;\n while (true) {\n try {\n return await f();\n } catch (error) {\n i++;\n if (i >= retryCount || !shouldRetry(error)) {\n throw error;\n }\n await delay(nextWaitTime);\n if (!shouldRetry(error)) {\n throw error;\n }\n nextWaitTime =\n nextWaitTime === 0\n ? MIN_RETRY_DELAY\n : Math.min(MAX_RETRY_DELAY, RETRY_BACKOFF_FACTOR * nextWaitTime);\n }\n }\n}\n\nfunction delay(ms: number): Promise {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n\nfunction withTimeout(promise: Promise, ms: number): Promise {\n return Promise.race([\n promise,\n new Promise((_, reject) =>\n setTimeout(() => reject(new Error('Timeout')), ms)\n )\n ]);\n}\n\nfunction getNewHeadsBlockNumber(event: NewHeadsEvent): number {\n return fromHex(event.number);\n}\n\nfunction getLogsBlockNumber(event: LogsEvent): number {\n return fromHex(event.blockNumber);\n}\n\nfunction isResponse(\n message: WebSocketMessage\n): message is SingleOrBatchResponse {\n return (\n Array.isArray(message) ||\n (message.jsonrpc === '2.0' && (message as JsonRpcResponse).id !== undefined)\n );\n}\n\nfunction isSubscriptionEvent(\n message: WebSocketMessage\n): message is SubscriptionEvent {\n return !isResponse(message);\n}\n\nfunction addToNewHeadsEventsBuffer(\n pastEvents: NewHeadsEvent[],\n event: NewHeadsEvent\n): void {\n addToPastEventsBuffer(pastEvents, event, getNewHeadsBlockNumber);\n}\n\nfunction addToLogsEventsBuffer(\n pastEvents: LogsEvent[],\n event: LogsEvent\n): void {\n addToPastEventsBuffer(pastEvents, event, getLogsBlockNumber);\n}\n\n/**\n * Adds a new event to an array of events, evicting any events which are so old\n * that they will no longer feasibly be part of a reorg.\n */\nfunction addToPastEventsBuffer(\n pastEvents: T[],\n event: T,\n getBlockNumber: (event: T) => number\n): void {\n const currentBlockNumber = getBlockNumber(event);\n // Find first index of an event recent enough to retain, then drop everything\n // at a lower index.\n const firstGoodIndex = pastEvents.findIndex(\n e => getBlockNumber(e) > currentBlockNumber - RETAINED_EVENT_BLOCK_COUNT\n );\n if (firstGoodIndex === -1) {\n pastEvents.length = 0;\n } else {\n pastEvents.splice(0, firstGoodIndex);\n }\n pastEvents.push(event);\n}\n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,OAAyB,EAAA;AAEzB,IAAA,QACE,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;AACtB,SAAC,OAAO,CAAC,OAAO,KAAK,KAAK,IAAK,OAA2B,CAAC,EAAE,KAAK,SAAS,CAAC,EAC5E;AACJ,CAAC;AAED,SAAS,mBAAmB,CAC1B,OAAyB,EAAA;AAEzB,IAAA,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AAC9B,CAAC;AAED,SAAS,yBAAyB,CAChC,UAA2B,EAC3B,KAAoB,EAAA;AAEpB,IAAA,qBAAqB,CAAC,UAAU,EAAE,KAAK,EAAE,sBAAsB,CAAC,CAAC;AACnE,CAAC;AAED,SAAS,qBAAqB,CAC5B,UAAuB,EACvB,KAAgB,EAAA;AAEhB,IAAA,qBAAqB,CAAC,UAAU,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC;AAC/D,CAAC;AAED;;;AAGG;AACH,SAAS,qBAAqB,CAC5B,UAAe,EACf,KAAQ,EACR,cAAoC,EAAA;AAEpC,IAAA,MAAM,kBAAkB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;;;AAGjD,IAAA,MAAM,cAAc,GAAG,UAAU,CAAC,SAAS,CACzC,CAAC,IAAI,cAAc,CAAC,CAAC,CAAC,GAAG,kBAAkB,GAAG,0BAA0B,CACzE,CAAC;AACF,IAAA,IAAI,cAAc,KAAK,CAAC,CAAC,EAAE;AACzB,QAAA,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;AACvB,KAAA;AAAM,SAAA;AACL,QAAA,UAAU,CAAC,MAAM,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;AACtC,KAAA;AACD,IAAA,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACzB;;;;"} \ No newline at end of file diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/api/alchemy-config.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/api/alchemy-config.d.ts new file mode 100644 index 0000000..0ba461a --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/api/alchemy-config.d.ts @@ -0,0 +1,54 @@ +import { AlchemySettings, Network } from '../types/types'; +import type { AlchemyProvider } from './alchemy-provider'; +import type { AlchemyWebSocketProvider } from './alchemy-websocket-provider'; +/** + * This class holds the config information for the SDK client instance and + * exposes the underlying providers for more advanced use cases. + * + * @public + */ +export declare class AlchemyConfig { + /** The Alchemy API key. */ + readonly apiKey: string; + /** The Network that this SDK is associated with. */ + readonly network: Network; + /** The maximum number of retries to perform. */ + readonly maxRetries: number; + /** Setting to enable automatic batching on json-rpc requests. Defaults to false.*/ + readonly batchRequests: boolean; + /** + * The optional hardcoded URL to send requests to instead of using the network + * and apiKey. + */ + readonly url?: string; + /** The optional Alchemy auth token to use when sending requests with the Notify API. */ + readonly authToken?: string; + constructor(config?: AlchemySettings); + /** + * Returns an AlchemyProvider instance. Only one provider is created per + * Alchemy instance. + * + * The AlchemyProvider is a wrapper around ether's `AlchemyProvider` class and + * has been expanded to support Alchemy's Enhanced APIs. + * + * Most common methods on the provider are available as top-level methods on + * the {@link Alchemy} instance, but the provider is exposed here to access + * other less-common methods. + * + * @public + */ + getProvider(): Promise; + /** + * Returns an AlchemyWebsocketProvider instance. Only one provider is created + * per Alchemy instance. + * + * The AlchemyWebSocketProvider is a wrapper around ether's + * `AlchemyWebSocketProvider` class and has been expanded to support Alchemy's + * Subscription APIs, automatic backfilling, and other performance improvements. + * + * Most common methods on the provider are available as top-level methods on + * the {@link Alchemy} instance, but the provider is exposed here to access + * other less-common methods. + */ + getWebSocketProvider(): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/api/alchemy-contract.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/api/alchemy-contract.d.ts new file mode 100644 index 0000000..a1766ad --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/api/alchemy-contract.d.ts @@ -0,0 +1,17 @@ +import { Contract as EthersContract, ContractFactory as EthersContractFactory } from '@ethersproject/contracts'; +/** + * The Contract class is a wrapper around the Contract class from ethers.js and + * is exported here for convenience. + * + * @public + */ +export declare class Contract extends EthersContract { +} +/** + * The ContractFactory class is a wrapper around the ContractFactory class from + * ethers.js and is exported here for convenience. + * + * @public + */ +export declare class ContractFactory extends EthersContractFactory { +} diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/api/alchemy-provider.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/api/alchemy-provider.d.ts new file mode 100644 index 0000000..4e2d71e --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/api/alchemy-provider.d.ts @@ -0,0 +1,40 @@ +import { Network as NetworkFromEthers } from '@ethersproject/networks'; +import { CommunityResourcable, JsonRpcProvider } from '@ethersproject/providers'; +/** + * SDK's custom implementation of ethers.js's 'AlchemyProvider'. + * + * Do not call this constructor directly. Instead, instantiate an instance of + * {@link Alchemy} and call {@link Alchemy.config.getProvider()}. + * + * @public + */ +export declare class AlchemyProvider extends JsonRpcProvider implements CommunityResourcable { + readonly apiKey: string; + readonly maxRetries: number; + readonly batchRequests: boolean; + /** + * Overrides the method in ethers.js's `StaticJsonRpcProvider` class. This + * method is called when calling methods on the parent class `BaseProvider`. + * + * @override + */ + detectNetwork(): Promise; + _startPending(): void; + /** + * Overrides the ether's `isCommunityResource()` method. Returns true if the + * current api key is the default key. + * + * @override + */ + isCommunityResource(): boolean; + /** + * Overrides the base {@link JsonRpcProvider.send} method to implement custom + * logic for sending requests to Alchemy. + * + * @param method The method name to use for the request. + * @param params The parameters to use for the request. + * @override + * @public + */ + send(method: string, params: Array): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/api/alchemy-wallet.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/api/alchemy-wallet.d.ts new file mode 100644 index 0000000..026d469 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/api/alchemy-wallet.d.ts @@ -0,0 +1,103 @@ +import { BlockTag, FeeData, Provider, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; +import { ExternallyOwnedAccount } from '@ethersproject/abstract-signer'; +import { BigNumber } from '@ethersproject/bignumber'; +import { BytesLike } from '@ethersproject/bytes'; +import { Deferrable } from '@ethersproject/properties'; +import { SigningKey } from '@ethersproject/signing-key'; +import { Wallet as EthersWallet } from '@ethersproject/wallet'; +import { Alchemy } from './alchemy'; +/** + * The Wallet class inherits Signer and can sign transactions and messages using + * a private key as a standard Externally Owned Account (EOA). + * + * SDK's custom implementation of Ethers.js's 'Wallet'. + * + * Primary difference from Ethers.js 'Wallet' is that you can pass in either a + * Provider or an Alchemy object. This implementation will intelligently detect + * the format and set the provider accordingly. + * + * @public + * @override + */ +export declare class Wallet extends EthersWallet { + private alchemyProviderPromise?; + /** + * Overload permits users to pass in either a standard Provider or an Alchemy + * object. The constructor will detect the object type and handle appropriately. + * + * @override + */ + constructor(privateKey: BytesLike | ExternallyOwnedAccount | SigningKey, alchemyOrProvider?: Alchemy | Provider); + /** + * Returns the balance of this wallet at blockTag. + * + * @param blockTag The block to check the balance of + * @override + */ + getBalance(blockTag?: BlockTag): Promise; + /** + * Returns the number of transactions this account has ever sent. This is the + * value required to be included in transactions as the nonce. + * + * @param blockTag The block to check the transaction count on + * @override + */ + getTransactionCount(blockTag?: BlockTag): Promise; + /** + * Returns the result of estimating the cost to send the transactionRequest, + * with this account address being used as the from field. + * + * @param transaction Transaction to estimate the gas on + * @override + */ + estimateGas(transaction: Deferrable): Promise; + /** + * Returns the result of calling using the transactionRequest, with this + * account address being used as the from field. + * + * @param transaction To make a call on + * @param blockTag The block to make the call on + * @override + */ + call(transaction: Deferrable, blockTag?: BlockTag): Promise; + /** + * Populates all fields in a transaction, signs it and sends it to the network + * + * @override + */ + sendTransaction(transaction: Deferrable): Promise; + /** + * Returns the chain ID this wallet is connected to. + * + * @override + */ + getChainId(): Promise; + /** + * Returns the current gas price. + * + * @override + */ + getGasPrice(): Promise; + /** + * Returns the current recommended FeeData to use in a transaction. + * + * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas + * should be used. + * + * For legacy transactions and networks which do not support EIP-1559, the + * gasPrice should be used. + * + * @override + */ + getFeeData(): Promise; + /** + * Looks up the address of name. If the name is not owned, or does not have a + * Resolver configured, or the Resolver does not have an address configured, + * null is returned. + * + * @param name Name of the ENS address + * @override + */ + resolveName(name: string): Promise; + private getWallet; +} diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/api/alchemy-websocket-provider.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/api/alchemy-websocket-provider.d.ts new file mode 100644 index 0000000..ce7a704 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/api/alchemy-websocket-provider.d.ts @@ -0,0 +1,135 @@ +import { Listener } from '@ethersproject/abstract-provider'; +import { CommunityResourcable, WebSocketProvider } from '@ethersproject/providers'; +import { EthersEvent } from '../internal/ethers-event'; +import { AlchemyEventType } from '../types/types'; +/** + * SDK's custom implementation fo the ethers.js's 'AlchemyWebSocketProvider'. + * + * Do not call this constructor directly. Instead, instantiate an instance of + * {@link Alchemy} and call {@link Alchemy.config.getWebSocketProvider()}. + * + * @public + */ +export declare class AlchemyWebSocketProvider extends WebSocketProvider implements CommunityResourcable { + _events: Array; + readonly apiKey: string; + /** + * Overridden implementation of ethers that includes Alchemy based subscriptions. + * + * @param eventName Event to subscribe to + * @param listener The listener function to call when the event is triggered. + * @override + * @public + */ + on(eventName: AlchemyEventType, listener: Listener): this; + /** + * Overridden implementation of ethers that includes Alchemy based + * subscriptions. Adds a listener to the triggered for only the next + * {@link eventName} event, after which it will be removed. + * + * @param eventName Event to subscribe to + * @param listener The listener function to call when the event is triggered. + * @override + * @public + */ + once(eventName: AlchemyEventType, listener: Listener): this; + /** + * Removes the provided {@link listener} for the {@link eventName} event. If no + * listener is provided, all listeners for the event will be removed. + * + * @param eventName Event to unlisten to. + * @param listener The listener function to remove. + * @override + * @public + */ + off(eventName: AlchemyEventType, listener?: Listener): this; + /** + * Remove all listeners for the provided {@link eventName} event. If no event + * is provided, all events and their listeners are removed. + * + * @param eventName The event to remove all listeners for. + * @override + * @public + */ + removeAllListeners(eventName?: AlchemyEventType): this; + /** + * Returns the number of listeners for the provided {@link eventName} event. If + * no event is provided, the total number of listeners for all events is returned. + * + * @param eventName The event to get the number of listeners for. + * @public + * @override + */ + listenerCount(eventName?: AlchemyEventType): number; + /** + * Returns an array of listeners for the provided {@link eventName} event. If + * no event is provided, all listeners will be included. + * + * @param eventName The event to get the listeners for. + * @public + * @override + */ + listeners(eventName?: AlchemyEventType): Array; + /** @override */ + destroy(): Promise; + /** + * Overrides the ether's `isCommunityResource()` method. Returns true if the + * current api key is the default key. + * + * @override + */ + isCommunityResource(): boolean; + private emitEvent; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.off()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _off; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.removeAllListeners()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _removeAllListeners; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.listenerCount()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _listenerCount; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.listeners()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _listeners; +} diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/api/alchemy.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/api/alchemy.d.ts new file mode 100644 index 0000000..edc191f --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/api/alchemy.d.ts @@ -0,0 +1,49 @@ +import { AlchemySettings } from '../types/types'; +import { AlchemyConfig } from './alchemy-config'; +import { CoreNamespace } from './core-namespace'; +import { NftNamespace } from './nft-namespace'; +import { NotifyNamespace } from './notify-namespace'; +import { TransactNamespace } from './transact-namespace'; +import { WebSocketNamespace } from './websocket-namespace'; +/** + * The Alchemy SDK client. This class is the main entry point into Alchemy's + * APIs and separates functionality into different namespaces. + * + * Each SDK instance is associated with a specific network and API key. To use a + * different network or API key, create a new instance of {@link Alchemy}. + * + * @public + */ +export declare class Alchemy { + /** + * The `core` namespace contains the core eth json-rpc calls and Alchemy's + * Enhanced APIs. + */ + readonly core: CoreNamespace; + /** The `nft` namespace contains methods for Alchemy's NFT API. */ + readonly nft: NftNamespace; + /** The `ws` namespace contains methods for using WebSockets and creating subscriptions. */ + readonly ws: WebSocketNamespace; + /** + * The `transact` namespace contains methods for sending transactions and + * checking on the state of submitted transasctions. + */ + readonly transact: TransactNamespace; + /** + * Holds the setting information for the instance of the Alchemy SDK client + * and allows access to the underlying providers. + */ + readonly config: AlchemyConfig; + /** + * The `notify` namespace contains methods for creating and managing webhooks + * as part of the Notify API. + */ + readonly notify: NotifyNamespace; + /** + * @param {string} [settings.apiKey] - The API key to use for Alchemy + * @param {Network} [settings.network] - The network to use for Alchemy + * @param {number} [settings.maxRetries] - The maximum number of retries to attempt + * @public + */ + constructor(settings?: AlchemySettings); +} diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/api/core-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/api/core-namespace.d.ts new file mode 100644 index 0000000..5a5827d --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/api/core-namespace.d.ts @@ -0,0 +1,311 @@ +import type { Block, BlockTag, BlockWithTransactions, FeeData, Filter, FilterByBlockHash, Log, TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; +import type { BigNumber, BigNumberish } from '@ethersproject/bignumber'; +import type { Network as EthersNetworkAlias } from '@ethersproject/networks/lib/types'; +import type { Deferrable } from '@ethersproject/properties'; +import { AssetTransfersParams, AssetTransfersResponse, AssetTransfersWithMetadataParams, AssetTransfersWithMetadataResponse, DeployResult, TokenBalancesOptionsDefaultTokens, TokenBalancesOptionsErc20, TokenBalancesResponse, TokenBalancesResponseErc20, TokenMetadataResponse, TransactionReceiptsParams, TransactionReceiptsResponse } from '../types/types'; +/** + * The core namespace contains all commonly-used [Ethers.js + * Provider](https://docs.ethers.io/v5/api/providers/api-providers/#AlchemyProvider) + * methods. If you are already using Ethers.js, you should be simply able to + * replace the Ethers.js Provider object with `alchemy.core` when accessing + * provider methods and it should just work. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.core`. + */ +export declare class CoreNamespace { + private readonly config; + /** + * Returns the balance of a given address as of the provided block. + * + * @param addressOrName The address or name of the account to get the balance for. + * @param blockTag The optional block number or hash to get the balance for. + * Defaults to 'latest' if unspecified. + * @public + */ + getBalance(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Returns the contract code of the provided address at the block. If there is + * no contract deployed, the result is `0x`. + * + * @param addressOrName The address or name of the account to get the code for. + * @param blockTag The optional block number or hash to get the code for. + * Defaults to 'latest' if unspecified. + * @public + */ + getCode(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Return the value of the provided position at the provided address, at the + * provided block in `Bytes32` format. + * + * @param addressOrName The address or name of the account to get the code for. + * @param position The position of the storage slot to get. + * @param blockTag The optional block number or hash to get the code for. + * Defaults to 'latest' if unspecified. + * @public + */ + getStorageAt(addressOrName: string | Promise, position: BigNumberish | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Returns the number of transactions ever sent from the provided address, as + * of the provided block tag. This value is used as the nonce for the next + * transaction from the address sent to the network. + * + * @param addressOrName The address or name of the account to get the nonce for. + * @param blockTag The optional block number or hash to get the nonce for. + * @public + */ + getTransactionCount(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Returns the block from the network based on the provided block number or + * hash. Transactions on the block are represented as an array of transaction + * hashes. To get the full transaction details on the block, use + * {@link getBlockWithTransactions} instead. + * + * @param blockHashOrBlockTag The block number or hash to get the block for. + * @public + */ + getBlock(blockHashOrBlockTag: BlockTag | string | Promise): Promise; + /** + * Returns the block from the network based on the provided block number or + * hash. Transactions on the block are represented as an array of + * {@link TransactionResponse} objects. + * + * @param blockHashOrBlockTag The block number or hash to get the block for. + * @public + */ + getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise): Promise; + /** + * Returns the {@link EthersNetworkAlias} Alchemy is connected to. + * + * @public + */ + getNetwork(): Promise; + /** + * Returns the block number of the most recently mined block. + * + * @public + */ + getBlockNumber(): Promise; + /** + * Returns the best guess of the current gas price to use in a transaction. + * + * @public + */ + getGasPrice(): Promise; + /** + * Returns the recommended fee data to use in a transaction. + * + * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas + * should be used. + * + * For legacy transactions and networks which do not support EIP-1559, the + * gasPrice should be used. + * + * @public + */ + getFeeData(): Promise; + /** + * Returns a Promise which will stall until the network has heen established, + * ignoring errors due to the target node not being active yet. + * + * This can be used for testing or attaching scripts to wait until the node is + * up and running smoothly. + * + * @public + */ + ready(): Promise; + /** + * Returns the result of executing the transaction, using call. A call does + * not require any ether, but cannot change any state. This is useful for + * calling getters on Contracts. + * + * @param transaction The transaction to execute. + * @param blockTag The optional block number or hash to get the call for. + * @public + */ + call(transaction: Deferrable, blockTag?: BlockTag | Promise): Promise; + /** + * Returns an estimate of the amount of gas that would be required to submit + * transaction to the network. + * + * An estimate may not be accurate since there could be another transaction on + * the network that was not accounted for, but after being mined affects the + * relevant state. + * + * This is an alias for {@link TransactNamespace.estimateGas}. + * + * @param transaction The transaction to estimate gas for. + * @public + */ + estimateGas(transaction: Deferrable): Promise; + /** + * Returns the transaction with hash or null if the transaction is unknown. + * + * If a transaction has not been mined, this method will search the + * transaction pool. Various backends may have more restrictive transaction + * pool access (e.g. if the gas price is too low or the transaction was only + * recently sent and not yet indexed) in which case this method may also return null. + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransaction(transactionHash: string | Promise): Promise; + /** + * Returns the transaction receipt for hash or null if the transaction has not + * been mined. + * + * To stall until the transaction has been mined, consider the + * waitForTransaction method below. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransactionReceipt(transactionHash: string | Promise): Promise; + /** + * Submits transaction to the network to be mined. The transaction must be + * signed, and be valid (i.e. the nonce is correct and the account has + * sufficient balance to pay for the transaction). + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param signedTransaction The signed transaction to send. + * @public + */ + sendTransaction(signedTransaction: string | Promise): Promise; + /** + * Returns a promise which will not resolve until specified transaction hash is mined. + * + * If {@link confirmations} is 0, this method is non-blocking and if the + * transaction has not been mined returns null. Otherwise, this method will + * block until the transaction has confirmed blocks mined on top of the block + * in which it was mined. + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to wait for. + * @param confirmations The number of blocks to wait for. + * @param timeout The maximum time to wait for the transaction to confirm. + * @public + */ + waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise; + /** + * Returns an array of logs that match the provided filter. + * + * @param filter The filter object to use. + * @public + */ + getLogs(filter: Filter | FilterByBlockHash | Promise): Promise>; + /** + * Allows sending a raw message to the Alchemy backend. + * + * @param method The method to call. + * @param params The parameters to pass to the method. + * @public + */ + send(method: string, params: Array): Promise; + /** + * Finds the address that deployed the provided contract and block number it + * was deployed in. + * + * NOTE: This method performs a binary search across all blocks since genesis + * and can take a long time to complete. This method is a convenience method + * that will eventually be replaced by a single call to an Alchemy endpoint + * with this information cached. + * + * @param contractAddress - The contract address to find the deployer for. + * @beta + */ + findContractDeployer(contractAddress: string): Promise; + /** + * Returns the ERC-20 token balances for a specific owner address. + * + * @param addressOrName The owner address to get the token balances for. + * @public + */ + getTokenBalances(addressOrName: string): Promise; + /** + * Returns the token balances for a specific owner address given a list of contracts. + * + * @param addressOrName The owner address to get the token balances for. + * @param contractAddresses A list of contract addresses to check. If omitted, + * all ERC-20 tokens will be checked. + * @public + */ + getTokenBalances(addressOrName: string, contractAddresses?: string[]): Promise; + /** + * Returns the ERC-20 token balances for a specific owner. + * + * This overload covers the erc-20 token type which includes a page key in the response. + * + * @param addressOrName The owner address to get the token balances for. + * @param options Token type options set to ERC-20 with optional page key. + * @public + */ + getTokenBalances(addressOrName: string, options: TokenBalancesOptionsErc20): Promise; + /** + * Returns the token balances for a specific owner, fetching from the top 100 + * tokens by 24 hour volume. + * + * This overload covers the default token type which includes a page key in + * the response. + * + * @param addressOrName The owner address to get the token balances for. + * @param options Token type options set to ERC-20 with optional page key. + * @public + */ + getTokenBalances(addressOrName: string, options: TokenBalancesOptionsDefaultTokens): Promise; + /** + * Returns metadata for a given token contract address. + * + * @param address The contract address to get metadata for. + * @public + */ + getTokenMetadata(address: string): Promise; + /** + * Get transactions for specific addresses. See the web documentation for the + * full details: + * https://docs.alchemy.com/alchemy/enhanced-apis/transfers-api#alchemy_getassettransfers + * + * This overload requires {@link AssetTransfersWithMetadataParams.withMetadata} + * to be set to `true`, which results in additional metadata returned in the + * response object. + * + * @param params An object containing fields for the asset transfer query + * @public + */ + getAssetTransfers(params: AssetTransfersWithMetadataParams): Promise; + /** + * Get transactions for specific addresses. See the web documentation for the + * full details: + * https://docs.alchemy.com/alchemy/enhanced-apis/transfers-api#alchemy_getassettransfers + * + * @param params An object containing fields for the asset transfer query. + * @public + */ + getAssetTransfers(params: AssetTransfersParams): Promise; + /** + * Gets all transaction receipts for a given block by number or block hash. + * + * @param params An object containing fields for the transaction receipt query. + * @public + */ + getTransactionReceipts(params: TransactionReceiptsParams): Promise; + /** + * Returns the underlying owner address for the provided ENS address, or `null` + * if the ENS name does not have an underlying address. + * + * @param name The ENS address name to resolve. + */ + resolveName(name: string): Promise; + /** + * Performs a reverse lookup of the address in ENS using the Reverse Registrar. If the name does not exist, or the forward lookup does not match, null is returned. + * + * An ENS name requires additional configuration to setup a reverse record, so not all ENS addresses will map back to the original ENS domain. + * + * @param address The address to look up the ENS domain name for. + */ + lookupAddress(address: string): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/api/nft-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/api/nft-namespace.d.ts new file mode 100644 index 0000000..09e756e --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/api/nft-namespace.d.ts @@ -0,0 +1,275 @@ +import type { BigNumberish } from '@ethersproject/bignumber'; +import { GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftResponse, NftAttributeRarity, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, NftTokenType, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult } from '../types/types'; +import { BaseNft, Nft, NftContract } from './nft'; +/** + * The NFT namespace contains all the functionality related to NFTs. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.nft`. + */ +export declare class NftNamespace { + private readonly config; + /** + * Get the NFT metadata associated with the provided parameters. + * + * @param contractAddress - The contract address of the NFT. + * @param tokenId - Token id of the NFT. + * @param tokenType - Optionally specify the type of token to speed up the query. + * @param tokenUriTimeoutInMs - No set timeout by default - When metadata is + * requested, this parameter is the timeout (in milliseconds) for the + * website hosting the metadata to respond. If you want to only access the + * cache and not live fetch any metadata for cache misses then set this value to 0. + * @public + */ + getNftMetadata(contractAddress: string, tokenId: BigNumberish, tokenType?: NftTokenType, tokenUriTimeoutInMs?: number): Promise; + /** + * Gets the NFT metadata for multiple NFT tokens. + * + * @param tokens An array of NFT tokens to fetch metadata for. + * @param options Configuration options for making the request. + */ + getNftMetadataBatch(tokens: Array, options?: NftMetadataBatchOptions): Promise; + /** + * Get the NFT collection metadata associated with the provided parameters. + * + * @param contractAddress - The contract address of the NFT. + * @public + */ + getContractMetadata(contractAddress: string): Promise; + /** + * Fetches all NFTs for a given owner and yields them in an async iterable. + * + * This method returns the full NFT for the owner and pages through all page + * keys until all NFTs have been fetched. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwnerIterator(owner: string, options?: GetNftsForOwnerOptions): AsyncIterable; + /** + * Fetches all NFTs for a given owner and yields them in an async iterable. + * + * This method returns the base NFTs that omit the associated metadata and + * pages through all page keys until all NFTs have been fetched. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwnerIterator(owner: string, options?: GetBaseNftsForOwnerOptions): AsyncIterable; + /** + * Get all NFTs for an owner. + * + * This method returns the full NFTs in the contract. To get all NFTs without + * their associated metadata, use {@link GetBaseNftsForOwnerOptions}. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwner(owner: string, options?: GetNftsForOwnerOptions): Promise; + /** + * Get all base NFTs for an owner. + * + * This method returns the base NFTs that omit the associated metadata. To get + * all NFTs with their associated metadata, use {@link GetNftsForOwnerOptions}. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwner(owner: string, options?: GetBaseNftsForOwnerOptions): Promise; + /** + * Get all NFTs for a given contract address. + * + * This method returns the full NFTs in the contract. To get all NFTs without + * their associated metadata, use {@link GetBaseNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The parameters to use for the request. or + * {@link NftContractNftsResponse} response. + * @beta + */ + getNftsForContract(contractAddress: string, options?: GetNftsForContractOptions): Promise; + /** + * Get all base NFTs for a given contract address. + * + * This method returns the base NFTs that omit the associated metadata. To get + * all NFTs with their associated metadata, use {@link GetNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftsForContract(contractAddress: string, options?: GetBaseNftsForContractOptions): Promise; + /** + * Fetches all NFTs for a given contract address and yields them in an async iterable. + * + * This method returns the full NFTs in the contract and pages through all + * page keys until all NFTs have been fetched. To get all NFTs without their + * associated metadata, use {@link GetBaseNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftsForContractIterator(contractAddress: string, options?: GetNftsForContractOptions): AsyncIterable; + /** + * Fetches all base NFTs for a given contract address and yields them in an + * async iterable. + * + * This method returns the base NFTs that omit the associated metadata and + * pages through all page keys until all NFTs have been fetched. To get all + * NFTs with their associated metadata, use {@link GetNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftsForContractIterator(contractAddress: string, options?: GetBaseNftsForContractOptions): AsyncIterable; + /** + * Gets all the owners for a given NFT contract along with the token balance. + * + * @param contractAddress - The NFT contract to get the owners for. + * @param options Optional parameters to use for the request. + * @public + */ + getOwnersForContract(contractAddress: string, options: GetOwnersForContractWithTokenBalancesOptions): Promise; + /** + * Gets all the owners for a given NFT contract. + * + * Note that token balances are omitted by default. To include token balances + * for each owner, use {@link GetOwnersForContractWithTokenBalancesOptions}, + * which has the `withTokenBalances` field set to `true`. + * + * @param contractAddress - The NFT contract to get the owners for. + * @param options Optional parameters to use for the request. + * @public + */ + getOwnersForContract(contractAddress: string, options?: GetOwnersForContractOptions): Promise; + /** + * Gets all the owners for a given NFT contract address and token ID. + * + * @param contractAddress - The NFT contract address. + * @param tokenId - Token id of the NFT. + * @beta + */ + getOwnersForNft(contractAddress: string, tokenId: BigNumberish): Promise; + /** + * Gets all NFT contracts held by the specified owner address. + * + * @param owner - Address for NFT owner (can be in ENS format!). + * @param options - The optional parameters to use for the request. + * @public + */ + getContractsForOwner(owner: string, options?: GetContractsForOwnerOptions): Promise; + /** + * DEPRECATED - Checks that the provided owner address owns one of more of the + * provided NFTs. + * + * @deprecated - Use {@link verifyNftOwnership} instead. This method will be + * removed in a future release. + * @param owner - The owner address to check. + * @param contractAddresses - An array of NFT contract addresses to check ownership for. + */ + checkNftOwnership(owner: string, contractAddresses: string[]): Promise; + /** + * Checks that the provided owner address owns one of more of the provided + * NFT. Returns a boolean indicating whether the owner address owns the provided NFT. + * + * @param owner - The owner address to check. + * @param contractAddress - An NFT contract address to check ownership for. + */ + verifyNftOwnership(owner: string, contractAddress: string): Promise; + /** + * Checks which of the provided NFTs the owner address owns. Returns a map of + * contract address to a boolean indicating whether the owner address owns the NFT. + * + * @param owner - The owner address to check. + * @param contractAddresses - An array NFT contract address to check ownership for. + */ + verifyNftOwnership(owner: string, contractAddresses: string[]): Promise<{ + [contractAddress: string]: boolean; + }>; + /** + * Returns whether a contract is marked as spam or not by Alchemy. For more + * information on how we classify spam, go to our NFT API FAQ at + * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification. + * + * @param contractAddress - The contract address to check. + * @beta + */ + isSpamContract(contractAddress: string): Promise; + /** + * Returns a list of all spam contracts marked by Alchemy. For details on how + * Alchemy marks spam contracts, go to + * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification. + * + * @beta + */ + getSpamContracts(): Promise; + /** + * Returns the floor prices of a NFT contract by marketplace. + * + * @param contractAddress - The contract address for the NFT collection. + * @beta + */ + getFloorPrice(contractAddress: string): Promise; + /** + * Returns NFT sales that have happened through on-chain marketplaces. + * + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftSales(options?: GetNftSalesOptions): Promise; + getNftSales(options?: GetNftSalesOptionsByContractAddress): Promise; + /** + * Get the rarity of each attribute of an NFT. + * + * @param contractAddress - Contract address for the NFT collection. + * @param tokenId - Token id of the NFT. + */ + computeRarity(contractAddress: string, tokenId: BigNumberish): Promise; + /** + * Search for a keyword across metadata of all ERC-721 and ERC-1155 smart contracts. + * + * @param query - The search string that you want to search for in contract metadata. + */ + searchContractMetadata(query: string): Promise; + /** + * Get a summary of attribute prevalence for an NFT collection. + * + * @param contractAddress - Contract address for the NFT collection. + */ + summarizeNftAttributes(contractAddress: string): Promise; + /** + * Refreshes the cached metadata for a provided NFT contract address and token + * id. Returns a boolean value indicating whether the metadata was refreshed. + * + * This method is useful when you want to refresh the metadata for a NFT that + * has been updated since the last time it was fetched. Note that the backend + * only allows one refresh per token every 15 minutes, globally for all users. + * The last refresh time for an NFT can be accessed on the + * {@link Nft.timeLastUpdated} field. + * + * To trigger a refresh for all NFTs in a contract, use {@link refreshContract} instead. + * + * @param contractAddress - The contract address of the NFT. + * @param tokenId - The token id of the NFT. + */ + refreshNftMetadata(contractAddress: string, tokenId: BigNumberish): Promise; + /** + * Triggers a metadata refresh all NFTs in the provided contract address. This + * method is useful after an NFT collection is revealed. + * + * Refreshes are queued on the Alchemy backend and may take time to fully + * process. To refresh the metadata for a specific token, use the + * {@link refreshNftMetadata} method instead. + * + * @param contractAddress - The contract address of the NFT collection. + * @beta + */ + refreshContract(contractAddress: string): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/api/nft.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/api/nft.d.ts new file mode 100644 index 0000000..b51d2bd --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/api/nft.d.ts @@ -0,0 +1,86 @@ +import { Media, NftMetadata, NftTokenType, OpenSeaCollectionMetadata, SpamInfo, TokenUri } from '../types/types'; +/** + * Alchemy representation of a base NFT contract that doesn't contain metadata. + * + * The BaseNftContract does not hold any metadata information and only contains + * the address. The NftContract additionally contains the tokenType, name, + * symbol, and more. + * + * @public + */ +export interface BaseNftContract { + /** The address of the contract. */ + address: string; +} +/** + * Alchemy representation of an NFT contract. + * + * The BaseNftContract does not hold any metadata information and only contains + * the address. The NftContract additionally contains the tokenType, name, + * symbol, and more. + * + * @public + */ +export interface NftContract extends BaseNftContract { + /** The type of the token in the contract. */ + tokenType: NftTokenType; + /** The name of the contract. */ + name?: string; + /** The symbol of the contract. */ + symbol?: string; + /** + * The number of NFTs in the contract as an integer string. This field is only + * available on ERC-721 contracts. + */ + totalSupply?: string; + /** OpenSea's metadata for the contract. */ + openSea?: OpenSeaCollectionMetadata; +} +/** + * Alchemy representation of an NFT that doesn't contain metadata. + * + * The BaseNft object does not hold any metadata information and only contains + * the NFT contract and token ID. The Nft object additionally contains the NFT + * metadata, token URI information, and media. + * + * @public + */ +export interface BaseNft { + contract: BaseNftContract; + /** The NFT token ID as an integer string. */ + tokenId: string; + /** The type of ERC token, if known. */ + tokenType: NftTokenType; +} +/** + * Alchemy representation of an NFT. + * + * The BaseNft object does not hold any metadata information and only contains + * the NFT contract and token ID. The Nft object additionally contains the NFT + * metadata, token URI information, and media. + * + * @public + */ +export interface Nft extends BaseNft { + /** The NFT's underlying contract and relevant contract metadata. */ + contract: NftContract; + /** The NFT title. */ + title: string; + /** The NFT description. */ + description: string; + /** When the NFT was last updated in the blockchain. Represented in ISO-8601 format. */ + timeLastUpdated: string; + /** Holds an error message if there was an issue fetching metadata. */ + metadataError: string | undefined; + /** + * The raw metadata fetched from the metadata URL specified by the NFT. The + * field is undefined if Alchemy was unable to fetch metadata. + */ + rawMetadata: NftMetadata | undefined; + /** URIs for accessing the NFT's metadata blob. */ + tokenUri: TokenUri | undefined; + /** URIs for accessing the NFT's media assets. */ + media: Media[]; + /** Detailed information on why an NFT was classified as spam. */ + spamInfo?: SpamInfo; +} diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/api/notify-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/api/notify-namespace.d.ts new file mode 100644 index 0000000..c70f03d --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/api/notify-namespace.d.ts @@ -0,0 +1,143 @@ +import { AddressActivityResponse, AddressActivityWebhook, AddressWebhookParams, AddressWebhookUpdate, DroppedTransactionWebhook, GetAddressesOptions, GetAllWebhooksResponse, MinedTransactionWebhook, NftActivityWebhook, NftFiltersResponse, NftWebhookParams, NftWebhookUpdate, TransactionWebhookParams, Webhook, WebhookType } from '../types/types'; +/** + * The Notify namespace contains methods used for creating, reading, updating, + * and deleting webhooks in the Notify API. + * + * To use the methods in the API, you must provide your team's auth token in the + * {@link AlchemySettings.authToken} field when configuring + * {@link AlchemySettings}. The auth token can be found in the Alchemy Dashboard + * on the Notify tab. + * + * Note that not all networks are supported in the Notify API. Please consult + * the documentation for which networks are supported. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the notify + * namespace via `alchemy.notify`. + */ +export declare class NotifyNamespace { + private readonly config; + /** + * Get all webhooks on your team. + * + * The team is determined by the `authToken` provided into the {@link AlchemySettings} + * object when creating a new {@link Alchemy} instance. + * + * This method returns a response object containing all the webhooks + */ + getAllWebhooks(): Promise; + /** + * Get all addresses tracked for the provided {@link AddressActivityWebhook}. + * + * @param addressWebhook The Address Activity webhook. + * @param options Pagination options when fetching addresses. + */ + getAddresses(addressWebhook: AddressActivityWebhook, options?: GetAddressesOptions): Promise; + /** + * Get all addresses tracked for the provided {@link AddressActivityWebhook}. + * + * @param webhookId The id of the address activity webhook. Passing in an id + * of a non-address-activity webhook will result in a response object with + * no addresses. + * @param options Pagination options when fetching addresses. + */ + getAddresses(webhookId: string, options?: GetAddressesOptions): Promise; + /** + * Get all NFTs tracked for the provided {@link NftActivityWebhook}. + * + * @param nftWebhook The NFT Activity webhook. + * @param options Pagination options when fetching NFT filters. + */ + getNftFilters(nftWebhook: NftActivityWebhook, options?: GetAddressesOptions): Promise; + /** + * Get all NFT filters tracked for the provided {@link NftActivityWebhook}. + * + * @param webhookId The id of the NFT activity webhook. Passing in an + * incorrect id of a non-NFT webhook will result in a response object with + * no filters. + * @param options Pagination options when fetching nft filters. + */ + getNftFilters(webhookId: string, options?: GetAddressesOptions): Promise; + /** + * Update a {@link NftActivityWebhook}'s active status or NFT filters. + * + * @param nftWebhook The NFT activity webhook to update. + * @param update Object containing the update. + */ + updateWebhook(nftWebhook: NftActivityWebhook, update: NftWebhookUpdate): Promise; + /** + * Update a {@link NftActivityWebhook}'s active status or NFT filters. + * + * @param nftWebhookId The id of the NFT activity webhook. + * @param update Object containing the update. + */ + updateWebhook(nftWebhookId: string, update: NftWebhookUpdate): Promise; + /** + * Update a {@link AddressActivityWebhook}'s active status or addresses. + * + * @param addressWebhook The address activity webhook to update. + * @param update Object containing the update. + */ + updateWebhook(addressWebhook: AddressActivityWebhook, update: AddressWebhookUpdate): Promise; + /** + * Update a {@link AddressActivityWebhook}'s active status or addresses. + * + * @param addressWebhookId The id of the address activity webhook. + * @param update Object containing the update. + */ + updateWebhook(addressWebhookId: string, update: AddressWebhookUpdate): Promise; + /** + * Create a new {@link MinedTransactionWebhook} to track mined transactions + * sent by the app associated with the app id. + * + * Note that the webhook will be created in the app network of the provided app id. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the app id. + */ + createWebhook(url: string, type: WebhookType.MINED_TRANSACTION, params: TransactionWebhookParams): Promise; + /** + * Create a new {@link DroppedTransactionWebhook} to track dropped transactions + * sent by the app associated with the app id. + * + * Note that the webhook will be created in the app network of the provided app id. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the app id. + */ + createWebhook(url: string, type: WebhookType.DROPPED_TRANSACTION, params: TransactionWebhookParams): Promise; + /** + * Create a new {@link NftActivityWebhook} to track NFT transfers. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the NFTs to track and the + * network the webhook should be created on. + */ + createWebhook(url: string, type: WebhookType.NFT_ACTIVITY, params: NftWebhookParams): Promise; + /** + * Create a new {@link AddressActivityWebhook} to track address activity. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the addresses to track and the + * network the webhook should be created on. + */ + createWebhook(url: string, type: WebhookType.ADDRESS_ACTIVITY, params: AddressWebhookParams): Promise; + /** + * Delete the provided webhook. + * + * @param webhook The webhook to delete. + */ + deleteWebhook(webhook: Webhook): Promise; + /** + * Delete the provided webhook. + * + * @param webhookId The id of the webhook to delete. + */ + deleteWebhook(webhookId: string): Promise; + private verifyConfig; + private sendWebhookRequest; +} diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/api/transact-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/api/transact-namespace.d.ts new file mode 100644 index 0000000..85525ad --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/api/transact-namespace.d.ts @@ -0,0 +1,105 @@ +import { TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; +import type { BigNumber } from '@ethersproject/bignumber'; +import { Deferrable } from '@ethersproject/properties'; +import { SendPrivateTransactionOptions } from '../types/types'; +/** + * The Transact namespace contains methods used for sending transactions and + * checking on the state of submitted transactions. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the transact + * namespace via `alchemy.transact`. + */ +export declare class TransactNamespace { + private readonly config; + /** + * Used to send a single transaction to Flashbots. Flashbots will attempt to + * send the transaction to miners for the next 25 blocks. + * + * Returns the transaction hash of the submitted transaction. + * + * @param signedTransaction The raw, signed transaction as a hash. + * @param maxBlockNumber Optional highest block number in which the + * transaction should be included. + * @param options Options to configure the request. + */ + sendPrivateTransaction(signedTransaction: string, maxBlockNumber?: number, options?: SendPrivateTransactionOptions): Promise; + /** + * Stops the provided private transaction from being submitted for future + * blocks. A transaction can only be cancelled if the request is signed by the + * same key as the {@link sendPrivateTransaction} call submitting the + * transaction in first place. + * + * Please note that fast mode transactions cannot be cancelled using this method. + * + * Returns a boolean indicating whether the cancellation was successful. + * + * @param transactionHash Transaction hash of private tx to be cancelled + */ + cancelPrivateTransaction(transactionHash: string): Promise; + /** + * Returns the transaction with hash or null if the transaction is unknown. + * + * If a transaction has not been mined, this method will search the + * transaction pool. Various backends may have more restrictive transaction + * pool access (e.g. if the gas price is too low or the transaction was only + * recently sent and not yet indexed) in which case this method may also return null. + * + * NOTE: This is an alias for {@link CoreNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransaction(transactionHash: string | Promise): Promise; + /** + * Submits transaction to the network to be mined. The transaction must be + * signed, and be valid (i.e. the nonce is correct and the account has + * sufficient balance to pay for the transaction). + * + * NOTE: This is an alias for {@link CoreNamespace.sendTransaction}. + * + * @param signedTransaction The signed transaction to send. + * @public + */ + sendTransaction(signedTransaction: string | Promise): Promise; + /** + * Returns an estimate of the amount of gas that would be required to submit + * transaction to the network. + * + * An estimate may not be accurate since there could be another transaction on + * the network that was not accounted for, but after being mined affects the + * relevant state. + * + * This is an alias for {@link CoreNamespace.estimateGas}. + * + * @param transaction The transaction to estimate gas for. + * @public + */ + estimateGas(transaction: Deferrable): Promise; + /** + * Returns a fee per gas (in wei) that is an estimate of how much you can pay + * as a priority fee, or "tip", to get a transaction included in the current block. + * + * This number is generally used to set the `maxPriorityFeePerGas` field in a + * transaction request. + * + * @public + */ + getMaxPriorityFeePerGas(): Promise; + /** + * Returns a promise which will not resolve until specified transaction hash is mined. + * + * If {@link confirmations} is 0, this method is non-blocking and if the + * transaction has not been mined returns null. Otherwise, this method will + * block until the transaction has confirmed blocks mined on top of the block + * in which it was mined. + * + * NOTE: This is an alias for {@link CoreNamespace.waitForTransaction}. + * + * @param transactionHash The hash of the transaction to wait for. + * @param confirmations The number of blocks to wait for. + * @param timeout The maximum time to wait for the transaction to confirm. + * @public + */ + waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/api/util.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/api/util.d.ts new file mode 100644 index 0000000..10ac7c3 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/api/util.d.ts @@ -0,0 +1,21 @@ +/** + * Converts a hex string to a decimal number. + * + * @param hexString - The hex string to convert. + * @public + */ +export declare function fromHex(hexString: string): number; +/** + * Converts a number to a hex string. + * + * @param num - The number to convert to hex. + * @public + */ +export declare function toHex(num: number): string; +/** + * Checks if a value is a hex string. + * + * @param possibleHexString - The value to check. + * @public + */ +export declare function isHex(possibleHexString: string): boolean; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/api/utils.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/api/utils.d.ts new file mode 100644 index 0000000..2582187 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/api/utils.d.ts @@ -0,0 +1,5 @@ +export { dnsEncode, hashMessage, id, isValidName, namehash } from '@ethersproject/hash'; +export { arrayify, concat, hexConcat, hexDataSlice, hexDataLength, hexlify, hexStripZeros, hexValue, hexZeroPad, isBytes, isBytesLike, isHexString, joinSignature, zeroPad, splitSignature, stripZeros } from '@ethersproject/bytes'; +export { formatEther, parseEther, parseUnits, formatUnits } from '@ethersproject/units'; +export { toUtf8Bytes, toUtf8String } from '@ethersproject/strings'; +export { Interface } from '@ethersproject/abi'; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/api/websocket-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/api/websocket-namespace.d.ts new file mode 100644 index 0000000..7c179bc --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/api/websocket-namespace.d.ts @@ -0,0 +1,67 @@ +import type { Listener } from '@ethersproject/abstract-provider'; +import { AlchemyEventType } from '../types/types'; +/** + * The Websocket namespace contains all subscription related functions that + * allow you to subscribe to events and receive updates as they occur. The + * underlying WebSocket provider has additional logic to handle reconnections + * and automatically backfills missed events. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.ws`. + */ +export declare class WebSocketNamespace { + private readonly config; + /** + * Adds a listener to be triggered for each {@link eventName} event. Also + * includes Alchemy's Subscription API events. See {@link AlchemyEventType} for + * how to use them. + * + * @param eventName The event to listen for. + * @param listener The listener to call when the event is triggered. + * @public + */ + on(eventName: AlchemyEventType, listener: Listener): this; + /** + * Adds a listener to be triggered for only the next {@link eventName} event, + * after which it will be removed. Also includes Alchemy's Subscription API + * events. See {@link AlchemyEventType} for how to use them. + * + * @param eventName The event to listen for. + * @param listener The listener to call when the event is triggered. + * @public + */ + once(eventName: AlchemyEventType, listener: Listener): this; + /** + * Removes the provided {@link listener} for the {@link eventName} event. If no + * listener is provided, all listeners for the event will be removed. + * + * @param eventName The event to unlisten to. + * @param listener The listener to remove. + * @public + */ + off(eventName: AlchemyEventType, listener?: Listener): this; + /** + * Remove all listeners for the provided {@link eventName} event. If no event + * is provided, all events and their listeners are removed. + * + * @param eventName The event to remove all listeners for. + * @public + */ + removeAllListeners(eventName?: AlchemyEventType): this; + /** + * Returns the number of listeners for the provided {@link eventName} event. If + * no event is provided, the total number of listeners for all events is returned. + * + * @param eventName The event to get the number of listeners for. + * @public + */ + listenerCount(eventName?: AlchemyEventType): Promise; + /** + * Returns an array of listeners for the provided {@link eventName} event. If + * no event is provided, all listeners will be included. + * + * @param eventName The event to get the listeners for. + */ + listeners(eventName?: AlchemyEventType): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/index.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/index.d.ts new file mode 100644 index 0000000..a5d9de9 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/index.d.ts @@ -0,0 +1,18 @@ +/** This is the main entry point for the library and exports user-facing API. */ +import * as Utils from './api/utils'; +export { Utils }; +export * from './types/types'; +export { Alchemy } from './api/alchemy'; +export { Wallet } from './api/alchemy-wallet'; +export { Contract, ContractFactory } from './api/alchemy-contract'; +export type { AlchemyConfig } from './api/alchemy-config'; +export type { AlchemyProvider } from './api/alchemy-provider'; +export type { AlchemyWebSocketProvider } from './api/alchemy-websocket-provider'; +export type { NftNamespace } from './api/nft-namespace'; +export type { WebSocketNamespace } from './api/websocket-namespace'; +export type { CoreNamespace } from './api/core-namespace'; +export type { TransactNamespace } from './api/transact-namespace'; +export type { NotifyNamespace } from './api/notify-namespace'; +export type { BaseNftContract, NftContract, Nft, BaseNft } from './api/nft'; +export { fromHex, toHex, isHex } from './api/util'; +export { setLogLevel, LogLevelString as LogLevel } from './util/logger'; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/internal/backoff.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/internal/backoff.d.ts new file mode 100644 index 0000000..ed9cad8 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/internal/backoff.d.ts @@ -0,0 +1,4 @@ +export declare const DEFAULT_BACKOFF_INITIAL_DELAY_MS = 1000; +export declare const DEFAULT_BACKOFF_MULTIPLIER = 1.5; +export declare const DEFAULT_BACKOFF_MAX_DELAY_MS: number; +export declare const DEFAULT_BACKOFF_MAX_ATTEMPTS = 5; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/internal/dispatch.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/internal/dispatch.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/internal/dispatch.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/internal/ethers-event.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/internal/ethers-event.d.ts new file mode 100644 index 0000000..0676f4c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/internal/ethers-event.d.ts @@ -0,0 +1,60 @@ +import { EventType, Filter, Listener } from '@ethersproject/abstract-provider'; +import { AlchemyEventFilter, AlchemyEventType, AlchemyMinedTransactionsAddress, AlchemyMinedTransactionsEventFilter, AlchemyPendingTransactionsEventFilter, NonEmptyArray } from '../types/types'; +/** + * DO NOT MODIFY. + * + * Event class copied directly over from ethers.js's `BaseProvider` class. + * + * This class is used to represent events and their corresponding listeners. The + * SDK needs to extend this class in order to support Alchemy's custom + * Subscription API types. The original class is not exported by ethers. Minimal + * changes have been made in order to get TS to compile. + */ +declare class Event { + readonly listener: Listener; + readonly once: boolean; + readonly tag: string; + _lastBlockNumber: number; + _inflight: boolean; + constructor(tag: string, listener: Listener, once: boolean); + get event(): EventType; + get type(): string; + get hash(): string; + get filter(): Filter; + pollable(): boolean; +} +/** + * Wrapper class around the ethers `Event` class in order to add support for + * Alchemy's custom subscriptions types. + * + * The serialization and deserialization mechanism requires the order of the + * fields to be the same across different {@link ALCHEMY_EVENT_TYPES}. Before + * using a getter on a new event filter, make sure that the position of the + * field in serialization is correct. + * + * The getters on this class deserialize the event tag generated by + * {@link getAlchemyEventTag} into the original fields passed into the event. + */ +export declare class EthersEvent extends Event { + /** + * Converts the event tag into the original `fromAddress` field in + * {@link AlchemyPendingTransactionsEventFilter}. + */ + get fromAddress(): string | string[] | undefined; + /** + * Converts the event tag into the original `toAddress` field in + * {@link AlchemyPendingTransactionsEventFilter}. + */ + get toAddress(): string | string[] | undefined; + /** + * Converts the event tag into the original `hashesOnly` field in + * {@link AlchemyPendingTransactionsEventFilter} and {@link AlchemyMinedTransactionsEventFilter}. + */ + get hashesOnly(): boolean | undefined; + get includeRemoved(): boolean | undefined; + get addresses(): NonEmptyArray | undefined; +} +export declare function isAlchemyEvent(event: AlchemyEventType): event is AlchemyMinedTransactionsEventFilter | AlchemyPendingTransactionsEventFilter; +export declare function verifyAlchemyEventName(eventName: AlchemyEventFilter): void; +export declare function deserializeTopics(data: string): any; +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/internal/internal-types.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/internal/internal-types.d.ts new file mode 100644 index 0000000..48cbe2f --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/internal/internal-types.d.ts @@ -0,0 +1,48 @@ +/** This file contains internal types used by the SDK and are not exposed to the end user. */ +declare type JsonRpcId = string | number | null; +/** + * Prefix for `alchemy_pendingTransactions` subscriptions when serializing to + * ethers events. + * + * This tag is used internally by ethers to track different event filters. + */ +export declare const ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE = "alchemy-pending-transactions"; +/** + * Prefix for `alchemy_minedTransactions` subscriptions when serializing to ethers events. + * + * This tag is used internally by ethers to track different event filters. + */ +export declare const ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE = "alchemy-mined-transactions"; +/** + * Array containing all the custom event tags used internally by ethers to track + * event filters. + */ +export declare const ALCHEMY_EVENT_TYPES: string[]; +export interface JsonRpcRequest { + jsonrpc: '2.0'; + method: string; + params?: any[]; + id?: JsonRpcId; +} +export interface JsonRpcResponse { + jsonrpc: '2.0'; + result?: T; + error?: JsonRpcError; + id: JsonRpcId; +} +interface JsonRpcError { + code: number; + message: string; + data?: T; +} +export declare type WebSocketMessage = SingleOrBatchResponse | SubscriptionEvent; +export declare type SingleOrBatchResponse = JsonRpcResponse | JsonRpcResponse[]; +export interface SubscriptionEvent { + jsonrpc: '2.0'; + method: 'eth_subscription'; + params: { + subscription: string; + result: T; + }; +} +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/internal/nft-api.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/internal/nft-api.d.ts new file mode 100644 index 0000000..8eaf6e1 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/internal/nft-api.d.ts @@ -0,0 +1,27 @@ +import { BigNumberish } from '@ethersproject/bignumber'; +import { AlchemyConfig } from '../api/alchemy-config'; +import { BaseNft, Nft, NftContract } from '../api/nft'; +import { GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftResponse, NftAttributeRarity, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, NftTokenType, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult } from '../types/types'; +export declare function getNftMetadata(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, tokenType?: NftTokenType, tokenUriTimeoutInMs?: number, srcMethod?: string): Promise; +export declare function getNftMetadataBatch(config: AlchemyConfig, tokens: Array, options?: NftMetadataBatchOptions): Promise; +export declare function getContractMetadata(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function getNftsForOwnerIterator(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): AsyncIterable; +export declare function getNftsForOwner(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): Promise; +export declare function getNftsForContract(config: AlchemyConfig, contractAddress: string, options?: GetBaseNftsForContractOptions | GetNftsForContractOptions, srcMethod?: string): Promise; +export declare function getNftsForContractIterator(config: AlchemyConfig, contractAddress: string, options?: GetBaseNftsForContractOptions | GetNftsForContractOptions, srcMethod?: string): AsyncIterable; +export declare function getOwnersForContract(config: AlchemyConfig, contractAddress: string, options?: GetOwnersForContractWithTokenBalancesOptions | GetOwnersForContractOptions, srcMethod?: string): Promise; +export declare function getContractsForOwner(config: AlchemyConfig, owner: string, options?: GetContractsForOwnerOptions, srcMethod?: string): Promise; +export declare function getOwnersForNft(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, srcMethod?: string): Promise; +export declare function checkNftOwnership(config: AlchemyConfig, owner: string, contractAddresses: string[], srcMethod?: string): Promise; +export declare function verifyNftOwnership(config: AlchemyConfig, owner: string, contractAddresses: string | string[], srcMethod?: string): Promise; +export declare function isSpamContract(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function getSpamContracts(config: AlchemyConfig, srcMethod?: string): Promise; +export declare function getFloorPrice(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function getNftSales(config: AlchemyConfig, options?: GetNftSalesOptions | GetNftSalesOptionsByContractAddress, srcMethod?: string): Promise; +export declare function computeRarity(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, srcMethod?: string): Promise; +export declare function searchContractMetadata(config: AlchemyConfig, query: string, srcMethod?: string): Promise; +export declare function summarizeNftAttributes(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function refreshNftMetadata(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, srcMethod?: string): Promise; +export declare function refreshContract(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/internal/raw-interfaces.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/internal/raw-interfaces.d.ts new file mode 100644 index 0000000..0b85271 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/internal/raw-interfaces.d.ts @@ -0,0 +1,113 @@ +import { Media, NftSaleFeeData, NftSpamClassification } from '../types/types'; +export interface RawSpamInfo { + isSpam: string; + /** A list of reasons why an NFT contract was marked as spam. */ + classifications: NftSpamClassification[]; +} +/** OpenSea's metadata for an NFT collection. */ +export interface RawOpenSeaCollectionMetadata { + floorPrice?: number; + collectionName?: string; + safelistRequestStatus?: string; + imageUrl?: string; + description?: string; + externalUrl?: string; + twitterUsername?: string; + discordUrl?: string; + lastIngestedAt?: string; +} +export interface RawGetOwnersForContractWithTokenBalancesResponse { + ownerAddresses: RawOwnerAddress[]; + pageKey?: string; +} +export interface RawOwnerAddress { + ownerAddress: string; + tokenBalances: RawTokenBalances[]; +} +export interface RawTokenBalances { + tokenId: string; + balance: number; +} +export interface RawReingestContractResponse { + contractAddress: string; + reingestionState: string; + progress: string | null; +} +export interface RawWebhook { + id: string; + network: string; + webhook_type: string; + webhook_url: string; + is_active: boolean; + time_created: number; + signing_key: string; + version: string; + app_id?: string; +} +export interface RawWebhookPagination { + cursors: { + after?: string; + }; + total_count: number; +} +export interface RawGetAllWebhooksResponse { + data: RawWebhook[]; +} +export interface RawAddressActivityResponse { + data: string[]; + pagination: RawWebhookPagination; +} +export interface RawNftFilter { + contract_address: string; + token_id: string; +} +export interface RawNftFiltersResponse { + data: RawNftFilter[]; + pagination: RawWebhookPagination; +} +export interface RawCreateWebhookResponse { + data: RawWebhook; +} +export interface RawNftFilterParam { + contract_address: string; + token_id: string; +} +export interface RawNftAttributeRarity { + value: string; + trait_type: string; + prevalence: number; +} +export interface RawGetNftSalesResponse { + pageKey?: string; + nftSales: RawNftSale[]; +} +export interface RawNftSale { + marketplace: string; + contractAddress: string; + tokenId: string; + quantity: string; + buyerAddress: string; + sellerAddress: string; + taker: string; + sellerFee: NftSaleFeeData; + marketplaceFee?: NftSaleFeeData; + royaltyFee?: NftSaleFeeData; + blockNumber: number; + logIndex: number; + bundleIndex: number; + transactionHash: string; +} +export interface RawGetContractsForOwnerResponse { + contracts: RawContractForOwner[]; + pageKey?: string; + totalCount: number; +} +export interface RawContractForOwner extends Omit { + address: string; + totalBalance: number; + numDistinctTokensOwned: number; + isSpam: boolean; + tokenId: string; + media: Media; + opensea?: RawOpenSeaCollectionMetadata; +} diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/internal/request-batcher.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/internal/request-batcher.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/internal/request-batcher.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/internal/websocket-backfiller.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/internal/websocket-backfiller.d.ts new file mode 100644 index 0000000..63730de --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/internal/websocket-backfiller.d.ts @@ -0,0 +1,53 @@ +export interface BatchPart { + method: string; + params?: any; +} +export interface NewHeadsEvent { + author: string; + difficulty: string; + extraData: string; + gasLimit: string; + gasUsed: string; + hash: string; + logsBloom: string; + miner: string; + mixHash: string; + nonce: string; + number: string; + parentHash: string; + receiptsRoot: string; + sealFields: string[]; + sha3Uncles: string; + size: string; + stateRoot: string; + timestamp: string; + transactionsRoot: string; +} +/** The return type of eth_getBlocksByHash. */ +export interface BlockHead extends NewHeadsEvent { + totalDifficulty: string; + transactions: any[]; + uncles: string[]; +} +export interface LogsEvent { + address: string; + blockHash: string; + blockNumber: string; + data: string; + logIndex: string; + topics: string[]; + transactionHash: string; + transactionIndex: string; + removed?: boolean; +} +export interface LogsSubscriptionFilter { + address?: string | string[]; + topics?: Array; +} +export interface GetLogsOptions extends LogsSubscriptionFilter { + fromBlock?: string; + toBlock?: string; +} +export declare function dedupeNewHeads(events: NewHeadsEvent[]): NewHeadsEvent[]; +export declare function dedupeLogs(events: LogsEvent[]): LogsEvent[]; +export declare function throwIfCancelled(isCancelled: () => boolean): void; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/types/types.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/types/types.d.ts new file mode 100644 index 0000000..ed47247 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/types/types.d.ts @@ -0,0 +1,1523 @@ +import { EventType, TransactionReceipt } from '@ethersproject/abstract-provider'; +import { BigNumberish } from '@ethersproject/bignumber'; +import { BaseNft, Nft, NftContract } from '../api/nft'; +/** + * Options object used to configure the Alchemy SDK. + * + * @public + */ +export interface AlchemySettings { + /** + * The Alchemy API key that can be found in the Alchemy dashboard. + * + * Defaults to: "demo" (a rate-limited public API key) + */ + apiKey?: string; + /** + * The name of the network. Once configured, the network cannot be changed. To + * use a different network, instantiate a new `Alchemy` instance. + * + * Defaults to: Network.ETH_MAINNET + */ + network?: Network; + /** The maximum number of retries to attempt if a request fails. Defaults to 5. */ + maxRetries?: number; + /** + * Optional URL endpoint to use for all requests. Setting this field will + * override the URL generated by the {@link network} and {@link apiKey} fields. + * + * This field is useful for testing or for using a custom node endpoint. Note + * that not all methods will work with custom URLs. + */ + url?: string; + /** + * Alchemy auth token required to use the Notify API. This token can be found + * in the Alchemy Dashboard on the Notify tab. + */ + authToken?: string; + /** + * Optional setting that automatically batches and sends json-rpc requests for + * higher throughput and reduced network IO. Defaults to false. + * + * This implementation is based on the `JsonRpcBatchProvider` in ethers. + */ + batchRequests?: boolean; +} +/** + * The supported networks by Alchemy. Note that some functions are not available + * on all networks. Please refer to the Alchemy documentation for which APIs are + * available on which networks + * {@link https://docs.alchemy.com/alchemy/apis/feature-support-by-chain} + * + * @public + */ +export declare enum Network { + ETH_MAINNET = "eth-mainnet", + /** @deprecated - Will be removed in subsequent versions */ + ETH_ROPSTEN = "eth-ropsten", + ETH_GOERLI = "eth-goerli", + /** @deprecated - Will be removed in subsequent versions */ + ETH_KOVAN = "eth-kovan", + /** @deprecated - Will be removed in subsequent versions */ + ETH_RINKEBY = "eth-rinkeby", + OPT_MAINNET = "opt-mainnet", + /** @deprecated - Will be removed in subsequent versions */ + OPT_KOVAN = "opt-kovan", + OPT_GOERLI = "opt-goerli", + ARB_MAINNET = "arb-mainnet", + /** @deprecated - Will be removed in subsequent versions */ + ARB_RINKEBY = "arb-rinkeby", + ARB_GOERLI = "arb-goerli", + MATIC_MAINNET = "polygon-mainnet", + MATIC_MUMBAI = "polygon-mumbai", + ASTAR_MAINNET = "astar-mainnet" +} +/** Token Types for the `getTokenBalances()` endpoint. */ +export declare enum TokenBalanceType { + /** + * Option to fetch the top 100 tokens by 24-hour volume. This option is only + * available on Mainnet in Ethereum, Polygon, and Arbitrum. + */ + DEFAULT_TOKENS = "DEFAULT_TOKENS", + /** + * Option to fetch the set of ERC-20 tokens that the address as ever held. his + * list is produced by an address's historical transfer activity and includes + * all tokens that the address has ever received. + */ + ERC20 = "erc20" +} +/** + * Optional params to pass into `getTokenBalances()` to fetch all ERC-20 tokens + * instead of passing in an array of contract addresses to fetch balances for. + */ +export interface TokenBalancesOptionsErc20 { + /** The ERC-20 token type. */ + type: TokenBalanceType.ERC20; + /** Optional page key for pagination (only applicable to TokenBalanceType.ERC20) */ + pageKey?: string; +} +/** + * Optional params to pass into `getTokenBalances()` to fetch the top 100 tokens + * instead of passing in an array of contract addresses to fetch balances for. + */ +export interface TokenBalancesOptionsDefaultTokens { + /** The top 100 token type. */ + type: TokenBalanceType.DEFAULT_TOKENS; +} +/** + * Response object for when the {@link TokenBalancesOptionsErc20} options are + * used. A page key may be returned if the provided address has many transfers. + */ +export interface TokenBalancesResponseErc20 extends TokenBalancesResponse { + /** + * An optional page key to passed into the next request to fetch the next page + * of token balances. + */ + pageKey?: string; +} +/** @public */ +export interface TokenBalancesResponse { + address: string; + tokenBalances: TokenBalance[]; +} +/** @public */ +export declare type TokenBalance = TokenBalanceSuccess | TokenBalanceFailure; +/** @public */ +export interface TokenBalanceSuccess { + contractAddress: string; + tokenBalance: string; + error: null; +} +/** @public */ +export interface TokenBalanceFailure { + contractAddress: string; + tokenBalance: null; + error: string; +} +/** + * Response object for the {@link CoreNamespace.getTokenMetadata} method. + * + * @public + */ +export interface TokenMetadataResponse { + /** + * The token's name. Is `null` if the name is not defined in the contract and + * not available from other sources. + */ + name: string | null; + /** + * The token's symbol. Is `null` if the symbol is not defined in the contract + * and not available from other sources. + */ + symbol: string | null; + /** + * The number of decimals of the token. Returns `null` if not defined in the + * contract and not available from other sources. + */ + decimals: number | null; + /** URL link to the token's logo. Is `null` if the logo is not available. */ + logo: string | null; +} +/** + * Parameters for the {@link CoreNamespace.getAssetTransfers} method. + * + * @public + */ +export interface AssetTransfersParams { + /** + * The starting block to check for transfers. This value is inclusive and + * defaults to `0x0` if omitted. + */ + fromBlock?: string; + /** + * The ending block to check for transfers. This value is inclusive and + * defaults to the latest block if omitted. + */ + toBlock?: string; + /** + * Whether to return results in ascending or descending order by block number. + * Defaults to ascending if omitted. + */ + order?: SortingOrder; + /** + * The from address to filter transfers by. This value defaults to a wildcard + * for all addresses if omitted. + */ + fromAddress?: string; + /** + * The to address to filter transfers by. This value defaults to a wildcard + * for all address if omitted. + */ + toAddress?: string; + /** + * List of contract addresses to filter for - only applies to "erc20", + * "erc721", "erc1155" transfers. Defaults to all address if omitted. + */ + contractAddresses?: string[]; + /** + * Whether to exclude transfers with zero value. Note that zero value is + * different than null value. Defaults to `false` if omitted. + */ + excludeZeroValue?: boolean; + /** REQUIRED field. An array of categories to get transfers for. */ + category: AssetTransfersCategory[]; + /** The maximum number of results to return per page. Defaults to 1000 if omitted. */ + maxCount?: number; + /** + * Optional page key from an existing {@link OwnedBaseNftsResponse} + * {@link AssetTransfersResult}to use for pagination. + */ + pageKey?: string; + /** + * Whether to include additional metadata about each transfer event. Defaults + * to `false` if omitted. + */ + withMetadata?: boolean; +} +/** + * Parameters for the {@link CoreNamespace.getAssetTransfers} method that + * includes metadata. + * + * @public + */ +export interface AssetTransfersWithMetadataParams extends AssetTransfersParams { + withMetadata: true; +} +/** + * Categories of transfers to use with the {@link AssetTransfersParams} request + * object when using {@link CoreNamespace.getAssetTransfers}. + * + * @public + */ +export declare enum AssetTransfersCategory { + /** + * Top level ETH transactions that occur where the `fromAddress` is an + * external user-created address. External addresses have private keys and are + * accessed by users. + */ + EXTERNAL = "external", + /** + * Top level ETH transactions that occur where the `fromAddress` is an + * internal, smart contract address. For example, a smart contract calling + * another smart contract or sending + */ + INTERNAL = "internal", + /** ERC20 transfers. */ + ERC20 = "erc20", + /** ERC721 transfers. */ + ERC721 = "erc721", + /** ERC1155 transfers. */ + ERC1155 = "erc1155", + /** Special contracts that don't follow ERC 721/1155, (ex: CryptoKitties). */ + SPECIALNFT = "specialnft" +} +/** + * Enum for the order of the {@link AssetTransfersParams} request object when + * using {@link CoreNamespace.getAssetTransfers}. + * + * @deprecated Use {@link SortingOrder} instead. This enum will be removed in a + * future version. + * @public + */ +export declare enum AssetTransfersOrder { + ASCENDING = "asc", + DESCENDING = "desc" +} +/** + * An enum for specifying the token type on NFTs. + * + * @public + */ +export declare enum NftTokenType { + ERC721 = "ERC721", + ERC1155 = "ERC1155", + UNKNOWN = "UNKNOWN" +} +/** + * Response object for the {@link CoreNamespace.getAssetTransfers} method. + * + * @public + */ +export interface AssetTransfersResponse { + transfers: AssetTransfersResult[]; + /** Page key for the next page of results, if one exists. */ + pageKey?: string; +} +/** + * Response object for the {@link CoreNamespace.getAssetTransfers} method when + * the {@link AssetTransfersWithMetadataParams} are used. + * + * @public + */ +export interface AssetTransfersWithMetadataResponse { + transfers: AssetTransfersWithMetadataResult[]; + pageKey?: string; +} +/** + * Represents a transfer event that is returned in a {@link AssetTransfersResponse}. + * + * @public + */ +export interface AssetTransfersResult { + /** The unique ID of the transfer. */ + uniqueId: string; + /** The category of the transfer. */ + category: AssetTransfersCategory; + /** The block number where the transfer occurred. */ + blockNum: string; + /** The from address of the transfer. */ + from: string; + /** The to address of the transfer. */ + to: string | null; + /** + * Converted asset transfer value as a number (raw value divided by contract + * decimal). `null` if ERC721 transfer or contract decimal not available. + */ + value: number | null; + /** + * The raw ERC721 token id of the transfer as a hex string. `null` if not an + * ERC721 transfer. + */ + erc721TokenId: string | null; + /** + * A list of ERC1155 metadata objects if the asset transferred is an ERC1155 + * token. `null` if not an ERC1155 transfer. + */ + erc1155Metadata: ERC1155Metadata[] | null; + /** The token id of the token transferred. */ + tokenId: string | null; + /** + * Returns the token's symbol or ETH for other transfers. `null` if the + * information was not available. + */ + asset: string | null; + /** The transaction hash of the transfer transaction. */ + hash: string; + /** Information about the raw contract of the asset transferred. */ + rawContract: RawContract; +} +/** + * Represents a transfer event that is returned in a + * {@link AssetTransfersResponse} when {@link AssetTransfersWithMetadataParams} are used. + * + * @public + */ +export interface AssetTransfersWithMetadataResult extends AssetTransfersResult { + /** Additional metadata about the transfer event. */ + metadata: AssetTransfersMetadata; +} +/** + * The metadata object for a {@link AssetTransfersResult} when the + * {@link AssetTransfersParams.withMetadata} field is set to true. + * + * @public + */ +export interface AssetTransfersMetadata { + /** Timestamp of the block from which the transaction event originated. */ + blockTimestamp: string; +} +/** + * Represents NFT metadata that holds fields. Note that since there is no + * standard metadata format, the fields are not guaranteed to be present. + * + * @public + */ +export interface NftMetadata extends Record { + /** Name of the NFT asset. */ + name?: string; + /** A human-readable description of the NFT asset. */ + description?: string; + /** URL to the NFT asset image. */ + image?: string; + /** + * The image URL that appears along the top of the NFT asset page. This tends + * to be the highest resolution image. + */ + external_url?: string; + /** Background color of the NFT item. Usually defined as a 6 character hex string. */ + background_color?: string; + /** The traits, attributes, and characteristics for the NFT asset. */ + attributes?: Array>; +} +/** + * Represents the URI information the NFT's metadata. + * + * @public + */ +export interface TokenUri { + /** + * URI for the location of the NFT's original metadata blob (ex: the original + * IPFS link). + */ + raw: string; + /** Public gateway URI for the raw URI. Generally offers better performance. */ + gateway: string; +} +/** + * Represents the URI information for the NFT's media assets. + * + * @public + */ +export interface Media { + /** + * URI for the location of the NFT's original metadata blob for media (ex: the + * original IPFS link). + */ + raw: string; + /** Public gateway URI for the raw URI. Generally offers better performance. */ + gateway: string; + /** URL for a resized thumbnail of the NFT media asset. */ + thumbnail?: string; + /** + * The media format (ex: jpg, gif, png) of the {@link gateway} and + * {@link thumbnail} assets. + */ + format?: string; + /** + * DEPRECATED - The size of the media asset in bytes + * + * @deprecated - Please use {@link bytes} instead. This field will be removed + * in a subsequent release. + */ + size?: number; + /** The size of the media asset in bytes. */ + bytes?: number; +} +/** Potential reasons why an NFT contract was classified as spam. */ +export declare enum NftSpamClassification { + Erc721TooManyOwners = "Erc721TooManyOwners", + Erc721TooManyTokens = "Erc721TooManyTokens", + Erc721DishonestTotalSupply = "Erc721DishonestTotalSupply", + MostlyHoneyPotOwners = "MostlyHoneyPotOwners", + OwnedByMostHoneyPots = "OwnedByMostHoneyPots" +} +/** Detailed information on whether and why an NFT contract was classified as spam. */ +export interface SpamInfo { + isSpam: boolean; + /** A list of reasons why an NFT contract was marked as spam. */ + classifications: NftSpamClassification[]; +} +/** + * Optional parameters object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. + * + * This interface is used to fetch NFTs with their associated metadata. To get + * Nfts without their associated metadata, use {@link GetBaseNftsForOwnerOptions}. + * + * @public + */ +export interface GetNftsForOwnerOptions { + /** + * Optional page key from an existing {@link OwnedBaseNftsResponse} or + * {@link OwnedNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional list of contract addresses to filter the results by. Limit is 20. */ + contractAddresses?: string[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are excluded from the response. + */ + excludeFilters?: NftFilters[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are included in the response. + */ + includeFilters?: NftFilters[]; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; + /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */ + omitMetadata?: boolean; + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; + /** + * Order in which to return results. By default, results are ordered by + * contract address and token ID in lexicographic order. + */ + orderBy?: NftOrdering; +} +/** + * Optional parameters object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. + * + * This interface is used to fetch NFTs without their associated metadata. To + * get Nfts with their associated metadata, use {@link GetNftsForOwnerOptions}. + * + * @public + */ +export interface GetBaseNftsForOwnerOptions { + /** + * Optional page key from an existing {@link OwnedBaseNftsResponse} or + * {@link OwnedNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional list of contract addresses to filter the results by. Limit is 20. */ + contractAddresses?: string[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are excluded from the response. + */ + excludeFilters?: NftFilters[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are included in the response. + */ + includeFilters?: NftFilters[]; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; + /** Optional boolean flag to include NFT metadata. Defaults to `false`. */ + omitMetadata: true; + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; + /** + * Order in which to return results. By default, results are ordered by + * contract address and token ID in lexicographic order. + */ + orderBy?: NftOrdering; +} +/** + * Enum of NFT filters that can be applied to a {@link getNftsForOwner} request. + * NFTs that match one or more of these filters are excluded from the response. + * + * - @deprecated Use {@link NftFilters} instead. This enum will be removed in a + * future version. + * + * @beta + */ +export declare enum NftExcludeFilters { + /** Exclude NFTs that have been classified as spam. */ + SPAM = "SPAM", + /** Exclude NFTs that have been airdropped to a user. */ + AIRDROPS = "AIRDROPS" +} +/** + * Enum of NFT filters that can be applied to a {@link getNftsForOwner} or a + * {@link getContractsForOwner} request. + * + * @beta + */ +export declare enum NftFilters { + /** NFTs that have been classified as spam. */ + SPAM = "SPAM", + /** NFTs that have been airdropped to a user. */ + AIRDROPS = "AIRDROPS" +} +/** + * Enum of ordering that can be applied to a {@link getNftsForOwner} or a + * {@link getContractsForOwner} response. + * + * @beta + */ +export declare enum NftOrdering { + TRANSFERTIME = "TRANSFERTIME" +} +/** + * The response object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. The object contains the NFTs with + * metadata owned by the provided address, along with pagination information and + * the total count. + * + * @public + */ +export interface OwnedNftsResponse { + /** The NFTs owned by the provided address. */ + readonly ownedNfts: OwnedNft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + readonly pageKey?: string; + /** The total count of NFTs owned by the provided address. */ + readonly totalCount: number; +} +/** + * The response object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. The object contains the NFTs + * without metadata owned by the provided address, along with pagination + * information and the total count. + * + * @public + */ +export interface OwnedBaseNftsResponse { + /** The NFTs owned by the provided address. */ + readonly ownedNfts: OwnedBaseNft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + readonly pageKey?: string; + /** The total count of NFTs owned by the provided address. */ + readonly totalCount: number; +} +/** + * Represents an NFT with metadata owned by an address. + * + * @public + */ +export interface OwnedNft extends Nft { + /** The token balance of the NFT. */ + readonly balance: number; +} +/** + * Represents an NFT without metadata owned by an address. + * + * @public + */ +export interface OwnedBaseNft extends BaseNft { + /** The token balance of the NFT. */ + readonly balance: number; +} +/** + * The response object for the {@link getOwnersForNft}. + * + * @public + */ +export interface GetOwnersForNftResponse { + /** An array of owner addresses for the provided token. */ + readonly owners: string[]; +} +/** + * The response object for the {@link getOwnersForContract}. + * + * @public + */ +export interface GetOwnersForContractResponse { + /** An array of owner addresses for the provided contract address */ + owners: string[]; +} +/** + * The response object for the {@link getOwnersForContract}. + * + * @public + */ +export interface GetOwnersForContractWithTokenBalancesResponse { + /** An array of owner addresses for the provided contract address */ + owners: NftContractOwner[]; + /** Optional page key that is returned when a collection has more than 50,000 owners. */ + pageKey?: string; +} +/** + * An object representing the owner of an NFT and its corresponding token + * balances in a {@link GetOwnersForContractWithTokenBalancesResponse} object. + */ +export interface NftContractOwner { + /** The NFT's owner address. */ + ownerAddress: string; + /** A list of objects containing token balances for the provided NFT contract. */ + tokenBalances: NftContractTokenBalance[]; +} +/** + * An object representing the owned token and balance values in a + * {@link GetOwnersForContractWithTokenBalancesResponse} object. + */ +export interface NftContractTokenBalance { + /** The token id owned in the NFT contract. */ + tokenId: string; + /** The token Id balance for the provided owner. */ + balance: number; +} +/** + * Represents an NFT token to fetch metadata for in a + * {@link NftNamespace.getNftMetadataBatch} method. + */ +export interface NftMetadataBatchToken { + /** The NFT contract address. Limited to ERC721 and ERC1155 tokens. */ + contractAddress: string; + /** The id of the NFT. */ + tokenId: BigNumberish; + /** Optional field to specify the type of token to speed up the query. */ + tokenType?: NftTokenType.ERC1155 | NftTokenType.ERC721; +} +/** Additional options for the {@link NftNamespace.getNftMetadataBatch} method. */ +export interface NftMetadataBatchOptions { + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; + /** + * Whether to refresh the metadata for the given NFT token before returning + * the response. Defaults to false for faster response times. + */ + refreshCache?: boolean; +} +/** + * The successful object returned by the {@link getFloorPrice} call for each + * marketplace (e.g. looksRare). + * + * @public + */ +export interface FloorPriceMarketplace { + /** The floor price of the collection on the given marketplace */ + readonly floorPrice: number; + /** The currency in which the floor price is denominated */ + readonly priceCurrency: string; + /** The link to the collection on the given marketplace */ + readonly collectionUrl: string; + /** UTC timestamp of when the floor price was retrieved from the marketplace */ + readonly retrievedAt: string; +} +/** + * The failing object returned by the {@link getFloorPrice} call for each + * marketplace (e.g. looksRare). + * + * @public + */ +export interface FloorPriceError { + /** Error fetching floor prices from the given marketplace */ + readonly error: string; +} +/** + * The response object for the {@link getFloorPrice} method. + * + * @public + */ +export interface GetFloorPriceResponse { + /** + * Name of the NFT marketplace where the collection is listed. Current + * marketplaces supported: OpenSea, LooksRare + */ + readonly openSea: FloorPriceMarketplace | FloorPriceError; + readonly looksRare: FloorPriceMarketplace | FloorPriceError; +} +/** + * Optional parameters object for the the {@link getContractsForOwner} method + * + * @public + */ +export interface GetContractsForOwnerOptions { + /** Key for pagination to use to fetch results from the next page if available. */ + pageKey?: string; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are included in the response. May not be used in + * conjunction with {@link excludeFilters}. + */ + includeFilters?: NftFilters[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are excluded from the response. May not be used in + * conjunction with {@link includeFilters} + */ + excludeFilters?: NftFilters[]; + /** + * Order in which to return results. By default, results are ordered by + * contract address and token ID in lexicographic order. + */ + orderBy?: NftOrdering; +} +/** + * The response for the {@link NftNamespace.getContractsForOwner} method. + * + * @public + */ +export interface GetContractsForOwnerResponse { + /** The list of contracts, that match the query, held by the given address. */ + contracts: ContractForOwner[]; + /** Key for pagination to use to fetch results from the next page if available. */ + pageKey?: string; + /** Total number of NFT contracts held by the given address. */ + totalCount: number; +} +/** Represents a single NFT contract data in the {@link GetContractsForOwnerResponse}. */ +export interface ContractForOwner extends NftContract { + /** + * Sum of NFT balances across all token IDs held by the owner. For + * non-fungible tokens this will be equal to the numDistinctTokensOwned, but + * it may be higher if the user holds some fungible ERC1155 tokens. + */ + totalBalance: number; + /** + * Number of distinct token IDs held by the owner. For non-fungible tokens + * this will be equal to the totalBalance, but it may be lower if the user + * holds some fungible ERC1155 tokens. + */ + numDistinctTokensOwned: number; + isSpam: boolean; + /** One of the tokens from this contract held by the owner. */ + tokenId: string; + /** Alternative NFT metadata for this contract to be parsed manually. */ + media: Media; +} +/** + * Optional parameters object for the {@link getNftSales} endpoint. + * + * This interface is used to filter the NFT sales data. + * + * @public + */ +export interface GetNftSalesOptions { + /** The block number to start fetching NFT sales data from. */ + fromBlock?: number | 'latest'; + /** The block number limit to fetch NFT sales data from. */ + toBlock?: number | 'latest'; + /** Whether to return the results in ascending or descending order by block number. */ + order?: SortingOrder; + /** The NFT marketplace to filter sales by. */ + marketplace?: NftSaleMarketplace; + /** The address of the NFT buyer to filter sales by. */ + buyerAddress?: string; + /** The address of the NFT seller to filter sales by. */ + sellerAddress?: string; + /** + * Filter by whether the buyer or seller was the taker in the NFT trade. + * Defaults to returning both buyer and seller taker trades. + */ + taker?: NftSaleTakerType; + /** The maximum number of NFT sales to return. */ + limit?: number; + /** Key for pagination to use to fetch results from the next page if available. */ + pageKey?: string; +} +/** + * Alternative optional parameters object for the {@link getNftSales} endpoint + * that allows filtering results by contractAddress. + * + * This interface is used to filter the NFT sales data. + * + * @public + */ +export interface GetNftSalesOptionsByContractAddress extends GetNftSalesOptions { + /** The contract address of a NFT collection to filter sales by. */ + contractAddress: string; + /** The token ID of an NFT within the specified contractAddress to filter sales by. */ + tokenId?: BigNumberish; +} +/** + * The response for the {@link NftNamespace.getNftSales} method. + * + * @public + */ +export interface GetNftSalesResponse { + /** The page key to use to fetch the next page if more results are available. */ + pageKey?: string; + /** List of NFT sales that match the query */ + nftSales: NftSale[]; +} +/** Represents a single NFT sale data in the {@link GetNftSalesResponse}. */ +export interface NftSale { + /** The marketplace the sale took place on. */ + marketplace: NftSaleMarketplace; + /** The NFT contract address. */ + contractAddress: string; + /** The decimal token ID of the NFT being sold. */ + tokenId: string; + /** The number of tokens sold in the sale as a decimal integer string. */ + quantity: string; + /** The address of the buyer in the NFT sale. */ + buyerAddress: string; + /** The address of the seller in the NFT sale. */ + sellerAddress: string; + /** Whether the price taker in the trade was the buyer or the seller. */ + taker: NftSaleTakerType; + /** The payment from buyer to the seller. */ + sellerFee: NftSaleFeeData; + /** The payment from buyer to the marketplace. */ + marketplaceFee?: NftSaleFeeData; + /** The payment from buyer to the royalty address of the NFT collection. */ + royaltyFee?: NftSaleFeeData; + /** The block number the NFT sale took place in. */ + blockNumber: number; + /** The log number of the sale event emitted within the block. */ + logIndex: number; + /** The index of the token within the bundle of NFTs sold in the sale. */ + bundleIndex: number; + /** The transactionHash of the NFT sale. */ + transactionHash: string; +} +/** + * Fee detail for an NFT sale. + * + * @public + */ +export interface NftSaleFeeData { + /** The fee payment amount as a decimal integer string. */ + amount: string; + /** The symbol of the token used for the payment. */ + symbol: string; + /** The number of decimals of the token used for the payment. */ + decimal: number; +} +/** + * Enum for representing the supported sorting orders of the API. + * + * @public + */ +export declare enum SortingOrder { + ASCENDING = "asc", + DESCENDING = "desc" +} +/** + * Enum representing the supported NFT marketplaces by the {@link getNftSales} endpoint. + * + * @public + */ +export declare enum NftSaleMarketplace { + SEAPORT = "seaport", + LOOKSRARE = "looksrare", + X2Y2 = "x2y2", + UNKNOWN = "unknown" +} +/** + * Enum for specifing the taker type for the {@link getNftSales} endpoint. + * + * @public + */ +export declare enum NftSaleTakerType { + BUYER = "buyer", + SELLER = "seller" +} +/** + * Information about the rarity of an NFT's attribute in the specified collection. + * + * @public + */ +export interface NftAttributeRarity { + /** Name of the NFT's attribute. */ + value: string; + /** The type of NFT attribute. */ + traitType: string; + /** + * A number from 0 to 1 representing the prevalence of this value for this + * trait type in the current collection. + */ + prevalence: number; +} +/** + * Summary of the attribute prevalence for the specified NFT contract. + * + * @public + */ +export interface NftAttributesResponse { + /** The specified NFT contract's address. */ + contractAddress: string; + /** The specified NFT contract's total supply. */ + totalSupply: number; + /** + * The attribute prevalence of each trait grouped by the trait type for the + * provided NFT. + */ + summary: Record>; +} +/** The refresh result response object returned by {@link refreshContract}. */ +export interface RefreshContractResult { + /** The NFT contract address that was passed in to be refreshed. */ + contractAddress: string; + /** The current state of the refresh request. */ + refreshState: RefreshState; + /** + * Percentage of tokens currently refreshed, represented as an integer string. + * Field can be null if the refresh has not occurred. + */ + progress: string | null; +} +/** The current state of the NFT contract refresh process. */ +export declare enum RefreshState { + /** The provided contract is not an NFT or does not contain metadata. */ + DOES_NOT_EXIST = "does_not_exist", + /** The contract has already been queued for refresh. */ + ALREADY_QUEUED = "already_queued", + /** The contract is currently being refreshed. */ + IN_PROGRESS = "in_progress", + /** The contract refresh is complete. */ + FINISHED = "finished", + /** The contract refresh has been queued and await execution. */ + QUEUED = "queued", + /** The contract was unable to be queued due to an internal error. */ + QUEUE_FAILED = "queue_failed" +} +/** + * The parameter field of {@link TransactionReceiptsParams}. + * + * @public + */ +export interface TransactionReceiptsBlockNumber { + /** The block number to get transaction receipts for. */ + blockNumber: string; +} +/** + * The parameter field of {@link TransactionReceiptsParams}. + * + * @public + */ +export interface TransactionReceiptsBlockHash { + /** The block hash to get transaction receipts for. */ + blockHash: string; +} +/** + * The parameters to use with the {@link CoreNamespace.getTransactionReceipts} method. + * + * @public + */ +export declare type TransactionReceiptsParams = TransactionReceiptsBlockNumber | TransactionReceiptsBlockHash; +/** + * Response object for a {@link CoreNamespace.getTransactionReceipts} call. + * + * @public + */ +export interface TransactionReceiptsResponse { + /** A list of transaction receipts for the queried block. */ + receipts: TransactionReceipt[] | null; +} +/** + * Metadata object returned in a {@link AssetTransfersResult} object if the asset + * transferred is an ERC1155. + * + * @public + */ +export interface ERC1155Metadata { + tokenId: string; + value: string; +} +/** + * Information about the underlying contract for the asset that was transferred + * in a {@link AssetTransfersResult} object. + * + * @public + */ +export interface RawContract { + /** + * The raw transfer value as a hex string. `null` if the transfer was for an + * ERC721 or ERC1155 token. + */ + value: string | null; + /** The contract address. `null` if it was an internal or external transfer. */ + address: string | null; + /** + * The number of decimals in the contract as a hex string. `null` if the value + * is not in the contract and not available from other sources. + */ + decimal: string | null; +} +/** + * Optional parameters object for the {@link getNftsForContract} and + * {@link getNftsForContractIterator} functions. + * + * This interface is used to fetch NFTs with their associated metadata. To get + * Nfts without their associated metadata, use {@link GetBaseNftsForContractOptions}. + * + * @public + */ +export interface GetNftsForContractOptions { + /** + * Optional page key from an existing {@link NftContractBaseNftsResponse} or + * {@link NftContractNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */ + omitMetadata?: boolean; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; +} +/** + * Optional parameters object for the {@link getNftsForContract} and + * {@link getNftsForContractIterator} functions. + * + * This interface is used to fetch NFTs without their associated metadata. To + * get Nfts with their associated metadata, use {@link GetNftsForContractOptions}. + * + * @public + */ +export interface GetBaseNftsForContractOptions { + /** + * Optional page key from an existing {@link NftContractBaseNftsResponse} or + * {@link NftContractNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */ + omitMetadata: false; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; +} +/** + * Optional parameters object for the {@link getNftsForContract} method. + * + * This interface configures options when fetching the owner addresses of the + * provided contract. + * + * @public + */ +export interface GetOwnersForContractOptions { + /** + * Whether to include the token balances per token id for each owner. Defaults + * to false when omitted. + */ + withTokenBalances?: boolean; + /** The block number in hex or decimal to fetch owners for. */ + block?: string; + /** Optional page key to paginate the next page for large requests. */ + pageKey?: string; +} +/** + * Optional parameters object for the {@link getNftsForContract} method. + * + * This interface configures options when fetching the owner addresses of the + * provided contract. + * + * @public + */ +export interface GetOwnersForContractWithTokenBalancesOptions { + /** + * Whether to include the token balances per token id for each owner. Defaults + * to false when omitted. + */ + withTokenBalances: true; + /** The block number in hex or decimal to fetch owners for. */ + block?: string; + /** Optional page key to paginate the next page for large requests. */ + pageKey?: string; +} +/** + * The response object for the {@link getNftsForContract} function. The object + * contains the NFTs without metadata inside the NFT contract. + * + * @public + */ +export interface NftContractBaseNftsResponse { + /** An array of NFTs without metadata. */ + nfts: BaseNft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + pageKey?: string; +} +/** + * The response object for the {@link getNftsForContract} function. The object + * contains the NFTs with metadata inside the NFT contract. + * + * @public + */ +export interface NftContractNftsResponse { + /** An array of NFTs with metadata. */ + nfts: Nft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + pageKey?: string; +} +/** OpenSea's metadata for an NFT collection. */ +export interface OpenSeaCollectionMetadata { + /** The floor price of the NFT. */ + floorPrice?: number; + /** The name of the collection on OpenSea. */ + collectionName?: string; + /** The approval status of the collection on OpenSea. */ + safelistRequestStatus?: OpenSeaSafelistRequestStatus; + /** The image URL determined by OpenSea. */ + imageUrl?: string; + /** The description of the collection on OpenSea. */ + description?: string; + /** The homepage of the collection as determined by OpenSea. */ + externalUrl?: string; + /** The Twitter handle of the collection. */ + twitterUsername?: string; + /** The Discord URL of the collection. */ + discordUrl?: string; + /** Timestamp of when the OpenSea metadata was last ingested by Alchemy. */ + lastIngestedAt?: string; +} +/** An OpenSea collection's approval status. */ +export declare enum OpenSeaSafelistRequestStatus { + /** Verified collection. */ + VERIFIED = "verified", + /** Collections that are approved on open sea and can be found in search results. */ + APPROVED = "approved", + /** Collections that requested safelisting on OpenSea. */ + REQUESTED = "requested", + /** Brand new collections. */ + NOT_REQUESTED = "not_requested" +} +/** + * The response object for the {@link findContractDeployer} function. + * + * @public + */ +export interface DeployResult { + /** The address of the contract deployer, if it is available. */ + readonly deployerAddress?: string; + /** The block number the contract was deployed in. */ + readonly blockNumber: number; +} +/** + * Method names for Alchemy's custom Subscription API endpoints. + * + * This value is provided in the `method` field when creating an event filter on + * the Websocket Namespace. + */ +export declare enum AlchemySubscription { + PENDING_TRANSACTIONS = "alchemy_pendingTransactions", + MINED_TRANSACTIONS = "alchemy_minedTransactions" +} +/** + * Event filter for the {@link AlchemyWebSocketProvider.on} and + * {@link AlchemyWebSocketProvider.once} methods to use Alchemy's custom + * `alchemy_pendingTransactions` endpoint. + * + * Returns the transaction information for all pending transactions that match a + * given filter. For full documentation, see: + * {@link https://docs.alchemy.com/reference/alchemy-pendingtransactions} + * + * Note that excluding all optional parameters will return transaction + * information for ALL pending transactions that are added to the mempool. + * + * @public + */ +export interface AlchemyPendingTransactionsEventFilter { + method: AlchemySubscription.PENDING_TRANSACTIONS; + /** Filter pending transactions sent FROM the provided address or array of addresses. */ + fromAddress?: string | string[]; + /** Filter pending transactions sent TO the provided address or array of addresses. */ + toAddress?: string | string[]; + /** + * Whether to only include transaction hashes and exclude the rest of the + * transaction response for a smaller payload. Defaults to false (by default, + * the entire transaction response is included). + * + * Note that setting only {@link hashesOnly} to true will return the same + * response as subscribing to `newPendingTransactions`. + */ + hashesOnly?: boolean; +} +/** + * Event filter for the {@link AlchemyWebSocketProvider.on} and + * {@link AlchemyWebSocketProvider.once} methods to use Alchemy's custom + * `alchemy_minedTransactions` endpoint. + * + * Returns the transaction information for all mined transactions that match the + * provided filter. For full documentation, see: + * {@link https://docs.alchemy.com/reference/alchemy-minedtransactions} + * + * Note that excluding all optional parameters will return transaction + * information for ALL mined transactions. + * + * @public + */ +export interface AlchemyMinedTransactionsEventFilter { + method: AlchemySubscription.MINED_TRANSACTIONS; + /** + * Address filters to subscribe to. Defaults to all transactions if omitted. + * Limit 100 address filters. Requires a non-empty array. + */ + addresses?: NonEmptyArray; + /** + * Whether to include transactions that were removed from the mempool. + * Defaults to false. + */ + includeRemoved?: boolean; + /** + * Whether to only include transaction hashes and exclude the rest of the + * transaction response for a smaller payload. Defaults to false (by default, + * the entire transaction response is included). + */ + hashesOnly?: boolean; +} +/** + * Address filters for {@link AlchemyMinedTransactionsEventFilter}. Requires at + * least one of the fields to be set. + */ +export declare type AlchemyMinedTransactionsAddress = RequireAtLeastOne<{ + to?: string; + from?: string; +}>; +/** + * Alchemy's event type that extends the default {@link EventType} interface to + * also include Alchemy's Subscription API. + * + * @public + */ +export declare type AlchemyEventType = EventType | AlchemyEventFilter; +/** + * This type represents the Alchemy's Subscription API endpoints as event + * filters compatible with other ethers events. + */ +export declare type AlchemyEventFilter = AlchemyMinedTransactionsEventFilter | AlchemyPendingTransactionsEventFilter; +/** Options for the {@link TransactNamespace.sendPrivateTransaction} method. */ +export interface SendPrivateTransactionOptions { + /** + * Whether to use fast-mode. Defaults to false. Please note that fast mode + * transactions cannot be cancelled using + * {@link TransactNamespace.cancelPrivateTransaction}. method. + * + * See {@link https://docs.flashbots.net/flashbots-protect/rpc/fast-mode} for + * more details. + */ + fast: boolean; +} +/** SDK representation of a Webhook in the Notify API. */ +export interface Webhook { + /** The webhook's unique id. */ + id: string; + /** The network the webhook is on. */ + network: Network; + /** The type of webhook. */ + type: WebhookType; + /** The url that the webhook sends its payload to. */ + url: string; + /** Whether the webhook is currently active */ + isActive: boolean; + /** The creation time of the webhook as an ISO string. */ + timeCreated: string; + /** The signing key used to verify payloads for the webhook. */ + signingKey: string; + /** The webhook version. All newly created webhooks default to V2. */ + version: WebhookVersion; + /** + * The app id of the app used for the webhook. This field is only present on + * {@link MinedTransactionWebhook} and {@link DroppedTransactionWebhook} + */ + appId?: string; +} +/** The version of the webhook. All newly created webhooks default to V2. */ +export declare enum WebhookVersion { + V1 = "V1", + V2 = "V2" +} +/** The type of {@link Webhook}. */ +export declare enum WebhookType { + MINED_TRANSACTION = "MINED_TRANSACTION", + DROPPED_TRANSACTION = "DROPPED_TRANSACTION", + ADDRESS_ACTIVITY = "ADDRESS_ACTIVITY", + NFT_ACTIVITY = "NFT_ACTIVITY" +} +/** + * A Mined Transaction Webhook is used to notify your app whenever a transaction + * sent through your API key gets successfully mined. This is useful if you want + * to notify customers that their transaction went through. + */ +export interface MinedTransactionWebhook extends Webhook { + type: WebhookType.MINED_TRANSACTION; +} +/** + * A Dropped Transaction webhook is used to notify your app whenever a + * transaction sent through your API key gets dropped. This can be useful if you + * want to notify customers that their transactions were dropped. + */ +export interface DroppedTransactionWebhook extends Webhook { + type: WebhookType.DROPPED_TRANSACTION; +} +/** + * An Address Activity Webhook tracks ETH, ERC20, ERC721, and ERC1155 transfers + * for the provided addresses. This can be used to notify your app with + * real-time state changes when your tracked addresses send or receive tokens. + */ +export interface AddressActivityWebhook extends Webhook { + type: WebhookType.ADDRESS_ACTIVITY; +} +/** + * The NFT Activity Webhook tracks all ERC721 and ERC1155 activity. This can be + * used to notify your app with real time state changes when an NFT is + * transferred between addresses. + */ +export interface NftActivityWebhook extends Webhook { + type: WebhookType.NFT_ACTIVITY; +} +/** The response for a {@link NotifyNamespace.getAllWebhooks} method. */ +export interface GetAllWebhooksResponse { + /** All webhooks attached to the provided auth token. */ + webhooks: Webhook[]; + /** The total number of webhooks. */ + totalCount: number; +} +/** Options object for the {@link NotifyNamespace.getAddresses} method. */ +export interface GetAddressesOptions { + /** Number of addresses to fetch. */ + limit?: number; + /** Page */ + pageKey?: string; +} +/** Response object for the {@link NotifyNamespace.getAddresses} method. */ +export interface AddressActivityResponse { + /** The addresses for the webhook. */ + addresses: string[]; + /** The total number of addresses. */ + totalCount: number; + /** Optional page key used to fetch the remaining addresses. */ + pageKey?: string; +} +/** + * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order + * to create a {@link MinedTransactionWebhook} or {@link DroppedTransactionWebhook}. + * + * The webhook will be created on the app and network associated with the appId. + * To find the app id of a project, go to the Alchemy Dashboard in the Apps tab. + * After clicking on an app, the app id is the string in the URL following 'apps/'. + * + * This is a temporary workaround for now. We're planning on detecting the app + * id from the provided api key directly. Stay tuned! + */ +export interface TransactionWebhookParams { + /** The app id of the project to create the webhook on. */ + appId: string; +} +/** + * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order + * to create a {@link NftActivityWebhook}. + */ +export interface NftWebhookParams { + /** Array of NFT filters the webhook should track. */ + filters: NftFilter[]; + /** + * Optional network to create the webhook on. If omitted, the webhook will be + * created on network of the app provided in the api key config. + */ + network?: Network; +} +/** + * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order + * to create a {@link AddressActivityWebhook}. + */ +export interface AddressWebhookParams { + /** Array of addresses the webhook should activity for. */ + addresses: string[]; + /** + * Optional network to create the webhook on. If omitted, the webhook will be + * created on network of the app provided in the api key config. + */ + network?: Network; +} +/** NFT to track on a {@link NftActivityWebhook}. */ +export interface NftFilter { + /** The contract address of the NFT. */ + contractAddress: string; + /** The token id of the NFT. */ + tokenId: BigNumberish; +} +/** Response object for the {@link NotifyNamespace.getNftFilters} method. */ +export interface NftFiltersResponse { + /** The NFT filters on the provided webhook. */ + filters: NftFilter[]; + /** The total number of NFT filters on the webhook. */ + totalCount: number; + /** Optional page key used to fetch the remaining filters. */ + pageKey?: string; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to mark a + * webhook as active or inactive. + */ +export interface WebhookStatusUpdate { + /** Whether the webhook is active. */ + isActive: boolean; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to add and + * remove NFT filters for a {@link NftActivityWebhook}. + */ +export interface WebhookNftFilterUpdate { + /** The filters to additionally track. */ + addFilters: NftFilter[]; + /** Existing filters to remove. */ + removeFilters: NftFilter[]; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to add and + * remove addresses for a {@link AddressActivityWebhook}. + */ +export interface WebhookAddressUpdate { + /** The addresses to additionally track. */ + addAddresses: string[]; + /** Existing addresses to remove. */ + removeAddresses: string[]; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to replace + * all existing addresses for a {@link AddressActivityWebhook}. + */ +export interface WebhookAddressOverride { + /** The new addresses to track. Existing addresses will be removed. */ + newAddresses: string[]; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to update a + * {@link NftActivityWebhook}. + */ +export declare type NftWebhookUpdate = WebhookStatusUpdate | RequireAtLeastOne; +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to update a + * {@link AddressActivityWebhook}. + */ +export declare type AddressWebhookUpdate = WebhookStatusUpdate | RequireAtLeastOne | WebhookAddressOverride; +/** + * Requires at least one of the properties to be set. + * + * Implementation copied over from + * {@link https://learn.microsoft.com/en-us/javascript/api/@azure/keyvault-certificates/requireatleastone?view=azure-node-latest} + */ +export declare type RequireAtLeastOne = { + [K in keyof T]-?: Required> & Partial>>; +}[keyof T]; +/** Requires an array with at least one value. */ +export declare type NonEmptyArray = [T, ...T[]]; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/util/const.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/util/const.d.ts new file mode 100644 index 0000000..1269128 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/util/const.d.ts @@ -0,0 +1,43 @@ +import { Network as NetworkFromEthers } from '@ethersproject/networks'; +import { Network } from '../types/types'; +export declare const DEFAULT_ALCHEMY_API_KEY = "demo"; +export declare const DEFAULT_NETWORK = Network.ETH_MAINNET; +export declare const DEFAULT_MAX_RETRIES = 5; +export declare function getAlchemyNftHttpUrl(network: Network, apiKey: string): string; +export declare function getAlchemyWsUrl(network: Network, apiKey: string): string; +export declare function getAlchemyWebhookHttpUrl(): string; +export declare enum AlchemyApiType { + BASE = 0, + NFT = 1, + WEBHOOK = 2 +} +/** + * Mapping of network names to their corresponding Network strings used to + * create an Ethers.js Provider instance. + */ +export declare const EthersNetwork: { + "eth-mainnet": string; + "eth-ropsten": string; + "eth-goerli": string; + "eth-kovan": string; + "eth-rinkeby": string; + "opt-mainnet": string; + "opt-kovan": string; + "opt-goerli": string; + "arb-mainnet": string; + "arb-rinkeby": string; + "arb-goerli": string; + "polygon-mainnet": string; + "polygon-mumbai": string; + "astar-mainnet": string; +}; +/** + * Mapping of network names to their corresponding Ethers Network objects. These + * networks are not yet supported by Ethers and are listed here to be overriden + * in the provider. + */ +export declare const CustomNetworks: { + [key: string]: NetworkFromEthers; +}; +export declare function noop(): void; +export declare const ETH_NULL_VALUE = "0x"; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/util/logger.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/util/logger.d.ts new file mode 100644 index 0000000..7e8cda8 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/util/logger.d.ts @@ -0,0 +1,55 @@ +/** + * The SDK has 4 log levels and a 5th option for disabling all logging. By + * default, the log level is set to INFO. + * + * The order is a follows: DEBUG < INFO < WARN < ERROR + * + * All log types above the current log level will be outputted. + */ +export declare enum LogLevel { + DEBUG = 0, + INFO = 1, + WARN = 2, + ERROR = 3, + SILENT = 4 +} +/** + * The level of verbosity for the logger. + * + * @public + */ +export declare type LogLevelString = 'debug' | 'info' | 'warn' | 'error' | 'silent'; +/** + * Configures the verbosity of logging. The default log level is `info`. + * + * @param logLevel - The verbosity of logging. Can be any of the following values: + * + * - `debug`: The most verbose logging level. + * - `info`: The default logging level. + * - `warn`: A logging level for non-critical issues. + * - `error`: A logging level for critical issues. + * - `silent`: Turn off all logging. + * + * @public + */ +export declare function setLogLevel(logLevel: LogLevelString): void; +export declare function logDebug(message: string, ...args: unknown[]): void; +export declare function logInfo(message: string, ...args: unknown[]): void; +export declare function logWarn(message: string, ...args: unknown[]): void; +export declare function logError(message: string, ...args: unknown[]): void; +export declare class Logger { + /** The log level of the given Logger instance. */ + private _logLevel; + constructor(); + get logLevel(): LogLevel; + set logLevel(val: LogLevel); + debug(...args: unknown[]): void; + info(...args: unknown[]): void; + warn(...args: unknown[]): void; + error(...args: unknown[]): void; + /** + * Forwards log messages to their corresponding console counterparts if the + * log level allows it. + */ + private _log; +} diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/util/sendRest.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/util/sendRest.d.ts new file mode 100644 index 0000000..e356e41 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/util/sendRest.d.ts @@ -0,0 +1,11 @@ +/** + * Given a REST endpoint, method, and params, sends the request with axios and + * returns the response. + */ +import { AxiosRequestConfig, AxiosResponse } from 'axios'; +/** + * Helper function to send http requests using Axis. + * + * @private + */ +export declare function sendAxiosRequest(baseUrl: string, restApiName: string, methodName: string, params: Req, overrides?: AxiosRequestConfig): Promise>; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/util/util.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/util/util.d.ts new file mode 100644 index 0000000..7ce652d --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/util/util.d.ts @@ -0,0 +1,13 @@ +import { BaseNft, Nft, NftContract } from '../api/nft'; +import { RawBaseNft, RawContractBaseNft, RawGetContractsForOwnerResponse, RawGetNftSalesResponse, RawNft, RawNftAttributeRarity, RawNftContract, RawOpenSeaCollectionMetadata } from '../internal/raw-interfaces'; +import { GetContractsForOwnerResponse, GetNftSalesResponse, NftAttributeRarity, OpenSeaCollectionMetadata } from '../types/types'; +export declare function formatBlock(block: string | number): string; +export declare function getNftContractFromRaw(rawNftContract: RawNftContract): NftContract; +export declare function getBaseNftFromRaw(rawBaseNft: RawBaseNft): BaseNft; +export declare function getBaseNftFromRaw(rawContractBaseNft: RawContractBaseNft, contractAddress: string): BaseNft; +export declare function getNftFromRaw(rawNft: RawNft): Nft; +export declare function getNftSalesFromRaw(rawNftSales: RawGetNftSalesResponse): GetNftSalesResponse; +export declare function getNftRarityFromRaw(rawNftRarity: RawNftAttributeRarity[]): NftAttributeRarity[]; +export declare function getContractsForOwnerFromRaw(rawContractsForOwner: RawGetContractsForOwnerResponse): GetContractsForOwnerResponse; +export declare function parseOpenSeaMetadata(openSea: RawOpenSeaCollectionMetadata | undefined): OpenSeaCollectionMetadata | undefined; +export declare const IS_BROWSER: boolean; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/src/version.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/src/version.d.ts new file mode 100644 index 0000000..86a14fc --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/src/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "2.2.5"; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/test/integration/alchemy.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/test/integration/alchemy.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/test/integration/alchemy.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/test/integration/core.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/test/integration/core.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/test/integration/core.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/test/integration/nft.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/test/integration/nft.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/test/integration/nft.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/test/integration/notify.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/test/integration/notify.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/test/integration/notify.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/test/integration/provider.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/test/integration/provider.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/test/integration/provider.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/test/integration/transact.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/test/integration/transact.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/test/integration/transact.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/test/integration/wallet.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/test/integration/wallet.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/test/integration/wallet.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/test/test-util.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/test/test-util.d.ts new file mode 100644 index 0000000..52fd8cd --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/test/test-util.d.ts @@ -0,0 +1,45 @@ +/// +import { BaseNft, Media, Nft, NftContract, NftSaleMarketplace, NftSaleTakerType, NftTokenType, OwnedBaseNft, OwnedNft, TokenUri } from '../src'; +import { RawBaseNft, RawContractBaseNft, RawContractForOwner, RawNft, RawNftContract, RawNftContractMetadata, RawNftSale, RawOpenSeaCollectionMetadata, RawOwnedBaseNft, RawOwnedNft } from '../src/internal/raw-interfaces'; +import { BlockHead, LogsEvent } from '../src/internal/websocket-backfiller'; +export declare const TEST_WALLET_PRIVATE_KEY = "dd5bdf09397b1fdf98e4f72c66047d5104b1511fa7dc1b8fdddd61a150f732c9"; +export declare const TEST_WALLET_PUBLIC_ADDRESS = "0x4b9007B0BcE78cfB634032ec31Ed56adB464287b"; +/** Creates a dummy response for the `getContractMetadata` endpoint. */ +export declare function createRawNftContract(address: string, tokenType: NftTokenType, name?: string, symbol?: string, totalSupply?: string, openSea?: RawOpenSeaCollectionMetadata): RawNftContract; +export declare function createRawOpenSeaCollectionMetadata(): RawOpenSeaCollectionMetadata; +export declare function createRawOwnedBaseNft(address: string, tokenId: string, balance: string, tokenType?: NftTokenType): RawOwnedBaseNft; +export declare function createOwnedBaseNft(address: string, tokenId: string, balance: number, tokenType?: NftTokenType): OwnedBaseNft; +export declare function createRawBaseNft(contractAddress: string, tokenId: string | number, tokenType?: NftTokenType): RawBaseNft; +export declare function createBaseNft(address: string, tokenId: string | number, tokenType?: NftTokenType): BaseNft; +export declare function createNft(title: string, address: string, tokenId: string, tokenType?: NftTokenType, tokenUri?: TokenUri, media?: TokenUri[] | undefined): Nft; +interface RawNftOptions { + tokenUri?: TokenUri; + media?: TokenUri[] | undefined; + timeLastUpdated?: string; + description?: string | Array; + contractMetadata?: RawNftContractMetadata; +} +export declare function createRawNft(contractAddress: string, title: string, tokenId: string, tokenType?: NftTokenType, options?: RawNftOptions): RawNft; +export declare function createRawOwnedNft(title: string, address: string, tokenId: string, balance: string, tokenType?: NftTokenType, contractMetadata?: RawNftContractMetadata): RawOwnedNft; +export declare function createOwnedNft(title: string, address: string, tokenId: string, balance: number, tokenType?: NftTokenType): OwnedNft; +export declare function createRawNftContractBaseNft(tokenId: string): RawContractBaseNft; +export declare function createRawNftSale(contractAddress: string, tokenId: string, marketplace: NftSaleMarketplace, taker: NftSaleTakerType, buyerAddress: string, sellerAddress: string): RawNftSale; +export declare function createRawContractForOwner(address: string, tokenId: string, media: Media, isSpam?: boolean, name?: string, tokenType?: NftTokenType, symbol?: string, totalSupply?: string, opensea?: RawOpenSeaCollectionMetadata): RawContractForOwner; +export declare function createNftMediaData(bytes?: number, format?: string, thumbnail?: string): Media; +export declare function verifyNftContractMetadata(actualNftContract: NftContract, expectedNftContract: NftContract, address: string, name: string, symbol: string, totalSupply: string, tokenType?: NftTokenType, openSea?: RawOpenSeaCollectionMetadata): void; +export declare type Mocked = T & { + [K in keyof T]: T[K] extends Function ? T[K] & jest.Mock : T[K]; +}; +/** A Promise implementation for deferred resolution. */ +export declare class Deferred { + promise: Promise; + constructor(); + resolve: (value: R | Promise) => void; + reject: (reason: Error) => void; +} +export declare function makeNewHeadsEvent(blockNumber: number, hash: string): BlockHead; +export declare function makeLogsEvent(blockNumber: number, blockHash: string, isRemoved?: boolean, logIndex?: number): LogsEvent; +export declare const TESTING_PRIVATE_KEY = "dd5bdf09397b1fdf98e4f72c66047d5104b1511fa7dc1b8fdddd61a150f732c9"; +export declare const TESTING_PUBLIC_ADDRESS = "0x4b9007B0BcE78cfB634032ec31Ed56adB464287b"; +export declare function loadAlchemyEnv(): Promise; +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/test/unit/alchemy.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/test/unit/alchemy.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/test/unit/alchemy.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/test/unit/backoff.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/test/unit/backoff.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/test/unit/backoff.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/test/unit/contract.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/test/unit/contract.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/test/unit/contract.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/test/unit/core-namespace.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/test/unit/core-namespace.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/test/unit/core-namespace.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/test/unit/logger.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/test/unit/logger.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/test/unit/logger.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/test/unit/nft-api.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/test/unit/nft-api.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/test/unit/nft-api.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/test/unit/nft.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/test/unit/nft.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/test/unit/nft.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/test/unit/provider.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/test/unit/provider.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/test/unit/provider.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/test/unit/request-batcher.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/test/unit/request-batcher.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/test/unit/request-batcher.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/test/unit/transact.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/test/unit/transact.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/test/unit/transact.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/test/unit/wallet.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/test/unit/wallet.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/test/unit/wallet.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/test/unit/websocket-backfiller.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/test/unit/websocket-backfiller.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/test/unit/websocket-backfiller.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/test/unit/websocket-provider.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/api/test/unit/websocket-provider.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/test/unit/websocket-provider.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/api/utils.js b/test/node_modules/alchemy-sdk/dist/es/api/utils.js new file mode 100644 index 0000000..3abb94c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/utils.js @@ -0,0 +1,619 @@ +export { dnsEncode, hashMessage, id, isValidName, namehash } from '@ethersproject/hash'; +import { arrayify } from '@ethersproject/bytes'; +export { arrayify, concat, hexConcat, hexDataLength, hexDataSlice, hexStripZeros, hexValue, hexZeroPad, hexlify, isBytes, isBytesLike, isHexString, joinSignature, splitSignature, stripZeros, zeroPad } from '@ethersproject/bytes'; +export { formatEther, formatUnits, parseEther, parseUnits } from '@ethersproject/units'; +import '@ethersproject/bignumber'; +export { Interface } from '@ethersproject/abi'; + +const version$1 = "logger/5.7.0"; + +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"; + /////////////////// + // Interaction Errors + // The user rejected the action, such as signing a message or sending + // a transaction + ErrorCode["ACTION_REJECTED"] = "ACTION_REJECTED"; +})(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; + let url = ""; + switch (code) { + case ErrorCode.NUMERIC_FAULT: { + url = "NUMERIC_FAULT"; + const fault = message; + switch (fault) { + case "overflow": + case "underflow": + case "division-by-zero": + url += "-" + fault; + break; + case "negative-power": + case "negative-width": + url += "-unsupported"; + break; + case "unbound-bitwise-result": + url += "-unbound-result"; + break; + } + break; + } + case ErrorCode.CALL_EXCEPTION: + case ErrorCode.INSUFFICIENT_FUNDS: + case ErrorCode.MISSING_NEW: + case ErrorCode.NONCE_EXPIRED: + case ErrorCode.REPLACEMENT_UNDERPRICED: + case ErrorCode.TRANSACTION_REPLACED: + case ErrorCode.UNPREDICTABLE_GAS_LIMIT: + url = code; + break; + } + if (url) { + message += " [ See: https:/\/links.ethers.org/v5-errors-" + url + " ]"; + } + 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 (_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$1); + } + 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 = "strings/5.7.0"; + +const logger = new Logger(version); +/////////////////////////////// +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.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); +} +// 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.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 _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 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 }; + }); +} +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... +"ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((v) => parseInt(v, 16)); +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"); +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"); +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); +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"); + +export { toUtf8Bytes, toUtf8String }; +//# sourceMappingURL=utils.js.map diff --git a/test/node_modules/alchemy-sdk/dist/es/api/utils.js.map b/test/node_modules/alchemy-sdk/dist/es/api/utils.js.map new file mode 100644 index 0000000..6d9a241 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/api/utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.js","sources":["../../../node_modules/@ethersproject/logger/lib.esm/_version.js","../../../node_modules/@ethersproject/logger/lib.esm/index.js","../../../node_modules/@ethersproject/strings/lib.esm/_version.js","../../../node_modules/@ethersproject/strings/lib.esm/utf8.js","../../../node_modules/@ethersproject/strings/lib.esm/idna.js"],"sourcesContent":["export const version = \"logger/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nlet _permanentCensorErrors = false;\nlet _censorErrors = false;\nconst LogLevels = { debug: 1, \"default\": 2, info: 2, warning: 3, error: 4, off: 5 };\nlet _logLevel = LogLevels[\"default\"];\nimport { version } from \"./_version\";\nlet _globalLogger = null;\nfunction _checkNormalize() {\n try {\n const missing = [];\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 ;\n }\n catch (error) {\n missing.push(form);\n }\n });\n if (missing.length) {\n throw new Error(\"missing \" + missing.join(\", \"));\n }\n if (String.fromCharCode(0xe9).normalize(\"NFD\") !== String.fromCharCode(0x65, 0x0301)) {\n throw new Error(\"broken implementation\");\n }\n }\n catch (error) {\n return error.message;\n }\n return null;\n}\nconst _normalizeError = _checkNormalize();\nexport var LogLevel;\n(function (LogLevel) {\n LogLevel[\"DEBUG\"] = \"DEBUG\";\n LogLevel[\"INFO\"] = \"INFO\";\n LogLevel[\"WARNING\"] = \"WARNING\";\n LogLevel[\"ERROR\"] = \"ERROR\";\n LogLevel[\"OFF\"] = \"OFF\";\n})(LogLevel || (LogLevel = {}));\nexport var ErrorCode;\n(function (ErrorCode) {\n ///////////////////\n // Generic Errors\n // Unknown Error\n ErrorCode[\"UNKNOWN_ERROR\"] = \"UNKNOWN_ERROR\";\n // Not Implemented\n ErrorCode[\"NOT_IMPLEMENTED\"] = \"NOT_IMPLEMENTED\";\n // Unsupported Operation\n // - operation\n ErrorCode[\"UNSUPPORTED_OPERATION\"] = \"UNSUPPORTED_OPERATION\";\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 ErrorCode[\"NETWORK_ERROR\"] = \"NETWORK_ERROR\";\n // Some sort of bad response from the server\n ErrorCode[\"SERVER_ERROR\"] = \"SERVER_ERROR\";\n // Timeout\n ErrorCode[\"TIMEOUT\"] = \"TIMEOUT\";\n ///////////////////\n // Operational Errors\n // Buffer Overrun\n ErrorCode[\"BUFFER_OVERRUN\"] = \"BUFFER_OVERRUN\";\n // Numeric Fault\n // - operation: the operation being executed\n // - fault: the reason this faulted\n ErrorCode[\"NUMERIC_FAULT\"] = \"NUMERIC_FAULT\";\n ///////////////////\n // Argument Errors\n // Missing new operator to an object\n // - name: The name of the class\n ErrorCode[\"MISSING_NEW\"] = \"MISSING_NEW\";\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 ErrorCode[\"INVALID_ARGUMENT\"] = \"INVALID_ARGUMENT\";\n // Missing argument to a function:\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n ErrorCode[\"MISSING_ARGUMENT\"] = \"MISSING_ARGUMENT\";\n // Too many arguments\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n ErrorCode[\"UNEXPECTED_ARGUMENT\"] = \"UNEXPECTED_ARGUMENT\";\n ///////////////////\n // Blockchain Errors\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 ErrorCode[\"CALL_EXCEPTION\"] = \"CALL_EXCEPTION\";\n // Insufficient funds (< value + gasLimit * gasPrice)\n // - transaction: the transaction attempted\n ErrorCode[\"INSUFFICIENT_FUNDS\"] = \"INSUFFICIENT_FUNDS\";\n // Nonce has already been used\n // - transaction: the transaction attempted\n ErrorCode[\"NONCE_EXPIRED\"] = \"NONCE_EXPIRED\";\n // The replacement fee for the transaction is too low\n // - transaction: the transaction attempted\n ErrorCode[\"REPLACEMENT_UNDERPRICED\"] = \"REPLACEMENT_UNDERPRICED\";\n // The gas limit could not be estimated\n // - transaction: the transaction passed to estimateGas\n ErrorCode[\"UNPREDICTABLE_GAS_LIMIT\"] = \"UNPREDICTABLE_GAS_LIMIT\";\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 ErrorCode[\"TRANSACTION_REPLACED\"] = \"TRANSACTION_REPLACED\";\n ///////////////////\n // Interaction Errors\n // The user rejected the action, such as signing a message or sending\n // a transaction\n ErrorCode[\"ACTION_REJECTED\"] = \"ACTION_REJECTED\";\n})(ErrorCode || (ErrorCode = {}));\n;\nconst HEX = \"0123456789abcdef\";\nexport class Logger {\n constructor(version) {\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n value: version,\n writable: false\n });\n }\n _log(logLevel, args) {\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]) {\n return;\n }\n console.log.apply(console, args);\n }\n debug(...args) {\n this._log(Logger.levels.DEBUG, args);\n }\n info(...args) {\n this._log(Logger.levels.INFO, args);\n }\n warn(...args) {\n this._log(Logger.levels.WARNING, args);\n }\n makeError(message, code, params) {\n // Errors are being censored\n if (_censorErrors) {\n return this.makeError(\"censored error\", code, {});\n }\n if (!code) {\n code = Logger.errors.UNKNOWN_ERROR;\n }\n if (!params) {\n params = {};\n }\n const messageDetails = [];\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 }\n else {\n messageDetails.push(key + \"=\" + JSON.stringify(value));\n }\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 const reason = message;\n let url = \"\";\n switch (code) {\n case ErrorCode.NUMERIC_FAULT: {\n url = \"NUMERIC_FAULT\";\n const fault = message;\n switch (fault) {\n case \"overflow\":\n case \"underflow\":\n case \"division-by-zero\":\n url += \"-\" + fault;\n break;\n case \"negative-power\":\n case \"negative-width\":\n url += \"-unsupported\";\n break;\n case \"unbound-bitwise-result\":\n url += \"-unbound-result\";\n break;\n }\n break;\n }\n case ErrorCode.CALL_EXCEPTION:\n case ErrorCode.INSUFFICIENT_FUNDS:\n case ErrorCode.MISSING_NEW:\n case ErrorCode.NONCE_EXPIRED:\n case ErrorCode.REPLACEMENT_UNDERPRICED:\n case ErrorCode.TRANSACTION_REPLACED:\n case ErrorCode.UNPREDICTABLE_GAS_LIMIT:\n url = code;\n break;\n }\n if (url) {\n message += \" [ See: https:/\\/links.ethers.org/v5-errors-\" + url + \" ]\";\n }\n if (messageDetails.length) {\n message += \" (\" + messageDetails.join(\", \") + \")\";\n }\n // @TODO: Any??\n const error = new Error(message);\n error.reason = reason;\n error.code = code;\n Object.keys(params).forEach(function (key) {\n error[key] = params[key];\n });\n return error;\n }\n throwError(message, code, params) {\n throw this.makeError(message, code, params);\n }\n throwArgumentError(message, name, value) {\n return this.throwError(message, Logger.errors.INVALID_ARGUMENT, {\n argument: name,\n value: value\n });\n }\n assert(condition, message, code, params) {\n if (!!condition) {\n return;\n }\n this.throwError(message, code, params);\n }\n assertArgument(condition, message, name, value) {\n if (!!condition) {\n return;\n }\n this.throwArgumentError(message, name, value);\n }\n checkNormalize(message) {\n if (message == null) {\n message = \"platform missing String.prototype.normalize\";\n }\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 checkSafeUint53(value, message) {\n if (typeof (value) !== \"number\") {\n return;\n }\n if (message == null) {\n 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 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 checkArgumentCount(count, expectedCount, message) {\n if (message) {\n message = \": \" + message;\n }\n else {\n message = \"\";\n }\n if (count < expectedCount) {\n this.throwError(\"missing argument\" + message, Logger.errors.MISSING_ARGUMENT, {\n count: count,\n expectedCount: expectedCount\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 checkNew(target, kind) {\n if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n checkAbstract(target, kind) {\n if (target === kind) {\n this.throwError(\"cannot instantiate abstract class \" + JSON.stringify(kind.name) + \" directly; use a sub-class\", Logger.errors.UNSUPPORTED_OPERATION, { 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 static globalLogger() {\n if (!_globalLogger) {\n _globalLogger = new Logger(version);\n }\n return _globalLogger;\n }\n static setCensorship(censorship, permanent) {\n if (!censorship && permanent) {\n this.globalLogger().throwError(\"cannot permanently disable censorship\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n if (_permanentCensorErrors) {\n if (!censorship) {\n return;\n }\n this.globalLogger().throwError(\"error censorship permanent\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n _censorErrors = !!censorship;\n _permanentCensorErrors = !!permanent;\n }\n static setLogLevel(logLevel) {\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 static from(version) {\n return new Logger(version);\n }\n}\nLogger.errors = ErrorCode;\nLogger.levels = LogLevel;\n//# sourceMappingURL=index.js.map","export const version = \"strings/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { arrayify } from \"@ethersproject/bytes\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n///////////////////////////////\nexport var UnicodeNormalizationForm;\n(function (UnicodeNormalizationForm) {\n UnicodeNormalizationForm[\"current\"] = \"\";\n UnicodeNormalizationForm[\"NFC\"] = \"NFC\";\n UnicodeNormalizationForm[\"NFD\"] = \"NFD\";\n UnicodeNormalizationForm[\"NFKC\"] = \"NFKC\";\n UnicodeNormalizationForm[\"NFKD\"] = \"NFKD\";\n})(UnicodeNormalizationForm || (UnicodeNormalizationForm = {}));\n;\nexport var Utf8ErrorReason;\n(function (Utf8ErrorReason) {\n // A continuation byte was present where there was nothing to continue\n // - offset = the index the codepoint began in\n Utf8ErrorReason[\"UNEXPECTED_CONTINUE\"] = \"unexpected continuation byte\";\n // An invalid (non-continuation) byte to start a UTF-8 codepoint was found\n // - offset = the index the codepoint began in\n Utf8ErrorReason[\"BAD_PREFIX\"] = \"bad codepoint prefix\";\n // The string is too short to process the expected codepoint\n // - offset = the index the codepoint began in\n Utf8ErrorReason[\"OVERRUN\"] = \"string overrun\";\n // A missing continuation byte was expected but not found\n // - offset = the index the continuation byte was expected at\n Utf8ErrorReason[\"MISSING_CONTINUE\"] = \"missing continuation byte\";\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 Utf8ErrorReason[\"OUT_OF_RANGE\"] = \"out of UTF-8 range\";\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 Utf8ErrorReason[\"UTF16_SURROGATE\"] = \"UTF-16 surrogate\";\n // The string is an overlong representation\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; already bounds checked\n Utf8ErrorReason[\"OVERLONG\"] = \"overlong representation\";\n})(Utf8ErrorReason || (Utf8ErrorReason = {}));\n;\nfunction errorFunc(reason, offset, bytes, output, badCodepoint) {\n return logger.throwArgumentError(`invalid codepoint at offset ${offset}; ${reason}`, \"bytes\", bytes);\n}\nfunction ignoreFunc(reason, offset, bytes, output, badCodepoint) {\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) {\n break;\n }\n i++;\n }\n return i;\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 // Nothing to skip\n return 0;\n}\nfunction replaceFunc(reason, offset, bytes, output, badCodepoint) {\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 // Put the replacement character into the output\n output.push(0xfffd);\n // Otherwise, process as if ignoring errors\n return ignoreFunc(reason, offset, bytes, output, badCodepoint);\n}\n// Common error handing strategies\nexport const Utf8ErrorFuncs = Object.freeze({\n error: errorFunc,\n ignore: ignoreFunc,\n replace: replaceFunc\n});\n// http://stackoverflow.com/questions/13356493/decode-utf-8-with-javascript#13691499\nfunction getUtf8CodePoints(bytes, onError) {\n if (onError == null) {\n onError = Utf8ErrorFuncs.error;\n }\n bytes = arrayify(bytes);\n const result = [];\n let i = 0;\n // Invalid bytes are ignored\n while (i < bytes.length) {\n const c = bytes[i++];\n // 0xxx xxxx\n if (c >> 7 === 0) {\n result.push(c);\n continue;\n }\n // Multibyte; how many bytes left for this character?\n let extraLength = null;\n let overlongMask = null;\n // 110x xxxx 10xx xxxx\n if ((c & 0xe0) === 0xc0) {\n extraLength = 1;\n overlongMask = 0x7f;\n // 1110 xxxx 10xx xxxx 10xx xxxx\n }\n else if ((c & 0xf0) === 0xe0) {\n extraLength = 2;\n overlongMask = 0x7ff;\n // 1111 0xxx 10xx xxxx 10xx xxxx 10xx xxxx\n }\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 }\n else {\n i += onError(Utf8ErrorReason.BAD_PREFIX, i - 1, bytes, result);\n }\n continue;\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 // Remove the length prefix from the char\n let res = c & ((1 << (8 - extraLength - 1)) - 1);\n for (let j = 0; j < extraLength; j++) {\n let nextChar = bytes[i];\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 // See above loop for invalid continuation byte\n if (res === null) {\n 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 // 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 // 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 result.push(res);\n }\n return result;\n}\n// http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array\nexport function toUtf8Bytes(str, form = UnicodeNormalizationForm.current) {\n if (form != UnicodeNormalizationForm.current) {\n logger.checkNormalize();\n str = str.normalize(form);\n }\n let result = [];\n for (let i = 0; i < str.length; i++) {\n const c = str.charCodeAt(i);\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 if (i >= str.length || (c2 & 0xfc00) !== 0xdc00) {\n throw new Error(\"invalid utf-8 string\");\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 return arrayify(result);\n}\n;\nfunction escapeChar(value) {\n const hex = (\"0000\" + value.toString(16));\n return \"\\\\u\" + hex.substring(hex.length - 4);\n}\nexport function _toEscapedUtf8String(bytes, onError) {\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 if (codePoint >= 32 && codePoint < 127) {\n return String.fromCharCode(codePoint);\n }\n }\n if (codePoint <= 0xffff) {\n return escapeChar(codePoint);\n }\n codePoint -= 0x10000;\n return escapeChar(((codePoint >> 10) & 0x3ff) + 0xd800) + escapeChar((codePoint & 0x3ff) + 0xdc00);\n }).join(\"\") + '\"';\n}\nexport function _toUtf8String(codePoints) {\n return codePoints.map((codePoint) => {\n if (codePoint <= 0xffff) {\n return String.fromCharCode(codePoint);\n }\n codePoint -= 0x10000;\n return String.fromCharCode((((codePoint >> 10) & 0x3ff) + 0xd800), ((codePoint & 0x3ff) + 0xdc00));\n }).join(\"\");\n}\nexport function toUtf8String(bytes, onError) {\n return _toUtf8String(getUtf8CodePoints(bytes, onError));\n}\nexport function toUtf8CodePoints(str, form = UnicodeNormalizationForm.current) {\n return getUtf8CodePoints(toUtf8Bytes(str, form));\n}\n//# sourceMappingURL=utf8.js.map","\"use strict\";\nimport { toUtf8CodePoints, _toUtf8String, UnicodeNormalizationForm } from \"./utf8\";\nfunction bytes2(data) {\n if ((data.length % 4) !== 0) {\n throw new Error(\"bad data\");\n }\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}\nfunction createTable(data, func) {\n if (!func) {\n func = function (value) { return [parseInt(value, 16)]; };\n }\n let lo = 0;\n let result = {};\n data.split(\",\").forEach((pair) => {\n let comps = pair.split(\":\");\n lo += parseInt(comps[0], 16);\n result[lo] = func(comps[1]);\n });\n return result;\n}\nfunction createRangeTable(data) {\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 }\n else if (comps[1] === \"\") {\n comps[1] = \"1\";\n }\n let lo = hi + parseInt(comps[0], 16);\n hi = parseInt(comps[1], 16);\n return { l: lo, h: hi };\n });\n}\nfunction matchMap(value, ranges) {\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) {\n continue;\n }\n return range;\n }\n }\n return null;\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// @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));\nconst Table_B_2_ranges = [\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);\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\");\nfunction flatten(values) {\n return values.reduce((accum, value) => {\n value.forEach((value) => { accum.push(value); });\n return accum;\n }, []);\n}\nexport function _nameprepTableA1(codepoint) {\n return !!matchMap(codepoint, Table_A_1_ranges);\n}\nexport function _nameprepTableB2(codepoint) {\n let range = matchMap(codepoint, Table_B_2_ranges);\n if (range) {\n return [codepoint + range.s];\n }\n let codes = Table_B_2_lut_abs[codepoint];\n if (codes) {\n return codes;\n }\n let shift = Table_B_2_lut_rel[codepoint];\n if (shift) {\n return [codepoint + shift[0]];\n }\n let complex = Table_B_2_complex[codepoint];\n if (complex) {\n return complex;\n }\n return null;\n}\nexport function _nameprepTableC(codepoint) {\n return !!matchMap(codepoint, Table_C_ranges);\n}\nexport function nameprep(value) {\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) {\n return value.toLowerCase();\n }\n // Get the code points (keeping the current normalization)\n let codes = toUtf8CodePoints(value);\n codes = flatten(codes.map((code) => {\n // Substitute Table B.1 (Maps to Nothing)\n if (Table_B_1_flags.indexOf(code) >= 0) {\n return [];\n }\n if (code >= 0xfe00 && code <= 0xfe0f) {\n return [];\n }\n // Substitute Table B.2 (Case Folding)\n let codesTableB2 = _nameprepTableB2(code);\n if (codesTableB2) {\n return codesTableB2;\n }\n // No Substitution\n return [code];\n }));\n // Normalize using form KC\n codes = toUtf8CodePoints(_toUtf8String(codes), UnicodeNormalizationForm.NFKC);\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 // 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 // IDNA extras\n let name = _toUtf8String(codes);\n // IDNA: 4.2.3.1\n if (name.substring(0, 1) === \"-\" || name.substring(2, 4) === \"--\" || name.substring(name.length - 1) ===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AC1+C;AACwB,qDAAqD,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE;AA6C3F,WAAW,CAAC,ufAAuf,EAAE;AACrgB,WAAW,CAAC,wdAAwd,EAAE;AACte,WAAW,CAAC,w3DAAw3D,EAAE,MAAM,EAAE;AACj5D,gBAAgB,CAAC,yLAAyL;;;;"} \ No newline at end of file diff --git a/test/node_modules/alchemy-sdk/dist/es/index-02af91ae.js b/test/node_modules/alchemy-sdk/dist/es/index-02af91ae.js new file mode 100644 index 0000000..d61bdeb --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/index-02af91ae.js @@ -0,0 +1,3145 @@ +import './api/utils'; +import { BigNumber } from '@ethersproject/bignumber'; +import axios from 'axios'; +import { Provider } from '@ethersproject/abstract-provider'; +import { Wallet as Wallet$1 } from '@ethersproject/wallet'; +import { Contract as Contract$1, ContractFactory as ContractFactory$1 } from '@ethersproject/contracts'; + +/** + * The supported networks by Alchemy. Note that some functions are not available + * on all networks. Please refer to the Alchemy documentation for which APIs are + * available on which networks + * {@link https://docs.alchemy.com/alchemy/apis/feature-support-by-chain} + * + * @public + */ +var Network; +(function (Network) { + Network["ETH_MAINNET"] = "eth-mainnet"; + /** @deprecated - Will be removed in subsequent versions */ + Network["ETH_ROPSTEN"] = "eth-ropsten"; + Network["ETH_GOERLI"] = "eth-goerli"; + /** @deprecated - Will be removed in subsequent versions */ + Network["ETH_KOVAN"] = "eth-kovan"; + /** @deprecated - Will be removed in subsequent versions */ + Network["ETH_RINKEBY"] = "eth-rinkeby"; + Network["OPT_MAINNET"] = "opt-mainnet"; + /** @deprecated - Will be removed in subsequent versions */ + Network["OPT_KOVAN"] = "opt-kovan"; + Network["OPT_GOERLI"] = "opt-goerli"; + Network["ARB_MAINNET"] = "arb-mainnet"; + /** @deprecated - Will be removed in subsequent versions */ + Network["ARB_RINKEBY"] = "arb-rinkeby"; + Network["ARB_GOERLI"] = "arb-goerli"; + Network["MATIC_MAINNET"] = "polygon-mainnet"; + Network["MATIC_MUMBAI"] = "polygon-mumbai"; + Network["ASTAR_MAINNET"] = "astar-mainnet"; +})(Network || (Network = {})); +/** Token Types for the `getTokenBalances()` endpoint. */ +var TokenBalanceType; +(function (TokenBalanceType) { + /** + * Option to fetch the top 100 tokens by 24-hour volume. This option is only + * available on Mainnet in Ethereum, Polygon, and Arbitrum. + */ + TokenBalanceType["DEFAULT_TOKENS"] = "DEFAULT_TOKENS"; + /** + * Option to fetch the set of ERC-20 tokens that the address as ever held. his + * list is produced by an address's historical transfer activity and includes + * all tokens that the address has ever received. + */ + TokenBalanceType["ERC20"] = "erc20"; +})(TokenBalanceType || (TokenBalanceType = {})); +/** + * Categories of transfers to use with the {@link AssetTransfersParams} request + * object when using {@link CoreNamespace.getAssetTransfers}. + * + * @public + */ +var AssetTransfersCategory; +(function (AssetTransfersCategory) { + /** + * Top level ETH transactions that occur where the `fromAddress` is an + * external user-created address. External addresses have private keys and are + * accessed by users. + */ + AssetTransfersCategory["EXTERNAL"] = "external"; + /** + * Top level ETH transactions that occur where the `fromAddress` is an + * internal, smart contract address. For example, a smart contract calling + * another smart contract or sending + */ + AssetTransfersCategory["INTERNAL"] = "internal"; + /** ERC20 transfers. */ + AssetTransfersCategory["ERC20"] = "erc20"; + /** ERC721 transfers. */ + AssetTransfersCategory["ERC721"] = "erc721"; + /** ERC1155 transfers. */ + AssetTransfersCategory["ERC1155"] = "erc1155"; + /** Special contracts that don't follow ERC 721/1155, (ex: CryptoKitties). */ + AssetTransfersCategory["SPECIALNFT"] = "specialnft"; +})(AssetTransfersCategory || (AssetTransfersCategory = {})); +/** + * Enum for the order of the {@link AssetTransfersParams} request object when + * using {@link CoreNamespace.getAssetTransfers}. + * + * @deprecated Use {@link SortingOrder} instead. This enum will be removed in a + * future version. + * @public + */ +var AssetTransfersOrder; +(function (AssetTransfersOrder) { + AssetTransfersOrder["ASCENDING"] = "asc"; + AssetTransfersOrder["DESCENDING"] = "desc"; +})(AssetTransfersOrder || (AssetTransfersOrder = {})); +/** + * An enum for specifying the token type on NFTs. + * + * @public + */ +var NftTokenType; +(function (NftTokenType) { + NftTokenType["ERC721"] = "ERC721"; + NftTokenType["ERC1155"] = "ERC1155"; + NftTokenType["UNKNOWN"] = "UNKNOWN"; +})(NftTokenType || (NftTokenType = {})); +/** Potential reasons why an NFT contract was classified as spam. */ +var NftSpamClassification; +(function (NftSpamClassification) { + NftSpamClassification["Erc721TooManyOwners"] = "Erc721TooManyOwners"; + NftSpamClassification["Erc721TooManyTokens"] = "Erc721TooManyTokens"; + NftSpamClassification["Erc721DishonestTotalSupply"] = "Erc721DishonestTotalSupply"; + NftSpamClassification["MostlyHoneyPotOwners"] = "MostlyHoneyPotOwners"; + NftSpamClassification["OwnedByMostHoneyPots"] = "OwnedByMostHoneyPots"; +})(NftSpamClassification || (NftSpamClassification = {})); +/** + * Enum of NFT filters that can be applied to a {@link getNftsForOwner} request. + * NFTs that match one or more of these filters are excluded from the response. + * + * - @deprecated Use {@link NftFilters} instead. This enum will be removed in a + * future version. + * + * @beta + */ +var NftExcludeFilters; +(function (NftExcludeFilters) { + /** Exclude NFTs that have been classified as spam. */ + NftExcludeFilters["SPAM"] = "SPAM"; + /** Exclude NFTs that have been airdropped to a user. */ + NftExcludeFilters["AIRDROPS"] = "AIRDROPS"; +})(NftExcludeFilters || (NftExcludeFilters = {})); +/** + * Enum of NFT filters that can be applied to a {@link getNftsForOwner} or a + * {@link getContractsForOwner} request. + * + * @beta + */ +var NftFilters; +(function (NftFilters) { + /** NFTs that have been classified as spam. */ + NftFilters["SPAM"] = "SPAM"; + /** NFTs that have been airdropped to a user. */ + NftFilters["AIRDROPS"] = "AIRDROPS"; +})(NftFilters || (NftFilters = {})); +/** + * Enum of ordering that can be applied to a {@link getNftsForOwner} or a + * {@link getContractsForOwner} response. + * + * @beta + */ +var NftOrdering; +(function (NftOrdering) { + NftOrdering["TRANSFERTIME"] = "TRANSFERTIME"; +})(NftOrdering || (NftOrdering = {})); +/** + * Enum for representing the supported sorting orders of the API. + * + * @public + */ +var SortingOrder; +(function (SortingOrder) { + SortingOrder["ASCENDING"] = "asc"; + SortingOrder["DESCENDING"] = "desc"; +})(SortingOrder || (SortingOrder = {})); +/** + * Enum representing the supported NFT marketplaces by the {@link getNftSales} endpoint. + * + * @public + */ +var NftSaleMarketplace; +(function (NftSaleMarketplace) { + NftSaleMarketplace["SEAPORT"] = "seaport"; + NftSaleMarketplace["LOOKSRARE"] = "looksrare"; + NftSaleMarketplace["X2Y2"] = "x2y2"; + NftSaleMarketplace["UNKNOWN"] = "unknown"; +})(NftSaleMarketplace || (NftSaleMarketplace = {})); +/** + * Enum for specifing the taker type for the {@link getNftSales} endpoint. + * + * @public + */ +var NftSaleTakerType; +(function (NftSaleTakerType) { + NftSaleTakerType["BUYER"] = "buyer"; + NftSaleTakerType["SELLER"] = "seller"; +})(NftSaleTakerType || (NftSaleTakerType = {})); +/** The current state of the NFT contract refresh process. */ +var RefreshState; +(function (RefreshState) { + /** The provided contract is not an NFT or does not contain metadata. */ + RefreshState["DOES_NOT_EXIST"] = "does_not_exist"; + /** The contract has already been queued for refresh. */ + RefreshState["ALREADY_QUEUED"] = "already_queued"; + /** The contract is currently being refreshed. */ + RefreshState["IN_PROGRESS"] = "in_progress"; + /** The contract refresh is complete. */ + RefreshState["FINISHED"] = "finished"; + /** The contract refresh has been queued and await execution. */ + RefreshState["QUEUED"] = "queued"; + /** The contract was unable to be queued due to an internal error. */ + RefreshState["QUEUE_FAILED"] = "queue_failed"; +})(RefreshState || (RefreshState = {})); +/** An OpenSea collection's approval status. */ +var OpenSeaSafelistRequestStatus; +(function (OpenSeaSafelistRequestStatus) { + /** Verified collection. */ + OpenSeaSafelistRequestStatus["VERIFIED"] = "verified"; + /** Collections that are approved on open sea and can be found in search results. */ + OpenSeaSafelistRequestStatus["APPROVED"] = "approved"; + /** Collections that requested safelisting on OpenSea. */ + OpenSeaSafelistRequestStatus["REQUESTED"] = "requested"; + /** Brand new collections. */ + OpenSeaSafelistRequestStatus["NOT_REQUESTED"] = "not_requested"; +})(OpenSeaSafelistRequestStatus || (OpenSeaSafelistRequestStatus = {})); +/** + * Method names for Alchemy's custom Subscription API endpoints. + * + * This value is provided in the `method` field when creating an event filter on + * the Websocket Namespace. + */ +var AlchemySubscription; +(function (AlchemySubscription) { + AlchemySubscription["PENDING_TRANSACTIONS"] = "alchemy_pendingTransactions"; + AlchemySubscription["MINED_TRANSACTIONS"] = "alchemy_minedTransactions"; +})(AlchemySubscription || (AlchemySubscription = {})); +/** + * Potential transaction job statuses for a {@link GasOptimizedTransactionResponse} + * + * @internal + */ +// TODO(txjob): Remove internal tag once this feature is released. +var GasOptimizedTransactionStatus; +(function (GasOptimizedTransactionStatus) { + GasOptimizedTransactionStatus["UNSPECIFIED"] = "TRANSACTION_JOB_STATUS_UNSPECIFIED"; + GasOptimizedTransactionStatus["IN_PROGRESS"] = "IN_PROGRESS"; + GasOptimizedTransactionStatus["COMPLETE"] = "COMPLETE"; + GasOptimizedTransactionStatus["ABANDONED"] = "ABANDONED"; +})(GasOptimizedTransactionStatus || (GasOptimizedTransactionStatus = {})); +/** The version of the webhook. All newly created webhooks default to V2. */ +var WebhookVersion; +(function (WebhookVersion) { + WebhookVersion["V1"] = "V1"; + WebhookVersion["V2"] = "V2"; +})(WebhookVersion || (WebhookVersion = {})); +/** The type of {@link Webhook}. */ +var WebhookType; +(function (WebhookType) { + WebhookType["MINED_TRANSACTION"] = "MINED_TRANSACTION"; + WebhookType["DROPPED_TRANSACTION"] = "DROPPED_TRANSACTION"; + WebhookType["ADDRESS_ACTIVITY"] = "ADDRESS_ACTIVITY"; + WebhookType["NFT_ACTIVITY"] = "NFT_ACTIVITY"; +})(WebhookType || (WebhookType = {})); + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +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. +***************************************************************************** */ + +function __awaiter(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 __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +const DEFAULT_ALCHEMY_API_KEY = 'demo'; +const DEFAULT_NETWORK = Network.ETH_MAINNET; +const DEFAULT_MAX_RETRIES = 5; +/** + * Returns the base URL for making Alchemy API requests. The `alchemy.com` + * endpoints only work with non eth json-rpc requests. + * + * @internal + */ +function getAlchemyHttpUrl(network, apiKey) { + return `https://${network}.g.alchemy.com/v2/${apiKey}`; +} +function getAlchemyNftHttpUrl(network, apiKey) { + return `https://${network}.g.alchemy.com/nft/v2/${apiKey}`; +} +function getAlchemyWsUrl(network, apiKey) { + return `wss://${network}.g.alchemy.com/v2/${apiKey}`; +} +function getAlchemyWebhookHttpUrl() { + return 'https://dashboard.alchemy.com/api'; +} +var AlchemyApiType; +(function (AlchemyApiType) { + AlchemyApiType[AlchemyApiType["BASE"] = 0] = "BASE"; + AlchemyApiType[AlchemyApiType["NFT"] = 1] = "NFT"; + AlchemyApiType[AlchemyApiType["WEBHOOK"] = 2] = "WEBHOOK"; +})(AlchemyApiType || (AlchemyApiType = {})); +/** + * Mapping of network names to their corresponding Network strings used to + * create an Ethers.js Provider instance. + */ +const EthersNetwork = { + [Network.ETH_MAINNET]: 'mainnet', + [Network.ETH_ROPSTEN]: 'ropsten', + [Network.ETH_GOERLI]: 'goerli', + [Network.ETH_KOVAN]: 'kovan', + [Network.ETH_RINKEBY]: 'rinkeby', + [Network.OPT_MAINNET]: 'optimism', + [Network.OPT_KOVAN]: 'optimism-kovan', + [Network.OPT_GOERLI]: 'optimism-goerli', + [Network.ARB_MAINNET]: 'arbitrum', + [Network.ARB_RINKEBY]: 'arbitrum-rinkeby', + [Network.ARB_GOERLI]: 'arbitrum-goerli', + [Network.MATIC_MAINNET]: 'matic', + [Network.MATIC_MUMBAI]: 'maticmum', + [Network.ASTAR_MAINNET]: 'astar-mainnet' +}; +/** + * Mapping of network names to their corresponding Ethers Network objects. These + * networks are not yet supported by Ethers and are listed here to be overriden + * in the provider. + */ +const CustomNetworks = { + 'arbitrum-goerli': { + chainId: 421613, + name: 'arbitrum-goerli' + }, + 'astar-mainnet': { + chainId: 592, + name: 'astar-mainnet' + } +}; +function noop() { + // It's a no-op +} +const ETH_NULL_VALUE = '0x'; + +/** + * This class holds the config information for the SDK client instance and + * exposes the underlying providers for more advanced use cases. + * + * @public + */ +class AlchemyConfig { + constructor(config) { + this.apiKey = (config === null || config === void 0 ? void 0 : config.apiKey) || DEFAULT_ALCHEMY_API_KEY; + this.network = (config === null || config === void 0 ? void 0 : config.network) || DEFAULT_NETWORK; + this.maxRetries = (config === null || config === void 0 ? void 0 : config.maxRetries) || DEFAULT_MAX_RETRIES; + this.url = config === null || config === void 0 ? void 0 : config.url; + this.authToken = config === null || config === void 0 ? void 0 : config.authToken; + this.batchRequests = (config === null || config === void 0 ? void 0 : config.batchRequests) || false; + } + /** + * Returns the URL endpoint to send the HTTP request to. If a custom URL was + * provided in the config, that URL is returned. Otherwise, the default URL is + * from the network and API key. + * + * @param apiType - The type of API to get the URL for. + * @internal + */ + _getRequestUrl(apiType) { + if (this.url !== undefined) { + return this.url; + } + else if (apiType === AlchemyApiType.NFT) { + return getAlchemyNftHttpUrl(this.network, this.apiKey); + } + else if (apiType === AlchemyApiType.WEBHOOK) { + return getAlchemyWebhookHttpUrl(); + } + else { + return getAlchemyHttpUrl(this.network, this.apiKey); + } + } + /** + * Returns an AlchemyProvider instance. Only one provider is created per + * Alchemy instance. + * + * The AlchemyProvider is a wrapper around ether's `AlchemyProvider` class and + * has been expanded to support Alchemy's Enhanced APIs. + * + * Most common methods on the provider are available as top-level methods on + * the {@link Alchemy} instance, but the provider is exposed here to access + * other less-common methods. + * + * @public + */ + getProvider() { + if (!this._baseAlchemyProvider) { + this._baseAlchemyProvider = (() => __awaiter(this, void 0, void 0, function* () { + const { AlchemyProvider } = yield import('./alchemy-provider-a776ca8a.js'); + return new AlchemyProvider(this); + }))(); + } + return this._baseAlchemyProvider; + } + /** + * Returns an AlchemyWebsocketProvider instance. Only one provider is created + * per Alchemy instance. + * + * The AlchemyWebSocketProvider is a wrapper around ether's + * `AlchemyWebSocketProvider` class and has been expanded to support Alchemy's + * Subscription APIs, automatic backfilling, and other performance improvements. + * + * Most common methods on the provider are available as top-level methods on + * the {@link Alchemy} instance, but the provider is exposed here to access + * other less-common methods. + */ + getWebSocketProvider() { + if (!this._baseAlchemyWssProvider) { + this._baseAlchemyWssProvider = (() => __awaiter(this, void 0, void 0, function* () { + const { AlchemyWebSocketProvider } = yield import('./alchemy-websocket-provider-35c345f7.js'); + return new AlchemyWebSocketProvider(this); + }))(); + } + return this._baseAlchemyWssProvider; + } +} + +/** + * Converts a hex string to a decimal number. + * + * @param hexString - The hex string to convert. + * @public + */ +function fromHex(hexString) { + return BigNumber.from(hexString).toNumber(); +} +/** + * Converts a number to a hex string. + * + * @param num - The number to convert to hex. + * @public + */ +function toHex(num) { + return BigNumber.from(num).toHexString(); +} +/** + * Checks if a value is a hex string. + * + * @param possibleHexString - The value to check. + * @public + */ +function isHex(possibleHexString) { + return /^0x[0-9a-fA-F]+$/.test(possibleHexString); +} + +function formatBlock(block) { + if (typeof block === 'string') { + return block; + } + else if (Number.isInteger(block)) { + return toHex(block); + } + return block.toString(); +} +function stringToEnum(x, enumb) { + return Object.values(enumb).includes(x) ? x : undefined; +} +function getNftContractFromRaw(rawNftContract) { + return { + address: rawNftContract.address, + name: rawNftContract.contractMetadata.name, + symbol: rawNftContract.contractMetadata.symbol, + totalSupply: rawNftContract.contractMetadata.totalSupply, + tokenType: parseNftTokenType(rawNftContract.contractMetadata.tokenType), + openSea: parseOpenSeaMetadata(rawNftContract.contractMetadata.openSea) + }; +} +function getBaseNftFromRaw(rawBaseNft, contractAddress) { + var _a; + return { + contract: contractAddress + ? { address: contractAddress } + : rawBaseNft.contract, + tokenId: BigNumber.from(rawBaseNft.id.tokenId).toString(), + tokenType: parseNftTokenType((_a = rawBaseNft.id.tokenMetadata) === null || _a === void 0 ? void 0 : _a.tokenType) + }; +} +function getNftFromRaw(rawNft) { + var _a, _b, _c, _d, _e; + try { + const tokenType = parseNftTokenType((_a = rawNft.id.tokenMetadata) === null || _a === void 0 ? void 0 : _a.tokenType); + const spamInfo = parseSpamInfo(rawNft.spamInfo); + return { + contract: { + address: rawNft.contract.address, + name: (_b = rawNft.contractMetadata) === null || _b === void 0 ? void 0 : _b.name, + symbol: (_c = rawNft.contractMetadata) === null || _c === void 0 ? void 0 : _c.symbol, + totalSupply: (_d = rawNft.contractMetadata) === null || _d === void 0 ? void 0 : _d.totalSupply, + tokenType, + openSea: parseOpenSeaMetadata((_e = rawNft.contractMetadata) === null || _e === void 0 ? void 0 : _e.openSea) + }, + tokenId: parseNftTokenId(rawNft.id.tokenId), + tokenType, + title: rawNft.title, + description: parseNftDescription(rawNft.description), + timeLastUpdated: rawNft.timeLastUpdated, + metadataError: rawNft.error, + rawMetadata: rawNft.metadata, + tokenUri: parseNftTokenUri(rawNft.tokenUri), + media: parseNftTokenUriArray(rawNft.media), + spamInfo + }; + } + catch (e) { + throw new Error('Error parsing the NFT response: ' + e); + } +} +function getNftSalesFromRaw(rawNftSales) { + return { + pageKey: rawNftSales === null || rawNftSales === void 0 ? void 0 : rawNftSales.pageKey, + nftSales: rawNftSales.nftSales.map(rawNftSale => ({ + marketplace: parseNftSaleMarketplace(rawNftSale.marketplace), + contractAddress: rawNftSale.contractAddress, + tokenId: rawNftSale.tokenId, + quantity: rawNftSale.quantity, + buyerAddress: rawNftSale.buyerAddress, + sellerAddress: rawNftSale.sellerAddress, + taker: parseNftTaker(rawNftSale.taker), + sellerFee: rawNftSale === null || rawNftSale === void 0 ? void 0 : rawNftSale.sellerFee, + marketplaceFee: rawNftSale === null || rawNftSale === void 0 ? void 0 : rawNftSale.marketplaceFee, + royaltyFee: rawNftSale === null || rawNftSale === void 0 ? void 0 : rawNftSale.royaltyFee, + blockNumber: rawNftSale === null || rawNftSale === void 0 ? void 0 : rawNftSale.blockNumber, + logIndex: rawNftSale.logIndex, + bundleIndex: rawNftSale.bundleIndex, + transactionHash: rawNftSale.transactionHash + })) + }; +} +function parseNftSaleMarketplace(marketplace) { + switch (marketplace) { + case 'looksrare': + return NftSaleMarketplace.LOOKSRARE; + case 'seaport': + return NftSaleMarketplace.SEAPORT; + case 'x2y2': + return NftSaleMarketplace.X2Y2; + default: + return NftSaleMarketplace.UNKNOWN; + } +} +function parseNftTaker(taker) { + // The `.toLowerCase()` call is needed because the API returns the capitalized values + switch (taker.toLowerCase()) { + case 'buyer': + return NftSaleTakerType.BUYER; + case 'seller': + return NftSaleTakerType.SELLER; + default: + throw new Error(`Unsupported NftSaleTakerType ${taker}`); + } +} +function getNftRarityFromRaw(rawNftRarity) { + return rawNftRarity.map(({ prevalence, trait_type, value }) => ({ + prevalence, + traitType: trait_type, + value + })); +} +function getContractsForOwnerFromRaw(rawContractsForOwner) { + return { + pageKey: rawContractsForOwner === null || rawContractsForOwner === void 0 ? void 0 : rawContractsForOwner.pageKey, + totalCount: rawContractsForOwner.totalCount, + contracts: rawContractsForOwner.contracts.map(contract => { + return { + address: contract.address, + totalSupply: contract.totalSupply, + isSpam: contract.isSpam, + media: contract.media, + numDistinctTokensOwned: contract.numDistinctTokensOwned, + tokenId: contract.tokenId, + totalBalance: contract.totalBalance, + name: contract.name, + openSea: parseOpenSeaMetadata(contract === null || contract === void 0 ? void 0 : contract.opensea), + symbol: contract === null || contract === void 0 ? void 0 : contract.symbol, + tokenType: parseNftTokenType(contract === null || contract === void 0 ? void 0 : contract.tokenType) + }; + }) + }; +} +function parseNftTokenId(tokenId) { + // We have to normalize the token id here since the backend sometimes + // returns the token ID as a hex string and sometimes as an integer. + return BigNumber.from(tokenId).toString(); +} +function parseNftTokenType(tokenType) { + switch (tokenType) { + case 'erc721': + case 'ERC721': + return NftTokenType.ERC721; + case 'erc1155': + case 'ERC1155': + return NftTokenType.ERC1155; + default: + return NftTokenType.UNKNOWN; + } +} +function parseSpamInfo(spamInfo) { + if (!spamInfo) { + return undefined; + } + const { isSpam, classifications } = spamInfo; + return { + isSpam: isSpam === 'true', + classifications + }; +} +function parseNftDescription(description) { + if (description === undefined) { + return ''; + } + // TODO: Remove after backend adds JSON stringification. + if (!Array.isArray(description) && typeof description === 'object') { + return JSON.stringify(description); + } + return typeof description === 'string' ? description : description.join(' '); +} +function parseNftTokenUri(uri) { + if (uri && uri.raw.length === 0 && uri.gateway.length == 0) { + return undefined; + } + return uri; +} +function parseNftTokenUriArray(arr) { + if (arr === undefined) { + return []; + } + return arr.filter(uri => parseNftTokenUri(uri) !== undefined); +} +function parseOpenSeaMetadata(openSea) { + if (openSea === undefined) { + return undefined; + } + return { + floorPrice: openSea.floorPrice, + collectionName: openSea.collectionName, + safelistRequestStatus: openSea.safelistRequestStatus !== undefined + ? stringToEnum(openSea.safelistRequestStatus, OpenSeaSafelistRequestStatus) + : undefined, + imageUrl: openSea.imageUrl, + description: openSea.description, + externalUrl: openSea.externalUrl, + twitterUsername: openSea.twitterUsername, + discordUrl: openSea.discordUrl, + lastIngestedAt: openSea.lastIngestedAt + }; +} +const IS_BROWSER = typeof window !== 'undefined' && window !== null; + +/** + * The core namespace contains all commonly-used [Ethers.js + * Provider](https://docs.ethers.io/v5/api/providers/api-providers/#AlchemyProvider) + * methods. If you are already using Ethers.js, you should be simply able to + * replace the Ethers.js Provider object with `alchemy.core` when accessing + * provider methods and it should just work. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.core`. + */ +class CoreNamespace { + /** @internal */ + constructor(config) { + this.config = config; + } + /** + * Returns the balance of a given address as of the provided block. + * + * @param addressOrName The address or name of the account to get the balance for. + * @param blockTag The optional block number or hash to get the balance for. + * Defaults to 'latest' if unspecified. + * @public + */ + getBalance(addressOrName, blockTag) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getBalance(addressOrName, blockTag); + }); + } + /** + * Returns the contract code of the provided address at the block. If there is + * no contract deployed, the result is `0x`. + * + * @param addressOrName The address or name of the account to get the code for. + * @param blockTag The optional block number or hash to get the code for. + * Defaults to 'latest' if unspecified. + * @public + */ + getCode(addressOrName, blockTag) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getCode(addressOrName, blockTag); + }); + } + /** + * Return the value of the provided position at the provided address, at the + * provided block in `Bytes32` format. + * + * @param addressOrName The address or name of the account to get the code for. + * @param position The position of the storage slot to get. + * @param blockTag The optional block number or hash to get the code for. + * Defaults to 'latest' if unspecified. + * @public + */ + getStorageAt(addressOrName, position, blockTag) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getStorageAt(addressOrName, position, blockTag); + }); + } + /** + * Returns the number of transactions ever sent from the provided address, as + * of the provided block tag. This value is used as the nonce for the next + * transaction from the address sent to the network. + * + * @param addressOrName The address or name of the account to get the nonce for. + * @param blockTag The optional block number or hash to get the nonce for. + * @public + */ + getTransactionCount(addressOrName, blockTag) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getTransactionCount(addressOrName, blockTag); + }); + } + /** + * Returns the block from the network based on the provided block number or + * hash. Transactions on the block are represented as an array of transaction + * hashes. To get the full transaction details on the block, use + * {@link getBlockWithTransactions} instead. + * + * @param blockHashOrBlockTag The block number or hash to get the block for. + * @public + */ + getBlock(blockHashOrBlockTag) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getBlock(blockHashOrBlockTag); + }); + } + /** + * Returns the block from the network based on the provided block number or + * hash. Transactions on the block are represented as an array of + * {@link TransactionResponse} objects. + * + * @param blockHashOrBlockTag The block number or hash to get the block for. + * @public + */ + getBlockWithTransactions(blockHashOrBlockTag) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getBlockWithTransactions(blockHashOrBlockTag); + }); + } + /** + * Returns the {@link EthersNetworkAlias} Alchemy is connected to. + * + * @public + */ + getNetwork() { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getNetwork(); + }); + } + /** + * Returns the block number of the most recently mined block. + * + * @public + */ + getBlockNumber() { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getBlockNumber(); + }); + } + /** + * Returns the best guess of the current gas price to use in a transaction. + * + * @public + */ + getGasPrice() { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getGasPrice(); + }); + } + /** + * Returns the recommended fee data to use in a transaction. + * + * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas + * should be used. + * + * For legacy transactions and networks which do not support EIP-1559, the + * gasPrice should be used. + * + * @public + */ + getFeeData() { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getFeeData(); + }); + } + /** + * Returns a Promise which will stall until the network has heen established, + * ignoring errors due to the target node not being active yet. + * + * This can be used for testing or attaching scripts to wait until the node is + * up and running smoothly. + * + * @public + */ + ready() { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.ready; + }); + } + /** + * Returns the result of executing the transaction, using call. A call does + * not require any ether, but cannot change any state. This is useful for + * calling getters on Contracts. + * + * @param transaction The transaction to execute. + * @param blockTag The optional block number or hash to get the call for. + * @public + */ + call(transaction, blockTag) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.call(transaction, blockTag); + }); + } + /** + * Returns an estimate of the amount of gas that would be required to submit + * transaction to the network. + * + * An estimate may not be accurate since there could be another transaction on + * the network that was not accounted for, but after being mined affects the + * relevant state. + * + * This is an alias for {@link TransactNamespace.estimateGas}. + * + * @param transaction The transaction to estimate gas for. + * @public + */ + estimateGas(transaction) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.estimateGas(transaction); + }); + } + /** + * Returns the transaction with hash or null if the transaction is unknown. + * + * If a transaction has not been mined, this method will search the + * transaction pool. Various backends may have more restrictive transaction + * pool access (e.g. if the gas price is too low or the transaction was only + * recently sent and not yet indexed) in which case this method may also return null. + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransaction(transactionHash) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getTransaction(transactionHash); + }); + } + /** + * Returns the transaction receipt for hash or null if the transaction has not + * been mined. + * + * To stall until the transaction has been mined, consider the + * waitForTransaction method below. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransactionReceipt(transactionHash) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getTransactionReceipt(transactionHash); + }); + } + /** + * Submits transaction to the network to be mined. The transaction must be + * signed, and be valid (i.e. the nonce is correct and the account has + * sufficient balance to pay for the transaction). + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param signedTransaction The signed transaction to send. + * @public + */ + sendTransaction(signedTransaction) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.sendTransaction(signedTransaction); + }); + } + /** + * Returns a promise which will not resolve until specified transaction hash is mined. + * + * If {@link confirmations} is 0, this method is non-blocking and if the + * transaction has not been mined returns null. Otherwise, this method will + * block until the transaction has confirmed blocks mined on top of the block + * in which it was mined. + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to wait for. + * @param confirmations The number of blocks to wait for. + * @param timeout The maximum time to wait for the transaction to confirm. + * @public + */ + waitForTransaction(transactionHash, confirmations, timeout) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.waitForTransaction(transactionHash, confirmations, timeout); + }); + } + /** + * Returns an array of logs that match the provided filter. + * + * @param filter The filter object to use. + * @public + */ + getLogs(filter) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getLogs(filter); + }); + } + /** + * Allows sending a raw message to the Alchemy backend. + * + * @param method The method to call. + * @param params The parameters to pass to the method. + * @public + */ + send(method, params) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.send(method, params); + }); + } + /** + * Finds the address that deployed the provided contract and block number it + * was deployed in. + * + * NOTE: This method performs a binary search across all blocks since genesis + * and can take a long time to complete. This method is a convenience method + * that will eventually be replaced by a single call to an Alchemy endpoint + * with this information cached. + * + * @param contractAddress - The contract address to find the deployer for. + * @beta + */ + findContractDeployer(contractAddress) { + var _a; + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + const currentBlockNum = yield provider.getBlockNumber(); + if ((yield provider.getCode(contractAddress, currentBlockNum)) === + ETH_NULL_VALUE) { + throw new Error(`Contract '${contractAddress}' does not exist`); + } + // Binary search for the block number that the contract was deployed in. + const firstBlock = yield binarySearchFirstBlock(0, currentBlockNum + 1, contractAddress, this.config); + // Find the first transaction in the block that matches the provided address. + const txReceipts = yield this.getTransactionReceipts({ + blockNumber: toHex(firstBlock) + }); + const matchingReceipt = (_a = txReceipts.receipts) === null || _a === void 0 ? void 0 : _a.find(receipt => receipt.contractAddress === contractAddress.toLowerCase()); + return { + deployerAddress: matchingReceipt === null || matchingReceipt === void 0 ? void 0 : matchingReceipt.from, + blockNumber: firstBlock + }; + }); + } + getTokenBalances(addressOrName, contractAddressesOrOptions) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + const address = yield provider._getAddress(addressOrName); + if (Array.isArray(contractAddressesOrOptions)) { + if (contractAddressesOrOptions.length > 1500) { + throw new Error('You cannot pass in more than 1500 contract addresses to getTokenBalances()'); + } + if (contractAddressesOrOptions.length === 0) { + throw new Error('getTokenBalances() requires at least one contractAddress when using an array'); + } + return provider._send('alchemy_getTokenBalances', [address, contractAddressesOrOptions], 'getTokenBalances'); + } + else { + const tokenType = contractAddressesOrOptions === undefined + ? TokenBalanceType.ERC20 + : contractAddressesOrOptions.type; + const params = [address, tokenType]; + if ((contractAddressesOrOptions === null || contractAddressesOrOptions === void 0 ? void 0 : contractAddressesOrOptions.type) === TokenBalanceType.ERC20 && + contractAddressesOrOptions.pageKey) { + params.push({ pageKey: contractAddressesOrOptions.pageKey }); + } + return provider._send('alchemy_getTokenBalances', params, 'getTokenBalances'); + } + }); + } + /** + * Returns metadata for a given token contract address. + * + * @param address The contract address to get metadata for. + * @public + */ + getTokenMetadata(address) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider._send('alchemy_getTokenMetadata', [address], 'getTokenMetadata'); + }); + } + getAssetTransfers(params) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + if (params.fromAddress) { + params.fromAddress = yield provider._getAddress(params.fromAddress); + } + if (params.toAddress) { + params.toAddress = yield provider._getAddress(params.toAddress); + } + return provider._send('alchemy_getAssetTransfers', [ + Object.assign(Object.assign({}, params), { fromBlock: params.fromBlock != null + ? formatBlock(params.fromBlock) + : undefined, toBlock: params.toBlock != null ? formatBlock(params.toBlock) : undefined, maxCount: params.maxCount != null ? toHex(params.maxCount) : undefined }) + ], 'getAssetTransfers'); + }); + } + /** + * Gets all transaction receipts for a given block by number or block hash. + * + * @param params An object containing fields for the transaction receipt query. + * @public + */ + getTransactionReceipts(params) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider._send('alchemy_getTransactionReceipts', [params], 'getTransactionReceipts'); + }); + } + /** + * Returns the underlying owner address for the provided ENS address, or `null` + * if the ENS name does not have an underlying address. + * + * @param name The ENS address name to resolve. + */ + resolveName(name) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.resolveName(name); + }); + } + /** + * Performs a reverse lookup of the address in ENS using the Reverse Registrar. If the name does not exist, or the forward lookup does not match, null is returned. + * + * An ENS name requires additional configuration to setup a reverse record, so not all ENS addresses will map back to the original ENS domain. + * + * @param address The address to look up the ENS domain name for. + */ + lookupAddress(address) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.lookupAddress(address); + }); + } +} +/** + * Perform a binary search between an integer range of block numbers to find the + * block number where the contract was deployed. + * + * @internal + */ +function binarySearchFirstBlock(start, end, address, config) { + return __awaiter(this, void 0, void 0, function* () { + if (start >= end) { + return end; + } + const mid = Math.floor((start + end) / 2); + const provider = yield config.getProvider(); + const code = yield provider.getCode(address, mid); + if (code === ETH_NULL_VALUE) { + return binarySearchFirstBlock(mid + 1, end, address, config); + } + return binarySearchFirstBlock(start, mid, address, config); + }); +} + +/** + * The SDK has 4 log levels and a 5th option for disabling all logging. By + * default, the log level is set to INFO. + * + * The order is a follows: DEBUG < INFO < WARN < ERROR + * + * All log types above the current log level will be outputted. + */ +var LogLevel; +(function (LogLevel) { + LogLevel[LogLevel["DEBUG"] = 0] = "DEBUG"; + LogLevel[LogLevel["INFO"] = 1] = "INFO"; + LogLevel[LogLevel["WARN"] = 2] = "WARN"; + LogLevel[LogLevel["ERROR"] = 3] = "ERROR"; + LogLevel[LogLevel["SILENT"] = 4] = "SILENT"; +})(LogLevel || (LogLevel = {})); +const logLevelStringToEnum = { + debug: LogLevel.DEBUG, + info: LogLevel.INFO, + warn: LogLevel.WARN, + error: LogLevel.ERROR, + silent: LogLevel.SILENT +}; +// HACKY: Use the console method as a string rather than the function itself +// in order to allow for mocking in tests. +const logLevelToConsoleFn = { + [LogLevel.DEBUG]: 'log', + [LogLevel.INFO]: 'info', + [LogLevel.WARN]: 'warn', + [LogLevel.ERROR]: 'error' +}; +const DEFAULT_LOG_LEVEL = LogLevel.INFO; +/** + * Configures the verbosity of logging. The default log level is `info`. + * + * @param logLevel - The verbosity of logging. Can be any of the following values: + * + * - `debug`: The most verbose logging level. + * - `info`: The default logging level. + * - `warn`: A logging level for non-critical issues. + * - `error`: A logging level for critical issues. + * - `silent`: Turn off all logging. + * + * @public + */ +function setLogLevel(logLevel) { + loggerClient.logLevel = logLevelStringToEnum[logLevel]; +} +function logDebug(message, ...args) { + loggerClient.debug(message, args); +} +function logInfo(message, ...args) { + loggerClient.info(message, args); +} +function logWarn(message, ...args) { + loggerClient.warn(message, args); +} +class Logger { + constructor() { + /** The log level of the given Logger instance. */ + this._logLevel = DEFAULT_LOG_LEVEL; + } + get logLevel() { + return this._logLevel; + } + set logLevel(val) { + if (!(val in LogLevel)) { + throw new TypeError(`Invalid value "${val}" assigned to \`logLevel\``); + } + this._logLevel = val; + } + debug(...args) { + this._log(LogLevel.DEBUG, ...args); + } + info(...args) { + this._log(LogLevel.INFO, ...args); + } + warn(...args) { + this._log(LogLevel.WARN, ...args); + } + error(...args) { + this._log(LogLevel.ERROR, ...args); + } + /** + * Forwards log messages to their corresponding console counterparts if the + * log level allows it. + */ + _log(logLevel, ...args) { + if (logLevel < this._logLevel) { + return; + } + const now = new Date().toISOString(); + const method = logLevelToConsoleFn[logLevel]; + if (method) { + console[method](`[${now}] Alchemy:`, ...args.map(stringify)); + } + else { + throw new Error(`Logger received an invalid logLevel (value: ${logLevel})`); + } + } +} +function stringify(obj) { + if (typeof obj === 'string') { + return obj; + } + else { + try { + return JSON.stringify(obj); + } + catch (e) { + // Failed to convert to JSON, log the object directly. + return obj; + } + } +} +// Instantiate default logger for the SDK. +const loggerClient = new Logger(); + +// This file is autogenerated by injectVersion.js. Any changes will be +// overwritten on commit! +const VERSION = '2.2.5'; + +/** + * Given a REST endpoint, method, and params, sends the request with axios and + * returns the response. + */ +/** + * Helper function to send http requests using Axis. + * + * @private + */ +function sendAxiosRequest(baseUrl, restApiName, methodName, params, overrides) { + var _a; + const requestUrl = baseUrl + '/' + restApiName; + const config = Object.assign(Object.assign({}, overrides), { headers: Object.assign(Object.assign(Object.assign({}, overrides === null || overrides === void 0 ? void 0 : overrides.headers), (!IS_BROWSER && { 'Accept-Encoding': 'gzip' })), { 'Alchemy-Ethers-Sdk-Version': VERSION, 'Alchemy-Ethers-Sdk-Method': methodName }), method: (_a = overrides === null || overrides === void 0 ? void 0 : overrides.method) !== null && _a !== void 0 ? _a : 'GET', url: requestUrl, params }); + return axios(config); +} + +const DEFAULT_BACKOFF_INITIAL_DELAY_MS = 1000; +const DEFAULT_BACKOFF_MULTIPLIER = 1.5; +const DEFAULT_BACKOFF_MAX_DELAY_MS = 30 * 1000; +const DEFAULT_BACKOFF_MAX_ATTEMPTS = 5; +/** + * Helper class for implementing exponential backoff and max retry attempts. + * + * @private + * @internal + */ +class ExponentialBackoff { + constructor(maxAttempts = DEFAULT_BACKOFF_MAX_ATTEMPTS) { + this.maxAttempts = maxAttempts; + this.initialDelayMs = DEFAULT_BACKOFF_INITIAL_DELAY_MS; + this.backoffMultiplier = DEFAULT_BACKOFF_MULTIPLIER; + this.maxDelayMs = DEFAULT_BACKOFF_MAX_DELAY_MS; + this.numAttempts = 0; + this.currentDelayMs = 0; + this.isInBackoff = false; + } + /** + * Returns a promise that resolves after the the backoff delay. The delay is + * increased for each attempt. The promise is rejected if the maximum number + * of attempts is exceeded. + */ + // TODO: beautify this into an async iterator. + backoff() { + if (this.numAttempts >= this.maxAttempts) { + return Promise.reject(new Error(`Exceeded maximum number of attempts: ${this.maxAttempts}`)); + } + if (this.isInBackoff) { + return Promise.reject(new Error('A backoff operation is already in progress')); + } + const backoffDelayWithJitterMs = this.withJitterMs(this.currentDelayMs); + if (backoffDelayWithJitterMs > 0) { + logDebug('ExponentialBackoff.backoff', `Backing off for ${backoffDelayWithJitterMs}ms`); + } + // Calculate the next delay. + this.currentDelayMs *= this.backoffMultiplier; + this.currentDelayMs = Math.max(this.currentDelayMs, this.initialDelayMs); + this.currentDelayMs = Math.min(this.currentDelayMs, this.maxDelayMs); + this.numAttempts += 1; + return new Promise(resolve => { + this.isInBackoff = true; + setTimeout(() => { + this.isInBackoff = false; + resolve(); + }, backoffDelayWithJitterMs); + }); + } + /** + * Applies +/- 50% jitter to the backoff delay, up to the max delay cap. + * + * @private + * @param delayMs + */ + withJitterMs(delayMs) { + return Math.min(delayMs + (Math.random() - 0.5) * delayMs, this.maxDelayMs); + } +} + +/** + * A wrapper function to make http requests and retry if the request fails. + * + * @internal + */ +// TODO: Wrap Axios error in AlchemyError. +function requestHttpWithBackoff(config, apiType, restApiName, methodName, params, overrides) { + return __awaiter(this, void 0, void 0, function* () { + let lastError = undefined; + const backoff = new ExponentialBackoff(config.maxRetries); + for (let attempt = 0; attempt < config.maxRetries + 1; attempt++) { + try { + if (lastError !== undefined) { + logInfo('requestHttp', `Retrying after error: ${lastError.message}`); + } + try { + yield backoff.backoff(); + } + catch (err) { + // Backoff errors when the maximum number of attempts is reached. Break + // out of the loop to preserve the last error. + break; + } + const response = yield sendAxiosRequest(config._getRequestUrl(apiType), restApiName, methodName, params, overrides); + if (response.status === 200) { + logDebug(restApiName, `Successful request: ${restApiName}`); + return response.data; + } + else { + logInfo(restApiName, `Request failed: ${restApiName}, ${response.status}, ${response.data}`); + lastError = new Error(response.status + ': ' + response.data); + } + } + catch (err) { + if (!axios.isAxiosError(err) || err.response === undefined) { + throw err; + } + // TODO: Standardize all errors into AlchemyError + lastError = new Error(err.response.status + ': ' + err.response.data); + if (!isRetryableHttpError(err, apiType)) { + break; + } + } + } + return Promise.reject(lastError); + }); +} +function isRetryableHttpError(err, apiType) { + // TODO: remove 500s after webhooks are more stable. + const retryableCodes = apiType === AlchemyApiType.WEBHOOK ? [429, 500] : [429]; + return (err.response !== undefined && retryableCodes.includes(err.response.status)); +} +/** + * Fetches all pages in a paginated endpoint, given a `pageKey` field that + * represents the property name containing the next page token. + * + * @internal + */ +function paginateEndpoint(config, apiType, restApiName, methodName, reqPageKey, resPageKey, params) { + return __asyncGenerator(this, arguments, function* paginateEndpoint_1() { + let hasNext = true; + const requestParams = Object.assign({}, params); + while (hasNext) { + const response = yield __await(requestHttpWithBackoff(config, apiType, restApiName, methodName, requestParams)); + yield yield __await(response); + if (response[resPageKey] !== undefined) { + requestParams[reqPageKey] = response[resPageKey]; + } + else { + hasNext = false; + } + } + }); +} + +function getNftMetadata(config, contractAddress, tokenId, tokenType, tokenUriTimeoutInMs, srcMethod = 'getNftMetadata') { + return __awaiter(this, void 0, void 0, function* () { + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getNFTMetadata', srcMethod, { + contractAddress, + tokenId: BigNumber.from(tokenId).toString(), + tokenType: tokenType !== NftTokenType.UNKNOWN ? tokenType : undefined, + tokenUriTimeoutInMs + }); + return getNftFromRaw(response); + }); +} +function getNftMetadataBatch(config, tokens, options) { + return __awaiter(this, void 0, void 0, function* () { + const data = { + tokens, + tokenUriTimeoutInMs: options === null || options === void 0 ? void 0 : options.tokenUriTimeoutInMs, + refreshCache: options === null || options === void 0 ? void 0 : options.refreshCache + }; + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getNFTMetadataBatch', 'getNftMetadataBatch', {}, { + method: 'POST', + data + }); + return response.map(getNftFromRaw); + }); +} +function getContractMetadata(config, contractAddress, srcMethod = 'getContractMetadata') { + return __awaiter(this, void 0, void 0, function* () { + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getContractMetadata', srcMethod, { + contractAddress + }); + return getNftContractFromRaw(response); + }); +} +function getNftsForOwnerIterator(config, owner, options, srcMethod = 'getNftsForOwnerIterator') { + return __asyncGenerator(this, arguments, function* getNftsForOwnerIterator_1() { + var e_1, _a; + const withMetadata = omitMetadataToWithMetadata(options === null || options === void 0 ? void 0 : options.omitMetadata); + try { + for (var _b = __asyncValues(paginateEndpoint(config, AlchemyApiType.NFT, 'getNFTs', srcMethod, 'pageKey', 'pageKey', { + contractAddresses: options === null || options === void 0 ? void 0 : options.contractAddresses, + pageKey: options === null || options === void 0 ? void 0 : options.pageKey, + filters: options === null || options === void 0 ? void 0 : options.excludeFilters, + owner, + withMetadata + })), _c; _c = yield __await(_b.next()), !_c.done;) { + const response = _c.value; + for (const ownedNft of response.ownedNfts) { + yield yield __await(Object.assign(Object.assign({}, nftFromGetNftResponse(ownedNft)), { balance: parseInt(ownedNft.balance) })); + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b)); + } + finally { if (e_1) throw e_1.error; } + } + }); +} +function getNftsForOwner(config, owner, options, srcMethod = 'getNftsForOwner') { + return __awaiter(this, void 0, void 0, function* () { + const withMetadata = omitMetadataToWithMetadata(options === null || options === void 0 ? void 0 : options.omitMetadata); + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getNFTs', srcMethod, { + contractAddresses: options === null || options === void 0 ? void 0 : options.contractAddresses, + pageKey: options === null || options === void 0 ? void 0 : options.pageKey, + filters: options === null || options === void 0 ? void 0 : options.excludeFilters, + excludeFilters: options === null || options === void 0 ? void 0 : options.excludeFilters, + includeFilters: options === null || options === void 0 ? void 0 : options.includeFilters, + owner, + pageSize: options === null || options === void 0 ? void 0 : options.pageSize, + withMetadata, + tokenUriTimeoutInMs: options === null || options === void 0 ? void 0 : options.tokenUriTimeoutInMs, + orderBy: options === null || options === void 0 ? void 0 : options.orderBy + }); + return { + ownedNfts: response.ownedNfts.map(res => (Object.assign(Object.assign({}, nftFromGetNftResponse(res)), { balance: parseInt(res.balance) }))), + pageKey: response.pageKey, + totalCount: response.totalCount + }; + }); +} +function getNftsForContract(config, contractAddress, options, srcMethod = 'getNftsForContract') { + var _a; + return __awaiter(this, void 0, void 0, function* () { + const withMetadata = omitMetadataToWithMetadata(options === null || options === void 0 ? void 0 : options.omitMetadata); + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getNFTsForCollection', srcMethod, { + contractAddress, + startToken: options === null || options === void 0 ? void 0 : options.pageKey, + withMetadata, + limit: (_a = options === null || options === void 0 ? void 0 : options.pageSize) !== null && _a !== void 0 ? _a : undefined, + tokenUriTimeoutInMs: 50 + }); + return { + nfts: response.nfts.map(res => nftFromGetNftContractResponse(res, contractAddress)), + pageKey: response.nextToken + }; + }); +} +function getNftsForContractIterator(config, contractAddress, options, srcMethod = 'getNftsForContractIterator') { + return __asyncGenerator(this, arguments, function* getNftsForContractIterator_1() { + var e_2, _a; + const withMetadata = omitMetadataToWithMetadata(options === null || options === void 0 ? void 0 : options.omitMetadata); + try { + for (var _b = __asyncValues(paginateEndpoint(config, AlchemyApiType.NFT, 'getNFTsForCollection', srcMethod, 'startToken', 'nextToken', { + contractAddress, + startToken: options === null || options === void 0 ? void 0 : options.pageKey, + withMetadata + })), _c; _c = yield __await(_b.next()), !_c.done;) { + const response = _c.value; + for (const nft of response.nfts) { + yield yield __await(nftFromGetNftContractResponse(nft, contractAddress)); + } + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b)); + } + finally { if (e_2) throw e_2.error; } + } + }); +} +function getOwnersForContract(config, contractAddress, options, srcMethod = 'getOwnersForContract') { + return __awaiter(this, void 0, void 0, function* () { + // Cast to `any` to avoid more type wrangling. + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getOwnersForCollection', srcMethod, Object.assign(Object.assign({}, options), { contractAddress })); + return Object.assign({ owners: response.ownerAddresses }, (response.pageKey !== undefined && { pageKey: response.pageKey })); + }); +} +function getContractsForOwner(config, owner, options, srcMethod = 'getContractsForOwner') { + return __awaiter(this, void 0, void 0, function* () { + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getContractsForOwner', srcMethod, { + owner, + excludeFilters: options === null || options === void 0 ? void 0 : options.excludeFilters, + includeFilters: options === null || options === void 0 ? void 0 : options.includeFilters, + pageKey: options === null || options === void 0 ? void 0 : options.pageKey, + orderBy: options === null || options === void 0 ? void 0 : options.orderBy + }); + return getContractsForOwnerFromRaw(response); + }); +} +function getOwnersForNft(config, contractAddress, tokenId, srcMethod = 'getOwnersForNft') { + return __awaiter(this, void 0, void 0, function* () { + return requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getOwnersForToken', srcMethod, { + contractAddress, + tokenId: BigNumber.from(tokenId).toString() + }); + }); +} +function checkNftOwnership(config, owner, contractAddresses, srcMethod = 'checkNftOwnership') { + return __awaiter(this, void 0, void 0, function* () { + if (contractAddresses.length === 0) { + throw new Error('Must provide at least one contract address'); + } + const response = yield getNftsForOwner(config, owner, { + contractAddresses, + omitMetadata: true + }, srcMethod); + return response.ownedNfts.length > 0; + }); +} +function verifyNftOwnership(config, owner, contractAddresses, srcMethod = 'verifyNftOwnership') { + return __awaiter(this, void 0, void 0, function* () { + if (typeof contractAddresses === 'string') { + const response = yield getNftsForOwner(config, owner, { + contractAddresses: [contractAddresses], + omitMetadata: true + }, srcMethod); + return response.ownedNfts.length > 0; + } + else { + if (contractAddresses.length === 0) { + throw new Error('Must provide at least one contract address'); + } + const response = yield getNftsForOwner(config, owner, { + contractAddresses, + omitMetadata: true + }, srcMethod); + // Create map where all input contract addresses are set to false, then flip + // owned nfts to true. + const result = contractAddresses.reduce((acc, curr) => { + acc[curr] = false; + return acc; + }, {}); + for (const nft of response.ownedNfts) { + result[nft.contract.address] = true; + } + return result; + } + }); +} +function isSpamContract(config, contractAddress, srcMethod = 'isSpamContract') { + return __awaiter(this, void 0, void 0, function* () { + return requestHttpWithBackoff(config, AlchemyApiType.NFT, 'isSpamContract', srcMethod, { + contractAddress + }); + }); +} +function getSpamContracts(config, srcMethod = 'getSpamContracts') { + return __awaiter(this, void 0, void 0, function* () { + return requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getSpamContracts', srcMethod, undefined); + }); +} +function getFloorPrice(config, contractAddress, srcMethod = 'getFloorPrice') { + return __awaiter(this, void 0, void 0, function* () { + return requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getFloorPrice', srcMethod, { + contractAddress + }); + }); +} +function getNftSales(config, options = {}, srcMethod = 'getNftSales') { + return __awaiter(this, void 0, void 0, function* () { + // Avoid ts compiler complaining about the contractAddress field. + const params = Object.assign({}, options); + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getNFTSales', srcMethod, { + fromBlock: params === null || params === void 0 ? void 0 : params.fromBlock, + toBlock: params === null || params === void 0 ? void 0 : params.toBlock, + order: params === null || params === void 0 ? void 0 : params.order, + marketplace: params === null || params === void 0 ? void 0 : params.marketplace, + contractAddress: params === null || params === void 0 ? void 0 : params.contractAddress, + tokenId: (params === null || params === void 0 ? void 0 : params.tokenId) + ? BigNumber.from(params === null || params === void 0 ? void 0 : params.tokenId).toString() + : undefined, + sellerAddress: params === null || params === void 0 ? void 0 : params.sellerAddress, + buyerAddress: params === null || params === void 0 ? void 0 : params.buyerAddress, + taker: params === null || params === void 0 ? void 0 : params.taker, + limit: params === null || params === void 0 ? void 0 : params.limit, + pageKey: params === null || params === void 0 ? void 0 : params.pageKey + }); + return getNftSalesFromRaw(response); + }); +} +function computeRarity(config, contractAddress, tokenId, srcMethod = 'computeRarity') { + return __awaiter(this, void 0, void 0, function* () { + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'computeRarity', srcMethod, { + contractAddress, + tokenId: BigNumber.from(tokenId).toString() + }); + return getNftRarityFromRaw(response); + }); +} +function searchContractMetadata(config, query, srcMethod = 'searchContractMetadata') { + return __awaiter(this, void 0, void 0, function* () { + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'searchContractMetadata', srcMethod, { + query + }); + return response.map(getNftContractFromRaw); + }); +} +function summarizeNftAttributes(config, contractAddress, srcMethod = 'summarizeNftAttributes') { + return __awaiter(this, void 0, void 0, function* () { + return requestHttpWithBackoff(config, AlchemyApiType.NFT, 'summarizeNftAttributes', srcMethod, { + contractAddress + }); + }); +} +function refreshNftMetadata(config, contractAddress, tokenId, srcMethod = 'refreshNftMetadata') { + return __awaiter(this, void 0, void 0, function* () { + const tokenIdString = BigNumber.from(tokenId).toString(); + const first = yield getNftMetadata(config, contractAddress, tokenIdString, undefined, undefined, srcMethod); + const second = yield refresh(config, contractAddress, tokenIdString, srcMethod); + return first.timeLastUpdated !== second.timeLastUpdated; + }); +} +function refreshContract(config, contractAddress, srcMethod = 'refreshContract') { + return __awaiter(this, void 0, void 0, function* () { + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'reingestContract', srcMethod, { + contractAddress + }); + return { + contractAddress: response.contractAddress, + refreshState: parseReingestionState(response.reingestionState), + progress: response.progress + }; + }); +} +function refresh(config, contractAddress, tokenId, srcMethod) { + return __awaiter(this, void 0, void 0, function* () { + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getNFTMetadata', srcMethod, { + contractAddress, + tokenId: BigNumber.from(tokenId).toString(), + refreshCache: true + }); + return getNftFromRaw(response); + }); +} +/** + * Helper method to convert a NFT response received from Alchemy backend to an + * SDK NFT type. + * + * @internal + */ +function nftFromGetNftResponse(ownedNft) { + if (isNftWithMetadata(ownedNft)) { + return getNftFromRaw(ownedNft); + } + else { + return getBaseNftFromRaw(ownedNft); + } +} +/** + * Helper method to convert a NFT response received from Alchemy backend to an + * SDK NFT type. + * + * @internal + */ +function nftFromGetNftContractResponse(ownedNft, contractAddress) { + if (isNftWithMetadata(ownedNft)) { + return getNftFromRaw(ownedNft); + } + else { + return getBaseNftFromRaw(ownedNft, contractAddress); + } +} +/** @internal */ +// TODO: more comprehensive type check +function isNftWithMetadata(response) { + return response.title !== undefined; +} +/** + * Flips the `omitMetadata` SDK parameter type to the `withMetadata` parameter + * required by the Alchemy API. If `omitMetadata` is undefined, the SDK defaults + * to including metadata. + * + * @internal + */ +function omitMetadataToWithMetadata(omitMetadata) { + return omitMetadata === undefined ? true : !omitMetadata; +} +function parseReingestionState(reingestionState) { + switch (reingestionState) { + case 'does_not_exist': + return RefreshState.DOES_NOT_EXIST; + case 'already_queued': + return RefreshState.ALREADY_QUEUED; + case 'in_progress': + return RefreshState.IN_PROGRESS; + case 'finished': + return RefreshState.FINISHED; + case 'queued': + return RefreshState.QUEUED; + case 'queue_failed': + return RefreshState.QUEUE_FAILED; + default: + throw new Error('Unknown reingestion state: ' + reingestionState); + } +} + +/** + * The NFT namespace contains all the functionality related to NFTs. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.nft`. + */ +class NftNamespace { + /** @internal */ + constructor(config) { + this.config = config; + } + /** + * Get the NFT metadata associated with the provided parameters. + * + * @param contractAddress - The contract address of the NFT. + * @param tokenId - Token id of the NFT. + * @param tokenType - Optionally specify the type of token to speed up the query. + * @param tokenUriTimeoutInMs - No set timeout by default - When metadata is + * requested, this parameter is the timeout (in milliseconds) for the + * website hosting the metadata to respond. If you want to only access the + * cache and not live fetch any metadata for cache misses then set this value to 0. + * @public + */ + getNftMetadata(contractAddress, tokenId, tokenType, tokenUriTimeoutInMs) { + return getNftMetadata(this.config, contractAddress, tokenId, tokenType, tokenUriTimeoutInMs); + } + /** + * Gets the NFT metadata for multiple NFT tokens. + * + * @param tokens An array of NFT tokens to fetch metadata for. + * @param options Configuration options for making the request. + */ + getNftMetadataBatch(tokens, options) { + return getNftMetadataBatch(this.config, tokens, options); + } + /** + * Get the NFT collection metadata associated with the provided parameters. + * + * @param contractAddress - The contract address of the NFT. + * @public + */ + getContractMetadata(contractAddress) { + return getContractMetadata(this.config, contractAddress); + } + getNftsForOwnerIterator(owner, options) { + return getNftsForOwnerIterator(this.config, owner, options); + } + getNftsForOwner(owner, options) { + return getNftsForOwner(this.config, owner, options); + } + getNftsForContract(contractAddress, options) { + return getNftsForContract(this.config, contractAddress, options); + } + getNftsForContractIterator(contractAddress, options) { + return getNftsForContractIterator(this.config, contractAddress, options); + } + getOwnersForContract(contractAddress, options) { + return getOwnersForContract(this.config, contractAddress, options); + } + /** + * Gets all the owners for a given NFT contract address and token ID. + * + * @param contractAddress - The NFT contract address. + * @param tokenId - Token id of the NFT. + * @beta + */ + getOwnersForNft(contractAddress, tokenId) { + return getOwnersForNft(this.config, contractAddress, tokenId); + } + /** + * Gets all NFT contracts held by the specified owner address. + * + * @param owner - Address for NFT owner (can be in ENS format!). + * @param options - The optional parameters to use for the request. + * @public + */ + getContractsForOwner(owner, options) { + return getContractsForOwner(this.config, owner, options); + } + /** + * DEPRECATED - Checks that the provided owner address owns one of more of the + * provided NFTs. + * + * @deprecated - Use {@link verifyNftOwnership} instead. This method will be + * removed in a future release. + * @param owner - The owner address to check. + * @param contractAddresses - An array of NFT contract addresses to check ownership for. + */ + checkNftOwnership(owner, contractAddresses) { + return checkNftOwnership(this.config, owner, contractAddresses); + } + verifyNftOwnership(owner, contractAddress) { + return verifyNftOwnership(this.config, owner, contractAddress); + } + /** + * Returns whether a contract is marked as spam or not by Alchemy. For more + * information on how we classify spam, go to our NFT API FAQ at + * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification. + * + * @param contractAddress - The contract address to check. + * @beta + */ + isSpamContract(contractAddress) { + return isSpamContract(this.config, contractAddress); + } + /** + * Returns a list of all spam contracts marked by Alchemy. For details on how + * Alchemy marks spam contracts, go to + * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification. + * + * @beta + */ + getSpamContracts() { + return getSpamContracts(this.config); + } + /** + * Returns the floor prices of a NFT contract by marketplace. + * + * @param contractAddress - The contract address for the NFT collection. + * @beta + */ + getFloorPrice(contractAddress) { + return getFloorPrice(this.config, contractAddress); + } + getNftSales(options) { + return getNftSales(this.config, options); + } + /** + * Get the rarity of each attribute of an NFT. + * + * @param contractAddress - Contract address for the NFT collection. + * @param tokenId - Token id of the NFT. + */ + computeRarity(contractAddress, tokenId) { + return computeRarity(this.config, contractAddress, tokenId); + } + /** + * Search for a keyword across metadata of all ERC-721 and ERC-1155 smart contracts. + * + * @param query - The search string that you want to search for in contract metadata. + */ + searchContractMetadata(query) { + return searchContractMetadata(this.config, query); + } + /** + * Get a summary of attribute prevalence for an NFT collection. + * + * @param contractAddress - Contract address for the NFT collection. + */ + summarizeNftAttributes(contractAddress) { + return summarizeNftAttributes(this.config, contractAddress); + } + /** + * Refreshes the cached metadata for a provided NFT contract address and token + * id. Returns a boolean value indicating whether the metadata was refreshed. + * + * This method is useful when you want to refresh the metadata for a NFT that + * has been updated since the last time it was fetched. Note that the backend + * only allows one refresh per token every 15 minutes, globally for all users. + * The last refresh time for an NFT can be accessed on the + * {@link Nft.timeLastUpdated} field. + * + * To trigger a refresh for all NFTs in a contract, use {@link refreshContract} instead. + * + * @param contractAddress - The contract address of the NFT. + * @param tokenId - The token id of the NFT. + */ + refreshNftMetadata(contractAddress, tokenId) { + return refreshNftMetadata(this.config, contractAddress, tokenId); + } + /** + * Triggers a metadata refresh all NFTs in the provided contract address. This + * method is useful after an NFT collection is revealed. + * + * Refreshes are queued on the Alchemy backend and may take time to fully + * process. To refresh the metadata for a specific token, use the + * {@link refreshNftMetadata} method instead. + * + * @param contractAddress - The contract address of the NFT collection. + * @beta + */ + refreshContract(contractAddress) { + return refreshContract(this.config, contractAddress); + } +} + +/** + * The Notify namespace contains methods used for creating, reading, updating, + * and deleting webhooks in the Notify API. + * + * To use the methods in the API, you must provide your team's auth token in the + * {@link AlchemySettings.authToken} field when configuring + * {@link AlchemySettings}. The auth token can be found in the Alchemy Dashboard + * on the Notify tab. + * + * Note that not all networks are supported in the Notify API. Please consult + * the documentation for which networks are supported. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the notify + * namespace via `alchemy.notify`. + */ +class NotifyNamespace { + /** @internal */ + constructor(config) { + this.config = config; + } + /** + * Get all webhooks on your team. + * + * The team is determined by the `authToken` provided into the {@link AlchemySettings} + * object when creating a new {@link Alchemy} instance. + * + * This method returns a response object containing all the webhooks + */ + getAllWebhooks() { + return __awaiter(this, void 0, void 0, function* () { + this.verifyConfig(); + const response = yield this.sendWebhookRequest('team-webhooks', 'getAllWebhooks', {}); + return { + webhooks: parseRawWebhookResponse(response), + totalCount: response.data.length + }; + }); + } + getAddresses(webhookOrId, options) { + return __awaiter(this, void 0, void 0, function* () { + this.verifyConfig(); + const webhookId = typeof webhookOrId === 'string' ? webhookOrId : webhookOrId.id; + const response = yield this.sendWebhookRequest('webhook-addresses', 'getAddresses', { + webhook_id: webhookId, + limit: options === null || options === void 0 ? void 0 : options.limit, + after: options === null || options === void 0 ? void 0 : options.pageKey + }); + return parseRawAddressActivityResponse(response); + }); + } + getNftFilters(webhookOrId, options) { + return __awaiter(this, void 0, void 0, function* () { + this.verifyConfig(); + const webhookId = typeof webhookOrId === 'string' ? webhookOrId : webhookOrId.id; + const response = yield this.sendWebhookRequest('webhook-nft-filters', 'getNftFilters', { + webhook_id: webhookId, + limit: options === null || options === void 0 ? void 0 : options.limit, + after: options === null || options === void 0 ? void 0 : options.pageKey + }); + return parseRawNftFiltersResponse(response); + }); + } + updateWebhook(webhookOrId, update) { + return __awaiter(this, void 0, void 0, function* () { + const webhookId = typeof webhookOrId === 'string' ? webhookOrId : webhookOrId.id; + let restApiName; + let methodName; + let method; + let data; + if ('isActive' in update) { + restApiName = 'update-webhook'; + methodName = 'updateWebhook'; + method = 'PUT'; + data = { + webhook_id: webhookId, + is_active: update.isActive + }; + } + else if ('addFilters' in update || 'removeFilters' in update) { + restApiName = 'update-webhook-nft-filters'; + methodName = 'updateWebhookNftFilters'; + method = 'PATCH'; + data = { + webhook_id: webhookId, + nft_filters_to_add: update.addFilters + ? update.addFilters.map(nftFilterToParam) + : [], + nft_filters_to_remove: update.removeFilters + ? update.removeFilters.map(nftFilterToParam) + : [] + }; + } + else if ('addAddresses' in update || 'removeAddresses' in update) { + restApiName = 'update-webhook-addresses'; + methodName = 'webhook:updateWebhookAddresses'; + method = 'PATCH'; + data = { + webhook_id: webhookId, + addresses_to_add: yield this.resolveAddresses(update.addAddresses), + addresses_to_remove: yield this.resolveAddresses(update.removeAddresses) + }; + } + else if ('newAddresses' in update) { + restApiName = 'update-webhook-addresses'; + methodName = 'webhook:updateWebhookAddress'; + method = 'PUT'; + data = { + webhook_id: webhookId, + addresses: yield this.resolveAddresses(update.newAddresses) + }; + } + else { + throw new Error('Invalid `update` param passed into `updateWebhook`'); + } + yield this.sendWebhookRequest(restApiName, methodName, {}, { + method, + data + }); + }); + } + createWebhook(url, type, params) { + return __awaiter(this, void 0, void 0, function* () { + let appId; + if (type === WebhookType.MINED_TRANSACTION || + type === WebhookType.DROPPED_TRANSACTION) { + if (!('appId' in params)) { + throw new Error('Transaction Webhooks require an app id.'); + } + appId = params.appId; + } + let network = NETWORK_TO_WEBHOOK_NETWORK.get(this.config.network); + let filters; + let addresses; + if (type === WebhookType.NFT_ACTIVITY) { + if (!('filters' in params) || params.filters.length === 0) { + throw new Error('Nft Activity Webhooks require a non-empty array input.'); + } + network = params.network + ? NETWORK_TO_WEBHOOK_NETWORK.get(params.network) + : network; + filters = params.filters.map(filter => ({ + contract_address: filter.contractAddress, + token_id: BigNumber.from(filter.tokenId).toString() + })); + } + else if (type === WebhookType.ADDRESS_ACTIVITY) { + if (params === undefined || + !('addresses' in params) || + params.addresses.length === 0) { + throw new Error('Address Activity Webhooks require a non-empty array input.'); + } + network = params.network + ? NETWORK_TO_WEBHOOK_NETWORK.get(params.network) + : network; + addresses = yield this.resolveAddresses(params.addresses); + } + const data = Object.assign(Object.assign(Object.assign({ network, webhook_type: type, webhook_url: url }, (appId && { app_id: appId })), (filters && { nft_filters: filters })), (addresses && { addresses })); + const response = yield this.sendWebhookRequest('create-webhook', 'createWebhook', {}, { + method: 'POST', + data + }); + return parseRawWebhook(response.data); + }); + } + deleteWebhook(webhookOrId) { + return __awaiter(this, void 0, void 0, function* () { + this.verifyConfig(); + const webhookId = typeof webhookOrId === 'string' ? webhookOrId : webhookOrId.id; + const response = yield this.sendWebhookRequest('delete-webhook', 'deleteWebhook', { + webhook_id: webhookId + }, { + method: 'DELETE' + }); + if ('message' in response) { + throw new Error(`Webhook not found. Failed to delete webhook: ${webhookId}`); + } + }); + } + verifyConfig() { + if (this.config.authToken === undefined) { + throw new Error('Using the Notify API requires setting the Alchemy Auth Token in ' + + 'the settings object when initializing Alchemy.'); + } + } + sendWebhookRequest(restApiName, methodName, params, overrides) { + return requestHttpWithBackoff(this.config, AlchemyApiType.WEBHOOK, restApiName, methodName, params, Object.assign(Object.assign({}, overrides), { headers: Object.assign({ 'X-Alchemy-Token': this.config.authToken }, overrides === null || overrides === void 0 ? void 0 : overrides.headers) })); + } + /** Resolves ENS addresses to the raw address. + * @internal */ + resolveAddresses(addresses) { + return __awaiter(this, void 0, void 0, function* () { + if (addresses === undefined) { + return []; + } + const resolvedAddresses = []; + const provider = yield this.config.getProvider(); + for (const address of addresses) { + const rawAddress = yield provider.resolveName(address); + if (rawAddress === null) { + throw new Error(`Unable to resolve the ENS address: ${address}`); + } + resolvedAddresses.push(rawAddress); + } + return resolvedAddresses; + }); + } +} +/** + * Mapping of webhook network representations to the SDK's network representation. + * + * @internal + */ +const WEBHOOK_NETWORK_TO_NETWORK = { + ETH_MAINNET: Network.ETH_MAINNET, + ETH_GOERLI: Network.ETH_GOERLI, + ETH_ROPSTEN: Network.ETH_ROPSTEN, + ETH_RINKEBY: Network.ETH_RINKEBY, + ETH_KOVAN: Network.ETH_KOVAN, + MATIC_MAINNET: Network.MATIC_MAINNET, + MATIC_MUMBAI: Network.MATIC_MUMBAI, + ARB_MAINNET: Network.ARB_MAINNET, + ARB_RINKEBY: Network.ARB_RINKEBY, + OPT_MAINNET: Network.OPT_MAINNET, + OPT_KOVAN: Network.OPT_KOVAN +}; +/** Mapping of the SDK's network representation the webhook API's network representation. */ +const NETWORK_TO_WEBHOOK_NETWORK = Object.keys(Network).reduce((map, key) => { + if (key in WEBHOOK_NETWORK_TO_NETWORK) { + map.set(WEBHOOK_NETWORK_TO_NETWORK[key], key); + } + return map; +}, new Map()); +function parseRawWebhookResponse(response) { + return response.data.map(parseRawWebhook); +} +function parseRawWebhook(rawWebhook) { + return Object.assign({ id: rawWebhook.id, network: WEBHOOK_NETWORK_TO_NETWORK[rawWebhook.network], type: rawWebhook.webhook_type, url: rawWebhook.webhook_url, isActive: rawWebhook.is_active, timeCreated: new Date(rawWebhook.time_created).toISOString(), signingKey: rawWebhook.signing_key, version: rawWebhook.version }, (rawWebhook.app_id !== undefined && { appId: rawWebhook.app_id })); +} +function parseRawAddressActivityResponse(response) { + return { + addresses: response.data, + totalCount: response.pagination.total_count, + pageKey: response.pagination.cursors.after + }; +} +function parseRawNftFiltersResponse(response) { + return { + filters: response.data.map(f => ({ + contractAddress: f.contract_address, + tokenId: BigNumber.from(f.token_id).toString() + })), + totalCount: response.pagination.total_count, + pageKey: response.pagination.cursors.after + }; +} +function nftFilterToParam(filter) { + return { + contract_address: filter.contractAddress, + token_id: BigNumber.from(filter.tokenId).toString() + }; +} + +/** + * Multiples to increment fee per gas when using + * {@link TransactNamespace.sendGasOptimizedTransaction}. + * + * @internal + */ +const GAS_OPTIMIZED_TX_FEE_MULTIPLES = [0.9, 1, 1.1, 1.2, 1.3]; +/** + * The Transact namespace contains methods used for sending transactions and + * checking on the state of submitted transactions. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the transact + * namespace via `alchemy.transact`. + */ +class TransactNamespace { + /** @internal */ + constructor(config) { + this.config = config; + } + /** + * Used to send a single transaction to Flashbots. Flashbots will attempt to + * send the transaction to miners for the next 25 blocks. + * + * Returns the transaction hash of the submitted transaction. + * + * @param signedTransaction The raw, signed transaction as a hash. + * @param maxBlockNumber Optional highest block number in which the + * transaction should be included. + * @param options Options to configure the request. + */ + sendPrivateTransaction(signedTransaction, maxBlockNumber, options) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + const hexBlockNumber = maxBlockNumber ? toHex(maxBlockNumber) : undefined; + return provider._send('eth_sendPrivateTransaction', [ + { + tx: signedTransaction, + maxBlockNumber: hexBlockNumber, + preferences: options + } + ], 'sendPrivateTransaction'); + }); + } + /** + * Stops the provided private transaction from being submitted for future + * blocks. A transaction can only be cancelled if the request is signed by the + * same key as the {@link sendPrivateTransaction} call submitting the + * transaction in first place. + * + * Please note that fast mode transactions cannot be cancelled using this method. + * + * Returns a boolean indicating whether the cancellation was successful. + * + * @param transactionHash Transaction hash of private tx to be cancelled + */ + cancelPrivateTransaction(transactionHash) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider._send('eth_cancelPrivateTransaction', [ + { + txHash: transactionHash + } + ], 'cancelPrivateTransaction'); + }); + } + /** + * Returns the transaction with hash or null if the transaction is unknown. + * + * If a transaction has not been mined, this method will search the + * transaction pool. Various backends may have more restrictive transaction + * pool access (e.g. if the gas price is too low or the transaction was only + * recently sent and not yet indexed) in which case this method may also return null. + * + * NOTE: This is an alias for {@link CoreNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransaction(transactionHash) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getTransaction(transactionHash); + }); + } + /** + * Submits transaction to the network to be mined. The transaction must be + * signed, and be valid (i.e. the nonce is correct and the account has + * sufficient balance to pay for the transaction). + * + * NOTE: This is an alias for {@link CoreNamespace.sendTransaction}. + * + * @param signedTransaction The signed transaction to send. + * @public + */ + sendTransaction(signedTransaction) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.sendTransaction(signedTransaction); + }); + } + /** + * Returns an estimate of the amount of gas that would be required to submit + * transaction to the network. + * + * An estimate may not be accurate since there could be another transaction on + * the network that was not accounted for, but after being mined affects the + * relevant state. + * + * This is an alias for {@link CoreNamespace.estimateGas}. + * + * @param transaction The transaction to estimate gas for. + * @public + */ + estimateGas(transaction) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.estimateGas(transaction); + }); + } + /** + * Returns a fee per gas (in wei) that is an estimate of how much you can pay + * as a priority fee, or "tip", to get a transaction included in the current block. + * + * This number is generally used to set the `maxPriorityFeePerGas` field in a + * transaction request. + * + * @public + */ + getMaxPriorityFeePerGas() { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + const feeHex = yield provider._send('eth_maxPriorityFeePerGas', [], 'getMaxPriorityFeePerGas'); + return fromHex(feeHex); + }); + } + /** + * Returns a promise which will not resolve until specified transaction hash is mined. + * + * If {@link confirmations} is 0, this method is non-blocking and if the + * transaction has not been mined returns null. Otherwise, this method will + * block until the transaction has confirmed blocks mined on top of the block + * in which it was mined. + * + * NOTE: This is an alias for {@link CoreNamespace.waitForTransaction}. + * + * @param transactionHash The hash of the transaction to wait for. + * @param confirmations The number of blocks to wait for. + * @param timeout The maximum time to wait for the transaction to confirm. + * @public + */ + waitForTransaction(transactionHash, confirmations, timeout) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.waitForTransaction(transactionHash, confirmations, timeout); + }); + } + sendGasOptimizedTransaction(transactionOrSignedTxs, wallet) { + return __awaiter(this, void 0, void 0, function* () { + if (Array.isArray(transactionOrSignedTxs)) { + return this._sendGasOptimizedTransaction(transactionOrSignedTxs, 'sendGasOptimizedTransactionPreSigned'); + } + let gasLimit; + let priorityFee; + let baseFee; + const provider = yield this.config.getProvider(); + try { + gasLimit = yield this.estimateGas(transactionOrSignedTxs); + priorityFee = yield this.getMaxPriorityFeePerGas(); + const currentBlock = yield provider.getBlock('latest'); + baseFee = currentBlock.baseFeePerGas.toNumber(); + } + catch (e) { + throw new Error(`Failed to estimate gas for transaction: ${e}`); + } + const gasSpreadTransactions = generateGasSpreadTransactions(transactionOrSignedTxs, gasLimit.toNumber(), baseFee, priorityFee); + const signedTransactions = yield Promise.all(gasSpreadTransactions.map(tx => wallet.signTransaction(tx))); + return this._sendGasOptimizedTransaction(signedTransactions, 'sendGasOptimizedTransactionGenerated'); + }); + } + /** + * Returns the state of the transaction job returned by the + * {@link sendGasOptimizedTransaction}. + * + * @param trackingId The tracking id from the response of the sent gas optimized transaction. + * @internal + */ + // TODO(txjob): Remove internal tag once this feature is released. + getGasOptimizedTransactionStatus(trackingId) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider._send('alchemy_getGasOptimizedTransactionStatus', [trackingId], 'getGasOptimizedTransactionStatus'); + }); + } + /** @internal */ + _sendGasOptimizedTransaction(signedTransactions, methodName) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider._send('alchemy_sendGasOptimizedTransaction', [ + { + rawTransactions: signedTransactions + } + ], methodName); + }); + } +} +/** + * Helper method to generate the raw transaction with the given gas limit and + * priority fee across a spread of different gas prices. + * + * @internal + */ +// Visible for testing +function generateGasSpreadTransactions(transaction, gasLimit, baseFee, priorityFee) { + return GAS_OPTIMIZED_TX_FEE_MULTIPLES.map(feeMultiplier => { + return Object.assign(Object.assign({}, transaction), { gasLimit, maxFeePerGas: Math.round(baseFee * feeMultiplier + priorityFee * feeMultiplier), maxPriorityFeePerGas: Math.round(feeMultiplier * priorityFee) }); + }); +} + +/** This file contains internal types used by the SDK and are not exposed to the end user. */ +/** + * Prefix for `alchemy_pendingTransactions` subscriptions when serializing to + * ethers events. + * + * This tag is used internally by ethers to track different event filters. + */ +const ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE = 'alchemy-pending-transactions'; +/** + * Prefix for `alchemy_minedTransactions` subscriptions when serializing to ethers events. + * + * This tag is used internally by ethers to track different event filters. + */ +const ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE = 'alchemy-mined-transactions'; +/** + * Array containing all the custom event tags used internally by ethers to track + * event filters. + */ +const ALCHEMY_EVENT_TYPES = [ + ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE, + ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE +]; + +/** + * DO NOT MODIFY. + * + * Event class copied directly over from ethers.js's `BaseProvider` class. + * + * This class is used to represent events and their corresponding listeners. The + * SDK needs to extend this class in order to support Alchemy's custom + * Subscription API types. The original class is not exported by ethers. Minimal + * changes have been made in order to get TS to compile. + */ +class Event { + constructor(tag, listener, once) { + this.listener = listener; + this.tag = tag; + this.once = once; + this._lastBlockNumber = -2; + this._inflight = false; + } + get event() { + switch (this.type) { + case 'tx': + return this.hash; + case 'filter': + return this.filter; + default: + return this.tag; + } + } + get type() { + return this.tag.split(':')[0]; + } + get hash() { + const comps = this.tag.split(':'); + if (comps[0] !== 'tx') { + throw new Error('Not a transaction event'); + } + return comps[1]; + } + get filter() { + const comps = this.tag.split(':'); + if (comps[0] !== 'filter') { + throw new Error('Not a transaction event'); + } + 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() { + const PollableEvents = ['block', 'network', 'pending', 'poll']; + return this.tag.indexOf(':') >= 0 || PollableEvents.indexOf(this.tag) >= 0; + } +} +/** + * Wrapper class around the ethers `Event` class in order to add support for + * Alchemy's custom subscriptions types. + * + * The serialization and deserialization mechanism requires the order of the + * fields to be the same across different {@link ALCHEMY_EVENT_TYPES}. Before + * using a getter on a new event filter, make sure that the position of the + * field in serialization is correct. + * + * The getters on this class deserialize the event tag generated by + * {@link getAlchemyEventTag} into the original fields passed into the event. + */ +class EthersEvent extends Event { + /** + * Converts the event tag into the original `fromAddress` field in + * {@link AlchemyPendingTransactionsEventFilter}. + */ + get fromAddress() { + const comps = this.tag.split(':'); + if (comps[0] !== ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE) { + return undefined; + } + if (comps[1] && comps[1] !== '*') { + return deserializeAddressField(comps[1]); + } + else { + return undefined; + } + } + /** + * Converts the event tag into the original `toAddress` field in + * {@link AlchemyPendingTransactionsEventFilter}. + */ + get toAddress() { + const comps = this.tag.split(':'); + if (comps[0] !== ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE) { + return undefined; + } + if (comps[2] && comps[2] !== '*') { + return deserializeAddressField(comps[2]); + } + else { + return undefined; + } + } + /** + * Converts the event tag into the original `hashesOnly` field in + * {@link AlchemyPendingTransactionsEventFilter} and {@link AlchemyMinedTransactionsEventFilter}. + */ + get hashesOnly() { + const comps = this.tag.split(':'); + if (!ALCHEMY_EVENT_TYPES.includes(comps[0])) { + return undefined; + } + if (comps[3] && comps[3] !== '*') { + return comps[3] === 'true'; + } + else { + return undefined; + } + } + get includeRemoved() { + const comps = this.tag.split(':'); + if (comps[0] !== ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE) { + return undefined; + } + if (comps[2] && comps[2] !== '*') { + return comps[2] === 'true'; + } + else { + return undefined; + } + } + get addresses() { + const comps = this.tag.split(':'); + if (comps[0] !== ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE) { + return undefined; + } + if (comps[1] && comps[1] !== '*') { + return deserializeAddressesField(comps[1]); + } + else { + return undefined; + } + } +} +function isAlchemyEvent(event) { + return typeof event === 'object' && 'method' in event; +} +/** + * Creates a string representation of an `alchemy_pendingTransaction` + * subscription filter that is compatible with the ethers implementation of + * `getEventTag()`. The method is not an exported function in ethers, which is + * why the SDK has its own implementation. + * + * The event tag is then deserialized by the SDK's {@link EthersEvent} getters. + * + * @example + * ```js + * // Returns 'alchemy-pending-transactions:0xABC:0xDEF|0xGHI:true' + * const eventTag = getAlchemyEventTag( + * { + * "method": "alchemy_pendingTransactions", + * "fromAddress": "0xABC", + * "toAddress": ["0xDEF", "0xGHI"], + * "hashesOnly: true + * }); + * ```; + * + * @param event + * @internal + */ +function getAlchemyEventTag(event) { + if (!isAlchemyEvent(event)) { + throw new Error('Event tag requires AlchemyEventType'); + } + if (event.method === AlchemySubscription.PENDING_TRANSACTIONS) { + return serializePendingTransactionsEvent(event); + } + else if (event.method === AlchemySubscription.MINED_TRANSACTIONS) { + return serializeMinedTransactionsEvent(event); + } + else { + throw new Error(`Unrecognized AlchemyFilterEvent: ${event}`); + } +} +function verifyAlchemyEventName(eventName) { + if (!Object.values(AlchemySubscription).includes(eventName.method)) { + throw new Error(`Invalid method name ${eventName.method}. Accepted method names: ${Object.values(AlchemySubscription)}`); + } +} +/** + * Serializes the provided {@link AlchemyPendingTransactionsEventFilter} into an ethers + * compatible event tag. + * + * For the example event: + * ``` + * { + * "method": "alchemy_pendingTransactions", + * "fromAddress": "0xABC", + * "toAddress": ["0xDEF", "0xGHI"], + * "hashesOnly: true + * } + * ``` + * + * The resulting serialization is: + * `alchemy_pendingTransactions:0xABC:0xDEF|0xGHI:true` + * + * If a field is omitted, it is replaced with a `*`. + */ +function serializePendingTransactionsEvent(event) { + const fromAddress = serializeAddressField(event.fromAddress); + const toAddress = serializeAddressField(event.toAddress); + const hashesOnly = serializeBooleanField(event.hashesOnly); + return (ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE + + ':' + + fromAddress + + ':' + + toAddress + + ':' + + hashesOnly); +} +/** + * Serializes the provided {@link AlchemyPendingTransactionsEventFilter} into an ethers + * compatible event tag. + * + * For the example event: + * ``` + * { + * "method": "alchemy_minedTransactions", + * "addresses": [ + * { + * from: "0xABC" + * }, + * { + * to: "0xDEF", + * from: "0x123" + * } + * ] + * "includeRemoved": false + * "hashesOnly: true + * } + * ``` + * + * The resulting serialization is: + * `alchemy_minedTransactions:*,0xABC|0xDEF,0x123:false:true` + * + * If a field is omitted, it is replaced with a `*`. + * + * The `addresses` array is split by the '|' character, and each to/from address + * pair is separated by a ',' character. + * + */ +function serializeMinedTransactionsEvent(event) { + const addresses = serializeAddressesField(event.addresses); + const includeRemoved = serializeBooleanField(event.includeRemoved); + const hashesOnly = serializeBooleanField(event.hashesOnly); + return (ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE + + ':' + + addresses + + ':' + + includeRemoved + + ':' + + hashesOnly); +} +function serializeAddressesField(addresses) { + if (addresses === undefined) { + return '*'; + } + return addresses + .map(filter => serializeAddressField(filter.to) + + ',' + + serializeAddressField(filter.from)) + .join('|'); +} +function serializeAddressField(field) { + if (field === undefined) { + return '*'; + } + else if (Array.isArray(field)) { + return field.join('|'); + } + else { + return field; + } +} +function serializeBooleanField(field) { + if (field === undefined) { + return '*'; + } + else { + return field.toString(); + } +} +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 deserializeAddressField(data) { + if (data === '') { + return undefined; + } + const addresses = data.split('|'); + return addresses.length === 1 ? addresses[0] : addresses; +} +function deserializeAddressesField(data) { + if (data === '') { + return undefined; + } + // Perform a cast here since TS doesn't know we're guaranteed a non-empty + // array from deserializing. + return data + .split('|') + .map(addressStr => addressStr.split(',')) + .map(addressPair => (Object.assign(Object.assign({}, (addressPair[0] !== '*' && { to: addressPair[0] })), (addressPair[1] !== '*' && { from: addressPair[1] })))); +} + +/** + * The Websocket namespace contains all subscription related functions that + * allow you to subscribe to events and receive updates as they occur. The + * underlying WebSocket provider has additional logic to handle reconnections + * and automatically backfills missed events. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.ws`. + */ +class WebSocketNamespace { + /** @internal */ + constructor(config) { + this.config = config; + } + /** + * Adds a listener to be triggered for each {@link eventName} event. Also + * includes Alchemy's Subscription API events. See {@link AlchemyEventType} for + * how to use them. + * + * @param eventName The event to listen for. + * @param listener The listener to call when the event is triggered. + * @public + */ + on(eventName, listener) { + void (() => __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getWebSocketProvider(); + const processedEvent = yield this._resolveEnsAlchemyEvent(eventName); + provider.on(processedEvent, listener); + }))(); + return this; + } + /** + * Adds a listener to be triggered for only the next {@link eventName} event, + * after which it will be removed. Also includes Alchemy's Subscription API + * events. See {@link AlchemyEventType} for how to use them. + * + * @param eventName The event to listen for. + * @param listener The listener to call when the event is triggered. + * @public + */ + once(eventName, listener) { + void (() => __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getWebSocketProvider(); + const processedEvent = yield this._resolveEnsAlchemyEvent(eventName); + provider.once(processedEvent, listener); + }))(); + return this; + } + /** + * Removes the provided {@link listener} for the {@link eventName} event. If no + * listener is provided, all listeners for the event will be removed. + * + * @param eventName The event to unlisten to. + * @param listener The listener to remove. + * @public + */ + off(eventName, listener) { + void (() => __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getWebSocketProvider(); + const processedEvent = yield this._resolveEnsAlchemyEvent(eventName); + return provider.off(processedEvent, listener); + }))(); + return this; + } + /** + * Remove all listeners for the provided {@link eventName} event. If no event + * is provided, all events and their listeners are removed. + * + * @param eventName The event to remove all listeners for. + * @public + */ + removeAllListeners(eventName) { + void (() => __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getWebSocketProvider(); + const processedEvent = eventName + ? yield this._resolveEnsAlchemyEvent(eventName) + : undefined; + provider.removeAllListeners(processedEvent); + }))(); + return this; + } + /** + * Returns the number of listeners for the provided {@link eventName} event. If + * no event is provided, the total number of listeners for all events is returned. + * + * @param eventName The event to get the number of listeners for. + * @public + */ + listenerCount(eventName) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getWebSocketProvider(); + const processedEvent = eventName + ? yield this._resolveEnsAlchemyEvent(eventName) + : undefined; + return provider.listenerCount(processedEvent); + }); + } + /** + * Returns an array of listeners for the provided {@link eventName} event. If + * no event is provided, all listeners will be included. + * + * @param eventName The event to get the listeners for. + */ + listeners(eventName) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getWebSocketProvider(); + const processedEvent = eventName + ? yield this._resolveEnsAlchemyEvent(eventName) + : undefined; + return provider.listeners(processedEvent); + }); + } + /** + * Converts ENS addresses in an Alchemy Event to the underlying resolved + * address. + * + * VISIBLE ONLY FOR TESTING. + * + * @internal + */ + _resolveEnsAlchemyEvent(eventName) { + return __awaiter(this, void 0, void 0, function* () { + if (!isAlchemyEvent(eventName)) { + return eventName; + } + if (eventName.method === AlchemySubscription.MINED_TRANSACTIONS && + eventName.addresses) { + const processedAddresses = []; + for (const address of eventName.addresses) { + if (address.to) { + address.to = yield this._resolveNameOrError(address.to); + } + if (address.from) { + address.from = yield this._resolveNameOrError(address.from); + } + processedAddresses.push(address); + } + eventName.addresses = + processedAddresses; + } + else if (eventName.method === AlchemySubscription.PENDING_TRANSACTIONS) { + if (eventName.fromAddress) { + if (typeof eventName.fromAddress === 'string') { + eventName.fromAddress = yield this._resolveNameOrError(eventName.fromAddress); + } + else { + eventName.fromAddress = yield Promise.all(eventName.fromAddress.map(this._resolveNameOrError)); + } + } + if (eventName.toAddress) { + if (typeof eventName.toAddress === 'string') { + eventName.toAddress = yield this._resolveNameOrError(eventName.toAddress); + } + else { + eventName.toAddress = yield Promise.all(eventName.toAddress.map(this._resolveNameOrError)); + } + } + } + return eventName; + }); + } + /** + * Converts the provided ENS address or throws an error. This improves code + * readability and type safety in other methods. + * + * VISIBLE ONLY FOR TESTING. + * + * @internal + */ + _resolveNameOrError(name) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + const resolved = yield provider.resolveName(name); + if (resolved === null) { + throw new Error(`Unable to resolve the ENS address: ${name}`); + } + return resolved; + }); + } +} + +/** + * The Alchemy SDK client. This class is the main entry point into Alchemy's + * APIs and separates functionality into different namespaces. + * + * Each SDK instance is associated with a specific network and API key. To use a + * different network or API key, create a new instance of {@link Alchemy}. + * + * @public + */ +class Alchemy { + /** + * @param {string} [settings.apiKey] - The API key to use for Alchemy + * @param {Network} [settings.network] - The network to use for Alchemy + * @param {number} [settings.maxRetries] - The maximum number of retries to attempt + * @public + */ + constructor(settings) { + this.config = new AlchemyConfig(settings); + this.core = new CoreNamespace(this.config); + this.nft = new NftNamespace(this.config); + this.ws = new WebSocketNamespace(this.config); + this.transact = new TransactNamespace(this.config); + this.notify = new NotifyNamespace(this.config); + } +} + +/** + * The Wallet class inherits Signer and can sign transactions and messages using + * a private key as a standard Externally Owned Account (EOA). + * + * SDK's custom implementation of Ethers.js's 'Wallet'. + * + * Primary difference from Ethers.js 'Wallet' is that you can pass in either a + * Provider or an Alchemy object. This implementation will intelligently detect + * the format and set the provider accordingly. + * + * @public + * @override + */ +class Wallet extends Wallet$1 { + /** + * Overload permits users to pass in either a standard Provider or an Alchemy + * object. The constructor will detect the object type and handle appropriately. + * + * @override + */ + constructor(privateKey, alchemyOrProvider) { + // If object passed in is a provider, send to super + let superProvider; + if (alchemyOrProvider && Provider.isProvider(alchemyOrProvider)) { + superProvider = alchemyOrProvider; + } + super(privateKey, superProvider); + // If object passed in is an Alchemy object, just set Alchemy + if (alchemyOrProvider && !Provider.isProvider(alchemyOrProvider)) { + this.alchemyProviderPromise = alchemyOrProvider.config.getProvider(); + } + } + ////////////////////////////////////////////////////////////////// + // Set of overrides from Signer to handle async provider retrieval. + ////////////////////////////////////////////////////////////////// + /** + * Returns the balance of this wallet at blockTag. + * + * @param blockTag The block to check the balance of + * @override + */ + getBalance(blockTag) { + return this.getWallet().then(wallet => wallet.getBalance(blockTag)); + } + /** + * Returns the number of transactions this account has ever sent. This is the + * value required to be included in transactions as the nonce. + * + * @param blockTag The block to check the transaction count on + * @override + */ + getTransactionCount(blockTag) { + return this.getWallet().then(wallet => wallet.getTransactionCount(blockTag)); + } + /** + * Returns the result of estimating the cost to send the transactionRequest, + * with this account address being used as the from field. + * + * @param transaction Transaction to estimate the gas on + * @override + */ + estimateGas(transaction) { + return this.getWallet().then(wallet => wallet.estimateGas(transaction)); + } + /** + * Returns the result of calling using the transactionRequest, with this + * account address being used as the from field. + * + * @param transaction To make a call on + * @param blockTag The block to make the call on + * @override + */ + call(transaction, blockTag) { + return this.getWallet().then(wallet => wallet.call(transaction, blockTag)); + } + /** + * Populates all fields in a transaction, signs it and sends it to the network + * + * @override + */ + sendTransaction(transaction) { + return this.getWallet().then(wallet => wallet.sendTransaction(transaction)); + } + /** + * Returns the chain ID this wallet is connected to. + * + * @override + */ + getChainId() { + return this.getWallet().then(wallet => wallet.getChainId()); + } + /** + * Returns the current gas price. + * + * @override + */ + getGasPrice() { + return this.getWallet().then(wallet => wallet.getGasPrice()); + } + /** + * Returns the current recommended FeeData to use in a transaction. + * + * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas + * should be used. + * + * For legacy transactions and networks which do not support EIP-1559, the + * gasPrice should be used. + * + * @override + */ + getFeeData() { + return this.getWallet().then(wallet => wallet.getFeeData()); + } + /** + * Looks up the address of name. If the name is not owned, or does not have a + * Resolver configured, or the Resolver does not have an address configured, + * null is returned. + * + * @param name Name of the ENS address + * @override + */ + resolveName(name) { + return this.getWallet().then(wallet => wallet.resolveName(name)); + } + getWallet() { + return __awaiter(this, void 0, void 0, function* () { + if (!this.alchemyProviderPromise) { + return this.connect(this.provider); + } + return this.connect(yield this.alchemyProviderPromise); + }); + } +} + +/** + * The Contract class is a wrapper around the Contract class from ethers.js and + * is exported here for convenience. + * + * @public + */ +// TODO: support passing in Alchemy instance into the contract. +class Contract extends Contract$1 { +} +/** + * The ContractFactory class is a wrapper around the ContractFactory class from + * ethers.js and is exported here for convenience. + * + * @public + */ +class ContractFactory extends ContractFactory$1 { +} + +export { ALCHEMY_EVENT_TYPES as A, NftSaleMarketplace as B, CustomNetworks as C, DEFAULT_ALCHEMY_API_KEY as D, EthersNetwork as E, NftSaleTakerType as F, GasOptimizedTransactionStatus as G, WebhookVersion as H, IS_BROWSER as I, WebhookType as J, Network as N, OpenSeaSafelistRequestStatus as O, RefreshState as R, SortingOrder as S, TokenBalanceType as T, VERSION as V, Wallet as W, __awaiter as _, DEFAULT_NETWORK as a, getAlchemyWsUrl as b, EthersEvent as c, getAlchemyEventTag as d, ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE as e, fromHex as f, getAlchemyHttpUrl as g, AlchemySubscription as h, isAlchemyEvent as i, ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE as j, Alchemy as k, logWarn as l, Contract as m, noop as n, ContractFactory as o, isHex as p, AssetTransfersCategory as q, AssetTransfersOrder as r, setLogLevel as s, toHex as t, NftTokenType as u, verifyAlchemyEventName as v, NftSpamClassification as w, NftExcludeFilters as x, NftFilters as y, NftOrdering as z }; +//# sourceMappingURL=index-02af91ae.js.map diff --git a/test/node_modules/alchemy-sdk/dist/es/index-02af91ae.js.map b/test/node_modules/alchemy-sdk/dist/es/index-02af91ae.js.map new file mode 100644 index 0000000..958be01 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/index-02af91ae.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index-02af91ae.js","sources":["../../src/types/types.ts","../../src/util/const.ts","../../src/api/alchemy-config.ts","../../src/api/util.ts","../../src/util/util.ts","../../src/api/core-namespace.ts","../../src/util/logger.ts","../../src/version.ts","../../src/util/sendRest.ts","../../src/internal/backoff.ts","../../src/internal/dispatch.ts","../../src/internal/nft-api.ts","../../src/api/nft-namespace.ts","../../src/api/notify-namespace.ts","../../src/api/transact-namespace.ts","../../src/internal/internal-types.ts","../../src/internal/ethers-event.ts","../../src/api/websocket-namespace.ts","../../src/api/alchemy.ts","../../src/api/alchemy-wallet.ts","../../src/api/alchemy-contract.ts"],"sourcesContent":["import {\n EventType,\n TransactionReceipt\n} from '@ethersproject/abstract-provider';\nimport { BigNumberish } from '@ethersproject/bignumber';\n\nimport { BaseNft, Nft, NftContract } from '../api/nft';\n\n// TODO: separate this file into other files.\n\n/**\n * Options object used to configure the Alchemy SDK.\n *\n * @public\n */\nexport interface AlchemySettings {\n /**\n * The Alchemy API key that can be found in the Alchemy dashboard.\n *\n * Defaults to: \"demo\" (a rate-limited public API key)\n */\n apiKey?: string;\n\n /**\n * The name of the network. Once configured, the network cannot be changed. To\n * use a different network, instantiate a new `Alchemy` instance.\n *\n * Defaults to: Network.ETH_MAINNET\n */\n network?: Network;\n\n /** The maximum number of retries to attempt if a request fails. Defaults to 5. */\n maxRetries?: number;\n\n /**\n * Optional URL endpoint to use for all requests. Setting this field will\n * override the URL generated by the {@link network} and {@link apiKey} fields.\n *\n * This field is useful for testing or for using a custom node endpoint. Note\n * that not all methods will work with custom URLs.\n */\n url?: string;\n\n /**\n * Alchemy auth token required to use the Notify API. This token can be found\n * in the Alchemy Dashboard on the Notify tab.\n */\n authToken?: string;\n\n /**\n * Optional setting that automatically batches and sends json-rpc requests for\n * higher throughput and reduced network IO. Defaults to false.\n *\n * This implementation is based on the `JsonRpcBatchProvider` in ethers.\n */\n batchRequests?: boolean;\n}\n\n/**\n * The supported networks by Alchemy. Note that some functions are not available\n * on all networks. Please refer to the Alchemy documentation for which APIs are\n * available on which networks\n * {@link https://docs.alchemy.com/alchemy/apis/feature-support-by-chain}\n *\n * @public\n */\nexport enum Network {\n ETH_MAINNET = 'eth-mainnet',\n /** @deprecated - Will be removed in subsequent versions */\n ETH_ROPSTEN = 'eth-ropsten',\n ETH_GOERLI = 'eth-goerli',\n /** @deprecated - Will be removed in subsequent versions */\n ETH_KOVAN = 'eth-kovan',\n /** @deprecated - Will be removed in subsequent versions */\n ETH_RINKEBY = 'eth-rinkeby',\n OPT_MAINNET = 'opt-mainnet',\n /** @deprecated - Will be removed in subsequent versions */\n OPT_KOVAN = 'opt-kovan',\n OPT_GOERLI = 'opt-goerli',\n ARB_MAINNET = 'arb-mainnet',\n /** @deprecated - Will be removed in subsequent versions */\n ARB_RINKEBY = 'arb-rinkeby',\n ARB_GOERLI = 'arb-goerli',\n MATIC_MAINNET = 'polygon-mainnet',\n MATIC_MUMBAI = 'polygon-mumbai',\n ASTAR_MAINNET = 'astar-mainnet'\n}\n\n/** Token Types for the `getTokenBalances()` endpoint. */\nexport enum TokenBalanceType {\n /**\n * Option to fetch the top 100 tokens by 24-hour volume. This option is only\n * available on Mainnet in Ethereum, Polygon, and Arbitrum.\n */\n DEFAULT_TOKENS = 'DEFAULT_TOKENS',\n\n /**\n * Option to fetch the set of ERC-20 tokens that the address as ever held. his\n * list is produced by an address's historical transfer activity and includes\n * all tokens that the address has ever received.\n */\n ERC20 = 'erc20'\n}\n\n/**\n * Optional params to pass into `getTokenBalances()` to fetch all ERC-20 tokens\n * instead of passing in an array of contract addresses to fetch balances for.\n */\nexport interface TokenBalancesOptionsErc20 {\n /** The ERC-20 token type. */\n type: TokenBalanceType.ERC20;\n\n /** Optional page key for pagination (only applicable to TokenBalanceType.ERC20) */\n pageKey?: string;\n}\n\n/**\n * Optional params to pass into `getTokenBalances()` to fetch the top 100 tokens\n * instead of passing in an array of contract addresses to fetch balances for.\n */\nexport interface TokenBalancesOptionsDefaultTokens {\n /** The top 100 token type. */\n type: TokenBalanceType.DEFAULT_TOKENS;\n}\n\n/**\n * Response object for when the {@link TokenBalancesOptionsErc20} options are\n * used. A page key may be returned if the provided address has many transfers.\n */\nexport interface TokenBalancesResponseErc20 extends TokenBalancesResponse {\n /**\n * An optional page key to passed into the next request to fetch the next page\n * of token balances.\n */\n pageKey?: string;\n}\n\n/** @public */\nexport interface TokenBalancesResponse {\n address: string;\n tokenBalances: TokenBalance[];\n}\n\n/** @public */\nexport type TokenBalance = TokenBalanceSuccess | TokenBalanceFailure;\n\n/** @public */\nexport interface TokenBalanceSuccess {\n contractAddress: string;\n tokenBalance: string;\n error: null;\n}\n\n/** @public */\nexport interface TokenBalanceFailure {\n contractAddress: string;\n tokenBalance: null;\n error: string;\n}\n\n/**\n * Response object for the {@link CoreNamespace.getTokenMetadata} method.\n *\n * @public\n */\nexport interface TokenMetadataResponse {\n /**\n * The token's name. Is `null` if the name is not defined in the contract and\n * not available from other sources.\n */\n name: string | null;\n\n /**\n * The token's symbol. Is `null` if the symbol is not defined in the contract\n * and not available from other sources.\n */\n symbol: string | null;\n\n /**\n * The number of decimals of the token. Returns `null` if not defined in the\n * contract and not available from other sources.\n */\n decimals: number | null;\n\n /** URL link to the token's logo. Is `null` if the logo is not available. */\n logo: string | null;\n}\n\n/**\n * Parameters for the {@link CoreNamespace.getAssetTransfers} method.\n *\n * @public\n */\nexport interface AssetTransfersParams {\n /**\n * The starting block to check for transfers. This value is inclusive and\n * defaults to `0x0` if omitted.\n */\n fromBlock?: string;\n\n /**\n * The ending block to check for transfers. This value is inclusive and\n * defaults to the latest block if omitted.\n */\n toBlock?: string;\n\n /**\n * Whether to return results in ascending or descending order by block number.\n * Defaults to ascending if omitted.\n */\n order?: SortingOrder;\n\n /**\n * The from address to filter transfers by. This value defaults to a wildcard\n * for all addresses if omitted.\n */\n fromAddress?: string;\n\n /**\n * The to address to filter transfers by. This value defaults to a wildcard\n * for all address if omitted.\n */\n toAddress?: string;\n\n /**\n * List of contract addresses to filter for - only applies to \"erc20\",\n * \"erc721\", \"erc1155\" transfers. Defaults to all address if omitted.\n */\n contractAddresses?: string[];\n\n /**\n * Whether to exclude transfers with zero value. Note that zero value is\n * different than null value. Defaults to `false` if omitted.\n */\n excludeZeroValue?: boolean;\n\n /** REQUIRED field. An array of categories to get transfers for. */\n category: AssetTransfersCategory[];\n\n /** The maximum number of results to return per page. Defaults to 1000 if omitted. */\n maxCount?: number;\n\n /**\n * Optional page key from an existing {@link OwnedBaseNftsResponse}\n * {@link AssetTransfersResult}to use for pagination.\n */\n pageKey?: string;\n\n /**\n * Whether to include additional metadata about each transfer event. Defaults\n * to `false` if omitted.\n */\n withMetadata?: boolean;\n}\n\n/**\n * Parameters for the {@link CoreNamespace.getAssetTransfers} method that\n * includes metadata.\n *\n * @public\n */\nexport interface AssetTransfersWithMetadataParams extends AssetTransfersParams {\n withMetadata: true;\n}\n\n/**\n * Categories of transfers to use with the {@link AssetTransfersParams} request\n * object when using {@link CoreNamespace.getAssetTransfers}.\n *\n * @public\n */\nexport enum AssetTransfersCategory {\n /**\n * Top level ETH transactions that occur where the `fromAddress` is an\n * external user-created address. External addresses have private keys and are\n * accessed by users.\n */\n EXTERNAL = 'external',\n\n /**\n * Top level ETH transactions that occur where the `fromAddress` is an\n * internal, smart contract address. For example, a smart contract calling\n * another smart contract or sending\n */\n INTERNAL = 'internal',\n\n /** ERC20 transfers. */\n ERC20 = 'erc20',\n\n /** ERC721 transfers. */\n ERC721 = 'erc721',\n\n /** ERC1155 transfers. */\n ERC1155 = 'erc1155',\n\n /** Special contracts that don't follow ERC 721/1155, (ex: CryptoKitties). */\n SPECIALNFT = 'specialnft'\n}\n\n/**\n * Enum for the order of the {@link AssetTransfersParams} request object when\n * using {@link CoreNamespace.getAssetTransfers}.\n *\n * @deprecated Use {@link SortingOrder} instead. This enum will be removed in a\n * future version.\n * @public\n */\nexport enum AssetTransfersOrder {\n ASCENDING = 'asc',\n DESCENDING = 'desc'\n}\n\n/**\n * An enum for specifying the token type on NFTs.\n *\n * @public\n */\nexport enum NftTokenType {\n ERC721 = 'ERC721',\n ERC1155 = 'ERC1155',\n UNKNOWN = 'UNKNOWN'\n}\n\n/**\n * Response object for the {@link CoreNamespace.getAssetTransfers} method.\n *\n * @public\n */\nexport interface AssetTransfersResponse {\n transfers: AssetTransfersResult[];\n /** Page key for the next page of results, if one exists. */\n pageKey?: string;\n}\n\n/**\n * Response object for the {@link CoreNamespace.getAssetTransfers} method when\n * the {@link AssetTransfersWithMetadataParams} are used.\n *\n * @public\n */\nexport interface AssetTransfersWithMetadataResponse {\n transfers: AssetTransfersWithMetadataResult[];\n pageKey?: string;\n}\n\n/**\n * Represents a transfer event that is returned in a {@link AssetTransfersResponse}.\n *\n * @public\n */\nexport interface AssetTransfersResult {\n /** The unique ID of the transfer. */\n uniqueId: string;\n\n /** The category of the transfer. */\n category: AssetTransfersCategory;\n\n /** The block number where the transfer occurred. */\n blockNum: string;\n\n /** The from address of the transfer. */\n from: string;\n\n /** The to address of the transfer. */\n to: string | null;\n\n /**\n * Converted asset transfer value as a number (raw value divided by contract\n * decimal). `null` if ERC721 transfer or contract decimal not available.\n */\n value: number | null;\n\n /**\n * The raw ERC721 token id of the transfer as a hex string. `null` if not an\n * ERC721 transfer.\n */\n erc721TokenId: string | null;\n\n /**\n * A list of ERC1155 metadata objects if the asset transferred is an ERC1155\n * token. `null` if not an ERC1155 transfer.\n */\n erc1155Metadata: ERC1155Metadata[] | null;\n\n /** The token id of the token transferred. */\n tokenId: string | null;\n\n /**\n * Returns the token's symbol or ETH for other transfers. `null` if the\n * information was not available.\n */\n asset: string | null;\n\n /** The transaction hash of the transfer transaction. */\n hash: string;\n\n /** Information about the raw contract of the asset transferred. */\n rawContract: RawContract;\n}\n\n/**\n * Represents a transfer event that is returned in a\n * {@link AssetTransfersResponse} when {@link AssetTransfersWithMetadataParams} are used.\n *\n * @public\n */\nexport interface AssetTransfersWithMetadataResult extends AssetTransfersResult {\n /** Additional metadata about the transfer event. */\n metadata: AssetTransfersMetadata;\n}\n\n/**\n * The metadata object for a {@link AssetTransfersResult} when the\n * {@link AssetTransfersParams.withMetadata} field is set to true.\n *\n * @public\n */\nexport interface AssetTransfersMetadata {\n /** Timestamp of the block from which the transaction event originated. */\n blockTimestamp: string;\n}\n\n/**\n * Represents NFT metadata that holds fields. Note that since there is no\n * standard metadata format, the fields are not guaranteed to be present.\n *\n * @public\n */\nexport interface NftMetadata extends Record {\n /** Name of the NFT asset. */\n name?: string;\n\n /** A human-readable description of the NFT asset. */\n description?: string;\n\n /** URL to the NFT asset image. */\n image?: string;\n\n /**\n * The image URL that appears along the top of the NFT asset page. This tends\n * to be the highest resolution image.\n */\n external_url?: string;\n\n /** Background color of the NFT item. Usually defined as a 6 character hex string. */\n background_color?: string;\n\n /** The traits, attributes, and characteristics for the NFT asset. */\n attributes?: Array>;\n}\n\n/**\n * Represents the URI information the NFT's metadata.\n *\n * @public\n */\nexport interface TokenUri {\n /**\n * URI for the location of the NFT's original metadata blob (ex: the original\n * IPFS link).\n */\n raw: string;\n\n /** Public gateway URI for the raw URI. Generally offers better performance. */\n gateway: string;\n}\n\n/**\n * Represents the URI information for the NFT's media assets.\n *\n * @public\n */\nexport interface Media {\n /**\n * URI for the location of the NFT's original metadata blob for media (ex: the\n * original IPFS link).\n */\n raw: string;\n\n /** Public gateway URI for the raw URI. Generally offers better performance. */\n gateway: string;\n\n /** URL for a resized thumbnail of the NFT media asset. */\n thumbnail?: string;\n\n /**\n * The media format (ex: jpg, gif, png) of the {@link gateway} and\n * {@link thumbnail} assets.\n */\n format?: string;\n\n /**\n * DEPRECATED - The size of the media asset in bytes\n *\n * @deprecated - Please use {@link bytes} instead. This field will be removed\n * in a subsequent release.\n */\n size?: number;\n\n /** The size of the media asset in bytes. */\n bytes?: number;\n}\n\n/** Potential reasons why an NFT contract was classified as spam. */\nexport enum NftSpamClassification {\n Erc721TooManyOwners = 'Erc721TooManyOwners',\n Erc721TooManyTokens = 'Erc721TooManyTokens',\n Erc721DishonestTotalSupply = 'Erc721DishonestTotalSupply',\n MostlyHoneyPotOwners = 'MostlyHoneyPotOwners',\n OwnedByMostHoneyPots = 'OwnedByMostHoneyPots'\n}\n\n/** Detailed information on whether and why an NFT contract was classified as spam. */\nexport interface SpamInfo {\n isSpam: boolean;\n\n /** A list of reasons why an NFT contract was marked as spam. */\n classifications: NftSpamClassification[];\n}\n\n/**\n * Optional parameters object for the {@link getNftsForOwner} and\n * {@link getNftsForOwnerIterator} functions.\n *\n * This interface is used to fetch NFTs with their associated metadata. To get\n * Nfts without their associated metadata, use {@link GetBaseNftsForOwnerOptions}.\n *\n * @public\n */\nexport interface GetNftsForOwnerOptions {\n /**\n * Optional page key from an existing {@link OwnedBaseNftsResponse} or\n * {@link OwnedNftsResponse}to use for pagination.\n */\n pageKey?: string;\n\n /** Optional list of contract addresses to filter the results by. Limit is 20. */\n contractAddresses?: string[];\n\n /**\n * Optional list of filters applied to the query. NFTs that match one or more\n * of these filters are excluded from the response.\n */\n excludeFilters?: NftFilters[];\n\n /**\n * Optional list of filters applied to the query. NFTs that match one or more\n * of these filters are included in the response.\n */\n includeFilters?: NftFilters[];\n\n /**\n * Sets the total number of NFTs to return in the response. Defaults to 100.\n * Maximum page size is 100.\n */\n pageSize?: number;\n\n /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */\n omitMetadata?: boolean;\n\n /**\n * No set timeout by default - When metadata is requested, this parameter is\n * the timeout (in milliseconds) for the website hosting the metadata to\n * respond. If you want to only access the cache and not live fetch any\n * metadata for cache misses then set this value to 0.\n */\n tokenUriTimeoutInMs?: number;\n\n /**\n * Order in which to return results. By default, results are ordered by\n * contract address and token ID in lexicographic order.\n */\n orderBy?: NftOrdering;\n}\n\n/**\n * Optional parameters object for the {@link getNftsForOwner} and\n * {@link getNftsForOwnerIterator} functions.\n *\n * This interface is used to fetch NFTs without their associated metadata. To\n * get Nfts with their associated metadata, use {@link GetNftsForOwnerOptions}.\n *\n * @public\n */\nexport interface GetBaseNftsForOwnerOptions {\n /**\n * Optional page key from an existing {@link OwnedBaseNftsResponse} or\n * {@link OwnedNftsResponse}to use for pagination.\n */\n pageKey?: string;\n\n /** Optional list of contract addresses to filter the results by. Limit is 20. */\n contractAddresses?: string[];\n\n /**\n * Optional list of filters applied to the query. NFTs that match one or more\n * of these filters are excluded from the response.\n */\n excludeFilters?: NftFilters[];\n\n /**\n * Optional list of filters applied to the query. NFTs that match one or more\n * of these filters are included in the response.\n */\n includeFilters?: NftFilters[];\n\n /**\n * Sets the total number of NFTs to return in the response. Defaults to 100.\n * Maximum page size is 100.\n */\n pageSize?: number;\n\n /** Optional boolean flag to include NFT metadata. Defaults to `false`. */\n omitMetadata: true;\n\n /**\n * No set timeout by default - When metadata is requested, this parameter is\n * the timeout (in milliseconds) for the website hosting the metadata to\n * respond. If you want to only access the cache and not live fetch any\n * metadata for cache misses then set this value to 0.\n */\n tokenUriTimeoutInMs?: number;\n\n /**\n * Order in which to return results. By default, results are ordered by\n * contract address and token ID in lexicographic order.\n */\n orderBy?: NftOrdering;\n}\n\n/**\n * Enum of NFT filters that can be applied to a {@link getNftsForOwner} request.\n * NFTs that match one or more of these filters are excluded from the response.\n *\n * - @deprecated Use {@link NftFilters} instead. This enum will be removed in a\n * future version.\n *\n * @beta\n */\nexport enum NftExcludeFilters {\n /** Exclude NFTs that have been classified as spam. */\n SPAM = 'SPAM',\n\n /** Exclude NFTs that have been airdropped to a user. */\n AIRDROPS = 'AIRDROPS'\n}\n\n/**\n * Enum of NFT filters that can be applied to a {@link getNftsForOwner} or a\n * {@link getContractsForOwner} request.\n *\n * @beta\n */\nexport enum NftFilters {\n /** NFTs that have been classified as spam. */\n SPAM = 'SPAM',\n\n /** NFTs that have been airdropped to a user. */\n AIRDROPS = 'AIRDROPS'\n}\n\n/**\n * Enum of ordering that can be applied to a {@link getNftsForOwner} or a\n * {@link getContractsForOwner} response.\n *\n * @beta\n */\nexport enum NftOrdering {\n TRANSFERTIME = 'TRANSFERTIME'\n}\n\n/**\n * The response object for the {@link getNftsForOwner} and\n * {@link getNftsForOwnerIterator} functions. The object contains the NFTs with\n * metadata owned by the provided address, along with pagination information and\n * the total count.\n *\n * @public\n */\nexport interface OwnedNftsResponse {\n /** The NFTs owned by the provided address. */\n readonly ownedNfts: OwnedNft[];\n\n /**\n * Pagination token that can be passed into another request to fetch the next\n * NFTs. If there is no page key, then there are no more NFTs to fetch.\n */\n readonly pageKey?: string;\n\n /** The total count of NFTs owned by the provided address. */\n readonly totalCount: number;\n}\n\n/**\n * The response object for the {@link getNftsForOwner} and\n * {@link getNftsForOwnerIterator} functions. The object contains the NFTs\n * without metadata owned by the provided address, along with pagination\n * information and the total count.\n *\n * @public\n */\nexport interface OwnedBaseNftsResponse {\n /** The NFTs owned by the provided address. */\n readonly ownedNfts: OwnedBaseNft[];\n\n /**\n * Pagination token that can be passed into another request to fetch the next\n * NFTs. If there is no page key, then there are no more NFTs to fetch.\n */\n readonly pageKey?: string;\n\n /** The total count of NFTs owned by the provided address. */\n readonly totalCount: number;\n}\n\n/**\n * Represents an NFT with metadata owned by an address.\n *\n * @public\n */\nexport interface OwnedNft extends Nft {\n /** The token balance of the NFT. */\n readonly balance: number;\n}\n\n/**\n * Represents an NFT without metadata owned by an address.\n *\n * @public\n */\nexport interface OwnedBaseNft extends BaseNft {\n /** The token balance of the NFT. */\n readonly balance: number;\n}\n\n/**\n * The response object for the {@link getOwnersForNft}.\n *\n * @public\n */\nexport interface GetOwnersForNftResponse {\n /** An array of owner addresses for the provided token. */\n readonly owners: string[];\n}\n\n/**\n * The response object for the {@link getOwnersForContract}.\n *\n * @public\n */\nexport interface GetOwnersForContractResponse {\n /** An array of owner addresses for the provided contract address */\n owners: string[];\n}\n\n/**\n * The response object for the {@link getOwnersForContract}.\n *\n * @public\n */\nexport interface GetOwnersForContractWithTokenBalancesResponse {\n /** An array of owner addresses for the provided contract address */\n owners: NftContractOwner[];\n\n /** Optional page key that is returned when a collection has more than 50,000 owners. */\n pageKey?: string;\n}\n\n/**\n * An object representing the owner of an NFT and its corresponding token\n * balances in a {@link GetOwnersForContractWithTokenBalancesResponse} object.\n */\nexport interface NftContractOwner {\n /** The NFT's owner address. */\n ownerAddress: string;\n\n /** A list of objects containing token balances for the provided NFT contract. */\n tokenBalances: NftContractTokenBalance[];\n}\n\n/**\n * An object representing the owned token and balance values in a\n * {@link GetOwnersForContractWithTokenBalancesResponse} object.\n */\nexport interface NftContractTokenBalance {\n /** The token id owned in the NFT contract. */\n tokenId: string;\n\n /** The token Id balance for the provided owner. */\n balance: number;\n}\n\n/**\n * Represents an NFT token to fetch metadata for in a\n * {@link NftNamespace.getNftMetadataBatch} method.\n */\nexport interface NftMetadataBatchToken {\n /** The NFT contract address. Limited to ERC721 and ERC1155 tokens. */\n contractAddress: string;\n\n /** The id of the NFT. */\n tokenId: BigNumberish;\n\n /** Optional field to specify the type of token to speed up the query. */\n tokenType?: NftTokenType.ERC1155 | NftTokenType.ERC721;\n}\n\n/** Additional options for the {@link NftNamespace.getNftMetadataBatch} method. */\nexport interface NftMetadataBatchOptions {\n /**\n * No set timeout by default - When metadata is requested, this parameter is\n * the timeout (in milliseconds) for the website hosting the metadata to\n * respond. If you want to only access the cache and not live fetch any\n * metadata for cache misses then set this value to 0.\n */\n tokenUriTimeoutInMs?: number;\n\n /**\n * Whether to refresh the metadata for the given NFT token before returning\n * the response. Defaults to false for faster response times.\n */\n refreshCache?: boolean;\n}\n\n/**\n * The successful object returned by the {@link getFloorPrice} call for each\n * marketplace (e.g. looksRare).\n *\n * @public\n */\nexport interface FloorPriceMarketplace {\n /** The floor price of the collection on the given marketplace */\n readonly floorPrice: number;\n /** The currency in which the floor price is denominated */\n readonly priceCurrency: string;\n /** The link to the collection on the given marketplace */\n readonly collectionUrl: string;\n /** UTC timestamp of when the floor price was retrieved from the marketplace */\n readonly retrievedAt: string;\n}\n\n/**\n * The failing object returned by the {@link getFloorPrice} call for each\n * marketplace (e.g. looksRare).\n *\n * @public\n */\nexport interface FloorPriceError {\n /** Error fetching floor prices from the given marketplace */\n readonly error: string;\n}\n\n/**\n * The response object for the {@link getFloorPrice} method.\n *\n * @public\n */\nexport interface GetFloorPriceResponse {\n /**\n * Name of the NFT marketplace where the collection is listed. Current\n * marketplaces supported: OpenSea, LooksRare\n */\n readonly openSea: FloorPriceMarketplace | FloorPriceError;\n readonly looksRare: FloorPriceMarketplace | FloorPriceError;\n}\n\n/**\n * Optional parameters object for the the {@link getContractsForOwner} method\n *\n * @public\n */\nexport interface GetContractsForOwnerOptions {\n /** Key for pagination to use to fetch results from the next page if available. */\n pageKey?: string;\n\n /**\n * Optional list of filters applied to the query. NFTs that match one or more\n * of these filters are included in the response. May not be used in\n * conjunction with {@link excludeFilters}.\n */\n includeFilters?: NftFilters[];\n\n /**\n * Optional list of filters applied to the query. NFTs that match one or more\n * of these filters are excluded from the response. May not be used in\n * conjunction with {@link includeFilters}\n */\n excludeFilters?: NftFilters[];\n\n /**\n * Order in which to return results. By default, results are ordered by\n * contract address and token ID in lexicographic order.\n */\n orderBy?: NftOrdering;\n}\n\n/**\n * The response for the {@link NftNamespace.getContractsForOwner} method.\n *\n * @public\n */\nexport interface GetContractsForOwnerResponse {\n /** The list of contracts, that match the query, held by the given address. */\n contracts: ContractForOwner[];\n\n /** Key for pagination to use to fetch results from the next page if available. */\n pageKey?: string;\n\n /** Total number of NFT contracts held by the given address. */\n totalCount: number;\n}\n\n/** Represents a single NFT contract data in the {@link GetContractsForOwnerResponse}. */\nexport interface ContractForOwner extends NftContract {\n /**\n * Sum of NFT balances across all token IDs held by the owner. For\n * non-fungible tokens this will be equal to the numDistinctTokensOwned, but\n * it may be higher if the user holds some fungible ERC1155 tokens.\n */\n totalBalance: number;\n\n /**\n * Number of distinct token IDs held by the owner. For non-fungible tokens\n * this will be equal to the totalBalance, but it may be lower if the user\n * holds some fungible ERC1155 tokens.\n */\n numDistinctTokensOwned: number;\n\n isSpam: boolean;\n\n /** One of the tokens from this contract held by the owner. */\n tokenId: string;\n\n /** Alternative NFT metadata for this contract to be parsed manually. */\n media: Media;\n}\n\n/**\n * Optional parameters object for the {@link getNftSales} endpoint.\n *\n * This interface is used to filter the NFT sales data.\n *\n * @public\n */\nexport interface GetNftSalesOptions {\n /** The block number to start fetching NFT sales data from. */\n fromBlock?: number | 'latest';\n\n /** The block number limit to fetch NFT sales data from. */\n toBlock?: number | 'latest';\n\n /** Whether to return the results in ascending or descending order by block number. */\n order?: SortingOrder;\n\n /** The NFT marketplace to filter sales by. */\n marketplace?: NftSaleMarketplace;\n\n /** The address of the NFT buyer to filter sales by. */\n buyerAddress?: string;\n\n /** The address of the NFT seller to filter sales by. */\n sellerAddress?: string;\n\n /**\n * Filter by whether the buyer or seller was the taker in the NFT trade.\n * Defaults to returning both buyer and seller taker trades.\n */\n taker?: NftSaleTakerType;\n\n /** The maximum number of NFT sales to return. */\n limit?: number;\n\n /** Key for pagination to use to fetch results from the next page if available. */\n pageKey?: string;\n}\n\n/**\n * Alternative optional parameters object for the {@link getNftSales} endpoint\n * that allows filtering results by contractAddress.\n *\n * This interface is used to filter the NFT sales data.\n *\n * @public\n */\nexport interface GetNftSalesOptionsByContractAddress\n extends GetNftSalesOptions {\n /** The contract address of a NFT collection to filter sales by. */\n contractAddress: string;\n\n /** The token ID of an NFT within the specified contractAddress to filter sales by. */\n tokenId?: BigNumberish;\n}\n\n/**\n * The response for the {@link NftNamespace.getNftSales} method.\n *\n * @public\n */\nexport interface GetNftSalesResponse {\n /** The page key to use to fetch the next page if more results are available. */\n pageKey?: string;\n\n /** List of NFT sales that match the query */\n nftSales: NftSale[];\n}\n\n/** Represents a single NFT sale data in the {@link GetNftSalesResponse}. */\nexport interface NftSale {\n /** The marketplace the sale took place on. */\n marketplace: NftSaleMarketplace;\n\n /** The NFT contract address. */\n contractAddress: string;\n\n /** The decimal token ID of the NFT being sold. */\n tokenId: string;\n\n /** The number of tokens sold in the sale as a decimal integer string. */\n quantity: string;\n\n /** The address of the buyer in the NFT sale. */\n buyerAddress: string;\n\n /** The address of the seller in the NFT sale. */\n sellerAddress: string;\n\n /** Whether the price taker in the trade was the buyer or the seller. */\n taker: NftSaleTakerType;\n\n /** The payment from buyer to the seller. */\n sellerFee: NftSaleFeeData;\n\n /** The payment from buyer to the marketplace. */\n marketplaceFee?: NftSaleFeeData;\n\n /** The payment from buyer to the royalty address of the NFT collection. */\n royaltyFee?: NftSaleFeeData;\n\n /** The block number the NFT sale took place in. */\n blockNumber: number;\n\n /** The log number of the sale event emitted within the block. */\n logIndex: number;\n\n /** The index of the token within the bundle of NFTs sold in the sale. */\n bundleIndex: number;\n\n /** The transactionHash of the NFT sale. */\n transactionHash: string;\n}\n\n/**\n * Fee detail for an NFT sale.\n *\n * @public\n */\nexport interface NftSaleFeeData {\n /** The fee payment amount as a decimal integer string. */\n amount: string;\n\n /** The symbol of the token used for the payment. */\n symbol: string;\n\n /** The number of decimals of the token used for the payment. */\n decimal: number;\n}\n\n/**\n * Enum for representing the supported sorting orders of the API.\n *\n * @public\n */\nexport enum SortingOrder {\n ASCENDING = 'asc',\n DESCENDING = 'desc'\n}\n\n/**\n * Enum representing the supported NFT marketplaces by the {@link getNftSales} endpoint.\n *\n * @public\n */\nexport enum NftSaleMarketplace {\n SEAPORT = 'seaport',\n LOOKSRARE = 'looksrare',\n X2Y2 = 'x2y2',\n UNKNOWN = 'unknown'\n}\n\n/**\n * Enum for specifing the taker type for the {@link getNftSales} endpoint.\n *\n * @public\n */\nexport enum NftSaleTakerType {\n BUYER = 'buyer',\n SELLER = 'seller'\n}\n\n/**\n * Information about the rarity of an NFT's attribute in the specified collection.\n *\n * @public\n */\nexport interface NftAttributeRarity {\n /** Name of the NFT's attribute. */\n value: string;\n\n /** The type of NFT attribute. */\n traitType: string;\n\n /**\n * A number from 0 to 1 representing the prevalence of this value for this\n * trait type in the current collection.\n */\n prevalence: number;\n}\n\n/**\n * Summary of the attribute prevalence for the specified NFT contract.\n *\n * @public\n */\nexport interface NftAttributesResponse {\n /** The specified NFT contract's address. */\n contractAddress: string;\n\n /** The specified NFT contract's total supply. */\n totalSupply: number;\n\n /**\n * The attribute prevalence of each trait grouped by the trait type for the\n * provided NFT.\n */\n summary: Record>;\n}\n\n/** The refresh result response object returned by {@link refreshContract}. */\nexport interface RefreshContractResult {\n /** The NFT contract address that was passed in to be refreshed. */\n contractAddress: string;\n\n /** The current state of the refresh request. */\n refreshState: RefreshState;\n\n /**\n * Percentage of tokens currently refreshed, represented as an integer string.\n * Field can be null if the refresh has not occurred.\n */\n progress: string | null;\n}\n\n/** The current state of the NFT contract refresh process. */\nexport enum RefreshState {\n /** The provided contract is not an NFT or does not contain metadata. */\n DOES_NOT_EXIST = 'does_not_exist',\n\n /** The contract has already been queued for refresh. */\n ALREADY_QUEUED = 'already_queued',\n\n /** The contract is currently being refreshed. */\n IN_PROGRESS = 'in_progress',\n\n /** The contract refresh is complete. */\n FINISHED = 'finished',\n\n /** The contract refresh has been queued and await execution. */\n QUEUED = 'queued',\n\n /** The contract was unable to be queued due to an internal error. */\n QUEUE_FAILED = 'queue_failed'\n}\n\n/**\n * The parameter field of {@link TransactionReceiptsParams}.\n *\n * @public\n */\nexport interface TransactionReceiptsBlockNumber {\n /** The block number to get transaction receipts for. */\n blockNumber: string;\n}\n\n/**\n * The parameter field of {@link TransactionReceiptsParams}.\n *\n * @public\n */\nexport interface TransactionReceiptsBlockHash {\n /** The block hash to get transaction receipts for. */\n blockHash: string;\n}\n\n/**\n * The parameters to use with the {@link CoreNamespace.getTransactionReceipts} method.\n *\n * @public\n */\nexport type TransactionReceiptsParams =\n | TransactionReceiptsBlockNumber\n | TransactionReceiptsBlockHash;\n\n/**\n * Response object for a {@link CoreNamespace.getTransactionReceipts} call.\n *\n * @public\n */\nexport interface TransactionReceiptsResponse {\n /** A list of transaction receipts for the queried block. */\n receipts: TransactionReceipt[] | null;\n}\n\n/**\n * Metadata object returned in a {@link AssetTransfersResult} object if the asset\n * transferred is an ERC1155.\n *\n * @public\n */\nexport interface ERC1155Metadata {\n tokenId: string;\n value: string;\n}\n\n/**\n * Information about the underlying contract for the asset that was transferred\n * in a {@link AssetTransfersResult} object.\n *\n * @public\n */\nexport interface RawContract {\n /**\n * The raw transfer value as a hex string. `null` if the transfer was for an\n * ERC721 or ERC1155 token.\n */\n value: string | null;\n\n /** The contract address. `null` if it was an internal or external transfer. */\n address: string | null;\n\n /**\n * The number of decimals in the contract as a hex string. `null` if the value\n * is not in the contract and not available from other sources.\n */\n decimal: string | null;\n}\n\n/**\n * Optional parameters object for the {@link getNftsForContract} and\n * {@link getNftsForContractIterator} functions.\n *\n * This interface is used to fetch NFTs with their associated metadata. To get\n * Nfts without their associated metadata, use {@link GetBaseNftsForContractOptions}.\n *\n * @public\n */\nexport interface GetNftsForContractOptions {\n /**\n * Optional page key from an existing {@link NftContractBaseNftsResponse} or\n * {@link NftContractNftsResponse}to use for pagination.\n */\n pageKey?: string;\n\n /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */\n omitMetadata?: boolean;\n\n /**\n * Sets the total number of NFTs to return in the response. Defaults to 100.\n * Maximum page size is 100.\n */\n pageSize?: number;\n\n /**\n * No set timeout by default - When metadata is requested, this parameter is\n * the timeout (in milliseconds) for the website hosting the metadata to\n * respond. If you want to only access the cache and not live fetch any\n * metadata for cache misses then set this value to 0.\n */\n tokenUriTimeoutInMs?: number;\n}\n\n/**\n * Optional parameters object for the {@link getNftsForContract} and\n * {@link getNftsForContractIterator} functions.\n *\n * This interface is used to fetch NFTs without their associated metadata. To\n * get Nfts with their associated metadata, use {@link GetNftsForContractOptions}.\n *\n * @public\n */\nexport interface GetBaseNftsForContractOptions {\n /**\n * Optional page key from an existing {@link NftContractBaseNftsResponse} or\n * {@link NftContractNftsResponse}to use for pagination.\n */\n pageKey?: string;\n\n /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */\n omitMetadata: false;\n\n /**\n * Sets the total number of NFTs to return in the response. Defaults to 100.\n * Maximum page size is 100.\n */\n pageSize?: number;\n}\n\n/**\n * Optional parameters object for the {@link getNftsForContract} method.\n *\n * This interface configures options when fetching the owner addresses of the\n * provided contract.\n *\n * @public\n */\nexport interface GetOwnersForContractOptions {\n /**\n * Whether to include the token balances per token id for each owner. Defaults\n * to false when omitted.\n */\n withTokenBalances?: boolean;\n\n /** The block number in hex or decimal to fetch owners for. */\n block?: string;\n\n /** Optional page key to paginate the next page for large requests. */\n pageKey?: string;\n}\n\n/**\n * Optional parameters object for the {@link getNftsForContract} method.\n *\n * This interface configures options when fetching the owner addresses of the\n * provided contract.\n *\n * @public\n */\nexport interface GetOwnersForContractWithTokenBalancesOptions {\n /**\n * Whether to include the token balances per token id for each owner. Defaults\n * to false when omitted.\n */\n withTokenBalances: true;\n\n /** The block number in hex or decimal to fetch owners for. */\n block?: string;\n\n /** Optional page key to paginate the next page for large requests. */\n pageKey?: string;\n}\n\n/**\n * The response object for the {@link getNftsForContract} function. The object\n * contains the NFTs without metadata inside the NFT contract.\n *\n * @public\n */\nexport interface NftContractBaseNftsResponse {\n /** An array of NFTs without metadata. */\n nfts: BaseNft[];\n\n /**\n * Pagination token that can be passed into another request to fetch the next\n * NFTs. If there is no page key, then there are no more NFTs to fetch.\n */\n pageKey?: string;\n}\n\n/**\n * The response object for the {@link getNftsForContract} function. The object\n * contains the NFTs with metadata inside the NFT contract.\n *\n * @public\n */\nexport interface NftContractNftsResponse {\n /** An array of NFTs with metadata. */\n nfts: Nft[];\n\n /**\n * Pagination token that can be passed into another request to fetch the next\n * NFTs. If there is no page key, then there are no more NFTs to fetch.\n */\n pageKey?: string;\n}\n\n/** OpenSea's metadata for an NFT collection. */\nexport interface OpenSeaCollectionMetadata {\n /** The floor price of the NFT. */\n floorPrice?: number;\n /** The name of the collection on OpenSea. */\n collectionName?: string;\n /** The approval status of the collection on OpenSea. */\n safelistRequestStatus?: OpenSeaSafelistRequestStatus;\n /** The image URL determined by OpenSea. */\n imageUrl?: string;\n /** The description of the collection on OpenSea. */\n description?: string;\n /** The homepage of the collection as determined by OpenSea. */\n externalUrl?: string;\n /** The Twitter handle of the collection. */\n twitterUsername?: string;\n /** The Discord URL of the collection. */\n discordUrl?: string;\n /** Timestamp of when the OpenSea metadata was last ingested by Alchemy. */\n lastIngestedAt?: string;\n}\n\n/** An OpenSea collection's approval status. */\nexport enum OpenSeaSafelistRequestStatus {\n /** Verified collection. */\n VERIFIED = 'verified',\n /** Collections that are approved on open sea and can be found in search results. */\n APPROVED = 'approved',\n /** Collections that requested safelisting on OpenSea. */\n REQUESTED = 'requested',\n /** Brand new collections. */\n NOT_REQUESTED = 'not_requested'\n}\n\n/**\n * The response object for the {@link findContractDeployer} function.\n *\n * @public\n */\nexport interface DeployResult {\n /** The address of the contract deployer, if it is available. */\n readonly deployerAddress?: string;\n\n /** The block number the contract was deployed in. */\n readonly blockNumber: number;\n}\n\n/**\n * Method names for Alchemy's custom Subscription API endpoints.\n *\n * This value is provided in the `method` field when creating an event filter on\n * the Websocket Namespace.\n */\nexport enum AlchemySubscription {\n PENDING_TRANSACTIONS = 'alchemy_pendingTransactions',\n MINED_TRANSACTIONS = 'alchemy_minedTransactions'\n}\n\n/**\n * Event filter for the {@link AlchemyWebSocketProvider.on} and\n * {@link AlchemyWebSocketProvider.once} methods to use Alchemy's custom\n * `alchemy_pendingTransactions` endpoint.\n *\n * Returns the transaction information for all pending transactions that match a\n * given filter. For full documentation, see:\n * {@link https://docs.alchemy.com/reference/alchemy-pendingtransactions}\n *\n * Note that excluding all optional parameters will return transaction\n * information for ALL pending transactions that are added to the mempool.\n *\n * @public\n */\nexport interface AlchemyPendingTransactionsEventFilter {\n method: AlchemySubscription.PENDING_TRANSACTIONS;\n\n /** Filter pending transactions sent FROM the provided address or array of addresses. */\n fromAddress?: string | string[];\n\n /** Filter pending transactions sent TO the provided address or array of addresses. */\n toAddress?: string | string[];\n\n /**\n * Whether to only include transaction hashes and exclude the rest of the\n * transaction response for a smaller payload. Defaults to false (by default,\n * the entire transaction response is included).\n *\n * Note that setting only {@link hashesOnly} to true will return the same\n * response as subscribing to `newPendingTransactions`.\n */\n hashesOnly?: boolean;\n}\n\n/**\n * Event filter for the {@link AlchemyWebSocketProvider.on} and\n * {@link AlchemyWebSocketProvider.once} methods to use Alchemy's custom\n * `alchemy_minedTransactions` endpoint.\n *\n * Returns the transaction information for all mined transactions that match the\n * provided filter. For full documentation, see:\n * {@link https://docs.alchemy.com/reference/alchemy-minedtransactions}\n *\n * Note that excluding all optional parameters will return transaction\n * information for ALL mined transactions.\n *\n * @public\n */\nexport interface AlchemyMinedTransactionsEventFilter {\n method: AlchemySubscription.MINED_TRANSACTIONS;\n\n /**\n * Address filters to subscribe to. Defaults to all transactions if omitted.\n * Limit 100 address filters. Requires a non-empty array.\n */\n addresses?: NonEmptyArray;\n\n /**\n * Whether to include transactions that were removed from the mempool.\n * Defaults to false.\n */\n includeRemoved?: boolean;\n\n /**\n * Whether to only include transaction hashes and exclude the rest of the\n * transaction response for a smaller payload. Defaults to false (by default,\n * the entire transaction response is included).\n */\n hashesOnly?: boolean;\n}\n\n/**\n * Address filters for {@link AlchemyMinedTransactionsEventFilter}. Requires at\n * least one of the fields to be set.\n */\nexport type AlchemyMinedTransactionsAddress = RequireAtLeastOne<{\n to?: string;\n from?: string;\n}>;\n\n/**\n * Alchemy's event type that extends the default {@link EventType} interface to\n * also include Alchemy's Subscription API.\n *\n * @public\n */\nexport type AlchemyEventType = EventType | AlchemyEventFilter;\n\n/**\n * This type represents the Alchemy's Subscription API endpoints as event\n * filters compatible with other ethers events.\n */\nexport type AlchemyEventFilter =\n | AlchemyMinedTransactionsEventFilter\n | AlchemyPendingTransactionsEventFilter;\n\n/** Options for the {@link TransactNamespace.sendPrivateTransaction} method. */\nexport interface SendPrivateTransactionOptions {\n /**\n * Whether to use fast-mode. Defaults to false. Please note that fast mode\n * transactions cannot be cancelled using\n * {@link TransactNamespace.cancelPrivateTransaction}. method.\n *\n * See {@link https://docs.flashbots.net/flashbots-protect/rpc/fast-mode} for\n * more details.\n */\n fast: boolean;\n}\n\n/**\n * Response object for the {@link TransactNamespace.sendGasOptimizedTransaction} method.\n *\n * @internal\n */\n// TODO(txjob): Remove internal tag once this feature is released.\nexport interface GasOptimizedTransactionResponse {\n /**\n * The tracking id. This can be used to check the status of the transaction\n * via {@link TransactNamespace.getGasOptimizedTransactionStatus}.\n */\n trackingId: string;\n\n /* An array of the transaction hashes from submitted transactions. */\n transactionHashes: string[];\n}\n\n/**\n * Response object for the\n * {@link TransactNamespace.getGasOptimizedTransactionStatus} method.\n *\n * @internal\n */\n// TODO(txjob): Remove internal tag once this feature is released.\nexport interface GasOptimizedTransactionStatusResponse {\n /** The status of the submitted transaction job. */\n jobStatus: GasOptimizedTransactionStatus;\n\n /** An array of the submitted transactions hashes that have been attempted. */\n transactionHashesAttempted: string[];\n\n /** The final mined transaction hash if the job was completed successfully. */\n minedTransactionHash?: string;\n}\n\n/**\n * Potential transaction job statuses for a {@link GasOptimizedTransactionResponse}\n *\n * @internal\n */\n// TODO(txjob): Remove internal tag once this feature is released.\nexport enum GasOptimizedTransactionStatus {\n UNSPECIFIED = 'TRANSACTION_JOB_STATUS_UNSPECIFIED',\n IN_PROGRESS = 'IN_PROGRESS',\n COMPLETE = 'COMPLETE',\n ABANDONED = 'ABANDONED'\n}\n\n/** SDK representation of a Webhook in the Notify API. */\nexport interface Webhook {\n /** The webhook's unique id. */\n id: string;\n /** The network the webhook is on. */\n network: Network;\n /** The type of webhook. */\n type: WebhookType;\n /** The url that the webhook sends its payload to. */\n url: string;\n /** Whether the webhook is currently active */\n isActive: boolean;\n /** The creation time of the webhook as an ISO string. */\n timeCreated: string;\n /** The signing key used to verify payloads for the webhook. */\n signingKey: string;\n /** The webhook version. All newly created webhooks default to V2. */\n version: WebhookVersion;\n /**\n * The app id of the app used for the webhook. This field is only present on\n * {@link MinedTransactionWebhook} and {@link DroppedTransactionWebhook}\n */\n appId?: string;\n}\n\n/** The version of the webhook. All newly created webhooks default to V2. */\nexport enum WebhookVersion {\n V1 = 'V1',\n V2 = 'V2'\n}\n\n/** The type of {@link Webhook}. */\nexport enum WebhookType {\n MINED_TRANSACTION = 'MINED_TRANSACTION',\n DROPPED_TRANSACTION = 'DROPPED_TRANSACTION',\n ADDRESS_ACTIVITY = 'ADDRESS_ACTIVITY',\n NFT_ACTIVITY = 'NFT_ACTIVITY'\n}\n\n/**\n * A Mined Transaction Webhook is used to notify your app whenever a transaction\n * sent through your API key gets successfully mined. This is useful if you want\n * to notify customers that their transaction went through.\n */\nexport interface MinedTransactionWebhook extends Webhook {\n type: WebhookType.MINED_TRANSACTION;\n}\n\n/**\n * A Dropped Transaction webhook is used to notify your app whenever a\n * transaction sent through your API key gets dropped. This can be useful if you\n * want to notify customers that their transactions were dropped.\n */\nexport interface DroppedTransactionWebhook extends Webhook {\n type: WebhookType.DROPPED_TRANSACTION;\n}\n\n/**\n * An Address Activity Webhook tracks ETH, ERC20, ERC721, and ERC1155 transfers\n * for the provided addresses. This can be used to notify your app with\n * real-time state changes when your tracked addresses send or receive tokens.\n */\nexport interface AddressActivityWebhook extends Webhook {\n type: WebhookType.ADDRESS_ACTIVITY;\n}\n\n/**\n * The NFT Activity Webhook tracks all ERC721 and ERC1155 activity. This can be\n * used to notify your app with real time state changes when an NFT is\n * transferred between addresses.\n */\nexport interface NftActivityWebhook extends Webhook {\n type: WebhookType.NFT_ACTIVITY;\n}\n\n/** The response for a {@link NotifyNamespace.getAllWebhooks} method. */\nexport interface GetAllWebhooksResponse {\n /** All webhooks attached to the provided auth token. */\n webhooks: Webhook[];\n /** The total number of webhooks. */\n totalCount: number;\n}\n\n/** Options object for the {@link NotifyNamespace.getAddresses} method. */\nexport interface GetAddressesOptions {\n /** Number of addresses to fetch. */\n limit?: number;\n\n /** Page */\n pageKey?: string;\n}\n\n/** Response object for the {@link NotifyNamespace.getAddresses} method. */\nexport interface AddressActivityResponse {\n /** The addresses for the webhook. */\n addresses: string[];\n /** The total number of addresses. */\n totalCount: number;\n /** Optional page key used to fetch the remaining addresses. */\n pageKey?: string;\n}\n\n/**\n * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order\n * to create a {@link MinedTransactionWebhook} or {@link DroppedTransactionWebhook}.\n *\n * The webhook will be created on the app and network associated with the appId.\n * To find the app id of a project, go to the Alchemy Dashboard in the Apps tab.\n * After clicking on an app, the app id is the string in the URL following 'apps/'.\n *\n * This is a temporary workaround for now. We're planning on detecting the app\n * id from the provided api key directly. Stay tuned!\n */\nexport interface TransactionWebhookParams {\n /** The app id of the project to create the webhook on. */\n appId: string;\n}\n\n/**\n * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order\n * to create a {@link NftActivityWebhook}.\n */\nexport interface NftWebhookParams {\n /** Array of NFT filters the webhook should track. */\n filters: NftFilter[];\n /**\n * Optional network to create the webhook on. If omitted, the webhook will be\n * created on network of the app provided in the api key config.\n */\n network?: Network;\n}\n\n/**\n * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order\n * to create a {@link AddressActivityWebhook}.\n */\nexport interface AddressWebhookParams {\n /** Array of addresses the webhook should activity for. */\n addresses: string[];\n /**\n * Optional network to create the webhook on. If omitted, the webhook will be\n * created on network of the app provided in the api key config.\n */\n network?: Network;\n}\n\n/** NFT to track on a {@link NftActivityWebhook}. */\nexport interface NftFilter {\n /** The contract address of the NFT. */\n contractAddress: string;\n /** The token id of the NFT. */\n tokenId: BigNumberish;\n}\n\n/** Response object for the {@link NotifyNamespace.getNftFilters} method. */\nexport interface NftFiltersResponse {\n /** The NFT filters on the provided webhook. */\n filters: NftFilter[];\n /** The total number of NFT filters on the webhook. */\n totalCount: number;\n /** Optional page key used to fetch the remaining filters. */\n pageKey?: string;\n}\n\n/**\n * Params object when calling {@link NotifyNamespace.updateWebhook} to mark a\n * webhook as active or inactive.\n */\nexport interface WebhookStatusUpdate {\n /** Whether the webhook is active. */\n isActive: boolean;\n}\n\n/**\n * Params object when calling {@link NotifyNamespace.updateWebhook} to add and\n * remove NFT filters for a {@link NftActivityWebhook}.\n */\nexport interface WebhookNftFilterUpdate {\n /** The filters to additionally track. */\n addFilters: NftFilter[];\n /** Existing filters to remove. */\n removeFilters: NftFilter[];\n}\n\n/**\n * Params object when calling {@link NotifyNamespace.updateWebhook} to add and\n * remove addresses for a {@link AddressActivityWebhook}.\n */\nexport interface WebhookAddressUpdate {\n /** The addresses to additionally track. */\n addAddresses: string[];\n /** Existing addresses to remove. */\n removeAddresses: string[];\n}\n\n/**\n * Params object when calling {@link NotifyNamespace.updateWebhook} to replace\n * all existing addresses for a {@link AddressActivityWebhook}.\n */\nexport interface WebhookAddressOverride {\n /** The new addresses to track. Existing addresses will be removed. */\n newAddresses: string[];\n}\n\n/**\n * Params object when calling {@link NotifyNamespace.updateWebhook} to update a\n * {@link NftActivityWebhook}.\n */\n\nexport type NftWebhookUpdate =\n | WebhookStatusUpdate\n | RequireAtLeastOne;\n\n/**\n * Params object when calling {@link NotifyNamespace.updateWebhook} to update a\n * {@link AddressActivityWebhook}.\n */\nexport type AddressWebhookUpdate =\n | WebhookStatusUpdate\n | RequireAtLeastOne\n | WebhookAddressOverride;\n\n/**\n * Requires at least one of the properties to be set.\n *\n * Implementation copied over from\n * {@link https://learn.microsoft.com/en-us/javascript/api/@azure/keyvault-certificates/requireatleastone?view=azure-node-latest}\n */\nexport type RequireAtLeastOne = {\n [K in keyof T]-?: Required> &\n Partial>>;\n}[keyof T];\n\n/** Requires an array with at least one value. */\nexport type NonEmptyArray = [T, ...T[]];\n","import { Network as NetworkFromEthers } from '@ethersproject/networks';\n\nimport { Network } from '../types/types';\n\nexport const DEFAULT_ALCHEMY_API_KEY = 'demo';\nexport const DEFAULT_NETWORK = Network.ETH_MAINNET;\nexport const DEFAULT_MAX_RETRIES = 5;\n\n/**\n * Returns the base URL for making Alchemy API requests. The `alchemy.com`\n * endpoints only work with non eth json-rpc requests.\n *\n * @internal\n */\nexport function getAlchemyHttpUrl(network: Network, apiKey: string): string {\n return `https://${network}.g.alchemy.com/v2/${apiKey}`;\n}\n\nexport function getAlchemyNftHttpUrl(network: Network, apiKey: string): string {\n return `https://${network}.g.alchemy.com/nft/v2/${apiKey}`;\n}\n\nexport function getAlchemyWsUrl(network: Network, apiKey: string): string {\n return `wss://${network}.g.alchemy.com/v2/${apiKey}`;\n}\n\nexport function getAlchemyWebhookHttpUrl(): string {\n return 'https://dashboard.alchemy.com/api';\n}\n\nexport enum AlchemyApiType {\n BASE,\n NFT,\n WEBHOOK\n}\n\n/**\n * Mapping of network names to their corresponding Network strings used to\n * create an Ethers.js Provider instance.\n */\nexport const EthersNetwork = {\n [Network.ETH_MAINNET]: 'mainnet',\n [Network.ETH_ROPSTEN]: 'ropsten',\n [Network.ETH_GOERLI]: 'goerli',\n [Network.ETH_KOVAN]: 'kovan',\n [Network.ETH_RINKEBY]: 'rinkeby',\n [Network.OPT_MAINNET]: 'optimism',\n [Network.OPT_KOVAN]: 'optimism-kovan',\n [Network.OPT_GOERLI]: 'optimism-goerli',\n [Network.ARB_MAINNET]: 'arbitrum',\n [Network.ARB_RINKEBY]: 'arbitrum-rinkeby',\n [Network.ARB_GOERLI]: 'arbitrum-goerli',\n [Network.MATIC_MAINNET]: 'matic',\n [Network.MATIC_MUMBAI]: 'maticmum',\n [Network.ASTAR_MAINNET]: 'astar-mainnet'\n};\n\n/**\n * Mapping of network names to their corresponding Ethers Network objects. These\n * networks are not yet supported by Ethers and are listed here to be overriden\n * in the provider.\n */\nexport const CustomNetworks: { [key: string]: NetworkFromEthers } = {\n 'arbitrum-goerli': {\n chainId: 421613,\n name: 'arbitrum-goerli'\n },\n 'astar-mainnet': {\n chainId: 592,\n name: 'astar-mainnet'\n }\n};\n\nexport function noop(): void {\n // It's a no-op\n}\n\nexport const ETH_NULL_VALUE = '0x';\n","import { AlchemySettings, Network } from '../types/types';\nimport {\n AlchemyApiType,\n DEFAULT_ALCHEMY_API_KEY,\n DEFAULT_MAX_RETRIES,\n DEFAULT_NETWORK,\n getAlchemyHttpUrl,\n getAlchemyNftHttpUrl,\n getAlchemyWebhookHttpUrl\n} from '../util/const';\nimport type { AlchemyProvider } from './alchemy-provider';\nimport type { AlchemyWebSocketProvider } from './alchemy-websocket-provider';\n\n/**\n * This class holds the config information for the SDK client instance and\n * exposes the underlying providers for more advanced use cases.\n *\n * @public\n */\nexport class AlchemyConfig {\n /** The Alchemy API key. */\n readonly apiKey: string;\n\n /** The Network that this SDK is associated with. */\n readonly network: Network;\n\n /** The maximum number of retries to perform. */\n readonly maxRetries: number;\n\n /** Setting to enable automatic batching on json-rpc requests. Defaults to false.*/\n readonly batchRequests: boolean;\n\n /**\n * The optional hardcoded URL to send requests to instead of using the network\n * and apiKey.\n */\n readonly url?: string;\n\n /** The optional Alchemy auth token to use when sending requests with the Notify API. */\n readonly authToken?: string;\n\n /**\n * Dynamically imported provider instance.\n *\n * @internal\n */\n private _baseAlchemyProvider: Promise | undefined;\n\n /**\n * Dynamically imported provider instance.\n *\n * @internal\n */\n private _baseAlchemyWssProvider:\n | Promise\n | undefined;\n\n constructor(config?: AlchemySettings) {\n this.apiKey = config?.apiKey || DEFAULT_ALCHEMY_API_KEY;\n this.network = config?.network || DEFAULT_NETWORK;\n this.maxRetries = config?.maxRetries || DEFAULT_MAX_RETRIES;\n this.url = config?.url;\n this.authToken = config?.authToken;\n this.batchRequests = config?.batchRequests || false;\n }\n\n /**\n * Returns the URL endpoint to send the HTTP request to. If a custom URL was\n * provided in the config, that URL is returned. Otherwise, the default URL is\n * from the network and API key.\n *\n * @param apiType - The type of API to get the URL for.\n * @internal\n */\n _getRequestUrl(apiType: AlchemyApiType): string {\n if (this.url !== undefined) {\n return this.url;\n } else if (apiType === AlchemyApiType.NFT) {\n return getAlchemyNftHttpUrl(this.network, this.apiKey);\n } else if (apiType === AlchemyApiType.WEBHOOK) {\n return getAlchemyWebhookHttpUrl();\n } else {\n return getAlchemyHttpUrl(this.network, this.apiKey);\n }\n }\n\n /**\n * Returns an AlchemyProvider instance. Only one provider is created per\n * Alchemy instance.\n *\n * The AlchemyProvider is a wrapper around ether's `AlchemyProvider` class and\n * has been expanded to support Alchemy's Enhanced APIs.\n *\n * Most common methods on the provider are available as top-level methods on\n * the {@link Alchemy} instance, but the provider is exposed here to access\n * other less-common methods.\n *\n * @public\n */\n getProvider(): Promise {\n if (!this._baseAlchemyProvider) {\n this._baseAlchemyProvider = (async () => {\n const { AlchemyProvider } = await import('./alchemy-provider');\n return new AlchemyProvider(this);\n })();\n }\n return this._baseAlchemyProvider;\n }\n\n /**\n * Returns an AlchemyWebsocketProvider instance. Only one provider is created\n * per Alchemy instance.\n *\n * The AlchemyWebSocketProvider is a wrapper around ether's\n * `AlchemyWebSocketProvider` class and has been expanded to support Alchemy's\n * Subscription APIs, automatic backfilling, and other performance improvements.\n *\n * Most common methods on the provider are available as top-level methods on\n * the {@link Alchemy} instance, but the provider is exposed here to access\n * other less-common methods.\n */\n getWebSocketProvider(): Promise {\n if (!this._baseAlchemyWssProvider) {\n this._baseAlchemyWssProvider = (async () => {\n const { AlchemyWebSocketProvider } = await import(\n './alchemy-websocket-provider'\n );\n return new AlchemyWebSocketProvider(this);\n })();\n }\n return this._baseAlchemyWssProvider;\n }\n}\n","import { BigNumber } from '@ethersproject/bignumber';\n\n/**\n * Converts a hex string to a decimal number.\n *\n * @param hexString - The hex string to convert.\n * @public\n */\nexport function fromHex(hexString: string): number {\n return BigNumber.from(hexString).toNumber();\n}\n\n/**\n * Converts a number to a hex string.\n *\n * @param num - The number to convert to hex.\n * @public\n */\nexport function toHex(num: number): string {\n return BigNumber.from(num).toHexString();\n}\n\n/**\n * Checks if a value is a hex string.\n *\n * @param possibleHexString - The value to check.\n * @public\n */\nexport function isHex(possibleHexString: string): boolean {\n return /^0x[0-9a-fA-F]+$/.test(possibleHexString);\n}\n","import { BigNumber } from '@ethersproject/bignumber';\n\nimport { BaseNft, Nft, NftContract } from '../api/nft';\nimport { toHex } from '../api/util';\nimport {\n RawBaseNft,\n RawContractBaseNft,\n RawGetContractsForOwnerResponse,\n RawGetNftSalesResponse,\n RawNft,\n RawNftAttributeRarity,\n RawNftContract,\n RawOpenSeaCollectionMetadata,\n RawSpamInfo\n} from '../internal/raw-interfaces';\nimport {\n GetContractsForOwnerResponse,\n GetNftSalesResponse,\n NftAttributeRarity,\n NftSaleMarketplace,\n NftSaleTakerType,\n NftTokenType,\n OpenSeaCollectionMetadata,\n OpenSeaSafelistRequestStatus,\n SpamInfo,\n TokenUri\n} from '../types/types';\n\nexport function formatBlock(block: string | number): string {\n if (typeof block === 'string') {\n return block;\n } else if (Number.isInteger(block)) {\n return toHex(block);\n }\n return block.toString();\n}\n\nfunction stringToEnum(\n x: string,\n enumb: Record\n): T | undefined {\n return Object.values(enumb).includes(x as T) ? (x as T) : undefined;\n}\n\nexport function getNftContractFromRaw(\n rawNftContract: RawNftContract\n): NftContract {\n return {\n address: rawNftContract.address,\n name: rawNftContract.contractMetadata.name,\n symbol: rawNftContract.contractMetadata.symbol,\n totalSupply: rawNftContract.contractMetadata.totalSupply,\n tokenType: parseNftTokenType(rawNftContract.contractMetadata.tokenType),\n openSea: parseOpenSeaMetadata(rawNftContract.contractMetadata.openSea)\n };\n}\n\nexport function getBaseNftFromRaw(rawBaseNft: RawBaseNft): BaseNft;\nexport function getBaseNftFromRaw(\n rawContractBaseNft: RawContractBaseNft,\n contractAddress: string\n): BaseNft;\nexport function getBaseNftFromRaw(\n rawBaseNft: RawBaseNft | RawContractBaseNft,\n contractAddress?: string\n): BaseNft {\n return {\n contract: contractAddress\n ? { address: contractAddress }\n : (rawBaseNft as RawBaseNft).contract,\n tokenId: BigNumber.from(rawBaseNft.id.tokenId).toString(),\n tokenType: parseNftTokenType(rawBaseNft.id.tokenMetadata?.tokenType)\n };\n}\n\nexport function getNftFromRaw(rawNft: RawNft): Nft {\n try {\n const tokenType = parseNftTokenType(rawNft.id.tokenMetadata?.tokenType);\n const spamInfo = parseSpamInfo(rawNft.spamInfo);\n\n return {\n contract: {\n address: rawNft.contract.address,\n name: rawNft.contractMetadata?.name,\n symbol: rawNft.contractMetadata?.symbol,\n totalSupply: rawNft.contractMetadata?.totalSupply,\n tokenType,\n openSea: parseOpenSeaMetadata(rawNft.contractMetadata?.openSea)\n },\n tokenId: parseNftTokenId(rawNft.id.tokenId),\n tokenType,\n title: rawNft.title,\n description: parseNftDescription(rawNft.description),\n timeLastUpdated: rawNft.timeLastUpdated,\n metadataError: rawNft.error,\n rawMetadata: rawNft.metadata,\n tokenUri: parseNftTokenUri(rawNft.tokenUri),\n media: parseNftTokenUriArray(rawNft.media),\n spamInfo\n };\n } catch (e) {\n throw new Error('Error parsing the NFT response: ' + e);\n }\n}\n\nexport function getNftSalesFromRaw(\n rawNftSales: RawGetNftSalesResponse\n): GetNftSalesResponse {\n return {\n pageKey: rawNftSales?.pageKey,\n nftSales: rawNftSales.nftSales.map(rawNftSale => ({\n marketplace: parseNftSaleMarketplace(rawNftSale.marketplace),\n contractAddress: rawNftSale.contractAddress,\n tokenId: rawNftSale.tokenId,\n quantity: rawNftSale.quantity,\n buyerAddress: rawNftSale.buyerAddress,\n sellerAddress: rawNftSale.sellerAddress,\n taker: parseNftTaker(rawNftSale.taker),\n sellerFee: rawNftSale?.sellerFee,\n marketplaceFee: rawNftSale?.marketplaceFee,\n royaltyFee: rawNftSale?.royaltyFee,\n blockNumber: rawNftSale?.blockNumber,\n logIndex: rawNftSale.logIndex,\n bundleIndex: rawNftSale.bundleIndex,\n transactionHash: rawNftSale.transactionHash\n }))\n };\n}\n\nfunction parseNftSaleMarketplace(marketplace: string): NftSaleMarketplace {\n switch (marketplace) {\n case 'looksrare':\n return NftSaleMarketplace.LOOKSRARE;\n case 'seaport':\n return NftSaleMarketplace.SEAPORT;\n case 'x2y2':\n return NftSaleMarketplace.X2Y2;\n default:\n return NftSaleMarketplace.UNKNOWN;\n }\n}\n\nfunction parseNftTaker(taker: string): NftSaleTakerType {\n // The `.toLowerCase()` call is needed because the API returns the capitalized values\n switch (taker.toLowerCase()) {\n case 'buyer':\n return NftSaleTakerType.BUYER;\n case 'seller':\n return NftSaleTakerType.SELLER;\n default:\n throw new Error(`Unsupported NftSaleTakerType ${taker}`);\n }\n}\n\nexport function getNftRarityFromRaw(\n rawNftRarity: RawNftAttributeRarity[]\n): NftAttributeRarity[] {\n return rawNftRarity.map(({ prevalence, trait_type, value }) => ({\n prevalence,\n traitType: trait_type,\n value\n }));\n}\n\nexport function getContractsForOwnerFromRaw(\n rawContractsForOwner: RawGetContractsForOwnerResponse\n): GetContractsForOwnerResponse {\n return {\n pageKey: rawContractsForOwner?.pageKey,\n totalCount: rawContractsForOwner.totalCount,\n contracts: rawContractsForOwner.contracts.map(contract => {\n return {\n address: contract.address,\n totalSupply: contract.totalSupply,\n isSpam: contract.isSpam,\n media: contract.media,\n numDistinctTokensOwned: contract.numDistinctTokensOwned,\n tokenId: contract.tokenId,\n totalBalance: contract.totalBalance,\n name: contract.name,\n openSea: parseOpenSeaMetadata(contract?.opensea),\n symbol: contract?.symbol,\n tokenType: parseNftTokenType(contract?.tokenType)\n };\n })\n };\n}\n\nfunction parseNftTokenId(tokenId: string): string {\n // We have to normalize the token id here since the backend sometimes\n // returns the token ID as a hex string and sometimes as an integer.\n return BigNumber.from(tokenId).toString();\n}\n\nfunction parseNftTokenType(tokenType: string | undefined): NftTokenType {\n switch (tokenType) {\n case 'erc721':\n case 'ERC721':\n return NftTokenType.ERC721;\n case 'erc1155':\n case 'ERC1155':\n return NftTokenType.ERC1155;\n default:\n return NftTokenType.UNKNOWN;\n }\n}\n\nfunction parseSpamInfo(\n spamInfo: RawSpamInfo | undefined\n): SpamInfo | undefined {\n if (!spamInfo) {\n return undefined;\n }\n const { isSpam, classifications } = spamInfo;\n return {\n isSpam: isSpam === 'true',\n classifications\n };\n}\n\nfunction parseNftDescription(description?: string | string[]): string {\n if (description === undefined) {\n return '';\n }\n\n // TODO: Remove after backend adds JSON stringification.\n if (!Array.isArray(description) && typeof description === 'object') {\n return JSON.stringify(description);\n }\n\n return typeof description === 'string' ? description : description.join(' ');\n}\n\nfunction parseNftTokenUri(uri: TokenUri | undefined): TokenUri | undefined {\n if (uri && uri.raw.length === 0 && uri.gateway.length == 0) {\n return undefined;\n }\n return uri;\n}\n\nfunction parseNftTokenUriArray(arr: TokenUri[] | undefined): TokenUri[] {\n if (arr === undefined) {\n return [];\n }\n return arr.filter(uri => parseNftTokenUri(uri) !== undefined);\n}\n\nexport function parseOpenSeaMetadata(\n openSea: RawOpenSeaCollectionMetadata | undefined\n): OpenSeaCollectionMetadata | undefined {\n if (openSea === undefined) {\n return undefined;\n }\n return {\n floorPrice: openSea.floorPrice,\n collectionName: openSea.collectionName,\n safelistRequestStatus:\n openSea.safelistRequestStatus !== undefined\n ? stringToEnum(\n openSea.safelistRequestStatus,\n OpenSeaSafelistRequestStatus\n )\n : undefined,\n imageUrl: openSea.imageUrl,\n description: openSea.description,\n externalUrl: openSea.externalUrl,\n twitterUsername: openSea.twitterUsername,\n discordUrl: openSea.discordUrl,\n lastIngestedAt: openSea.lastIngestedAt\n };\n}\n\nexport const IS_BROWSER = typeof window !== 'undefined' && window !== null;\n","import type {\n Block,\n BlockTag,\n BlockWithTransactions,\n FeeData,\n Filter,\n FilterByBlockHash,\n Log,\n TransactionReceipt,\n TransactionRequest,\n TransactionResponse\n} from '@ethersproject/abstract-provider';\nimport type { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport type { Network as EthersNetworkAlias } from '@ethersproject/networks/lib/types';\nimport type { Deferrable } from '@ethersproject/properties';\n\nimport {\n AssetTransfersParams,\n AssetTransfersResponse,\n AssetTransfersWithMetadataParams,\n AssetTransfersWithMetadataResponse,\n DeployResult,\n TokenBalanceType,\n TokenBalancesOptionsDefaultTokens,\n TokenBalancesOptionsErc20,\n TokenBalancesResponse,\n TokenBalancesResponseErc20,\n TokenMetadataResponse,\n TransactionReceiptsParams,\n TransactionReceiptsResponse\n} from '../types/types';\nimport { ETH_NULL_VALUE } from '../util/const';\nimport { formatBlock } from '../util/util';\nimport { AlchemyConfig } from './alchemy-config';\nimport { toHex } from './util';\n\n/**\n * The core namespace contains all commonly-used [Ethers.js\n * Provider](https://docs.ethers.io/v5/api/providers/api-providers/#AlchemyProvider)\n * methods. If you are already using Ethers.js, you should be simply able to\n * replace the Ethers.js Provider object with `alchemy.core` when accessing\n * provider methods and it should just work.\n *\n * Do not call this constructor directly. Instead, instantiate an Alchemy object\n * with `const alchemy = new Alchemy(config)` and then access the core namespace\n * via `alchemy.core`.\n */\nexport class CoreNamespace {\n /** @internal */\n constructor(private readonly config: AlchemyConfig) {}\n\n /**\n * Returns the balance of a given address as of the provided block.\n *\n * @param addressOrName The address or name of the account to get the balance for.\n * @param blockTag The optional block number or hash to get the balance for.\n * Defaults to 'latest' if unspecified.\n * @public\n */\n async getBalance(\n addressOrName: string | Promise,\n blockTag?: BlockTag | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.getBalance(addressOrName, blockTag);\n }\n\n /**\n * Returns the contract code of the provided address at the block. If there is\n * no contract deployed, the result is `0x`.\n *\n * @param addressOrName The address or name of the account to get the code for.\n * @param blockTag The optional block number or hash to get the code for.\n * Defaults to 'latest' if unspecified.\n * @public\n */\n async getCode(\n addressOrName: string | Promise,\n blockTag?: BlockTag | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.getCode(addressOrName, blockTag);\n }\n\n /**\n * Return the value of the provided position at the provided address, at the\n * provided block in `Bytes32` format.\n *\n * @param addressOrName The address or name of the account to get the code for.\n * @param position The position of the storage slot to get.\n * @param blockTag The optional block number or hash to get the code for.\n * Defaults to 'latest' if unspecified.\n * @public\n */\n async getStorageAt(\n addressOrName: string | Promise,\n position: BigNumberish | Promise,\n blockTag?: BlockTag | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.getStorageAt(addressOrName, position, blockTag);\n }\n\n /**\n * Returns the number of transactions ever sent from the provided address, as\n * of the provided block tag. This value is used as the nonce for the next\n * transaction from the address sent to the network.\n *\n * @param addressOrName The address or name of the account to get the nonce for.\n * @param blockTag The optional block number or hash to get the nonce for.\n * @public\n */\n async getTransactionCount(\n addressOrName: string | Promise,\n blockTag?: BlockTag | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.getTransactionCount(addressOrName, blockTag);\n }\n\n /**\n * Returns the block from the network based on the provided block number or\n * hash. Transactions on the block are represented as an array of transaction\n * hashes. To get the full transaction details on the block, use\n * {@link getBlockWithTransactions} instead.\n *\n * @param blockHashOrBlockTag The block number or hash to get the block for.\n * @public\n */\n async getBlock(\n blockHashOrBlockTag: BlockTag | string | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.getBlock(blockHashOrBlockTag);\n }\n\n /**\n * Returns the block from the network based on the provided block number or\n * hash. Transactions on the block are represented as an array of\n * {@link TransactionResponse} objects.\n *\n * @param blockHashOrBlockTag The block number or hash to get the block for.\n * @public\n */\n async getBlockWithTransactions(\n blockHashOrBlockTag: BlockTag | string | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.getBlockWithTransactions(blockHashOrBlockTag);\n }\n\n /**\n * Returns the {@link EthersNetworkAlias} Alchemy is connected to.\n *\n * @public\n */\n async getNetwork(): Promise {\n const provider = await this.config.getProvider();\n return provider.getNetwork();\n }\n\n /**\n * Returns the block number of the most recently mined block.\n *\n * @public\n */\n async getBlockNumber(): Promise {\n const provider = await this.config.getProvider();\n return provider.getBlockNumber();\n }\n\n /**\n * Returns the best guess of the current gas price to use in a transaction.\n *\n * @public\n */\n async getGasPrice(): Promise {\n const provider = await this.config.getProvider();\n return provider.getGasPrice();\n }\n\n /**\n * Returns the recommended fee data to use in a transaction.\n *\n * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas\n * should be used.\n *\n * For legacy transactions and networks which do not support EIP-1559, the\n * gasPrice should be used.\n *\n * @public\n */\n async getFeeData(): Promise {\n const provider = await this.config.getProvider();\n return provider.getFeeData();\n }\n\n /**\n * Returns a Promise which will stall until the network has heen established,\n * ignoring errors due to the target node not being active yet.\n *\n * This can be used for testing or attaching scripts to wait until the node is\n * up and running smoothly.\n *\n * @public\n */\n async ready(): Promise {\n const provider = await this.config.getProvider();\n return provider.ready;\n }\n\n /**\n * Returns the result of executing the transaction, using call. A call does\n * not require any ether, but cannot change any state. This is useful for\n * calling getters on Contracts.\n *\n * @param transaction The transaction to execute.\n * @param blockTag The optional block number or hash to get the call for.\n * @public\n */\n async call(\n transaction: Deferrable,\n blockTag?: BlockTag | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.call(transaction, blockTag);\n }\n\n /**\n * Returns an estimate of the amount of gas that would be required to submit\n * transaction to the network.\n *\n * An estimate may not be accurate since there could be another transaction on\n * the network that was not accounted for, but after being mined affects the\n * relevant state.\n *\n * This is an alias for {@link TransactNamespace.estimateGas}.\n *\n * @param transaction The transaction to estimate gas for.\n * @public\n */\n async estimateGas(\n transaction: Deferrable\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.estimateGas(transaction);\n }\n\n /**\n * Returns the transaction with hash or null if the transaction is unknown.\n *\n * If a transaction has not been mined, this method will search the\n * transaction pool. Various backends may have more restrictive transaction\n * pool access (e.g. if the gas price is too low or the transaction was only\n * recently sent and not yet indexed) in which case this method may also return null.\n *\n * NOTE: This is an alias for {@link TransactNamespace.getTransaction}.\n *\n * @param transactionHash The hash of the transaction to get.\n * @public\n */\n async getTransaction(\n transactionHash: string | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.getTransaction(transactionHash);\n }\n\n /**\n * Returns the transaction receipt for hash or null if the transaction has not\n * been mined.\n *\n * To stall until the transaction has been mined, consider the\n * waitForTransaction method below.\n *\n * @param transactionHash The hash of the transaction to get.\n * @public\n */\n async getTransactionReceipt(\n transactionHash: string | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.getTransactionReceipt(transactionHash);\n }\n\n /**\n * Submits transaction to the network to be mined. The transaction must be\n * signed, and be valid (i.e. the nonce is correct and the account has\n * sufficient balance to pay for the transaction).\n *\n * NOTE: This is an alias for {@link TransactNamespace.getTransaction}.\n *\n * @param signedTransaction The signed transaction to send.\n * @public\n */\n async sendTransaction(\n signedTransaction: string | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.sendTransaction(signedTransaction);\n }\n\n /**\n * Returns a promise which will not resolve until specified transaction hash is mined.\n *\n * If {@link confirmations} is 0, this method is non-blocking and if the\n * transaction has not been mined returns null. Otherwise, this method will\n * block until the transaction has confirmed blocks mined on top of the block\n * in which it was mined.\n *\n * NOTE: This is an alias for {@link TransactNamespace.getTransaction}.\n *\n * @param transactionHash The hash of the transaction to wait for.\n * @param confirmations The number of blocks to wait for.\n * @param timeout The maximum time to wait for the transaction to confirm.\n * @public\n */\n async waitForTransaction(\n transactionHash: string,\n confirmations?: number,\n timeout?: number\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.waitForTransaction(transactionHash, confirmations, timeout);\n }\n\n /**\n * Returns an array of logs that match the provided filter.\n *\n * @param filter The filter object to use.\n * @public\n */\n async getLogs(\n filter: Filter | FilterByBlockHash | Promise\n ): Promise> {\n const provider = await this.config.getProvider();\n return provider.getLogs(filter);\n }\n\n /**\n * Allows sending a raw message to the Alchemy backend.\n *\n * @param method The method to call.\n * @param params The parameters to pass to the method.\n * @public\n */\n async send(method: string, params: Array): Promise {\n const provider = await this.config.getProvider();\n return provider.send(method, params);\n }\n\n /**\n * Finds the address that deployed the provided contract and block number it\n * was deployed in.\n *\n * NOTE: This method performs a binary search across all blocks since genesis\n * and can take a long time to complete. This method is a convenience method\n * that will eventually be replaced by a single call to an Alchemy endpoint\n * with this information cached.\n *\n * @param contractAddress - The contract address to find the deployer for.\n * @beta\n */\n async findContractDeployer(contractAddress: string): Promise {\n const provider = await this.config.getProvider();\n const currentBlockNum = await provider.getBlockNumber();\n if (\n (await provider.getCode(contractAddress, currentBlockNum)) ===\n ETH_NULL_VALUE\n ) {\n throw new Error(`Contract '${contractAddress}' does not exist`);\n }\n\n // Binary search for the block number that the contract was deployed in.\n const firstBlock = await binarySearchFirstBlock(\n 0,\n currentBlockNum + 1,\n contractAddress,\n this.config\n );\n\n // Find the first transaction in the block that matches the provided address.\n const txReceipts = await this.getTransactionReceipts({\n blockNumber: toHex(firstBlock)\n });\n const matchingReceipt = txReceipts.receipts?.find(\n receipt => receipt.contractAddress === contractAddress.toLowerCase()\n );\n return {\n deployerAddress: matchingReceipt?.from,\n blockNumber: firstBlock\n };\n }\n\n /**\n * Returns the ERC-20 token balances for a specific owner address.\n *\n * @param addressOrName The owner address to get the token balances for.\n * @public\n */\n async getTokenBalances(\n addressOrName: string\n ): Promise;\n\n /**\n * Returns the token balances for a specific owner address given a list of contracts.\n *\n * @param addressOrName The owner address to get the token balances for.\n * @param contractAddresses A list of contract addresses to check. If omitted,\n * all ERC-20 tokens will be checked.\n * @public\n */\n async getTokenBalances(\n addressOrName: string,\n contractAddresses?: string[]\n ): Promise;\n\n /**\n * Returns the ERC-20 token balances for a specific owner.\n *\n * This overload covers the erc-20 token type which includes a page key in the response.\n *\n * @param addressOrName The owner address to get the token balances for.\n * @param options Token type options set to ERC-20 with optional page key.\n * @public\n */\n async getTokenBalances(\n addressOrName: string,\n options: TokenBalancesOptionsErc20\n ): Promise;\n\n /**\n * Returns the token balances for a specific owner, fetching from the top 100\n * tokens by 24 hour volume.\n *\n * This overload covers the default token type which includes a page key in\n * the response.\n *\n * @param addressOrName The owner address to get the token balances for.\n * @param options Token type options set to ERC-20 with optional page key.\n * @public\n */\n async getTokenBalances(\n addressOrName: string,\n options: TokenBalancesOptionsDefaultTokens\n ): Promise;\n async getTokenBalances(\n addressOrName: string,\n contractAddressesOrOptions?:\n | string[]\n | TokenBalancesOptionsDefaultTokens\n | TokenBalancesOptionsErc20\n ) {\n const provider = await this.config.getProvider();\n const address = await provider._getAddress(addressOrName);\n if (Array.isArray(contractAddressesOrOptions)) {\n if (contractAddressesOrOptions.length > 1500) {\n throw new Error(\n 'You cannot pass in more than 1500 contract addresses to getTokenBalances()'\n );\n }\n if (contractAddressesOrOptions.length === 0) {\n throw new Error(\n 'getTokenBalances() requires at least one contractAddress when using an array'\n );\n }\n return provider._send(\n 'alchemy_getTokenBalances',\n [address, contractAddressesOrOptions],\n 'getTokenBalances'\n );\n } else {\n const tokenType =\n contractAddressesOrOptions === undefined\n ? TokenBalanceType.ERC20\n : contractAddressesOrOptions.type;\n const params: Array = [address, tokenType];\n if (\n contractAddressesOrOptions?.type === TokenBalanceType.ERC20 &&\n contractAddressesOrOptions.pageKey\n ) {\n params.push({ pageKey: contractAddressesOrOptions.pageKey });\n }\n return provider._send(\n 'alchemy_getTokenBalances',\n params,\n 'getTokenBalances'\n );\n }\n }\n\n /**\n * Returns metadata for a given token contract address.\n *\n * @param address The contract address to get metadata for.\n * @public\n */\n async getTokenMetadata(address: string): Promise {\n const provider = await this.config.getProvider();\n return provider._send(\n 'alchemy_getTokenMetadata',\n [address],\n 'getTokenMetadata'\n );\n }\n\n /**\n * Get transactions for specific addresses. See the web documentation for the\n * full details:\n * https://docs.alchemy.com/alchemy/enhanced-apis/transfers-api#alchemy_getassettransfers\n *\n * This overload requires {@link AssetTransfersWithMetadataParams.withMetadata}\n * to be set to `true`, which results in additional metadata returned in the\n * response object.\n *\n * @param params An object containing fields for the asset transfer query\n * @public\n */\n async getAssetTransfers(\n params: AssetTransfersWithMetadataParams\n ): Promise;\n\n /**\n * Get transactions for specific addresses. See the web documentation for the\n * full details:\n * https://docs.alchemy.com/alchemy/enhanced-apis/transfers-api#alchemy_getassettransfers\n *\n * @param params An object containing fields for the asset transfer query.\n * @public\n */\n async getAssetTransfers(\n params: AssetTransfersParams\n ): Promise;\n async getAssetTransfers(\n params: AssetTransfersWithMetadataParams | AssetTransfersParams\n ): Promise {\n const provider = await this.config.getProvider();\n if (params.fromAddress) {\n params.fromAddress = await provider._getAddress(params.fromAddress);\n }\n if (params.toAddress) {\n params.toAddress = await provider._getAddress(params.toAddress);\n }\n return provider._send(\n 'alchemy_getAssetTransfers',\n [\n {\n ...params,\n fromBlock:\n params.fromBlock != null\n ? formatBlock(params.fromBlock)\n : undefined,\n toBlock:\n params.toBlock != null ? formatBlock(params.toBlock) : undefined,\n maxCount: params.maxCount != null ? toHex(params.maxCount) : undefined\n }\n ],\n 'getAssetTransfers'\n );\n }\n\n /**\n * Gets all transaction receipts for a given block by number or block hash.\n *\n * @param params An object containing fields for the transaction receipt query.\n * @public\n */\n async getTransactionReceipts(\n params: TransactionReceiptsParams\n ): Promise {\n const provider = await this.config.getProvider();\n return provider._send(\n 'alchemy_getTransactionReceipts',\n [params],\n 'getTransactionReceipts'\n );\n }\n\n /**\n * Returns the underlying owner address for the provided ENS address, or `null`\n * if the ENS name does not have an underlying address.\n *\n * @param name The ENS address name to resolve.\n */\n async resolveName(name: string): Promise {\n const provider = await this.config.getProvider();\n return provider.resolveName(name);\n }\n\n /**\n * Performs a reverse lookup of the address in ENS using the Reverse Registrar. If the name does not exist, or the forward lookup does not match, null is returned.\n *\n * An ENS name requires additional configuration to setup a reverse record, so not all ENS addresses will map back to the original ENS domain.\n *\n * @param address The address to look up the ENS domain name for.\n */\n async lookupAddress(address: string): Promise {\n const provider = await this.config.getProvider();\n return provider.lookupAddress(address);\n }\n}\n\n/**\n * Perform a binary search between an integer range of block numbers to find the\n * block number where the contract was deployed.\n *\n * @internal\n */\nasync function binarySearchFirstBlock(\n start: number,\n end: number,\n address: string,\n config: AlchemyConfig\n): Promise {\n if (start >= end) {\n return end;\n }\n\n const mid = Math.floor((start + end) / 2);\n const provider = await config.getProvider();\n const code = await provider.getCode(address, mid);\n if (code === ETH_NULL_VALUE) {\n return binarySearchFirstBlock(mid + 1, end, address, config);\n }\n return binarySearchFirstBlock(start, mid, address, config);\n}\n","/**\n * The SDK has 4 log levels and a 5th option for disabling all logging. By\n * default, the log level is set to INFO.\n *\n * The order is a follows: DEBUG < INFO < WARN < ERROR\n *\n * All log types above the current log level will be outputted.\n */\nexport enum LogLevel {\n DEBUG,\n INFO,\n WARN,\n ERROR,\n SILENT\n}\n\n/**\n * The level of verbosity for the logger.\n *\n * @public\n */\nexport type LogLevelString = 'debug' | 'info' | 'warn' | 'error' | 'silent';\n\nconst logLevelStringToEnum: { [key in LogLevelString]: LogLevel } = {\n debug: LogLevel.DEBUG,\n info: LogLevel.INFO,\n warn: LogLevel.WARN,\n error: LogLevel.ERROR,\n silent: LogLevel.SILENT\n};\n\n// HACKY: Use the console method as a string rather than the function itself\n// in order to allow for mocking in tests.\nconst logLevelToConsoleFn = {\n [LogLevel.DEBUG]: 'log',\n [LogLevel.INFO]: 'info',\n [LogLevel.WARN]: 'warn',\n [LogLevel.ERROR]: 'error'\n};\n\nconst DEFAULT_LOG_LEVEL = LogLevel.INFO;\n\n/**\n * Configures the verbosity of logging. The default log level is `info`.\n *\n * @param logLevel - The verbosity of logging. Can be any of the following values:\n *\n * - `debug`: The most verbose logging level.\n * - `info`: The default logging level.\n * - `warn`: A logging level for non-critical issues.\n * - `error`: A logging level for critical issues.\n * - `silent`: Turn off all logging.\n *\n * @public\n */\nexport function setLogLevel(logLevel: LogLevelString): void {\n loggerClient.logLevel = logLevelStringToEnum[logLevel];\n}\n\nexport function logDebug(message: string, ...args: unknown[]): void {\n loggerClient.debug(message, args);\n}\n\nexport function logInfo(message: string, ...args: unknown[]): void {\n loggerClient.info(message, args);\n}\n\nexport function logWarn(message: string, ...args: unknown[]): void {\n loggerClient.warn(message, args);\n}\n\nexport function logError(message: string, ...args: unknown[]): void {\n loggerClient.error(message, args);\n}\n\nexport class Logger {\n /** The log level of the given Logger instance. */\n private _logLevel = DEFAULT_LOG_LEVEL;\n\n constructor() {}\n\n get logLevel(): LogLevel {\n return this._logLevel;\n }\n\n set logLevel(val: LogLevel) {\n if (!(val in LogLevel)) {\n throw new TypeError(`Invalid value \"${val}\" assigned to \\`logLevel\\``);\n }\n this._logLevel = val;\n }\n\n debug(...args: unknown[]): void {\n this._log(LogLevel.DEBUG, ...args);\n }\n\n info(...args: unknown[]): void {\n this._log(LogLevel.INFO, ...args);\n }\n\n warn(...args: unknown[]): void {\n this._log(LogLevel.WARN, ...args);\n }\n\n error(...args: unknown[]): void {\n this._log(LogLevel.ERROR, ...args);\n }\n\n /**\n * Forwards log messages to their corresponding console counterparts if the\n * log level allows it.\n */\n private _log(logLevel: LogLevel, ...args: unknown[]): void {\n if (logLevel < this._logLevel) {\n return;\n }\n const now = new Date().toISOString();\n const method =\n logLevelToConsoleFn[logLevel as keyof typeof logLevelToConsoleFn];\n if (method) {\n console[method as 'log' | 'info' | 'warn' | 'error'](\n `[${now}] Alchemy:`,\n ...args.map(stringify)\n );\n } else {\n throw new Error(\n `Logger received an invalid logLevel (value: ${logLevel})`\n );\n }\n }\n}\n\nfunction stringify(obj: unknown): string | unknown {\n if (typeof obj === 'string') {\n return obj;\n } else {\n try {\n return JSON.stringify(obj);\n } catch (e) {\n // Failed to convert to JSON, log the object directly.\n return obj;\n }\n }\n}\n\n// Instantiate default logger for the SDK.\nconst loggerClient: Logger = new Logger();\n","// This file is autogenerated by injectVersion.js. Any changes will be\n// overwritten on commit!\nexport const VERSION = '2.2.5';\n","/**\n * Given a REST endpoint, method, and params, sends the request with axios and\n * returns the response.\n */\nimport axios, { AxiosRequestConfig, AxiosResponse } from 'axios';\n\nimport { VERSION } from '../version';\nimport { IS_BROWSER } from './util';\n\n/**\n * Helper function to send http requests using Axis.\n *\n * @private\n */\nexport function sendAxiosRequest(\n baseUrl: string,\n restApiName: string,\n methodName: string,\n params: Req,\n overrides?: AxiosRequestConfig\n): Promise> {\n const requestUrl = baseUrl + '/' + restApiName;\n const config: AxiosRequestConfig = {\n ...overrides,\n headers: {\n ...overrides?.headers,\n ...(!IS_BROWSER && { 'Accept-Encoding': 'gzip' }),\n 'Alchemy-Ethers-Sdk-Version': VERSION,\n 'Alchemy-Ethers-Sdk-Method': methodName\n },\n method: overrides?.method ?? 'GET',\n url: requestUrl,\n params\n };\n return axios(config);\n}\n","import { logDebug } from '../util/logger';\n\nexport const DEFAULT_BACKOFF_INITIAL_DELAY_MS = 1000;\nexport const DEFAULT_BACKOFF_MULTIPLIER = 1.5;\nexport const DEFAULT_BACKOFF_MAX_DELAY_MS = 30 * 1000;\nexport const DEFAULT_BACKOFF_MAX_ATTEMPTS = 5;\n\n/**\n * Helper class for implementing exponential backoff and max retry attempts.\n *\n * @private\n * @internal\n */\nexport class ExponentialBackoff {\n private readonly initialDelayMs = DEFAULT_BACKOFF_INITIAL_DELAY_MS;\n private readonly backoffMultiplier = DEFAULT_BACKOFF_MULTIPLIER;\n private readonly maxDelayMs = DEFAULT_BACKOFF_MAX_DELAY_MS;\n\n private numAttempts = 0;\n private currentDelayMs = 0;\n private isInBackoff = false;\n\n constructor(private readonly maxAttempts = DEFAULT_BACKOFF_MAX_ATTEMPTS) {}\n\n /**\n * Returns a promise that resolves after the the backoff delay. The delay is\n * increased for each attempt. The promise is rejected if the maximum number\n * of attempts is exceeded.\n */\n // TODO: beautify this into an async iterator.\n backoff(): Promise {\n if (this.numAttempts >= this.maxAttempts) {\n return Promise.reject(\n new Error(`Exceeded maximum number of attempts: ${this.maxAttempts}`)\n );\n }\n if (this.isInBackoff) {\n return Promise.reject(\n new Error('A backoff operation is already in progress')\n );\n }\n\n const backoffDelayWithJitterMs = this.withJitterMs(this.currentDelayMs);\n if (backoffDelayWithJitterMs > 0) {\n logDebug(\n 'ExponentialBackoff.backoff',\n `Backing off for ${backoffDelayWithJitterMs}ms`\n );\n }\n\n // Calculate the next delay.\n this.currentDelayMs *= this.backoffMultiplier;\n this.currentDelayMs = Math.max(this.currentDelayMs, this.initialDelayMs);\n this.currentDelayMs = Math.min(this.currentDelayMs, this.maxDelayMs);\n this.numAttempts += 1;\n\n return new Promise(resolve => {\n this.isInBackoff = true;\n setTimeout(() => {\n this.isInBackoff = false;\n resolve();\n }, backoffDelayWithJitterMs);\n });\n }\n\n /**\n * Applies +/- 50% jitter to the backoff delay, up to the max delay cap.\n *\n * @private\n * @param delayMs\n */\n private withJitterMs(delayMs: number): number {\n return Math.min(delayMs + (Math.random() - 0.5) * delayMs, this.maxDelayMs);\n }\n}\n","import axios, { AxiosError, AxiosRequestConfig } from 'axios';\n\nimport { AlchemyConfig } from '../api/alchemy-config';\nimport { AlchemyApiType } from '../util/const';\nimport { logDebug, logInfo } from '../util/logger';\nimport { sendAxiosRequest } from '../util/sendRest';\nimport { ExponentialBackoff } from './backoff';\n\n/**\n * A wrapper function to make http requests and retry if the request fails.\n *\n * @internal\n */\n// TODO: Wrap Axios error in AlchemyError.\nexport async function requestHttpWithBackoff(\n config: AlchemyConfig,\n apiType: AlchemyApiType,\n restApiName: string,\n methodName: string,\n params: Req,\n overrides?: AxiosRequestConfig\n): Promise {\n let lastError: Error | undefined = undefined;\n const backoff = new ExponentialBackoff(config.maxRetries);\n for (let attempt = 0; attempt < config.maxRetries + 1; attempt++) {\n try {\n if (lastError !== undefined) {\n logInfo('requestHttp', `Retrying after error: ${lastError.message}`);\n }\n\n try {\n await backoff.backoff();\n } catch (err) {\n // Backoff errors when the maximum number of attempts is reached. Break\n // out of the loop to preserve the last error.\n break;\n }\n\n const response = await sendAxiosRequest(\n config._getRequestUrl(apiType),\n restApiName,\n methodName,\n params,\n overrides\n );\n\n if (response.status === 200) {\n logDebug(restApiName, `Successful request: ${restApiName}`);\n return response.data;\n } else {\n logInfo(\n restApiName,\n `Request failed: ${restApiName}, ${response.status}, ${response.data}`\n );\n lastError = new Error(response.status + ': ' + response.data);\n }\n } catch (err) {\n if (!axios.isAxiosError(err) || err.response === undefined) {\n throw err;\n }\n // TODO: Standardize all errors into AlchemyError\n lastError = new Error(err.response.status + ': ' + err.response.data);\n if (!isRetryableHttpError(err, apiType)) {\n break;\n }\n }\n }\n return Promise.reject(lastError);\n}\n\nfunction isRetryableHttpError(\n err: AxiosError,\n apiType: AlchemyApiType\n): boolean {\n // TODO: remove 500s after webhooks are more stable.\n const retryableCodes =\n apiType === AlchemyApiType.WEBHOOK ? [429, 500] : [429];\n return (\n err.response !== undefined && retryableCodes.includes(err.response.status)\n );\n}\n\n/**\n * Fetches all pages in a paginated endpoint, given a `pageKey` field that\n * represents the property name containing the next page token.\n *\n * @internal\n */\nexport async function* paginateEndpoint<\n ReqPageKey extends string,\n ResPageKey extends string,\n Req extends Partial & Record>,\n Res extends Partial & Record>\n>(\n config: AlchemyConfig,\n apiType: AlchemyApiType,\n restApiName: string,\n methodName: string,\n reqPageKey: ReqPageKey,\n resPageKey: ResPageKey,\n params: Req\n): AsyncIterable {\n let hasNext = true;\n const requestParams = { ...params };\n while (hasNext) {\n const response = await requestHttpWithBackoff(\n config,\n apiType,\n restApiName,\n methodName,\n requestParams\n );\n yield response;\n if (response[resPageKey] !== undefined) {\n requestParams[reqPageKey] = response[resPageKey] as any;\n } else {\n hasNext = false;\n }\n }\n}\n","import { BigNumber, BigNumberish } from '@ethersproject/bignumber';\n\nimport { AlchemyConfig } from '../api/alchemy-config';\nimport { BaseNft, Nft, NftContract } from '../api/nft';\nimport {\n GetBaseNftsForContractOptions,\n GetBaseNftsForOwnerOptions,\n GetContractsForOwnerOptions,\n GetContractsForOwnerResponse,\n GetFloorPriceResponse,\n GetNftSalesOptions,\n GetNftSalesOptionsByContractAddress,\n GetNftSalesResponse,\n GetNftsForContractOptions,\n GetNftsForOwnerOptions,\n GetOwnersForContractOptions,\n GetOwnersForContractResponse,\n GetOwnersForContractWithTokenBalancesOptions,\n GetOwnersForContractWithTokenBalancesResponse,\n GetOwnersForNftResponse,\n NftAttributeRarity,\n NftAttributesResponse,\n NftContractBaseNftsResponse,\n NftContractNftsResponse,\n NftFilters,\n NftMetadataBatchOptions,\n NftMetadataBatchToken,\n NftOrdering,\n NftSaleMarketplace,\n NftSaleTakerType,\n NftTokenType,\n OwnedBaseNft,\n OwnedBaseNftsResponse,\n OwnedNft,\n OwnedNftsResponse,\n RefreshContractResult,\n RefreshState,\n SortingOrder\n} from '../types/types';\nimport { AlchemyApiType } from '../util/const';\nimport {\n getBaseNftFromRaw,\n getContractsForOwnerFromRaw,\n getNftContractFromRaw,\n getNftFromRaw,\n getNftRarityFromRaw,\n getNftSalesFromRaw\n} from '../util/util';\nimport { paginateEndpoint, requestHttpWithBackoff } from './dispatch';\nimport {\n RawBaseNft,\n RawContractBaseNft,\n RawGetBaseNftsForContractResponse,\n RawGetBaseNftsResponse,\n RawGetContractsForOwnerResponse,\n RawGetNftSalesResponse,\n RawGetNftsForContractResponse,\n RawGetNftsResponse,\n RawGetOwnersForContractResponse,\n RawNft,\n RawNftAttributeRarity,\n RawNftContract,\n RawOwnedBaseNft,\n RawOwnedNft,\n RawReingestContractResponse\n} from './raw-interfaces';\n\nexport async function getNftMetadata(\n config: AlchemyConfig,\n contractAddress: string,\n tokenId: BigNumberish,\n tokenType?: NftTokenType,\n tokenUriTimeoutInMs?: number,\n srcMethod = 'getNftMetadata'\n): Promise {\n const response = await requestHttpWithBackoff(\n config,\n AlchemyApiType.NFT,\n 'getNFTMetadata',\n srcMethod,\n {\n contractAddress,\n tokenId: BigNumber.from(tokenId!).toString(),\n tokenType: tokenType !== NftTokenType.UNKNOWN ? tokenType : undefined,\n tokenUriTimeoutInMs\n }\n );\n return getNftFromRaw(response);\n}\n\nexport async function getNftMetadataBatch(\n config: AlchemyConfig,\n tokens: Array,\n options?: NftMetadataBatchOptions\n): Promise {\n const data = {\n tokens,\n tokenUriTimeoutInMs: options?.tokenUriTimeoutInMs,\n refreshCache: options?.refreshCache\n };\n const response = await requestHttpWithBackoff<{}, RawNft[]>(\n config,\n AlchemyApiType.NFT,\n 'getNFTMetadataBatch',\n 'getNftMetadataBatch',\n {},\n {\n method: 'POST',\n data\n }\n );\n return response.map(getNftFromRaw);\n}\n\nexport async function getContractMetadata(\n config: AlchemyConfig,\n contractAddress: string,\n srcMethod = 'getContractMetadata'\n): Promise {\n const response = await requestHttpWithBackoff<\n GetContractMetadataParams,\n RawNftContract\n >(config, AlchemyApiType.NFT, 'getContractMetadata', srcMethod, {\n contractAddress\n });\n\n return getNftContractFromRaw(response);\n}\n\nexport async function* getNftsForOwnerIterator(\n config: AlchemyConfig,\n owner: string,\n options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions,\n srcMethod = 'getNftsForOwnerIterator'\n): AsyncIterable {\n const withMetadata = omitMetadataToWithMetadata(options?.omitMetadata);\n for await (const response of paginateEndpoint(\n config,\n AlchemyApiType.NFT,\n 'getNFTs',\n srcMethod,\n 'pageKey',\n 'pageKey',\n {\n contractAddresses: options?.contractAddresses,\n pageKey: options?.pageKey,\n filters: options?.excludeFilters,\n owner,\n withMetadata\n }\n )) {\n for (const ownedNft of response.ownedNfts as\n | RawOwnedNft[]\n | RawOwnedBaseNft[]) {\n yield {\n ...nftFromGetNftResponse(ownedNft),\n balance: parseInt(ownedNft.balance)\n };\n }\n }\n}\n\nexport async function getNftsForOwner(\n config: AlchemyConfig,\n owner: string,\n options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions,\n srcMethod = 'getNftsForOwner'\n): Promise {\n const withMetadata = omitMetadataToWithMetadata(options?.omitMetadata);\n const response = await requestHttpWithBackoff<\n GetNftsAlchemyParams,\n RawGetBaseNftsResponse | RawGetNftsResponse\n >(config, AlchemyApiType.NFT, 'getNFTs', srcMethod, {\n contractAddresses: options?.contractAddresses,\n pageKey: options?.pageKey,\n filters: options?.excludeFilters,\n excludeFilters: options?.excludeFilters,\n includeFilters: options?.includeFilters,\n owner,\n pageSize: options?.pageSize,\n withMetadata,\n tokenUriTimeoutInMs: options?.tokenUriTimeoutInMs,\n orderBy: options?.orderBy\n });\n return {\n ownedNfts: response.ownedNfts.map(res => ({\n ...nftFromGetNftResponse(res),\n balance: parseInt(res.balance)\n })),\n pageKey: response.pageKey,\n totalCount: response.totalCount\n };\n}\n\nexport async function getNftsForContract(\n config: AlchemyConfig,\n contractAddress: string,\n options?: GetBaseNftsForContractOptions | GetNftsForContractOptions,\n srcMethod = 'getNftsForContract'\n): Promise {\n const withMetadata = omitMetadataToWithMetadata(options?.omitMetadata);\n const response = await requestHttpWithBackoff<\n GetNftsForContractAlchemyParams,\n RawGetBaseNftsForContractResponse | RawGetNftsForContractResponse\n >(config, AlchemyApiType.NFT, 'getNFTsForCollection', srcMethod, {\n contractAddress,\n startToken: options?.pageKey,\n withMetadata,\n limit: options?.pageSize ?? undefined,\n tokenUriTimeoutInMs: 50\n });\n\n return {\n nfts: response.nfts.map(res =>\n nftFromGetNftContractResponse(res, contractAddress)\n ),\n pageKey: response.nextToken\n };\n}\n\nexport async function* getNftsForContractIterator(\n config: AlchemyConfig,\n contractAddress: string,\n options?: GetBaseNftsForContractOptions | GetNftsForContractOptions,\n srcMethod = 'getNftsForContractIterator'\n): AsyncIterable {\n const withMetadata = omitMetadataToWithMetadata(options?.omitMetadata);\n for await (const response of paginateEndpoint(\n config,\n AlchemyApiType.NFT,\n 'getNFTsForCollection',\n srcMethod,\n 'startToken',\n 'nextToken',\n {\n contractAddress,\n startToken: options?.pageKey,\n withMetadata\n }\n )) {\n for (const nft of response.nfts as RawContractBaseNft[] | RawNft[]) {\n yield nftFromGetNftContractResponse(nft, contractAddress);\n }\n }\n}\n\nexport async function getOwnersForContract(\n config: AlchemyConfig,\n contractAddress: string,\n options?:\n | GetOwnersForContractWithTokenBalancesOptions\n | GetOwnersForContractOptions,\n srcMethod = 'getOwnersForContract'\n): Promise<\n GetOwnersForContractResponse | GetOwnersForContractWithTokenBalancesResponse\n> {\n // Cast to `any` to avoid more type wrangling.\n const response: any = await requestHttpWithBackoff<\n GetOwnersForNftContractAlchemyParams,\n RawGetOwnersForContractResponse\n >(config, AlchemyApiType.NFT, 'getOwnersForCollection', srcMethod, {\n ...options,\n contractAddress\n });\n\n return {\n owners: response.ownerAddresses,\n\n // Only include the pageKey in the final response if it's defined\n ...(response.pageKey !== undefined && { pageKey: response.pageKey })\n };\n}\n\nexport async function getContractsForOwner(\n config: AlchemyConfig,\n owner: string,\n options?: GetContractsForOwnerOptions,\n srcMethod = 'getContractsForOwner'\n): Promise {\n const response = await requestHttpWithBackoff<\n GetContractsForOwnerParams,\n RawGetContractsForOwnerResponse\n >(config, AlchemyApiType.NFT, 'getContractsForOwner', srcMethod, {\n owner,\n excludeFilters: options?.excludeFilters,\n includeFilters: options?.includeFilters,\n pageKey: options?.pageKey,\n orderBy: options?.orderBy\n });\n\n return getContractsForOwnerFromRaw(response);\n}\n\nexport async function getOwnersForNft(\n config: AlchemyConfig,\n contractAddress: string,\n tokenId: BigNumberish,\n srcMethod = 'getOwnersForNft'\n): Promise {\n return requestHttpWithBackoff(\n config,\n AlchemyApiType.NFT,\n 'getOwnersForToken',\n srcMethod,\n {\n contractAddress,\n tokenId: BigNumber.from(tokenId!).toString()\n }\n );\n}\n\nexport async function checkNftOwnership(\n config: AlchemyConfig,\n owner: string,\n contractAddresses: string[],\n srcMethod = 'checkNftOwnership'\n): Promise {\n if (contractAddresses.length === 0) {\n throw new Error('Must provide at least one contract address');\n }\n const response = await getNftsForOwner(\n config,\n owner,\n {\n contractAddresses,\n omitMetadata: true\n },\n srcMethod\n );\n return response.ownedNfts.length > 0;\n}\n\nexport async function verifyNftOwnership(\n config: AlchemyConfig,\n owner: string,\n contractAddresses: string | string[],\n srcMethod = 'verifyNftOwnership'\n): Promise {\n if (typeof contractAddresses === 'string') {\n const response = await getNftsForOwner(\n config,\n owner,\n {\n contractAddresses: [contractAddresses],\n omitMetadata: true\n },\n srcMethod\n );\n return response.ownedNfts.length > 0;\n } else {\n if (contractAddresses.length === 0) {\n throw new Error('Must provide at least one contract address');\n }\n const response = await getNftsForOwner(\n config,\n owner,\n {\n contractAddresses,\n omitMetadata: true\n },\n srcMethod\n );\n\n // Create map where all input contract addresses are set to false, then flip\n // owned nfts to true.\n const result = contractAddresses.reduce(\n (acc: { [contractAddress: string]: boolean }, curr) => {\n acc[curr] = false;\n return acc;\n },\n {}\n );\n for (const nft of response.ownedNfts) {\n result[nft.contract.address] = true;\n }\n return result;\n }\n}\n\nexport async function isSpamContract(\n config: AlchemyConfig,\n contractAddress: string,\n srcMethod = 'isSpamContract'\n): Promise {\n return requestHttpWithBackoff(\n config,\n AlchemyApiType.NFT,\n 'isSpamContract',\n srcMethod,\n {\n contractAddress\n }\n );\n}\n\nexport async function getSpamContracts(\n config: AlchemyConfig,\n srcMethod = 'getSpamContracts'\n): Promise {\n return requestHttpWithBackoff(\n config,\n AlchemyApiType.NFT,\n 'getSpamContracts',\n srcMethod,\n undefined\n );\n}\n\nexport async function getFloorPrice(\n config: AlchemyConfig,\n contractAddress: string,\n srcMethod = 'getFloorPrice'\n): Promise {\n return requestHttpWithBackoff(\n config,\n AlchemyApiType.NFT,\n 'getFloorPrice',\n srcMethod,\n {\n contractAddress\n }\n );\n}\n\nexport async function getNftSales(\n config: AlchemyConfig,\n options: GetNftSalesOptions | GetNftSalesOptionsByContractAddress = {},\n srcMethod = 'getNftSales'\n): Promise {\n // Avoid ts compiler complaining about the contractAddress field.\n const params: Partial = {\n ...options\n };\n\n const response = await requestHttpWithBackoff<\n GetNftSalesParams,\n RawGetNftSalesResponse\n >(config, AlchemyApiType.NFT, 'getNFTSales', srcMethod, {\n fromBlock: params?.fromBlock,\n toBlock: params?.toBlock,\n order: params?.order,\n marketplace: params?.marketplace,\n contractAddress: params?.contractAddress,\n tokenId: params?.tokenId\n ? BigNumber.from(params?.tokenId).toString()\n : undefined,\n sellerAddress: params?.sellerAddress,\n buyerAddress: params?.buyerAddress,\n taker: params?.taker,\n limit: params?.limit,\n pageKey: params?.pageKey\n });\n\n return getNftSalesFromRaw(response);\n}\n\nexport async function computeRarity(\n config: AlchemyConfig,\n contractAddress: string,\n tokenId: BigNumberish,\n srcMethod = 'computeRarity'\n): Promise {\n const response = await requestHttpWithBackoff<\n ComputeRarityParams,\n RawNftAttributeRarity[]\n >(config, AlchemyApiType.NFT, 'computeRarity', srcMethod, {\n contractAddress,\n tokenId: BigNumber.from(tokenId).toString()\n });\n\n return getNftRarityFromRaw(response);\n}\n\nexport async function searchContractMetadata(\n config: AlchemyConfig,\n query: string,\n srcMethod = 'searchContractMetadata'\n): Promise {\n const response = await requestHttpWithBackoff<\n SearchContractMetadataParams,\n RawNftContract[]\n >(config, AlchemyApiType.NFT, 'searchContractMetadata', srcMethod, {\n query\n });\n\n return response.map(getNftContractFromRaw);\n}\n\nexport async function summarizeNftAttributes(\n config: AlchemyConfig,\n contractAddress: string,\n srcMethod = 'summarizeNftAttributes'\n): Promise {\n return requestHttpWithBackoff<\n SummarizeNftAttributesParams,\n NftAttributesResponse\n >(config, AlchemyApiType.NFT, 'summarizeNftAttributes', srcMethod, {\n contractAddress\n });\n}\n\nexport async function refreshNftMetadata(\n config: AlchemyConfig,\n contractAddress: string,\n tokenId: BigNumberish,\n srcMethod = 'refreshNftMetadata'\n): Promise {\n const tokenIdString = BigNumber.from(tokenId!).toString();\n const first = await getNftMetadata(\n config,\n contractAddress,\n tokenIdString,\n undefined,\n undefined,\n srcMethod\n );\n const second = await refresh(\n config,\n contractAddress,\n tokenIdString,\n srcMethod\n );\n return first.timeLastUpdated !== second.timeLastUpdated;\n}\n\nexport async function refreshContract(\n config: AlchemyConfig,\n contractAddress: string,\n srcMethod = 'refreshContract'\n): Promise {\n const response = await requestHttpWithBackoff<\n ReingestContractParams,\n RawReingestContractResponse\n >(config, AlchemyApiType.NFT, 'reingestContract', srcMethod, {\n contractAddress\n });\n\n return {\n contractAddress: response.contractAddress,\n refreshState: parseReingestionState(response.reingestionState),\n progress: response.progress\n };\n}\n\nasync function refresh(\n config: AlchemyConfig,\n contractAddress: string,\n tokenId: BigNumberish,\n srcMethod: string\n): Promise {\n const response = await requestHttpWithBackoff(\n config,\n AlchemyApiType.NFT,\n 'getNFTMetadata',\n srcMethod,\n {\n contractAddress,\n tokenId: BigNumber.from(tokenId!).toString(),\n refreshCache: true\n }\n );\n return getNftFromRaw(response);\n}\n\n/**\n * Helper method to convert a NFT response received from Alchemy backend to an\n * SDK NFT type.\n *\n * @internal\n */\nfunction nftFromGetNftResponse(\n ownedNft: RawOwnedBaseNft | RawOwnedNft\n): Nft | BaseNft {\n if (isNftWithMetadata(ownedNft)) {\n return getNftFromRaw(ownedNft);\n } else {\n return getBaseNftFromRaw(ownedNft);\n }\n}\n\n/**\n * Helper method to convert a NFT response received from Alchemy backend to an\n * SDK NFT type.\n *\n * @internal\n */\nfunction nftFromGetNftContractResponse(\n ownedNft: RawContractBaseNft | RawNft,\n contractAddress: string\n): Nft | BaseNft {\n if (isNftWithMetadata(ownedNft)) {\n return getNftFromRaw(ownedNft);\n } else {\n return getBaseNftFromRaw(ownedNft, contractAddress);\n }\n}\n\n/** @internal */\n// TODO: more comprehensive type check\nfunction isNftWithMetadata(\n response: RawBaseNft | RawContractBaseNft | RawNft\n): response is RawNft {\n return (response as RawNft).title !== undefined;\n}\n\n/**\n * Flips the `omitMetadata` SDK parameter type to the `withMetadata` parameter\n * required by the Alchemy API. If `omitMetadata` is undefined, the SDK defaults\n * to including metadata.\n *\n * @internal\n */\nfunction omitMetadataToWithMetadata(\n omitMetadata: boolean | undefined\n): boolean {\n return omitMetadata === undefined ? true : !omitMetadata;\n}\n\nfunction parseReingestionState(reingestionState: string): RefreshState {\n switch (reingestionState) {\n case 'does_not_exist':\n return RefreshState.DOES_NOT_EXIST;\n case 'already_queued':\n return RefreshState.ALREADY_QUEUED;\n case 'in_progress':\n return RefreshState.IN_PROGRESS;\n case 'finished':\n return RefreshState.FINISHED;\n case 'queued':\n return RefreshState.QUEUED;\n case 'queue_failed':\n return RefreshState.QUEUE_FAILED;\n default:\n throw new Error('Unknown reingestion state: ' + reingestionState);\n }\n}\n\n/**\n * Interface for the `getNftsForNftContract` endpoint. The main difference is\n * that the endpoint has a `startToken` parameter, but the SDK standardizes all\n * pagination parameters to `pageKey`.\n *\n * @internal\n */\ninterface GetNftsForContractAlchemyParams {\n contractAddress: string;\n startToken?: string;\n withMetadata: boolean;\n limit?: number;\n tokenUriTimeoutInMs?: number;\n}\n\n/**\n * Interface for the `getNfts` endpoint. The main difference is that the\n * endpoint has a `withMetadata` parameter, but the SDK exposes the parameter as\n * `omitMetadata`.\n *\n * @internal\n */\ninterface GetNftsAlchemyParams {\n owner: string;\n pageKey?: string;\n contractAddresses?: string[];\n /** @deprecated - Please use `excludeFilters` instead. */\n filters?: string[];\n excludeFilters?: NftFilters[];\n includeFilters?: NftFilters[];\n pageSize?: number;\n withMetadata: boolean;\n tokenUriTimeoutInMs?: number;\n orderBy?: string;\n}\n\n/**\n * Interface for the `getNftMetadata` endpoint.\n *\n * @internal\n */\ninterface GetNftMetadataParams {\n contractAddress: string;\n tokenId: string;\n tokenType?: NftTokenType;\n refreshCache?: boolean;\n tokenUriTimeoutInMs?: number;\n}\n\n/**\n * Interface for the `isSpamContract` endpoint.\n *\n * @internal\n */\ninterface IsSpamContractParams {\n contractAddress: string;\n}\n\n/**\n * Interface for the `getNftContractMetadata` endpoint.\n *\n * @internal\n */\ninterface GetContractMetadataParams {\n contractAddress: string;\n}\n\n/**\n * Interface for the `getOwnersForNftContract` endpoint.\n *\n * @internal\n */\ninterface GetOwnersForNftContractAlchemyParams {\n contractAddress: string;\n}\n\n/**\n * Interface for the `getOwnersForContract` endpoint.\n *\n * @internal\n */\ninterface GetContractsForOwnerParams {\n owner: string;\n pageKey?: string;\n includeFilters?: NftFilters[];\n excludeFilters?: NftFilters[];\n orderBy?: NftOrdering;\n}\n\n/**\n * Interface for the `getFloorPrice` endpoint.\n *\n * @internal\n */\ninterface GetFloorPriceParams {\n contractAddress: string;\n}\n\n/**\n * Interface for the `getNftSales` endpoint.\n *\n * @internal\n */\ninterface GetNftSalesParams {\n fromBlock?: number | 'latest';\n toBlock?: number | 'latest';\n order?: SortingOrder;\n marketplace?: NftSaleMarketplace;\n contractAddress?: string;\n tokenId?: string;\n sellerAddress?: string;\n buyerAddress?: string;\n taker?: NftSaleTakerType;\n limit?: number;\n pageKey?: string;\n}\n\n/**\n * Interface for the `computeRarity` endpoint.\n *\n * @internal\n */\ninterface ComputeRarityParams {\n contractAddress: string;\n tokenId: string;\n}\n\n/**\n * Interface for the `searchContractMetadata` endpoint.\n *\n * @internal\n */\ninterface SearchContractMetadataParams {\n query: string;\n}\n\n/**\n * Interface for the `summarizeNFTAttributes` endpoint.\n *\n * @internal\n */\ninterface SummarizeNftAttributesParams {\n contractAddress: string;\n}\n\ninterface ReingestContractParams {\n contractAddress: string;\n}\n","import type { BigNumberish } from '@ethersproject/bignumber';\n\nimport {\n checkNftOwnership,\n computeRarity,\n getContractMetadata,\n getContractsForOwner,\n getFloorPrice,\n getNftMetadata,\n getNftMetadataBatch,\n getNftSales,\n getNftsForContract,\n getNftsForContractIterator,\n getNftsForOwner,\n getNftsForOwnerIterator,\n getOwnersForContract,\n getOwnersForNft,\n getSpamContracts,\n isSpamContract,\n refreshContract,\n refreshNftMetadata,\n searchContractMetadata,\n summarizeNftAttributes,\n verifyNftOwnership\n} from '../internal/nft-api';\nimport {\n GetBaseNftsForContractOptions,\n GetBaseNftsForOwnerOptions,\n GetContractsForOwnerOptions,\n GetContractsForOwnerResponse,\n GetFloorPriceResponse,\n GetNftSalesOptions,\n GetNftSalesOptionsByContractAddress,\n GetNftSalesResponse,\n GetNftsForContractOptions,\n GetNftsForOwnerOptions,\n GetOwnersForContractOptions,\n GetOwnersForContractResponse,\n GetOwnersForContractWithTokenBalancesOptions,\n GetOwnersForContractWithTokenBalancesResponse,\n GetOwnersForNftResponse,\n NftAttributeRarity,\n NftAttributesResponse,\n NftContractBaseNftsResponse,\n NftContractNftsResponse,\n NftMetadataBatchOptions,\n NftMetadataBatchToken,\n NftTokenType,\n OwnedBaseNft,\n OwnedBaseNftsResponse,\n OwnedNft,\n OwnedNftsResponse,\n RefreshContractResult\n} from '../types/types';\nimport { AlchemyConfig } from './alchemy-config';\nimport { BaseNft, Nft, NftContract } from './nft';\n\n/**\n * The NFT namespace contains all the functionality related to NFTs.\n *\n * Do not call this constructor directly. Instead, instantiate an Alchemy object\n * with `const alchemy = new Alchemy(config)` and then access the core namespace\n * via `alchemy.nft`.\n */\nexport class NftNamespace {\n /** @internal */\n constructor(private readonly config: AlchemyConfig) {}\n\n /**\n * Get the NFT metadata associated with the provided parameters.\n *\n * @param contractAddress - The contract address of the NFT.\n * @param tokenId - Token id of the NFT.\n * @param tokenType - Optionally specify the type of token to speed up the query.\n * @param tokenUriTimeoutInMs - No set timeout by default - When metadata is\n * requested, this parameter is the timeout (in milliseconds) for the\n * website hosting the metadata to respond. If you want to only access the\n * cache and not live fetch any metadata for cache misses then set this value to 0.\n * @public\n */\n getNftMetadata(\n contractAddress: string,\n tokenId: BigNumberish,\n tokenType?: NftTokenType,\n tokenUriTimeoutInMs?: number\n ): Promise {\n return getNftMetadata(\n this.config,\n contractAddress,\n tokenId,\n tokenType,\n tokenUriTimeoutInMs\n );\n }\n\n /**\n * Gets the NFT metadata for multiple NFT tokens.\n *\n * @param tokens An array of NFT tokens to fetch metadata for.\n * @param options Configuration options for making the request.\n */\n getNftMetadataBatch(\n tokens: Array,\n options?: NftMetadataBatchOptions\n ): Promise {\n return getNftMetadataBatch(this.config, tokens, options);\n }\n\n /**\n * Get the NFT collection metadata associated with the provided parameters.\n *\n * @param contractAddress - The contract address of the NFT.\n * @public\n */\n getContractMetadata(contractAddress: string): Promise {\n return getContractMetadata(this.config, contractAddress);\n }\n\n /**\n * Fetches all NFTs for a given owner and yields them in an async iterable.\n *\n * This method returns the full NFT for the owner and pages through all page\n * keys until all NFTs have been fetched.\n *\n * @param owner - The address of the owner.\n * @param options - The optional parameters to use for the request.\n * @public\n */\n getNftsForOwnerIterator(\n owner: string,\n options?: GetNftsForOwnerOptions\n ): AsyncIterable;\n /**\n * Fetches all NFTs for a given owner and yields them in an async iterable.\n *\n * This method returns the base NFTs that omit the associated metadata and\n * pages through all page keys until all NFTs have been fetched.\n *\n * @param owner - The address of the owner.\n * @param options - The optional parameters to use for the request.\n * @public\n */\n getNftsForOwnerIterator(\n owner: string,\n options?: GetBaseNftsForOwnerOptions\n ): AsyncIterable;\n getNftsForOwnerIterator(\n owner: string,\n options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions\n ): AsyncIterable {\n return getNftsForOwnerIterator(this.config, owner, options);\n }\n\n /**\n * Get all NFTs for an owner.\n *\n * This method returns the full NFTs in the contract. To get all NFTs without\n * their associated metadata, use {@link GetBaseNftsForOwnerOptions}.\n *\n * @param owner - The address of the owner.\n * @param options - The optional parameters to use for the request.\n * @public\n */\n getNftsForOwner(\n owner: string,\n options?: GetNftsForOwnerOptions\n ): Promise;\n /**\n * Get all base NFTs for an owner.\n *\n * This method returns the base NFTs that omit the associated metadata. To get\n * all NFTs with their associated metadata, use {@link GetNftsForOwnerOptions}.\n *\n * @param owner - The address of the owner.\n * @param options - The optional parameters to use for the request.\n * @public\n */\n getNftsForOwner(\n owner: string,\n options?: GetBaseNftsForOwnerOptions\n ): Promise;\n getNftsForOwner(\n owner: string,\n options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions\n ): Promise {\n return getNftsForOwner(this.config, owner, options);\n }\n\n /**\n * Get all NFTs for a given contract address.\n *\n * This method returns the full NFTs in the contract. To get all NFTs without\n * their associated metadata, use {@link GetBaseNftsForContractOptions}.\n *\n * @param contractAddress - The contract address of the NFT contract.\n * @param options - The parameters to use for the request. or\n * {@link NftContractNftsResponse} response.\n * @beta\n */\n getNftsForContract(\n contractAddress: string,\n options?: GetNftsForContractOptions\n ): Promise;\n /**\n * Get all base NFTs for a given contract address.\n *\n * This method returns the base NFTs that omit the associated metadata. To get\n * all NFTs with their associated metadata, use {@link GetNftsForContractOptions}.\n *\n * @param contractAddress - The contract address of the NFT contract.\n * @param options - The optional parameters to use for the request.\n * @beta\n */\n getNftsForContract(\n contractAddress: string,\n options?: GetBaseNftsForContractOptions\n ): Promise;\n getNftsForContract(\n contractAddress: string,\n options?: GetBaseNftsForContractOptions | GetNftsForContractOptions\n ): Promise {\n return getNftsForContract(this.config, contractAddress, options);\n }\n\n /**\n * Fetches all NFTs for a given contract address and yields them in an async iterable.\n *\n * This method returns the full NFTs in the contract and pages through all\n * page keys until all NFTs have been fetched. To get all NFTs without their\n * associated metadata, use {@link GetBaseNftsForContractOptions}.\n *\n * @param contractAddress - The contract address of the NFT contract.\n * @param options - The optional parameters to use for the request.\n * @beta\n */\n getNftsForContractIterator(\n contractAddress: string,\n options?: GetNftsForContractOptions\n ): AsyncIterable;\n /**\n * Fetches all base NFTs for a given contract address and yields them in an\n * async iterable.\n *\n * This method returns the base NFTs that omit the associated metadata and\n * pages through all page keys until all NFTs have been fetched. To get all\n * NFTs with their associated metadata, use {@link GetNftsForContractOptions}.\n *\n * @param contractAddress - The contract address of the NFT contract.\n * @param options - The optional parameters to use for the request.\n * @beta\n */\n getNftsForContractIterator(\n contractAddress: string,\n options?: GetBaseNftsForContractOptions\n ): AsyncIterable;\n getNftsForContractIterator(\n contractAddress: string,\n options?: GetBaseNftsForContractOptions | GetNftsForContractOptions\n ): AsyncIterable {\n return getNftsForContractIterator(this.config, contractAddress, options);\n }\n\n /**\n * Gets all the owners for a given NFT contract along with the token balance.\n *\n * @param contractAddress - The NFT contract to get the owners for.\n * @param options Optional parameters to use for the request.\n * @public\n */\n getOwnersForContract(\n contractAddress: string,\n options: GetOwnersForContractWithTokenBalancesOptions\n ): Promise;\n\n /**\n * Gets all the owners for a given NFT contract.\n *\n * Note that token balances are omitted by default. To include token balances\n * for each owner, use {@link GetOwnersForContractWithTokenBalancesOptions},\n * which has the `withTokenBalances` field set to `true`.\n *\n * @param contractAddress - The NFT contract to get the owners for.\n * @param options Optional parameters to use for the request.\n * @public\n */\n getOwnersForContract(\n contractAddress: string,\n options?: GetOwnersForContractOptions\n ): Promise;\n getOwnersForContract(\n contractAddress: string,\n options?:\n | GetOwnersForContractOptions\n | GetOwnersForContractWithTokenBalancesOptions\n ): Promise<\n GetOwnersForContractResponse | GetOwnersForContractWithTokenBalancesResponse\n > {\n return getOwnersForContract(this.config, contractAddress, options);\n }\n\n /**\n * Gets all the owners for a given NFT contract address and token ID.\n *\n * @param contractAddress - The NFT contract address.\n * @param tokenId - Token id of the NFT.\n * @beta\n */\n getOwnersForNft(\n contractAddress: string,\n tokenId: BigNumberish\n ): Promise {\n return getOwnersForNft(this.config, contractAddress, tokenId);\n }\n\n /**\n * Gets all NFT contracts held by the specified owner address.\n *\n * @param owner - Address for NFT owner (can be in ENS format!).\n * @param options - The optional parameters to use for the request.\n * @public\n */\n getContractsForOwner(\n owner: string,\n options?: GetContractsForOwnerOptions\n ): Promise {\n return getContractsForOwner(this.config, owner, options);\n }\n\n /**\n * DEPRECATED - Checks that the provided owner address owns one of more of the\n * provided NFTs.\n *\n * @deprecated - Use {@link verifyNftOwnership} instead. This method will be\n * removed in a future release.\n * @param owner - The owner address to check.\n * @param contractAddresses - An array of NFT contract addresses to check ownership for.\n */\n checkNftOwnership(\n owner: string,\n contractAddresses: string[]\n ): Promise {\n return checkNftOwnership(this.config, owner, contractAddresses);\n }\n\n /**\n * Checks that the provided owner address owns one of more of the provided\n * NFT. Returns a boolean indicating whether the owner address owns the provided NFT.\n *\n * @param owner - The owner address to check.\n * @param contractAddress - An NFT contract address to check ownership for.\n */\n verifyNftOwnership(owner: string, contractAddress: string): Promise;\n\n /**\n * Checks which of the provided NFTs the owner address owns. Returns a map of\n * contract address to a boolean indicating whether the owner address owns the NFT.\n *\n * @param owner - The owner address to check.\n * @param contractAddresses - An array NFT contract address to check ownership for.\n */\n verifyNftOwnership(\n owner: string,\n contractAddresses: string[]\n ): Promise<{ [contractAddress: string]: boolean }>;\n verifyNftOwnership(\n owner: string,\n contractAddress: string | string[]\n ): Promise {\n return verifyNftOwnership(this.config, owner, contractAddress);\n }\n\n /**\n * Returns whether a contract is marked as spam or not by Alchemy. For more\n * information on how we classify spam, go to our NFT API FAQ at\n * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification.\n *\n * @param contractAddress - The contract address to check.\n * @beta\n */\n isSpamContract(contractAddress: string): Promise {\n return isSpamContract(this.config, contractAddress);\n }\n\n /**\n * Returns a list of all spam contracts marked by Alchemy. For details on how\n * Alchemy marks spam contracts, go to\n * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification.\n *\n * @beta\n */\n getSpamContracts(): Promise {\n return getSpamContracts(this.config);\n }\n\n /**\n * Returns the floor prices of a NFT contract by marketplace.\n *\n * @param contractAddress - The contract address for the NFT collection.\n * @beta\n */\n getFloorPrice(contractAddress: string): Promise {\n return getFloorPrice(this.config, contractAddress);\n }\n\n /**\n * Returns NFT sales that have happened through on-chain marketplaces.\n *\n * @param options - The optional parameters to use for the request.\n * @beta\n */\n getNftSales(options?: GetNftSalesOptions): Promise;\n getNftSales(\n options?: GetNftSalesOptionsByContractAddress\n ): Promise;\n getNftSales(\n options?: GetNftSalesOptions | GetNftSalesOptionsByContractAddress\n ): Promise {\n return getNftSales(this.config, options);\n }\n\n /**\n * Get the rarity of each attribute of an NFT.\n *\n * @param contractAddress - Contract address for the NFT collection.\n * @param tokenId - Token id of the NFT.\n */\n computeRarity(\n contractAddress: string,\n tokenId: BigNumberish\n ): Promise {\n return computeRarity(this.config, contractAddress, tokenId);\n }\n\n /**\n * Search for a keyword across metadata of all ERC-721 and ERC-1155 smart contracts.\n *\n * @param query - The search string that you want to search for in contract metadata.\n */\n searchContractMetadata(query: string): Promise {\n return searchContractMetadata(this.config, query);\n }\n\n /**\n * Get a summary of attribute prevalence for an NFT collection.\n *\n * @param contractAddress - Contract address for the NFT collection.\n */\n summarizeNftAttributes(\n contractAddress: string\n ): Promise {\n return summarizeNftAttributes(this.config, contractAddress);\n }\n\n /**\n * Refreshes the cached metadata for a provided NFT contract address and token\n * id. Returns a boolean value indicating whether the metadata was refreshed.\n *\n * This method is useful when you want to refresh the metadata for a NFT that\n * has been updated since the last time it was fetched. Note that the backend\n * only allows one refresh per token every 15 minutes, globally for all users.\n * The last refresh time for an NFT can be accessed on the\n * {@link Nft.timeLastUpdated} field.\n *\n * To trigger a refresh for all NFTs in a contract, use {@link refreshContract} instead.\n *\n * @param contractAddress - The contract address of the NFT.\n * @param tokenId - The token id of the NFT.\n */\n refreshNftMetadata(\n contractAddress: string,\n tokenId: BigNumberish\n ): Promise {\n return refreshNftMetadata(this.config, contractAddress, tokenId);\n }\n\n /**\n * Triggers a metadata refresh all NFTs in the provided contract address. This\n * method is useful after an NFT collection is revealed.\n *\n * Refreshes are queued on the Alchemy backend and may take time to fully\n * process. To refresh the metadata for a specific token, use the\n * {@link refreshNftMetadata} method instead.\n *\n * @param contractAddress - The contract address of the NFT collection.\n * @beta\n */\n refreshContract(contractAddress: string): Promise {\n return refreshContract(this.config, contractAddress);\n }\n}\n","import { AxiosRequestConfig, Method } from 'axios';\n\nimport { BigNumber } from '@ethersproject/bignumber';\n\nimport { requestHttpWithBackoff } from '../internal/dispatch';\nimport {\n RawAddressActivityResponse,\n RawCreateWebhookResponse,\n RawGetAllWebhooksResponse,\n RawNftFilterParam,\n RawNftFiltersResponse,\n RawWebhook\n} from '../internal/raw-interfaces';\nimport {\n AddressActivityResponse,\n AddressActivityWebhook,\n AddressWebhookParams,\n AddressWebhookUpdate,\n DroppedTransactionWebhook,\n GetAddressesOptions,\n GetAllWebhooksResponse,\n MinedTransactionWebhook,\n Network,\n NftActivityWebhook,\n NftFilter,\n NftFiltersResponse,\n NftWebhookParams,\n NftWebhookUpdate,\n TransactionWebhookParams,\n Webhook,\n WebhookType,\n WebhookVersion\n} from '../types/types';\nimport { AlchemyApiType } from '../util/const';\nimport { AlchemyConfig } from './alchemy-config';\n\n/**\n * The Notify namespace contains methods used for creating, reading, updating,\n * and deleting webhooks in the Notify API.\n *\n * To use the methods in the API, you must provide your team's auth token in the\n * {@link AlchemySettings.authToken} field when configuring\n * {@link AlchemySettings}. The auth token can be found in the Alchemy Dashboard\n * on the Notify tab.\n *\n * Note that not all networks are supported in the Notify API. Please consult\n * the documentation for which networks are supported.\n *\n * Do not call this constructor directly. Instead, instantiate an Alchemy object\n * with `const alchemy = new Alchemy(config)` and then access the notify\n * namespace via `alchemy.notify`.\n */\nexport class NotifyNamespace {\n /** @internal */\n constructor(private readonly config: AlchemyConfig) {}\n\n /**\n * Get all webhooks on your team.\n *\n * The team is determined by the `authToken` provided into the {@link AlchemySettings}\n * object when creating a new {@link Alchemy} instance.\n *\n * This method returns a response object containing all the webhooks\n */\n async getAllWebhooks(): Promise {\n this.verifyConfig();\n const response = await this.sendWebhookRequest(\n 'team-webhooks',\n 'getAllWebhooks',\n {}\n );\n return {\n webhooks: parseRawWebhookResponse(response),\n totalCount: response.data.length\n };\n }\n\n /**\n * Get all addresses tracked for the provided {@link AddressActivityWebhook}.\n *\n * @param addressWebhook The Address Activity webhook.\n * @param options Pagination options when fetching addresses.\n */\n getAddresses(\n addressWebhook: AddressActivityWebhook,\n options?: GetAddressesOptions\n ): Promise;\n\n /**\n * Get all addresses tracked for the provided {@link AddressActivityWebhook}.\n *\n * @param webhookId The id of the address activity webhook. Passing in an id\n * of a non-address-activity webhook will result in a response object with\n * no addresses.\n * @param options Pagination options when fetching addresses.\n */\n getAddresses(\n webhookId: string,\n options?: GetAddressesOptions\n ): Promise;\n async getAddresses(\n webhookOrId: AddressActivityWebhook | string,\n options?: GetAddressesOptions\n ): Promise {\n this.verifyConfig();\n const webhookId =\n typeof webhookOrId === 'string' ? webhookOrId : webhookOrId.id;\n const response = await this.sendWebhookRequest(\n 'webhook-addresses',\n 'getAddresses',\n {\n webhook_id: webhookId,\n limit: options?.limit,\n after: options?.pageKey\n }\n );\n return parseRawAddressActivityResponse(response);\n }\n\n /**\n * Get all NFTs tracked for the provided {@link NftActivityWebhook}.\n *\n * @param nftWebhook The NFT Activity webhook.\n * @param options Pagination options when fetching NFT filters.\n */\n getNftFilters(\n nftWebhook: NftActivityWebhook,\n options?: GetAddressesOptions\n ): Promise;\n\n /**\n * Get all NFT filters tracked for the provided {@link NftActivityWebhook}.\n *\n * @param webhookId The id of the NFT activity webhook. Passing in an\n * incorrect id of a non-NFT webhook will result in a response object with\n * no filters.\n * @param options Pagination options when fetching nft filters.\n */\n getNftFilters(\n webhookId: string,\n options?: GetAddressesOptions\n ): Promise;\n async getNftFilters(\n webhookOrId: NftActivityWebhook | string,\n options?: GetAddressesOptions\n ): Promise {\n this.verifyConfig();\n const webhookId =\n typeof webhookOrId === 'string' ? webhookOrId : webhookOrId.id;\n const response = await this.sendWebhookRequest(\n 'webhook-nft-filters',\n 'getNftFilters',\n {\n webhook_id: webhookId,\n limit: options?.limit,\n after: options?.pageKey\n }\n );\n return parseRawNftFiltersResponse(response);\n }\n\n /**\n * Update a {@link NftActivityWebhook}'s active status or NFT filters.\n *\n * @param nftWebhook The NFT activity webhook to update.\n * @param update Object containing the update.\n */\n updateWebhook(\n nftWebhook: NftActivityWebhook,\n update: NftWebhookUpdate\n ): Promise;\n\n /**\n * Update a {@link NftActivityWebhook}'s active status or NFT filters.\n *\n * @param nftWebhookId The id of the NFT activity webhook.\n * @param update Object containing the update.\n */\n updateWebhook(nftWebhookId: string, update: NftWebhookUpdate): Promise;\n\n /**\n * Update a {@link AddressActivityWebhook}'s active status or addresses.\n *\n * @param addressWebhook The address activity webhook to update.\n * @param update Object containing the update.\n */\n updateWebhook(\n addressWebhook: AddressActivityWebhook,\n update: AddressWebhookUpdate\n ): Promise;\n\n /**\n * Update a {@link AddressActivityWebhook}'s active status or addresses.\n *\n * @param addressWebhookId The id of the address activity webhook.\n * @param update Object containing the update.\n */\n updateWebhook(\n addressWebhookId: string,\n update: AddressWebhookUpdate\n ): Promise;\n async updateWebhook(\n webhookOrId: NftActivityWebhook | AddressActivityWebhook | string,\n update: NftWebhookUpdate | AddressWebhookUpdate\n ): Promise {\n const webhookId =\n typeof webhookOrId === 'string' ? webhookOrId : webhookOrId.id;\n let restApiName;\n let methodName;\n let method: Method;\n let data;\n if ('isActive' in update) {\n restApiName = 'update-webhook';\n methodName = 'updateWebhook';\n method = 'PUT';\n data = {\n webhook_id: webhookId,\n is_active: update.isActive\n };\n } else if ('addFilters' in update || 'removeFilters' in update) {\n restApiName = 'update-webhook-nft-filters';\n methodName = 'updateWebhookNftFilters';\n method = 'PATCH';\n data = {\n webhook_id: webhookId,\n nft_filters_to_add: update.addFilters\n ? update.addFilters.map(nftFilterToParam)\n : [],\n nft_filters_to_remove: update.removeFilters\n ? update.removeFilters.map(nftFilterToParam)\n : []\n };\n } else if ('addAddresses' in update || 'removeAddresses' in update) {\n restApiName = 'update-webhook-addresses';\n methodName = 'webhook:updateWebhookAddresses';\n method = 'PATCH';\n data = {\n webhook_id: webhookId,\n addresses_to_add: await this.resolveAddresses(update.addAddresses),\n addresses_to_remove: await this.resolveAddresses(update.removeAddresses)\n };\n } else if ('newAddresses' in update) {\n restApiName = 'update-webhook-addresses';\n methodName = 'webhook:updateWebhookAddress';\n method = 'PUT';\n data = {\n webhook_id: webhookId,\n addresses: await this.resolveAddresses(update.newAddresses)\n };\n } else {\n throw new Error('Invalid `update` param passed into `updateWebhook`');\n }\n\n await this.sendWebhookRequest(\n restApiName,\n methodName,\n {},\n {\n method,\n data\n }\n );\n }\n\n /**\n * Create a new {@link MinedTransactionWebhook} to track mined transactions\n * sent by the app associated with the app id.\n *\n * Note that the webhook will be created in the app network of the provided app id.\n *\n * @param url The URL that the webhook should send events to.\n * @param type The type of webhook to create.\n * @param params Parameters object containing the app id.\n */\n // TODO(webhook): Automatically populate app id from api key.\n createWebhook(\n url: string,\n type: WebhookType.MINED_TRANSACTION,\n params: TransactionWebhookParams\n ): Promise;\n\n /**\n * Create a new {@link DroppedTransactionWebhook} to track dropped transactions\n * sent by the app associated with the app id.\n *\n * Note that the webhook will be created in the app network of the provided app id.\n *\n * @param url The URL that the webhook should send events to.\n * @param type The type of webhook to create.\n * @param params Parameters object containing the app id.\n */\n // TODO(webhook): Automatically populate app id from api key.\n createWebhook(\n url: string,\n type: WebhookType.DROPPED_TRANSACTION,\n params: TransactionWebhookParams\n ): Promise;\n\n /**\n * Create a new {@link NftActivityWebhook} to track NFT transfers.\n *\n * @param url The URL that the webhook should send events to.\n * @param type The type of webhook to create.\n * @param params Parameters object containing the NFTs to track and the\n * network the webhook should be created on.\n */\n createWebhook(\n url: string,\n type: WebhookType.NFT_ACTIVITY,\n params: NftWebhookParams\n ): Promise;\n\n /**\n * Create a new {@link AddressActivityWebhook} to track address activity.\n *\n * @param url The URL that the webhook should send events to.\n * @param type The type of webhook to create.\n * @param params Parameters object containing the addresses to track and the\n * network the webhook should be created on.\n */\n createWebhook(\n url: string,\n type: WebhookType.ADDRESS_ACTIVITY,\n params: AddressWebhookParams\n ): Promise;\n async createWebhook(\n url: string,\n type: WebhookType,\n params: NftWebhookParams | AddressWebhookParams | TransactionWebhookParams\n ): Promise<\n | MinedTransactionWebhook\n | DroppedTransactionWebhook\n | NftActivityWebhook\n | AddressActivityWebhook\n > {\n let appId;\n if (\n type === WebhookType.MINED_TRANSACTION ||\n type === WebhookType.DROPPED_TRANSACTION\n ) {\n if (!('appId' in params)) {\n throw new Error('Transaction Webhooks require an app id.');\n }\n appId = params.appId;\n }\n\n let network = NETWORK_TO_WEBHOOK_NETWORK.get(this.config.network);\n let filters;\n let addresses;\n if (type === WebhookType.NFT_ACTIVITY) {\n if (!('filters' in params) || params.filters.length === 0) {\n throw new Error(\n 'Nft Activity Webhooks require a non-empty array input.'\n );\n }\n network = params.network\n ? NETWORK_TO_WEBHOOK_NETWORK.get(params.network)\n : network;\n filters = (params.filters as NftFilter[]).map(filter => ({\n contract_address: filter.contractAddress,\n token_id: BigNumber.from(filter.tokenId).toString()\n }));\n } else if (type === WebhookType.ADDRESS_ACTIVITY) {\n if (\n params === undefined ||\n !('addresses' in params) ||\n params.addresses.length === 0\n ) {\n throw new Error(\n 'Address Activity Webhooks require a non-empty array input.'\n );\n }\n network = params.network\n ? NETWORK_TO_WEBHOOK_NETWORK.get(params.network)\n : network;\n addresses = await this.resolveAddresses(params.addresses);\n }\n\n const data = {\n network,\n webhook_type: type,\n webhook_url: url,\n ...(appId && { app_id: appId }),\n\n // Only include the filters/addresses in the final response if it's defined\n ...(filters && { nft_filters: filters }),\n ...(addresses && { addresses })\n };\n\n const response = await this.sendWebhookRequest(\n 'create-webhook',\n 'createWebhook',\n {},\n {\n method: 'POST',\n data\n }\n );\n\n return parseRawWebhook(response.data);\n }\n\n /**\n * Delete the provided webhook.\n *\n * @param webhook The webhook to delete.\n */\n deleteWebhook(webhook: Webhook): Promise;\n\n /**\n * Delete the provided webhook.\n *\n * @param webhookId The id of the webhook to delete.\n */\n deleteWebhook(webhookId: string): Promise;\n async deleteWebhook(webhookOrId: Webhook | string): Promise {\n this.verifyConfig();\n const webhookId =\n typeof webhookOrId === 'string' ? webhookOrId : webhookOrId.id;\n const response = await this.sendWebhookRequest(\n 'delete-webhook',\n 'deleteWebhook',\n {\n webhook_id: webhookId\n },\n {\n method: 'DELETE'\n }\n );\n\n if ('message' in response) {\n throw new Error(\n `Webhook not found. Failed to delete webhook: ${webhookId}`\n );\n }\n }\n\n private verifyConfig() {\n if (this.config.authToken === undefined) {\n throw new Error(\n 'Using the Notify API requires setting the Alchemy Auth Token in ' +\n 'the settings object when initializing Alchemy.'\n );\n }\n }\n\n private sendWebhookRequest(\n restApiName: string,\n methodName: string,\n params: {},\n overrides?: AxiosRequestConfig\n ): Promise {\n return requestHttpWithBackoff(\n this.config,\n AlchemyApiType.WEBHOOK,\n restApiName,\n methodName,\n params,\n {\n ...overrides,\n headers: {\n 'X-Alchemy-Token': this.config.authToken!,\n ...overrides?.headers\n }\n }\n );\n }\n\n /** Resolves ENS addresses to the raw address.\n * @internal */\n private async resolveAddresses(\n addresses: string[] | undefined\n ): Promise {\n if (addresses === undefined) {\n return [];\n }\n const resolvedAddresses: string[] = [];\n const provider = await this.config.getProvider();\n for (const address of addresses) {\n const rawAddress = await provider.resolveName(address);\n if (rawAddress === null) {\n throw new Error(`Unable to resolve the ENS address: ${address}`);\n }\n resolvedAddresses.push(rawAddress);\n }\n\n return resolvedAddresses;\n }\n}\n\n/**\n * Mapping of webhook network representations to the SDK's network representation.\n *\n * @internal\n */\nconst WEBHOOK_NETWORK_TO_NETWORK: { [key: string]: Network } = {\n ETH_MAINNET: Network.ETH_MAINNET,\n ETH_GOERLI: Network.ETH_GOERLI,\n ETH_ROPSTEN: Network.ETH_ROPSTEN,\n ETH_RINKEBY: Network.ETH_RINKEBY,\n ETH_KOVAN: Network.ETH_KOVAN,\n MATIC_MAINNET: Network.MATIC_MAINNET,\n MATIC_MUMBAI: Network.MATIC_MUMBAI,\n ARB_MAINNET: Network.ARB_MAINNET,\n ARB_RINKEBY: Network.ARB_RINKEBY,\n OPT_MAINNET: Network.OPT_MAINNET,\n OPT_KOVAN: Network.OPT_KOVAN\n};\n\n/** Mapping of the SDK's network representation the webhook API's network representation. */\nconst NETWORK_TO_WEBHOOK_NETWORK: Map = Object.keys(\n Network\n).reduce((map: Map, key) => {\n if (key in WEBHOOK_NETWORK_TO_NETWORK) {\n map.set(WEBHOOK_NETWORK_TO_NETWORK[key], key);\n }\n return map;\n}, new Map());\n\nfunction parseRawWebhookResponse(\n response: RawGetAllWebhooksResponse\n): Webhook[] {\n return response.data.map(parseRawWebhook);\n}\n\nfunction parseRawWebhook(rawWebhook: RawWebhook): Webhook {\n return {\n id: rawWebhook.id,\n network: WEBHOOK_NETWORK_TO_NETWORK[rawWebhook.network],\n type: rawWebhook.webhook_type as WebhookType,\n url: rawWebhook.webhook_url,\n isActive: rawWebhook.is_active,\n timeCreated: new Date(rawWebhook.time_created).toISOString(),\n signingKey: rawWebhook.signing_key,\n version: rawWebhook.version as WebhookVersion,\n // Only include the appId in the final response if it's defined\n ...(rawWebhook.app_id !== undefined && { appId: rawWebhook.app_id })\n };\n}\n\nfunction parseRawAddressActivityResponse(\n response: RawAddressActivityResponse\n): AddressActivityResponse {\n return {\n addresses: response.data,\n totalCount: response.pagination.total_count,\n pageKey: response.pagination.cursors.after\n };\n}\n\nfunction parseRawNftFiltersResponse(\n response: RawNftFiltersResponse\n): NftFiltersResponse {\n return {\n filters: response.data.map(f => ({\n contractAddress: f.contract_address,\n tokenId: BigNumber.from(f.token_id).toString()\n })),\n totalCount: response.pagination.total_count,\n pageKey: response.pagination.cursors.after\n };\n}\n\nfunction nftFilterToParam(filter: NftFilter): RawNftFilterParam {\n return {\n contract_address: filter.contractAddress,\n token_id: BigNumber.from(filter.tokenId).toString()\n };\n}\n","import {\n TransactionReceipt,\n TransactionRequest,\n TransactionResponse\n} from '@ethersproject/abstract-provider';\nimport type { BigNumber } from '@ethersproject/bignumber';\nimport { Deferrable } from '@ethersproject/properties';\n\nimport {\n GasOptimizedTransactionResponse,\n GasOptimizedTransactionStatusResponse,\n SendPrivateTransactionOptions\n} from '../types/types';\nimport { AlchemyConfig } from './alchemy-config';\nimport { Wallet } from './alchemy-wallet';\nimport { fromHex, toHex } from './util';\n\n/**\n * Multiples to increment fee per gas when using\n * {@link TransactNamespace.sendGasOptimizedTransaction}.\n *\n * @internal\n */\nexport const GAS_OPTIMIZED_TX_FEE_MULTIPLES = [0.9, 1, 1.1, 1.2, 1.3];\n\n/**\n * The Transact namespace contains methods used for sending transactions and\n * checking on the state of submitted transactions.\n *\n * Do not call this constructor directly. Instead, instantiate an Alchemy object\n * with `const alchemy = new Alchemy(config)` and then access the transact\n * namespace via `alchemy.transact`.\n */\nexport class TransactNamespace {\n /** @internal */\n constructor(private readonly config: AlchemyConfig) {}\n\n /**\n * Used to send a single transaction to Flashbots. Flashbots will attempt to\n * send the transaction to miners for the next 25 blocks.\n *\n * Returns the transaction hash of the submitted transaction.\n *\n * @param signedTransaction The raw, signed transaction as a hash.\n * @param maxBlockNumber Optional highest block number in which the\n * transaction should be included.\n * @param options Options to configure the request.\n */\n async sendPrivateTransaction(\n signedTransaction: string,\n maxBlockNumber?: number,\n options?: SendPrivateTransactionOptions\n ): Promise {\n const provider = await this.config.getProvider();\n const hexBlockNumber = maxBlockNumber ? toHex(maxBlockNumber) : undefined;\n return provider._send(\n 'eth_sendPrivateTransaction',\n [\n {\n tx: signedTransaction,\n maxBlockNumber: hexBlockNumber,\n preferences: options\n }\n ],\n 'sendPrivateTransaction'\n );\n }\n\n /**\n * Stops the provided private transaction from being submitted for future\n * blocks. A transaction can only be cancelled if the request is signed by the\n * same key as the {@link sendPrivateTransaction} call submitting the\n * transaction in first place.\n *\n * Please note that fast mode transactions cannot be cancelled using this method.\n *\n * Returns a boolean indicating whether the cancellation was successful.\n *\n * @param transactionHash Transaction hash of private tx to be cancelled\n */\n async cancelPrivateTransaction(transactionHash: string): Promise {\n const provider = await this.config.getProvider();\n return provider._send(\n 'eth_cancelPrivateTransaction',\n [\n {\n txHash: transactionHash\n }\n ],\n 'cancelPrivateTransaction'\n );\n }\n\n /**\n * Returns the transaction with hash or null if the transaction is unknown.\n *\n * If a transaction has not been mined, this method will search the\n * transaction pool. Various backends may have more restrictive transaction\n * pool access (e.g. if the gas price is too low or the transaction was only\n * recently sent and not yet indexed) in which case this method may also return null.\n *\n * NOTE: This is an alias for {@link CoreNamespace.getTransaction}.\n *\n * @param transactionHash The hash of the transaction to get.\n * @public\n */\n async getTransaction(\n transactionHash: string | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.getTransaction(transactionHash);\n }\n\n /**\n * Submits transaction to the network to be mined. The transaction must be\n * signed, and be valid (i.e. the nonce is correct and the account has\n * sufficient balance to pay for the transaction).\n *\n * NOTE: This is an alias for {@link CoreNamespace.sendTransaction}.\n *\n * @param signedTransaction The signed transaction to send.\n * @public\n */\n async sendTransaction(\n signedTransaction: string | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.sendTransaction(signedTransaction);\n }\n\n /**\n * Returns an estimate of the amount of gas that would be required to submit\n * transaction to the network.\n *\n * An estimate may not be accurate since there could be another transaction on\n * the network that was not accounted for, but after being mined affects the\n * relevant state.\n *\n * This is an alias for {@link CoreNamespace.estimateGas}.\n *\n * @param transaction The transaction to estimate gas for.\n * @public\n */\n async estimateGas(\n transaction: Deferrable\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.estimateGas(transaction);\n }\n\n /**\n * Returns a fee per gas (in wei) that is an estimate of how much you can pay\n * as a priority fee, or \"tip\", to get a transaction included in the current block.\n *\n * This number is generally used to set the `maxPriorityFeePerGas` field in a\n * transaction request.\n *\n * @public\n */\n async getMaxPriorityFeePerGas(): Promise {\n const provider = await this.config.getProvider();\n const feeHex = await provider._send(\n 'eth_maxPriorityFeePerGas',\n [],\n 'getMaxPriorityFeePerGas'\n );\n return fromHex(feeHex);\n }\n\n /**\n * Returns a promise which will not resolve until specified transaction hash is mined.\n *\n * If {@link confirmations} is 0, this method is non-blocking and if the\n * transaction has not been mined returns null. Otherwise, this method will\n * block until the transaction has confirmed blocks mined on top of the block\n * in which it was mined.\n *\n * NOTE: This is an alias for {@link CoreNamespace.waitForTransaction}.\n *\n * @param transactionHash The hash of the transaction to wait for.\n * @param confirmations The number of blocks to wait for.\n * @param timeout The maximum time to wait for the transaction to confirm.\n * @public\n */\n async waitForTransaction(\n transactionHash: string,\n confirmations?: number,\n timeout?: number\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.waitForTransaction(transactionHash, confirmations, timeout);\n }\n\n /**\n * Instead of sending a single transaction that might not get mined, this\n * method allows you to send the same transaction multiple times, with\n * different gas prices and gas limits. This should result in lower fees paid.\n *\n * Alchemy will submit the cheapest transaction, and if it does not get mined,\n * the next cheapest transaction will be submitted. This process will continue\n * until one of the transactions is mined, or until all transactions are rejected.\n *\n * To have Alchemy automatically generate a fee and gas spread, pass in a\n * {@link TransactionRequest} object and a {@link Wallet} as a signer.\n *\n * This method returns a response object containing the transaction hash for\n * each of the signed transactions and a transaction job id that can be used\n * to track the state of the transaction job.\n *\n * @param signedTransactions An array of signed transactions to send. Each\n * transaction in the array must have the same values, but with different\n * gas and fee values.\n * @internal\n */\n // TODO(txjob): Remove internal tag once this feature is released.\n async sendGasOptimizedTransaction(\n signedTransactions: string[]\n ): Promise;\n\n /**\n * Instead of sending a single transaction that might not get mined, this\n * method will generate a series of five EIP-1559 transactions with different\n * gas prices in order to minimize the final fees paid.\n *\n * Alchemy will submit the cheapest transaction, and if it does not get mined,\n * the next cheapest transaction will be submitted. This process will continue\n * until one of the transactions is mined, or until all transactions are rejected.\n *\n * To calculate the fee, gas, and gas spread for each transaction, this method\n * first calculates the base fee from the latest block, estimates the gas for\n * the transaction, and then calculates the fee and gas spread for the\n * transaction. The five transactions will have 90%, 100%, 110%, 120%, and\n * 130% of the max priority fee per gas.\n *\n * Note that you can also pass in an array of pre-signed transactions with set\n * gas levels for more granular control over gas.\n *\n * This method returns a response object containing the transaction hash for\n * each of the signed transactions and a transaction job id that can be used\n * to track the state of the transaction job.\n *\n * @param transaction The raw transaction to send.\n * @param wallet A wallet to use to sign the transaction.\n * @internal\n */\n // TODO(txjob): Remove internal tag once this feature is released.\n async sendGasOptimizedTransaction(\n transaction: TransactionRequest,\n wallet: Wallet\n ): Promise;\n async sendGasOptimizedTransaction(\n transactionOrSignedTxs: TransactionRequest | string[],\n wallet?: Wallet\n ): Promise {\n if (Array.isArray(transactionOrSignedTxs)) {\n return this._sendGasOptimizedTransaction(\n transactionOrSignedTxs,\n 'sendGasOptimizedTransactionPreSigned'\n );\n }\n\n let gasLimit;\n let priorityFee;\n let baseFee;\n const provider = await this.config.getProvider();\n try {\n gasLimit = await this.estimateGas(transactionOrSignedTxs);\n priorityFee = await this.getMaxPriorityFeePerGas();\n const currentBlock = await provider.getBlock('latest');\n baseFee = currentBlock.baseFeePerGas!.toNumber();\n } catch (e) {\n throw new Error(`Failed to estimate gas for transaction: ${e}`);\n }\n\n const gasSpreadTransactions = generateGasSpreadTransactions(\n transactionOrSignedTxs,\n gasLimit.toNumber(),\n baseFee,\n priorityFee\n );\n const signedTransactions = await Promise.all(\n gasSpreadTransactions.map(tx => wallet!.signTransaction(tx))\n );\n\n return this._sendGasOptimizedTransaction(\n signedTransactions,\n 'sendGasOptimizedTransactionGenerated'\n );\n }\n\n /**\n * Returns the state of the transaction job returned by the\n * {@link sendGasOptimizedTransaction}.\n *\n * @param trackingId The tracking id from the response of the sent gas optimized transaction.\n * @internal\n */\n // TODO(txjob): Remove internal tag once this feature is released.\n async getGasOptimizedTransactionStatus(\n trackingId: string\n ): Promise {\n const provider = await this.config.getProvider();\n return provider._send(\n 'alchemy_getGasOptimizedTransactionStatus',\n [trackingId],\n 'getGasOptimizedTransactionStatus'\n );\n }\n\n /** @internal */\n private async _sendGasOptimizedTransaction(\n signedTransactions: string[],\n methodName: string\n ): Promise {\n const provider = await this.config.getProvider();\n return provider._send(\n 'alchemy_sendGasOptimizedTransaction',\n [\n {\n rawTransactions: signedTransactions\n }\n ],\n methodName\n );\n }\n}\n\n/**\n * Helper method to generate the raw transaction with the given gas limit and\n * priority fee across a spread of different gas prices.\n *\n * @internal\n */\n// Visible for testing\nexport function generateGasSpreadTransactions(\n transaction: TransactionRequest,\n gasLimit: number,\n baseFee: number,\n priorityFee: number\n): TransactionRequest[] {\n return GAS_OPTIMIZED_TX_FEE_MULTIPLES.map(feeMultiplier => {\n return {\n ...transaction,\n gasLimit,\n maxFeePerGas: Math.round(\n baseFee * feeMultiplier + priorityFee * feeMultiplier\n ),\n maxPriorityFeePerGas: Math.round(feeMultiplier * priorityFee)\n };\n });\n}\n","/** This file contains internal types used by the SDK and are not exposed to the end user. */\n\ntype JsonRpcId = string | number | null;\n\n/**\n * Prefix for `alchemy_pendingTransactions` subscriptions when serializing to\n * ethers events.\n *\n * This tag is used internally by ethers to track different event filters.\n */\nexport const ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE =\n 'alchemy-pending-transactions';\n\n/**\n * Prefix for `alchemy_minedTransactions` subscriptions when serializing to ethers events.\n *\n * This tag is used internally by ethers to track different event filters.\n */\nexport const ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE =\n 'alchemy-mined-transactions';\n\n/**\n * Array containing all the custom event tags used internally by ethers to track\n * event filters.\n */\nexport const ALCHEMY_EVENT_TYPES = [\n ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE,\n ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE\n];\n\nexport interface JsonRpcRequest {\n jsonrpc: '2.0';\n method: string;\n params?: any[];\n id?: JsonRpcId;\n}\n\nexport interface JsonRpcResponse {\n jsonrpc: '2.0';\n result?: T;\n error?: JsonRpcError;\n id: JsonRpcId;\n}\n\ninterface JsonRpcError {\n code: number;\n message: string;\n data?: T;\n}\n\nexport type WebSocketMessage = SingleOrBatchResponse | SubscriptionEvent;\nexport type SingleOrBatchResponse = JsonRpcResponse | JsonRpcResponse[];\nexport interface SubscriptionEvent {\n jsonrpc: '2.0';\n method: 'eth_subscription';\n params: {\n subscription: string;\n result: T;\n };\n}\n","import { EventType, Filter, Listener } from '@ethersproject/abstract-provider';\n\nimport {\n AlchemyEventFilter,\n AlchemyEventType,\n AlchemyMinedTransactionsAddress,\n AlchemyMinedTransactionsEventFilter,\n AlchemyPendingTransactionsEventFilter,\n AlchemySubscription,\n NonEmptyArray\n} from '../types/types';\nimport {\n ALCHEMY_EVENT_TYPES,\n ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE,\n ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE\n} from './internal-types';\n\n/**\n * DO NOT MODIFY.\n *\n * Event class copied directly over from ethers.js's `BaseProvider` class.\n *\n * This class is used to represent events and their corresponding listeners. The\n * SDK needs to extend this class in order to support Alchemy's custom\n * Subscription API types. The original class is not exported by ethers. Minimal\n * changes have been made in order to get TS to compile.\n */\nclass Event {\n readonly listener: Listener;\n readonly once: boolean;\n readonly tag: string;\n\n _lastBlockNumber: number;\n _inflight: boolean;\n\n constructor(tag: string, listener: Listener, once: boolean) {\n this.listener = listener;\n this.tag = tag;\n this.once = once;\n this._lastBlockNumber = -2;\n this._inflight = false;\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 default:\n return this.tag;\n }\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') {\n throw new Error('Not a transaction event');\n }\n return comps[1];\n }\n\n get filter(): Filter {\n const comps = this.tag.split(':');\n if (comps[0] !== 'filter') {\n throw new Error('Not a transaction event');\n }\n const address = comps[1];\n\n const topics = deserializeTopics(comps[2]);\n const filter: Filter = {};\n\n if (topics.length > 0) {\n filter.topics = topics;\n }\n if (address && address !== '*') {\n filter.address = address;\n }\n\n return filter;\n }\n\n pollable(): boolean {\n const PollableEvents = ['block', 'network', 'pending', 'poll'];\n return this.tag.indexOf(':') >= 0 || PollableEvents.indexOf(this.tag) >= 0;\n }\n}\n\n/**\n * Wrapper class around the ethers `Event` class in order to add support for\n * Alchemy's custom subscriptions types.\n *\n * The serialization and deserialization mechanism requires the order of the\n * fields to be the same across different {@link ALCHEMY_EVENT_TYPES}. Before\n * using a getter on a new event filter, make sure that the position of the\n * field in serialization is correct.\n *\n * The getters on this class deserialize the event tag generated by\n * {@link getAlchemyEventTag} into the original fields passed into the event.\n */\nexport class EthersEvent extends Event {\n /**\n * Converts the event tag into the original `fromAddress` field in\n * {@link AlchemyPendingTransactionsEventFilter}.\n */\n get fromAddress(): string | string[] | undefined {\n const comps = this.tag.split(':');\n if (comps[0] !== ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE) {\n return undefined;\n }\n if (comps[1] && comps[1] !== '*') {\n return deserializeAddressField(comps[1]);\n } else {\n return undefined;\n }\n }\n\n /**\n * Converts the event tag into the original `toAddress` field in\n * {@link AlchemyPendingTransactionsEventFilter}.\n */\n get toAddress(): string | string[] | undefined {\n const comps = this.tag.split(':');\n if (comps[0] !== ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE) {\n return undefined;\n }\n if (comps[2] && comps[2] !== '*') {\n return deserializeAddressField(comps[2]);\n } else {\n return undefined;\n }\n }\n\n /**\n * Converts the event tag into the original `hashesOnly` field in\n * {@link AlchemyPendingTransactionsEventFilter} and {@link AlchemyMinedTransactionsEventFilter}.\n */\n get hashesOnly(): boolean | undefined {\n const comps = this.tag.split(':');\n if (!ALCHEMY_EVENT_TYPES.includes(comps[0])) {\n return undefined;\n }\n if (comps[3] && comps[3] !== '*') {\n return comps[3] === 'true';\n } else {\n return undefined;\n }\n }\n\n get includeRemoved(): boolean | undefined {\n const comps = this.tag.split(':');\n if (comps[0] !== ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE) {\n return undefined;\n }\n if (comps[2] && comps[2] !== '*') {\n return comps[2] === 'true';\n } else {\n return undefined;\n }\n }\n\n get addresses(): NonEmptyArray | undefined {\n const comps = this.tag.split(':');\n if (comps[0] !== ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE) {\n return undefined;\n }\n if (comps[1] && comps[1] !== '*') {\n return deserializeAddressesField(comps[1]);\n } else {\n return undefined;\n }\n }\n}\n\nexport function isAlchemyEvent(\n event: AlchemyEventType\n): event is\n | AlchemyMinedTransactionsEventFilter\n | AlchemyPendingTransactionsEventFilter {\n return typeof event === 'object' && 'method' in event;\n}\n\n/**\n * Creates a string representation of an `alchemy_pendingTransaction`\n * subscription filter that is compatible with the ethers implementation of\n * `getEventTag()`. The method is not an exported function in ethers, which is\n * why the SDK has its own implementation.\n *\n * The event tag is then deserialized by the SDK's {@link EthersEvent} getters.\n *\n * @example\n * ```js\n * // Returns 'alchemy-pending-transactions:0xABC:0xDEF|0xGHI:true'\n * const eventTag = getAlchemyEventTag(\n * {\n * \"method\": \"alchemy_pendingTransactions\",\n * \"fromAddress\": \"0xABC\",\n * \"toAddress\": [\"0xDEF\", \"0xGHI\"],\n * \"hashesOnly: true\n * });\n * ```;\n *\n * @param event\n * @internal\n */\nexport function getAlchemyEventTag(event: AlchemyEventType): string {\n if (!isAlchemyEvent(event)) {\n throw new Error('Event tag requires AlchemyEventType');\n }\n\n if (event.method === AlchemySubscription.PENDING_TRANSACTIONS) {\n return serializePendingTransactionsEvent(event);\n } else if (event.method === AlchemySubscription.MINED_TRANSACTIONS) {\n return serializeMinedTransactionsEvent(event);\n } else {\n throw new Error(`Unrecognized AlchemyFilterEvent: ${event}`);\n }\n}\n\nexport function verifyAlchemyEventName(eventName: AlchemyEventFilter): void {\n if (!Object.values(AlchemySubscription).includes(eventName.method)) {\n throw new Error(\n `Invalid method name ${\n eventName.method\n }. Accepted method names: ${Object.values(AlchemySubscription)}`\n );\n }\n}\n\n/**\n * Serializes the provided {@link AlchemyPendingTransactionsEventFilter} into an ethers\n * compatible event tag.\n *\n * For the example event:\n * ```\n * {\n * \"method\": \"alchemy_pendingTransactions\",\n * \"fromAddress\": \"0xABC\",\n * \"toAddress\": [\"0xDEF\", \"0xGHI\"],\n * \"hashesOnly: true\n * }\n * ```\n *\n * The resulting serialization is:\n * `alchemy_pendingTransactions:0xABC:0xDEF|0xGHI:true`\n *\n * If a field is omitted, it is replaced with a `*`.\n */\nfunction serializePendingTransactionsEvent(\n event: AlchemyPendingTransactionsEventFilter\n): string {\n const fromAddress = serializeAddressField(event.fromAddress);\n const toAddress = serializeAddressField(event.toAddress);\n const hashesOnly = serializeBooleanField(event.hashesOnly);\n return (\n ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE +\n ':' +\n fromAddress +\n ':' +\n toAddress +\n ':' +\n hashesOnly\n );\n}\n\n/**\n * Serializes the provided {@link AlchemyPendingTransactionsEventFilter} into an ethers\n * compatible event tag.\n *\n * For the example event:\n * ```\n * {\n * \"method\": \"alchemy_minedTransactions\",\n * \"addresses\": [\n * {\n * from: \"0xABC\"\n * },\n * {\n * to: \"0xDEF\",\n * from: \"0x123\"\n * }\n * ]\n * \"includeRemoved\": false\n * \"hashesOnly: true\n * }\n * ```\n *\n * The resulting serialization is:\n * `alchemy_minedTransactions:*,0xABC|0xDEF,0x123:false:true`\n *\n * If a field is omitted, it is replaced with a `*`.\n *\n * The `addresses` array is split by the '|' character, and each to/from address\n * pair is separated by a ',' character.\n *\n */\nfunction serializeMinedTransactionsEvent(\n event: AlchemyMinedTransactionsEventFilter\n): string {\n const addresses = serializeAddressesField(event.addresses);\n const includeRemoved = serializeBooleanField(event.includeRemoved);\n const hashesOnly = serializeBooleanField(event.hashesOnly);\n return (\n ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE +\n ':' +\n addresses +\n ':' +\n includeRemoved +\n ':' +\n hashesOnly\n );\n}\n\nfunction serializeAddressesField(\n addresses: AlchemyMinedTransactionsAddress[] | undefined\n): string {\n if (addresses === undefined) {\n return '*';\n }\n\n return addresses\n .map(\n filter =>\n serializeAddressField(filter.to) +\n ',' +\n serializeAddressField(filter.from)\n )\n .join('|');\n}\n\nfunction serializeAddressField(\n field: string | Array | undefined\n): string {\n if (field === undefined) {\n return '*';\n } else if (Array.isArray(field)) {\n return field.join('|');\n } else {\n return field;\n }\n}\n\nfunction serializeBooleanField(field: boolean | undefined): string | undefined {\n if (field === undefined) {\n return '*';\n } else {\n return field.toString();\n }\n}\n\nexport function deserializeTopics(data: string): any {\n if (data === '') {\n return [];\n }\n\n return data.split(/&/g).map(topic => {\n if (topic === '') {\n return [];\n }\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 deserializeAddressField(data: string): string | string[] | undefined {\n if (data === '') {\n return undefined;\n }\n\n const addresses = data.split('|');\n return addresses.length === 1 ? addresses[0] : addresses;\n}\n\nfunction deserializeAddressesField(\n data: string\n): NonEmptyArray | undefined {\n if (data === '') {\n return undefined;\n }\n\n // Perform a cast here since TS doesn't know we're guaranteed a non-empty\n // array from deserializing.\n return data\n .split('|')\n .map(addressStr => addressStr.split(','))\n .map(addressPair => ({\n ...(addressPair[0] !== '*' && { to: addressPair[0] }),\n ...(addressPair[1] !== '*' && { from: addressPair[1] })\n })) as NonEmptyArray;\n}\n","import type { Listener } from '@ethersproject/abstract-provider';\n\nimport { isAlchemyEvent } from '../internal/ethers-event';\nimport {\n AlchemyEventType,\n AlchemyMinedTransactionsAddress,\n AlchemySubscription,\n NonEmptyArray\n} from '../types/types';\nimport { AlchemyConfig } from './alchemy-config';\n\n/**\n * The Websocket namespace contains all subscription related functions that\n * allow you to subscribe to events and receive updates as they occur. The\n * underlying WebSocket provider has additional logic to handle reconnections\n * and automatically backfills missed events.\n *\n * Do not call this constructor directly. Instead, instantiate an Alchemy object\n * with `const alchemy = new Alchemy(config)` and then access the core namespace\n * via `alchemy.ws`.\n */\nexport class WebSocketNamespace {\n /** @internal */\n constructor(private readonly config: AlchemyConfig) {}\n\n /**\n * Adds a listener to be triggered for each {@link eventName} event. Also\n * includes Alchemy's Subscription API events. See {@link AlchemyEventType} for\n * how to use them.\n *\n * @param eventName The event to listen for.\n * @param listener The listener to call when the event is triggered.\n * @public\n */\n on(eventName: AlchemyEventType, listener: Listener): this {\n void (async () => {\n const provider = await this.config.getWebSocketProvider();\n const processedEvent = await this._resolveEnsAlchemyEvent(eventName);\n provider.on(processedEvent, listener);\n })();\n return this;\n }\n\n /**\n * Adds a listener to be triggered for only the next {@link eventName} event,\n * after which it will be removed. Also includes Alchemy's Subscription API\n * events. See {@link AlchemyEventType} for how to use them.\n *\n * @param eventName The event to listen for.\n * @param listener The listener to call when the event is triggered.\n * @public\n */\n once(eventName: AlchemyEventType, listener: Listener): this {\n void (async () => {\n const provider = await this.config.getWebSocketProvider();\n const processedEvent = await this._resolveEnsAlchemyEvent(eventName);\n provider.once(processedEvent, listener);\n })();\n return this;\n }\n\n /**\n * Removes the provided {@link listener} for the {@link eventName} event. If no\n * listener is provided, all listeners for the event will be removed.\n *\n * @param eventName The event to unlisten to.\n * @param listener The listener to remove.\n * @public\n */\n off(eventName: AlchemyEventType, listener?: Listener): this {\n void (async () => {\n const provider = await this.config.getWebSocketProvider();\n const processedEvent = await this._resolveEnsAlchemyEvent(eventName);\n return provider.off(processedEvent, listener);\n })();\n return this;\n }\n\n /**\n * Remove all listeners for the provided {@link eventName} event. If no event\n * is provided, all events and their listeners are removed.\n *\n * @param eventName The event to remove all listeners for.\n * @public\n */\n removeAllListeners(eventName?: AlchemyEventType): this {\n void (async () => {\n const provider = await this.config.getWebSocketProvider();\n const processedEvent = eventName\n ? await this._resolveEnsAlchemyEvent(eventName)\n : undefined;\n provider.removeAllListeners(processedEvent);\n })();\n return this;\n }\n\n /**\n * Returns the number of listeners for the provided {@link eventName} event. If\n * no event is provided, the total number of listeners for all events is returned.\n *\n * @param eventName The event to get the number of listeners for.\n * @public\n */\n async listenerCount(eventName?: AlchemyEventType): Promise {\n const provider = await this.config.getWebSocketProvider();\n const processedEvent = eventName\n ? await this._resolveEnsAlchemyEvent(eventName)\n : undefined;\n return provider.listenerCount(processedEvent);\n }\n\n /**\n * Returns an array of listeners for the provided {@link eventName} event. If\n * no event is provided, all listeners will be included.\n *\n * @param eventName The event to get the listeners for.\n */\n async listeners(eventName?: AlchemyEventType): Promise {\n const provider = await this.config.getWebSocketProvider();\n const processedEvent = eventName\n ? await this._resolveEnsAlchemyEvent(eventName)\n : undefined;\n return provider.listeners(processedEvent);\n }\n\n /**\n * Converts ENS addresses in an Alchemy Event to the underlying resolved\n * address.\n *\n * VISIBLE ONLY FOR TESTING.\n *\n * @internal\n */\n async _resolveEnsAlchemyEvent(\n eventName: AlchemyEventType\n ): Promise {\n if (!isAlchemyEvent(eventName)) {\n return eventName;\n }\n\n if (\n eventName.method === AlchemySubscription.MINED_TRANSACTIONS &&\n eventName.addresses\n ) {\n const processedAddresses: AlchemyMinedTransactionsAddress[] = [];\n for (const address of eventName.addresses) {\n if (address.to) {\n address.to = await this._resolveNameOrError(address.to);\n }\n if (address.from) {\n address.from = await this._resolveNameOrError(address.from);\n }\n processedAddresses.push(address);\n }\n eventName.addresses =\n processedAddresses as NonEmptyArray;\n } else if (eventName.method === AlchemySubscription.PENDING_TRANSACTIONS) {\n if (eventName.fromAddress) {\n if (typeof eventName.fromAddress === 'string') {\n eventName.fromAddress = await this._resolveNameOrError(\n eventName.fromAddress\n );\n } else {\n eventName.fromAddress = await Promise.all(\n eventName.fromAddress.map(this._resolveNameOrError)\n );\n }\n }\n if (eventName.toAddress) {\n if (typeof eventName.toAddress === 'string') {\n eventName.toAddress = await this._resolveNameOrError(\n eventName.toAddress\n );\n } else {\n eventName.toAddress = await Promise.all(\n eventName.toAddress.map(this._resolveNameOrError)\n );\n }\n }\n }\n\n return eventName;\n }\n\n /**\n * Converts the provided ENS address or throws an error. This improves code\n * readability and type safety in other methods.\n *\n * VISIBLE ONLY FOR TESTING.\n *\n * @internal\n */\n async _resolveNameOrError(name: string): Promise {\n const provider = await this.config.getProvider();\n const resolved = await provider.resolveName(name);\n if (resolved === null) {\n throw new Error(`Unable to resolve the ENS address: ${name}`);\n }\n return resolved;\n }\n}\n","import { AlchemySettings } from '../types/types';\nimport { AlchemyConfig } from './alchemy-config';\nimport { CoreNamespace } from './core-namespace';\nimport { NftNamespace } from './nft-namespace';\nimport { NotifyNamespace } from './notify-namespace';\nimport { TransactNamespace } from './transact-namespace';\nimport { WebSocketNamespace } from './websocket-namespace';\n\n/**\n * The Alchemy SDK client. This class is the main entry point into Alchemy's\n * APIs and separates functionality into different namespaces.\n *\n * Each SDK instance is associated with a specific network and API key. To use a\n * different network or API key, create a new instance of {@link Alchemy}.\n *\n * @public\n */\nexport class Alchemy {\n /**\n * The `core` namespace contains the core eth json-rpc calls and Alchemy's\n * Enhanced APIs.\n */\n readonly core: CoreNamespace;\n\n /** The `nft` namespace contains methods for Alchemy's NFT API. */\n readonly nft: NftNamespace;\n\n /** The `ws` namespace contains methods for using WebSockets and creating subscriptions. */\n readonly ws: WebSocketNamespace;\n\n /**\n * The `transact` namespace contains methods for sending transactions and\n * checking on the state of submitted transasctions.\n */\n readonly transact: TransactNamespace;\n\n /**\n * Holds the setting information for the instance of the Alchemy SDK client\n * and allows access to the underlying providers.\n */\n readonly config: AlchemyConfig;\n\n /**\n * The `notify` namespace contains methods for creating and managing webhooks\n * as part of the Notify API.\n */\n readonly notify: NotifyNamespace;\n\n /**\n * @param {string} [settings.apiKey] - The API key to use for Alchemy\n * @param {Network} [settings.network] - The network to use for Alchemy\n * @param {number} [settings.maxRetries] - The maximum number of retries to attempt\n * @public\n */\n constructor(settings?: AlchemySettings) {\n this.config = new AlchemyConfig(settings);\n\n this.core = new CoreNamespace(this.config);\n this.nft = new NftNamespace(this.config);\n this.ws = new WebSocketNamespace(this.config);\n this.transact = new TransactNamespace(this.config);\n this.notify = new NotifyNamespace(this.config);\n }\n}\n","import {\n BlockTag,\n FeeData,\n Provider,\n TransactionRequest,\n TransactionResponse\n} from '@ethersproject/abstract-provider';\nimport { ExternallyOwnedAccount } from '@ethersproject/abstract-signer';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { BytesLike } from '@ethersproject/bytes';\nimport { Deferrable } from '@ethersproject/properties';\nimport { SigningKey } from '@ethersproject/signing-key';\nimport { Wallet as EthersWallet } from '@ethersproject/wallet';\n\nimport { Alchemy } from './alchemy';\n\n/**\n * The Wallet class inherits Signer and can sign transactions and messages using\n * a private key as a standard Externally Owned Account (EOA).\n *\n * SDK's custom implementation of Ethers.js's 'Wallet'.\n *\n * Primary difference from Ethers.js 'Wallet' is that you can pass in either a\n * Provider or an Alchemy object. This implementation will intelligently detect\n * the format and set the provider accordingly.\n *\n * @public\n * @override\n */\nexport class Wallet extends EthersWallet {\n private alchemyProviderPromise?: Promise;\n\n /**\n * Overload permits users to pass in either a standard Provider or an Alchemy\n * object. The constructor will detect the object type and handle appropriately.\n *\n * @override\n */\n constructor(\n privateKey: BytesLike | ExternallyOwnedAccount | SigningKey,\n alchemyOrProvider?: Alchemy | Provider\n ) {\n // If object passed in is a provider, send to super\n let superProvider: Provider | undefined;\n if (alchemyOrProvider && Provider.isProvider(alchemyOrProvider)) {\n superProvider = alchemyOrProvider;\n }\n super(privateKey, superProvider);\n\n // If object passed in is an Alchemy object, just set Alchemy\n if (alchemyOrProvider && !Provider.isProvider(alchemyOrProvider)) {\n this.alchemyProviderPromise = alchemyOrProvider.config.getProvider();\n }\n }\n\n //////////////////////////////////////////////////////////////////\n // Set of overrides from Signer to handle async provider retrieval.\n //////////////////////////////////////////////////////////////////\n\n /**\n * Returns the balance of this wallet at blockTag.\n *\n * @param blockTag The block to check the balance of\n * @override\n */\n getBalance(blockTag?: BlockTag): Promise {\n return this.getWallet().then(wallet => wallet.getBalance(blockTag));\n }\n\n /**\n * Returns the number of transactions this account has ever sent. This is the\n * value required to be included in transactions as the nonce.\n *\n * @param blockTag The block to check the transaction count on\n * @override\n */\n getTransactionCount(blockTag?: BlockTag): Promise {\n return this.getWallet().then(wallet =>\n wallet.getTransactionCount(blockTag)\n );\n }\n\n /**\n * Returns the result of estimating the cost to send the transactionRequest,\n * with this account address being used as the from field.\n *\n * @param transaction Transaction to estimate the gas on\n * @override\n */\n estimateGas(transaction: Deferrable): Promise {\n return this.getWallet().then(wallet => wallet.estimateGas(transaction));\n }\n\n /**\n * Returns the result of calling using the transactionRequest, with this\n * account address being used as the from field.\n *\n * @param transaction To make a call on\n * @param blockTag The block to make the call on\n * @override\n */\n call(\n transaction: Deferrable,\n blockTag?: BlockTag\n ): Promise {\n return this.getWallet().then(wallet => wallet.call(transaction, blockTag));\n }\n\n /**\n * Populates all fields in a transaction, signs it and sends it to the network\n *\n * @override\n */\n sendTransaction(\n transaction: Deferrable\n ): Promise {\n return this.getWallet().then(wallet => wallet.sendTransaction(transaction));\n }\n\n /**\n * Returns the chain ID this wallet is connected to.\n *\n * @override\n */\n getChainId(): Promise {\n return this.getWallet().then(wallet => wallet.getChainId());\n }\n\n /**\n * Returns the current gas price.\n *\n * @override\n */\n getGasPrice(): Promise {\n return this.getWallet().then(wallet => wallet.getGasPrice());\n }\n\n /**\n * Returns the current recommended FeeData to use in a transaction.\n *\n * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas\n * should be used.\n *\n * For legacy transactions and networks which do not support EIP-1559, the\n * gasPrice should be used.\n *\n * @override\n */\n getFeeData(): Promise {\n return this.getWallet().then(wallet => wallet.getFeeData());\n }\n\n /**\n * Looks up the address of name. If the name is not owned, or does not have a\n * Resolver configured, or the Resolver does not have an address configured,\n * null is returned.\n *\n * @param name Name of the ENS address\n * @override\n */\n resolveName(name: string): Promise {\n return this.getWallet().then(wallet => wallet.resolveName(name));\n }\n\n private async getWallet() {\n if (!this.alchemyProviderPromise) {\n return this.connect(this.provider);\n }\n return this.connect(await this.alchemyProviderPromise);\n }\n}\n","import {\n Contract as EthersContract,\n ContractFactory as EthersContractFactory\n} from '@ethersproject/contracts';\n\n/**\n * The Contract class is a wrapper around the Contract class from ethers.js and\n * is exported here for convenience.\n *\n * @public\n */\n// TODO: support passing in Alchemy instance into the contract.\nexport class Contract extends EthersContract {}\n\n/**\n * The ContractFactory class is a wrapper around the ContractFactory class from\n * ethers.js and is exported here for convenience.\n *\n * @public\n */\nexport class ContractFactory extends EthersContractFactory {}\n"],"names":["EthersWallet","EthersContract","EthersContractFactory"],"mappings":";;;;;;;AA0DA;;;;;;;AAOG;IACS,QAoBX;AApBD,CAAA,UAAY,OAAO,EAAA;AACjB,IAAA,OAAA,CAAA,aAAA,CAAA,GAAA,aAA2B,CAAA;;AAE3B,IAAA,OAAA,CAAA,aAAA,CAAA,GAAA,aAA2B,CAAA;AAC3B,IAAA,OAAA,CAAA,YAAA,CAAA,GAAA,YAAyB,CAAA;;AAEzB,IAAA,OAAA,CAAA,WAAA,CAAA,GAAA,WAAuB,CAAA;;AAEvB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node_modules/alchemy-sdk/dist/es/index.js new file mode 100644 index 0000000..a35baef --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/index.js @@ -0,0 +1,9 @@ +import * as utils from './api/utils'; +export { utils as Utils }; +export { k as Alchemy, h as AlchemySubscription, q as AssetTransfersCategory, r as AssetTransfersOrder, m as Contract, o as ContractFactory, G as GasOptimizedTransactionStatus, N as Network, x as NftExcludeFilters, y as NftFilters, z as NftOrdering, B as NftSaleMarketplace, F as NftSaleTakerType, w as NftSpamClassification, u as NftTokenType, O as OpenSeaSafelistRequestStatus, R as RefreshState, S as SortingOrder, T as TokenBalanceType, W as Wallet, J as WebhookType, H as WebhookVersion, f as fromHex, p as isHex, s as setLogLevel, t as toHex } from './index-02af91ae.js'; +import '@ethersproject/bignumber'; +import 'axios'; +import '@ethersproject/abstract-provider'; +import '@ethersproject/wallet'; +import '@ethersproject/contracts'; +//# sourceMappingURL=index.js.map diff --git a/test/node_modules/alchemy-sdk/dist/es/index.js.map b/test/node_modules/alchemy-sdk/dist/es/index.js.map new file mode 100644 index 0000000..9aee79f --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"} \ No newline at end of file diff --git a/test/node_modules/alchemy-sdk/dist/es/src/api/alchemy-config.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/api/alchemy-config.d.ts new file mode 100644 index 0000000..0ba461a --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/api/alchemy-config.d.ts @@ -0,0 +1,54 @@ +import { AlchemySettings, Network } from '../types/types'; +import type { AlchemyProvider } from './alchemy-provider'; +import type { AlchemyWebSocketProvider } from './alchemy-websocket-provider'; +/** + * This class holds the config information for the SDK client instance and + * exposes the underlying providers for more advanced use cases. + * + * @public + */ +export declare class AlchemyConfig { + /** The Alchemy API key. */ + readonly apiKey: string; + /** The Network that this SDK is associated with. */ + readonly network: Network; + /** The maximum number of retries to perform. */ + readonly maxRetries: number; + /** Setting to enable automatic batching on json-rpc requests. Defaults to false.*/ + readonly batchRequests: boolean; + /** + * The optional hardcoded URL to send requests to instead of using the network + * and apiKey. + */ + readonly url?: string; + /** The optional Alchemy auth token to use when sending requests with the Notify API. */ + readonly authToken?: string; + constructor(config?: AlchemySettings); + /** + * Returns an AlchemyProvider instance. Only one provider is created per + * Alchemy instance. + * + * The AlchemyProvider is a wrapper around ether's `AlchemyProvider` class and + * has been expanded to support Alchemy's Enhanced APIs. + * + * Most common methods on the provider are available as top-level methods on + * the {@link Alchemy} instance, but the provider is exposed here to access + * other less-common methods. + * + * @public + */ + getProvider(): Promise; + /** + * Returns an AlchemyWebsocketProvider instance. Only one provider is created + * per Alchemy instance. + * + * The AlchemyWebSocketProvider is a wrapper around ether's + * `AlchemyWebSocketProvider` class and has been expanded to support Alchemy's + * Subscription APIs, automatic backfilling, and other performance improvements. + * + * Most common methods on the provider are available as top-level methods on + * the {@link Alchemy} instance, but the provider is exposed here to access + * other less-common methods. + */ + getWebSocketProvider(): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/es/src/api/alchemy-contract.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/api/alchemy-contract.d.ts new file mode 100644 index 0000000..a1766ad --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/api/alchemy-contract.d.ts @@ -0,0 +1,17 @@ +import { Contract as EthersContract, ContractFactory as EthersContractFactory } from '@ethersproject/contracts'; +/** + * The Contract class is a wrapper around the Contract class from ethers.js and + * is exported here for convenience. + * + * @public + */ +export declare class Contract extends EthersContract { +} +/** + * The ContractFactory class is a wrapper around the ContractFactory class from + * ethers.js and is exported here for convenience. + * + * @public + */ +export declare class ContractFactory extends EthersContractFactory { +} diff --git a/test/node_modules/alchemy-sdk/dist/es/src/api/alchemy-provider.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/api/alchemy-provider.d.ts new file mode 100644 index 0000000..4e2d71e --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/api/alchemy-provider.d.ts @@ -0,0 +1,40 @@ +import { Network as NetworkFromEthers } from '@ethersproject/networks'; +import { CommunityResourcable, JsonRpcProvider } from '@ethersproject/providers'; +/** + * SDK's custom implementation of ethers.js's 'AlchemyProvider'. + * + * Do not call this constructor directly. Instead, instantiate an instance of + * {@link Alchemy} and call {@link Alchemy.config.getProvider()}. + * + * @public + */ +export declare class AlchemyProvider extends JsonRpcProvider implements CommunityResourcable { + readonly apiKey: string; + readonly maxRetries: number; + readonly batchRequests: boolean; + /** + * Overrides the method in ethers.js's `StaticJsonRpcProvider` class. This + * method is called when calling methods on the parent class `BaseProvider`. + * + * @override + */ + detectNetwork(): Promise; + _startPending(): void; + /** + * Overrides the ether's `isCommunityResource()` method. Returns true if the + * current api key is the default key. + * + * @override + */ + isCommunityResource(): boolean; + /** + * Overrides the base {@link JsonRpcProvider.send} method to implement custom + * logic for sending requests to Alchemy. + * + * @param method The method name to use for the request. + * @param params The parameters to use for the request. + * @override + * @public + */ + send(method: string, params: Array): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/es/src/api/alchemy-wallet.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/api/alchemy-wallet.d.ts new file mode 100644 index 0000000..026d469 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/api/alchemy-wallet.d.ts @@ -0,0 +1,103 @@ +import { BlockTag, FeeData, Provider, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; +import { ExternallyOwnedAccount } from '@ethersproject/abstract-signer'; +import { BigNumber } from '@ethersproject/bignumber'; +import { BytesLike } from '@ethersproject/bytes'; +import { Deferrable } from '@ethersproject/properties'; +import { SigningKey } from '@ethersproject/signing-key'; +import { Wallet as EthersWallet } from '@ethersproject/wallet'; +import { Alchemy } from './alchemy'; +/** + * The Wallet class inherits Signer and can sign transactions and messages using + * a private key as a standard Externally Owned Account (EOA). + * + * SDK's custom implementation of Ethers.js's 'Wallet'. + * + * Primary difference from Ethers.js 'Wallet' is that you can pass in either a + * Provider or an Alchemy object. This implementation will intelligently detect + * the format and set the provider accordingly. + * + * @public + * @override + */ +export declare class Wallet extends EthersWallet { + private alchemyProviderPromise?; + /** + * Overload permits users to pass in either a standard Provider or an Alchemy + * object. The constructor will detect the object type and handle appropriately. + * + * @override + */ + constructor(privateKey: BytesLike | ExternallyOwnedAccount | SigningKey, alchemyOrProvider?: Alchemy | Provider); + /** + * Returns the balance of this wallet at blockTag. + * + * @param blockTag The block to check the balance of + * @override + */ + getBalance(blockTag?: BlockTag): Promise; + /** + * Returns the number of transactions this account has ever sent. This is the + * value required to be included in transactions as the nonce. + * + * @param blockTag The block to check the transaction count on + * @override + */ + getTransactionCount(blockTag?: BlockTag): Promise; + /** + * Returns the result of estimating the cost to send the transactionRequest, + * with this account address being used as the from field. + * + * @param transaction Transaction to estimate the gas on + * @override + */ + estimateGas(transaction: Deferrable): Promise; + /** + * Returns the result of calling using the transactionRequest, with this + * account address being used as the from field. + * + * @param transaction To make a call on + * @param blockTag The block to make the call on + * @override + */ + call(transaction: Deferrable, blockTag?: BlockTag): Promise; + /** + * Populates all fields in a transaction, signs it and sends it to the network + * + * @override + */ + sendTransaction(transaction: Deferrable): Promise; + /** + * Returns the chain ID this wallet is connected to. + * + * @override + */ + getChainId(): Promise; + /** + * Returns the current gas price. + * + * @override + */ + getGasPrice(): Promise; + /** + * Returns the current recommended FeeData to use in a transaction. + * + * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas + * should be used. + * + * For legacy transactions and networks which do not support EIP-1559, the + * gasPrice should be used. + * + * @override + */ + getFeeData(): Promise; + /** + * Looks up the address of name. If the name is not owned, or does not have a + * Resolver configured, or the Resolver does not have an address configured, + * null is returned. + * + * @param name Name of the ENS address + * @override + */ + resolveName(name: string): Promise; + private getWallet; +} diff --git a/test/node_modules/alchemy-sdk/dist/es/src/api/alchemy-websocket-provider.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/api/alchemy-websocket-provider.d.ts new file mode 100644 index 0000000..ce7a704 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/api/alchemy-websocket-provider.d.ts @@ -0,0 +1,135 @@ +import { Listener } from '@ethersproject/abstract-provider'; +import { CommunityResourcable, WebSocketProvider } from '@ethersproject/providers'; +import { EthersEvent } from '../internal/ethers-event'; +import { AlchemyEventType } from '../types/types'; +/** + * SDK's custom implementation fo the ethers.js's 'AlchemyWebSocketProvider'. + * + * Do not call this constructor directly. Instead, instantiate an instance of + * {@link Alchemy} and call {@link Alchemy.config.getWebSocketProvider()}. + * + * @public + */ +export declare class AlchemyWebSocketProvider extends WebSocketProvider implements CommunityResourcable { + _events: Array; + readonly apiKey: string; + /** + * Overridden implementation of ethers that includes Alchemy based subscriptions. + * + * @param eventName Event to subscribe to + * @param listener The listener function to call when the event is triggered. + * @override + * @public + */ + on(eventName: AlchemyEventType, listener: Listener): this; + /** + * Overridden implementation of ethers that includes Alchemy based + * subscriptions. Adds a listener to the triggered for only the next + * {@link eventName} event, after which it will be removed. + * + * @param eventName Event to subscribe to + * @param listener The listener function to call when the event is triggered. + * @override + * @public + */ + once(eventName: AlchemyEventType, listener: Listener): this; + /** + * Removes the provided {@link listener} for the {@link eventName} event. If no + * listener is provided, all listeners for the event will be removed. + * + * @param eventName Event to unlisten to. + * @param listener The listener function to remove. + * @override + * @public + */ + off(eventName: AlchemyEventType, listener?: Listener): this; + /** + * Remove all listeners for the provided {@link eventName} event. If no event + * is provided, all events and their listeners are removed. + * + * @param eventName The event to remove all listeners for. + * @override + * @public + */ + removeAllListeners(eventName?: AlchemyEventType): this; + /** + * Returns the number of listeners for the provided {@link eventName} event. If + * no event is provided, the total number of listeners for all events is returned. + * + * @param eventName The event to get the number of listeners for. + * @public + * @override + */ + listenerCount(eventName?: AlchemyEventType): number; + /** + * Returns an array of listeners for the provided {@link eventName} event. If + * no event is provided, all listeners will be included. + * + * @param eventName The event to get the listeners for. + * @public + * @override + */ + listeners(eventName?: AlchemyEventType): Array; + /** @override */ + destroy(): Promise; + /** + * Overrides the ether's `isCommunityResource()` method. Returns true if the + * current api key is the default key. + * + * @override + */ + isCommunityResource(): boolean; + private emitEvent; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.off()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _off; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.removeAllListeners()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _removeAllListeners; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.listenerCount()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _listenerCount; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.listeners()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _listeners; +} diff --git a/test/node_modules/alchemy-sdk/dist/es/src/api/alchemy.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/api/alchemy.d.ts new file mode 100644 index 0000000..edc191f --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/api/alchemy.d.ts @@ -0,0 +1,49 @@ +import { AlchemySettings } from '../types/types'; +import { AlchemyConfig } from './alchemy-config'; +import { CoreNamespace } from './core-namespace'; +import { NftNamespace } from './nft-namespace'; +import { NotifyNamespace } from './notify-namespace'; +import { TransactNamespace } from './transact-namespace'; +import { WebSocketNamespace } from './websocket-namespace'; +/** + * The Alchemy SDK client. This class is the main entry point into Alchemy's + * APIs and separates functionality into different namespaces. + * + * Each SDK instance is associated with a specific network and API key. To use a + * different network or API key, create a new instance of {@link Alchemy}. + * + * @public + */ +export declare class Alchemy { + /** + * The `core` namespace contains the core eth json-rpc calls and Alchemy's + * Enhanced APIs. + */ + readonly core: CoreNamespace; + /** The `nft` namespace contains methods for Alchemy's NFT API. */ + readonly nft: NftNamespace; + /** The `ws` namespace contains methods for using WebSockets and creating subscriptions. */ + readonly ws: WebSocketNamespace; + /** + * The `transact` namespace contains methods for sending transactions and + * checking on the state of submitted transasctions. + */ + readonly transact: TransactNamespace; + /** + * Holds the setting information for the instance of the Alchemy SDK client + * and allows access to the underlying providers. + */ + readonly config: AlchemyConfig; + /** + * The `notify` namespace contains methods for creating and managing webhooks + * as part of the Notify API. + */ + readonly notify: NotifyNamespace; + /** + * @param {string} [settings.apiKey] - The API key to use for Alchemy + * @param {Network} [settings.network] - The network to use for Alchemy + * @param {number} [settings.maxRetries] - The maximum number of retries to attempt + * @public + */ + constructor(settings?: AlchemySettings); +} diff --git a/test/node_modules/alchemy-sdk/dist/es/src/api/core-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/api/core-namespace.d.ts new file mode 100644 index 0000000..5a5827d --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/api/core-namespace.d.ts @@ -0,0 +1,311 @@ +import type { Block, BlockTag, BlockWithTransactions, FeeData, Filter, FilterByBlockHash, Log, TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; +import type { BigNumber, BigNumberish } from '@ethersproject/bignumber'; +import type { Network as EthersNetworkAlias } from '@ethersproject/networks/lib/types'; +import type { Deferrable } from '@ethersproject/properties'; +import { AssetTransfersParams, AssetTransfersResponse, AssetTransfersWithMetadataParams, AssetTransfersWithMetadataResponse, DeployResult, TokenBalancesOptionsDefaultTokens, TokenBalancesOptionsErc20, TokenBalancesResponse, TokenBalancesResponseErc20, TokenMetadataResponse, TransactionReceiptsParams, TransactionReceiptsResponse } from '../types/types'; +/** + * The core namespace contains all commonly-used [Ethers.js + * Provider](https://docs.ethers.io/v5/api/providers/api-providers/#AlchemyProvider) + * methods. If you are already using Ethers.js, you should be simply able to + * replace the Ethers.js Provider object with `alchemy.core` when accessing + * provider methods and it should just work. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.core`. + */ +export declare class CoreNamespace { + private readonly config; + /** + * Returns the balance of a given address as of the provided block. + * + * @param addressOrName The address or name of the account to get the balance for. + * @param blockTag The optional block number or hash to get the balance for. + * Defaults to 'latest' if unspecified. + * @public + */ + getBalance(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Returns the contract code of the provided address at the block. If there is + * no contract deployed, the result is `0x`. + * + * @param addressOrName The address or name of the account to get the code for. + * @param blockTag The optional block number or hash to get the code for. + * Defaults to 'latest' if unspecified. + * @public + */ + getCode(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Return the value of the provided position at the provided address, at the + * provided block in `Bytes32` format. + * + * @param addressOrName The address or name of the account to get the code for. + * @param position The position of the storage slot to get. + * @param blockTag The optional block number or hash to get the code for. + * Defaults to 'latest' if unspecified. + * @public + */ + getStorageAt(addressOrName: string | Promise, position: BigNumberish | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Returns the number of transactions ever sent from the provided address, as + * of the provided block tag. This value is used as the nonce for the next + * transaction from the address sent to the network. + * + * @param addressOrName The address or name of the account to get the nonce for. + * @param blockTag The optional block number or hash to get the nonce for. + * @public + */ + getTransactionCount(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Returns the block from the network based on the provided block number or + * hash. Transactions on the block are represented as an array of transaction + * hashes. To get the full transaction details on the block, use + * {@link getBlockWithTransactions} instead. + * + * @param blockHashOrBlockTag The block number or hash to get the block for. + * @public + */ + getBlock(blockHashOrBlockTag: BlockTag | string | Promise): Promise; + /** + * Returns the block from the network based on the provided block number or + * hash. Transactions on the block are represented as an array of + * {@link TransactionResponse} objects. + * + * @param blockHashOrBlockTag The block number or hash to get the block for. + * @public + */ + getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise): Promise; + /** + * Returns the {@link EthersNetworkAlias} Alchemy is connected to. + * + * @public + */ + getNetwork(): Promise; + /** + * Returns the block number of the most recently mined block. + * + * @public + */ + getBlockNumber(): Promise; + /** + * Returns the best guess of the current gas price to use in a transaction. + * + * @public + */ + getGasPrice(): Promise; + /** + * Returns the recommended fee data to use in a transaction. + * + * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas + * should be used. + * + * For legacy transactions and networks which do not support EIP-1559, the + * gasPrice should be used. + * + * @public + */ + getFeeData(): Promise; + /** + * Returns a Promise which will stall until the network has heen established, + * ignoring errors due to the target node not being active yet. + * + * This can be used for testing or attaching scripts to wait until the node is + * up and running smoothly. + * + * @public + */ + ready(): Promise; + /** + * Returns the result of executing the transaction, using call. A call does + * not require any ether, but cannot change any state. This is useful for + * calling getters on Contracts. + * + * @param transaction The transaction to execute. + * @param blockTag The optional block number or hash to get the call for. + * @public + */ + call(transaction: Deferrable, blockTag?: BlockTag | Promise): Promise; + /** + * Returns an estimate of the amount of gas that would be required to submit + * transaction to the network. + * + * An estimate may not be accurate since there could be another transaction on + * the network that was not accounted for, but after being mined affects the + * relevant state. + * + * This is an alias for {@link TransactNamespace.estimateGas}. + * + * @param transaction The transaction to estimate gas for. + * @public + */ + estimateGas(transaction: Deferrable): Promise; + /** + * Returns the transaction with hash or null if the transaction is unknown. + * + * If a transaction has not been mined, this method will search the + * transaction pool. Various backends may have more restrictive transaction + * pool access (e.g. if the gas price is too low or the transaction was only + * recently sent and not yet indexed) in which case this method may also return null. + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransaction(transactionHash: string | Promise): Promise; + /** + * Returns the transaction receipt for hash or null if the transaction has not + * been mined. + * + * To stall until the transaction has been mined, consider the + * waitForTransaction method below. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransactionReceipt(transactionHash: string | Promise): Promise; + /** + * Submits transaction to the network to be mined. The transaction must be + * signed, and be valid (i.e. the nonce is correct and the account has + * sufficient balance to pay for the transaction). + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param signedTransaction The signed transaction to send. + * @public + */ + sendTransaction(signedTransaction: string | Promise): Promise; + /** + * Returns a promise which will not resolve until specified transaction hash is mined. + * + * If {@link confirmations} is 0, this method is non-blocking and if the + * transaction has not been mined returns null. Otherwise, this method will + * block until the transaction has confirmed blocks mined on top of the block + * in which it was mined. + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to wait for. + * @param confirmations The number of blocks to wait for. + * @param timeout The maximum time to wait for the transaction to confirm. + * @public + */ + waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise; + /** + * Returns an array of logs that match the provided filter. + * + * @param filter The filter object to use. + * @public + */ + getLogs(filter: Filter | FilterByBlockHash | Promise): Promise>; + /** + * Allows sending a raw message to the Alchemy backend. + * + * @param method The method to call. + * @param params The parameters to pass to the method. + * @public + */ + send(method: string, params: Array): Promise; + /** + * Finds the address that deployed the provided contract and block number it + * was deployed in. + * + * NOTE: This method performs a binary search across all blocks since genesis + * and can take a long time to complete. This method is a convenience method + * that will eventually be replaced by a single call to an Alchemy endpoint + * with this information cached. + * + * @param contractAddress - The contract address to find the deployer for. + * @beta + */ + findContractDeployer(contractAddress: string): Promise; + /** + * Returns the ERC-20 token balances for a specific owner address. + * + * @param addressOrName The owner address to get the token balances for. + * @public + */ + getTokenBalances(addressOrName: string): Promise; + /** + * Returns the token balances for a specific owner address given a list of contracts. + * + * @param addressOrName The owner address to get the token balances for. + * @param contractAddresses A list of contract addresses to check. If omitted, + * all ERC-20 tokens will be checked. + * @public + */ + getTokenBalances(addressOrName: string, contractAddresses?: string[]): Promise; + /** + * Returns the ERC-20 token balances for a specific owner. + * + * This overload covers the erc-20 token type which includes a page key in the response. + * + * @param addressOrName The owner address to get the token balances for. + * @param options Token type options set to ERC-20 with optional page key. + * @public + */ + getTokenBalances(addressOrName: string, options: TokenBalancesOptionsErc20): Promise; + /** + * Returns the token balances for a specific owner, fetching from the top 100 + * tokens by 24 hour volume. + * + * This overload covers the default token type which includes a page key in + * the response. + * + * @param addressOrName The owner address to get the token balances for. + * @param options Token type options set to ERC-20 with optional page key. + * @public + */ + getTokenBalances(addressOrName: string, options: TokenBalancesOptionsDefaultTokens): Promise; + /** + * Returns metadata for a given token contract address. + * + * @param address The contract address to get metadata for. + * @public + */ + getTokenMetadata(address: string): Promise; + /** + * Get transactions for specific addresses. See the web documentation for the + * full details: + * https://docs.alchemy.com/alchemy/enhanced-apis/transfers-api#alchemy_getassettransfers + * + * This overload requires {@link AssetTransfersWithMetadataParams.withMetadata} + * to be set to `true`, which results in additional metadata returned in the + * response object. + * + * @param params An object containing fields for the asset transfer query + * @public + */ + getAssetTransfers(params: AssetTransfersWithMetadataParams): Promise; + /** + * Get transactions for specific addresses. See the web documentation for the + * full details: + * https://docs.alchemy.com/alchemy/enhanced-apis/transfers-api#alchemy_getassettransfers + * + * @param params An object containing fields for the asset transfer query. + * @public + */ + getAssetTransfers(params: AssetTransfersParams): Promise; + /** + * Gets all transaction receipts for a given block by number or block hash. + * + * @param params An object containing fields for the transaction receipt query. + * @public + */ + getTransactionReceipts(params: TransactionReceiptsParams): Promise; + /** + * Returns the underlying owner address for the provided ENS address, or `null` + * if the ENS name does not have an underlying address. + * + * @param name The ENS address name to resolve. + */ + resolveName(name: string): Promise; + /** + * Performs a reverse lookup of the address in ENS using the Reverse Registrar. If the name does not exist, or the forward lookup does not match, null is returned. + * + * An ENS name requires additional configuration to setup a reverse record, so not all ENS addresses will map back to the original ENS domain. + * + * @param address The address to look up the ENS domain name for. + */ + lookupAddress(address: string): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/es/src/api/nft-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/api/nft-namespace.d.ts new file mode 100644 index 0000000..09e756e --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/api/nft-namespace.d.ts @@ -0,0 +1,275 @@ +import type { BigNumberish } from '@ethersproject/bignumber'; +import { GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftResponse, NftAttributeRarity, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, NftTokenType, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult } from '../types/types'; +import { BaseNft, Nft, NftContract } from './nft'; +/** + * The NFT namespace contains all the functionality related to NFTs. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.nft`. + */ +export declare class NftNamespace { + private readonly config; + /** + * Get the NFT metadata associated with the provided parameters. + * + * @param contractAddress - The contract address of the NFT. + * @param tokenId - Token id of the NFT. + * @param tokenType - Optionally specify the type of token to speed up the query. + * @param tokenUriTimeoutInMs - No set timeout by default - When metadata is + * requested, this parameter is the timeout (in milliseconds) for the + * website hosting the metadata to respond. If you want to only access the + * cache and not live fetch any metadata for cache misses then set this value to 0. + * @public + */ + getNftMetadata(contractAddress: string, tokenId: BigNumberish, tokenType?: NftTokenType, tokenUriTimeoutInMs?: number): Promise; + /** + * Gets the NFT metadata for multiple NFT tokens. + * + * @param tokens An array of NFT tokens to fetch metadata for. + * @param options Configuration options for making the request. + */ + getNftMetadataBatch(tokens: Array, options?: NftMetadataBatchOptions): Promise; + /** + * Get the NFT collection metadata associated with the provided parameters. + * + * @param contractAddress - The contract address of the NFT. + * @public + */ + getContractMetadata(contractAddress: string): Promise; + /** + * Fetches all NFTs for a given owner and yields them in an async iterable. + * + * This method returns the full NFT for the owner and pages through all page + * keys until all NFTs have been fetched. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwnerIterator(owner: string, options?: GetNftsForOwnerOptions): AsyncIterable; + /** + * Fetches all NFTs for a given owner and yields them in an async iterable. + * + * This method returns the base NFTs that omit the associated metadata and + * pages through all page keys until all NFTs have been fetched. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwnerIterator(owner: string, options?: GetBaseNftsForOwnerOptions): AsyncIterable; + /** + * Get all NFTs for an owner. + * + * This method returns the full NFTs in the contract. To get all NFTs without + * their associated metadata, use {@link GetBaseNftsForOwnerOptions}. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwner(owner: string, options?: GetNftsForOwnerOptions): Promise; + /** + * Get all base NFTs for an owner. + * + * This method returns the base NFTs that omit the associated metadata. To get + * all NFTs with their associated metadata, use {@link GetNftsForOwnerOptions}. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwner(owner: string, options?: GetBaseNftsForOwnerOptions): Promise; + /** + * Get all NFTs for a given contract address. + * + * This method returns the full NFTs in the contract. To get all NFTs without + * their associated metadata, use {@link GetBaseNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The parameters to use for the request. or + * {@link NftContractNftsResponse} response. + * @beta + */ + getNftsForContract(contractAddress: string, options?: GetNftsForContractOptions): Promise; + /** + * Get all base NFTs for a given contract address. + * + * This method returns the base NFTs that omit the associated metadata. To get + * all NFTs with their associated metadata, use {@link GetNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftsForContract(contractAddress: string, options?: GetBaseNftsForContractOptions): Promise; + /** + * Fetches all NFTs for a given contract address and yields them in an async iterable. + * + * This method returns the full NFTs in the contract and pages through all + * page keys until all NFTs have been fetched. To get all NFTs without their + * associated metadata, use {@link GetBaseNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftsForContractIterator(contractAddress: string, options?: GetNftsForContractOptions): AsyncIterable; + /** + * Fetches all base NFTs for a given contract address and yields them in an + * async iterable. + * + * This method returns the base NFTs that omit the associated metadata and + * pages through all page keys until all NFTs have been fetched. To get all + * NFTs with their associated metadata, use {@link GetNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftsForContractIterator(contractAddress: string, options?: GetBaseNftsForContractOptions): AsyncIterable; + /** + * Gets all the owners for a given NFT contract along with the token balance. + * + * @param contractAddress - The NFT contract to get the owners for. + * @param options Optional parameters to use for the request. + * @public + */ + getOwnersForContract(contractAddress: string, options: GetOwnersForContractWithTokenBalancesOptions): Promise; + /** + * Gets all the owners for a given NFT contract. + * + * Note that token balances are omitted by default. To include token balances + * for each owner, use {@link GetOwnersForContractWithTokenBalancesOptions}, + * which has the `withTokenBalances` field set to `true`. + * + * @param contractAddress - The NFT contract to get the owners for. + * @param options Optional parameters to use for the request. + * @public + */ + getOwnersForContract(contractAddress: string, options?: GetOwnersForContractOptions): Promise; + /** + * Gets all the owners for a given NFT contract address and token ID. + * + * @param contractAddress - The NFT contract address. + * @param tokenId - Token id of the NFT. + * @beta + */ + getOwnersForNft(contractAddress: string, tokenId: BigNumberish): Promise; + /** + * Gets all NFT contracts held by the specified owner address. + * + * @param owner - Address for NFT owner (can be in ENS format!). + * @param options - The optional parameters to use for the request. + * @public + */ + getContractsForOwner(owner: string, options?: GetContractsForOwnerOptions): Promise; + /** + * DEPRECATED - Checks that the provided owner address owns one of more of the + * provided NFTs. + * + * @deprecated - Use {@link verifyNftOwnership} instead. This method will be + * removed in a future release. + * @param owner - The owner address to check. + * @param contractAddresses - An array of NFT contract addresses to check ownership for. + */ + checkNftOwnership(owner: string, contractAddresses: string[]): Promise; + /** + * Checks that the provided owner address owns one of more of the provided + * NFT. Returns a boolean indicating whether the owner address owns the provided NFT. + * + * @param owner - The owner address to check. + * @param contractAddress - An NFT contract address to check ownership for. + */ + verifyNftOwnership(owner: string, contractAddress: string): Promise; + /** + * Checks which of the provided NFTs the owner address owns. Returns a map of + * contract address to a boolean indicating whether the owner address owns the NFT. + * + * @param owner - The owner address to check. + * @param contractAddresses - An array NFT contract address to check ownership for. + */ + verifyNftOwnership(owner: string, contractAddresses: string[]): Promise<{ + [contractAddress: string]: boolean; + }>; + /** + * Returns whether a contract is marked as spam or not by Alchemy. For more + * information on how we classify spam, go to our NFT API FAQ at + * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification. + * + * @param contractAddress - The contract address to check. + * @beta + */ + isSpamContract(contractAddress: string): Promise; + /** + * Returns a list of all spam contracts marked by Alchemy. For details on how + * Alchemy marks spam contracts, go to + * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification. + * + * @beta + */ + getSpamContracts(): Promise; + /** + * Returns the floor prices of a NFT contract by marketplace. + * + * @param contractAddress - The contract address for the NFT collection. + * @beta + */ + getFloorPrice(contractAddress: string): Promise; + /** + * Returns NFT sales that have happened through on-chain marketplaces. + * + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftSales(options?: GetNftSalesOptions): Promise; + getNftSales(options?: GetNftSalesOptionsByContractAddress): Promise; + /** + * Get the rarity of each attribute of an NFT. + * + * @param contractAddress - Contract address for the NFT collection. + * @param tokenId - Token id of the NFT. + */ + computeRarity(contractAddress: string, tokenId: BigNumberish): Promise; + /** + * Search for a keyword across metadata of all ERC-721 and ERC-1155 smart contracts. + * + * @param query - The search string that you want to search for in contract metadata. + */ + searchContractMetadata(query: string): Promise; + /** + * Get a summary of attribute prevalence for an NFT collection. + * + * @param contractAddress - Contract address for the NFT collection. + */ + summarizeNftAttributes(contractAddress: string): Promise; + /** + * Refreshes the cached metadata for a provided NFT contract address and token + * id. Returns a boolean value indicating whether the metadata was refreshed. + * + * This method is useful when you want to refresh the metadata for a NFT that + * has been updated since the last time it was fetched. Note that the backend + * only allows one refresh per token every 15 minutes, globally for all users. + * The last refresh time for an NFT can be accessed on the + * {@link Nft.timeLastUpdated} field. + * + * To trigger a refresh for all NFTs in a contract, use {@link refreshContract} instead. + * + * @param contractAddress - The contract address of the NFT. + * @param tokenId - The token id of the NFT. + */ + refreshNftMetadata(contractAddress: string, tokenId: BigNumberish): Promise; + /** + * Triggers a metadata refresh all NFTs in the provided contract address. This + * method is useful after an NFT collection is revealed. + * + * Refreshes are queued on the Alchemy backend and may take time to fully + * process. To refresh the metadata for a specific token, use the + * {@link refreshNftMetadata} method instead. + * + * @param contractAddress - The contract address of the NFT collection. + * @beta + */ + refreshContract(contractAddress: string): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/es/src/api/nft.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/api/nft.d.ts new file mode 100644 index 0000000..b51d2bd --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/api/nft.d.ts @@ -0,0 +1,86 @@ +import { Media, NftMetadata, NftTokenType, OpenSeaCollectionMetadata, SpamInfo, TokenUri } from '../types/types'; +/** + * Alchemy representation of a base NFT contract that doesn't contain metadata. + * + * The BaseNftContract does not hold any metadata information and only contains + * the address. The NftContract additionally contains the tokenType, name, + * symbol, and more. + * + * @public + */ +export interface BaseNftContract { + /** The address of the contract. */ + address: string; +} +/** + * Alchemy representation of an NFT contract. + * + * The BaseNftContract does not hold any metadata information and only contains + * the address. The NftContract additionally contains the tokenType, name, + * symbol, and more. + * + * @public + */ +export interface NftContract extends BaseNftContract { + /** The type of the token in the contract. */ + tokenType: NftTokenType; + /** The name of the contract. */ + name?: string; + /** The symbol of the contract. */ + symbol?: string; + /** + * The number of NFTs in the contract as an integer string. This field is only + * available on ERC-721 contracts. + */ + totalSupply?: string; + /** OpenSea's metadata for the contract. */ + openSea?: OpenSeaCollectionMetadata; +} +/** + * Alchemy representation of an NFT that doesn't contain metadata. + * + * The BaseNft object does not hold any metadata information and only contains + * the NFT contract and token ID. The Nft object additionally contains the NFT + * metadata, token URI information, and media. + * + * @public + */ +export interface BaseNft { + contract: BaseNftContract; + /** The NFT token ID as an integer string. */ + tokenId: string; + /** The type of ERC token, if known. */ + tokenType: NftTokenType; +} +/** + * Alchemy representation of an NFT. + * + * The BaseNft object does not hold any metadata information and only contains + * the NFT contract and token ID. The Nft object additionally contains the NFT + * metadata, token URI information, and media. + * + * @public + */ +export interface Nft extends BaseNft { + /** The NFT's underlying contract and relevant contract metadata. */ + contract: NftContract; + /** The NFT title. */ + title: string; + /** The NFT description. */ + description: string; + /** When the NFT was last updated in the blockchain. Represented in ISO-8601 format. */ + timeLastUpdated: string; + /** Holds an error message if there was an issue fetching metadata. */ + metadataError: string | undefined; + /** + * The raw metadata fetched from the metadata URL specified by the NFT. The + * field is undefined if Alchemy was unable to fetch metadata. + */ + rawMetadata: NftMetadata | undefined; + /** URIs for accessing the NFT's metadata blob. */ + tokenUri: TokenUri | undefined; + /** URIs for accessing the NFT's media assets. */ + media: Media[]; + /** Detailed information on why an NFT was classified as spam. */ + spamInfo?: SpamInfo; +} diff --git a/test/node_modules/alchemy-sdk/dist/es/src/api/notify-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/api/notify-namespace.d.ts new file mode 100644 index 0000000..c70f03d --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/api/notify-namespace.d.ts @@ -0,0 +1,143 @@ +import { AddressActivityResponse, AddressActivityWebhook, AddressWebhookParams, AddressWebhookUpdate, DroppedTransactionWebhook, GetAddressesOptions, GetAllWebhooksResponse, MinedTransactionWebhook, NftActivityWebhook, NftFiltersResponse, NftWebhookParams, NftWebhookUpdate, TransactionWebhookParams, Webhook, WebhookType } from '../types/types'; +/** + * The Notify namespace contains methods used for creating, reading, updating, + * and deleting webhooks in the Notify API. + * + * To use the methods in the API, you must provide your team's auth token in the + * {@link AlchemySettings.authToken} field when configuring + * {@link AlchemySettings}. The auth token can be found in the Alchemy Dashboard + * on the Notify tab. + * + * Note that not all networks are supported in the Notify API. Please consult + * the documentation for which networks are supported. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the notify + * namespace via `alchemy.notify`. + */ +export declare class NotifyNamespace { + private readonly config; + /** + * Get all webhooks on your team. + * + * The team is determined by the `authToken` provided into the {@link AlchemySettings} + * object when creating a new {@link Alchemy} instance. + * + * This method returns a response object containing all the webhooks + */ + getAllWebhooks(): Promise; + /** + * Get all addresses tracked for the provided {@link AddressActivityWebhook}. + * + * @param addressWebhook The Address Activity webhook. + * @param options Pagination options when fetching addresses. + */ + getAddresses(addressWebhook: AddressActivityWebhook, options?: GetAddressesOptions): Promise; + /** + * Get all addresses tracked for the provided {@link AddressActivityWebhook}. + * + * @param webhookId The id of the address activity webhook. Passing in an id + * of a non-address-activity webhook will result in a response object with + * no addresses. + * @param options Pagination options when fetching addresses. + */ + getAddresses(webhookId: string, options?: GetAddressesOptions): Promise; + /** + * Get all NFTs tracked for the provided {@link NftActivityWebhook}. + * + * @param nftWebhook The NFT Activity webhook. + * @param options Pagination options when fetching NFT filters. + */ + getNftFilters(nftWebhook: NftActivityWebhook, options?: GetAddressesOptions): Promise; + /** + * Get all NFT filters tracked for the provided {@link NftActivityWebhook}. + * + * @param webhookId The id of the NFT activity webhook. Passing in an + * incorrect id of a non-NFT webhook will result in a response object with + * no filters. + * @param options Pagination options when fetching nft filters. + */ + getNftFilters(webhookId: string, options?: GetAddressesOptions): Promise; + /** + * Update a {@link NftActivityWebhook}'s active status or NFT filters. + * + * @param nftWebhook The NFT activity webhook to update. + * @param update Object containing the update. + */ + updateWebhook(nftWebhook: NftActivityWebhook, update: NftWebhookUpdate): Promise; + /** + * Update a {@link NftActivityWebhook}'s active status or NFT filters. + * + * @param nftWebhookId The id of the NFT activity webhook. + * @param update Object containing the update. + */ + updateWebhook(nftWebhookId: string, update: NftWebhookUpdate): Promise; + /** + * Update a {@link AddressActivityWebhook}'s active status or addresses. + * + * @param addressWebhook The address activity webhook to update. + * @param update Object containing the update. + */ + updateWebhook(addressWebhook: AddressActivityWebhook, update: AddressWebhookUpdate): Promise; + /** + * Update a {@link AddressActivityWebhook}'s active status or addresses. + * + * @param addressWebhookId The id of the address activity webhook. + * @param update Object containing the update. + */ + updateWebhook(addressWebhookId: string, update: AddressWebhookUpdate): Promise; + /** + * Create a new {@link MinedTransactionWebhook} to track mined transactions + * sent by the app associated with the app id. + * + * Note that the webhook will be created in the app network of the provided app id. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the app id. + */ + createWebhook(url: string, type: WebhookType.MINED_TRANSACTION, params: TransactionWebhookParams): Promise; + /** + * Create a new {@link DroppedTransactionWebhook} to track dropped transactions + * sent by the app associated with the app id. + * + * Note that the webhook will be created in the app network of the provided app id. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the app id. + */ + createWebhook(url: string, type: WebhookType.DROPPED_TRANSACTION, params: TransactionWebhookParams): Promise; + /** + * Create a new {@link NftActivityWebhook} to track NFT transfers. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the NFTs to track and the + * network the webhook should be created on. + */ + createWebhook(url: string, type: WebhookType.NFT_ACTIVITY, params: NftWebhookParams): Promise; + /** + * Create a new {@link AddressActivityWebhook} to track address activity. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the addresses to track and the + * network the webhook should be created on. + */ + createWebhook(url: string, type: WebhookType.ADDRESS_ACTIVITY, params: AddressWebhookParams): Promise; + /** + * Delete the provided webhook. + * + * @param webhook The webhook to delete. + */ + deleteWebhook(webhook: Webhook): Promise; + /** + * Delete the provided webhook. + * + * @param webhookId The id of the webhook to delete. + */ + deleteWebhook(webhookId: string): Promise; + private verifyConfig; + private sendWebhookRequest; +} diff --git a/test/node_modules/alchemy-sdk/dist/es/src/api/transact-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/api/transact-namespace.d.ts new file mode 100644 index 0000000..85525ad --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/api/transact-namespace.d.ts @@ -0,0 +1,105 @@ +import { TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; +import type { BigNumber } from '@ethersproject/bignumber'; +import { Deferrable } from '@ethersproject/properties'; +import { SendPrivateTransactionOptions } from '../types/types'; +/** + * The Transact namespace contains methods used for sending transactions and + * checking on the state of submitted transactions. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the transact + * namespace via `alchemy.transact`. + */ +export declare class TransactNamespace { + private readonly config; + /** + * Used to send a single transaction to Flashbots. Flashbots will attempt to + * send the transaction to miners for the next 25 blocks. + * + * Returns the transaction hash of the submitted transaction. + * + * @param signedTransaction The raw, signed transaction as a hash. + * @param maxBlockNumber Optional highest block number in which the + * transaction should be included. + * @param options Options to configure the request. + */ + sendPrivateTransaction(signedTransaction: string, maxBlockNumber?: number, options?: SendPrivateTransactionOptions): Promise; + /** + * Stops the provided private transaction from being submitted for future + * blocks. A transaction can only be cancelled if the request is signed by the + * same key as the {@link sendPrivateTransaction} call submitting the + * transaction in first place. + * + * Please note that fast mode transactions cannot be cancelled using this method. + * + * Returns a boolean indicating whether the cancellation was successful. + * + * @param transactionHash Transaction hash of private tx to be cancelled + */ + cancelPrivateTransaction(transactionHash: string): Promise; + /** + * Returns the transaction with hash or null if the transaction is unknown. + * + * If a transaction has not been mined, this method will search the + * transaction pool. Various backends may have more restrictive transaction + * pool access (e.g. if the gas price is too low or the transaction was only + * recently sent and not yet indexed) in which case this method may also return null. + * + * NOTE: This is an alias for {@link CoreNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransaction(transactionHash: string | Promise): Promise; + /** + * Submits transaction to the network to be mined. The transaction must be + * signed, and be valid (i.e. the nonce is correct and the account has + * sufficient balance to pay for the transaction). + * + * NOTE: This is an alias for {@link CoreNamespace.sendTransaction}. + * + * @param signedTransaction The signed transaction to send. + * @public + */ + sendTransaction(signedTransaction: string | Promise): Promise; + /** + * Returns an estimate of the amount of gas that would be required to submit + * transaction to the network. + * + * An estimate may not be accurate since there could be another transaction on + * the network that was not accounted for, but after being mined affects the + * relevant state. + * + * This is an alias for {@link CoreNamespace.estimateGas}. + * + * @param transaction The transaction to estimate gas for. + * @public + */ + estimateGas(transaction: Deferrable): Promise; + /** + * Returns a fee per gas (in wei) that is an estimate of how much you can pay + * as a priority fee, or "tip", to get a transaction included in the current block. + * + * This number is generally used to set the `maxPriorityFeePerGas` field in a + * transaction request. + * + * @public + */ + getMaxPriorityFeePerGas(): Promise; + /** + * Returns a promise which will not resolve until specified transaction hash is mined. + * + * If {@link confirmations} is 0, this method is non-blocking and if the + * transaction has not been mined returns null. Otherwise, this method will + * block until the transaction has confirmed blocks mined on top of the block + * in which it was mined. + * + * NOTE: This is an alias for {@link CoreNamespace.waitForTransaction}. + * + * @param transactionHash The hash of the transaction to wait for. + * @param confirmations The number of blocks to wait for. + * @param timeout The maximum time to wait for the transaction to confirm. + * @public + */ + waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/es/src/api/util.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/api/util.d.ts new file mode 100644 index 0000000..10ac7c3 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/api/util.d.ts @@ -0,0 +1,21 @@ +/** + * Converts a hex string to a decimal number. + * + * @param hexString - The hex string to convert. + * @public + */ +export declare function fromHex(hexString: string): number; +/** + * Converts a number to a hex string. + * + * @param num - The number to convert to hex. + * @public + */ +export declare function toHex(num: number): string; +/** + * Checks if a value is a hex string. + * + * @param possibleHexString - The value to check. + * @public + */ +export declare function isHex(possibleHexString: string): boolean; diff --git a/test/node_modules/alchemy-sdk/dist/es/src/api/utils.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/api/utils.d.ts new file mode 100644 index 0000000..2582187 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/api/utils.d.ts @@ -0,0 +1,5 @@ +export { dnsEncode, hashMessage, id, isValidName, namehash } from '@ethersproject/hash'; +export { arrayify, concat, hexConcat, hexDataSlice, hexDataLength, hexlify, hexStripZeros, hexValue, hexZeroPad, isBytes, isBytesLike, isHexString, joinSignature, zeroPad, splitSignature, stripZeros } from '@ethersproject/bytes'; +export { formatEther, parseEther, parseUnits, formatUnits } from '@ethersproject/units'; +export { toUtf8Bytes, toUtf8String } from '@ethersproject/strings'; +export { Interface } from '@ethersproject/abi'; diff --git a/test/node_modules/alchemy-sdk/dist/es/src/api/websocket-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/api/websocket-namespace.d.ts new file mode 100644 index 0000000..7c179bc --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/api/websocket-namespace.d.ts @@ -0,0 +1,67 @@ +import type { Listener } from '@ethersproject/abstract-provider'; +import { AlchemyEventType } from '../types/types'; +/** + * The Websocket namespace contains all subscription related functions that + * allow you to subscribe to events and receive updates as they occur. The + * underlying WebSocket provider has additional logic to handle reconnections + * and automatically backfills missed events. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.ws`. + */ +export declare class WebSocketNamespace { + private readonly config; + /** + * Adds a listener to be triggered for each {@link eventName} event. Also + * includes Alchemy's Subscription API events. See {@link AlchemyEventType} for + * how to use them. + * + * @param eventName The event to listen for. + * @param listener The listener to call when the event is triggered. + * @public + */ + on(eventName: AlchemyEventType, listener: Listener): this; + /** + * Adds a listener to be triggered for only the next {@link eventName} event, + * after which it will be removed. Also includes Alchemy's Subscription API + * events. See {@link AlchemyEventType} for how to use them. + * + * @param eventName The event to listen for. + * @param listener The listener to call when the event is triggered. + * @public + */ + once(eventName: AlchemyEventType, listener: Listener): this; + /** + * Removes the provided {@link listener} for the {@link eventName} event. If no + * listener is provided, all listeners for the event will be removed. + * + * @param eventName The event to unlisten to. + * @param listener The listener to remove. + * @public + */ + off(eventName: AlchemyEventType, listener?: Listener): this; + /** + * Remove all listeners for the provided {@link eventName} event. If no event + * is provided, all events and their listeners are removed. + * + * @param eventName The event to remove all listeners for. + * @public + */ + removeAllListeners(eventName?: AlchemyEventType): this; + /** + * Returns the number of listeners for the provided {@link eventName} event. If + * no event is provided, the total number of listeners for all events is returned. + * + * @param eventName The event to get the number of listeners for. + * @public + */ + listenerCount(eventName?: AlchemyEventType): Promise; + /** + * Returns an array of listeners for the provided {@link eventName} event. If + * no event is provided, all listeners will be included. + * + * @param eventName The event to get the listeners for. + */ + listeners(eventName?: AlchemyEventType): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/es/src/index.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/index.d.ts new file mode 100644 index 0000000..a5d9de9 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/index.d.ts @@ -0,0 +1,18 @@ +/** This is the main entry point for the library and exports user-facing API. */ +import * as Utils from './api/utils'; +export { Utils }; +export * from './types/types'; +export { Alchemy } from './api/alchemy'; +export { Wallet } from './api/alchemy-wallet'; +export { Contract, ContractFactory } from './api/alchemy-contract'; +export type { AlchemyConfig } from './api/alchemy-config'; +export type { AlchemyProvider } from './api/alchemy-provider'; +export type { AlchemyWebSocketProvider } from './api/alchemy-websocket-provider'; +export type { NftNamespace } from './api/nft-namespace'; +export type { WebSocketNamespace } from './api/websocket-namespace'; +export type { CoreNamespace } from './api/core-namespace'; +export type { TransactNamespace } from './api/transact-namespace'; +export type { NotifyNamespace } from './api/notify-namespace'; +export type { BaseNftContract, NftContract, Nft, BaseNft } from './api/nft'; +export { fromHex, toHex, isHex } from './api/util'; +export { setLogLevel, LogLevelString as LogLevel } from './util/logger'; diff --git a/test/node_modules/alchemy-sdk/dist/es/src/internal/backoff.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/internal/backoff.d.ts new file mode 100644 index 0000000..ed9cad8 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/internal/backoff.d.ts @@ -0,0 +1,4 @@ +export declare const DEFAULT_BACKOFF_INITIAL_DELAY_MS = 1000; +export declare const DEFAULT_BACKOFF_MULTIPLIER = 1.5; +export declare const DEFAULT_BACKOFF_MAX_DELAY_MS: number; +export declare const DEFAULT_BACKOFF_MAX_ATTEMPTS = 5; diff --git a/test/node_modules/alchemy-sdk/dist/es/src/internal/dispatch.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/internal/dispatch.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/internal/dispatch.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/src/internal/ethers-event.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/internal/ethers-event.d.ts new file mode 100644 index 0000000..0676f4c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/internal/ethers-event.d.ts @@ -0,0 +1,60 @@ +import { EventType, Filter, Listener } from '@ethersproject/abstract-provider'; +import { AlchemyEventFilter, AlchemyEventType, AlchemyMinedTransactionsAddress, AlchemyMinedTransactionsEventFilter, AlchemyPendingTransactionsEventFilter, NonEmptyArray } from '../types/types'; +/** + * DO NOT MODIFY. + * + * Event class copied directly over from ethers.js's `BaseProvider` class. + * + * This class is used to represent events and their corresponding listeners. The + * SDK needs to extend this class in order to support Alchemy's custom + * Subscription API types. The original class is not exported by ethers. Minimal + * changes have been made in order to get TS to compile. + */ +declare class Event { + readonly listener: Listener; + readonly once: boolean; + readonly tag: string; + _lastBlockNumber: number; + _inflight: boolean; + constructor(tag: string, listener: Listener, once: boolean); + get event(): EventType; + get type(): string; + get hash(): string; + get filter(): Filter; + pollable(): boolean; +} +/** + * Wrapper class around the ethers `Event` class in order to add support for + * Alchemy's custom subscriptions types. + * + * The serialization and deserialization mechanism requires the order of the + * fields to be the same across different {@link ALCHEMY_EVENT_TYPES}. Before + * using a getter on a new event filter, make sure that the position of the + * field in serialization is correct. + * + * The getters on this class deserialize the event tag generated by + * {@link getAlchemyEventTag} into the original fields passed into the event. + */ +export declare class EthersEvent extends Event { + /** + * Converts the event tag into the original `fromAddress` field in + * {@link AlchemyPendingTransactionsEventFilter}. + */ + get fromAddress(): string | string[] | undefined; + /** + * Converts the event tag into the original `toAddress` field in + * {@link AlchemyPendingTransactionsEventFilter}. + */ + get toAddress(): string | string[] | undefined; + /** + * Converts the event tag into the original `hashesOnly` field in + * {@link AlchemyPendingTransactionsEventFilter} and {@link AlchemyMinedTransactionsEventFilter}. + */ + get hashesOnly(): boolean | undefined; + get includeRemoved(): boolean | undefined; + get addresses(): NonEmptyArray | undefined; +} +export declare function isAlchemyEvent(event: AlchemyEventType): event is AlchemyMinedTransactionsEventFilter | AlchemyPendingTransactionsEventFilter; +export declare function verifyAlchemyEventName(eventName: AlchemyEventFilter): void; +export declare function deserializeTopics(data: string): any; +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/src/internal/internal-types.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/internal/internal-types.d.ts new file mode 100644 index 0000000..48cbe2f --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/internal/internal-types.d.ts @@ -0,0 +1,48 @@ +/** This file contains internal types used by the SDK and are not exposed to the end user. */ +declare type JsonRpcId = string | number | null; +/** + * Prefix for `alchemy_pendingTransactions` subscriptions when serializing to + * ethers events. + * + * This tag is used internally by ethers to track different event filters. + */ +export declare const ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE = "alchemy-pending-transactions"; +/** + * Prefix for `alchemy_minedTransactions` subscriptions when serializing to ethers events. + * + * This tag is used internally by ethers to track different event filters. + */ +export declare const ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE = "alchemy-mined-transactions"; +/** + * Array containing all the custom event tags used internally by ethers to track + * event filters. + */ +export declare const ALCHEMY_EVENT_TYPES: string[]; +export interface JsonRpcRequest { + jsonrpc: '2.0'; + method: string; + params?: any[]; + id?: JsonRpcId; +} +export interface JsonRpcResponse { + jsonrpc: '2.0'; + result?: T; + error?: JsonRpcError; + id: JsonRpcId; +} +interface JsonRpcError { + code: number; + message: string; + data?: T; +} +export declare type WebSocketMessage = SingleOrBatchResponse | SubscriptionEvent; +export declare type SingleOrBatchResponse = JsonRpcResponse | JsonRpcResponse[]; +export interface SubscriptionEvent { + jsonrpc: '2.0'; + method: 'eth_subscription'; + params: { + subscription: string; + result: T; + }; +} +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/src/internal/nft-api.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/internal/nft-api.d.ts new file mode 100644 index 0000000..8eaf6e1 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/internal/nft-api.d.ts @@ -0,0 +1,27 @@ +import { BigNumberish } from '@ethersproject/bignumber'; +import { AlchemyConfig } from '../api/alchemy-config'; +import { BaseNft, Nft, NftContract } from '../api/nft'; +import { GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftResponse, NftAttributeRarity, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, NftTokenType, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult } from '../types/types'; +export declare function getNftMetadata(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, tokenType?: NftTokenType, tokenUriTimeoutInMs?: number, srcMethod?: string): Promise; +export declare function getNftMetadataBatch(config: AlchemyConfig, tokens: Array, options?: NftMetadataBatchOptions): Promise; +export declare function getContractMetadata(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function getNftsForOwnerIterator(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): AsyncIterable; +export declare function getNftsForOwner(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): Promise; +export declare function getNftsForContract(config: AlchemyConfig, contractAddress: string, options?: GetBaseNftsForContractOptions | GetNftsForContractOptions, srcMethod?: string): Promise; +export declare function getNftsForContractIterator(config: AlchemyConfig, contractAddress: string, options?: GetBaseNftsForContractOptions | GetNftsForContractOptions, srcMethod?: string): AsyncIterable; +export declare function getOwnersForContract(config: AlchemyConfig, contractAddress: string, options?: GetOwnersForContractWithTokenBalancesOptions | GetOwnersForContractOptions, srcMethod?: string): Promise; +export declare function getContractsForOwner(config: AlchemyConfig, owner: string, options?: GetContractsForOwnerOptions, srcMethod?: string): Promise; +export declare function getOwnersForNft(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, srcMethod?: string): Promise; +export declare function checkNftOwnership(config: AlchemyConfig, owner: string, contractAddresses: string[], srcMethod?: string): Promise; +export declare function verifyNftOwnership(config: AlchemyConfig, owner: string, contractAddresses: string | string[], srcMethod?: string): Promise; +export declare function isSpamContract(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function getSpamContracts(config: AlchemyConfig, srcMethod?: string): Promise; +export declare function getFloorPrice(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function getNftSales(config: AlchemyConfig, options?: GetNftSalesOptions | GetNftSalesOptionsByContractAddress, srcMethod?: string): Promise; +export declare function computeRarity(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, srcMethod?: string): Promise; +export declare function searchContractMetadata(config: AlchemyConfig, query: string, srcMethod?: string): Promise; +export declare function summarizeNftAttributes(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function refreshNftMetadata(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, srcMethod?: string): Promise; +export declare function refreshContract(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; diff --git a/test/node_modules/alchemy-sdk/dist/es/src/internal/raw-interfaces.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/internal/raw-interfaces.d.ts new file mode 100644 index 0000000..0b85271 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/internal/raw-interfaces.d.ts @@ -0,0 +1,113 @@ +import { Media, NftSaleFeeData, NftSpamClassification } from '../types/types'; +export interface RawSpamInfo { + isSpam: string; + /** A list of reasons why an NFT contract was marked as spam. */ + classifications: NftSpamClassification[]; +} +/** OpenSea's metadata for an NFT collection. */ +export interface RawOpenSeaCollectionMetadata { + floorPrice?: number; + collectionName?: string; + safelistRequestStatus?: string; + imageUrl?: string; + description?: string; + externalUrl?: string; + twitterUsername?: string; + discordUrl?: string; + lastIngestedAt?: string; +} +export interface RawGetOwnersForContractWithTokenBalancesResponse { + ownerAddresses: RawOwnerAddress[]; + pageKey?: string; +} +export interface RawOwnerAddress { + ownerAddress: string; + tokenBalances: RawTokenBalances[]; +} +export interface RawTokenBalances { + tokenId: string; + balance: number; +} +export interface RawReingestContractResponse { + contractAddress: string; + reingestionState: string; + progress: string | null; +} +export interface RawWebhook { + id: string; + network: string; + webhook_type: string; + webhook_url: string; + is_active: boolean; + time_created: number; + signing_key: string; + version: string; + app_id?: string; +} +export interface RawWebhookPagination { + cursors: { + after?: string; + }; + total_count: number; +} +export interface RawGetAllWebhooksResponse { + data: RawWebhook[]; +} +export interface RawAddressActivityResponse { + data: string[]; + pagination: RawWebhookPagination; +} +export interface RawNftFilter { + contract_address: string; + token_id: string; +} +export interface RawNftFiltersResponse { + data: RawNftFilter[]; + pagination: RawWebhookPagination; +} +export interface RawCreateWebhookResponse { + data: RawWebhook; +} +export interface RawNftFilterParam { + contract_address: string; + token_id: string; +} +export interface RawNftAttributeRarity { + value: string; + trait_type: string; + prevalence: number; +} +export interface RawGetNftSalesResponse { + pageKey?: string; + nftSales: RawNftSale[]; +} +export interface RawNftSale { + marketplace: string; + contractAddress: string; + tokenId: string; + quantity: string; + buyerAddress: string; + sellerAddress: string; + taker: string; + sellerFee: NftSaleFeeData; + marketplaceFee?: NftSaleFeeData; + royaltyFee?: NftSaleFeeData; + blockNumber: number; + logIndex: number; + bundleIndex: number; + transactionHash: string; +} +export interface RawGetContractsForOwnerResponse { + contracts: RawContractForOwner[]; + pageKey?: string; + totalCount: number; +} +export interface RawContractForOwner extends Omit { + address: string; + totalBalance: number; + numDistinctTokensOwned: number; + isSpam: boolean; + tokenId: string; + media: Media; + opensea?: RawOpenSeaCollectionMetadata; +} diff --git a/test/node_modules/alchemy-sdk/dist/es/src/internal/request-batcher.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/internal/request-batcher.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/internal/request-batcher.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/src/internal/websocket-backfiller.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/internal/websocket-backfiller.d.ts new file mode 100644 index 0000000..63730de --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/internal/websocket-backfiller.d.ts @@ -0,0 +1,53 @@ +export interface BatchPart { + method: string; + params?: any; +} +export interface NewHeadsEvent { + author: string; + difficulty: string; + extraData: string; + gasLimit: string; + gasUsed: string; + hash: string; + logsBloom: string; + miner: string; + mixHash: string; + nonce: string; + number: string; + parentHash: string; + receiptsRoot: string; + sealFields: string[]; + sha3Uncles: string; + size: string; + stateRoot: string; + timestamp: string; + transactionsRoot: string; +} +/** The return type of eth_getBlocksByHash. */ +export interface BlockHead extends NewHeadsEvent { + totalDifficulty: string; + transactions: any[]; + uncles: string[]; +} +export interface LogsEvent { + address: string; + blockHash: string; + blockNumber: string; + data: string; + logIndex: string; + topics: string[]; + transactionHash: string; + transactionIndex: string; + removed?: boolean; +} +export interface LogsSubscriptionFilter { + address?: string | string[]; + topics?: Array; +} +export interface GetLogsOptions extends LogsSubscriptionFilter { + fromBlock?: string; + toBlock?: string; +} +export declare function dedupeNewHeads(events: NewHeadsEvent[]): NewHeadsEvent[]; +export declare function dedupeLogs(events: LogsEvent[]): LogsEvent[]; +export declare function throwIfCancelled(isCancelled: () => boolean): void; diff --git a/test/node_modules/alchemy-sdk/dist/es/src/types/types.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/types/types.d.ts new file mode 100644 index 0000000..ed47247 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/types/types.d.ts @@ -0,0 +1,1523 @@ +import { EventType, TransactionReceipt } from '@ethersproject/abstract-provider'; +import { BigNumberish } from '@ethersproject/bignumber'; +import { BaseNft, Nft, NftContract } from '../api/nft'; +/** + * Options object used to configure the Alchemy SDK. + * + * @public + */ +export interface AlchemySettings { + /** + * The Alchemy API key that can be found in the Alchemy dashboard. + * + * Defaults to: "demo" (a rate-limited public API key) + */ + apiKey?: string; + /** + * The name of the network. Once configured, the network cannot be changed. To + * use a different network, instantiate a new `Alchemy` instance. + * + * Defaults to: Network.ETH_MAINNET + */ + network?: Network; + /** The maximum number of retries to attempt if a request fails. Defaults to 5. */ + maxRetries?: number; + /** + * Optional URL endpoint to use for all requests. Setting this field will + * override the URL generated by the {@link network} and {@link apiKey} fields. + * + * This field is useful for testing or for using a custom node endpoint. Note + * that not all methods will work with custom URLs. + */ + url?: string; + /** + * Alchemy auth token required to use the Notify API. This token can be found + * in the Alchemy Dashboard on the Notify tab. + */ + authToken?: string; + /** + * Optional setting that automatically batches and sends json-rpc requests for + * higher throughput and reduced network IO. Defaults to false. + * + * This implementation is based on the `JsonRpcBatchProvider` in ethers. + */ + batchRequests?: boolean; +} +/** + * The supported networks by Alchemy. Note that some functions are not available + * on all networks. Please refer to the Alchemy documentation for which APIs are + * available on which networks + * {@link https://docs.alchemy.com/alchemy/apis/feature-support-by-chain} + * + * @public + */ +export declare enum Network { + ETH_MAINNET = "eth-mainnet", + /** @deprecated - Will be removed in subsequent versions */ + ETH_ROPSTEN = "eth-ropsten", + ETH_GOERLI = "eth-goerli", + /** @deprecated - Will be removed in subsequent versions */ + ETH_KOVAN = "eth-kovan", + /** @deprecated - Will be removed in subsequent versions */ + ETH_RINKEBY = "eth-rinkeby", + OPT_MAINNET = "opt-mainnet", + /** @deprecated - Will be removed in subsequent versions */ + OPT_KOVAN = "opt-kovan", + OPT_GOERLI = "opt-goerli", + ARB_MAINNET = "arb-mainnet", + /** @deprecated - Will be removed in subsequent versions */ + ARB_RINKEBY = "arb-rinkeby", + ARB_GOERLI = "arb-goerli", + MATIC_MAINNET = "polygon-mainnet", + MATIC_MUMBAI = "polygon-mumbai", + ASTAR_MAINNET = "astar-mainnet" +} +/** Token Types for the `getTokenBalances()` endpoint. */ +export declare enum TokenBalanceType { + /** + * Option to fetch the top 100 tokens by 24-hour volume. This option is only + * available on Mainnet in Ethereum, Polygon, and Arbitrum. + */ + DEFAULT_TOKENS = "DEFAULT_TOKENS", + /** + * Option to fetch the set of ERC-20 tokens that the address as ever held. his + * list is produced by an address's historical transfer activity and includes + * all tokens that the address has ever received. + */ + ERC20 = "erc20" +} +/** + * Optional params to pass into `getTokenBalances()` to fetch all ERC-20 tokens + * instead of passing in an array of contract addresses to fetch balances for. + */ +export interface TokenBalancesOptionsErc20 { + /** The ERC-20 token type. */ + type: TokenBalanceType.ERC20; + /** Optional page key for pagination (only applicable to TokenBalanceType.ERC20) */ + pageKey?: string; +} +/** + * Optional params to pass into `getTokenBalances()` to fetch the top 100 tokens + * instead of passing in an array of contract addresses to fetch balances for. + */ +export interface TokenBalancesOptionsDefaultTokens { + /** The top 100 token type. */ + type: TokenBalanceType.DEFAULT_TOKENS; +} +/** + * Response object for when the {@link TokenBalancesOptionsErc20} options are + * used. A page key may be returned if the provided address has many transfers. + */ +export interface TokenBalancesResponseErc20 extends TokenBalancesResponse { + /** + * An optional page key to passed into the next request to fetch the next page + * of token balances. + */ + pageKey?: string; +} +/** @public */ +export interface TokenBalancesResponse { + address: string; + tokenBalances: TokenBalance[]; +} +/** @public */ +export declare type TokenBalance = TokenBalanceSuccess | TokenBalanceFailure; +/** @public */ +export interface TokenBalanceSuccess { + contractAddress: string; + tokenBalance: string; + error: null; +} +/** @public */ +export interface TokenBalanceFailure { + contractAddress: string; + tokenBalance: null; + error: string; +} +/** + * Response object for the {@link CoreNamespace.getTokenMetadata} method. + * + * @public + */ +export interface TokenMetadataResponse { + /** + * The token's name. Is `null` if the name is not defined in the contract and + * not available from other sources. + */ + name: string | null; + /** + * The token's symbol. Is `null` if the symbol is not defined in the contract + * and not available from other sources. + */ + symbol: string | null; + /** + * The number of decimals of the token. Returns `null` if not defined in the + * contract and not available from other sources. + */ + decimals: number | null; + /** URL link to the token's logo. Is `null` if the logo is not available. */ + logo: string | null; +} +/** + * Parameters for the {@link CoreNamespace.getAssetTransfers} method. + * + * @public + */ +export interface AssetTransfersParams { + /** + * The starting block to check for transfers. This value is inclusive and + * defaults to `0x0` if omitted. + */ + fromBlock?: string; + /** + * The ending block to check for transfers. This value is inclusive and + * defaults to the latest block if omitted. + */ + toBlock?: string; + /** + * Whether to return results in ascending or descending order by block number. + * Defaults to ascending if omitted. + */ + order?: SortingOrder; + /** + * The from address to filter transfers by. This value defaults to a wildcard + * for all addresses if omitted. + */ + fromAddress?: string; + /** + * The to address to filter transfers by. This value defaults to a wildcard + * for all address if omitted. + */ + toAddress?: string; + /** + * List of contract addresses to filter for - only applies to "erc20", + * "erc721", "erc1155" transfers. Defaults to all address if omitted. + */ + contractAddresses?: string[]; + /** + * Whether to exclude transfers with zero value. Note that zero value is + * different than null value. Defaults to `false` if omitted. + */ + excludeZeroValue?: boolean; + /** REQUIRED field. An array of categories to get transfers for. */ + category: AssetTransfersCategory[]; + /** The maximum number of results to return per page. Defaults to 1000 if omitted. */ + maxCount?: number; + /** + * Optional page key from an existing {@link OwnedBaseNftsResponse} + * {@link AssetTransfersResult}to use for pagination. + */ + pageKey?: string; + /** + * Whether to include additional metadata about each transfer event. Defaults + * to `false` if omitted. + */ + withMetadata?: boolean; +} +/** + * Parameters for the {@link CoreNamespace.getAssetTransfers} method that + * includes metadata. + * + * @public + */ +export interface AssetTransfersWithMetadataParams extends AssetTransfersParams { + withMetadata: true; +} +/** + * Categories of transfers to use with the {@link AssetTransfersParams} request + * object when using {@link CoreNamespace.getAssetTransfers}. + * + * @public + */ +export declare enum AssetTransfersCategory { + /** + * Top level ETH transactions that occur where the `fromAddress` is an + * external user-created address. External addresses have private keys and are + * accessed by users. + */ + EXTERNAL = "external", + /** + * Top level ETH transactions that occur where the `fromAddress` is an + * internal, smart contract address. For example, a smart contract calling + * another smart contract or sending + */ + INTERNAL = "internal", + /** ERC20 transfers. */ + ERC20 = "erc20", + /** ERC721 transfers. */ + ERC721 = "erc721", + /** ERC1155 transfers. */ + ERC1155 = "erc1155", + /** Special contracts that don't follow ERC 721/1155, (ex: CryptoKitties). */ + SPECIALNFT = "specialnft" +} +/** + * Enum for the order of the {@link AssetTransfersParams} request object when + * using {@link CoreNamespace.getAssetTransfers}. + * + * @deprecated Use {@link SortingOrder} instead. This enum will be removed in a + * future version. + * @public + */ +export declare enum AssetTransfersOrder { + ASCENDING = "asc", + DESCENDING = "desc" +} +/** + * An enum for specifying the token type on NFTs. + * + * @public + */ +export declare enum NftTokenType { + ERC721 = "ERC721", + ERC1155 = "ERC1155", + UNKNOWN = "UNKNOWN" +} +/** + * Response object for the {@link CoreNamespace.getAssetTransfers} method. + * + * @public + */ +export interface AssetTransfersResponse { + transfers: AssetTransfersResult[]; + /** Page key for the next page of results, if one exists. */ + pageKey?: string; +} +/** + * Response object for the {@link CoreNamespace.getAssetTransfers} method when + * the {@link AssetTransfersWithMetadataParams} are used. + * + * @public + */ +export interface AssetTransfersWithMetadataResponse { + transfers: AssetTransfersWithMetadataResult[]; + pageKey?: string; +} +/** + * Represents a transfer event that is returned in a {@link AssetTransfersResponse}. + * + * @public + */ +export interface AssetTransfersResult { + /** The unique ID of the transfer. */ + uniqueId: string; + /** The category of the transfer. */ + category: AssetTransfersCategory; + /** The block number where the transfer occurred. */ + blockNum: string; + /** The from address of the transfer. */ + from: string; + /** The to address of the transfer. */ + to: string | null; + /** + * Converted asset transfer value as a number (raw value divided by contract + * decimal). `null` if ERC721 transfer or contract decimal not available. + */ + value: number | null; + /** + * The raw ERC721 token id of the transfer as a hex string. `null` if not an + * ERC721 transfer. + */ + erc721TokenId: string | null; + /** + * A list of ERC1155 metadata objects if the asset transferred is an ERC1155 + * token. `null` if not an ERC1155 transfer. + */ + erc1155Metadata: ERC1155Metadata[] | null; + /** The token id of the token transferred. */ + tokenId: string | null; + /** + * Returns the token's symbol or ETH for other transfers. `null` if the + * information was not available. + */ + asset: string | null; + /** The transaction hash of the transfer transaction. */ + hash: string; + /** Information about the raw contract of the asset transferred. */ + rawContract: RawContract; +} +/** + * Represents a transfer event that is returned in a + * {@link AssetTransfersResponse} when {@link AssetTransfersWithMetadataParams} are used. + * + * @public + */ +export interface AssetTransfersWithMetadataResult extends AssetTransfersResult { + /** Additional metadata about the transfer event. */ + metadata: AssetTransfersMetadata; +} +/** + * The metadata object for a {@link AssetTransfersResult} when the + * {@link AssetTransfersParams.withMetadata} field is set to true. + * + * @public + */ +export interface AssetTransfersMetadata { + /** Timestamp of the block from which the transaction event originated. */ + blockTimestamp: string; +} +/** + * Represents NFT metadata that holds fields. Note that since there is no + * standard metadata format, the fields are not guaranteed to be present. + * + * @public + */ +export interface NftMetadata extends Record { + /** Name of the NFT asset. */ + name?: string; + /** A human-readable description of the NFT asset. */ + description?: string; + /** URL to the NFT asset image. */ + image?: string; + /** + * The image URL that appears along the top of the NFT asset page. This tends + * to be the highest resolution image. + */ + external_url?: string; + /** Background color of the NFT item. Usually defined as a 6 character hex string. */ + background_color?: string; + /** The traits, attributes, and characteristics for the NFT asset. */ + attributes?: Array>; +} +/** + * Represents the URI information the NFT's metadata. + * + * @public + */ +export interface TokenUri { + /** + * URI for the location of the NFT's original metadata blob (ex: the original + * IPFS link). + */ + raw: string; + /** Public gateway URI for the raw URI. Generally offers better performance. */ + gateway: string; +} +/** + * Represents the URI information for the NFT's media assets. + * + * @public + */ +export interface Media { + /** + * URI for the location of the NFT's original metadata blob for media (ex: the + * original IPFS link). + */ + raw: string; + /** Public gateway URI for the raw URI. Generally offers better performance. */ + gateway: string; + /** URL for a resized thumbnail of the NFT media asset. */ + thumbnail?: string; + /** + * The media format (ex: jpg, gif, png) of the {@link gateway} and + * {@link thumbnail} assets. + */ + format?: string; + /** + * DEPRECATED - The size of the media asset in bytes + * + * @deprecated - Please use {@link bytes} instead. This field will be removed + * in a subsequent release. + */ + size?: number; + /** The size of the media asset in bytes. */ + bytes?: number; +} +/** Potential reasons why an NFT contract was classified as spam. */ +export declare enum NftSpamClassification { + Erc721TooManyOwners = "Erc721TooManyOwners", + Erc721TooManyTokens = "Erc721TooManyTokens", + Erc721DishonestTotalSupply = "Erc721DishonestTotalSupply", + MostlyHoneyPotOwners = "MostlyHoneyPotOwners", + OwnedByMostHoneyPots = "OwnedByMostHoneyPots" +} +/** Detailed information on whether and why an NFT contract was classified as spam. */ +export interface SpamInfo { + isSpam: boolean; + /** A list of reasons why an NFT contract was marked as spam. */ + classifications: NftSpamClassification[]; +} +/** + * Optional parameters object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. + * + * This interface is used to fetch NFTs with their associated metadata. To get + * Nfts without their associated metadata, use {@link GetBaseNftsForOwnerOptions}. + * + * @public + */ +export interface GetNftsForOwnerOptions { + /** + * Optional page key from an existing {@link OwnedBaseNftsResponse} or + * {@link OwnedNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional list of contract addresses to filter the results by. Limit is 20. */ + contractAddresses?: string[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are excluded from the response. + */ + excludeFilters?: NftFilters[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are included in the response. + */ + includeFilters?: NftFilters[]; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; + /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */ + omitMetadata?: boolean; + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; + /** + * Order in which to return results. By default, results are ordered by + * contract address and token ID in lexicographic order. + */ + orderBy?: NftOrdering; +} +/** + * Optional parameters object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. + * + * This interface is used to fetch NFTs without their associated metadata. To + * get Nfts with their associated metadata, use {@link GetNftsForOwnerOptions}. + * + * @public + */ +export interface GetBaseNftsForOwnerOptions { + /** + * Optional page key from an existing {@link OwnedBaseNftsResponse} or + * {@link OwnedNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional list of contract addresses to filter the results by. Limit is 20. */ + contractAddresses?: string[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are excluded from the response. + */ + excludeFilters?: NftFilters[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are included in the response. + */ + includeFilters?: NftFilters[]; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; + /** Optional boolean flag to include NFT metadata. Defaults to `false`. */ + omitMetadata: true; + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; + /** + * Order in which to return results. By default, results are ordered by + * contract address and token ID in lexicographic order. + */ + orderBy?: NftOrdering; +} +/** + * Enum of NFT filters that can be applied to a {@link getNftsForOwner} request. + * NFTs that match one or more of these filters are excluded from the response. + * + * - @deprecated Use {@link NftFilters} instead. This enum will be removed in a + * future version. + * + * @beta + */ +export declare enum NftExcludeFilters { + /** Exclude NFTs that have been classified as spam. */ + SPAM = "SPAM", + /** Exclude NFTs that have been airdropped to a user. */ + AIRDROPS = "AIRDROPS" +} +/** + * Enum of NFT filters that can be applied to a {@link getNftsForOwner} or a + * {@link getContractsForOwner} request. + * + * @beta + */ +export declare enum NftFilters { + /** NFTs that have been classified as spam. */ + SPAM = "SPAM", + /** NFTs that have been airdropped to a user. */ + AIRDROPS = "AIRDROPS" +} +/** + * Enum of ordering that can be applied to a {@link getNftsForOwner} or a + * {@link getContractsForOwner} response. + * + * @beta + */ +export declare enum NftOrdering { + TRANSFERTIME = "TRANSFERTIME" +} +/** + * The response object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. The object contains the NFTs with + * metadata owned by the provided address, along with pagination information and + * the total count. + * + * @public + */ +export interface OwnedNftsResponse { + /** The NFTs owned by the provided address. */ + readonly ownedNfts: OwnedNft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + readonly pageKey?: string; + /** The total count of NFTs owned by the provided address. */ + readonly totalCount: number; +} +/** + * The response object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. The object contains the NFTs + * without metadata owned by the provided address, along with pagination + * information and the total count. + * + * @public + */ +export interface OwnedBaseNftsResponse { + /** The NFTs owned by the provided address. */ + readonly ownedNfts: OwnedBaseNft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + readonly pageKey?: string; + /** The total count of NFTs owned by the provided address. */ + readonly totalCount: number; +} +/** + * Represents an NFT with metadata owned by an address. + * + * @public + */ +export interface OwnedNft extends Nft { + /** The token balance of the NFT. */ + readonly balance: number; +} +/** + * Represents an NFT without metadata owned by an address. + * + * @public + */ +export interface OwnedBaseNft extends BaseNft { + /** The token balance of the NFT. */ + readonly balance: number; +} +/** + * The response object for the {@link getOwnersForNft}. + * + * @public + */ +export interface GetOwnersForNftResponse { + /** An array of owner addresses for the provided token. */ + readonly owners: string[]; +} +/** + * The response object for the {@link getOwnersForContract}. + * + * @public + */ +export interface GetOwnersForContractResponse { + /** An array of owner addresses for the provided contract address */ + owners: string[]; +} +/** + * The response object for the {@link getOwnersForContract}. + * + * @public + */ +export interface GetOwnersForContractWithTokenBalancesResponse { + /** An array of owner addresses for the provided contract address */ + owners: NftContractOwner[]; + /** Optional page key that is returned when a collection has more than 50,000 owners. */ + pageKey?: string; +} +/** + * An object representing the owner of an NFT and its corresponding token + * balances in a {@link GetOwnersForContractWithTokenBalancesResponse} object. + */ +export interface NftContractOwner { + /** The NFT's owner address. */ + ownerAddress: string; + /** A list of objects containing token balances for the provided NFT contract. */ + tokenBalances: NftContractTokenBalance[]; +} +/** + * An object representing the owned token and balance values in a + * {@link GetOwnersForContractWithTokenBalancesResponse} object. + */ +export interface NftContractTokenBalance { + /** The token id owned in the NFT contract. */ + tokenId: string; + /** The token Id balance for the provided owner. */ + balance: number; +} +/** + * Represents an NFT token to fetch metadata for in a + * {@link NftNamespace.getNftMetadataBatch} method. + */ +export interface NftMetadataBatchToken { + /** The NFT contract address. Limited to ERC721 and ERC1155 tokens. */ + contractAddress: string; + /** The id of the NFT. */ + tokenId: BigNumberish; + /** Optional field to specify the type of token to speed up the query. */ + tokenType?: NftTokenType.ERC1155 | NftTokenType.ERC721; +} +/** Additional options for the {@link NftNamespace.getNftMetadataBatch} method. */ +export interface NftMetadataBatchOptions { + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; + /** + * Whether to refresh the metadata for the given NFT token before returning + * the response. Defaults to false for faster response times. + */ + refreshCache?: boolean; +} +/** + * The successful object returned by the {@link getFloorPrice} call for each + * marketplace (e.g. looksRare). + * + * @public + */ +export interface FloorPriceMarketplace { + /** The floor price of the collection on the given marketplace */ + readonly floorPrice: number; + /** The currency in which the floor price is denominated */ + readonly priceCurrency: string; + /** The link to the collection on the given marketplace */ + readonly collectionUrl: string; + /** UTC timestamp of when the floor price was retrieved from the marketplace */ + readonly retrievedAt: string; +} +/** + * The failing object returned by the {@link getFloorPrice} call for each + * marketplace (e.g. looksRare). + * + * @public + */ +export interface FloorPriceError { + /** Error fetching floor prices from the given marketplace */ + readonly error: string; +} +/** + * The response object for the {@link getFloorPrice} method. + * + * @public + */ +export interface GetFloorPriceResponse { + /** + * Name of the NFT marketplace where the collection is listed. Current + * marketplaces supported: OpenSea, LooksRare + */ + readonly openSea: FloorPriceMarketplace | FloorPriceError; + readonly looksRare: FloorPriceMarketplace | FloorPriceError; +} +/** + * Optional parameters object for the the {@link getContractsForOwner} method + * + * @public + */ +export interface GetContractsForOwnerOptions { + /** Key for pagination to use to fetch results from the next page if available. */ + pageKey?: string; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are included in the response. May not be used in + * conjunction with {@link excludeFilters}. + */ + includeFilters?: NftFilters[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are excluded from the response. May not be used in + * conjunction with {@link includeFilters} + */ + excludeFilters?: NftFilters[]; + /** + * Order in which to return results. By default, results are ordered by + * contract address and token ID in lexicographic order. + */ + orderBy?: NftOrdering; +} +/** + * The response for the {@link NftNamespace.getContractsForOwner} method. + * + * @public + */ +export interface GetContractsForOwnerResponse { + /** The list of contracts, that match the query, held by the given address. */ + contracts: ContractForOwner[]; + /** Key for pagination to use to fetch results from the next page if available. */ + pageKey?: string; + /** Total number of NFT contracts held by the given address. */ + totalCount: number; +} +/** Represents a single NFT contract data in the {@link GetContractsForOwnerResponse}. */ +export interface ContractForOwner extends NftContract { + /** + * Sum of NFT balances across all token IDs held by the owner. For + * non-fungible tokens this will be equal to the numDistinctTokensOwned, but + * it may be higher if the user holds some fungible ERC1155 tokens. + */ + totalBalance: number; + /** + * Number of distinct token IDs held by the owner. For non-fungible tokens + * this will be equal to the totalBalance, but it may be lower if the user + * holds some fungible ERC1155 tokens. + */ + numDistinctTokensOwned: number; + isSpam: boolean; + /** One of the tokens from this contract held by the owner. */ + tokenId: string; + /** Alternative NFT metadata for this contract to be parsed manually. */ + media: Media; +} +/** + * Optional parameters object for the {@link getNftSales} endpoint. + * + * This interface is used to filter the NFT sales data. + * + * @public + */ +export interface GetNftSalesOptions { + /** The block number to start fetching NFT sales data from. */ + fromBlock?: number | 'latest'; + /** The block number limit to fetch NFT sales data from. */ + toBlock?: number | 'latest'; + /** Whether to return the results in ascending or descending order by block number. */ + order?: SortingOrder; + /** The NFT marketplace to filter sales by. */ + marketplace?: NftSaleMarketplace; + /** The address of the NFT buyer to filter sales by. */ + buyerAddress?: string; + /** The address of the NFT seller to filter sales by. */ + sellerAddress?: string; + /** + * Filter by whether the buyer or seller was the taker in the NFT trade. + * Defaults to returning both buyer and seller taker trades. + */ + taker?: NftSaleTakerType; + /** The maximum number of NFT sales to return. */ + limit?: number; + /** Key for pagination to use to fetch results from the next page if available. */ + pageKey?: string; +} +/** + * Alternative optional parameters object for the {@link getNftSales} endpoint + * that allows filtering results by contractAddress. + * + * This interface is used to filter the NFT sales data. + * + * @public + */ +export interface GetNftSalesOptionsByContractAddress extends GetNftSalesOptions { + /** The contract address of a NFT collection to filter sales by. */ + contractAddress: string; + /** The token ID of an NFT within the specified contractAddress to filter sales by. */ + tokenId?: BigNumberish; +} +/** + * The response for the {@link NftNamespace.getNftSales} method. + * + * @public + */ +export interface GetNftSalesResponse { + /** The page key to use to fetch the next page if more results are available. */ + pageKey?: string; + /** List of NFT sales that match the query */ + nftSales: NftSale[]; +} +/** Represents a single NFT sale data in the {@link GetNftSalesResponse}. */ +export interface NftSale { + /** The marketplace the sale took place on. */ + marketplace: NftSaleMarketplace; + /** The NFT contract address. */ + contractAddress: string; + /** The decimal token ID of the NFT being sold. */ + tokenId: string; + /** The number of tokens sold in the sale as a decimal integer string. */ + quantity: string; + /** The address of the buyer in the NFT sale. */ + buyerAddress: string; + /** The address of the seller in the NFT sale. */ + sellerAddress: string; + /** Whether the price taker in the trade was the buyer or the seller. */ + taker: NftSaleTakerType; + /** The payment from buyer to the seller. */ + sellerFee: NftSaleFeeData; + /** The payment from buyer to the marketplace. */ + marketplaceFee?: NftSaleFeeData; + /** The payment from buyer to the royalty address of the NFT collection. */ + royaltyFee?: NftSaleFeeData; + /** The block number the NFT sale took place in. */ + blockNumber: number; + /** The log number of the sale event emitted within the block. */ + logIndex: number; + /** The index of the token within the bundle of NFTs sold in the sale. */ + bundleIndex: number; + /** The transactionHash of the NFT sale. */ + transactionHash: string; +} +/** + * Fee detail for an NFT sale. + * + * @public + */ +export interface NftSaleFeeData { + /** The fee payment amount as a decimal integer string. */ + amount: string; + /** The symbol of the token used for the payment. */ + symbol: string; + /** The number of decimals of the token used for the payment. */ + decimal: number; +} +/** + * Enum for representing the supported sorting orders of the API. + * + * @public + */ +export declare enum SortingOrder { + ASCENDING = "asc", + DESCENDING = "desc" +} +/** + * Enum representing the supported NFT marketplaces by the {@link getNftSales} endpoint. + * + * @public + */ +export declare enum NftSaleMarketplace { + SEAPORT = "seaport", + LOOKSRARE = "looksrare", + X2Y2 = "x2y2", + UNKNOWN = "unknown" +} +/** + * Enum for specifing the taker type for the {@link getNftSales} endpoint. + * + * @public + */ +export declare enum NftSaleTakerType { + BUYER = "buyer", + SELLER = "seller" +} +/** + * Information about the rarity of an NFT's attribute in the specified collection. + * + * @public + */ +export interface NftAttributeRarity { + /** Name of the NFT's attribute. */ + value: string; + /** The type of NFT attribute. */ + traitType: string; + /** + * A number from 0 to 1 representing the prevalence of this value for this + * trait type in the current collection. + */ + prevalence: number; +} +/** + * Summary of the attribute prevalence for the specified NFT contract. + * + * @public + */ +export interface NftAttributesResponse { + /** The specified NFT contract's address. */ + contractAddress: string; + /** The specified NFT contract's total supply. */ + totalSupply: number; + /** + * The attribute prevalence of each trait grouped by the trait type for the + * provided NFT. + */ + summary: Record>; +} +/** The refresh result response object returned by {@link refreshContract}. */ +export interface RefreshContractResult { + /** The NFT contract address that was passed in to be refreshed. */ + contractAddress: string; + /** The current state of the refresh request. */ + refreshState: RefreshState; + /** + * Percentage of tokens currently refreshed, represented as an integer string. + * Field can be null if the refresh has not occurred. + */ + progress: string | null; +} +/** The current state of the NFT contract refresh process. */ +export declare enum RefreshState { + /** The provided contract is not an NFT or does not contain metadata. */ + DOES_NOT_EXIST = "does_not_exist", + /** The contract has already been queued for refresh. */ + ALREADY_QUEUED = "already_queued", + /** The contract is currently being refreshed. */ + IN_PROGRESS = "in_progress", + /** The contract refresh is complete. */ + FINISHED = "finished", + /** The contract refresh has been queued and await execution. */ + QUEUED = "queued", + /** The contract was unable to be queued due to an internal error. */ + QUEUE_FAILED = "queue_failed" +} +/** + * The parameter field of {@link TransactionReceiptsParams}. + * + * @public + */ +export interface TransactionReceiptsBlockNumber { + /** The block number to get transaction receipts for. */ + blockNumber: string; +} +/** + * The parameter field of {@link TransactionReceiptsParams}. + * + * @public + */ +export interface TransactionReceiptsBlockHash { + /** The block hash to get transaction receipts for. */ + blockHash: string; +} +/** + * The parameters to use with the {@link CoreNamespace.getTransactionReceipts} method. + * + * @public + */ +export declare type TransactionReceiptsParams = TransactionReceiptsBlockNumber | TransactionReceiptsBlockHash; +/** + * Response object for a {@link CoreNamespace.getTransactionReceipts} call. + * + * @public + */ +export interface TransactionReceiptsResponse { + /** A list of transaction receipts for the queried block. */ + receipts: TransactionReceipt[] | null; +} +/** + * Metadata object returned in a {@link AssetTransfersResult} object if the asset + * transferred is an ERC1155. + * + * @public + */ +export interface ERC1155Metadata { + tokenId: string; + value: string; +} +/** + * Information about the underlying contract for the asset that was transferred + * in a {@link AssetTransfersResult} object. + * + * @public + */ +export interface RawContract { + /** + * The raw transfer value as a hex string. `null` if the transfer was for an + * ERC721 or ERC1155 token. + */ + value: string | null; + /** The contract address. `null` if it was an internal or external transfer. */ + address: string | null; + /** + * The number of decimals in the contract as a hex string. `null` if the value + * is not in the contract and not available from other sources. + */ + decimal: string | null; +} +/** + * Optional parameters object for the {@link getNftsForContract} and + * {@link getNftsForContractIterator} functions. + * + * This interface is used to fetch NFTs with their associated metadata. To get + * Nfts without their associated metadata, use {@link GetBaseNftsForContractOptions}. + * + * @public + */ +export interface GetNftsForContractOptions { + /** + * Optional page key from an existing {@link NftContractBaseNftsResponse} or + * {@link NftContractNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */ + omitMetadata?: boolean; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; +} +/** + * Optional parameters object for the {@link getNftsForContract} and + * {@link getNftsForContractIterator} functions. + * + * This interface is used to fetch NFTs without their associated metadata. To + * get Nfts with their associated metadata, use {@link GetNftsForContractOptions}. + * + * @public + */ +export interface GetBaseNftsForContractOptions { + /** + * Optional page key from an existing {@link NftContractBaseNftsResponse} or + * {@link NftContractNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */ + omitMetadata: false; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; +} +/** + * Optional parameters object for the {@link getNftsForContract} method. + * + * This interface configures options when fetching the owner addresses of the + * provided contract. + * + * @public + */ +export interface GetOwnersForContractOptions { + /** + * Whether to include the token balances per token id for each owner. Defaults + * to false when omitted. + */ + withTokenBalances?: boolean; + /** The block number in hex or decimal to fetch owners for. */ + block?: string; + /** Optional page key to paginate the next page for large requests. */ + pageKey?: string; +} +/** + * Optional parameters object for the {@link getNftsForContract} method. + * + * This interface configures options when fetching the owner addresses of the + * provided contract. + * + * @public + */ +export interface GetOwnersForContractWithTokenBalancesOptions { + /** + * Whether to include the token balances per token id for each owner. Defaults + * to false when omitted. + */ + withTokenBalances: true; + /** The block number in hex or decimal to fetch owners for. */ + block?: string; + /** Optional page key to paginate the next page for large requests. */ + pageKey?: string; +} +/** + * The response object for the {@link getNftsForContract} function. The object + * contains the NFTs without metadata inside the NFT contract. + * + * @public + */ +export interface NftContractBaseNftsResponse { + /** An array of NFTs without metadata. */ + nfts: BaseNft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + pageKey?: string; +} +/** + * The response object for the {@link getNftsForContract} function. The object + * contains the NFTs with metadata inside the NFT contract. + * + * @public + */ +export interface NftContractNftsResponse { + /** An array of NFTs with metadata. */ + nfts: Nft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + pageKey?: string; +} +/** OpenSea's metadata for an NFT collection. */ +export interface OpenSeaCollectionMetadata { + /** The floor price of the NFT. */ + floorPrice?: number; + /** The name of the collection on OpenSea. */ + collectionName?: string; + /** The approval status of the collection on OpenSea. */ + safelistRequestStatus?: OpenSeaSafelistRequestStatus; + /** The image URL determined by OpenSea. */ + imageUrl?: string; + /** The description of the collection on OpenSea. */ + description?: string; + /** The homepage of the collection as determined by OpenSea. */ + externalUrl?: string; + /** The Twitter handle of the collection. */ + twitterUsername?: string; + /** The Discord URL of the collection. */ + discordUrl?: string; + /** Timestamp of when the OpenSea metadata was last ingested by Alchemy. */ + lastIngestedAt?: string; +} +/** An OpenSea collection's approval status. */ +export declare enum OpenSeaSafelistRequestStatus { + /** Verified collection. */ + VERIFIED = "verified", + /** Collections that are approved on open sea and can be found in search results. */ + APPROVED = "approved", + /** Collections that requested safelisting on OpenSea. */ + REQUESTED = "requested", + /** Brand new collections. */ + NOT_REQUESTED = "not_requested" +} +/** + * The response object for the {@link findContractDeployer} function. + * + * @public + */ +export interface DeployResult { + /** The address of the contract deployer, if it is available. */ + readonly deployerAddress?: string; + /** The block number the contract was deployed in. */ + readonly blockNumber: number; +} +/** + * Method names for Alchemy's custom Subscription API endpoints. + * + * This value is provided in the `method` field when creating an event filter on + * the Websocket Namespace. + */ +export declare enum AlchemySubscription { + PENDING_TRANSACTIONS = "alchemy_pendingTransactions", + MINED_TRANSACTIONS = "alchemy_minedTransactions" +} +/** + * Event filter for the {@link AlchemyWebSocketProvider.on} and + * {@link AlchemyWebSocketProvider.once} methods to use Alchemy's custom + * `alchemy_pendingTransactions` endpoint. + * + * Returns the transaction information for all pending transactions that match a + * given filter. For full documentation, see: + * {@link https://docs.alchemy.com/reference/alchemy-pendingtransactions} + * + * Note that excluding all optional parameters will return transaction + * information for ALL pending transactions that are added to the mempool. + * + * @public + */ +export interface AlchemyPendingTransactionsEventFilter { + method: AlchemySubscription.PENDING_TRANSACTIONS; + /** Filter pending transactions sent FROM the provided address or array of addresses. */ + fromAddress?: string | string[]; + /** Filter pending transactions sent TO the provided address or array of addresses. */ + toAddress?: string | string[]; + /** + * Whether to only include transaction hashes and exclude the rest of the + * transaction response for a smaller payload. Defaults to false (by default, + * the entire transaction response is included). + * + * Note that setting only {@link hashesOnly} to true will return the same + * response as subscribing to `newPendingTransactions`. + */ + hashesOnly?: boolean; +} +/** + * Event filter for the {@link AlchemyWebSocketProvider.on} and + * {@link AlchemyWebSocketProvider.once} methods to use Alchemy's custom + * `alchemy_minedTransactions` endpoint. + * + * Returns the transaction information for all mined transactions that match the + * provided filter. For full documentation, see: + * {@link https://docs.alchemy.com/reference/alchemy-minedtransactions} + * + * Note that excluding all optional parameters will return transaction + * information for ALL mined transactions. + * + * @public + */ +export interface AlchemyMinedTransactionsEventFilter { + method: AlchemySubscription.MINED_TRANSACTIONS; + /** + * Address filters to subscribe to. Defaults to all transactions if omitted. + * Limit 100 address filters. Requires a non-empty array. + */ + addresses?: NonEmptyArray; + /** + * Whether to include transactions that were removed from the mempool. + * Defaults to false. + */ + includeRemoved?: boolean; + /** + * Whether to only include transaction hashes and exclude the rest of the + * transaction response for a smaller payload. Defaults to false (by default, + * the entire transaction response is included). + */ + hashesOnly?: boolean; +} +/** + * Address filters for {@link AlchemyMinedTransactionsEventFilter}. Requires at + * least one of the fields to be set. + */ +export declare type AlchemyMinedTransactionsAddress = RequireAtLeastOne<{ + to?: string; + from?: string; +}>; +/** + * Alchemy's event type that extends the default {@link EventType} interface to + * also include Alchemy's Subscription API. + * + * @public + */ +export declare type AlchemyEventType = EventType | AlchemyEventFilter; +/** + * This type represents the Alchemy's Subscription API endpoints as event + * filters compatible with other ethers events. + */ +export declare type AlchemyEventFilter = AlchemyMinedTransactionsEventFilter | AlchemyPendingTransactionsEventFilter; +/** Options for the {@link TransactNamespace.sendPrivateTransaction} method. */ +export interface SendPrivateTransactionOptions { + /** + * Whether to use fast-mode. Defaults to false. Please note that fast mode + * transactions cannot be cancelled using + * {@link TransactNamespace.cancelPrivateTransaction}. method. + * + * See {@link https://docs.flashbots.net/flashbots-protect/rpc/fast-mode} for + * more details. + */ + fast: boolean; +} +/** SDK representation of a Webhook in the Notify API. */ +export interface Webhook { + /** The webhook's unique id. */ + id: string; + /** The network the webhook is on. */ + network: Network; + /** The type of webhook. */ + type: WebhookType; + /** The url that the webhook sends its payload to. */ + url: string; + /** Whether the webhook is currently active */ + isActive: boolean; + /** The creation time of the webhook as an ISO string. */ + timeCreated: string; + /** The signing key used to verify payloads for the webhook. */ + signingKey: string; + /** The webhook version. All newly created webhooks default to V2. */ + version: WebhookVersion; + /** + * The app id of the app used for the webhook. This field is only present on + * {@link MinedTransactionWebhook} and {@link DroppedTransactionWebhook} + */ + appId?: string; +} +/** The version of the webhook. All newly created webhooks default to V2. */ +export declare enum WebhookVersion { + V1 = "V1", + V2 = "V2" +} +/** The type of {@link Webhook}. */ +export declare enum WebhookType { + MINED_TRANSACTION = "MINED_TRANSACTION", + DROPPED_TRANSACTION = "DROPPED_TRANSACTION", + ADDRESS_ACTIVITY = "ADDRESS_ACTIVITY", + NFT_ACTIVITY = "NFT_ACTIVITY" +} +/** + * A Mined Transaction Webhook is used to notify your app whenever a transaction + * sent through your API key gets successfully mined. This is useful if you want + * to notify customers that their transaction went through. + */ +export interface MinedTransactionWebhook extends Webhook { + type: WebhookType.MINED_TRANSACTION; +} +/** + * A Dropped Transaction webhook is used to notify your app whenever a + * transaction sent through your API key gets dropped. This can be useful if you + * want to notify customers that their transactions were dropped. + */ +export interface DroppedTransactionWebhook extends Webhook { + type: WebhookType.DROPPED_TRANSACTION; +} +/** + * An Address Activity Webhook tracks ETH, ERC20, ERC721, and ERC1155 transfers + * for the provided addresses. This can be used to notify your app with + * real-time state changes when your tracked addresses send or receive tokens. + */ +export interface AddressActivityWebhook extends Webhook { + type: WebhookType.ADDRESS_ACTIVITY; +} +/** + * The NFT Activity Webhook tracks all ERC721 and ERC1155 activity. This can be + * used to notify your app with real time state changes when an NFT is + * transferred between addresses. + */ +export interface NftActivityWebhook extends Webhook { + type: WebhookType.NFT_ACTIVITY; +} +/** The response for a {@link NotifyNamespace.getAllWebhooks} method. */ +export interface GetAllWebhooksResponse { + /** All webhooks attached to the provided auth token. */ + webhooks: Webhook[]; + /** The total number of webhooks. */ + totalCount: number; +} +/** Options object for the {@link NotifyNamespace.getAddresses} method. */ +export interface GetAddressesOptions { + /** Number of addresses to fetch. */ + limit?: number; + /** Page */ + pageKey?: string; +} +/** Response object for the {@link NotifyNamespace.getAddresses} method. */ +export interface AddressActivityResponse { + /** The addresses for the webhook. */ + addresses: string[]; + /** The total number of addresses. */ + totalCount: number; + /** Optional page key used to fetch the remaining addresses. */ + pageKey?: string; +} +/** + * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order + * to create a {@link MinedTransactionWebhook} or {@link DroppedTransactionWebhook}. + * + * The webhook will be created on the app and network associated with the appId. + * To find the app id of a project, go to the Alchemy Dashboard in the Apps tab. + * After clicking on an app, the app id is the string in the URL following 'apps/'. + * + * This is a temporary workaround for now. We're planning on detecting the app + * id from the provided api key directly. Stay tuned! + */ +export interface TransactionWebhookParams { + /** The app id of the project to create the webhook on. */ + appId: string; +} +/** + * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order + * to create a {@link NftActivityWebhook}. + */ +export interface NftWebhookParams { + /** Array of NFT filters the webhook should track. */ + filters: NftFilter[]; + /** + * Optional network to create the webhook on. If omitted, the webhook will be + * created on network of the app provided in the api key config. + */ + network?: Network; +} +/** + * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order + * to create a {@link AddressActivityWebhook}. + */ +export interface AddressWebhookParams { + /** Array of addresses the webhook should activity for. */ + addresses: string[]; + /** + * Optional network to create the webhook on. If omitted, the webhook will be + * created on network of the app provided in the api key config. + */ + network?: Network; +} +/** NFT to track on a {@link NftActivityWebhook}. */ +export interface NftFilter { + /** The contract address of the NFT. */ + contractAddress: string; + /** The token id of the NFT. */ + tokenId: BigNumberish; +} +/** Response object for the {@link NotifyNamespace.getNftFilters} method. */ +export interface NftFiltersResponse { + /** The NFT filters on the provided webhook. */ + filters: NftFilter[]; + /** The total number of NFT filters on the webhook. */ + totalCount: number; + /** Optional page key used to fetch the remaining filters. */ + pageKey?: string; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to mark a + * webhook as active or inactive. + */ +export interface WebhookStatusUpdate { + /** Whether the webhook is active. */ + isActive: boolean; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to add and + * remove NFT filters for a {@link NftActivityWebhook}. + */ +export interface WebhookNftFilterUpdate { + /** The filters to additionally track. */ + addFilters: NftFilter[]; + /** Existing filters to remove. */ + removeFilters: NftFilter[]; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to add and + * remove addresses for a {@link AddressActivityWebhook}. + */ +export interface WebhookAddressUpdate { + /** The addresses to additionally track. */ + addAddresses: string[]; + /** Existing addresses to remove. */ + removeAddresses: string[]; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to replace + * all existing addresses for a {@link AddressActivityWebhook}. + */ +export interface WebhookAddressOverride { + /** The new addresses to track. Existing addresses will be removed. */ + newAddresses: string[]; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to update a + * {@link NftActivityWebhook}. + */ +export declare type NftWebhookUpdate = WebhookStatusUpdate | RequireAtLeastOne; +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to update a + * {@link AddressActivityWebhook}. + */ +export declare type AddressWebhookUpdate = WebhookStatusUpdate | RequireAtLeastOne | WebhookAddressOverride; +/** + * Requires at least one of the properties to be set. + * + * Implementation copied over from + * {@link https://learn.microsoft.com/en-us/javascript/api/@azure/keyvault-certificates/requireatleastone?view=azure-node-latest} + */ +export declare type RequireAtLeastOne = { + [K in keyof T]-?: Required> & Partial>>; +}[keyof T]; +/** Requires an array with at least one value. */ +export declare type NonEmptyArray = [T, ...T[]]; diff --git a/test/node_modules/alchemy-sdk/dist/es/src/util/const.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/util/const.d.ts new file mode 100644 index 0000000..1269128 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/util/const.d.ts @@ -0,0 +1,43 @@ +import { Network as NetworkFromEthers } from '@ethersproject/networks'; +import { Network } from '../types/types'; +export declare const DEFAULT_ALCHEMY_API_KEY = "demo"; +export declare const DEFAULT_NETWORK = Network.ETH_MAINNET; +export declare const DEFAULT_MAX_RETRIES = 5; +export declare function getAlchemyNftHttpUrl(network: Network, apiKey: string): string; +export declare function getAlchemyWsUrl(network: Network, apiKey: string): string; +export declare function getAlchemyWebhookHttpUrl(): string; +export declare enum AlchemyApiType { + BASE = 0, + NFT = 1, + WEBHOOK = 2 +} +/** + * Mapping of network names to their corresponding Network strings used to + * create an Ethers.js Provider instance. + */ +export declare const EthersNetwork: { + "eth-mainnet": string; + "eth-ropsten": string; + "eth-goerli": string; + "eth-kovan": string; + "eth-rinkeby": string; + "opt-mainnet": string; + "opt-kovan": string; + "opt-goerli": string; + "arb-mainnet": string; + "arb-rinkeby": string; + "arb-goerli": string; + "polygon-mainnet": string; + "polygon-mumbai": string; + "astar-mainnet": string; +}; +/** + * Mapping of network names to their corresponding Ethers Network objects. These + * networks are not yet supported by Ethers and are listed here to be overriden + * in the provider. + */ +export declare const CustomNetworks: { + [key: string]: NetworkFromEthers; +}; +export declare function noop(): void; +export declare const ETH_NULL_VALUE = "0x"; diff --git a/test/node_modules/alchemy-sdk/dist/es/src/util/logger.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/util/logger.d.ts new file mode 100644 index 0000000..7e8cda8 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/util/logger.d.ts @@ -0,0 +1,55 @@ +/** + * The SDK has 4 log levels and a 5th option for disabling all logging. By + * default, the log level is set to INFO. + * + * The order is a follows: DEBUG < INFO < WARN < ERROR + * + * All log types above the current log level will be outputted. + */ +export declare enum LogLevel { + DEBUG = 0, + INFO = 1, + WARN = 2, + ERROR = 3, + SILENT = 4 +} +/** + * The level of verbosity for the logger. + * + * @public + */ +export declare type LogLevelString = 'debug' | 'info' | 'warn' | 'error' | 'silent'; +/** + * Configures the verbosity of logging. The default log level is `info`. + * + * @param logLevel - The verbosity of logging. Can be any of the following values: + * + * - `debug`: The most verbose logging level. + * - `info`: The default logging level. + * - `warn`: A logging level for non-critical issues. + * - `error`: A logging level for critical issues. + * - `silent`: Turn off all logging. + * + * @public + */ +export declare function setLogLevel(logLevel: LogLevelString): void; +export declare function logDebug(message: string, ...args: unknown[]): void; +export declare function logInfo(message: string, ...args: unknown[]): void; +export declare function logWarn(message: string, ...args: unknown[]): void; +export declare function logError(message: string, ...args: unknown[]): void; +export declare class Logger { + /** The log level of the given Logger instance. */ + private _logLevel; + constructor(); + get logLevel(): LogLevel; + set logLevel(val: LogLevel); + debug(...args: unknown[]): void; + info(...args: unknown[]): void; + warn(...args: unknown[]): void; + error(...args: unknown[]): void; + /** + * Forwards log messages to their corresponding console counterparts if the + * log level allows it. + */ + private _log; +} diff --git a/test/node_modules/alchemy-sdk/dist/es/src/util/sendRest.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/util/sendRest.d.ts new file mode 100644 index 0000000..e356e41 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/util/sendRest.d.ts @@ -0,0 +1,11 @@ +/** + * Given a REST endpoint, method, and params, sends the request with axios and + * returns the response. + */ +import { AxiosRequestConfig, AxiosResponse } from 'axios'; +/** + * Helper function to send http requests using Axis. + * + * @private + */ +export declare function sendAxiosRequest(baseUrl: string, restApiName: string, methodName: string, params: Req, overrides?: AxiosRequestConfig): Promise>; diff --git a/test/node_modules/alchemy-sdk/dist/es/src/util/util.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/util/util.d.ts new file mode 100644 index 0000000..7ce652d --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/util/util.d.ts @@ -0,0 +1,13 @@ +import { BaseNft, Nft, NftContract } from '../api/nft'; +import { RawBaseNft, RawContractBaseNft, RawGetContractsForOwnerResponse, RawGetNftSalesResponse, RawNft, RawNftAttributeRarity, RawNftContract, RawOpenSeaCollectionMetadata } from '../internal/raw-interfaces'; +import { GetContractsForOwnerResponse, GetNftSalesResponse, NftAttributeRarity, OpenSeaCollectionMetadata } from '../types/types'; +export declare function formatBlock(block: string | number): string; +export declare function getNftContractFromRaw(rawNftContract: RawNftContract): NftContract; +export declare function getBaseNftFromRaw(rawBaseNft: RawBaseNft): BaseNft; +export declare function getBaseNftFromRaw(rawContractBaseNft: RawContractBaseNft, contractAddress: string): BaseNft; +export declare function getNftFromRaw(rawNft: RawNft): Nft; +export declare function getNftSalesFromRaw(rawNftSales: RawGetNftSalesResponse): GetNftSalesResponse; +export declare function getNftRarityFromRaw(rawNftRarity: RawNftAttributeRarity[]): NftAttributeRarity[]; +export declare function getContractsForOwnerFromRaw(rawContractsForOwner: RawGetContractsForOwnerResponse): GetContractsForOwnerResponse; +export declare function parseOpenSeaMetadata(openSea: RawOpenSeaCollectionMetadata | undefined): OpenSeaCollectionMetadata | undefined; +export declare const IS_BROWSER: boolean; diff --git a/test/node_modules/alchemy-sdk/dist/es/src/version.d.ts b/test/node_modules/alchemy-sdk/dist/es/src/version.d.ts new file mode 100644 index 0000000..86a14fc --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/src/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "2.2.5"; diff --git a/test/node_modules/alchemy-sdk/dist/es/test/integration/alchemy.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/test/integration/alchemy.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/test/integration/alchemy.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/test/integration/core.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/test/integration/core.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/test/integration/core.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/test/integration/nft.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/test/integration/nft.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/test/integration/nft.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/test/integration/notify.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/test/integration/notify.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/test/integration/notify.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/test/integration/provider.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/test/integration/provider.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/test/integration/provider.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/test/integration/transact.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/test/integration/transact.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/test/integration/transact.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/test/integration/wallet.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/test/integration/wallet.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/test/integration/wallet.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/test/test-util.d.ts b/test/node_modules/alchemy-sdk/dist/es/test/test-util.d.ts new file mode 100644 index 0000000..52fd8cd --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/test/test-util.d.ts @@ -0,0 +1,45 @@ +/// +import { BaseNft, Media, Nft, NftContract, NftSaleMarketplace, NftSaleTakerType, NftTokenType, OwnedBaseNft, OwnedNft, TokenUri } from '../src'; +import { RawBaseNft, RawContractBaseNft, RawContractForOwner, RawNft, RawNftContract, RawNftContractMetadata, RawNftSale, RawOpenSeaCollectionMetadata, RawOwnedBaseNft, RawOwnedNft } from '../src/internal/raw-interfaces'; +import { BlockHead, LogsEvent } from '../src/internal/websocket-backfiller'; +export declare const TEST_WALLET_PRIVATE_KEY = "dd5bdf09397b1fdf98e4f72c66047d5104b1511fa7dc1b8fdddd61a150f732c9"; +export declare const TEST_WALLET_PUBLIC_ADDRESS = "0x4b9007B0BcE78cfB634032ec31Ed56adB464287b"; +/** Creates a dummy response for the `getContractMetadata` endpoint. */ +export declare function createRawNftContract(address: string, tokenType: NftTokenType, name?: string, symbol?: string, totalSupply?: string, openSea?: RawOpenSeaCollectionMetadata): RawNftContract; +export declare function createRawOpenSeaCollectionMetadata(): RawOpenSeaCollectionMetadata; +export declare function createRawOwnedBaseNft(address: string, tokenId: string, balance: string, tokenType?: NftTokenType): RawOwnedBaseNft; +export declare function createOwnedBaseNft(address: string, tokenId: string, balance: number, tokenType?: NftTokenType): OwnedBaseNft; +export declare function createRawBaseNft(contractAddress: string, tokenId: string | number, tokenType?: NftTokenType): RawBaseNft; +export declare function createBaseNft(address: string, tokenId: string | number, tokenType?: NftTokenType): BaseNft; +export declare function createNft(title: string, address: string, tokenId: string, tokenType?: NftTokenType, tokenUri?: TokenUri, media?: TokenUri[] | undefined): Nft; +interface RawNftOptions { + tokenUri?: TokenUri; + media?: TokenUri[] | undefined; + timeLastUpdated?: string; + description?: string | Array; + contractMetadata?: RawNftContractMetadata; +} +export declare function createRawNft(contractAddress: string, title: string, tokenId: string, tokenType?: NftTokenType, options?: RawNftOptions): RawNft; +export declare function createRawOwnedNft(title: string, address: string, tokenId: string, balance: string, tokenType?: NftTokenType, contractMetadata?: RawNftContractMetadata): RawOwnedNft; +export declare function createOwnedNft(title: string, address: string, tokenId: string, balance: number, tokenType?: NftTokenType): OwnedNft; +export declare function createRawNftContractBaseNft(tokenId: string): RawContractBaseNft; +export declare function createRawNftSale(contractAddress: string, tokenId: string, marketplace: NftSaleMarketplace, taker: NftSaleTakerType, buyerAddress: string, sellerAddress: string): RawNftSale; +export declare function createRawContractForOwner(address: string, tokenId: string, media: Media, isSpam?: boolean, name?: string, tokenType?: NftTokenType, symbol?: string, totalSupply?: string, opensea?: RawOpenSeaCollectionMetadata): RawContractForOwner; +export declare function createNftMediaData(bytes?: number, format?: string, thumbnail?: string): Media; +export declare function verifyNftContractMetadata(actualNftContract: NftContract, expectedNftContract: NftContract, address: string, name: string, symbol: string, totalSupply: string, tokenType?: NftTokenType, openSea?: RawOpenSeaCollectionMetadata): void; +export declare type Mocked = T & { + [K in keyof T]: T[K] extends Function ? T[K] & jest.Mock : T[K]; +}; +/** A Promise implementation for deferred resolution. */ +export declare class Deferred { + promise: Promise; + constructor(); + resolve: (value: R | Promise) => void; + reject: (reason: Error) => void; +} +export declare function makeNewHeadsEvent(blockNumber: number, hash: string): BlockHead; +export declare function makeLogsEvent(blockNumber: number, blockHash: string, isRemoved?: boolean, logIndex?: number): LogsEvent; +export declare const TESTING_PRIVATE_KEY = "dd5bdf09397b1fdf98e4f72c66047d5104b1511fa7dc1b8fdddd61a150f732c9"; +export declare const TESTING_PUBLIC_ADDRESS = "0x4b9007B0BcE78cfB634032ec31Ed56adB464287b"; +export declare function loadAlchemyEnv(): Promise; +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/test/unit/alchemy.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/test/unit/alchemy.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/test/unit/alchemy.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/test/unit/backoff.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/test/unit/backoff.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/test/unit/backoff.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/test/unit/contract.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/test/unit/contract.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/test/unit/contract.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/test/unit/core-namespace.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/test/unit/core-namespace.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/test/unit/core-namespace.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/test/unit/logger.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/test/unit/logger.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/test/unit/logger.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/test/unit/nft-api.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/test/unit/nft-api.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/test/unit/nft-api.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/test/unit/nft.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/test/unit/nft.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/test/unit/nft.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/test/unit/provider.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/test/unit/provider.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/test/unit/provider.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/test/unit/request-batcher.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/test/unit/request-batcher.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/test/unit/request-batcher.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/test/unit/transact.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/test/unit/transact.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/test/unit/transact.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/test/unit/wallet.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/test/unit/wallet.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/test/unit/wallet.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/test/unit/websocket-backfiller.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/test/unit/websocket-backfiller.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/test/unit/websocket-backfiller.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/es/test/unit/websocket-provider.test.d.ts b/test/node_modules/alchemy-sdk/dist/es/test/unit/websocket-provider.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/es/test/unit/websocket-provider.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/alchemy-provider-a776ca8a.js b/test/node_modules/alchemy-sdk/dist/esm/alchemy-provider-a776ca8a.js new file mode 100644 index 0000000..5e0d4c8 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/alchemy-provider-a776ca8a.js @@ -0,0 +1,769 @@ +import { _ as __awaiter, D as DEFAULT_ALCHEMY_API_KEY, C as CustomNetworks, a as DEFAULT_NETWORK, N as Network, I as IS_BROWSER, V as VERSION, l as logWarn, E as EthersNetwork, g as getAlchemyHttpUrl, b as getAlchemyWsUrl } from './index-02af91ae.js'; +import { getNetwork } from '@ethersproject/networks'; +import { JsonRpcProvider } from '@ethersproject/providers'; +import { fetchJson } from '@ethersproject/web'; +import './api/utils'; +import '@ethersproject/bignumber'; +import 'axios'; +import '@ethersproject/abstract-provider'; +import '@ethersproject/wallet'; +import '@ethersproject/contracts'; + +const version$1 = "logger/5.7.0"; + +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"; + /////////////////// + // Interaction Errors + // The user rejected the action, such as signing a message or sending + // a transaction + ErrorCode["ACTION_REJECTED"] = "ACTION_REJECTED"; +})(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; + let url = ""; + switch (code) { + case ErrorCode.NUMERIC_FAULT: { + url = "NUMERIC_FAULT"; + const fault = message; + switch (fault) { + case "overflow": + case "underflow": + case "division-by-zero": + url += "-" + fault; + break; + case "negative-power": + case "negative-width": + url += "-unsupported"; + break; + case "unbound-bitwise-result": + url += "-unbound-result"; + break; + } + break; + } + case ErrorCode.CALL_EXCEPTION: + case ErrorCode.INSUFFICIENT_FUNDS: + case ErrorCode.MISSING_NEW: + case ErrorCode.NONCE_EXPIRED: + case ErrorCode.REPLACEMENT_UNDERPRICED: + case ErrorCode.TRANSACTION_REPLACED: + case ErrorCode.UNPREDICTABLE_GAS_LIMIT: + url = code; + break; + } + if (url) { + message += " [ See: https:/\/links.ethers.org/v5-errors-" + url + " ]"; + } + 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 (_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$1); + } + 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 = "properties/5.7.0"; + +(undefined && undefined.__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 = new Logger(version); +function defineReadOnly(object, name, value) { + Object.defineProperty(object, name, { + enumerable: true, + value: value, + writable: false, + }); +} +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); +} +function deepCopy(object) { + return _deepCopy(object); +} + +/** Maximum size of a batch on the rpc provider. */ +const DEFAULT_MAX_REQUEST_BATCH_SIZE = 100; +/** Timeout interval before the pending batch is sent. */ +const DEFAULT_REQUEST_BATCH_DELAY_MS = 10; +/** + * Internal class to enqueue requests and automatically send/process batches. + * + * The underlying batching mechanism is loosely based on ethers.js's + * `JsonRpcBatchProvider`. + * + * @internal + */ +class RequestBatcher { + constructor(sendBatchFn, maxBatchSize = DEFAULT_MAX_REQUEST_BATCH_SIZE) { + this.sendBatchFn = sendBatchFn; + this.maxBatchSize = maxBatchSize; + /** + * Array of enqueued requests along with the constructed promise handlers for + * each request. + */ + this.pendingBatch = []; + } + /** + * Enqueues the provided request. The batch is immediately sent if the maximum + * batch size is reached. Otherwise, the request is enqueued onto a batch that + * is sent after 10ms. + * + * Returns a promise that resolves with the result of the request. + */ + enqueueRequest(request) { + return __awaiter(this, void 0, void 0, function* () { + const inflightRequest = { + request, + resolve: undefined, + reject: undefined + }; + const promise = new Promise((resolve, reject) => { + inflightRequest.resolve = resolve; + inflightRequest.reject = reject; + }); + this.pendingBatch.push(inflightRequest); + if (this.pendingBatch.length === this.maxBatchSize) { + // Send batch immediately if we are at the maximum batch size. + void this.sendBatchRequest(); + } + else if (!this.pendingBatchTimer) { + // Schedule batch for next event loop + short duration + this.pendingBatchTimer = setTimeout(() => this.sendBatchRequest(), DEFAULT_REQUEST_BATCH_DELAY_MS); + } + return promise; + }); + } + /** + * Sends the currently queued batches and resets the batch and timer. Processes + * the batched response results back to the original promises. + */ + sendBatchRequest() { + return __awaiter(this, void 0, void 0, function* () { + // Get the current batch and clear it, so new requests + // go into the next batch + const batch = this.pendingBatch; + this.pendingBatch = []; + if (this.pendingBatchTimer) { + clearTimeout(this.pendingBatchTimer); + this.pendingBatchTimer = undefined; + } + // Get the request as an array of requests + const request = batch.map(inflight => inflight.request); + return this.sendBatchFn(request).then(result => { + // 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 => { + batch.forEach(inflightRequest => { + inflightRequest.reject(error); + }); + }); + }); + } +} + +/** + * SDK's custom implementation of ethers.js's 'AlchemyProvider'. + * + * Do not call this constructor directly. Instead, instantiate an instance of + * {@link Alchemy} and call {@link Alchemy.config.getProvider()}. + * + * @public + */ +class AlchemyProvider extends JsonRpcProvider { + /** @internal */ + constructor(config) { + // Normalize the API Key to a string. + const apiKey = AlchemyProvider.getApiKey(config.apiKey); + // Generate our own connection info with the correct endpoint URLs. + const alchemyNetwork = AlchemyProvider.getAlchemyNetwork(config.network); + const connection = AlchemyProvider.getAlchemyConnectionInfo(alchemyNetwork, apiKey, 'http'); + // If a hardcoded url was specified in the config, use that instead of the + // provided apiKey or network. + if (config.url !== undefined) { + connection.url = config.url; + } + connection.throttleLimit = config.maxRetries; + // Normalize the Alchemy named network input to the network names used by + // ethers. This allows the parent super constructor in JsonRpcProvider to + // correctly set the network. + const ethersNetwork = EthersNetwork[alchemyNetwork]; + super(connection, ethersNetwork); + this.apiKey = config.apiKey; + this.maxRetries = config.maxRetries; + this.batchRequests = config.batchRequests; + // TODO: support individual headers when calling batch + const batcherConnection = Object.assign({}, this.connection); + batcherConnection.headers['Alchemy-Ethers-Sdk-Method'] = 'batchSend'; + const sendBatchFn = (requests) => { + return fetchJson(batcherConnection, JSON.stringify(requests)); + }; + this.batcher = new RequestBatcher(sendBatchFn); + } + /** + * Overrides the `UrlJsonRpcProvider.getApiKey` method as implemented by + * ethers.js. Returns the API key for an Alchemy provider. + * + * @internal + * @override + */ + static getApiKey(apiKey) { + if (apiKey == null) { + return DEFAULT_ALCHEMY_API_KEY; + } + if (apiKey && typeof apiKey !== 'string') { + throw new Error(`Invalid apiKey '${apiKey}' provided. apiKey must be a string.`); + } + return apiKey; + } + /** + * Overrides the `BaseProvider.getNetwork` method as implemented by ethers.js. + * + * This override allows the SDK to set the provider's network to values not + * yet supported by ethers.js. + * + * @internal + * @override + */ + static getNetwork(network) { + if (typeof network === 'string' && network in CustomNetworks) { + return CustomNetworks[network]; + } + // Call the standard ethers.js getNetwork method for other networks. + return getNetwork(network); + } + /** + * Converts the `Networkish` input to the network enum used by Alchemy. + * + * @internal + */ + static getAlchemyNetwork(network) { + if (network === undefined) { + return DEFAULT_NETWORK; + } + if (typeof network === 'number') { + throw new Error(`Invalid network '${network}' provided. Network must be a string.`); + } + // Guaranteed that `typeof network === 'string`. + const isValidNetwork = Object.values(Network).includes(network); + if (!isValidNetwork) { + throw new Error(`Invalid network '${network}' provided. Network must be one of: ` + + `${Object.values(Network).join(', ')}.`); + } + return network; + } + /** + * Returns a {@link ConnectionInfo} object compatible with ethers that contains + * the correct URLs for Alchemy. + * + * @internal + */ + static getAlchemyConnectionInfo(network, apiKey, type) { + const url = type === 'http' + ? getAlchemyHttpUrl(network, apiKey) + : getAlchemyWsUrl(network, apiKey); + return { + headers: IS_BROWSER + ? { + 'Alchemy-Ethers-Sdk-Version': VERSION + } + : { + 'Alchemy-Ethers-Sdk-Version': VERSION, + 'Accept-Encoding': 'gzip' + }, + allowGzip: true, + url + }; + } + /** + * Overrides the method in ethers.js's `StaticJsonRpcProvider` class. This + * method is called when calling methods on the parent class `BaseProvider`. + * + * @override + */ + 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) { + throw new Error('No network detected'); + } + } + return network; + }); + } + _startPending() { + logWarn('WARNING: Alchemy Provider does not support pending filters'); + } + /** + * Overrides the ether's `isCommunityResource()` method. Returns true if the + * current api key is the default key. + * + * @override + */ + isCommunityResource() { + return this.apiKey === DEFAULT_ALCHEMY_API_KEY; + } + /** + * Overrides the base {@link JsonRpcProvider.send} method to implement custom + * logic for sending requests to Alchemy. + * + * @param method The method name to use for the request. + * @param params The parameters to use for the request. + * @override + * @public + */ + // TODO: Add headers for `perform()` override. + send(method, params) { + return this._send(method, params, 'send'); + } + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `JsonRpcProvider.send()`. + * + * This method is copied over directly in order to implement custom headers + * + * @internal + */ + _send(method, params, methodName, forceBatch = false) { + const request = { + method, + params, + id: this._nextId++, + jsonrpc: '2.0' + }; + // START MODIFIED CODE + const connection = Object.assign({}, this.connection); + connection.headers['Alchemy-Ethers-Sdk-Method'] = methodName; + if (this.batchRequests || forceBatch) { + return this.batcher.enqueueRequest(request); + } + // END MODIFIED CODE + 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, + response: result, + provider: this + }); + return result; + }, error => { + this.emit('debug', { + action: 'response', + error, + request, + provider: this + }); + throw error; + }); + // Cache the fetch, but clear it on the next event loop + if (cache) { + this._cache[method] = result; + setTimeout(() => { + // @ts-ignore - This is done by ethers. + this._cache[method] = null; + }, 0); + } + return result; + } +} +/** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's + * `@ethersproject/web/src.ts/index.ts`. Used to support + * {@link AlchemyProvider._send}, which is also copied over. + */ +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; +} + +export { AlchemyProvider }; +//# sourceMappingURL=alchemy-provider-a776ca8a.js.map diff --git a/test/node_modules/alchemy-sdk/dist/esm/alchemy-provider-a776ca8a.js.map b/test/node_modules/alchemy-sdk/dist/esm/alchemy-provider-a776ca8a.js.map new file mode 100644 index 0000000..c26912f --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/alchemy-provider-a776ca8a.js.map @@ -0,0 +1 @@ +{"version":3,"file":"alchemy-provider-a776ca8a.js","sources":["../../node_modules/@ethersproject/logger/lib.esm/_version.js","../../node_modules/@ethersproject/logger/lib.esm/index.js","../../node_modules/@ethersproject/properties/lib.esm/_version.js","../../node_modules/@ethersproject/properties/lib.esm/index.js","../../src/internal/request-batcher.ts","../../src/api/alchemy-provider.ts"],"sourcesContent":["export const version = \"logger/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nlet _permanentCensorErrors = false;\nlet _censorErrors = false;\nconst LogLevels = { debug: 1, \"default\": 2, info: 2, warning: 3, error: 4, off: 5 };\nlet _logLevel = LogLevels[\"default\"];\nimport { version } from \"./_version\";\nlet _globalLogger = null;\nfunction _checkNormalize() {\n try {\n const missing = [];\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 ;\n }\n catch (error) {\n missing.push(form);\n }\n });\n if (missing.length) {\n throw new Error(\"missing \" + missing.join(\", \"));\n }\n if (String.fromCharCode(0xe9).normalize(\"NFD\") !== String.fromCharCode(0x65, 0x0301)) {\n throw new Error(\"broken implementation\");\n }\n }\n catch (error) {\n return error.message;\n }\n return null;\n}\nconst _normalizeError = _checkNormalize();\nexport var LogLevel;\n(function (LogLevel) {\n LogLevel[\"DEBUG\"] = \"DEBUG\";\n LogLevel[\"INFO\"] = \"INFO\";\n LogLevel[\"WARNING\"] = \"WARNING\";\n LogLevel[\"ERROR\"] = \"ERROR\";\n LogLevel[\"OFF\"] = \"OFF\";\n})(LogLevel || (LogLevel = {}));\nexport var ErrorCode;\n(function (ErrorCode) {\n ///////////////////\n // Generic Errors\n // Unknown Error\n ErrorCode[\"UNKNOWN_ERROR\"] = \"UNKNOWN_ERROR\";\n // Not Implemented\n ErrorCode[\"NOT_IMPLEMENTED\"] = \"NOT_IMPLEMENTED\";\n // Unsupported Operation\n // - operation\n ErrorCode[\"UNSUPPORTED_OPERATION\"] = \"UNSUPPORTED_OPERATION\";\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 ErrorCode[\"NETWORK_ERROR\"] = \"NETWORK_ERROR\";\n // Some sort of bad response from the server\n ErrorCode[\"SERVER_ERROR\"] = \"SERVER_ERROR\";\n // Timeout\n ErrorCode[\"TIMEOUT\"] = \"TIMEOUT\";\n ///////////////////\n // Operational Errors\n // Buffer Overrun\n ErrorCode[\"BUFFER_OVERRUN\"] = \"BUFFER_OVERRUN\";\n // Numeric Fault\n // - operation: the operation being executed\n // - fault: the reason this faulted\n ErrorCode[\"NUMERIC_FAULT\"] = \"NUMERIC_FAULT\";\n ///////////////////\n // Argument Errors\n // Missing new operator to an object\n // - name: The name of the class\n ErrorCode[\"MISSING_NEW\"] = \"MISSING_NEW\";\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 ErrorCode[\"INVALID_ARGUMENT\"] = \"INVALID_ARGUMENT\";\n // Missing argument to a function:\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n ErrorCode[\"MISSING_ARGUMENT\"] = \"MISSING_ARGUMENT\";\n // Too many arguments\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n ErrorCode[\"UNEXPECTED_ARGUMENT\"] = \"UNEXPECTED_ARGUMENT\";\n ///////////////////\n // Blockchain Errors\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 ErrorCode[\"CALL_EXCEPTION\"] = \"CALL_EXCEPTION\";\n // Insufficient funds (< value + gasLimit * gasPrice)\n // - transaction: the transaction attempted\n ErrorCode[\"INSUFFICIENT_FUNDS\"] = \"INSUFFICIENT_FUNDS\";\n // Nonce has already been used\n // - transaction: the transaction attempted\n ErrorCode[\"NONCE_EXPIRED\"] = \"NONCE_EXPIRED\";\n // The replacement fee for the transaction is too low\n // - transaction: the transaction attempted\n ErrorCode[\"REPLACEMENT_UNDERPRICED\"] = \"REPLACEMENT_UNDERPRICED\";\n // The gas limit could not be estimated\n // - transaction: the transaction passed to estimateGas\n ErrorCode[\"UNPREDICTABLE_GAS_LIMIT\"] = \"UNPREDICTABLE_GAS_LIMIT\";\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 ErrorCode[\"TRANSACTION_REPLACED\"] = \"TRANSACTION_REPLACED\";\n ///////////////////\n // Interaction Errors\n // The user rejected the action, such as signing a message or sending\n // a transaction\n ErrorCode[\"ACTION_REJECTED\"] = \"ACTION_REJECTED\";\n})(ErrorCode || (ErrorCode = {}));\n;\nconst HEX = \"0123456789abcdef\";\nexport class Logger {\n constructor(version) {\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n value: version,\n writable: false\n });\n }\n _log(logLevel, args) {\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]) {\n return;\n }\n console.log.apply(console, args);\n }\n debug(...args) {\n this._log(Logger.levels.DEBUG, args);\n }\n info(...args) {\n this._log(Logger.levels.INFO, args);\n }\n warn(...args) {\n this._log(Logger.levels.WARNING, args);\n }\n makeError(message, code, params) {\n // Errors are being censored\n if (_censorErrors) {\n return this.makeError(\"censored error\", code, {});\n }\n if (!code) {\n code = Logger.errors.UNKNOWN_ERROR;\n }\n if (!params) {\n params = {};\n }\n const messageDetails = [];\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 }\n else {\n messageDetails.push(key + \"=\" + JSON.stringify(value));\n }\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 const reason = message;\n let url = \"\";\n switch (code) {\n case ErrorCode.NUMERIC_FAULT: {\n url = \"NUMERIC_FAULT\";\n const fault = message;\n switch (fault) {\n case \"overflow\":\n case \"underflow\":\n case \"division-by-zero\":\n url += \"-\" + fault;\n break;\n case \"negative-power\":\n case \"negative-width\":\n url += \"-unsupported\";\n break;\n case \"unbound-bitwise-result\":\n url += \"-unbound-result\";\n break;\n }\n break;\n }\n case ErrorCode.CALL_EXCEPTION:\n case ErrorCode.INSUFFICIENT_FUNDS:\n case ErrorCode.MISSING_NEW:\n case ErrorCode.NONCE_EXPIRED:\n case ErrorCode.REPLACEMENT_UNDERPRICED:\n case ErrorCode.TRANSACTION_REPLACED:\n case ErrorCode.UNPREDICTABLE_GAS_LIMIT:\n url = code;\n break;\n }\n if (url) {\n message += \" [ See: https:/\\/links.ethers.org/v5-errors-\" + url + \" ]\";\n }\n if (messageDetails.length) {\n message += \" (\" + messageDetails.join(\", \") + \")\";\n }\n // @TODO: Any??\n const error = new Error(message);\n error.reason = reason;\n error.code = code;\n Object.keys(params).forEach(function (key) {\n error[key] = params[key];\n });\n return error;\n }\n throwError(message, code, params) {\n throw this.makeError(message, code, params);\n }\n throwArgumentError(message, name, value) {\n return this.throwError(message, Logger.errors.INVALID_ARGUMENT, {\n argument: name,\n value: value\n });\n }\n assert(condition, message, code, params) {\n if (!!condition) {\n return;\n }\n this.throwError(message, code, params);\n }\n assertArgument(condition, message, name, value) {\n if (!!condition) {\n return;\n }\n this.throwArgumentError(message, name, value);\n }\n checkNormalize(message) {\n if (message == null) {\n message = \"platform missing String.prototype.normalize\";\n }\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 checkSafeUint53(value, message) {\n if (typeof (value) !== \"number\") {\n return;\n }\n if (message == null) {\n 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 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 checkArgumentCount(count, expectedCount, message) {\n if (message) {\n message = \": \" + message;\n }\n else {\n message = \"\";\n }\n if (count < expectedCount) {\n this.throwError(\"missing argument\" + message, Logger.errors.MISSING_ARGUMENT, {\n count: count,\n expectedCount: expectedCount\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 checkNew(target, kind) {\n if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n checkAbstract(target, kind) {\n if (target === kind) {\n this.throwError(\"cannot instantiate abstract class \" + JSON.stringify(kind.name) + \" directly; use a sub-class\", Logger.errors.UNSUPPORTED_OPERATION, { 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 static globalLogger() {\n if (!_globalLogger) {\n _globalLogger = new Logger(version);\n }\n return _globalLogger;\n }\n static setCensorship(censorship, permanent) {\n if (!censorship && permanent) {\n this.globalLogger().throwError(\"cannot permanently disable censorship\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n if (_permanentCensorErrors) {\n if (!censorship) {\n return;\n }\n this.globalLogger().throwError(\"error censorship permanent\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n _censorErrors = !!censorship;\n _permanentCensorErrors = !!permanent;\n }\n static setLogLevel(logLevel) {\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 static from(version) {\n return new Logger(version);\n }\n}\nLogger.errors = ErrorCode;\nLogger.levels = LogLevel;\n//# sourceMappingURL=index.js.map","export const version = \"properties/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nexport function defineReadOnly(object, name, value) {\n Object.defineProperty(object, name, {\n enumerable: true,\n value: value,\n writable: false,\n });\n}\n// Crawl up the constructor chain to find a static method\nexport function getStatic(ctor, key) {\n for (let i = 0; i < 32; i++) {\n if (ctor[key]) {\n return ctor[key];\n }\n if (!ctor.prototype || typeof (ctor.prototype) !== \"object\") {\n break;\n }\n ctor = Object.getPrototypeOf(ctor.prototype).constructor;\n }\n return null;\n}\nexport function resolveProperties(object) {\n return __awaiter(this, void 0, void 0, function* () {\n const promises = Object.keys(object).map((key) => {\n const value = object[key];\n return Promise.resolve(value).then((v) => ({ key: key, value: v }));\n });\n const results = yield Promise.all(promises);\n return results.reduce((accum, result) => {\n accum[(result.key)] = result.value;\n return accum;\n }, {});\n });\n}\nexport function checkProperties(object, properties) {\n if (!object || typeof (object) !== \"object\") {\n logger.throwArgumentError(\"invalid object\", \"object\", object);\n }\n Object.keys(object).forEach((key) => {\n if (!properties[key]) {\n logger.throwArgumentError(\"invalid object key - \" + key, \"transaction:\" + key, object);\n }\n });\n}\nexport function shallowCopy(object) {\n const result = {};\n for (const key in object) {\n result[key] = object[key];\n }\n return result;\n}\nconst opaque = { bigint: true, boolean: true, \"function\": true, number: true, string: true };\nfunction _isFrozen(object) {\n // Opaque objects are not mutable, so safe to copy by assignment\n if (object === undefined || object === null || opaque[typeof (object)]) {\n return true;\n }\n if (Array.isArray(object) || typeof (object) === \"object\") {\n if (!Object.isFrozen(object)) {\n return false;\n }\n const keys = Object.keys(object);\n for (let i = 0; i < keys.length; i++) {\n let value = null;\n try {\n value = object[keys[i]];\n }\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 if (!_isFrozen(value)) {\n return false;\n }\n }\n return true;\n }\n return logger.throwArgumentError(`Cannot deepCopy ${typeof (object)}`, \"object\", object);\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) {\n if (_isFrozen(object)) {\n 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 if (typeof (object) === \"object\") {\n const result = {};\n for (const key in object) {\n const value = object[key];\n if (value === undefined) {\n continue;\n }\n defineReadOnly(result, key, deepCopy(value));\n }\n return result;\n }\n return logger.throwArgumentError(`Cannot deepCopy ${typeof (object)}`, \"object\", object);\n}\nexport function deepCopy(object) {\n return _deepCopy(object);\n}\nexport class Description {\n constructor(info) {\n for (const key in info) {\n this[key] = deepCopy(info[key]);\n }\n }\n}\n//# sourceMappingURL=index.js.map","import { JsonRpcRequest, JsonRpcResponse } from './internal-types';\n\n/** Maximum size of a batch on the rpc provider. */\nconst DEFAULT_MAX_REQUEST_BATCH_SIZE = 100;\n\n/** Timeout interval before the pending batch is sent. */\nconst DEFAULT_REQUEST_BATCH_DELAY_MS = 10;\n\n/**\n * Internal class to enqueue requests and automatically send/process batches.\n *\n * The underlying batching mechanism is loosely based on ethers.js's\n * `JsonRpcBatchProvider`.\n *\n * @internal\n */\nexport class RequestBatcher {\n /** Timeout timer that periodically sends the pending batch. */\n private pendingBatchTimer: NodeJS.Timer | undefined;\n\n /**\n * Array of enqueued requests along with the constructed promise handlers for\n * each request.\n */\n private pendingBatch: Array = [];\n\n constructor(\n private readonly sendBatchFn: SendBatchFn,\n private readonly maxBatchSize = DEFAULT_MAX_REQUEST_BATCH_SIZE\n ) {}\n\n /**\n * Enqueues the provided request. The batch is immediately sent if the maximum\n * batch size is reached. Otherwise, the request is enqueued onto a batch that\n * is sent after 10ms.\n *\n * Returns a promise that resolves with the result of the request.\n */\n async enqueueRequest(request: JsonRpcRequest): Promise {\n const inflightRequest: BatchRequest = {\n request,\n resolve: undefined,\n reject: undefined\n };\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.pendingBatch.length === this.maxBatchSize) {\n // Send batch immediately if we are at the maximum batch size.\n void this.sendBatchRequest();\n } else if (!this.pendingBatchTimer) {\n // Schedule batch for next event loop + short duration\n this.pendingBatchTimer = setTimeout(\n () => this.sendBatchRequest(),\n DEFAULT_REQUEST_BATCH_DELAY_MS\n );\n }\n\n return promise;\n }\n\n /**\n * Sends the currently queued batches and resets the batch and timer. Processes\n * the batched response results back to the original promises.\n */\n private async sendBatchRequest(): Promise {\n // Get the current batch and clear it, so new requests\n // go into the next batch\n const batch = this.pendingBatch;\n this.pendingBatch = [];\n if (this.pendingBatchTimer) {\n clearTimeout(this.pendingBatchTimer);\n this.pendingBatchTimer = undefined;\n }\n\n // Get the request as an array of requests\n const request = batch.map(inflight => inflight.request);\n\n return this.sendBatchFn(request).then(\n result => {\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 as any).code = payload.error.code;\n (error as any).data = payload.error.data;\n inflightRequest.reject!(error);\n } else {\n inflightRequest.resolve!(payload.result);\n }\n });\n },\n error => {\n batch.forEach(inflightRequest => {\n inflightRequest.reject!(error);\n });\n }\n );\n }\n}\n\n/** Function type to match the `fetchJson` function in ethers. */\ntype SendBatchFn = (reqs: JsonRpcRequest[]) => Promise;\n\n/**\n * Internal interface to represent a request on a batch along with the promises to resolve it.\n */\ninterface BatchRequest {\n request: JsonRpcRequest;\n resolve?: (result: any) => void;\n reject?: (error: Error) => void;\n}\n","import {\n Network as NetworkFromEthers,\n Networkish,\n getNetwork as getNetworkFromEthers\n} from '@ethersproject/networks';\nimport { deepCopy } from '@ethersproject/properties';\nimport {\n CommunityResourcable,\n JsonRpcProvider\n} from '@ethersproject/providers';\nimport { ConnectionInfo, fetchJson } from '@ethersproject/web';\n\nimport { JsonRpcRequest, JsonRpcResponse } from '../internal/internal-types';\nimport { RequestBatcher } from '../internal/request-batcher';\nimport { Network } from '../types/types';\nimport {\n CustomNetworks,\n DEFAULT_ALCHEMY_API_KEY,\n DEFAULT_NETWORK,\n EthersNetwork,\n getAlchemyHttpUrl,\n getAlchemyWsUrl\n} from '../util/const';\nimport { logWarn } from '../util/logger';\nimport { IS_BROWSER } from '../util/util';\nimport { VERSION } from '../version';\nimport { AlchemyConfig } from './alchemy-config';\n\n/**\n * SDK's custom implementation of ethers.js's 'AlchemyProvider'.\n *\n * Do not call this constructor directly. Instead, instantiate an instance of\n * {@link Alchemy} and call {@link Alchemy.config.getProvider()}.\n *\n * @public\n */\nexport class AlchemyProvider\n extends JsonRpcProvider\n implements CommunityResourcable\n{\n readonly apiKey: string;\n readonly maxRetries: number;\n readonly batchRequests: boolean;\n\n /**\n * VISIBLE ONLY FOR TESTING\n *@internal\n */\n readonly batcher: RequestBatcher;\n\n /** @internal */\n constructor(config: AlchemyConfig) {\n // Normalize the API Key to a string.\n const apiKey = AlchemyProvider.getApiKey(config.apiKey);\n\n // Generate our own connection info with the correct endpoint URLs.\n const alchemyNetwork = AlchemyProvider.getAlchemyNetwork(config.network);\n const connection = AlchemyProvider.getAlchemyConnectionInfo(\n alchemyNetwork,\n apiKey,\n 'http'\n );\n\n // If a hardcoded url was specified in the config, use that instead of the\n // provided apiKey or network.\n if (config.url !== undefined) {\n connection.url = config.url;\n }\n\n connection.throttleLimit = config.maxRetries;\n\n // Normalize the Alchemy named network input to the network names used by\n // ethers. This allows the parent super constructor in JsonRpcProvider to\n // correctly set the network.\n const ethersNetwork = EthersNetwork[alchemyNetwork];\n super(connection, ethersNetwork);\n\n this.apiKey = config.apiKey;\n this.maxRetries = config.maxRetries;\n this.batchRequests = config.batchRequests;\n\n // TODO: support individual headers when calling batch\n const batcherConnection = { ...this.connection };\n batcherConnection.headers!['Alchemy-Ethers-Sdk-Method'] = 'batchSend';\n const sendBatchFn = (\n requests: JsonRpcRequest[]\n ): Promise => {\n return fetchJson(batcherConnection, JSON.stringify(requests));\n };\n this.batcher = new RequestBatcher(sendBatchFn);\n }\n\n /**\n * Overrides the `UrlJsonRpcProvider.getApiKey` method as implemented by\n * ethers.js. Returns the API key for an Alchemy provider.\n *\n * @internal\n * @override\n */\n static getApiKey(apiKey: any): string {\n if (apiKey == null) {\n return DEFAULT_ALCHEMY_API_KEY;\n }\n if (apiKey && typeof apiKey !== 'string') {\n throw new Error(\n `Invalid apiKey '${apiKey}' provided. apiKey must be a string.`\n );\n }\n return apiKey;\n }\n\n /**\n * Overrides the `BaseProvider.getNetwork` method as implemented by ethers.js.\n *\n * This override allows the SDK to set the provider's network to values not\n * yet supported by ethers.js.\n *\n * @internal\n * @override\n */\n static getNetwork(network: Networkish): NetworkFromEthers {\n if (typeof network === 'string' && network in CustomNetworks) {\n return CustomNetworks[network];\n }\n\n // Call the standard ethers.js getNetwork method for other networks.\n return getNetworkFromEthers(network);\n }\n\n /**\n * Converts the `Networkish` input to the network enum used by Alchemy.\n *\n * @internal\n */\n static getAlchemyNetwork(network?: Networkish): Network {\n if (network === undefined) {\n return DEFAULT_NETWORK;\n }\n\n if (typeof network === 'number') {\n throw new Error(\n `Invalid network '${network}' provided. Network must be a string.`\n );\n }\n\n // Guaranteed that `typeof network === 'string`.\n const isValidNetwork = Object.values(Network).includes(network as Network);\n if (!isValidNetwork) {\n throw new Error(\n `Invalid network '${network}' provided. Network must be one of: ` +\n `${Object.values(Network).join(', ')}.`\n );\n }\n return network as Network;\n }\n\n /**\n * Returns a {@link ConnectionInfo} object compatible with ethers that contains\n * the correct URLs for Alchemy.\n *\n * @internal\n */\n static getAlchemyConnectionInfo(\n network: Network,\n apiKey: string,\n type: 'wss' | 'http'\n ): ConnectionInfo {\n const url =\n type === 'http'\n ? getAlchemyHttpUrl(network, apiKey)\n : getAlchemyWsUrl(network, apiKey);\n return {\n headers: IS_BROWSER\n ? {\n 'Alchemy-Ethers-Sdk-Version': VERSION\n }\n : {\n 'Alchemy-Ethers-Sdk-Version': VERSION,\n 'Accept-Encoding': 'gzip'\n },\n allowGzip: true,\n url\n };\n }\n\n /**\n * Overrides the method in ethers.js's `StaticJsonRpcProvider` class. This\n * method is called when calling methods on the parent class `BaseProvider`.\n *\n * @override\n */\n async detectNetwork(): Promise {\n let network = this.network;\n if (network == null) {\n network = await super.detectNetwork();\n\n if (!network) {\n throw new Error('No network detected');\n }\n }\n return network;\n }\n\n _startPending(): void {\n logWarn('WARNING: Alchemy Provider does not support pending filters');\n }\n\n /**\n * Overrides the ether's `isCommunityResource()` method. Returns true if the\n * current api key is the default key.\n *\n * @override\n */\n isCommunityResource(): boolean {\n return this.apiKey === DEFAULT_ALCHEMY_API_KEY;\n }\n\n /**\n * Overrides the base {@link JsonRpcProvider.send} method to implement custom\n * logic for sending requests to Alchemy.\n *\n * @param method The method name to use for the request.\n * @param params The parameters to use for the request.\n * @override\n * @public\n */\n // TODO: Add headers for `perform()` override.\n send(method: string, params: Array): Promise {\n return this._send(method, params, 'send');\n }\n\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `JsonRpcProvider.send()`.\n *\n * This method is copied over directly in order to implement custom headers\n *\n * @internal\n */\n _send(\n method: string,\n params: Array,\n methodName: string,\n forceBatch = false\n ): Promise {\n const request = {\n method,\n params,\n id: this._nextId++,\n jsonrpc: '2.0'\n };\n\n // START MODIFIED CODE\n const connection = { ...this.connection };\n connection.headers!['Alchemy-Ethers-Sdk-Method'] = methodName;\n\n if (this.batchRequests || forceBatch) {\n return this.batcher.enqueueRequest(request as JsonRpcRequest);\n }\n // END MODIFIED CODE\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(\n this.connection,\n JSON.stringify(request),\n getResult\n ).then(\n result => {\n this.emit('debug', {\n action: 'response',\n request,\n response: result,\n provider: this\n });\n\n return result;\n },\n error => {\n this.emit('debug', {\n action: 'response',\n error,\n request,\n provider: this\n });\n\n throw error;\n }\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 // @ts-ignore - This is done by ethers.\n this._cache[method] = null;\n }, 0);\n }\n\n return result;\n }\n}\n\n/**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's\n * `@ethersproject/web/src.ts/index.ts`. Used to support\n * {@link AlchemyProvider._send}, which is also copied over.\n */\nfunction getResult(payload: {\n error?: { code?: number; data?: any; message?: string };\n result?: any;\n}): any {\n if (payload.error) {\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"],"names":["version","this","getNetworkFromEthers"],"mappings":";;;;;;;;;;;AAAO,MAAMA,SAAO,GAAG,cAAc;;ACCrC,IAAI,sBAAsB,GAAG,KAAK,CAAC;AACnC,IAAI,aAAa,GAAG,KAAK,CAAC;AAC1B,MAAM,SAAS,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;AACpF,IAAI,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC;AAErC,IAAI,aAAa,GAAG,IAAI,CAAC;AACzB,SAAS,eAAe,GAAG;AAC3B,IAAI,IAAI;AACR,QAAQ,MAAM,OAAO,GAAG,EAAE,CAAC;AAC3B;AACA,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EA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G;AACN,YAAA,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;AACjB,gBAAA,MAAM,EAAE,UAAU;gBAClB,KAAK;gBACL,OAAO;AACP,gBAAA,QAAQ,EAAE,IAAI;AACf,aAAA,CAAC,CAAC;AAEH,YAAA,MAAM,KAAK,CAAC;AACd,SAAC,CACF,CAAC;;AAGF,QAAA,IAAI,KAAK,EAAE;AACT,YAAA,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;YAC7B,UAAU,CAAC,MAAK;;AAEd,gBAAA,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;aAC5B,EAAE,CAAC,CAAC,CAAC;AACP,SAAA;AAED,QAAA,OAAO,MAAM,CAAC;KACf;AACF,CAAA;AAED;;;;;;AAMG;AACH,SAAS,SAAS,CAAC,OAGlB,EAAA;IACC,IAAI,OAAO,CAAC,KAAK,EAAE;QACjB,MAAM,KAAK,GAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACpD,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;QAChC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;AAChC,QAAA,MAAM,KAAK,CAAC;AACb,KAAA;IAED,OAAO,OAAO,CAAC,MAAM,CAAC;AACxB;;;;"} \ No newline at end of file diff --git a/test/node_modules/alchemy-sdk/dist/esm/alchemy-websocket-provider-35c345f7.js b/test/node_modules/alchemy-sdk/dist/esm/alchemy-websocket-provider-35c345f7.js new file mode 100644 index 0000000..6d5aec2 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/alchemy-websocket-provider-35c345f7.js @@ -0,0 +1,1146 @@ +import { _ as __awaiter, f as fromHex, t as toHex, n as noop, C as CustomNetworks, i as isAlchemyEvent, v as verifyAlchemyEventName, c as EthersEvent, d as getAlchemyEventTag, D as DEFAULT_ALCHEMY_API_KEY, A as ALCHEMY_EVENT_TYPES, e as ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE, h as AlchemySubscription, j as ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE, V as VERSION, E as EthersNetwork } from './index-02af91ae.js'; +import SturdyWebSocket from 'sturdy-websocket'; +import { BigNumber } from '@ethersproject/bignumber'; +import { getNetwork } from '@ethersproject/networks'; +import { WebSocketProvider } from '@ethersproject/providers'; +import { AlchemyProvider } from './alchemy-provider-a776ca8a.js'; +import './api/utils'; +import 'axios'; +import '@ethersproject/abstract-provider'; +import '@ethersproject/wallet'; +import '@ethersproject/contracts'; +import '@ethersproject/web'; + +/** + * The maximum number of blocks to backfill. If more than this many blocks have + * been missed, then we'll sadly miss data, but we want to make sure we don't + * end up requesting thousands of blocks if somebody left their laptop closed for a week. + */ +const MAX_BACKFILL_BLOCKS = 120; +/** + * The WebsocketBackfiller fetches events that were sent since a provided block + * number. This is used in the {@link AlchemyWebSocketProvider} to backfill + * events that were transmitted while the websocket connection was down. + * + * The backfiller backfills two main eth_subscribe events: `logs` and `newHeads`. + * + * @internal + */ +class WebsocketBackfiller { + constructor(provider) { + this.provider = provider; + // TODO: Use HTTP provider to do backfill. + this.maxBackfillBlocks = MAX_BACKFILL_BLOCKS; + } + /** + * Runs backfill for `newHeads` events. + * + * @param isCancelled Whether the backfill request is cancelled. + * @param previousHeads Previous head requests that were sent. + * @param fromBlockNumber The block number to start backfilling from. + * @returns A list of `newHeads` events that were sent since the last backfill. + */ + getNewHeadsBackfill(isCancelled, previousHeads, fromBlockNumber) { + return __awaiter(this, void 0, void 0, function* () { + throwIfCancelled(isCancelled); + const toBlockNumber = yield this.getBlockNumber(); + throwIfCancelled(isCancelled); + // If there are no previous heads to fetch, return new heads since + // `fromBlockNumber`, or up to maxBackfillBlocks from the current head. + if (previousHeads.length === 0) { + return this.getHeadEventsInRange(Math.max(fromBlockNumber, toBlockNumber - this.maxBackfillBlocks) + 1, toBlockNumber + 1); + } + // If the last emitted event is too far back in the past, there's no need + // to backfill for reorgs. Just fetch the last `maxBackfillBlocks` worth of + // new heads. + const lastSeenBlockNumber = fromHex(previousHeads[previousHeads.length - 1].number); + const minBlockNumber = toBlockNumber - this.maxBackfillBlocks + 1; + if (lastSeenBlockNumber <= minBlockNumber) { + return this.getHeadEventsInRange(minBlockNumber, toBlockNumber + 1); + } + // To capture all `newHeads` events, return all head events from the last + // seen block number to current + any of the previous heads that were re-orged. + const reorgHeads = yield this.getReorgHeads(isCancelled, previousHeads); + throwIfCancelled(isCancelled); + const intermediateHeads = yield this.getHeadEventsInRange(lastSeenBlockNumber + 1, toBlockNumber + 1); + throwIfCancelled(isCancelled); + return [...reorgHeads, ...intermediateHeads]; + }); + } + /** + * Runs backfill for `logs` events. + * + * @param isCancelled Whether the backfill request is cancelled. + * @param filter The filter object that accompanies a logs subscription. + * @param previousLogs Previous log requests that were sent. + * @param fromBlockNumber The block number to start backfilling from. + */ + getLogsBackfill(isCancelled, filter, previousLogs, fromBlockNumber) { + return __awaiter(this, void 0, void 0, function* () { + throwIfCancelled(isCancelled); + const toBlockNumber = yield this.getBlockNumber(); + throwIfCancelled(isCancelled); + // If there are no previous logs to fetch, return new logs since + // `fromBlockNumber`, or up to `maxBackfillBlocks` from the current head. + if (previousLogs.length === 0) { + return this.getLogsInRange(filter, Math.max(fromBlockNumber, toBlockNumber - this.maxBackfillBlocks) + 1, toBlockNumber + 1); + } + // If the last emitted log is too far back in the past, there's no need + // to backfill for removed logs. Just fetch the last `maxBackfillBlocks` + // worth of logs. + const lastSeenBlockNumber = fromHex(previousLogs[previousLogs.length - 1].blockNumber); + const minBlockNumber = toBlockNumber - this.maxBackfillBlocks + 1; + if (lastSeenBlockNumber < minBlockNumber) { + return this.getLogsInRange(filter, minBlockNumber, toBlockNumber + 1); + } + // Return all log events that have happened along with log events that have + // been removed due to a chain reorg. + const commonAncestor = yield this.getCommonAncestor(isCancelled, previousLogs); + throwIfCancelled(isCancelled); + // All previous logs with a block number greater than the common ancestor + // were part of a re-org, so mark them as such. + const removedLogs = previousLogs + .filter(log => fromHex(log.blockNumber) > commonAncestor.blockNumber) + .map(log => (Object.assign(Object.assign({}, log), { removed: true }))); + // If no common ancestor was found, start backfill from the oldest log's + // block number. + const fromBlockInclusive = commonAncestor.blockNumber === Number.NEGATIVE_INFINITY + ? fromHex(previousLogs[0].blockNumber) + : commonAncestor.blockNumber; + let addedLogs = yield this.getLogsInRange(filter, fromBlockInclusive, toBlockNumber + 1); + // De-dupe any logs that were already emitted. + addedLogs = addedLogs.filter(log => log && + (fromHex(log.blockNumber) > commonAncestor.blockNumber || + fromHex(log.logIndex) > commonAncestor.logIndex)); + throwIfCancelled(isCancelled); + return [...removedLogs, ...addedLogs]; + }); + } + /** + * Sets a new max backfill blocks. VISIBLE ONLY FOR TESTING. + * + * @internal + */ + setMaxBackfillBlock(newMax) { + this.maxBackfillBlocks = newMax; + } + /** + * Gets the current block number as a number. + * + * @private + */ + getBlockNumber() { + return __awaiter(this, void 0, void 0, function* () { + const blockNumberHex = yield this.provider.send('eth_blockNumber'); + return fromHex(blockNumberHex); + }); + } + /** + * Gets all `newHead` events in the provided range. Note that the returned + * heads do not include re-orged heads. Use {@link getReorgHeads} to find heads + * that were part of a re-org. + * + * @private + */ + getHeadEventsInRange(fromBlockInclusive, toBlockExclusive) { + return __awaiter(this, void 0, void 0, function* () { + if (fromBlockInclusive >= toBlockExclusive) { + return []; + } + const batchParts = []; + for (let i = fromBlockInclusive; i < toBlockExclusive; i++) { + batchParts.push({ + method: 'eth_getBlockByNumber', + params: [toHex(i), false] + }); + } + // TODO: handle errors + const blockHeads = yield this.provider.sendBatch(batchParts); + return blockHeads.map(toNewHeadsEvent); + }); + } + /** + * Returns all heads that were part of a reorg event. + * + * @private + */ + getReorgHeads(isCancelled, previousHeads) { + return __awaiter(this, void 0, void 0, function* () { + const result = []; + // Iterate from the most recent head backwards in order to find the first + // block that was part of a re-org. + for (let i = previousHeads.length - 1; i >= 0; i--) { + const oldEvent = previousHeads[i]; + const blockHead = yield this.getBlockByNumber(fromHex(oldEvent.number)); + throwIfCancelled(isCancelled); + // If the hashes match, then current head in the iteration was not re-orged. + if (oldEvent.hash === blockHead.hash) { + break; + } + result.push(toNewHeadsEvent(blockHead)); + } + return result.reverse(); + }); + } + /** + * Simple wrapper around `eth_getBlockByNumber` that returns the complete + * block information for the provided block number. + * + * @private + */ + getBlockByNumber(blockNumber) { + return __awaiter(this, void 0, void 0, function* () { + return this.provider.send('eth_getBlockByNumber', [ + toHex(blockNumber), + false + ]); + }); + } + /** + * Given a list of previous log events, finds the common block number from the + * logs that matches the block head. + * + * This can be used to identify which logs are part of a re-org. + * + * Returns 1 less than the oldest log's block number if no common ancestor was found. + * + * @private + */ + getCommonAncestor(isCancelled, previousLogs) { + return __awaiter(this, void 0, void 0, function* () { + // Iterate from the most recent head backwards in order to find the first + // block that was part of a re-org. + let blockHead = yield this.getBlockByNumber(fromHex(previousLogs[previousLogs.length - 1].blockNumber)); + throwIfCancelled(isCancelled); + for (let i = previousLogs.length - 1; i >= 0; i--) { + const oldLog = previousLogs[i]; + // Ensure that updated blocks are fetched every time the log's block number + // changes. + if (oldLog.blockNumber !== blockHead.number) { + blockHead = yield this.getBlockByNumber(fromHex(oldLog.blockNumber)); + } + // Since logs are ordered in ascending order, the first log that matches + // the hash should be the largest logIndex. + if (oldLog.blockHash === blockHead.hash) { + return { + blockNumber: fromHex(oldLog.blockNumber), + logIndex: fromHex(oldLog.logIndex) + }; + } + } + return { + blockNumber: Number.NEGATIVE_INFINITY, + logIndex: Number.NEGATIVE_INFINITY + }; + }); + } + /** + * Gets all `logs` events in the provided range. Note that the returned logs + * do not include removed logs. + * + * @private + */ getLogsInRange(filter, fromBlockInclusive, toBlockExclusive) { + return __awaiter(this, void 0, void 0, function* () { + if (fromBlockInclusive >= toBlockExclusive) { + return []; + } + const rangeFilter = Object.assign(Object.assign({}, filter), { fromBlock: toHex(fromBlockInclusive), toBlock: toHex(toBlockExclusive - 1) }); + return this.provider.send('eth_getLogs', [rangeFilter]); + }); + } +} +function toNewHeadsEvent(head) { + const result = Object.assign({}, head); + delete result.totalDifficulty; + delete result.transactions; + delete result.uncles; + return result; +} +function dedupeNewHeads(events) { + return dedupe(events, event => event.hash); +} +function dedupeLogs(events) { + return dedupe(events, event => `${event.blockHash}/${event.logIndex}`); +} +function dedupe(items, getKey) { + const keysSeen = new Set(); + const result = []; + items.forEach(item => { + const key = getKey(item); + if (!keysSeen.has(key)) { + keysSeen.add(key); + result.push(item); + } + }); + return result; +} +const CANCELLED = new Error('Cancelled'); +function throwIfCancelled(isCancelled) { + if (isCancelled()) { + throw CANCELLED; + } +} + +const HEARTBEAT_INTERVAL = 30000; +const HEARTBEAT_WAIT_TIME = 10000; +const BACKFILL_TIMEOUT = 60000; +const BACKFILL_RETRIES = 5; +/** + * Subscriptions have a memory of recent events they have sent so that in the + * event that they disconnect and need to backfill, they can detect re-orgs. + * Keep a buffer that goes back at least these many blocks, the maximum amount + * at which we might conceivably see a re-org. + * + * Note that while our buffer goes back this many blocks, it may contain more + * than this many elements, since in the case of logs subscriptions more than + * one event may be emitted for a block. + */ +const RETAINED_EVENT_BLOCK_COUNT = 10; +/** + * SDK's custom implementation fo the ethers.js's 'AlchemyWebSocketProvider'. + * + * Do not call this constructor directly. Instead, instantiate an instance of + * {@link Alchemy} and call {@link Alchemy.config.getWebSocketProvider()}. + * + * @public + */ +class AlchemyWebSocketProvider extends WebSocketProvider { + /** @internal */ + constructor(config, wsConstructor) { + var _a; + // Normalize the API Key to a string. + const apiKey = AlchemyProvider.getApiKey(config.apiKey); + // Generate our own connection info with the correct endpoint URLs. + const alchemyNetwork = AlchemyProvider.getAlchemyNetwork(config.network); + const connection = AlchemyProvider.getAlchemyConnectionInfo(alchemyNetwork, apiKey, 'wss'); + const protocol = `alchemy-sdk-${VERSION}`; + // Use the provided config URL override if it exists, otherwise use the created one. + const ws = new SturdyWebSocket((_a = config.url) !== null && _a !== void 0 ? _a : connection.url, protocol, { + wsConstructor: wsConstructor !== null && wsConstructor !== void 0 ? wsConstructor : getWebsocketConstructor() + }); + // Normalize the Alchemy named network input to the network names used by + // ethers. This allows the parent super constructor in JsonRpcProvider to + // correctly set the network. + const ethersNetwork = EthersNetwork[alchemyNetwork]; + super(ws, ethersNetwork); + this._events = []; + // In the case of a WebSocket reconnection, all subscriptions are lost and we + // create new ones to replace them, but we want to create the illusion that + // the original subscriptions persist. Thus, maintain a mapping from the + // "virtual" subscription ids which are visible to the consumer to the + // "physical" subscription ids of the actual connections. This terminology is + // borrowed from virtual and physical memory, which has a similar mapping. + /** @internal */ + this.virtualSubscriptionsById = new Map(); + /** @internal */ + this.virtualIdsByPhysicalId = new Map(); + /** + * The underlying ethers {@link WebSocketProvider} already handles and emits + * messages. To allow backfilling, track all messages that are emitted. + * + * This is a field arrow function in order to preserve `this` context when + * passing the method as an event listener. + * + * @internal + */ + this.handleMessage = (event) => { + const message = JSON.parse(event.data); + if (!isSubscriptionEvent(message)) { + return; + } + const physicalId = message.params.subscription; + const virtualId = this.virtualIdsByPhysicalId.get(physicalId); + if (!virtualId) { + return; + } + const subscription = this.virtualSubscriptionsById.get(virtualId); + if (subscription.method !== 'eth_subscribe') { + return; + } + switch (subscription.params[0]) { + case 'newHeads': { + const newHeadsSubscription = subscription; + const newHeadsMessage = message; + const { isBackfilling, backfillBuffer } = newHeadsSubscription; + const { result } = newHeadsMessage.params; + if (isBackfilling) { + addToNewHeadsEventsBuffer(backfillBuffer, result); + } + else if (physicalId !== virtualId) { + // In the case of a re-opened subscription, ethers will not emit the + // event, so the SDK has to. + this.emitAndRememberEvent(virtualId, result, getNewHeadsBlockNumber); + } + else { + // Ethers subscription mapping will emit the event, just store it. + this.rememberEvent(virtualId, result, getNewHeadsBlockNumber); + } + break; + } + case 'logs': { + const logsSubscription = subscription; + const logsMessage = message; + const { isBackfilling, backfillBuffer } = logsSubscription; + const { result } = logsMessage.params; + if (isBackfilling) { + addToLogsEventsBuffer(backfillBuffer, result); + } + else if (virtualId !== physicalId) { + this.emitAndRememberEvent(virtualId, result, getLogsBlockNumber); + } + else { + this.rememberEvent(virtualId, result, getLogsBlockNumber); + } + break; + } + default: + if (physicalId !== virtualId) { + // In the case of a re-opened subscription, ethers will not emit the + // event, so the SDK has to. + const { result } = message.params; + this.emitEvent(virtualId, result); + } + } + }; + /** + * When the websocket connection reopens: + * + * 1. Resubscribe to all existing subscriptions and start backfilling + * 2. Restart heart beat. + * + * This is a field arrow function in order to preserve `this` context when + * passing the method as an event listener. + * + * @internal + */ + this.handleReopen = () => { + this.virtualIdsByPhysicalId.clear(); + const { cancel, isCancelled } = makeCancelToken(); + this.cancelBackfill = cancel; + for (const subscription of this.virtualSubscriptionsById.values()) { + void (() => __awaiter(this, void 0, void 0, function* () { + try { + yield this.resubscribeAndBackfill(isCancelled, subscription); + } + catch (error) { + if (!isCancelled()) { + console.error(`Error while backfilling "${subscription.params[0]}" subscription. Some events may be missing.`, error); + } + } + }))(); + } + this.startHeartbeat(); + }; + /** + * Cancels the heartbeat and any pending backfills being performed. This is + * called when the websocket connection goes down or is disconnected. + * + * This is a field arrow function in order to preserve `this` context when + * passing the method as an event listener. + * + * @internal + */ + this.stopHeartbeatAndBackfill = () => { + if (this.heartbeatIntervalId != null) { + clearInterval(this.heartbeatIntervalId); + this.heartbeatIntervalId = undefined; + } + this.cancelBackfill(); + }; + this.apiKey = apiKey; + // Start heartbeat and backfiller for the websocket connection. + this.backfiller = new WebsocketBackfiller(this); + this.addSocketListeners(); + this.startHeartbeat(); + this.cancelBackfill = noop; + } + /** + * Overrides the `BaseProvider.getNetwork` method as implemented by ethers.js. + * + * This override allows the SDK to set the provider's network to values not + * yet supported by ethers.js. + * + * @internal + * @override + */ + static getNetwork(network) { + if (typeof network === 'string' && network in CustomNetworks) { + return CustomNetworks[network]; + } + // Call the standard ethers.js getNetwork method for other networks. + return getNetwork(network); + } + /** + * Overridden implementation of ethers that includes Alchemy based subscriptions. + * + * @param eventName Event to subscribe to + * @param listener The listener function to call when the event is triggered. + * @override + * @public + */ + // TODO: Override `Listener` type to get type autocompletions. + on(eventName, listener) { + return this._addEventListener(eventName, listener, false); + } + /** + * Overridden implementation of ethers that includes Alchemy based + * subscriptions. Adds a listener to the triggered for only the next + * {@link eventName} event, after which it will be removed. + * + * @param eventName Event to subscribe to + * @param listener The listener function to call when the event is triggered. + * @override + * @public + */ + // TODO: Override `Listener` type to get type autocompletions. + once(eventName, listener) { + return this._addEventListener(eventName, listener, true); + } + /** + * Removes the provided {@link listener} for the {@link eventName} event. If no + * listener is provided, all listeners for the event will be removed. + * + * @param eventName Event to unlisten to. + * @param listener The listener function to remove. + * @override + * @public + */ + off(eventName, listener) { + if (isAlchemyEvent(eventName)) { + return this._off(eventName, listener); + } + else { + return super.off(eventName, listener); + } + } + /** + * Remove all listeners for the provided {@link eventName} event. If no event + * is provided, all events and their listeners are removed. + * + * @param eventName The event to remove all listeners for. + * @override + * @public + */ + removeAllListeners(eventName) { + if (eventName !== undefined && isAlchemyEvent(eventName)) { + return this._removeAllListeners(eventName); + } + else { + return super.removeAllListeners(eventName); + } + } + /** + * Returns the number of listeners for the provided {@link eventName} event. If + * no event is provided, the total number of listeners for all events is returned. + * + * @param eventName The event to get the number of listeners for. + * @public + * @override + */ + listenerCount(eventName) { + if (eventName !== undefined && isAlchemyEvent(eventName)) { + return this._listenerCount(eventName); + } + else { + return super.listenerCount(eventName); + } + } + /** + * Returns an array of listeners for the provided {@link eventName} event. If + * no event is provided, all listeners will be included. + * + * @param eventName The event to get the listeners for. + * @public + * @override + */ + listeners(eventName) { + if (eventName !== undefined && isAlchemyEvent(eventName)) { + return this._listeners(eventName); + } + else { + return super.listeners(eventName); + } + } + /** + * Overrides the method in `BaseProvider` in order to properly format the + * Alchemy subscription events. + * + * @internal + * @override + */ + _addEventListener(eventName, listener, once) { + if (isAlchemyEvent(eventName)) { + verifyAlchemyEventName(eventName); + const event = new EthersEvent(getAlchemyEventTag(eventName), listener, once); + this._events.push(event); + this._startEvent(event); + return this; + } + else { + return super._addEventListener(eventName, listener, once); + } + } + /** + * Overrides the `_startEvent()` method in ethers.js's + * {@link WebSocketProvider} to include additional alchemy methods. + * + * @param event + * @override + * @internal + */ + _startEvent(event) { + // Check if the event type is a custom Alchemy subscription. + const customLogicTypes = [...ALCHEMY_EVENT_TYPES, 'block', 'filter']; + if (customLogicTypes.includes(event.type)) { + this.customStartEvent(event); + } + else { + super._startEvent(event); + } + } + /** + * Overridden from ethers.js's {@link WebSocketProvider} + * + * Modified in order to add mappings for backfilling. + * + * @internal + * @override + */ + _subscribe(tag, param, processFunc, event) { + return __awaiter(this, void 0, void 0, function* () { + let subIdPromise = this._subIds[tag]; + // BEGIN MODIFIED CODE + const startingBlockNumber = yield this.getBlockNumber(); + // END MODIFIED CODE + if (subIdPromise == null) { + subIdPromise = Promise.all(param).then(param => { + return this.send('eth_subscribe', param); + }); + this._subIds[tag] = subIdPromise; + } + const subId = yield subIdPromise; + // BEGIN MODIFIED CODE + const resolvedParams = yield Promise.all(param); + this.virtualSubscriptionsById.set(subId, { + event: event, + method: 'eth_subscribe', + params: resolvedParams, + startingBlockNumber, + virtualId: subId, + physicalId: subId, + sentEvents: [], + isBackfilling: false, + backfillBuffer: [] + }); + this.virtualIdsByPhysicalId.set(subId, subId); + // END MODIFIED CODE + this._subs[subId] = { tag, processFunc }; + }); + } + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @internal + * @override + */ + emit(eventName, ...args) { + if (isAlchemyEvent(eventName)) { + let result = false; + const stopped = []; + // This line is the only modified line from the original method. + const eventTag = getAlchemyEventTag(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; + } + else { + return super.emit(eventName, ...args); + } + } + /** @internal */ + sendBatch(parts) { + return __awaiter(this, void 0, void 0, function* () { + let nextId = 0; + const payload = parts.map(({ method, params }) => { + return { + method, + params, + jsonrpc: '2.0', + id: `alchemy-sdk:${nextId++}` + }; + }); + return this.sendBatchConcurrently(payload); + }); + } + /** @override */ + destroy() { + this.removeSocketListeners(); + this.stopHeartbeatAndBackfill(); + return super.destroy(); + } + /** + * Overrides the ether's `isCommunityResource()` method. Returns true if the + * current api key is the default key. + * + * @override + */ + isCommunityResource() { + return this.apiKey === DEFAULT_ALCHEMY_API_KEY; + } + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `WebSocketProvider._stopEvent()`. + * + * This method is copied over directly in order to support Alchemy's + * subscription type by allowing the provider to properly stop Alchemy's + * subscription events. + * + * @internal + */ + _stopEvent(event) { + let tag = event.tag; + // START MODIFIED CODE + if (ALCHEMY_EVENT_TYPES.includes(event.type)) { + // There are remaining pending transaction listeners. + if (this._events.filter(e => ALCHEMY_EVENT_TYPES.includes(e.type)).length) { + return; + } + // END MODIFIED CODE + } + else 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]; + void subId.then(subId => { + if (!this._subs[subId]) { + return; + } + delete this._subs[subId]; + void this.send('eth_unsubscribe', [subId]); + }); + } + /** @internal */ + addSocketListeners() { + this._websocket.addEventListener('message', this.handleMessage); + this._websocket.addEventListener('reopen', this.handleReopen); + this._websocket.addEventListener('down', this.stopHeartbeatAndBackfill); + } + /** @internal */ + removeSocketListeners() { + this._websocket.removeEventListener('message', this.handleMessage); + this._websocket.removeEventListener('reopen', this.handleReopen); + this._websocket.removeEventListener('down', this.stopHeartbeatAndBackfill); + } + /** + * Reopens the backfill based on + * + * @param isCancelled + * @param subscription + * @internal + */ + resubscribeAndBackfill(isCancelled, subscription) { + return __awaiter(this, void 0, void 0, function* () { + const { virtualId, method, params, sentEvents, backfillBuffer, startingBlockNumber } = subscription; + subscription.isBackfilling = true; + backfillBuffer.length = 0; + try { + const physicalId = yield this.send(method, params); + throwIfCancelled(isCancelled); + subscription.physicalId = physicalId; + this.virtualIdsByPhysicalId.set(physicalId, virtualId); + switch (params[0]) { + case 'newHeads': { + const backfillEvents = yield withBackoffRetries(() => withTimeout(this.backfiller.getNewHeadsBackfill(isCancelled, sentEvents, startingBlockNumber), BACKFILL_TIMEOUT), BACKFILL_RETRIES, () => !isCancelled()); + throwIfCancelled(isCancelled); + const events = dedupeNewHeads([...backfillEvents, ...backfillBuffer]); + events.forEach(event => this.emitNewHeadsEvent(virtualId, event)); + break; + } + case 'logs': { + const filter = params[1] || {}; + const backfillEvents = yield withBackoffRetries(() => withTimeout(this.backfiller.getLogsBackfill(isCancelled, filter, sentEvents, startingBlockNumber), BACKFILL_TIMEOUT), BACKFILL_RETRIES, () => !isCancelled()); + throwIfCancelled(isCancelled); + const events = dedupeLogs([...backfillEvents, ...backfillBuffer]); + events.forEach(event => this.emitLogsEvent(virtualId, event)); + break; + } + default: + break; + } + } + finally { + subscription.isBackfilling = false; + backfillBuffer.length = 0; + } + }); + } + /** @internal */ + emitNewHeadsEvent(virtualId, result) { + this.emitAndRememberEvent(virtualId, result, getNewHeadsBlockNumber); + } + /** @internal */ + emitLogsEvent(virtualId, result) { + this.emitAndRememberEvent(virtualId, result, getLogsBlockNumber); + } + /** + * Emits an event to consumers, but also remembers it in its subscriptions's + * `sentEvents` buffer so that we can detect re-orgs if the connection drops + * and needs to be reconnected. + * + * @internal + */ + emitAndRememberEvent(virtualId, result, getBlockNumber) { + this.rememberEvent(virtualId, result, getBlockNumber); + this.emitEvent(virtualId, result); + } + emitEvent(virtualId, result) { + const subscription = this.virtualSubscriptionsById.get(virtualId); + if (!subscription) { + return; + } + this.emitGenericEvent(subscription, result); + } + /** @internal */ + rememberEvent(virtualId, result, getBlockNumber) { + const subscription = this.virtualSubscriptionsById.get(virtualId); + if (!subscription) { + return; + } + // Web3 modifies these event objects once we pass them on (changing hex + // numbers to numbers). We want the original event, so make a defensive + // copy. + addToPastEventsBuffer(subscription.sentEvents, Object.assign({}, result), getBlockNumber); + } + /** @internal */ + emitGenericEvent(subscription, result) { + const emitFunction = this.emitProcessFn(subscription.event); + emitFunction(result); + } + /** + * Starts a heartbeat that pings the websocket server periodically to ensure + * that the connection stays open. + * + * @internal + */ + startHeartbeat() { + if (this.heartbeatIntervalId != null) { + return; + } + this.heartbeatIntervalId = setInterval(() => __awaiter(this, void 0, void 0, function* () { + try { + yield withTimeout(this.send('net_version'), HEARTBEAT_WAIT_TIME); + } + catch (_a) { + this._websocket.reconnect(); + } + }), HEARTBEAT_INTERVAL); + } + /** + * This method sends the batch concurrently as individual requests rather than + * as a batch, which was the original implementation. The original batch logic + * is preserved in this implementation in order for faster porting. + * + * @param payload + * @internal + */ + // TODO(cleanup): Refactor and remove usages of `sendBatch()`. + // TODO(errors): Use allSettled() once we have more error handling. + sendBatchConcurrently(payload) { + return __awaiter(this, void 0, void 0, function* () { + return Promise.all(payload.map(req => this.send(req.method, req.params))); + }); + } + /** @internal */ + customStartEvent(event) { + if (event.type === ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE) { + const { fromAddress, toAddress, hashesOnly } = event; + void this._subscribe(event.tag, [ + AlchemySubscription.PENDING_TRANSACTIONS, + { fromAddress, toAddress, hashesOnly } + ], this.emitProcessFn(event), event); + } + else if (event.type === ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE) { + const { addresses, includeRemoved, hashesOnly } = event; + void this._subscribe(event.tag, [ + AlchemySubscription.MINED_TRANSACTIONS, + { addresses, includeRemoved, hashesOnly } + ], this.emitProcessFn(event), event); + } + else if (event.type === 'block') { + void this._subscribe('block', ['newHeads'], this.emitProcessFn(event), event); + } + else if (event.type === 'filter') { + void this._subscribe(event.tag, ['logs', this._getFilter(event.filter)], this.emitProcessFn(event), event); + } + } + /** @internal */ + emitProcessFn(event) { + switch (event.type) { + case ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE: + return result => this.emit({ + method: AlchemySubscription.PENDING_TRANSACTIONS, + fromAddress: event.fromAddress, + toAddress: event.toAddress, + hashesOnly: event.hashesOnly + }, result); + case ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE: + return result => this.emit({ + method: AlchemySubscription.MINED_TRANSACTIONS, + addresses: event.addresses, + includeRemoved: event.includeRemoved, + hashesOnly: event.hashesOnly + }, result); + case 'block': + return result => { + const blockNumber = BigNumber.from(result.number).toNumber(); + this._emitted.block = blockNumber; + this.emit('block', blockNumber); + }; + case 'filter': + return result => { + if (result.removed == null) { + result.removed = false; + } + this.emit(event.filter, this.formatter.filterLog(result)); + }; + default: + throw new Error('Invalid event type to `emitProcessFn()`'); + } + } + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.off()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + _off(eventName, listener) { + if (listener == null) { + return this.removeAllListeners(eventName); + } + const stopped = []; + let found = false; + const eventTag = getAlchemyEventTag(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; + } + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.removeAllListeners()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + _removeAllListeners(eventName) { + let stopped = []; + if (eventName == null) { + stopped = this._events; + this._events = []; + } + else { + const eventTag = getAlchemyEventTag(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; + } + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.listenerCount()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + _listenerCount(eventName) { + if (!eventName) { + return this._events.length; + } + const eventTag = getAlchemyEventTag(eventName); + return this._events.filter(event => { + return event.tag === eventTag; + }).length; + } + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.listeners()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + _listeners(eventName) { + if (eventName == null) { + return this._events.map(event => event.listener); + } + const eventTag = getAlchemyEventTag(eventName); + return this._events + .filter(event => event.tag === eventTag) + .map(event => event.listener); + } +} +function getWebsocketConstructor() { + return isNodeEnvironment() ? require('websocket').w3cwebsocket : WebSocket; +} +function isNodeEnvironment() { + return (typeof process !== 'undefined' && + process != null && + process.versions != null && + process.versions.node != null); +} +// TODO(cleanup): Use class variable rather than passing `isCancelled` everywhere. +function makeCancelToken() { + let cancelled = false; + return { cancel: () => (cancelled = true), isCancelled: () => cancelled }; +} +// TODO(cleanup): replace with SDK's backoff implementation +const MIN_RETRY_DELAY = 1000; +const RETRY_BACKOFF_FACTOR = 2; +const MAX_RETRY_DELAY = 30000; +function withBackoffRetries(f, retryCount, shouldRetry = () => true) { + return __awaiter(this, void 0, void 0, function* () { + let nextWaitTime = 0; + let i = 0; + while (true) { + try { + return yield f(); + } + catch (error) { + i++; + if (i >= retryCount || !shouldRetry(error)) { + throw error; + } + yield delay(nextWaitTime); + if (!shouldRetry(error)) { + throw error; + } + nextWaitTime = + nextWaitTime === 0 + ? MIN_RETRY_DELAY + : Math.min(MAX_RETRY_DELAY, RETRY_BACKOFF_FACTOR * nextWaitTime); + } + } + }); +} +function delay(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); +} +function withTimeout(promise, ms) { + return Promise.race([ + promise, + new Promise((_, reject) => setTimeout(() => reject(new Error('Timeout')), ms)) + ]); +} +function getNewHeadsBlockNumber(event) { + return fromHex(event.number); +} +function getLogsBlockNumber(event) { + return fromHex(event.blockNumber); +} +function isResponse(message) { + return (Array.isArray(message) || + (message.jsonrpc === '2.0' && message.id !== undefined)); +} +function isSubscriptionEvent(message) { + return !isResponse(message); +} +function addToNewHeadsEventsBuffer(pastEvents, event) { + addToPastEventsBuffer(pastEvents, event, getNewHeadsBlockNumber); +} +function addToLogsEventsBuffer(pastEvents, event) { + addToPastEventsBuffer(pastEvents, event, getLogsBlockNumber); +} +/** + * Adds a new event to an array of events, evicting any events which are so old + * that they will no longer feasibly be part of a reorg. + */ +function addToPastEventsBuffer(pastEvents, event, getBlockNumber) { + const currentBlockNumber = getBlockNumber(event); + // Find first index of an event recent enough to retain, then drop everything + // at a lower index. + const firstGoodIndex = pastEvents.findIndex(e => getBlockNumber(e) > currentBlockNumber - RETAINED_EVENT_BLOCK_COUNT); + if (firstGoodIndex === -1) { + pastEvents.length = 0; + } + else { + pastEvents.splice(0, firstGoodIndex); + } + pastEvents.push(event); +} + +export { AlchemyWebSocketProvider }; +//# sourceMappingURL=alchemy-websocket-provider-35c345f7.js.map diff --git a/test/node_modules/alchemy-sdk/dist/esm/alchemy-websocket-provider-35c345f7.js.map b/test/node_modules/alchemy-sdk/dist/esm/alchemy-websocket-provider-35c345f7.js.map new file mode 100644 index 0000000..8cb4ab5 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/alchemy-websocket-provider-35c345f7.js.map @@ -0,0 +1 @@ +{"version":3,"file":"alchemy-websocket-provider-35c345f7.js","sources":["../../src/internal/websocket-backfiller.ts","../../src/api/alchemy-websocket-provider.ts"],"sourcesContent":["import { AlchemyWebSocketProvider } from '../api/alchemy-websocket-provider';\nimport { fromHex, toHex } from '../api/util';\n\nexport interface BatchPart {\n method: string;\n params?: any;\n}\n\nexport interface NewHeadsEvent {\n author: string;\n difficulty: string;\n extraData: string;\n gasLimit: string;\n gasUsed: string;\n hash: string;\n logsBloom: string;\n miner: string;\n mixHash: string;\n nonce: string;\n number: string;\n parentHash: string;\n receiptsRoot: string;\n sealFields: string[];\n sha3Uncles: string;\n size: string;\n stateRoot: string;\n timestamp: string;\n transactionsRoot: string;\n}\n\n/** The return type of eth_getBlocksByHash. */\nexport interface BlockHead extends NewHeadsEvent {\n totalDifficulty: string;\n transactions: any[];\n uncles: string[];\n}\n\nexport interface LogsEvent {\n address: string;\n blockHash: string;\n blockNumber: string;\n data: string;\n logIndex: string;\n topics: string[];\n transactionHash: string;\n transactionIndex: string;\n removed?: boolean;\n}\n\nexport interface LogsSubscriptionFilter {\n address?: string | string[];\n topics?: Array;\n}\n\nexport interface GetLogsOptions extends LogsSubscriptionFilter {\n fromBlock?: string;\n toBlock?: string;\n}\n\ninterface CommonAncestor {\n blockNumber: number;\n logIndex: number;\n}\n\n/**\n * The maximum number of blocks to backfill. If more than this many blocks have\n * been missed, then we'll sadly miss data, but we want to make sure we don't\n * end up requesting thousands of blocks if somebody left their laptop closed for a week.\n */\nconst MAX_BACKFILL_BLOCKS = 120;\n\n/**\n * The WebsocketBackfiller fetches events that were sent since a provided block\n * number. This is used in the {@link AlchemyWebSocketProvider} to backfill\n * events that were transmitted while the websocket connection was down.\n *\n * The backfiller backfills two main eth_subscribe events: `logs` and `newHeads`.\n *\n * @internal\n */\nexport class WebsocketBackfiller {\n // TODO: Use HTTP provider to do backfill.\n private maxBackfillBlocks = MAX_BACKFILL_BLOCKS;\n constructor(private readonly provider: AlchemyWebSocketProvider) {}\n\n /**\n * Runs backfill for `newHeads` events.\n *\n * @param isCancelled Whether the backfill request is cancelled.\n * @param previousHeads Previous head requests that were sent.\n * @param fromBlockNumber The block number to start backfilling from.\n * @returns A list of `newHeads` events that were sent since the last backfill.\n */\n async getNewHeadsBackfill(\n isCancelled: () => boolean,\n previousHeads: NewHeadsEvent[],\n fromBlockNumber: number\n ): Promise {\n throwIfCancelled(isCancelled);\n const toBlockNumber = await this.getBlockNumber();\n throwIfCancelled(isCancelled);\n\n // If there are no previous heads to fetch, return new heads since\n // `fromBlockNumber`, or up to maxBackfillBlocks from the current head.\n if (previousHeads.length === 0) {\n return this.getHeadEventsInRange(\n Math.max(fromBlockNumber, toBlockNumber - this.maxBackfillBlocks) + 1,\n toBlockNumber + 1\n );\n }\n\n // If the last emitted event is too far back in the past, there's no need\n // to backfill for reorgs. Just fetch the last `maxBackfillBlocks` worth of\n // new heads.\n const lastSeenBlockNumber = fromHex(\n previousHeads[previousHeads.length - 1].number\n );\n const minBlockNumber = toBlockNumber - this.maxBackfillBlocks + 1;\n if (lastSeenBlockNumber <= minBlockNumber) {\n return this.getHeadEventsInRange(minBlockNumber, toBlockNumber + 1);\n }\n\n // To capture all `newHeads` events, return all head events from the last\n // seen block number to current + any of the previous heads that were re-orged.\n const reorgHeads: NewHeadsEvent[] = await this.getReorgHeads(\n isCancelled,\n previousHeads\n );\n throwIfCancelled(isCancelled);\n const intermediateHeads: NewHeadsEvent[] = await this.getHeadEventsInRange(\n lastSeenBlockNumber + 1,\n toBlockNumber + 1\n );\n throwIfCancelled(isCancelled);\n return [...reorgHeads, ...intermediateHeads];\n }\n\n /**\n * Runs backfill for `logs` events.\n *\n * @param isCancelled Whether the backfill request is cancelled.\n * @param filter The filter object that accompanies a logs subscription.\n * @param previousLogs Previous log requests that were sent.\n * @param fromBlockNumber The block number to start backfilling from.\n */\n async getLogsBackfill(\n isCancelled: () => boolean,\n filter: LogsSubscriptionFilter,\n previousLogs: LogsEvent[],\n fromBlockNumber: number\n ): Promise {\n throwIfCancelled(isCancelled);\n const toBlockNumber = await this.getBlockNumber();\n throwIfCancelled(isCancelled);\n\n // If there are no previous logs to fetch, return new logs since\n // `fromBlockNumber`, or up to `maxBackfillBlocks` from the current head.\n if (previousLogs.length === 0) {\n return this.getLogsInRange(\n filter,\n Math.max(fromBlockNumber, toBlockNumber - this.maxBackfillBlocks) + 1,\n toBlockNumber + 1\n );\n }\n\n // If the last emitted log is too far back in the past, there's no need\n // to backfill for removed logs. Just fetch the last `maxBackfillBlocks`\n // worth of logs.\n const lastSeenBlockNumber = fromHex(\n previousLogs[previousLogs.length - 1].blockNumber\n );\n const minBlockNumber = toBlockNumber - this.maxBackfillBlocks + 1;\n if (lastSeenBlockNumber < minBlockNumber) {\n return this.getLogsInRange(filter, minBlockNumber, toBlockNumber + 1);\n }\n\n // Return all log events that have happened along with log events that have\n // been removed due to a chain reorg.\n const commonAncestor = await this.getCommonAncestor(\n isCancelled,\n previousLogs\n );\n throwIfCancelled(isCancelled);\n\n // All previous logs with a block number greater than the common ancestor\n // were part of a re-org, so mark them as such.\n const removedLogs = previousLogs\n .filter(log => fromHex(log.blockNumber) > commonAncestor.blockNumber)\n .map(log => ({ ...log, removed: true }));\n\n // If no common ancestor was found, start backfill from the oldest log's\n // block number.\n const fromBlockInclusive =\n commonAncestor.blockNumber === Number.NEGATIVE_INFINITY\n ? fromHex(previousLogs[0].blockNumber)\n : commonAncestor.blockNumber;\n let addedLogs = await this.getLogsInRange(\n filter,\n fromBlockInclusive,\n toBlockNumber + 1\n );\n\n // De-dupe any logs that were already emitted.\n addedLogs = addedLogs.filter(\n log =>\n log &&\n (fromHex(log.blockNumber) > commonAncestor.blockNumber ||\n fromHex(log.logIndex) > commonAncestor.logIndex)\n );\n\n throwIfCancelled(isCancelled);\n return [...removedLogs, ...addedLogs];\n }\n\n /**\n * Sets a new max backfill blocks. VISIBLE ONLY FOR TESTING.\n *\n * @internal\n */\n setMaxBackfillBlock(newMax: number): void {\n this.maxBackfillBlocks = newMax;\n }\n\n /**\n * Gets the current block number as a number.\n *\n * @private\n */\n private async getBlockNumber(): Promise {\n const blockNumberHex: string = await this.provider.send('eth_blockNumber');\n return fromHex(blockNumberHex);\n }\n\n /**\n * Gets all `newHead` events in the provided range. Note that the returned\n * heads do not include re-orged heads. Use {@link getReorgHeads} to find heads\n * that were part of a re-org.\n *\n * @private\n */\n private async getHeadEventsInRange(\n fromBlockInclusive: number,\n toBlockExclusive: number\n ): Promise {\n if (fromBlockInclusive >= toBlockExclusive) {\n return [];\n }\n const batchParts: BatchPart[] = [];\n for (let i = fromBlockInclusive; i < toBlockExclusive; i++) {\n batchParts.push({\n method: 'eth_getBlockByNumber',\n params: [toHex(i), false]\n });\n }\n\n // TODO: handle errors\n const blockHeads = await this.provider.sendBatch(batchParts);\n return blockHeads.map(toNewHeadsEvent);\n }\n\n /**\n * Returns all heads that were part of a reorg event.\n *\n * @private\n */\n private async getReorgHeads(\n isCancelled: () => boolean,\n previousHeads: NewHeadsEvent[]\n ): Promise {\n const result: NewHeadsEvent[] = [];\n // Iterate from the most recent head backwards in order to find the first\n // block that was part of a re-org.\n for (let i = previousHeads.length - 1; i >= 0; i--) {\n const oldEvent = previousHeads[i];\n const blockHead = await this.getBlockByNumber(fromHex(oldEvent.number));\n throwIfCancelled(isCancelled);\n\n // If the hashes match, then current head in the iteration was not re-orged.\n if (oldEvent.hash === blockHead.hash) {\n break;\n }\n\n result.push(toNewHeadsEvent(blockHead));\n }\n return result.reverse();\n }\n\n /**\n * Simple wrapper around `eth_getBlockByNumber` that returns the complete\n * block information for the provided block number.\n *\n * @private\n */\n private async getBlockByNumber(blockNumber: number): Promise {\n return this.provider.send('eth_getBlockByNumber', [\n toHex(blockNumber),\n false\n ]);\n }\n\n /**\n * Given a list of previous log events, finds the common block number from the\n * logs that matches the block head.\n *\n * This can be used to identify which logs are part of a re-org.\n *\n * Returns 1 less than the oldest log's block number if no common ancestor was found.\n *\n * @private\n */\n private async getCommonAncestor(\n isCancelled: () => boolean,\n previousLogs: LogsEvent[]\n ): Promise {\n // Iterate from the most recent head backwards in order to find the first\n // block that was part of a re-org.\n let blockHead = await this.getBlockByNumber(\n fromHex(previousLogs[previousLogs.length - 1].blockNumber)\n );\n throwIfCancelled(isCancelled);\n for (let i = previousLogs.length - 1; i >= 0; i--) {\n const oldLog = previousLogs[i];\n\n // Ensure that updated blocks are fetched every time the log's block number\n // changes.\n if (oldLog.blockNumber !== blockHead.number) {\n blockHead = await this.getBlockByNumber(fromHex(oldLog.blockNumber));\n }\n\n // Since logs are ordered in ascending order, the first log that matches\n // the hash should be the largest logIndex.\n if (oldLog.blockHash === blockHead.hash) {\n return {\n blockNumber: fromHex(oldLog.blockNumber),\n logIndex: fromHex(oldLog.logIndex)\n };\n }\n }\n return {\n blockNumber: Number.NEGATIVE_INFINITY,\n logIndex: Number.NEGATIVE_INFINITY\n };\n }\n\n /**\n * Gets all `logs` events in the provided range. Note that the returned logs\n * do not include removed logs.\n *\n * @private\n */ private async getLogsInRange(\n filter: LogsSubscriptionFilter,\n fromBlockInclusive: number,\n toBlockExclusive: number\n ): Promise {\n if (fromBlockInclusive >= toBlockExclusive) {\n return [];\n }\n const rangeFilter: GetLogsOptions = {\n ...filter,\n fromBlock: toHex(fromBlockInclusive),\n toBlock: toHex(toBlockExclusive - 1)\n };\n return this.provider.send('eth_getLogs', [rangeFilter]);\n }\n}\n\nfunction toNewHeadsEvent(head: BlockHead): NewHeadsEvent {\n const result: NewHeadsEvent & Partial = { ...head };\n delete result.totalDifficulty;\n delete result.transactions;\n delete result.uncles;\n return result;\n}\n\nexport function dedupeNewHeads(events: NewHeadsEvent[]): NewHeadsEvent[] {\n return dedupe(events, event => event.hash);\n}\n\nexport function dedupeLogs(events: LogsEvent[]): LogsEvent[] {\n return dedupe(events, event => `${event.blockHash}/${event.logIndex}`);\n}\n\nfunction dedupe(items: T[], getKey: (item: T) => any): T[] {\n const keysSeen: Set = new Set();\n const result: T[] = [];\n items.forEach(item => {\n const key = getKey(item);\n if (!keysSeen.has(key)) {\n keysSeen.add(key);\n result.push(item);\n }\n });\n return result;\n}\n\nconst CANCELLED = new Error('Cancelled');\nexport function throwIfCancelled(isCancelled: () => boolean): void {\n if (isCancelled()) {\n throw CANCELLED;\n }\n}\n","import SturdyWebSocket from 'sturdy-websocket';\n\nimport { Listener } from '@ethersproject/abstract-provider';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport {\n Networkish,\n getNetwork as getNetworkFromEthers\n} from '@ethersproject/networks';\nimport { Network as NetworkFromEthers } from '@ethersproject/networks/lib/types';\nimport {\n CommunityResourcable,\n WebSocketProvider\n} from '@ethersproject/providers';\n\nimport {\n EthersEvent,\n getAlchemyEventTag,\n isAlchemyEvent,\n verifyAlchemyEventName\n} from '../internal/ethers-event';\nimport {\n ALCHEMY_EVENT_TYPES,\n ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE,\n ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE,\n JsonRpcRequest,\n JsonRpcResponse,\n SingleOrBatchResponse,\n SubscriptionEvent,\n WebSocketMessage\n} from '../internal/internal-types';\nimport {\n BatchPart,\n LogsEvent,\n LogsSubscriptionFilter,\n NewHeadsEvent,\n WebsocketBackfiller,\n dedupeLogs,\n dedupeNewHeads,\n throwIfCancelled\n} from '../internal/websocket-backfiller';\nimport { AlchemyEventType, AlchemySubscription } from '../types/types';\nimport {\n CustomNetworks,\n DEFAULT_ALCHEMY_API_KEY,\n EthersNetwork,\n noop\n} from '../util/const';\nimport { VERSION } from '../version';\nimport { AlchemyConfig } from './alchemy-config';\nimport { AlchemyProvider } from './alchemy-provider';\nimport { fromHex } from './util';\n\nconst HEARTBEAT_INTERVAL = 30000;\nconst HEARTBEAT_WAIT_TIME = 10000;\nconst BACKFILL_TIMEOUT = 60000;\nconst BACKFILL_RETRIES = 5;\n/**\n * Subscriptions have a memory of recent events they have sent so that in the\n * event that they disconnect and need to backfill, they can detect re-orgs.\n * Keep a buffer that goes back at least these many blocks, the maximum amount\n * at which we might conceivably see a re-org.\n *\n * Note that while our buffer goes back this many blocks, it may contain more\n * than this many elements, since in the case of logs subscriptions more than\n * one event may be emitted for a block.\n */\nconst RETAINED_EVENT_BLOCK_COUNT = 10;\n\n/**\n * SDK's custom implementation fo the ethers.js's 'AlchemyWebSocketProvider'.\n *\n * Do not call this constructor directly. Instead, instantiate an instance of\n * {@link Alchemy} and call {@link Alchemy.config.getWebSocketProvider()}.\n *\n * @public\n */\nexport class AlchemyWebSocketProvider\n extends WebSocketProvider\n implements CommunityResourcable\n{\n _events: Array = [];\n readonly apiKey: string;\n\n // In the case of a WebSocket reconnection, all subscriptions are lost and we\n // create new ones to replace them, but we want to create the illusion that\n // the original subscriptions persist. Thus, maintain a mapping from the\n // \"virtual\" subscription ids which are visible to the consumer to the\n // \"physical\" subscription ids of the actual connections. This terminology is\n // borrowed from virtual and physical memory, which has a similar mapping.\n /** @internal */\n private readonly virtualSubscriptionsById: Map =\n new Map();\n /** @internal */\n private readonly virtualIdsByPhysicalId: Map = new Map();\n /** @internal */\n private readonly backfiller: WebsocketBackfiller;\n /** @internal */\n private heartbeatIntervalId?: NodeJS.Timeout;\n /** @internal */\n private cancelBackfill: () => void;\n\n /** @internal */\n constructor(config: AlchemyConfig, wsConstructor?: any) {\n // Normalize the API Key to a string.\n const apiKey = AlchemyProvider.getApiKey(config.apiKey);\n\n // Generate our own connection info with the correct endpoint URLs.\n const alchemyNetwork = AlchemyProvider.getAlchemyNetwork(config.network);\n const connection = AlchemyProvider.getAlchemyConnectionInfo(\n alchemyNetwork,\n apiKey,\n 'wss'\n );\n\n const protocol = `alchemy-sdk-${VERSION}`;\n\n // Use the provided config URL override if it exists, otherwise use the created one.\n const ws = new SturdyWebSocket(config.url ?? connection.url, protocol, {\n wsConstructor: wsConstructor ?? getWebsocketConstructor()\n });\n\n // Normalize the Alchemy named network input to the network names used by\n // ethers. This allows the parent super constructor in JsonRpcProvider to\n // correctly set the network.\n const ethersNetwork = EthersNetwork[alchemyNetwork];\n super(ws as any, ethersNetwork);\n this.apiKey = apiKey;\n\n // Start heartbeat and backfiller for the websocket connection.\n this.backfiller = new WebsocketBackfiller(this);\n this.addSocketListeners();\n this.startHeartbeat();\n this.cancelBackfill = noop;\n }\n\n /**\n * Overrides the `BaseProvider.getNetwork` method as implemented by ethers.js.\n *\n * This override allows the SDK to set the provider's network to values not\n * yet supported by ethers.js.\n *\n * @internal\n * @override\n */\n static getNetwork(network: Networkish): NetworkFromEthers {\n if (typeof network === 'string' && network in CustomNetworks) {\n return CustomNetworks[network];\n }\n\n // Call the standard ethers.js getNetwork method for other networks.\n return getNetworkFromEthers(network);\n }\n\n /**\n * Overridden implementation of ethers that includes Alchemy based subscriptions.\n *\n * @param eventName Event to subscribe to\n * @param listener The listener function to call when the event is triggered.\n * @override\n * @public\n */\n // TODO: Override `Listener` type to get type autocompletions.\n on(eventName: AlchemyEventType, listener: Listener): this {\n return this._addEventListener(eventName, listener, false);\n }\n\n /**\n * Overridden implementation of ethers that includes Alchemy based\n * subscriptions. Adds a listener to the triggered for only the next\n * {@link eventName} event, after which it will be removed.\n *\n * @param eventName Event to subscribe to\n * @param listener The listener function to call when the event is triggered.\n * @override\n * @public\n */\n // TODO: Override `Listener` type to get type autocompletions.\n once(eventName: AlchemyEventType, listener: Listener): this {\n return this._addEventListener(eventName, listener, true);\n }\n\n /**\n * Removes the provided {@link listener} for the {@link eventName} event. If no\n * listener is provided, all listeners for the event will be removed.\n *\n * @param eventName Event to unlisten to.\n * @param listener The listener function to remove.\n * @override\n * @public\n */\n off(eventName: AlchemyEventType, listener?: Listener): this {\n if (isAlchemyEvent(eventName)) {\n return this._off(eventName, listener);\n } else {\n return super.off(eventName, listener);\n }\n }\n\n /**\n * Remove all listeners for the provided {@link eventName} event. If no event\n * is provided, all events and their listeners are removed.\n *\n * @param eventName The event to remove all listeners for.\n * @override\n * @public\n */\n removeAllListeners(eventName?: AlchemyEventType): this {\n if (eventName !== undefined && isAlchemyEvent(eventName)) {\n return this._removeAllListeners(eventName);\n } else {\n return super.removeAllListeners(eventName);\n }\n }\n\n /**\n * Returns the number of listeners for the provided {@link eventName} event. If\n * no event is provided, the total number of listeners for all events is returned.\n *\n * @param eventName The event to get the number of listeners for.\n * @public\n * @override\n */\n listenerCount(eventName?: AlchemyEventType): number {\n if (eventName !== undefined && isAlchemyEvent(eventName)) {\n return this._listenerCount(eventName);\n } else {\n return super.listenerCount(eventName);\n }\n }\n\n /**\n * Returns an array of listeners for the provided {@link eventName} event. If\n * no event is provided, all listeners will be included.\n *\n * @param eventName The event to get the listeners for.\n * @public\n * @override\n */\n listeners(eventName?: AlchemyEventType): Array {\n if (eventName !== undefined && isAlchemyEvent(eventName)) {\n return this._listeners(eventName);\n } else {\n return super.listeners(eventName);\n }\n }\n\n /**\n * Overrides the method in `BaseProvider` in order to properly format the\n * Alchemy subscription events.\n *\n * @internal\n * @override\n */\n _addEventListener(\n eventName: AlchemyEventType,\n listener: Listener,\n once: boolean\n ): this {\n if (isAlchemyEvent(eventName)) {\n verifyAlchemyEventName(eventName);\n const event = new EthersEvent(\n getAlchemyEventTag(eventName),\n listener,\n once\n );\n this._events.push(event);\n this._startEvent(event);\n return this;\n } else {\n return super._addEventListener(eventName, listener, once);\n }\n }\n\n /**\n * Overrides the `_startEvent()` method in ethers.js's\n * {@link WebSocketProvider} to include additional alchemy methods.\n *\n * @param event\n * @override\n * @internal\n */\n _startEvent(event: EthersEvent): void {\n // Check if the event type is a custom Alchemy subscription.\n const customLogicTypes = [...ALCHEMY_EVENT_TYPES, 'block', 'filter'];\n if (customLogicTypes.includes(event.type)) {\n this.customStartEvent(event);\n } else {\n super._startEvent(event);\n }\n }\n\n /**\n * Overridden from ethers.js's {@link WebSocketProvider}\n *\n * Modified in order to add mappings for backfilling.\n *\n * @internal\n * @override\n */\n async _subscribe(\n tag: string,\n param: Array,\n processFunc: (result: any) => void,\n event?: EthersEvent\n ): Promise {\n let subIdPromise = this._subIds[tag];\n\n // BEGIN MODIFIED CODE\n const startingBlockNumber = await this.getBlockNumber();\n // END MODIFIED CODE\n\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\n // BEGIN MODIFIED CODE\n const resolvedParams = await Promise.all(param);\n this.virtualSubscriptionsById.set(subId, {\n event: event!,\n method: 'eth_subscribe',\n params: resolvedParams,\n startingBlockNumber,\n virtualId: subId,\n physicalId: subId,\n sentEvents: [],\n isBackfilling: false,\n backfillBuffer: []\n });\n this.virtualIdsByPhysicalId.set(subId, subId);\n\n // END MODIFIED CODE\n\n this._subs[subId] = { tag, processFunc };\n }\n\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `BaseProvider`.\n *\n * This method is copied over directly in order to implement Alchemy's unique\n * subscription types. The only difference is that this method calls\n * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in\n * order to parse the Alchemy subscription event.\n *\n * @internal\n * @override\n */\n emit(eventName: AlchemyEventType, ...args: Array): boolean {\n if (isAlchemyEvent(eventName)) {\n let result = false;\n\n const stopped: Array = [];\n\n // This line is the only modified line from the original method.\n const eventTag = getAlchemyEventTag(eventName);\n\n this._events = this._events.filter(event => {\n if (event.tag !== eventTag) {\n return true;\n }\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 => {\n this._stopEvent(event);\n });\n\n return result;\n } else {\n return super.emit(eventName, ...args);\n }\n }\n\n /** @internal */\n async sendBatch(parts: BatchPart[]): Promise {\n let nextId = 0;\n const payload: JsonRpcRequest[] = parts.map(({ method, params }) => {\n return {\n method,\n params,\n jsonrpc: '2.0',\n id: `alchemy-sdk:${nextId++}`\n };\n });\n\n return this.sendBatchConcurrently(payload);\n }\n\n /** @override */\n destroy(): Promise {\n this.removeSocketListeners();\n this.stopHeartbeatAndBackfill();\n return super.destroy();\n }\n\n /**\n * Overrides the ether's `isCommunityResource()` method. Returns true if the\n * current api key is the default key.\n *\n * @override\n */\n isCommunityResource(): boolean {\n return this.apiKey === DEFAULT_ALCHEMY_API_KEY;\n }\n\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `WebSocketProvider._stopEvent()`.\n *\n * This method is copied over directly in order to support Alchemy's\n * subscription type by allowing the provider to properly stop Alchemy's\n * subscription events.\n *\n * @internal\n */\n _stopEvent(event: EthersEvent): void {\n let tag = event.tag;\n\n // START MODIFIED CODE\n if (ALCHEMY_EVENT_TYPES.includes(event.type)) {\n // There are remaining pending transaction listeners.\n if (\n this._events.filter(e => ALCHEMY_EVENT_TYPES.includes(e.type)).length\n ) {\n return;\n }\n // END MODIFIED CODE\n } else 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) {\n return;\n }\n\n delete this._subIds[tag];\n void subId.then(subId => {\n if (!this._subs[subId]) {\n return;\n }\n delete this._subs[subId];\n void this.send('eth_unsubscribe', [subId]);\n });\n }\n\n /** @internal */\n private addSocketListeners(): void {\n this._websocket.addEventListener('message', this.handleMessage);\n this._websocket.addEventListener('reopen', this.handleReopen);\n this._websocket.addEventListener('down', this.stopHeartbeatAndBackfill);\n }\n\n /** @internal */\n private removeSocketListeners(): void {\n this._websocket.removeEventListener('message', this.handleMessage);\n this._websocket.removeEventListener('reopen', this.handleReopen);\n this._websocket.removeEventListener('down', this.stopHeartbeatAndBackfill);\n }\n\n /**\n * The underlying ethers {@link WebSocketProvider} already handles and emits\n * messages. To allow backfilling, track all messages that are emitted.\n *\n * This is a field arrow function in order to preserve `this` context when\n * passing the method as an event listener.\n *\n * @internal\n */\n private handleMessage = (event: MessageEvent): void => {\n const message: WebSocketMessage = JSON.parse(event.data);\n if (!isSubscriptionEvent(message)) {\n return;\n }\n const physicalId = message.params.subscription;\n const virtualId = this.virtualIdsByPhysicalId.get(physicalId);\n if (!virtualId) {\n return;\n }\n const subscription = this.virtualSubscriptionsById.get(virtualId)!;\n if (subscription.method !== 'eth_subscribe') {\n return;\n }\n\n switch (subscription.params[0]) {\n case 'newHeads': {\n const newHeadsSubscription = subscription as NewHeadsSubscription;\n const newHeadsMessage = message as SubscriptionEvent;\n const { isBackfilling, backfillBuffer } = newHeadsSubscription;\n const { result } = newHeadsMessage.params;\n if (isBackfilling) {\n addToNewHeadsEventsBuffer(backfillBuffer, result);\n } else if (physicalId !== virtualId) {\n // In the case of a re-opened subscription, ethers will not emit the\n // event, so the SDK has to.\n this.emitAndRememberEvent(virtualId, result, getNewHeadsBlockNumber);\n } else {\n // Ethers subscription mapping will emit the event, just store it.\n this.rememberEvent(virtualId, result, getNewHeadsBlockNumber);\n }\n break;\n }\n case 'logs': {\n const logsSubscription = subscription as LogsSubscription;\n const logsMessage = message as SubscriptionEvent;\n const { isBackfilling, backfillBuffer } = logsSubscription;\n const { result } = logsMessage.params;\n if (isBackfilling) {\n addToLogsEventsBuffer(backfillBuffer, result);\n } else if (virtualId !== physicalId) {\n this.emitAndRememberEvent(virtualId, result, getLogsBlockNumber);\n } else {\n this.rememberEvent(virtualId, result, getLogsBlockNumber);\n }\n break;\n }\n default:\n if (physicalId !== virtualId) {\n // In the case of a re-opened subscription, ethers will not emit the\n // event, so the SDK has to.\n const { result } = (message as SubscriptionEvent).params;\n this.emitEvent(virtualId, result);\n }\n }\n };\n\n /**\n * When the websocket connection reopens:\n *\n * 1. Resubscribe to all existing subscriptions and start backfilling\n * 2. Restart heart beat.\n *\n * This is a field arrow function in order to preserve `this` context when\n * passing the method as an event listener.\n *\n * @internal\n */\n private handleReopen = () => {\n this.virtualIdsByPhysicalId.clear();\n const { cancel, isCancelled } = makeCancelToken();\n this.cancelBackfill = cancel;\n for (const subscription of this.virtualSubscriptionsById.values()) {\n void (async () => {\n try {\n await this.resubscribeAndBackfill(isCancelled, subscription);\n } catch (error) {\n if (!isCancelled()) {\n console.error(\n `Error while backfilling \"${subscription.params[0]}\" subscription. Some events may be missing.`,\n error\n );\n }\n }\n })();\n }\n this.startHeartbeat();\n };\n\n /**\n * Reopens the backfill based on\n *\n * @param isCancelled\n * @param subscription\n * @internal\n */\n private async resubscribeAndBackfill(\n isCancelled: () => boolean,\n subscription: VirtualSubscription\n ): Promise {\n const {\n virtualId,\n method,\n params,\n sentEvents,\n backfillBuffer,\n startingBlockNumber\n } = subscription;\n subscription.isBackfilling = true;\n backfillBuffer.length = 0;\n try {\n const physicalId = await this.send(method, params);\n throwIfCancelled(isCancelled);\n subscription.physicalId = physicalId;\n this.virtualIdsByPhysicalId.set(physicalId, virtualId);\n switch (params[0]) {\n case 'newHeads': {\n const backfillEvents = await withBackoffRetries(\n () =>\n withTimeout(\n this.backfiller.getNewHeadsBackfill(\n isCancelled,\n sentEvents,\n startingBlockNumber\n ),\n BACKFILL_TIMEOUT\n ),\n BACKFILL_RETRIES,\n () => !isCancelled()\n );\n throwIfCancelled(isCancelled);\n const events = dedupeNewHeads([...backfillEvents, ...backfillBuffer]);\n events.forEach(event => this.emitNewHeadsEvent(virtualId, event));\n break;\n }\n case 'logs': {\n const filter: LogsSubscriptionFilter = params[1] || {};\n const backfillEvents = await withBackoffRetries(\n () =>\n withTimeout(\n this.backfiller.getLogsBackfill(\n isCancelled,\n filter,\n sentEvents,\n startingBlockNumber\n ),\n BACKFILL_TIMEOUT\n ),\n BACKFILL_RETRIES,\n () => !isCancelled()\n );\n throwIfCancelled(isCancelled);\n const events = dedupeLogs([...backfillEvents, ...backfillBuffer]);\n events.forEach(event => this.emitLogsEvent(virtualId, event));\n break;\n }\n default:\n break;\n }\n } finally {\n subscription.isBackfilling = false;\n backfillBuffer.length = 0;\n }\n }\n\n /**\n * Cancels the heartbeat and any pending backfills being performed. This is\n * called when the websocket connection goes down or is disconnected.\n *\n * This is a field arrow function in order to preserve `this` context when\n * passing the method as an event listener.\n *\n * @internal\n */\n private stopHeartbeatAndBackfill = () => {\n if (this.heartbeatIntervalId != null) {\n clearInterval(this.heartbeatIntervalId);\n this.heartbeatIntervalId = undefined;\n }\n this.cancelBackfill();\n };\n\n /** @internal */\n private emitNewHeadsEvent(virtualId: string, result: NewHeadsEvent): void {\n this.emitAndRememberEvent(virtualId, result, getNewHeadsBlockNumber);\n }\n\n /** @internal */\n private emitLogsEvent(virtualId: string, result: LogsEvent): void {\n this.emitAndRememberEvent(virtualId, result, getLogsBlockNumber);\n }\n\n /**\n * Emits an event to consumers, but also remembers it in its subscriptions's\n * `sentEvents` buffer so that we can detect re-orgs if the connection drops\n * and needs to be reconnected.\n *\n * @internal\n */\n private emitAndRememberEvent(\n virtualId: string,\n result: T,\n getBlockNumber: (result: T) => number\n ): void {\n this.rememberEvent(virtualId, result, getBlockNumber);\n this.emitEvent(virtualId, result);\n }\n\n private emitEvent(virtualId: string, result: T): void {\n const subscription = this.virtualSubscriptionsById.get(virtualId);\n if (!subscription) {\n return;\n }\n this.emitGenericEvent(subscription, result);\n }\n\n /** @internal */\n private rememberEvent(\n virtualId: string,\n result: T,\n getBlockNumber: (result: T) => number\n ): void {\n const subscription = this.virtualSubscriptionsById.get(virtualId);\n if (!subscription) {\n return;\n }\n // Web3 modifies these event objects once we pass them on (changing hex\n // numbers to numbers). We want the original event, so make a defensive\n // copy.\n addToPastEventsBuffer(\n subscription.sentEvents,\n { ...result },\n getBlockNumber\n );\n }\n\n /** @internal */\n private emitGenericEvent(\n subscription: VirtualSubscription,\n result: any\n ): void {\n const emitFunction = this.emitProcessFn(subscription.event);\n emitFunction(result);\n }\n\n /**\n * Starts a heartbeat that pings the websocket server periodically to ensure\n * that the connection stays open.\n *\n * @internal\n */\n private startHeartbeat(): void {\n if (this.heartbeatIntervalId != null) {\n return;\n }\n this.heartbeatIntervalId = setInterval(async () => {\n try {\n await withTimeout(this.send('net_version'), HEARTBEAT_WAIT_TIME);\n } catch {\n this._websocket.reconnect();\n }\n }, HEARTBEAT_INTERVAL);\n }\n\n /**\n * This method sends the batch concurrently as individual requests rather than\n * as a batch, which was the original implementation. The original batch logic\n * is preserved in this implementation in order for faster porting.\n *\n * @param payload\n * @internal\n */\n // TODO(cleanup): Refactor and remove usages of `sendBatch()`.\n // TODO(errors): Use allSettled() once we have more error handling.\n private async sendBatchConcurrently(\n payload: JsonRpcRequest[]\n ): Promise {\n return Promise.all(payload.map(req => this.send(req.method, req.params)));\n }\n\n /** @internal */\n private customStartEvent(event: EthersEvent): void {\n if (event.type === ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE) {\n const { fromAddress, toAddress, hashesOnly } = event;\n void this._subscribe(\n event.tag,\n [\n AlchemySubscription.PENDING_TRANSACTIONS,\n { fromAddress, toAddress, hashesOnly }\n ],\n this.emitProcessFn(event),\n event\n );\n } else if (event.type === ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE) {\n const { addresses, includeRemoved, hashesOnly } = event;\n void this._subscribe(\n event.tag,\n [\n AlchemySubscription.MINED_TRANSACTIONS,\n { addresses, includeRemoved, hashesOnly }\n ],\n this.emitProcessFn(event),\n event\n );\n } else if (event.type === 'block') {\n void this._subscribe(\n 'block',\n ['newHeads'],\n this.emitProcessFn(event),\n event\n );\n } else if (event.type === 'filter') {\n void this._subscribe(\n event.tag,\n ['logs', this._getFilter(event.filter)],\n this.emitProcessFn(event),\n event\n );\n }\n }\n\n /** @internal */\n private emitProcessFn(event: EthersEvent): (result: any) => void {\n switch (event.type) {\n case ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE:\n return result =>\n this.emit(\n {\n method: AlchemySubscription.PENDING_TRANSACTIONS,\n fromAddress: event.fromAddress,\n toAddress: event.toAddress,\n hashesOnly: event.hashesOnly\n },\n result\n );\n case ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE:\n return result =>\n this.emit(\n {\n method: AlchemySubscription.MINED_TRANSACTIONS,\n addresses: event.addresses,\n includeRemoved: event.includeRemoved,\n hashesOnly: event.hashesOnly\n },\n result\n );\n case 'block':\n return result => {\n const blockNumber = BigNumber.from(result.number).toNumber();\n this._emitted.block = blockNumber;\n this.emit('block', blockNumber);\n };\n case 'filter':\n return result => {\n if (result.removed == null) {\n result.removed = false;\n }\n this.emit(event.filter, this.formatter.filterLog(result));\n };\n default:\n throw new Error('Invalid event type to `emitProcessFn()`');\n }\n }\n\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `BaseProvider.off()`.\n *\n * This method is copied over directly in order to implement Alchemy's unique\n * subscription types. The only difference is that this method calls\n * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in\n * order to parse the Alchemy subscription event.\n *\n * @private\n */\n private _off(eventName: AlchemyEventType, listener?: Listener): this {\n if (listener == null) {\n return this.removeAllListeners(eventName);\n }\n\n const stopped: Array = [];\n\n let found = false;\n const eventTag = getAlchemyEventTag(eventName);\n this._events = this._events.filter(event => {\n if (event.tag !== eventTag || event.listener != listener) {\n return true;\n }\n if (found) {\n return true;\n }\n found = true;\n stopped.push(event);\n return false;\n });\n\n stopped.forEach(event => {\n this._stopEvent(event);\n });\n\n return this;\n }\n\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `BaseProvider.removeAllListeners()`.\n *\n * This method is copied over directly in order to implement Alchemy's unique\n * subscription types. The only difference is that this method calls\n * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in\n * order to parse the Alchemy subscription event.\n *\n * @private\n */\n private _removeAllListeners(eventName: AlchemyEventType): this {\n let stopped: Array = [];\n if (eventName == null) {\n stopped = this._events;\n\n this._events = [];\n } else {\n const eventTag = getAlchemyEventTag(eventName);\n this._events = this._events.filter(event => {\n if (event.tag !== eventTag) {\n return true;\n }\n stopped.push(event);\n return false;\n });\n }\n\n stopped.forEach(event => {\n this._stopEvent(event);\n });\n\n return this;\n }\n\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `BaseProvider.listenerCount()`.\n *\n * This method is copied over directly in order to implement Alchemy's unique\n * subscription types. The only difference is that this method calls\n * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in\n * order to parse the Alchemy subscription event.\n *\n * @private\n */\n private _listenerCount(eventName?: AlchemyEventType): number {\n if (!eventName) {\n return this._events.length;\n }\n\n const eventTag = getAlchemyEventTag(eventName);\n return this._events.filter(event => {\n return event.tag === eventTag;\n }).length;\n }\n\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `BaseProvider.listeners()`.\n *\n * This method is copied over directly in order to implement Alchemy's unique\n * subscription types. The only difference is that this method calls\n * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in\n * order to parse the Alchemy subscription event.\n *\n * @private\n */\n private _listeners(eventName?: AlchemyEventType): Array {\n if (eventName == null) {\n return this._events.map(event => event.listener);\n }\n\n const eventTag = getAlchemyEventTag(eventName);\n return this._events\n .filter(event => event.tag === eventTag)\n .map(event => event.listener);\n }\n}\n\nfunction getWebsocketConstructor(): any {\n return isNodeEnvironment() ? require('websocket').w3cwebsocket : WebSocket;\n}\n\nfunction isNodeEnvironment(): boolean {\n return (\n typeof process !== 'undefined' &&\n process != null &&\n process.versions != null &&\n process.versions.node != null\n );\n}\n\n/** @internal */\ninterface CancelToken {\n cancel(): void;\n isCancelled(): boolean;\n}\n\ninterface VirtualSubscription {\n event: EthersEvent;\n virtualId: string;\n physicalId: string;\n method: string;\n params: any[];\n isBackfilling: boolean;\n startingBlockNumber: number;\n sentEvents: any[];\n backfillBuffer: any[];\n}\n\ninterface NewHeadsSubscription extends VirtualSubscription {\n method: 'eth_subscribe';\n params: ['newHeads'];\n isBackfilling: boolean;\n sentEvents: NewHeadsEvent[];\n backfillBuffer: NewHeadsEvent[];\n}\n\ninterface LogsSubscription extends VirtualSubscription {\n method: 'eth_subscribe';\n params: ['logs', LogsSubscriptionFilter?];\n isBackfilling: boolean;\n sentEvents: LogsEvent[];\n backfillBuffer: LogsEvent[];\n}\n\n// TODO(cleanup): Use class variable rather than passing `isCancelled` everywhere.\nfunction makeCancelToken(): CancelToken {\n let cancelled = false;\n return { cancel: () => (cancelled = true), isCancelled: () => cancelled };\n}\n\n// TODO(cleanup): replace with SDK's backoff implementation\nconst MIN_RETRY_DELAY = 1000;\nconst RETRY_BACKOFF_FACTOR = 2;\nconst MAX_RETRY_DELAY = 30000;\n\nasync function withBackoffRetries(\n f: () => Promise,\n retryCount: number,\n shouldRetry: (error: unknown) => boolean = () => true\n): Promise {\n let nextWaitTime = 0;\n let i = 0;\n while (true) {\n try {\n return await f();\n } catch (error) {\n i++;\n if (i >= retryCount || !shouldRetry(error)) {\n throw error;\n }\n await delay(nextWaitTime);\n if (!shouldRetry(error)) {\n throw error;\n }\n nextWaitTime =\n nextWaitTime === 0\n ? MIN_RETRY_DELAY\n : Math.min(MAX_RETRY_DELAY, RETRY_BACKOFF_FACTOR * nextWaitTime);\n }\n }\n}\n\nfunction delay(ms: number): Promise {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n\nfunction withTimeout(promise: Promise, ms: number): Promise {\n return Promise.race([\n promise,\n new Promise((_, reject) =>\n setTimeout(() => reject(new Error('Timeout')), ms)\n )\n ]);\n}\n\nfunction getNewHeadsBlockNumber(event: NewHeadsEvent): number {\n return fromHex(event.number);\n}\n\nfunction getLogsBlockNumber(event: LogsEvent): number {\n return fromHex(event.blockNumber);\n}\n\nfunction isResponse(\n message: WebSocketMessage\n): message is SingleOrBatchResponse {\n return (\n Array.isArray(message) ||\n (message.jsonrpc === '2.0' && (message as JsonRpcResponse).id !== undefined)\n );\n}\n\nfunction isSubscriptionEvent(\n message: WebSocketMessage\n): message is SubscriptionEvent {\n return !isResponse(message);\n}\n\nfunction addToNewHeadsEventsBuffer(\n pastEvents: NewHeadsEvent[],\n event: NewHeadsEvent\n): void {\n addToPastEventsBuffer(pastEvents, event, getNewHeadsBlockNumber);\n}\n\nfunction addToLogsEventsBuffer(\n pastEvents: LogsEvent[],\n event: LogsEvent\n): void {\n addToPastEventsBuffer(pastEvents, event, getLogsBlockNumber);\n}\n\n/**\n * Adds a new event to an array of events, evicting any events which are so old\n * that they will no longer feasibly be part of a reorg.\n */\nfunction addToPastEventsBuffer(\n pastEvents: T[],\n event: T,\n getBlockNumber: (event: T) => number\n): void {\n const currentBlockNumber = getBlockNumber(event);\n // Find first index of an event recent enough to retain, then drop everything\n // at a lower index.\n const firstGoodIndex = pastEvents.findIndex(\n e => getBlockNumber(e) > currentBlockNumber - RETAINED_EVENT_BLOCK_COUNT\n );\n if (firstGoodIndex === -1) {\n pastEvents.length = 0;\n } else {\n pastEvents.splice(0, firstGoodIndex);\n }\n pastEvents.push(event);\n}\n"],"names":["getNetworkFromEthers"],"mappings":";;;;;;;;;;;;;AAgEA;;;;AAIG;AACH,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC;;;;;;;;AAQG;MACU,mBAAmB,CAAA;AAG9B,IAAA,WAAA,CAA6B,QAAkC,EAAA;QAAlC,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAA0B;;QADvD,IAAiB,CAAA,iBAAA,GAAG,mBAAmB,CAAC;KACmB;AAEnE;;;;;;;AAOG;AACG,IAAA,mBAAmB,CACvB,WAA0B,EAC1B,aAA8B,EAC9B,eAAuB,EAAA;;YAEvB,gBAAgB,CAAC,WAAW,CAAC,CAAC;AAC9B,YAAA,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;YAClD,gBAAgB,CAAC,WAAW,CAAC,CAAC;;;AAI9B,YAAA,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE;gBAC9B,OAAO,IAAI,CAAC,oBAAoB,CAC9B,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,aAAa,GAAG,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,EACrE,aAAa,GAAG,CAAC,CAClB,CAAC;AACH,aAAA;;;;AAKD,YAAA,MAAM,mBAAmB,GAAG,OAAO,CACjC,aAAa,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,MAAM,CAC/C,CAAC;YACF,MAAM,cAA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,QAAA,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;AACvB,KAAA;AAAM,SAAA;AACL,QAAA,UAAU,CAAC,MAAM,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;AACtC,KAAA;AACD,IAAA,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACzB;;;;"} \ No newline at end of file diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/api/alchemy-config.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/alchemy-config.d.ts new file mode 100644 index 0000000..0ba461a --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/alchemy-config.d.ts @@ -0,0 +1,54 @@ +import { AlchemySettings, Network } from '../types/types'; +import type { AlchemyProvider } from './alchemy-provider'; +import type { AlchemyWebSocketProvider } from './alchemy-websocket-provider'; +/** + * This class holds the config information for the SDK client instance and + * exposes the underlying providers for more advanced use cases. + * + * @public + */ +export declare class AlchemyConfig { + /** The Alchemy API key. */ + readonly apiKey: string; + /** The Network that this SDK is associated with. */ + readonly network: Network; + /** The maximum number of retries to perform. */ + readonly maxRetries: number; + /** Setting to enable automatic batching on json-rpc requests. Defaults to false.*/ + readonly batchRequests: boolean; + /** + * The optional hardcoded URL to send requests to instead of using the network + * and apiKey. + */ + readonly url?: string; + /** The optional Alchemy auth token to use when sending requests with the Notify API. */ + readonly authToken?: string; + constructor(config?: AlchemySettings); + /** + * Returns an AlchemyProvider instance. Only one provider is created per + * Alchemy instance. + * + * The AlchemyProvider is a wrapper around ether's `AlchemyProvider` class and + * has been expanded to support Alchemy's Enhanced APIs. + * + * Most common methods on the provider are available as top-level methods on + * the {@link Alchemy} instance, but the provider is exposed here to access + * other less-common methods. + * + * @public + */ + getProvider(): Promise; + /** + * Returns an AlchemyWebsocketProvider instance. Only one provider is created + * per Alchemy instance. + * + * The AlchemyWebSocketProvider is a wrapper around ether's + * `AlchemyWebSocketProvider` class and has been expanded to support Alchemy's + * Subscription APIs, automatic backfilling, and other performance improvements. + * + * Most common methods on the provider are available as top-level methods on + * the {@link Alchemy} instance, but the provider is exposed here to access + * other less-common methods. + */ + getWebSocketProvider(): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/api/alchemy-contract.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/alchemy-contract.d.ts new file mode 100644 index 0000000..a1766ad --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/alchemy-contract.d.ts @@ -0,0 +1,17 @@ +import { Contract as EthersContract, ContractFactory as EthersContractFactory } from '@ethersproject/contracts'; +/** + * The Contract class is a wrapper around the Contract class from ethers.js and + * is exported here for convenience. + * + * @public + */ +export declare class Contract extends EthersContract { +} +/** + * The ContractFactory class is a wrapper around the ContractFactory class from + * ethers.js and is exported here for convenience. + * + * @public + */ +export declare class ContractFactory extends EthersContractFactory { +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/api/alchemy-provider.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/alchemy-provider.d.ts new file mode 100644 index 0000000..4e2d71e --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/alchemy-provider.d.ts @@ -0,0 +1,40 @@ +import { Network as NetworkFromEthers } from '@ethersproject/networks'; +import { CommunityResourcable, JsonRpcProvider } from '@ethersproject/providers'; +/** + * SDK's custom implementation of ethers.js's 'AlchemyProvider'. + * + * Do not call this constructor directly. Instead, instantiate an instance of + * {@link Alchemy} and call {@link Alchemy.config.getProvider()}. + * + * @public + */ +export declare class AlchemyProvider extends JsonRpcProvider implements CommunityResourcable { + readonly apiKey: string; + readonly maxRetries: number; + readonly batchRequests: boolean; + /** + * Overrides the method in ethers.js's `StaticJsonRpcProvider` class. This + * method is called when calling methods on the parent class `BaseProvider`. + * + * @override + */ + detectNetwork(): Promise; + _startPending(): void; + /** + * Overrides the ether's `isCommunityResource()` method. Returns true if the + * current api key is the default key. + * + * @override + */ + isCommunityResource(): boolean; + /** + * Overrides the base {@link JsonRpcProvider.send} method to implement custom + * logic for sending requests to Alchemy. + * + * @param method The method name to use for the request. + * @param params The parameters to use for the request. + * @override + * @public + */ + send(method: string, params: Array): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/api/alchemy-wallet.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/alchemy-wallet.d.ts new file mode 100644 index 0000000..026d469 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/alchemy-wallet.d.ts @@ -0,0 +1,103 @@ +import { BlockTag, FeeData, Provider, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; +import { ExternallyOwnedAccount } from '@ethersproject/abstract-signer'; +import { BigNumber } from '@ethersproject/bignumber'; +import { BytesLike } from '@ethersproject/bytes'; +import { Deferrable } from '@ethersproject/properties'; +import { SigningKey } from '@ethersproject/signing-key'; +import { Wallet as EthersWallet } from '@ethersproject/wallet'; +import { Alchemy } from './alchemy'; +/** + * The Wallet class inherits Signer and can sign transactions and messages using + * a private key as a standard Externally Owned Account (EOA). + * + * SDK's custom implementation of Ethers.js's 'Wallet'. + * + * Primary difference from Ethers.js 'Wallet' is that you can pass in either a + * Provider or an Alchemy object. This implementation will intelligently detect + * the format and set the provider accordingly. + * + * @public + * @override + */ +export declare class Wallet extends EthersWallet { + private alchemyProviderPromise?; + /** + * Overload permits users to pass in either a standard Provider or an Alchemy + * object. The constructor will detect the object type and handle appropriately. + * + * @override + */ + constructor(privateKey: BytesLike | ExternallyOwnedAccount | SigningKey, alchemyOrProvider?: Alchemy | Provider); + /** + * Returns the balance of this wallet at blockTag. + * + * @param blockTag The block to check the balance of + * @override + */ + getBalance(blockTag?: BlockTag): Promise; + /** + * Returns the number of transactions this account has ever sent. This is the + * value required to be included in transactions as the nonce. + * + * @param blockTag The block to check the transaction count on + * @override + */ + getTransactionCount(blockTag?: BlockTag): Promise; + /** + * Returns the result of estimating the cost to send the transactionRequest, + * with this account address being used as the from field. + * + * @param transaction Transaction to estimate the gas on + * @override + */ + estimateGas(transaction: Deferrable): Promise; + /** + * Returns the result of calling using the transactionRequest, with this + * account address being used as the from field. + * + * @param transaction To make a call on + * @param blockTag The block to make the call on + * @override + */ + call(transaction: Deferrable, blockTag?: BlockTag): Promise; + /** + * Populates all fields in a transaction, signs it and sends it to the network + * + * @override + */ + sendTransaction(transaction: Deferrable): Promise; + /** + * Returns the chain ID this wallet is connected to. + * + * @override + */ + getChainId(): Promise; + /** + * Returns the current gas price. + * + * @override + */ + getGasPrice(): Promise; + /** + * Returns the current recommended FeeData to use in a transaction. + * + * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas + * should be used. + * + * For legacy transactions and networks which do not support EIP-1559, the + * gasPrice should be used. + * + * @override + */ + getFeeData(): Promise; + /** + * Looks up the address of name. If the name is not owned, or does not have a + * Resolver configured, or the Resolver does not have an address configured, + * null is returned. + * + * @param name Name of the ENS address + * @override + */ + resolveName(name: string): Promise; + private getWallet; +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/api/alchemy-websocket-provider.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/alchemy-websocket-provider.d.ts new file mode 100644 index 0000000..ce7a704 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/alchemy-websocket-provider.d.ts @@ -0,0 +1,135 @@ +import { Listener } from '@ethersproject/abstract-provider'; +import { CommunityResourcable, WebSocketProvider } from '@ethersproject/providers'; +import { EthersEvent } from '../internal/ethers-event'; +import { AlchemyEventType } from '../types/types'; +/** + * SDK's custom implementation fo the ethers.js's 'AlchemyWebSocketProvider'. + * + * Do not call this constructor directly. Instead, instantiate an instance of + * {@link Alchemy} and call {@link Alchemy.config.getWebSocketProvider()}. + * + * @public + */ +export declare class AlchemyWebSocketProvider extends WebSocketProvider implements CommunityResourcable { + _events: Array; + readonly apiKey: string; + /** + * Overridden implementation of ethers that includes Alchemy based subscriptions. + * + * @param eventName Event to subscribe to + * @param listener The listener function to call when the event is triggered. + * @override + * @public + */ + on(eventName: AlchemyEventType, listener: Listener): this; + /** + * Overridden implementation of ethers that includes Alchemy based + * subscriptions. Adds a listener to the triggered for only the next + * {@link eventName} event, after which it will be removed. + * + * @param eventName Event to subscribe to + * @param listener The listener function to call when the event is triggered. + * @override + * @public + */ + once(eventName: AlchemyEventType, listener: Listener): this; + /** + * Removes the provided {@link listener} for the {@link eventName} event. If no + * listener is provided, all listeners for the event will be removed. + * + * @param eventName Event to unlisten to. + * @param listener The listener function to remove. + * @override + * @public + */ + off(eventName: AlchemyEventType, listener?: Listener): this; + /** + * Remove all listeners for the provided {@link eventName} event. If no event + * is provided, all events and their listeners are removed. + * + * @param eventName The event to remove all listeners for. + * @override + * @public + */ + removeAllListeners(eventName?: AlchemyEventType): this; + /** + * Returns the number of listeners for the provided {@link eventName} event. If + * no event is provided, the total number of listeners for all events is returned. + * + * @param eventName The event to get the number of listeners for. + * @public + * @override + */ + listenerCount(eventName?: AlchemyEventType): number; + /** + * Returns an array of listeners for the provided {@link eventName} event. If + * no event is provided, all listeners will be included. + * + * @param eventName The event to get the listeners for. + * @public + * @override + */ + listeners(eventName?: AlchemyEventType): Array; + /** @override */ + destroy(): Promise; + /** + * Overrides the ether's `isCommunityResource()` method. Returns true if the + * current api key is the default key. + * + * @override + */ + isCommunityResource(): boolean; + private emitEvent; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.off()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _off; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.removeAllListeners()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _removeAllListeners; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.listenerCount()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _listenerCount; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.listeners()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _listeners; +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/api/alchemy.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/alchemy.d.ts new file mode 100644 index 0000000..edc191f --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/alchemy.d.ts @@ -0,0 +1,49 @@ +import { AlchemySettings } from '../types/types'; +import { AlchemyConfig } from './alchemy-config'; +import { CoreNamespace } from './core-namespace'; +import { NftNamespace } from './nft-namespace'; +import { NotifyNamespace } from './notify-namespace'; +import { TransactNamespace } from './transact-namespace'; +import { WebSocketNamespace } from './websocket-namespace'; +/** + * The Alchemy SDK client. This class is the main entry point into Alchemy's + * APIs and separates functionality into different namespaces. + * + * Each SDK instance is associated with a specific network and API key. To use a + * different network or API key, create a new instance of {@link Alchemy}. + * + * @public + */ +export declare class Alchemy { + /** + * The `core` namespace contains the core eth json-rpc calls and Alchemy's + * Enhanced APIs. + */ + readonly core: CoreNamespace; + /** The `nft` namespace contains methods for Alchemy's NFT API. */ + readonly nft: NftNamespace; + /** The `ws` namespace contains methods for using WebSockets and creating subscriptions. */ + readonly ws: WebSocketNamespace; + /** + * The `transact` namespace contains methods for sending transactions and + * checking on the state of submitted transasctions. + */ + readonly transact: TransactNamespace; + /** + * Holds the setting information for the instance of the Alchemy SDK client + * and allows access to the underlying providers. + */ + readonly config: AlchemyConfig; + /** + * The `notify` namespace contains methods for creating and managing webhooks + * as part of the Notify API. + */ + readonly notify: NotifyNamespace; + /** + * @param {string} [settings.apiKey] - The API key to use for Alchemy + * @param {Network} [settings.network] - The network to use for Alchemy + * @param {number} [settings.maxRetries] - The maximum number of retries to attempt + * @public + */ + constructor(settings?: AlchemySettings); +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/api/core-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/core-namespace.d.ts new file mode 100644 index 0000000..5a5827d --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/core-namespace.d.ts @@ -0,0 +1,311 @@ +import type { Block, BlockTag, BlockWithTransactions, FeeData, Filter, FilterByBlockHash, Log, TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; +import type { BigNumber, BigNumberish } from '@ethersproject/bignumber'; +import type { Network as EthersNetworkAlias } from '@ethersproject/networks/lib/types'; +import type { Deferrable } from '@ethersproject/properties'; +import { AssetTransfersParams, AssetTransfersResponse, AssetTransfersWithMetadataParams, AssetTransfersWithMetadataResponse, DeployResult, TokenBalancesOptionsDefaultTokens, TokenBalancesOptionsErc20, TokenBalancesResponse, TokenBalancesResponseErc20, TokenMetadataResponse, TransactionReceiptsParams, TransactionReceiptsResponse } from '../types/types'; +/** + * The core namespace contains all commonly-used [Ethers.js + * Provider](https://docs.ethers.io/v5/api/providers/api-providers/#AlchemyProvider) + * methods. If you are already using Ethers.js, you should be simply able to + * replace the Ethers.js Provider object with `alchemy.core` when accessing + * provider methods and it should just work. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.core`. + */ +export declare class CoreNamespace { + private readonly config; + /** + * Returns the balance of a given address as of the provided block. + * + * @param addressOrName The address or name of the account to get the balance for. + * @param blockTag The optional block number or hash to get the balance for. + * Defaults to 'latest' if unspecified. + * @public + */ + getBalance(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Returns the contract code of the provided address at the block. If there is + * no contract deployed, the result is `0x`. + * + * @param addressOrName The address or name of the account to get the code for. + * @param blockTag The optional block number or hash to get the code for. + * Defaults to 'latest' if unspecified. + * @public + */ + getCode(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Return the value of the provided position at the provided address, at the + * provided block in `Bytes32` format. + * + * @param addressOrName The address or name of the account to get the code for. + * @param position The position of the storage slot to get. + * @param blockTag The optional block number or hash to get the code for. + * Defaults to 'latest' if unspecified. + * @public + */ + getStorageAt(addressOrName: string | Promise, position: BigNumberish | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Returns the number of transactions ever sent from the provided address, as + * of the provided block tag. This value is used as the nonce for the next + * transaction from the address sent to the network. + * + * @param addressOrName The address or name of the account to get the nonce for. + * @param blockTag The optional block number or hash to get the nonce for. + * @public + */ + getTransactionCount(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Returns the block from the network based on the provided block number or + * hash. Transactions on the block are represented as an array of transaction + * hashes. To get the full transaction details on the block, use + * {@link getBlockWithTransactions} instead. + * + * @param blockHashOrBlockTag The block number or hash to get the block for. + * @public + */ + getBlock(blockHashOrBlockTag: BlockTag | string | Promise): Promise; + /** + * Returns the block from the network based on the provided block number or + * hash. Transactions on the block are represented as an array of + * {@link TransactionResponse} objects. + * + * @param blockHashOrBlockTag The block number or hash to get the block for. + * @public + */ + getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise): Promise; + /** + * Returns the {@link EthersNetworkAlias} Alchemy is connected to. + * + * @public + */ + getNetwork(): Promise; + /** + * Returns the block number of the most recently mined block. + * + * @public + */ + getBlockNumber(): Promise; + /** + * Returns the best guess of the current gas price to use in a transaction. + * + * @public + */ + getGasPrice(): Promise; + /** + * Returns the recommended fee data to use in a transaction. + * + * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas + * should be used. + * + * For legacy transactions and networks which do not support EIP-1559, the + * gasPrice should be used. + * + * @public + */ + getFeeData(): Promise; + /** + * Returns a Promise which will stall until the network has heen established, + * ignoring errors due to the target node not being active yet. + * + * This can be used for testing or attaching scripts to wait until the node is + * up and running smoothly. + * + * @public + */ + ready(): Promise; + /** + * Returns the result of executing the transaction, using call. A call does + * not require any ether, but cannot change any state. This is useful for + * calling getters on Contracts. + * + * @param transaction The transaction to execute. + * @param blockTag The optional block number or hash to get the call for. + * @public + */ + call(transaction: Deferrable, blockTag?: BlockTag | Promise): Promise; + /** + * Returns an estimate of the amount of gas that would be required to submit + * transaction to the network. + * + * An estimate may not be accurate since there could be another transaction on + * the network that was not accounted for, but after being mined affects the + * relevant state. + * + * This is an alias for {@link TransactNamespace.estimateGas}. + * + * @param transaction The transaction to estimate gas for. + * @public + */ + estimateGas(transaction: Deferrable): Promise; + /** + * Returns the transaction with hash or null if the transaction is unknown. + * + * If a transaction has not been mined, this method will search the + * transaction pool. Various backends may have more restrictive transaction + * pool access (e.g. if the gas price is too low or the transaction was only + * recently sent and not yet indexed) in which case this method may also return null. + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransaction(transactionHash: string | Promise): Promise; + /** + * Returns the transaction receipt for hash or null if the transaction has not + * been mined. + * + * To stall until the transaction has been mined, consider the + * waitForTransaction method below. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransactionReceipt(transactionHash: string | Promise): Promise; + /** + * Submits transaction to the network to be mined. The transaction must be + * signed, and be valid (i.e. the nonce is correct and the account has + * sufficient balance to pay for the transaction). + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param signedTransaction The signed transaction to send. + * @public + */ + sendTransaction(signedTransaction: string | Promise): Promise; + /** + * Returns a promise which will not resolve until specified transaction hash is mined. + * + * If {@link confirmations} is 0, this method is non-blocking and if the + * transaction has not been mined returns null. Otherwise, this method will + * block until the transaction has confirmed blocks mined on top of the block + * in which it was mined. + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to wait for. + * @param confirmations The number of blocks to wait for. + * @param timeout The maximum time to wait for the transaction to confirm. + * @public + */ + waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise; + /** + * Returns an array of logs that match the provided filter. + * + * @param filter The filter object to use. + * @public + */ + getLogs(filter: Filter | FilterByBlockHash | Promise): Promise>; + /** + * Allows sending a raw message to the Alchemy backend. + * + * @param method The method to call. + * @param params The parameters to pass to the method. + * @public + */ + send(method: string, params: Array): Promise; + /** + * Finds the address that deployed the provided contract and block number it + * was deployed in. + * + * NOTE: This method performs a binary search across all blocks since genesis + * and can take a long time to complete. This method is a convenience method + * that will eventually be replaced by a single call to an Alchemy endpoint + * with this information cached. + * + * @param contractAddress - The contract address to find the deployer for. + * @beta + */ + findContractDeployer(contractAddress: string): Promise; + /** + * Returns the ERC-20 token balances for a specific owner address. + * + * @param addressOrName The owner address to get the token balances for. + * @public + */ + getTokenBalances(addressOrName: string): Promise; + /** + * Returns the token balances for a specific owner address given a list of contracts. + * + * @param addressOrName The owner address to get the token balances for. + * @param contractAddresses A list of contract addresses to check. If omitted, + * all ERC-20 tokens will be checked. + * @public + */ + getTokenBalances(addressOrName: string, contractAddresses?: string[]): Promise; + /** + * Returns the ERC-20 token balances for a specific owner. + * + * This overload covers the erc-20 token type which includes a page key in the response. + * + * @param addressOrName The owner address to get the token balances for. + * @param options Token type options set to ERC-20 with optional page key. + * @public + */ + getTokenBalances(addressOrName: string, options: TokenBalancesOptionsErc20): Promise; + /** + * Returns the token balances for a specific owner, fetching from the top 100 + * tokens by 24 hour volume. + * + * This overload covers the default token type which includes a page key in + * the response. + * + * @param addressOrName The owner address to get the token balances for. + * @param options Token type options set to ERC-20 with optional page key. + * @public + */ + getTokenBalances(addressOrName: string, options: TokenBalancesOptionsDefaultTokens): Promise; + /** + * Returns metadata for a given token contract address. + * + * @param address The contract address to get metadata for. + * @public + */ + getTokenMetadata(address: string): Promise; + /** + * Get transactions for specific addresses. See the web documentation for the + * full details: + * https://docs.alchemy.com/alchemy/enhanced-apis/transfers-api#alchemy_getassettransfers + * + * This overload requires {@link AssetTransfersWithMetadataParams.withMetadata} + * to be set to `true`, which results in additional metadata returned in the + * response object. + * + * @param params An object containing fields for the asset transfer query + * @public + */ + getAssetTransfers(params: AssetTransfersWithMetadataParams): Promise; + /** + * Get transactions for specific addresses. See the web documentation for the + * full details: + * https://docs.alchemy.com/alchemy/enhanced-apis/transfers-api#alchemy_getassettransfers + * + * @param params An object containing fields for the asset transfer query. + * @public + */ + getAssetTransfers(params: AssetTransfersParams): Promise; + /** + * Gets all transaction receipts for a given block by number or block hash. + * + * @param params An object containing fields for the transaction receipt query. + * @public + */ + getTransactionReceipts(params: TransactionReceiptsParams): Promise; + /** + * Returns the underlying owner address for the provided ENS address, or `null` + * if the ENS name does not have an underlying address. + * + * @param name The ENS address name to resolve. + */ + resolveName(name: string): Promise; + /** + * Performs a reverse lookup of the address in ENS using the Reverse Registrar. If the name does not exist, or the forward lookup does not match, null is returned. + * + * An ENS name requires additional configuration to setup a reverse record, so not all ENS addresses will map back to the original ENS domain. + * + * @param address The address to look up the ENS domain name for. + */ + lookupAddress(address: string): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/api/nft-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/nft-namespace.d.ts new file mode 100644 index 0000000..09e756e --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/nft-namespace.d.ts @@ -0,0 +1,275 @@ +import type { BigNumberish } from '@ethersproject/bignumber'; +import { GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftResponse, NftAttributeRarity, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, NftTokenType, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult } from '../types/types'; +import { BaseNft, Nft, NftContract } from './nft'; +/** + * The NFT namespace contains all the functionality related to NFTs. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.nft`. + */ +export declare class NftNamespace { + private readonly config; + /** + * Get the NFT metadata associated with the provided parameters. + * + * @param contractAddress - The contract address of the NFT. + * @param tokenId - Token id of the NFT. + * @param tokenType - Optionally specify the type of token to speed up the query. + * @param tokenUriTimeoutInMs - No set timeout by default - When metadata is + * requested, this parameter is the timeout (in milliseconds) for the + * website hosting the metadata to respond. If you want to only access the + * cache and not live fetch any metadata for cache misses then set this value to 0. + * @public + */ + getNftMetadata(contractAddress: string, tokenId: BigNumberish, tokenType?: NftTokenType, tokenUriTimeoutInMs?: number): Promise; + /** + * Gets the NFT metadata for multiple NFT tokens. + * + * @param tokens An array of NFT tokens to fetch metadata for. + * @param options Configuration options for making the request. + */ + getNftMetadataBatch(tokens: Array, options?: NftMetadataBatchOptions): Promise; + /** + * Get the NFT collection metadata associated with the provided parameters. + * + * @param contractAddress - The contract address of the NFT. + * @public + */ + getContractMetadata(contractAddress: string): Promise; + /** + * Fetches all NFTs for a given owner and yields them in an async iterable. + * + * This method returns the full NFT for the owner and pages through all page + * keys until all NFTs have been fetched. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwnerIterator(owner: string, options?: GetNftsForOwnerOptions): AsyncIterable; + /** + * Fetches all NFTs for a given owner and yields them in an async iterable. + * + * This method returns the base NFTs that omit the associated metadata and + * pages through all page keys until all NFTs have been fetched. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwnerIterator(owner: string, options?: GetBaseNftsForOwnerOptions): AsyncIterable; + /** + * Get all NFTs for an owner. + * + * This method returns the full NFTs in the contract. To get all NFTs without + * their associated metadata, use {@link GetBaseNftsForOwnerOptions}. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwner(owner: string, options?: GetNftsForOwnerOptions): Promise; + /** + * Get all base NFTs for an owner. + * + * This method returns the base NFTs that omit the associated metadata. To get + * all NFTs with their associated metadata, use {@link GetNftsForOwnerOptions}. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwner(owner: string, options?: GetBaseNftsForOwnerOptions): Promise; + /** + * Get all NFTs for a given contract address. + * + * This method returns the full NFTs in the contract. To get all NFTs without + * their associated metadata, use {@link GetBaseNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The parameters to use for the request. or + * {@link NftContractNftsResponse} response. + * @beta + */ + getNftsForContract(contractAddress: string, options?: GetNftsForContractOptions): Promise; + /** + * Get all base NFTs for a given contract address. + * + * This method returns the base NFTs that omit the associated metadata. To get + * all NFTs with their associated metadata, use {@link GetNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftsForContract(contractAddress: string, options?: GetBaseNftsForContractOptions): Promise; + /** + * Fetches all NFTs for a given contract address and yields them in an async iterable. + * + * This method returns the full NFTs in the contract and pages through all + * page keys until all NFTs have been fetched. To get all NFTs without their + * associated metadata, use {@link GetBaseNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftsForContractIterator(contractAddress: string, options?: GetNftsForContractOptions): AsyncIterable; + /** + * Fetches all base NFTs for a given contract address and yields them in an + * async iterable. + * + * This method returns the base NFTs that omit the associated metadata and + * pages through all page keys until all NFTs have been fetched. To get all + * NFTs with their associated metadata, use {@link GetNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftsForContractIterator(contractAddress: string, options?: GetBaseNftsForContractOptions): AsyncIterable; + /** + * Gets all the owners for a given NFT contract along with the token balance. + * + * @param contractAddress - The NFT contract to get the owners for. + * @param options Optional parameters to use for the request. + * @public + */ + getOwnersForContract(contractAddress: string, options: GetOwnersForContractWithTokenBalancesOptions): Promise; + /** + * Gets all the owners for a given NFT contract. + * + * Note that token balances are omitted by default. To include token balances + * for each owner, use {@link GetOwnersForContractWithTokenBalancesOptions}, + * which has the `withTokenBalances` field set to `true`. + * + * @param contractAddress - The NFT contract to get the owners for. + * @param options Optional parameters to use for the request. + * @public + */ + getOwnersForContract(contractAddress: string, options?: GetOwnersForContractOptions): Promise; + /** + * Gets all the owners for a given NFT contract address and token ID. + * + * @param contractAddress - The NFT contract address. + * @param tokenId - Token id of the NFT. + * @beta + */ + getOwnersForNft(contractAddress: string, tokenId: BigNumberish): Promise; + /** + * Gets all NFT contracts held by the specified owner address. + * + * @param owner - Address for NFT owner (can be in ENS format!). + * @param options - The optional parameters to use for the request. + * @public + */ + getContractsForOwner(owner: string, options?: GetContractsForOwnerOptions): Promise; + /** + * DEPRECATED - Checks that the provided owner address owns one of more of the + * provided NFTs. + * + * @deprecated - Use {@link verifyNftOwnership} instead. This method will be + * removed in a future release. + * @param owner - The owner address to check. + * @param contractAddresses - An array of NFT contract addresses to check ownership for. + */ + checkNftOwnership(owner: string, contractAddresses: string[]): Promise; + /** + * Checks that the provided owner address owns one of more of the provided + * NFT. Returns a boolean indicating whether the owner address owns the provided NFT. + * + * @param owner - The owner address to check. + * @param contractAddress - An NFT contract address to check ownership for. + */ + verifyNftOwnership(owner: string, contractAddress: string): Promise; + /** + * Checks which of the provided NFTs the owner address owns. Returns a map of + * contract address to a boolean indicating whether the owner address owns the NFT. + * + * @param owner - The owner address to check. + * @param contractAddresses - An array NFT contract address to check ownership for. + */ + verifyNftOwnership(owner: string, contractAddresses: string[]): Promise<{ + [contractAddress: string]: boolean; + }>; + /** + * Returns whether a contract is marked as spam or not by Alchemy. For more + * information on how we classify spam, go to our NFT API FAQ at + * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification. + * + * @param contractAddress - The contract address to check. + * @beta + */ + isSpamContract(contractAddress: string): Promise; + /** + * Returns a list of all spam contracts marked by Alchemy. For details on how + * Alchemy marks spam contracts, go to + * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification. + * + * @beta + */ + getSpamContracts(): Promise; + /** + * Returns the floor prices of a NFT contract by marketplace. + * + * @param contractAddress - The contract address for the NFT collection. + * @beta + */ + getFloorPrice(contractAddress: string): Promise; + /** + * Returns NFT sales that have happened through on-chain marketplaces. + * + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftSales(options?: GetNftSalesOptions): Promise; + getNftSales(options?: GetNftSalesOptionsByContractAddress): Promise; + /** + * Get the rarity of each attribute of an NFT. + * + * @param contractAddress - Contract address for the NFT collection. + * @param tokenId - Token id of the NFT. + */ + computeRarity(contractAddress: string, tokenId: BigNumberish): Promise; + /** + * Search for a keyword across metadata of all ERC-721 and ERC-1155 smart contracts. + * + * @param query - The search string that you want to search for in contract metadata. + */ + searchContractMetadata(query: string): Promise; + /** + * Get a summary of attribute prevalence for an NFT collection. + * + * @param contractAddress - Contract address for the NFT collection. + */ + summarizeNftAttributes(contractAddress: string): Promise; + /** + * Refreshes the cached metadata for a provided NFT contract address and token + * id. Returns a boolean value indicating whether the metadata was refreshed. + * + * This method is useful when you want to refresh the metadata for a NFT that + * has been updated since the last time it was fetched. Note that the backend + * only allows one refresh per token every 15 minutes, globally for all users. + * The last refresh time for an NFT can be accessed on the + * {@link Nft.timeLastUpdated} field. + * + * To trigger a refresh for all NFTs in a contract, use {@link refreshContract} instead. + * + * @param contractAddress - The contract address of the NFT. + * @param tokenId - The token id of the NFT. + */ + refreshNftMetadata(contractAddress: string, tokenId: BigNumberish): Promise; + /** + * Triggers a metadata refresh all NFTs in the provided contract address. This + * method is useful after an NFT collection is revealed. + * + * Refreshes are queued on the Alchemy backend and may take time to fully + * process. To refresh the metadata for a specific token, use the + * {@link refreshNftMetadata} method instead. + * + * @param contractAddress - The contract address of the NFT collection. + * @beta + */ + refreshContract(contractAddress: string): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/api/nft.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/nft.d.ts new file mode 100644 index 0000000..b51d2bd --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/nft.d.ts @@ -0,0 +1,86 @@ +import { Media, NftMetadata, NftTokenType, OpenSeaCollectionMetadata, SpamInfo, TokenUri } from '../types/types'; +/** + * Alchemy representation of a base NFT contract that doesn't contain metadata. + * + * The BaseNftContract does not hold any metadata information and only contains + * the address. The NftContract additionally contains the tokenType, name, + * symbol, and more. + * + * @public + */ +export interface BaseNftContract { + /** The address of the contract. */ + address: string; +} +/** + * Alchemy representation of an NFT contract. + * + * The BaseNftContract does not hold any metadata information and only contains + * the address. The NftContract additionally contains the tokenType, name, + * symbol, and more. + * + * @public + */ +export interface NftContract extends BaseNftContract { + /** The type of the token in the contract. */ + tokenType: NftTokenType; + /** The name of the contract. */ + name?: string; + /** The symbol of the contract. */ + symbol?: string; + /** + * The number of NFTs in the contract as an integer string. This field is only + * available on ERC-721 contracts. + */ + totalSupply?: string; + /** OpenSea's metadata for the contract. */ + openSea?: OpenSeaCollectionMetadata; +} +/** + * Alchemy representation of an NFT that doesn't contain metadata. + * + * The BaseNft object does not hold any metadata information and only contains + * the NFT contract and token ID. The Nft object additionally contains the NFT + * metadata, token URI information, and media. + * + * @public + */ +export interface BaseNft { + contract: BaseNftContract; + /** The NFT token ID as an integer string. */ + tokenId: string; + /** The type of ERC token, if known. */ + tokenType: NftTokenType; +} +/** + * Alchemy representation of an NFT. + * + * The BaseNft object does not hold any metadata information and only contains + * the NFT contract and token ID. The Nft object additionally contains the NFT + * metadata, token URI information, and media. + * + * @public + */ +export interface Nft extends BaseNft { + /** The NFT's underlying contract and relevant contract metadata. */ + contract: NftContract; + /** The NFT title. */ + title: string; + /** The NFT description. */ + description: string; + /** When the NFT was last updated in the blockchain. Represented in ISO-8601 format. */ + timeLastUpdated: string; + /** Holds an error message if there was an issue fetching metadata. */ + metadataError: string | undefined; + /** + * The raw metadata fetched from the metadata URL specified by the NFT. The + * field is undefined if Alchemy was unable to fetch metadata. + */ + rawMetadata: NftMetadata | undefined; + /** URIs for accessing the NFT's metadata blob. */ + tokenUri: TokenUri | undefined; + /** URIs for accessing the NFT's media assets. */ + media: Media[]; + /** Detailed information on why an NFT was classified as spam. */ + spamInfo?: SpamInfo; +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/api/notify-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/notify-namespace.d.ts new file mode 100644 index 0000000..c70f03d --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/notify-namespace.d.ts @@ -0,0 +1,143 @@ +import { AddressActivityResponse, AddressActivityWebhook, AddressWebhookParams, AddressWebhookUpdate, DroppedTransactionWebhook, GetAddressesOptions, GetAllWebhooksResponse, MinedTransactionWebhook, NftActivityWebhook, NftFiltersResponse, NftWebhookParams, NftWebhookUpdate, TransactionWebhookParams, Webhook, WebhookType } from '../types/types'; +/** + * The Notify namespace contains methods used for creating, reading, updating, + * and deleting webhooks in the Notify API. + * + * To use the methods in the API, you must provide your team's auth token in the + * {@link AlchemySettings.authToken} field when configuring + * {@link AlchemySettings}. The auth token can be found in the Alchemy Dashboard + * on the Notify tab. + * + * Note that not all networks are supported in the Notify API. Please consult + * the documentation for which networks are supported. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the notify + * namespace via `alchemy.notify`. + */ +export declare class NotifyNamespace { + private readonly config; + /** + * Get all webhooks on your team. + * + * The team is determined by the `authToken` provided into the {@link AlchemySettings} + * object when creating a new {@link Alchemy} instance. + * + * This method returns a response object containing all the webhooks + */ + getAllWebhooks(): Promise; + /** + * Get all addresses tracked for the provided {@link AddressActivityWebhook}. + * + * @param addressWebhook The Address Activity webhook. + * @param options Pagination options when fetching addresses. + */ + getAddresses(addressWebhook: AddressActivityWebhook, options?: GetAddressesOptions): Promise; + /** + * Get all addresses tracked for the provided {@link AddressActivityWebhook}. + * + * @param webhookId The id of the address activity webhook. Passing in an id + * of a non-address-activity webhook will result in a response object with + * no addresses. + * @param options Pagination options when fetching addresses. + */ + getAddresses(webhookId: string, options?: GetAddressesOptions): Promise; + /** + * Get all NFTs tracked for the provided {@link NftActivityWebhook}. + * + * @param nftWebhook The NFT Activity webhook. + * @param options Pagination options when fetching NFT filters. + */ + getNftFilters(nftWebhook: NftActivityWebhook, options?: GetAddressesOptions): Promise; + /** + * Get all NFT filters tracked for the provided {@link NftActivityWebhook}. + * + * @param webhookId The id of the NFT activity webhook. Passing in an + * incorrect id of a non-NFT webhook will result in a response object with + * no filters. + * @param options Pagination options when fetching nft filters. + */ + getNftFilters(webhookId: string, options?: GetAddressesOptions): Promise; + /** + * Update a {@link NftActivityWebhook}'s active status or NFT filters. + * + * @param nftWebhook The NFT activity webhook to update. + * @param update Object containing the update. + */ + updateWebhook(nftWebhook: NftActivityWebhook, update: NftWebhookUpdate): Promise; + /** + * Update a {@link NftActivityWebhook}'s active status or NFT filters. + * + * @param nftWebhookId The id of the NFT activity webhook. + * @param update Object containing the update. + */ + updateWebhook(nftWebhookId: string, update: NftWebhookUpdate): Promise; + /** + * Update a {@link AddressActivityWebhook}'s active status or addresses. + * + * @param addressWebhook The address activity webhook to update. + * @param update Object containing the update. + */ + updateWebhook(addressWebhook: AddressActivityWebhook, update: AddressWebhookUpdate): Promise; + /** + * Update a {@link AddressActivityWebhook}'s active status or addresses. + * + * @param addressWebhookId The id of the address activity webhook. + * @param update Object containing the update. + */ + updateWebhook(addressWebhookId: string, update: AddressWebhookUpdate): Promise; + /** + * Create a new {@link MinedTransactionWebhook} to track mined transactions + * sent by the app associated with the app id. + * + * Note that the webhook will be created in the app network of the provided app id. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the app id. + */ + createWebhook(url: string, type: WebhookType.MINED_TRANSACTION, params: TransactionWebhookParams): Promise; + /** + * Create a new {@link DroppedTransactionWebhook} to track dropped transactions + * sent by the app associated with the app id. + * + * Note that the webhook will be created in the app network of the provided app id. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the app id. + */ + createWebhook(url: string, type: WebhookType.DROPPED_TRANSACTION, params: TransactionWebhookParams): Promise; + /** + * Create a new {@link NftActivityWebhook} to track NFT transfers. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the NFTs to track and the + * network the webhook should be created on. + */ + createWebhook(url: string, type: WebhookType.NFT_ACTIVITY, params: NftWebhookParams): Promise; + /** + * Create a new {@link AddressActivityWebhook} to track address activity. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the addresses to track and the + * network the webhook should be created on. + */ + createWebhook(url: string, type: WebhookType.ADDRESS_ACTIVITY, params: AddressWebhookParams): Promise; + /** + * Delete the provided webhook. + * + * @param webhook The webhook to delete. + */ + deleteWebhook(webhook: Webhook): Promise; + /** + * Delete the provided webhook. + * + * @param webhookId The id of the webhook to delete. + */ + deleteWebhook(webhookId: string): Promise; + private verifyConfig; + private sendWebhookRequest; +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/api/transact-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/transact-namespace.d.ts new file mode 100644 index 0000000..85525ad --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/transact-namespace.d.ts @@ -0,0 +1,105 @@ +import { TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; +import type { BigNumber } from '@ethersproject/bignumber'; +import { Deferrable } from '@ethersproject/properties'; +import { SendPrivateTransactionOptions } from '../types/types'; +/** + * The Transact namespace contains methods used for sending transactions and + * checking on the state of submitted transactions. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the transact + * namespace via `alchemy.transact`. + */ +export declare class TransactNamespace { + private readonly config; + /** + * Used to send a single transaction to Flashbots. Flashbots will attempt to + * send the transaction to miners for the next 25 blocks. + * + * Returns the transaction hash of the submitted transaction. + * + * @param signedTransaction The raw, signed transaction as a hash. + * @param maxBlockNumber Optional highest block number in which the + * transaction should be included. + * @param options Options to configure the request. + */ + sendPrivateTransaction(signedTransaction: string, maxBlockNumber?: number, options?: SendPrivateTransactionOptions): Promise; + /** + * Stops the provided private transaction from being submitted for future + * blocks. A transaction can only be cancelled if the request is signed by the + * same key as the {@link sendPrivateTransaction} call submitting the + * transaction in first place. + * + * Please note that fast mode transactions cannot be cancelled using this method. + * + * Returns a boolean indicating whether the cancellation was successful. + * + * @param transactionHash Transaction hash of private tx to be cancelled + */ + cancelPrivateTransaction(transactionHash: string): Promise; + /** + * Returns the transaction with hash or null if the transaction is unknown. + * + * If a transaction has not been mined, this method will search the + * transaction pool. Various backends may have more restrictive transaction + * pool access (e.g. if the gas price is too low or the transaction was only + * recently sent and not yet indexed) in which case this method may also return null. + * + * NOTE: This is an alias for {@link CoreNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransaction(transactionHash: string | Promise): Promise; + /** + * Submits transaction to the network to be mined. The transaction must be + * signed, and be valid (i.e. the nonce is correct and the account has + * sufficient balance to pay for the transaction). + * + * NOTE: This is an alias for {@link CoreNamespace.sendTransaction}. + * + * @param signedTransaction The signed transaction to send. + * @public + */ + sendTransaction(signedTransaction: string | Promise): Promise; + /** + * Returns an estimate of the amount of gas that would be required to submit + * transaction to the network. + * + * An estimate may not be accurate since there could be another transaction on + * the network that was not accounted for, but after being mined affects the + * relevant state. + * + * This is an alias for {@link CoreNamespace.estimateGas}. + * + * @param transaction The transaction to estimate gas for. + * @public + */ + estimateGas(transaction: Deferrable): Promise; + /** + * Returns a fee per gas (in wei) that is an estimate of how much you can pay + * as a priority fee, or "tip", to get a transaction included in the current block. + * + * This number is generally used to set the `maxPriorityFeePerGas` field in a + * transaction request. + * + * @public + */ + getMaxPriorityFeePerGas(): Promise; + /** + * Returns a promise which will not resolve until specified transaction hash is mined. + * + * If {@link confirmations} is 0, this method is non-blocking and if the + * transaction has not been mined returns null. Otherwise, this method will + * block until the transaction has confirmed blocks mined on top of the block + * in which it was mined. + * + * NOTE: This is an alias for {@link CoreNamespace.waitForTransaction}. + * + * @param transactionHash The hash of the transaction to wait for. + * @param confirmations The number of blocks to wait for. + * @param timeout The maximum time to wait for the transaction to confirm. + * @public + */ + waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/api/util.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/util.d.ts new file mode 100644 index 0000000..10ac7c3 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/util.d.ts @@ -0,0 +1,21 @@ +/** + * Converts a hex string to a decimal number. + * + * @param hexString - The hex string to convert. + * @public + */ +export declare function fromHex(hexString: string): number; +/** + * Converts a number to a hex string. + * + * @param num - The number to convert to hex. + * @public + */ +export declare function toHex(num: number): string; +/** + * Checks if a value is a hex string. + * + * @param possibleHexString - The value to check. + * @public + */ +export declare function isHex(possibleHexString: string): boolean; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/api/utils.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/utils.d.ts new file mode 100644 index 0000000..2582187 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/utils.d.ts @@ -0,0 +1,5 @@ +export { dnsEncode, hashMessage, id, isValidName, namehash } from '@ethersproject/hash'; +export { arrayify, concat, hexConcat, hexDataSlice, hexDataLength, hexlify, hexStripZeros, hexValue, hexZeroPad, isBytes, isBytesLike, isHexString, joinSignature, zeroPad, splitSignature, stripZeros } from '@ethersproject/bytes'; +export { formatEther, parseEther, parseUnits, formatUnits } from '@ethersproject/units'; +export { toUtf8Bytes, toUtf8String } from '@ethersproject/strings'; +export { Interface } from '@ethersproject/abi'; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/api/websocket-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/websocket-namespace.d.ts new file mode 100644 index 0000000..7c179bc --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/api/websocket-namespace.d.ts @@ -0,0 +1,67 @@ +import type { Listener } from '@ethersproject/abstract-provider'; +import { AlchemyEventType } from '../types/types'; +/** + * The Websocket namespace contains all subscription related functions that + * allow you to subscribe to events and receive updates as they occur. The + * underlying WebSocket provider has additional logic to handle reconnections + * and automatically backfills missed events. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.ws`. + */ +export declare class WebSocketNamespace { + private readonly config; + /** + * Adds a listener to be triggered for each {@link eventName} event. Also + * includes Alchemy's Subscription API events. See {@link AlchemyEventType} for + * how to use them. + * + * @param eventName The event to listen for. + * @param listener The listener to call when the event is triggered. + * @public + */ + on(eventName: AlchemyEventType, listener: Listener): this; + /** + * Adds a listener to be triggered for only the next {@link eventName} event, + * after which it will be removed. Also includes Alchemy's Subscription API + * events. See {@link AlchemyEventType} for how to use them. + * + * @param eventName The event to listen for. + * @param listener The listener to call when the event is triggered. + * @public + */ + once(eventName: AlchemyEventType, listener: Listener): this; + /** + * Removes the provided {@link listener} for the {@link eventName} event. If no + * listener is provided, all listeners for the event will be removed. + * + * @param eventName The event to unlisten to. + * @param listener The listener to remove. + * @public + */ + off(eventName: AlchemyEventType, listener?: Listener): this; + /** + * Remove all listeners for the provided {@link eventName} event. If no event + * is provided, all events and their listeners are removed. + * + * @param eventName The event to remove all listeners for. + * @public + */ + removeAllListeners(eventName?: AlchemyEventType): this; + /** + * Returns the number of listeners for the provided {@link eventName} event. If + * no event is provided, the total number of listeners for all events is returned. + * + * @param eventName The event to get the number of listeners for. + * @public + */ + listenerCount(eventName?: AlchemyEventType): Promise; + /** + * Returns an array of listeners for the provided {@link eventName} event. If + * no event is provided, all listeners will be included. + * + * @param eventName The event to get the listeners for. + */ + listeners(eventName?: AlchemyEventType): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/index.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/index.d.ts new file mode 100644 index 0000000..a5d9de9 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/index.d.ts @@ -0,0 +1,18 @@ +/** This is the main entry point for the library and exports user-facing API. */ +import * as Utils from './api/utils'; +export { Utils }; +export * from './types/types'; +export { Alchemy } from './api/alchemy'; +export { Wallet } from './api/alchemy-wallet'; +export { Contract, ContractFactory } from './api/alchemy-contract'; +export type { AlchemyConfig } from './api/alchemy-config'; +export type { AlchemyProvider } from './api/alchemy-provider'; +export type { AlchemyWebSocketProvider } from './api/alchemy-websocket-provider'; +export type { NftNamespace } from './api/nft-namespace'; +export type { WebSocketNamespace } from './api/websocket-namespace'; +export type { CoreNamespace } from './api/core-namespace'; +export type { TransactNamespace } from './api/transact-namespace'; +export type { NotifyNamespace } from './api/notify-namespace'; +export type { BaseNftContract, NftContract, Nft, BaseNft } from './api/nft'; +export { fromHex, toHex, isHex } from './api/util'; +export { setLogLevel, LogLevelString as LogLevel } from './util/logger'; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/internal/backoff.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/internal/backoff.d.ts new file mode 100644 index 0000000..ed9cad8 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/internal/backoff.d.ts @@ -0,0 +1,4 @@ +export declare const DEFAULT_BACKOFF_INITIAL_DELAY_MS = 1000; +export declare const DEFAULT_BACKOFF_MULTIPLIER = 1.5; +export declare const DEFAULT_BACKOFF_MAX_DELAY_MS: number; +export declare const DEFAULT_BACKOFF_MAX_ATTEMPTS = 5; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/internal/dispatch.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/internal/dispatch.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/internal/dispatch.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/internal/ethers-event.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/internal/ethers-event.d.ts new file mode 100644 index 0000000..0676f4c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/internal/ethers-event.d.ts @@ -0,0 +1,60 @@ +import { EventType, Filter, Listener } from '@ethersproject/abstract-provider'; +import { AlchemyEventFilter, AlchemyEventType, AlchemyMinedTransactionsAddress, AlchemyMinedTransactionsEventFilter, AlchemyPendingTransactionsEventFilter, NonEmptyArray } from '../types/types'; +/** + * DO NOT MODIFY. + * + * Event class copied directly over from ethers.js's `BaseProvider` class. + * + * This class is used to represent events and their corresponding listeners. The + * SDK needs to extend this class in order to support Alchemy's custom + * Subscription API types. The original class is not exported by ethers. Minimal + * changes have been made in order to get TS to compile. + */ +declare class Event { + readonly listener: Listener; + readonly once: boolean; + readonly tag: string; + _lastBlockNumber: number; + _inflight: boolean; + constructor(tag: string, listener: Listener, once: boolean); + get event(): EventType; + get type(): string; + get hash(): string; + get filter(): Filter; + pollable(): boolean; +} +/** + * Wrapper class around the ethers `Event` class in order to add support for + * Alchemy's custom subscriptions types. + * + * The serialization and deserialization mechanism requires the order of the + * fields to be the same across different {@link ALCHEMY_EVENT_TYPES}. Before + * using a getter on a new event filter, make sure that the position of the + * field in serialization is correct. + * + * The getters on this class deserialize the event tag generated by + * {@link getAlchemyEventTag} into the original fields passed into the event. + */ +export declare class EthersEvent extends Event { + /** + * Converts the event tag into the original `fromAddress` field in + * {@link AlchemyPendingTransactionsEventFilter}. + */ + get fromAddress(): string | string[] | undefined; + /** + * Converts the event tag into the original `toAddress` field in + * {@link AlchemyPendingTransactionsEventFilter}. + */ + get toAddress(): string | string[] | undefined; + /** + * Converts the event tag into the original `hashesOnly` field in + * {@link AlchemyPendingTransactionsEventFilter} and {@link AlchemyMinedTransactionsEventFilter}. + */ + get hashesOnly(): boolean | undefined; + get includeRemoved(): boolean | undefined; + get addresses(): NonEmptyArray | undefined; +} +export declare function isAlchemyEvent(event: AlchemyEventType): event is AlchemyMinedTransactionsEventFilter | AlchemyPendingTransactionsEventFilter; +export declare function verifyAlchemyEventName(eventName: AlchemyEventFilter): void; +export declare function deserializeTopics(data: string): any; +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/internal/internal-types.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/internal/internal-types.d.ts new file mode 100644 index 0000000..48cbe2f --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/internal/internal-types.d.ts @@ -0,0 +1,48 @@ +/** This file contains internal types used by the SDK and are not exposed to the end user. */ +declare type JsonRpcId = string | number | null; +/** + * Prefix for `alchemy_pendingTransactions` subscriptions when serializing to + * ethers events. + * + * This tag is used internally by ethers to track different event filters. + */ +export declare const ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE = "alchemy-pending-transactions"; +/** + * Prefix for `alchemy_minedTransactions` subscriptions when serializing to ethers events. + * + * This tag is used internally by ethers to track different event filters. + */ +export declare const ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE = "alchemy-mined-transactions"; +/** + * Array containing all the custom event tags used internally by ethers to track + * event filters. + */ +export declare const ALCHEMY_EVENT_TYPES: string[]; +export interface JsonRpcRequest { + jsonrpc: '2.0'; + method: string; + params?: any[]; + id?: JsonRpcId; +} +export interface JsonRpcResponse { + jsonrpc: '2.0'; + result?: T; + error?: JsonRpcError; + id: JsonRpcId; +} +interface JsonRpcError { + code: number; + message: string; + data?: T; +} +export declare type WebSocketMessage = SingleOrBatchResponse | SubscriptionEvent; +export declare type SingleOrBatchResponse = JsonRpcResponse | JsonRpcResponse[]; +export interface SubscriptionEvent { + jsonrpc: '2.0'; + method: 'eth_subscription'; + params: { + subscription: string; + result: T; + }; +} +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/internal/nft-api.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/internal/nft-api.d.ts new file mode 100644 index 0000000..8eaf6e1 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/internal/nft-api.d.ts @@ -0,0 +1,27 @@ +import { BigNumberish } from '@ethersproject/bignumber'; +import { AlchemyConfig } from '../api/alchemy-config'; +import { BaseNft, Nft, NftContract } from '../api/nft'; +import { GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftResponse, NftAttributeRarity, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, NftTokenType, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult } from '../types/types'; +export declare function getNftMetadata(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, tokenType?: NftTokenType, tokenUriTimeoutInMs?: number, srcMethod?: string): Promise; +export declare function getNftMetadataBatch(config: AlchemyConfig, tokens: Array, options?: NftMetadataBatchOptions): Promise; +export declare function getContractMetadata(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function getNftsForOwnerIterator(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): AsyncIterable; +export declare function getNftsForOwner(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): Promise; +export declare function getNftsForContract(config: AlchemyConfig, contractAddress: string, options?: GetBaseNftsForContractOptions | GetNftsForContractOptions, srcMethod?: string): Promise; +export declare function getNftsForContractIterator(config: AlchemyConfig, contractAddress: string, options?: GetBaseNftsForContractOptions | GetNftsForContractOptions, srcMethod?: string): AsyncIterable; +export declare function getOwnersForContract(config: AlchemyConfig, contractAddress: string, options?: GetOwnersForContractWithTokenBalancesOptions | GetOwnersForContractOptions, srcMethod?: string): Promise; +export declare function getContractsForOwner(config: AlchemyConfig, owner: string, options?: GetContractsForOwnerOptions, srcMethod?: string): Promise; +export declare function getOwnersForNft(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, srcMethod?: string): Promise; +export declare function checkNftOwnership(config: AlchemyConfig, owner: string, contractAddresses: string[], srcMethod?: string): Promise; +export declare function verifyNftOwnership(config: AlchemyConfig, owner: string, contractAddresses: string | string[], srcMethod?: string): Promise; +export declare function isSpamContract(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function getSpamContracts(config: AlchemyConfig, srcMethod?: string): Promise; +export declare function getFloorPrice(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function getNftSales(config: AlchemyConfig, options?: GetNftSalesOptions | GetNftSalesOptionsByContractAddress, srcMethod?: string): Promise; +export declare function computeRarity(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, srcMethod?: string): Promise; +export declare function searchContractMetadata(config: AlchemyConfig, query: string, srcMethod?: string): Promise; +export declare function summarizeNftAttributes(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function refreshNftMetadata(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, srcMethod?: string): Promise; +export declare function refreshContract(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/internal/raw-interfaces.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/internal/raw-interfaces.d.ts new file mode 100644 index 0000000..0b85271 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/internal/raw-interfaces.d.ts @@ -0,0 +1,113 @@ +import { Media, NftSaleFeeData, NftSpamClassification } from '../types/types'; +export interface RawSpamInfo { + isSpam: string; + /** A list of reasons why an NFT contract was marked as spam. */ + classifications: NftSpamClassification[]; +} +/** OpenSea's metadata for an NFT collection. */ +export interface RawOpenSeaCollectionMetadata { + floorPrice?: number; + collectionName?: string; + safelistRequestStatus?: string; + imageUrl?: string; + description?: string; + externalUrl?: string; + twitterUsername?: string; + discordUrl?: string; + lastIngestedAt?: string; +} +export interface RawGetOwnersForContractWithTokenBalancesResponse { + ownerAddresses: RawOwnerAddress[]; + pageKey?: string; +} +export interface RawOwnerAddress { + ownerAddress: string; + tokenBalances: RawTokenBalances[]; +} +export interface RawTokenBalances { + tokenId: string; + balance: number; +} +export interface RawReingestContractResponse { + contractAddress: string; + reingestionState: string; + progress: string | null; +} +export interface RawWebhook { + id: string; + network: string; + webhook_type: string; + webhook_url: string; + is_active: boolean; + time_created: number; + signing_key: string; + version: string; + app_id?: string; +} +export interface RawWebhookPagination { + cursors: { + after?: string; + }; + total_count: number; +} +export interface RawGetAllWebhooksResponse { + data: RawWebhook[]; +} +export interface RawAddressActivityResponse { + data: string[]; + pagination: RawWebhookPagination; +} +export interface RawNftFilter { + contract_address: string; + token_id: string; +} +export interface RawNftFiltersResponse { + data: RawNftFilter[]; + pagination: RawWebhookPagination; +} +export interface RawCreateWebhookResponse { + data: RawWebhook; +} +export interface RawNftFilterParam { + contract_address: string; + token_id: string; +} +export interface RawNftAttributeRarity { + value: string; + trait_type: string; + prevalence: number; +} +export interface RawGetNftSalesResponse { + pageKey?: string; + nftSales: RawNftSale[]; +} +export interface RawNftSale { + marketplace: string; + contractAddress: string; + tokenId: string; + quantity: string; + buyerAddress: string; + sellerAddress: string; + taker: string; + sellerFee: NftSaleFeeData; + marketplaceFee?: NftSaleFeeData; + royaltyFee?: NftSaleFeeData; + blockNumber: number; + logIndex: number; + bundleIndex: number; + transactionHash: string; +} +export interface RawGetContractsForOwnerResponse { + contracts: RawContractForOwner[]; + pageKey?: string; + totalCount: number; +} +export interface RawContractForOwner extends Omit { + address: string; + totalBalance: number; + numDistinctTokensOwned: number; + isSpam: boolean; + tokenId: string; + media: Media; + opensea?: RawOpenSeaCollectionMetadata; +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/internal/request-batcher.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/internal/request-batcher.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/internal/request-batcher.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/internal/websocket-backfiller.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/internal/websocket-backfiller.d.ts new file mode 100644 index 0000000..63730de --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/internal/websocket-backfiller.d.ts @@ -0,0 +1,53 @@ +export interface BatchPart { + method: string; + params?: any; +} +export interface NewHeadsEvent { + author: string; + difficulty: string; + extraData: string; + gasLimit: string; + gasUsed: string; + hash: string; + logsBloom: string; + miner: string; + mixHash: string; + nonce: string; + number: string; + parentHash: string; + receiptsRoot: string; + sealFields: string[]; + sha3Uncles: string; + size: string; + stateRoot: string; + timestamp: string; + transactionsRoot: string; +} +/** The return type of eth_getBlocksByHash. */ +export interface BlockHead extends NewHeadsEvent { + totalDifficulty: string; + transactions: any[]; + uncles: string[]; +} +export interface LogsEvent { + address: string; + blockHash: string; + blockNumber: string; + data: string; + logIndex: string; + topics: string[]; + transactionHash: string; + transactionIndex: string; + removed?: boolean; +} +export interface LogsSubscriptionFilter { + address?: string | string[]; + topics?: Array; +} +export interface GetLogsOptions extends LogsSubscriptionFilter { + fromBlock?: string; + toBlock?: string; +} +export declare function dedupeNewHeads(events: NewHeadsEvent[]): NewHeadsEvent[]; +export declare function dedupeLogs(events: LogsEvent[]): LogsEvent[]; +export declare function throwIfCancelled(isCancelled: () => boolean): void; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/types/types.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/types/types.d.ts new file mode 100644 index 0000000..ed47247 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/types/types.d.ts @@ -0,0 +1,1523 @@ +import { EventType, TransactionReceipt } from '@ethersproject/abstract-provider'; +import { BigNumberish } from '@ethersproject/bignumber'; +import { BaseNft, Nft, NftContract } from '../api/nft'; +/** + * Options object used to configure the Alchemy SDK. + * + * @public + */ +export interface AlchemySettings { + /** + * The Alchemy API key that can be found in the Alchemy dashboard. + * + * Defaults to: "demo" (a rate-limited public API key) + */ + apiKey?: string; + /** + * The name of the network. Once configured, the network cannot be changed. To + * use a different network, instantiate a new `Alchemy` instance. + * + * Defaults to: Network.ETH_MAINNET + */ + network?: Network; + /** The maximum number of retries to attempt if a request fails. Defaults to 5. */ + maxRetries?: number; + /** + * Optional URL endpoint to use for all requests. Setting this field will + * override the URL generated by the {@link network} and {@link apiKey} fields. + * + * This field is useful for testing or for using a custom node endpoint. Note + * that not all methods will work with custom URLs. + */ + url?: string; + /** + * Alchemy auth token required to use the Notify API. This token can be found + * in the Alchemy Dashboard on the Notify tab. + */ + authToken?: string; + /** + * Optional setting that automatically batches and sends json-rpc requests for + * higher throughput and reduced network IO. Defaults to false. + * + * This implementation is based on the `JsonRpcBatchProvider` in ethers. + */ + batchRequests?: boolean; +} +/** + * The supported networks by Alchemy. Note that some functions are not available + * on all networks. Please refer to the Alchemy documentation for which APIs are + * available on which networks + * {@link https://docs.alchemy.com/alchemy/apis/feature-support-by-chain} + * + * @public + */ +export declare enum Network { + ETH_MAINNET = "eth-mainnet", + /** @deprecated - Will be removed in subsequent versions */ + ETH_ROPSTEN = "eth-ropsten", + ETH_GOERLI = "eth-goerli", + /** @deprecated - Will be removed in subsequent versions */ + ETH_KOVAN = "eth-kovan", + /** @deprecated - Will be removed in subsequent versions */ + ETH_RINKEBY = "eth-rinkeby", + OPT_MAINNET = "opt-mainnet", + /** @deprecated - Will be removed in subsequent versions */ + OPT_KOVAN = "opt-kovan", + OPT_GOERLI = "opt-goerli", + ARB_MAINNET = "arb-mainnet", + /** @deprecated - Will be removed in subsequent versions */ + ARB_RINKEBY = "arb-rinkeby", + ARB_GOERLI = "arb-goerli", + MATIC_MAINNET = "polygon-mainnet", + MATIC_MUMBAI = "polygon-mumbai", + ASTAR_MAINNET = "astar-mainnet" +} +/** Token Types for the `getTokenBalances()` endpoint. */ +export declare enum TokenBalanceType { + /** + * Option to fetch the top 100 tokens by 24-hour volume. This option is only + * available on Mainnet in Ethereum, Polygon, and Arbitrum. + */ + DEFAULT_TOKENS = "DEFAULT_TOKENS", + /** + * Option to fetch the set of ERC-20 tokens that the address as ever held. his + * list is produced by an address's historical transfer activity and includes + * all tokens that the address has ever received. + */ + ERC20 = "erc20" +} +/** + * Optional params to pass into `getTokenBalances()` to fetch all ERC-20 tokens + * instead of passing in an array of contract addresses to fetch balances for. + */ +export interface TokenBalancesOptionsErc20 { + /** The ERC-20 token type. */ + type: TokenBalanceType.ERC20; + /** Optional page key for pagination (only applicable to TokenBalanceType.ERC20) */ + pageKey?: string; +} +/** + * Optional params to pass into `getTokenBalances()` to fetch the top 100 tokens + * instead of passing in an array of contract addresses to fetch balances for. + */ +export interface TokenBalancesOptionsDefaultTokens { + /** The top 100 token type. */ + type: TokenBalanceType.DEFAULT_TOKENS; +} +/** + * Response object for when the {@link TokenBalancesOptionsErc20} options are + * used. A page key may be returned if the provided address has many transfers. + */ +export interface TokenBalancesResponseErc20 extends TokenBalancesResponse { + /** + * An optional page key to passed into the next request to fetch the next page + * of token balances. + */ + pageKey?: string; +} +/** @public */ +export interface TokenBalancesResponse { + address: string; + tokenBalances: TokenBalance[]; +} +/** @public */ +export declare type TokenBalance = TokenBalanceSuccess | TokenBalanceFailure; +/** @public */ +export interface TokenBalanceSuccess { + contractAddress: string; + tokenBalance: string; + error: null; +} +/** @public */ +export interface TokenBalanceFailure { + contractAddress: string; + tokenBalance: null; + error: string; +} +/** + * Response object for the {@link CoreNamespace.getTokenMetadata} method. + * + * @public + */ +export interface TokenMetadataResponse { + /** + * The token's name. Is `null` if the name is not defined in the contract and + * not available from other sources. + */ + name: string | null; + /** + * The token's symbol. Is `null` if the symbol is not defined in the contract + * and not available from other sources. + */ + symbol: string | null; + /** + * The number of decimals of the token. Returns `null` if not defined in the + * contract and not available from other sources. + */ + decimals: number | null; + /** URL link to the token's logo. Is `null` if the logo is not available. */ + logo: string | null; +} +/** + * Parameters for the {@link CoreNamespace.getAssetTransfers} method. + * + * @public + */ +export interface AssetTransfersParams { + /** + * The starting block to check for transfers. This value is inclusive and + * defaults to `0x0` if omitted. + */ + fromBlock?: string; + /** + * The ending block to check for transfers. This value is inclusive and + * defaults to the latest block if omitted. + */ + toBlock?: string; + /** + * Whether to return results in ascending or descending order by block number. + * Defaults to ascending if omitted. + */ + order?: SortingOrder; + /** + * The from address to filter transfers by. This value defaults to a wildcard + * for all addresses if omitted. + */ + fromAddress?: string; + /** + * The to address to filter transfers by. This value defaults to a wildcard + * for all address if omitted. + */ + toAddress?: string; + /** + * List of contract addresses to filter for - only applies to "erc20", + * "erc721", "erc1155" transfers. Defaults to all address if omitted. + */ + contractAddresses?: string[]; + /** + * Whether to exclude transfers with zero value. Note that zero value is + * different than null value. Defaults to `false` if omitted. + */ + excludeZeroValue?: boolean; + /** REQUIRED field. An array of categories to get transfers for. */ + category: AssetTransfersCategory[]; + /** The maximum number of results to return per page. Defaults to 1000 if omitted. */ + maxCount?: number; + /** + * Optional page key from an existing {@link OwnedBaseNftsResponse} + * {@link AssetTransfersResult}to use for pagination. + */ + pageKey?: string; + /** + * Whether to include additional metadata about each transfer event. Defaults + * to `false` if omitted. + */ + withMetadata?: boolean; +} +/** + * Parameters for the {@link CoreNamespace.getAssetTransfers} method that + * includes metadata. + * + * @public + */ +export interface AssetTransfersWithMetadataParams extends AssetTransfersParams { + withMetadata: true; +} +/** + * Categories of transfers to use with the {@link AssetTransfersParams} request + * object when using {@link CoreNamespace.getAssetTransfers}. + * + * @public + */ +export declare enum AssetTransfersCategory { + /** + * Top level ETH transactions that occur where the `fromAddress` is an + * external user-created address. External addresses have private keys and are + * accessed by users. + */ + EXTERNAL = "external", + /** + * Top level ETH transactions that occur where the `fromAddress` is an + * internal, smart contract address. For example, a smart contract calling + * another smart contract or sending + */ + INTERNAL = "internal", + /** ERC20 transfers. */ + ERC20 = "erc20", + /** ERC721 transfers. */ + ERC721 = "erc721", + /** ERC1155 transfers. */ + ERC1155 = "erc1155", + /** Special contracts that don't follow ERC 721/1155, (ex: CryptoKitties). */ + SPECIALNFT = "specialnft" +} +/** + * Enum for the order of the {@link AssetTransfersParams} request object when + * using {@link CoreNamespace.getAssetTransfers}. + * + * @deprecated Use {@link SortingOrder} instead. This enum will be removed in a + * future version. + * @public + */ +export declare enum AssetTransfersOrder { + ASCENDING = "asc", + DESCENDING = "desc" +} +/** + * An enum for specifying the token type on NFTs. + * + * @public + */ +export declare enum NftTokenType { + ERC721 = "ERC721", + ERC1155 = "ERC1155", + UNKNOWN = "UNKNOWN" +} +/** + * Response object for the {@link CoreNamespace.getAssetTransfers} method. + * + * @public + */ +export interface AssetTransfersResponse { + transfers: AssetTransfersResult[]; + /** Page key for the next page of results, if one exists. */ + pageKey?: string; +} +/** + * Response object for the {@link CoreNamespace.getAssetTransfers} method when + * the {@link AssetTransfersWithMetadataParams} are used. + * + * @public + */ +export interface AssetTransfersWithMetadataResponse { + transfers: AssetTransfersWithMetadataResult[]; + pageKey?: string; +} +/** + * Represents a transfer event that is returned in a {@link AssetTransfersResponse}. + * + * @public + */ +export interface AssetTransfersResult { + /** The unique ID of the transfer. */ + uniqueId: string; + /** The category of the transfer. */ + category: AssetTransfersCategory; + /** The block number where the transfer occurred. */ + blockNum: string; + /** The from address of the transfer. */ + from: string; + /** The to address of the transfer. */ + to: string | null; + /** + * Converted asset transfer value as a number (raw value divided by contract + * decimal). `null` if ERC721 transfer or contract decimal not available. + */ + value: number | null; + /** + * The raw ERC721 token id of the transfer as a hex string. `null` if not an + * ERC721 transfer. + */ + erc721TokenId: string | null; + /** + * A list of ERC1155 metadata objects if the asset transferred is an ERC1155 + * token. `null` if not an ERC1155 transfer. + */ + erc1155Metadata: ERC1155Metadata[] | null; + /** The token id of the token transferred. */ + tokenId: string | null; + /** + * Returns the token's symbol or ETH for other transfers. `null` if the + * information was not available. + */ + asset: string | null; + /** The transaction hash of the transfer transaction. */ + hash: string; + /** Information about the raw contract of the asset transferred. */ + rawContract: RawContract; +} +/** + * Represents a transfer event that is returned in a + * {@link AssetTransfersResponse} when {@link AssetTransfersWithMetadataParams} are used. + * + * @public + */ +export interface AssetTransfersWithMetadataResult extends AssetTransfersResult { + /** Additional metadata about the transfer event. */ + metadata: AssetTransfersMetadata; +} +/** + * The metadata object for a {@link AssetTransfersResult} when the + * {@link AssetTransfersParams.withMetadata} field is set to true. + * + * @public + */ +export interface AssetTransfersMetadata { + /** Timestamp of the block from which the transaction event originated. */ + blockTimestamp: string; +} +/** + * Represents NFT metadata that holds fields. Note that since there is no + * standard metadata format, the fields are not guaranteed to be present. + * + * @public + */ +export interface NftMetadata extends Record { + /** Name of the NFT asset. */ + name?: string; + /** A human-readable description of the NFT asset. */ + description?: string; + /** URL to the NFT asset image. */ + image?: string; + /** + * The image URL that appears along the top of the NFT asset page. This tends + * to be the highest resolution image. + */ + external_url?: string; + /** Background color of the NFT item. Usually defined as a 6 character hex string. */ + background_color?: string; + /** The traits, attributes, and characteristics for the NFT asset. */ + attributes?: Array>; +} +/** + * Represents the URI information the NFT's metadata. + * + * @public + */ +export interface TokenUri { + /** + * URI for the location of the NFT's original metadata blob (ex: the original + * IPFS link). + */ + raw: string; + /** Public gateway URI for the raw URI. Generally offers better performance. */ + gateway: string; +} +/** + * Represents the URI information for the NFT's media assets. + * + * @public + */ +export interface Media { + /** + * URI for the location of the NFT's original metadata blob for media (ex: the + * original IPFS link). + */ + raw: string; + /** Public gateway URI for the raw URI. Generally offers better performance. */ + gateway: string; + /** URL for a resized thumbnail of the NFT media asset. */ + thumbnail?: string; + /** + * The media format (ex: jpg, gif, png) of the {@link gateway} and + * {@link thumbnail} assets. + */ + format?: string; + /** + * DEPRECATED - The size of the media asset in bytes + * + * @deprecated - Please use {@link bytes} instead. This field will be removed + * in a subsequent release. + */ + size?: number; + /** The size of the media asset in bytes. */ + bytes?: number; +} +/** Potential reasons why an NFT contract was classified as spam. */ +export declare enum NftSpamClassification { + Erc721TooManyOwners = "Erc721TooManyOwners", + Erc721TooManyTokens = "Erc721TooManyTokens", + Erc721DishonestTotalSupply = "Erc721DishonestTotalSupply", + MostlyHoneyPotOwners = "MostlyHoneyPotOwners", + OwnedByMostHoneyPots = "OwnedByMostHoneyPots" +} +/** Detailed information on whether and why an NFT contract was classified as spam. */ +export interface SpamInfo { + isSpam: boolean; + /** A list of reasons why an NFT contract was marked as spam. */ + classifications: NftSpamClassification[]; +} +/** + * Optional parameters object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. + * + * This interface is used to fetch NFTs with their associated metadata. To get + * Nfts without their associated metadata, use {@link GetBaseNftsForOwnerOptions}. + * + * @public + */ +export interface GetNftsForOwnerOptions { + /** + * Optional page key from an existing {@link OwnedBaseNftsResponse} or + * {@link OwnedNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional list of contract addresses to filter the results by. Limit is 20. */ + contractAddresses?: string[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are excluded from the response. + */ + excludeFilters?: NftFilters[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are included in the response. + */ + includeFilters?: NftFilters[]; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; + /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */ + omitMetadata?: boolean; + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; + /** + * Order in which to return results. By default, results are ordered by + * contract address and token ID in lexicographic order. + */ + orderBy?: NftOrdering; +} +/** + * Optional parameters object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. + * + * This interface is used to fetch NFTs without their associated metadata. To + * get Nfts with their associated metadata, use {@link GetNftsForOwnerOptions}. + * + * @public + */ +export interface GetBaseNftsForOwnerOptions { + /** + * Optional page key from an existing {@link OwnedBaseNftsResponse} or + * {@link OwnedNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional list of contract addresses to filter the results by. Limit is 20. */ + contractAddresses?: string[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are excluded from the response. + */ + excludeFilters?: NftFilters[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are included in the response. + */ + includeFilters?: NftFilters[]; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; + /** Optional boolean flag to include NFT metadata. Defaults to `false`. */ + omitMetadata: true; + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; + /** + * Order in which to return results. By default, results are ordered by + * contract address and token ID in lexicographic order. + */ + orderBy?: NftOrdering; +} +/** + * Enum of NFT filters that can be applied to a {@link getNftsForOwner} request. + * NFTs that match one or more of these filters are excluded from the response. + * + * - @deprecated Use {@link NftFilters} instead. This enum will be removed in a + * future version. + * + * @beta + */ +export declare enum NftExcludeFilters { + /** Exclude NFTs that have been classified as spam. */ + SPAM = "SPAM", + /** Exclude NFTs that have been airdropped to a user. */ + AIRDROPS = "AIRDROPS" +} +/** + * Enum of NFT filters that can be applied to a {@link getNftsForOwner} or a + * {@link getContractsForOwner} request. + * + * @beta + */ +export declare enum NftFilters { + /** NFTs that have been classified as spam. */ + SPAM = "SPAM", + /** NFTs that have been airdropped to a user. */ + AIRDROPS = "AIRDROPS" +} +/** + * Enum of ordering that can be applied to a {@link getNftsForOwner} or a + * {@link getContractsForOwner} response. + * + * @beta + */ +export declare enum NftOrdering { + TRANSFERTIME = "TRANSFERTIME" +} +/** + * The response object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. The object contains the NFTs with + * metadata owned by the provided address, along with pagination information and + * the total count. + * + * @public + */ +export interface OwnedNftsResponse { + /** The NFTs owned by the provided address. */ + readonly ownedNfts: OwnedNft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + readonly pageKey?: string; + /** The total count of NFTs owned by the provided address. */ + readonly totalCount: number; +} +/** + * The response object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. The object contains the NFTs + * without metadata owned by the provided address, along with pagination + * information and the total count. + * + * @public + */ +export interface OwnedBaseNftsResponse { + /** The NFTs owned by the provided address. */ + readonly ownedNfts: OwnedBaseNft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + readonly pageKey?: string; + /** The total count of NFTs owned by the provided address. */ + readonly totalCount: number; +} +/** + * Represents an NFT with metadata owned by an address. + * + * @public + */ +export interface OwnedNft extends Nft { + /** The token balance of the NFT. */ + readonly balance: number; +} +/** + * Represents an NFT without metadata owned by an address. + * + * @public + */ +export interface OwnedBaseNft extends BaseNft { + /** The token balance of the NFT. */ + readonly balance: number; +} +/** + * The response object for the {@link getOwnersForNft}. + * + * @public + */ +export interface GetOwnersForNftResponse { + /** An array of owner addresses for the provided token. */ + readonly owners: string[]; +} +/** + * The response object for the {@link getOwnersForContract}. + * + * @public + */ +export interface GetOwnersForContractResponse { + /** An array of owner addresses for the provided contract address */ + owners: string[]; +} +/** + * The response object for the {@link getOwnersForContract}. + * + * @public + */ +export interface GetOwnersForContractWithTokenBalancesResponse { + /** An array of owner addresses for the provided contract address */ + owners: NftContractOwner[]; + /** Optional page key that is returned when a collection has more than 50,000 owners. */ + pageKey?: string; +} +/** + * An object representing the owner of an NFT and its corresponding token + * balances in a {@link GetOwnersForContractWithTokenBalancesResponse} object. + */ +export interface NftContractOwner { + /** The NFT's owner address. */ + ownerAddress: string; + /** A list of objects containing token balances for the provided NFT contract. */ + tokenBalances: NftContractTokenBalance[]; +} +/** + * An object representing the owned token and balance values in a + * {@link GetOwnersForContractWithTokenBalancesResponse} object. + */ +export interface NftContractTokenBalance { + /** The token id owned in the NFT contract. */ + tokenId: string; + /** The token Id balance for the provided owner. */ + balance: number; +} +/** + * Represents an NFT token to fetch metadata for in a + * {@link NftNamespace.getNftMetadataBatch} method. + */ +export interface NftMetadataBatchToken { + /** The NFT contract address. Limited to ERC721 and ERC1155 tokens. */ + contractAddress: string; + /** The id of the NFT. */ + tokenId: BigNumberish; + /** Optional field to specify the type of token to speed up the query. */ + tokenType?: NftTokenType.ERC1155 | NftTokenType.ERC721; +} +/** Additional options for the {@link NftNamespace.getNftMetadataBatch} method. */ +export interface NftMetadataBatchOptions { + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; + /** + * Whether to refresh the metadata for the given NFT token before returning + * the response. Defaults to false for faster response times. + */ + refreshCache?: boolean; +} +/** + * The successful object returned by the {@link getFloorPrice} call for each + * marketplace (e.g. looksRare). + * + * @public + */ +export interface FloorPriceMarketplace { + /** The floor price of the collection on the given marketplace */ + readonly floorPrice: number; + /** The currency in which the floor price is denominated */ + readonly priceCurrency: string; + /** The link to the collection on the given marketplace */ + readonly collectionUrl: string; + /** UTC timestamp of when the floor price was retrieved from the marketplace */ + readonly retrievedAt: string; +} +/** + * The failing object returned by the {@link getFloorPrice} call for each + * marketplace (e.g. looksRare). + * + * @public + */ +export interface FloorPriceError { + /** Error fetching floor prices from the given marketplace */ + readonly error: string; +} +/** + * The response object for the {@link getFloorPrice} method. + * + * @public + */ +export interface GetFloorPriceResponse { + /** + * Name of the NFT marketplace where the collection is listed. Current + * marketplaces supported: OpenSea, LooksRare + */ + readonly openSea: FloorPriceMarketplace | FloorPriceError; + readonly looksRare: FloorPriceMarketplace | FloorPriceError; +} +/** + * Optional parameters object for the the {@link getContractsForOwner} method + * + * @public + */ +export interface GetContractsForOwnerOptions { + /** Key for pagination to use to fetch results from the next page if available. */ + pageKey?: string; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are included in the response. May not be used in + * conjunction with {@link excludeFilters}. + */ + includeFilters?: NftFilters[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are excluded from the response. May not be used in + * conjunction with {@link includeFilters} + */ + excludeFilters?: NftFilters[]; + /** + * Order in which to return results. By default, results are ordered by + * contract address and token ID in lexicographic order. + */ + orderBy?: NftOrdering; +} +/** + * The response for the {@link NftNamespace.getContractsForOwner} method. + * + * @public + */ +export interface GetContractsForOwnerResponse { + /** The list of contracts, that match the query, held by the given address. */ + contracts: ContractForOwner[]; + /** Key for pagination to use to fetch results from the next page if available. */ + pageKey?: string; + /** Total number of NFT contracts held by the given address. */ + totalCount: number; +} +/** Represents a single NFT contract data in the {@link GetContractsForOwnerResponse}. */ +export interface ContractForOwner extends NftContract { + /** + * Sum of NFT balances across all token IDs held by the owner. For + * non-fungible tokens this will be equal to the numDistinctTokensOwned, but + * it may be higher if the user holds some fungible ERC1155 tokens. + */ + totalBalance: number; + /** + * Number of distinct token IDs held by the owner. For non-fungible tokens + * this will be equal to the totalBalance, but it may be lower if the user + * holds some fungible ERC1155 tokens. + */ + numDistinctTokensOwned: number; + isSpam: boolean; + /** One of the tokens from this contract held by the owner. */ + tokenId: string; + /** Alternative NFT metadata for this contract to be parsed manually. */ + media: Media; +} +/** + * Optional parameters object for the {@link getNftSales} endpoint. + * + * This interface is used to filter the NFT sales data. + * + * @public + */ +export interface GetNftSalesOptions { + /** The block number to start fetching NFT sales data from. */ + fromBlock?: number | 'latest'; + /** The block number limit to fetch NFT sales data from. */ + toBlock?: number | 'latest'; + /** Whether to return the results in ascending or descending order by block number. */ + order?: SortingOrder; + /** The NFT marketplace to filter sales by. */ + marketplace?: NftSaleMarketplace; + /** The address of the NFT buyer to filter sales by. */ + buyerAddress?: string; + /** The address of the NFT seller to filter sales by. */ + sellerAddress?: string; + /** + * Filter by whether the buyer or seller was the taker in the NFT trade. + * Defaults to returning both buyer and seller taker trades. + */ + taker?: NftSaleTakerType; + /** The maximum number of NFT sales to return. */ + limit?: number; + /** Key for pagination to use to fetch results from the next page if available. */ + pageKey?: string; +} +/** + * Alternative optional parameters object for the {@link getNftSales} endpoint + * that allows filtering results by contractAddress. + * + * This interface is used to filter the NFT sales data. + * + * @public + */ +export interface GetNftSalesOptionsByContractAddress extends GetNftSalesOptions { + /** The contract address of a NFT collection to filter sales by. */ + contractAddress: string; + /** The token ID of an NFT within the specified contractAddress to filter sales by. */ + tokenId?: BigNumberish; +} +/** + * The response for the {@link NftNamespace.getNftSales} method. + * + * @public + */ +export interface GetNftSalesResponse { + /** The page key to use to fetch the next page if more results are available. */ + pageKey?: string; + /** List of NFT sales that match the query */ + nftSales: NftSale[]; +} +/** Represents a single NFT sale data in the {@link GetNftSalesResponse}. */ +export interface NftSale { + /** The marketplace the sale took place on. */ + marketplace: NftSaleMarketplace; + /** The NFT contract address. */ + contractAddress: string; + /** The decimal token ID of the NFT being sold. */ + tokenId: string; + /** The number of tokens sold in the sale as a decimal integer string. */ + quantity: string; + /** The address of the buyer in the NFT sale. */ + buyerAddress: string; + /** The address of the seller in the NFT sale. */ + sellerAddress: string; + /** Whether the price taker in the trade was the buyer or the seller. */ + taker: NftSaleTakerType; + /** The payment from buyer to the seller. */ + sellerFee: NftSaleFeeData; + /** The payment from buyer to the marketplace. */ + marketplaceFee?: NftSaleFeeData; + /** The payment from buyer to the royalty address of the NFT collection. */ + royaltyFee?: NftSaleFeeData; + /** The block number the NFT sale took place in. */ + blockNumber: number; + /** The log number of the sale event emitted within the block. */ + logIndex: number; + /** The index of the token within the bundle of NFTs sold in the sale. */ + bundleIndex: number; + /** The transactionHash of the NFT sale. */ + transactionHash: string; +} +/** + * Fee detail for an NFT sale. + * + * @public + */ +export interface NftSaleFeeData { + /** The fee payment amount as a decimal integer string. */ + amount: string; + /** The symbol of the token used for the payment. */ + symbol: string; + /** The number of decimals of the token used for the payment. */ + decimal: number; +} +/** + * Enum for representing the supported sorting orders of the API. + * + * @public + */ +export declare enum SortingOrder { + ASCENDING = "asc", + DESCENDING = "desc" +} +/** + * Enum representing the supported NFT marketplaces by the {@link getNftSales} endpoint. + * + * @public + */ +export declare enum NftSaleMarketplace { + SEAPORT = "seaport", + LOOKSRARE = "looksrare", + X2Y2 = "x2y2", + UNKNOWN = "unknown" +} +/** + * Enum for specifing the taker type for the {@link getNftSales} endpoint. + * + * @public + */ +export declare enum NftSaleTakerType { + BUYER = "buyer", + SELLER = "seller" +} +/** + * Information about the rarity of an NFT's attribute in the specified collection. + * + * @public + */ +export interface NftAttributeRarity { + /** Name of the NFT's attribute. */ + value: string; + /** The type of NFT attribute. */ + traitType: string; + /** + * A number from 0 to 1 representing the prevalence of this value for this + * trait type in the current collection. + */ + prevalence: number; +} +/** + * Summary of the attribute prevalence for the specified NFT contract. + * + * @public + */ +export interface NftAttributesResponse { + /** The specified NFT contract's address. */ + contractAddress: string; + /** The specified NFT contract's total supply. */ + totalSupply: number; + /** + * The attribute prevalence of each trait grouped by the trait type for the + * provided NFT. + */ + summary: Record>; +} +/** The refresh result response object returned by {@link refreshContract}. */ +export interface RefreshContractResult { + /** The NFT contract address that was passed in to be refreshed. */ + contractAddress: string; + /** The current state of the refresh request. */ + refreshState: RefreshState; + /** + * Percentage of tokens currently refreshed, represented as an integer string. + * Field can be null if the refresh has not occurred. + */ + progress: string | null; +} +/** The current state of the NFT contract refresh process. */ +export declare enum RefreshState { + /** The provided contract is not an NFT or does not contain metadata. */ + DOES_NOT_EXIST = "does_not_exist", + /** The contract has already been queued for refresh. */ + ALREADY_QUEUED = "already_queued", + /** The contract is currently being refreshed. */ + IN_PROGRESS = "in_progress", + /** The contract refresh is complete. */ + FINISHED = "finished", + /** The contract refresh has been queued and await execution. */ + QUEUED = "queued", + /** The contract was unable to be queued due to an internal error. */ + QUEUE_FAILED = "queue_failed" +} +/** + * The parameter field of {@link TransactionReceiptsParams}. + * + * @public + */ +export interface TransactionReceiptsBlockNumber { + /** The block number to get transaction receipts for. */ + blockNumber: string; +} +/** + * The parameter field of {@link TransactionReceiptsParams}. + * + * @public + */ +export interface TransactionReceiptsBlockHash { + /** The block hash to get transaction receipts for. */ + blockHash: string; +} +/** + * The parameters to use with the {@link CoreNamespace.getTransactionReceipts} method. + * + * @public + */ +export declare type TransactionReceiptsParams = TransactionReceiptsBlockNumber | TransactionReceiptsBlockHash; +/** + * Response object for a {@link CoreNamespace.getTransactionReceipts} call. + * + * @public + */ +export interface TransactionReceiptsResponse { + /** A list of transaction receipts for the queried block. */ + receipts: TransactionReceipt[] | null; +} +/** + * Metadata object returned in a {@link AssetTransfersResult} object if the asset + * transferred is an ERC1155. + * + * @public + */ +export interface ERC1155Metadata { + tokenId: string; + value: string; +} +/** + * Information about the underlying contract for the asset that was transferred + * in a {@link AssetTransfersResult} object. + * + * @public + */ +export interface RawContract { + /** + * The raw transfer value as a hex string. `null` if the transfer was for an + * ERC721 or ERC1155 token. + */ + value: string | null; + /** The contract address. `null` if it was an internal or external transfer. */ + address: string | null; + /** + * The number of decimals in the contract as a hex string. `null` if the value + * is not in the contract and not available from other sources. + */ + decimal: string | null; +} +/** + * Optional parameters object for the {@link getNftsForContract} and + * {@link getNftsForContractIterator} functions. + * + * This interface is used to fetch NFTs with their associated metadata. To get + * Nfts without their associated metadata, use {@link GetBaseNftsForContractOptions}. + * + * @public + */ +export interface GetNftsForContractOptions { + /** + * Optional page key from an existing {@link NftContractBaseNftsResponse} or + * {@link NftContractNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */ + omitMetadata?: boolean; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; +} +/** + * Optional parameters object for the {@link getNftsForContract} and + * {@link getNftsForContractIterator} functions. + * + * This interface is used to fetch NFTs without their associated metadata. To + * get Nfts with their associated metadata, use {@link GetNftsForContractOptions}. + * + * @public + */ +export interface GetBaseNftsForContractOptions { + /** + * Optional page key from an existing {@link NftContractBaseNftsResponse} or + * {@link NftContractNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */ + omitMetadata: false; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; +} +/** + * Optional parameters object for the {@link getNftsForContract} method. + * + * This interface configures options when fetching the owner addresses of the + * provided contract. + * + * @public + */ +export interface GetOwnersForContractOptions { + /** + * Whether to include the token balances per token id for each owner. Defaults + * to false when omitted. + */ + withTokenBalances?: boolean; + /** The block number in hex or decimal to fetch owners for. */ + block?: string; + /** Optional page key to paginate the next page for large requests. */ + pageKey?: string; +} +/** + * Optional parameters object for the {@link getNftsForContract} method. + * + * This interface configures options when fetching the owner addresses of the + * provided contract. + * + * @public + */ +export interface GetOwnersForContractWithTokenBalancesOptions { + /** + * Whether to include the token balances per token id for each owner. Defaults + * to false when omitted. + */ + withTokenBalances: true; + /** The block number in hex or decimal to fetch owners for. */ + block?: string; + /** Optional page key to paginate the next page for large requests. */ + pageKey?: string; +} +/** + * The response object for the {@link getNftsForContract} function. The object + * contains the NFTs without metadata inside the NFT contract. + * + * @public + */ +export interface NftContractBaseNftsResponse { + /** An array of NFTs without metadata. */ + nfts: BaseNft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + pageKey?: string; +} +/** + * The response object for the {@link getNftsForContract} function. The object + * contains the NFTs with metadata inside the NFT contract. + * + * @public + */ +export interface NftContractNftsResponse { + /** An array of NFTs with metadata. */ + nfts: Nft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + pageKey?: string; +} +/** OpenSea's metadata for an NFT collection. */ +export interface OpenSeaCollectionMetadata { + /** The floor price of the NFT. */ + floorPrice?: number; + /** The name of the collection on OpenSea. */ + collectionName?: string; + /** The approval status of the collection on OpenSea. */ + safelistRequestStatus?: OpenSeaSafelistRequestStatus; + /** The image URL determined by OpenSea. */ + imageUrl?: string; + /** The description of the collection on OpenSea. */ + description?: string; + /** The homepage of the collection as determined by OpenSea. */ + externalUrl?: string; + /** The Twitter handle of the collection. */ + twitterUsername?: string; + /** The Discord URL of the collection. */ + discordUrl?: string; + /** Timestamp of when the OpenSea metadata was last ingested by Alchemy. */ + lastIngestedAt?: string; +} +/** An OpenSea collection's approval status. */ +export declare enum OpenSeaSafelistRequestStatus { + /** Verified collection. */ + VERIFIED = "verified", + /** Collections that are approved on open sea and can be found in search results. */ + APPROVED = "approved", + /** Collections that requested safelisting on OpenSea. */ + REQUESTED = "requested", + /** Brand new collections. */ + NOT_REQUESTED = "not_requested" +} +/** + * The response object for the {@link findContractDeployer} function. + * + * @public + */ +export interface DeployResult { + /** The address of the contract deployer, if it is available. */ + readonly deployerAddress?: string; + /** The block number the contract was deployed in. */ + readonly blockNumber: number; +} +/** + * Method names for Alchemy's custom Subscription API endpoints. + * + * This value is provided in the `method` field when creating an event filter on + * the Websocket Namespace. + */ +export declare enum AlchemySubscription { + PENDING_TRANSACTIONS = "alchemy_pendingTransactions", + MINED_TRANSACTIONS = "alchemy_minedTransactions" +} +/** + * Event filter for the {@link AlchemyWebSocketProvider.on} and + * {@link AlchemyWebSocketProvider.once} methods to use Alchemy's custom + * `alchemy_pendingTransactions` endpoint. + * + * Returns the transaction information for all pending transactions that match a + * given filter. For full documentation, see: + * {@link https://docs.alchemy.com/reference/alchemy-pendingtransactions} + * + * Note that excluding all optional parameters will return transaction + * information for ALL pending transactions that are added to the mempool. + * + * @public + */ +export interface AlchemyPendingTransactionsEventFilter { + method: AlchemySubscription.PENDING_TRANSACTIONS; + /** Filter pending transactions sent FROM the provided address or array of addresses. */ + fromAddress?: string | string[]; + /** Filter pending transactions sent TO the provided address or array of addresses. */ + toAddress?: string | string[]; + /** + * Whether to only include transaction hashes and exclude the rest of the + * transaction response for a smaller payload. Defaults to false (by default, + * the entire transaction response is included). + * + * Note that setting only {@link hashesOnly} to true will return the same + * response as subscribing to `newPendingTransactions`. + */ + hashesOnly?: boolean; +} +/** + * Event filter for the {@link AlchemyWebSocketProvider.on} and + * {@link AlchemyWebSocketProvider.once} methods to use Alchemy's custom + * `alchemy_minedTransactions` endpoint. + * + * Returns the transaction information for all mined transactions that match the + * provided filter. For full documentation, see: + * {@link https://docs.alchemy.com/reference/alchemy-minedtransactions} + * + * Note that excluding all optional parameters will return transaction + * information for ALL mined transactions. + * + * @public + */ +export interface AlchemyMinedTransactionsEventFilter { + method: AlchemySubscription.MINED_TRANSACTIONS; + /** + * Address filters to subscribe to. Defaults to all transactions if omitted. + * Limit 100 address filters. Requires a non-empty array. + */ + addresses?: NonEmptyArray; + /** + * Whether to include transactions that were removed from the mempool. + * Defaults to false. + */ + includeRemoved?: boolean; + /** + * Whether to only include transaction hashes and exclude the rest of the + * transaction response for a smaller payload. Defaults to false (by default, + * the entire transaction response is included). + */ + hashesOnly?: boolean; +} +/** + * Address filters for {@link AlchemyMinedTransactionsEventFilter}. Requires at + * least one of the fields to be set. + */ +export declare type AlchemyMinedTransactionsAddress = RequireAtLeastOne<{ + to?: string; + from?: string; +}>; +/** + * Alchemy's event type that extends the default {@link EventType} interface to + * also include Alchemy's Subscription API. + * + * @public + */ +export declare type AlchemyEventType = EventType | AlchemyEventFilter; +/** + * This type represents the Alchemy's Subscription API endpoints as event + * filters compatible with other ethers events. + */ +export declare type AlchemyEventFilter = AlchemyMinedTransactionsEventFilter | AlchemyPendingTransactionsEventFilter; +/** Options for the {@link TransactNamespace.sendPrivateTransaction} method. */ +export interface SendPrivateTransactionOptions { + /** + * Whether to use fast-mode. Defaults to false. Please note that fast mode + * transactions cannot be cancelled using + * {@link TransactNamespace.cancelPrivateTransaction}. method. + * + * See {@link https://docs.flashbots.net/flashbots-protect/rpc/fast-mode} for + * more details. + */ + fast: boolean; +} +/** SDK representation of a Webhook in the Notify API. */ +export interface Webhook { + /** The webhook's unique id. */ + id: string; + /** The network the webhook is on. */ + network: Network; + /** The type of webhook. */ + type: WebhookType; + /** The url that the webhook sends its payload to. */ + url: string; + /** Whether the webhook is currently active */ + isActive: boolean; + /** The creation time of the webhook as an ISO string. */ + timeCreated: string; + /** The signing key used to verify payloads for the webhook. */ + signingKey: string; + /** The webhook version. All newly created webhooks default to V2. */ + version: WebhookVersion; + /** + * The app id of the app used for the webhook. This field is only present on + * {@link MinedTransactionWebhook} and {@link DroppedTransactionWebhook} + */ + appId?: string; +} +/** The version of the webhook. All newly created webhooks default to V2. */ +export declare enum WebhookVersion { + V1 = "V1", + V2 = "V2" +} +/** The type of {@link Webhook}. */ +export declare enum WebhookType { + MINED_TRANSACTION = "MINED_TRANSACTION", + DROPPED_TRANSACTION = "DROPPED_TRANSACTION", + ADDRESS_ACTIVITY = "ADDRESS_ACTIVITY", + NFT_ACTIVITY = "NFT_ACTIVITY" +} +/** + * A Mined Transaction Webhook is used to notify your app whenever a transaction + * sent through your API key gets successfully mined. This is useful if you want + * to notify customers that their transaction went through. + */ +export interface MinedTransactionWebhook extends Webhook { + type: WebhookType.MINED_TRANSACTION; +} +/** + * A Dropped Transaction webhook is used to notify your app whenever a + * transaction sent through your API key gets dropped. This can be useful if you + * want to notify customers that their transactions were dropped. + */ +export interface DroppedTransactionWebhook extends Webhook { + type: WebhookType.DROPPED_TRANSACTION; +} +/** + * An Address Activity Webhook tracks ETH, ERC20, ERC721, and ERC1155 transfers + * for the provided addresses. This can be used to notify your app with + * real-time state changes when your tracked addresses send or receive tokens. + */ +export interface AddressActivityWebhook extends Webhook { + type: WebhookType.ADDRESS_ACTIVITY; +} +/** + * The NFT Activity Webhook tracks all ERC721 and ERC1155 activity. This can be + * used to notify your app with real time state changes when an NFT is + * transferred between addresses. + */ +export interface NftActivityWebhook extends Webhook { + type: WebhookType.NFT_ACTIVITY; +} +/** The response for a {@link NotifyNamespace.getAllWebhooks} method. */ +export interface GetAllWebhooksResponse { + /** All webhooks attached to the provided auth token. */ + webhooks: Webhook[]; + /** The total number of webhooks. */ + totalCount: number; +} +/** Options object for the {@link NotifyNamespace.getAddresses} method. */ +export interface GetAddressesOptions { + /** Number of addresses to fetch. */ + limit?: number; + /** Page */ + pageKey?: string; +} +/** Response object for the {@link NotifyNamespace.getAddresses} method. */ +export interface AddressActivityResponse { + /** The addresses for the webhook. */ + addresses: string[]; + /** The total number of addresses. */ + totalCount: number; + /** Optional page key used to fetch the remaining addresses. */ + pageKey?: string; +} +/** + * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order + * to create a {@link MinedTransactionWebhook} or {@link DroppedTransactionWebhook}. + * + * The webhook will be created on the app and network associated with the appId. + * To find the app id of a project, go to the Alchemy Dashboard in the Apps tab. + * After clicking on an app, the app id is the string in the URL following 'apps/'. + * + * This is a temporary workaround for now. We're planning on detecting the app + * id from the provided api key directly. Stay tuned! + */ +export interface TransactionWebhookParams { + /** The app id of the project to create the webhook on. */ + appId: string; +} +/** + * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order + * to create a {@link NftActivityWebhook}. + */ +export interface NftWebhookParams { + /** Array of NFT filters the webhook should track. */ + filters: NftFilter[]; + /** + * Optional network to create the webhook on. If omitted, the webhook will be + * created on network of the app provided in the api key config. + */ + network?: Network; +} +/** + * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order + * to create a {@link AddressActivityWebhook}. + */ +export interface AddressWebhookParams { + /** Array of addresses the webhook should activity for. */ + addresses: string[]; + /** + * Optional network to create the webhook on. If omitted, the webhook will be + * created on network of the app provided in the api key config. + */ + network?: Network; +} +/** NFT to track on a {@link NftActivityWebhook}. */ +export interface NftFilter { + /** The contract address of the NFT. */ + contractAddress: string; + /** The token id of the NFT. */ + tokenId: BigNumberish; +} +/** Response object for the {@link NotifyNamespace.getNftFilters} method. */ +export interface NftFiltersResponse { + /** The NFT filters on the provided webhook. */ + filters: NftFilter[]; + /** The total number of NFT filters on the webhook. */ + totalCount: number; + /** Optional page key used to fetch the remaining filters. */ + pageKey?: string; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to mark a + * webhook as active or inactive. + */ +export interface WebhookStatusUpdate { + /** Whether the webhook is active. */ + isActive: boolean; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to add and + * remove NFT filters for a {@link NftActivityWebhook}. + */ +export interface WebhookNftFilterUpdate { + /** The filters to additionally track. */ + addFilters: NftFilter[]; + /** Existing filters to remove. */ + removeFilters: NftFilter[]; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to add and + * remove addresses for a {@link AddressActivityWebhook}. + */ +export interface WebhookAddressUpdate { + /** The addresses to additionally track. */ + addAddresses: string[]; + /** Existing addresses to remove. */ + removeAddresses: string[]; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to replace + * all existing addresses for a {@link AddressActivityWebhook}. + */ +export interface WebhookAddressOverride { + /** The new addresses to track. Existing addresses will be removed. */ + newAddresses: string[]; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to update a + * {@link NftActivityWebhook}. + */ +export declare type NftWebhookUpdate = WebhookStatusUpdate | RequireAtLeastOne; +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to update a + * {@link AddressActivityWebhook}. + */ +export declare type AddressWebhookUpdate = WebhookStatusUpdate | RequireAtLeastOne | WebhookAddressOverride; +/** + * Requires at least one of the properties to be set. + * + * Implementation copied over from + * {@link https://learn.microsoft.com/en-us/javascript/api/@azure/keyvault-certificates/requireatleastone?view=azure-node-latest} + */ +export declare type RequireAtLeastOne = { + [K in keyof T]-?: Required> & Partial>>; +}[keyof T]; +/** Requires an array with at least one value. */ +export declare type NonEmptyArray = [T, ...T[]]; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/util/const.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/util/const.d.ts new file mode 100644 index 0000000..1269128 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/util/const.d.ts @@ -0,0 +1,43 @@ +import { Network as NetworkFromEthers } from '@ethersproject/networks'; +import { Network } from '../types/types'; +export declare const DEFAULT_ALCHEMY_API_KEY = "demo"; +export declare const DEFAULT_NETWORK = Network.ETH_MAINNET; +export declare const DEFAULT_MAX_RETRIES = 5; +export declare function getAlchemyNftHttpUrl(network: Network, apiKey: string): string; +export declare function getAlchemyWsUrl(network: Network, apiKey: string): string; +export declare function getAlchemyWebhookHttpUrl(): string; +export declare enum AlchemyApiType { + BASE = 0, + NFT = 1, + WEBHOOK = 2 +} +/** + * Mapping of network names to their corresponding Network strings used to + * create an Ethers.js Provider instance. + */ +export declare const EthersNetwork: { + "eth-mainnet": string; + "eth-ropsten": string; + "eth-goerli": string; + "eth-kovan": string; + "eth-rinkeby": string; + "opt-mainnet": string; + "opt-kovan": string; + "opt-goerli": string; + "arb-mainnet": string; + "arb-rinkeby": string; + "arb-goerli": string; + "polygon-mainnet": string; + "polygon-mumbai": string; + "astar-mainnet": string; +}; +/** + * Mapping of network names to their corresponding Ethers Network objects. These + * networks are not yet supported by Ethers and are listed here to be overriden + * in the provider. + */ +export declare const CustomNetworks: { + [key: string]: NetworkFromEthers; +}; +export declare function noop(): void; +export declare const ETH_NULL_VALUE = "0x"; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/util/logger.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/util/logger.d.ts new file mode 100644 index 0000000..7e8cda8 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/util/logger.d.ts @@ -0,0 +1,55 @@ +/** + * The SDK has 4 log levels and a 5th option for disabling all logging. By + * default, the log level is set to INFO. + * + * The order is a follows: DEBUG < INFO < WARN < ERROR + * + * All log types above the current log level will be outputted. + */ +export declare enum LogLevel { + DEBUG = 0, + INFO = 1, + WARN = 2, + ERROR = 3, + SILENT = 4 +} +/** + * The level of verbosity for the logger. + * + * @public + */ +export declare type LogLevelString = 'debug' | 'info' | 'warn' | 'error' | 'silent'; +/** + * Configures the verbosity of logging. The default log level is `info`. + * + * @param logLevel - The verbosity of logging. Can be any of the following values: + * + * - `debug`: The most verbose logging level. + * - `info`: The default logging level. + * - `warn`: A logging level for non-critical issues. + * - `error`: A logging level for critical issues. + * - `silent`: Turn off all logging. + * + * @public + */ +export declare function setLogLevel(logLevel: LogLevelString): void; +export declare function logDebug(message: string, ...args: unknown[]): void; +export declare function logInfo(message: string, ...args: unknown[]): void; +export declare function logWarn(message: string, ...args: unknown[]): void; +export declare function logError(message: string, ...args: unknown[]): void; +export declare class Logger { + /** The log level of the given Logger instance. */ + private _logLevel; + constructor(); + get logLevel(): LogLevel; + set logLevel(val: LogLevel); + debug(...args: unknown[]): void; + info(...args: unknown[]): void; + warn(...args: unknown[]): void; + error(...args: unknown[]): void; + /** + * Forwards log messages to their corresponding console counterparts if the + * log level allows it. + */ + private _log; +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/util/sendRest.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/util/sendRest.d.ts new file mode 100644 index 0000000..e356e41 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/util/sendRest.d.ts @@ -0,0 +1,11 @@ +/** + * Given a REST endpoint, method, and params, sends the request with axios and + * returns the response. + */ +import { AxiosRequestConfig, AxiosResponse } from 'axios'; +/** + * Helper function to send http requests using Axis. + * + * @private + */ +export declare function sendAxiosRequest(baseUrl: string, restApiName: string, methodName: string, params: Req, overrides?: AxiosRequestConfig): Promise>; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/util/util.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/util/util.d.ts new file mode 100644 index 0000000..7ce652d --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/util/util.d.ts @@ -0,0 +1,13 @@ +import { BaseNft, Nft, NftContract } from '../api/nft'; +import { RawBaseNft, RawContractBaseNft, RawGetContractsForOwnerResponse, RawGetNftSalesResponse, RawNft, RawNftAttributeRarity, RawNftContract, RawOpenSeaCollectionMetadata } from '../internal/raw-interfaces'; +import { GetContractsForOwnerResponse, GetNftSalesResponse, NftAttributeRarity, OpenSeaCollectionMetadata } from '../types/types'; +export declare function formatBlock(block: string | number): string; +export declare function getNftContractFromRaw(rawNftContract: RawNftContract): NftContract; +export declare function getBaseNftFromRaw(rawBaseNft: RawBaseNft): BaseNft; +export declare function getBaseNftFromRaw(rawContractBaseNft: RawContractBaseNft, contractAddress: string): BaseNft; +export declare function getNftFromRaw(rawNft: RawNft): Nft; +export declare function getNftSalesFromRaw(rawNftSales: RawGetNftSalesResponse): GetNftSalesResponse; +export declare function getNftRarityFromRaw(rawNftRarity: RawNftAttributeRarity[]): NftAttributeRarity[]; +export declare function getContractsForOwnerFromRaw(rawContractsForOwner: RawGetContractsForOwnerResponse): GetContractsForOwnerResponse; +export declare function parseOpenSeaMetadata(openSea: RawOpenSeaCollectionMetadata | undefined): OpenSeaCollectionMetadata | undefined; +export declare const IS_BROWSER: boolean; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/src/version.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/src/version.d.ts new file mode 100644 index 0000000..86a14fc --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/src/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "2.2.5"; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/test/integration/alchemy.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/test/integration/alchemy.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/test/integration/alchemy.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/test/integration/core.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/test/integration/core.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/test/integration/core.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/test/integration/nft.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/test/integration/nft.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/test/integration/nft.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/test/integration/notify.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/test/integration/notify.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/test/integration/notify.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/test/integration/provider.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/test/integration/provider.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/test/integration/provider.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/test/integration/transact.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/test/integration/transact.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/test/integration/transact.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/test/integration/wallet.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/test/integration/wallet.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/test/integration/wallet.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/test/test-util.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/test/test-util.d.ts new file mode 100644 index 0000000..52fd8cd --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/test/test-util.d.ts @@ -0,0 +1,45 @@ +/// +import { BaseNft, Media, Nft, NftContract, NftSaleMarketplace, NftSaleTakerType, NftTokenType, OwnedBaseNft, OwnedNft, TokenUri } from '../src'; +import { RawBaseNft, RawContractBaseNft, RawContractForOwner, RawNft, RawNftContract, RawNftContractMetadata, RawNftSale, RawOpenSeaCollectionMetadata, RawOwnedBaseNft, RawOwnedNft } from '../src/internal/raw-interfaces'; +import { BlockHead, LogsEvent } from '../src/internal/websocket-backfiller'; +export declare const TEST_WALLET_PRIVATE_KEY = "dd5bdf09397b1fdf98e4f72c66047d5104b1511fa7dc1b8fdddd61a150f732c9"; +export declare const TEST_WALLET_PUBLIC_ADDRESS = "0x4b9007B0BcE78cfB634032ec31Ed56adB464287b"; +/** Creates a dummy response for the `getContractMetadata` endpoint. */ +export declare function createRawNftContract(address: string, tokenType: NftTokenType, name?: string, symbol?: string, totalSupply?: string, openSea?: RawOpenSeaCollectionMetadata): RawNftContract; +export declare function createRawOpenSeaCollectionMetadata(): RawOpenSeaCollectionMetadata; +export declare function createRawOwnedBaseNft(address: string, tokenId: string, balance: string, tokenType?: NftTokenType): RawOwnedBaseNft; +export declare function createOwnedBaseNft(address: string, tokenId: string, balance: number, tokenType?: NftTokenType): OwnedBaseNft; +export declare function createRawBaseNft(contractAddress: string, tokenId: string | number, tokenType?: NftTokenType): RawBaseNft; +export declare function createBaseNft(address: string, tokenId: string | number, tokenType?: NftTokenType): BaseNft; +export declare function createNft(title: string, address: string, tokenId: string, tokenType?: NftTokenType, tokenUri?: TokenUri, media?: TokenUri[] | undefined): Nft; +interface RawNftOptions { + tokenUri?: TokenUri; + media?: TokenUri[] | undefined; + timeLastUpdated?: string; + description?: string | Array; + contractMetadata?: RawNftContractMetadata; +} +export declare function createRawNft(contractAddress: string, title: string, tokenId: string, tokenType?: NftTokenType, options?: RawNftOptions): RawNft; +export declare function createRawOwnedNft(title: string, address: string, tokenId: string, balance: string, tokenType?: NftTokenType, contractMetadata?: RawNftContractMetadata): RawOwnedNft; +export declare function createOwnedNft(title: string, address: string, tokenId: string, balance: number, tokenType?: NftTokenType): OwnedNft; +export declare function createRawNftContractBaseNft(tokenId: string): RawContractBaseNft; +export declare function createRawNftSale(contractAddress: string, tokenId: string, marketplace: NftSaleMarketplace, taker: NftSaleTakerType, buyerAddress: string, sellerAddress: string): RawNftSale; +export declare function createRawContractForOwner(address: string, tokenId: string, media: Media, isSpam?: boolean, name?: string, tokenType?: NftTokenType, symbol?: string, totalSupply?: string, opensea?: RawOpenSeaCollectionMetadata): RawContractForOwner; +export declare function createNftMediaData(bytes?: number, format?: string, thumbnail?: string): Media; +export declare function verifyNftContractMetadata(actualNftContract: NftContract, expectedNftContract: NftContract, address: string, name: string, symbol: string, totalSupply: string, tokenType?: NftTokenType, openSea?: RawOpenSeaCollectionMetadata): void; +export declare type Mocked = T & { + [K in keyof T]: T[K] extends Function ? T[K] & jest.Mock : T[K]; +}; +/** A Promise implementation for deferred resolution. */ +export declare class Deferred { + promise: Promise; + constructor(); + resolve: (value: R | Promise) => void; + reject: (reason: Error) => void; +} +export declare function makeNewHeadsEvent(blockNumber: number, hash: string): BlockHead; +export declare function makeLogsEvent(blockNumber: number, blockHash: string, isRemoved?: boolean, logIndex?: number): LogsEvent; +export declare const TESTING_PRIVATE_KEY = "dd5bdf09397b1fdf98e4f72c66047d5104b1511fa7dc1b8fdddd61a150f732c9"; +export declare const TESTING_PUBLIC_ADDRESS = "0x4b9007B0BcE78cfB634032ec31Ed56adB464287b"; +export declare function loadAlchemyEnv(): Promise; +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/alchemy.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/alchemy.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/alchemy.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/backoff.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/backoff.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/backoff.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/contract.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/contract.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/contract.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/core-namespace.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/core-namespace.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/core-namespace.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/logger.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/logger.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/logger.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/nft-api.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/nft-api.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/nft-api.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/nft.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/nft.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/nft.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/provider.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/provider.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/provider.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/request-batcher.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/request-batcher.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/request-batcher.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/transact.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/transact.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/transact.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/wallet.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/wallet.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/wallet.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/websocket-backfiller.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/websocket-backfiller.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/websocket-backfiller.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/websocket-provider.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/websocket-provider.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/test/unit/websocket-provider.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/utils.js b/test/node_modules/alchemy-sdk/dist/esm/api/utils.js new file mode 100644 index 0000000..3abb94c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/utils.js @@ -0,0 +1,619 @@ +export { dnsEncode, hashMessage, id, isValidName, namehash } from '@ethersproject/hash'; +import { arrayify } from '@ethersproject/bytes'; +export { arrayify, concat, hexConcat, hexDataLength, hexDataSlice, hexStripZeros, hexValue, hexZeroPad, hexlify, isBytes, isBytesLike, isHexString, joinSignature, splitSignature, stripZeros, zeroPad } from '@ethersproject/bytes'; +export { formatEther, formatUnits, parseEther, parseUnits } from '@ethersproject/units'; +import '@ethersproject/bignumber'; +export { Interface } from '@ethersproject/abi'; + +const version$1 = "logger/5.7.0"; + +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"; + /////////////////// + // Interaction Errors + // The user rejected the action, such as signing a message or sending + // a transaction + ErrorCode["ACTION_REJECTED"] = "ACTION_REJECTED"; +})(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; + let url = ""; + switch (code) { + case ErrorCode.NUMERIC_FAULT: { + url = "NUMERIC_FAULT"; + const fault = message; + switch (fault) { + case "overflow": + case "underflow": + case "division-by-zero": + url += "-" + fault; + break; + case "negative-power": + case "negative-width": + url += "-unsupported"; + break; + case "unbound-bitwise-result": + url += "-unbound-result"; + break; + } + break; + } + case ErrorCode.CALL_EXCEPTION: + case ErrorCode.INSUFFICIENT_FUNDS: + case ErrorCode.MISSING_NEW: + case ErrorCode.NONCE_EXPIRED: + case ErrorCode.REPLACEMENT_UNDERPRICED: + case ErrorCode.TRANSACTION_REPLACED: + case ErrorCode.UNPREDICTABLE_GAS_LIMIT: + url = code; + break; + } + if (url) { + message += " [ See: https:/\/links.ethers.org/v5-errors-" + url + " ]"; + } + 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 (_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$1); + } + 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 = "strings/5.7.0"; + +const logger = new Logger(version); +/////////////////////////////// +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.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); +} +// 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.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 _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 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 }; + }); +} +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... +"ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((v) => parseInt(v, 16)); +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"); +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"); +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); +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"); + +export { toUtf8Bytes, toUtf8String }; +//# sourceMappingURL=utils.js.map diff --git a/test/node_modules/alchemy-sdk/dist/esm/api/utils.js.map b/test/node_modules/alchemy-sdk/dist/esm/api/utils.js.map new file mode 100644 index 0000000..6d9a241 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/api/utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.js","sources":["../../../node_modules/@ethersproject/logger/lib.esm/_version.js","../../../node_modules/@ethersproject/logger/lib.esm/index.js","../../../node_modules/@ethersproject/strings/lib.esm/_version.js","../../../node_modules/@ethersproject/strings/lib.esm/utf8.js","../../../node_modules/@ethersproject/strings/lib.esm/idna.js"],"sourcesContent":["export const version = \"logger/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nlet _permanentCensorErrors = false;\nlet _censorErrors = false;\nconst LogLevels = { debug: 1, \"default\": 2, info: 2, warning: 3, error: 4, off: 5 };\nlet _logLevel = LogLevels[\"default\"];\nimport { version } from \"./_version\";\nlet _globalLogger = null;\nfunction _checkNormalize() {\n try {\n const missing = [];\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 ;\n }\n catch (error) {\n missing.push(form);\n }\n });\n if (missing.length) {\n throw new Error(\"missing \" + missing.join(\", \"));\n }\n if (String.fromCharCode(0xe9).normalize(\"NFD\") !== String.fromCharCode(0x65, 0x0301)) {\n throw new Error(\"broken implementation\");\n }\n }\n catch (error) {\n return error.message;\n }\n return null;\n}\nconst _normalizeError = _checkNormalize();\nexport var LogLevel;\n(function (LogLevel) {\n LogLevel[\"DEBUG\"] = \"DEBUG\";\n LogLevel[\"INFO\"] = \"INFO\";\n LogLevel[\"WARNING\"] = \"WARNING\";\n LogLevel[\"ERROR\"] = \"ERROR\";\n LogLevel[\"OFF\"] = \"OFF\";\n})(LogLevel || (LogLevel = {}));\nexport var ErrorCode;\n(function (ErrorCode) {\n ///////////////////\n // Generic Errors\n // Unknown Error\n ErrorCode[\"UNKNOWN_ERROR\"] = \"UNKNOWN_ERROR\";\n // Not Implemented\n ErrorCode[\"NOT_IMPLEMENTED\"] = \"NOT_IMPLEMENTED\";\n // Unsupported Operation\n // - operation\n ErrorCode[\"UNSUPPORTED_OPERATION\"] = \"UNSUPPORTED_OPERATION\";\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 ErrorCode[\"NETWORK_ERROR\"] = \"NETWORK_ERROR\";\n // Some sort of bad response from the server\n ErrorCode[\"SERVER_ERROR\"] = \"SERVER_ERROR\";\n // Timeout\n ErrorCode[\"TIMEOUT\"] = \"TIMEOUT\";\n ///////////////////\n // Operational Errors\n // Buffer Overrun\n ErrorCode[\"BUFFER_OVERRUN\"] = \"BUFFER_OVERRUN\";\n // Numeric Fault\n // - operation: the operation being executed\n // - fault: the reason this faulted\n ErrorCode[\"NUMERIC_FAULT\"] = \"NUMERIC_FAULT\";\n ///////////////////\n // Argument Errors\n // Missing new operator to an object\n // - name: The name of the class\n ErrorCode[\"MISSING_NEW\"] = \"MISSING_NEW\";\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 ErrorCode[\"INVALID_ARGUMENT\"] = \"INVALID_ARGUMENT\";\n // Missing argument to a function:\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n ErrorCode[\"MISSING_ARGUMENT\"] = \"MISSING_ARGUMENT\";\n // Too many arguments\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n ErrorCode[\"UNEXPECTED_ARGUMENT\"] = \"UNEXPECTED_ARGUMENT\";\n ///////////////////\n // Blockchain Errors\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 ErrorCode[\"CALL_EXCEPTION\"] = \"CALL_EXCEPTION\";\n // Insufficient funds (< value + gasLimit * gasPrice)\n // - transaction: the transaction attempted\n ErrorCode[\"INSUFFICIENT_FUNDS\"] = \"INSUFFICIENT_FUNDS\";\n // Nonce has already been used\n // - transaction: the transaction attempted\n ErrorCode[\"NONCE_EXPIRED\"] = \"NONCE_EXPIRED\";\n // The replacement fee for the transaction is too low\n // - transaction: the transaction attempted\n ErrorCode[\"REPLACEMENT_UNDERPRICED\"] = \"REPLACEMENT_UNDERPRICED\";\n // The gas limit could not be estimated\n // - transaction: the transaction passed to estimateGas\n ErrorCode[\"UNPREDICTABLE_GAS_LIMIT\"] = \"UNPREDICTABLE_GAS_LIMIT\";\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 ErrorCode[\"TRANSACTION_REPLACED\"] = \"TRANSACTION_REPLACED\";\n ///////////////////\n // Interaction Errors\n // The user rejected the action, such as signing a message or sending\n // a transaction\n ErrorCode[\"ACTION_REJECTED\"] = \"ACTION_REJECTED\";\n})(ErrorCode || (ErrorCode = {}));\n;\nconst HEX = \"0123456789abcdef\";\nexport class Logger {\n constructor(version) {\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n value: version,\n writable: false\n });\n }\n _log(logLevel, args) {\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]) {\n return;\n }\n console.log.apply(console, args);\n }\n debug(...args) {\n this._log(Logger.levels.DEBUG, args);\n }\n info(...args) {\n this._log(Logger.levels.INFO, args);\n }\n warn(...args) {\n this._log(Logger.levels.WARNING, args);\n }\n makeError(message, code, params) {\n // Errors are being censored\n if (_censorErrors) {\n return this.makeError(\"censored error\", code, {});\n }\n if (!code) {\n code = Logger.errors.UNKNOWN_ERROR;\n }\n if (!params) {\n params = {};\n }\n const messageDetails = [];\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 }\n else {\n messageDetails.push(key + \"=\" + JSON.stringify(value));\n }\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 const reason = message;\n let url = \"\";\n switch (code) {\n case ErrorCode.NUMERIC_FAULT: {\n url = \"NUMERIC_FAULT\";\n const fault = message;\n switch (fault) {\n case \"overflow\":\n case \"underflow\":\n case \"division-by-zero\":\n url += \"-\" + fault;\n break;\n case \"negative-power\":\n case \"negative-width\":\n url += \"-unsupported\";\n break;\n case \"unbound-bitwise-result\":\n url += \"-unbound-result\";\n break;\n }\n break;\n }\n case ErrorCode.CALL_EXCEPTION:\n case ErrorCode.INSUFFICIENT_FUNDS:\n case ErrorCode.MISSING_NEW:\n case ErrorCode.NONCE_EXPIRED:\n case ErrorCode.REPLACEMENT_UNDERPRICED:\n case ErrorCode.TRANSACTION_REPLACED:\n case ErrorCode.UNPREDICTABLE_GAS_LIMIT:\n url = code;\n break;\n }\n if (url) {\n message += \" [ See: https:/\\/links.ethers.org/v5-errors-\" + url + \" ]\";\n }\n if (messageDetails.length) {\n message += \" (\" + messageDetails.join(\", \") + \")\";\n }\n // @TODO: Any??\n const error = new Error(message);\n error.reason = reason;\n error.code = code;\n Object.keys(params).forEach(function (key) {\n error[key] = params[key];\n });\n return error;\n }\n throwError(message, code, params) {\n throw this.makeError(message, code, params);\n }\n throwArgumentError(message, name, value) {\n return this.throwError(message, Logger.errors.INVALID_ARGUMENT, {\n argument: name,\n value: value\n });\n }\n assert(condition, message, code, params) {\n if (!!condition) {\n return;\n }\n this.throwError(message, code, params);\n }\n assertArgument(condition, message, name, value) {\n if (!!condition) {\n return;\n }\n this.throwArgumentError(message, name, value);\n }\n checkNormalize(message) {\n if (message == null) {\n message = \"platform missing String.prototype.normalize\";\n }\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 checkSafeUint53(value, message) {\n if (typeof (value) !== \"number\") {\n return;\n }\n if (message == null) {\n 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 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 checkArgumentCount(count, expectedCount, message) {\n if (message) {\n message = \": \" + message;\n }\n else {\n message = \"\";\n }\n if (count < expectedCount) {\n this.throwError(\"missing argument\" + message, Logger.errors.MISSING_ARGUMENT, {\n count: count,\n expectedCount: expectedCount\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 checkNew(target, kind) {\n if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n checkAbstract(target, kind) {\n if (target === kind) {\n this.throwError(\"cannot instantiate abstract class \" + JSON.stringify(kind.name) + \" directly; use a sub-class\", Logger.errors.UNSUPPORTED_OPERATION, { 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 static globalLogger() {\n if (!_globalLogger) {\n _globalLogger = new Logger(version);\n }\n return _globalLogger;\n }\n static setCensorship(censorship, permanent) {\n if (!censorship && permanent) {\n this.globalLogger().throwError(\"cannot permanently disable censorship\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n if (_permanentCensorErrors) {\n if (!censorship) {\n return;\n }\n this.globalLogger().throwError(\"error censorship permanent\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n _censorErrors = !!censorship;\n _permanentCensorErrors = !!permanent;\n }\n static setLogLevel(logLevel) {\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 static from(version) {\n return new Logger(version);\n }\n}\nLogger.errors = ErrorCode;\nLogger.levels = LogLevel;\n//# sourceMappingURL=index.js.map","export const version = \"strings/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { arrayify } from \"@ethersproject/bytes\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n///////////////////////////////\nexport var UnicodeNormalizationForm;\n(function (UnicodeNormalizationForm) {\n UnicodeNormalizationForm[\"current\"] = \"\";\n UnicodeNormalizationForm[\"NFC\"] = \"NFC\";\n UnicodeNormalizationForm[\"NFD\"] = \"NFD\";\n UnicodeNormalizationForm[\"NFKC\"] = \"NFKC\";\n UnicodeNormalizationForm[\"NFKD\"] = \"NFKD\";\n})(UnicodeNormalizationForm || (UnicodeNormalizationForm = {}));\n;\nexport var Utf8ErrorReason;\n(function (Utf8ErrorReason) {\n // A continuation byte was present where there was nothing to continue\n // - offset = the index the codepoint began in\n Utf8ErrorReason[\"UNEXPECTED_CONTINUE\"] = \"unexpected continuation byte\";\n // An invalid (non-continuation) byte to start a UTF-8 codepoint was found\n // - offset = the index the codepoint began in\n Utf8ErrorReason[\"BAD_PREFIX\"] = \"bad codepoint prefix\";\n // The string is too short to process the expected codepoint\n // - offset = the index the codepoint began in\n Utf8ErrorReason[\"OVERRUN\"] = \"string overrun\";\n // A missing continuation byte was expected but not found\n // - offset = the index the continuation byte was expected at\n Utf8ErrorReason[\"MISSING_CONTINUE\"] = \"missing continuation byte\";\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 Utf8ErrorReason[\"OUT_OF_RANGE\"] = \"out of UTF-8 range\";\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 Utf8ErrorReason[\"UTF16_SURROGATE\"] = \"UTF-16 surrogate\";\n // The string is an overlong representation\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; already bounds checked\n Utf8ErrorReason[\"OVERLONG\"] = \"overlong representation\";\n})(Utf8ErrorReason || (Utf8ErrorReason = {}));\n;\nfunction errorFunc(reason, offset, bytes, output, badCodepoint) {\n return logger.throwArgumentError(`invalid codepoint at offset ${offset}; ${reason}`, \"bytes\", bytes);\n}\nfunction ignoreFunc(reason, offset, bytes, output, badCodepoint) {\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) {\n break;\n }\n i++;\n }\n return i;\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 // Nothing to skip\n return 0;\n}\nfunction replaceFunc(reason, offset, bytes, output, badCodepoint) {\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 // Put the replacement character into the output\n output.push(0xfffd);\n // Otherwise, process as if ignoring errors\n return ignoreFunc(reason, offset, bytes, output, badCodepoint);\n}\n// Common error handing strategies\nexport const Utf8ErrorFuncs = Object.freeze({\n error: errorFunc,\n ignore: ignoreFunc,\n replace: replaceFunc\n});\n// http://stackoverflow.com/questions/13356493/decode-utf-8-with-javascript#13691499\nfunction getUtf8CodePoints(bytes, onError) {\n if (onError == null) {\n onError = Utf8ErrorFuncs.error;\n }\n bytes = arrayify(bytes);\n const result = [];\n let i = 0;\n // Invalid bytes are ignored\n while (i < bytes.length) {\n const c = bytes[i++];\n // 0xxx xxxx\n if (c >> 7 === 0) {\n result.push(c);\n continue;\n }\n // Multibyte; how many bytes left for this character?\n let extraLength = null;\n let overlongMask = null;\n // 110x xxxx 10xx xxxx\n if ((c & 0xe0) === 0xc0) {\n extraLength = 1;\n overlongMask = 0x7f;\n // 1110 xxxx 10xx xxxx 10xx xxxx\n }\n else if ((c & 0xf0) === 0xe0) {\n extraLength = 2;\n overlongMask = 0x7ff;\n // 1111 0xxx 10xx xxxx 10xx xxxx 10xx xxxx\n }\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 }\n else {\n i += onError(Utf8ErrorReason.BAD_PREFIX, i - 1, bytes, result);\n }\n continue;\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 // Remove the length prefix from the char\n let res = c & ((1 << (8 - extraLength - 1)) - 1);\n for (let j = 0; j < extraLength; j++) {\n let nextChar = bytes[i];\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 // See above loop for invalid continuation byte\n if (res === null) {\n 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 // 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 // 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 result.push(res);\n }\n return result;\n}\n// http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array\nexport function toUtf8Bytes(str, form = UnicodeNormalizationForm.current) {\n if (form != UnicodeNormalizationForm.current) {\n logger.checkNormalize();\n str = str.normalize(form);\n }\n let result = [];\n for (let i = 0; i < str.length; i++) {\n const c = str.charCodeAt(i);\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 if (i >= str.length || (c2 & 0xfc00) !== 0xdc00) {\n throw new Error(\"invalid utf-8 string\");\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 return arrayify(result);\n}\n;\nfunction escapeChar(value) {\n const hex = (\"0000\" + value.toString(16));\n return \"\\\\u\" + hex.substring(hex.length - 4);\n}\nexport function _toEscapedUtf8String(bytes, onError) {\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 if (codePoint >= 32 && codePoint < 127) {\n return String.fromCharCode(codePoint);\n }\n }\n if (codePoint <= 0xffff) {\n return escapeChar(codePoint);\n }\n codePoint -= 0x10000;\n return escapeChar(((codePoint >> 10) & 0x3ff) + 0xd800) + escapeChar((codePoint & 0x3ff) + 0xdc00);\n }).join(\"\") + '\"';\n}\nexport function _toUtf8String(codePoints) {\n return codePoints.map((codePoint) => {\n if (codePoint <= 0xffff) {\n return String.fromCharCode(codePoint);\n }\n codePoint -= 0x10000;\n return String.fromCharCode((((codePoint >> 10) & 0x3ff) + 0xd800), ((codePoint & 0x3ff) + 0xdc00));\n }).join(\"\");\n}\nexport function toUtf8String(bytes, onError) {\n return _toUtf8String(getUtf8CodePoints(bytes, onError));\n}\nexport function toUtf8CodePoints(str, form = UnicodeNormalizationForm.current) {\n return getUtf8CodePoints(toUtf8Bytes(str, form));\n}\n//# sourceMappingURL=utf8.js.map","\"use strict\";\nimport { toUtf8CodePoints, _toUtf8String, UnicodeNormalizationForm } from \"./utf8\";\nfunction bytes2(data) {\n if ((data.length % 4) !== 0) {\n throw new Error(\"bad data\");\n }\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}\nfunction createTable(data, func) {\n if (!func) {\n func = function (value) { return [parseInt(value, 16)]; };\n }\n let lo = 0;\n let result = {};\n data.split(\",\").forEach((pair) => {\n let comps = pair.split(\":\");\n lo += parseInt(comps[0], 16);\n result[lo] = func(comps[1]);\n });\n return result;\n}\nfunction createRangeTable(data) {\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 }\n else if (comps[1] === \"\") {\n comps[1] = \"1\";\n }\n let lo = hi + parseInt(comps[0], 16);\n hi = parseInt(comps[1], 16);\n return { l: lo, h: hi };\n });\n}\nfunction matchMap(value, ranges) {\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) {\n continue;\n }\n return range;\n }\n }\n return null;\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// @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));\nconst Table_B_2_ranges = [\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);\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\");\nfunction flatten(values) {\n return values.reduce((accum, value) => {\n value.forEach((value) => { accum.push(value); });\n return accum;\n }, []);\n}\nexport function _nameprepTableA1(codepoint) {\n return !!matchMap(codepoint, Table_A_1_ranges);\n}\nexport function _nameprepTableB2(codepoint) {\n let range = matchMap(codepoint, Table_B_2_ranges);\n if (range) {\n return [codepoint + range.s];\n }\n let codes = Table_B_2_lut_abs[codepoint];\n if (codes) {\n return codes;\n }\n let shift = Table_B_2_lut_rel[codepoint];\n if (shift) {\n return [codepoint + shift[0]];\n }\n let complex = Table_B_2_complex[codepoint];\n if (complex) {\n return complex;\n }\n return null;\n}\nexport function _nameprepTableC(codepoint) {\n return !!matchMap(codepoint, Table_C_ranges);\n}\nexport function nameprep(value) {\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) {\n return value.toLowerCase();\n }\n // Get the code points (keeping the current normalization)\n let codes = toUtf8CodePoints(value);\n codes = flatten(codes.map((code) => {\n // Substitute Table B.1 (Maps to Nothing)\n if (Table_B_1_flags.indexOf(code) >= 0) {\n return [];\n }\n if (code >= 0xfe00 && code <= 0xfe0f) {\n return [];\n }\n // Substitute Table B.2 (Case Folding)\n let codesTableB2 = _nameprepTableB2(code);\n if (codesTableB2) {\n return codesTableB2;\n }\n // No Substitution\n return [code];\n }));\n // Normalize using form KC\n codes = toUtf8CodePoints(_toUtf8String(codes), UnicodeNormalizationForm.NFKC);\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 // 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 // IDNA extras\n let name = _toUtf8String(codes);\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 return name;\n}\n//# sourceMappingURL=idna.js.map"],"names":["version"],"mappings":";;;;;;;AAAO,MAAMA,SAAO,GAAG,cAAc;;ACCrC,IAAI,sBAAsB,GAAG,KAAK,CAAC;AACnC,IAAI,aAAa,GAAG,KAAK,CAAC;AAC1B,MAAM,SAAS,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;AACpF,IAAI,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC;AAErC,IAAI,aAAa,GAAG,IAAI,CAAC;AACzB,SAAS,eAAe,GAAG;AAC3B,IAAI,IAAI;AACR,QAAQ,MAAM,OAAO,GAAG,EAAE,CAAC;AAC3B;AACA,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK;AACzD,YAAY,IAAI;AAChB,gBAA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;AAChC,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;AAC3B,SAAS;AACT,aAAa,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE;AAClC,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;AAC3B,SAAS;AACT,QAAQ,IAAI,EAAE,GAAG,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAC7C,QAAQ,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACpC,QAAQ,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;AAChC,KAAK,CAAC,CAAC;AACP,CAAC;AAewB,gBAAgB,CAAC,87CAA87C,EAAE;AAC1+C;AACwB,qDAAqD,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE;AA6C3F,WAAW,CAAC,ufAAuf,EAAE;AACrgB,WAAW,CAAC,wdAAwd,EAAE;AACte,WAAW,CAAC,w3DAAw3D,EAAE,MAAM,EAAE;AACj5D,gBAAgB,CAAC,yLAAyL;;;;"} \ No newline at end of file diff --git a/test/node_modules/alchemy-sdk/dist/esm/index-02af91ae.js b/test/node_modules/alchemy-sdk/dist/esm/index-02af91ae.js new file mode 100644 index 0000000..d61bdeb --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/index-02af91ae.js @@ -0,0 +1,3145 @@ +import './api/utils'; +import { BigNumber } from '@ethersproject/bignumber'; +import axios from 'axios'; +import { Provider } from '@ethersproject/abstract-provider'; +import { Wallet as Wallet$1 } from '@ethersproject/wallet'; +import { Contract as Contract$1, ContractFactory as ContractFactory$1 } from '@ethersproject/contracts'; + +/** + * The supported networks by Alchemy. Note that some functions are not available + * on all networks. Please refer to the Alchemy documentation for which APIs are + * available on which networks + * {@link https://docs.alchemy.com/alchemy/apis/feature-support-by-chain} + * + * @public + */ +var Network; +(function (Network) { + Network["ETH_MAINNET"] = "eth-mainnet"; + /** @deprecated - Will be removed in subsequent versions */ + Network["ETH_ROPSTEN"] = "eth-ropsten"; + Network["ETH_GOERLI"] = "eth-goerli"; + /** @deprecated - Will be removed in subsequent versions */ + Network["ETH_KOVAN"] = "eth-kovan"; + /** @deprecated - Will be removed in subsequent versions */ + Network["ETH_RINKEBY"] = "eth-rinkeby"; + Network["OPT_MAINNET"] = "opt-mainnet"; + /** @deprecated - Will be removed in subsequent versions */ + Network["OPT_KOVAN"] = "opt-kovan"; + Network["OPT_GOERLI"] = "opt-goerli"; + Network["ARB_MAINNET"] = "arb-mainnet"; + /** @deprecated - Will be removed in subsequent versions */ + Network["ARB_RINKEBY"] = "arb-rinkeby"; + Network["ARB_GOERLI"] = "arb-goerli"; + Network["MATIC_MAINNET"] = "polygon-mainnet"; + Network["MATIC_MUMBAI"] = "polygon-mumbai"; + Network["ASTAR_MAINNET"] = "astar-mainnet"; +})(Network || (Network = {})); +/** Token Types for the `getTokenBalances()` endpoint. */ +var TokenBalanceType; +(function (TokenBalanceType) { + /** + * Option to fetch the top 100 tokens by 24-hour volume. This option is only + * available on Mainnet in Ethereum, Polygon, and Arbitrum. + */ + TokenBalanceType["DEFAULT_TOKENS"] = "DEFAULT_TOKENS"; + /** + * Option to fetch the set of ERC-20 tokens that the address as ever held. his + * list is produced by an address's historical transfer activity and includes + * all tokens that the address has ever received. + */ + TokenBalanceType["ERC20"] = "erc20"; +})(TokenBalanceType || (TokenBalanceType = {})); +/** + * Categories of transfers to use with the {@link AssetTransfersParams} request + * object when using {@link CoreNamespace.getAssetTransfers}. + * + * @public + */ +var AssetTransfersCategory; +(function (AssetTransfersCategory) { + /** + * Top level ETH transactions that occur where the `fromAddress` is an + * external user-created address. External addresses have private keys and are + * accessed by users. + */ + AssetTransfersCategory["EXTERNAL"] = "external"; + /** + * Top level ETH transactions that occur where the `fromAddress` is an + * internal, smart contract address. For example, a smart contract calling + * another smart contract or sending + */ + AssetTransfersCategory["INTERNAL"] = "internal"; + /** ERC20 transfers. */ + AssetTransfersCategory["ERC20"] = "erc20"; + /** ERC721 transfers. */ + AssetTransfersCategory["ERC721"] = "erc721"; + /** ERC1155 transfers. */ + AssetTransfersCategory["ERC1155"] = "erc1155"; + /** Special contracts that don't follow ERC 721/1155, (ex: CryptoKitties). */ + AssetTransfersCategory["SPECIALNFT"] = "specialnft"; +})(AssetTransfersCategory || (AssetTransfersCategory = {})); +/** + * Enum for the order of the {@link AssetTransfersParams} request object when + * using {@link CoreNamespace.getAssetTransfers}. + * + * @deprecated Use {@link SortingOrder} instead. This enum will be removed in a + * future version. + * @public + */ +var AssetTransfersOrder; +(function (AssetTransfersOrder) { + AssetTransfersOrder["ASCENDING"] = "asc"; + AssetTransfersOrder["DESCENDING"] = "desc"; +})(AssetTransfersOrder || (AssetTransfersOrder = {})); +/** + * An enum for specifying the token type on NFTs. + * + * @public + */ +var NftTokenType; +(function (NftTokenType) { + NftTokenType["ERC721"] = "ERC721"; + NftTokenType["ERC1155"] = "ERC1155"; + NftTokenType["UNKNOWN"] = "UNKNOWN"; +})(NftTokenType || (NftTokenType = {})); +/** Potential reasons why an NFT contract was classified as spam. */ +var NftSpamClassification; +(function (NftSpamClassification) { + NftSpamClassification["Erc721TooManyOwners"] = "Erc721TooManyOwners"; + NftSpamClassification["Erc721TooManyTokens"] = "Erc721TooManyTokens"; + NftSpamClassification["Erc721DishonestTotalSupply"] = "Erc721DishonestTotalSupply"; + NftSpamClassification["MostlyHoneyPotOwners"] = "MostlyHoneyPotOwners"; + NftSpamClassification["OwnedByMostHoneyPots"] = "OwnedByMostHoneyPots"; +})(NftSpamClassification || (NftSpamClassification = {})); +/** + * Enum of NFT filters that can be applied to a {@link getNftsForOwner} request. + * NFTs that match one or more of these filters are excluded from the response. + * + * - @deprecated Use {@link NftFilters} instead. This enum will be removed in a + * future version. + * + * @beta + */ +var NftExcludeFilters; +(function (NftExcludeFilters) { + /** Exclude NFTs that have been classified as spam. */ + NftExcludeFilters["SPAM"] = "SPAM"; + /** Exclude NFTs that have been airdropped to a user. */ + NftExcludeFilters["AIRDROPS"] = "AIRDROPS"; +})(NftExcludeFilters || (NftExcludeFilters = {})); +/** + * Enum of NFT filters that can be applied to a {@link getNftsForOwner} or a + * {@link getContractsForOwner} request. + * + * @beta + */ +var NftFilters; +(function (NftFilters) { + /** NFTs that have been classified as spam. */ + NftFilters["SPAM"] = "SPAM"; + /** NFTs that have been airdropped to a user. */ + NftFilters["AIRDROPS"] = "AIRDROPS"; +})(NftFilters || (NftFilters = {})); +/** + * Enum of ordering that can be applied to a {@link getNftsForOwner} or a + * {@link getContractsForOwner} response. + * + * @beta + */ +var NftOrdering; +(function (NftOrdering) { + NftOrdering["TRANSFERTIME"] = "TRANSFERTIME"; +})(NftOrdering || (NftOrdering = {})); +/** + * Enum for representing the supported sorting orders of the API. + * + * @public + */ +var SortingOrder; +(function (SortingOrder) { + SortingOrder["ASCENDING"] = "asc"; + SortingOrder["DESCENDING"] = "desc"; +})(SortingOrder || (SortingOrder = {})); +/** + * Enum representing the supported NFT marketplaces by the {@link getNftSales} endpoint. + * + * @public + */ +var NftSaleMarketplace; +(function (NftSaleMarketplace) { + NftSaleMarketplace["SEAPORT"] = "seaport"; + NftSaleMarketplace["LOOKSRARE"] = "looksrare"; + NftSaleMarketplace["X2Y2"] = "x2y2"; + NftSaleMarketplace["UNKNOWN"] = "unknown"; +})(NftSaleMarketplace || (NftSaleMarketplace = {})); +/** + * Enum for specifing the taker type for the {@link getNftSales} endpoint. + * + * @public + */ +var NftSaleTakerType; +(function (NftSaleTakerType) { + NftSaleTakerType["BUYER"] = "buyer"; + NftSaleTakerType["SELLER"] = "seller"; +})(NftSaleTakerType || (NftSaleTakerType = {})); +/** The current state of the NFT contract refresh process. */ +var RefreshState; +(function (RefreshState) { + /** The provided contract is not an NFT or does not contain metadata. */ + RefreshState["DOES_NOT_EXIST"] = "does_not_exist"; + /** The contract has already been queued for refresh. */ + RefreshState["ALREADY_QUEUED"] = "already_queued"; + /** The contract is currently being refreshed. */ + RefreshState["IN_PROGRESS"] = "in_progress"; + /** The contract refresh is complete. */ + RefreshState["FINISHED"] = "finished"; + /** The contract refresh has been queued and await execution. */ + RefreshState["QUEUED"] = "queued"; + /** The contract was unable to be queued due to an internal error. */ + RefreshState["QUEUE_FAILED"] = "queue_failed"; +})(RefreshState || (RefreshState = {})); +/** An OpenSea collection's approval status. */ +var OpenSeaSafelistRequestStatus; +(function (OpenSeaSafelistRequestStatus) { + /** Verified collection. */ + OpenSeaSafelistRequestStatus["VERIFIED"] = "verified"; + /** Collections that are approved on open sea and can be found in search results. */ + OpenSeaSafelistRequestStatus["APPROVED"] = "approved"; + /** Collections that requested safelisting on OpenSea. */ + OpenSeaSafelistRequestStatus["REQUESTED"] = "requested"; + /** Brand new collections. */ + OpenSeaSafelistRequestStatus["NOT_REQUESTED"] = "not_requested"; +})(OpenSeaSafelistRequestStatus || (OpenSeaSafelistRequestStatus = {})); +/** + * Method names for Alchemy's custom Subscription API endpoints. + * + * This value is provided in the `method` field when creating an event filter on + * the Websocket Namespace. + */ +var AlchemySubscription; +(function (AlchemySubscription) { + AlchemySubscription["PENDING_TRANSACTIONS"] = "alchemy_pendingTransactions"; + AlchemySubscription["MINED_TRANSACTIONS"] = "alchemy_minedTransactions"; +})(AlchemySubscription || (AlchemySubscription = {})); +/** + * Potential transaction job statuses for a {@link GasOptimizedTransactionResponse} + * + * @internal + */ +// TODO(txjob): Remove internal tag once this feature is released. +var GasOptimizedTransactionStatus; +(function (GasOptimizedTransactionStatus) { + GasOptimizedTransactionStatus["UNSPECIFIED"] = "TRANSACTION_JOB_STATUS_UNSPECIFIED"; + GasOptimizedTransactionStatus["IN_PROGRESS"] = "IN_PROGRESS"; + GasOptimizedTransactionStatus["COMPLETE"] = "COMPLETE"; + GasOptimizedTransactionStatus["ABANDONED"] = "ABANDONED"; +})(GasOptimizedTransactionStatus || (GasOptimizedTransactionStatus = {})); +/** The version of the webhook. All newly created webhooks default to V2. */ +var WebhookVersion; +(function (WebhookVersion) { + WebhookVersion["V1"] = "V1"; + WebhookVersion["V2"] = "V2"; +})(WebhookVersion || (WebhookVersion = {})); +/** The type of {@link Webhook}. */ +var WebhookType; +(function (WebhookType) { + WebhookType["MINED_TRANSACTION"] = "MINED_TRANSACTION"; + WebhookType["DROPPED_TRANSACTION"] = "DROPPED_TRANSACTION"; + WebhookType["ADDRESS_ACTIVITY"] = "ADDRESS_ACTIVITY"; + WebhookType["NFT_ACTIVITY"] = "NFT_ACTIVITY"; +})(WebhookType || (WebhookType = {})); + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +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. +***************************************************************************** */ + +function __awaiter(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 __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +const DEFAULT_ALCHEMY_API_KEY = 'demo'; +const DEFAULT_NETWORK = Network.ETH_MAINNET; +const DEFAULT_MAX_RETRIES = 5; +/** + * Returns the base URL for making Alchemy API requests. The `alchemy.com` + * endpoints only work with non eth json-rpc requests. + * + * @internal + */ +function getAlchemyHttpUrl(network, apiKey) { + return `https://${network}.g.alchemy.com/v2/${apiKey}`; +} +function getAlchemyNftHttpUrl(network, apiKey) { + return `https://${network}.g.alchemy.com/nft/v2/${apiKey}`; +} +function getAlchemyWsUrl(network, apiKey) { + return `wss://${network}.g.alchemy.com/v2/${apiKey}`; +} +function getAlchemyWebhookHttpUrl() { + return 'https://dashboard.alchemy.com/api'; +} +var AlchemyApiType; +(function (AlchemyApiType) { + AlchemyApiType[AlchemyApiType["BASE"] = 0] = "BASE"; + AlchemyApiType[AlchemyApiType["NFT"] = 1] = "NFT"; + AlchemyApiType[AlchemyApiType["WEBHOOK"] = 2] = "WEBHOOK"; +})(AlchemyApiType || (AlchemyApiType = {})); +/** + * Mapping of network names to their corresponding Network strings used to + * create an Ethers.js Provider instance. + */ +const EthersNetwork = { + [Network.ETH_MAINNET]: 'mainnet', + [Network.ETH_ROPSTEN]: 'ropsten', + [Network.ETH_GOERLI]: 'goerli', + [Network.ETH_KOVAN]: 'kovan', + [Network.ETH_RINKEBY]: 'rinkeby', + [Network.OPT_MAINNET]: 'optimism', + [Network.OPT_KOVAN]: 'optimism-kovan', + [Network.OPT_GOERLI]: 'optimism-goerli', + [Network.ARB_MAINNET]: 'arbitrum', + [Network.ARB_RINKEBY]: 'arbitrum-rinkeby', + [Network.ARB_GOERLI]: 'arbitrum-goerli', + [Network.MATIC_MAINNET]: 'matic', + [Network.MATIC_MUMBAI]: 'maticmum', + [Network.ASTAR_MAINNET]: 'astar-mainnet' +}; +/** + * Mapping of network names to their corresponding Ethers Network objects. These + * networks are not yet supported by Ethers and are listed here to be overriden + * in the provider. + */ +const CustomNetworks = { + 'arbitrum-goerli': { + chainId: 421613, + name: 'arbitrum-goerli' + }, + 'astar-mainnet': { + chainId: 592, + name: 'astar-mainnet' + } +}; +function noop() { + // It's a no-op +} +const ETH_NULL_VALUE = '0x'; + +/** + * This class holds the config information for the SDK client instance and + * exposes the underlying providers for more advanced use cases. + * + * @public + */ +class AlchemyConfig { + constructor(config) { + this.apiKey = (config === null || config === void 0 ? void 0 : config.apiKey) || DEFAULT_ALCHEMY_API_KEY; + this.network = (config === null || config === void 0 ? void 0 : config.network) || DEFAULT_NETWORK; + this.maxRetries = (config === null || config === void 0 ? void 0 : config.maxRetries) || DEFAULT_MAX_RETRIES; + this.url = config === null || config === void 0 ? void 0 : config.url; + this.authToken = config === null || config === void 0 ? void 0 : config.authToken; + this.batchRequests = (config === null || config === void 0 ? void 0 : config.batchRequests) || false; + } + /** + * Returns the URL endpoint to send the HTTP request to. If a custom URL was + * provided in the config, that URL is returned. Otherwise, the default URL is + * from the network and API key. + * + * @param apiType - The type of API to get the URL for. + * @internal + */ + _getRequestUrl(apiType) { + if (this.url !== undefined) { + return this.url; + } + else if (apiType === AlchemyApiType.NFT) { + return getAlchemyNftHttpUrl(this.network, this.apiKey); + } + else if (apiType === AlchemyApiType.WEBHOOK) { + return getAlchemyWebhookHttpUrl(); + } + else { + return getAlchemyHttpUrl(this.network, this.apiKey); + } + } + /** + * Returns an AlchemyProvider instance. Only one provider is created per + * Alchemy instance. + * + * The AlchemyProvider is a wrapper around ether's `AlchemyProvider` class and + * has been expanded to support Alchemy's Enhanced APIs. + * + * Most common methods on the provider are available as top-level methods on + * the {@link Alchemy} instance, but the provider is exposed here to access + * other less-common methods. + * + * @public + */ + getProvider() { + if (!this._baseAlchemyProvider) { + this._baseAlchemyProvider = (() => __awaiter(this, void 0, void 0, function* () { + const { AlchemyProvider } = yield import('./alchemy-provider-a776ca8a.js'); + return new AlchemyProvider(this); + }))(); + } + return this._baseAlchemyProvider; + } + /** + * Returns an AlchemyWebsocketProvider instance. Only one provider is created + * per Alchemy instance. + * + * The AlchemyWebSocketProvider is a wrapper around ether's + * `AlchemyWebSocketProvider` class and has been expanded to support Alchemy's + * Subscription APIs, automatic backfilling, and other performance improvements. + * + * Most common methods on the provider are available as top-level methods on + * the {@link Alchemy} instance, but the provider is exposed here to access + * other less-common methods. + */ + getWebSocketProvider() { + if (!this._baseAlchemyWssProvider) { + this._baseAlchemyWssProvider = (() => __awaiter(this, void 0, void 0, function* () { + const { AlchemyWebSocketProvider } = yield import('./alchemy-websocket-provider-35c345f7.js'); + return new AlchemyWebSocketProvider(this); + }))(); + } + return this._baseAlchemyWssProvider; + } +} + +/** + * Converts a hex string to a decimal number. + * + * @param hexString - The hex string to convert. + * @public + */ +function fromHex(hexString) { + return BigNumber.from(hexString).toNumber(); +} +/** + * Converts a number to a hex string. + * + * @param num - The number to convert to hex. + * @public + */ +function toHex(num) { + return BigNumber.from(num).toHexString(); +} +/** + * Checks if a value is a hex string. + * + * @param possibleHexString - The value to check. + * @public + */ +function isHex(possibleHexString) { + return /^0x[0-9a-fA-F]+$/.test(possibleHexString); +} + +function formatBlock(block) { + if (typeof block === 'string') { + return block; + } + else if (Number.isInteger(block)) { + return toHex(block); + } + return block.toString(); +} +function stringToEnum(x, enumb) { + return Object.values(enumb).includes(x) ? x : undefined; +} +function getNftContractFromRaw(rawNftContract) { + return { + address: rawNftContract.address, + name: rawNftContract.contractMetadata.name, + symbol: rawNftContract.contractMetadata.symbol, + totalSupply: rawNftContract.contractMetadata.totalSupply, + tokenType: parseNftTokenType(rawNftContract.contractMetadata.tokenType), + openSea: parseOpenSeaMetadata(rawNftContract.contractMetadata.openSea) + }; +} +function getBaseNftFromRaw(rawBaseNft, contractAddress) { + var _a; + return { + contract: contractAddress + ? { address: contractAddress } + : rawBaseNft.contract, + tokenId: BigNumber.from(rawBaseNft.id.tokenId).toString(), + tokenType: parseNftTokenType((_a = rawBaseNft.id.tokenMetadata) === null || _a === void 0 ? void 0 : _a.tokenType) + }; +} +function getNftFromRaw(rawNft) { + var _a, _b, _c, _d, _e; + try { + const tokenType = parseNftTokenType((_a = rawNft.id.tokenMetadata) === null || _a === void 0 ? void 0 : _a.tokenType); + const spamInfo = parseSpamInfo(rawNft.spamInfo); + return { + contract: { + address: rawNft.contract.address, + name: (_b = rawNft.contractMetadata) === null || _b === void 0 ? void 0 : _b.name, + symbol: (_c = rawNft.contractMetadata) === null || _c === void 0 ? void 0 : _c.symbol, + totalSupply: (_d = rawNft.contractMetadata) === null || _d === void 0 ? void 0 : _d.totalSupply, + tokenType, + openSea: parseOpenSeaMetadata((_e = rawNft.contractMetadata) === null || _e === void 0 ? void 0 : _e.openSea) + }, + tokenId: parseNftTokenId(rawNft.id.tokenId), + tokenType, + title: rawNft.title, + description: parseNftDescription(rawNft.description), + timeLastUpdated: rawNft.timeLastUpdated, + metadataError: rawNft.error, + rawMetadata: rawNft.metadata, + tokenUri: parseNftTokenUri(rawNft.tokenUri), + media: parseNftTokenUriArray(rawNft.media), + spamInfo + }; + } + catch (e) { + throw new Error('Error parsing the NFT response: ' + e); + } +} +function getNftSalesFromRaw(rawNftSales) { + return { + pageKey: rawNftSales === null || rawNftSales === void 0 ? void 0 : rawNftSales.pageKey, + nftSales: rawNftSales.nftSales.map(rawNftSale => ({ + marketplace: parseNftSaleMarketplace(rawNftSale.marketplace), + contractAddress: rawNftSale.contractAddress, + tokenId: rawNftSale.tokenId, + quantity: rawNftSale.quantity, + buyerAddress: rawNftSale.buyerAddress, + sellerAddress: rawNftSale.sellerAddress, + taker: parseNftTaker(rawNftSale.taker), + sellerFee: rawNftSale === null || rawNftSale === void 0 ? void 0 : rawNftSale.sellerFee, + marketplaceFee: rawNftSale === null || rawNftSale === void 0 ? void 0 : rawNftSale.marketplaceFee, + royaltyFee: rawNftSale === null || rawNftSale === void 0 ? void 0 : rawNftSale.royaltyFee, + blockNumber: rawNftSale === null || rawNftSale === void 0 ? void 0 : rawNftSale.blockNumber, + logIndex: rawNftSale.logIndex, + bundleIndex: rawNftSale.bundleIndex, + transactionHash: rawNftSale.transactionHash + })) + }; +} +function parseNftSaleMarketplace(marketplace) { + switch (marketplace) { + case 'looksrare': + return NftSaleMarketplace.LOOKSRARE; + case 'seaport': + return NftSaleMarketplace.SEAPORT; + case 'x2y2': + return NftSaleMarketplace.X2Y2; + default: + return NftSaleMarketplace.UNKNOWN; + } +} +function parseNftTaker(taker) { + // The `.toLowerCase()` call is needed because the API returns the capitalized values + switch (taker.toLowerCase()) { + case 'buyer': + return NftSaleTakerType.BUYER; + case 'seller': + return NftSaleTakerType.SELLER; + default: + throw new Error(`Unsupported NftSaleTakerType ${taker}`); + } +} +function getNftRarityFromRaw(rawNftRarity) { + return rawNftRarity.map(({ prevalence, trait_type, value }) => ({ + prevalence, + traitType: trait_type, + value + })); +} +function getContractsForOwnerFromRaw(rawContractsForOwner) { + return { + pageKey: rawContractsForOwner === null || rawContractsForOwner === void 0 ? void 0 : rawContractsForOwner.pageKey, + totalCount: rawContractsForOwner.totalCount, + contracts: rawContractsForOwner.contracts.map(contract => { + return { + address: contract.address, + totalSupply: contract.totalSupply, + isSpam: contract.isSpam, + media: contract.media, + numDistinctTokensOwned: contract.numDistinctTokensOwned, + tokenId: contract.tokenId, + totalBalance: contract.totalBalance, + name: contract.name, + openSea: parseOpenSeaMetadata(contract === null || contract === void 0 ? void 0 : contract.opensea), + symbol: contract === null || contract === void 0 ? void 0 : contract.symbol, + tokenType: parseNftTokenType(contract === null || contract === void 0 ? void 0 : contract.tokenType) + }; + }) + }; +} +function parseNftTokenId(tokenId) { + // We have to normalize the token id here since the backend sometimes + // returns the token ID as a hex string and sometimes as an integer. + return BigNumber.from(tokenId).toString(); +} +function parseNftTokenType(tokenType) { + switch (tokenType) { + case 'erc721': + case 'ERC721': + return NftTokenType.ERC721; + case 'erc1155': + case 'ERC1155': + return NftTokenType.ERC1155; + default: + return NftTokenType.UNKNOWN; + } +} +function parseSpamInfo(spamInfo) { + if (!spamInfo) { + return undefined; + } + const { isSpam, classifications } = spamInfo; + return { + isSpam: isSpam === 'true', + classifications + }; +} +function parseNftDescription(description) { + if (description === undefined) { + return ''; + } + // TODO: Remove after backend adds JSON stringification. + if (!Array.isArray(description) && typeof description === 'object') { + return JSON.stringify(description); + } + return typeof description === 'string' ? description : description.join(' '); +} +function parseNftTokenUri(uri) { + if (uri && uri.raw.length === 0 && uri.gateway.length == 0) { + return undefined; + } + return uri; +} +function parseNftTokenUriArray(arr) { + if (arr === undefined) { + return []; + } + return arr.filter(uri => parseNftTokenUri(uri) !== undefined); +} +function parseOpenSeaMetadata(openSea) { + if (openSea === undefined) { + return undefined; + } + return { + floorPrice: openSea.floorPrice, + collectionName: openSea.collectionName, + safelistRequestStatus: openSea.safelistRequestStatus !== undefined + ? stringToEnum(openSea.safelistRequestStatus, OpenSeaSafelistRequestStatus) + : undefined, + imageUrl: openSea.imageUrl, + description: openSea.description, + externalUrl: openSea.externalUrl, + twitterUsername: openSea.twitterUsername, + discordUrl: openSea.discordUrl, + lastIngestedAt: openSea.lastIngestedAt + }; +} +const IS_BROWSER = typeof window !== 'undefined' && window !== null; + +/** + * The core namespace contains all commonly-used [Ethers.js + * Provider](https://docs.ethers.io/v5/api/providers/api-providers/#AlchemyProvider) + * methods. If you are already using Ethers.js, you should be simply able to + * replace the Ethers.js Provider object with `alchemy.core` when accessing + * provider methods and it should just work. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.core`. + */ +class CoreNamespace { + /** @internal */ + constructor(config) { + this.config = config; + } + /** + * Returns the balance of a given address as of the provided block. + * + * @param addressOrName The address or name of the account to get the balance for. + * @param blockTag The optional block number or hash to get the balance for. + * Defaults to 'latest' if unspecified. + * @public + */ + getBalance(addressOrName, blockTag) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getBalance(addressOrName, blockTag); + }); + } + /** + * Returns the contract code of the provided address at the block. If there is + * no contract deployed, the result is `0x`. + * + * @param addressOrName The address or name of the account to get the code for. + * @param blockTag The optional block number or hash to get the code for. + * Defaults to 'latest' if unspecified. + * @public + */ + getCode(addressOrName, blockTag) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getCode(addressOrName, blockTag); + }); + } + /** + * Return the value of the provided position at the provided address, at the + * provided block in `Bytes32` format. + * + * @param addressOrName The address or name of the account to get the code for. + * @param position The position of the storage slot to get. + * @param blockTag The optional block number or hash to get the code for. + * Defaults to 'latest' if unspecified. + * @public + */ + getStorageAt(addressOrName, position, blockTag) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getStorageAt(addressOrName, position, blockTag); + }); + } + /** + * Returns the number of transactions ever sent from the provided address, as + * of the provided block tag. This value is used as the nonce for the next + * transaction from the address sent to the network. + * + * @param addressOrName The address or name of the account to get the nonce for. + * @param blockTag The optional block number or hash to get the nonce for. + * @public + */ + getTransactionCount(addressOrName, blockTag) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getTransactionCount(addressOrName, blockTag); + }); + } + /** + * Returns the block from the network based on the provided block number or + * hash. Transactions on the block are represented as an array of transaction + * hashes. To get the full transaction details on the block, use + * {@link getBlockWithTransactions} instead. + * + * @param blockHashOrBlockTag The block number or hash to get the block for. + * @public + */ + getBlock(blockHashOrBlockTag) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getBlock(blockHashOrBlockTag); + }); + } + /** + * Returns the block from the network based on the provided block number or + * hash. Transactions on the block are represented as an array of + * {@link TransactionResponse} objects. + * + * @param blockHashOrBlockTag The block number or hash to get the block for. + * @public + */ + getBlockWithTransactions(blockHashOrBlockTag) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getBlockWithTransactions(blockHashOrBlockTag); + }); + } + /** + * Returns the {@link EthersNetworkAlias} Alchemy is connected to. + * + * @public + */ + getNetwork() { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getNetwork(); + }); + } + /** + * Returns the block number of the most recently mined block. + * + * @public + */ + getBlockNumber() { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getBlockNumber(); + }); + } + /** + * Returns the best guess of the current gas price to use in a transaction. + * + * @public + */ + getGasPrice() { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getGasPrice(); + }); + } + /** + * Returns the recommended fee data to use in a transaction. + * + * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas + * should be used. + * + * For legacy transactions and networks which do not support EIP-1559, the + * gasPrice should be used. + * + * @public + */ + getFeeData() { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getFeeData(); + }); + } + /** + * Returns a Promise which will stall until the network has heen established, + * ignoring errors due to the target node not being active yet. + * + * This can be used for testing or attaching scripts to wait until the node is + * up and running smoothly. + * + * @public + */ + ready() { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.ready; + }); + } + /** + * Returns the result of executing the transaction, using call. A call does + * not require any ether, but cannot change any state. This is useful for + * calling getters on Contracts. + * + * @param transaction The transaction to execute. + * @param blockTag The optional block number or hash to get the call for. + * @public + */ + call(transaction, blockTag) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.call(transaction, blockTag); + }); + } + /** + * Returns an estimate of the amount of gas that would be required to submit + * transaction to the network. + * + * An estimate may not be accurate since there could be another transaction on + * the network that was not accounted for, but after being mined affects the + * relevant state. + * + * This is an alias for {@link TransactNamespace.estimateGas}. + * + * @param transaction The transaction to estimate gas for. + * @public + */ + estimateGas(transaction) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.estimateGas(transaction); + }); + } + /** + * Returns the transaction with hash or null if the transaction is unknown. + * + * If a transaction has not been mined, this method will search the + * transaction pool. Various backends may have more restrictive transaction + * pool access (e.g. if the gas price is too low or the transaction was only + * recently sent and not yet indexed) in which case this method may also return null. + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransaction(transactionHash) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getTransaction(transactionHash); + }); + } + /** + * Returns the transaction receipt for hash or null if the transaction has not + * been mined. + * + * To stall until the transaction has been mined, consider the + * waitForTransaction method below. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransactionReceipt(transactionHash) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getTransactionReceipt(transactionHash); + }); + } + /** + * Submits transaction to the network to be mined. The transaction must be + * signed, and be valid (i.e. the nonce is correct and the account has + * sufficient balance to pay for the transaction). + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param signedTransaction The signed transaction to send. + * @public + */ + sendTransaction(signedTransaction) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.sendTransaction(signedTransaction); + }); + } + /** + * Returns a promise which will not resolve until specified transaction hash is mined. + * + * If {@link confirmations} is 0, this method is non-blocking and if the + * transaction has not been mined returns null. Otherwise, this method will + * block until the transaction has confirmed blocks mined on top of the block + * in which it was mined. + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to wait for. + * @param confirmations The number of blocks to wait for. + * @param timeout The maximum time to wait for the transaction to confirm. + * @public + */ + waitForTransaction(transactionHash, confirmations, timeout) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.waitForTransaction(transactionHash, confirmations, timeout); + }); + } + /** + * Returns an array of logs that match the provided filter. + * + * @param filter The filter object to use. + * @public + */ + getLogs(filter) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getLogs(filter); + }); + } + /** + * Allows sending a raw message to the Alchemy backend. + * + * @param method The method to call. + * @param params The parameters to pass to the method. + * @public + */ + send(method, params) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.send(method, params); + }); + } + /** + * Finds the address that deployed the provided contract and block number it + * was deployed in. + * + * NOTE: This method performs a binary search across all blocks since genesis + * and can take a long time to complete. This method is a convenience method + * that will eventually be replaced by a single call to an Alchemy endpoint + * with this information cached. + * + * @param contractAddress - The contract address to find the deployer for. + * @beta + */ + findContractDeployer(contractAddress) { + var _a; + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + const currentBlockNum = yield provider.getBlockNumber(); + if ((yield provider.getCode(contractAddress, currentBlockNum)) === + ETH_NULL_VALUE) { + throw new Error(`Contract '${contractAddress}' does not exist`); + } + // Binary search for the block number that the contract was deployed in. + const firstBlock = yield binarySearchFirstBlock(0, currentBlockNum + 1, contractAddress, this.config); + // Find the first transaction in the block that matches the provided address. + const txReceipts = yield this.getTransactionReceipts({ + blockNumber: toHex(firstBlock) + }); + const matchingReceipt = (_a = txReceipts.receipts) === null || _a === void 0 ? void 0 : _a.find(receipt => receipt.contractAddress === contractAddress.toLowerCase()); + return { + deployerAddress: matchingReceipt === null || matchingReceipt === void 0 ? void 0 : matchingReceipt.from, + blockNumber: firstBlock + }; + }); + } + getTokenBalances(addressOrName, contractAddressesOrOptions) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + const address = yield provider._getAddress(addressOrName); + if (Array.isArray(contractAddressesOrOptions)) { + if (contractAddressesOrOptions.length > 1500) { + throw new Error('You cannot pass in more than 1500 contract addresses to getTokenBalances()'); + } + if (contractAddressesOrOptions.length === 0) { + throw new Error('getTokenBalances() requires at least one contractAddress when using an array'); + } + return provider._send('alchemy_getTokenBalances', [address, contractAddressesOrOptions], 'getTokenBalances'); + } + else { + const tokenType = contractAddressesOrOptions === undefined + ? TokenBalanceType.ERC20 + : contractAddressesOrOptions.type; + const params = [address, tokenType]; + if ((contractAddressesOrOptions === null || contractAddressesOrOptions === void 0 ? void 0 : contractAddressesOrOptions.type) === TokenBalanceType.ERC20 && + contractAddressesOrOptions.pageKey) { + params.push({ pageKey: contractAddressesOrOptions.pageKey }); + } + return provider._send('alchemy_getTokenBalances', params, 'getTokenBalances'); + } + }); + } + /** + * Returns metadata for a given token contract address. + * + * @param address The contract address to get metadata for. + * @public + */ + getTokenMetadata(address) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider._send('alchemy_getTokenMetadata', [address], 'getTokenMetadata'); + }); + } + getAssetTransfers(params) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + if (params.fromAddress) { + params.fromAddress = yield provider._getAddress(params.fromAddress); + } + if (params.toAddress) { + params.toAddress = yield provider._getAddress(params.toAddress); + } + return provider._send('alchemy_getAssetTransfers', [ + Object.assign(Object.assign({}, params), { fromBlock: params.fromBlock != null + ? formatBlock(params.fromBlock) + : undefined, toBlock: params.toBlock != null ? formatBlock(params.toBlock) : undefined, maxCount: params.maxCount != null ? toHex(params.maxCount) : undefined }) + ], 'getAssetTransfers'); + }); + } + /** + * Gets all transaction receipts for a given block by number or block hash. + * + * @param params An object containing fields for the transaction receipt query. + * @public + */ + getTransactionReceipts(params) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider._send('alchemy_getTransactionReceipts', [params], 'getTransactionReceipts'); + }); + } + /** + * Returns the underlying owner address for the provided ENS address, or `null` + * if the ENS name does not have an underlying address. + * + * @param name The ENS address name to resolve. + */ + resolveName(name) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.resolveName(name); + }); + } + /** + * Performs a reverse lookup of the address in ENS using the Reverse Registrar. If the name does not exist, or the forward lookup does not match, null is returned. + * + * An ENS name requires additional configuration to setup a reverse record, so not all ENS addresses will map back to the original ENS domain. + * + * @param address The address to look up the ENS domain name for. + */ + lookupAddress(address) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.lookupAddress(address); + }); + } +} +/** + * Perform a binary search between an integer range of block numbers to find the + * block number where the contract was deployed. + * + * @internal + */ +function binarySearchFirstBlock(start, end, address, config) { + return __awaiter(this, void 0, void 0, function* () { + if (start >= end) { + return end; + } + const mid = Math.floor((start + end) / 2); + const provider = yield config.getProvider(); + const code = yield provider.getCode(address, mid); + if (code === ETH_NULL_VALUE) { + return binarySearchFirstBlock(mid + 1, end, address, config); + } + return binarySearchFirstBlock(start, mid, address, config); + }); +} + +/** + * The SDK has 4 log levels and a 5th option for disabling all logging. By + * default, the log level is set to INFO. + * + * The order is a follows: DEBUG < INFO < WARN < ERROR + * + * All log types above the current log level will be outputted. + */ +var LogLevel; +(function (LogLevel) { + LogLevel[LogLevel["DEBUG"] = 0] = "DEBUG"; + LogLevel[LogLevel["INFO"] = 1] = "INFO"; + LogLevel[LogLevel["WARN"] = 2] = "WARN"; + LogLevel[LogLevel["ERROR"] = 3] = "ERROR"; + LogLevel[LogLevel["SILENT"] = 4] = "SILENT"; +})(LogLevel || (LogLevel = {})); +const logLevelStringToEnum = { + debug: LogLevel.DEBUG, + info: LogLevel.INFO, + warn: LogLevel.WARN, + error: LogLevel.ERROR, + silent: LogLevel.SILENT +}; +// HACKY: Use the console method as a string rather than the function itself +// in order to allow for mocking in tests. +const logLevelToConsoleFn = { + [LogLevel.DEBUG]: 'log', + [LogLevel.INFO]: 'info', + [LogLevel.WARN]: 'warn', + [LogLevel.ERROR]: 'error' +}; +const DEFAULT_LOG_LEVEL = LogLevel.INFO; +/** + * Configures the verbosity of logging. The default log level is `info`. + * + * @param logLevel - The verbosity of logging. Can be any of the following values: + * + * - `debug`: The most verbose logging level. + * - `info`: The default logging level. + * - `warn`: A logging level for non-critical issues. + * - `error`: A logging level for critical issues. + * - `silent`: Turn off all logging. + * + * @public + */ +function setLogLevel(logLevel) { + loggerClient.logLevel = logLevelStringToEnum[logLevel]; +} +function logDebug(message, ...args) { + loggerClient.debug(message, args); +} +function logInfo(message, ...args) { + loggerClient.info(message, args); +} +function logWarn(message, ...args) { + loggerClient.warn(message, args); +} +class Logger { + constructor() { + /** The log level of the given Logger instance. */ + this._logLevel = DEFAULT_LOG_LEVEL; + } + get logLevel() { + return this._logLevel; + } + set logLevel(val) { + if (!(val in LogLevel)) { + throw new TypeError(`Invalid value "${val}" assigned to \`logLevel\``); + } + this._logLevel = val; + } + debug(...args) { + this._log(LogLevel.DEBUG, ...args); + } + info(...args) { + this._log(LogLevel.INFO, ...args); + } + warn(...args) { + this._log(LogLevel.WARN, ...args); + } + error(...args) { + this._log(LogLevel.ERROR, ...args); + } + /** + * Forwards log messages to their corresponding console counterparts if the + * log level allows it. + */ + _log(logLevel, ...args) { + if (logLevel < this._logLevel) { + return; + } + const now = new Date().toISOString(); + const method = logLevelToConsoleFn[logLevel]; + if (method) { + console[method](`[${now}] Alchemy:`, ...args.map(stringify)); + } + else { + throw new Error(`Logger received an invalid logLevel (value: ${logLevel})`); + } + } +} +function stringify(obj) { + if (typeof obj === 'string') { + return obj; + } + else { + try { + return JSON.stringify(obj); + } + catch (e) { + // Failed to convert to JSON, log the object directly. + return obj; + } + } +} +// Instantiate default logger for the SDK. +const loggerClient = new Logger(); + +// This file is autogenerated by injectVersion.js. Any changes will be +// overwritten on commit! +const VERSION = '2.2.5'; + +/** + * Given a REST endpoint, method, and params, sends the request with axios and + * returns the response. + */ +/** + * Helper function to send http requests using Axis. + * + * @private + */ +function sendAxiosRequest(baseUrl, restApiName, methodName, params, overrides) { + var _a; + const requestUrl = baseUrl + '/' + restApiName; + const config = Object.assign(Object.assign({}, overrides), { headers: Object.assign(Object.assign(Object.assign({}, overrides === null || overrides === void 0 ? void 0 : overrides.headers), (!IS_BROWSER && { 'Accept-Encoding': 'gzip' })), { 'Alchemy-Ethers-Sdk-Version': VERSION, 'Alchemy-Ethers-Sdk-Method': methodName }), method: (_a = overrides === null || overrides === void 0 ? void 0 : overrides.method) !== null && _a !== void 0 ? _a : 'GET', url: requestUrl, params }); + return axios(config); +} + +const DEFAULT_BACKOFF_INITIAL_DELAY_MS = 1000; +const DEFAULT_BACKOFF_MULTIPLIER = 1.5; +const DEFAULT_BACKOFF_MAX_DELAY_MS = 30 * 1000; +const DEFAULT_BACKOFF_MAX_ATTEMPTS = 5; +/** + * Helper class for implementing exponential backoff and max retry attempts. + * + * @private + * @internal + */ +class ExponentialBackoff { + constructor(maxAttempts = DEFAULT_BACKOFF_MAX_ATTEMPTS) { + this.maxAttempts = maxAttempts; + this.initialDelayMs = DEFAULT_BACKOFF_INITIAL_DELAY_MS; + this.backoffMultiplier = DEFAULT_BACKOFF_MULTIPLIER; + this.maxDelayMs = DEFAULT_BACKOFF_MAX_DELAY_MS; + this.numAttempts = 0; + this.currentDelayMs = 0; + this.isInBackoff = false; + } + /** + * Returns a promise that resolves after the the backoff delay. The delay is + * increased for each attempt. The promise is rejected if the maximum number + * of attempts is exceeded. + */ + // TODO: beautify this into an async iterator. + backoff() { + if (this.numAttempts >= this.maxAttempts) { + return Promise.reject(new Error(`Exceeded maximum number of attempts: ${this.maxAttempts}`)); + } + if (this.isInBackoff) { + return Promise.reject(new Error('A backoff operation is already in progress')); + } + const backoffDelayWithJitterMs = this.withJitterMs(this.currentDelayMs); + if (backoffDelayWithJitterMs > 0) { + logDebug('ExponentialBackoff.backoff', `Backing off for ${backoffDelayWithJitterMs}ms`); + } + // Calculate the next delay. + this.currentDelayMs *= this.backoffMultiplier; + this.currentDelayMs = Math.max(this.currentDelayMs, this.initialDelayMs); + this.currentDelayMs = Math.min(this.currentDelayMs, this.maxDelayMs); + this.numAttempts += 1; + return new Promise(resolve => { + this.isInBackoff = true; + setTimeout(() => { + this.isInBackoff = false; + resolve(); + }, backoffDelayWithJitterMs); + }); + } + /** + * Applies +/- 50% jitter to the backoff delay, up to the max delay cap. + * + * @private + * @param delayMs + */ + withJitterMs(delayMs) { + return Math.min(delayMs + (Math.random() - 0.5) * delayMs, this.maxDelayMs); + } +} + +/** + * A wrapper function to make http requests and retry if the request fails. + * + * @internal + */ +// TODO: Wrap Axios error in AlchemyError. +function requestHttpWithBackoff(config, apiType, restApiName, methodName, params, overrides) { + return __awaiter(this, void 0, void 0, function* () { + let lastError = undefined; + const backoff = new ExponentialBackoff(config.maxRetries); + for (let attempt = 0; attempt < config.maxRetries + 1; attempt++) { + try { + if (lastError !== undefined) { + logInfo('requestHttp', `Retrying after error: ${lastError.message}`); + } + try { + yield backoff.backoff(); + } + catch (err) { + // Backoff errors when the maximum number of attempts is reached. Break + // out of the loop to preserve the last error. + break; + } + const response = yield sendAxiosRequest(config._getRequestUrl(apiType), restApiName, methodName, params, overrides); + if (response.status === 200) { + logDebug(restApiName, `Successful request: ${restApiName}`); + return response.data; + } + else { + logInfo(restApiName, `Request failed: ${restApiName}, ${response.status}, ${response.data}`); + lastError = new Error(response.status + ': ' + response.data); + } + } + catch (err) { + if (!axios.isAxiosError(err) || err.response === undefined) { + throw err; + } + // TODO: Standardize all errors into AlchemyError + lastError = new Error(err.response.status + ': ' + err.response.data); + if (!isRetryableHttpError(err, apiType)) { + break; + } + } + } + return Promise.reject(lastError); + }); +} +function isRetryableHttpError(err, apiType) { + // TODO: remove 500s after webhooks are more stable. + const retryableCodes = apiType === AlchemyApiType.WEBHOOK ? [429, 500] : [429]; + return (err.response !== undefined && retryableCodes.includes(err.response.status)); +} +/** + * Fetches all pages in a paginated endpoint, given a `pageKey` field that + * represents the property name containing the next page token. + * + * @internal + */ +function paginateEndpoint(config, apiType, restApiName, methodName, reqPageKey, resPageKey, params) { + return __asyncGenerator(this, arguments, function* paginateEndpoint_1() { + let hasNext = true; + const requestParams = Object.assign({}, params); + while (hasNext) { + const response = yield __await(requestHttpWithBackoff(config, apiType, restApiName, methodName, requestParams)); + yield yield __await(response); + if (response[resPageKey] !== undefined) { + requestParams[reqPageKey] = response[resPageKey]; + } + else { + hasNext = false; + } + } + }); +} + +function getNftMetadata(config, contractAddress, tokenId, tokenType, tokenUriTimeoutInMs, srcMethod = 'getNftMetadata') { + return __awaiter(this, void 0, void 0, function* () { + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getNFTMetadata', srcMethod, { + contractAddress, + tokenId: BigNumber.from(tokenId).toString(), + tokenType: tokenType !== NftTokenType.UNKNOWN ? tokenType : undefined, + tokenUriTimeoutInMs + }); + return getNftFromRaw(response); + }); +} +function getNftMetadataBatch(config, tokens, options) { + return __awaiter(this, void 0, void 0, function* () { + const data = { + tokens, + tokenUriTimeoutInMs: options === null || options === void 0 ? void 0 : options.tokenUriTimeoutInMs, + refreshCache: options === null || options === void 0 ? void 0 : options.refreshCache + }; + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getNFTMetadataBatch', 'getNftMetadataBatch', {}, { + method: 'POST', + data + }); + return response.map(getNftFromRaw); + }); +} +function getContractMetadata(config, contractAddress, srcMethod = 'getContractMetadata') { + return __awaiter(this, void 0, void 0, function* () { + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getContractMetadata', srcMethod, { + contractAddress + }); + return getNftContractFromRaw(response); + }); +} +function getNftsForOwnerIterator(config, owner, options, srcMethod = 'getNftsForOwnerIterator') { + return __asyncGenerator(this, arguments, function* getNftsForOwnerIterator_1() { + var e_1, _a; + const withMetadata = omitMetadataToWithMetadata(options === null || options === void 0 ? void 0 : options.omitMetadata); + try { + for (var _b = __asyncValues(paginateEndpoint(config, AlchemyApiType.NFT, 'getNFTs', srcMethod, 'pageKey', 'pageKey', { + contractAddresses: options === null || options === void 0 ? void 0 : options.contractAddresses, + pageKey: options === null || options === void 0 ? void 0 : options.pageKey, + filters: options === null || options === void 0 ? void 0 : options.excludeFilters, + owner, + withMetadata + })), _c; _c = yield __await(_b.next()), !_c.done;) { + const response = _c.value; + for (const ownedNft of response.ownedNfts) { + yield yield __await(Object.assign(Object.assign({}, nftFromGetNftResponse(ownedNft)), { balance: parseInt(ownedNft.balance) })); + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b)); + } + finally { if (e_1) throw e_1.error; } + } + }); +} +function getNftsForOwner(config, owner, options, srcMethod = 'getNftsForOwner') { + return __awaiter(this, void 0, void 0, function* () { + const withMetadata = omitMetadataToWithMetadata(options === null || options === void 0 ? void 0 : options.omitMetadata); + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getNFTs', srcMethod, { + contractAddresses: options === null || options === void 0 ? void 0 : options.contractAddresses, + pageKey: options === null || options === void 0 ? void 0 : options.pageKey, + filters: options === null || options === void 0 ? void 0 : options.excludeFilters, + excludeFilters: options === null || options === void 0 ? void 0 : options.excludeFilters, + includeFilters: options === null || options === void 0 ? void 0 : options.includeFilters, + owner, + pageSize: options === null || options === void 0 ? void 0 : options.pageSize, + withMetadata, + tokenUriTimeoutInMs: options === null || options === void 0 ? void 0 : options.tokenUriTimeoutInMs, + orderBy: options === null || options === void 0 ? void 0 : options.orderBy + }); + return { + ownedNfts: response.ownedNfts.map(res => (Object.assign(Object.assign({}, nftFromGetNftResponse(res)), { balance: parseInt(res.balance) }))), + pageKey: response.pageKey, + totalCount: response.totalCount + }; + }); +} +function getNftsForContract(config, contractAddress, options, srcMethod = 'getNftsForContract') { + var _a; + return __awaiter(this, void 0, void 0, function* () { + const withMetadata = omitMetadataToWithMetadata(options === null || options === void 0 ? void 0 : options.omitMetadata); + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getNFTsForCollection', srcMethod, { + contractAddress, + startToken: options === null || options === void 0 ? void 0 : options.pageKey, + withMetadata, + limit: (_a = options === null || options === void 0 ? void 0 : options.pageSize) !== null && _a !== void 0 ? _a : undefined, + tokenUriTimeoutInMs: 50 + }); + return { + nfts: response.nfts.map(res => nftFromGetNftContractResponse(res, contractAddress)), + pageKey: response.nextToken + }; + }); +} +function getNftsForContractIterator(config, contractAddress, options, srcMethod = 'getNftsForContractIterator') { + return __asyncGenerator(this, arguments, function* getNftsForContractIterator_1() { + var e_2, _a; + const withMetadata = omitMetadataToWithMetadata(options === null || options === void 0 ? void 0 : options.omitMetadata); + try { + for (var _b = __asyncValues(paginateEndpoint(config, AlchemyApiType.NFT, 'getNFTsForCollection', srcMethod, 'startToken', 'nextToken', { + contractAddress, + startToken: options === null || options === void 0 ? void 0 : options.pageKey, + withMetadata + })), _c; _c = yield __await(_b.next()), !_c.done;) { + const response = _c.value; + for (const nft of response.nfts) { + yield yield __await(nftFromGetNftContractResponse(nft, contractAddress)); + } + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b)); + } + finally { if (e_2) throw e_2.error; } + } + }); +} +function getOwnersForContract(config, contractAddress, options, srcMethod = 'getOwnersForContract') { + return __awaiter(this, void 0, void 0, function* () { + // Cast to `any` to avoid more type wrangling. + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getOwnersForCollection', srcMethod, Object.assign(Object.assign({}, options), { contractAddress })); + return Object.assign({ owners: response.ownerAddresses }, (response.pageKey !== undefined && { pageKey: response.pageKey })); + }); +} +function getContractsForOwner(config, owner, options, srcMethod = 'getContractsForOwner') { + return __awaiter(this, void 0, void 0, function* () { + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getContractsForOwner', srcMethod, { + owner, + excludeFilters: options === null || options === void 0 ? void 0 : options.excludeFilters, + includeFilters: options === null || options === void 0 ? void 0 : options.includeFilters, + pageKey: options === null || options === void 0 ? void 0 : options.pageKey, + orderBy: options === null || options === void 0 ? void 0 : options.orderBy + }); + return getContractsForOwnerFromRaw(response); + }); +} +function getOwnersForNft(config, contractAddress, tokenId, srcMethod = 'getOwnersForNft') { + return __awaiter(this, void 0, void 0, function* () { + return requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getOwnersForToken', srcMethod, { + contractAddress, + tokenId: BigNumber.from(tokenId).toString() + }); + }); +} +function checkNftOwnership(config, owner, contractAddresses, srcMethod = 'checkNftOwnership') { + return __awaiter(this, void 0, void 0, function* () { + if (contractAddresses.length === 0) { + throw new Error('Must provide at least one contract address'); + } + const response = yield getNftsForOwner(config, owner, { + contractAddresses, + omitMetadata: true + }, srcMethod); + return response.ownedNfts.length > 0; + }); +} +function verifyNftOwnership(config, owner, contractAddresses, srcMethod = 'verifyNftOwnership') { + return __awaiter(this, void 0, void 0, function* () { + if (typeof contractAddresses === 'string') { + const response = yield getNftsForOwner(config, owner, { + contractAddresses: [contractAddresses], + omitMetadata: true + }, srcMethod); + return response.ownedNfts.length > 0; + } + else { + if (contractAddresses.length === 0) { + throw new Error('Must provide at least one contract address'); + } + const response = yield getNftsForOwner(config, owner, { + contractAddresses, + omitMetadata: true + }, srcMethod); + // Create map where all input contract addresses are set to false, then flip + // owned nfts to true. + const result = contractAddresses.reduce((acc, curr) => { + acc[curr] = false; + return acc; + }, {}); + for (const nft of response.ownedNfts) { + result[nft.contract.address] = true; + } + return result; + } + }); +} +function isSpamContract(config, contractAddress, srcMethod = 'isSpamContract') { + return __awaiter(this, void 0, void 0, function* () { + return requestHttpWithBackoff(config, AlchemyApiType.NFT, 'isSpamContract', srcMethod, { + contractAddress + }); + }); +} +function getSpamContracts(config, srcMethod = 'getSpamContracts') { + return __awaiter(this, void 0, void 0, function* () { + return requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getSpamContracts', srcMethod, undefined); + }); +} +function getFloorPrice(config, contractAddress, srcMethod = 'getFloorPrice') { + return __awaiter(this, void 0, void 0, function* () { + return requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getFloorPrice', srcMethod, { + contractAddress + }); + }); +} +function getNftSales(config, options = {}, srcMethod = 'getNftSales') { + return __awaiter(this, void 0, void 0, function* () { + // Avoid ts compiler complaining about the contractAddress field. + const params = Object.assign({}, options); + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getNFTSales', srcMethod, { + fromBlock: params === null || params === void 0 ? void 0 : params.fromBlock, + toBlock: params === null || params === void 0 ? void 0 : params.toBlock, + order: params === null || params === void 0 ? void 0 : params.order, + marketplace: params === null || params === void 0 ? void 0 : params.marketplace, + contractAddress: params === null || params === void 0 ? void 0 : params.contractAddress, + tokenId: (params === null || params === void 0 ? void 0 : params.tokenId) + ? BigNumber.from(params === null || params === void 0 ? void 0 : params.tokenId).toString() + : undefined, + sellerAddress: params === null || params === void 0 ? void 0 : params.sellerAddress, + buyerAddress: params === null || params === void 0 ? void 0 : params.buyerAddress, + taker: params === null || params === void 0 ? void 0 : params.taker, + limit: params === null || params === void 0 ? void 0 : params.limit, + pageKey: params === null || params === void 0 ? void 0 : params.pageKey + }); + return getNftSalesFromRaw(response); + }); +} +function computeRarity(config, contractAddress, tokenId, srcMethod = 'computeRarity') { + return __awaiter(this, void 0, void 0, function* () { + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'computeRarity', srcMethod, { + contractAddress, + tokenId: BigNumber.from(tokenId).toString() + }); + return getNftRarityFromRaw(response); + }); +} +function searchContractMetadata(config, query, srcMethod = 'searchContractMetadata') { + return __awaiter(this, void 0, void 0, function* () { + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'searchContractMetadata', srcMethod, { + query + }); + return response.map(getNftContractFromRaw); + }); +} +function summarizeNftAttributes(config, contractAddress, srcMethod = 'summarizeNftAttributes') { + return __awaiter(this, void 0, void 0, function* () { + return requestHttpWithBackoff(config, AlchemyApiType.NFT, 'summarizeNftAttributes', srcMethod, { + contractAddress + }); + }); +} +function refreshNftMetadata(config, contractAddress, tokenId, srcMethod = 'refreshNftMetadata') { + return __awaiter(this, void 0, void 0, function* () { + const tokenIdString = BigNumber.from(tokenId).toString(); + const first = yield getNftMetadata(config, contractAddress, tokenIdString, undefined, undefined, srcMethod); + const second = yield refresh(config, contractAddress, tokenIdString, srcMethod); + return first.timeLastUpdated !== second.timeLastUpdated; + }); +} +function refreshContract(config, contractAddress, srcMethod = 'refreshContract') { + return __awaiter(this, void 0, void 0, function* () { + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'reingestContract', srcMethod, { + contractAddress + }); + return { + contractAddress: response.contractAddress, + refreshState: parseReingestionState(response.reingestionState), + progress: response.progress + }; + }); +} +function refresh(config, contractAddress, tokenId, srcMethod) { + return __awaiter(this, void 0, void 0, function* () { + const response = yield requestHttpWithBackoff(config, AlchemyApiType.NFT, 'getNFTMetadata', srcMethod, { + contractAddress, + tokenId: BigNumber.from(tokenId).toString(), + refreshCache: true + }); + return getNftFromRaw(response); + }); +} +/** + * Helper method to convert a NFT response received from Alchemy backend to an + * SDK NFT type. + * + * @internal + */ +function nftFromGetNftResponse(ownedNft) { + if (isNftWithMetadata(ownedNft)) { + return getNftFromRaw(ownedNft); + } + else { + return getBaseNftFromRaw(ownedNft); + } +} +/** + * Helper method to convert a NFT response received from Alchemy backend to an + * SDK NFT type. + * + * @internal + */ +function nftFromGetNftContractResponse(ownedNft, contractAddress) { + if (isNftWithMetadata(ownedNft)) { + return getNftFromRaw(ownedNft); + } + else { + return getBaseNftFromRaw(ownedNft, contractAddress); + } +} +/** @internal */ +// TODO: more comprehensive type check +function isNftWithMetadata(response) { + return response.title !== undefined; +} +/** + * Flips the `omitMetadata` SDK parameter type to the `withMetadata` parameter + * required by the Alchemy API. If `omitMetadata` is undefined, the SDK defaults + * to including metadata. + * + * @internal + */ +function omitMetadataToWithMetadata(omitMetadata) { + return omitMetadata === undefined ? true : !omitMetadata; +} +function parseReingestionState(reingestionState) { + switch (reingestionState) { + case 'does_not_exist': + return RefreshState.DOES_NOT_EXIST; + case 'already_queued': + return RefreshState.ALREADY_QUEUED; + case 'in_progress': + return RefreshState.IN_PROGRESS; + case 'finished': + return RefreshState.FINISHED; + case 'queued': + return RefreshState.QUEUED; + case 'queue_failed': + return RefreshState.QUEUE_FAILED; + default: + throw new Error('Unknown reingestion state: ' + reingestionState); + } +} + +/** + * The NFT namespace contains all the functionality related to NFTs. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.nft`. + */ +class NftNamespace { + /** @internal */ + constructor(config) { + this.config = config; + } + /** + * Get the NFT metadata associated with the provided parameters. + * + * @param contractAddress - The contract address of the NFT. + * @param tokenId - Token id of the NFT. + * @param tokenType - Optionally specify the type of token to speed up the query. + * @param tokenUriTimeoutInMs - No set timeout by default - When metadata is + * requested, this parameter is the timeout (in milliseconds) for the + * website hosting the metadata to respond. If you want to only access the + * cache and not live fetch any metadata for cache misses then set this value to 0. + * @public + */ + getNftMetadata(contractAddress, tokenId, tokenType, tokenUriTimeoutInMs) { + return getNftMetadata(this.config, contractAddress, tokenId, tokenType, tokenUriTimeoutInMs); + } + /** + * Gets the NFT metadata for multiple NFT tokens. + * + * @param tokens An array of NFT tokens to fetch metadata for. + * @param options Configuration options for making the request. + */ + getNftMetadataBatch(tokens, options) { + return getNftMetadataBatch(this.config, tokens, options); + } + /** + * Get the NFT collection metadata associated with the provided parameters. + * + * @param contractAddress - The contract address of the NFT. + * @public + */ + getContractMetadata(contractAddress) { + return getContractMetadata(this.config, contractAddress); + } + getNftsForOwnerIterator(owner, options) { + return getNftsForOwnerIterator(this.config, owner, options); + } + getNftsForOwner(owner, options) { + return getNftsForOwner(this.config, owner, options); + } + getNftsForContract(contractAddress, options) { + return getNftsForContract(this.config, contractAddress, options); + } + getNftsForContractIterator(contractAddress, options) { + return getNftsForContractIterator(this.config, contractAddress, options); + } + getOwnersForContract(contractAddress, options) { + return getOwnersForContract(this.config, contractAddress, options); + } + /** + * Gets all the owners for a given NFT contract address and token ID. + * + * @param contractAddress - The NFT contract address. + * @param tokenId - Token id of the NFT. + * @beta + */ + getOwnersForNft(contractAddress, tokenId) { + return getOwnersForNft(this.config, contractAddress, tokenId); + } + /** + * Gets all NFT contracts held by the specified owner address. + * + * @param owner - Address for NFT owner (can be in ENS format!). + * @param options - The optional parameters to use for the request. + * @public + */ + getContractsForOwner(owner, options) { + return getContractsForOwner(this.config, owner, options); + } + /** + * DEPRECATED - Checks that the provided owner address owns one of more of the + * provided NFTs. + * + * @deprecated - Use {@link verifyNftOwnership} instead. This method will be + * removed in a future release. + * @param owner - The owner address to check. + * @param contractAddresses - An array of NFT contract addresses to check ownership for. + */ + checkNftOwnership(owner, contractAddresses) { + return checkNftOwnership(this.config, owner, contractAddresses); + } + verifyNftOwnership(owner, contractAddress) { + return verifyNftOwnership(this.config, owner, contractAddress); + } + /** + * Returns whether a contract is marked as spam or not by Alchemy. For more + * information on how we classify spam, go to our NFT API FAQ at + * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification. + * + * @param contractAddress - The contract address to check. + * @beta + */ + isSpamContract(contractAddress) { + return isSpamContract(this.config, contractAddress); + } + /** + * Returns a list of all spam contracts marked by Alchemy. For details on how + * Alchemy marks spam contracts, go to + * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification. + * + * @beta + */ + getSpamContracts() { + return getSpamContracts(this.config); + } + /** + * Returns the floor prices of a NFT contract by marketplace. + * + * @param contractAddress - The contract address for the NFT collection. + * @beta + */ + getFloorPrice(contractAddress) { + return getFloorPrice(this.config, contractAddress); + } + getNftSales(options) { + return getNftSales(this.config, options); + } + /** + * Get the rarity of each attribute of an NFT. + * + * @param contractAddress - Contract address for the NFT collection. + * @param tokenId - Token id of the NFT. + */ + computeRarity(contractAddress, tokenId) { + return computeRarity(this.config, contractAddress, tokenId); + } + /** + * Search for a keyword across metadata of all ERC-721 and ERC-1155 smart contracts. + * + * @param query - The search string that you want to search for in contract metadata. + */ + searchContractMetadata(query) { + return searchContractMetadata(this.config, query); + } + /** + * Get a summary of attribute prevalence for an NFT collection. + * + * @param contractAddress - Contract address for the NFT collection. + */ + summarizeNftAttributes(contractAddress) { + return summarizeNftAttributes(this.config, contractAddress); + } + /** + * Refreshes the cached metadata for a provided NFT contract address and token + * id. Returns a boolean value indicating whether the metadata was refreshed. + * + * This method is useful when you want to refresh the metadata for a NFT that + * has been updated since the last time it was fetched. Note that the backend + * only allows one refresh per token every 15 minutes, globally for all users. + * The last refresh time for an NFT can be accessed on the + * {@link Nft.timeLastUpdated} field. + * + * To trigger a refresh for all NFTs in a contract, use {@link refreshContract} instead. + * + * @param contractAddress - The contract address of the NFT. + * @param tokenId - The token id of the NFT. + */ + refreshNftMetadata(contractAddress, tokenId) { + return refreshNftMetadata(this.config, contractAddress, tokenId); + } + /** + * Triggers a metadata refresh all NFTs in the provided contract address. This + * method is useful after an NFT collection is revealed. + * + * Refreshes are queued on the Alchemy backend and may take time to fully + * process. To refresh the metadata for a specific token, use the + * {@link refreshNftMetadata} method instead. + * + * @param contractAddress - The contract address of the NFT collection. + * @beta + */ + refreshContract(contractAddress) { + return refreshContract(this.config, contractAddress); + } +} + +/** + * The Notify namespace contains methods used for creating, reading, updating, + * and deleting webhooks in the Notify API. + * + * To use the methods in the API, you must provide your team's auth token in the + * {@link AlchemySettings.authToken} field when configuring + * {@link AlchemySettings}. The auth token can be found in the Alchemy Dashboard + * on the Notify tab. + * + * Note that not all networks are supported in the Notify API. Please consult + * the documentation for which networks are supported. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the notify + * namespace via `alchemy.notify`. + */ +class NotifyNamespace { + /** @internal */ + constructor(config) { + this.config = config; + } + /** + * Get all webhooks on your team. + * + * The team is determined by the `authToken` provided into the {@link AlchemySettings} + * object when creating a new {@link Alchemy} instance. + * + * This method returns a response object containing all the webhooks + */ + getAllWebhooks() { + return __awaiter(this, void 0, void 0, function* () { + this.verifyConfig(); + const response = yield this.sendWebhookRequest('team-webhooks', 'getAllWebhooks', {}); + return { + webhooks: parseRawWebhookResponse(response), + totalCount: response.data.length + }; + }); + } + getAddresses(webhookOrId, options) { + return __awaiter(this, void 0, void 0, function* () { + this.verifyConfig(); + const webhookId = typeof webhookOrId === 'string' ? webhookOrId : webhookOrId.id; + const response = yield this.sendWebhookRequest('webhook-addresses', 'getAddresses', { + webhook_id: webhookId, + limit: options === null || options === void 0 ? void 0 : options.limit, + after: options === null || options === void 0 ? void 0 : options.pageKey + }); + return parseRawAddressActivityResponse(response); + }); + } + getNftFilters(webhookOrId, options) { + return __awaiter(this, void 0, void 0, function* () { + this.verifyConfig(); + const webhookId = typeof webhookOrId === 'string' ? webhookOrId : webhookOrId.id; + const response = yield this.sendWebhookRequest('webhook-nft-filters', 'getNftFilters', { + webhook_id: webhookId, + limit: options === null || options === void 0 ? void 0 : options.limit, + after: options === null || options === void 0 ? void 0 : options.pageKey + }); + return parseRawNftFiltersResponse(response); + }); + } + updateWebhook(webhookOrId, update) { + return __awaiter(this, void 0, void 0, function* () { + const webhookId = typeof webhookOrId === 'string' ? webhookOrId : webhookOrId.id; + let restApiName; + let methodName; + let method; + let data; + if ('isActive' in update) { + restApiName = 'update-webhook'; + methodName = 'updateWebhook'; + method = 'PUT'; + data = { + webhook_id: webhookId, + is_active: update.isActive + }; + } + else if ('addFilters' in update || 'removeFilters' in update) { + restApiName = 'update-webhook-nft-filters'; + methodName = 'updateWebhookNftFilters'; + method = 'PATCH'; + data = { + webhook_id: webhookId, + nft_filters_to_add: update.addFilters + ? update.addFilters.map(nftFilterToParam) + : [], + nft_filters_to_remove: update.removeFilters + ? update.removeFilters.map(nftFilterToParam) + : [] + }; + } + else if ('addAddresses' in update || 'removeAddresses' in update) { + restApiName = 'update-webhook-addresses'; + methodName = 'webhook:updateWebhookAddresses'; + method = 'PATCH'; + data = { + webhook_id: webhookId, + addresses_to_add: yield this.resolveAddresses(update.addAddresses), + addresses_to_remove: yield this.resolveAddresses(update.removeAddresses) + }; + } + else if ('newAddresses' in update) { + restApiName = 'update-webhook-addresses'; + methodName = 'webhook:updateWebhookAddress'; + method = 'PUT'; + data = { + webhook_id: webhookId, + addresses: yield this.resolveAddresses(update.newAddresses) + }; + } + else { + throw new Error('Invalid `update` param passed into `updateWebhook`'); + } + yield this.sendWebhookRequest(restApiName, methodName, {}, { + method, + data + }); + }); + } + createWebhook(url, type, params) { + return __awaiter(this, void 0, void 0, function* () { + let appId; + if (type === WebhookType.MINED_TRANSACTION || + type === WebhookType.DROPPED_TRANSACTION) { + if (!('appId' in params)) { + throw new Error('Transaction Webhooks require an app id.'); + } + appId = params.appId; + } + let network = NETWORK_TO_WEBHOOK_NETWORK.get(this.config.network); + let filters; + let addresses; + if (type === WebhookType.NFT_ACTIVITY) { + if (!('filters' in params) || params.filters.length === 0) { + throw new Error('Nft Activity Webhooks require a non-empty array input.'); + } + network = params.network + ? NETWORK_TO_WEBHOOK_NETWORK.get(params.network) + : network; + filters = params.filters.map(filter => ({ + contract_address: filter.contractAddress, + token_id: BigNumber.from(filter.tokenId).toString() + })); + } + else if (type === WebhookType.ADDRESS_ACTIVITY) { + if (params === undefined || + !('addresses' in params) || + params.addresses.length === 0) { + throw new Error('Address Activity Webhooks require a non-empty array input.'); + } + network = params.network + ? NETWORK_TO_WEBHOOK_NETWORK.get(params.network) + : network; + addresses = yield this.resolveAddresses(params.addresses); + } + const data = Object.assign(Object.assign(Object.assign({ network, webhook_type: type, webhook_url: url }, (appId && { app_id: appId })), (filters && { nft_filters: filters })), (addresses && { addresses })); + const response = yield this.sendWebhookRequest('create-webhook', 'createWebhook', {}, { + method: 'POST', + data + }); + return parseRawWebhook(response.data); + }); + } + deleteWebhook(webhookOrId) { + return __awaiter(this, void 0, void 0, function* () { + this.verifyConfig(); + const webhookId = typeof webhookOrId === 'string' ? webhookOrId : webhookOrId.id; + const response = yield this.sendWebhookRequest('delete-webhook', 'deleteWebhook', { + webhook_id: webhookId + }, { + method: 'DELETE' + }); + if ('message' in response) { + throw new Error(`Webhook not found. Failed to delete webhook: ${webhookId}`); + } + }); + } + verifyConfig() { + if (this.config.authToken === undefined) { + throw new Error('Using the Notify API requires setting the Alchemy Auth Token in ' + + 'the settings object when initializing Alchemy.'); + } + } + sendWebhookRequest(restApiName, methodName, params, overrides) { + return requestHttpWithBackoff(this.config, AlchemyApiType.WEBHOOK, restApiName, methodName, params, Object.assign(Object.assign({}, overrides), { headers: Object.assign({ 'X-Alchemy-Token': this.config.authToken }, overrides === null || overrides === void 0 ? void 0 : overrides.headers) })); + } + /** Resolves ENS addresses to the raw address. + * @internal */ + resolveAddresses(addresses) { + return __awaiter(this, void 0, void 0, function* () { + if (addresses === undefined) { + return []; + } + const resolvedAddresses = []; + const provider = yield this.config.getProvider(); + for (const address of addresses) { + const rawAddress = yield provider.resolveName(address); + if (rawAddress === null) { + throw new Error(`Unable to resolve the ENS address: ${address}`); + } + resolvedAddresses.push(rawAddress); + } + return resolvedAddresses; + }); + } +} +/** + * Mapping of webhook network representations to the SDK's network representation. + * + * @internal + */ +const WEBHOOK_NETWORK_TO_NETWORK = { + ETH_MAINNET: Network.ETH_MAINNET, + ETH_GOERLI: Network.ETH_GOERLI, + ETH_ROPSTEN: Network.ETH_ROPSTEN, + ETH_RINKEBY: Network.ETH_RINKEBY, + ETH_KOVAN: Network.ETH_KOVAN, + MATIC_MAINNET: Network.MATIC_MAINNET, + MATIC_MUMBAI: Network.MATIC_MUMBAI, + ARB_MAINNET: Network.ARB_MAINNET, + ARB_RINKEBY: Network.ARB_RINKEBY, + OPT_MAINNET: Network.OPT_MAINNET, + OPT_KOVAN: Network.OPT_KOVAN +}; +/** Mapping of the SDK's network representation the webhook API's network representation. */ +const NETWORK_TO_WEBHOOK_NETWORK = Object.keys(Network).reduce((map, key) => { + if (key in WEBHOOK_NETWORK_TO_NETWORK) { + map.set(WEBHOOK_NETWORK_TO_NETWORK[key], key); + } + return map; +}, new Map()); +function parseRawWebhookResponse(response) { + return response.data.map(parseRawWebhook); +} +function parseRawWebhook(rawWebhook) { + return Object.assign({ id: rawWebhook.id, network: WEBHOOK_NETWORK_TO_NETWORK[rawWebhook.network], type: rawWebhook.webhook_type, url: rawWebhook.webhook_url, isActive: rawWebhook.is_active, timeCreated: new Date(rawWebhook.time_created).toISOString(), signingKey: rawWebhook.signing_key, version: rawWebhook.version }, (rawWebhook.app_id !== undefined && { appId: rawWebhook.app_id })); +} +function parseRawAddressActivityResponse(response) { + return { + addresses: response.data, + totalCount: response.pagination.total_count, + pageKey: response.pagination.cursors.after + }; +} +function parseRawNftFiltersResponse(response) { + return { + filters: response.data.map(f => ({ + contractAddress: f.contract_address, + tokenId: BigNumber.from(f.token_id).toString() + })), + totalCount: response.pagination.total_count, + pageKey: response.pagination.cursors.after + }; +} +function nftFilterToParam(filter) { + return { + contract_address: filter.contractAddress, + token_id: BigNumber.from(filter.tokenId).toString() + }; +} + +/** + * Multiples to increment fee per gas when using + * {@link TransactNamespace.sendGasOptimizedTransaction}. + * + * @internal + */ +const GAS_OPTIMIZED_TX_FEE_MULTIPLES = [0.9, 1, 1.1, 1.2, 1.3]; +/** + * The Transact namespace contains methods used for sending transactions and + * checking on the state of submitted transactions. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the transact + * namespace via `alchemy.transact`. + */ +class TransactNamespace { + /** @internal */ + constructor(config) { + this.config = config; + } + /** + * Used to send a single transaction to Flashbots. Flashbots will attempt to + * send the transaction to miners for the next 25 blocks. + * + * Returns the transaction hash of the submitted transaction. + * + * @param signedTransaction The raw, signed transaction as a hash. + * @param maxBlockNumber Optional highest block number in which the + * transaction should be included. + * @param options Options to configure the request. + */ + sendPrivateTransaction(signedTransaction, maxBlockNumber, options) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + const hexBlockNumber = maxBlockNumber ? toHex(maxBlockNumber) : undefined; + return provider._send('eth_sendPrivateTransaction', [ + { + tx: signedTransaction, + maxBlockNumber: hexBlockNumber, + preferences: options + } + ], 'sendPrivateTransaction'); + }); + } + /** + * Stops the provided private transaction from being submitted for future + * blocks. A transaction can only be cancelled if the request is signed by the + * same key as the {@link sendPrivateTransaction} call submitting the + * transaction in first place. + * + * Please note that fast mode transactions cannot be cancelled using this method. + * + * Returns a boolean indicating whether the cancellation was successful. + * + * @param transactionHash Transaction hash of private tx to be cancelled + */ + cancelPrivateTransaction(transactionHash) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider._send('eth_cancelPrivateTransaction', [ + { + txHash: transactionHash + } + ], 'cancelPrivateTransaction'); + }); + } + /** + * Returns the transaction with hash or null if the transaction is unknown. + * + * If a transaction has not been mined, this method will search the + * transaction pool. Various backends may have more restrictive transaction + * pool access (e.g. if the gas price is too low or the transaction was only + * recently sent and not yet indexed) in which case this method may also return null. + * + * NOTE: This is an alias for {@link CoreNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransaction(transactionHash) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.getTransaction(transactionHash); + }); + } + /** + * Submits transaction to the network to be mined. The transaction must be + * signed, and be valid (i.e. the nonce is correct and the account has + * sufficient balance to pay for the transaction). + * + * NOTE: This is an alias for {@link CoreNamespace.sendTransaction}. + * + * @param signedTransaction The signed transaction to send. + * @public + */ + sendTransaction(signedTransaction) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.sendTransaction(signedTransaction); + }); + } + /** + * Returns an estimate of the amount of gas that would be required to submit + * transaction to the network. + * + * An estimate may not be accurate since there could be another transaction on + * the network that was not accounted for, but after being mined affects the + * relevant state. + * + * This is an alias for {@link CoreNamespace.estimateGas}. + * + * @param transaction The transaction to estimate gas for. + * @public + */ + estimateGas(transaction) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.estimateGas(transaction); + }); + } + /** + * Returns a fee per gas (in wei) that is an estimate of how much you can pay + * as a priority fee, or "tip", to get a transaction included in the current block. + * + * This number is generally used to set the `maxPriorityFeePerGas` field in a + * transaction request. + * + * @public + */ + getMaxPriorityFeePerGas() { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + const feeHex = yield provider._send('eth_maxPriorityFeePerGas', [], 'getMaxPriorityFeePerGas'); + return fromHex(feeHex); + }); + } + /** + * Returns a promise which will not resolve until specified transaction hash is mined. + * + * If {@link confirmations} is 0, this method is non-blocking and if the + * transaction has not been mined returns null. Otherwise, this method will + * block until the transaction has confirmed blocks mined on top of the block + * in which it was mined. + * + * NOTE: This is an alias for {@link CoreNamespace.waitForTransaction}. + * + * @param transactionHash The hash of the transaction to wait for. + * @param confirmations The number of blocks to wait for. + * @param timeout The maximum time to wait for the transaction to confirm. + * @public + */ + waitForTransaction(transactionHash, confirmations, timeout) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider.waitForTransaction(transactionHash, confirmations, timeout); + }); + } + sendGasOptimizedTransaction(transactionOrSignedTxs, wallet) { + return __awaiter(this, void 0, void 0, function* () { + if (Array.isArray(transactionOrSignedTxs)) { + return this._sendGasOptimizedTransaction(transactionOrSignedTxs, 'sendGasOptimizedTransactionPreSigned'); + } + let gasLimit; + let priorityFee; + let baseFee; + const provider = yield this.config.getProvider(); + try { + gasLimit = yield this.estimateGas(transactionOrSignedTxs); + priorityFee = yield this.getMaxPriorityFeePerGas(); + const currentBlock = yield provider.getBlock('latest'); + baseFee = currentBlock.baseFeePerGas.toNumber(); + } + catch (e) { + throw new Error(`Failed to estimate gas for transaction: ${e}`); + } + const gasSpreadTransactions = generateGasSpreadTransactions(transactionOrSignedTxs, gasLimit.toNumber(), baseFee, priorityFee); + const signedTransactions = yield Promise.all(gasSpreadTransactions.map(tx => wallet.signTransaction(tx))); + return this._sendGasOptimizedTransaction(signedTransactions, 'sendGasOptimizedTransactionGenerated'); + }); + } + /** + * Returns the state of the transaction job returned by the + * {@link sendGasOptimizedTransaction}. + * + * @param trackingId The tracking id from the response of the sent gas optimized transaction. + * @internal + */ + // TODO(txjob): Remove internal tag once this feature is released. + getGasOptimizedTransactionStatus(trackingId) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider._send('alchemy_getGasOptimizedTransactionStatus', [trackingId], 'getGasOptimizedTransactionStatus'); + }); + } + /** @internal */ + _sendGasOptimizedTransaction(signedTransactions, methodName) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + return provider._send('alchemy_sendGasOptimizedTransaction', [ + { + rawTransactions: signedTransactions + } + ], methodName); + }); + } +} +/** + * Helper method to generate the raw transaction with the given gas limit and + * priority fee across a spread of different gas prices. + * + * @internal + */ +// Visible for testing +function generateGasSpreadTransactions(transaction, gasLimit, baseFee, priorityFee) { + return GAS_OPTIMIZED_TX_FEE_MULTIPLES.map(feeMultiplier => { + return Object.assign(Object.assign({}, transaction), { gasLimit, maxFeePerGas: Math.round(baseFee * feeMultiplier + priorityFee * feeMultiplier), maxPriorityFeePerGas: Math.round(feeMultiplier * priorityFee) }); + }); +} + +/** This file contains internal types used by the SDK and are not exposed to the end user. */ +/** + * Prefix for `alchemy_pendingTransactions` subscriptions when serializing to + * ethers events. + * + * This tag is used internally by ethers to track different event filters. + */ +const ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE = 'alchemy-pending-transactions'; +/** + * Prefix for `alchemy_minedTransactions` subscriptions when serializing to ethers events. + * + * This tag is used internally by ethers to track different event filters. + */ +const ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE = 'alchemy-mined-transactions'; +/** + * Array containing all the custom event tags used internally by ethers to track + * event filters. + */ +const ALCHEMY_EVENT_TYPES = [ + ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE, + ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE +]; + +/** + * DO NOT MODIFY. + * + * Event class copied directly over from ethers.js's `BaseProvider` class. + * + * This class is used to represent events and their corresponding listeners. The + * SDK needs to extend this class in order to support Alchemy's custom + * Subscription API types. The original class is not exported by ethers. Minimal + * changes have been made in order to get TS to compile. + */ +class Event { + constructor(tag, listener, once) { + this.listener = listener; + this.tag = tag; + this.once = once; + this._lastBlockNumber = -2; + this._inflight = false; + } + get event() { + switch (this.type) { + case 'tx': + return this.hash; + case 'filter': + return this.filter; + default: + return this.tag; + } + } + get type() { + return this.tag.split(':')[0]; + } + get hash() { + const comps = this.tag.split(':'); + if (comps[0] !== 'tx') { + throw new Error('Not a transaction event'); + } + return comps[1]; + } + get filter() { + const comps = this.tag.split(':'); + if (comps[0] !== 'filter') { + throw new Error('Not a transaction event'); + } + 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() { + const PollableEvents = ['block', 'network', 'pending', 'poll']; + return this.tag.indexOf(':') >= 0 || PollableEvents.indexOf(this.tag) >= 0; + } +} +/** + * Wrapper class around the ethers `Event` class in order to add support for + * Alchemy's custom subscriptions types. + * + * The serialization and deserialization mechanism requires the order of the + * fields to be the same across different {@link ALCHEMY_EVENT_TYPES}. Before + * using a getter on a new event filter, make sure that the position of the + * field in serialization is correct. + * + * The getters on this class deserialize the event tag generated by + * {@link getAlchemyEventTag} into the original fields passed into the event. + */ +class EthersEvent extends Event { + /** + * Converts the event tag into the original `fromAddress` field in + * {@link AlchemyPendingTransactionsEventFilter}. + */ + get fromAddress() { + const comps = this.tag.split(':'); + if (comps[0] !== ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE) { + return undefined; + } + if (comps[1] && comps[1] !== '*') { + return deserializeAddressField(comps[1]); + } + else { + return undefined; + } + } + /** + * Converts the event tag into the original `toAddress` field in + * {@link AlchemyPendingTransactionsEventFilter}. + */ + get toAddress() { + const comps = this.tag.split(':'); + if (comps[0] !== ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE) { + return undefined; + } + if (comps[2] && comps[2] !== '*') { + return deserializeAddressField(comps[2]); + } + else { + return undefined; + } + } + /** + * Converts the event tag into the original `hashesOnly` field in + * {@link AlchemyPendingTransactionsEventFilter} and {@link AlchemyMinedTransactionsEventFilter}. + */ + get hashesOnly() { + const comps = this.tag.split(':'); + if (!ALCHEMY_EVENT_TYPES.includes(comps[0])) { + return undefined; + } + if (comps[3] && comps[3] !== '*') { + return comps[3] === 'true'; + } + else { + return undefined; + } + } + get includeRemoved() { + const comps = this.tag.split(':'); + if (comps[0] !== ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE) { + return undefined; + } + if (comps[2] && comps[2] !== '*') { + return comps[2] === 'true'; + } + else { + return undefined; + } + } + get addresses() { + const comps = this.tag.split(':'); + if (comps[0] !== ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE) { + return undefined; + } + if (comps[1] && comps[1] !== '*') { + return deserializeAddressesField(comps[1]); + } + else { + return undefined; + } + } +} +function isAlchemyEvent(event) { + return typeof event === 'object' && 'method' in event; +} +/** + * Creates a string representation of an `alchemy_pendingTransaction` + * subscription filter that is compatible with the ethers implementation of + * `getEventTag()`. The method is not an exported function in ethers, which is + * why the SDK has its own implementation. + * + * The event tag is then deserialized by the SDK's {@link EthersEvent} getters. + * + * @example + * ```js + * // Returns 'alchemy-pending-transactions:0xABC:0xDEF|0xGHI:true' + * const eventTag = getAlchemyEventTag( + * { + * "method": "alchemy_pendingTransactions", + * "fromAddress": "0xABC", + * "toAddress": ["0xDEF", "0xGHI"], + * "hashesOnly: true + * }); + * ```; + * + * @param event + * @internal + */ +function getAlchemyEventTag(event) { + if (!isAlchemyEvent(event)) { + throw new Error('Event tag requires AlchemyEventType'); + } + if (event.method === AlchemySubscription.PENDING_TRANSACTIONS) { + return serializePendingTransactionsEvent(event); + } + else if (event.method === AlchemySubscription.MINED_TRANSACTIONS) { + return serializeMinedTransactionsEvent(event); + } + else { + throw new Error(`Unrecognized AlchemyFilterEvent: ${event}`); + } +} +function verifyAlchemyEventName(eventName) { + if (!Object.values(AlchemySubscription).includes(eventName.method)) { + throw new Error(`Invalid method name ${eventName.method}. Accepted method names: ${Object.values(AlchemySubscription)}`); + } +} +/** + * Serializes the provided {@link AlchemyPendingTransactionsEventFilter} into an ethers + * compatible event tag. + * + * For the example event: + * ``` + * { + * "method": "alchemy_pendingTransactions", + * "fromAddress": "0xABC", + * "toAddress": ["0xDEF", "0xGHI"], + * "hashesOnly: true + * } + * ``` + * + * The resulting serialization is: + * `alchemy_pendingTransactions:0xABC:0xDEF|0xGHI:true` + * + * If a field is omitted, it is replaced with a `*`. + */ +function serializePendingTransactionsEvent(event) { + const fromAddress = serializeAddressField(event.fromAddress); + const toAddress = serializeAddressField(event.toAddress); + const hashesOnly = serializeBooleanField(event.hashesOnly); + return (ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE + + ':' + + fromAddress + + ':' + + toAddress + + ':' + + hashesOnly); +} +/** + * Serializes the provided {@link AlchemyPendingTransactionsEventFilter} into an ethers + * compatible event tag. + * + * For the example event: + * ``` + * { + * "method": "alchemy_minedTransactions", + * "addresses": [ + * { + * from: "0xABC" + * }, + * { + * to: "0xDEF", + * from: "0x123" + * } + * ] + * "includeRemoved": false + * "hashesOnly: true + * } + * ``` + * + * The resulting serialization is: + * `alchemy_minedTransactions:*,0xABC|0xDEF,0x123:false:true` + * + * If a field is omitted, it is replaced with a `*`. + * + * The `addresses` array is split by the '|' character, and each to/from address + * pair is separated by a ',' character. + * + */ +function serializeMinedTransactionsEvent(event) { + const addresses = serializeAddressesField(event.addresses); + const includeRemoved = serializeBooleanField(event.includeRemoved); + const hashesOnly = serializeBooleanField(event.hashesOnly); + return (ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE + + ':' + + addresses + + ':' + + includeRemoved + + ':' + + hashesOnly); +} +function serializeAddressesField(addresses) { + if (addresses === undefined) { + return '*'; + } + return addresses + .map(filter => serializeAddressField(filter.to) + + ',' + + serializeAddressField(filter.from)) + .join('|'); +} +function serializeAddressField(field) { + if (field === undefined) { + return '*'; + } + else if (Array.isArray(field)) { + return field.join('|'); + } + else { + return field; + } +} +function serializeBooleanField(field) { + if (field === undefined) { + return '*'; + } + else { + return field.toString(); + } +} +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 deserializeAddressField(data) { + if (data === '') { + return undefined; + } + const addresses = data.split('|'); + return addresses.length === 1 ? addresses[0] : addresses; +} +function deserializeAddressesField(data) { + if (data === '') { + return undefined; + } + // Perform a cast here since TS doesn't know we're guaranteed a non-empty + // array from deserializing. + return data + .split('|') + .map(addressStr => addressStr.split(',')) + .map(addressPair => (Object.assign(Object.assign({}, (addressPair[0] !== '*' && { to: addressPair[0] })), (addressPair[1] !== '*' && { from: addressPair[1] })))); +} + +/** + * The Websocket namespace contains all subscription related functions that + * allow you to subscribe to events and receive updates as they occur. The + * underlying WebSocket provider has additional logic to handle reconnections + * and automatically backfills missed events. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.ws`. + */ +class WebSocketNamespace { + /** @internal */ + constructor(config) { + this.config = config; + } + /** + * Adds a listener to be triggered for each {@link eventName} event. Also + * includes Alchemy's Subscription API events. See {@link AlchemyEventType} for + * how to use them. + * + * @param eventName The event to listen for. + * @param listener The listener to call when the event is triggered. + * @public + */ + on(eventName, listener) { + void (() => __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getWebSocketProvider(); + const processedEvent = yield this._resolveEnsAlchemyEvent(eventName); + provider.on(processedEvent, listener); + }))(); + return this; + } + /** + * Adds a listener to be triggered for only the next {@link eventName} event, + * after which it will be removed. Also includes Alchemy's Subscription API + * events. See {@link AlchemyEventType} for how to use them. + * + * @param eventName The event to listen for. + * @param listener The listener to call when the event is triggered. + * @public + */ + once(eventName, listener) { + void (() => __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getWebSocketProvider(); + const processedEvent = yield this._resolveEnsAlchemyEvent(eventName); + provider.once(processedEvent, listener); + }))(); + return this; + } + /** + * Removes the provided {@link listener} for the {@link eventName} event. If no + * listener is provided, all listeners for the event will be removed. + * + * @param eventName The event to unlisten to. + * @param listener The listener to remove. + * @public + */ + off(eventName, listener) { + void (() => __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getWebSocketProvider(); + const processedEvent = yield this._resolveEnsAlchemyEvent(eventName); + return provider.off(processedEvent, listener); + }))(); + return this; + } + /** + * Remove all listeners for the provided {@link eventName} event. If no event + * is provided, all events and their listeners are removed. + * + * @param eventName The event to remove all listeners for. + * @public + */ + removeAllListeners(eventName) { + void (() => __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getWebSocketProvider(); + const processedEvent = eventName + ? yield this._resolveEnsAlchemyEvent(eventName) + : undefined; + provider.removeAllListeners(processedEvent); + }))(); + return this; + } + /** + * Returns the number of listeners for the provided {@link eventName} event. If + * no event is provided, the total number of listeners for all events is returned. + * + * @param eventName The event to get the number of listeners for. + * @public + */ + listenerCount(eventName) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getWebSocketProvider(); + const processedEvent = eventName + ? yield this._resolveEnsAlchemyEvent(eventName) + : undefined; + return provider.listenerCount(processedEvent); + }); + } + /** + * Returns an array of listeners for the provided {@link eventName} event. If + * no event is provided, all listeners will be included. + * + * @param eventName The event to get the listeners for. + */ + listeners(eventName) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getWebSocketProvider(); + const processedEvent = eventName + ? yield this._resolveEnsAlchemyEvent(eventName) + : undefined; + return provider.listeners(processedEvent); + }); + } + /** + * Converts ENS addresses in an Alchemy Event to the underlying resolved + * address. + * + * VISIBLE ONLY FOR TESTING. + * + * @internal + */ + _resolveEnsAlchemyEvent(eventName) { + return __awaiter(this, void 0, void 0, function* () { + if (!isAlchemyEvent(eventName)) { + return eventName; + } + if (eventName.method === AlchemySubscription.MINED_TRANSACTIONS && + eventName.addresses) { + const processedAddresses = []; + for (const address of eventName.addresses) { + if (address.to) { + address.to = yield this._resolveNameOrError(address.to); + } + if (address.from) { + address.from = yield this._resolveNameOrError(address.from); + } + processedAddresses.push(address); + } + eventName.addresses = + processedAddresses; + } + else if (eventName.method === AlchemySubscription.PENDING_TRANSACTIONS) { + if (eventName.fromAddress) { + if (typeof eventName.fromAddress === 'string') { + eventName.fromAddress = yield this._resolveNameOrError(eventName.fromAddress); + } + else { + eventName.fromAddress = yield Promise.all(eventName.fromAddress.map(this._resolveNameOrError)); + } + } + if (eventName.toAddress) { + if (typeof eventName.toAddress === 'string') { + eventName.toAddress = yield this._resolveNameOrError(eventName.toAddress); + } + else { + eventName.toAddress = yield Promise.all(eventName.toAddress.map(this._resolveNameOrError)); + } + } + } + return eventName; + }); + } + /** + * Converts the provided ENS address or throws an error. This improves code + * readability and type safety in other methods. + * + * VISIBLE ONLY FOR TESTING. + * + * @internal + */ + _resolveNameOrError(name) { + return __awaiter(this, void 0, void 0, function* () { + const provider = yield this.config.getProvider(); + const resolved = yield provider.resolveName(name); + if (resolved === null) { + throw new Error(`Unable to resolve the ENS address: ${name}`); + } + return resolved; + }); + } +} + +/** + * The Alchemy SDK client. This class is the main entry point into Alchemy's + * APIs and separates functionality into different namespaces. + * + * Each SDK instance is associated with a specific network and API key. To use a + * different network or API key, create a new instance of {@link Alchemy}. + * + * @public + */ +class Alchemy { + /** + * @param {string} [settings.apiKey] - The API key to use for Alchemy + * @param {Network} [settings.network] - The network to use for Alchemy + * @param {number} [settings.maxRetries] - The maximum number of retries to attempt + * @public + */ + constructor(settings) { + this.config = new AlchemyConfig(settings); + this.core = new CoreNamespace(this.config); + this.nft = new NftNamespace(this.config); + this.ws = new WebSocketNamespace(this.config); + this.transact = new TransactNamespace(this.config); + this.notify = new NotifyNamespace(this.config); + } +} + +/** + * The Wallet class inherits Signer and can sign transactions and messages using + * a private key as a standard Externally Owned Account (EOA). + * + * SDK's custom implementation of Ethers.js's 'Wallet'. + * + * Primary difference from Ethers.js 'Wallet' is that you can pass in either a + * Provider or an Alchemy object. This implementation will intelligently detect + * the format and set the provider accordingly. + * + * @public + * @override + */ +class Wallet extends Wallet$1 { + /** + * Overload permits users to pass in either a standard Provider or an Alchemy + * object. The constructor will detect the object type and handle appropriately. + * + * @override + */ + constructor(privateKey, alchemyOrProvider) { + // If object passed in is a provider, send to super + let superProvider; + if (alchemyOrProvider && Provider.isProvider(alchemyOrProvider)) { + superProvider = alchemyOrProvider; + } + super(privateKey, superProvider); + // If object passed in is an Alchemy object, just set Alchemy + if (alchemyOrProvider && !Provider.isProvider(alchemyOrProvider)) { + this.alchemyProviderPromise = alchemyOrProvider.config.getProvider(); + } + } + ////////////////////////////////////////////////////////////////// + // Set of overrides from Signer to handle async provider retrieval. + ////////////////////////////////////////////////////////////////// + /** + * Returns the balance of this wallet at blockTag. + * + * @param blockTag The block to check the balance of + * @override + */ + getBalance(blockTag) { + return this.getWallet().then(wallet => wallet.getBalance(blockTag)); + } + /** + * Returns the number of transactions this account has ever sent. This is the + * value required to be included in transactions as the nonce. + * + * @param blockTag The block to check the transaction count on + * @override + */ + getTransactionCount(blockTag) { + return this.getWallet().then(wallet => wallet.getTransactionCount(blockTag)); + } + /** + * Returns the result of estimating the cost to send the transactionRequest, + * with this account address being used as the from field. + * + * @param transaction Transaction to estimate the gas on + * @override + */ + estimateGas(transaction) { + return this.getWallet().then(wallet => wallet.estimateGas(transaction)); + } + /** + * Returns the result of calling using the transactionRequest, with this + * account address being used as the from field. + * + * @param transaction To make a call on + * @param blockTag The block to make the call on + * @override + */ + call(transaction, blockTag) { + return this.getWallet().then(wallet => wallet.call(transaction, blockTag)); + } + /** + * Populates all fields in a transaction, signs it and sends it to the network + * + * @override + */ + sendTransaction(transaction) { + return this.getWallet().then(wallet => wallet.sendTransaction(transaction)); + } + /** + * Returns the chain ID this wallet is connected to. + * + * @override + */ + getChainId() { + return this.getWallet().then(wallet => wallet.getChainId()); + } + /** + * Returns the current gas price. + * + * @override + */ + getGasPrice() { + return this.getWallet().then(wallet => wallet.getGasPrice()); + } + /** + * Returns the current recommended FeeData to use in a transaction. + * + * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas + * should be used. + * + * For legacy transactions and networks which do not support EIP-1559, the + * gasPrice should be used. + * + * @override + */ + getFeeData() { + return this.getWallet().then(wallet => wallet.getFeeData()); + } + /** + * Looks up the address of name. If the name is not owned, or does not have a + * Resolver configured, or the Resolver does not have an address configured, + * null is returned. + * + * @param name Name of the ENS address + * @override + */ + resolveName(name) { + return this.getWallet().then(wallet => wallet.resolveName(name)); + } + getWallet() { + return __awaiter(this, void 0, void 0, function* () { + if (!this.alchemyProviderPromise) { + return this.connect(this.provider); + } + return this.connect(yield this.alchemyProviderPromise); + }); + } +} + +/** + * The Contract class is a wrapper around the Contract class from ethers.js and + * is exported here for convenience. + * + * @public + */ +// TODO: support passing in Alchemy instance into the contract. +class Contract extends Contract$1 { +} +/** + * The ContractFactory class is a wrapper around the ContractFactory class from + * ethers.js and is exported here for convenience. + * + * @public + */ +class ContractFactory extends ContractFactory$1 { +} + +export { ALCHEMY_EVENT_TYPES as A, NftSaleMarketplace as B, CustomNetworks as C, DEFAULT_ALCHEMY_API_KEY as D, EthersNetwork as E, NftSaleTakerType as F, GasOptimizedTransactionStatus as G, WebhookVersion as H, IS_BROWSER as I, WebhookType as J, Network as N, OpenSeaSafelistRequestStatus as O, RefreshState as R, SortingOrder as S, TokenBalanceType as T, VERSION as V, Wallet as W, __awaiter as _, DEFAULT_NETWORK as a, getAlchemyWsUrl as b, EthersEvent as c, getAlchemyEventTag as d, ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE as e, fromHex as f, getAlchemyHttpUrl as g, AlchemySubscription as h, isAlchemyEvent as i, ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE as j, Alchemy as k, logWarn as l, Contract as m, noop as n, ContractFactory as o, isHex as p, AssetTransfersCategory as q, AssetTransfersOrder as r, setLogLevel as s, toHex as t, NftTokenType as u, verifyAlchemyEventName as v, NftSpamClassification as w, NftExcludeFilters as x, NftFilters as y, NftOrdering as z }; +//# sourceMappingURL=index-02af91ae.js.map diff --git a/test/node_modules/alchemy-sdk/dist/esm/index-02af91ae.js.map b/test/node_modules/alchemy-sdk/dist/esm/index-02af91ae.js.map new file mode 100644 index 0000000..958be01 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/index-02af91ae.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index-02af91ae.js","sources":["../../src/types/types.ts","../../src/util/const.ts","../../src/api/alchemy-config.ts","../../src/api/util.ts","../../src/util/util.ts","../../src/api/core-namespace.ts","../../src/util/logger.ts","../../src/version.ts","../../src/util/sendRest.ts","../../src/internal/backoff.ts","../../src/internal/dispatch.ts","../../src/internal/nft-api.ts","../../src/api/nft-namespace.ts","../../src/api/notify-namespace.ts","../../src/api/transact-namespace.ts","../../src/internal/internal-types.ts","../../src/internal/ethers-event.ts","../../src/api/websocket-namespace.ts","../../src/api/alchemy.ts","../../src/api/alchemy-wallet.ts","../../src/api/alchemy-contract.ts"],"sourcesContent":["import {\n EventType,\n TransactionReceipt\n} from '@ethersproject/abstract-provider';\nimport { BigNumberish } from '@ethersproject/bignumber';\n\nimport { BaseNft, Nft, NftContract } from '../api/nft';\n\n// TODO: separate this file into other files.\n\n/**\n * Options object used to configure the Alchemy SDK.\n *\n * @public\n */\nexport interface AlchemySettings {\n /**\n * The Alchemy API key that can be found in the Alchemy dashboard.\n *\n * Defaults to: \"demo\" (a rate-limited public API key)\n */\n apiKey?: string;\n\n /**\n * The name of the network. Once configured, the network cannot be changed. To\n * use a different network, instantiate a new `Alchemy` instance.\n *\n * Defaults to: Network.ETH_MAINNET\n */\n network?: Network;\n\n /** The maximum number of retries to attempt if a request fails. Defaults to 5. */\n maxRetries?: number;\n\n /**\n * Optional URL endpoint to use for all requests. Setting this field will\n * override the URL generated by the {@link network} and {@link apiKey} fields.\n *\n * This field is useful for testing or for using a custom node endpoint. Note\n * that not all methods will work with custom URLs.\n */\n url?: string;\n\n /**\n * Alchemy auth token required to use the Notify API. This token can be found\n * in the Alchemy Dashboard on the Notify tab.\n */\n authToken?: string;\n\n /**\n * Optional setting that automatically batches and sends json-rpc requests for\n * higher throughput and reduced network IO. Defaults to false.\n *\n * This implementation is based on the `JsonRpcBatchProvider` in ethers.\n */\n batchRequests?: boolean;\n}\n\n/**\n * The supported networks by Alchemy. Note that some functions are not available\n * on all networks. Please refer to the Alchemy documentation for which APIs are\n * available on which networks\n * {@link https://docs.alchemy.com/alchemy/apis/feature-support-by-chain}\n *\n * @public\n */\nexport enum Network {\n ETH_MAINNET = 'eth-mainnet',\n /** @deprecated - Will be removed in subsequent versions */\n ETH_ROPSTEN = 'eth-ropsten',\n ETH_GOERLI = 'eth-goerli',\n /** @deprecated - Will be removed in subsequent versions */\n ETH_KOVAN = 'eth-kovan',\n /** @deprecated - Will be removed in subsequent versions */\n ETH_RINKEBY = 'eth-rinkeby',\n OPT_MAINNET = 'opt-mainnet',\n /** @deprecated - Will be removed in subsequent versions */\n OPT_KOVAN = 'opt-kovan',\n OPT_GOERLI = 'opt-goerli',\n ARB_MAINNET = 'arb-mainnet',\n /** @deprecated - Will be removed in subsequent versions */\n ARB_RINKEBY = 'arb-rinkeby',\n ARB_GOERLI = 'arb-goerli',\n MATIC_MAINNET = 'polygon-mainnet',\n MATIC_MUMBAI = 'polygon-mumbai',\n ASTAR_MAINNET = 'astar-mainnet'\n}\n\n/** Token Types for the `getTokenBalances()` endpoint. */\nexport enum TokenBalanceType {\n /**\n * Option to fetch the top 100 tokens by 24-hour volume. This option is only\n * available on Mainnet in Ethereum, Polygon, and Arbitrum.\n */\n DEFAULT_TOKENS = 'DEFAULT_TOKENS',\n\n /**\n * Option to fetch the set of ERC-20 tokens that the address as ever held. his\n * list is produced by an address's historical transfer activity and includes\n * all tokens that the address has ever received.\n */\n ERC20 = 'erc20'\n}\n\n/**\n * Optional params to pass into `getTokenBalances()` to fetch all ERC-20 tokens\n * instead of passing in an array of contract addresses to fetch balances for.\n */\nexport interface TokenBalancesOptionsErc20 {\n /** The ERC-20 token type. */\n type: TokenBalanceType.ERC20;\n\n /** Optional page key for pagination (only applicable to TokenBalanceType.ERC20) */\n pageKey?: string;\n}\n\n/**\n * Optional params to pass into `getTokenBalances()` to fetch the top 100 tokens\n * instead of passing in an array of contract addresses to fetch balances for.\n */\nexport interface TokenBalancesOptionsDefaultTokens {\n /** The top 100 token type. */\n type: TokenBalanceType.DEFAULT_TOKENS;\n}\n\n/**\n * Response object for when the {@link TokenBalancesOptionsErc20} options are\n * used. A page key may be returned if the provided address has many transfers.\n */\nexport interface TokenBalancesResponseErc20 extends TokenBalancesResponse {\n /**\n * An optional page key to passed into the next request to fetch the next page\n * of token balances.\n */\n pageKey?: string;\n}\n\n/** @public */\nexport interface TokenBalancesResponse {\n address: string;\n tokenBalances: TokenBalance[];\n}\n\n/** @public */\nexport type TokenBalance = TokenBalanceSuccess | TokenBalanceFailure;\n\n/** @public */\nexport interface TokenBalanceSuccess {\n contractAddress: string;\n tokenBalance: string;\n error: null;\n}\n\n/** @public */\nexport interface TokenBalanceFailure {\n contractAddress: string;\n tokenBalance: null;\n error: string;\n}\n\n/**\n * Response object for the {@link CoreNamespace.getTokenMetadata} method.\n *\n * @public\n */\nexport interface TokenMetadataResponse {\n /**\n * The token's name. Is `null` if the name is not defined in the contract and\n * not available from other sources.\n */\n name: string | null;\n\n /**\n * The token's symbol. Is `null` if the symbol is not defined in the contract\n * and not available from other sources.\n */\n symbol: string | null;\n\n /**\n * The number of decimals of the token. Returns `null` if not defined in the\n * contract and not available from other sources.\n */\n decimals: number | null;\n\n /** URL link to the token's logo. Is `null` if the logo is not available. */\n logo: string | null;\n}\n\n/**\n * Parameters for the {@link CoreNamespace.getAssetTransfers} method.\n *\n * @public\n */\nexport interface AssetTransfersParams {\n /**\n * The starting block to check for transfers. This value is inclusive and\n * defaults to `0x0` if omitted.\n */\n fromBlock?: string;\n\n /**\n * The ending block to check for transfers. This value is inclusive and\n * defaults to the latest block if omitted.\n */\n toBlock?: string;\n\n /**\n * Whether to return results in ascending or descending order by block number.\n * Defaults to ascending if omitted.\n */\n order?: SortingOrder;\n\n /**\n * The from address to filter transfers by. This value defaults to a wildcard\n * for all addresses if omitted.\n */\n fromAddress?: string;\n\n /**\n * The to address to filter transfers by. This value defaults to a wildcard\n * for all address if omitted.\n */\n toAddress?: string;\n\n /**\n * List of contract addresses to filter for - only applies to \"erc20\",\n * \"erc721\", \"erc1155\" transfers. Defaults to all address if omitted.\n */\n contractAddresses?: string[];\n\n /**\n * Whether to exclude transfers with zero value. Note that zero value is\n * different than null value. Defaults to `false` if omitted.\n */\n excludeZeroValue?: boolean;\n\n /** REQUIRED field. An array of categories to get transfers for. */\n category: AssetTransfersCategory[];\n\n /** The maximum number of results to return per page. Defaults to 1000 if omitted. */\n maxCount?: number;\n\n /**\n * Optional page key from an existing {@link OwnedBaseNftsResponse}\n * {@link AssetTransfersResult}to use for pagination.\n */\n pageKey?: string;\n\n /**\n * Whether to include additional metadata about each transfer event. Defaults\n * to `false` if omitted.\n */\n withMetadata?: boolean;\n}\n\n/**\n * Parameters for the {@link CoreNamespace.getAssetTransfers} method that\n * includes metadata.\n *\n * @public\n */\nexport interface AssetTransfersWithMetadataParams extends AssetTransfersParams {\n withMetadata: true;\n}\n\n/**\n * Categories of transfers to use with the {@link AssetTransfersParams} request\n * object when using {@link CoreNamespace.getAssetTransfers}.\n *\n * @public\n */\nexport enum AssetTransfersCategory {\n /**\n * Top level ETH transactions that occur where the `fromAddress` is an\n * external user-created address. External addresses have private keys and are\n * accessed by users.\n */\n EXTERNAL = 'external',\n\n /**\n * Top level ETH transactions that occur where the `fromAddress` is an\n * internal, smart contract address. For example, a smart contract calling\n * another smart contract or sending\n */\n INTERNAL = 'internal',\n\n /** ERC20 transfers. */\n ERC20 = 'erc20',\n\n /** ERC721 transfers. */\n ERC721 = 'erc721',\n\n /** ERC1155 transfers. */\n ERC1155 = 'erc1155',\n\n /** Special contracts that don't follow ERC 721/1155, (ex: CryptoKitties). */\n SPECIALNFT = 'specialnft'\n}\n\n/**\n * Enum for the order of the {@link AssetTransfersParams} request object when\n * using {@link CoreNamespace.getAssetTransfers}.\n *\n * @deprecated Use {@link SortingOrder} instead. This enum will be removed in a\n * future version.\n * @public\n */\nexport enum AssetTransfersOrder {\n ASCENDING = 'asc',\n DESCENDING = 'desc'\n}\n\n/**\n * An enum for specifying the token type on NFTs.\n *\n * @public\n */\nexport enum NftTokenType {\n ERC721 = 'ERC721',\n ERC1155 = 'ERC1155',\n UNKNOWN = 'UNKNOWN'\n}\n\n/**\n * Response object for the {@link CoreNamespace.getAssetTransfers} method.\n *\n * @public\n */\nexport interface AssetTransfersResponse {\n transfers: AssetTransfersResult[];\n /** Page key for the next page of results, if one exists. */\n pageKey?: string;\n}\n\n/**\n * Response object for the {@link CoreNamespace.getAssetTransfers} method when\n * the {@link AssetTransfersWithMetadataParams} are used.\n *\n * @public\n */\nexport interface AssetTransfersWithMetadataResponse {\n transfers: AssetTransfersWithMetadataResult[];\n pageKey?: string;\n}\n\n/**\n * Represents a transfer event that is returned in a {@link AssetTransfersResponse}.\n *\n * @public\n */\nexport interface AssetTransfersResult {\n /** The unique ID of the transfer. */\n uniqueId: string;\n\n /** The category of the transfer. */\n category: AssetTransfersCategory;\n\n /** The block number where the transfer occurred. */\n blockNum: string;\n\n /** The from address of the transfer. */\n from: string;\n\n /** The to address of the transfer. */\n to: string | null;\n\n /**\n * Converted asset transfer value as a number (raw value divided by contract\n * decimal). `null` if ERC721 transfer or contract decimal not available.\n */\n value: number | null;\n\n /**\n * The raw ERC721 token id of the transfer as a hex string. `null` if not an\n * ERC721 transfer.\n */\n erc721TokenId: string | null;\n\n /**\n * A list of ERC1155 metadata objects if the asset transferred is an ERC1155\n * token. `null` if not an ERC1155 transfer.\n */\n erc1155Metadata: ERC1155Metadata[] | null;\n\n /** The token id of the token transferred. */\n tokenId: string | null;\n\n /**\n * Returns the token's symbol or ETH for other transfers. `null` if the\n * information was not available.\n */\n asset: string | null;\n\n /** The transaction hash of the transfer transaction. */\n hash: string;\n\n /** Information about the raw contract of the asset transferred. */\n rawContract: RawContract;\n}\n\n/**\n * Represents a transfer event that is returned in a\n * {@link AssetTransfersResponse} when {@link AssetTransfersWithMetadataParams} are used.\n *\n * @public\n */\nexport interface AssetTransfersWithMetadataResult extends AssetTransfersResult {\n /** Additional metadata about the transfer event. */\n metadata: AssetTransfersMetadata;\n}\n\n/**\n * The metadata object for a {@link AssetTransfersResult} when the\n * {@link AssetTransfersParams.withMetadata} field is set to true.\n *\n * @public\n */\nexport interface AssetTransfersMetadata {\n /** Timestamp of the block from which the transaction event originated. */\n blockTimestamp: string;\n}\n\n/**\n * Represents NFT metadata that holds fields. Note that since there is no\n * standard metadata format, the fields are not guaranteed to be present.\n *\n * @public\n */\nexport interface NftMetadata extends Record {\n /** Name of the NFT asset. */\n name?: string;\n\n /** A human-readable description of the NFT asset. */\n description?: string;\n\n /** URL to the NFT asset image. */\n image?: string;\n\n /**\n * The image URL that appears along the top of the NFT asset page. This tends\n * to be the highest resolution image.\n */\n external_url?: string;\n\n /** Background color of the NFT item. Usually defined as a 6 character hex string. */\n background_color?: string;\n\n /** The traits, attributes, and characteristics for the NFT asset. */\n attributes?: Array>;\n}\n\n/**\n * Represents the URI information the NFT's metadata.\n *\n * @public\n */\nexport interface TokenUri {\n /**\n * URI for the location of the NFT's original metadata blob (ex: the original\n * IPFS link).\n */\n raw: string;\n\n /** Public gateway URI for the raw URI. Generally offers better performance. */\n gateway: string;\n}\n\n/**\n * Represents the URI information for the NFT's media assets.\n *\n * @public\n */\nexport interface Media {\n /**\n * URI for the location of the NFT's original metadata blob for media (ex: the\n * original IPFS link).\n */\n raw: string;\n\n /** Public gateway URI for the raw URI. Generally offers better performance. */\n gateway: string;\n\n /** URL for a resized thumbnail of the NFT media asset. */\n thumbnail?: string;\n\n /**\n * The media format (ex: jpg, gif, png) of the {@link gateway} and\n * {@link thumbnail} assets.\n */\n format?: string;\n\n /**\n * DEPRECATED - The size of the media asset in bytes\n *\n * @deprecated - Please use {@link bytes} instead. This field will be removed\n * in a subsequent release.\n */\n size?: number;\n\n /** The size of the media asset in bytes. */\n bytes?: number;\n}\n\n/** Potential reasons why an NFT contract was classified as spam. */\nexport enum NftSpamClassification {\n Erc721TooManyOwners = 'Erc721TooManyOwners',\n Erc721TooManyTokens = 'Erc721TooManyTokens',\n Erc721DishonestTotalSupply = 'Erc721DishonestTotalSupply',\n MostlyHoneyPotOwners = 'MostlyHoneyPotOwners',\n OwnedByMostHoneyPots = 'OwnedByMostHoneyPots'\n}\n\n/** Detailed information on whether and why an NFT contract was classified as spam. */\nexport interface SpamInfo {\n isSpam: boolean;\n\n /** A list of reasons why an NFT contract was marked as spam. */\n classifications: NftSpamClassification[];\n}\n\n/**\n * Optional parameters object for the {@link getNftsForOwner} and\n * {@link getNftsForOwnerIterator} functions.\n *\n * This interface is used to fetch NFTs with their associated metadata. To get\n * Nfts without their associated metadata, use {@link GetBaseNftsForOwnerOptions}.\n *\n * @public\n */\nexport interface GetNftsForOwnerOptions {\n /**\n * Optional page key from an existing {@link OwnedBaseNftsResponse} or\n * {@link OwnedNftsResponse}to use for pagination.\n */\n pageKey?: string;\n\n /** Optional list of contract addresses to filter the results by. Limit is 20. */\n contractAddresses?: string[];\n\n /**\n * Optional list of filters applied to the query. NFTs that match one or more\n * of these filters are excluded from the response.\n */\n excludeFilters?: NftFilters[];\n\n /**\n * Optional list of filters applied to the query. NFTs that match one or more\n * of these filters are included in the response.\n */\n includeFilters?: NftFilters[];\n\n /**\n * Sets the total number of NFTs to return in the response. Defaults to 100.\n * Maximum page size is 100.\n */\n pageSize?: number;\n\n /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */\n omitMetadata?: boolean;\n\n /**\n * No set timeout by default - When metadata is requested, this parameter is\n * the timeout (in milliseconds) for the website hosting the metadata to\n * respond. If you want to only access the cache and not live fetch any\n * metadata for cache misses then set this value to 0.\n */\n tokenUriTimeoutInMs?: number;\n\n /**\n * Order in which to return results. By default, results are ordered by\n * contract address and token ID in lexicographic order.\n */\n orderBy?: NftOrdering;\n}\n\n/**\n * Optional parameters object for the {@link getNftsForOwner} and\n * {@link getNftsForOwnerIterator} functions.\n *\n * This interface is used to fetch NFTs without their associated metadata. To\n * get Nfts with their associated metadata, use {@link GetNftsForOwnerOptions}.\n *\n * @public\n */\nexport interface GetBaseNftsForOwnerOptions {\n /**\n * Optional page key from an existing {@link OwnedBaseNftsResponse} or\n * {@link OwnedNftsResponse}to use for pagination.\n */\n pageKey?: string;\n\n /** Optional list of contract addresses to filter the results by. Limit is 20. */\n contractAddresses?: string[];\n\n /**\n * Optional list of filters applied to the query. NFTs that match one or more\n * of these filters are excluded from the response.\n */\n excludeFilters?: NftFilters[];\n\n /**\n * Optional list of filters applied to the query. NFTs that match one or more\n * of these filters are included in the response.\n */\n includeFilters?: NftFilters[];\n\n /**\n * Sets the total number of NFTs to return in the response. Defaults to 100.\n * Maximum page size is 100.\n */\n pageSize?: number;\n\n /** Optional boolean flag to include NFT metadata. Defaults to `false`. */\n omitMetadata: true;\n\n /**\n * No set timeout by default - When metadata is requested, this parameter is\n * the timeout (in milliseconds) for the website hosting the metadata to\n * respond. If you want to only access the cache and not live fetch any\n * metadata for cache misses then set this value to 0.\n */\n tokenUriTimeoutInMs?: number;\n\n /**\n * Order in which to return results. By default, results are ordered by\n * contract address and token ID in lexicographic order.\n */\n orderBy?: NftOrdering;\n}\n\n/**\n * Enum of NFT filters that can be applied to a {@link getNftsForOwner} request.\n * NFTs that match one or more of these filters are excluded from the response.\n *\n * - @deprecated Use {@link NftFilters} instead. This enum will be removed in a\n * future version.\n *\n * @beta\n */\nexport enum NftExcludeFilters {\n /** Exclude NFTs that have been classified as spam. */\n SPAM = 'SPAM',\n\n /** Exclude NFTs that have been airdropped to a user. */\n AIRDROPS = 'AIRDROPS'\n}\n\n/**\n * Enum of NFT filters that can be applied to a {@link getNftsForOwner} or a\n * {@link getContractsForOwner} request.\n *\n * @beta\n */\nexport enum NftFilters {\n /** NFTs that have been classified as spam. */\n SPAM = 'SPAM',\n\n /** NFTs that have been airdropped to a user. */\n AIRDROPS = 'AIRDROPS'\n}\n\n/**\n * Enum of ordering that can be applied to a {@link getNftsForOwner} or a\n * {@link getContractsForOwner} response.\n *\n * @beta\n */\nexport enum NftOrdering {\n TRANSFERTIME = 'TRANSFERTIME'\n}\n\n/**\n * The response object for the {@link getNftsForOwner} and\n * {@link getNftsForOwnerIterator} functions. The object contains the NFTs with\n * metadata owned by the provided address, along with pagination information and\n * the total count.\n *\n * @public\n */\nexport interface OwnedNftsResponse {\n /** The NFTs owned by the provided address. */\n readonly ownedNfts: OwnedNft[];\n\n /**\n * Pagination token that can be passed into another request to fetch the next\n * NFTs. If there is no page key, then there are no more NFTs to fetch.\n */\n readonly pageKey?: string;\n\n /** The total count of NFTs owned by the provided address. */\n readonly totalCount: number;\n}\n\n/**\n * The response object for the {@link getNftsForOwner} and\n * {@link getNftsForOwnerIterator} functions. The object contains the NFTs\n * without metadata owned by the provided address, along with pagination\n * information and the total count.\n *\n * @public\n */\nexport interface OwnedBaseNftsResponse {\n /** The NFTs owned by the provided address. */\n readonly ownedNfts: OwnedBaseNft[];\n\n /**\n * Pagination token that can be passed into another request to fetch the next\n * NFTs. If there is no page key, then there are no more NFTs to fetch.\n */\n readonly pageKey?: string;\n\n /** The total count of NFTs owned by the provided address. */\n readonly totalCount: number;\n}\n\n/**\n * Represents an NFT with metadata owned by an address.\n *\n * @public\n */\nexport interface OwnedNft extends Nft {\n /** The token balance of the NFT. */\n readonly balance: number;\n}\n\n/**\n * Represents an NFT without metadata owned by an address.\n *\n * @public\n */\nexport interface OwnedBaseNft extends BaseNft {\n /** The token balance of the NFT. */\n readonly balance: number;\n}\n\n/**\n * The response object for the {@link getOwnersForNft}.\n *\n * @public\n */\nexport interface GetOwnersForNftResponse {\n /** An array of owner addresses for the provided token. */\n readonly owners: string[];\n}\n\n/**\n * The response object for the {@link getOwnersForContract}.\n *\n * @public\n */\nexport interface GetOwnersForContractResponse {\n /** An array of owner addresses for the provided contract address */\n owners: string[];\n}\n\n/**\n * The response object for the {@link getOwnersForContract}.\n *\n * @public\n */\nexport interface GetOwnersForContractWithTokenBalancesResponse {\n /** An array of owner addresses for the provided contract address */\n owners: NftContractOwner[];\n\n /** Optional page key that is returned when a collection has more than 50,000 owners. */\n pageKey?: string;\n}\n\n/**\n * An object representing the owner of an NFT and its corresponding token\n * balances in a {@link GetOwnersForContractWithTokenBalancesResponse} object.\n */\nexport interface NftContractOwner {\n /** The NFT's owner address. */\n ownerAddress: string;\n\n /** A list of objects containing token balances for the provided NFT contract. */\n tokenBalances: NftContractTokenBalance[];\n}\n\n/**\n * An object representing the owned token and balance values in a\n * {@link GetOwnersForContractWithTokenBalancesResponse} object.\n */\nexport interface NftContractTokenBalance {\n /** The token id owned in the NFT contract. */\n tokenId: string;\n\n /** The token Id balance for the provided owner. */\n balance: number;\n}\n\n/**\n * Represents an NFT token to fetch metadata for in a\n * {@link NftNamespace.getNftMetadataBatch} method.\n */\nexport interface NftMetadataBatchToken {\n /** The NFT contract address. Limited to ERC721 and ERC1155 tokens. */\n contractAddress: string;\n\n /** The id of the NFT. */\n tokenId: BigNumberish;\n\n /** Optional field to specify the type of token to speed up the query. */\n tokenType?: NftTokenType.ERC1155 | NftTokenType.ERC721;\n}\n\n/** Additional options for the {@link NftNamespace.getNftMetadataBatch} method. */\nexport interface NftMetadataBatchOptions {\n /**\n * No set timeout by default - When metadata is requested, this parameter is\n * the timeout (in milliseconds) for the website hosting the metadata to\n * respond. If you want to only access the cache and not live fetch any\n * metadata for cache misses then set this value to 0.\n */\n tokenUriTimeoutInMs?: number;\n\n /**\n * Whether to refresh the metadata for the given NFT token before returning\n * the response. Defaults to false for faster response times.\n */\n refreshCache?: boolean;\n}\n\n/**\n * The successful object returned by the {@link getFloorPrice} call for each\n * marketplace (e.g. looksRare).\n *\n * @public\n */\nexport interface FloorPriceMarketplace {\n /** The floor price of the collection on the given marketplace */\n readonly floorPrice: number;\n /** The currency in which the floor price is denominated */\n readonly priceCurrency: string;\n /** The link to the collection on the given marketplace */\n readonly collectionUrl: string;\n /** UTC timestamp of when the floor price was retrieved from the marketplace */\n readonly retrievedAt: string;\n}\n\n/**\n * The failing object returned by the {@link getFloorPrice} call for each\n * marketplace (e.g. looksRare).\n *\n * @public\n */\nexport interface FloorPriceError {\n /** Error fetching floor prices from the given marketplace */\n readonly error: string;\n}\n\n/**\n * The response object for the {@link getFloorPrice} method.\n *\n * @public\n */\nexport interface GetFloorPriceResponse {\n /**\n * Name of the NFT marketplace where the collection is listed. Current\n * marketplaces supported: OpenSea, LooksRare\n */\n readonly openSea: FloorPriceMarketplace | FloorPriceError;\n readonly looksRare: FloorPriceMarketplace | FloorPriceError;\n}\n\n/**\n * Optional parameters object for the the {@link getContractsForOwner} method\n *\n * @public\n */\nexport interface GetContractsForOwnerOptions {\n /** Key for pagination to use to fetch results from the next page if available. */\n pageKey?: string;\n\n /**\n * Optional list of filters applied to the query. NFTs that match one or more\n * of these filters are included in the response. May not be used in\n * conjunction with {@link excludeFilters}.\n */\n includeFilters?: NftFilters[];\n\n /**\n * Optional list of filters applied to the query. NFTs that match one or more\n * of these filters are excluded from the response. May not be used in\n * conjunction with {@link includeFilters}\n */\n excludeFilters?: NftFilters[];\n\n /**\n * Order in which to return results. By default, results are ordered by\n * contract address and token ID in lexicographic order.\n */\n orderBy?: NftOrdering;\n}\n\n/**\n * The response for the {@link NftNamespace.getContractsForOwner} method.\n *\n * @public\n */\nexport interface GetContractsForOwnerResponse {\n /** The list of contracts, that match the query, held by the given address. */\n contracts: ContractForOwner[];\n\n /** Key for pagination to use to fetch results from the next page if available. */\n pageKey?: string;\n\n /** Total number of NFT contracts held by the given address. */\n totalCount: number;\n}\n\n/** Represents a single NFT contract data in the {@link GetContractsForOwnerResponse}. */\nexport interface ContractForOwner extends NftContract {\n /**\n * Sum of NFT balances across all token IDs held by the owner. For\n * non-fungible tokens this will be equal to the numDistinctTokensOwned, but\n * it may be higher if the user holds some fungible ERC1155 tokens.\n */\n totalBalance: number;\n\n /**\n * Number of distinct token IDs held by the owner. For non-fungible tokens\n * this will be equal to the totalBalance, but it may be lower if the user\n * holds some fungible ERC1155 tokens.\n */\n numDistinctTokensOwned: number;\n\n isSpam: boolean;\n\n /** One of the tokens from this contract held by the owner. */\n tokenId: string;\n\n /** Alternative NFT metadata for this contract to be parsed manually. */\n media: Media;\n}\n\n/**\n * Optional parameters object for the {@link getNftSales} endpoint.\n *\n * This interface is used to filter the NFT sales data.\n *\n * @public\n */\nexport interface GetNftSalesOptions {\n /** The block number to start fetching NFT sales data from. */\n fromBlock?: number | 'latest';\n\n /** The block number limit to fetch NFT sales data from. */\n toBlock?: number | 'latest';\n\n /** Whether to return the results in ascending or descending order by block number. */\n order?: SortingOrder;\n\n /** The NFT marketplace to filter sales by. */\n marketplace?: NftSaleMarketplace;\n\n /** The address of the NFT buyer to filter sales by. */\n buyerAddress?: string;\n\n /** The address of the NFT seller to filter sales by. */\n sellerAddress?: string;\n\n /**\n * Filter by whether the buyer or seller was the taker in the NFT trade.\n * Defaults to returning both buyer and seller taker trades.\n */\n taker?: NftSaleTakerType;\n\n /** The maximum number of NFT sales to return. */\n limit?: number;\n\n /** Key for pagination to use to fetch results from the next page if available. */\n pageKey?: string;\n}\n\n/**\n * Alternative optional parameters object for the {@link getNftSales} endpoint\n * that allows filtering results by contractAddress.\n *\n * This interface is used to filter the NFT sales data.\n *\n * @public\n */\nexport interface GetNftSalesOptionsByContractAddress\n extends GetNftSalesOptions {\n /** The contract address of a NFT collection to filter sales by. */\n contractAddress: string;\n\n /** The token ID of an NFT within the specified contractAddress to filter sales by. */\n tokenId?: BigNumberish;\n}\n\n/**\n * The response for the {@link NftNamespace.getNftSales} method.\n *\n * @public\n */\nexport interface GetNftSalesResponse {\n /** The page key to use to fetch the next page if more results are available. */\n pageKey?: string;\n\n /** List of NFT sales that match the query */\n nftSales: NftSale[];\n}\n\n/** Represents a single NFT sale data in the {@link GetNftSalesResponse}. */\nexport interface NftSale {\n /** The marketplace the sale took place on. */\n marketplace: NftSaleMarketplace;\n\n /** The NFT contract address. */\n contractAddress: string;\n\n /** The decimal token ID of the NFT being sold. */\n tokenId: string;\n\n /** The number of tokens sold in the sale as a decimal integer string. */\n quantity: string;\n\n /** The address of the buyer in the NFT sale. */\n buyerAddress: string;\n\n /** The address of the seller in the NFT sale. */\n sellerAddress: string;\n\n /** Whether the price taker in the trade was the buyer or the seller. */\n taker: NftSaleTakerType;\n\n /** The payment from buyer to the seller. */\n sellerFee: NftSaleFeeData;\n\n /** The payment from buyer to the marketplace. */\n marketplaceFee?: NftSaleFeeData;\n\n /** The payment from buyer to the royalty address of the NFT collection. */\n royaltyFee?: NftSaleFeeData;\n\n /** The block number the NFT sale took place in. */\n blockNumber: number;\n\n /** The log number of the sale event emitted within the block. */\n logIndex: number;\n\n /** The index of the token within the bundle of NFTs sold in the sale. */\n bundleIndex: number;\n\n /** The transactionHash of the NFT sale. */\n transactionHash: string;\n}\n\n/**\n * Fee detail for an NFT sale.\n *\n * @public\n */\nexport interface NftSaleFeeData {\n /** The fee payment amount as a decimal integer string. */\n amount: string;\n\n /** The symbol of the token used for the payment. */\n symbol: string;\n\n /** The number of decimals of the token used for the payment. */\n decimal: number;\n}\n\n/**\n * Enum for representing the supported sorting orders of the API.\n *\n * @public\n */\nexport enum SortingOrder {\n ASCENDING = 'asc',\n DESCENDING = 'desc'\n}\n\n/**\n * Enum representing the supported NFT marketplaces by the {@link getNftSales} endpoint.\n *\n * @public\n */\nexport enum NftSaleMarketplace {\n SEAPORT = 'seaport',\n LOOKSRARE = 'looksrare',\n X2Y2 = 'x2y2',\n UNKNOWN = 'unknown'\n}\n\n/**\n * Enum for specifing the taker type for the {@link getNftSales} endpoint.\n *\n * @public\n */\nexport enum NftSaleTakerType {\n BUYER = 'buyer',\n SELLER = 'seller'\n}\n\n/**\n * Information about the rarity of an NFT's attribute in the specified collection.\n *\n * @public\n */\nexport interface NftAttributeRarity {\n /** Name of the NFT's attribute. */\n value: string;\n\n /** The type of NFT attribute. */\n traitType: string;\n\n /**\n * A number from 0 to 1 representing the prevalence of this value for this\n * trait type in the current collection.\n */\n prevalence: number;\n}\n\n/**\n * Summary of the attribute prevalence for the specified NFT contract.\n *\n * @public\n */\nexport interface NftAttributesResponse {\n /** The specified NFT contract's address. */\n contractAddress: string;\n\n /** The specified NFT contract's total supply. */\n totalSupply: number;\n\n /**\n * The attribute prevalence of each trait grouped by the trait type for the\n * provided NFT.\n */\n summary: Record>;\n}\n\n/** The refresh result response object returned by {@link refreshContract}. */\nexport interface RefreshContractResult {\n /** The NFT contract address that was passed in to be refreshed. */\n contractAddress: string;\n\n /** The current state of the refresh request. */\n refreshState: RefreshState;\n\n /**\n * Percentage of tokens currently refreshed, represented as an integer string.\n * Field can be null if the refresh has not occurred.\n */\n progress: string | null;\n}\n\n/** The current state of the NFT contract refresh process. */\nexport enum RefreshState {\n /** The provided contract is not an NFT or does not contain metadata. */\n DOES_NOT_EXIST = 'does_not_exist',\n\n /** The contract has already been queued for refresh. */\n ALREADY_QUEUED = 'already_queued',\n\n /** The contract is currently being refreshed. */\n IN_PROGRESS = 'in_progress',\n\n /** The contract refresh is complete. */\n FINISHED = 'finished',\n\n /** The contract refresh has been queued and await execution. */\n QUEUED = 'queued',\n\n /** The contract was unable to be queued due to an internal error. */\n QUEUE_FAILED = 'queue_failed'\n}\n\n/**\n * The parameter field of {@link TransactionReceiptsParams}.\n *\n * @public\n */\nexport interface TransactionReceiptsBlockNumber {\n /** The block number to get transaction receipts for. */\n blockNumber: string;\n}\n\n/**\n * The parameter field of {@link TransactionReceiptsParams}.\n *\n * @public\n */\nexport interface TransactionReceiptsBlockHash {\n /** The block hash to get transaction receipts for. */\n blockHash: string;\n}\n\n/**\n * The parameters to use with the {@link CoreNamespace.getTransactionReceipts} method.\n *\n * @public\n */\nexport type TransactionReceiptsParams =\n | TransactionReceiptsBlockNumber\n | TransactionReceiptsBlockHash;\n\n/**\n * Response object for a {@link CoreNamespace.getTransactionReceipts} call.\n *\n * @public\n */\nexport interface TransactionReceiptsResponse {\n /** A list of transaction receipts for the queried block. */\n receipts: TransactionReceipt[] | null;\n}\n\n/**\n * Metadata object returned in a {@link AssetTransfersResult} object if the asset\n * transferred is an ERC1155.\n *\n * @public\n */\nexport interface ERC1155Metadata {\n tokenId: string;\n value: string;\n}\n\n/**\n * Information about the underlying contract for the asset that was transferred\n * in a {@link AssetTransfersResult} object.\n *\n * @public\n */\nexport interface RawContract {\n /**\n * The raw transfer value as a hex string. `null` if the transfer was for an\n * ERC721 or ERC1155 token.\n */\n value: string | null;\n\n /** The contract address. `null` if it was an internal or external transfer. */\n address: string | null;\n\n /**\n * The number of decimals in the contract as a hex string. `null` if the value\n * is not in the contract and not available from other sources.\n */\n decimal: string | null;\n}\n\n/**\n * Optional parameters object for the {@link getNftsForContract} and\n * {@link getNftsForContractIterator} functions.\n *\n * This interface is used to fetch NFTs with their associated metadata. To get\n * Nfts without their associated metadata, use {@link GetBaseNftsForContractOptions}.\n *\n * @public\n */\nexport interface GetNftsForContractOptions {\n /**\n * Optional page key from an existing {@link NftContractBaseNftsResponse} or\n * {@link NftContractNftsResponse}to use for pagination.\n */\n pageKey?: string;\n\n /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */\n omitMetadata?: boolean;\n\n /**\n * Sets the total number of NFTs to return in the response. Defaults to 100.\n * Maximum page size is 100.\n */\n pageSize?: number;\n\n /**\n * No set timeout by default - When metadata is requested, this parameter is\n * the timeout (in milliseconds) for the website hosting the metadata to\n * respond. If you want to only access the cache and not live fetch any\n * metadata for cache misses then set this value to 0.\n */\n tokenUriTimeoutInMs?: number;\n}\n\n/**\n * Optional parameters object for the {@link getNftsForContract} and\n * {@link getNftsForContractIterator} functions.\n *\n * This interface is used to fetch NFTs without their associated metadata. To\n * get Nfts with their associated metadata, use {@link GetNftsForContractOptions}.\n *\n * @public\n */\nexport interface GetBaseNftsForContractOptions {\n /**\n * Optional page key from an existing {@link NftContractBaseNftsResponse} or\n * {@link NftContractNftsResponse}to use for pagination.\n */\n pageKey?: string;\n\n /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */\n omitMetadata: false;\n\n /**\n * Sets the total number of NFTs to return in the response. Defaults to 100.\n * Maximum page size is 100.\n */\n pageSize?: number;\n}\n\n/**\n * Optional parameters object for the {@link getNftsForContract} method.\n *\n * This interface configures options when fetching the owner addresses of the\n * provided contract.\n *\n * @public\n */\nexport interface GetOwnersForContractOptions {\n /**\n * Whether to include the token balances per token id for each owner. Defaults\n * to false when omitted.\n */\n withTokenBalances?: boolean;\n\n /** The block number in hex or decimal to fetch owners for. */\n block?: string;\n\n /** Optional page key to paginate the next page for large requests. */\n pageKey?: string;\n}\n\n/**\n * Optional parameters object for the {@link getNftsForContract} method.\n *\n * This interface configures options when fetching the owner addresses of the\n * provided contract.\n *\n * @public\n */\nexport interface GetOwnersForContractWithTokenBalancesOptions {\n /**\n * Whether to include the token balances per token id for each owner. Defaults\n * to false when omitted.\n */\n withTokenBalances: true;\n\n /** The block number in hex or decimal to fetch owners for. */\n block?: string;\n\n /** Optional page key to paginate the next page for large requests. */\n pageKey?: string;\n}\n\n/**\n * The response object for the {@link getNftsForContract} function. The object\n * contains the NFTs without metadata inside the NFT contract.\n *\n * @public\n */\nexport interface NftContractBaseNftsResponse {\n /** An array of NFTs without metadata. */\n nfts: BaseNft[];\n\n /**\n * Pagination token that can be passed into another request to fetch the next\n * NFTs. If there is no page key, then there are no more NFTs to fetch.\n */\n pageKey?: string;\n}\n\n/**\n * The response object for the {@link getNftsForContract} function. The object\n * contains the NFTs with metadata inside the NFT contract.\n *\n * @public\n */\nexport interface NftContractNftsResponse {\n /** An array of NFTs with metadata. */\n nfts: Nft[];\n\n /**\n * Pagination token that can be passed into another request to fetch the next\n * NFTs. If there is no page key, then there are no more NFTs to fetch.\n */\n pageKey?: string;\n}\n\n/** OpenSea's metadata for an NFT collection. */\nexport interface OpenSeaCollectionMetadata {\n /** The floor price of the NFT. */\n floorPrice?: number;\n /** The name of the collection on OpenSea. */\n collectionName?: string;\n /** The approval status of the collection on OpenSea. */\n safelistRequestStatus?: OpenSeaSafelistRequestStatus;\n /** The image URL determined by OpenSea. */\n imageUrl?: string;\n /** The description of the collection on OpenSea. */\n description?: string;\n /** The homepage of the collection as determined by OpenSea. */\n externalUrl?: string;\n /** The Twitter handle of the collection. */\n twitterUsername?: string;\n /** The Discord URL of the collection. */\n discordUrl?: string;\n /** Timestamp of when the OpenSea metadata was last ingested by Alchemy. */\n lastIngestedAt?: string;\n}\n\n/** An OpenSea collection's approval status. */\nexport enum OpenSeaSafelistRequestStatus {\n /** Verified collection. */\n VERIFIED = 'verified',\n /** Collections that are approved on open sea and can be found in search results. */\n APPROVED = 'approved',\n /** Collections that requested safelisting on OpenSea. */\n REQUESTED = 'requested',\n /** Brand new collections. */\n NOT_REQUESTED = 'not_requested'\n}\n\n/**\n * The response object for the {@link findContractDeployer} function.\n *\n * @public\n */\nexport interface DeployResult {\n /** The address of the contract deployer, if it is available. */\n readonly deployerAddress?: string;\n\n /** The block number the contract was deployed in. */\n readonly blockNumber: number;\n}\n\n/**\n * Method names for Alchemy's custom Subscription API endpoints.\n *\n * This value is provided in the `method` field when creating an event filter on\n * the Websocket Namespace.\n */\nexport enum AlchemySubscription {\n PENDING_TRANSACTIONS = 'alchemy_pendingTransactions',\n MINED_TRANSACTIONS = 'alchemy_minedTransactions'\n}\n\n/**\n * Event filter for the {@link AlchemyWebSocketProvider.on} and\n * {@link AlchemyWebSocketProvider.once} methods to use Alchemy's custom\n * `alchemy_pendingTransactions` endpoint.\n *\n * Returns the transaction information for all pending transactions that match a\n * given filter. For full documentation, see:\n * {@link https://docs.alchemy.com/reference/alchemy-pendingtransactions}\n *\n * Note that excluding all optional parameters will return transaction\n * information for ALL pending transactions that are added to the mempool.\n *\n * @public\n */\nexport interface AlchemyPendingTransactionsEventFilter {\n method: AlchemySubscription.PENDING_TRANSACTIONS;\n\n /** Filter pending transactions sent FROM the provided address or array of addresses. */\n fromAddress?: string | string[];\n\n /** Filter pending transactions sent TO the provided address or array of addresses. */\n toAddress?: string | string[];\n\n /**\n * Whether to only include transaction hashes and exclude the rest of the\n * transaction response for a smaller payload. Defaults to false (by default,\n * the entire transaction response is included).\n *\n * Note that setting only {@link hashesOnly} to true will return the same\n * response as subscribing to `newPendingTransactions`.\n */\n hashesOnly?: boolean;\n}\n\n/**\n * Event filter for the {@link AlchemyWebSocketProvider.on} and\n * {@link AlchemyWebSocketProvider.once} methods to use Alchemy's custom\n * `alchemy_minedTransactions` endpoint.\n *\n * Returns the transaction information for all mined transactions that match the\n * provided filter. For full documentation, see:\n * {@link https://docs.alchemy.com/reference/alchemy-minedtransactions}\n *\n * Note that excluding all optional parameters will return transaction\n * information for ALL mined transactions.\n *\n * @public\n */\nexport interface AlchemyMinedTransactionsEventFilter {\n method: AlchemySubscription.MINED_TRANSACTIONS;\n\n /**\n * Address filters to subscribe to. Defaults to all transactions if omitted.\n * Limit 100 address filters. Requires a non-empty array.\n */\n addresses?: NonEmptyArray;\n\n /**\n * Whether to include transactions that were removed from the mempool.\n * Defaults to false.\n */\n includeRemoved?: boolean;\n\n /**\n * Whether to only include transaction hashes and exclude the rest of the\n * transaction response for a smaller payload. Defaults to false (by default,\n * the entire transaction response is included).\n */\n hashesOnly?: boolean;\n}\n\n/**\n * Address filters for {@link AlchemyMinedTransactionsEventFilter}. Requires at\n * least one of the fields to be set.\n */\nexport type AlchemyMinedTransactionsAddress = RequireAtLeastOne<{\n to?: string;\n from?: string;\n}>;\n\n/**\n * Alchemy's event type that extends the default {@link EventType} interface to\n * also include Alchemy's Subscription API.\n *\n * @public\n */\nexport type AlchemyEventType = EventType | AlchemyEventFilter;\n\n/**\n * This type represents the Alchemy's Subscription API endpoints as event\n * filters compatible with other ethers events.\n */\nexport type AlchemyEventFilter =\n | AlchemyMinedTransactionsEventFilter\n | AlchemyPendingTransactionsEventFilter;\n\n/** Options for the {@link TransactNamespace.sendPrivateTransaction} method. */\nexport interface SendPrivateTransactionOptions {\n /**\n * Whether to use fast-mode. Defaults to false. Please note that fast mode\n * transactions cannot be cancelled using\n * {@link TransactNamespace.cancelPrivateTransaction}. method.\n *\n * See {@link https://docs.flashbots.net/flashbots-protect/rpc/fast-mode} for\n * more details.\n */\n fast: boolean;\n}\n\n/**\n * Response object for the {@link TransactNamespace.sendGasOptimizedTransaction} method.\n *\n * @internal\n */\n// TODO(txjob): Remove internal tag once this feature is released.\nexport interface GasOptimizedTransactionResponse {\n /**\n * The tracking id. This can be used to check the status of the transaction\n * via {@link TransactNamespace.getGasOptimizedTransactionStatus}.\n */\n trackingId: string;\n\n /* An array of the transaction hashes from submitted transactions. */\n transactionHashes: string[];\n}\n\n/**\n * Response object for the\n * {@link TransactNamespace.getGasOptimizedTransactionStatus} method.\n *\n * @internal\n */\n// TODO(txjob): Remove internal tag once this feature is released.\nexport interface GasOptimizedTransactionStatusResponse {\n /** The status of the submitted transaction job. */\n jobStatus: GasOptimizedTransactionStatus;\n\n /** An array of the submitted transactions hashes that have been attempted. */\n transactionHashesAttempted: string[];\n\n /** The final mined transaction hash if the job was completed successfully. */\n minedTransactionHash?: string;\n}\n\n/**\n * Potential transaction job statuses for a {@link GasOptimizedTransactionResponse}\n *\n * @internal\n */\n// TODO(txjob): Remove internal tag once this feature is released.\nexport enum GasOptimizedTransactionStatus {\n UNSPECIFIED = 'TRANSACTION_JOB_STATUS_UNSPECIFIED',\n IN_PROGRESS = 'IN_PROGRESS',\n COMPLETE = 'COMPLETE',\n ABANDONED = 'ABANDONED'\n}\n\n/** SDK representation of a Webhook in the Notify API. */\nexport interface Webhook {\n /** The webhook's unique id. */\n id: string;\n /** The network the webhook is on. */\n network: Network;\n /** The type of webhook. */\n type: WebhookType;\n /** The url that the webhook sends its payload to. */\n url: string;\n /** Whether the webhook is currently active */\n isActive: boolean;\n /** The creation time of the webhook as an ISO string. */\n timeCreated: string;\n /** The signing key used to verify payloads for the webhook. */\n signingKey: string;\n /** The webhook version. All newly created webhooks default to V2. */\n version: WebhookVersion;\n /**\n * The app id of the app used for the webhook. This field is only present on\n * {@link MinedTransactionWebhook} and {@link DroppedTransactionWebhook}\n */\n appId?: string;\n}\n\n/** The version of the webhook. All newly created webhooks default to V2. */\nexport enum WebhookVersion {\n V1 = 'V1',\n V2 = 'V2'\n}\n\n/** The type of {@link Webhook}. */\nexport enum WebhookType {\n MINED_TRANSACTION = 'MINED_TRANSACTION',\n DROPPED_TRANSACTION = 'DROPPED_TRANSACTION',\n ADDRESS_ACTIVITY = 'ADDRESS_ACTIVITY',\n NFT_ACTIVITY = 'NFT_ACTIVITY'\n}\n\n/**\n * A Mined Transaction Webhook is used to notify your app whenever a transaction\n * sent through your API key gets successfully mined. This is useful if you want\n * to notify customers that their transaction went through.\n */\nexport interface MinedTransactionWebhook extends Webhook {\n type: WebhookType.MINED_TRANSACTION;\n}\n\n/**\n * A Dropped Transaction webhook is used to notify your app whenever a\n * transaction sent through your API key gets dropped. This can be useful if you\n * want to notify customers that their transactions were dropped.\n */\nexport interface DroppedTransactionWebhook extends Webhook {\n type: WebhookType.DROPPED_TRANSACTION;\n}\n\n/**\n * An Address Activity Webhook tracks ETH, ERC20, ERC721, and ERC1155 transfers\n * for the provided addresses. This can be used to notify your app with\n * real-time state changes when your tracked addresses send or receive tokens.\n */\nexport interface AddressActivityWebhook extends Webhook {\n type: WebhookType.ADDRESS_ACTIVITY;\n}\n\n/**\n * The NFT Activity Webhook tracks all ERC721 and ERC1155 activity. This can be\n * used to notify your app with real time state changes when an NFT is\n * transferred between addresses.\n */\nexport interface NftActivityWebhook extends Webhook {\n type: WebhookType.NFT_ACTIVITY;\n}\n\n/** The response for a {@link NotifyNamespace.getAllWebhooks} method. */\nexport interface GetAllWebhooksResponse {\n /** All webhooks attached to the provided auth token. */\n webhooks: Webhook[];\n /** The total number of webhooks. */\n totalCount: number;\n}\n\n/** Options object for the {@link NotifyNamespace.getAddresses} method. */\nexport interface GetAddressesOptions {\n /** Number of addresses to fetch. */\n limit?: number;\n\n /** Page */\n pageKey?: string;\n}\n\n/** Response object for the {@link NotifyNamespace.getAddresses} method. */\nexport interface AddressActivityResponse {\n /** The addresses for the webhook. */\n addresses: string[];\n /** The total number of addresses. */\n totalCount: number;\n /** Optional page key used to fetch the remaining addresses. */\n pageKey?: string;\n}\n\n/**\n * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order\n * to create a {@link MinedTransactionWebhook} or {@link DroppedTransactionWebhook}.\n *\n * The webhook will be created on the app and network associated with the appId.\n * To find the app id of a project, go to the Alchemy Dashboard in the Apps tab.\n * After clicking on an app, the app id is the string in the URL following 'apps/'.\n *\n * This is a temporary workaround for now. We're planning on detecting the app\n * id from the provided api key directly. Stay tuned!\n */\nexport interface TransactionWebhookParams {\n /** The app id of the project to create the webhook on. */\n appId: string;\n}\n\n/**\n * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order\n * to create a {@link NftActivityWebhook}.\n */\nexport interface NftWebhookParams {\n /** Array of NFT filters the webhook should track. */\n filters: NftFilter[];\n /**\n * Optional network to create the webhook on. If omitted, the webhook will be\n * created on network of the app provided in the api key config.\n */\n network?: Network;\n}\n\n/**\n * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order\n * to create a {@link AddressActivityWebhook}.\n */\nexport interface AddressWebhookParams {\n /** Array of addresses the webhook should activity for. */\n addresses: string[];\n /**\n * Optional network to create the webhook on. If omitted, the webhook will be\n * created on network of the app provided in the api key config.\n */\n network?: Network;\n}\n\n/** NFT to track on a {@link NftActivityWebhook}. */\nexport interface NftFilter {\n /** The contract address of the NFT. */\n contractAddress: string;\n /** The token id of the NFT. */\n tokenId: BigNumberish;\n}\n\n/** Response object for the {@link NotifyNamespace.getNftFilters} method. */\nexport interface NftFiltersResponse {\n /** The NFT filters on the provided webhook. */\n filters: NftFilter[];\n /** The total number of NFT filters on the webhook. */\n totalCount: number;\n /** Optional page key used to fetch the remaining filters. */\n pageKey?: string;\n}\n\n/**\n * Params object when calling {@link NotifyNamespace.updateWebhook} to mark a\n * webhook as active or inactive.\n */\nexport interface WebhookStatusUpdate {\n /** Whether the webhook is active. */\n isActive: boolean;\n}\n\n/**\n * Params object when calling {@link NotifyNamespace.updateWebhook} to add and\n * remove NFT filters for a {@link NftActivityWebhook}.\n */\nexport interface WebhookNftFilterUpdate {\n /** The filters to additionally track. */\n addFilters: NftFilter[];\n /** Existing filters to remove. */\n removeFilters: NftFilter[];\n}\n\n/**\n * Params object when calling {@link NotifyNamespace.updateWebhook} to add and\n * remove addresses for a {@link AddressActivityWebhook}.\n */\nexport interface WebhookAddressUpdate {\n /** The addresses to additionally track. */\n addAddresses: string[];\n /** Existing addresses to remove. */\n removeAddresses: string[];\n}\n\n/**\n * Params object when calling {@link NotifyNamespace.updateWebhook} to replace\n * all existing addresses for a {@link AddressActivityWebhook}.\n */\nexport interface WebhookAddressOverride {\n /** The new addresses to track. Existing addresses will be removed. */\n newAddresses: string[];\n}\n\n/**\n * Params object when calling {@link NotifyNamespace.updateWebhook} to update a\n * {@link NftActivityWebhook}.\n */\n\nexport type NftWebhookUpdate =\n | WebhookStatusUpdate\n | RequireAtLeastOne;\n\n/**\n * Params object when calling {@link NotifyNamespace.updateWebhook} to update a\n * {@link AddressActivityWebhook}.\n */\nexport type AddressWebhookUpdate =\n | WebhookStatusUpdate\n | RequireAtLeastOne\n | WebhookAddressOverride;\n\n/**\n * Requires at least one of the properties to be set.\n *\n * Implementation copied over from\n * {@link https://learn.microsoft.com/en-us/javascript/api/@azure/keyvault-certificates/requireatleastone?view=azure-node-latest}\n */\nexport type RequireAtLeastOne = {\n [K in keyof T]-?: Required> &\n Partial>>;\n}[keyof T];\n\n/** Requires an array with at least one value. */\nexport type NonEmptyArray = [T, ...T[]];\n","import { Network as NetworkFromEthers } from '@ethersproject/networks';\n\nimport { Network } from '../types/types';\n\nexport const DEFAULT_ALCHEMY_API_KEY = 'demo';\nexport const DEFAULT_NETWORK = Network.ETH_MAINNET;\nexport const DEFAULT_MAX_RETRIES = 5;\n\n/**\n * Returns the base URL for making Alchemy API requests. The `alchemy.com`\n * endpoints only work with non eth json-rpc requests.\n *\n * @internal\n */\nexport function getAlchemyHttpUrl(network: Network, apiKey: string): string {\n return `https://${network}.g.alchemy.com/v2/${apiKey}`;\n}\n\nexport function getAlchemyNftHttpUrl(network: Network, apiKey: string): string {\n return `https://${network}.g.alchemy.com/nft/v2/${apiKey}`;\n}\n\nexport function getAlchemyWsUrl(network: Network, apiKey: string): string {\n return `wss://${network}.g.alchemy.com/v2/${apiKey}`;\n}\n\nexport function getAlchemyWebhookHttpUrl(): string {\n return 'https://dashboard.alchemy.com/api';\n}\n\nexport enum AlchemyApiType {\n BASE,\n NFT,\n WEBHOOK\n}\n\n/**\n * Mapping of network names to their corresponding Network strings used to\n * create an Ethers.js Provider instance.\n */\nexport const EthersNetwork = {\n [Network.ETH_MAINNET]: 'mainnet',\n [Network.ETH_ROPSTEN]: 'ropsten',\n [Network.ETH_GOERLI]: 'goerli',\n [Network.ETH_KOVAN]: 'kovan',\n [Network.ETH_RINKEBY]: 'rinkeby',\n [Network.OPT_MAINNET]: 'optimism',\n [Network.OPT_KOVAN]: 'optimism-kovan',\n [Network.OPT_GOERLI]: 'optimism-goerli',\n [Network.ARB_MAINNET]: 'arbitrum',\n [Network.ARB_RINKEBY]: 'arbitrum-rinkeby',\n [Network.ARB_GOERLI]: 'arbitrum-goerli',\n [Network.MATIC_MAINNET]: 'matic',\n [Network.MATIC_MUMBAI]: 'maticmum',\n [Network.ASTAR_MAINNET]: 'astar-mainnet'\n};\n\n/**\n * Mapping of network names to their corresponding Ethers Network objects. These\n * networks are not yet supported by Ethers and are listed here to be overriden\n * in the provider.\n */\nexport const CustomNetworks: { [key: string]: NetworkFromEthers } = {\n 'arbitrum-goerli': {\n chainId: 421613,\n name: 'arbitrum-goerli'\n },\n 'astar-mainnet': {\n chainId: 592,\n name: 'astar-mainnet'\n }\n};\n\nexport function noop(): void {\n // It's a no-op\n}\n\nexport const ETH_NULL_VALUE = '0x';\n","import { AlchemySettings, Network } from '../types/types';\nimport {\n AlchemyApiType,\n DEFAULT_ALCHEMY_API_KEY,\n DEFAULT_MAX_RETRIES,\n DEFAULT_NETWORK,\n getAlchemyHttpUrl,\n getAlchemyNftHttpUrl,\n getAlchemyWebhookHttpUrl\n} from '../util/const';\nimport type { AlchemyProvider } from './alchemy-provider';\nimport type { AlchemyWebSocketProvider } from './alchemy-websocket-provider';\n\n/**\n * This class holds the config information for the SDK client instance and\n * exposes the underlying providers for more advanced use cases.\n *\n * @public\n */\nexport class AlchemyConfig {\n /** The Alchemy API key. */\n readonly apiKey: string;\n\n /** The Network that this SDK is associated with. */\n readonly network: Network;\n\n /** The maximum number of retries to perform. */\n readonly maxRetries: number;\n\n /** Setting to enable automatic batching on json-rpc requests. Defaults to false.*/\n readonly batchRequests: boolean;\n\n /**\n * The optional hardcoded URL to send requests to instead of using the network\n * and apiKey.\n */\n readonly url?: string;\n\n /** The optional Alchemy auth token to use when sending requests with the Notify API. */\n readonly authToken?: string;\n\n /**\n * Dynamically imported provider instance.\n *\n * @internal\n */\n private _baseAlchemyProvider: Promise | undefined;\n\n /**\n * Dynamically imported provider instance.\n *\n * @internal\n */\n private _baseAlchemyWssProvider:\n | Promise\n | undefined;\n\n constructor(config?: AlchemySettings) {\n this.apiKey = config?.apiKey || DEFAULT_ALCHEMY_API_KEY;\n this.network = config?.network || DEFAULT_NETWORK;\n this.maxRetries = config?.maxRetries || DEFAULT_MAX_RETRIES;\n this.url = config?.url;\n this.authToken = config?.authToken;\n this.batchRequests = config?.batchRequests || false;\n }\n\n /**\n * Returns the URL endpoint to send the HTTP request to. If a custom URL was\n * provided in the config, that URL is returned. Otherwise, the default URL is\n * from the network and API key.\n *\n * @param apiType - The type of API to get the URL for.\n * @internal\n */\n _getRequestUrl(apiType: AlchemyApiType): string {\n if (this.url !== undefined) {\n return this.url;\n } else if (apiType === AlchemyApiType.NFT) {\n return getAlchemyNftHttpUrl(this.network, this.apiKey);\n } else if (apiType === AlchemyApiType.WEBHOOK) {\n return getAlchemyWebhookHttpUrl();\n } else {\n return getAlchemyHttpUrl(this.network, this.apiKey);\n }\n }\n\n /**\n * Returns an AlchemyProvider instance. Only one provider is created per\n * Alchemy instance.\n *\n * The AlchemyProvider is a wrapper around ether's `AlchemyProvider` class and\n * has been expanded to support Alchemy's Enhanced APIs.\n *\n * Most common methods on the provider are available as top-level methods on\n * the {@link Alchemy} instance, but the provider is exposed here to access\n * other less-common methods.\n *\n * @public\n */\n getProvider(): Promise {\n if (!this._baseAlchemyProvider) {\n this._baseAlchemyProvider = (async () => {\n const { AlchemyProvider } = await import('./alchemy-provider');\n return new AlchemyProvider(this);\n })();\n }\n return this._baseAlchemyProvider;\n }\n\n /**\n * Returns an AlchemyWebsocketProvider instance. Only one provider is created\n * per Alchemy instance.\n *\n * The AlchemyWebSocketProvider is a wrapper around ether's\n * `AlchemyWebSocketProvider` class and has been expanded to support Alchemy's\n * Subscription APIs, automatic backfilling, and other performance improvements.\n *\n * Most common methods on the provider are available as top-level methods on\n * the {@link Alchemy} instance, but the provider is exposed here to access\n * other less-common methods.\n */\n getWebSocketProvider(): Promise {\n if (!this._baseAlchemyWssProvider) {\n this._baseAlchemyWssProvider = (async () => {\n const { AlchemyWebSocketProvider } = await import(\n './alchemy-websocket-provider'\n );\n return new AlchemyWebSocketProvider(this);\n })();\n }\n return this._baseAlchemyWssProvider;\n }\n}\n","import { BigNumber } from '@ethersproject/bignumber';\n\n/**\n * Converts a hex string to a decimal number.\n *\n * @param hexString - The hex string to convert.\n * @public\n */\nexport function fromHex(hexString: string): number {\n return BigNumber.from(hexString).toNumber();\n}\n\n/**\n * Converts a number to a hex string.\n *\n * @param num - The number to convert to hex.\n * @public\n */\nexport function toHex(num: number): string {\n return BigNumber.from(num).toHexString();\n}\n\n/**\n * Checks if a value is a hex string.\n *\n * @param possibleHexString - The value to check.\n * @public\n */\nexport function isHex(possibleHexString: string): boolean {\n return /^0x[0-9a-fA-F]+$/.test(possibleHexString);\n}\n","import { BigNumber } from '@ethersproject/bignumber';\n\nimport { BaseNft, Nft, NftContract } from '../api/nft';\nimport { toHex } from '../api/util';\nimport {\n RawBaseNft,\n RawContractBaseNft,\n RawGetContractsForOwnerResponse,\n RawGetNftSalesResponse,\n RawNft,\n RawNftAttributeRarity,\n RawNftContract,\n RawOpenSeaCollectionMetadata,\n RawSpamInfo\n} from '../internal/raw-interfaces';\nimport {\n GetContractsForOwnerResponse,\n GetNftSalesResponse,\n NftAttributeRarity,\n NftSaleMarketplace,\n NftSaleTakerType,\n NftTokenType,\n OpenSeaCollectionMetadata,\n OpenSeaSafelistRequestStatus,\n SpamInfo,\n TokenUri\n} from '../types/types';\n\nexport function formatBlock(block: string | number): string {\n if (typeof block === 'string') {\n return block;\n } else if (Number.isInteger(block)) {\n return toHex(block);\n }\n return block.toString();\n}\n\nfunction stringToEnum(\n x: string,\n enumb: Record\n): T | undefined {\n return Object.values(enumb).includes(x as T) ? (x as T) : undefined;\n}\n\nexport function getNftContractFromRaw(\n rawNftContract: RawNftContract\n): NftContract {\n return {\n address: rawNftContract.address,\n name: rawNftContract.contractMetadata.name,\n symbol: rawNftContract.contractMetadata.symbol,\n totalSupply: rawNftContract.contractMetadata.totalSupply,\n tokenType: parseNftTokenType(rawNftContract.contractMetadata.tokenType),\n openSea: parseOpenSeaMetadata(rawNftContract.contractMetadata.openSea)\n };\n}\n\nexport function getBaseNftFromRaw(rawBaseNft: RawBaseNft): BaseNft;\nexport function getBaseNftFromRaw(\n rawContractBaseNft: RawContractBaseNft,\n contractAddress: string\n): BaseNft;\nexport function getBaseNftFromRaw(\n rawBaseNft: RawBaseNft | RawContractBaseNft,\n contractAddress?: string\n): BaseNft {\n return {\n contract: contractAddress\n ? { address: contractAddress }\n : (rawBaseNft as RawBaseNft).contract,\n tokenId: BigNumber.from(rawBaseNft.id.tokenId).toString(),\n tokenType: parseNftTokenType(rawBaseNft.id.tokenMetadata?.tokenType)\n };\n}\n\nexport function getNftFromRaw(rawNft: RawNft): Nft {\n try {\n const tokenType = parseNftTokenType(rawNft.id.tokenMetadata?.tokenType);\n const spamInfo = parseSpamInfo(rawNft.spamInfo);\n\n return {\n contract: {\n address: rawNft.contract.address,\n name: rawNft.contractMetadata?.name,\n symbol: rawNft.contractMetadata?.symbol,\n totalSupply: rawNft.contractMetadata?.totalSupply,\n tokenType,\n openSea: parseOpenSeaMetadata(rawNft.contractMetadata?.openSea)\n },\n tokenId: parseNftTokenId(rawNft.id.tokenId),\n tokenType,\n title: rawNft.title,\n description: parseNftDescription(rawNft.description),\n timeLastUpdated: rawNft.timeLastUpdated,\n metadataError: rawNft.error,\n rawMetadata: rawNft.metadata,\n tokenUri: parseNftTokenUri(rawNft.tokenUri),\n media: parseNftTokenUriArray(rawNft.media),\n spamInfo\n };\n } catch (e) {\n throw new Error('Error parsing the NFT response: ' + e);\n }\n}\n\nexport function getNftSalesFromRaw(\n rawNftSales: RawGetNftSalesResponse\n): GetNftSalesResponse {\n return {\n pageKey: rawNftSales?.pageKey,\n nftSales: rawNftSales.nftSales.map(rawNftSale => ({\n marketplace: parseNftSaleMarketplace(rawNftSale.marketplace),\n contractAddress: rawNftSale.contractAddress,\n tokenId: rawNftSale.tokenId,\n quantity: rawNftSale.quantity,\n buyerAddress: rawNftSale.buyerAddress,\n sellerAddress: rawNftSale.sellerAddress,\n taker: parseNftTaker(rawNftSale.taker),\n sellerFee: rawNftSale?.sellerFee,\n marketplaceFee: rawNftSale?.marketplaceFee,\n royaltyFee: rawNftSale?.royaltyFee,\n blockNumber: rawNftSale?.blockNumber,\n logIndex: rawNftSale.logIndex,\n bundleIndex: rawNftSale.bundleIndex,\n transactionHash: rawNftSale.transactionHash\n }))\n };\n}\n\nfunction parseNftSaleMarketplace(marketplace: string): NftSaleMarketplace {\n switch (marketplace) {\n case 'looksrare':\n return NftSaleMarketplace.LOOKSRARE;\n case 'seaport':\n return NftSaleMarketplace.SEAPORT;\n case 'x2y2':\n return NftSaleMarketplace.X2Y2;\n default:\n return NftSaleMarketplace.UNKNOWN;\n }\n}\n\nfunction parseNftTaker(taker: string): NftSaleTakerType {\n // The `.toLowerCase()` call is needed because the API returns the capitalized values\n switch (taker.toLowerCase()) {\n case 'buyer':\n return NftSaleTakerType.BUYER;\n case 'seller':\n return NftSaleTakerType.SELLER;\n default:\n throw new Error(`Unsupported NftSaleTakerType ${taker}`);\n }\n}\n\nexport function getNftRarityFromRaw(\n rawNftRarity: RawNftAttributeRarity[]\n): NftAttributeRarity[] {\n return rawNftRarity.map(({ prevalence, trait_type, value }) => ({\n prevalence,\n traitType: trait_type,\n value\n }));\n}\n\nexport function getContractsForOwnerFromRaw(\n rawContractsForOwner: RawGetContractsForOwnerResponse\n): GetContractsForOwnerResponse {\n return {\n pageKey: rawContractsForOwner?.pageKey,\n totalCount: rawContractsForOwner.totalCount,\n contracts: rawContractsForOwner.contracts.map(contract => {\n return {\n address: contract.address,\n totalSupply: contract.totalSupply,\n isSpam: contract.isSpam,\n media: contract.media,\n numDistinctTokensOwned: contract.numDistinctTokensOwned,\n tokenId: contract.tokenId,\n totalBalance: contract.totalBalance,\n name: contract.name,\n openSea: parseOpenSeaMetadata(contract?.opensea),\n symbol: contract?.symbol,\n tokenType: parseNftTokenType(contract?.tokenType)\n };\n })\n };\n}\n\nfunction parseNftTokenId(tokenId: string): string {\n // We have to normalize the token id here since the backend sometimes\n // returns the token ID as a hex string and sometimes as an integer.\n return BigNumber.from(tokenId).toString();\n}\n\nfunction parseNftTokenType(tokenType: string | undefined): NftTokenType {\n switch (tokenType) {\n case 'erc721':\n case 'ERC721':\n return NftTokenType.ERC721;\n case 'erc1155':\n case 'ERC1155':\n return NftTokenType.ERC1155;\n default:\n return NftTokenType.UNKNOWN;\n }\n}\n\nfunction parseSpamInfo(\n spamInfo: RawSpamInfo | undefined\n): SpamInfo | undefined {\n if (!spamInfo) {\n return undefined;\n }\n const { isSpam, classifications } = spamInfo;\n return {\n isSpam: isSpam === 'true',\n classifications\n };\n}\n\nfunction parseNftDescription(description?: string | string[]): string {\n if (description === undefined) {\n return '';\n }\n\n // TODO: Remove after backend adds JSON stringification.\n if (!Array.isArray(description) && typeof description === 'object') {\n return JSON.stringify(description);\n }\n\n return typeof description === 'string' ? description : description.join(' ');\n}\n\nfunction parseNftTokenUri(uri: TokenUri | undefined): TokenUri | undefined {\n if (uri && uri.raw.length === 0 && uri.gateway.length == 0) {\n return undefined;\n }\n return uri;\n}\n\nfunction parseNftTokenUriArray(arr: TokenUri[] | undefined): TokenUri[] {\n if (arr === undefined) {\n return [];\n }\n return arr.filter(uri => parseNftTokenUri(uri) !== undefined);\n}\n\nexport function parseOpenSeaMetadata(\n openSea: RawOpenSeaCollectionMetadata | undefined\n): OpenSeaCollectionMetadata | undefined {\n if (openSea === undefined) {\n return undefined;\n }\n return {\n floorPrice: openSea.floorPrice,\n collectionName: openSea.collectionName,\n safelistRequestStatus:\n openSea.safelistRequestStatus !== undefined\n ? stringToEnum(\n openSea.safelistRequestStatus,\n OpenSeaSafelistRequestStatus\n )\n : undefined,\n imageUrl: openSea.imageUrl,\n description: openSea.description,\n externalUrl: openSea.externalUrl,\n twitterUsername: openSea.twitterUsername,\n discordUrl: openSea.discordUrl,\n lastIngestedAt: openSea.lastIngestedAt\n };\n}\n\nexport const IS_BROWSER = typeof window !== 'undefined' && window !== null;\n","import type {\n Block,\n BlockTag,\n BlockWithTransactions,\n FeeData,\n Filter,\n FilterByBlockHash,\n Log,\n TransactionReceipt,\n TransactionRequest,\n TransactionResponse\n} from '@ethersproject/abstract-provider';\nimport type { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport type { Network as EthersNetworkAlias } from '@ethersproject/networks/lib/types';\nimport type { Deferrable } from '@ethersproject/properties';\n\nimport {\n AssetTransfersParams,\n AssetTransfersResponse,\n AssetTransfersWithMetadataParams,\n AssetTransfersWithMetadataResponse,\n DeployResult,\n TokenBalanceType,\n TokenBalancesOptionsDefaultTokens,\n TokenBalancesOptionsErc20,\n TokenBalancesResponse,\n TokenBalancesResponseErc20,\n TokenMetadataResponse,\n TransactionReceiptsParams,\n TransactionReceiptsResponse\n} from '../types/types';\nimport { ETH_NULL_VALUE } from '../util/const';\nimport { formatBlock } from '../util/util';\nimport { AlchemyConfig } from './alchemy-config';\nimport { toHex } from './util';\n\n/**\n * The core namespace contains all commonly-used [Ethers.js\n * Provider](https://docs.ethers.io/v5/api/providers/api-providers/#AlchemyProvider)\n * methods. If you are already using Ethers.js, you should be simply able to\n * replace the Ethers.js Provider object with `alchemy.core` when accessing\n * provider methods and it should just work.\n *\n * Do not call this constructor directly. Instead, instantiate an Alchemy object\n * with `const alchemy = new Alchemy(config)` and then access the core namespace\n * via `alchemy.core`.\n */\nexport class CoreNamespace {\n /** @internal */\n constructor(private readonly config: AlchemyConfig) {}\n\n /**\n * Returns the balance of a given address as of the provided block.\n *\n * @param addressOrName The address or name of the account to get the balance for.\n * @param blockTag The optional block number or hash to get the balance for.\n * Defaults to 'latest' if unspecified.\n * @public\n */\n async getBalance(\n addressOrName: string | Promise,\n blockTag?: BlockTag | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.getBalance(addressOrName, blockTag);\n }\n\n /**\n * Returns the contract code of the provided address at the block. If there is\n * no contract deployed, the result is `0x`.\n *\n * @param addressOrName The address or name of the account to get the code for.\n * @param blockTag The optional block number or hash to get the code for.\n * Defaults to 'latest' if unspecified.\n * @public\n */\n async getCode(\n addressOrName: string | Promise,\n blockTag?: BlockTag | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.getCode(addressOrName, blockTag);\n }\n\n /**\n * Return the value of the provided position at the provided address, at the\n * provided block in `Bytes32` format.\n *\n * @param addressOrName The address or name of the account to get the code for.\n * @param position The position of the storage slot to get.\n * @param blockTag The optional block number or hash to get the code for.\n * Defaults to 'latest' if unspecified.\n * @public\n */\n async getStorageAt(\n addressOrName: string | Promise,\n position: BigNumberish | Promise,\n blockTag?: BlockTag | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.getStorageAt(addressOrName, position, blockTag);\n }\n\n /**\n * Returns the number of transactions ever sent from the provided address, as\n * of the provided block tag. This value is used as the nonce for the next\n * transaction from the address sent to the network.\n *\n * @param addressOrName The address or name of the account to get the nonce for.\n * @param blockTag The optional block number or hash to get the nonce for.\n * @public\n */\n async getTransactionCount(\n addressOrName: string | Promise,\n blockTag?: BlockTag | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.getTransactionCount(addressOrName, blockTag);\n }\n\n /**\n * Returns the block from the network based on the provided block number or\n * hash. Transactions on the block are represented as an array of transaction\n * hashes. To get the full transaction details on the block, use\n * {@link getBlockWithTransactions} instead.\n *\n * @param blockHashOrBlockTag The block number or hash to get the block for.\n * @public\n */\n async getBlock(\n blockHashOrBlockTag: BlockTag | string | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.getBlock(blockHashOrBlockTag);\n }\n\n /**\n * Returns the block from the network based on the provided block number or\n * hash. Transactions on the block are represented as an array of\n * {@link TransactionResponse} objects.\n *\n * @param blockHashOrBlockTag The block number or hash to get the block for.\n * @public\n */\n async getBlockWithTransactions(\n blockHashOrBlockTag: BlockTag | string | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.getBlockWithTransactions(blockHashOrBlockTag);\n }\n\n /**\n * Returns the {@link EthersNetworkAlias} Alchemy is connected to.\n *\n * @public\n */\n async getNetwork(): Promise {\n const provider = await this.config.getProvider();\n return provider.getNetwork();\n }\n\n /**\n * Returns the block number of the most recently mined block.\n *\n * @public\n */\n async getBlockNumber(): Promise {\n const provider = await this.config.getProvider();\n return provider.getBlockNumber();\n }\n\n /**\n * Returns the best guess of the current gas price to use in a transaction.\n *\n * @public\n */\n async getGasPrice(): Promise {\n const provider = await this.config.getProvider();\n return provider.getGasPrice();\n }\n\n /**\n * Returns the recommended fee data to use in a transaction.\n *\n * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas\n * should be used.\n *\n * For legacy transactions and networks which do not support EIP-1559, the\n * gasPrice should be used.\n *\n * @public\n */\n async getFeeData(): Promise {\n const provider = await this.config.getProvider();\n return provider.getFeeData();\n }\n\n /**\n * Returns a Promise which will stall until the network has heen established,\n * ignoring errors due to the target node not being active yet.\n *\n * This can be used for testing or attaching scripts to wait until the node is\n * up and running smoothly.\n *\n * @public\n */\n async ready(): Promise {\n const provider = await this.config.getProvider();\n return provider.ready;\n }\n\n /**\n * Returns the result of executing the transaction, using call. A call does\n * not require any ether, but cannot change any state. This is useful for\n * calling getters on Contracts.\n *\n * @param transaction The transaction to execute.\n * @param blockTag The optional block number or hash to get the call for.\n * @public\n */\n async call(\n transaction: Deferrable,\n blockTag?: BlockTag | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.call(transaction, blockTag);\n }\n\n /**\n * Returns an estimate of the amount of gas that would be required to submit\n * transaction to the network.\n *\n * An estimate may not be accurate since there could be another transaction on\n * the network that was not accounted for, but after being mined affects the\n * relevant state.\n *\n * This is an alias for {@link TransactNamespace.estimateGas}.\n *\n * @param transaction The transaction to estimate gas for.\n * @public\n */\n async estimateGas(\n transaction: Deferrable\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.estimateGas(transaction);\n }\n\n /**\n * Returns the transaction with hash or null if the transaction is unknown.\n *\n * If a transaction has not been mined, this method will search the\n * transaction pool. Various backends may have more restrictive transaction\n * pool access (e.g. if the gas price is too low or the transaction was only\n * recently sent and not yet indexed) in which case this method may also return null.\n *\n * NOTE: This is an alias for {@link TransactNamespace.getTransaction}.\n *\n * @param transactionHash The hash of the transaction to get.\n * @public\n */\n async getTransaction(\n transactionHash: string | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.getTransaction(transactionHash);\n }\n\n /**\n * Returns the transaction receipt for hash or null if the transaction has not\n * been mined.\n *\n * To stall until the transaction has been mined, consider the\n * waitForTransaction method below.\n *\n * @param transactionHash The hash of the transaction to get.\n * @public\n */\n async getTransactionReceipt(\n transactionHash: string | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.getTransactionReceipt(transactionHash);\n }\n\n /**\n * Submits transaction to the network to be mined. The transaction must be\n * signed, and be valid (i.e. the nonce is correct and the account has\n * sufficient balance to pay for the transaction).\n *\n * NOTE: This is an alias for {@link TransactNamespace.getTransaction}.\n *\n * @param signedTransaction The signed transaction to send.\n * @public\n */\n async sendTransaction(\n signedTransaction: string | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.sendTransaction(signedTransaction);\n }\n\n /**\n * Returns a promise which will not resolve until specified transaction hash is mined.\n *\n * If {@link confirmations} is 0, this method is non-blocking and if the\n * transaction has not been mined returns null. Otherwise, this method will\n * block until the transaction has confirmed blocks mined on top of the block\n * in which it was mined.\n *\n * NOTE: This is an alias for {@link TransactNamespace.getTransaction}.\n *\n * @param transactionHash The hash of the transaction to wait for.\n * @param confirmations The number of blocks to wait for.\n * @param timeout The maximum time to wait for the transaction to confirm.\n * @public\n */\n async waitForTransaction(\n transactionHash: string,\n confirmations?: number,\n timeout?: number\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.waitForTransaction(transactionHash, confirmations, timeout);\n }\n\n /**\n * Returns an array of logs that match the provided filter.\n *\n * @param filter The filter object to use.\n * @public\n */\n async getLogs(\n filter: Filter | FilterByBlockHash | Promise\n ): Promise> {\n const provider = await this.config.getProvider();\n return provider.getLogs(filter);\n }\n\n /**\n * Allows sending a raw message to the Alchemy backend.\n *\n * @param method The method to call.\n * @param params The parameters to pass to the method.\n * @public\n */\n async send(method: string, params: Array): Promise {\n const provider = await this.config.getProvider();\n return provider.send(method, params);\n }\n\n /**\n * Finds the address that deployed the provided contract and block number it\n * was deployed in.\n *\n * NOTE: This method performs a binary search across all blocks since genesis\n * and can take a long time to complete. This method is a convenience method\n * that will eventually be replaced by a single call to an Alchemy endpoint\n * with this information cached.\n *\n * @param contractAddress - The contract address to find the deployer for.\n * @beta\n */\n async findContractDeployer(contractAddress: string): Promise {\n const provider = await this.config.getProvider();\n const currentBlockNum = await provider.getBlockNumber();\n if (\n (await provider.getCode(contractAddress, currentBlockNum)) ===\n ETH_NULL_VALUE\n ) {\n throw new Error(`Contract '${contractAddress}' does not exist`);\n }\n\n // Binary search for the block number that the contract was deployed in.\n const firstBlock = await binarySearchFirstBlock(\n 0,\n currentBlockNum + 1,\n contractAddress,\n this.config\n );\n\n // Find the first transaction in the block that matches the provided address.\n const txReceipts = await this.getTransactionReceipts({\n blockNumber: toHex(firstBlock)\n });\n const matchingReceipt = txReceipts.receipts?.find(\n receipt => receipt.contractAddress === contractAddress.toLowerCase()\n );\n return {\n deployerAddress: matchingReceipt?.from,\n blockNumber: firstBlock\n };\n }\n\n /**\n * Returns the ERC-20 token balances for a specific owner address.\n *\n * @param addressOrName The owner address to get the token balances for.\n * @public\n */\n async getTokenBalances(\n addressOrName: string\n ): Promise;\n\n /**\n * Returns the token balances for a specific owner address given a list of contracts.\n *\n * @param addressOrName The owner address to get the token balances for.\n * @param contractAddresses A list of contract addresses to check. If omitted,\n * all ERC-20 tokens will be checked.\n * @public\n */\n async getTokenBalances(\n addressOrName: string,\n contractAddresses?: string[]\n ): Promise;\n\n /**\n * Returns the ERC-20 token balances for a specific owner.\n *\n * This overload covers the erc-20 token type which includes a page key in the response.\n *\n * @param addressOrName The owner address to get the token balances for.\n * @param options Token type options set to ERC-20 with optional page key.\n * @public\n */\n async getTokenBalances(\n addressOrName: string,\n options: TokenBalancesOptionsErc20\n ): Promise;\n\n /**\n * Returns the token balances for a specific owner, fetching from the top 100\n * tokens by 24 hour volume.\n *\n * This overload covers the default token type which includes a page key in\n * the response.\n *\n * @param addressOrName The owner address to get the token balances for.\n * @param options Token type options set to ERC-20 with optional page key.\n * @public\n */\n async getTokenBalances(\n addressOrName: string,\n options: TokenBalancesOptionsDefaultTokens\n ): Promise;\n async getTokenBalances(\n addressOrName: string,\n contractAddressesOrOptions?:\n | string[]\n | TokenBalancesOptionsDefaultTokens\n | TokenBalancesOptionsErc20\n ) {\n const provider = await this.config.getProvider();\n const address = await provider._getAddress(addressOrName);\n if (Array.isArray(contractAddressesOrOptions)) {\n if (contractAddressesOrOptions.length > 1500) {\n throw new Error(\n 'You cannot pass in more than 1500 contract addresses to getTokenBalances()'\n );\n }\n if (contractAddressesOrOptions.length === 0) {\n throw new Error(\n 'getTokenBalances() requires at least one contractAddress when using an array'\n );\n }\n return provider._send(\n 'alchemy_getTokenBalances',\n [address, contractAddressesOrOptions],\n 'getTokenBalances'\n );\n } else {\n const tokenType =\n contractAddressesOrOptions === undefined\n ? TokenBalanceType.ERC20\n : contractAddressesOrOptions.type;\n const params: Array = [address, tokenType];\n if (\n contractAddressesOrOptions?.type === TokenBalanceType.ERC20 &&\n contractAddressesOrOptions.pageKey\n ) {\n params.push({ pageKey: contractAddressesOrOptions.pageKey });\n }\n return provider._send(\n 'alchemy_getTokenBalances',\n params,\n 'getTokenBalances'\n );\n }\n }\n\n /**\n * Returns metadata for a given token contract address.\n *\n * @param address The contract address to get metadata for.\n * @public\n */\n async getTokenMetadata(address: string): Promise {\n const provider = await this.config.getProvider();\n return provider._send(\n 'alchemy_getTokenMetadata',\n [address],\n 'getTokenMetadata'\n );\n }\n\n /**\n * Get transactions for specific addresses. See the web documentation for the\n * full details:\n * https://docs.alchemy.com/alchemy/enhanced-apis/transfers-api#alchemy_getassettransfers\n *\n * This overload requires {@link AssetTransfersWithMetadataParams.withMetadata}\n * to be set to `true`, which results in additional metadata returned in the\n * response object.\n *\n * @param params An object containing fields for the asset transfer query\n * @public\n */\n async getAssetTransfers(\n params: AssetTransfersWithMetadataParams\n ): Promise;\n\n /**\n * Get transactions for specific addresses. See the web documentation for the\n * full details:\n * https://docs.alchemy.com/alchemy/enhanced-apis/transfers-api#alchemy_getassettransfers\n *\n * @param params An object containing fields for the asset transfer query.\n * @public\n */\n async getAssetTransfers(\n params: AssetTransfersParams\n ): Promise;\n async getAssetTransfers(\n params: AssetTransfersWithMetadataParams | AssetTransfersParams\n ): Promise {\n const provider = await this.config.getProvider();\n if (params.fromAddress) {\n params.fromAddress = await provider._getAddress(params.fromAddress);\n }\n if (params.toAddress) {\n params.toAddress = await provider._getAddress(params.toAddress);\n }\n return provider._send(\n 'alchemy_getAssetTransfers',\n [\n {\n ...params,\n fromBlock:\n params.fromBlock != null\n ? formatBlock(params.fromBlock)\n : undefined,\n toBlock:\n params.toBlock != null ? formatBlock(params.toBlock) : undefined,\n maxCount: params.maxCount != null ? toHex(params.maxCount) : undefined\n }\n ],\n 'getAssetTransfers'\n );\n }\n\n /**\n * Gets all transaction receipts for a given block by number or block hash.\n *\n * @param params An object containing fields for the transaction receipt query.\n * @public\n */\n async getTransactionReceipts(\n params: TransactionReceiptsParams\n ): Promise {\n const provider = await this.config.getProvider();\n return provider._send(\n 'alchemy_getTransactionReceipts',\n [params],\n 'getTransactionReceipts'\n );\n }\n\n /**\n * Returns the underlying owner address for the provided ENS address, or `null`\n * if the ENS name does not have an underlying address.\n *\n * @param name The ENS address name to resolve.\n */\n async resolveName(name: string): Promise {\n const provider = await this.config.getProvider();\n return provider.resolveName(name);\n }\n\n /**\n * Performs a reverse lookup of the address in ENS using the Reverse Registrar. If the name does not exist, or the forward lookup does not match, null is returned.\n *\n * An ENS name requires additional configuration to setup a reverse record, so not all ENS addresses will map back to the original ENS domain.\n *\n * @param address The address to look up the ENS domain name for.\n */\n async lookupAddress(address: string): Promise {\n const provider = await this.config.getProvider();\n return provider.lookupAddress(address);\n }\n}\n\n/**\n * Perform a binary search between an integer range of block numbers to find the\n * block number where the contract was deployed.\n *\n * @internal\n */\nasync function binarySearchFirstBlock(\n start: number,\n end: number,\n address: string,\n config: AlchemyConfig\n): Promise {\n if (start >= end) {\n return end;\n }\n\n const mid = Math.floor((start + end) / 2);\n const provider = await config.getProvider();\n const code = await provider.getCode(address, mid);\n if (code === ETH_NULL_VALUE) {\n return binarySearchFirstBlock(mid + 1, end, address, config);\n }\n return binarySearchFirstBlock(start, mid, address, config);\n}\n","/**\n * The SDK has 4 log levels and a 5th option for disabling all logging. By\n * default, the log level is set to INFO.\n *\n * The order is a follows: DEBUG < INFO < WARN < ERROR\n *\n * All log types above the current log level will be outputted.\n */\nexport enum LogLevel {\n DEBUG,\n INFO,\n WARN,\n ERROR,\n SILENT\n}\n\n/**\n * The level of verbosity for the logger.\n *\n * @public\n */\nexport type LogLevelString = 'debug' | 'info' | 'warn' | 'error' | 'silent';\n\nconst logLevelStringToEnum: { [key in LogLevelString]: LogLevel } = {\n debug: LogLevel.DEBUG,\n info: LogLevel.INFO,\n warn: LogLevel.WARN,\n error: LogLevel.ERROR,\n silent: LogLevel.SILENT\n};\n\n// HACKY: Use the console method as a string rather than the function itself\n// in order to allow for mocking in tests.\nconst logLevelToConsoleFn = {\n [LogLevel.DEBUG]: 'log',\n [LogLevel.INFO]: 'info',\n [LogLevel.WARN]: 'warn',\n [LogLevel.ERROR]: 'error'\n};\n\nconst DEFAULT_LOG_LEVEL = LogLevel.INFO;\n\n/**\n * Configures the verbosity of logging. The default log level is `info`.\n *\n * @param logLevel - The verbosity of logging. Can be any of the following values:\n *\n * - `debug`: The most verbose logging level.\n * - `info`: The default logging level.\n * - `warn`: A logging level for non-critical issues.\n * - `error`: A logging level for critical issues.\n * - `silent`: Turn off all logging.\n *\n * @public\n */\nexport function setLogLevel(logLevel: LogLevelString): void {\n loggerClient.logLevel = logLevelStringToEnum[logLevel];\n}\n\nexport function logDebug(message: string, ...args: unknown[]): void {\n loggerClient.debug(message, args);\n}\n\nexport function logInfo(message: string, ...args: unknown[]): void {\n loggerClient.info(message, args);\n}\n\nexport function logWarn(message: string, ...args: unknown[]): void {\n loggerClient.warn(message, args);\n}\n\nexport function logError(message: string, ...args: unknown[]): void {\n loggerClient.error(message, args);\n}\n\nexport class Logger {\n /** The log level of the given Logger instance. */\n private _logLevel = DEFAULT_LOG_LEVEL;\n\n constructor() {}\n\n get logLevel(): LogLevel {\n return this._logLevel;\n }\n\n set logLevel(val: LogLevel) {\n if (!(val in LogLevel)) {\n throw new TypeError(`Invalid value \"${val}\" assigned to \\`logLevel\\``);\n }\n this._logLevel = val;\n }\n\n debug(...args: unknown[]): void {\n this._log(LogLevel.DEBUG, ...args);\n }\n\n info(...args: unknown[]): void {\n this._log(LogLevel.INFO, ...args);\n }\n\n warn(...args: unknown[]): void {\n this._log(LogLevel.WARN, ...args);\n }\n\n error(...args: unknown[]): void {\n this._log(LogLevel.ERROR, ...args);\n }\n\n /**\n * Forwards log messages to their corresponding console counterparts if the\n * log level allows it.\n */\n private _log(logLevel: LogLevel, ...args: unknown[]): void {\n if (logLevel < this._logLevel) {\n return;\n }\n const now = new Date().toISOString();\n const method =\n logLevelToConsoleFn[logLevel as keyof typeof logLevelToConsoleFn];\n if (method) {\n console[method as 'log' | 'info' | 'warn' | 'error'](\n `[${now}] Alchemy:`,\n ...args.map(stringify)\n );\n } else {\n throw new Error(\n `Logger received an invalid logLevel (value: ${logLevel})`\n );\n }\n }\n}\n\nfunction stringify(obj: unknown): string | unknown {\n if (typeof obj === 'string') {\n return obj;\n } else {\n try {\n return JSON.stringify(obj);\n } catch (e) {\n // Failed to convert to JSON, log the object directly.\n return obj;\n }\n }\n}\n\n// Instantiate default logger for the SDK.\nconst loggerClient: Logger = new Logger();\n","// This file is autogenerated by injectVersion.js. Any changes will be\n// overwritten on commit!\nexport const VERSION = '2.2.5';\n","/**\n * Given a REST endpoint, method, and params, sends the request with axios and\n * returns the response.\n */\nimport axios, { AxiosRequestConfig, AxiosResponse } from 'axios';\n\nimport { VERSION } from '../version';\nimport { IS_BROWSER } from './util';\n\n/**\n * Helper function to send http requests using Axis.\n *\n * @private\n */\nexport function sendAxiosRequest(\n baseUrl: string,\n restApiName: string,\n methodName: string,\n params: Req,\n overrides?: AxiosRequestConfig\n): Promise> {\n const requestUrl = baseUrl + '/' + restApiName;\n const config: AxiosRequestConfig = {\n ...overrides,\n headers: {\n ...overrides?.headers,\n ...(!IS_BROWSER && { 'Accept-Encoding': 'gzip' }),\n 'Alchemy-Ethers-Sdk-Version': VERSION,\n 'Alchemy-Ethers-Sdk-Method': methodName\n },\n method: overrides?.method ?? 'GET',\n url: requestUrl,\n params\n };\n return axios(config);\n}\n","import { logDebug } from '../util/logger';\n\nexport const DEFAULT_BACKOFF_INITIAL_DELAY_MS = 1000;\nexport const DEFAULT_BACKOFF_MULTIPLIER = 1.5;\nexport const DEFAULT_BACKOFF_MAX_DELAY_MS = 30 * 1000;\nexport const DEFAULT_BACKOFF_MAX_ATTEMPTS = 5;\n\n/**\n * Helper class for implementing exponential backoff and max retry attempts.\n *\n * @private\n * @internal\n */\nexport class ExponentialBackoff {\n private readonly initialDelayMs = DEFAULT_BACKOFF_INITIAL_DELAY_MS;\n private readonly backoffMultiplier = DEFAULT_BACKOFF_MULTIPLIER;\n private readonly maxDelayMs = DEFAULT_BACKOFF_MAX_DELAY_MS;\n\n private numAttempts = 0;\n private currentDelayMs = 0;\n private isInBackoff = false;\n\n constructor(private readonly maxAttempts = DEFAULT_BACKOFF_MAX_ATTEMPTS) {}\n\n /**\n * Returns a promise that resolves after the the backoff delay. The delay is\n * increased for each attempt. The promise is rejected if the maximum number\n * of attempts is exceeded.\n */\n // TODO: beautify this into an async iterator.\n backoff(): Promise {\n if (this.numAttempts >= this.maxAttempts) {\n return Promise.reject(\n new Error(`Exceeded maximum number of attempts: ${this.maxAttempts}`)\n );\n }\n if (this.isInBackoff) {\n return Promise.reject(\n new Error('A backoff operation is already in progress')\n );\n }\n\n const backoffDelayWithJitterMs = this.withJitterMs(this.currentDelayMs);\n if (backoffDelayWithJitterMs > 0) {\n logDebug(\n 'ExponentialBackoff.backoff',\n `Backing off for ${backoffDelayWithJitterMs}ms`\n );\n }\n\n // Calculate the next delay.\n this.currentDelayMs *= this.backoffMultiplier;\n this.currentDelayMs = Math.max(this.currentDelayMs, this.initialDelayMs);\n this.currentDelayMs = Math.min(this.currentDelayMs, this.maxDelayMs);\n this.numAttempts += 1;\n\n return new Promise(resolve => {\n this.isInBackoff = true;\n setTimeout(() => {\n this.isInBackoff = false;\n resolve();\n }, backoffDelayWithJitterMs);\n });\n }\n\n /**\n * Applies +/- 50% jitter to the backoff delay, up to the max delay cap.\n *\n * @private\n * @param delayMs\n */\n private withJitterMs(delayMs: number): number {\n return Math.min(delayMs + (Math.random() - 0.5) * delayMs, this.maxDelayMs);\n }\n}\n","import axios, { AxiosError, AxiosRequestConfig } from 'axios';\n\nimport { AlchemyConfig } from '../api/alchemy-config';\nimport { AlchemyApiType } from '../util/const';\nimport { logDebug, logInfo } from '../util/logger';\nimport { sendAxiosRequest } from '../util/sendRest';\nimport { ExponentialBackoff } from './backoff';\n\n/**\n * A wrapper function to make http requests and retry if the request fails.\n *\n * @internal\n */\n// TODO: Wrap Axios error in AlchemyError.\nexport async function requestHttpWithBackoff(\n config: AlchemyConfig,\n apiType: AlchemyApiType,\n restApiName: string,\n methodName: string,\n params: Req,\n overrides?: AxiosRequestConfig\n): Promise {\n let lastError: Error | undefined = undefined;\n const backoff = new ExponentialBackoff(config.maxRetries);\n for (let attempt = 0; attempt < config.maxRetries + 1; attempt++) {\n try {\n if (lastError !== undefined) {\n logInfo('requestHttp', `Retrying after error: ${lastError.message}`);\n }\n\n try {\n await backoff.backoff();\n } catch (err) {\n // Backoff errors when the maximum number of attempts is reached. Break\n // out of the loop to preserve the last error.\n break;\n }\n\n const response = await sendAxiosRequest(\n config._getRequestUrl(apiType),\n restApiName,\n methodName,\n params,\n overrides\n );\n\n if (response.status === 200) {\n logDebug(restApiName, `Successful request: ${restApiName}`);\n return response.data;\n } else {\n logInfo(\n restApiName,\n `Request failed: ${restApiName}, ${response.status}, ${response.data}`\n );\n lastError = new Error(response.status + ': ' + response.data);\n }\n } catch (err) {\n if (!axios.isAxiosError(err) || err.response === undefined) {\n throw err;\n }\n // TODO: Standardize all errors into AlchemyError\n lastError = new Error(err.response.status + ': ' + err.response.data);\n if (!isRetryableHttpError(err, apiType)) {\n break;\n }\n }\n }\n return Promise.reject(lastError);\n}\n\nfunction isRetryableHttpError(\n err: AxiosError,\n apiType: AlchemyApiType\n): boolean {\n // TODO: remove 500s after webhooks are more stable.\n const retryableCodes =\n apiType === AlchemyApiType.WEBHOOK ? [429, 500] : [429];\n return (\n err.response !== undefined && retryableCodes.includes(err.response.status)\n );\n}\n\n/**\n * Fetches all pages in a paginated endpoint, given a `pageKey` field that\n * represents the property name containing the next page token.\n *\n * @internal\n */\nexport async function* paginateEndpoint<\n ReqPageKey extends string,\n ResPageKey extends string,\n Req extends Partial & Record>,\n Res extends Partial & Record>\n>(\n config: AlchemyConfig,\n apiType: AlchemyApiType,\n restApiName: string,\n methodName: string,\n reqPageKey: ReqPageKey,\n resPageKey: ResPageKey,\n params: Req\n): AsyncIterable {\n let hasNext = true;\n const requestParams = { ...params };\n while (hasNext) {\n const response = await requestHttpWithBackoff(\n config,\n apiType,\n restApiName,\n methodName,\n requestParams\n );\n yield response;\n if (response[resPageKey] !== undefined) {\n requestParams[reqPageKey] = response[resPageKey] as any;\n } else {\n hasNext = false;\n }\n }\n}\n","import { BigNumber, BigNumberish } from '@ethersproject/bignumber';\n\nimport { AlchemyConfig } from '../api/alchemy-config';\nimport { BaseNft, Nft, NftContract } from '../api/nft';\nimport {\n GetBaseNftsForContractOptions,\n GetBaseNftsForOwnerOptions,\n GetContractsForOwnerOptions,\n GetContractsForOwnerResponse,\n GetFloorPriceResponse,\n GetNftSalesOptions,\n GetNftSalesOptionsByContractAddress,\n GetNftSalesResponse,\n GetNftsForContractOptions,\n GetNftsForOwnerOptions,\n GetOwnersForContractOptions,\n GetOwnersForContractResponse,\n GetOwnersForContractWithTokenBalancesOptions,\n GetOwnersForContractWithTokenBalancesResponse,\n GetOwnersForNftResponse,\n NftAttributeRarity,\n NftAttributesResponse,\n NftContractBaseNftsResponse,\n NftContractNftsResponse,\n NftFilters,\n NftMetadataBatchOptions,\n NftMetadataBatchToken,\n NftOrdering,\n NftSaleMarketplace,\n NftSaleTakerType,\n NftTokenType,\n OwnedBaseNft,\n OwnedBaseNftsResponse,\n OwnedNft,\n OwnedNftsResponse,\n RefreshContractResult,\n RefreshState,\n SortingOrder\n} from '../types/types';\nimport { AlchemyApiType } from '../util/const';\nimport {\n getBaseNftFromRaw,\n getContractsForOwnerFromRaw,\n getNftContractFromRaw,\n getNftFromRaw,\n getNftRarityFromRaw,\n getNftSalesFromRaw\n} from '../util/util';\nimport { paginateEndpoint, requestHttpWithBackoff } from './dispatch';\nimport {\n RawBaseNft,\n RawContractBaseNft,\n RawGetBaseNftsForContractResponse,\n RawGetBaseNftsResponse,\n RawGetContractsForOwnerResponse,\n RawGetNftSalesResponse,\n RawGetNftsForContractResponse,\n RawGetNftsResponse,\n RawGetOwnersForContractResponse,\n RawNft,\n RawNftAttributeRarity,\n RawNftContract,\n RawOwnedBaseNft,\n RawOwnedNft,\n RawReingestContractResponse\n} from './raw-interfaces';\n\nexport async function getNftMetadata(\n config: AlchemyConfig,\n contractAddress: string,\n tokenId: BigNumberish,\n tokenType?: NftTokenType,\n tokenUriTimeoutInMs?: number,\n srcMethod = 'getNftMetadata'\n): Promise {\n const response = await requestHttpWithBackoff(\n config,\n AlchemyApiType.NFT,\n 'getNFTMetadata',\n srcMethod,\n {\n contractAddress,\n tokenId: BigNumber.from(tokenId!).toString(),\n tokenType: tokenType !== NftTokenType.UNKNOWN ? tokenType : undefined,\n tokenUriTimeoutInMs\n }\n );\n return getNftFromRaw(response);\n}\n\nexport async function getNftMetadataBatch(\n config: AlchemyConfig,\n tokens: Array,\n options?: NftMetadataBatchOptions\n): Promise {\n const data = {\n tokens,\n tokenUriTimeoutInMs: options?.tokenUriTimeoutInMs,\n refreshCache: options?.refreshCache\n };\n const response = await requestHttpWithBackoff<{}, RawNft[]>(\n config,\n AlchemyApiType.NFT,\n 'getNFTMetadataBatch',\n 'getNftMetadataBatch',\n {},\n {\n method: 'POST',\n data\n }\n );\n return response.map(getNftFromRaw);\n}\n\nexport async function getContractMetadata(\n config: AlchemyConfig,\n contractAddress: string,\n srcMethod = 'getContractMetadata'\n): Promise {\n const response = await requestHttpWithBackoff<\n GetContractMetadataParams,\n RawNftContract\n >(config, AlchemyApiType.NFT, 'getContractMetadata', srcMethod, {\n contractAddress\n });\n\n return getNftContractFromRaw(response);\n}\n\nexport async function* getNftsForOwnerIterator(\n config: AlchemyConfig,\n owner: string,\n options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions,\n srcMethod = 'getNftsForOwnerIterator'\n): AsyncIterable {\n const withMetadata = omitMetadataToWithMetadata(options?.omitMetadata);\n for await (const response of paginateEndpoint(\n config,\n AlchemyApiType.NFT,\n 'getNFTs',\n srcMethod,\n 'pageKey',\n 'pageKey',\n {\n contractAddresses: options?.contractAddresses,\n pageKey: options?.pageKey,\n filters: options?.excludeFilters,\n owner,\n withMetadata\n }\n )) {\n for (const ownedNft of response.ownedNfts as\n | RawOwnedNft[]\n | RawOwnedBaseNft[]) {\n yield {\n ...nftFromGetNftResponse(ownedNft),\n balance: parseInt(ownedNft.balance)\n };\n }\n }\n}\n\nexport async function getNftsForOwner(\n config: AlchemyConfig,\n owner: string,\n options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions,\n srcMethod = 'getNftsForOwner'\n): Promise {\n const withMetadata = omitMetadataToWithMetadata(options?.omitMetadata);\n const response = await requestHttpWithBackoff<\n GetNftsAlchemyParams,\n RawGetBaseNftsResponse | RawGetNftsResponse\n >(config, AlchemyApiType.NFT, 'getNFTs', srcMethod, {\n contractAddresses: options?.contractAddresses,\n pageKey: options?.pageKey,\n filters: options?.excludeFilters,\n excludeFilters: options?.excludeFilters,\n includeFilters: options?.includeFilters,\n owner,\n pageSize: options?.pageSize,\n withMetadata,\n tokenUriTimeoutInMs: options?.tokenUriTimeoutInMs,\n orderBy: options?.orderBy\n });\n return {\n ownedNfts: response.ownedNfts.map(res => ({\n ...nftFromGetNftResponse(res),\n balance: parseInt(res.balance)\n })),\n pageKey: response.pageKey,\n totalCount: response.totalCount\n };\n}\n\nexport async function getNftsForContract(\n config: AlchemyConfig,\n contractAddress: string,\n options?: GetBaseNftsForContractOptions | GetNftsForContractOptions,\n srcMethod = 'getNftsForContract'\n): Promise {\n const withMetadata = omitMetadataToWithMetadata(options?.omitMetadata);\n const response = await requestHttpWithBackoff<\n GetNftsForContractAlchemyParams,\n RawGetBaseNftsForContractResponse | RawGetNftsForContractResponse\n >(config, AlchemyApiType.NFT, 'getNFTsForCollection', srcMethod, {\n contractAddress,\n startToken: options?.pageKey,\n withMetadata,\n limit: options?.pageSize ?? undefined,\n tokenUriTimeoutInMs: 50\n });\n\n return {\n nfts: response.nfts.map(res =>\n nftFromGetNftContractResponse(res, contractAddress)\n ),\n pageKey: response.nextToken\n };\n}\n\nexport async function* getNftsForContractIterator(\n config: AlchemyConfig,\n contractAddress: string,\n options?: GetBaseNftsForContractOptions | GetNftsForContractOptions,\n srcMethod = 'getNftsForContractIterator'\n): AsyncIterable {\n const withMetadata = omitMetadataToWithMetadata(options?.omitMetadata);\n for await (const response of paginateEndpoint(\n config,\n AlchemyApiType.NFT,\n 'getNFTsForCollection',\n srcMethod,\n 'startToken',\n 'nextToken',\n {\n contractAddress,\n startToken: options?.pageKey,\n withMetadata\n }\n )) {\n for (const nft of response.nfts as RawContractBaseNft[] | RawNft[]) {\n yield nftFromGetNftContractResponse(nft, contractAddress);\n }\n }\n}\n\nexport async function getOwnersForContract(\n config: AlchemyConfig,\n contractAddress: string,\n options?:\n | GetOwnersForContractWithTokenBalancesOptions\n | GetOwnersForContractOptions,\n srcMethod = 'getOwnersForContract'\n): Promise<\n GetOwnersForContractResponse | GetOwnersForContractWithTokenBalancesResponse\n> {\n // Cast to `any` to avoid more type wrangling.\n const response: any = await requestHttpWithBackoff<\n GetOwnersForNftContractAlchemyParams,\n RawGetOwnersForContractResponse\n >(config, AlchemyApiType.NFT, 'getOwnersForCollection', srcMethod, {\n ...options,\n contractAddress\n });\n\n return {\n owners: response.ownerAddresses,\n\n // Only include the pageKey in the final response if it's defined\n ...(response.pageKey !== undefined && { pageKey: response.pageKey })\n };\n}\n\nexport async function getContractsForOwner(\n config: AlchemyConfig,\n owner: string,\n options?: GetContractsForOwnerOptions,\n srcMethod = 'getContractsForOwner'\n): Promise {\n const response = await requestHttpWithBackoff<\n GetContractsForOwnerParams,\n RawGetContractsForOwnerResponse\n >(config, AlchemyApiType.NFT, 'getContractsForOwner', srcMethod, {\n owner,\n excludeFilters: options?.excludeFilters,\n includeFilters: options?.includeFilters,\n pageKey: options?.pageKey,\n orderBy: options?.orderBy\n });\n\n return getContractsForOwnerFromRaw(response);\n}\n\nexport async function getOwnersForNft(\n config: AlchemyConfig,\n contractAddress: string,\n tokenId: BigNumberish,\n srcMethod = 'getOwnersForNft'\n): Promise {\n return requestHttpWithBackoff(\n config,\n AlchemyApiType.NFT,\n 'getOwnersForToken',\n srcMethod,\n {\n contractAddress,\n tokenId: BigNumber.from(tokenId!).toString()\n }\n );\n}\n\nexport async function checkNftOwnership(\n config: AlchemyConfig,\n owner: string,\n contractAddresses: string[],\n srcMethod = 'checkNftOwnership'\n): Promise {\n if (contractAddresses.length === 0) {\n throw new Error('Must provide at least one contract address');\n }\n const response = await getNftsForOwner(\n config,\n owner,\n {\n contractAddresses,\n omitMetadata: true\n },\n srcMethod\n );\n return response.ownedNfts.length > 0;\n}\n\nexport async function verifyNftOwnership(\n config: AlchemyConfig,\n owner: string,\n contractAddresses: string | string[],\n srcMethod = 'verifyNftOwnership'\n): Promise {\n if (typeof contractAddresses === 'string') {\n const response = await getNftsForOwner(\n config,\n owner,\n {\n contractAddresses: [contractAddresses],\n omitMetadata: true\n },\n srcMethod\n );\n return response.ownedNfts.length > 0;\n } else {\n if (contractAddresses.length === 0) {\n throw new Error('Must provide at least one contract address');\n }\n const response = await getNftsForOwner(\n config,\n owner,\n {\n contractAddresses,\n omitMetadata: true\n },\n srcMethod\n );\n\n // Create map where all input contract addresses are set to false, then flip\n // owned nfts to true.\n const result = contractAddresses.reduce(\n (acc: { [contractAddress: string]: boolean }, curr) => {\n acc[curr] = false;\n return acc;\n },\n {}\n );\n for (const nft of response.ownedNfts) {\n result[nft.contract.address] = true;\n }\n return result;\n }\n}\n\nexport async function isSpamContract(\n config: AlchemyConfig,\n contractAddress: string,\n srcMethod = 'isSpamContract'\n): Promise {\n return requestHttpWithBackoff(\n config,\n AlchemyApiType.NFT,\n 'isSpamContract',\n srcMethod,\n {\n contractAddress\n }\n );\n}\n\nexport async function getSpamContracts(\n config: AlchemyConfig,\n srcMethod = 'getSpamContracts'\n): Promise {\n return requestHttpWithBackoff(\n config,\n AlchemyApiType.NFT,\n 'getSpamContracts',\n srcMethod,\n undefined\n );\n}\n\nexport async function getFloorPrice(\n config: AlchemyConfig,\n contractAddress: string,\n srcMethod = 'getFloorPrice'\n): Promise {\n return requestHttpWithBackoff(\n config,\n AlchemyApiType.NFT,\n 'getFloorPrice',\n srcMethod,\n {\n contractAddress\n }\n );\n}\n\nexport async function getNftSales(\n config: AlchemyConfig,\n options: GetNftSalesOptions | GetNftSalesOptionsByContractAddress = {},\n srcMethod = 'getNftSales'\n): Promise {\n // Avoid ts compiler complaining about the contractAddress field.\n const params: Partial = {\n ...options\n };\n\n const response = await requestHttpWithBackoff<\n GetNftSalesParams,\n RawGetNftSalesResponse\n >(config, AlchemyApiType.NFT, 'getNFTSales', srcMethod, {\n fromBlock: params?.fromBlock,\n toBlock: params?.toBlock,\n order: params?.order,\n marketplace: params?.marketplace,\n contractAddress: params?.contractAddress,\n tokenId: params?.tokenId\n ? BigNumber.from(params?.tokenId).toString()\n : undefined,\n sellerAddress: params?.sellerAddress,\n buyerAddress: params?.buyerAddress,\n taker: params?.taker,\n limit: params?.limit,\n pageKey: params?.pageKey\n });\n\n return getNftSalesFromRaw(response);\n}\n\nexport async function computeRarity(\n config: AlchemyConfig,\n contractAddress: string,\n tokenId: BigNumberish,\n srcMethod = 'computeRarity'\n): Promise {\n const response = await requestHttpWithBackoff<\n ComputeRarityParams,\n RawNftAttributeRarity[]\n >(config, AlchemyApiType.NFT, 'computeRarity', srcMethod, {\n contractAddress,\n tokenId: BigNumber.from(tokenId).toString()\n });\n\n return getNftRarityFromRaw(response);\n}\n\nexport async function searchContractMetadata(\n config: AlchemyConfig,\n query: string,\n srcMethod = 'searchContractMetadata'\n): Promise {\n const response = await requestHttpWithBackoff<\n SearchContractMetadataParams,\n RawNftContract[]\n >(config, AlchemyApiType.NFT, 'searchContractMetadata', srcMethod, {\n query\n });\n\n return response.map(getNftContractFromRaw);\n}\n\nexport async function summarizeNftAttributes(\n config: AlchemyConfig,\n contractAddress: string,\n srcMethod = 'summarizeNftAttributes'\n): Promise {\n return requestHttpWithBackoff<\n SummarizeNftAttributesParams,\n NftAttributesResponse\n >(config, AlchemyApiType.NFT, 'summarizeNftAttributes', srcMethod, {\n contractAddress\n });\n}\n\nexport async function refreshNftMetadata(\n config: AlchemyConfig,\n contractAddress: string,\n tokenId: BigNumberish,\n srcMethod = 'refreshNftMetadata'\n): Promise {\n const tokenIdString = BigNumber.from(tokenId!).toString();\n const first = await getNftMetadata(\n config,\n contractAddress,\n tokenIdString,\n undefined,\n undefined,\n srcMethod\n );\n const second = await refresh(\n config,\n contractAddress,\n tokenIdString,\n srcMethod\n );\n return first.timeLastUpdated !== second.timeLastUpdated;\n}\n\nexport async function refreshContract(\n config: AlchemyConfig,\n contractAddress: string,\n srcMethod = 'refreshContract'\n): Promise {\n const response = await requestHttpWithBackoff<\n ReingestContractParams,\n RawReingestContractResponse\n >(config, AlchemyApiType.NFT, 'reingestContract', srcMethod, {\n contractAddress\n });\n\n return {\n contractAddress: response.contractAddress,\n refreshState: parseReingestionState(response.reingestionState),\n progress: response.progress\n };\n}\n\nasync function refresh(\n config: AlchemyConfig,\n contractAddress: string,\n tokenId: BigNumberish,\n srcMethod: string\n): Promise {\n const response = await requestHttpWithBackoff(\n config,\n AlchemyApiType.NFT,\n 'getNFTMetadata',\n srcMethod,\n {\n contractAddress,\n tokenId: BigNumber.from(tokenId!).toString(),\n refreshCache: true\n }\n );\n return getNftFromRaw(response);\n}\n\n/**\n * Helper method to convert a NFT response received from Alchemy backend to an\n * SDK NFT type.\n *\n * @internal\n */\nfunction nftFromGetNftResponse(\n ownedNft: RawOwnedBaseNft | RawOwnedNft\n): Nft | BaseNft {\n if (isNftWithMetadata(ownedNft)) {\n return getNftFromRaw(ownedNft);\n } else {\n return getBaseNftFromRaw(ownedNft);\n }\n}\n\n/**\n * Helper method to convert a NFT response received from Alchemy backend to an\n * SDK NFT type.\n *\n * @internal\n */\nfunction nftFromGetNftContractResponse(\n ownedNft: RawContractBaseNft | RawNft,\n contractAddress: string\n): Nft | BaseNft {\n if (isNftWithMetadata(ownedNft)) {\n return getNftFromRaw(ownedNft);\n } else {\n return getBaseNftFromRaw(ownedNft, contractAddress);\n }\n}\n\n/** @internal */\n// TODO: more comprehensive type check\nfunction isNftWithMetadata(\n response: RawBaseNft | RawContractBaseNft | RawNft\n): response is RawNft {\n return (response as RawNft).title !== undefined;\n}\n\n/**\n * Flips the `omitMetadata` SDK parameter type to the `withMetadata` parameter\n * required by the Alchemy API. If `omitMetadata` is undefined, the SDK defaults\n * to including metadata.\n *\n * @internal\n */\nfunction omitMetadataToWithMetadata(\n omitMetadata: boolean | undefined\n): boolean {\n return omitMetadata === undefined ? true : !omitMetadata;\n}\n\nfunction parseReingestionState(reingestionState: string): RefreshState {\n switch (reingestionState) {\n case 'does_not_exist':\n return RefreshState.DOES_NOT_EXIST;\n case 'already_queued':\n return RefreshState.ALREADY_QUEUED;\n case 'in_progress':\n return RefreshState.IN_PROGRESS;\n case 'finished':\n return RefreshState.FINISHED;\n case 'queued':\n return RefreshState.QUEUED;\n case 'queue_failed':\n return RefreshState.QUEUE_FAILED;\n default:\n throw new Error('Unknown reingestion state: ' + reingestionState);\n }\n}\n\n/**\n * Interface for the `getNftsForNftContract` endpoint. The main difference is\n * that the endpoint has a `startToken` parameter, but the SDK standardizes all\n * pagination parameters to `pageKey`.\n *\n * @internal\n */\ninterface GetNftsForContractAlchemyParams {\n contractAddress: string;\n startToken?: string;\n withMetadata: boolean;\n limit?: number;\n tokenUriTimeoutInMs?: number;\n}\n\n/**\n * Interface for the `getNfts` endpoint. The main difference is that the\n * endpoint has a `withMetadata` parameter, but the SDK exposes the parameter as\n * `omitMetadata`.\n *\n * @internal\n */\ninterface GetNftsAlchemyParams {\n owner: string;\n pageKey?: string;\n contractAddresses?: string[];\n /** @deprecated - Please use `excludeFilters` instead. */\n filters?: string[];\n excludeFilters?: NftFilters[];\n includeFilters?: NftFilters[];\n pageSize?: number;\n withMetadata: boolean;\n tokenUriTimeoutInMs?: number;\n orderBy?: string;\n}\n\n/**\n * Interface for the `getNftMetadata` endpoint.\n *\n * @internal\n */\ninterface GetNftMetadataParams {\n contractAddress: string;\n tokenId: string;\n tokenType?: NftTokenType;\n refreshCache?: boolean;\n tokenUriTimeoutInMs?: number;\n}\n\n/**\n * Interface for the `isSpamContract` endpoint.\n *\n * @internal\n */\ninterface IsSpamContractParams {\n contractAddress: string;\n}\n\n/**\n * Interface for the `getNftContractMetadata` endpoint.\n *\n * @internal\n */\ninterface GetContractMetadataParams {\n contractAddress: string;\n}\n\n/**\n * Interface for the `getOwnersForNftContract` endpoint.\n *\n * @internal\n */\ninterface GetOwnersForNftContractAlchemyParams {\n contractAddress: string;\n}\n\n/**\n * Interface for the `getOwnersForContract` endpoint.\n *\n * @internal\n */\ninterface GetContractsForOwnerParams {\n owner: string;\n pageKey?: string;\n includeFilters?: NftFilters[];\n excludeFilters?: NftFilters[];\n orderBy?: NftOrdering;\n}\n\n/**\n * Interface for the `getFloorPrice` endpoint.\n *\n * @internal\n */\ninterface GetFloorPriceParams {\n contractAddress: string;\n}\n\n/**\n * Interface for the `getNftSales` endpoint.\n *\n * @internal\n */\ninterface GetNftSalesParams {\n fromBlock?: number | 'latest';\n toBlock?: number | 'latest';\n order?: SortingOrder;\n marketplace?: NftSaleMarketplace;\n contractAddress?: string;\n tokenId?: string;\n sellerAddress?: string;\n buyerAddress?: string;\n taker?: NftSaleTakerType;\n limit?: number;\n pageKey?: string;\n}\n\n/**\n * Interface for the `computeRarity` endpoint.\n *\n * @internal\n */\ninterface ComputeRarityParams {\n contractAddress: string;\n tokenId: string;\n}\n\n/**\n * Interface for the `searchContractMetadata` endpoint.\n *\n * @internal\n */\ninterface SearchContractMetadataParams {\n query: string;\n}\n\n/**\n * Interface for the `summarizeNFTAttributes` endpoint.\n *\n * @internal\n */\ninterface SummarizeNftAttributesParams {\n contractAddress: string;\n}\n\ninterface ReingestContractParams {\n contractAddress: string;\n}\n","import type { BigNumberish } from '@ethersproject/bignumber';\n\nimport {\n checkNftOwnership,\n computeRarity,\n getContractMetadata,\n getContractsForOwner,\n getFloorPrice,\n getNftMetadata,\n getNftMetadataBatch,\n getNftSales,\n getNftsForContract,\n getNftsForContractIterator,\n getNftsForOwner,\n getNftsForOwnerIterator,\n getOwnersForContract,\n getOwnersForNft,\n getSpamContracts,\n isSpamContract,\n refreshContract,\n refreshNftMetadata,\n searchContractMetadata,\n summarizeNftAttributes,\n verifyNftOwnership\n} from '../internal/nft-api';\nimport {\n GetBaseNftsForContractOptions,\n GetBaseNftsForOwnerOptions,\n GetContractsForOwnerOptions,\n GetContractsForOwnerResponse,\n GetFloorPriceResponse,\n GetNftSalesOptions,\n GetNftSalesOptionsByContractAddress,\n GetNftSalesResponse,\n GetNftsForContractOptions,\n GetNftsForOwnerOptions,\n GetOwnersForContractOptions,\n GetOwnersForContractResponse,\n GetOwnersForContractWithTokenBalancesOptions,\n GetOwnersForContractWithTokenBalancesResponse,\n GetOwnersForNftResponse,\n NftAttributeRarity,\n NftAttributesResponse,\n NftContractBaseNftsResponse,\n NftContractNftsResponse,\n NftMetadataBatchOptions,\n NftMetadataBatchToken,\n NftTokenType,\n OwnedBaseNft,\n OwnedBaseNftsResponse,\n OwnedNft,\n OwnedNftsResponse,\n RefreshContractResult\n} from '../types/types';\nimport { AlchemyConfig } from './alchemy-config';\nimport { BaseNft, Nft, NftContract } from './nft';\n\n/**\n * The NFT namespace contains all the functionality related to NFTs.\n *\n * Do not call this constructor directly. Instead, instantiate an Alchemy object\n * with `const alchemy = new Alchemy(config)` and then access the core namespace\n * via `alchemy.nft`.\n */\nexport class NftNamespace {\n /** @internal */\n constructor(private readonly config: AlchemyConfig) {}\n\n /**\n * Get the NFT metadata associated with the provided parameters.\n *\n * @param contractAddress - The contract address of the NFT.\n * @param tokenId - Token id of the NFT.\n * @param tokenType - Optionally specify the type of token to speed up the query.\n * @param tokenUriTimeoutInMs - No set timeout by default - When metadata is\n * requested, this parameter is the timeout (in milliseconds) for the\n * website hosting the metadata to respond. If you want to only access the\n * cache and not live fetch any metadata for cache misses then set this value to 0.\n * @public\n */\n getNftMetadata(\n contractAddress: string,\n tokenId: BigNumberish,\n tokenType?: NftTokenType,\n tokenUriTimeoutInMs?: number\n ): Promise {\n return getNftMetadata(\n this.config,\n contractAddress,\n tokenId,\n tokenType,\n tokenUriTimeoutInMs\n );\n }\n\n /**\n * Gets the NFT metadata for multiple NFT tokens.\n *\n * @param tokens An array of NFT tokens to fetch metadata for.\n * @param options Configuration options for making the request.\n */\n getNftMetadataBatch(\n tokens: Array,\n options?: NftMetadataBatchOptions\n ): Promise {\n return getNftMetadataBatch(this.config, tokens, options);\n }\n\n /**\n * Get the NFT collection metadata associated with the provided parameters.\n *\n * @param contractAddress - The contract address of the NFT.\n * @public\n */\n getContractMetadata(contractAddress: string): Promise {\n return getContractMetadata(this.config, contractAddress);\n }\n\n /**\n * Fetches all NFTs for a given owner and yields them in an async iterable.\n *\n * This method returns the full NFT for the owner and pages through all page\n * keys until all NFTs have been fetched.\n *\n * @param owner - The address of the owner.\n * @param options - The optional parameters to use for the request.\n * @public\n */\n getNftsForOwnerIterator(\n owner: string,\n options?: GetNftsForOwnerOptions\n ): AsyncIterable;\n /**\n * Fetches all NFTs for a given owner and yields them in an async iterable.\n *\n * This method returns the base NFTs that omit the associated metadata and\n * pages through all page keys until all NFTs have been fetched.\n *\n * @param owner - The address of the owner.\n * @param options - The optional parameters to use for the request.\n * @public\n */\n getNftsForOwnerIterator(\n owner: string,\n options?: GetBaseNftsForOwnerOptions\n ): AsyncIterable;\n getNftsForOwnerIterator(\n owner: string,\n options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions\n ): AsyncIterable {\n return getNftsForOwnerIterator(this.config, owner, options);\n }\n\n /**\n * Get all NFTs for an owner.\n *\n * This method returns the full NFTs in the contract. To get all NFTs without\n * their associated metadata, use {@link GetBaseNftsForOwnerOptions}.\n *\n * @param owner - The address of the owner.\n * @param options - The optional parameters to use for the request.\n * @public\n */\n getNftsForOwner(\n owner: string,\n options?: GetNftsForOwnerOptions\n ): Promise;\n /**\n * Get all base NFTs for an owner.\n *\n * This method returns the base NFTs that omit the associated metadata. To get\n * all NFTs with their associated metadata, use {@link GetNftsForOwnerOptions}.\n *\n * @param owner - The address of the owner.\n * @param options - The optional parameters to use for the request.\n * @public\n */\n getNftsForOwner(\n owner: string,\n options?: GetBaseNftsForOwnerOptions\n ): Promise;\n getNftsForOwner(\n owner: string,\n options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions\n ): Promise {\n return getNftsForOwner(this.config, owner, options);\n }\n\n /**\n * Get all NFTs for a given contract address.\n *\n * This method returns the full NFTs in the contract. To get all NFTs without\n * their associated metadata, use {@link GetBaseNftsForContractOptions}.\n *\n * @param contractAddress - The contract address of the NFT contract.\n * @param options - The parameters to use for the request. or\n * {@link NftContractNftsResponse} response.\n * @beta\n */\n getNftsForContract(\n contractAddress: string,\n options?: GetNftsForContractOptions\n ): Promise;\n /**\n * Get all base NFTs for a given contract address.\n *\n * This method returns the base NFTs that omit the associated metadata. To get\n * all NFTs with their associated metadata, use {@link GetNftsForContractOptions}.\n *\n * @param contractAddress - The contract address of the NFT contract.\n * @param options - The optional parameters to use for the request.\n * @beta\n */\n getNftsForContract(\n contractAddress: string,\n options?: GetBaseNftsForContractOptions\n ): Promise;\n getNftsForContract(\n contractAddress: string,\n options?: GetBaseNftsForContractOptions | GetNftsForContractOptions\n ): Promise {\n return getNftsForContract(this.config, contractAddress, options);\n }\n\n /**\n * Fetches all NFTs for a given contract address and yields them in an async iterable.\n *\n * This method returns the full NFTs in the contract and pages through all\n * page keys until all NFTs have been fetched. To get all NFTs without their\n * associated metadata, use {@link GetBaseNftsForContractOptions}.\n *\n * @param contractAddress - The contract address of the NFT contract.\n * @param options - The optional parameters to use for the request.\n * @beta\n */\n getNftsForContractIterator(\n contractAddress: string,\n options?: GetNftsForContractOptions\n ): AsyncIterable;\n /**\n * Fetches all base NFTs for a given contract address and yields them in an\n * async iterable.\n *\n * This method returns the base NFTs that omit the associated metadata and\n * pages through all page keys until all NFTs have been fetched. To get all\n * NFTs with their associated metadata, use {@link GetNftsForContractOptions}.\n *\n * @param contractAddress - The contract address of the NFT contract.\n * @param options - The optional parameters to use for the request.\n * @beta\n */\n getNftsForContractIterator(\n contractAddress: string,\n options?: GetBaseNftsForContractOptions\n ): AsyncIterable;\n getNftsForContractIterator(\n contractAddress: string,\n options?: GetBaseNftsForContractOptions | GetNftsForContractOptions\n ): AsyncIterable {\n return getNftsForContractIterator(this.config, contractAddress, options);\n }\n\n /**\n * Gets all the owners for a given NFT contract along with the token balance.\n *\n * @param contractAddress - The NFT contract to get the owners for.\n * @param options Optional parameters to use for the request.\n * @public\n */\n getOwnersForContract(\n contractAddress: string,\n options: GetOwnersForContractWithTokenBalancesOptions\n ): Promise;\n\n /**\n * Gets all the owners for a given NFT contract.\n *\n * Note that token balances are omitted by default. To include token balances\n * for each owner, use {@link GetOwnersForContractWithTokenBalancesOptions},\n * which has the `withTokenBalances` field set to `true`.\n *\n * @param contractAddress - The NFT contract to get the owners for.\n * @param options Optional parameters to use for the request.\n * @public\n */\n getOwnersForContract(\n contractAddress: string,\n options?: GetOwnersForContractOptions\n ): Promise;\n getOwnersForContract(\n contractAddress: string,\n options?:\n | GetOwnersForContractOptions\n | GetOwnersForContractWithTokenBalancesOptions\n ): Promise<\n GetOwnersForContractResponse | GetOwnersForContractWithTokenBalancesResponse\n > {\n return getOwnersForContract(this.config, contractAddress, options);\n }\n\n /**\n * Gets all the owners for a given NFT contract address and token ID.\n *\n * @param contractAddress - The NFT contract address.\n * @param tokenId - Token id of the NFT.\n * @beta\n */\n getOwnersForNft(\n contractAddress: string,\n tokenId: BigNumberish\n ): Promise {\n return getOwnersForNft(this.config, contractAddress, tokenId);\n }\n\n /**\n * Gets all NFT contracts held by the specified owner address.\n *\n * @param owner - Address for NFT owner (can be in ENS format!).\n * @param options - The optional parameters to use for the request.\n * @public\n */\n getContractsForOwner(\n owner: string,\n options?: GetContractsForOwnerOptions\n ): Promise {\n return getContractsForOwner(this.config, owner, options);\n }\n\n /**\n * DEPRECATED - Checks that the provided owner address owns one of more of the\n * provided NFTs.\n *\n * @deprecated - Use {@link verifyNftOwnership} instead. This method will be\n * removed in a future release.\n * @param owner - The owner address to check.\n * @param contractAddresses - An array of NFT contract addresses to check ownership for.\n */\n checkNftOwnership(\n owner: string,\n contractAddresses: string[]\n ): Promise {\n return checkNftOwnership(this.config, owner, contractAddresses);\n }\n\n /**\n * Checks that the provided owner address owns one of more of the provided\n * NFT. Returns a boolean indicating whether the owner address owns the provided NFT.\n *\n * @param owner - The owner address to check.\n * @param contractAddress - An NFT contract address to check ownership for.\n */\n verifyNftOwnership(owner: string, contractAddress: string): Promise;\n\n /**\n * Checks which of the provided NFTs the owner address owns. Returns a map of\n * contract address to a boolean indicating whether the owner address owns the NFT.\n *\n * @param owner - The owner address to check.\n * @param contractAddresses - An array NFT contract address to check ownership for.\n */\n verifyNftOwnership(\n owner: string,\n contractAddresses: string[]\n ): Promise<{ [contractAddress: string]: boolean }>;\n verifyNftOwnership(\n owner: string,\n contractAddress: string | string[]\n ): Promise {\n return verifyNftOwnership(this.config, owner, contractAddress);\n }\n\n /**\n * Returns whether a contract is marked as spam or not by Alchemy. For more\n * information on how we classify spam, go to our NFT API FAQ at\n * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification.\n *\n * @param contractAddress - The contract address to check.\n * @beta\n */\n isSpamContract(contractAddress: string): Promise {\n return isSpamContract(this.config, contractAddress);\n }\n\n /**\n * Returns a list of all spam contracts marked by Alchemy. For details on how\n * Alchemy marks spam contracts, go to\n * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification.\n *\n * @beta\n */\n getSpamContracts(): Promise {\n return getSpamContracts(this.config);\n }\n\n /**\n * Returns the floor prices of a NFT contract by marketplace.\n *\n * @param contractAddress - The contract address for the NFT collection.\n * @beta\n */\n getFloorPrice(contractAddress: string): Promise {\n return getFloorPrice(this.config, contractAddress);\n }\n\n /**\n * Returns NFT sales that have happened through on-chain marketplaces.\n *\n * @param options - The optional parameters to use for the request.\n * @beta\n */\n getNftSales(options?: GetNftSalesOptions): Promise;\n getNftSales(\n options?: GetNftSalesOptionsByContractAddress\n ): Promise;\n getNftSales(\n options?: GetNftSalesOptions | GetNftSalesOptionsByContractAddress\n ): Promise {\n return getNftSales(this.config, options);\n }\n\n /**\n * Get the rarity of each attribute of an NFT.\n *\n * @param contractAddress - Contract address for the NFT collection.\n * @param tokenId - Token id of the NFT.\n */\n computeRarity(\n contractAddress: string,\n tokenId: BigNumberish\n ): Promise {\n return computeRarity(this.config, contractAddress, tokenId);\n }\n\n /**\n * Search for a keyword across metadata of all ERC-721 and ERC-1155 smart contracts.\n *\n * @param query - The search string that you want to search for in contract metadata.\n */\n searchContractMetadata(query: string): Promise {\n return searchContractMetadata(this.config, query);\n }\n\n /**\n * Get a summary of attribute prevalence for an NFT collection.\n *\n * @param contractAddress - Contract address for the NFT collection.\n */\n summarizeNftAttributes(\n contractAddress: string\n ): Promise {\n return summarizeNftAttributes(this.config, contractAddress);\n }\n\n /**\n * Refreshes the cached metadata for a provided NFT contract address and token\n * id. Returns a boolean value indicating whether the metadata was refreshed.\n *\n * This method is useful when you want to refresh the metadata for a NFT that\n * has been updated since the last time it was fetched. Note that the backend\n * only allows one refresh per token every 15 minutes, globally for all users.\n * The last refresh time for an NFT can be accessed on the\n * {@link Nft.timeLastUpdated} field.\n *\n * To trigger a refresh for all NFTs in a contract, use {@link refreshContract} instead.\n *\n * @param contractAddress - The contract address of the NFT.\n * @param tokenId - The token id of the NFT.\n */\n refreshNftMetadata(\n contractAddress: string,\n tokenId: BigNumberish\n ): Promise {\n return refreshNftMetadata(this.config, contractAddress, tokenId);\n }\n\n /**\n * Triggers a metadata refresh all NFTs in the provided contract address. This\n * method is useful after an NFT collection is revealed.\n *\n * Refreshes are queued on the Alchemy backend and may take time to fully\n * process. To refresh the metadata for a specific token, use the\n * {@link refreshNftMetadata} method instead.\n *\n * @param contractAddress - The contract address of the NFT collection.\n * @beta\n */\n refreshContract(contractAddress: string): Promise {\n return refreshContract(this.config, contractAddress);\n }\n}\n","import { AxiosRequestConfig, Method } from 'axios';\n\nimport { BigNumber } from '@ethersproject/bignumber';\n\nimport { requestHttpWithBackoff } from '../internal/dispatch';\nimport {\n RawAddressActivityResponse,\n RawCreateWebhookResponse,\n RawGetAllWebhooksResponse,\n RawNftFilterParam,\n RawNftFiltersResponse,\n RawWebhook\n} from '../internal/raw-interfaces';\nimport {\n AddressActivityResponse,\n AddressActivityWebhook,\n AddressWebhookParams,\n AddressWebhookUpdate,\n DroppedTransactionWebhook,\n GetAddressesOptions,\n GetAllWebhooksResponse,\n MinedTransactionWebhook,\n Network,\n NftActivityWebhook,\n NftFilter,\n NftFiltersResponse,\n NftWebhookParams,\n NftWebhookUpdate,\n TransactionWebhookParams,\n Webhook,\n WebhookType,\n WebhookVersion\n} from '../types/types';\nimport { AlchemyApiType } from '../util/const';\nimport { AlchemyConfig } from './alchemy-config';\n\n/**\n * The Notify namespace contains methods used for creating, reading, updating,\n * and deleting webhooks in the Notify API.\n *\n * To use the methods in the API, you must provide your team's auth token in the\n * {@link AlchemySettings.authToken} field when configuring\n * {@link AlchemySettings}. The auth token can be found in the Alchemy Dashboard\n * on the Notify tab.\n *\n * Note that not all networks are supported in the Notify API. Please consult\n * the documentation for which networks are supported.\n *\n * Do not call this constructor directly. Instead, instantiate an Alchemy object\n * with `const alchemy = new Alchemy(config)` and then access the notify\n * namespace via `alchemy.notify`.\n */\nexport class NotifyNamespace {\n /** @internal */\n constructor(private readonly config: AlchemyConfig) {}\n\n /**\n * Get all webhooks on your team.\n *\n * The team is determined by the `authToken` provided into the {@link AlchemySettings}\n * object when creating a new {@link Alchemy} instance.\n *\n * This method returns a response object containing all the webhooks\n */\n async getAllWebhooks(): Promise {\n this.verifyConfig();\n const response = await this.sendWebhookRequest(\n 'team-webhooks',\n 'getAllWebhooks',\n {}\n );\n return {\n webhooks: parseRawWebhookResponse(response),\n totalCount: response.data.length\n };\n }\n\n /**\n * Get all addresses tracked for the provided {@link AddressActivityWebhook}.\n *\n * @param addressWebhook The Address Activity webhook.\n * @param options Pagination options when fetching addresses.\n */\n getAddresses(\n addressWebhook: AddressActivityWebhook,\n options?: GetAddressesOptions\n ): Promise;\n\n /**\n * Get all addresses tracked for the provided {@link AddressActivityWebhook}.\n *\n * @param webhookId The id of the address activity webhook. Passing in an id\n * of a non-address-activity webhook will result in a response object with\n * no addresses.\n * @param options Pagination options when fetching addresses.\n */\n getAddresses(\n webhookId: string,\n options?: GetAddressesOptions\n ): Promise;\n async getAddresses(\n webhookOrId: AddressActivityWebhook | string,\n options?: GetAddressesOptions\n ): Promise {\n this.verifyConfig();\n const webhookId =\n typeof webhookOrId === 'string' ? webhookOrId : webhookOrId.id;\n const response = await this.sendWebhookRequest(\n 'webhook-addresses',\n 'getAddresses',\n {\n webhook_id: webhookId,\n limit: options?.limit,\n after: options?.pageKey\n }\n );\n return parseRawAddressActivityResponse(response);\n }\n\n /**\n * Get all NFTs tracked for the provided {@link NftActivityWebhook}.\n *\n * @param nftWebhook The NFT Activity webhook.\n * @param options Pagination options when fetching NFT filters.\n */\n getNftFilters(\n nftWebhook: NftActivityWebhook,\n options?: GetAddressesOptions\n ): Promise;\n\n /**\n * Get all NFT filters tracked for the provided {@link NftActivityWebhook}.\n *\n * @param webhookId The id of the NFT activity webhook. Passing in an\n * incorrect id of a non-NFT webhook will result in a response object with\n * no filters.\n * @param options Pagination options when fetching nft filters.\n */\n getNftFilters(\n webhookId: string,\n options?: GetAddressesOptions\n ): Promise;\n async getNftFilters(\n webhookOrId: NftActivityWebhook | string,\n options?: GetAddressesOptions\n ): Promise {\n this.verifyConfig();\n const webhookId =\n typeof webhookOrId === 'string' ? webhookOrId : webhookOrId.id;\n const response = await this.sendWebhookRequest(\n 'webhook-nft-filters',\n 'getNftFilters',\n {\n webhook_id: webhookId,\n limit: options?.limit,\n after: options?.pageKey\n }\n );\n return parseRawNftFiltersResponse(response);\n }\n\n /**\n * Update a {@link NftActivityWebhook}'s active status or NFT filters.\n *\n * @param nftWebhook The NFT activity webhook to update.\n * @param update Object containing the update.\n */\n updateWebhook(\n nftWebhook: NftActivityWebhook,\n update: NftWebhookUpdate\n ): Promise;\n\n /**\n * Update a {@link NftActivityWebhook}'s active status or NFT filters.\n *\n * @param nftWebhookId The id of the NFT activity webhook.\n * @param update Object containing the update.\n */\n updateWebhook(nftWebhookId: string, update: NftWebhookUpdate): Promise;\n\n /**\n * Update a {@link AddressActivityWebhook}'s active status or addresses.\n *\n * @param addressWebhook The address activity webhook to update.\n * @param update Object containing the update.\n */\n updateWebhook(\n addressWebhook: AddressActivityWebhook,\n update: AddressWebhookUpdate\n ): Promise;\n\n /**\n * Update a {@link AddressActivityWebhook}'s active status or addresses.\n *\n * @param addressWebhookId The id of the address activity webhook.\n * @param update Object containing the update.\n */\n updateWebhook(\n addressWebhookId: string,\n update: AddressWebhookUpdate\n ): Promise;\n async updateWebhook(\n webhookOrId: NftActivityWebhook | AddressActivityWebhook | string,\n update: NftWebhookUpdate | AddressWebhookUpdate\n ): Promise {\n const webhookId =\n typeof webhookOrId === 'string' ? webhookOrId : webhookOrId.id;\n let restApiName;\n let methodName;\n let method: Method;\n let data;\n if ('isActive' in update) {\n restApiName = 'update-webhook';\n methodName = 'updateWebhook';\n method = 'PUT';\n data = {\n webhook_id: webhookId,\n is_active: update.isActive\n };\n } else if ('addFilters' in update || 'removeFilters' in update) {\n restApiName = 'update-webhook-nft-filters';\n methodName = 'updateWebhookNftFilters';\n method = 'PATCH';\n data = {\n webhook_id: webhookId,\n nft_filters_to_add: update.addFilters\n ? update.addFilters.map(nftFilterToParam)\n : [],\n nft_filters_to_remove: update.removeFilters\n ? update.removeFilters.map(nftFilterToParam)\n : []\n };\n } else if ('addAddresses' in update || 'removeAddresses' in update) {\n restApiName = 'update-webhook-addresses';\n methodName = 'webhook:updateWebhookAddresses';\n method = 'PATCH';\n data = {\n webhook_id: webhookId,\n addresses_to_add: await this.resolveAddresses(update.addAddresses),\n addresses_to_remove: await this.resolveAddresses(update.removeAddresses)\n };\n } else if ('newAddresses' in update) {\n restApiName = 'update-webhook-addresses';\n methodName = 'webhook:updateWebhookAddress';\n method = 'PUT';\n data = {\n webhook_id: webhookId,\n addresses: await this.resolveAddresses(update.newAddresses)\n };\n } else {\n throw new Error('Invalid `update` param passed into `updateWebhook`');\n }\n\n await this.sendWebhookRequest(\n restApiName,\n methodName,\n {},\n {\n method,\n data\n }\n );\n }\n\n /**\n * Create a new {@link MinedTransactionWebhook} to track mined transactions\n * sent by the app associated with the app id.\n *\n * Note that the webhook will be created in the app network of the provided app id.\n *\n * @param url The URL that the webhook should send events to.\n * @param type The type of webhook to create.\n * @param params Parameters object containing the app id.\n */\n // TODO(webhook): Automatically populate app id from api key.\n createWebhook(\n url: string,\n type: WebhookType.MINED_TRANSACTION,\n params: TransactionWebhookParams\n ): Promise;\n\n /**\n * Create a new {@link DroppedTransactionWebhook} to track dropped transactions\n * sent by the app associated with the app id.\n *\n * Note that the webhook will be created in the app network of the provided app id.\n *\n * @param url The URL that the webhook should send events to.\n * @param type The type of webhook to create.\n * @param params Parameters object containing the app id.\n */\n // TODO(webhook): Automatically populate app id from api key.\n createWebhook(\n url: string,\n type: WebhookType.DROPPED_TRANSACTION,\n params: TransactionWebhookParams\n ): Promise;\n\n /**\n * Create a new {@link NftActivityWebhook} to track NFT transfers.\n *\n * @param url The URL that the webhook should send events to.\n * @param type The type of webhook to create.\n * @param params Parameters object containing the NFTs to track and the\n * network the webhook should be created on.\n */\n createWebhook(\n url: string,\n type: WebhookType.NFT_ACTIVITY,\n params: NftWebhookParams\n ): Promise;\n\n /**\n * Create a new {@link AddressActivityWebhook} to track address activity.\n *\n * @param url The URL that the webhook should send events to.\n * @param type The type of webhook to create.\n * @param params Parameters object containing the addresses to track and the\n * network the webhook should be created on.\n */\n createWebhook(\n url: string,\n type: WebhookType.ADDRESS_ACTIVITY,\n params: AddressWebhookParams\n ): Promise;\n async createWebhook(\n url: string,\n type: WebhookType,\n params: NftWebhookParams | AddressWebhookParams | TransactionWebhookParams\n ): Promise<\n | MinedTransactionWebhook\n | DroppedTransactionWebhook\n | NftActivityWebhook\n | AddressActivityWebhook\n > {\n let appId;\n if (\n type === WebhookType.MINED_TRANSACTION ||\n type === WebhookType.DROPPED_TRANSACTION\n ) {\n if (!('appId' in params)) {\n throw new Error('Transaction Webhooks require an app id.');\n }\n appId = params.appId;\n }\n\n let network = NETWORK_TO_WEBHOOK_NETWORK.get(this.config.network);\n let filters;\n let addresses;\n if (type === WebhookType.NFT_ACTIVITY) {\n if (!('filters' in params) || params.filters.length === 0) {\n throw new Error(\n 'Nft Activity Webhooks require a non-empty array input.'\n );\n }\n network = params.network\n ? NETWORK_TO_WEBHOOK_NETWORK.get(params.network)\n : network;\n filters = (params.filters as NftFilter[]).map(filter => ({\n contract_address: filter.contractAddress,\n token_id: BigNumber.from(filter.tokenId).toString()\n }));\n } else if (type === WebhookType.ADDRESS_ACTIVITY) {\n if (\n params === undefined ||\n !('addresses' in params) ||\n params.addresses.length === 0\n ) {\n throw new Error(\n 'Address Activity Webhooks require a non-empty array input.'\n );\n }\n network = params.network\n ? NETWORK_TO_WEBHOOK_NETWORK.get(params.network)\n : network;\n addresses = await this.resolveAddresses(params.addresses);\n }\n\n const data = {\n network,\n webhook_type: type,\n webhook_url: url,\n ...(appId && { app_id: appId }),\n\n // Only include the filters/addresses in the final response if it's defined\n ...(filters && { nft_filters: filters }),\n ...(addresses && { addresses })\n };\n\n const response = await this.sendWebhookRequest(\n 'create-webhook',\n 'createWebhook',\n {},\n {\n method: 'POST',\n data\n }\n );\n\n return parseRawWebhook(response.data);\n }\n\n /**\n * Delete the provided webhook.\n *\n * @param webhook The webhook to delete.\n */\n deleteWebhook(webhook: Webhook): Promise;\n\n /**\n * Delete the provided webhook.\n *\n * @param webhookId The id of the webhook to delete.\n */\n deleteWebhook(webhookId: string): Promise;\n async deleteWebhook(webhookOrId: Webhook | string): Promise {\n this.verifyConfig();\n const webhookId =\n typeof webhookOrId === 'string' ? webhookOrId : webhookOrId.id;\n const response = await this.sendWebhookRequest(\n 'delete-webhook',\n 'deleteWebhook',\n {\n webhook_id: webhookId\n },\n {\n method: 'DELETE'\n }\n );\n\n if ('message' in response) {\n throw new Error(\n `Webhook not found. Failed to delete webhook: ${webhookId}`\n );\n }\n }\n\n private verifyConfig() {\n if (this.config.authToken === undefined) {\n throw new Error(\n 'Using the Notify API requires setting the Alchemy Auth Token in ' +\n 'the settings object when initializing Alchemy.'\n );\n }\n }\n\n private sendWebhookRequest(\n restApiName: string,\n methodName: string,\n params: {},\n overrides?: AxiosRequestConfig\n ): Promise {\n return requestHttpWithBackoff(\n this.config,\n AlchemyApiType.WEBHOOK,\n restApiName,\n methodName,\n params,\n {\n ...overrides,\n headers: {\n 'X-Alchemy-Token': this.config.authToken!,\n ...overrides?.headers\n }\n }\n );\n }\n\n /** Resolves ENS addresses to the raw address.\n * @internal */\n private async resolveAddresses(\n addresses: string[] | undefined\n ): Promise {\n if (addresses === undefined) {\n return [];\n }\n const resolvedAddresses: string[] = [];\n const provider = await this.config.getProvider();\n for (const address of addresses) {\n const rawAddress = await provider.resolveName(address);\n if (rawAddress === null) {\n throw new Error(`Unable to resolve the ENS address: ${address}`);\n }\n resolvedAddresses.push(rawAddress);\n }\n\n return resolvedAddresses;\n }\n}\n\n/**\n * Mapping of webhook network representations to the SDK's network representation.\n *\n * @internal\n */\nconst WEBHOOK_NETWORK_TO_NETWORK: { [key: string]: Network } = {\n ETH_MAINNET: Network.ETH_MAINNET,\n ETH_GOERLI: Network.ETH_GOERLI,\n ETH_ROPSTEN: Network.ETH_ROPSTEN,\n ETH_RINKEBY: Network.ETH_RINKEBY,\n ETH_KOVAN: Network.ETH_KOVAN,\n MATIC_MAINNET: Network.MATIC_MAINNET,\n MATIC_MUMBAI: Network.MATIC_MUMBAI,\n ARB_MAINNET: Network.ARB_MAINNET,\n ARB_RINKEBY: Network.ARB_RINKEBY,\n OPT_MAINNET: Network.OPT_MAINNET,\n OPT_KOVAN: Network.OPT_KOVAN\n};\n\n/** Mapping of the SDK's network representation the webhook API's network representation. */\nconst NETWORK_TO_WEBHOOK_NETWORK: Map = Object.keys(\n Network\n).reduce((map: Map, key) => {\n if (key in WEBHOOK_NETWORK_TO_NETWORK) {\n map.set(WEBHOOK_NETWORK_TO_NETWORK[key], key);\n }\n return map;\n}, new Map());\n\nfunction parseRawWebhookResponse(\n response: RawGetAllWebhooksResponse\n): Webhook[] {\n return response.data.map(parseRawWebhook);\n}\n\nfunction parseRawWebhook(rawWebhook: RawWebhook): Webhook {\n return {\n id: rawWebhook.id,\n network: WEBHOOK_NETWORK_TO_NETWORK[rawWebhook.network],\n type: rawWebhook.webhook_type as WebhookType,\n url: rawWebhook.webhook_url,\n isActive: rawWebhook.is_active,\n timeCreated: new Date(rawWebhook.time_created).toISOString(),\n signingKey: rawWebhook.signing_key,\n version: rawWebhook.version as WebhookVersion,\n // Only include the appId in the final response if it's defined\n ...(rawWebhook.app_id !== undefined && { appId: rawWebhook.app_id })\n };\n}\n\nfunction parseRawAddressActivityResponse(\n response: RawAddressActivityResponse\n): AddressActivityResponse {\n return {\n addresses: response.data,\n totalCount: response.pagination.total_count,\n pageKey: response.pagination.cursors.after\n };\n}\n\nfunction parseRawNftFiltersResponse(\n response: RawNftFiltersResponse\n): NftFiltersResponse {\n return {\n filters: response.data.map(f => ({\n contractAddress: f.contract_address,\n tokenId: BigNumber.from(f.token_id).toString()\n })),\n totalCount: response.pagination.total_count,\n pageKey: response.pagination.cursors.after\n };\n}\n\nfunction nftFilterToParam(filter: NftFilter): RawNftFilterParam {\n return {\n contract_address: filter.contractAddress,\n token_id: BigNumber.from(filter.tokenId).toString()\n };\n}\n","import {\n TransactionReceipt,\n TransactionRequest,\n TransactionResponse\n} from '@ethersproject/abstract-provider';\nimport type { BigNumber } from '@ethersproject/bignumber';\nimport { Deferrable } from '@ethersproject/properties';\n\nimport {\n GasOptimizedTransactionResponse,\n GasOptimizedTransactionStatusResponse,\n SendPrivateTransactionOptions\n} from '../types/types';\nimport { AlchemyConfig } from './alchemy-config';\nimport { Wallet } from './alchemy-wallet';\nimport { fromHex, toHex } from './util';\n\n/**\n * Multiples to increment fee per gas when using\n * {@link TransactNamespace.sendGasOptimizedTransaction}.\n *\n * @internal\n */\nexport const GAS_OPTIMIZED_TX_FEE_MULTIPLES = [0.9, 1, 1.1, 1.2, 1.3];\n\n/**\n * The Transact namespace contains methods used for sending transactions and\n * checking on the state of submitted transactions.\n *\n * Do not call this constructor directly. Instead, instantiate an Alchemy object\n * with `const alchemy = new Alchemy(config)` and then access the transact\n * namespace via `alchemy.transact`.\n */\nexport class TransactNamespace {\n /** @internal */\n constructor(private readonly config: AlchemyConfig) {}\n\n /**\n * Used to send a single transaction to Flashbots. Flashbots will attempt to\n * send the transaction to miners for the next 25 blocks.\n *\n * Returns the transaction hash of the submitted transaction.\n *\n * @param signedTransaction The raw, signed transaction as a hash.\n * @param maxBlockNumber Optional highest block number in which the\n * transaction should be included.\n * @param options Options to configure the request.\n */\n async sendPrivateTransaction(\n signedTransaction: string,\n maxBlockNumber?: number,\n options?: SendPrivateTransactionOptions\n ): Promise {\n const provider = await this.config.getProvider();\n const hexBlockNumber = maxBlockNumber ? toHex(maxBlockNumber) : undefined;\n return provider._send(\n 'eth_sendPrivateTransaction',\n [\n {\n tx: signedTransaction,\n maxBlockNumber: hexBlockNumber,\n preferences: options\n }\n ],\n 'sendPrivateTransaction'\n );\n }\n\n /**\n * Stops the provided private transaction from being submitted for future\n * blocks. A transaction can only be cancelled if the request is signed by the\n * same key as the {@link sendPrivateTransaction} call submitting the\n * transaction in first place.\n *\n * Please note that fast mode transactions cannot be cancelled using this method.\n *\n * Returns a boolean indicating whether the cancellation was successful.\n *\n * @param transactionHash Transaction hash of private tx to be cancelled\n */\n async cancelPrivateTransaction(transactionHash: string): Promise {\n const provider = await this.config.getProvider();\n return provider._send(\n 'eth_cancelPrivateTransaction',\n [\n {\n txHash: transactionHash\n }\n ],\n 'cancelPrivateTransaction'\n );\n }\n\n /**\n * Returns the transaction with hash or null if the transaction is unknown.\n *\n * If a transaction has not been mined, this method will search the\n * transaction pool. Various backends may have more restrictive transaction\n * pool access (e.g. if the gas price is too low or the transaction was only\n * recently sent and not yet indexed) in which case this method may also return null.\n *\n * NOTE: This is an alias for {@link CoreNamespace.getTransaction}.\n *\n * @param transactionHash The hash of the transaction to get.\n * @public\n */\n async getTransaction(\n transactionHash: string | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.getTransaction(transactionHash);\n }\n\n /**\n * Submits transaction to the network to be mined. The transaction must be\n * signed, and be valid (i.e. the nonce is correct and the account has\n * sufficient balance to pay for the transaction).\n *\n * NOTE: This is an alias for {@link CoreNamespace.sendTransaction}.\n *\n * @param signedTransaction The signed transaction to send.\n * @public\n */\n async sendTransaction(\n signedTransaction: string | Promise\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.sendTransaction(signedTransaction);\n }\n\n /**\n * Returns an estimate of the amount of gas that would be required to submit\n * transaction to the network.\n *\n * An estimate may not be accurate since there could be another transaction on\n * the network that was not accounted for, but after being mined affects the\n * relevant state.\n *\n * This is an alias for {@link CoreNamespace.estimateGas}.\n *\n * @param transaction The transaction to estimate gas for.\n * @public\n */\n async estimateGas(\n transaction: Deferrable\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.estimateGas(transaction);\n }\n\n /**\n * Returns a fee per gas (in wei) that is an estimate of how much you can pay\n * as a priority fee, or \"tip\", to get a transaction included in the current block.\n *\n * This number is generally used to set the `maxPriorityFeePerGas` field in a\n * transaction request.\n *\n * @public\n */\n async getMaxPriorityFeePerGas(): Promise {\n const provider = await this.config.getProvider();\n const feeHex = await provider._send(\n 'eth_maxPriorityFeePerGas',\n [],\n 'getMaxPriorityFeePerGas'\n );\n return fromHex(feeHex);\n }\n\n /**\n * Returns a promise which will not resolve until specified transaction hash is mined.\n *\n * If {@link confirmations} is 0, this method is non-blocking and if the\n * transaction has not been mined returns null. Otherwise, this method will\n * block until the transaction has confirmed blocks mined on top of the block\n * in which it was mined.\n *\n * NOTE: This is an alias for {@link CoreNamespace.waitForTransaction}.\n *\n * @param transactionHash The hash of the transaction to wait for.\n * @param confirmations The number of blocks to wait for.\n * @param timeout The maximum time to wait for the transaction to confirm.\n * @public\n */\n async waitForTransaction(\n transactionHash: string,\n confirmations?: number,\n timeout?: number\n ): Promise {\n const provider = await this.config.getProvider();\n return provider.waitForTransaction(transactionHash, confirmations, timeout);\n }\n\n /**\n * Instead of sending a single transaction that might not get mined, this\n * method allows you to send the same transaction multiple times, with\n * different gas prices and gas limits. This should result in lower fees paid.\n *\n * Alchemy will submit the cheapest transaction, and if it does not get mined,\n * the next cheapest transaction will be submitted. This process will continue\n * until one of the transactions is mined, or until all transactions are rejected.\n *\n * To have Alchemy automatically generate a fee and gas spread, pass in a\n * {@link TransactionRequest} object and a {@link Wallet} as a signer.\n *\n * This method returns a response object containing the transaction hash for\n * each of the signed transactions and a transaction job id that can be used\n * to track the state of the transaction job.\n *\n * @param signedTransactions An array of signed transactions to send. Each\n * transaction in the array must have the same values, but with different\n * gas and fee values.\n * @internal\n */\n // TODO(txjob): Remove internal tag once this feature is released.\n async sendGasOptimizedTransaction(\n signedTransactions: string[]\n ): Promise;\n\n /**\n * Instead of sending a single transaction that might not get mined, this\n * method will generate a series of five EIP-1559 transactions with different\n * gas prices in order to minimize the final fees paid.\n *\n * Alchemy will submit the cheapest transaction, and if it does not get mined,\n * the next cheapest transaction will be submitted. This process will continue\n * until one of the transactions is mined, or until all transactions are rejected.\n *\n * To calculate the fee, gas, and gas spread for each transaction, this method\n * first calculates the base fee from the latest block, estimates the gas for\n * the transaction, and then calculates the fee and gas spread for the\n * transaction. The five transactions will have 90%, 100%, 110%, 120%, and\n * 130% of the max priority fee per gas.\n *\n * Note that you can also pass in an array of pre-signed transactions with set\n * gas levels for more granular control over gas.\n *\n * This method returns a response object containing the transaction hash for\n * each of the signed transactions and a transaction job id that can be used\n * to track the state of the transaction job.\n *\n * @param transaction The raw transaction to send.\n * @param wallet A wallet to use to sign the transaction.\n * @internal\n */\n // TODO(txjob): Remove internal tag once this feature is released.\n async sendGasOptimizedTransaction(\n transaction: TransactionRequest,\n wallet: Wallet\n ): Promise;\n async sendGasOptimizedTransaction(\n transactionOrSignedTxs: TransactionRequest | string[],\n wallet?: Wallet\n ): Promise {\n if (Array.isArray(transactionOrSignedTxs)) {\n return this._sendGasOptimizedTransaction(\n transactionOrSignedTxs,\n 'sendGasOptimizedTransactionPreSigned'\n );\n }\n\n let gasLimit;\n let priorityFee;\n let baseFee;\n const provider = await this.config.getProvider();\n try {\n gasLimit = await this.estimateGas(transactionOrSignedTxs);\n priorityFee = await this.getMaxPriorityFeePerGas();\n const currentBlock = await provider.getBlock('latest');\n baseFee = currentBlock.baseFeePerGas!.toNumber();\n } catch (e) {\n throw new Error(`Failed to estimate gas for transaction: ${e}`);\n }\n\n const gasSpreadTransactions = generateGasSpreadTransactions(\n transactionOrSignedTxs,\n gasLimit.toNumber(),\n baseFee,\n priorityFee\n );\n const signedTransactions = await Promise.all(\n gasSpreadTransactions.map(tx => wallet!.signTransaction(tx))\n );\n\n return this._sendGasOptimizedTransaction(\n signedTransactions,\n 'sendGasOptimizedTransactionGenerated'\n );\n }\n\n /**\n * Returns the state of the transaction job returned by the\n * {@link sendGasOptimizedTransaction}.\n *\n * @param trackingId The tracking id from the response of the sent gas optimized transaction.\n * @internal\n */\n // TODO(txjob): Remove internal tag once this feature is released.\n async getGasOptimizedTransactionStatus(\n trackingId: string\n ): Promise {\n const provider = await this.config.getProvider();\n return provider._send(\n 'alchemy_getGasOptimizedTransactionStatus',\n [trackingId],\n 'getGasOptimizedTransactionStatus'\n );\n }\n\n /** @internal */\n private async _sendGasOptimizedTransaction(\n signedTransactions: string[],\n methodName: string\n ): Promise {\n const provider = await this.config.getProvider();\n return provider._send(\n 'alchemy_sendGasOptimizedTransaction',\n [\n {\n rawTransactions: signedTransactions\n }\n ],\n methodName\n );\n }\n}\n\n/**\n * Helper method to generate the raw transaction with the given gas limit and\n * priority fee across a spread of different gas prices.\n *\n * @internal\n */\n// Visible for testing\nexport function generateGasSpreadTransactions(\n transaction: TransactionRequest,\n gasLimit: number,\n baseFee: number,\n priorityFee: number\n): TransactionRequest[] {\n return GAS_OPTIMIZED_TX_FEE_MULTIPLES.map(feeMultiplier => {\n return {\n ...transaction,\n gasLimit,\n maxFeePerGas: Math.round(\n baseFee * feeMultiplier + priorityFee * feeMultiplier\n ),\n maxPriorityFeePerGas: Math.round(feeMultiplier * priorityFee)\n };\n });\n}\n","/** This file contains internal types used by the SDK and are not exposed to the end user. */\n\ntype JsonRpcId = string | number | null;\n\n/**\n * Prefix for `alchemy_pendingTransactions` subscriptions when serializing to\n * ethers events.\n *\n * This tag is used internally by ethers to track different event filters.\n */\nexport const ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE =\n 'alchemy-pending-transactions';\n\n/**\n * Prefix for `alchemy_minedTransactions` subscriptions when serializing to ethers events.\n *\n * This tag is used internally by ethers to track different event filters.\n */\nexport const ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE =\n 'alchemy-mined-transactions';\n\n/**\n * Array containing all the custom event tags used internally by ethers to track\n * event filters.\n */\nexport const ALCHEMY_EVENT_TYPES = [\n ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE,\n ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE\n];\n\nexport interface JsonRpcRequest {\n jsonrpc: '2.0';\n method: string;\n params?: any[];\n id?: JsonRpcId;\n}\n\nexport interface JsonRpcResponse {\n jsonrpc: '2.0';\n result?: T;\n error?: JsonRpcError;\n id: JsonRpcId;\n}\n\ninterface JsonRpcError {\n code: number;\n message: string;\n data?: T;\n}\n\nexport type WebSocketMessage = SingleOrBatchResponse | SubscriptionEvent;\nexport type SingleOrBatchResponse = JsonRpcResponse | JsonRpcResponse[];\nexport interface SubscriptionEvent {\n jsonrpc: '2.0';\n method: 'eth_subscription';\n params: {\n subscription: string;\n result: T;\n };\n}\n","import { EventType, Filter, Listener } from '@ethersproject/abstract-provider';\n\nimport {\n AlchemyEventFilter,\n AlchemyEventType,\n AlchemyMinedTransactionsAddress,\n AlchemyMinedTransactionsEventFilter,\n AlchemyPendingTransactionsEventFilter,\n AlchemySubscription,\n NonEmptyArray\n} from '../types/types';\nimport {\n ALCHEMY_EVENT_TYPES,\n ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE,\n ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE\n} from './internal-types';\n\n/**\n * DO NOT MODIFY.\n *\n * Event class copied directly over from ethers.js's `BaseProvider` class.\n *\n * This class is used to represent events and their corresponding listeners. The\n * SDK needs to extend this class in order to support Alchemy's custom\n * Subscription API types. The original class is not exported by ethers. Minimal\n * changes have been made in order to get TS to compile.\n */\nclass Event {\n readonly listener: Listener;\n readonly once: boolean;\n readonly tag: string;\n\n _lastBlockNumber: number;\n _inflight: boolean;\n\n constructor(tag: string, listener: Listener, once: boolean) {\n this.listener = listener;\n this.tag = tag;\n this.once = once;\n this._lastBlockNumber = -2;\n this._inflight = false;\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 default:\n return this.tag;\n }\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') {\n throw new Error('Not a transaction event');\n }\n return comps[1];\n }\n\n get filter(): Filter {\n const comps = this.tag.split(':');\n if (comps[0] !== 'filter') {\n throw new Error('Not a transaction event');\n }\n const address = comps[1];\n\n const topics = deserializeTopics(comps[2]);\n const filter: Filter = {};\n\n if (topics.length > 0) {\n filter.topics = topics;\n }\n if (address && address !== '*') {\n filter.address = address;\n }\n\n return filter;\n }\n\n pollable(): boolean {\n const PollableEvents = ['block', 'network', 'pending', 'poll'];\n return this.tag.indexOf(':') >= 0 || PollableEvents.indexOf(this.tag) >= 0;\n }\n}\n\n/**\n * Wrapper class around the ethers `Event` class in order to add support for\n * Alchemy's custom subscriptions types.\n *\n * The serialization and deserialization mechanism requires the order of the\n * fields to be the same across different {@link ALCHEMY_EVENT_TYPES}. Before\n * using a getter on a new event filter, make sure that the position of the\n * field in serialization is correct.\n *\n * The getters on this class deserialize the event tag generated by\n * {@link getAlchemyEventTag} into the original fields passed into the event.\n */\nexport class EthersEvent extends Event {\n /**\n * Converts the event tag into the original `fromAddress` field in\n * {@link AlchemyPendingTransactionsEventFilter}.\n */\n get fromAddress(): string | string[] | undefined {\n const comps = this.tag.split(':');\n if (comps[0] !== ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE) {\n return undefined;\n }\n if (comps[1] && comps[1] !== '*') {\n return deserializeAddressField(comps[1]);\n } else {\n return undefined;\n }\n }\n\n /**\n * Converts the event tag into the original `toAddress` field in\n * {@link AlchemyPendingTransactionsEventFilter}.\n */\n get toAddress(): string | string[] | undefined {\n const comps = this.tag.split(':');\n if (comps[0] !== ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE) {\n return undefined;\n }\n if (comps[2] && comps[2] !== '*') {\n return deserializeAddressField(comps[2]);\n } else {\n return undefined;\n }\n }\n\n /**\n * Converts the event tag into the original `hashesOnly` field in\n * {@link AlchemyPendingTransactionsEventFilter} and {@link AlchemyMinedTransactionsEventFilter}.\n */\n get hashesOnly(): boolean | undefined {\n const comps = this.tag.split(':');\n if (!ALCHEMY_EVENT_TYPES.includes(comps[0])) {\n return undefined;\n }\n if (comps[3] && comps[3] !== '*') {\n return comps[3] === 'true';\n } else {\n return undefined;\n }\n }\n\n get includeRemoved(): boolean | undefined {\n const comps = this.tag.split(':');\n if (comps[0] !== ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE) {\n return undefined;\n }\n if (comps[2] && comps[2] !== '*') {\n return comps[2] === 'true';\n } else {\n return undefined;\n }\n }\n\n get addresses(): NonEmptyArray | undefined {\n const comps = this.tag.split(':');\n if (comps[0] !== ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE) {\n return undefined;\n }\n if (comps[1] && comps[1] !== '*') {\n return deserializeAddressesField(comps[1]);\n } else {\n return undefined;\n }\n }\n}\n\nexport function isAlchemyEvent(\n event: AlchemyEventType\n): event is\n | AlchemyMinedTransactionsEventFilter\n | AlchemyPendingTransactionsEventFilter {\n return typeof event === 'object' && 'method' in event;\n}\n\n/**\n * Creates a string representation of an `alchemy_pendingTransaction`\n * subscription filter that is compatible with the ethers implementation of\n * `getEventTag()`. The method is not an exported function in ethers, which is\n * why the SDK has its own implementation.\n *\n * The event tag is then deserialized by the SDK's {@link EthersEvent} getters.\n *\n * @example\n * ```js\n * // Returns 'alchemy-pending-transactions:0xABC:0xDEF|0xGHI:true'\n * const eventTag = getAlchemyEventTag(\n * {\n * \"method\": \"alchemy_pendingTransactions\",\n * \"fromAddress\": \"0xABC\",\n * \"toAddress\": [\"0xDEF\", \"0xGHI\"],\n * \"hashesOnly: true\n * });\n * ```;\n *\n * @param event\n * @internal\n */\nexport function getAlchemyEventTag(event: AlchemyEventType): string {\n if (!isAlchemyEvent(event)) {\n throw new Error('Event tag requires AlchemyEventType');\n }\n\n if (event.method === AlchemySubscription.PENDING_TRANSACTIONS) {\n return serializePendingTransactionsEvent(event);\n } else if (event.method === AlchemySubscription.MINED_TRANSACTIONS) {\n return serializeMinedTransactionsEvent(event);\n } else {\n throw new Error(`Unrecognized AlchemyFilterEvent: ${event}`);\n }\n}\n\nexport function verifyAlchemyEventName(eventName: AlchemyEventFilter): void {\n if (!Object.values(AlchemySubscription).includes(eventName.method)) {\n throw new Error(\n `Invalid method name ${\n eventName.method\n }. Accepted method names: ${Object.values(AlchemySubscription)}`\n );\n }\n}\n\n/**\n * Serializes the provided {@link AlchemyPendingTransactionsEventFilter} into an ethers\n * compatible event tag.\n *\n * For the example event:\n * ```\n * {\n * \"method\": \"alchemy_pendingTransactions\",\n * \"fromAddress\": \"0xABC\",\n * \"toAddress\": [\"0xDEF\", \"0xGHI\"],\n * \"hashesOnly: true\n * }\n * ```\n *\n * The resulting serialization is:\n * `alchemy_pendingTransactions:0xABC:0xDEF|0xGHI:true`\n *\n * If a field is omitted, it is replaced with a `*`.\n */\nfunction serializePendingTransactionsEvent(\n event: AlchemyPendingTransactionsEventFilter\n): string {\n const fromAddress = serializeAddressField(event.fromAddress);\n const toAddress = serializeAddressField(event.toAddress);\n const hashesOnly = serializeBooleanField(event.hashesOnly);\n return (\n ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE +\n ':' +\n fromAddress +\n ':' +\n toAddress +\n ':' +\n hashesOnly\n );\n}\n\n/**\n * Serializes the provided {@link AlchemyPendingTransactionsEventFilter} into an ethers\n * compatible event tag.\n *\n * For the example event:\n * ```\n * {\n * \"method\": \"alchemy_minedTransactions\",\n * \"addresses\": [\n * {\n * from: \"0xABC\"\n * },\n * {\n * to: \"0xDEF\",\n * from: \"0x123\"\n * }\n * ]\n * \"includeRemoved\": false\n * \"hashesOnly: true\n * }\n * ```\n *\n * The resulting serialization is:\n * `alchemy_minedTransactions:*,0xABC|0xDEF,0x123:false:true`\n *\n * If a field is omitted, it is replaced with a `*`.\n *\n * The `addresses` array is split by the '|' character, and each to/from address\n * pair is separated by a ',' character.\n *\n */\nfunction serializeMinedTransactionsEvent(\n event: AlchemyMinedTransactionsEventFilter\n): string {\n const addresses = serializeAddressesField(event.addresses);\n const includeRemoved = serializeBooleanField(event.includeRemoved);\n const hashesOnly = serializeBooleanField(event.hashesOnly);\n return (\n ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE +\n ':' +\n addresses +\n ':' +\n includeRemoved +\n ':' +\n hashesOnly\n );\n}\n\nfunction serializeAddressesField(\n addresses: AlchemyMinedTransactionsAddress[] | undefined\n): string {\n if (addresses === undefined) {\n return '*';\n }\n\n return addresses\n .map(\n filter =>\n serializeAddressField(filter.to) +\n ',' +\n serializeAddressField(filter.from)\n )\n .join('|');\n}\n\nfunction serializeAddressField(\n field: string | Array | undefined\n): string {\n if (field === undefined) {\n return '*';\n } else if (Array.isArray(field)) {\n return field.join('|');\n } else {\n return field;\n }\n}\n\nfunction serializeBooleanField(field: boolean | undefined): string | undefined {\n if (field === undefined) {\n return '*';\n } else {\n return field.toString();\n }\n}\n\nexport function deserializeTopics(data: string): any {\n if (data === '') {\n return [];\n }\n\n return data.split(/&/g).map(topic => {\n if (topic === '') {\n return [];\n }\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 deserializeAddressField(data: string): string | string[] | undefined {\n if (data === '') {\n return undefined;\n }\n\n const addresses = data.split('|');\n return addresses.length === 1 ? addresses[0] : addresses;\n}\n\nfunction deserializeAddressesField(\n data: string\n): NonEmptyArray | undefined {\n if (data === '') {\n return undefined;\n }\n\n // Perform a cast here since TS doesn't know we're guaranteed a non-empty\n // array from deserializing.\n return data\n .split('|')\n .map(addressStr => addressStr.split(','))\n .map(addressPair => ({\n ...(addressPair[0] !== '*' && { to: addressPair[0] }),\n ...(addressPair[1] !== '*' && { from: addressPair[1] })\n })) as NonEmptyArray;\n}\n","import type { Listener } from '@ethersproject/abstract-provider';\n\nimport { isAlchemyEvent } from '../internal/ethers-event';\nimport {\n AlchemyEventType,\n AlchemyMinedTransactionsAddress,\n AlchemySubscription,\n NonEmptyArray\n} from '../types/types';\nimport { AlchemyConfig } from './alchemy-config';\n\n/**\n * The Websocket namespace contains all subscription related functions that\n * allow you to subscribe to events and receive updates as they occur. The\n * underlying WebSocket provider has additional logic to handle reconnections\n * and automatically backfills missed events.\n *\n * Do not call this constructor directly. Instead, instantiate an Alchemy object\n * with `const alchemy = new Alchemy(config)` and then access the core namespace\n * via `alchemy.ws`.\n */\nexport class WebSocketNamespace {\n /** @internal */\n constructor(private readonly config: AlchemyConfig) {}\n\n /**\n * Adds a listener to be triggered for each {@link eventName} event. Also\n * includes Alchemy's Subscription API events. See {@link AlchemyEventType} for\n * how to use them.\n *\n * @param eventName The event to listen for.\n * @param listener The listener to call when the event is triggered.\n * @public\n */\n on(eventName: AlchemyEventType, listener: Listener): this {\n void (async () => {\n const provider = await this.config.getWebSocketProvider();\n const processedEvent = await this._resolveEnsAlchemyEvent(eventName);\n provider.on(processedEvent, listener);\n })();\n return this;\n }\n\n /**\n * Adds a listener to be triggered for only the next {@link eventName} event,\n * after which it will be removed. Also includes Alchemy's Subscription API\n * events. See {@link AlchemyEventType} for how to use them.\n *\n * @param eventName The event to listen for.\n * @param listener The listener to call when the event is triggered.\n * @public\n */\n once(eventName: AlchemyEventType, listener: Listener): this {\n void (async () => {\n const provider = await this.config.getWebSocketProvider();\n const processedEvent = await this._resolveEnsAlchemyEvent(eventName);\n provider.once(processedEvent, listener);\n })();\n return this;\n }\n\n /**\n * Removes the provided {@link listener} for the {@link eventName} event. If no\n * listener is provided, all listeners for the event will be removed.\n *\n * @param eventName The event to unlisten to.\n * @param listener The listener to remove.\n * @public\n */\n off(eventName: AlchemyEventType, listener?: Listener): this {\n void (async () => {\n const provider = await this.config.getWebSocketProvider();\n const processedEvent = await this._resolveEnsAlchemyEvent(eventName);\n return provider.off(processedEvent, listener);\n })();\n return this;\n }\n\n /**\n * Remove all listeners for the provided {@link eventName} event. If no event\n * is provided, all events and their listeners are removed.\n *\n * @param eventName The event to remove all listeners for.\n * @public\n */\n removeAllListeners(eventName?: AlchemyEventType): this {\n void (async () => {\n const provider = await this.config.getWebSocketProvider();\n const processedEvent = eventName\n ? await this._resolveEnsAlchemyEvent(eventName)\n : undefined;\n provider.removeAllListeners(processedEvent);\n })();\n return this;\n }\n\n /**\n * Returns the number of listeners for the provided {@link eventName} event. If\n * no event is provided, the total number of listeners for all events is returned.\n *\n * @param eventName The event to get the number of listeners for.\n * @public\n */\n async listenerCount(eventName?: AlchemyEventType): Promise {\n const provider = await this.config.getWebSocketProvider();\n const processedEvent = eventName\n ? await this._resolveEnsAlchemyEvent(eventName)\n : undefined;\n return provider.listenerCount(processedEvent);\n }\n\n /**\n * Returns an array of listeners for the provided {@link eventName} event. If\n * no event is provided, all listeners will be included.\n *\n * @param eventName The event to get the listeners for.\n */\n async listeners(eventName?: AlchemyEventType): Promise {\n const provider = await this.config.getWebSocketProvider();\n const processedEvent = eventName\n ? await this._resolveEnsAlchemyEvent(eventName)\n : undefined;\n return provider.listeners(processedEvent);\n }\n\n /**\n * Converts ENS addresses in an Alchemy Event to the underlying resolved\n * address.\n *\n * VISIBLE ONLY FOR TESTING.\n *\n * @internal\n */\n async _resolveEnsAlchemyEvent(\n eventName: AlchemyEventType\n ): Promise {\n if (!isAlchemyEvent(eventName)) {\n return eventName;\n }\n\n if (\n eventName.method === AlchemySubscription.MINED_TRANSACTIONS &&\n eventName.addresses\n ) {\n const processedAddresses: AlchemyMinedTransactionsAddress[] = [];\n for (const address of eventName.addresses) {\n if (address.to) {\n address.to = await this._resolveNameOrError(address.to);\n }\n if (address.from) {\n address.from = await this._resolveNameOrError(address.from);\n }\n processedAddresses.push(address);\n }\n eventName.addresses =\n processedAddresses as NonEmptyArray;\n } else if (eventName.method === AlchemySubscription.PENDING_TRANSACTIONS) {\n if (eventName.fromAddress) {\n if (typeof eventName.fromAddress === 'string') {\n eventName.fromAddress = await this._resolveNameOrError(\n eventName.fromAddress\n );\n } else {\n eventName.fromAddress = await Promise.all(\n eventName.fromAddress.map(this._resolveNameOrError)\n );\n }\n }\n if (eventName.toAddress) {\n if (typeof eventName.toAddress === 'string') {\n eventName.toAddress = await this._resolveNameOrError(\n eventName.toAddress\n );\n } else {\n eventName.toAddress = await Promise.all(\n eventName.toAddress.map(this._resolveNameOrError)\n );\n }\n }\n }\n\n return eventName;\n }\n\n /**\n * Converts the provided ENS address or throws an error. This improves code\n * readability and type safety in other methods.\n *\n * VISIBLE ONLY FOR TESTING.\n *\n * @internal\n */\n async _resolveNameOrError(name: string): Promise {\n const provider = await this.config.getProvider();\n const resolved = await provider.resolveName(name);\n if (resolved === null) {\n throw new Error(`Unable to resolve the ENS address: ${name}`);\n }\n return resolved;\n }\n}\n","import { AlchemySettings } from '../types/types';\nimport { AlchemyConfig } from './alchemy-config';\nimport { CoreNamespace } from './core-namespace';\nimport { NftNamespace } from './nft-namespace';\nimport { NotifyNamespace } from './notify-namespace';\nimport { TransactNamespace } from './transact-namespace';\nimport { WebSocketNamespace } from './websocket-namespace';\n\n/**\n * The Alchemy SDK client. This class is the main entry point into Alchemy's\n * APIs and separates functionality into different namespaces.\n *\n * Each SDK instance is associated with a specific network and API key. To use a\n * different network or API key, create a new instance of {@link Alchemy}.\n *\n * @public\n */\nexport class Alchemy {\n /**\n * The `core` namespace contains the core eth json-rpc calls and Alchemy's\n * Enhanced APIs.\n */\n readonly core: CoreNamespace;\n\n /** The `nft` namespace contains methods for Alchemy's NFT API. */\n readonly nft: NftNamespace;\n\n /** The `ws` namespace contains methods for using WebSockets and creating subscriptions. */\n readonly ws: WebSocketNamespace;\n\n /**\n * The `transact` namespace contains methods for sending transactions and\n * checking on the state of submitted transasctions.\n */\n readonly transact: TransactNamespace;\n\n /**\n * Holds the setting information for the instance of the Alchemy SDK client\n * and allows access to the underlying providers.\n */\n readonly config: AlchemyConfig;\n\n /**\n * The `notify` namespace contains methods for creating and managing webhooks\n * as part of the Notify API.\n */\n readonly notify: NotifyNamespace;\n\n /**\n * @param {string} [settings.apiKey] - The API key to use for Alchemy\n * @param {Network} [settings.network] - The network to use for Alchemy\n * @param {number} [settings.maxRetries] - The maximum number of retries to attempt\n * @public\n */\n constructor(settings?: AlchemySettings) {\n this.config = new AlchemyConfig(settings);\n\n this.core = new CoreNamespace(this.config);\n this.nft = new NftNamespace(this.config);\n this.ws = new WebSocketNamespace(this.config);\n this.transact = new TransactNamespace(this.config);\n this.notify = new NotifyNamespace(this.config);\n }\n}\n","import {\n BlockTag,\n FeeData,\n Provider,\n TransactionRequest,\n TransactionResponse\n} from '@ethersproject/abstract-provider';\nimport { ExternallyOwnedAccount } from '@ethersproject/abstract-signer';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { BytesLike } from '@ethersproject/bytes';\nimport { Deferrable } from '@ethersproject/properties';\nimport { SigningKey } from '@ethersproject/signing-key';\nimport { Wallet as EthersWallet } from '@ethersproject/wallet';\n\nimport { Alchemy } from './alchemy';\n\n/**\n * The Wallet class inherits Signer and can sign transactions and messages using\n * a private key as a standard Externally Owned Account (EOA).\n *\n * SDK's custom implementation of Ethers.js's 'Wallet'.\n *\n * Primary difference from Ethers.js 'Wallet' is that you can pass in either a\n * Provider or an Alchemy object. This implementation will intelligently detect\n * the format and set the provider accordingly.\n *\n * @public\n * @override\n */\nexport class Wallet extends EthersWallet {\n private alchemyProviderPromise?: Promise;\n\n /**\n * Overload permits users to pass in either a standard Provider or an Alchemy\n * object. The constructor will detect the object type and handle appropriately.\n *\n * @override\n */\n constructor(\n privateKey: BytesLike | ExternallyOwnedAccount | SigningKey,\n alchemyOrProvider?: Alchemy | Provider\n ) {\n // If object passed in is a provider, send to super\n let superProvider: Provider | undefined;\n if (alchemyOrProvider && Provider.isProvider(alchemyOrProvider)) {\n superProvider = alchemyOrProvider;\n }\n super(privateKey, superProvider);\n\n // If object passed in is an Alchemy object, just set Alchemy\n if (alchemyOrProvider && !Provider.isProvider(alchemyOrProvider)) {\n this.alchemyProviderPromise = alchemyOrProvider.config.getProvider();\n }\n }\n\n //////////////////////////////////////////////////////////////////\n // Set of overrides from Signer to handle async provider retrieval.\n //////////////////////////////////////////////////////////////////\n\n /**\n * Returns the balance of this wallet at blockTag.\n *\n * @param blockTag The block to check the balance of\n * @override\n */\n getBalance(blockTag?: BlockTag): Promise {\n return this.getWallet().then(wallet => wallet.getBalance(blockTag));\n }\n\n /**\n * Returns the number of transactions this account has ever sent. This is the\n * value required to be included in transactions as the nonce.\n *\n * @param blockTag The block to check the transaction count on\n * @override\n */\n getTransactionCount(blockTag?: BlockTag): Promise {\n return this.getWallet().then(wallet =>\n wallet.getTransactionCount(blockTag)\n );\n }\n\n /**\n * Returns the result of estimating the cost to send the transactionRequest,\n * with this account address being used as the from field.\n *\n * @param transaction Transaction to estimate the gas on\n * @override\n */\n estimateGas(transaction: Deferrable): Promise {\n return this.getWallet().then(wallet => wallet.estimateGas(transaction));\n }\n\n /**\n * Returns the result of calling using the transactionRequest, with this\n * account address being used as the from field.\n *\n * @param transaction To make a call on\n * @param blockTag The block to make the call on\n * @override\n */\n call(\n transaction: Deferrable,\n blockTag?: BlockTag\n ): Promise {\n return this.getWallet().then(wallet => wallet.call(transaction, blockTag));\n }\n\n /**\n * Populates all fields in a transaction, signs it and sends it to the network\n *\n * @override\n */\n sendTransaction(\n transaction: Deferrable\n ): Promise {\n return this.getWallet().then(wallet => wallet.sendTransaction(transaction));\n }\n\n /**\n * Returns the chain ID this wallet is connected to.\n *\n * @override\n */\n getChainId(): Promise {\n return this.getWallet().then(wallet => wallet.getChainId());\n }\n\n /**\n * Returns the current gas price.\n *\n * @override\n */\n getGasPrice(): Promise {\n return this.getWallet().then(wallet => wallet.getGasPrice());\n }\n\n /**\n * Returns the current recommended FeeData to use in a transaction.\n *\n * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas\n * should be used.\n *\n * For legacy transactions and networks which do not support EIP-1559, the\n * gasPrice should be used.\n *\n * @override\n */\n getFeeData(): Promise {\n return this.getWallet().then(wallet => wallet.getFeeData());\n }\n\n /**\n * Looks up the address of name. If the name is not owned, or does not have a\n * Resolver configured, or the Resolver does not have an address configured,\n * null is returned.\n *\n * @param name Name of the ENS address\n * @override\n */\n resolveName(name: string): Promise {\n return this.getWallet().then(wallet => wallet.resolveName(name));\n }\n\n private async getWallet() {\n if (!this.alchemyProviderPromise) {\n return this.connect(this.provider);\n }\n return this.connect(await this.alchemyProviderPromise);\n }\n}\n","import {\n Contract as EthersContract,\n ContractFactory as EthersContractFactory\n} from '@ethersproject/contracts';\n\n/**\n * The Contract class is a wrapper around the Contract class from ethers.js and\n * is exported here for convenience.\n *\n * @public\n */\n// TODO: support passing in Alchemy instance into the contract.\nexport class Contract extends EthersContract {}\n\n/**\n * The ContractFactory class is a wrapper around the ContractFactory class from\n * ethers.js and is exported here for convenience.\n *\n * @public\n */\nexport class ContractFactory extends EthersContractFactory {}\n"],"names":["EthersWallet","EthersContract","EthersContractFactory"],"mappings":";;;;;;;AA0DA;;;;;;;AAOG;IACS,QAoBX;AApBD,CAAA,UAAY,OAAO,EAAA;AACjB,IAAA,OAAA,CAAA,aAAA,CAAA,GAAA,aAA2B,CAAA;;AAE3B,IAAA,OAAA,CAAA,aAAA,CAAA,GAAA,aAA2B,CAAA;AAC3B,IAAA,OAAA,CAAA,YAAA,CAAA,GAAA,YAAyB,CAAA;;AAEzB,IAAA,OAAA,CAAA,WAAA,CAAA,GAAA,WAAuB,CAAA;;AAEvB,IAAA,OAAA,CAAA,aAAA,CAAA,GAAA,aAA2B,CAAA;AAC3B,IAAA,OAAA,CAAA,aAAA,CAAA,GAAA,aAA2B,CAAA;;AAE3B,IAAA,OAAA,CAAA,WAAA,CAAA,GAAA,WAAuB,CAAA;AACvB,IAAA,OAAA,CAAA,YAAA,CAAA,GAAA,YAAyB,CAAA;AACzB,IAAA,OAAA,CAAA,aAAA,CAAA,GAAA,aAA2B,CAAA;;AAE3B,IAAA,OAAA,CAAA,aAAA,CAAA,GAAA,aAA2B,CAAA;AAC3B,IAAA,OAAA,CAAA,YAAA,CAAA,GAAA,YAAyB,CAAA;AACzB,IAAA,OAAA,CAAA,eAAA,CAAA,GAAA,iBAAiC,CAAA;AACjC,IAAA,OAAA,CAAA,cAAA,CAAA,GAAA,gBAA+B,CAAA;AAC/B,IAAA,OAAA,CAAA,eAAA,CAAA,GAAA,eAA+B,CAAA;AACjC,CAAC,EApBW,OAAO,KAAP,OAAO,GAoBlB,EAAA,CAAA,CAAA,CAAA;AAED;IACY,iBAaX;AAbD,CAAA,UAAY,gBAAgB,EAAA;AAC1B;;;A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,EAAE,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;KAClE;IAEa,SAAS,GAAA;;AACrB,YAAA,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE;gBAChC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACpC,aAAA;YACD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,sBAAsB,CAAC,CAAC;SACxD,CAAA,CAAA;AAAA,KAAA;AACF;;ACrKD;;;;;AAKG;AACH;AACM,MAAO,QAAS,SAAQC,UAAc,CAAA;AAAG,CAAA;AAE/C;;;;;AAKG;AACG,MAAO,eAAgB,SAAQC,iBAAqB,CAAA;AAAG;;;;"} \ No newline at end of file diff --git a/test/node_modules/alchemy-sdk/dist/esm/index.js b/test/node_modules/alchemy-sdk/dist/esm/index.js new file mode 100644 index 0000000..a35baef --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/index.js @@ -0,0 +1,9 @@ +import * as utils from './api/utils'; +export { utils as Utils }; +export { k as Alchemy, h as AlchemySubscription, q as AssetTransfersCategory, r as AssetTransfersOrder, m as Contract, o as ContractFactory, G as GasOptimizedTransactionStatus, N as Network, x as NftExcludeFilters, y as NftFilters, z as NftOrdering, B as NftSaleMarketplace, F as NftSaleTakerType, w as NftSpamClassification, u as NftTokenType, O as OpenSeaSafelistRequestStatus, R as RefreshState, S as SortingOrder, T as TokenBalanceType, W as Wallet, J as WebhookType, H as WebhookVersion, f as fromHex, p as isHex, s as setLogLevel, t as toHex } from './index-02af91ae.js'; +import '@ethersproject/bignumber'; +import 'axios'; +import '@ethersproject/abstract-provider'; +import '@ethersproject/wallet'; +import '@ethersproject/contracts'; +//# sourceMappingURL=index.js.map diff --git a/test/node_modules/alchemy-sdk/dist/esm/index.js.map b/test/node_modules/alchemy-sdk/dist/esm/index.js.map new file mode 100644 index 0000000..9aee79f --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"} \ No newline at end of file diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/api/alchemy-config.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/api/alchemy-config.d.ts new file mode 100644 index 0000000..0ba461a --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/api/alchemy-config.d.ts @@ -0,0 +1,54 @@ +import { AlchemySettings, Network } from '../types/types'; +import type { AlchemyProvider } from './alchemy-provider'; +import type { AlchemyWebSocketProvider } from './alchemy-websocket-provider'; +/** + * This class holds the config information for the SDK client instance and + * exposes the underlying providers for more advanced use cases. + * + * @public + */ +export declare class AlchemyConfig { + /** The Alchemy API key. */ + readonly apiKey: string; + /** The Network that this SDK is associated with. */ + readonly network: Network; + /** The maximum number of retries to perform. */ + readonly maxRetries: number; + /** Setting to enable automatic batching on json-rpc requests. Defaults to false.*/ + readonly batchRequests: boolean; + /** + * The optional hardcoded URL to send requests to instead of using the network + * and apiKey. + */ + readonly url?: string; + /** The optional Alchemy auth token to use when sending requests with the Notify API. */ + readonly authToken?: string; + constructor(config?: AlchemySettings); + /** + * Returns an AlchemyProvider instance. Only one provider is created per + * Alchemy instance. + * + * The AlchemyProvider is a wrapper around ether's `AlchemyProvider` class and + * has been expanded to support Alchemy's Enhanced APIs. + * + * Most common methods on the provider are available as top-level methods on + * the {@link Alchemy} instance, but the provider is exposed here to access + * other less-common methods. + * + * @public + */ + getProvider(): Promise; + /** + * Returns an AlchemyWebsocketProvider instance. Only one provider is created + * per Alchemy instance. + * + * The AlchemyWebSocketProvider is a wrapper around ether's + * `AlchemyWebSocketProvider` class and has been expanded to support Alchemy's + * Subscription APIs, automatic backfilling, and other performance improvements. + * + * Most common methods on the provider are available as top-level methods on + * the {@link Alchemy} instance, but the provider is exposed here to access + * other less-common methods. + */ + getWebSocketProvider(): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/api/alchemy-contract.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/api/alchemy-contract.d.ts new file mode 100644 index 0000000..a1766ad --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/api/alchemy-contract.d.ts @@ -0,0 +1,17 @@ +import { Contract as EthersContract, ContractFactory as EthersContractFactory } from '@ethersproject/contracts'; +/** + * The Contract class is a wrapper around the Contract class from ethers.js and + * is exported here for convenience. + * + * @public + */ +export declare class Contract extends EthersContract { +} +/** + * The ContractFactory class is a wrapper around the ContractFactory class from + * ethers.js and is exported here for convenience. + * + * @public + */ +export declare class ContractFactory extends EthersContractFactory { +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/api/alchemy-provider.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/api/alchemy-provider.d.ts new file mode 100644 index 0000000..4e2d71e --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/api/alchemy-provider.d.ts @@ -0,0 +1,40 @@ +import { Network as NetworkFromEthers } from '@ethersproject/networks'; +import { CommunityResourcable, JsonRpcProvider } from '@ethersproject/providers'; +/** + * SDK's custom implementation of ethers.js's 'AlchemyProvider'. + * + * Do not call this constructor directly. Instead, instantiate an instance of + * {@link Alchemy} and call {@link Alchemy.config.getProvider()}. + * + * @public + */ +export declare class AlchemyProvider extends JsonRpcProvider implements CommunityResourcable { + readonly apiKey: string; + readonly maxRetries: number; + readonly batchRequests: boolean; + /** + * Overrides the method in ethers.js's `StaticJsonRpcProvider` class. This + * method is called when calling methods on the parent class `BaseProvider`. + * + * @override + */ + detectNetwork(): Promise; + _startPending(): void; + /** + * Overrides the ether's `isCommunityResource()` method. Returns true if the + * current api key is the default key. + * + * @override + */ + isCommunityResource(): boolean; + /** + * Overrides the base {@link JsonRpcProvider.send} method to implement custom + * logic for sending requests to Alchemy. + * + * @param method The method name to use for the request. + * @param params The parameters to use for the request. + * @override + * @public + */ + send(method: string, params: Array): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/api/alchemy-wallet.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/api/alchemy-wallet.d.ts new file mode 100644 index 0000000..026d469 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/api/alchemy-wallet.d.ts @@ -0,0 +1,103 @@ +import { BlockTag, FeeData, Provider, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; +import { ExternallyOwnedAccount } from '@ethersproject/abstract-signer'; +import { BigNumber } from '@ethersproject/bignumber'; +import { BytesLike } from '@ethersproject/bytes'; +import { Deferrable } from '@ethersproject/properties'; +import { SigningKey } from '@ethersproject/signing-key'; +import { Wallet as EthersWallet } from '@ethersproject/wallet'; +import { Alchemy } from './alchemy'; +/** + * The Wallet class inherits Signer and can sign transactions and messages using + * a private key as a standard Externally Owned Account (EOA). + * + * SDK's custom implementation of Ethers.js's 'Wallet'. + * + * Primary difference from Ethers.js 'Wallet' is that you can pass in either a + * Provider or an Alchemy object. This implementation will intelligently detect + * the format and set the provider accordingly. + * + * @public + * @override + */ +export declare class Wallet extends EthersWallet { + private alchemyProviderPromise?; + /** + * Overload permits users to pass in either a standard Provider or an Alchemy + * object. The constructor will detect the object type and handle appropriately. + * + * @override + */ + constructor(privateKey: BytesLike | ExternallyOwnedAccount | SigningKey, alchemyOrProvider?: Alchemy | Provider); + /** + * Returns the balance of this wallet at blockTag. + * + * @param blockTag The block to check the balance of + * @override + */ + getBalance(blockTag?: BlockTag): Promise; + /** + * Returns the number of transactions this account has ever sent. This is the + * value required to be included in transactions as the nonce. + * + * @param blockTag The block to check the transaction count on + * @override + */ + getTransactionCount(blockTag?: BlockTag): Promise; + /** + * Returns the result of estimating the cost to send the transactionRequest, + * with this account address being used as the from field. + * + * @param transaction Transaction to estimate the gas on + * @override + */ + estimateGas(transaction: Deferrable): Promise; + /** + * Returns the result of calling using the transactionRequest, with this + * account address being used as the from field. + * + * @param transaction To make a call on + * @param blockTag The block to make the call on + * @override + */ + call(transaction: Deferrable, blockTag?: BlockTag): Promise; + /** + * Populates all fields in a transaction, signs it and sends it to the network + * + * @override + */ + sendTransaction(transaction: Deferrable): Promise; + /** + * Returns the chain ID this wallet is connected to. + * + * @override + */ + getChainId(): Promise; + /** + * Returns the current gas price. + * + * @override + */ + getGasPrice(): Promise; + /** + * Returns the current recommended FeeData to use in a transaction. + * + * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas + * should be used. + * + * For legacy transactions and networks which do not support EIP-1559, the + * gasPrice should be used. + * + * @override + */ + getFeeData(): Promise; + /** + * Looks up the address of name. If the name is not owned, or does not have a + * Resolver configured, or the Resolver does not have an address configured, + * null is returned. + * + * @param name Name of the ENS address + * @override + */ + resolveName(name: string): Promise; + private getWallet; +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/api/alchemy-websocket-provider.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/api/alchemy-websocket-provider.d.ts new file mode 100644 index 0000000..ce7a704 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/api/alchemy-websocket-provider.d.ts @@ -0,0 +1,135 @@ +import { Listener } from '@ethersproject/abstract-provider'; +import { CommunityResourcable, WebSocketProvider } from '@ethersproject/providers'; +import { EthersEvent } from '../internal/ethers-event'; +import { AlchemyEventType } from '../types/types'; +/** + * SDK's custom implementation fo the ethers.js's 'AlchemyWebSocketProvider'. + * + * Do not call this constructor directly. Instead, instantiate an instance of + * {@link Alchemy} and call {@link Alchemy.config.getWebSocketProvider()}. + * + * @public + */ +export declare class AlchemyWebSocketProvider extends WebSocketProvider implements CommunityResourcable { + _events: Array; + readonly apiKey: string; + /** + * Overridden implementation of ethers that includes Alchemy based subscriptions. + * + * @param eventName Event to subscribe to + * @param listener The listener function to call when the event is triggered. + * @override + * @public + */ + on(eventName: AlchemyEventType, listener: Listener): this; + /** + * Overridden implementation of ethers that includes Alchemy based + * subscriptions. Adds a listener to the triggered for only the next + * {@link eventName} event, after which it will be removed. + * + * @param eventName Event to subscribe to + * @param listener The listener function to call when the event is triggered. + * @override + * @public + */ + once(eventName: AlchemyEventType, listener: Listener): this; + /** + * Removes the provided {@link listener} for the {@link eventName} event. If no + * listener is provided, all listeners for the event will be removed. + * + * @param eventName Event to unlisten to. + * @param listener The listener function to remove. + * @override + * @public + */ + off(eventName: AlchemyEventType, listener?: Listener): this; + /** + * Remove all listeners for the provided {@link eventName} event. If no event + * is provided, all events and their listeners are removed. + * + * @param eventName The event to remove all listeners for. + * @override + * @public + */ + removeAllListeners(eventName?: AlchemyEventType): this; + /** + * Returns the number of listeners for the provided {@link eventName} event. If + * no event is provided, the total number of listeners for all events is returned. + * + * @param eventName The event to get the number of listeners for. + * @public + * @override + */ + listenerCount(eventName?: AlchemyEventType): number; + /** + * Returns an array of listeners for the provided {@link eventName} event. If + * no event is provided, all listeners will be included. + * + * @param eventName The event to get the listeners for. + * @public + * @override + */ + listeners(eventName?: AlchemyEventType): Array; + /** @override */ + destroy(): Promise; + /** + * Overrides the ether's `isCommunityResource()` method. Returns true if the + * current api key is the default key. + * + * @override + */ + isCommunityResource(): boolean; + private emitEvent; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.off()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _off; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.removeAllListeners()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _removeAllListeners; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.listenerCount()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _listenerCount; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.listeners()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _listeners; +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/api/alchemy.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/api/alchemy.d.ts new file mode 100644 index 0000000..edc191f --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/api/alchemy.d.ts @@ -0,0 +1,49 @@ +import { AlchemySettings } from '../types/types'; +import { AlchemyConfig } from './alchemy-config'; +import { CoreNamespace } from './core-namespace'; +import { NftNamespace } from './nft-namespace'; +import { NotifyNamespace } from './notify-namespace'; +import { TransactNamespace } from './transact-namespace'; +import { WebSocketNamespace } from './websocket-namespace'; +/** + * The Alchemy SDK client. This class is the main entry point into Alchemy's + * APIs and separates functionality into different namespaces. + * + * Each SDK instance is associated with a specific network and API key. To use a + * different network or API key, create a new instance of {@link Alchemy}. + * + * @public + */ +export declare class Alchemy { + /** + * The `core` namespace contains the core eth json-rpc calls and Alchemy's + * Enhanced APIs. + */ + readonly core: CoreNamespace; + /** The `nft` namespace contains methods for Alchemy's NFT API. */ + readonly nft: NftNamespace; + /** The `ws` namespace contains methods for using WebSockets and creating subscriptions. */ + readonly ws: WebSocketNamespace; + /** + * The `transact` namespace contains methods for sending transactions and + * checking on the state of submitted transasctions. + */ + readonly transact: TransactNamespace; + /** + * Holds the setting information for the instance of the Alchemy SDK client + * and allows access to the underlying providers. + */ + readonly config: AlchemyConfig; + /** + * The `notify` namespace contains methods for creating and managing webhooks + * as part of the Notify API. + */ + readonly notify: NotifyNamespace; + /** + * @param {string} [settings.apiKey] - The API key to use for Alchemy + * @param {Network} [settings.network] - The network to use for Alchemy + * @param {number} [settings.maxRetries] - The maximum number of retries to attempt + * @public + */ + constructor(settings?: AlchemySettings); +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/api/core-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/api/core-namespace.d.ts new file mode 100644 index 0000000..5a5827d --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/api/core-namespace.d.ts @@ -0,0 +1,311 @@ +import type { Block, BlockTag, BlockWithTransactions, FeeData, Filter, FilterByBlockHash, Log, TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; +import type { BigNumber, BigNumberish } from '@ethersproject/bignumber'; +import type { Network as EthersNetworkAlias } from '@ethersproject/networks/lib/types'; +import type { Deferrable } from '@ethersproject/properties'; +import { AssetTransfersParams, AssetTransfersResponse, AssetTransfersWithMetadataParams, AssetTransfersWithMetadataResponse, DeployResult, TokenBalancesOptionsDefaultTokens, TokenBalancesOptionsErc20, TokenBalancesResponse, TokenBalancesResponseErc20, TokenMetadataResponse, TransactionReceiptsParams, TransactionReceiptsResponse } from '../types/types'; +/** + * The core namespace contains all commonly-used [Ethers.js + * Provider](https://docs.ethers.io/v5/api/providers/api-providers/#AlchemyProvider) + * methods. If you are already using Ethers.js, you should be simply able to + * replace the Ethers.js Provider object with `alchemy.core` when accessing + * provider methods and it should just work. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.core`. + */ +export declare class CoreNamespace { + private readonly config; + /** + * Returns the balance of a given address as of the provided block. + * + * @param addressOrName The address or name of the account to get the balance for. + * @param blockTag The optional block number or hash to get the balance for. + * Defaults to 'latest' if unspecified. + * @public + */ + getBalance(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Returns the contract code of the provided address at the block. If there is + * no contract deployed, the result is `0x`. + * + * @param addressOrName The address or name of the account to get the code for. + * @param blockTag The optional block number or hash to get the code for. + * Defaults to 'latest' if unspecified. + * @public + */ + getCode(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Return the value of the provided position at the provided address, at the + * provided block in `Bytes32` format. + * + * @param addressOrName The address or name of the account to get the code for. + * @param position The position of the storage slot to get. + * @param blockTag The optional block number or hash to get the code for. + * Defaults to 'latest' if unspecified. + * @public + */ + getStorageAt(addressOrName: string | Promise, position: BigNumberish | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Returns the number of transactions ever sent from the provided address, as + * of the provided block tag. This value is used as the nonce for the next + * transaction from the address sent to the network. + * + * @param addressOrName The address or name of the account to get the nonce for. + * @param blockTag The optional block number or hash to get the nonce for. + * @public + */ + getTransactionCount(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Returns the block from the network based on the provided block number or + * hash. Transactions on the block are represented as an array of transaction + * hashes. To get the full transaction details on the block, use + * {@link getBlockWithTransactions} instead. + * + * @param blockHashOrBlockTag The block number or hash to get the block for. + * @public + */ + getBlock(blockHashOrBlockTag: BlockTag | string | Promise): Promise; + /** + * Returns the block from the network based on the provided block number or + * hash. Transactions on the block are represented as an array of + * {@link TransactionResponse} objects. + * + * @param blockHashOrBlockTag The block number or hash to get the block for. + * @public + */ + getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise): Promise; + /** + * Returns the {@link EthersNetworkAlias} Alchemy is connected to. + * + * @public + */ + getNetwork(): Promise; + /** + * Returns the block number of the most recently mined block. + * + * @public + */ + getBlockNumber(): Promise; + /** + * Returns the best guess of the current gas price to use in a transaction. + * + * @public + */ + getGasPrice(): Promise; + /** + * Returns the recommended fee data to use in a transaction. + * + * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas + * should be used. + * + * For legacy transactions and networks which do not support EIP-1559, the + * gasPrice should be used. + * + * @public + */ + getFeeData(): Promise; + /** + * Returns a Promise which will stall until the network has heen established, + * ignoring errors due to the target node not being active yet. + * + * This can be used for testing or attaching scripts to wait until the node is + * up and running smoothly. + * + * @public + */ + ready(): Promise; + /** + * Returns the result of executing the transaction, using call. A call does + * not require any ether, but cannot change any state. This is useful for + * calling getters on Contracts. + * + * @param transaction The transaction to execute. + * @param blockTag The optional block number or hash to get the call for. + * @public + */ + call(transaction: Deferrable, blockTag?: BlockTag | Promise): Promise; + /** + * Returns an estimate of the amount of gas that would be required to submit + * transaction to the network. + * + * An estimate may not be accurate since there could be another transaction on + * the network that was not accounted for, but after being mined affects the + * relevant state. + * + * This is an alias for {@link TransactNamespace.estimateGas}. + * + * @param transaction The transaction to estimate gas for. + * @public + */ + estimateGas(transaction: Deferrable): Promise; + /** + * Returns the transaction with hash or null if the transaction is unknown. + * + * If a transaction has not been mined, this method will search the + * transaction pool. Various backends may have more restrictive transaction + * pool access (e.g. if the gas price is too low or the transaction was only + * recently sent and not yet indexed) in which case this method may also return null. + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransaction(transactionHash: string | Promise): Promise; + /** + * Returns the transaction receipt for hash or null if the transaction has not + * been mined. + * + * To stall until the transaction has been mined, consider the + * waitForTransaction method below. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransactionReceipt(transactionHash: string | Promise): Promise; + /** + * Submits transaction to the network to be mined. The transaction must be + * signed, and be valid (i.e. the nonce is correct and the account has + * sufficient balance to pay for the transaction). + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param signedTransaction The signed transaction to send. + * @public + */ + sendTransaction(signedTransaction: string | Promise): Promise; + /** + * Returns a promise which will not resolve until specified transaction hash is mined. + * + * If {@link confirmations} is 0, this method is non-blocking and if the + * transaction has not been mined returns null. Otherwise, this method will + * block until the transaction has confirmed blocks mined on top of the block + * in which it was mined. + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to wait for. + * @param confirmations The number of blocks to wait for. + * @param timeout The maximum time to wait for the transaction to confirm. + * @public + */ + waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise; + /** + * Returns an array of logs that match the provided filter. + * + * @param filter The filter object to use. + * @public + */ + getLogs(filter: Filter | FilterByBlockHash | Promise): Promise>; + /** + * Allows sending a raw message to the Alchemy backend. + * + * @param method The method to call. + * @param params The parameters to pass to the method. + * @public + */ + send(method: string, params: Array): Promise; + /** + * Finds the address that deployed the provided contract and block number it + * was deployed in. + * + * NOTE: This method performs a binary search across all blocks since genesis + * and can take a long time to complete. This method is a convenience method + * that will eventually be replaced by a single call to an Alchemy endpoint + * with this information cached. + * + * @param contractAddress - The contract address to find the deployer for. + * @beta + */ + findContractDeployer(contractAddress: string): Promise; + /** + * Returns the ERC-20 token balances for a specific owner address. + * + * @param addressOrName The owner address to get the token balances for. + * @public + */ + getTokenBalances(addressOrName: string): Promise; + /** + * Returns the token balances for a specific owner address given a list of contracts. + * + * @param addressOrName The owner address to get the token balances for. + * @param contractAddresses A list of contract addresses to check. If omitted, + * all ERC-20 tokens will be checked. + * @public + */ + getTokenBalances(addressOrName: string, contractAddresses?: string[]): Promise; + /** + * Returns the ERC-20 token balances for a specific owner. + * + * This overload covers the erc-20 token type which includes a page key in the response. + * + * @param addressOrName The owner address to get the token balances for. + * @param options Token type options set to ERC-20 with optional page key. + * @public + */ + getTokenBalances(addressOrName: string, options: TokenBalancesOptionsErc20): Promise; + /** + * Returns the token balances for a specific owner, fetching from the top 100 + * tokens by 24 hour volume. + * + * This overload covers the default token type which includes a page key in + * the response. + * + * @param addressOrName The owner address to get the token balances for. + * @param options Token type options set to ERC-20 with optional page key. + * @public + */ + getTokenBalances(addressOrName: string, options: TokenBalancesOptionsDefaultTokens): Promise; + /** + * Returns metadata for a given token contract address. + * + * @param address The contract address to get metadata for. + * @public + */ + getTokenMetadata(address: string): Promise; + /** + * Get transactions for specific addresses. See the web documentation for the + * full details: + * https://docs.alchemy.com/alchemy/enhanced-apis/transfers-api#alchemy_getassettransfers + * + * This overload requires {@link AssetTransfersWithMetadataParams.withMetadata} + * to be set to `true`, which results in additional metadata returned in the + * response object. + * + * @param params An object containing fields for the asset transfer query + * @public + */ + getAssetTransfers(params: AssetTransfersWithMetadataParams): Promise; + /** + * Get transactions for specific addresses. See the web documentation for the + * full details: + * https://docs.alchemy.com/alchemy/enhanced-apis/transfers-api#alchemy_getassettransfers + * + * @param params An object containing fields for the asset transfer query. + * @public + */ + getAssetTransfers(params: AssetTransfersParams): Promise; + /** + * Gets all transaction receipts for a given block by number or block hash. + * + * @param params An object containing fields for the transaction receipt query. + * @public + */ + getTransactionReceipts(params: TransactionReceiptsParams): Promise; + /** + * Returns the underlying owner address for the provided ENS address, or `null` + * if the ENS name does not have an underlying address. + * + * @param name The ENS address name to resolve. + */ + resolveName(name: string): Promise; + /** + * Performs a reverse lookup of the address in ENS using the Reverse Registrar. If the name does not exist, or the forward lookup does not match, null is returned. + * + * An ENS name requires additional configuration to setup a reverse record, so not all ENS addresses will map back to the original ENS domain. + * + * @param address The address to look up the ENS domain name for. + */ + lookupAddress(address: string): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/api/nft-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/api/nft-namespace.d.ts new file mode 100644 index 0000000..09e756e --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/api/nft-namespace.d.ts @@ -0,0 +1,275 @@ +import type { BigNumberish } from '@ethersproject/bignumber'; +import { GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftResponse, NftAttributeRarity, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, NftTokenType, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult } from '../types/types'; +import { BaseNft, Nft, NftContract } from './nft'; +/** + * The NFT namespace contains all the functionality related to NFTs. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.nft`. + */ +export declare class NftNamespace { + private readonly config; + /** + * Get the NFT metadata associated with the provided parameters. + * + * @param contractAddress - The contract address of the NFT. + * @param tokenId - Token id of the NFT. + * @param tokenType - Optionally specify the type of token to speed up the query. + * @param tokenUriTimeoutInMs - No set timeout by default - When metadata is + * requested, this parameter is the timeout (in milliseconds) for the + * website hosting the metadata to respond. If you want to only access the + * cache and not live fetch any metadata for cache misses then set this value to 0. + * @public + */ + getNftMetadata(contractAddress: string, tokenId: BigNumberish, tokenType?: NftTokenType, tokenUriTimeoutInMs?: number): Promise; + /** + * Gets the NFT metadata for multiple NFT tokens. + * + * @param tokens An array of NFT tokens to fetch metadata for. + * @param options Configuration options for making the request. + */ + getNftMetadataBatch(tokens: Array, options?: NftMetadataBatchOptions): Promise; + /** + * Get the NFT collection metadata associated with the provided parameters. + * + * @param contractAddress - The contract address of the NFT. + * @public + */ + getContractMetadata(contractAddress: string): Promise; + /** + * Fetches all NFTs for a given owner and yields them in an async iterable. + * + * This method returns the full NFT for the owner and pages through all page + * keys until all NFTs have been fetched. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwnerIterator(owner: string, options?: GetNftsForOwnerOptions): AsyncIterable; + /** + * Fetches all NFTs for a given owner and yields them in an async iterable. + * + * This method returns the base NFTs that omit the associated metadata and + * pages through all page keys until all NFTs have been fetched. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwnerIterator(owner: string, options?: GetBaseNftsForOwnerOptions): AsyncIterable; + /** + * Get all NFTs for an owner. + * + * This method returns the full NFTs in the contract. To get all NFTs without + * their associated metadata, use {@link GetBaseNftsForOwnerOptions}. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwner(owner: string, options?: GetNftsForOwnerOptions): Promise; + /** + * Get all base NFTs for an owner. + * + * This method returns the base NFTs that omit the associated metadata. To get + * all NFTs with their associated metadata, use {@link GetNftsForOwnerOptions}. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwner(owner: string, options?: GetBaseNftsForOwnerOptions): Promise; + /** + * Get all NFTs for a given contract address. + * + * This method returns the full NFTs in the contract. To get all NFTs without + * their associated metadata, use {@link GetBaseNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The parameters to use for the request. or + * {@link NftContractNftsResponse} response. + * @beta + */ + getNftsForContract(contractAddress: string, options?: GetNftsForContractOptions): Promise; + /** + * Get all base NFTs for a given contract address. + * + * This method returns the base NFTs that omit the associated metadata. To get + * all NFTs with their associated metadata, use {@link GetNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftsForContract(contractAddress: string, options?: GetBaseNftsForContractOptions): Promise; + /** + * Fetches all NFTs for a given contract address and yields them in an async iterable. + * + * This method returns the full NFTs in the contract and pages through all + * page keys until all NFTs have been fetched. To get all NFTs without their + * associated metadata, use {@link GetBaseNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftsForContractIterator(contractAddress: string, options?: GetNftsForContractOptions): AsyncIterable; + /** + * Fetches all base NFTs for a given contract address and yields them in an + * async iterable. + * + * This method returns the base NFTs that omit the associated metadata and + * pages through all page keys until all NFTs have been fetched. To get all + * NFTs with their associated metadata, use {@link GetNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftsForContractIterator(contractAddress: string, options?: GetBaseNftsForContractOptions): AsyncIterable; + /** + * Gets all the owners for a given NFT contract along with the token balance. + * + * @param contractAddress - The NFT contract to get the owners for. + * @param options Optional parameters to use for the request. + * @public + */ + getOwnersForContract(contractAddress: string, options: GetOwnersForContractWithTokenBalancesOptions): Promise; + /** + * Gets all the owners for a given NFT contract. + * + * Note that token balances are omitted by default. To include token balances + * for each owner, use {@link GetOwnersForContractWithTokenBalancesOptions}, + * which has the `withTokenBalances` field set to `true`. + * + * @param contractAddress - The NFT contract to get the owners for. + * @param options Optional parameters to use for the request. + * @public + */ + getOwnersForContract(contractAddress: string, options?: GetOwnersForContractOptions): Promise; + /** + * Gets all the owners for a given NFT contract address and token ID. + * + * @param contractAddress - The NFT contract address. + * @param tokenId - Token id of the NFT. + * @beta + */ + getOwnersForNft(contractAddress: string, tokenId: BigNumberish): Promise; + /** + * Gets all NFT contracts held by the specified owner address. + * + * @param owner - Address for NFT owner (can be in ENS format!). + * @param options - The optional parameters to use for the request. + * @public + */ + getContractsForOwner(owner: string, options?: GetContractsForOwnerOptions): Promise; + /** + * DEPRECATED - Checks that the provided owner address owns one of more of the + * provided NFTs. + * + * @deprecated - Use {@link verifyNftOwnership} instead. This method will be + * removed in a future release. + * @param owner - The owner address to check. + * @param contractAddresses - An array of NFT contract addresses to check ownership for. + */ + checkNftOwnership(owner: string, contractAddresses: string[]): Promise; + /** + * Checks that the provided owner address owns one of more of the provided + * NFT. Returns a boolean indicating whether the owner address owns the provided NFT. + * + * @param owner - The owner address to check. + * @param contractAddress - An NFT contract address to check ownership for. + */ + verifyNftOwnership(owner: string, contractAddress: string): Promise; + /** + * Checks which of the provided NFTs the owner address owns. Returns a map of + * contract address to a boolean indicating whether the owner address owns the NFT. + * + * @param owner - The owner address to check. + * @param contractAddresses - An array NFT contract address to check ownership for. + */ + verifyNftOwnership(owner: string, contractAddresses: string[]): Promise<{ + [contractAddress: string]: boolean; + }>; + /** + * Returns whether a contract is marked as spam or not by Alchemy. For more + * information on how we classify spam, go to our NFT API FAQ at + * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification. + * + * @param contractAddress - The contract address to check. + * @beta + */ + isSpamContract(contractAddress: string): Promise; + /** + * Returns a list of all spam contracts marked by Alchemy. For details on how + * Alchemy marks spam contracts, go to + * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification. + * + * @beta + */ + getSpamContracts(): Promise; + /** + * Returns the floor prices of a NFT contract by marketplace. + * + * @param contractAddress - The contract address for the NFT collection. + * @beta + */ + getFloorPrice(contractAddress: string): Promise; + /** + * Returns NFT sales that have happened through on-chain marketplaces. + * + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftSales(options?: GetNftSalesOptions): Promise; + getNftSales(options?: GetNftSalesOptionsByContractAddress): Promise; + /** + * Get the rarity of each attribute of an NFT. + * + * @param contractAddress - Contract address for the NFT collection. + * @param tokenId - Token id of the NFT. + */ + computeRarity(contractAddress: string, tokenId: BigNumberish): Promise; + /** + * Search for a keyword across metadata of all ERC-721 and ERC-1155 smart contracts. + * + * @param query - The search string that you want to search for in contract metadata. + */ + searchContractMetadata(query: string): Promise; + /** + * Get a summary of attribute prevalence for an NFT collection. + * + * @param contractAddress - Contract address for the NFT collection. + */ + summarizeNftAttributes(contractAddress: string): Promise; + /** + * Refreshes the cached metadata for a provided NFT contract address and token + * id. Returns a boolean value indicating whether the metadata was refreshed. + * + * This method is useful when you want to refresh the metadata for a NFT that + * has been updated since the last time it was fetched. Note that the backend + * only allows one refresh per token every 15 minutes, globally for all users. + * The last refresh time for an NFT can be accessed on the + * {@link Nft.timeLastUpdated} field. + * + * To trigger a refresh for all NFTs in a contract, use {@link refreshContract} instead. + * + * @param contractAddress - The contract address of the NFT. + * @param tokenId - The token id of the NFT. + */ + refreshNftMetadata(contractAddress: string, tokenId: BigNumberish): Promise; + /** + * Triggers a metadata refresh all NFTs in the provided contract address. This + * method is useful after an NFT collection is revealed. + * + * Refreshes are queued on the Alchemy backend and may take time to fully + * process. To refresh the metadata for a specific token, use the + * {@link refreshNftMetadata} method instead. + * + * @param contractAddress - The contract address of the NFT collection. + * @beta + */ + refreshContract(contractAddress: string): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/api/nft.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/api/nft.d.ts new file mode 100644 index 0000000..b51d2bd --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/api/nft.d.ts @@ -0,0 +1,86 @@ +import { Media, NftMetadata, NftTokenType, OpenSeaCollectionMetadata, SpamInfo, TokenUri } from '../types/types'; +/** + * Alchemy representation of a base NFT contract that doesn't contain metadata. + * + * The BaseNftContract does not hold any metadata information and only contains + * the address. The NftContract additionally contains the tokenType, name, + * symbol, and more. + * + * @public + */ +export interface BaseNftContract { + /** The address of the contract. */ + address: string; +} +/** + * Alchemy representation of an NFT contract. + * + * The BaseNftContract does not hold any metadata information and only contains + * the address. The NftContract additionally contains the tokenType, name, + * symbol, and more. + * + * @public + */ +export interface NftContract extends BaseNftContract { + /** The type of the token in the contract. */ + tokenType: NftTokenType; + /** The name of the contract. */ + name?: string; + /** The symbol of the contract. */ + symbol?: string; + /** + * The number of NFTs in the contract as an integer string. This field is only + * available on ERC-721 contracts. + */ + totalSupply?: string; + /** OpenSea's metadata for the contract. */ + openSea?: OpenSeaCollectionMetadata; +} +/** + * Alchemy representation of an NFT that doesn't contain metadata. + * + * The BaseNft object does not hold any metadata information and only contains + * the NFT contract and token ID. The Nft object additionally contains the NFT + * metadata, token URI information, and media. + * + * @public + */ +export interface BaseNft { + contract: BaseNftContract; + /** The NFT token ID as an integer string. */ + tokenId: string; + /** The type of ERC token, if known. */ + tokenType: NftTokenType; +} +/** + * Alchemy representation of an NFT. + * + * The BaseNft object does not hold any metadata information and only contains + * the NFT contract and token ID. The Nft object additionally contains the NFT + * metadata, token URI information, and media. + * + * @public + */ +export interface Nft extends BaseNft { + /** The NFT's underlying contract and relevant contract metadata. */ + contract: NftContract; + /** The NFT title. */ + title: string; + /** The NFT description. */ + description: string; + /** When the NFT was last updated in the blockchain. Represented in ISO-8601 format. */ + timeLastUpdated: string; + /** Holds an error message if there was an issue fetching metadata. */ + metadataError: string | undefined; + /** + * The raw metadata fetched from the metadata URL specified by the NFT. The + * field is undefined if Alchemy was unable to fetch metadata. + */ + rawMetadata: NftMetadata | undefined; + /** URIs for accessing the NFT's metadata blob. */ + tokenUri: TokenUri | undefined; + /** URIs for accessing the NFT's media assets. */ + media: Media[]; + /** Detailed information on why an NFT was classified as spam. */ + spamInfo?: SpamInfo; +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/api/notify-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/api/notify-namespace.d.ts new file mode 100644 index 0000000..c70f03d --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/api/notify-namespace.d.ts @@ -0,0 +1,143 @@ +import { AddressActivityResponse, AddressActivityWebhook, AddressWebhookParams, AddressWebhookUpdate, DroppedTransactionWebhook, GetAddressesOptions, GetAllWebhooksResponse, MinedTransactionWebhook, NftActivityWebhook, NftFiltersResponse, NftWebhookParams, NftWebhookUpdate, TransactionWebhookParams, Webhook, WebhookType } from '../types/types'; +/** + * The Notify namespace contains methods used for creating, reading, updating, + * and deleting webhooks in the Notify API. + * + * To use the methods in the API, you must provide your team's auth token in the + * {@link AlchemySettings.authToken} field when configuring + * {@link AlchemySettings}. The auth token can be found in the Alchemy Dashboard + * on the Notify tab. + * + * Note that not all networks are supported in the Notify API. Please consult + * the documentation for which networks are supported. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the notify + * namespace via `alchemy.notify`. + */ +export declare class NotifyNamespace { + private readonly config; + /** + * Get all webhooks on your team. + * + * The team is determined by the `authToken` provided into the {@link AlchemySettings} + * object when creating a new {@link Alchemy} instance. + * + * This method returns a response object containing all the webhooks + */ + getAllWebhooks(): Promise; + /** + * Get all addresses tracked for the provided {@link AddressActivityWebhook}. + * + * @param addressWebhook The Address Activity webhook. + * @param options Pagination options when fetching addresses. + */ + getAddresses(addressWebhook: AddressActivityWebhook, options?: GetAddressesOptions): Promise; + /** + * Get all addresses tracked for the provided {@link AddressActivityWebhook}. + * + * @param webhookId The id of the address activity webhook. Passing in an id + * of a non-address-activity webhook will result in a response object with + * no addresses. + * @param options Pagination options when fetching addresses. + */ + getAddresses(webhookId: string, options?: GetAddressesOptions): Promise; + /** + * Get all NFTs tracked for the provided {@link NftActivityWebhook}. + * + * @param nftWebhook The NFT Activity webhook. + * @param options Pagination options when fetching NFT filters. + */ + getNftFilters(nftWebhook: NftActivityWebhook, options?: GetAddressesOptions): Promise; + /** + * Get all NFT filters tracked for the provided {@link NftActivityWebhook}. + * + * @param webhookId The id of the NFT activity webhook. Passing in an + * incorrect id of a non-NFT webhook will result in a response object with + * no filters. + * @param options Pagination options when fetching nft filters. + */ + getNftFilters(webhookId: string, options?: GetAddressesOptions): Promise; + /** + * Update a {@link NftActivityWebhook}'s active status or NFT filters. + * + * @param nftWebhook The NFT activity webhook to update. + * @param update Object containing the update. + */ + updateWebhook(nftWebhook: NftActivityWebhook, update: NftWebhookUpdate): Promise; + /** + * Update a {@link NftActivityWebhook}'s active status or NFT filters. + * + * @param nftWebhookId The id of the NFT activity webhook. + * @param update Object containing the update. + */ + updateWebhook(nftWebhookId: string, update: NftWebhookUpdate): Promise; + /** + * Update a {@link AddressActivityWebhook}'s active status or addresses. + * + * @param addressWebhook The address activity webhook to update. + * @param update Object containing the update. + */ + updateWebhook(addressWebhook: AddressActivityWebhook, update: AddressWebhookUpdate): Promise; + /** + * Update a {@link AddressActivityWebhook}'s active status or addresses. + * + * @param addressWebhookId The id of the address activity webhook. + * @param update Object containing the update. + */ + updateWebhook(addressWebhookId: string, update: AddressWebhookUpdate): Promise; + /** + * Create a new {@link MinedTransactionWebhook} to track mined transactions + * sent by the app associated with the app id. + * + * Note that the webhook will be created in the app network of the provided app id. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the app id. + */ + createWebhook(url: string, type: WebhookType.MINED_TRANSACTION, params: TransactionWebhookParams): Promise; + /** + * Create a new {@link DroppedTransactionWebhook} to track dropped transactions + * sent by the app associated with the app id. + * + * Note that the webhook will be created in the app network of the provided app id. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the app id. + */ + createWebhook(url: string, type: WebhookType.DROPPED_TRANSACTION, params: TransactionWebhookParams): Promise; + /** + * Create a new {@link NftActivityWebhook} to track NFT transfers. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the NFTs to track and the + * network the webhook should be created on. + */ + createWebhook(url: string, type: WebhookType.NFT_ACTIVITY, params: NftWebhookParams): Promise; + /** + * Create a new {@link AddressActivityWebhook} to track address activity. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the addresses to track and the + * network the webhook should be created on. + */ + createWebhook(url: string, type: WebhookType.ADDRESS_ACTIVITY, params: AddressWebhookParams): Promise; + /** + * Delete the provided webhook. + * + * @param webhook The webhook to delete. + */ + deleteWebhook(webhook: Webhook): Promise; + /** + * Delete the provided webhook. + * + * @param webhookId The id of the webhook to delete. + */ + deleteWebhook(webhookId: string): Promise; + private verifyConfig; + private sendWebhookRequest; +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/api/transact-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/api/transact-namespace.d.ts new file mode 100644 index 0000000..85525ad --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/api/transact-namespace.d.ts @@ -0,0 +1,105 @@ +import { TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; +import type { BigNumber } from '@ethersproject/bignumber'; +import { Deferrable } from '@ethersproject/properties'; +import { SendPrivateTransactionOptions } from '../types/types'; +/** + * The Transact namespace contains methods used for sending transactions and + * checking on the state of submitted transactions. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the transact + * namespace via `alchemy.transact`. + */ +export declare class TransactNamespace { + private readonly config; + /** + * Used to send a single transaction to Flashbots. Flashbots will attempt to + * send the transaction to miners for the next 25 blocks. + * + * Returns the transaction hash of the submitted transaction. + * + * @param signedTransaction The raw, signed transaction as a hash. + * @param maxBlockNumber Optional highest block number in which the + * transaction should be included. + * @param options Options to configure the request. + */ + sendPrivateTransaction(signedTransaction: string, maxBlockNumber?: number, options?: SendPrivateTransactionOptions): Promise; + /** + * Stops the provided private transaction from being submitted for future + * blocks. A transaction can only be cancelled if the request is signed by the + * same key as the {@link sendPrivateTransaction} call submitting the + * transaction in first place. + * + * Please note that fast mode transactions cannot be cancelled using this method. + * + * Returns a boolean indicating whether the cancellation was successful. + * + * @param transactionHash Transaction hash of private tx to be cancelled + */ + cancelPrivateTransaction(transactionHash: string): Promise; + /** + * Returns the transaction with hash or null if the transaction is unknown. + * + * If a transaction has not been mined, this method will search the + * transaction pool. Various backends may have more restrictive transaction + * pool access (e.g. if the gas price is too low or the transaction was only + * recently sent and not yet indexed) in which case this method may also return null. + * + * NOTE: This is an alias for {@link CoreNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransaction(transactionHash: string | Promise): Promise; + /** + * Submits transaction to the network to be mined. The transaction must be + * signed, and be valid (i.e. the nonce is correct and the account has + * sufficient balance to pay for the transaction). + * + * NOTE: This is an alias for {@link CoreNamespace.sendTransaction}. + * + * @param signedTransaction The signed transaction to send. + * @public + */ + sendTransaction(signedTransaction: string | Promise): Promise; + /** + * Returns an estimate of the amount of gas that would be required to submit + * transaction to the network. + * + * An estimate may not be accurate since there could be another transaction on + * the network that was not accounted for, but after being mined affects the + * relevant state. + * + * This is an alias for {@link CoreNamespace.estimateGas}. + * + * @param transaction The transaction to estimate gas for. + * @public + */ + estimateGas(transaction: Deferrable): Promise; + /** + * Returns a fee per gas (in wei) that is an estimate of how much you can pay + * as a priority fee, or "tip", to get a transaction included in the current block. + * + * This number is generally used to set the `maxPriorityFeePerGas` field in a + * transaction request. + * + * @public + */ + getMaxPriorityFeePerGas(): Promise; + /** + * Returns a promise which will not resolve until specified transaction hash is mined. + * + * If {@link confirmations} is 0, this method is non-blocking and if the + * transaction has not been mined returns null. Otherwise, this method will + * block until the transaction has confirmed blocks mined on top of the block + * in which it was mined. + * + * NOTE: This is an alias for {@link CoreNamespace.waitForTransaction}. + * + * @param transactionHash The hash of the transaction to wait for. + * @param confirmations The number of blocks to wait for. + * @param timeout The maximum time to wait for the transaction to confirm. + * @public + */ + waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/api/util.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/api/util.d.ts new file mode 100644 index 0000000..10ac7c3 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/api/util.d.ts @@ -0,0 +1,21 @@ +/** + * Converts a hex string to a decimal number. + * + * @param hexString - The hex string to convert. + * @public + */ +export declare function fromHex(hexString: string): number; +/** + * Converts a number to a hex string. + * + * @param num - The number to convert to hex. + * @public + */ +export declare function toHex(num: number): string; +/** + * Checks if a value is a hex string. + * + * @param possibleHexString - The value to check. + * @public + */ +export declare function isHex(possibleHexString: string): boolean; diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/api/utils.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/api/utils.d.ts new file mode 100644 index 0000000..2582187 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/api/utils.d.ts @@ -0,0 +1,5 @@ +export { dnsEncode, hashMessage, id, isValidName, namehash } from '@ethersproject/hash'; +export { arrayify, concat, hexConcat, hexDataSlice, hexDataLength, hexlify, hexStripZeros, hexValue, hexZeroPad, isBytes, isBytesLike, isHexString, joinSignature, zeroPad, splitSignature, stripZeros } from '@ethersproject/bytes'; +export { formatEther, parseEther, parseUnits, formatUnits } from '@ethersproject/units'; +export { toUtf8Bytes, toUtf8String } from '@ethersproject/strings'; +export { Interface } from '@ethersproject/abi'; diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/api/websocket-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/api/websocket-namespace.d.ts new file mode 100644 index 0000000..7c179bc --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/api/websocket-namespace.d.ts @@ -0,0 +1,67 @@ +import type { Listener } from '@ethersproject/abstract-provider'; +import { AlchemyEventType } from '../types/types'; +/** + * The Websocket namespace contains all subscription related functions that + * allow you to subscribe to events and receive updates as they occur. The + * underlying WebSocket provider has additional logic to handle reconnections + * and automatically backfills missed events. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.ws`. + */ +export declare class WebSocketNamespace { + private readonly config; + /** + * Adds a listener to be triggered for each {@link eventName} event. Also + * includes Alchemy's Subscription API events. See {@link AlchemyEventType} for + * how to use them. + * + * @param eventName The event to listen for. + * @param listener The listener to call when the event is triggered. + * @public + */ + on(eventName: AlchemyEventType, listener: Listener): this; + /** + * Adds a listener to be triggered for only the next {@link eventName} event, + * after which it will be removed. Also includes Alchemy's Subscription API + * events. See {@link AlchemyEventType} for how to use them. + * + * @param eventName The event to listen for. + * @param listener The listener to call when the event is triggered. + * @public + */ + once(eventName: AlchemyEventType, listener: Listener): this; + /** + * Removes the provided {@link listener} for the {@link eventName} event. If no + * listener is provided, all listeners for the event will be removed. + * + * @param eventName The event to unlisten to. + * @param listener The listener to remove. + * @public + */ + off(eventName: AlchemyEventType, listener?: Listener): this; + /** + * Remove all listeners for the provided {@link eventName} event. If no event + * is provided, all events and their listeners are removed. + * + * @param eventName The event to remove all listeners for. + * @public + */ + removeAllListeners(eventName?: AlchemyEventType): this; + /** + * Returns the number of listeners for the provided {@link eventName} event. If + * no event is provided, the total number of listeners for all events is returned. + * + * @param eventName The event to get the number of listeners for. + * @public + */ + listenerCount(eventName?: AlchemyEventType): Promise; + /** + * Returns an array of listeners for the provided {@link eventName} event. If + * no event is provided, all listeners will be included. + * + * @param eventName The event to get the listeners for. + */ + listeners(eventName?: AlchemyEventType): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/index.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/index.d.ts new file mode 100644 index 0000000..a5d9de9 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/index.d.ts @@ -0,0 +1,18 @@ +/** This is the main entry point for the library and exports user-facing API. */ +import * as Utils from './api/utils'; +export { Utils }; +export * from './types/types'; +export { Alchemy } from './api/alchemy'; +export { Wallet } from './api/alchemy-wallet'; +export { Contract, ContractFactory } from './api/alchemy-contract'; +export type { AlchemyConfig } from './api/alchemy-config'; +export type { AlchemyProvider } from './api/alchemy-provider'; +export type { AlchemyWebSocketProvider } from './api/alchemy-websocket-provider'; +export type { NftNamespace } from './api/nft-namespace'; +export type { WebSocketNamespace } from './api/websocket-namespace'; +export type { CoreNamespace } from './api/core-namespace'; +export type { TransactNamespace } from './api/transact-namespace'; +export type { NotifyNamespace } from './api/notify-namespace'; +export type { BaseNftContract, NftContract, Nft, BaseNft } from './api/nft'; +export { fromHex, toHex, isHex } from './api/util'; +export { setLogLevel, LogLevelString as LogLevel } from './util/logger'; diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/internal/backoff.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/internal/backoff.d.ts new file mode 100644 index 0000000..ed9cad8 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/internal/backoff.d.ts @@ -0,0 +1,4 @@ +export declare const DEFAULT_BACKOFF_INITIAL_DELAY_MS = 1000; +export declare const DEFAULT_BACKOFF_MULTIPLIER = 1.5; +export declare const DEFAULT_BACKOFF_MAX_DELAY_MS: number; +export declare const DEFAULT_BACKOFF_MAX_ATTEMPTS = 5; diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/internal/dispatch.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/internal/dispatch.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/internal/dispatch.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/internal/ethers-event.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/internal/ethers-event.d.ts new file mode 100644 index 0000000..0676f4c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/internal/ethers-event.d.ts @@ -0,0 +1,60 @@ +import { EventType, Filter, Listener } from '@ethersproject/abstract-provider'; +import { AlchemyEventFilter, AlchemyEventType, AlchemyMinedTransactionsAddress, AlchemyMinedTransactionsEventFilter, AlchemyPendingTransactionsEventFilter, NonEmptyArray } from '../types/types'; +/** + * DO NOT MODIFY. + * + * Event class copied directly over from ethers.js's `BaseProvider` class. + * + * This class is used to represent events and their corresponding listeners. The + * SDK needs to extend this class in order to support Alchemy's custom + * Subscription API types. The original class is not exported by ethers. Minimal + * changes have been made in order to get TS to compile. + */ +declare class Event { + readonly listener: Listener; + readonly once: boolean; + readonly tag: string; + _lastBlockNumber: number; + _inflight: boolean; + constructor(tag: string, listener: Listener, once: boolean); + get event(): EventType; + get type(): string; + get hash(): string; + get filter(): Filter; + pollable(): boolean; +} +/** + * Wrapper class around the ethers `Event` class in order to add support for + * Alchemy's custom subscriptions types. + * + * The serialization and deserialization mechanism requires the order of the + * fields to be the same across different {@link ALCHEMY_EVENT_TYPES}. Before + * using a getter on a new event filter, make sure that the position of the + * field in serialization is correct. + * + * The getters on this class deserialize the event tag generated by + * {@link getAlchemyEventTag} into the original fields passed into the event. + */ +export declare class EthersEvent extends Event { + /** + * Converts the event tag into the original `fromAddress` field in + * {@link AlchemyPendingTransactionsEventFilter}. + */ + get fromAddress(): string | string[] | undefined; + /** + * Converts the event tag into the original `toAddress` field in + * {@link AlchemyPendingTransactionsEventFilter}. + */ + get toAddress(): string | string[] | undefined; + /** + * Converts the event tag into the original `hashesOnly` field in + * {@link AlchemyPendingTransactionsEventFilter} and {@link AlchemyMinedTransactionsEventFilter}. + */ + get hashesOnly(): boolean | undefined; + get includeRemoved(): boolean | undefined; + get addresses(): NonEmptyArray | undefined; +} +export declare function isAlchemyEvent(event: AlchemyEventType): event is AlchemyMinedTransactionsEventFilter | AlchemyPendingTransactionsEventFilter; +export declare function verifyAlchemyEventName(eventName: AlchemyEventFilter): void; +export declare function deserializeTopics(data: string): any; +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/internal/internal-types.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/internal/internal-types.d.ts new file mode 100644 index 0000000..48cbe2f --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/internal/internal-types.d.ts @@ -0,0 +1,48 @@ +/** This file contains internal types used by the SDK and are not exposed to the end user. */ +declare type JsonRpcId = string | number | null; +/** + * Prefix for `alchemy_pendingTransactions` subscriptions when serializing to + * ethers events. + * + * This tag is used internally by ethers to track different event filters. + */ +export declare const ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE = "alchemy-pending-transactions"; +/** + * Prefix for `alchemy_minedTransactions` subscriptions when serializing to ethers events. + * + * This tag is used internally by ethers to track different event filters. + */ +export declare const ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE = "alchemy-mined-transactions"; +/** + * Array containing all the custom event tags used internally by ethers to track + * event filters. + */ +export declare const ALCHEMY_EVENT_TYPES: string[]; +export interface JsonRpcRequest { + jsonrpc: '2.0'; + method: string; + params?: any[]; + id?: JsonRpcId; +} +export interface JsonRpcResponse { + jsonrpc: '2.0'; + result?: T; + error?: JsonRpcError; + id: JsonRpcId; +} +interface JsonRpcError { + code: number; + message: string; + data?: T; +} +export declare type WebSocketMessage = SingleOrBatchResponse | SubscriptionEvent; +export declare type SingleOrBatchResponse = JsonRpcResponse | JsonRpcResponse[]; +export interface SubscriptionEvent { + jsonrpc: '2.0'; + method: 'eth_subscription'; + params: { + subscription: string; + result: T; + }; +} +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/internal/nft-api.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/internal/nft-api.d.ts new file mode 100644 index 0000000..8eaf6e1 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/internal/nft-api.d.ts @@ -0,0 +1,27 @@ +import { BigNumberish } from '@ethersproject/bignumber'; +import { AlchemyConfig } from '../api/alchemy-config'; +import { BaseNft, Nft, NftContract } from '../api/nft'; +import { GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftResponse, NftAttributeRarity, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, NftTokenType, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult } from '../types/types'; +export declare function getNftMetadata(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, tokenType?: NftTokenType, tokenUriTimeoutInMs?: number, srcMethod?: string): Promise; +export declare function getNftMetadataBatch(config: AlchemyConfig, tokens: Array, options?: NftMetadataBatchOptions): Promise; +export declare function getContractMetadata(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function getNftsForOwnerIterator(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): AsyncIterable; +export declare function getNftsForOwner(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): Promise; +export declare function getNftsForContract(config: AlchemyConfig, contractAddress: string, options?: GetBaseNftsForContractOptions | GetNftsForContractOptions, srcMethod?: string): Promise; +export declare function getNftsForContractIterator(config: AlchemyConfig, contractAddress: string, options?: GetBaseNftsForContractOptions | GetNftsForContractOptions, srcMethod?: string): AsyncIterable; +export declare function getOwnersForContract(config: AlchemyConfig, contractAddress: string, options?: GetOwnersForContractWithTokenBalancesOptions | GetOwnersForContractOptions, srcMethod?: string): Promise; +export declare function getContractsForOwner(config: AlchemyConfig, owner: string, options?: GetContractsForOwnerOptions, srcMethod?: string): Promise; +export declare function getOwnersForNft(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, srcMethod?: string): Promise; +export declare function checkNftOwnership(config: AlchemyConfig, owner: string, contractAddresses: string[], srcMethod?: string): Promise; +export declare function verifyNftOwnership(config: AlchemyConfig, owner: string, contractAddresses: string | string[], srcMethod?: string): Promise; +export declare function isSpamContract(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function getSpamContracts(config: AlchemyConfig, srcMethod?: string): Promise; +export declare function getFloorPrice(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function getNftSales(config: AlchemyConfig, options?: GetNftSalesOptions | GetNftSalesOptionsByContractAddress, srcMethod?: string): Promise; +export declare function computeRarity(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, srcMethod?: string): Promise; +export declare function searchContractMetadata(config: AlchemyConfig, query: string, srcMethod?: string): Promise; +export declare function summarizeNftAttributes(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function refreshNftMetadata(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, srcMethod?: string): Promise; +export declare function refreshContract(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/internal/raw-interfaces.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/internal/raw-interfaces.d.ts new file mode 100644 index 0000000..0b85271 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/internal/raw-interfaces.d.ts @@ -0,0 +1,113 @@ +import { Media, NftSaleFeeData, NftSpamClassification } from '../types/types'; +export interface RawSpamInfo { + isSpam: string; + /** A list of reasons why an NFT contract was marked as spam. */ + classifications: NftSpamClassification[]; +} +/** OpenSea's metadata for an NFT collection. */ +export interface RawOpenSeaCollectionMetadata { + floorPrice?: number; + collectionName?: string; + safelistRequestStatus?: string; + imageUrl?: string; + description?: string; + externalUrl?: string; + twitterUsername?: string; + discordUrl?: string; + lastIngestedAt?: string; +} +export interface RawGetOwnersForContractWithTokenBalancesResponse { + ownerAddresses: RawOwnerAddress[]; + pageKey?: string; +} +export interface RawOwnerAddress { + ownerAddress: string; + tokenBalances: RawTokenBalances[]; +} +export interface RawTokenBalances { + tokenId: string; + balance: number; +} +export interface RawReingestContractResponse { + contractAddress: string; + reingestionState: string; + progress: string | null; +} +export interface RawWebhook { + id: string; + network: string; + webhook_type: string; + webhook_url: string; + is_active: boolean; + time_created: number; + signing_key: string; + version: string; + app_id?: string; +} +export interface RawWebhookPagination { + cursors: { + after?: string; + }; + total_count: number; +} +export interface RawGetAllWebhooksResponse { + data: RawWebhook[]; +} +export interface RawAddressActivityResponse { + data: string[]; + pagination: RawWebhookPagination; +} +export interface RawNftFilter { + contract_address: string; + token_id: string; +} +export interface RawNftFiltersResponse { + data: RawNftFilter[]; + pagination: RawWebhookPagination; +} +export interface RawCreateWebhookResponse { + data: RawWebhook; +} +export interface RawNftFilterParam { + contract_address: string; + token_id: string; +} +export interface RawNftAttributeRarity { + value: string; + trait_type: string; + prevalence: number; +} +export interface RawGetNftSalesResponse { + pageKey?: string; + nftSales: RawNftSale[]; +} +export interface RawNftSale { + marketplace: string; + contractAddress: string; + tokenId: string; + quantity: string; + buyerAddress: string; + sellerAddress: string; + taker: string; + sellerFee: NftSaleFeeData; + marketplaceFee?: NftSaleFeeData; + royaltyFee?: NftSaleFeeData; + blockNumber: number; + logIndex: number; + bundleIndex: number; + transactionHash: string; +} +export interface RawGetContractsForOwnerResponse { + contracts: RawContractForOwner[]; + pageKey?: string; + totalCount: number; +} +export interface RawContractForOwner extends Omit { + address: string; + totalBalance: number; + numDistinctTokensOwned: number; + isSpam: boolean; + tokenId: string; + media: Media; + opensea?: RawOpenSeaCollectionMetadata; +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/internal/request-batcher.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/internal/request-batcher.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/internal/request-batcher.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/internal/websocket-backfiller.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/internal/websocket-backfiller.d.ts new file mode 100644 index 0000000..63730de --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/internal/websocket-backfiller.d.ts @@ -0,0 +1,53 @@ +export interface BatchPart { + method: string; + params?: any; +} +export interface NewHeadsEvent { + author: string; + difficulty: string; + extraData: string; + gasLimit: string; + gasUsed: string; + hash: string; + logsBloom: string; + miner: string; + mixHash: string; + nonce: string; + number: string; + parentHash: string; + receiptsRoot: string; + sealFields: string[]; + sha3Uncles: string; + size: string; + stateRoot: string; + timestamp: string; + transactionsRoot: string; +} +/** The return type of eth_getBlocksByHash. */ +export interface BlockHead extends NewHeadsEvent { + totalDifficulty: string; + transactions: any[]; + uncles: string[]; +} +export interface LogsEvent { + address: string; + blockHash: string; + blockNumber: string; + data: string; + logIndex: string; + topics: string[]; + transactionHash: string; + transactionIndex: string; + removed?: boolean; +} +export interface LogsSubscriptionFilter { + address?: string | string[]; + topics?: Array; +} +export interface GetLogsOptions extends LogsSubscriptionFilter { + fromBlock?: string; + toBlock?: string; +} +export declare function dedupeNewHeads(events: NewHeadsEvent[]): NewHeadsEvent[]; +export declare function dedupeLogs(events: LogsEvent[]): LogsEvent[]; +export declare function throwIfCancelled(isCancelled: () => boolean): void; diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/types/types.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/types/types.d.ts new file mode 100644 index 0000000..ed47247 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/types/types.d.ts @@ -0,0 +1,1523 @@ +import { EventType, TransactionReceipt } from '@ethersproject/abstract-provider'; +import { BigNumberish } from '@ethersproject/bignumber'; +import { BaseNft, Nft, NftContract } from '../api/nft'; +/** + * Options object used to configure the Alchemy SDK. + * + * @public + */ +export interface AlchemySettings { + /** + * The Alchemy API key that can be found in the Alchemy dashboard. + * + * Defaults to: "demo" (a rate-limited public API key) + */ + apiKey?: string; + /** + * The name of the network. Once configured, the network cannot be changed. To + * use a different network, instantiate a new `Alchemy` instance. + * + * Defaults to: Network.ETH_MAINNET + */ + network?: Network; + /** The maximum number of retries to attempt if a request fails. Defaults to 5. */ + maxRetries?: number; + /** + * Optional URL endpoint to use for all requests. Setting this field will + * override the URL generated by the {@link network} and {@link apiKey} fields. + * + * This field is useful for testing or for using a custom node endpoint. Note + * that not all methods will work with custom URLs. + */ + url?: string; + /** + * Alchemy auth token required to use the Notify API. This token can be found + * in the Alchemy Dashboard on the Notify tab. + */ + authToken?: string; + /** + * Optional setting that automatically batches and sends json-rpc requests for + * higher throughput and reduced network IO. Defaults to false. + * + * This implementation is based on the `JsonRpcBatchProvider` in ethers. + */ + batchRequests?: boolean; +} +/** + * The supported networks by Alchemy. Note that some functions are not available + * on all networks. Please refer to the Alchemy documentation for which APIs are + * available on which networks + * {@link https://docs.alchemy.com/alchemy/apis/feature-support-by-chain} + * + * @public + */ +export declare enum Network { + ETH_MAINNET = "eth-mainnet", + /** @deprecated - Will be removed in subsequent versions */ + ETH_ROPSTEN = "eth-ropsten", + ETH_GOERLI = "eth-goerli", + /** @deprecated - Will be removed in subsequent versions */ + ETH_KOVAN = "eth-kovan", + /** @deprecated - Will be removed in subsequent versions */ + ETH_RINKEBY = "eth-rinkeby", + OPT_MAINNET = "opt-mainnet", + /** @deprecated - Will be removed in subsequent versions */ + OPT_KOVAN = "opt-kovan", + OPT_GOERLI = "opt-goerli", + ARB_MAINNET = "arb-mainnet", + /** @deprecated - Will be removed in subsequent versions */ + ARB_RINKEBY = "arb-rinkeby", + ARB_GOERLI = "arb-goerli", + MATIC_MAINNET = "polygon-mainnet", + MATIC_MUMBAI = "polygon-mumbai", + ASTAR_MAINNET = "astar-mainnet" +} +/** Token Types for the `getTokenBalances()` endpoint. */ +export declare enum TokenBalanceType { + /** + * Option to fetch the top 100 tokens by 24-hour volume. This option is only + * available on Mainnet in Ethereum, Polygon, and Arbitrum. + */ + DEFAULT_TOKENS = "DEFAULT_TOKENS", + /** + * Option to fetch the set of ERC-20 tokens that the address as ever held. his + * list is produced by an address's historical transfer activity and includes + * all tokens that the address has ever received. + */ + ERC20 = "erc20" +} +/** + * Optional params to pass into `getTokenBalances()` to fetch all ERC-20 tokens + * instead of passing in an array of contract addresses to fetch balances for. + */ +export interface TokenBalancesOptionsErc20 { + /** The ERC-20 token type. */ + type: TokenBalanceType.ERC20; + /** Optional page key for pagination (only applicable to TokenBalanceType.ERC20) */ + pageKey?: string; +} +/** + * Optional params to pass into `getTokenBalances()` to fetch the top 100 tokens + * instead of passing in an array of contract addresses to fetch balances for. + */ +export interface TokenBalancesOptionsDefaultTokens { + /** The top 100 token type. */ + type: TokenBalanceType.DEFAULT_TOKENS; +} +/** + * Response object for when the {@link TokenBalancesOptionsErc20} options are + * used. A page key may be returned if the provided address has many transfers. + */ +export interface TokenBalancesResponseErc20 extends TokenBalancesResponse { + /** + * An optional page key to passed into the next request to fetch the next page + * of token balances. + */ + pageKey?: string; +} +/** @public */ +export interface TokenBalancesResponse { + address: string; + tokenBalances: TokenBalance[]; +} +/** @public */ +export declare type TokenBalance = TokenBalanceSuccess | TokenBalanceFailure; +/** @public */ +export interface TokenBalanceSuccess { + contractAddress: string; + tokenBalance: string; + error: null; +} +/** @public */ +export interface TokenBalanceFailure { + contractAddress: string; + tokenBalance: null; + error: string; +} +/** + * Response object for the {@link CoreNamespace.getTokenMetadata} method. + * + * @public + */ +export interface TokenMetadataResponse { + /** + * The token's name. Is `null` if the name is not defined in the contract and + * not available from other sources. + */ + name: string | null; + /** + * The token's symbol. Is `null` if the symbol is not defined in the contract + * and not available from other sources. + */ + symbol: string | null; + /** + * The number of decimals of the token. Returns `null` if not defined in the + * contract and not available from other sources. + */ + decimals: number | null; + /** URL link to the token's logo. Is `null` if the logo is not available. */ + logo: string | null; +} +/** + * Parameters for the {@link CoreNamespace.getAssetTransfers} method. + * + * @public + */ +export interface AssetTransfersParams { + /** + * The starting block to check for transfers. This value is inclusive and + * defaults to `0x0` if omitted. + */ + fromBlock?: string; + /** + * The ending block to check for transfers. This value is inclusive and + * defaults to the latest block if omitted. + */ + toBlock?: string; + /** + * Whether to return results in ascending or descending order by block number. + * Defaults to ascending if omitted. + */ + order?: SortingOrder; + /** + * The from address to filter transfers by. This value defaults to a wildcard + * for all addresses if omitted. + */ + fromAddress?: string; + /** + * The to address to filter transfers by. This value defaults to a wildcard + * for all address if omitted. + */ + toAddress?: string; + /** + * List of contract addresses to filter for - only applies to "erc20", + * "erc721", "erc1155" transfers. Defaults to all address if omitted. + */ + contractAddresses?: string[]; + /** + * Whether to exclude transfers with zero value. Note that zero value is + * different than null value. Defaults to `false` if omitted. + */ + excludeZeroValue?: boolean; + /** REQUIRED field. An array of categories to get transfers for. */ + category: AssetTransfersCategory[]; + /** The maximum number of results to return per page. Defaults to 1000 if omitted. */ + maxCount?: number; + /** + * Optional page key from an existing {@link OwnedBaseNftsResponse} + * {@link AssetTransfersResult}to use for pagination. + */ + pageKey?: string; + /** + * Whether to include additional metadata about each transfer event. Defaults + * to `false` if omitted. + */ + withMetadata?: boolean; +} +/** + * Parameters for the {@link CoreNamespace.getAssetTransfers} method that + * includes metadata. + * + * @public + */ +export interface AssetTransfersWithMetadataParams extends AssetTransfersParams { + withMetadata: true; +} +/** + * Categories of transfers to use with the {@link AssetTransfersParams} request + * object when using {@link CoreNamespace.getAssetTransfers}. + * + * @public + */ +export declare enum AssetTransfersCategory { + /** + * Top level ETH transactions that occur where the `fromAddress` is an + * external user-created address. External addresses have private keys and are + * accessed by users. + */ + EXTERNAL = "external", + /** + * Top level ETH transactions that occur where the `fromAddress` is an + * internal, smart contract address. For example, a smart contract calling + * another smart contract or sending + */ + INTERNAL = "internal", + /** ERC20 transfers. */ + ERC20 = "erc20", + /** ERC721 transfers. */ + ERC721 = "erc721", + /** ERC1155 transfers. */ + ERC1155 = "erc1155", + /** Special contracts that don't follow ERC 721/1155, (ex: CryptoKitties). */ + SPECIALNFT = "specialnft" +} +/** + * Enum for the order of the {@link AssetTransfersParams} request object when + * using {@link CoreNamespace.getAssetTransfers}. + * + * @deprecated Use {@link SortingOrder} instead. This enum will be removed in a + * future version. + * @public + */ +export declare enum AssetTransfersOrder { + ASCENDING = "asc", + DESCENDING = "desc" +} +/** + * An enum for specifying the token type on NFTs. + * + * @public + */ +export declare enum NftTokenType { + ERC721 = "ERC721", + ERC1155 = "ERC1155", + UNKNOWN = "UNKNOWN" +} +/** + * Response object for the {@link CoreNamespace.getAssetTransfers} method. + * + * @public + */ +export interface AssetTransfersResponse { + transfers: AssetTransfersResult[]; + /** Page key for the next page of results, if one exists. */ + pageKey?: string; +} +/** + * Response object for the {@link CoreNamespace.getAssetTransfers} method when + * the {@link AssetTransfersWithMetadataParams} are used. + * + * @public + */ +export interface AssetTransfersWithMetadataResponse { + transfers: AssetTransfersWithMetadataResult[]; + pageKey?: string; +} +/** + * Represents a transfer event that is returned in a {@link AssetTransfersResponse}. + * + * @public + */ +export interface AssetTransfersResult { + /** The unique ID of the transfer. */ + uniqueId: string; + /** The category of the transfer. */ + category: AssetTransfersCategory; + /** The block number where the transfer occurred. */ + blockNum: string; + /** The from address of the transfer. */ + from: string; + /** The to address of the transfer. */ + to: string | null; + /** + * Converted asset transfer value as a number (raw value divided by contract + * decimal). `null` if ERC721 transfer or contract decimal not available. + */ + value: number | null; + /** + * The raw ERC721 token id of the transfer as a hex string. `null` if not an + * ERC721 transfer. + */ + erc721TokenId: string | null; + /** + * A list of ERC1155 metadata objects if the asset transferred is an ERC1155 + * token. `null` if not an ERC1155 transfer. + */ + erc1155Metadata: ERC1155Metadata[] | null; + /** The token id of the token transferred. */ + tokenId: string | null; + /** + * Returns the token's symbol or ETH for other transfers. `null` if the + * information was not available. + */ + asset: string | null; + /** The transaction hash of the transfer transaction. */ + hash: string; + /** Information about the raw contract of the asset transferred. */ + rawContract: RawContract; +} +/** + * Represents a transfer event that is returned in a + * {@link AssetTransfersResponse} when {@link AssetTransfersWithMetadataParams} are used. + * + * @public + */ +export interface AssetTransfersWithMetadataResult extends AssetTransfersResult { + /** Additional metadata about the transfer event. */ + metadata: AssetTransfersMetadata; +} +/** + * The metadata object for a {@link AssetTransfersResult} when the + * {@link AssetTransfersParams.withMetadata} field is set to true. + * + * @public + */ +export interface AssetTransfersMetadata { + /** Timestamp of the block from which the transaction event originated. */ + blockTimestamp: string; +} +/** + * Represents NFT metadata that holds fields. Note that since there is no + * standard metadata format, the fields are not guaranteed to be present. + * + * @public + */ +export interface NftMetadata extends Record { + /** Name of the NFT asset. */ + name?: string; + /** A human-readable description of the NFT asset. */ + description?: string; + /** URL to the NFT asset image. */ + image?: string; + /** + * The image URL that appears along the top of the NFT asset page. This tends + * to be the highest resolution image. + */ + external_url?: string; + /** Background color of the NFT item. Usually defined as a 6 character hex string. */ + background_color?: string; + /** The traits, attributes, and characteristics for the NFT asset. */ + attributes?: Array>; +} +/** + * Represents the URI information the NFT's metadata. + * + * @public + */ +export interface TokenUri { + /** + * URI for the location of the NFT's original metadata blob (ex: the original + * IPFS link). + */ + raw: string; + /** Public gateway URI for the raw URI. Generally offers better performance. */ + gateway: string; +} +/** + * Represents the URI information for the NFT's media assets. + * + * @public + */ +export interface Media { + /** + * URI for the location of the NFT's original metadata blob for media (ex: the + * original IPFS link). + */ + raw: string; + /** Public gateway URI for the raw URI. Generally offers better performance. */ + gateway: string; + /** URL for a resized thumbnail of the NFT media asset. */ + thumbnail?: string; + /** + * The media format (ex: jpg, gif, png) of the {@link gateway} and + * {@link thumbnail} assets. + */ + format?: string; + /** + * DEPRECATED - The size of the media asset in bytes + * + * @deprecated - Please use {@link bytes} instead. This field will be removed + * in a subsequent release. + */ + size?: number; + /** The size of the media asset in bytes. */ + bytes?: number; +} +/** Potential reasons why an NFT contract was classified as spam. */ +export declare enum NftSpamClassification { + Erc721TooManyOwners = "Erc721TooManyOwners", + Erc721TooManyTokens = "Erc721TooManyTokens", + Erc721DishonestTotalSupply = "Erc721DishonestTotalSupply", + MostlyHoneyPotOwners = "MostlyHoneyPotOwners", + OwnedByMostHoneyPots = "OwnedByMostHoneyPots" +} +/** Detailed information on whether and why an NFT contract was classified as spam. */ +export interface SpamInfo { + isSpam: boolean; + /** A list of reasons why an NFT contract was marked as spam. */ + classifications: NftSpamClassification[]; +} +/** + * Optional parameters object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. + * + * This interface is used to fetch NFTs with their associated metadata. To get + * Nfts without their associated metadata, use {@link GetBaseNftsForOwnerOptions}. + * + * @public + */ +export interface GetNftsForOwnerOptions { + /** + * Optional page key from an existing {@link OwnedBaseNftsResponse} or + * {@link OwnedNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional list of contract addresses to filter the results by. Limit is 20. */ + contractAddresses?: string[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are excluded from the response. + */ + excludeFilters?: NftFilters[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are included in the response. + */ + includeFilters?: NftFilters[]; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; + /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */ + omitMetadata?: boolean; + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; + /** + * Order in which to return results. By default, results are ordered by + * contract address and token ID in lexicographic order. + */ + orderBy?: NftOrdering; +} +/** + * Optional parameters object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. + * + * This interface is used to fetch NFTs without their associated metadata. To + * get Nfts with their associated metadata, use {@link GetNftsForOwnerOptions}. + * + * @public + */ +export interface GetBaseNftsForOwnerOptions { + /** + * Optional page key from an existing {@link OwnedBaseNftsResponse} or + * {@link OwnedNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional list of contract addresses to filter the results by. Limit is 20. */ + contractAddresses?: string[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are excluded from the response. + */ + excludeFilters?: NftFilters[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are included in the response. + */ + includeFilters?: NftFilters[]; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; + /** Optional boolean flag to include NFT metadata. Defaults to `false`. */ + omitMetadata: true; + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; + /** + * Order in which to return results. By default, results are ordered by + * contract address and token ID in lexicographic order. + */ + orderBy?: NftOrdering; +} +/** + * Enum of NFT filters that can be applied to a {@link getNftsForOwner} request. + * NFTs that match one or more of these filters are excluded from the response. + * + * - @deprecated Use {@link NftFilters} instead. This enum will be removed in a + * future version. + * + * @beta + */ +export declare enum NftExcludeFilters { + /** Exclude NFTs that have been classified as spam. */ + SPAM = "SPAM", + /** Exclude NFTs that have been airdropped to a user. */ + AIRDROPS = "AIRDROPS" +} +/** + * Enum of NFT filters that can be applied to a {@link getNftsForOwner} or a + * {@link getContractsForOwner} request. + * + * @beta + */ +export declare enum NftFilters { + /** NFTs that have been classified as spam. */ + SPAM = "SPAM", + /** NFTs that have been airdropped to a user. */ + AIRDROPS = "AIRDROPS" +} +/** + * Enum of ordering that can be applied to a {@link getNftsForOwner} or a + * {@link getContractsForOwner} response. + * + * @beta + */ +export declare enum NftOrdering { + TRANSFERTIME = "TRANSFERTIME" +} +/** + * The response object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. The object contains the NFTs with + * metadata owned by the provided address, along with pagination information and + * the total count. + * + * @public + */ +export interface OwnedNftsResponse { + /** The NFTs owned by the provided address. */ + readonly ownedNfts: OwnedNft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + readonly pageKey?: string; + /** The total count of NFTs owned by the provided address. */ + readonly totalCount: number; +} +/** + * The response object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. The object contains the NFTs + * without metadata owned by the provided address, along with pagination + * information and the total count. + * + * @public + */ +export interface OwnedBaseNftsResponse { + /** The NFTs owned by the provided address. */ + readonly ownedNfts: OwnedBaseNft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + readonly pageKey?: string; + /** The total count of NFTs owned by the provided address. */ + readonly totalCount: number; +} +/** + * Represents an NFT with metadata owned by an address. + * + * @public + */ +export interface OwnedNft extends Nft { + /** The token balance of the NFT. */ + readonly balance: number; +} +/** + * Represents an NFT without metadata owned by an address. + * + * @public + */ +export interface OwnedBaseNft extends BaseNft { + /** The token balance of the NFT. */ + readonly balance: number; +} +/** + * The response object for the {@link getOwnersForNft}. + * + * @public + */ +export interface GetOwnersForNftResponse { + /** An array of owner addresses for the provided token. */ + readonly owners: string[]; +} +/** + * The response object for the {@link getOwnersForContract}. + * + * @public + */ +export interface GetOwnersForContractResponse { + /** An array of owner addresses for the provided contract address */ + owners: string[]; +} +/** + * The response object for the {@link getOwnersForContract}. + * + * @public + */ +export interface GetOwnersForContractWithTokenBalancesResponse { + /** An array of owner addresses for the provided contract address */ + owners: NftContractOwner[]; + /** Optional page key that is returned when a collection has more than 50,000 owners. */ + pageKey?: string; +} +/** + * An object representing the owner of an NFT and its corresponding token + * balances in a {@link GetOwnersForContractWithTokenBalancesResponse} object. + */ +export interface NftContractOwner { + /** The NFT's owner address. */ + ownerAddress: string; + /** A list of objects containing token balances for the provided NFT contract. */ + tokenBalances: NftContractTokenBalance[]; +} +/** + * An object representing the owned token and balance values in a + * {@link GetOwnersForContractWithTokenBalancesResponse} object. + */ +export interface NftContractTokenBalance { + /** The token id owned in the NFT contract. */ + tokenId: string; + /** The token Id balance for the provided owner. */ + balance: number; +} +/** + * Represents an NFT token to fetch metadata for in a + * {@link NftNamespace.getNftMetadataBatch} method. + */ +export interface NftMetadataBatchToken { + /** The NFT contract address. Limited to ERC721 and ERC1155 tokens. */ + contractAddress: string; + /** The id of the NFT. */ + tokenId: BigNumberish; + /** Optional field to specify the type of token to speed up the query. */ + tokenType?: NftTokenType.ERC1155 | NftTokenType.ERC721; +} +/** Additional options for the {@link NftNamespace.getNftMetadataBatch} method. */ +export interface NftMetadataBatchOptions { + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; + /** + * Whether to refresh the metadata for the given NFT token before returning + * the response. Defaults to false for faster response times. + */ + refreshCache?: boolean; +} +/** + * The successful object returned by the {@link getFloorPrice} call for each + * marketplace (e.g. looksRare). + * + * @public + */ +export interface FloorPriceMarketplace { + /** The floor price of the collection on the given marketplace */ + readonly floorPrice: number; + /** The currency in which the floor price is denominated */ + readonly priceCurrency: string; + /** The link to the collection on the given marketplace */ + readonly collectionUrl: string; + /** UTC timestamp of when the floor price was retrieved from the marketplace */ + readonly retrievedAt: string; +} +/** + * The failing object returned by the {@link getFloorPrice} call for each + * marketplace (e.g. looksRare). + * + * @public + */ +export interface FloorPriceError { + /** Error fetching floor prices from the given marketplace */ + readonly error: string; +} +/** + * The response object for the {@link getFloorPrice} method. + * + * @public + */ +export interface GetFloorPriceResponse { + /** + * Name of the NFT marketplace where the collection is listed. Current + * marketplaces supported: OpenSea, LooksRare + */ + readonly openSea: FloorPriceMarketplace | FloorPriceError; + readonly looksRare: FloorPriceMarketplace | FloorPriceError; +} +/** + * Optional parameters object for the the {@link getContractsForOwner} method + * + * @public + */ +export interface GetContractsForOwnerOptions { + /** Key for pagination to use to fetch results from the next page if available. */ + pageKey?: string; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are included in the response. May not be used in + * conjunction with {@link excludeFilters}. + */ + includeFilters?: NftFilters[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are excluded from the response. May not be used in + * conjunction with {@link includeFilters} + */ + excludeFilters?: NftFilters[]; + /** + * Order in which to return results. By default, results are ordered by + * contract address and token ID in lexicographic order. + */ + orderBy?: NftOrdering; +} +/** + * The response for the {@link NftNamespace.getContractsForOwner} method. + * + * @public + */ +export interface GetContractsForOwnerResponse { + /** The list of contracts, that match the query, held by the given address. */ + contracts: ContractForOwner[]; + /** Key for pagination to use to fetch results from the next page if available. */ + pageKey?: string; + /** Total number of NFT contracts held by the given address. */ + totalCount: number; +} +/** Represents a single NFT contract data in the {@link GetContractsForOwnerResponse}. */ +export interface ContractForOwner extends NftContract { + /** + * Sum of NFT balances across all token IDs held by the owner. For + * non-fungible tokens this will be equal to the numDistinctTokensOwned, but + * it may be higher if the user holds some fungible ERC1155 tokens. + */ + totalBalance: number; + /** + * Number of distinct token IDs held by the owner. For non-fungible tokens + * this will be equal to the totalBalance, but it may be lower if the user + * holds some fungible ERC1155 tokens. + */ + numDistinctTokensOwned: number; + isSpam: boolean; + /** One of the tokens from this contract held by the owner. */ + tokenId: string; + /** Alternative NFT metadata for this contract to be parsed manually. */ + media: Media; +} +/** + * Optional parameters object for the {@link getNftSales} endpoint. + * + * This interface is used to filter the NFT sales data. + * + * @public + */ +export interface GetNftSalesOptions { + /** The block number to start fetching NFT sales data from. */ + fromBlock?: number | 'latest'; + /** The block number limit to fetch NFT sales data from. */ + toBlock?: number | 'latest'; + /** Whether to return the results in ascending or descending order by block number. */ + order?: SortingOrder; + /** The NFT marketplace to filter sales by. */ + marketplace?: NftSaleMarketplace; + /** The address of the NFT buyer to filter sales by. */ + buyerAddress?: string; + /** The address of the NFT seller to filter sales by. */ + sellerAddress?: string; + /** + * Filter by whether the buyer or seller was the taker in the NFT trade. + * Defaults to returning both buyer and seller taker trades. + */ + taker?: NftSaleTakerType; + /** The maximum number of NFT sales to return. */ + limit?: number; + /** Key for pagination to use to fetch results from the next page if available. */ + pageKey?: string; +} +/** + * Alternative optional parameters object for the {@link getNftSales} endpoint + * that allows filtering results by contractAddress. + * + * This interface is used to filter the NFT sales data. + * + * @public + */ +export interface GetNftSalesOptionsByContractAddress extends GetNftSalesOptions { + /** The contract address of a NFT collection to filter sales by. */ + contractAddress: string; + /** The token ID of an NFT within the specified contractAddress to filter sales by. */ + tokenId?: BigNumberish; +} +/** + * The response for the {@link NftNamespace.getNftSales} method. + * + * @public + */ +export interface GetNftSalesResponse { + /** The page key to use to fetch the next page if more results are available. */ + pageKey?: string; + /** List of NFT sales that match the query */ + nftSales: NftSale[]; +} +/** Represents a single NFT sale data in the {@link GetNftSalesResponse}. */ +export interface NftSale { + /** The marketplace the sale took place on. */ + marketplace: NftSaleMarketplace; + /** The NFT contract address. */ + contractAddress: string; + /** The decimal token ID of the NFT being sold. */ + tokenId: string; + /** The number of tokens sold in the sale as a decimal integer string. */ + quantity: string; + /** The address of the buyer in the NFT sale. */ + buyerAddress: string; + /** The address of the seller in the NFT sale. */ + sellerAddress: string; + /** Whether the price taker in the trade was the buyer or the seller. */ + taker: NftSaleTakerType; + /** The payment from buyer to the seller. */ + sellerFee: NftSaleFeeData; + /** The payment from buyer to the marketplace. */ + marketplaceFee?: NftSaleFeeData; + /** The payment from buyer to the royalty address of the NFT collection. */ + royaltyFee?: NftSaleFeeData; + /** The block number the NFT sale took place in. */ + blockNumber: number; + /** The log number of the sale event emitted within the block. */ + logIndex: number; + /** The index of the token within the bundle of NFTs sold in the sale. */ + bundleIndex: number; + /** The transactionHash of the NFT sale. */ + transactionHash: string; +} +/** + * Fee detail for an NFT sale. + * + * @public + */ +export interface NftSaleFeeData { + /** The fee payment amount as a decimal integer string. */ + amount: string; + /** The symbol of the token used for the payment. */ + symbol: string; + /** The number of decimals of the token used for the payment. */ + decimal: number; +} +/** + * Enum for representing the supported sorting orders of the API. + * + * @public + */ +export declare enum SortingOrder { + ASCENDING = "asc", + DESCENDING = "desc" +} +/** + * Enum representing the supported NFT marketplaces by the {@link getNftSales} endpoint. + * + * @public + */ +export declare enum NftSaleMarketplace { + SEAPORT = "seaport", + LOOKSRARE = "looksrare", + X2Y2 = "x2y2", + UNKNOWN = "unknown" +} +/** + * Enum for specifing the taker type for the {@link getNftSales} endpoint. + * + * @public + */ +export declare enum NftSaleTakerType { + BUYER = "buyer", + SELLER = "seller" +} +/** + * Information about the rarity of an NFT's attribute in the specified collection. + * + * @public + */ +export interface NftAttributeRarity { + /** Name of the NFT's attribute. */ + value: string; + /** The type of NFT attribute. */ + traitType: string; + /** + * A number from 0 to 1 representing the prevalence of this value for this + * trait type in the current collection. + */ + prevalence: number; +} +/** + * Summary of the attribute prevalence for the specified NFT contract. + * + * @public + */ +export interface NftAttributesResponse { + /** The specified NFT contract's address. */ + contractAddress: string; + /** The specified NFT contract's total supply. */ + totalSupply: number; + /** + * The attribute prevalence of each trait grouped by the trait type for the + * provided NFT. + */ + summary: Record>; +} +/** The refresh result response object returned by {@link refreshContract}. */ +export interface RefreshContractResult { + /** The NFT contract address that was passed in to be refreshed. */ + contractAddress: string; + /** The current state of the refresh request. */ + refreshState: RefreshState; + /** + * Percentage of tokens currently refreshed, represented as an integer string. + * Field can be null if the refresh has not occurred. + */ + progress: string | null; +} +/** The current state of the NFT contract refresh process. */ +export declare enum RefreshState { + /** The provided contract is not an NFT or does not contain metadata. */ + DOES_NOT_EXIST = "does_not_exist", + /** The contract has already been queued for refresh. */ + ALREADY_QUEUED = "already_queued", + /** The contract is currently being refreshed. */ + IN_PROGRESS = "in_progress", + /** The contract refresh is complete. */ + FINISHED = "finished", + /** The contract refresh has been queued and await execution. */ + QUEUED = "queued", + /** The contract was unable to be queued due to an internal error. */ + QUEUE_FAILED = "queue_failed" +} +/** + * The parameter field of {@link TransactionReceiptsParams}. + * + * @public + */ +export interface TransactionReceiptsBlockNumber { + /** The block number to get transaction receipts for. */ + blockNumber: string; +} +/** + * The parameter field of {@link TransactionReceiptsParams}. + * + * @public + */ +export interface TransactionReceiptsBlockHash { + /** The block hash to get transaction receipts for. */ + blockHash: string; +} +/** + * The parameters to use with the {@link CoreNamespace.getTransactionReceipts} method. + * + * @public + */ +export declare type TransactionReceiptsParams = TransactionReceiptsBlockNumber | TransactionReceiptsBlockHash; +/** + * Response object for a {@link CoreNamespace.getTransactionReceipts} call. + * + * @public + */ +export interface TransactionReceiptsResponse { + /** A list of transaction receipts for the queried block. */ + receipts: TransactionReceipt[] | null; +} +/** + * Metadata object returned in a {@link AssetTransfersResult} object if the asset + * transferred is an ERC1155. + * + * @public + */ +export interface ERC1155Metadata { + tokenId: string; + value: string; +} +/** + * Information about the underlying contract for the asset that was transferred + * in a {@link AssetTransfersResult} object. + * + * @public + */ +export interface RawContract { + /** + * The raw transfer value as a hex string. `null` if the transfer was for an + * ERC721 or ERC1155 token. + */ + value: string | null; + /** The contract address. `null` if it was an internal or external transfer. */ + address: string | null; + /** + * The number of decimals in the contract as a hex string. `null` if the value + * is not in the contract and not available from other sources. + */ + decimal: string | null; +} +/** + * Optional parameters object for the {@link getNftsForContract} and + * {@link getNftsForContractIterator} functions. + * + * This interface is used to fetch NFTs with their associated metadata. To get + * Nfts without their associated metadata, use {@link GetBaseNftsForContractOptions}. + * + * @public + */ +export interface GetNftsForContractOptions { + /** + * Optional page key from an existing {@link NftContractBaseNftsResponse} or + * {@link NftContractNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */ + omitMetadata?: boolean; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; +} +/** + * Optional parameters object for the {@link getNftsForContract} and + * {@link getNftsForContractIterator} functions. + * + * This interface is used to fetch NFTs without their associated metadata. To + * get Nfts with their associated metadata, use {@link GetNftsForContractOptions}. + * + * @public + */ +export interface GetBaseNftsForContractOptions { + /** + * Optional page key from an existing {@link NftContractBaseNftsResponse} or + * {@link NftContractNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */ + omitMetadata: false; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; +} +/** + * Optional parameters object for the {@link getNftsForContract} method. + * + * This interface configures options when fetching the owner addresses of the + * provided contract. + * + * @public + */ +export interface GetOwnersForContractOptions { + /** + * Whether to include the token balances per token id for each owner. Defaults + * to false when omitted. + */ + withTokenBalances?: boolean; + /** The block number in hex or decimal to fetch owners for. */ + block?: string; + /** Optional page key to paginate the next page for large requests. */ + pageKey?: string; +} +/** + * Optional parameters object for the {@link getNftsForContract} method. + * + * This interface configures options when fetching the owner addresses of the + * provided contract. + * + * @public + */ +export interface GetOwnersForContractWithTokenBalancesOptions { + /** + * Whether to include the token balances per token id for each owner. Defaults + * to false when omitted. + */ + withTokenBalances: true; + /** The block number in hex or decimal to fetch owners for. */ + block?: string; + /** Optional page key to paginate the next page for large requests. */ + pageKey?: string; +} +/** + * The response object for the {@link getNftsForContract} function. The object + * contains the NFTs without metadata inside the NFT contract. + * + * @public + */ +export interface NftContractBaseNftsResponse { + /** An array of NFTs without metadata. */ + nfts: BaseNft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + pageKey?: string; +} +/** + * The response object for the {@link getNftsForContract} function. The object + * contains the NFTs with metadata inside the NFT contract. + * + * @public + */ +export interface NftContractNftsResponse { + /** An array of NFTs with metadata. */ + nfts: Nft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + pageKey?: string; +} +/** OpenSea's metadata for an NFT collection. */ +export interface OpenSeaCollectionMetadata { + /** The floor price of the NFT. */ + floorPrice?: number; + /** The name of the collection on OpenSea. */ + collectionName?: string; + /** The approval status of the collection on OpenSea. */ + safelistRequestStatus?: OpenSeaSafelistRequestStatus; + /** The image URL determined by OpenSea. */ + imageUrl?: string; + /** The description of the collection on OpenSea. */ + description?: string; + /** The homepage of the collection as determined by OpenSea. */ + externalUrl?: string; + /** The Twitter handle of the collection. */ + twitterUsername?: string; + /** The Discord URL of the collection. */ + discordUrl?: string; + /** Timestamp of when the OpenSea metadata was last ingested by Alchemy. */ + lastIngestedAt?: string; +} +/** An OpenSea collection's approval status. */ +export declare enum OpenSeaSafelistRequestStatus { + /** Verified collection. */ + VERIFIED = "verified", + /** Collections that are approved on open sea and can be found in search results. */ + APPROVED = "approved", + /** Collections that requested safelisting on OpenSea. */ + REQUESTED = "requested", + /** Brand new collections. */ + NOT_REQUESTED = "not_requested" +} +/** + * The response object for the {@link findContractDeployer} function. + * + * @public + */ +export interface DeployResult { + /** The address of the contract deployer, if it is available. */ + readonly deployerAddress?: string; + /** The block number the contract was deployed in. */ + readonly blockNumber: number; +} +/** + * Method names for Alchemy's custom Subscription API endpoints. + * + * This value is provided in the `method` field when creating an event filter on + * the Websocket Namespace. + */ +export declare enum AlchemySubscription { + PENDING_TRANSACTIONS = "alchemy_pendingTransactions", + MINED_TRANSACTIONS = "alchemy_minedTransactions" +} +/** + * Event filter for the {@link AlchemyWebSocketProvider.on} and + * {@link AlchemyWebSocketProvider.once} methods to use Alchemy's custom + * `alchemy_pendingTransactions` endpoint. + * + * Returns the transaction information for all pending transactions that match a + * given filter. For full documentation, see: + * {@link https://docs.alchemy.com/reference/alchemy-pendingtransactions} + * + * Note that excluding all optional parameters will return transaction + * information for ALL pending transactions that are added to the mempool. + * + * @public + */ +export interface AlchemyPendingTransactionsEventFilter { + method: AlchemySubscription.PENDING_TRANSACTIONS; + /** Filter pending transactions sent FROM the provided address or array of addresses. */ + fromAddress?: string | string[]; + /** Filter pending transactions sent TO the provided address or array of addresses. */ + toAddress?: string | string[]; + /** + * Whether to only include transaction hashes and exclude the rest of the + * transaction response for a smaller payload. Defaults to false (by default, + * the entire transaction response is included). + * + * Note that setting only {@link hashesOnly} to true will return the same + * response as subscribing to `newPendingTransactions`. + */ + hashesOnly?: boolean; +} +/** + * Event filter for the {@link AlchemyWebSocketProvider.on} and + * {@link AlchemyWebSocketProvider.once} methods to use Alchemy's custom + * `alchemy_minedTransactions` endpoint. + * + * Returns the transaction information for all mined transactions that match the + * provided filter. For full documentation, see: + * {@link https://docs.alchemy.com/reference/alchemy-minedtransactions} + * + * Note that excluding all optional parameters will return transaction + * information for ALL mined transactions. + * + * @public + */ +export interface AlchemyMinedTransactionsEventFilter { + method: AlchemySubscription.MINED_TRANSACTIONS; + /** + * Address filters to subscribe to. Defaults to all transactions if omitted. + * Limit 100 address filters. Requires a non-empty array. + */ + addresses?: NonEmptyArray; + /** + * Whether to include transactions that were removed from the mempool. + * Defaults to false. + */ + includeRemoved?: boolean; + /** + * Whether to only include transaction hashes and exclude the rest of the + * transaction response for a smaller payload. Defaults to false (by default, + * the entire transaction response is included). + */ + hashesOnly?: boolean; +} +/** + * Address filters for {@link AlchemyMinedTransactionsEventFilter}. Requires at + * least one of the fields to be set. + */ +export declare type AlchemyMinedTransactionsAddress = RequireAtLeastOne<{ + to?: string; + from?: string; +}>; +/** + * Alchemy's event type that extends the default {@link EventType} interface to + * also include Alchemy's Subscription API. + * + * @public + */ +export declare type AlchemyEventType = EventType | AlchemyEventFilter; +/** + * This type represents the Alchemy's Subscription API endpoints as event + * filters compatible with other ethers events. + */ +export declare type AlchemyEventFilter = AlchemyMinedTransactionsEventFilter | AlchemyPendingTransactionsEventFilter; +/** Options for the {@link TransactNamespace.sendPrivateTransaction} method. */ +export interface SendPrivateTransactionOptions { + /** + * Whether to use fast-mode. Defaults to false. Please note that fast mode + * transactions cannot be cancelled using + * {@link TransactNamespace.cancelPrivateTransaction}. method. + * + * See {@link https://docs.flashbots.net/flashbots-protect/rpc/fast-mode} for + * more details. + */ + fast: boolean; +} +/** SDK representation of a Webhook in the Notify API. */ +export interface Webhook { + /** The webhook's unique id. */ + id: string; + /** The network the webhook is on. */ + network: Network; + /** The type of webhook. */ + type: WebhookType; + /** The url that the webhook sends its payload to. */ + url: string; + /** Whether the webhook is currently active */ + isActive: boolean; + /** The creation time of the webhook as an ISO string. */ + timeCreated: string; + /** The signing key used to verify payloads for the webhook. */ + signingKey: string; + /** The webhook version. All newly created webhooks default to V2. */ + version: WebhookVersion; + /** + * The app id of the app used for the webhook. This field is only present on + * {@link MinedTransactionWebhook} and {@link DroppedTransactionWebhook} + */ + appId?: string; +} +/** The version of the webhook. All newly created webhooks default to V2. */ +export declare enum WebhookVersion { + V1 = "V1", + V2 = "V2" +} +/** The type of {@link Webhook}. */ +export declare enum WebhookType { + MINED_TRANSACTION = "MINED_TRANSACTION", + DROPPED_TRANSACTION = "DROPPED_TRANSACTION", + ADDRESS_ACTIVITY = "ADDRESS_ACTIVITY", + NFT_ACTIVITY = "NFT_ACTIVITY" +} +/** + * A Mined Transaction Webhook is used to notify your app whenever a transaction + * sent through your API key gets successfully mined. This is useful if you want + * to notify customers that their transaction went through. + */ +export interface MinedTransactionWebhook extends Webhook { + type: WebhookType.MINED_TRANSACTION; +} +/** + * A Dropped Transaction webhook is used to notify your app whenever a + * transaction sent through your API key gets dropped. This can be useful if you + * want to notify customers that their transactions were dropped. + */ +export interface DroppedTransactionWebhook extends Webhook { + type: WebhookType.DROPPED_TRANSACTION; +} +/** + * An Address Activity Webhook tracks ETH, ERC20, ERC721, and ERC1155 transfers + * for the provided addresses. This can be used to notify your app with + * real-time state changes when your tracked addresses send or receive tokens. + */ +export interface AddressActivityWebhook extends Webhook { + type: WebhookType.ADDRESS_ACTIVITY; +} +/** + * The NFT Activity Webhook tracks all ERC721 and ERC1155 activity. This can be + * used to notify your app with real time state changes when an NFT is + * transferred between addresses. + */ +export interface NftActivityWebhook extends Webhook { + type: WebhookType.NFT_ACTIVITY; +} +/** The response for a {@link NotifyNamespace.getAllWebhooks} method. */ +export interface GetAllWebhooksResponse { + /** All webhooks attached to the provided auth token. */ + webhooks: Webhook[]; + /** The total number of webhooks. */ + totalCount: number; +} +/** Options object for the {@link NotifyNamespace.getAddresses} method. */ +export interface GetAddressesOptions { + /** Number of addresses to fetch. */ + limit?: number; + /** Page */ + pageKey?: string; +} +/** Response object for the {@link NotifyNamespace.getAddresses} method. */ +export interface AddressActivityResponse { + /** The addresses for the webhook. */ + addresses: string[]; + /** The total number of addresses. */ + totalCount: number; + /** Optional page key used to fetch the remaining addresses. */ + pageKey?: string; +} +/** + * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order + * to create a {@link MinedTransactionWebhook} or {@link DroppedTransactionWebhook}. + * + * The webhook will be created on the app and network associated with the appId. + * To find the app id of a project, go to the Alchemy Dashboard in the Apps tab. + * After clicking on an app, the app id is the string in the URL following 'apps/'. + * + * This is a temporary workaround for now. We're planning on detecting the app + * id from the provided api key directly. Stay tuned! + */ +export interface TransactionWebhookParams { + /** The app id of the project to create the webhook on. */ + appId: string; +} +/** + * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order + * to create a {@link NftActivityWebhook}. + */ +export interface NftWebhookParams { + /** Array of NFT filters the webhook should track. */ + filters: NftFilter[]; + /** + * Optional network to create the webhook on. If omitted, the webhook will be + * created on network of the app provided in the api key config. + */ + network?: Network; +} +/** + * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order + * to create a {@link AddressActivityWebhook}. + */ +export interface AddressWebhookParams { + /** Array of addresses the webhook should activity for. */ + addresses: string[]; + /** + * Optional network to create the webhook on. If omitted, the webhook will be + * created on network of the app provided in the api key config. + */ + network?: Network; +} +/** NFT to track on a {@link NftActivityWebhook}. */ +export interface NftFilter { + /** The contract address of the NFT. */ + contractAddress: string; + /** The token id of the NFT. */ + tokenId: BigNumberish; +} +/** Response object for the {@link NotifyNamespace.getNftFilters} method. */ +export interface NftFiltersResponse { + /** The NFT filters on the provided webhook. */ + filters: NftFilter[]; + /** The total number of NFT filters on the webhook. */ + totalCount: number; + /** Optional page key used to fetch the remaining filters. */ + pageKey?: string; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to mark a + * webhook as active or inactive. + */ +export interface WebhookStatusUpdate { + /** Whether the webhook is active. */ + isActive: boolean; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to add and + * remove NFT filters for a {@link NftActivityWebhook}. + */ +export interface WebhookNftFilterUpdate { + /** The filters to additionally track. */ + addFilters: NftFilter[]; + /** Existing filters to remove. */ + removeFilters: NftFilter[]; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to add and + * remove addresses for a {@link AddressActivityWebhook}. + */ +export interface WebhookAddressUpdate { + /** The addresses to additionally track. */ + addAddresses: string[]; + /** Existing addresses to remove. */ + removeAddresses: string[]; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to replace + * all existing addresses for a {@link AddressActivityWebhook}. + */ +export interface WebhookAddressOverride { + /** The new addresses to track. Existing addresses will be removed. */ + newAddresses: string[]; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to update a + * {@link NftActivityWebhook}. + */ +export declare type NftWebhookUpdate = WebhookStatusUpdate | RequireAtLeastOne; +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to update a + * {@link AddressActivityWebhook}. + */ +export declare type AddressWebhookUpdate = WebhookStatusUpdate | RequireAtLeastOne | WebhookAddressOverride; +/** + * Requires at least one of the properties to be set. + * + * Implementation copied over from + * {@link https://learn.microsoft.com/en-us/javascript/api/@azure/keyvault-certificates/requireatleastone?view=azure-node-latest} + */ +export declare type RequireAtLeastOne = { + [K in keyof T]-?: Required> & Partial>>; +}[keyof T]; +/** Requires an array with at least one value. */ +export declare type NonEmptyArray = [T, ...T[]]; diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/util/const.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/util/const.d.ts new file mode 100644 index 0000000..1269128 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/util/const.d.ts @@ -0,0 +1,43 @@ +import { Network as NetworkFromEthers } from '@ethersproject/networks'; +import { Network } from '../types/types'; +export declare const DEFAULT_ALCHEMY_API_KEY = "demo"; +export declare const DEFAULT_NETWORK = Network.ETH_MAINNET; +export declare const DEFAULT_MAX_RETRIES = 5; +export declare function getAlchemyNftHttpUrl(network: Network, apiKey: string): string; +export declare function getAlchemyWsUrl(network: Network, apiKey: string): string; +export declare function getAlchemyWebhookHttpUrl(): string; +export declare enum AlchemyApiType { + BASE = 0, + NFT = 1, + WEBHOOK = 2 +} +/** + * Mapping of network names to their corresponding Network strings used to + * create an Ethers.js Provider instance. + */ +export declare const EthersNetwork: { + "eth-mainnet": string; + "eth-ropsten": string; + "eth-goerli": string; + "eth-kovan": string; + "eth-rinkeby": string; + "opt-mainnet": string; + "opt-kovan": string; + "opt-goerli": string; + "arb-mainnet": string; + "arb-rinkeby": string; + "arb-goerli": string; + "polygon-mainnet": string; + "polygon-mumbai": string; + "astar-mainnet": string; +}; +/** + * Mapping of network names to their corresponding Ethers Network objects. These + * networks are not yet supported by Ethers and are listed here to be overriden + * in the provider. + */ +export declare const CustomNetworks: { + [key: string]: NetworkFromEthers; +}; +export declare function noop(): void; +export declare const ETH_NULL_VALUE = "0x"; diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/util/logger.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/util/logger.d.ts new file mode 100644 index 0000000..7e8cda8 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/util/logger.d.ts @@ -0,0 +1,55 @@ +/** + * The SDK has 4 log levels and a 5th option for disabling all logging. By + * default, the log level is set to INFO. + * + * The order is a follows: DEBUG < INFO < WARN < ERROR + * + * All log types above the current log level will be outputted. + */ +export declare enum LogLevel { + DEBUG = 0, + INFO = 1, + WARN = 2, + ERROR = 3, + SILENT = 4 +} +/** + * The level of verbosity for the logger. + * + * @public + */ +export declare type LogLevelString = 'debug' | 'info' | 'warn' | 'error' | 'silent'; +/** + * Configures the verbosity of logging. The default log level is `info`. + * + * @param logLevel - The verbosity of logging. Can be any of the following values: + * + * - `debug`: The most verbose logging level. + * - `info`: The default logging level. + * - `warn`: A logging level for non-critical issues. + * - `error`: A logging level for critical issues. + * - `silent`: Turn off all logging. + * + * @public + */ +export declare function setLogLevel(logLevel: LogLevelString): void; +export declare function logDebug(message: string, ...args: unknown[]): void; +export declare function logInfo(message: string, ...args: unknown[]): void; +export declare function logWarn(message: string, ...args: unknown[]): void; +export declare function logError(message: string, ...args: unknown[]): void; +export declare class Logger { + /** The log level of the given Logger instance. */ + private _logLevel; + constructor(); + get logLevel(): LogLevel; + set logLevel(val: LogLevel); + debug(...args: unknown[]): void; + info(...args: unknown[]): void; + warn(...args: unknown[]): void; + error(...args: unknown[]): void; + /** + * Forwards log messages to their corresponding console counterparts if the + * log level allows it. + */ + private _log; +} diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/util/sendRest.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/util/sendRest.d.ts new file mode 100644 index 0000000..e356e41 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/util/sendRest.d.ts @@ -0,0 +1,11 @@ +/** + * Given a REST endpoint, method, and params, sends the request with axios and + * returns the response. + */ +import { AxiosRequestConfig, AxiosResponse } from 'axios'; +/** + * Helper function to send http requests using Axis. + * + * @private + */ +export declare function sendAxiosRequest(baseUrl: string, restApiName: string, methodName: string, params: Req, overrides?: AxiosRequestConfig): Promise>; diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/util/util.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/util/util.d.ts new file mode 100644 index 0000000..7ce652d --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/util/util.d.ts @@ -0,0 +1,13 @@ +import { BaseNft, Nft, NftContract } from '../api/nft'; +import { RawBaseNft, RawContractBaseNft, RawGetContractsForOwnerResponse, RawGetNftSalesResponse, RawNft, RawNftAttributeRarity, RawNftContract, RawOpenSeaCollectionMetadata } from '../internal/raw-interfaces'; +import { GetContractsForOwnerResponse, GetNftSalesResponse, NftAttributeRarity, OpenSeaCollectionMetadata } from '../types/types'; +export declare function formatBlock(block: string | number): string; +export declare function getNftContractFromRaw(rawNftContract: RawNftContract): NftContract; +export declare function getBaseNftFromRaw(rawBaseNft: RawBaseNft): BaseNft; +export declare function getBaseNftFromRaw(rawContractBaseNft: RawContractBaseNft, contractAddress: string): BaseNft; +export declare function getNftFromRaw(rawNft: RawNft): Nft; +export declare function getNftSalesFromRaw(rawNftSales: RawGetNftSalesResponse): GetNftSalesResponse; +export declare function getNftRarityFromRaw(rawNftRarity: RawNftAttributeRarity[]): NftAttributeRarity[]; +export declare function getContractsForOwnerFromRaw(rawContractsForOwner: RawGetContractsForOwnerResponse): GetContractsForOwnerResponse; +export declare function parseOpenSeaMetadata(openSea: RawOpenSeaCollectionMetadata | undefined): OpenSeaCollectionMetadata | undefined; +export declare const IS_BROWSER: boolean; diff --git a/test/node_modules/alchemy-sdk/dist/esm/src/version.d.ts b/test/node_modules/alchemy-sdk/dist/esm/src/version.d.ts new file mode 100644 index 0000000..86a14fc --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/src/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "2.2.5"; diff --git a/test/node_modules/alchemy-sdk/dist/esm/test/integration/alchemy.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/test/integration/alchemy.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/test/integration/alchemy.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/test/integration/core.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/test/integration/core.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/test/integration/core.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/test/integration/nft.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/test/integration/nft.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/test/integration/nft.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/test/integration/notify.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/test/integration/notify.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/test/integration/notify.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/test/integration/provider.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/test/integration/provider.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/test/integration/provider.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/test/integration/transact.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/test/integration/transact.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/test/integration/transact.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/test/integration/wallet.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/test/integration/wallet.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/test/integration/wallet.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/test/test-util.d.ts b/test/node_modules/alchemy-sdk/dist/esm/test/test-util.d.ts new file mode 100644 index 0000000..52fd8cd --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/test/test-util.d.ts @@ -0,0 +1,45 @@ +/// +import { BaseNft, Media, Nft, NftContract, NftSaleMarketplace, NftSaleTakerType, NftTokenType, OwnedBaseNft, OwnedNft, TokenUri } from '../src'; +import { RawBaseNft, RawContractBaseNft, RawContractForOwner, RawNft, RawNftContract, RawNftContractMetadata, RawNftSale, RawOpenSeaCollectionMetadata, RawOwnedBaseNft, RawOwnedNft } from '../src/internal/raw-interfaces'; +import { BlockHead, LogsEvent } from '../src/internal/websocket-backfiller'; +export declare const TEST_WALLET_PRIVATE_KEY = "dd5bdf09397b1fdf98e4f72c66047d5104b1511fa7dc1b8fdddd61a150f732c9"; +export declare const TEST_WALLET_PUBLIC_ADDRESS = "0x4b9007B0BcE78cfB634032ec31Ed56adB464287b"; +/** Creates a dummy response for the `getContractMetadata` endpoint. */ +export declare function createRawNftContract(address: string, tokenType: NftTokenType, name?: string, symbol?: string, totalSupply?: string, openSea?: RawOpenSeaCollectionMetadata): RawNftContract; +export declare function createRawOpenSeaCollectionMetadata(): RawOpenSeaCollectionMetadata; +export declare function createRawOwnedBaseNft(address: string, tokenId: string, balance: string, tokenType?: NftTokenType): RawOwnedBaseNft; +export declare function createOwnedBaseNft(address: string, tokenId: string, balance: number, tokenType?: NftTokenType): OwnedBaseNft; +export declare function createRawBaseNft(contractAddress: string, tokenId: string | number, tokenType?: NftTokenType): RawBaseNft; +export declare function createBaseNft(address: string, tokenId: string | number, tokenType?: NftTokenType): BaseNft; +export declare function createNft(title: string, address: string, tokenId: string, tokenType?: NftTokenType, tokenUri?: TokenUri, media?: TokenUri[] | undefined): Nft; +interface RawNftOptions { + tokenUri?: TokenUri; + media?: TokenUri[] | undefined; + timeLastUpdated?: string; + description?: string | Array; + contractMetadata?: RawNftContractMetadata; +} +export declare function createRawNft(contractAddress: string, title: string, tokenId: string, tokenType?: NftTokenType, options?: RawNftOptions): RawNft; +export declare function createRawOwnedNft(title: string, address: string, tokenId: string, balance: string, tokenType?: NftTokenType, contractMetadata?: RawNftContractMetadata): RawOwnedNft; +export declare function createOwnedNft(title: string, address: string, tokenId: string, balance: number, tokenType?: NftTokenType): OwnedNft; +export declare function createRawNftContractBaseNft(tokenId: string): RawContractBaseNft; +export declare function createRawNftSale(contractAddress: string, tokenId: string, marketplace: NftSaleMarketplace, taker: NftSaleTakerType, buyerAddress: string, sellerAddress: string): RawNftSale; +export declare function createRawContractForOwner(address: string, tokenId: string, media: Media, isSpam?: boolean, name?: string, tokenType?: NftTokenType, symbol?: string, totalSupply?: string, opensea?: RawOpenSeaCollectionMetadata): RawContractForOwner; +export declare function createNftMediaData(bytes?: number, format?: string, thumbnail?: string): Media; +export declare function verifyNftContractMetadata(actualNftContract: NftContract, expectedNftContract: NftContract, address: string, name: string, symbol: string, totalSupply: string, tokenType?: NftTokenType, openSea?: RawOpenSeaCollectionMetadata): void; +export declare type Mocked = T & { + [K in keyof T]: T[K] extends Function ? T[K] & jest.Mock : T[K]; +}; +/** A Promise implementation for deferred resolution. */ +export declare class Deferred { + promise: Promise; + constructor(); + resolve: (value: R | Promise) => void; + reject: (reason: Error) => void; +} +export declare function makeNewHeadsEvent(blockNumber: number, hash: string): BlockHead; +export declare function makeLogsEvent(blockNumber: number, blockHash: string, isRemoved?: boolean, logIndex?: number): LogsEvent; +export declare const TESTING_PRIVATE_KEY = "dd5bdf09397b1fdf98e4f72c66047d5104b1511fa7dc1b8fdddd61a150f732c9"; +export declare const TESTING_PUBLIC_ADDRESS = "0x4b9007B0BcE78cfB634032ec31Ed56adB464287b"; +export declare function loadAlchemyEnv(): Promise; +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/test/unit/alchemy.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/test/unit/alchemy.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/test/unit/alchemy.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/test/unit/backoff.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/test/unit/backoff.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/test/unit/backoff.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/test/unit/contract.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/test/unit/contract.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/test/unit/contract.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/test/unit/core-namespace.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/test/unit/core-namespace.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/test/unit/core-namespace.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/test/unit/logger.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/test/unit/logger.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/test/unit/logger.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/test/unit/nft-api.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/test/unit/nft-api.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/test/unit/nft-api.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/test/unit/nft.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/test/unit/nft.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/test/unit/nft.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/test/unit/provider.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/test/unit/provider.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/test/unit/provider.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/test/unit/request-batcher.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/test/unit/request-batcher.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/test/unit/request-batcher.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/test/unit/transact.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/test/unit/transact.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/test/unit/transact.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/test/unit/wallet.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/test/unit/wallet.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/test/unit/wallet.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/test/unit/websocket-backfiller.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/test/unit/websocket-backfiller.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/test/unit/websocket-backfiller.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/esm/test/unit/websocket-provider.test.d.ts b/test/node_modules/alchemy-sdk/dist/esm/test/unit/websocket-provider.test.d.ts new file mode 100644 index 0000000..509db18 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/esm/test/unit/websocket-provider.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/src/api/alchemy-config.d.ts b/test/node_modules/alchemy-sdk/dist/src/api/alchemy-config.d.ts new file mode 100644 index 0000000..668527a --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/api/alchemy-config.d.ts @@ -0,0 +1,54 @@ +import { AlchemySettings, Network } from '../types/types'; +import type { AlchemyProvider } from './alchemy-provider'; +import type { AlchemyWebSocketProvider } from './alchemy-websocket-provider'; +/** + * This class holds the config information for the SDK client instance and + * exposes the underlying providers for more advanced use cases. + * + * @public + */ +export declare class AlchemyConfig { + /** The Alchemy API key. */ + readonly apiKey: string; + /** The Network that this SDK is associated with. */ + readonly network: Network; + /** The maximum number of retries to perform. */ + readonly maxRetries: number; + /** Setting to enable automatic batching on json-rpc requests. Defaults to false.*/ + readonly batchRequests: boolean; + /** + * The optional hardcoded URL to send requests to instead of using the network + * and apiKey. + */ + readonly url?: string; + /** The optional Alchemy auth token to use when sending requests with the Notify API. */ + readonly authToken?: string; + constructor(config?: AlchemySettings); + /** + * Returns an AlchemyProvider instance. Only one provider is created per + * Alchemy instance. + * + * The AlchemyProvider is a wrapper around ether's `AlchemyProvider` class and + * has been expanded to support Alchemy's Enhanced APIs. + * + * Most common methods on the provider are available as top-level methods on + * the {@link Alchemy} instance, but the provider is exposed here to access + * other less-common methods. + * + * @public + */ + getProvider(): Promise; + /** + * Returns an AlchemyWebsocketProvider instance. Only one provider is created + * per Alchemy instance. + * + * The AlchemyWebSocketProvider is a wrapper around ether's + * `AlchemyWebSocketProvider` class and has been expanded to support Alchemy's + * Subscription APIs, automatic backfilling, and other performance improvements. + * + * Most common methods on the provider are available as top-level methods on + * the {@link Alchemy} instance, but the provider is exposed here to access + * other less-common methods. + */ + getWebSocketProvider(): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/src/api/alchemy-contract.d.ts b/test/node_modules/alchemy-sdk/dist/src/api/alchemy-contract.d.ts new file mode 100644 index 0000000..0b29274 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/api/alchemy-contract.d.ts @@ -0,0 +1,17 @@ +import { Contract as EthersContract, ContractFactory as EthersContractFactory } from '@ethersproject/contracts'; +/** + * The Contract class is a wrapper around the Contract class from ethers.js and + * is exported here for convenience. + * + * @public + */ +export declare class Contract extends EthersContract { +} +/** + * The ContractFactory class is a wrapper around the ContractFactory class from + * ethers.js and is exported here for convenience. + * + * @public + */ +export declare class ContractFactory extends EthersContractFactory { +} diff --git a/test/node_modules/alchemy-sdk/dist/src/api/alchemy-provider.d.ts b/test/node_modules/alchemy-sdk/dist/src/api/alchemy-provider.d.ts new file mode 100644 index 0000000..4db39c1 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/api/alchemy-provider.d.ts @@ -0,0 +1,40 @@ +import { Network as NetworkFromEthers } from '@ethersproject/networks'; +import { CommunityResourcable, JsonRpcProvider } from '@ethersproject/providers'; +/** + * SDK's custom implementation of ethers.js's 'AlchemyProvider'. + * + * Do not call this constructor directly. Instead, instantiate an instance of + * {@link Alchemy} and call {@link Alchemy.config.getProvider()}. + * + * @public + */ +export declare class AlchemyProvider extends JsonRpcProvider implements CommunityResourcable { + readonly apiKey: string; + readonly maxRetries: number; + readonly batchRequests: boolean; + /** + * Overrides the method in ethers.js's `StaticJsonRpcProvider` class. This + * method is called when calling methods on the parent class `BaseProvider`. + * + * @override + */ + detectNetwork(): Promise; + _startPending(): void; + /** + * Overrides the ether's `isCommunityResource()` method. Returns true if the + * current api key is the default key. + * + * @override + */ + isCommunityResource(): boolean; + /** + * Overrides the base {@link JsonRpcProvider.send} method to implement custom + * logic for sending requests to Alchemy. + * + * @param method The method name to use for the request. + * @param params The parameters to use for the request. + * @override + * @public + */ + send(method: string, params: Array): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/src/api/alchemy-wallet.d.ts b/test/node_modules/alchemy-sdk/dist/src/api/alchemy-wallet.d.ts new file mode 100644 index 0000000..ccfde02 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/api/alchemy-wallet.d.ts @@ -0,0 +1,103 @@ +import { BlockTag, FeeData, Provider, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; +import { ExternallyOwnedAccount } from '@ethersproject/abstract-signer'; +import { BigNumber } from '@ethersproject/bignumber'; +import { BytesLike } from '@ethersproject/bytes'; +import { Deferrable } from '@ethersproject/properties'; +import { SigningKey } from '@ethersproject/signing-key'; +import { Wallet as EthersWallet } from '@ethersproject/wallet'; +import { Alchemy } from './alchemy'; +/** + * The Wallet class inherits Signer and can sign transactions and messages using + * a private key as a standard Externally Owned Account (EOA). + * + * SDK's custom implementation of Ethers.js's 'Wallet'. + * + * Primary difference from Ethers.js 'Wallet' is that you can pass in either a + * Provider or an Alchemy object. This implementation will intelligently detect + * the format and set the provider accordingly. + * + * @public + * @override + */ +export declare class Wallet extends EthersWallet { + private alchemyProviderPromise?; + /** + * Overload permits users to pass in either a standard Provider or an Alchemy + * object. The constructor will detect the object type and handle appropriately. + * + * @override + */ + constructor(privateKey: BytesLike | ExternallyOwnedAccount | SigningKey, alchemyOrProvider?: Alchemy | Provider); + /** + * Returns the balance of this wallet at blockTag. + * + * @param blockTag The block to check the balance of + * @override + */ + getBalance(blockTag?: BlockTag): Promise; + /** + * Returns the number of transactions this account has ever sent. This is the + * value required to be included in transactions as the nonce. + * + * @param blockTag The block to check the transaction count on + * @override + */ + getTransactionCount(blockTag?: BlockTag): Promise; + /** + * Returns the result of estimating the cost to send the transactionRequest, + * with this account address being used as the from field. + * + * @param transaction Transaction to estimate the gas on + * @override + */ + estimateGas(transaction: Deferrable): Promise; + /** + * Returns the result of calling using the transactionRequest, with this + * account address being used as the from field. + * + * @param transaction To make a call on + * @param blockTag The block to make the call on + * @override + */ + call(transaction: Deferrable, blockTag?: BlockTag): Promise; + /** + * Populates all fields in a transaction, signs it and sends it to the network + * + * @override + */ + sendTransaction(transaction: Deferrable): Promise; + /** + * Returns the chain ID this wallet is connected to. + * + * @override + */ + getChainId(): Promise; + /** + * Returns the current gas price. + * + * @override + */ + getGasPrice(): Promise; + /** + * Returns the current recommended FeeData to use in a transaction. + * + * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas + * should be used. + * + * For legacy transactions and networks which do not support EIP-1559, the + * gasPrice should be used. + * + * @override + */ + getFeeData(): Promise; + /** + * Looks up the address of name. If the name is not owned, or does not have a + * Resolver configured, or the Resolver does not have an address configured, + * null is returned. + * + * @param name Name of the ENS address + * @override + */ + resolveName(name: string): Promise; + private getWallet; +} diff --git a/test/node_modules/alchemy-sdk/dist/src/api/alchemy-websocket-provider.d.ts b/test/node_modules/alchemy-sdk/dist/src/api/alchemy-websocket-provider.d.ts new file mode 100644 index 0000000..6ef11fe --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/api/alchemy-websocket-provider.d.ts @@ -0,0 +1,135 @@ +import { Listener } from '@ethersproject/abstract-provider'; +import { CommunityResourcable, WebSocketProvider } from '@ethersproject/providers'; +import { EthersEvent } from '../internal/ethers-event'; +import { AlchemyEventType } from '../types/types'; +/** + * SDK's custom implementation fo the ethers.js's 'AlchemyWebSocketProvider'. + * + * Do not call this constructor directly. Instead, instantiate an instance of + * {@link Alchemy} and call {@link Alchemy.config.getWebSocketProvider()}. + * + * @public + */ +export declare class AlchemyWebSocketProvider extends WebSocketProvider implements CommunityResourcable { + _events: Array; + readonly apiKey: string; + /** + * Overridden implementation of ethers that includes Alchemy based subscriptions. + * + * @param eventName Event to subscribe to + * @param listener The listener function to call when the event is triggered. + * @override + * @public + */ + on(eventName: AlchemyEventType, listener: Listener): this; + /** + * Overridden implementation of ethers that includes Alchemy based + * subscriptions. Adds a listener to the triggered for only the next + * {@link eventName} event, after which it will be removed. + * + * @param eventName Event to subscribe to + * @param listener The listener function to call when the event is triggered. + * @override + * @public + */ + once(eventName: AlchemyEventType, listener: Listener): this; + /** + * Removes the provided {@link listener} for the {@link eventName} event. If no + * listener is provided, all listeners for the event will be removed. + * + * @param eventName Event to unlisten to. + * @param listener The listener function to remove. + * @override + * @public + */ + off(eventName: AlchemyEventType, listener?: Listener): this; + /** + * Remove all listeners for the provided {@link eventName} event. If no event + * is provided, all events and their listeners are removed. + * + * @param eventName The event to remove all listeners for. + * @override + * @public + */ + removeAllListeners(eventName?: AlchemyEventType): this; + /** + * Returns the number of listeners for the provided {@link eventName} event. If + * no event is provided, the total number of listeners for all events is returned. + * + * @param eventName The event to get the number of listeners for. + * @public + * @override + */ + listenerCount(eventName?: AlchemyEventType): number; + /** + * Returns an array of listeners for the provided {@link eventName} event. If + * no event is provided, all listeners will be included. + * + * @param eventName The event to get the listeners for. + * @public + * @override + */ + listeners(eventName?: AlchemyEventType): Array; + /** @override */ + destroy(): Promise; + /** + * Overrides the ether's `isCommunityResource()` method. Returns true if the + * current api key is the default key. + * + * @override + */ + isCommunityResource(): boolean; + private emitEvent; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.off()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _off; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.removeAllListeners()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _removeAllListeners; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.listenerCount()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _listenerCount; + /** + * DO NOT MODIFY. + * + * Original code copied over from ether.js's `BaseProvider.listeners()`. + * + * This method is copied over directly in order to implement Alchemy's unique + * subscription types. The only difference is that this method calls + * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in + * order to parse the Alchemy subscription event. + * + * @private + */ + private _listeners; +} diff --git a/test/node_modules/alchemy-sdk/dist/src/api/alchemy.d.ts b/test/node_modules/alchemy-sdk/dist/src/api/alchemy.d.ts new file mode 100644 index 0000000..b25ce73 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/api/alchemy.d.ts @@ -0,0 +1,49 @@ +import { AlchemySettings } from '../types/types'; +import { AlchemyConfig } from './alchemy-config'; +import { CoreNamespace } from './core-namespace'; +import { NftNamespace } from './nft-namespace'; +import { NotifyNamespace } from './notify-namespace'; +import { TransactNamespace } from './transact-namespace'; +import { WebSocketNamespace } from './websocket-namespace'; +/** + * The Alchemy SDK client. This class is the main entry point into Alchemy's + * APIs and separates functionality into different namespaces. + * + * Each SDK instance is associated with a specific network and API key. To use a + * different network or API key, create a new instance of {@link Alchemy}. + * + * @public + */ +export declare class Alchemy { + /** + * The `core` namespace contains the core eth json-rpc calls and Alchemy's + * Enhanced APIs. + */ + readonly core: CoreNamespace; + /** The `nft` namespace contains methods for Alchemy's NFT API. */ + readonly nft: NftNamespace; + /** The `ws` namespace contains methods for using WebSockets and creating subscriptions. */ + readonly ws: WebSocketNamespace; + /** + * The `transact` namespace contains methods for sending transactions and + * checking on the state of submitted transasctions. + */ + readonly transact: TransactNamespace; + /** + * Holds the setting information for the instance of the Alchemy SDK client + * and allows access to the underlying providers. + */ + readonly config: AlchemyConfig; + /** + * The `notify` namespace contains methods for creating and managing webhooks + * as part of the Notify API. + */ + readonly notify: NotifyNamespace; + /** + * @param {string} [settings.apiKey] - The API key to use for Alchemy + * @param {Network} [settings.network] - The network to use for Alchemy + * @param {number} [settings.maxRetries] - The maximum number of retries to attempt + * @public + */ + constructor(settings?: AlchemySettings); +} diff --git a/test/node_modules/alchemy-sdk/dist/src/api/core-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/src/api/core-namespace.d.ts new file mode 100644 index 0000000..bcdfbb9 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/api/core-namespace.d.ts @@ -0,0 +1,311 @@ +import type { Block, BlockTag, BlockWithTransactions, FeeData, Filter, FilterByBlockHash, Log, TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; +import type { BigNumber, BigNumberish } from '@ethersproject/bignumber'; +import type { Network as EthersNetworkAlias } from '@ethersproject/networks/lib/types'; +import type { Deferrable } from '@ethersproject/properties'; +import { AssetTransfersParams, AssetTransfersResponse, AssetTransfersWithMetadataParams, AssetTransfersWithMetadataResponse, DeployResult, TokenBalancesOptionsDefaultTokens, TokenBalancesOptionsErc20, TokenBalancesResponse, TokenBalancesResponseErc20, TokenMetadataResponse, TransactionReceiptsParams, TransactionReceiptsResponse } from '../types/types'; +/** + * The core namespace contains all commonly-used [Ethers.js + * Provider](https://docs.ethers.io/v5/api/providers/api-providers/#AlchemyProvider) + * methods. If you are already using Ethers.js, you should be simply able to + * replace the Ethers.js Provider object with `alchemy.core` when accessing + * provider methods and it should just work. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.core`. + */ +export declare class CoreNamespace { + private readonly config; + /** + * Returns the balance of a given address as of the provided block. + * + * @param addressOrName The address or name of the account to get the balance for. + * @param blockTag The optional block number or hash to get the balance for. + * Defaults to 'latest' if unspecified. + * @public + */ + getBalance(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Returns the contract code of the provided address at the block. If there is + * no contract deployed, the result is `0x`. + * + * @param addressOrName The address or name of the account to get the code for. + * @param blockTag The optional block number or hash to get the code for. + * Defaults to 'latest' if unspecified. + * @public + */ + getCode(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Return the value of the provided position at the provided address, at the + * provided block in `Bytes32` format. + * + * @param addressOrName The address or name of the account to get the code for. + * @param position The position of the storage slot to get. + * @param blockTag The optional block number or hash to get the code for. + * Defaults to 'latest' if unspecified. + * @public + */ + getStorageAt(addressOrName: string | Promise, position: BigNumberish | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Returns the number of transactions ever sent from the provided address, as + * of the provided block tag. This value is used as the nonce for the next + * transaction from the address sent to the network. + * + * @param addressOrName The address or name of the account to get the nonce for. + * @param blockTag The optional block number or hash to get the nonce for. + * @public + */ + getTransactionCount(addressOrName: string | Promise, blockTag?: BlockTag | Promise): Promise; + /** + * Returns the block from the network based on the provided block number or + * hash. Transactions on the block are represented as an array of transaction + * hashes. To get the full transaction details on the block, use + * {@link getBlockWithTransactions} instead. + * + * @param blockHashOrBlockTag The block number or hash to get the block for. + * @public + */ + getBlock(blockHashOrBlockTag: BlockTag | string | Promise): Promise; + /** + * Returns the block from the network based on the provided block number or + * hash. Transactions on the block are represented as an array of + * {@link TransactionResponse} objects. + * + * @param blockHashOrBlockTag The block number or hash to get the block for. + * @public + */ + getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise): Promise; + /** + * Returns the {@link EthersNetworkAlias} Alchemy is connected to. + * + * @public + */ + getNetwork(): Promise; + /** + * Returns the block number of the most recently mined block. + * + * @public + */ + getBlockNumber(): Promise; + /** + * Returns the best guess of the current gas price to use in a transaction. + * + * @public + */ + getGasPrice(): Promise; + /** + * Returns the recommended fee data to use in a transaction. + * + * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas + * should be used. + * + * For legacy transactions and networks which do not support EIP-1559, the + * gasPrice should be used. + * + * @public + */ + getFeeData(): Promise; + /** + * Returns a Promise which will stall until the network has heen established, + * ignoring errors due to the target node not being active yet. + * + * This can be used for testing or attaching scripts to wait until the node is + * up and running smoothly. + * + * @public + */ + ready(): Promise; + /** + * Returns the result of executing the transaction, using call. A call does + * not require any ether, but cannot change any state. This is useful for + * calling getters on Contracts. + * + * @param transaction The transaction to execute. + * @param blockTag The optional block number or hash to get the call for. + * @public + */ + call(transaction: Deferrable, blockTag?: BlockTag | Promise): Promise; + /** + * Returns an estimate of the amount of gas that would be required to submit + * transaction to the network. + * + * An estimate may not be accurate since there could be another transaction on + * the network that was not accounted for, but after being mined affects the + * relevant state. + * + * This is an alias for {@link TransactNamespace.estimateGas}. + * + * @param transaction The transaction to estimate gas for. + * @public + */ + estimateGas(transaction: Deferrable): Promise; + /** + * Returns the transaction with hash or null if the transaction is unknown. + * + * If a transaction has not been mined, this method will search the + * transaction pool. Various backends may have more restrictive transaction + * pool access (e.g. if the gas price is too low or the transaction was only + * recently sent and not yet indexed) in which case this method may also return null. + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransaction(transactionHash: string | Promise): Promise; + /** + * Returns the transaction receipt for hash or null if the transaction has not + * been mined. + * + * To stall until the transaction has been mined, consider the + * waitForTransaction method below. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransactionReceipt(transactionHash: string | Promise): Promise; + /** + * Submits transaction to the network to be mined. The transaction must be + * signed, and be valid (i.e. the nonce is correct and the account has + * sufficient balance to pay for the transaction). + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param signedTransaction The signed transaction to send. + * @public + */ + sendTransaction(signedTransaction: string | Promise): Promise; + /** + * Returns a promise which will not resolve until specified transaction hash is mined. + * + * If {@link confirmations} is 0, this method is non-blocking and if the + * transaction has not been mined returns null. Otherwise, this method will + * block until the transaction has confirmed blocks mined on top of the block + * in which it was mined. + * + * NOTE: This is an alias for {@link TransactNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to wait for. + * @param confirmations The number of blocks to wait for. + * @param timeout The maximum time to wait for the transaction to confirm. + * @public + */ + waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise; + /** + * Returns an array of logs that match the provided filter. + * + * @param filter The filter object to use. + * @public + */ + getLogs(filter: Filter | FilterByBlockHash | Promise): Promise>; + /** + * Allows sending a raw message to the Alchemy backend. + * + * @param method The method to call. + * @param params The parameters to pass to the method. + * @public + */ + send(method: string, params: Array): Promise; + /** + * Finds the address that deployed the provided contract and block number it + * was deployed in. + * + * NOTE: This method performs a binary search across all blocks since genesis + * and can take a long time to complete. This method is a convenience method + * that will eventually be replaced by a single call to an Alchemy endpoint + * with this information cached. + * + * @param contractAddress - The contract address to find the deployer for. + * @beta + */ + findContractDeployer(contractAddress: string): Promise; + /** + * Returns the ERC-20 token balances for a specific owner address. + * + * @param addressOrName The owner address to get the token balances for. + * @public + */ + getTokenBalances(addressOrName: string): Promise; + /** + * Returns the token balances for a specific owner address given a list of contracts. + * + * @param addressOrName The owner address to get the token balances for. + * @param contractAddresses A list of contract addresses to check. If omitted, + * all ERC-20 tokens will be checked. + * @public + */ + getTokenBalances(addressOrName: string, contractAddresses?: string[]): Promise; + /** + * Returns the ERC-20 token balances for a specific owner. + * + * This overload covers the erc-20 token type which includes a page key in the response. + * + * @param addressOrName The owner address to get the token balances for. + * @param options Token type options set to ERC-20 with optional page key. + * @public + */ + getTokenBalances(addressOrName: string, options: TokenBalancesOptionsErc20): Promise; + /** + * Returns the token balances for a specific owner, fetching from the top 100 + * tokens by 24 hour volume. + * + * This overload covers the default token type which includes a page key in + * the response. + * + * @param addressOrName The owner address to get the token balances for. + * @param options Token type options set to ERC-20 with optional page key. + * @public + */ + getTokenBalances(addressOrName: string, options: TokenBalancesOptionsDefaultTokens): Promise; + /** + * Returns metadata for a given token contract address. + * + * @param address The contract address to get metadata for. + * @public + */ + getTokenMetadata(address: string): Promise; + /** + * Get transactions for specific addresses. See the web documentation for the + * full details: + * https://docs.alchemy.com/alchemy/enhanced-apis/transfers-api#alchemy_getassettransfers + * + * This overload requires {@link AssetTransfersWithMetadataParams.withMetadata} + * to be set to `true`, which results in additional metadata returned in the + * response object. + * + * @param params An object containing fields for the asset transfer query + * @public + */ + getAssetTransfers(params: AssetTransfersWithMetadataParams): Promise; + /** + * Get transactions for specific addresses. See the web documentation for the + * full details: + * https://docs.alchemy.com/alchemy/enhanced-apis/transfers-api#alchemy_getassettransfers + * + * @param params An object containing fields for the asset transfer query. + * @public + */ + getAssetTransfers(params: AssetTransfersParams): Promise; + /** + * Gets all transaction receipts for a given block by number or block hash. + * + * @param params An object containing fields for the transaction receipt query. + * @public + */ + getTransactionReceipts(params: TransactionReceiptsParams): Promise; + /** + * Returns the underlying owner address for the provided ENS address, or `null` + * if the ENS name does not have an underlying address. + * + * @param name The ENS address name to resolve. + */ + resolveName(name: string): Promise; + /** + * Performs a reverse lookup of the address in ENS using the Reverse Registrar. If the name does not exist, or the forward lookup does not match, null is returned. + * + * An ENS name requires additional configuration to setup a reverse record, so not all ENS addresses will map back to the original ENS domain. + * + * @param address The address to look up the ENS domain name for. + */ + lookupAddress(address: string): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/src/api/nft-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/src/api/nft-namespace.d.ts new file mode 100644 index 0000000..a2abf6d --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/api/nft-namespace.d.ts @@ -0,0 +1,275 @@ +import type { BigNumberish } from '@ethersproject/bignumber'; +import { GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftResponse, NftAttributeRarity, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, NftTokenType, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult } from '../types/types'; +import { BaseNft, Nft, NftContract } from './nft'; +/** + * The NFT namespace contains all the functionality related to NFTs. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.nft`. + */ +export declare class NftNamespace { + private readonly config; + /** + * Get the NFT metadata associated with the provided parameters. + * + * @param contractAddress - The contract address of the NFT. + * @param tokenId - Token id of the NFT. + * @param tokenType - Optionally specify the type of token to speed up the query. + * @param tokenUriTimeoutInMs - No set timeout by default - When metadata is + * requested, this parameter is the timeout (in milliseconds) for the + * website hosting the metadata to respond. If you want to only access the + * cache and not live fetch any metadata for cache misses then set this value to 0. + * @public + */ + getNftMetadata(contractAddress: string, tokenId: BigNumberish, tokenType?: NftTokenType, tokenUriTimeoutInMs?: number): Promise; + /** + * Gets the NFT metadata for multiple NFT tokens. + * + * @param tokens An array of NFT tokens to fetch metadata for. + * @param options Configuration options for making the request. + */ + getNftMetadataBatch(tokens: Array, options?: NftMetadataBatchOptions): Promise; + /** + * Get the NFT collection metadata associated with the provided parameters. + * + * @param contractAddress - The contract address of the NFT. + * @public + */ + getContractMetadata(contractAddress: string): Promise; + /** + * Fetches all NFTs for a given owner and yields them in an async iterable. + * + * This method returns the full NFT for the owner and pages through all page + * keys until all NFTs have been fetched. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwnerIterator(owner: string, options?: GetNftsForOwnerOptions): AsyncIterable; + /** + * Fetches all NFTs for a given owner and yields them in an async iterable. + * + * This method returns the base NFTs that omit the associated metadata and + * pages through all page keys until all NFTs have been fetched. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwnerIterator(owner: string, options?: GetBaseNftsForOwnerOptions): AsyncIterable; + /** + * Get all NFTs for an owner. + * + * This method returns the full NFTs in the contract. To get all NFTs without + * their associated metadata, use {@link GetBaseNftsForOwnerOptions}. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwner(owner: string, options?: GetNftsForOwnerOptions): Promise; + /** + * Get all base NFTs for an owner. + * + * This method returns the base NFTs that omit the associated metadata. To get + * all NFTs with their associated metadata, use {@link GetNftsForOwnerOptions}. + * + * @param owner - The address of the owner. + * @param options - The optional parameters to use for the request. + * @public + */ + getNftsForOwner(owner: string, options?: GetBaseNftsForOwnerOptions): Promise; + /** + * Get all NFTs for a given contract address. + * + * This method returns the full NFTs in the contract. To get all NFTs without + * their associated metadata, use {@link GetBaseNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The parameters to use for the request. or + * {@link NftContractNftsResponse} response. + * @beta + */ + getNftsForContract(contractAddress: string, options?: GetNftsForContractOptions): Promise; + /** + * Get all base NFTs for a given contract address. + * + * This method returns the base NFTs that omit the associated metadata. To get + * all NFTs with their associated metadata, use {@link GetNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftsForContract(contractAddress: string, options?: GetBaseNftsForContractOptions): Promise; + /** + * Fetches all NFTs for a given contract address and yields them in an async iterable. + * + * This method returns the full NFTs in the contract and pages through all + * page keys until all NFTs have been fetched. To get all NFTs without their + * associated metadata, use {@link GetBaseNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftsForContractIterator(contractAddress: string, options?: GetNftsForContractOptions): AsyncIterable; + /** + * Fetches all base NFTs for a given contract address and yields them in an + * async iterable. + * + * This method returns the base NFTs that omit the associated metadata and + * pages through all page keys until all NFTs have been fetched. To get all + * NFTs with their associated metadata, use {@link GetNftsForContractOptions}. + * + * @param contractAddress - The contract address of the NFT contract. + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftsForContractIterator(contractAddress: string, options?: GetBaseNftsForContractOptions): AsyncIterable; + /** + * Gets all the owners for a given NFT contract along with the token balance. + * + * @param contractAddress - The NFT contract to get the owners for. + * @param options Optional parameters to use for the request. + * @public + */ + getOwnersForContract(contractAddress: string, options: GetOwnersForContractWithTokenBalancesOptions): Promise; + /** + * Gets all the owners for a given NFT contract. + * + * Note that token balances are omitted by default. To include token balances + * for each owner, use {@link GetOwnersForContractWithTokenBalancesOptions}, + * which has the `withTokenBalances` field set to `true`. + * + * @param contractAddress - The NFT contract to get the owners for. + * @param options Optional parameters to use for the request. + * @public + */ + getOwnersForContract(contractAddress: string, options?: GetOwnersForContractOptions): Promise; + /** + * Gets all the owners for a given NFT contract address and token ID. + * + * @param contractAddress - The NFT contract address. + * @param tokenId - Token id of the NFT. + * @beta + */ + getOwnersForNft(contractAddress: string, tokenId: BigNumberish): Promise; + /** + * Gets all NFT contracts held by the specified owner address. + * + * @param owner - Address for NFT owner (can be in ENS format!). + * @param options - The optional parameters to use for the request. + * @public + */ + getContractsForOwner(owner: string, options?: GetContractsForOwnerOptions): Promise; + /** + * DEPRECATED - Checks that the provided owner address owns one of more of the + * provided NFTs. + * + * @deprecated - Use {@link verifyNftOwnership} instead. This method will be + * removed in a future release. + * @param owner - The owner address to check. + * @param contractAddresses - An array of NFT contract addresses to check ownership for. + */ + checkNftOwnership(owner: string, contractAddresses: string[]): Promise; + /** + * Checks that the provided owner address owns one of more of the provided + * NFT. Returns a boolean indicating whether the owner address owns the provided NFT. + * + * @param owner - The owner address to check. + * @param contractAddress - An NFT contract address to check ownership for. + */ + verifyNftOwnership(owner: string, contractAddress: string): Promise; + /** + * Checks which of the provided NFTs the owner address owns. Returns a map of + * contract address to a boolean indicating whether the owner address owns the NFT. + * + * @param owner - The owner address to check. + * @param contractAddresses - An array NFT contract address to check ownership for. + */ + verifyNftOwnership(owner: string, contractAddresses: string[]): Promise<{ + [contractAddress: string]: boolean; + }>; + /** + * Returns whether a contract is marked as spam or not by Alchemy. For more + * information on how we classify spam, go to our NFT API FAQ at + * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification. + * + * @param contractAddress - The contract address to check. + * @beta + */ + isSpamContract(contractAddress: string): Promise; + /** + * Returns a list of all spam contracts marked by Alchemy. For details on how + * Alchemy marks spam contracts, go to + * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification. + * + * @beta + */ + getSpamContracts(): Promise; + /** + * Returns the floor prices of a NFT contract by marketplace. + * + * @param contractAddress - The contract address for the NFT collection. + * @beta + */ + getFloorPrice(contractAddress: string): Promise; + /** + * Returns NFT sales that have happened through on-chain marketplaces. + * + * @param options - The optional parameters to use for the request. + * @beta + */ + getNftSales(options?: GetNftSalesOptions): Promise; + getNftSales(options?: GetNftSalesOptionsByContractAddress): Promise; + /** + * Get the rarity of each attribute of an NFT. + * + * @param contractAddress - Contract address for the NFT collection. + * @param tokenId - Token id of the NFT. + */ + computeRarity(contractAddress: string, tokenId: BigNumberish): Promise; + /** + * Search for a keyword across metadata of all ERC-721 and ERC-1155 smart contracts. + * + * @param query - The search string that you want to search for in contract metadata. + */ + searchContractMetadata(query: string): Promise; + /** + * Get a summary of attribute prevalence for an NFT collection. + * + * @param contractAddress - Contract address for the NFT collection. + */ + summarizeNftAttributes(contractAddress: string): Promise; + /** + * Refreshes the cached metadata for a provided NFT contract address and token + * id. Returns a boolean value indicating whether the metadata was refreshed. + * + * This method is useful when you want to refresh the metadata for a NFT that + * has been updated since the last time it was fetched. Note that the backend + * only allows one refresh per token every 15 minutes, globally for all users. + * The last refresh time for an NFT can be accessed on the + * {@link Nft.timeLastUpdated} field. + * + * To trigger a refresh for all NFTs in a contract, use {@link refreshContract} instead. + * + * @param contractAddress - The contract address of the NFT. + * @param tokenId - The token id of the NFT. + */ + refreshNftMetadata(contractAddress: string, tokenId: BigNumberish): Promise; + /** + * Triggers a metadata refresh all NFTs in the provided contract address. This + * method is useful after an NFT collection is revealed. + * + * Refreshes are queued on the Alchemy backend and may take time to fully + * process. To refresh the metadata for a specific token, use the + * {@link refreshNftMetadata} method instead. + * + * @param contractAddress - The contract address of the NFT collection. + * @beta + */ + refreshContract(contractAddress: string): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/src/api/nft.d.ts b/test/node_modules/alchemy-sdk/dist/src/api/nft.d.ts new file mode 100644 index 0000000..d7a60ad --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/api/nft.d.ts @@ -0,0 +1,86 @@ +import { Media, NftMetadata, NftTokenType, OpenSeaCollectionMetadata, SpamInfo, TokenUri } from '../types/types'; +/** + * Alchemy representation of a base NFT contract that doesn't contain metadata. + * + * The BaseNftContract does not hold any metadata information and only contains + * the address. The NftContract additionally contains the tokenType, name, + * symbol, and more. + * + * @public + */ +export interface BaseNftContract { + /** The address of the contract. */ + address: string; +} +/** + * Alchemy representation of an NFT contract. + * + * The BaseNftContract does not hold any metadata information and only contains + * the address. The NftContract additionally contains the tokenType, name, + * symbol, and more. + * + * @public + */ +export interface NftContract extends BaseNftContract { + /** The type of the token in the contract. */ + tokenType: NftTokenType; + /** The name of the contract. */ + name?: string; + /** The symbol of the contract. */ + symbol?: string; + /** + * The number of NFTs in the contract as an integer string. This field is only + * available on ERC-721 contracts. + */ + totalSupply?: string; + /** OpenSea's metadata for the contract. */ + openSea?: OpenSeaCollectionMetadata; +} +/** + * Alchemy representation of an NFT that doesn't contain metadata. + * + * The BaseNft object does not hold any metadata information and only contains + * the NFT contract and token ID. The Nft object additionally contains the NFT + * metadata, token URI information, and media. + * + * @public + */ +export interface BaseNft { + contract: BaseNftContract; + /** The NFT token ID as an integer string. */ + tokenId: string; + /** The type of ERC token, if known. */ + tokenType: NftTokenType; +} +/** + * Alchemy representation of an NFT. + * + * The BaseNft object does not hold any metadata information and only contains + * the NFT contract and token ID. The Nft object additionally contains the NFT + * metadata, token URI information, and media. + * + * @public + */ +export interface Nft extends BaseNft { + /** The NFT's underlying contract and relevant contract metadata. */ + contract: NftContract; + /** The NFT title. */ + title: string; + /** The NFT description. */ + description: string; + /** When the NFT was last updated in the blockchain. Represented in ISO-8601 format. */ + timeLastUpdated: string; + /** Holds an error message if there was an issue fetching metadata. */ + metadataError: string | undefined; + /** + * The raw metadata fetched from the metadata URL specified by the NFT. The + * field is undefined if Alchemy was unable to fetch metadata. + */ + rawMetadata: NftMetadata | undefined; + /** URIs for accessing the NFT's metadata blob. */ + tokenUri: TokenUri | undefined; + /** URIs for accessing the NFT's media assets. */ + media: Media[]; + /** Detailed information on why an NFT was classified as spam. */ + spamInfo?: SpamInfo; +} diff --git a/test/node_modules/alchemy-sdk/dist/src/api/notify-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/src/api/notify-namespace.d.ts new file mode 100644 index 0000000..b363adc --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/api/notify-namespace.d.ts @@ -0,0 +1,143 @@ +import { AddressActivityResponse, AddressActivityWebhook, AddressWebhookParams, AddressWebhookUpdate, DroppedTransactionWebhook, GetAddressesOptions, GetAllWebhooksResponse, MinedTransactionWebhook, NftActivityWebhook, NftFiltersResponse, NftWebhookParams, NftWebhookUpdate, TransactionWebhookParams, Webhook, WebhookType } from '../types/types'; +/** + * The Notify namespace contains methods used for creating, reading, updating, + * and deleting webhooks in the Notify API. + * + * To use the methods in the API, you must provide your team's auth token in the + * {@link AlchemySettings.authToken} field when configuring + * {@link AlchemySettings}. The auth token can be found in the Alchemy Dashboard + * on the Notify tab. + * + * Note that not all networks are supported in the Notify API. Please consult + * the documentation for which networks are supported. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the notify + * namespace via `alchemy.notify`. + */ +export declare class NotifyNamespace { + private readonly config; + /** + * Get all webhooks on your team. + * + * The team is determined by the `authToken` provided into the {@link AlchemySettings} + * object when creating a new {@link Alchemy} instance. + * + * This method returns a response object containing all the webhooks + */ + getAllWebhooks(): Promise; + /** + * Get all addresses tracked for the provided {@link AddressActivityWebhook}. + * + * @param addressWebhook The Address Activity webhook. + * @param options Pagination options when fetching addresses. + */ + getAddresses(addressWebhook: AddressActivityWebhook, options?: GetAddressesOptions): Promise; + /** + * Get all addresses tracked for the provided {@link AddressActivityWebhook}. + * + * @param webhookId The id of the address activity webhook. Passing in an id + * of a non-address-activity webhook will result in a response object with + * no addresses. + * @param options Pagination options when fetching addresses. + */ + getAddresses(webhookId: string, options?: GetAddressesOptions): Promise; + /** + * Get all NFTs tracked for the provided {@link NftActivityWebhook}. + * + * @param nftWebhook The NFT Activity webhook. + * @param options Pagination options when fetching NFT filters. + */ + getNftFilters(nftWebhook: NftActivityWebhook, options?: GetAddressesOptions): Promise; + /** + * Get all NFT filters tracked for the provided {@link NftActivityWebhook}. + * + * @param webhookId The id of the NFT activity webhook. Passing in an + * incorrect id of a non-NFT webhook will result in a response object with + * no filters. + * @param options Pagination options when fetching nft filters. + */ + getNftFilters(webhookId: string, options?: GetAddressesOptions): Promise; + /** + * Update a {@link NftActivityWebhook}'s active status or NFT filters. + * + * @param nftWebhook The NFT activity webhook to update. + * @param update Object containing the update. + */ + updateWebhook(nftWebhook: NftActivityWebhook, update: NftWebhookUpdate): Promise; + /** + * Update a {@link NftActivityWebhook}'s active status or NFT filters. + * + * @param nftWebhookId The id of the NFT activity webhook. + * @param update Object containing the update. + */ + updateWebhook(nftWebhookId: string, update: NftWebhookUpdate): Promise; + /** + * Update a {@link AddressActivityWebhook}'s active status or addresses. + * + * @param addressWebhook The address activity webhook to update. + * @param update Object containing the update. + */ + updateWebhook(addressWebhook: AddressActivityWebhook, update: AddressWebhookUpdate): Promise; + /** + * Update a {@link AddressActivityWebhook}'s active status or addresses. + * + * @param addressWebhookId The id of the address activity webhook. + * @param update Object containing the update. + */ + updateWebhook(addressWebhookId: string, update: AddressWebhookUpdate): Promise; + /** + * Create a new {@link MinedTransactionWebhook} to track mined transactions + * sent by the app associated with the app id. + * + * Note that the webhook will be created in the app network of the provided app id. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the app id. + */ + createWebhook(url: string, type: WebhookType.MINED_TRANSACTION, params: TransactionWebhookParams): Promise; + /** + * Create a new {@link DroppedTransactionWebhook} to track dropped transactions + * sent by the app associated with the app id. + * + * Note that the webhook will be created in the app network of the provided app id. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the app id. + */ + createWebhook(url: string, type: WebhookType.DROPPED_TRANSACTION, params: TransactionWebhookParams): Promise; + /** + * Create a new {@link NftActivityWebhook} to track NFT transfers. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the NFTs to track and the + * network the webhook should be created on. + */ + createWebhook(url: string, type: WebhookType.NFT_ACTIVITY, params: NftWebhookParams): Promise; + /** + * Create a new {@link AddressActivityWebhook} to track address activity. + * + * @param url The URL that the webhook should send events to. + * @param type The type of webhook to create. + * @param params Parameters object containing the addresses to track and the + * network the webhook should be created on. + */ + createWebhook(url: string, type: WebhookType.ADDRESS_ACTIVITY, params: AddressWebhookParams): Promise; + /** + * Delete the provided webhook. + * + * @param webhook The webhook to delete. + */ + deleteWebhook(webhook: Webhook): Promise; + /** + * Delete the provided webhook. + * + * @param webhookId The id of the webhook to delete. + */ + deleteWebhook(webhookId: string): Promise; + private verifyConfig; + private sendWebhookRequest; +} diff --git a/test/node_modules/alchemy-sdk/dist/src/api/transact-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/src/api/transact-namespace.d.ts new file mode 100644 index 0000000..39db413 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/api/transact-namespace.d.ts @@ -0,0 +1,105 @@ +import { TransactionReceipt, TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider'; +import type { BigNumber } from '@ethersproject/bignumber'; +import { Deferrable } from '@ethersproject/properties'; +import { SendPrivateTransactionOptions } from '../types/types'; +/** + * The Transact namespace contains methods used for sending transactions and + * checking on the state of submitted transactions. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the transact + * namespace via `alchemy.transact`. + */ +export declare class TransactNamespace { + private readonly config; + /** + * Used to send a single transaction to Flashbots. Flashbots will attempt to + * send the transaction to miners for the next 25 blocks. + * + * Returns the transaction hash of the submitted transaction. + * + * @param signedTransaction The raw, signed transaction as a hash. + * @param maxBlockNumber Optional highest block number in which the + * transaction should be included. + * @param options Options to configure the request. + */ + sendPrivateTransaction(signedTransaction: string, maxBlockNumber?: number, options?: SendPrivateTransactionOptions): Promise; + /** + * Stops the provided private transaction from being submitted for future + * blocks. A transaction can only be cancelled if the request is signed by the + * same key as the {@link sendPrivateTransaction} call submitting the + * transaction in first place. + * + * Please note that fast mode transactions cannot be cancelled using this method. + * + * Returns a boolean indicating whether the cancellation was successful. + * + * @param transactionHash Transaction hash of private tx to be cancelled + */ + cancelPrivateTransaction(transactionHash: string): Promise; + /** + * Returns the transaction with hash or null if the transaction is unknown. + * + * If a transaction has not been mined, this method will search the + * transaction pool. Various backends may have more restrictive transaction + * pool access (e.g. if the gas price is too low or the transaction was only + * recently sent and not yet indexed) in which case this method may also return null. + * + * NOTE: This is an alias for {@link CoreNamespace.getTransaction}. + * + * @param transactionHash The hash of the transaction to get. + * @public + */ + getTransaction(transactionHash: string | Promise): Promise; + /** + * Submits transaction to the network to be mined. The transaction must be + * signed, and be valid (i.e. the nonce is correct and the account has + * sufficient balance to pay for the transaction). + * + * NOTE: This is an alias for {@link CoreNamespace.sendTransaction}. + * + * @param signedTransaction The signed transaction to send. + * @public + */ + sendTransaction(signedTransaction: string | Promise): Promise; + /** + * Returns an estimate of the amount of gas that would be required to submit + * transaction to the network. + * + * An estimate may not be accurate since there could be another transaction on + * the network that was not accounted for, but after being mined affects the + * relevant state. + * + * This is an alias for {@link CoreNamespace.estimateGas}. + * + * @param transaction The transaction to estimate gas for. + * @public + */ + estimateGas(transaction: Deferrable): Promise; + /** + * Returns a fee per gas (in wei) that is an estimate of how much you can pay + * as a priority fee, or "tip", to get a transaction included in the current block. + * + * This number is generally used to set the `maxPriorityFeePerGas` field in a + * transaction request. + * + * @public + */ + getMaxPriorityFeePerGas(): Promise; + /** + * Returns a promise which will not resolve until specified transaction hash is mined. + * + * If {@link confirmations} is 0, this method is non-blocking and if the + * transaction has not been mined returns null. Otherwise, this method will + * block until the transaction has confirmed blocks mined on top of the block + * in which it was mined. + * + * NOTE: This is an alias for {@link CoreNamespace.waitForTransaction}. + * + * @param transactionHash The hash of the transaction to wait for. + * @param confirmations The number of blocks to wait for. + * @param timeout The maximum time to wait for the transaction to confirm. + * @public + */ + waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/src/api/util.d.ts b/test/node_modules/alchemy-sdk/dist/src/api/util.d.ts new file mode 100644 index 0000000..421c002 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/api/util.d.ts @@ -0,0 +1,21 @@ +/** + * Converts a hex string to a decimal number. + * + * @param hexString - The hex string to convert. + * @public + */ +export declare function fromHex(hexString: string): number; +/** + * Converts a number to a hex string. + * + * @param num - The number to convert to hex. + * @public + */ +export declare function toHex(num: number): string; +/** + * Checks if a value is a hex string. + * + * @param possibleHexString - The value to check. + * @public + */ +export declare function isHex(possibleHexString: string): boolean; diff --git a/test/node_modules/alchemy-sdk/dist/src/api/utils.d.ts b/test/node_modules/alchemy-sdk/dist/src/api/utils.d.ts new file mode 100644 index 0000000..139537b --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/api/utils.d.ts @@ -0,0 +1,5 @@ +export { dnsEncode, hashMessage, id, isValidName, namehash } from '@ethersproject/hash'; +export { arrayify, concat, hexConcat, hexDataSlice, hexDataLength, hexlify, hexStripZeros, hexValue, hexZeroPad, isBytes, isBytesLike, isHexString, joinSignature, zeroPad, splitSignature, stripZeros } from '@ethersproject/bytes'; +export { formatEther, parseEther, parseUnits, formatUnits } from '@ethersproject/units'; +export { toUtf8Bytes, toUtf8String } from '@ethersproject/strings'; +export { Interface } from '@ethersproject/abi'; diff --git a/test/node_modules/alchemy-sdk/dist/src/api/websocket-namespace.d.ts b/test/node_modules/alchemy-sdk/dist/src/api/websocket-namespace.d.ts new file mode 100644 index 0000000..fafaa2b --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/api/websocket-namespace.d.ts @@ -0,0 +1,67 @@ +import type { Listener } from '@ethersproject/abstract-provider'; +import { AlchemyEventType } from '../types/types'; +/** + * The Websocket namespace contains all subscription related functions that + * allow you to subscribe to events and receive updates as they occur. The + * underlying WebSocket provider has additional logic to handle reconnections + * and automatically backfills missed events. + * + * Do not call this constructor directly. Instead, instantiate an Alchemy object + * with `const alchemy = new Alchemy(config)` and then access the core namespace + * via `alchemy.ws`. + */ +export declare class WebSocketNamespace { + private readonly config; + /** + * Adds a listener to be triggered for each {@link eventName} event. Also + * includes Alchemy's Subscription API events. See {@link AlchemyEventType} for + * how to use them. + * + * @param eventName The event to listen for. + * @param listener The listener to call when the event is triggered. + * @public + */ + on(eventName: AlchemyEventType, listener: Listener): this; + /** + * Adds a listener to be triggered for only the next {@link eventName} event, + * after which it will be removed. Also includes Alchemy's Subscription API + * events. See {@link AlchemyEventType} for how to use them. + * + * @param eventName The event to listen for. + * @param listener The listener to call when the event is triggered. + * @public + */ + once(eventName: AlchemyEventType, listener: Listener): this; + /** + * Removes the provided {@link listener} for the {@link eventName} event. If no + * listener is provided, all listeners for the event will be removed. + * + * @param eventName The event to unlisten to. + * @param listener The listener to remove. + * @public + */ + off(eventName: AlchemyEventType, listener?: Listener): this; + /** + * Remove all listeners for the provided {@link eventName} event. If no event + * is provided, all events and their listeners are removed. + * + * @param eventName The event to remove all listeners for. + * @public + */ + removeAllListeners(eventName?: AlchemyEventType): this; + /** + * Returns the number of listeners for the provided {@link eventName} event. If + * no event is provided, the total number of listeners for all events is returned. + * + * @param eventName The event to get the number of listeners for. + * @public + */ + listenerCount(eventName?: AlchemyEventType): Promise; + /** + * Returns an array of listeners for the provided {@link eventName} event. If + * no event is provided, all listeners will be included. + * + * @param eventName The event to get the listeners for. + */ + listeners(eventName?: AlchemyEventType): Promise; +} diff --git a/test/node_modules/alchemy-sdk/dist/src/index.d.ts b/test/node_modules/alchemy-sdk/dist/src/index.d.ts new file mode 100644 index 0000000..892980d --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/index.d.ts @@ -0,0 +1,18 @@ +/** This is the main entry point for the library and exports user-facing API. */ +import * as Utils from './api/utils'; +export { Utils }; +export * from './types/types'; +export { Alchemy } from './api/alchemy'; +export { Wallet } from './api/alchemy-wallet'; +export { Contract, ContractFactory } from './api/alchemy-contract'; +export type { AlchemyConfig } from './api/alchemy-config'; +export type { AlchemyProvider } from './api/alchemy-provider'; +export type { AlchemyWebSocketProvider } from './api/alchemy-websocket-provider'; +export type { NftNamespace } from './api/nft-namespace'; +export type { WebSocketNamespace } from './api/websocket-namespace'; +export type { CoreNamespace } from './api/core-namespace'; +export type { TransactNamespace } from './api/transact-namespace'; +export type { NotifyNamespace } from './api/notify-namespace'; +export type { BaseNftContract, NftContract, Nft, BaseNft } from './api/nft'; +export { fromHex, toHex, isHex } from './api/util'; +export { setLogLevel, LogLevelString as LogLevel } from './util/logger'; diff --git a/test/node_modules/alchemy-sdk/dist/src/internal/backoff.d.ts b/test/node_modules/alchemy-sdk/dist/src/internal/backoff.d.ts new file mode 100644 index 0000000..a93dd63 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/internal/backoff.d.ts @@ -0,0 +1,4 @@ +export declare const DEFAULT_BACKOFF_INITIAL_DELAY_MS = 1000; +export declare const DEFAULT_BACKOFF_MULTIPLIER = 1.5; +export declare const DEFAULT_BACKOFF_MAX_DELAY_MS: number; +export declare const DEFAULT_BACKOFF_MAX_ATTEMPTS = 5; diff --git a/test/node_modules/alchemy-sdk/dist/src/internal/dispatch.d.ts b/test/node_modules/alchemy-sdk/dist/src/internal/dispatch.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/internal/dispatch.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/src/internal/ethers-event.d.ts b/test/node_modules/alchemy-sdk/dist/src/internal/ethers-event.d.ts new file mode 100644 index 0000000..35b581a --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/internal/ethers-event.d.ts @@ -0,0 +1,60 @@ +import { EventType, Filter, Listener } from '@ethersproject/abstract-provider'; +import { AlchemyEventFilter, AlchemyEventType, AlchemyMinedTransactionsAddress, AlchemyMinedTransactionsEventFilter, AlchemyPendingTransactionsEventFilter, NonEmptyArray } from '../types/types'; +/** + * DO NOT MODIFY. + * + * Event class copied directly over from ethers.js's `BaseProvider` class. + * + * This class is used to represent events and their corresponding listeners. The + * SDK needs to extend this class in order to support Alchemy's custom + * Subscription API types. The original class is not exported by ethers. Minimal + * changes have been made in order to get TS to compile. + */ +declare class Event { + readonly listener: Listener; + readonly once: boolean; + readonly tag: string; + _lastBlockNumber: number; + _inflight: boolean; + constructor(tag: string, listener: Listener, once: boolean); + get event(): EventType; + get type(): string; + get hash(): string; + get filter(): Filter; + pollable(): boolean; +} +/** + * Wrapper class around the ethers `Event` class in order to add support for + * Alchemy's custom subscriptions types. + * + * The serialization and deserialization mechanism requires the order of the + * fields to be the same across different {@link ALCHEMY_EVENT_TYPES}. Before + * using a getter on a new event filter, make sure that the position of the + * field in serialization is correct. + * + * The getters on this class deserialize the event tag generated by + * {@link getAlchemyEventTag} into the original fields passed into the event. + */ +export declare class EthersEvent extends Event { + /** + * Converts the event tag into the original `fromAddress` field in + * {@link AlchemyPendingTransactionsEventFilter}. + */ + get fromAddress(): string | string[] | undefined; + /** + * Converts the event tag into the original `toAddress` field in + * {@link AlchemyPendingTransactionsEventFilter}. + */ + get toAddress(): string | string[] | undefined; + /** + * Converts the event tag into the original `hashesOnly` field in + * {@link AlchemyPendingTransactionsEventFilter} and {@link AlchemyMinedTransactionsEventFilter}. + */ + get hashesOnly(): boolean | undefined; + get includeRemoved(): boolean | undefined; + get addresses(): NonEmptyArray | undefined; +} +export declare function isAlchemyEvent(event: AlchemyEventType): event is AlchemyMinedTransactionsEventFilter | AlchemyPendingTransactionsEventFilter; +export declare function verifyAlchemyEventName(eventName: AlchemyEventFilter): void; +export declare function deserializeTopics(data: string): any; +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/src/internal/internal-types.d.ts b/test/node_modules/alchemy-sdk/dist/src/internal/internal-types.d.ts new file mode 100644 index 0000000..4b4410d --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/internal/internal-types.d.ts @@ -0,0 +1,48 @@ +/** This file contains internal types used by the SDK and are not exposed to the end user. */ +declare type JsonRpcId = string | number | null; +/** + * Prefix for `alchemy_pendingTransactions` subscriptions when serializing to + * ethers events. + * + * This tag is used internally by ethers to track different event filters. + */ +export declare const ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE = "alchemy-pending-transactions"; +/** + * Prefix for `alchemy_minedTransactions` subscriptions when serializing to ethers events. + * + * This tag is used internally by ethers to track different event filters. + */ +export declare const ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE = "alchemy-mined-transactions"; +/** + * Array containing all the custom event tags used internally by ethers to track + * event filters. + */ +export declare const ALCHEMY_EVENT_TYPES: string[]; +export interface JsonRpcRequest { + jsonrpc: '2.0'; + method: string; + params?: any[]; + id?: JsonRpcId; +} +export interface JsonRpcResponse { + jsonrpc: '2.0'; + result?: T; + error?: JsonRpcError; + id: JsonRpcId; +} +interface JsonRpcError { + code: number; + message: string; + data?: T; +} +export declare type WebSocketMessage = SingleOrBatchResponse | SubscriptionEvent; +export declare type SingleOrBatchResponse = JsonRpcResponse | JsonRpcResponse[]; +export interface SubscriptionEvent { + jsonrpc: '2.0'; + method: 'eth_subscription'; + params: { + subscription: string; + result: T; + }; +} +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/src/internal/nft-api.d.ts b/test/node_modules/alchemy-sdk/dist/src/internal/nft-api.d.ts new file mode 100644 index 0000000..47aae9a --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/internal/nft-api.d.ts @@ -0,0 +1,27 @@ +import { BigNumberish } from '@ethersproject/bignumber'; +import { AlchemyConfig } from '../api/alchemy-config'; +import { BaseNft, Nft, NftContract } from '../api/nft'; +import { GetBaseNftsForContractOptions, GetBaseNftsForOwnerOptions, GetContractsForOwnerOptions, GetContractsForOwnerResponse, GetFloorPriceResponse, GetNftSalesOptions, GetNftSalesOptionsByContractAddress, GetNftSalesResponse, GetNftsForContractOptions, GetNftsForOwnerOptions, GetOwnersForContractOptions, GetOwnersForContractResponse, GetOwnersForContractWithTokenBalancesOptions, GetOwnersForContractWithTokenBalancesResponse, GetOwnersForNftResponse, NftAttributeRarity, NftAttributesResponse, NftContractBaseNftsResponse, NftContractNftsResponse, NftMetadataBatchOptions, NftMetadataBatchToken, NftTokenType, OwnedBaseNft, OwnedBaseNftsResponse, OwnedNft, OwnedNftsResponse, RefreshContractResult } from '../types/types'; +export declare function getNftMetadata(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, tokenType?: NftTokenType, tokenUriTimeoutInMs?: number, srcMethod?: string): Promise; +export declare function getNftMetadataBatch(config: AlchemyConfig, tokens: Array, options?: NftMetadataBatchOptions): Promise; +export declare function getContractMetadata(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function getNftsForOwnerIterator(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): AsyncIterable; +export declare function getNftsForOwner(config: AlchemyConfig, owner: string, options?: GetNftsForOwnerOptions | GetBaseNftsForOwnerOptions, srcMethod?: string): Promise; +export declare function getNftsForContract(config: AlchemyConfig, contractAddress: string, options?: GetBaseNftsForContractOptions | GetNftsForContractOptions, srcMethod?: string): Promise; +export declare function getNftsForContractIterator(config: AlchemyConfig, contractAddress: string, options?: GetBaseNftsForContractOptions | GetNftsForContractOptions, srcMethod?: string): AsyncIterable; +export declare function getOwnersForContract(config: AlchemyConfig, contractAddress: string, options?: GetOwnersForContractWithTokenBalancesOptions | GetOwnersForContractOptions, srcMethod?: string): Promise; +export declare function getContractsForOwner(config: AlchemyConfig, owner: string, options?: GetContractsForOwnerOptions, srcMethod?: string): Promise; +export declare function getOwnersForNft(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, srcMethod?: string): Promise; +export declare function checkNftOwnership(config: AlchemyConfig, owner: string, contractAddresses: string[], srcMethod?: string): Promise; +export declare function verifyNftOwnership(config: AlchemyConfig, owner: string, contractAddresses: string | string[], srcMethod?: string): Promise; +export declare function isSpamContract(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function getSpamContracts(config: AlchemyConfig, srcMethod?: string): Promise; +export declare function getFloorPrice(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function getNftSales(config: AlchemyConfig, options?: GetNftSalesOptions | GetNftSalesOptionsByContractAddress, srcMethod?: string): Promise; +export declare function computeRarity(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, srcMethod?: string): Promise; +export declare function searchContractMetadata(config: AlchemyConfig, query: string, srcMethod?: string): Promise; +export declare function summarizeNftAttributes(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; +export declare function refreshNftMetadata(config: AlchemyConfig, contractAddress: string, tokenId: BigNumberish, srcMethod?: string): Promise; +export declare function refreshContract(config: AlchemyConfig, contractAddress: string, srcMethod?: string): Promise; diff --git a/test/node_modules/alchemy-sdk/dist/src/internal/raw-interfaces.d.ts b/test/node_modules/alchemy-sdk/dist/src/internal/raw-interfaces.d.ts new file mode 100644 index 0000000..1d2d06b --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/internal/raw-interfaces.d.ts @@ -0,0 +1,113 @@ +import { Media, NftSaleFeeData, NftSpamClassification } from '../types/types'; +export interface RawSpamInfo { + isSpam: string; + /** A list of reasons why an NFT contract was marked as spam. */ + classifications: NftSpamClassification[]; +} +/** OpenSea's metadata for an NFT collection. */ +export interface RawOpenSeaCollectionMetadata { + floorPrice?: number; + collectionName?: string; + safelistRequestStatus?: string; + imageUrl?: string; + description?: string; + externalUrl?: string; + twitterUsername?: string; + discordUrl?: string; + lastIngestedAt?: string; +} +export interface RawGetOwnersForContractWithTokenBalancesResponse { + ownerAddresses: RawOwnerAddress[]; + pageKey?: string; +} +export interface RawOwnerAddress { + ownerAddress: string; + tokenBalances: RawTokenBalances[]; +} +export interface RawTokenBalances { + tokenId: string; + balance: number; +} +export interface RawReingestContractResponse { + contractAddress: string; + reingestionState: string; + progress: string | null; +} +export interface RawWebhook { + id: string; + network: string; + webhook_type: string; + webhook_url: string; + is_active: boolean; + time_created: number; + signing_key: string; + version: string; + app_id?: string; +} +export interface RawWebhookPagination { + cursors: { + after?: string; + }; + total_count: number; +} +export interface RawGetAllWebhooksResponse { + data: RawWebhook[]; +} +export interface RawAddressActivityResponse { + data: string[]; + pagination: RawWebhookPagination; +} +export interface RawNftFilter { + contract_address: string; + token_id: string; +} +export interface RawNftFiltersResponse { + data: RawNftFilter[]; + pagination: RawWebhookPagination; +} +export interface RawCreateWebhookResponse { + data: RawWebhook; +} +export interface RawNftFilterParam { + contract_address: string; + token_id: string; +} +export interface RawNftAttributeRarity { + value: string; + trait_type: string; + prevalence: number; +} +export interface RawGetNftSalesResponse { + pageKey?: string; + nftSales: RawNftSale[]; +} +export interface RawNftSale { + marketplace: string; + contractAddress: string; + tokenId: string; + quantity: string; + buyerAddress: string; + sellerAddress: string; + taker: string; + sellerFee: NftSaleFeeData; + marketplaceFee?: NftSaleFeeData; + royaltyFee?: NftSaleFeeData; + blockNumber: number; + logIndex: number; + bundleIndex: number; + transactionHash: string; +} +export interface RawGetContractsForOwnerResponse { + contracts: RawContractForOwner[]; + pageKey?: string; + totalCount: number; +} +export interface RawContractForOwner extends Omit { + address: string; + totalBalance: number; + numDistinctTokensOwned: number; + isSpam: boolean; + tokenId: string; + media: Media; + opensea?: RawOpenSeaCollectionMetadata; +} diff --git a/test/node_modules/alchemy-sdk/dist/src/internal/request-batcher.d.ts b/test/node_modules/alchemy-sdk/dist/src/internal/request-batcher.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/internal/request-batcher.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/src/internal/websocket-backfiller.d.ts b/test/node_modules/alchemy-sdk/dist/src/internal/websocket-backfiller.d.ts new file mode 100644 index 0000000..0091b4a --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/internal/websocket-backfiller.d.ts @@ -0,0 +1,53 @@ +export interface BatchPart { + method: string; + params?: any; +} +export interface NewHeadsEvent { + author: string; + difficulty: string; + extraData: string; + gasLimit: string; + gasUsed: string; + hash: string; + logsBloom: string; + miner: string; + mixHash: string; + nonce: string; + number: string; + parentHash: string; + receiptsRoot: string; + sealFields: string[]; + sha3Uncles: string; + size: string; + stateRoot: string; + timestamp: string; + transactionsRoot: string; +} +/** The return type of eth_getBlocksByHash. */ +export interface BlockHead extends NewHeadsEvent { + totalDifficulty: string; + transactions: any[]; + uncles: string[]; +} +export interface LogsEvent { + address: string; + blockHash: string; + blockNumber: string; + data: string; + logIndex: string; + topics: string[]; + transactionHash: string; + transactionIndex: string; + removed?: boolean; +} +export interface LogsSubscriptionFilter { + address?: string | string[]; + topics?: Array; +} +export interface GetLogsOptions extends LogsSubscriptionFilter { + fromBlock?: string; + toBlock?: string; +} +export declare function dedupeNewHeads(events: NewHeadsEvent[]): NewHeadsEvent[]; +export declare function dedupeLogs(events: LogsEvent[]): LogsEvent[]; +export declare function throwIfCancelled(isCancelled: () => boolean): void; diff --git a/test/node_modules/alchemy-sdk/dist/src/types/types.d.ts b/test/node_modules/alchemy-sdk/dist/src/types/types.d.ts new file mode 100644 index 0000000..1faf799 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/types/types.d.ts @@ -0,0 +1,1523 @@ +import { EventType, TransactionReceipt } from '@ethersproject/abstract-provider'; +import { BigNumberish } from '@ethersproject/bignumber'; +import { BaseNft, Nft, NftContract } from '../api/nft'; +/** + * Options object used to configure the Alchemy SDK. + * + * @public + */ +export interface AlchemySettings { + /** + * The Alchemy API key that can be found in the Alchemy dashboard. + * + * Defaults to: "demo" (a rate-limited public API key) + */ + apiKey?: string; + /** + * The name of the network. Once configured, the network cannot be changed. To + * use a different network, instantiate a new `Alchemy` instance. + * + * Defaults to: Network.ETH_MAINNET + */ + network?: Network; + /** The maximum number of retries to attempt if a request fails. Defaults to 5. */ + maxRetries?: number; + /** + * Optional URL endpoint to use for all requests. Setting this field will + * override the URL generated by the {@link network} and {@link apiKey} fields. + * + * This field is useful for testing or for using a custom node endpoint. Note + * that not all methods will work with custom URLs. + */ + url?: string; + /** + * Alchemy auth token required to use the Notify API. This token can be found + * in the Alchemy Dashboard on the Notify tab. + */ + authToken?: string; + /** + * Optional setting that automatically batches and sends json-rpc requests for + * higher throughput and reduced network IO. Defaults to false. + * + * This implementation is based on the `JsonRpcBatchProvider` in ethers. + */ + batchRequests?: boolean; +} +/** + * The supported networks by Alchemy. Note that some functions are not available + * on all networks. Please refer to the Alchemy documentation for which APIs are + * available on which networks + * {@link https://docs.alchemy.com/alchemy/apis/feature-support-by-chain} + * + * @public + */ +export declare enum Network { + ETH_MAINNET = "eth-mainnet", + /** @deprecated - Will be removed in subsequent versions */ + ETH_ROPSTEN = "eth-ropsten", + ETH_GOERLI = "eth-goerli", + /** @deprecated - Will be removed in subsequent versions */ + ETH_KOVAN = "eth-kovan", + /** @deprecated - Will be removed in subsequent versions */ + ETH_RINKEBY = "eth-rinkeby", + OPT_MAINNET = "opt-mainnet", + /** @deprecated - Will be removed in subsequent versions */ + OPT_KOVAN = "opt-kovan", + OPT_GOERLI = "opt-goerli", + ARB_MAINNET = "arb-mainnet", + /** @deprecated - Will be removed in subsequent versions */ + ARB_RINKEBY = "arb-rinkeby", + ARB_GOERLI = "arb-goerli", + MATIC_MAINNET = "polygon-mainnet", + MATIC_MUMBAI = "polygon-mumbai", + ASTAR_MAINNET = "astar-mainnet" +} +/** Token Types for the `getTokenBalances()` endpoint. */ +export declare enum TokenBalanceType { + /** + * Option to fetch the top 100 tokens by 24-hour volume. This option is only + * available on Mainnet in Ethereum, Polygon, and Arbitrum. + */ + DEFAULT_TOKENS = "DEFAULT_TOKENS", + /** + * Option to fetch the set of ERC-20 tokens that the address as ever held. his + * list is produced by an address's historical transfer activity and includes + * all tokens that the address has ever received. + */ + ERC20 = "erc20" +} +/** + * Optional params to pass into `getTokenBalances()` to fetch all ERC-20 tokens + * instead of passing in an array of contract addresses to fetch balances for. + */ +export interface TokenBalancesOptionsErc20 { + /** The ERC-20 token type. */ + type: TokenBalanceType.ERC20; + /** Optional page key for pagination (only applicable to TokenBalanceType.ERC20) */ + pageKey?: string; +} +/** + * Optional params to pass into `getTokenBalances()` to fetch the top 100 tokens + * instead of passing in an array of contract addresses to fetch balances for. + */ +export interface TokenBalancesOptionsDefaultTokens { + /** The top 100 token type. */ + type: TokenBalanceType.DEFAULT_TOKENS; +} +/** + * Response object for when the {@link TokenBalancesOptionsErc20} options are + * used. A page key may be returned if the provided address has many transfers. + */ +export interface TokenBalancesResponseErc20 extends TokenBalancesResponse { + /** + * An optional page key to passed into the next request to fetch the next page + * of token balances. + */ + pageKey?: string; +} +/** @public */ +export interface TokenBalancesResponse { + address: string; + tokenBalances: TokenBalance[]; +} +/** @public */ +export declare type TokenBalance = TokenBalanceSuccess | TokenBalanceFailure; +/** @public */ +export interface TokenBalanceSuccess { + contractAddress: string; + tokenBalance: string; + error: null; +} +/** @public */ +export interface TokenBalanceFailure { + contractAddress: string; + tokenBalance: null; + error: string; +} +/** + * Response object for the {@link CoreNamespace.getTokenMetadata} method. + * + * @public + */ +export interface TokenMetadataResponse { + /** + * The token's name. Is `null` if the name is not defined in the contract and + * not available from other sources. + */ + name: string | null; + /** + * The token's symbol. Is `null` if the symbol is not defined in the contract + * and not available from other sources. + */ + symbol: string | null; + /** + * The number of decimals of the token. Returns `null` if not defined in the + * contract and not available from other sources. + */ + decimals: number | null; + /** URL link to the token's logo. Is `null` if the logo is not available. */ + logo: string | null; +} +/** + * Parameters for the {@link CoreNamespace.getAssetTransfers} method. + * + * @public + */ +export interface AssetTransfersParams { + /** + * The starting block to check for transfers. This value is inclusive and + * defaults to `0x0` if omitted. + */ + fromBlock?: string; + /** + * The ending block to check for transfers. This value is inclusive and + * defaults to the latest block if omitted. + */ + toBlock?: string; + /** + * Whether to return results in ascending or descending order by block number. + * Defaults to ascending if omitted. + */ + order?: SortingOrder; + /** + * The from address to filter transfers by. This value defaults to a wildcard + * for all addresses if omitted. + */ + fromAddress?: string; + /** + * The to address to filter transfers by. This value defaults to a wildcard + * for all address if omitted. + */ + toAddress?: string; + /** + * List of contract addresses to filter for - only applies to "erc20", + * "erc721", "erc1155" transfers. Defaults to all address if omitted. + */ + contractAddresses?: string[]; + /** + * Whether to exclude transfers with zero value. Note that zero value is + * different than null value. Defaults to `false` if omitted. + */ + excludeZeroValue?: boolean; + /** REQUIRED field. An array of categories to get transfers for. */ + category: AssetTransfersCategory[]; + /** The maximum number of results to return per page. Defaults to 1000 if omitted. */ + maxCount?: number; + /** + * Optional page key from an existing {@link OwnedBaseNftsResponse} + * {@link AssetTransfersResult}to use for pagination. + */ + pageKey?: string; + /** + * Whether to include additional metadata about each transfer event. Defaults + * to `false` if omitted. + */ + withMetadata?: boolean; +} +/** + * Parameters for the {@link CoreNamespace.getAssetTransfers} method that + * includes metadata. + * + * @public + */ +export interface AssetTransfersWithMetadataParams extends AssetTransfersParams { + withMetadata: true; +} +/** + * Categories of transfers to use with the {@link AssetTransfersParams} request + * object when using {@link CoreNamespace.getAssetTransfers}. + * + * @public + */ +export declare enum AssetTransfersCategory { + /** + * Top level ETH transactions that occur where the `fromAddress` is an + * external user-created address. External addresses have private keys and are + * accessed by users. + */ + EXTERNAL = "external", + /** + * Top level ETH transactions that occur where the `fromAddress` is an + * internal, smart contract address. For example, a smart contract calling + * another smart contract or sending + */ + INTERNAL = "internal", + /** ERC20 transfers. */ + ERC20 = "erc20", + /** ERC721 transfers. */ + ERC721 = "erc721", + /** ERC1155 transfers. */ + ERC1155 = "erc1155", + /** Special contracts that don't follow ERC 721/1155, (ex: CryptoKitties). */ + SPECIALNFT = "specialnft" +} +/** + * Enum for the order of the {@link AssetTransfersParams} request object when + * using {@link CoreNamespace.getAssetTransfers}. + * + * @deprecated Use {@link SortingOrder} instead. This enum will be removed in a + * future version. + * @public + */ +export declare enum AssetTransfersOrder { + ASCENDING = "asc", + DESCENDING = "desc" +} +/** + * An enum for specifying the token type on NFTs. + * + * @public + */ +export declare enum NftTokenType { + ERC721 = "ERC721", + ERC1155 = "ERC1155", + UNKNOWN = "UNKNOWN" +} +/** + * Response object for the {@link CoreNamespace.getAssetTransfers} method. + * + * @public + */ +export interface AssetTransfersResponse { + transfers: AssetTransfersResult[]; + /** Page key for the next page of results, if one exists. */ + pageKey?: string; +} +/** + * Response object for the {@link CoreNamespace.getAssetTransfers} method when + * the {@link AssetTransfersWithMetadataParams} are used. + * + * @public + */ +export interface AssetTransfersWithMetadataResponse { + transfers: AssetTransfersWithMetadataResult[]; + pageKey?: string; +} +/** + * Represents a transfer event that is returned in a {@link AssetTransfersResponse}. + * + * @public + */ +export interface AssetTransfersResult { + /** The unique ID of the transfer. */ + uniqueId: string; + /** The category of the transfer. */ + category: AssetTransfersCategory; + /** The block number where the transfer occurred. */ + blockNum: string; + /** The from address of the transfer. */ + from: string; + /** The to address of the transfer. */ + to: string | null; + /** + * Converted asset transfer value as a number (raw value divided by contract + * decimal). `null` if ERC721 transfer or contract decimal not available. + */ + value: number | null; + /** + * The raw ERC721 token id of the transfer as a hex string. `null` if not an + * ERC721 transfer. + */ + erc721TokenId: string | null; + /** + * A list of ERC1155 metadata objects if the asset transferred is an ERC1155 + * token. `null` if not an ERC1155 transfer. + */ + erc1155Metadata: ERC1155Metadata[] | null; + /** The token id of the token transferred. */ + tokenId: string | null; + /** + * Returns the token's symbol or ETH for other transfers. `null` if the + * information was not available. + */ + asset: string | null; + /** The transaction hash of the transfer transaction. */ + hash: string; + /** Information about the raw contract of the asset transferred. */ + rawContract: RawContract; +} +/** + * Represents a transfer event that is returned in a + * {@link AssetTransfersResponse} when {@link AssetTransfersWithMetadataParams} are used. + * + * @public + */ +export interface AssetTransfersWithMetadataResult extends AssetTransfersResult { + /** Additional metadata about the transfer event. */ + metadata: AssetTransfersMetadata; +} +/** + * The metadata object for a {@link AssetTransfersResult} when the + * {@link AssetTransfersParams.withMetadata} field is set to true. + * + * @public + */ +export interface AssetTransfersMetadata { + /** Timestamp of the block from which the transaction event originated. */ + blockTimestamp: string; +} +/** + * Represents NFT metadata that holds fields. Note that since there is no + * standard metadata format, the fields are not guaranteed to be present. + * + * @public + */ +export interface NftMetadata extends Record { + /** Name of the NFT asset. */ + name?: string; + /** A human-readable description of the NFT asset. */ + description?: string; + /** URL to the NFT asset image. */ + image?: string; + /** + * The image URL that appears along the top of the NFT asset page. This tends + * to be the highest resolution image. + */ + external_url?: string; + /** Background color of the NFT item. Usually defined as a 6 character hex string. */ + background_color?: string; + /** The traits, attributes, and characteristics for the NFT asset. */ + attributes?: Array>; +} +/** + * Represents the URI information the NFT's metadata. + * + * @public + */ +export interface TokenUri { + /** + * URI for the location of the NFT's original metadata blob (ex: the original + * IPFS link). + */ + raw: string; + /** Public gateway URI for the raw URI. Generally offers better performance. */ + gateway: string; +} +/** + * Represents the URI information for the NFT's media assets. + * + * @public + */ +export interface Media { + /** + * URI for the location of the NFT's original metadata blob for media (ex: the + * original IPFS link). + */ + raw: string; + /** Public gateway URI for the raw URI. Generally offers better performance. */ + gateway: string; + /** URL for a resized thumbnail of the NFT media asset. */ + thumbnail?: string; + /** + * The media format (ex: jpg, gif, png) of the {@link gateway} and + * {@link thumbnail} assets. + */ + format?: string; + /** + * DEPRECATED - The size of the media asset in bytes + * + * @deprecated - Please use {@link bytes} instead. This field will be removed + * in a subsequent release. + */ + size?: number; + /** The size of the media asset in bytes. */ + bytes?: number; +} +/** Potential reasons why an NFT contract was classified as spam. */ +export declare enum NftSpamClassification { + Erc721TooManyOwners = "Erc721TooManyOwners", + Erc721TooManyTokens = "Erc721TooManyTokens", + Erc721DishonestTotalSupply = "Erc721DishonestTotalSupply", + MostlyHoneyPotOwners = "MostlyHoneyPotOwners", + OwnedByMostHoneyPots = "OwnedByMostHoneyPots" +} +/** Detailed information on whether and why an NFT contract was classified as spam. */ +export interface SpamInfo { + isSpam: boolean; + /** A list of reasons why an NFT contract was marked as spam. */ + classifications: NftSpamClassification[]; +} +/** + * Optional parameters object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. + * + * This interface is used to fetch NFTs with their associated metadata. To get + * Nfts without their associated metadata, use {@link GetBaseNftsForOwnerOptions}. + * + * @public + */ +export interface GetNftsForOwnerOptions { + /** + * Optional page key from an existing {@link OwnedBaseNftsResponse} or + * {@link OwnedNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional list of contract addresses to filter the results by. Limit is 20. */ + contractAddresses?: string[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are excluded from the response. + */ + excludeFilters?: NftFilters[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are included in the response. + */ + includeFilters?: NftFilters[]; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; + /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */ + omitMetadata?: boolean; + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; + /** + * Order in which to return results. By default, results are ordered by + * contract address and token ID in lexicographic order. + */ + orderBy?: NftOrdering; +} +/** + * Optional parameters object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. + * + * This interface is used to fetch NFTs without their associated metadata. To + * get Nfts with their associated metadata, use {@link GetNftsForOwnerOptions}. + * + * @public + */ +export interface GetBaseNftsForOwnerOptions { + /** + * Optional page key from an existing {@link OwnedBaseNftsResponse} or + * {@link OwnedNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional list of contract addresses to filter the results by. Limit is 20. */ + contractAddresses?: string[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are excluded from the response. + */ + excludeFilters?: NftFilters[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are included in the response. + */ + includeFilters?: NftFilters[]; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; + /** Optional boolean flag to include NFT metadata. Defaults to `false`. */ + omitMetadata: true; + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; + /** + * Order in which to return results. By default, results are ordered by + * contract address and token ID in lexicographic order. + */ + orderBy?: NftOrdering; +} +/** + * Enum of NFT filters that can be applied to a {@link getNftsForOwner} request. + * NFTs that match one or more of these filters are excluded from the response. + * + * - @deprecated Use {@link NftFilters} instead. This enum will be removed in a + * future version. + * + * @beta + */ +export declare enum NftExcludeFilters { + /** Exclude NFTs that have been classified as spam. */ + SPAM = "SPAM", + /** Exclude NFTs that have been airdropped to a user. */ + AIRDROPS = "AIRDROPS" +} +/** + * Enum of NFT filters that can be applied to a {@link getNftsForOwner} or a + * {@link getContractsForOwner} request. + * + * @beta + */ +export declare enum NftFilters { + /** NFTs that have been classified as spam. */ + SPAM = "SPAM", + /** NFTs that have been airdropped to a user. */ + AIRDROPS = "AIRDROPS" +} +/** + * Enum of ordering that can be applied to a {@link getNftsForOwner} or a + * {@link getContractsForOwner} response. + * + * @beta + */ +export declare enum NftOrdering { + TRANSFERTIME = "TRANSFERTIME" +} +/** + * The response object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. The object contains the NFTs with + * metadata owned by the provided address, along with pagination information and + * the total count. + * + * @public + */ +export interface OwnedNftsResponse { + /** The NFTs owned by the provided address. */ + readonly ownedNfts: OwnedNft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + readonly pageKey?: string; + /** The total count of NFTs owned by the provided address. */ + readonly totalCount: number; +} +/** + * The response object for the {@link getNftsForOwner} and + * {@link getNftsForOwnerIterator} functions. The object contains the NFTs + * without metadata owned by the provided address, along with pagination + * information and the total count. + * + * @public + */ +export interface OwnedBaseNftsResponse { + /** The NFTs owned by the provided address. */ + readonly ownedNfts: OwnedBaseNft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + readonly pageKey?: string; + /** The total count of NFTs owned by the provided address. */ + readonly totalCount: number; +} +/** + * Represents an NFT with metadata owned by an address. + * + * @public + */ +export interface OwnedNft extends Nft { + /** The token balance of the NFT. */ + readonly balance: number; +} +/** + * Represents an NFT without metadata owned by an address. + * + * @public + */ +export interface OwnedBaseNft extends BaseNft { + /** The token balance of the NFT. */ + readonly balance: number; +} +/** + * The response object for the {@link getOwnersForNft}. + * + * @public + */ +export interface GetOwnersForNftResponse { + /** An array of owner addresses for the provided token. */ + readonly owners: string[]; +} +/** + * The response object for the {@link getOwnersForContract}. + * + * @public + */ +export interface GetOwnersForContractResponse { + /** An array of owner addresses for the provided contract address */ + owners: string[]; +} +/** + * The response object for the {@link getOwnersForContract}. + * + * @public + */ +export interface GetOwnersForContractWithTokenBalancesResponse { + /** An array of owner addresses for the provided contract address */ + owners: NftContractOwner[]; + /** Optional page key that is returned when a collection has more than 50,000 owners. */ + pageKey?: string; +} +/** + * An object representing the owner of an NFT and its corresponding token + * balances in a {@link GetOwnersForContractWithTokenBalancesResponse} object. + */ +export interface NftContractOwner { + /** The NFT's owner address. */ + ownerAddress: string; + /** A list of objects containing token balances for the provided NFT contract. */ + tokenBalances: NftContractTokenBalance[]; +} +/** + * An object representing the owned token and balance values in a + * {@link GetOwnersForContractWithTokenBalancesResponse} object. + */ +export interface NftContractTokenBalance { + /** The token id owned in the NFT contract. */ + tokenId: string; + /** The token Id balance for the provided owner. */ + balance: number; +} +/** + * Represents an NFT token to fetch metadata for in a + * {@link NftNamespace.getNftMetadataBatch} method. + */ +export interface NftMetadataBatchToken { + /** The NFT contract address. Limited to ERC721 and ERC1155 tokens. */ + contractAddress: string; + /** The id of the NFT. */ + tokenId: BigNumberish; + /** Optional field to specify the type of token to speed up the query. */ + tokenType?: NftTokenType.ERC1155 | NftTokenType.ERC721; +} +/** Additional options for the {@link NftNamespace.getNftMetadataBatch} method. */ +export interface NftMetadataBatchOptions { + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; + /** + * Whether to refresh the metadata for the given NFT token before returning + * the response. Defaults to false for faster response times. + */ + refreshCache?: boolean; +} +/** + * The successful object returned by the {@link getFloorPrice} call for each + * marketplace (e.g. looksRare). + * + * @public + */ +export interface FloorPriceMarketplace { + /** The floor price of the collection on the given marketplace */ + readonly floorPrice: number; + /** The currency in which the floor price is denominated */ + readonly priceCurrency: string; + /** The link to the collection on the given marketplace */ + readonly collectionUrl: string; + /** UTC timestamp of when the floor price was retrieved from the marketplace */ + readonly retrievedAt: string; +} +/** + * The failing object returned by the {@link getFloorPrice} call for each + * marketplace (e.g. looksRare). + * + * @public + */ +export interface FloorPriceError { + /** Error fetching floor prices from the given marketplace */ + readonly error: string; +} +/** + * The response object for the {@link getFloorPrice} method. + * + * @public + */ +export interface GetFloorPriceResponse { + /** + * Name of the NFT marketplace where the collection is listed. Current + * marketplaces supported: OpenSea, LooksRare + */ + readonly openSea: FloorPriceMarketplace | FloorPriceError; + readonly looksRare: FloorPriceMarketplace | FloorPriceError; +} +/** + * Optional parameters object for the the {@link getContractsForOwner} method + * + * @public + */ +export interface GetContractsForOwnerOptions { + /** Key for pagination to use to fetch results from the next page if available. */ + pageKey?: string; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are included in the response. May not be used in + * conjunction with {@link excludeFilters}. + */ + includeFilters?: NftFilters[]; + /** + * Optional list of filters applied to the query. NFTs that match one or more + * of these filters are excluded from the response. May not be used in + * conjunction with {@link includeFilters} + */ + excludeFilters?: NftFilters[]; + /** + * Order in which to return results. By default, results are ordered by + * contract address and token ID in lexicographic order. + */ + orderBy?: NftOrdering; +} +/** + * The response for the {@link NftNamespace.getContractsForOwner} method. + * + * @public + */ +export interface GetContractsForOwnerResponse { + /** The list of contracts, that match the query, held by the given address. */ + contracts: ContractForOwner[]; + /** Key for pagination to use to fetch results from the next page if available. */ + pageKey?: string; + /** Total number of NFT contracts held by the given address. */ + totalCount: number; +} +/** Represents a single NFT contract data in the {@link GetContractsForOwnerResponse}. */ +export interface ContractForOwner extends NftContract { + /** + * Sum of NFT balances across all token IDs held by the owner. For + * non-fungible tokens this will be equal to the numDistinctTokensOwned, but + * it may be higher if the user holds some fungible ERC1155 tokens. + */ + totalBalance: number; + /** + * Number of distinct token IDs held by the owner. For non-fungible tokens + * this will be equal to the totalBalance, but it may be lower if the user + * holds some fungible ERC1155 tokens. + */ + numDistinctTokensOwned: number; + isSpam: boolean; + /** One of the tokens from this contract held by the owner. */ + tokenId: string; + /** Alternative NFT metadata for this contract to be parsed manually. */ + media: Media; +} +/** + * Optional parameters object for the {@link getNftSales} endpoint. + * + * This interface is used to filter the NFT sales data. + * + * @public + */ +export interface GetNftSalesOptions { + /** The block number to start fetching NFT sales data from. */ + fromBlock?: number | 'latest'; + /** The block number limit to fetch NFT sales data from. */ + toBlock?: number | 'latest'; + /** Whether to return the results in ascending or descending order by block number. */ + order?: SortingOrder; + /** The NFT marketplace to filter sales by. */ + marketplace?: NftSaleMarketplace; + /** The address of the NFT buyer to filter sales by. */ + buyerAddress?: string; + /** The address of the NFT seller to filter sales by. */ + sellerAddress?: string; + /** + * Filter by whether the buyer or seller was the taker in the NFT trade. + * Defaults to returning both buyer and seller taker trades. + */ + taker?: NftSaleTakerType; + /** The maximum number of NFT sales to return. */ + limit?: number; + /** Key for pagination to use to fetch results from the next page if available. */ + pageKey?: string; +} +/** + * Alternative optional parameters object for the {@link getNftSales} endpoint + * that allows filtering results by contractAddress. + * + * This interface is used to filter the NFT sales data. + * + * @public + */ +export interface GetNftSalesOptionsByContractAddress extends GetNftSalesOptions { + /** The contract address of a NFT collection to filter sales by. */ + contractAddress: string; + /** The token ID of an NFT within the specified contractAddress to filter sales by. */ + tokenId?: BigNumberish; +} +/** + * The response for the {@link NftNamespace.getNftSales} method. + * + * @public + */ +export interface GetNftSalesResponse { + /** The page key to use to fetch the next page if more results are available. */ + pageKey?: string; + /** List of NFT sales that match the query */ + nftSales: NftSale[]; +} +/** Represents a single NFT sale data in the {@link GetNftSalesResponse}. */ +export interface NftSale { + /** The marketplace the sale took place on. */ + marketplace: NftSaleMarketplace; + /** The NFT contract address. */ + contractAddress: string; + /** The decimal token ID of the NFT being sold. */ + tokenId: string; + /** The number of tokens sold in the sale as a decimal integer string. */ + quantity: string; + /** The address of the buyer in the NFT sale. */ + buyerAddress: string; + /** The address of the seller in the NFT sale. */ + sellerAddress: string; + /** Whether the price taker in the trade was the buyer or the seller. */ + taker: NftSaleTakerType; + /** The payment from buyer to the seller. */ + sellerFee: NftSaleFeeData; + /** The payment from buyer to the marketplace. */ + marketplaceFee?: NftSaleFeeData; + /** The payment from buyer to the royalty address of the NFT collection. */ + royaltyFee?: NftSaleFeeData; + /** The block number the NFT sale took place in. */ + blockNumber: number; + /** The log number of the sale event emitted within the block. */ + logIndex: number; + /** The index of the token within the bundle of NFTs sold in the sale. */ + bundleIndex: number; + /** The transactionHash of the NFT sale. */ + transactionHash: string; +} +/** + * Fee detail for an NFT sale. + * + * @public + */ +export interface NftSaleFeeData { + /** The fee payment amount as a decimal integer string. */ + amount: string; + /** The symbol of the token used for the payment. */ + symbol: string; + /** The number of decimals of the token used for the payment. */ + decimal: number; +} +/** + * Enum for representing the supported sorting orders of the API. + * + * @public + */ +export declare enum SortingOrder { + ASCENDING = "asc", + DESCENDING = "desc" +} +/** + * Enum representing the supported NFT marketplaces by the {@link getNftSales} endpoint. + * + * @public + */ +export declare enum NftSaleMarketplace { + SEAPORT = "seaport", + LOOKSRARE = "looksrare", + X2Y2 = "x2y2", + UNKNOWN = "unknown" +} +/** + * Enum for specifing the taker type for the {@link getNftSales} endpoint. + * + * @public + */ +export declare enum NftSaleTakerType { + BUYER = "buyer", + SELLER = "seller" +} +/** + * Information about the rarity of an NFT's attribute in the specified collection. + * + * @public + */ +export interface NftAttributeRarity { + /** Name of the NFT's attribute. */ + value: string; + /** The type of NFT attribute. */ + traitType: string; + /** + * A number from 0 to 1 representing the prevalence of this value for this + * trait type in the current collection. + */ + prevalence: number; +} +/** + * Summary of the attribute prevalence for the specified NFT contract. + * + * @public + */ +export interface NftAttributesResponse { + /** The specified NFT contract's address. */ + contractAddress: string; + /** The specified NFT contract's total supply. */ + totalSupply: number; + /** + * The attribute prevalence of each trait grouped by the trait type for the + * provided NFT. + */ + summary: Record>; +} +/** The refresh result response object returned by {@link refreshContract}. */ +export interface RefreshContractResult { + /** The NFT contract address that was passed in to be refreshed. */ + contractAddress: string; + /** The current state of the refresh request. */ + refreshState: RefreshState; + /** + * Percentage of tokens currently refreshed, represented as an integer string. + * Field can be null if the refresh has not occurred. + */ + progress: string | null; +} +/** The current state of the NFT contract refresh process. */ +export declare enum RefreshState { + /** The provided contract is not an NFT or does not contain metadata. */ + DOES_NOT_EXIST = "does_not_exist", + /** The contract has already been queued for refresh. */ + ALREADY_QUEUED = "already_queued", + /** The contract is currently being refreshed. */ + IN_PROGRESS = "in_progress", + /** The contract refresh is complete. */ + FINISHED = "finished", + /** The contract refresh has been queued and await execution. */ + QUEUED = "queued", + /** The contract was unable to be queued due to an internal error. */ + QUEUE_FAILED = "queue_failed" +} +/** + * The parameter field of {@link TransactionReceiptsParams}. + * + * @public + */ +export interface TransactionReceiptsBlockNumber { + /** The block number to get transaction receipts for. */ + blockNumber: string; +} +/** + * The parameter field of {@link TransactionReceiptsParams}. + * + * @public + */ +export interface TransactionReceiptsBlockHash { + /** The block hash to get transaction receipts for. */ + blockHash: string; +} +/** + * The parameters to use with the {@link CoreNamespace.getTransactionReceipts} method. + * + * @public + */ +export declare type TransactionReceiptsParams = TransactionReceiptsBlockNumber | TransactionReceiptsBlockHash; +/** + * Response object for a {@link CoreNamespace.getTransactionReceipts} call. + * + * @public + */ +export interface TransactionReceiptsResponse { + /** A list of transaction receipts for the queried block. */ + receipts: TransactionReceipt[] | null; +} +/** + * Metadata object returned in a {@link AssetTransfersResult} object if the asset + * transferred is an ERC1155. + * + * @public + */ +export interface ERC1155Metadata { + tokenId: string; + value: string; +} +/** + * Information about the underlying contract for the asset that was transferred + * in a {@link AssetTransfersResult} object. + * + * @public + */ +export interface RawContract { + /** + * The raw transfer value as a hex string. `null` if the transfer was for an + * ERC721 or ERC1155 token. + */ + value: string | null; + /** The contract address. `null` if it was an internal or external transfer. */ + address: string | null; + /** + * The number of decimals in the contract as a hex string. `null` if the value + * is not in the contract and not available from other sources. + */ + decimal: string | null; +} +/** + * Optional parameters object for the {@link getNftsForContract} and + * {@link getNftsForContractIterator} functions. + * + * This interface is used to fetch NFTs with their associated metadata. To get + * Nfts without their associated metadata, use {@link GetBaseNftsForContractOptions}. + * + * @public + */ +export interface GetNftsForContractOptions { + /** + * Optional page key from an existing {@link NftContractBaseNftsResponse} or + * {@link NftContractNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */ + omitMetadata?: boolean; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; + /** + * No set timeout by default - When metadata is requested, this parameter is + * the timeout (in milliseconds) for the website hosting the metadata to + * respond. If you want to only access the cache and not live fetch any + * metadata for cache misses then set this value to 0. + */ + tokenUriTimeoutInMs?: number; +} +/** + * Optional parameters object for the {@link getNftsForContract} and + * {@link getNftsForContractIterator} functions. + * + * This interface is used to fetch NFTs without their associated metadata. To + * get Nfts with their associated metadata, use {@link GetNftsForContractOptions}. + * + * @public + */ +export interface GetBaseNftsForContractOptions { + /** + * Optional page key from an existing {@link NftContractBaseNftsResponse} or + * {@link NftContractNftsResponse}to use for pagination. + */ + pageKey?: string; + /** Optional boolean flag to omit NFT metadata. Defaults to `false`. */ + omitMetadata: false; + /** + * Sets the total number of NFTs to return in the response. Defaults to 100. + * Maximum page size is 100. + */ + pageSize?: number; +} +/** + * Optional parameters object for the {@link getNftsForContract} method. + * + * This interface configures options when fetching the owner addresses of the + * provided contract. + * + * @public + */ +export interface GetOwnersForContractOptions { + /** + * Whether to include the token balances per token id for each owner. Defaults + * to false when omitted. + */ + withTokenBalances?: boolean; + /** The block number in hex or decimal to fetch owners for. */ + block?: string; + /** Optional page key to paginate the next page for large requests. */ + pageKey?: string; +} +/** + * Optional parameters object for the {@link getNftsForContract} method. + * + * This interface configures options when fetching the owner addresses of the + * provided contract. + * + * @public + */ +export interface GetOwnersForContractWithTokenBalancesOptions { + /** + * Whether to include the token balances per token id for each owner. Defaults + * to false when omitted. + */ + withTokenBalances: true; + /** The block number in hex or decimal to fetch owners for. */ + block?: string; + /** Optional page key to paginate the next page for large requests. */ + pageKey?: string; +} +/** + * The response object for the {@link getNftsForContract} function. The object + * contains the NFTs without metadata inside the NFT contract. + * + * @public + */ +export interface NftContractBaseNftsResponse { + /** An array of NFTs without metadata. */ + nfts: BaseNft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + pageKey?: string; +} +/** + * The response object for the {@link getNftsForContract} function. The object + * contains the NFTs with metadata inside the NFT contract. + * + * @public + */ +export interface NftContractNftsResponse { + /** An array of NFTs with metadata. */ + nfts: Nft[]; + /** + * Pagination token that can be passed into another request to fetch the next + * NFTs. If there is no page key, then there are no more NFTs to fetch. + */ + pageKey?: string; +} +/** OpenSea's metadata for an NFT collection. */ +export interface OpenSeaCollectionMetadata { + /** The floor price of the NFT. */ + floorPrice?: number; + /** The name of the collection on OpenSea. */ + collectionName?: string; + /** The approval status of the collection on OpenSea. */ + safelistRequestStatus?: OpenSeaSafelistRequestStatus; + /** The image URL determined by OpenSea. */ + imageUrl?: string; + /** The description of the collection on OpenSea. */ + description?: string; + /** The homepage of the collection as determined by OpenSea. */ + externalUrl?: string; + /** The Twitter handle of the collection. */ + twitterUsername?: string; + /** The Discord URL of the collection. */ + discordUrl?: string; + /** Timestamp of when the OpenSea metadata was last ingested by Alchemy. */ + lastIngestedAt?: string; +} +/** An OpenSea collection's approval status. */ +export declare enum OpenSeaSafelistRequestStatus { + /** Verified collection. */ + VERIFIED = "verified", + /** Collections that are approved on open sea and can be found in search results. */ + APPROVED = "approved", + /** Collections that requested safelisting on OpenSea. */ + REQUESTED = "requested", + /** Brand new collections. */ + NOT_REQUESTED = "not_requested" +} +/** + * The response object for the {@link findContractDeployer} function. + * + * @public + */ +export interface DeployResult { + /** The address of the contract deployer, if it is available. */ + readonly deployerAddress?: string; + /** The block number the contract was deployed in. */ + readonly blockNumber: number; +} +/** + * Method names for Alchemy's custom Subscription API endpoints. + * + * This value is provided in the `method` field when creating an event filter on + * the Websocket Namespace. + */ +export declare enum AlchemySubscription { + PENDING_TRANSACTIONS = "alchemy_pendingTransactions", + MINED_TRANSACTIONS = "alchemy_minedTransactions" +} +/** + * Event filter for the {@link AlchemyWebSocketProvider.on} and + * {@link AlchemyWebSocketProvider.once} methods to use Alchemy's custom + * `alchemy_pendingTransactions` endpoint. + * + * Returns the transaction information for all pending transactions that match a + * given filter. For full documentation, see: + * {@link https://docs.alchemy.com/reference/alchemy-pendingtransactions} + * + * Note that excluding all optional parameters will return transaction + * information for ALL pending transactions that are added to the mempool. + * + * @public + */ +export interface AlchemyPendingTransactionsEventFilter { + method: AlchemySubscription.PENDING_TRANSACTIONS; + /** Filter pending transactions sent FROM the provided address or array of addresses. */ + fromAddress?: string | string[]; + /** Filter pending transactions sent TO the provided address or array of addresses. */ + toAddress?: string | string[]; + /** + * Whether to only include transaction hashes and exclude the rest of the + * transaction response for a smaller payload. Defaults to false (by default, + * the entire transaction response is included). + * + * Note that setting only {@link hashesOnly} to true will return the same + * response as subscribing to `newPendingTransactions`. + */ + hashesOnly?: boolean; +} +/** + * Event filter for the {@link AlchemyWebSocketProvider.on} and + * {@link AlchemyWebSocketProvider.once} methods to use Alchemy's custom + * `alchemy_minedTransactions` endpoint. + * + * Returns the transaction information for all mined transactions that match the + * provided filter. For full documentation, see: + * {@link https://docs.alchemy.com/reference/alchemy-minedtransactions} + * + * Note that excluding all optional parameters will return transaction + * information for ALL mined transactions. + * + * @public + */ +export interface AlchemyMinedTransactionsEventFilter { + method: AlchemySubscription.MINED_TRANSACTIONS; + /** + * Address filters to subscribe to. Defaults to all transactions if omitted. + * Limit 100 address filters. Requires a non-empty array. + */ + addresses?: NonEmptyArray; + /** + * Whether to include transactions that were removed from the mempool. + * Defaults to false. + */ + includeRemoved?: boolean; + /** + * Whether to only include transaction hashes and exclude the rest of the + * transaction response for a smaller payload. Defaults to false (by default, + * the entire transaction response is included). + */ + hashesOnly?: boolean; +} +/** + * Address filters for {@link AlchemyMinedTransactionsEventFilter}. Requires at + * least one of the fields to be set. + */ +export declare type AlchemyMinedTransactionsAddress = RequireAtLeastOne<{ + to?: string; + from?: string; +}>; +/** + * Alchemy's event type that extends the default {@link EventType} interface to + * also include Alchemy's Subscription API. + * + * @public + */ +export declare type AlchemyEventType = EventType | AlchemyEventFilter; +/** + * This type represents the Alchemy's Subscription API endpoints as event + * filters compatible with other ethers events. + */ +export declare type AlchemyEventFilter = AlchemyMinedTransactionsEventFilter | AlchemyPendingTransactionsEventFilter; +/** Options for the {@link TransactNamespace.sendPrivateTransaction} method. */ +export interface SendPrivateTransactionOptions { + /** + * Whether to use fast-mode. Defaults to false. Please note that fast mode + * transactions cannot be cancelled using + * {@link TransactNamespace.cancelPrivateTransaction}. method. + * + * See {@link https://docs.flashbots.net/flashbots-protect/rpc/fast-mode} for + * more details. + */ + fast: boolean; +} +/** SDK representation of a Webhook in the Notify API. */ +export interface Webhook { + /** The webhook's unique id. */ + id: string; + /** The network the webhook is on. */ + network: Network; + /** The type of webhook. */ + type: WebhookType; + /** The url that the webhook sends its payload to. */ + url: string; + /** Whether the webhook is currently active */ + isActive: boolean; + /** The creation time of the webhook as an ISO string. */ + timeCreated: string; + /** The signing key used to verify payloads for the webhook. */ + signingKey: string; + /** The webhook version. All newly created webhooks default to V2. */ + version: WebhookVersion; + /** + * The app id of the app used for the webhook. This field is only present on + * {@link MinedTransactionWebhook} and {@link DroppedTransactionWebhook} + */ + appId?: string; +} +/** The version of the webhook. All newly created webhooks default to V2. */ +export declare enum WebhookVersion { + V1 = "V1", + V2 = "V2" +} +/** The type of {@link Webhook}. */ +export declare enum WebhookType { + MINED_TRANSACTION = "MINED_TRANSACTION", + DROPPED_TRANSACTION = "DROPPED_TRANSACTION", + ADDRESS_ACTIVITY = "ADDRESS_ACTIVITY", + NFT_ACTIVITY = "NFT_ACTIVITY" +} +/** + * A Mined Transaction Webhook is used to notify your app whenever a transaction + * sent through your API key gets successfully mined. This is useful if you want + * to notify customers that their transaction went through. + */ +export interface MinedTransactionWebhook extends Webhook { + type: WebhookType.MINED_TRANSACTION; +} +/** + * A Dropped Transaction webhook is used to notify your app whenever a + * transaction sent through your API key gets dropped. This can be useful if you + * want to notify customers that their transactions were dropped. + */ +export interface DroppedTransactionWebhook extends Webhook { + type: WebhookType.DROPPED_TRANSACTION; +} +/** + * An Address Activity Webhook tracks ETH, ERC20, ERC721, and ERC1155 transfers + * for the provided addresses. This can be used to notify your app with + * real-time state changes when your tracked addresses send or receive tokens. + */ +export interface AddressActivityWebhook extends Webhook { + type: WebhookType.ADDRESS_ACTIVITY; +} +/** + * The NFT Activity Webhook tracks all ERC721 and ERC1155 activity. This can be + * used to notify your app with real time state changes when an NFT is + * transferred between addresses. + */ +export interface NftActivityWebhook extends Webhook { + type: WebhookType.NFT_ACTIVITY; +} +/** The response for a {@link NotifyNamespace.getAllWebhooks} method. */ +export interface GetAllWebhooksResponse { + /** All webhooks attached to the provided auth token. */ + webhooks: Webhook[]; + /** The total number of webhooks. */ + totalCount: number; +} +/** Options object for the {@link NotifyNamespace.getAddresses} method. */ +export interface GetAddressesOptions { + /** Number of addresses to fetch. */ + limit?: number; + /** Page */ + pageKey?: string; +} +/** Response object for the {@link NotifyNamespace.getAddresses} method. */ +export interface AddressActivityResponse { + /** The addresses for the webhook. */ + addresses: string[]; + /** The total number of addresses. */ + totalCount: number; + /** Optional page key used to fetch the remaining addresses. */ + pageKey?: string; +} +/** + * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order + * to create a {@link MinedTransactionWebhook} or {@link DroppedTransactionWebhook}. + * + * The webhook will be created on the app and network associated with the appId. + * To find the app id of a project, go to the Alchemy Dashboard in the Apps tab. + * After clicking on an app, the app id is the string in the URL following 'apps/'. + * + * This is a temporary workaround for now. We're planning on detecting the app + * id from the provided api key directly. Stay tuned! + */ +export interface TransactionWebhookParams { + /** The app id of the project to create the webhook on. */ + appId: string; +} +/** + * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order + * to create a {@link NftActivityWebhook}. + */ +export interface NftWebhookParams { + /** Array of NFT filters the webhook should track. */ + filters: NftFilter[]; + /** + * Optional network to create the webhook on. If omitted, the webhook will be + * created on network of the app provided in the api key config. + */ + network?: Network; +} +/** + * Params to pass in when calling {@link NotifyNamespace.createWebhook} in order + * to create a {@link AddressActivityWebhook}. + */ +export interface AddressWebhookParams { + /** Array of addresses the webhook should activity for. */ + addresses: string[]; + /** + * Optional network to create the webhook on. If omitted, the webhook will be + * created on network of the app provided in the api key config. + */ + network?: Network; +} +/** NFT to track on a {@link NftActivityWebhook}. */ +export interface NftFilter { + /** The contract address of the NFT. */ + contractAddress: string; + /** The token id of the NFT. */ + tokenId: BigNumberish; +} +/** Response object for the {@link NotifyNamespace.getNftFilters} method. */ +export interface NftFiltersResponse { + /** The NFT filters on the provided webhook. */ + filters: NftFilter[]; + /** The total number of NFT filters on the webhook. */ + totalCount: number; + /** Optional page key used to fetch the remaining filters. */ + pageKey?: string; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to mark a + * webhook as active or inactive. + */ +export interface WebhookStatusUpdate { + /** Whether the webhook is active. */ + isActive: boolean; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to add and + * remove NFT filters for a {@link NftActivityWebhook}. + */ +export interface WebhookNftFilterUpdate { + /** The filters to additionally track. */ + addFilters: NftFilter[]; + /** Existing filters to remove. */ + removeFilters: NftFilter[]; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to add and + * remove addresses for a {@link AddressActivityWebhook}. + */ +export interface WebhookAddressUpdate { + /** The addresses to additionally track. */ + addAddresses: string[]; + /** Existing addresses to remove. */ + removeAddresses: string[]; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to replace + * all existing addresses for a {@link AddressActivityWebhook}. + */ +export interface WebhookAddressOverride { + /** The new addresses to track. Existing addresses will be removed. */ + newAddresses: string[]; +} +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to update a + * {@link NftActivityWebhook}. + */ +export declare type NftWebhookUpdate = WebhookStatusUpdate | RequireAtLeastOne; +/** + * Params object when calling {@link NotifyNamespace.updateWebhook} to update a + * {@link AddressActivityWebhook}. + */ +export declare type AddressWebhookUpdate = WebhookStatusUpdate | RequireAtLeastOne | WebhookAddressOverride; +/** + * Requires at least one of the properties to be set. + * + * Implementation copied over from + * {@link https://learn.microsoft.com/en-us/javascript/api/@azure/keyvault-certificates/requireatleastone?view=azure-node-latest} + */ +export declare type RequireAtLeastOne = { + [K in keyof T]-?: Required> & Partial>>; +}[keyof T]; +/** Requires an array with at least one value. */ +export declare type NonEmptyArray = [T, ...T[]]; diff --git a/test/node_modules/alchemy-sdk/dist/src/util/const.d.ts b/test/node_modules/alchemy-sdk/dist/src/util/const.d.ts new file mode 100644 index 0000000..de75170 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/util/const.d.ts @@ -0,0 +1,43 @@ +import { Network as NetworkFromEthers } from '@ethersproject/networks'; +import { Network } from '../types/types'; +export declare const DEFAULT_ALCHEMY_API_KEY = "demo"; +export declare const DEFAULT_NETWORK = Network.ETH_MAINNET; +export declare const DEFAULT_MAX_RETRIES = 5; +export declare function getAlchemyNftHttpUrl(network: Network, apiKey: string): string; +export declare function getAlchemyWsUrl(network: Network, apiKey: string): string; +export declare function getAlchemyWebhookHttpUrl(): string; +export declare enum AlchemyApiType { + BASE = 0, + NFT = 1, + WEBHOOK = 2 +} +/** + * Mapping of network names to their corresponding Network strings used to + * create an Ethers.js Provider instance. + */ +export declare const EthersNetwork: { + "eth-mainnet": string; + "eth-ropsten": string; + "eth-goerli": string; + "eth-kovan": string; + "eth-rinkeby": string; + "opt-mainnet": string; + "opt-kovan": string; + "opt-goerli": string; + "arb-mainnet": string; + "arb-rinkeby": string; + "arb-goerli": string; + "polygon-mainnet": string; + "polygon-mumbai": string; + "astar-mainnet": string; +}; +/** + * Mapping of network names to their corresponding Ethers Network objects. These + * networks are not yet supported by Ethers and are listed here to be overriden + * in the provider. + */ +export declare const CustomNetworks: { + [key: string]: NetworkFromEthers; +}; +export declare function noop(): void; +export declare const ETH_NULL_VALUE = "0x"; diff --git a/test/node_modules/alchemy-sdk/dist/src/util/logger.d.ts b/test/node_modules/alchemy-sdk/dist/src/util/logger.d.ts new file mode 100644 index 0000000..beb90ae --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/util/logger.d.ts @@ -0,0 +1,55 @@ +/** + * The SDK has 4 log levels and a 5th option for disabling all logging. By + * default, the log level is set to INFO. + * + * The order is a follows: DEBUG < INFO < WARN < ERROR + * + * All log types above the current log level will be outputted. + */ +export declare enum LogLevel { + DEBUG = 0, + INFO = 1, + WARN = 2, + ERROR = 3, + SILENT = 4 +} +/** + * The level of verbosity for the logger. + * + * @public + */ +export declare type LogLevelString = 'debug' | 'info' | 'warn' | 'error' | 'silent'; +/** + * Configures the verbosity of logging. The default log level is `info`. + * + * @param logLevel - The verbosity of logging. Can be any of the following values: + * + * - `debug`: The most verbose logging level. + * - `info`: The default logging level. + * - `warn`: A logging level for non-critical issues. + * - `error`: A logging level for critical issues. + * - `silent`: Turn off all logging. + * + * @public + */ +export declare function setLogLevel(logLevel: LogLevelString): void; +export declare function logDebug(message: string, ...args: unknown[]): void; +export declare function logInfo(message: string, ...args: unknown[]): void; +export declare function logWarn(message: string, ...args: unknown[]): void; +export declare function logError(message: string, ...args: unknown[]): void; +export declare class Logger { + /** The log level of the given Logger instance. */ + private _logLevel; + constructor(); + get logLevel(): LogLevel; + set logLevel(val: LogLevel); + debug(...args: unknown[]): void; + info(...args: unknown[]): void; + warn(...args: unknown[]): void; + error(...args: unknown[]): void; + /** + * Forwards log messages to their corresponding console counterparts if the + * log level allows it. + */ + private _log; +} diff --git a/test/node_modules/alchemy-sdk/dist/src/util/sendRest.d.ts b/test/node_modules/alchemy-sdk/dist/src/util/sendRest.d.ts new file mode 100644 index 0000000..e75932c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/util/sendRest.d.ts @@ -0,0 +1,11 @@ +/** + * Given a REST endpoint, method, and params, sends the request with axios and + * returns the response. + */ +import { AxiosRequestConfig, AxiosResponse } from 'axios'; +/** + * Helper function to send http requests using Axis. + * + * @private + */ +export declare function sendAxiosRequest(baseUrl: string, restApiName: string, methodName: string, params: Req, overrides?: AxiosRequestConfig): Promise>; diff --git a/test/node_modules/alchemy-sdk/dist/src/util/util.d.ts b/test/node_modules/alchemy-sdk/dist/src/util/util.d.ts new file mode 100644 index 0000000..674eaa2 --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/util/util.d.ts @@ -0,0 +1,13 @@ +import { BaseNft, Nft, NftContract } from '../api/nft'; +import { RawBaseNft, RawContractBaseNft, RawGetContractsForOwnerResponse, RawGetNftSalesResponse, RawNft, RawNftAttributeRarity, RawNftContract, RawOpenSeaCollectionMetadata } from '../internal/raw-interfaces'; +import { GetContractsForOwnerResponse, GetNftSalesResponse, NftAttributeRarity, OpenSeaCollectionMetadata } from '../types/types'; +export declare function formatBlock(block: string | number): string; +export declare function getNftContractFromRaw(rawNftContract: RawNftContract): NftContract; +export declare function getBaseNftFromRaw(rawBaseNft: RawBaseNft): BaseNft; +export declare function getBaseNftFromRaw(rawContractBaseNft: RawContractBaseNft, contractAddress: string): BaseNft; +export declare function getNftFromRaw(rawNft: RawNft): Nft; +export declare function getNftSalesFromRaw(rawNftSales: RawGetNftSalesResponse): GetNftSalesResponse; +export declare function getNftRarityFromRaw(rawNftRarity: RawNftAttributeRarity[]): NftAttributeRarity[]; +export declare function getContractsForOwnerFromRaw(rawContractsForOwner: RawGetContractsForOwnerResponse): GetContractsForOwnerResponse; +export declare function parseOpenSeaMetadata(openSea: RawOpenSeaCollectionMetadata | undefined): OpenSeaCollectionMetadata | undefined; +export declare const IS_BROWSER: boolean; diff --git a/test/node_modules/alchemy-sdk/dist/src/version.d.ts b/test/node_modules/alchemy-sdk/dist/src/version.d.ts new file mode 100644 index 0000000..18f5dbe --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/src/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "2.2.5"; diff --git a/test/node_modules/alchemy-sdk/dist/test/integration/alchemy.test.d.ts b/test/node_modules/alchemy-sdk/dist/test/integration/alchemy.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/test/integration/alchemy.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/test/integration/core.test.d.ts b/test/node_modules/alchemy-sdk/dist/test/integration/core.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/test/integration/core.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/test/integration/nft.test.d.ts b/test/node_modules/alchemy-sdk/dist/test/integration/nft.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/test/integration/nft.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/test/integration/notify.test.d.ts b/test/node_modules/alchemy-sdk/dist/test/integration/notify.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/test/integration/notify.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/test/integration/provider.test.d.ts b/test/node_modules/alchemy-sdk/dist/test/integration/provider.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/test/integration/provider.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/test/integration/transact.test.d.ts b/test/node_modules/alchemy-sdk/dist/test/integration/transact.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/test/integration/transact.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/test/integration/wallet.test.d.ts b/test/node_modules/alchemy-sdk/dist/test/integration/wallet.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/test/integration/wallet.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/test/test-util.d.ts b/test/node_modules/alchemy-sdk/dist/test/test-util.d.ts new file mode 100644 index 0000000..10a173d --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/test/test-util.d.ts @@ -0,0 +1,45 @@ +/// +import { BaseNft, Media, Nft, NftContract, NftSaleMarketplace, NftSaleTakerType, NftTokenType, OwnedBaseNft, OwnedNft, TokenUri } from '../src'; +import { RawBaseNft, RawContractBaseNft, RawContractForOwner, RawNft, RawNftContract, RawNftContractMetadata, RawNftSale, RawOpenSeaCollectionMetadata, RawOwnedBaseNft, RawOwnedNft } from '../src/internal/raw-interfaces'; +import { BlockHead, LogsEvent } from '../src/internal/websocket-backfiller'; +export declare const TEST_WALLET_PRIVATE_KEY = "dd5bdf09397b1fdf98e4f72c66047d5104b1511fa7dc1b8fdddd61a150f732c9"; +export declare const TEST_WALLET_PUBLIC_ADDRESS = "0x4b9007B0BcE78cfB634032ec31Ed56adB464287b"; +/** Creates a dummy response for the `getContractMetadata` endpoint. */ +export declare function createRawNftContract(address: string, tokenType: NftTokenType, name?: string, symbol?: string, totalSupply?: string, openSea?: RawOpenSeaCollectionMetadata): RawNftContract; +export declare function createRawOpenSeaCollectionMetadata(): RawOpenSeaCollectionMetadata; +export declare function createRawOwnedBaseNft(address: string, tokenId: string, balance: string, tokenType?: NftTokenType): RawOwnedBaseNft; +export declare function createOwnedBaseNft(address: string, tokenId: string, balance: number, tokenType?: NftTokenType): OwnedBaseNft; +export declare function createRawBaseNft(contractAddress: string, tokenId: string | number, tokenType?: NftTokenType): RawBaseNft; +export declare function createBaseNft(address: string, tokenId: string | number, tokenType?: NftTokenType): BaseNft; +export declare function createNft(title: string, address: string, tokenId: string, tokenType?: NftTokenType, tokenUri?: TokenUri, media?: TokenUri[] | undefined): Nft; +interface RawNftOptions { + tokenUri?: TokenUri; + media?: TokenUri[] | undefined; + timeLastUpdated?: string; + description?: string | Array; + contractMetadata?: RawNftContractMetadata; +} +export declare function createRawNft(contractAddress: string, title: string, tokenId: string, tokenType?: NftTokenType, options?: RawNftOptions): RawNft; +export declare function createRawOwnedNft(title: string, address: string, tokenId: string, balance: string, tokenType?: NftTokenType, contractMetadata?: RawNftContractMetadata): RawOwnedNft; +export declare function createOwnedNft(title: string, address: string, tokenId: string, balance: number, tokenType?: NftTokenType): OwnedNft; +export declare function createRawNftContractBaseNft(tokenId: string): RawContractBaseNft; +export declare function createRawNftSale(contractAddress: string, tokenId: string, marketplace: NftSaleMarketplace, taker: NftSaleTakerType, buyerAddress: string, sellerAddress: string): RawNftSale; +export declare function createRawContractForOwner(address: string, tokenId: string, media: Media, isSpam?: boolean, name?: string, tokenType?: NftTokenType, symbol?: string, totalSupply?: string, opensea?: RawOpenSeaCollectionMetadata): RawContractForOwner; +export declare function createNftMediaData(bytes?: number, format?: string, thumbnail?: string): Media; +export declare function verifyNftContractMetadata(actualNftContract: NftContract, expectedNftContract: NftContract, address: string, name: string, symbol: string, totalSupply: string, tokenType?: NftTokenType, openSea?: RawOpenSeaCollectionMetadata): void; +export declare type Mocked = T & { + [K in keyof T]: T[K] extends Function ? T[K] & jest.Mock : T[K]; +}; +/** A Promise implementation for deferred resolution. */ +export declare class Deferred { + promise: Promise; + constructor(); + resolve: (value: R | Promise) => void; + reject: (reason: Error) => void; +} +export declare function makeNewHeadsEvent(blockNumber: number, hash: string): BlockHead; +export declare function makeLogsEvent(blockNumber: number, blockHash: string, isRemoved?: boolean, logIndex?: number): LogsEvent; +export declare const TESTING_PRIVATE_KEY = "dd5bdf09397b1fdf98e4f72c66047d5104b1511fa7dc1b8fdddd61a150f732c9"; +export declare const TESTING_PUBLIC_ADDRESS = "0x4b9007B0BcE78cfB634032ec31Ed56adB464287b"; +export declare function loadAlchemyEnv(): Promise; +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/test/unit/alchemy.test.d.ts b/test/node_modules/alchemy-sdk/dist/test/unit/alchemy.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/test/unit/alchemy.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/test/unit/backoff.test.d.ts b/test/node_modules/alchemy-sdk/dist/test/unit/backoff.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/test/unit/backoff.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/test/unit/contract.test.d.ts b/test/node_modules/alchemy-sdk/dist/test/unit/contract.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/test/unit/contract.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/test/unit/core-namespace.test.d.ts b/test/node_modules/alchemy-sdk/dist/test/unit/core-namespace.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/test/unit/core-namespace.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/test/unit/logger.test.d.ts b/test/node_modules/alchemy-sdk/dist/test/unit/logger.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/test/unit/logger.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/test/unit/nft-api.test.d.ts b/test/node_modules/alchemy-sdk/dist/test/unit/nft-api.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/test/unit/nft-api.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/test/unit/nft.test.d.ts b/test/node_modules/alchemy-sdk/dist/test/unit/nft.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/test/unit/nft.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/test/unit/provider.test.d.ts b/test/node_modules/alchemy-sdk/dist/test/unit/provider.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/test/unit/provider.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/test/unit/request-batcher.test.d.ts b/test/node_modules/alchemy-sdk/dist/test/unit/request-batcher.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/test/unit/request-batcher.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/test/unit/transact.test.d.ts b/test/node_modules/alchemy-sdk/dist/test/unit/transact.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/test/unit/transact.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/test/unit/wallet.test.d.ts b/test/node_modules/alchemy-sdk/dist/test/unit/wallet.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/test/unit/wallet.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/test/unit/websocket-backfiller.test.d.ts b/test/node_modules/alchemy-sdk/dist/test/unit/websocket-backfiller.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/test/unit/websocket-backfiller.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/dist/test/unit/websocket-provider.test.d.ts b/test/node_modules/alchemy-sdk/dist/test/unit/websocket-provider.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/test/node_modules/alchemy-sdk/dist/test/unit/websocket-provider.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/test/node_modules/alchemy-sdk/package.json b/test/node_modules/alchemy-sdk/package.json new file mode 100644 index 0000000..1b1b03d --- /dev/null +++ b/test/node_modules/alchemy-sdk/package.json @@ -0,0 +1,111 @@ +{ + "name": "alchemy-sdk", + "version": "2.2.5", + "description": "Extended Ethers.js SDK for Alchemy APIs", + "author": "Alchemy", + "license": "MIT", + "scripts": { + "pre-commit": "lint-staged", + "prepublishOnly": "yarn build && yarn run lint && yarn run test", + "prebuild": "yarn clean && tsc --emitDeclarationOnly --declaration -p tsconfig.json", + "build": "rollup -c", + "clean": "rm -rf dist", + "format": "prettier --write '**/*.{html,js,json,md,ts}'", + "format-file": "prettier --write", + "lint": "eslint -c .eslintrc.js '**/*.ts' --ignore-path '.gitignore'", + "lint-file": "eslint --fix", + "test": "jest test/unit", + "test-integration": "jest test/integration", + "api": "yarn build && api-extractor run", + "docs": "typedoc --plugin none --out docs src/index.ts", + "docs-md": "typedoc --plugin typedoc-plugin-markdown --out docs-md src/index.ts", + "prepare": "husky install" + }, + "main": "dist/cjs/index.js", + "main-es": "dist/es/index.js", + "module": "dist/esm/index.js", + "exports": { + "node": { + "types": "./dist/src/index.d.ts", + "require": "./dist/cjs/index.js", + "import": "./dist/cjs/index.js" + }, + "package.json": "./package.json", + "default": "./dist/esm/index.js" + }, + "types": "./dist/src/index.d.ts", + "repository": { + "type": "git", + "url": "git+https://github.com/alchemyplatform/alchemy-sdk-js.git" + }, + "files": [ + "dist" + ], + "lint-staged": { + "**/*.ts": [ + "yarn lint-file --fix", + "yarn format-file" + ], + "package.json": [ + "node ./inject-version.js", + "git add src/version.ts" + ] + }, + "bugs": { + "url": "https://github.com/alchemyplatform/alchemy-sdk-js/issues" + }, + "homepage": "https://github.com/alchemyplatform/alchemy-sdk-js#readme", + "dependencies": { + "@ethersproject/abi": "^5.7.0", + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/contracts": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/networks": "^5.7.0", + "@ethersproject/providers": "^5.7.0", + "@ethersproject/units": "^5.7.0", + "@ethersproject/wallet": "^5.7.0", + "@ethersproject/web": "^5.7.0", + "axios": "^0.26.1", + "sturdy-websocket": "^0.2.1", + "websocket": "^1.0.34" + }, + "devDependencies": { + "@microsoft/api-documenter": "^7.16.0", + "@microsoft/api-extractor": "^7.19.5", + "@rollup/plugin-commonjs": "^22.0.0", + "@rollup/plugin-node-resolve": "^13.3.0", + "@size-limit/preset-big-lib": "^7.0.8", + "@trivago/prettier-plugin-sort-imports": "^3.3.1", + "@types/jest": "^27.4.1", + "@typescript-eslint/eslint-plugin": "^5.16.0", + "@typescript-eslint/parser": "^5.16.0", + "axios-mock-adapter": "^1.20.0", + "dotenv": "^16.0.3", + "eslint": "^8.11.0", + "eslint-plugin-import": "^2.25.4", + "eslint-plugin-unused-imports": "^2.0.0", + "husky": "^7.0.0", + "jest": "^27.5.1", + "lint-staged": "^12.3.7", + "mock-socket": "^9.1.4", + "prettier": "2.6.0", + "prettier-plugin-jsdoc": "^0.3.38", + "rollup": "^2.70.1", + "rollup-plugin-typescript2": "^0.31.2", + "size-limit": "^7.0.8", + "ts-jest": "^27.1.4", + "tslib": "^2.3.1", + "typedoc": "^0.22.15", + "typedoc-plugin-markdown": "^3.12.1", + "typescript": "^4.5.5" + }, + "sideEffects": false, + "size-limit": [ + { + "path": "dist/index.cjs.js", + "limit": "100 kB" + } + ] +} diff --git a/test/node_modules/axios/CHANGELOG.md b/test/node_modules/axios/CHANGELOG.md new file mode 100644 index 0000000..d1204ff --- /dev/null +++ b/test/node_modules/axios/CHANGELOG.md @@ -0,0 +1,906 @@ +# Changelog + +### 0.26.1 (March 9, 2022) + +Fixes and Functionality: +- Refactored project file structure to avoid circular imports ([##4220](https://github.com/axios/axios/pull/#4220)) + +### 0.26.0 (February 13, 2022) + +Fixes and Functionality: +- Fixed The timeoutErrorMessage property in config not work with Node.js ([#3581](https://github.com/axios/axios/pull/3581)) +- Added errors to be displayed when the query parsing process itself fails ([#3961](https://github.com/axios/axios/pull/3961)) +- Fix/remove url required ([#4426](https://github.com/axios/axios/pull/4426)) +- Update follow-redirects dependency due to Vurnerbility ([#4462](https://github.com/axios/axios/pull/4462)) +- Bump karma from 6.3.11 to 6.3.14 ([#4461](https://github.com/axios/axios/pull/4461)) +- Bump follow-redirects from 1.14.7 to 1.14.8 ([#4473](https://github.com/axios/axios/pull/4473)) + +### 0.25.0 (January 18, 2022) + +Breaking changes: +- Fixing maxBodyLength enforcement ([#3786](https://github.com/axios/axios/pull/3786)) +- Don't rely on strict mode behaviour for arguments ([#3470](https://github.com/axios/axios/pull/3470)) +- Adding error handling when missing url ([#3791](https://github.com/axios/axios/pull/3791)) +- Update isAbsoluteURL.js removing escaping of non-special characters ([#3809](https://github.com/axios/axios/pull/3809)) +- Use native Array.isArray() in utils.js ([#3836](https://github.com/axios/axios/pull/3836)) +- Adding error handling inside stream end callback ([#3967](https://github.com/axios/axios/pull/3967)) + +Fixes and Functionality: +- Added aborted even handler ([#3916](https://github.com/axios/axios/pull/3916)) +- Header types expanded allowing `boolean` and `number` types ([#4144](https://github.com/axios/axios/pull/4144)) +- Fix cancel signature allowing cancel message to be `undefined` ([#3153](https://github.com/axios/axios/pull/3153)) +- Updated type checks to be formulated better ([#3342](https://github.com/axios/axios/pull/3342)) +- Avoid unnecessary buffer allocations ([#3321](https://github.com/axios/axios/pull/3321)) +- Adding a socket handler to keep TCP connection live when processing long living requests ([#3422](https://github.com/axios/axios/pull/3422)) +- Added toFormData helper function ([#3757](https://github.com/axios/axios/pull/3757)) +- Adding responseEncoding prop type in AxiosRequestConfig ([#3918](https://github.com/axios/axios/pull/3918)) + +Internal and Tests: +- Adding axios-test-instance to ecosystem ([#3786](https://github.com/axios/axios/pull/3786)) +- Optimize the logic of isAxiosError ([#3546](https://github.com/axios/axios/pull/3546)) +- Add tests and documentation to display how multiple inceptors work ([#3564](https://github.com/axios/axios/pull/3564)) +- Updating follow-redirects to version 1.14.7 ([#4379](https://github.com/axios/axios/pull/4379)) + + +Documentation: +- Fixing changelog to show corrext pull request ([#4219](https://github.com/axios/axios/pull/4219)) +- Update upgrade guide for https proxy setting ([#3604](https://github.com/axios/axios/pull/3604)) + +Huge thanks to everyone who contributed to this release via code (authors listed below) or via reviews and triaging on GitHub: + +- [Jay](mailto:jasonsaayman@gmail.com) +- [Rijk van Zanten](https://github.com/rijkvanzanten) +- [Kohta Ito](https://github.com/koh110) +- [Brandon Faulkner](https://github.com/bfaulk96) +- [Stefano Magni](https://github.com/NoriSte) +- [enofan](https://github.com/fanguangyi) +- [Andrey Pechkurov](https://github.com/puzpuzpuz) +- [Doowonee](https://github.com/doowonee) +- [Emil Broman](https://github.com/emilbroman-eqt) +- [Remco Haszing](https://github.com/remcohaszing) +- [Black-Hole](https://github.com/BlackHole1) +- [Wolfram Kriesing](https://github.com/wolframkriesing) +- [Andrew Ovens](https://github.com/repl-andrew-ovens) +- [Paulo Renato](https://github.com/PauloRSF) +- [Ben Carp](https://github.com/carpben) +- [Hirotaka Tagawa](https://github.com/wafuwafu13) +- [狼族小狈](https://github.com/lzxb) +- [C. Lewis](https://github.com/ctjlewis) +- [Felipe Carvalho](https://github.com/FCarvalhoVII) +- [Daniel](https://github.com/djs113) +- [Gustavo Sales](https://github.com/gussalesdev) + +### 0.24.0 (October 25, 2021) + +Breaking changes: +- Revert: change type of AxiosResponse to any, please read lengthy discussion here: ([#4141](https://github.com/axios/axios/issues/4141)) pull request: ([#4186](https://github.com/axios/axios/pull/4186)) + +Huge thanks to everyone who contributed to this release via code (authors listed below) or via reviews and triaging on GitHub: + +- [Jay](mailto:jasonsaayman@gmail.com) +- [Rodry](https://github.com/ImRodry) +- [Remco Haszing](https://github.com/remcohaszing) +- [Isaiah Thomason](https://github.com/ITenthusiasm) + +### 0.23.0 (October 12, 2021) + +Breaking changes: +- Distinguish request and response data types ([#4116](https://github.com/axios/axios/pull/4116)) +- Change never type to unknown ([#4142](https://github.com/axios/axios/pull/4142)) +- Fixed TransitionalOptions typings ([#4147](https://github.com/axios/axios/pull/4147)) + +Fixes and Functionality: +- Adding globalObject: 'this' to webpack config ([#3176](https://github.com/axios/axios/pull/3176)) +- Adding insecureHTTPParser type to AxiosRequestConfig ([#4066](https://github.com/axios/axios/pull/4066)) +- Fix missing semicolon in typings ([#4115](https://github.com/axios/axios/pull/4115)) +- Fix response headers types ([#4136](https://github.com/axios/axios/pull/4136)) + +Internal and Tests: +- Improve timeout error when timeout is browser default ([#3209](https://github.com/axios/axios/pull/3209)) +- Fix node version on CI ([#4069](https://github.com/axios/axios/pull/4069)) +- Added testing to TypeScript portion of project ([#4140](https://github.com/axios/axios/pull/4140)) + +Documentation: +- Rename Angular to AngularJS ([#4114](https://github.com/axios/axios/pull/4114)) + +Huge thanks to everyone who contributed to this release via code (authors listed below) or via reviews and triaging on GitHub: + +- [Jay](mailto:jasonsaayman@gmail.com) +- [Evan-Finkelstein](https://github.com/Evan-Finkelstein) +- [Paweł Szymański](https://github.com/Jezorko) +- [Dobes Vandermeer](https://github.com/dobesv) +- [Claas Augner](https://github.com/caugner) +- [Remco Haszing](https://github.com/remcohaszing) +- [Evgeniy](https://github.com/egmen) +- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS) + +### 0.22.0 (October 01, 2021) + +Fixes and Functionality: +- Caseless header comparing in HTTP adapter ([#2880](https://github.com/axios/axios/pull/2880)) +- Avoid package.json import fixing issues and warnings related to this ([#4041](https://github.com/axios/axios/pull/4041)), ([#4065](https://github.com/axios/axios/pull/4065)) +- Fixed cancelToken leakage and added AbortController support ([#3305](https://github.com/axios/axios/pull/3305)) +- Updating CI to run on release branches +- Bump follow redirects version +- Fixed default transitional config for custom Axios instance; ([#4052](https://github.com/axios/axios/pull/4052)) + +Huge thanks to everyone who contributed to this release via code (authors listed below) or via reviews and triaging on GitHub: + +- [Jay](mailto:jasonsaayman@gmail.com) +- [Matt R. Wilson](https://github.com/mastermatt) +- [Xianming Zhong](https://github.com/chinesedfan) +- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS) + +### 0.21.4 (September 6, 2021) + +Fixes and Functionality: +- Fixing JSON transform when data is stringified. Providing backward compatability and complying to the JSON RFC standard ([#4020](https://github.com/axios/axios/pull/4020)) + +Huge thanks to everyone who contributed to this release via code (authors listed below) or via reviews and triaging on GitHub: + +- [Jay](mailto:jasonsaayman@gmail.com) +- [Guillaume Fortaine](https://github.com/gfortaine) +- [Yusuke Kawasaki](https://github.com/kawanet) +- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS) + +### 0.21.3 (September 4, 2021) + +Fixes and Functionality: +- Fixing response interceptor not being called when request interceptor is attached ([#4013](https://github.com/axios/axios/pull/4013)) + +Huge thanks to everyone who contributed to this release via code (authors listed below) or via reviews and triaging on GitHub: + +- [Jay](mailto:jasonsaayman@gmail.com) +- [Julian Hollmann](https://github.com/nerdbeere) + +### 0.21.2 (September 4, 2021) + +Fixes and Functionality: + +- Updating axios requests to be delayed by pre-emptive promise creation ([#2702](https://github.com/axios/axios/pull/2702)) +- Adding "synchronous" and "runWhen" options to interceptors api ([#2702](https://github.com/axios/axios/pull/2702)) +- Updating of transformResponse ([#3377](https://github.com/axios/axios/pull/3377)) +- Adding ability to omit User-Agent header ([#3703](https://github.com/axios/axios/pull/3703)) +- Adding multiple JSON improvements ([#3688](https://github.com/axios/axios/pull/3688), [#3763](https://github.com/axios/axios/pull/3763)) +- Fixing quadratic runtime and extra memory usage when setting a maxContentLength ([#3738](https://github.com/axios/axios/pull/3738)) +- Adding parseInt to config.timeout ([#3781](https://github.com/axios/axios/pull/3781)) +- Adding custom return type support to interceptor ([#3783](https://github.com/axios/axios/pull/3783)) +- Adding security fix for ReDoS vulnerability ([#3980](https://github.com/axios/axios/pull/3980)) + +Internal and Tests: + +- Updating build dev dependancies ([#3401](https://github.com/axios/axios/pull/3401)) +- Fixing builds running on Travis CI ([#3538](https://github.com/axios/axios/pull/3538)) +- Updating follow rediect version ([#3694](https://github.com/axios/axios/pull/3694), [#3771](https://github.com/axios/axios/pull/3771)) +- Updating karma sauce launcher to fix failing sauce tests ([#3712](https://github.com/axios/axios/pull/3712), [#3717](https://github.com/axios/axios/pull/3717)) +- Updating content-type header for application/json to not contain charset field, according do RFC 8259 ([#2154](https://github.com/axios/axios/pull/2154)) +- Fixing tests by bumping karma-sauce-launcher version ([#3813](https://github.com/axios/axios/pull/3813)) +- Changing testing process from Travis CI to GitHub Actions ([#3938](https://github.com/axios/axios/pull/3938)) + +Documentation: + +- Updating documentation around the use of `AUTH_TOKEN` with multiple domain endpoints ([#3539](https://github.com/axios/axios/pull/3539)) +- Remove duplication of item in changelog ([#3523](https://github.com/axios/axios/pull/3523)) +- Fixing gramatical errors ([#2642](https://github.com/axios/axios/pull/2642)) +- Fixing spelling error ([#3567](https://github.com/axios/axios/pull/3567)) +- Moving gitpod metion ([#2637](https://github.com/axios/axios/pull/2637)) +- Adding new axios documentation website link ([#3681](https://github.com/axios/axios/pull/3681), [#3707](https://github.com/axios/axios/pull/3707)) +- Updating documentation around dispatching requests ([#3772](https://github.com/axios/axios/pull/3772)) +- Adding documentation for the type guard isAxiosError ([#3767](https://github.com/axios/axios/pull/3767)) +- Adding explanation of cancel token ([#3803](https://github.com/axios/axios/pull/3803)) +- Updating CI status badge ([#3953](https://github.com/axios/axios/pull/3953)) +- Fixing errors with JSON documentation ([#3936](https://github.com/axios/axios/pull/3936)) +- Fixing README typo under Request Config ([#3825](https://github.com/axios/axios/pull/3825)) +- Adding axios-multi-api to the ecosystem file ([#3817](https://github.com/axios/axios/pull/3817)) +- Adding SECURITY.md to properly disclose security vulnerabilities ([#3981](https://github.com/axios/axios/pull/3981)) + +Huge thanks to everyone who contributed to this release via code (authors listed below) or via reviews and triaging on GitHub: + +- [Jay](mailto:jasonsaayman@gmail.com) +- [Sasha Korotkov](https://github.com/SashaKoro) +- [Daniel Lopretto](https://github.com/timemachine3030) +- [Mike Bishop](https://github.com/MikeBishop) +- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS) +- [Mark](https://github.com/bimbiltu) +- [Philipe Gouveia Paixão](https://github.com/piiih) +- [hippo](https://github.com/hippo2cat) +- [ready-research](https://github.com/ready-research) +- [Xianming Zhong](https://github.com/chinesedfan) +- [Christopher Chrapka](https://github.com/OJezu) +- [Brian Anglin](https://github.com/anglinb) +- [Kohta Ito](https://github.com/koh110) +- [Ali Clark](https://github.com/aliclark) +- [caikan](https://github.com/caikan) +- [Elina Gorshkova](https://github.com/elinagorshkova) +- [Ryota Ikezawa](https://github.com/paveg) +- [Nisar Hassan Naqvi](https://github.com/nisarhassan12) +- [Jake](https://github.com/codemaster138) +- [TagawaHirotaka](https://github.com/wafuwafu13) +- [Johannes Jarbratt](https://github.com/johachi) +- [Mo Sattler](https://github.com/MoSattler) +- [Sam Carlton](https://github.com/ThatGuySam) +- [Matt Czapliński](https://github.com/MattCCC) +- [Ziding Zhang](https://github.com/zidingz) + +### 0.21.1 (December 21, 2020) + +Fixes and Functionality: + +- Hotfix: Prevent SSRF ([#3410](https://github.com/axios/axios/pull/3410)) +- Protocol not parsed when setting proxy config from env vars ([#3070](https://github.com/axios/axios/pull/3070)) +- Updating axios in types to be lower case ([#2797](https://github.com/axios/axios/pull/2797)) +- Adding a type guard for `AxiosError` ([#2949](https://github.com/axios/axios/pull/2949)) + +Internal and Tests: + +- Remove the skipping of the `socket` http test ([#3364](https://github.com/axios/axios/pull/3364)) +- Use different socket for Win32 test ([#3375](https://github.com/axios/axios/pull/3375)) + +Huge thanks to everyone who contributed to this release via code (authors listed below) or via reviews and triaging on GitHub: + +- Daniel Lopretto +- Jason Kwok +- Jay +- Jonathan Foster +- Remco Haszing +- Xianming Zhong + +### 0.21.0 (October 23, 2020) + +Fixes and Functionality: + +- Fixing requestHeaders.Authorization ([#3287](https://github.com/axios/axios/pull/3287)) +- Fixing node types ([#3237](https://github.com/axios/axios/pull/3237)) +- Fixing axios.delete ignores config.data ([#3282](https://github.com/axios/axios/pull/3282)) +- Revert "Fixing overwrite Blob/File type as Content-Type in browser. (#1773)" ([#3289](https://github.com/axios/axios/pull/3289)) +- Fixing an issue that type 'null' and 'undefined' is not assignable to validateStatus when typescript strict option is enabled ([#3200](https://github.com/axios/axios/pull/3200)) + +Internal and Tests: + +- Lock travis to not use node v15 ([#3361](https://github.com/axios/axios/pull/3361)) + +Documentation: + +- Fixing simple typo, existant -> existent ([#3252](https://github.com/axios/axios/pull/3252)) +- Fixing typos ([#3309](https://github.com/axios/axios/pull/3309)) + +Huge thanks to everyone who contributed to this release via code (authors listed below) or via reviews and triaging on GitHub: + +- Allan Cruz <57270969+Allanbcruz@users.noreply.github.com> +- George Cheng +- Jay +- Kevin Kirsche +- Remco Haszing +- Taemin Shin +- Tim Gates +- Xianming Zhong + +### 0.20.0 (August 20, 2020) + +Release of 0.20.0-pre as a full release with no other changes. + +### 0.20.0-pre (July 15, 2020) + +Fixes and Functionality: + +- Fixing response with utf-8 BOM can not parse to json ([#2419](https://github.com/axios/axios/pull/2419)) + - fix: remove byte order marker (UTF-8 BOM) when transform response + - fix: remove BOM only utf-8 + - test: utf-8 BOM + - fix: incorrect param name +- Refactor mergeConfig without utils.deepMerge ([#2844](https://github.com/axios/axios/pull/2844)) + - Adding failing test + - Fixing #2587 default custom config persisting + - Adding Concat keys and filter duplicates + - Fixed value from CPE + - update for review feedbacks + - no deepMerge + - only merge between plain objects + - fix rename + - always merge config by mergeConfig + - extract function mergeDeepProperties + - refactor mergeConfig with all keys, and add special logic for validateStatus + - add test for resetting headers + - add lots of tests and fix a bug + - should not inherit `data` + - use simple toString +- Fixing overwrite Blob/File type as Content-Type in browser. ([#1773](https://github.com/axios/axios/pull/1773)) +- Fixing an issue that type 'null' is not assignable to validateStatus ([#2773](https://github.com/axios/axios/pull/2773)) +- Fixing special char encoding ([#1671](https://github.com/axios/axios/pull/1671)) + - removing @ character from replacement list since it is a reserved character + - Updating buildURL test to not include the @ character + - Removing console logs +- Fixing password encoding with special characters in basic authentication ([#1492](https://github.com/axios/axios/pull/1492)) + - Fixing password encoding with special characters in basic authentication + - Adding test to check if password with non-Latin1 characters pass +- Fixing 'Network Error' in react native android ([#1487](https://github.com/axios/axios/pull/1487)) + There is a bug in react native Android platform when using get method. It will trigger a 'Network Error' when passing the requestData which is an empty string to request.send function. So if the requestData is an empty string we can set it to null as well to fix the bug. +- Fixing Cookie Helper with Async Components ([#1105](https://github.com/axios/axios/pull/1105)) ([#1107](https://github.com/axios/axios/pull/1107)) +- Fixing 'progressEvent' type ([#2851](https://github.com/axios/axios/pull/2851)) + - Fix 'progressEvent' type + - Update axios.ts +- Fixing getting local files (file://) failed ([#2470](https://github.com/axios/axios/pull/2470)) + - fix issue #2416, #2396 + - fix Eslint warn + - Modify judgment conditions + - add unit test + - update unit test + - update unit test +- Allow PURGE method in typings ([#2191](https://github.com/axios/axios/pull/2191)) +- Adding option to disable automatic decompression ([#2661](https://github.com/axios/axios/pull/2661)) + - Adding ability to disable auto decompression + - Updating decompress documentation in README + - Fixing test\unit\adapters\http.js lint errors + - Adding test for disabling auto decompression + - Removing changes that fixed lint errors in tests + - Removing formatting change to unit test +- Add independent `maxBodyLength` option ([#2781](https://github.com/axios/axios/pull/2781)) + - Add independent option to set the maximum size of the request body + - Remove maxBodyLength check + - Update README + - Assert for error code and message +- Adding responseEncoding to mergeConfig ([#1745](https://github.com/axios/axios/pull/1745)) +- Compatible with follow-redirect aborts the request ([#2689](https://github.com/axios/axios/pull/2689)) + - Compatible with follow-redirect aborts the request + - Use the error code +- Fix merging of params ([#2656](https://github.com/axios/axios/pull/2656)) + - Name function to avoid ESLint func-names warning + - Switch params config to merge list and update tests + - Restore testing of both false and null + - Restore test cases for keys without defaults + - Include test for non-object values that aren't false-y. +- Revert `finally` as `then` ([#2683](https://github.com/axios/axios/pull/2683)) + +Internal and Tests: + +- Fix stale bot config ([#3049](https://github.com/axios/axios/pull/3049)) + - fix stale bot config + - fix multiple lines +- Add days and change name to work ([#3035](https://github.com/axios/axios/pull/3035)) +- Update close-issues.yml ([#3031](https://github.com/axios/axios/pull/3031)) + - Update close-issues.yml + Update close message to read better 😄 + - Fix use of quotations + Use single quotes as per other .yml files + - Remove user name form message +- Add GitHub actions to close stale issues/prs ([#3029](https://github.com/axios/axios/pull/3029)) + - prepare stale actions + - update messages + - Add exempt labels and lighten up comments +- Add GitHub actions to close invalid issues ([#3022](https://github.com/axios/axios/pull/3022)) + - add close actions + - fix with checkout + - update issue templates + - add reminder + - update close message +- Add test with Node.js 12 ([#2860](https://github.com/axios/axios/pull/2860)) + - test with Node.js 12 + - test with latest +- Adding console log on sandbox server startup ([#2210](https://github.com/axios/axios/pull/2210)) + - Adding console log on sandbox server startup + - Update server.js + Add server error handling + - Update server.js + Better error message, remove retry. +- Adding tests for method `options` type definitions ([#1996](https://github.com/axios/axios/pull/1996)) + Update tests. +- Add test for redirecting with too large response ([#2695](https://github.com/axios/axios/pull/2695)) +- Fixing unit test failure in Windows OS ([#2601](https://github.com/axios/axios/pull/2601)) +- Fixing issue for HEAD method and gzipped response ([#2666](https://github.com/axios/axios/pull/2666)) +- Fix tests in browsers ([#2748](https://github.com/axios/axios/pull/2748)) +- chore: add `jsdelivr` and `unpkg` support ([#2443](https://github.com/axios/axios/pull/2443)) + +Documentation: + +- Adding support for URLSearchParams in node ([#1900](https://github.com/axios/axios/pull/1900)) + - Adding support for URLSearchParams in node + - Remove un-needed code + - Update utils.js + - Make changes as suggested +- Adding table of content (preview) ([#3050](https://github.com/axios/axios/pull/3050)) + - add toc (preview) + - remove toc in toc + Signed-off-by: Moni + - fix sublinks + - fix indentation + - remove redundant table links + - update caps and indent + - remove axios +- Replace 'blacklist' with 'blocklist' ([#3006](https://github.com/axios/axios/pull/3006)) +- docs(): Detailed config options environment. ([#2088](https://github.com/axios/axios/pull/2088)) + - docs(): Detailed config options environment. + - Update README.md +- Include axios-data-unpacker in ECOSYSTEM.md ([#2080](https://github.com/axios/axios/pull/2080)) +- Allow opening examples in Gitpod ([#1958](https://github.com/axios/axios/pull/1958)) +- Remove axios.all() and axios.spread() from Readme.md ([#2727](https://github.com/axios/axios/pull/2727)) + - remove axios.all(), axios.spread() + - replace example + - axios.all() -> Promise.all() + - axios.spread(function (acct, perms)) -> function (acct, perms) + - add deprecated mark +- Update README.md ([#2887](https://github.com/axios/axios/pull/2887)) + Small change to the data attribute doc of the config. A request body can also be set for DELETE methods but this wasn't mentioned in the documentation (it only mentioned POST, PUT and PATCH). Took my some 10-20 minutes until I realized that I don't need to manipulate the request body with transformRequest in the case of DELETE. +- Include swagger-taxos-codegen in ECOSYSTEM.md ([#2162](https://github.com/axios/axios/pull/2162)) +- Add CDNJS version badge in README.md ([#878](https://github.com/axios/axios/pull/878)) + This badge will show the version on CDNJS! +- Documentation update to clear up ambiguity in code examples ([#2928](https://github.com/axios/axios/pull/2928)) + - Made an adjustment to the documentation to clear up any ambiguity around the use of "fs". This should help clear up that the code examples with "fs" cannot be used on the client side. +- Update README.md about validateStatus ([#2912](https://github.com/axios/axios/pull/2912)) + Rewrote the comment from "Reject only if the status code is greater than or equal to 500" to "Resolve only if the status code is less than 500" +- Updating documentation for usage form-data ([#2805](https://github.com/axios/axios/pull/2805)) + Closes #2049 +- Fixing CHANGELOG.md issue link ([#2784](https://github.com/axios/axios/pull/2784)) +- Include axios-hooks in ECOSYSTEM.md ([#2003](https://github.com/axios/axios/pull/2003)) +- Added Response header access instructions ([#1901](https://github.com/axios/axios/pull/1901)) + - Added Response header access instructions + - Added note about using bracket notation +- Add `onUploadProgress` and `onDownloadProgress` are browser only ([#2763](https://github.com/axios/axios/pull/2763)) + Saw in #928 and #1966 that `onUploadProgress` and `onDownloadProgress` only work in the browser and was missing that from the README. +- Update ' sign to ` in proxy spec ([#2778](https://github.com/axios/axios/pull/2778)) +- Adding jsDelivr link in README ([#1110](https://github.com/axios/axios/pull/1110)) + - Adding jsDelivr link + - Add SRI + - Remove SRI + +Huge thanks to everyone who contributed to this release via code (authors listed +below) or via reviews and triaging on GitHub: + +- Alan Wang +- Alexandru Ungureanu +- Anubhav Srivastava +- Benny Neugebauer +- Cr <631807682@qq.com> +- David +- David Ko +- David Tanner +- Emily Morehouse +- Felipe Martins +- Fonger <5862369+Fonger@users.noreply.github.com> +- Frostack +- George Cheng +- grumblerchester +- Gustavo López +- hexaez <45806662+hexaez@users.noreply.github.com> +- huangzuizui +- Ian Wijma +- Jay +- jeffjing +- jennynju <46782518+jennynju@users.noreply.github.com> +- Jimmy Liao <52391190+jimmy-liao-gogoro@users.noreply.github.com> +- Jonathan Sharpe +- JounQin +- Justin Beckwith +- Kamil Posiadała <3dcreator.pl@gmail.com> +- Lukas Drgon +- marcinx +- Martti Laine +- Michał Zarach +- Moni +- Motonori Iwata <121048+iwata@users.noreply.github.com> +- Nikita Galkin +- Petr Mares +- Philippe Recto +- Remco Haszing +- rockcs1992 +- Ryan Bown +- Samina Fu +- Simone Busoli +- Spencer von der Ohe +- Sven Efftinge +- Taegyeoung Oh +- Taemin Shin +- Thibault Ehrhart <1208424+ehrhart@users.noreply.github.com> +- Xianming Zhong +- Yasu Flores +- Zac Delventhal + +### 0.19.2 (Jan 20, 2020) + +- Remove unnecessary XSS check ([#2679](https://github.com/axios/axios/pull/2679)) (see ([#2646](https://github.com/axios/axios/issues/2646)) for discussion) + +### 0.19.1 (Jan 7, 2020) + +Fixes and Functionality: + +- Fixing invalid agent issue ([#1904](https://github.com/axios/axios/pull/1904)) +- Fix ignore set withCredentials false ([#2582](https://github.com/axios/axios/pull/2582)) +- Delete useless default to hash ([#2458](https://github.com/axios/axios/pull/2458)) +- Fix HTTP/HTTPs agents passing to follow-redirect ([#1904](https://github.com/axios/axios/pull/1904)) +- Fix ignore set withCredentials false ([#2582](https://github.com/axios/axios/pull/2582)) +- Fix CI build failure ([#2570](https://github.com/axios/axios/pull/2570)) +- Remove dependency on is-buffer from package.json ([#1816](https://github.com/axios/axios/pull/1816)) +- Adding options typings ([#2341](https://github.com/axios/axios/pull/2341)) +- Adding Typescript HTTP method definition for LINK and UNLINK. ([#2444](https://github.com/axios/axios/pull/2444)) +- Update dist with newest changes, fixes Custom Attributes issue +- Change syntax to see if build passes ([#2488](https://github.com/axios/axios/pull/2488)) +- Update Webpack + deps, remove now unnecessary polyfills ([#2410](https://github.com/axios/axios/pull/2410)) +- Fix to prevent XSS, throw an error when the URL contains a JS script ([#2464](https://github.com/axios/axios/pull/2464)) +- Add custom timeout error copy in config ([#2275](https://github.com/axios/axios/pull/2275)) +- Add error toJSON example ([#2466](https://github.com/axios/axios/pull/2466)) +- Fixing Vulnerability A Fortify Scan finds a critical Cross-Site Scrip… ([#2451](https://github.com/axios/axios/pull/2451)) +- Fixing subdomain handling on no_proxy ([#2442](https://github.com/axios/axios/pull/2442)) +- Make redirection from HTTP to HTTPS work ([#2426](https://github.com/axios/axios/pull/2426)) and ([#2547](https://github.com/axios/axios/pull/2547)) +- Add toJSON property to AxiosError type ([#2427](https://github.com/axios/axios/pull/2427)) +- Fixing socket hang up error on node side for slow response. ([#1752](https://github.com/axios/axios/pull/1752)) +- Alternative syntax to send data into the body ([#2317](https://github.com/axios/axios/pull/2317)) +- Fixing custom config options ([#2207](https://github.com/axios/axios/pull/2207)) +- Fixing set `config.method` after mergeConfig for Axios.prototype.request ([#2383](https://github.com/axios/axios/pull/2383)) +- Axios create url bug ([#2290](https://github.com/axios/axios/pull/2290)) +- Do not modify config.url when using a relative baseURL (resolves [#1628](https://github.com/axios/axios/issues/1098)) ([#2391](https://github.com/axios/axios/pull/2391)) + +Internal: + +- Revert "Update Webpack + deps, remove now unnecessary polyfills" ([#2479](https://github.com/axios/axios/pull/2479)) +- Order of if/else blocks is causing unit tests mocking XHR. ([#2201](https://github.com/axios/axios/pull/2201)) +- Add license badge ([#2446](https://github.com/axios/axios/pull/2446)) +- Fix travis CI build [#2386](https://github.com/axios/axios/pull/2386) +- Fix cancellation error on build master. #2290 #2207 ([#2407](https://github.com/axios/axios/pull/2407)) + +Documentation: + +- Fixing typo in CHANGELOG.md: s/Functionallity/Functionality ([#2639](https://github.com/axios/axios/pull/2639)) +- Fix badge, use master branch ([#2538](https://github.com/axios/axios/pull/2538)) +- Fix typo in changelog [#2193](https://github.com/axios/axios/pull/2193) +- Document fix ([#2514](https://github.com/axios/axios/pull/2514)) +- Update docs with no_proxy change, issue #2484 ([#2513](https://github.com/axios/axios/pull/2513)) +- Fixing missing words in docs template ([#2259](https://github.com/axios/axios/pull/2259)) +- 🐛Fix request finally documentation in README ([#2189](https://github.com/axios/axios/pull/2189)) +- updating spelling and adding link to docs ([#2212](https://github.com/axios/axios/pull/2212)) +- docs: minor tweak ([#2404](https://github.com/axios/axios/pull/2404)) +- Update response interceptor docs ([#2399](https://github.com/axios/axios/pull/2399)) +- Update README.md ([#2504](https://github.com/axios/axios/pull/2504)) +- Fix word 'sintaxe' to 'syntax' in README.md ([#2432](https://github.com/axios/axios/pull/2432)) +- updating README: notes on CommonJS autocomplete ([#2256](https://github.com/axios/axios/pull/2256)) +- Fix grammar in README.md ([#2271](https://github.com/axios/axios/pull/2271)) +- Doc fixes, minor examples cleanup ([#2198](https://github.com/axios/axios/pull/2198)) + +### 0.19.0 (May 30, 2019) + +Fixes and Functionality: + +- Added support for no_proxy env variable ([#1693](https://github.com/axios/axios/pull/1693/files)) - Chance Dickson +- Unzip response body only for statuses != 204 ([#1129](https://github.com/axios/axios/pull/1129)) - drawski +- Destroy stream on exceeding maxContentLength (fixes [#1098](https://github.com/axios/axios/issues/1098)) ([#1485](https://github.com/axios/axios/pull/1485)) - Gadzhi Gadzhiev +- Makes Axios error generic to use AxiosResponse ([#1738](https://github.com/axios/axios/pull/1738)) - Suman Lama +- Fixing Mocha tests by locking follow-redirects version to 1.5.10 ([#1993](https://github.com/axios/axios/pull/1993)) - grumblerchester +- Allow uppercase methods in typings. ([#1781](https://github.com/axios/axios/pull/1781)) - Ken Powers +- Fixing building url with hash mark ([#1771](https://github.com/axios/axios/pull/1771)) - Anatoly Ryabov +- This commit fix building url with hash map (fragment identifier) when parameters are present: they must not be added after `#`, because client cut everything after `#` +- Preserve HTTP method when following redirect ([#1758](https://github.com/axios/axios/pull/1758)) - Rikki Gibson +- Add `getUri` signature to TypeScript definition. ([#1736](https://github.com/axios/axios/pull/1736)) - Alexander Trauzzi +- Adding isAxiosError flag to errors thrown by axios ([#1419](https://github.com/axios/axios/pull/1419)) - Ayush Gupta + +Internal: + +- Fixing .eslintrc without extension ([#1789](https://github.com/axios/axios/pull/1789)) - Manoel +- Fix failing SauceLabs tests by updating configuration - Emily Morehouse +- Add issue templates - Emily Morehouse + +Documentation: + +- Consistent coding style in README ([#1787](https://github.com/axios/axios/pull/1787)) - Ali Servet Donmez +- Add information about auth parameter to README ([#2166](https://github.com/axios/axios/pull/2166)) - xlaguna +- Add DELETE to list of methods that allow data as a config option ([#2169](https://github.com/axios/axios/pull/2169)) - Daniela Borges Matos de Carvalho +- Update ECOSYSTEM.md - Add Axios Endpoints ([#2176](https://github.com/axios/axios/pull/2176)) - Renan +- Add r2curl in ECOSYSTEM ([#2141](https://github.com/axios/axios/pull/2141)) - 유용우 / CX +- Update README.md - Add instructions for installing with yarn ([#2036](https://github.com/axios/axios/pull/2036)) - Victor Hermes +- Fixing spacing for README.md ([#2066](https://github.com/axios/axios/pull/2066)) - Josh McCarty +- Update README.md. - Change `.then` to `.finally` in example code ([#2090](https://github.com/axios/axios/pull/2090)) - Omar Cai +- Clarify what values responseType can have in Node ([#2121](https://github.com/axios/axios/pull/2121)) - Tyler Breisacher +- docs(ECOSYSTEM): add axios-api-versioning ([#2020](https://github.com/axios/axios/pull/2020)) - Weffe +- It seems that `responseType: 'blob'` doesn't actually work in Node (when I tried using it, response.data was a string, not a Blob, since Node doesn't have Blobs), so this clarifies that this option should only be used in the browser +- Update README.md. - Add Querystring library note ([#1896](https://github.com/axios/axios/pull/1896)) - Dmitriy Eroshenko +- Add react-hooks-axios to Libraries section of ECOSYSTEM.md ([#1925](https://github.com/axios/axios/pull/1925)) - Cody Chan +- Clarify in README that default timeout is 0 (no timeout) ([#1750](https://github.com/axios/axios/pull/1750)) - Ben Standefer + +### 0.19.0-beta.1 (Aug 9, 2018) + +**NOTE:** This is a beta version of this release. There may be functionality that is broken in +certain browsers, though we suspect that builds are hanging and not erroring. See +https://saucelabs.com/u/axios for the most up-to-date information. + +New Functionality: + +- Add getUri method ([#1712](https://github.com/axios/axios/issues/1712)) +- Add support for no_proxy env variable ([#1693](https://github.com/axios/axios/issues/1693)) +- Add toJSON to decorated Axios errors to facilitate serialization ([#1625](https://github.com/axios/axios/issues/1625)) +- Add second then on axios call ([#1623](https://github.com/axios/axios/issues/1623)) +- Typings: allow custom return types +- Add option to specify character set in responses (with http adapter) + +Fixes: + +- Fix Keep defaults local to instance ([#385](https://github.com/axios/axios/issues/385)) +- Correctly catch exception in http test ([#1475](https://github.com/axios/axios/issues/1475)) +- Fix accept header normalization ([#1698](https://github.com/axios/axios/issues/1698)) +- Fix http adapter to allow HTTPS connections via HTTP ([#959](https://github.com/axios/axios/issues/959)) +- Fix Removes usage of deprecated Buffer constructor. ([#1555](https://github.com/axios/axios/issues/1555), [#1622](https://github.com/axios/axios/issues/1622)) +- Fix defaults to use httpAdapter if available ([#1285](https://github.com/axios/axios/issues/1285)) + - Fixing defaults to use httpAdapter if available + - Use a safer, cross-platform method to detect the Node environment +- Fix Reject promise if request is cancelled by the browser ([#537](https://github.com/axios/axios/issues/537)) +- [Typescript] Fix missing type parameters on delete/head methods +- [NS]: Send `false` flag isStandardBrowserEnv for Nativescript +- Fix missing type parameters on delete/head +- Fix Default method for an instance always overwritten by get +- Fix type error when socketPath option in AxiosRequestConfig +- Capture errors on request data streams +- Decorate resolve and reject to clear timeout in all cases + +Huge thanks to everyone who contributed to this release via code (authors listed +below) or via reviews and triaging on GitHub: + +- Andrew Scott +- Anthony Gauthier +- arpit +- ascott18 +- Benedikt Rötsch +- Chance Dickson +- Dave Stewart +- Deric Cain +- Guillaume Briday +- Jacob Wejendorp +- Jim Lynch +- johntron +- Justin Beckwith +- Justin Beckwith +- Khaled Garbaya +- Lim Jing Rong +- Mark van den Broek +- Martti Laine +- mattridley +- mattridley +- Nicolas Del Valle +- Nilegfx +- pbarbiero +- Rikki Gibson +- Sako Hartounian +- Shane Fitzpatrick +- Stephan Schneider +- Steven +- Tim Garthwaite +- Tim Johns +- Yutaro Miyazaki + +### 0.18.0 (Feb 19, 2018) + +- Adding support for UNIX Sockets when running with Node.js ([#1070](https://github.com/axios/axios/pull/1070)) +- Fixing typings ([#1177](https://github.com/axios/axios/pull/1177)): + - AxiosRequestConfig.proxy: allows type false + - AxiosProxyConfig: added auth field +- Adding function signature in AxiosInstance interface so AxiosInstance can be invoked ([#1192](https://github.com/axios/axios/pull/1192), [#1254](https://github.com/axios/axios/pull/1254)) +- Allowing maxContentLength to pass through to redirected calls as maxBodyLength in follow-redirects config ([#1287](https://github.com/axios/axios/pull/1287)) +- Fixing configuration when using an instance - method can now be set ([#1342](https://github.com/axios/axios/pull/1342)) + +### 0.17.1 (Nov 11, 2017) + +- Fixing issue with web workers ([#1160](https://github.com/axios/axios/pull/1160)) +- Allowing overriding transport ([#1080](https://github.com/axios/axios/pull/1080)) +- Updating TypeScript typings ([#1165](https://github.com/axios/axios/pull/1165), [#1125](https://github.com/axios/axios/pull/1125), [#1131](https://github.com/axios/axios/pull/1131)) + +### 0.17.0 (Oct 21, 2017) + +- **BREAKING** Fixing issue with `baseURL` and interceptors ([#950](https://github.com/axios/axios/pull/950)) +- **BREAKING** Improving handing of duplicate headers ([#874](https://github.com/axios/axios/pull/874)) +- Adding support for disabling proxies ([#691](https://github.com/axios/axios/pull/691)) +- Updating TypeScript typings with generic type parameters ([#1061](https://github.com/axios/axios/pull/1061)) + +### 0.16.2 (Jun 3, 2017) + +- Fixing issue with including `buffer` in bundle ([#887](https://github.com/axios/axios/pull/887)) +- Including underlying request in errors ([#830](https://github.com/axios/axios/pull/830)) +- Convert `method` to lowercase ([#930](https://github.com/axios/axios/pull/930)) + +### 0.16.1 (Apr 8, 2017) + +- Improving HTTP adapter to return last request in case of redirects ([#828](https://github.com/axios/axios/pull/828)) +- Updating `follow-redirects` dependency ([#829](https://github.com/axios/axios/pull/829)) +- Adding support for passing `Buffer` in node ([#773](https://github.com/axios/axios/pull/773)) + +### 0.16.0 (Mar 31, 2017) + +- **BREAKING** Removing `Promise` from axios typings in favor of built-in type declarations ([#480](https://github.com/axios/axios/issues/480)) +- Adding `options` shortcut method ([#461](https://github.com/axios/axios/pull/461)) +- Fixing issue with using `responseType: 'json'` in browsers incompatible with XHR Level 2 ([#654](https://github.com/axios/axios/pull/654)) +- Improving React Native detection ([#731](https://github.com/axios/axios/pull/731)) +- Fixing `combineURLs` to support empty `relativeURL` ([#581](https://github.com/axios/axios/pull/581)) +- Removing `PROTECTION_PREFIX` support ([#561](https://github.com/axios/axios/pull/561)) + +### 0.15.3 (Nov 27, 2016) + +- Fixing issue with custom instances and global defaults ([#443](https://github.com/axios/axios/issues/443)) +- Renaming `axios.d.ts` to `index.d.ts` ([#519](https://github.com/axios/axios/issues/519)) +- Adding `get`, `head`, and `delete` to `defaults.headers` ([#509](https://github.com/axios/axios/issues/509)) +- Fixing issue with `btoa` and IE ([#507](https://github.com/axios/axios/issues/507)) +- Adding support for proxy authentication ([#483](https://github.com/axios/axios/pull/483)) +- Improving HTTP adapter to use `http` protocol by default ([#493](https://github.com/axios/axios/pull/493)) +- Fixing proxy issues ([#491](https://github.com/axios/axios/pull/491)) + +### 0.15.2 (Oct 17, 2016) + +- Fixing issue with calling `cancel` after response has been received ([#482](https://github.com/axios/axios/issues/482)) + +### 0.15.1 (Oct 14, 2016) + +- Fixing issue with UMD ([#485](https://github.com/axios/axios/issues/485)) + +### 0.15.0 (Oct 10, 2016) + +- Adding cancellation support ([#452](https://github.com/axios/axios/pull/452)) +- Moving default adapter to global defaults ([#437](https://github.com/axios/axios/pull/437)) +- Fixing issue with `file` URI scheme ([#440](https://github.com/axios/axios/pull/440)) +- Fixing issue with `params` objects that have no prototype ([#445](https://github.com/axios/axios/pull/445)) + +### 0.14.0 (Aug 27, 2016) + +- **BREAKING** Updating TypeScript definitions ([#419](https://github.com/axios/axios/pull/419)) +- **BREAKING** Replacing `agent` option with `httpAgent` and `httpsAgent` ([#387](https://github.com/axios/axios/pull/387)) +- **BREAKING** Splitting `progress` event handlers into `onUploadProgress` and `onDownloadProgress` ([#423](https://github.com/axios/axios/pull/423)) +- Adding support for `http_proxy` and `https_proxy` environment variables ([#366](https://github.com/axios/axios/pull/366)) +- Fixing issue with `auth` config option and `Authorization` header ([#397](https://github.com/axios/axios/pull/397)) +- Don't set XSRF header if `xsrfCookieName` is `null` ([#406](https://github.com/axios/axios/pull/406)) + +### 0.13.1 (Jul 16, 2016) + +- Fixing issue with response data not being transformed on error ([#378](https://github.com/axios/axios/issues/378)) + +### 0.13.0 (Jul 13, 2016) + +- **BREAKING** Improved error handling ([#345](https://github.com/axios/axios/pull/345)) +- **BREAKING** Response transformer now invoked in dispatcher not adapter ([10eb238](https://github.com/axios/axios/commit/10eb23865101f9347570552c04e9d6211376e25e)) +- **BREAKING** Request adapters now return a `Promise` ([157efd5](https://github.com/axios/axios/commit/157efd5615890301824e3121cc6c9d2f9b21f94a)) +- Fixing issue with `withCredentials` not being overwritten ([#343](https://github.com/axios/axios/issues/343)) +- Fixing regression with request transformer being called before request interceptor ([#352](https://github.com/axios/axios/issues/352)) +- Fixing custom instance defaults ([#341](https://github.com/axios/axios/issues/341)) +- Fixing instances created from `axios.create` to have same API as default axios ([#217](https://github.com/axios/axios/issues/217)) + +### 0.12.0 (May 31, 2016) + +- Adding support for `URLSearchParams` ([#317](https://github.com/axios/axios/pull/317)) +- Adding `maxRedirects` option ([#307](https://github.com/axios/axios/pull/307)) + +### 0.11.1 (May 17, 2016) + +- Fixing IE CORS support ([#313](https://github.com/axios/axios/pull/313)) +- Fixing detection of `FormData` ([#325](https://github.com/axios/axios/pull/325)) +- Adding `Axios` class to exports ([#321](https://github.com/axios/axios/pull/321)) + +### 0.11.0 (Apr 26, 2016) + +- Adding support for Stream with HTTP adapter ([#296](https://github.com/axios/axios/pull/296)) +- Adding support for custom HTTP status code error ranges ([#308](https://github.com/axios/axios/pull/308)) +- Fixing issue with ArrayBuffer ([#299](https://github.com/axios/axios/pull/299)) + +### 0.10.0 (Apr 20, 2016) + +- Fixing issue with some requests sending `undefined` instead of `null` ([#250](https://github.com/axios/axios/pull/250)) +- Fixing basic auth for HTTP adapter ([#252](https://github.com/axios/axios/pull/252)) +- Fixing request timeout for XHR adapter ([#227](https://github.com/axios/axios/pull/227)) +- Fixing IE8 support by using `onreadystatechange` instead of `onload` ([#249](https://github.com/axios/axios/pull/249)) +- Fixing IE9 cross domain requests ([#251](https://github.com/axios/axios/pull/251)) +- Adding `maxContentLength` option ([#275](https://github.com/axios/axios/pull/275)) +- Fixing XHR support for WebWorker environment ([#279](https://github.com/axios/axios/pull/279)) +- Adding request instance to response ([#200](https://github.com/axios/axios/pull/200)) + +### 0.9.1 (Jan 24, 2016) + +- Improving handling of request timeout in node ([#124](https://github.com/axios/axios/issues/124)) +- Fixing network errors not rejecting ([#205](https://github.com/axios/axios/pull/205)) +- Fixing issue with IE rejecting on HTTP 204 ([#201](https://github.com/axios/axios/issues/201)) +- Fixing host/port when following redirects ([#198](https://github.com/axios/axios/pull/198)) + +### 0.9.0 (Jan 18, 2016) + +- Adding support for custom adapters +- Fixing Content-Type header being removed when data is false ([#195](https://github.com/axios/axios/pull/195)) +- Improving XDomainRequest implementation ([#185](https://github.com/axios/axios/pull/185)) +- Improving config merging and order of precedence ([#183](https://github.com/axios/axios/pull/183)) +- Fixing XDomainRequest support for only <= IE9 ([#182](https://github.com/axios/axios/pull/182)) + +### 0.8.1 (Dec 14, 2015) + +- Adding support for passing XSRF token for cross domain requests when using `withCredentials` ([#168](https://github.com/axios/axios/pull/168)) +- Fixing error with format of basic auth header ([#178](https://github.com/axios/axios/pull/173)) +- Fixing error with JSON payloads throwing `InvalidStateError` in some cases ([#174](https://github.com/axios/axios/pull/174)) + +### 0.8.0 (Dec 11, 2015) + +- Adding support for creating instances of axios ([#123](https://github.com/axios/axios/pull/123)) +- Fixing http adapter to use `Buffer` instead of `String` in case of `responseType === 'arraybuffer'` ([#128](https://github.com/axios/axios/pull/128)) +- Adding support for using custom parameter serializer with `paramsSerializer` option ([#121](https://github.com/axios/axios/pull/121)) +- Fixing issue in IE8 caused by `forEach` on `arguments` ([#127](https://github.com/axios/axios/pull/127)) +- Adding support for following redirects in node ([#146](https://github.com/axios/axios/pull/146)) +- Adding support for transparent decompression if `content-encoding` is set ([#149](https://github.com/axios/axios/pull/149)) +- Adding support for transparent XDomainRequest to handle cross domain requests in IE9 ([#140](https://github.com/axios/axios/pull/140)) +- Adding support for HTTP basic auth via Authorization header ([#167](https://github.com/axios/axios/pull/167)) +- Adding support for baseURL option ([#160](https://github.com/axios/axios/pull/160)) + +### 0.7.0 (Sep 29, 2015) + +- Fixing issue with minified bundle in IE8 ([#87](https://github.com/axios/axios/pull/87)) +- Adding support for passing agent in node ([#102](https://github.com/axios/axios/pull/102)) +- Adding support for returning result from `axios.spread` for chaining ([#106](https://github.com/axios/axios/pull/106)) +- Fixing typescript definition ([#105](https://github.com/axios/axios/pull/105)) +- Fixing default timeout config for node ([#112](https://github.com/axios/axios/pull/112)) +- Adding support for use in web workers, and react-native ([#70](https://github.com/axios/axios/issue/70)), ([#98](https://github.com/axios/axios/pull/98)) +- Adding support for fetch like API `axios(url[, config])` ([#116](https://github.com/axios/axios/issues/116)) + +### 0.6.0 (Sep 21, 2015) + +- Removing deprecated success/error aliases +- Fixing issue with array params not being properly encoded ([#49](https://github.com/axios/axios/pull/49)) +- Fixing issue with User-Agent getting overridden ([#69](https://github.com/axios/axios/issues/69)) +- Adding support for timeout config ([#56](https://github.com/axios/axios/issues/56)) +- Removing es6-promise dependency +- Fixing issue preventing `length` to be used as a parameter ([#91](https://github.com/axios/axios/pull/91)) +- Fixing issue with IE8 ([#85](https://github.com/axios/axios/pull/85)) +- Converting build to UMD + +### 0.5.4 (Apr 08, 2015) + +- Fixing issue with FormData not being sent ([#53](https://github.com/axios/axios/issues/53)) + +### 0.5.3 (Apr 07, 2015) + +- Using JSON.parse unconditionally when transforming response string ([#55](https://github.com/axios/axios/issues/55)) + +### 0.5.2 (Mar 13, 2015) + +- Adding support for `statusText` in response ([#46](https://github.com/axios/axios/issues/46)) + +### 0.5.1 (Mar 10, 2015) + +- Fixing issue using strict mode ([#45](https://github.com/axios/axios/issues/45)) +- Fixing issue with standalone build ([#47](https://github.com/axios/axios/issues/47)) + +### 0.5.0 (Jan 23, 2015) + +- Adding support for intercepetors ([#14](https://github.com/axios/axios/issues/14)) +- Updating es6-promise dependency + +### 0.4.2 (Dec 10, 2014) + +- Fixing issue with `Content-Type` when using `FormData` ([#22](https://github.com/axios/axios/issues/22)) +- Adding support for TypeScript ([#25](https://github.com/axios/axios/issues/25)) +- Fixing issue with standalone build ([#29](https://github.com/axios/axios/issues/29)) +- Fixing issue with verbs needing to be capitalized in some browsers ([#30](https://github.com/axios/axios/issues/30)) + +### 0.4.1 (Oct 15, 2014) + +- Adding error handling to request for node.js ([#18](https://github.com/axios/axios/issues/18)) + +### 0.4.0 (Oct 03, 2014) + +- Adding support for `ArrayBuffer` and `ArrayBufferView` ([#10](https://github.com/axios/axios/issues/10)) +- Adding support for utf-8 for node.js ([#13](https://github.com/axios/axios/issues/13)) +- Adding support for SSL for node.js ([#12](https://github.com/axios/axios/issues/12)) +- Fixing incorrect `Content-Type` header ([#9](https://github.com/axios/axios/issues/9)) +- Adding standalone build without bundled es6-promise ([#11](https://github.com/axios/axios/issues/11)) +- Deprecating `success`/`error` in favor of `then`/`catch` + +### 0.3.1 (Sep 16, 2014) + +- Fixing missing post body when using node.js ([#3](https://github.com/axios/axios/issues/3)) + +### 0.3.0 (Sep 16, 2014) + +- Fixing `success` and `error` to properly receive response data as individual arguments ([#8](https://github.com/axios/axios/issues/8)) +- Updating `then` and `catch` to receive response data as a single object ([#6](https://github.com/axios/axios/issues/6)) +- Fixing issue with `all` not working ([#7](https://github.com/axios/axios/issues/7)) + +### 0.2.2 (Sep 14, 2014) + +- Fixing bundling with browserify ([#4](https://github.com/axios/axios/issues/4)) + +### 0.2.1 (Sep 12, 2014) + +- Fixing build problem causing ridiculous file sizes + +### 0.2.0 (Sep 12, 2014) + +- Adding support for `all` and `spread` +- Adding support for node.js ([#1](https://github.com/axios/axios/issues/1)) + +### 0.1.0 (Aug 29, 2014) + +- Initial release diff --git a/test/node_modules/axios/LICENSE b/test/node_modules/axios/LICENSE new file mode 100644 index 0000000..d36c80e --- /dev/null +++ b/test/node_modules/axios/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014-present Matt Zabriskie + +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/test/node_modules/axios/README.md b/test/node_modules/axios/README.md new file mode 100755 index 0000000..d5ba7f9 --- /dev/null +++ b/test/node_modules/axios/README.md @@ -0,0 +1,909 @@ +# axios + +[![npm version](https://img.shields.io/npm/v/axios.svg?style=flat-square)](https://www.npmjs.org/package/axios) +[![CDNJS](https://img.shields.io/cdnjs/v/axios.svg?style=flat-square)](https://cdnjs.com/libraries/axios) +![Build status](https://github.com/axios/axios/actions/workflows/ci.yml/badge.svg) +[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/axios/axios) +[![code coverage](https://img.shields.io/coveralls/mzabriskie/axios.svg?style=flat-square)](https://coveralls.io/r/mzabriskie/axios) +[![install size](https://packagephobia.now.sh/badge?p=axios)](https://packagephobia.now.sh/result?p=axios) +[![npm downloads](https://img.shields.io/npm/dm/axios.svg?style=flat-square)](http://npm-stat.com/charts.html?package=axios) +[![gitter chat](https://img.shields.io/gitter/room/mzabriskie/axios.svg?style=flat-square)](https://gitter.im/mzabriskie/axios) +[![code helpers](https://www.codetriage.com/axios/axios/badges/users.svg)](https://www.codetriage.com/axios/axios) +[![Known Vulnerabilities](https://snyk.io/test/npm/axios/badge.svg)](https://snyk.io/test/npm/axios) + +Promise based HTTP client for the browser and node.js + +> New axios docs website: [click here](https://axios-http.com/) + +## Table of Contents + + - [Features](#features) + - [Browser Support](#browser-support) + - [Installing](#installing) + - [Example](#example) + - [Axios API](#axios-api) + - [Request method aliases](#request-method-aliases) + - [Concurrency (Deprecated)](#concurrency-deprecated) + - [Creating an instance](#creating-an-instance) + - [Instance methods](#instance-methods) + - [Request Config](#request-config) + - [Response Schema](#response-schema) + - [Config Defaults](#config-defaults) + - [Global axios defaults](#global-axios-defaults) + - [Custom instance defaults](#custom-instance-defaults) + - [Config order of precedence](#config-order-of-precedence) + - [Interceptors](#interceptors) + - [Multiple Interceptors](#multiple-interceptors) + - [Handling Errors](#handling-errors) + - [Cancellation](#cancellation) + - [Using application/x-www-form-urlencoded format](#using-applicationx-www-form-urlencoded-format) + - [Browser](#browser) + - [Node.js](#nodejs) + - [Query string](#query-string) + - [Form data](#form-data) + - [Semver](#semver) + - [Promises](#promises) + - [TypeScript](#typescript) + - [Resources](#resources) + - [Credits](#credits) + - [License](#license) + +## Features + +- Make [XMLHttpRequests](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) from the browser +- Make [http](http://nodejs.org/api/http.html) requests from node.js +- Supports the [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) API +- Intercept request and response +- Transform request and response data +- Cancel requests +- Automatic transforms for JSON data +- Client side support for protecting against [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery) + +## Browser Support + +![Chrome](https://raw.github.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/src/safari/safari_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/src/opera/opera_48x48.png) | ![Edge](https://raw.github.com/alrra/browser-logos/master/src/edge/edge_48x48.png) | ![IE](https://raw.github.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png) | +--- | --- | --- | --- | --- | --- | +Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ | + +[![Browser Matrix](https://saucelabs.com/open_sauce/build_matrix/axios.svg)](https://saucelabs.com/u/axios) + +## Installing + +Using npm: + +```bash +$ npm install axios +``` + +Using bower: + +```bash +$ bower install axios +``` + +Using yarn: + +```bash +$ yarn add axios +``` + +Using jsDelivr CDN: + +```html + +``` + +Using unpkg CDN: + +```html + +``` + +## Example + +### note: CommonJS usage +In order to gain the TypeScript typings (for intellisense / autocomplete) while using CommonJS imports with `require()` use the following approach: + +```js +const axios = require('axios').default; + +// axios. will now provide autocomplete and parameter typings +``` + +Performing a `GET` request + +```js +const axios = require('axios'); + +// Make a request for a user with a given ID +axios.get('/user?ID=12345') + .then(function (response) { + // handle success + console.log(response); + }) + .catch(function (error) { + // handle error + console.log(error); + }) + .then(function () { + // always executed + }); + +// Optionally the request above could also be done as +axios.get('/user', { + params: { + ID: 12345 + } + }) + .then(function (response) { + console.log(response); + }) + .catch(function (error) { + console.log(error); + }) + .then(function () { + // always executed + }); + +// Want to use async/await? Add the `async` keyword to your outer function/method. +async function getUser() { + try { + const response = await axios.get('/user?ID=12345'); + console.log(response); + } catch (error) { + console.error(error); + } +} +``` + +> **NOTE:** `async/await` is part of ECMAScript 2017 and is not supported in Internet +> Explorer and older browsers, so use with caution. + +Performing a `POST` request + +```js +axios.post('/user', { + firstName: 'Fred', + lastName: 'Flintstone' + }) + .then(function (response) { + console.log(response); + }) + .catch(function (error) { + console.log(error); + }); +``` + +Performing multiple concurrent requests + +```js +function getUserAccount() { + return axios.get('/user/12345'); +} + +function getUserPermissions() { + return axios.get('/user/12345/permissions'); +} + +Promise.all([getUserAccount(), getUserPermissions()]) + .then(function (results) { + const acct = results[0]; + const perm = results[1]; + }); +``` + +## axios API + +Requests can be made by passing the relevant config to `axios`. + +##### axios(config) + +```js +// Send a POST request +axios({ + method: 'post', + url: '/user/12345', + data: { + firstName: 'Fred', + lastName: 'Flintstone' + } +}); +``` + +```js +// GET request for remote image in node.js +axios({ + method: 'get', + url: 'http://bit.ly/2mTM3nY', + responseType: 'stream' +}) + .then(function (response) { + response.data.pipe(fs.createWriteStream('ada_lovelace.jpg')) + }); +``` + +##### axios(url[, config]) + +```js +// Send a GET request (default method) +axios('/user/12345'); +``` + +### Request method aliases + +For convenience aliases have been provided for all supported request methods. + +##### axios.request(config) +##### axios.get(url[, config]) +##### axios.delete(url[, config]) +##### axios.head(url[, config]) +##### axios.options(url[, config]) +##### axios.post(url[, data[, config]]) +##### axios.put(url[, data[, config]]) +##### axios.patch(url[, data[, config]]) + +###### NOTE +When using the alias methods `url`, `method`, and `data` properties don't need to be specified in config. + +### Concurrency (Deprecated) +Please use `Promise.all` to replace the below functions. + +Helper functions for dealing with concurrent requests. + +axios.all(iterable) +axios.spread(callback) + +### Creating an instance + +You can create a new instance of axios with a custom config. + +##### axios.create([config]) + +```js +const instance = axios.create({ + baseURL: 'https://some-domain.com/api/', + timeout: 1000, + headers: {'X-Custom-Header': 'foobar'} +}); +``` + +### Instance methods + +The available instance methods are listed below. The specified config will be merged with the instance config. + +##### axios#request(config) +##### axios#get(url[, config]) +##### axios#delete(url[, config]) +##### axios#head(url[, config]) +##### axios#options(url[, config]) +##### axios#post(url[, data[, config]]) +##### axios#put(url[, data[, config]]) +##### axios#patch(url[, data[, config]]) +##### axios#getUri([config]) + +## Request Config + +These are the available config options for making requests. Only the `url` is required. Requests will default to `GET` if `method` is not specified. + +```js +{ + // `url` is the server URL that will be used for the request + url: '/user', + + // `method` is the request method to be used when making the request + method: 'get', // default + + // `baseURL` will be prepended to `url` unless `url` is absolute. + // It can be convenient to set `baseURL` for an instance of axios to pass relative URLs + // to methods of that instance. + baseURL: 'https://some-domain.com/api/', + + // `transformRequest` allows changes to the request data before it is sent to the server + // This is only applicable for request methods 'PUT', 'POST', 'PATCH' and 'DELETE' + // The last function in the array must return a string or an instance of Buffer, ArrayBuffer, + // FormData or Stream + // You may modify the headers object. + transformRequest: [function (data, headers) { + // Do whatever you want to transform the data + + return data; + }], + + // `transformResponse` allows changes to the response data to be made before + // it is passed to then/catch + transformResponse: [function (data) { + // Do whatever you want to transform the data + + return data; + }], + + // `headers` are custom headers to be sent + headers: {'X-Requested-With': 'XMLHttpRequest'}, + + // `params` are the URL parameters to be sent with the request + // Must be a plain object or a URLSearchParams object + params: { + ID: 12345 + }, + + // `paramsSerializer` is an optional function in charge of serializing `params` + // (e.g. https://www.npmjs.com/package/qs, http://api.jquery.com/jquery.param/) + paramsSerializer: function (params) { + return Qs.stringify(params, {arrayFormat: 'brackets'}) + }, + + // `data` is the data to be sent as the request body + // Only applicable for request methods 'PUT', 'POST', 'DELETE , and 'PATCH' + // When no `transformRequest` is set, must be of one of the following types: + // - string, plain object, ArrayBuffer, ArrayBufferView, URLSearchParams + // - Browser only: FormData, File, Blob + // - Node only: Stream, Buffer + data: { + firstName: 'Fred' + }, + + // syntax alternative to send data into the body + // method post + // only the value is sent, not the key + data: 'Country=Brasil&City=Belo Horizonte', + + // `timeout` specifies the number of milliseconds before the request times out. + // If the request takes longer than `timeout`, the request will be aborted. + timeout: 1000, // default is `0` (no timeout) + + // `withCredentials` indicates whether or not cross-site Access-Control requests + // should be made using credentials + withCredentials: false, // default + + // `adapter` allows custom handling of requests which makes testing easier. + // Return a promise and supply a valid response (see lib/adapters/README.md). + adapter: function (config) { + /* ... */ + }, + + // `auth` indicates that HTTP Basic auth should be used, and supplies credentials. + // This will set an `Authorization` header, overwriting any existing + // `Authorization` custom headers you have set using `headers`. + // Please note that only HTTP Basic auth is configurable through this parameter. + // For Bearer tokens and such, use `Authorization` custom headers instead. + auth: { + username: 'janedoe', + password: 's00pers3cret' + }, + + // `responseType` indicates the type of data that the server will respond with + // options are: 'arraybuffer', 'document', 'json', 'text', 'stream' + // browser only: 'blob' + responseType: 'json', // default + + // `responseEncoding` indicates encoding to use for decoding responses (Node.js only) + // Note: Ignored for `responseType` of 'stream' or client-side requests + responseEncoding: 'utf8', // default + + // `xsrfCookieName` is the name of the cookie to use as a value for xsrf token + xsrfCookieName: 'XSRF-TOKEN', // default + + // `xsrfHeaderName` is the name of the http header that carries the xsrf token value + xsrfHeaderName: 'X-XSRF-TOKEN', // default + + // `onUploadProgress` allows handling of progress events for uploads + // browser only + onUploadProgress: function (progressEvent) { + // Do whatever you want with the native progress event + }, + + // `onDownloadProgress` allows handling of progress events for downloads + // browser only + onDownloadProgress: function (progressEvent) { + // Do whatever you want with the native progress event + }, + + // `maxContentLength` defines the max size of the http response content in bytes allowed in node.js + maxContentLength: 2000, + + // `maxBodyLength` (Node only option) defines the max size of the http request content in bytes allowed + maxBodyLength: 2000, + + // `validateStatus` defines whether to resolve or reject the promise for a given + // HTTP response status code. If `validateStatus` returns `true` (or is set to `null` + // or `undefined`), the promise will be resolved; otherwise, the promise will be + // rejected. + validateStatus: function (status) { + return status >= 200 && status < 300; // default + }, + + // `maxRedirects` defines the maximum number of redirects to follow in node.js. + // If set to 0, no redirects will be followed. + maxRedirects: 5, // default + + // `socketPath` defines a UNIX Socket to be used in node.js. + // e.g. '/var/run/docker.sock' to send requests to the docker daemon. + // Only either `socketPath` or `proxy` can be specified. + // If both are specified, `socketPath` is used. + socketPath: null, // default + + // `httpAgent` and `httpsAgent` define a custom agent to be used when performing http + // and https requests, respectively, in node.js. This allows options to be added like + // `keepAlive` that are not enabled by default. + httpAgent: new http.Agent({ keepAlive: true }), + httpsAgent: new https.Agent({ keepAlive: true }), + + // `proxy` defines the hostname, port, and protocol of the proxy server. + // You can also define your proxy using the conventional `http_proxy` and + // `https_proxy` environment variables. If you are using environment variables + // for your proxy configuration, you can also define a `no_proxy` environment + // variable as a comma-separated list of domains that should not be proxied. + // Use `false` to disable proxies, ignoring environment variables. + // `auth` indicates that HTTP Basic auth should be used to connect to the proxy, and + // supplies credentials. + // This will set an `Proxy-Authorization` header, overwriting any existing + // `Proxy-Authorization` custom headers you have set using `headers`. + // If the proxy server uses HTTPS, then you must set the protocol to `https`. + proxy: { + protocol: 'https', + host: '127.0.0.1', + port: 9000, + auth: { + username: 'mikeymike', + password: 'rapunz3l' + } + }, + + // `cancelToken` specifies a cancel token that can be used to cancel the request + // (see Cancellation section below for details) + cancelToken: new CancelToken(function (cancel) { + }), + + // an alternative way to cancel Axios requests using AbortController + signal: new AbortController().signal, + + // `decompress` indicates whether or not the response body should be decompressed + // automatically. If set to `true` will also remove the 'content-encoding' header + // from the responses objects of all decompressed responses + // - Node only (XHR cannot turn off decompression) + decompress: true // default + + // `insecureHTTPParser` boolean. + // Indicates where to use an insecure HTTP parser that accepts invalid HTTP headers. + // This may allow interoperability with non-conformant HTTP implementations. + // Using the insecure parser should be avoided. + // see options https://nodejs.org/dist/latest-v12.x/docs/api/http.html#http_http_request_url_options_callback + // see also https://nodejs.org/en/blog/vulnerability/february-2020-security-releases/#strict-http-header-parsing-none + insecureHTTPParser: undefined // default + + // transitional options for backward compatibility that may be removed in the newer versions + transitional: { + // silent JSON parsing mode + // `true` - ignore JSON parsing errors and set response.data to null if parsing failed (old behaviour) + // `false` - throw SyntaxError if JSON parsing failed (Note: responseType must be set to 'json') + silentJSONParsing: true, // default value for the current Axios version + + // try to parse the response string as JSON even if `responseType` is not 'json' + forcedJSONParsing: true, + + // throw ETIMEDOUT error instead of generic ECONNABORTED on request timeouts + clarifyTimeoutError: false, + } +} +``` + +## Response Schema + +The response for a request contains the following information. + +```js +{ + // `data` is the response that was provided by the server + data: {}, + + // `status` is the HTTP status code from the server response + status: 200, + + // `statusText` is the HTTP status message from the server response + statusText: 'OK', + + // `headers` the HTTP headers that the server responded with + // All header names are lower cased and can be accessed using the bracket notation. + // Example: `response.headers['content-type']` + headers: {}, + + // `config` is the config that was provided to `axios` for the request + config: {}, + + // `request` is the request that generated this response + // It is the last ClientRequest instance in node.js (in redirects) + // and an XMLHttpRequest instance in the browser + request: {} +} +``` + +When using `then`, you will receive the response as follows: + +```js +axios.get('/user/12345') + .then(function (response) { + console.log(response.data); + console.log(response.status); + console.log(response.statusText); + console.log(response.headers); + console.log(response.config); + }); +``` + +When using `catch`, or passing a [rejection callback](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/then) as second parameter of `then`, the response will be available through the `error` object as explained in the [Handling Errors](#handling-errors) section. + +## Config Defaults + +You can specify config defaults that will be applied to every request. + +### Global axios defaults + +```js +axios.defaults.baseURL = 'https://api.example.com'; + +// Important: If axios is used with multiple domains, the AUTH_TOKEN will be sent to all of them. +// See below for an example using Custom instance defaults instead. +axios.defaults.headers.common['Authorization'] = AUTH_TOKEN; + +axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'; +``` + +### Custom instance defaults + +```js +// Set config defaults when creating the instance +const instance = axios.create({ + baseURL: 'https://api.example.com' +}); + +// Alter defaults after instance has been created +instance.defaults.headers.common['Authorization'] = AUTH_TOKEN; +``` + +### Config order of precedence + +Config will be merged with an order of precedence. The order is library defaults found in [lib/defaults.js](https://github.com/axios/axios/blob/master/lib/defaults.js#L28), then `defaults` property of the instance, and finally `config` argument for the request. The latter will take precedence over the former. Here's an example. + +```js +// Create an instance using the config defaults provided by the library +// At this point the timeout config value is `0` as is the default for the library +const instance = axios.create(); + +// Override timeout default for the library +// Now all requests using this instance will wait 2.5 seconds before timing out +instance.defaults.timeout = 2500; + +// Override timeout for this request as it's known to take a long time +instance.get('/longRequest', { + timeout: 5000 +}); +``` + +## Interceptors + +You can intercept requests or responses before they are handled by `then` or `catch`. + +```js +// Add a request interceptor +axios.interceptors.request.use(function (config) { + // Do something before request is sent + return config; + }, function (error) { + // Do something with request error + return Promise.reject(error); + }); + +// Add a response interceptor +axios.interceptors.response.use(function (response) { + // Any status code that lie within the range of 2xx cause this function to trigger + // Do something with response data + return response; + }, function (error) { + // Any status codes that falls outside the range of 2xx cause this function to trigger + // Do something with response error + return Promise.reject(error); + }); +``` + +If you need to remove an interceptor later you can. + +```js +const myInterceptor = axios.interceptors.request.use(function () {/*...*/}); +axios.interceptors.request.eject(myInterceptor); +``` + +You can add interceptors to a custom instance of axios. + +```js +const instance = axios.create(); +instance.interceptors.request.use(function () {/*...*/}); +``` + +When you add request interceptors, they are presumed to be asynchronous by default. This can cause a delay +in the execution of your axios request when the main thread is blocked (a promise is created under the hood for +the interceptor and your request gets put on the bottom of the call stack). If your request interceptors are synchronous you can add a flag +to the options object that will tell axios to run the code synchronously and avoid any delays in request execution. + +```js +axios.interceptors.request.use(function (config) { + config.headers.test = 'I am only a header!'; + return config; +}, null, { synchronous: true }); +``` + +If you want to execute a particular interceptor based on a runtime check, +you can add a `runWhen` function to the options object. The interceptor will not be executed **if and only if** the return +of `runWhen` is `false`. The function will be called with the config +object (don't forget that you can bind your own arguments to it as well.) This can be handy when you have an +asynchronous request interceptor that only needs to run at certain times. + +```js +function onGetCall(config) { + return config.method === 'get'; +} +axios.interceptors.request.use(function (config) { + config.headers.test = 'special get headers'; + return config; +}, null, { runWhen: onGetCall }); +``` + +### Multiple Interceptors + +Given you add multiple response interceptors +and when the response was fulfilled +- then each interceptor is executed +- then they are executed in the order they were added +- then only the last interceptor's result is returned +- then every interceptor receives the result of it's predecessor +- and when the fulfillment-interceptor throws + - then the following fulfillment-interceptor is not called + - then the following rejection-interceptor is called + - once caught, another following fulfill-interceptor is called again (just like in a promise chain). + +Read [the interceptor tests](./test/specs/interceptors.spec.js) for seeing all this in code. + +## Handling Errors + +```js +axios.get('/user/12345') + .catch(function (error) { + if (error.response) { + // The request was made and the server responded with a status code + // that falls out of the range of 2xx + console.log(error.response.data); + console.log(error.response.status); + console.log(error.response.headers); + } else if (error.request) { + // The request was made but no response was received + // `error.request` is an instance of XMLHttpRequest in the browser and an instance of + // http.ClientRequest in node.js + console.log(error.request); + } else { + // Something happened in setting up the request that triggered an Error + console.log('Error', error.message); + } + console.log(error.config); + }); +``` + +Using the `validateStatus` config option, you can define HTTP code(s) that should throw an error. + +```js +axios.get('/user/12345', { + validateStatus: function (status) { + return status < 500; // Resolve only if the status code is less than 500 + } +}) +``` + +Using `toJSON` you get an object with more information about the HTTP error. + +```js +axios.get('/user/12345') + .catch(function (error) { + console.log(error.toJSON()); + }); +``` + +## Cancellation + +You can cancel a request using a *cancel token*. + +> The axios cancel token API is based on the withdrawn [cancelable promises proposal](https://github.com/tc39/proposal-cancelable-promises). + +You can create a cancel token using the `CancelToken.source` factory as shown below: + +```js +const CancelToken = axios.CancelToken; +const source = CancelToken.source(); + +axios.get('/user/12345', { + cancelToken: source.token +}).catch(function (thrown) { + if (axios.isCancel(thrown)) { + console.log('Request canceled', thrown.message); + } else { + // handle error + } +}); + +axios.post('/user/12345', { + name: 'new name' +}, { + cancelToken: source.token +}) + +// cancel the request (the message parameter is optional) +source.cancel('Operation canceled by the user.'); +``` + +You can also create a cancel token by passing an executor function to the `CancelToken` constructor: + +```js +const CancelToken = axios.CancelToken; +let cancel; + +axios.get('/user/12345', { + cancelToken: new CancelToken(function executor(c) { + // An executor function receives a cancel function as a parameter + cancel = c; + }) +}); + +// cancel the request +cancel(); +``` + +Axios supports AbortController to abort requests in [`fetch API`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API#aborting_a_fetch) way: +```js +const controller = new AbortController(); + +axios.get('/foo/bar', { + signal: controller.signal +}).then(function(response) { + //... +}); +// cancel the request +controller.abort() +``` + +> Note: you can cancel several requests with the same cancel token/abort controller. +> If a cancellation token is already cancelled at the moment of starting an Axios request, then the request is cancelled immediately, without any attempts to make real request. + +## Using application/x-www-form-urlencoded format + +By default, axios serializes JavaScript objects to `JSON`. To send data in the `application/x-www-form-urlencoded` format instead, you can use one of the following options. + +### Browser + +In a browser, you can use the [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) API as follows: + +```js +const params = new URLSearchParams(); +params.append('param1', 'value1'); +params.append('param2', 'value2'); +axios.post('/foo', params); +``` + +> Note that `URLSearchParams` is not supported by all browsers (see [caniuse.com](http://www.caniuse.com/#feat=urlsearchparams)), but there is a [polyfill](https://github.com/WebReflection/url-search-params) available (make sure to polyfill the global environment). + +Alternatively, you can encode data using the [`qs`](https://github.com/ljharb/qs) library: + +```js +const qs = require('qs'); +axios.post('/foo', qs.stringify({ 'bar': 123 })); +``` + +Or in another way (ES6), + +```js +import qs from 'qs'; +const data = { 'bar': 123 }; +const options = { + method: 'POST', + headers: { 'content-type': 'application/x-www-form-urlencoded' }, + data: qs.stringify(data), + url, +}; +axios(options); +``` + +### Node.js + +#### Query string + +In node.js, you can use the [`querystring`](https://nodejs.org/api/querystring.html) module as follows: + +```js +const querystring = require('querystring'); +axios.post('http://something.com/', querystring.stringify({ foo: 'bar' })); +``` + +or ['URLSearchParams'](https://nodejs.org/api/url.html#url_class_urlsearchparams) from ['url module'](https://nodejs.org/api/url.html) as follows: + +```js +const url = require('url'); +const params = new url.URLSearchParams({ foo: 'bar' }); +axios.post('http://something.com/', params.toString()); +``` + +You can also use the [`qs`](https://github.com/ljharb/qs) library. + +###### NOTE +The `qs` library is preferable if you need to stringify nested objects, as the `querystring` method has known issues with that use case (https://github.com/nodejs/node-v0.x-archive/issues/1665). + +#### Form data + +In node.js, you can use the [`form-data`](https://github.com/form-data/form-data) library as follows: + +```js +const FormData = require('form-data'); + +const form = new FormData(); +form.append('my_field', 'my value'); +form.append('my_buffer', new Buffer(10)); +form.append('my_file', fs.createReadStream('/foo/bar.jpg')); + +axios.post('https://example.com', form, { headers: form.getHeaders() }) +``` + +Alternatively, use an interceptor: + +```js +axios.interceptors.request.use(config => { + if (config.data instanceof FormData) { + Object.assign(config.headers, config.data.getHeaders()); + } + return config; +}); +``` + +## Semver + +Until axios reaches a `1.0` release, breaking changes will be released with a new minor version. For example `0.5.1`, and `0.5.4` will have the same API, but `0.6.0` will have breaking changes. + +## Promises + +axios depends on a native ES6 Promise implementation to be [supported](http://caniuse.com/promises). +If your environment doesn't support ES6 Promises, you can [polyfill](https://github.com/jakearchibald/es6-promise). + +## TypeScript + +axios includes [TypeScript](http://typescriptlang.org) definitions and a type guard for axios errors. + +```typescript +let user: User = null; +try { + const { data } = await axios.get('/user?ID=12345'); + user = data.userDetails; +} catch (error) { + if (axios.isAxiosError(error)) { + handleAxiosError(error); + } else { + handleUnexpectedError(error); + } +} +``` + +## Online one-click setup + +You can use Gitpod an online IDE(which is free for Open Source) for contributing or running the examples online. + +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/axios/axios/blob/master/examples/server.js) + + +## Resources + +* [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md) +* [Upgrade Guide](https://github.com/axios/axios/blob/master/UPGRADE_GUIDE.md) +* [Ecosystem](https://github.com/axios/axios/blob/master/ECOSYSTEM.md) +* [Contributing Guide](https://github.com/axios/axios/blob/master/CONTRIBUTING.md) +* [Code of Conduct](https://github.com/axios/axios/blob/master/CODE_OF_CONDUCT.md) + +## Credits + +axios is heavily inspired by the [$http service](https://docs.angularjs.org/api/ng/service/$http) provided in [AngularJS](https://angularjs.org/). Ultimately axios is an effort to provide a standalone `$http`-like service for use outside of AngularJS. + +## License + +[MIT](LICENSE) diff --git a/test/node_modules/axios/SECURITY.md b/test/node_modules/axios/SECURITY.md new file mode 100644 index 0000000..353df9a --- /dev/null +++ b/test/node_modules/axios/SECURITY.md @@ -0,0 +1,5 @@ +# Security Policy + +## Reporting a Vulnerability + +Please report security issues to jasonsaayman@gmail.com diff --git a/test/node_modules/axios/UPGRADE_GUIDE.md b/test/node_modules/axios/UPGRADE_GUIDE.md new file mode 100644 index 0000000..fdcff1a --- /dev/null +++ b/test/node_modules/axios/UPGRADE_GUIDE.md @@ -0,0 +1,168 @@ +# Upgrade Guide + +### 0.18.x -> 0.19.0 + +#### HTTPS Proxies + +Routing through an https proxy now requires setting the `protocol` attribute of the proxy configuration to `https` + +### 0.15.x -> 0.16.0 + +#### `Promise` Type Declarations + +The `Promise` type declarations have been removed from the axios typings in favor of the built-in type declarations. If you use axios in a TypeScript project that targets `ES5`, please make sure to include the `es2015.promise` lib. Please see [this post](https://blog.mariusschulz.com/2016/11/25/typescript-2-0-built-in-type-declarations) for details. + +### 0.13.x -> 0.14.0 + +#### TypeScript Definitions + +The axios TypeScript definitions have been updated to match the axios API and use the ES2015 module syntax. + +Please use the following `import` statement to import axios in TypeScript: + +```typescript +import axios from 'axios'; + +axios.get('/foo') + .then(response => console.log(response)) + .catch(error => console.log(error)); +``` + +#### `agent` Config Option + +The `agent` config option has been replaced with two new options: `httpAgent` and `httpsAgent`. Please use them instead. + +```js +{ + // Define a custom agent for HTTP + httpAgent: new http.Agent({ keepAlive: true }), + // Define a custom agent for HTTPS + httpsAgent: new https.Agent({ keepAlive: true }) +} +``` + +#### `progress` Config Option + +The `progress` config option has been replaced with the `onUploadProgress` and `onDownloadProgress` options. + +```js +{ + // Define a handler for upload progress events + onUploadProgress: function (progressEvent) { + // ... + }, + + // Define a handler for download progress events + onDownloadProgress: function (progressEvent) { + // ... + } +} +``` + +### 0.12.x -> 0.13.0 + +The `0.13.0` release contains several changes to custom adapters and error handling. + +#### Error Handling + +Previous to this release an error could either be a server response with bad status code or an actual `Error`. With this release Promise will always reject with an `Error`. In the case that a response was received, the `Error` will also include the response. + +```js +axios.get('/user/12345') + .catch((error) => { + console.log(error.message); + console.log(error.code); // Not always specified + console.log(error.config); // The config that was used to make the request + console.log(error.response); // Only available if response was received from the server + }); +``` + +#### Request Adapters + +This release changes a few things about how request adapters work. Please take note if you are using your own custom adapter. + +1. Response transformer is now called outside of adapter. +2. Request adapter returns a `Promise`. + +This means that you no longer need to invoke `transformData` on response data. You will also no longer receive `resolve` and `reject` as arguments in your adapter. + +Previous code: + +```js +function myAdapter(resolve, reject, config) { + var response = { + data: transformData( + responseData, + responseHeaders, + config.transformResponse + ), + status: request.status, + statusText: request.statusText, + headers: responseHeaders + }; + settle(resolve, reject, response); +} +``` + +New code: + +```js +function myAdapter(config) { + return new Promise(function (resolve, reject) { + var response = { + data: responseData, + status: request.status, + statusText: request.statusText, + headers: responseHeaders + }; + settle(resolve, reject, response); + }); +} +``` + +See the related commits for more details: +- [Response transformers](https://github.com/axios/axios/commit/10eb23865101f9347570552c04e9d6211376e25e) +- [Request adapter Promise](https://github.com/axios/axios/commit/157efd5615890301824e3121cc6c9d2f9b21f94a) + +### 0.5.x -> 0.6.0 + +The `0.6.0` release contains mostly bug fixes, but there are a couple things to be aware of when upgrading. + +#### ES6 Promise Polyfill + +Up until the `0.6.0` release ES6 `Promise` was being polyfilled using [es6-promise](https://github.com/jakearchibald/es6-promise). With this release, the polyfill has been removed, and you will need to supply it yourself if your environment needs it. + +```js +require('es6-promise').polyfill(); +var axios = require('axios'); +``` + +This will polyfill the global environment, and only needs to be done once. + +#### `axios.success`/`axios.error` + +The `success`, and `error` aliases were deprecated in [0.4.0](https://github.com/axios/axios/blob/master/CHANGELOG.md#040-oct-03-2014). As of this release they have been removed entirely. Instead please use `axios.then`, and `axios.catch` respectively. + +```js +axios.get('some/url') + .then(function (res) { + /* ... */ + }) + .catch(function (err) { + /* ... */ + }); +``` + +#### UMD + +Previous versions of axios shipped with an AMD, CommonJS, and Global build. This has all been rolled into a single UMD build. + +```js +// AMD +require(['bower_components/axios/dist/axios'], function (axios) { + /* ... */ +}); + +// CommonJS +var axios = require('axios/dist/axios'); +``` diff --git a/test/node_modules/axios/dist/axios.js b/test/node_modules/axios/dist/axios.js new file mode 100644 index 0000000..e78f7ca --- /dev/null +++ b/test/node_modules/axios/dist/axios.js @@ -0,0 +1,2293 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["axios"] = factory(); + else + root["axios"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "./index.js"); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "./index.js": +/*!******************!*\ + !*** ./index.js ***! + \******************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(/*! ./lib/axios */ "./lib/axios.js"); + +/***/ }), + +/***/ "./lib/adapters/xhr.js": +/*!*****************************!*\ + !*** ./lib/adapters/xhr.js ***! + \*****************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js"); +var settle = __webpack_require__(/*! ./../core/settle */ "./lib/core/settle.js"); +var cookies = __webpack_require__(/*! ./../helpers/cookies */ "./lib/helpers/cookies.js"); +var buildURL = __webpack_require__(/*! ./../helpers/buildURL */ "./lib/helpers/buildURL.js"); +var buildFullPath = __webpack_require__(/*! ../core/buildFullPath */ "./lib/core/buildFullPath.js"); +var parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ "./lib/helpers/parseHeaders.js"); +var isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ "./lib/helpers/isURLSameOrigin.js"); +var createError = __webpack_require__(/*! ../core/createError */ "./lib/core/createError.js"); +var transitionalDefaults = __webpack_require__(/*! ../defaults/transitional */ "./lib/defaults/transitional.js"); +var Cancel = __webpack_require__(/*! ../cancel/Cancel */ "./lib/cancel/Cancel.js"); + +module.exports = function xhrAdapter(config) { + return new Promise(function dispatchXhrRequest(resolve, reject) { + var requestData = config.data; + var requestHeaders = config.headers; + var responseType = config.responseType; + var onCanceled; + function done() { + if (config.cancelToken) { + config.cancelToken.unsubscribe(onCanceled); + } + + if (config.signal) { + config.signal.removeEventListener('abort', onCanceled); + } + } + + if (utils.isFormData(requestData)) { + delete requestHeaders['Content-Type']; // Let the browser set it + } + + var request = new XMLHttpRequest(); + + // HTTP basic authentication + if (config.auth) { + var username = config.auth.username || ''; + var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : ''; + requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); + } + + var fullPath = buildFullPath(config.baseURL, config.url); + request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true); + + // Set the request timeout in MS + request.timeout = config.timeout; + + function onloadend() { + if (!request) { + return; + } + // Prepare the response + var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; + var responseData = !responseType || responseType === 'text' || responseType === 'json' ? + request.responseText : request.response; + var response = { + data: responseData, + status: request.status, + statusText: request.statusText, + headers: responseHeaders, + config: config, + request: request + }; + + settle(function _resolve(value) { + resolve(value); + done(); + }, function _reject(err) { + reject(err); + done(); + }, response); + + // Clean up request + request = null; + } + + if ('onloadend' in request) { + // Use onloadend if available + request.onloadend = onloadend; + } else { + // Listen for ready state to emulate onloadend + request.onreadystatechange = function handleLoad() { + if (!request || request.readyState !== 4) { + return; + } + + // The request errored out and we didn't get a response, this will be + // handled by onerror instead + // With one exception: request that using file: protocol, most browsers + // will return status as 0 even though it's a successful request + if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { + return; + } + // readystate handler is calling before onerror or ontimeout handlers, + // so we should call onloadend on the next 'tick' + setTimeout(onloadend); + }; + } + + // Handle browser request cancellation (as opposed to a manual cancellation) + request.onabort = function handleAbort() { + if (!request) { + return; + } + + reject(createError('Request aborted', config, 'ECONNABORTED', request)); + + // Clean up request + request = null; + }; + + // Handle low level network errors + request.onerror = function handleError() { + // Real errors are hidden from us by the browser + // onerror should only fire if it's a network error + reject(createError('Network Error', config, null, request)); + + // Clean up request + request = null; + }; + + // Handle timeout + request.ontimeout = function handleTimeout() { + var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded'; + var transitional = config.transitional || transitionalDefaults; + if (config.timeoutErrorMessage) { + timeoutErrorMessage = config.timeoutErrorMessage; + } + reject(createError( + timeoutErrorMessage, + config, + transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED', + request)); + + // Clean up request + request = null; + }; + + // Add xsrf header + // This is only done if running in a standard browser environment. + // Specifically not if we're in a web worker, or react-native. + if (utils.isStandardBrowserEnv()) { + // Add xsrf header + var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? + cookies.read(config.xsrfCookieName) : + undefined; + + if (xsrfValue) { + requestHeaders[config.xsrfHeaderName] = xsrfValue; + } + } + + // Add headers to the request + if ('setRequestHeader' in request) { + utils.forEach(requestHeaders, function setRequestHeader(val, key) { + if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { + // Remove Content-Type if data is undefined + delete requestHeaders[key]; + } else { + // Otherwise add header to the request + request.setRequestHeader(key, val); + } + }); + } + + // Add withCredentials to request if needed + if (!utils.isUndefined(config.withCredentials)) { + request.withCredentials = !!config.withCredentials; + } + + // Add responseType to request if needed + if (responseType && responseType !== 'json') { + request.responseType = config.responseType; + } + + // Handle progress if needed + if (typeof config.onDownloadProgress === 'function') { + request.addEventListener('progress', config.onDownloadProgress); + } + + // Not all browsers support upload events + if (typeof config.onUploadProgress === 'function' && request.upload) { + request.upload.addEventListener('progress', config.onUploadProgress); + } + + if (config.cancelToken || config.signal) { + // Handle cancellation + // eslint-disable-next-line func-names + onCanceled = function(cancel) { + if (!request) { + return; + } + reject(!cancel || (cancel && cancel.type) ? new Cancel('canceled') : cancel); + request.abort(); + request = null; + }; + + config.cancelToken && config.cancelToken.subscribe(onCanceled); + if (config.signal) { + config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled); + } + } + + if (!requestData) { + requestData = null; + } + + // Send the request + request.send(requestData); + }); +}; + + +/***/ }), + +/***/ "./lib/axios.js": +/*!**********************!*\ + !*** ./lib/axios.js ***! + \**********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(/*! ./utils */ "./lib/utils.js"); +var bind = __webpack_require__(/*! ./helpers/bind */ "./lib/helpers/bind.js"); +var Axios = __webpack_require__(/*! ./core/Axios */ "./lib/core/Axios.js"); +var mergeConfig = __webpack_require__(/*! ./core/mergeConfig */ "./lib/core/mergeConfig.js"); +var defaults = __webpack_require__(/*! ./defaults */ "./lib/defaults/index.js"); + +/** + * Create an instance of Axios + * + * @param {Object} defaultConfig The default config for the instance + * @return {Axios} A new instance of Axios + */ +function createInstance(defaultConfig) { + var context = new Axios(defaultConfig); + var instance = bind(Axios.prototype.request, context); + + // Copy axios.prototype to instance + utils.extend(instance, Axios.prototype, context); + + // Copy context to instance + utils.extend(instance, context); + + // Factory for creating new instances + instance.create = function create(instanceConfig) { + return createInstance(mergeConfig(defaultConfig, instanceConfig)); + }; + + return instance; +} + +// Create the default instance to be exported +var axios = createInstance(defaults); + +// Expose Axios class to allow class inheritance +axios.Axios = Axios; + +// Expose Cancel & CancelToken +axios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ "./lib/cancel/Cancel.js"); +axios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ "./lib/cancel/CancelToken.js"); +axios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ "./lib/cancel/isCancel.js"); +axios.VERSION = __webpack_require__(/*! ./env/data */ "./lib/env/data.js").version; + +// Expose all/spread +axios.all = function all(promises) { + return Promise.all(promises); +}; +axios.spread = __webpack_require__(/*! ./helpers/spread */ "./lib/helpers/spread.js"); + +// Expose isAxiosError +axios.isAxiosError = __webpack_require__(/*! ./helpers/isAxiosError */ "./lib/helpers/isAxiosError.js"); + +module.exports = axios; + +// Allow use of default import syntax in TypeScript +module.exports.default = axios; + + +/***/ }), + +/***/ "./lib/cancel/Cancel.js": +/*!******************************!*\ + !*** ./lib/cancel/Cancel.js ***! + \******************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * A `Cancel` is an object that is thrown when an operation is canceled. + * + * @class + * @param {string=} message The message. + */ +function Cancel(message) { + this.message = message; +} + +Cancel.prototype.toString = function toString() { + return 'Cancel' + (this.message ? ': ' + this.message : ''); +}; + +Cancel.prototype.__CANCEL__ = true; + +module.exports = Cancel; + + +/***/ }), + +/***/ "./lib/cancel/CancelToken.js": +/*!***********************************!*\ + !*** ./lib/cancel/CancelToken.js ***! + \***********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var Cancel = __webpack_require__(/*! ./Cancel */ "./lib/cancel/Cancel.js"); + +/** + * A `CancelToken` is an object that can be used to request cancellation of an operation. + * + * @class + * @param {Function} executor The executor function. + */ +function CancelToken(executor) { + if (typeof executor !== 'function') { + throw new TypeError('executor must be a function.'); + } + + var resolvePromise; + + this.promise = new Promise(function promiseExecutor(resolve) { + resolvePromise = resolve; + }); + + var token = this; + + // eslint-disable-next-line func-names + this.promise.then(function(cancel) { + if (!token._listeners) return; + + var i; + var l = token._listeners.length; + + for (i = 0; i < l; i++) { + token._listeners[i](cancel); + } + token._listeners = null; + }); + + // eslint-disable-next-line func-names + this.promise.then = function(onfulfilled) { + var _resolve; + // eslint-disable-next-line func-names + var promise = new Promise(function(resolve) { + token.subscribe(resolve); + _resolve = resolve; + }).then(onfulfilled); + + promise.cancel = function reject() { + token.unsubscribe(_resolve); + }; + + return promise; + }; + + executor(function cancel(message) { + if (token.reason) { + // Cancellation has already been requested + return; + } + + token.reason = new Cancel(message); + resolvePromise(token.reason); + }); +} + +/** + * Throws a `Cancel` if cancellation has been requested. + */ +CancelToken.prototype.throwIfRequested = function throwIfRequested() { + if (this.reason) { + throw this.reason; + } +}; + +/** + * Subscribe to the cancel signal + */ + +CancelToken.prototype.subscribe = function subscribe(listener) { + if (this.reason) { + listener(this.reason); + return; + } + + if (this._listeners) { + this._listeners.push(listener); + } else { + this._listeners = [listener]; + } +}; + +/** + * Unsubscribe from the cancel signal + */ + +CancelToken.prototype.unsubscribe = function unsubscribe(listener) { + if (!this._listeners) { + return; + } + var index = this._listeners.indexOf(listener); + if (index !== -1) { + this._listeners.splice(index, 1); + } +}; + +/** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ +CancelToken.source = function source() { + var cancel; + var token = new CancelToken(function executor(c) { + cancel = c; + }); + return { + token: token, + cancel: cancel + }; +}; + +module.exports = CancelToken; + + +/***/ }), + +/***/ "./lib/cancel/isCancel.js": +/*!********************************!*\ + !*** ./lib/cancel/isCancel.js ***! + \********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = function isCancel(value) { + return !!(value && value.__CANCEL__); +}; + + +/***/ }), + +/***/ "./lib/core/Axios.js": +/*!***************************!*\ + !*** ./lib/core/Axios.js ***! + \***************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js"); +var buildURL = __webpack_require__(/*! ../helpers/buildURL */ "./lib/helpers/buildURL.js"); +var InterceptorManager = __webpack_require__(/*! ./InterceptorManager */ "./lib/core/InterceptorManager.js"); +var dispatchRequest = __webpack_require__(/*! ./dispatchRequest */ "./lib/core/dispatchRequest.js"); +var mergeConfig = __webpack_require__(/*! ./mergeConfig */ "./lib/core/mergeConfig.js"); +var validator = __webpack_require__(/*! ../helpers/validator */ "./lib/helpers/validator.js"); + +var validators = validator.validators; +/** + * Create a new instance of Axios + * + * @param {Object} instanceConfig The default config for the instance + */ +function Axios(instanceConfig) { + this.defaults = instanceConfig; + this.interceptors = { + request: new InterceptorManager(), + response: new InterceptorManager() + }; +} + +/** + * Dispatch a request + * + * @param {Object} config The config specific for this request (merged with this.defaults) + */ +Axios.prototype.request = function request(configOrUrl, config) { + /*eslint no-param-reassign:0*/ + // Allow for axios('example/url'[, config]) a la fetch API + if (typeof configOrUrl === 'string') { + config = config || {}; + config.url = configOrUrl; + } else { + config = configOrUrl || {}; + } + + config = mergeConfig(this.defaults, config); + + // Set config.method + if (config.method) { + config.method = config.method.toLowerCase(); + } else if (this.defaults.method) { + config.method = this.defaults.method.toLowerCase(); + } else { + config.method = 'get'; + } + + var transitional = config.transitional; + + if (transitional !== undefined) { + validator.assertOptions(transitional, { + silentJSONParsing: validators.transitional(validators.boolean), + forcedJSONParsing: validators.transitional(validators.boolean), + clarifyTimeoutError: validators.transitional(validators.boolean) + }, false); + } + + // filter out skipped interceptors + var requestInterceptorChain = []; + var synchronousRequestInterceptors = true; + this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { + if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { + return; + } + + synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; + + requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); + }); + + var responseInterceptorChain = []; + this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { + responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + }); + + var promise; + + if (!synchronousRequestInterceptors) { + var chain = [dispatchRequest, undefined]; + + Array.prototype.unshift.apply(chain, requestInterceptorChain); + chain = chain.concat(responseInterceptorChain); + + promise = Promise.resolve(config); + while (chain.length) { + promise = promise.then(chain.shift(), chain.shift()); + } + + return promise; + } + + + var newConfig = config; + while (requestInterceptorChain.length) { + var onFulfilled = requestInterceptorChain.shift(); + var onRejected = requestInterceptorChain.shift(); + try { + newConfig = onFulfilled(newConfig); + } catch (error) { + onRejected(error); + break; + } + } + + try { + promise = dispatchRequest(newConfig); + } catch (error) { + return Promise.reject(error); + } + + while (responseInterceptorChain.length) { + promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift()); + } + + return promise; +}; + +Axios.prototype.getUri = function getUri(config) { + config = mergeConfig(this.defaults, config); + return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, ''); +}; + +// Provide aliases for supported request methods +utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = function(url, config) { + return this.request(mergeConfig(config || {}, { + method: method, + url: url, + data: (config || {}).data + })); + }; +}); + +utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = function(url, data, config) { + return this.request(mergeConfig(config || {}, { + method: method, + url: url, + data: data + })); + }; +}); + +module.exports = Axios; + + +/***/ }), + +/***/ "./lib/core/InterceptorManager.js": +/*!****************************************!*\ + !*** ./lib/core/InterceptorManager.js ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js"); + +function InterceptorManager() { + this.handlers = []; +} + +/** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * + * @return {Number} An ID used to remove interceptor later + */ +InterceptorManager.prototype.use = function use(fulfilled, rejected, options) { + this.handlers.push({ + fulfilled: fulfilled, + rejected: rejected, + synchronous: options ? options.synchronous : false, + runWhen: options ? options.runWhen : null + }); + return this.handlers.length - 1; +}; + +/** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + */ +InterceptorManager.prototype.eject = function eject(id) { + if (this.handlers[id]) { + this.handlers[id] = null; + } +}; + +/** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + */ +InterceptorManager.prototype.forEach = function forEach(fn) { + utils.forEach(this.handlers, function forEachHandler(h) { + if (h !== null) { + fn(h); + } + }); +}; + +module.exports = InterceptorManager; + + +/***/ }), + +/***/ "./lib/core/buildFullPath.js": +/*!***********************************!*\ + !*** ./lib/core/buildFullPath.js ***! + \***********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var isAbsoluteURL = __webpack_require__(/*! ../helpers/isAbsoluteURL */ "./lib/helpers/isAbsoluteURL.js"); +var combineURLs = __webpack_require__(/*! ../helpers/combineURLs */ "./lib/helpers/combineURLs.js"); + +/** + * Creates a new URL by combining the baseURL with the requestedURL, + * only when the requestedURL is not already an absolute URL. + * If the requestURL is absolute, this function returns the requestedURL untouched. + * + * @param {string} baseURL The base URL + * @param {string} requestedURL Absolute or relative URL to combine + * @returns {string} The combined full path + */ +module.exports = function buildFullPath(baseURL, requestedURL) { + if (baseURL && !isAbsoluteURL(requestedURL)) { + return combineURLs(baseURL, requestedURL); + } + return requestedURL; +}; + + +/***/ }), + +/***/ "./lib/core/createError.js": +/*!*********************************!*\ + !*** ./lib/core/createError.js ***! + \*********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var enhanceError = __webpack_require__(/*! ./enhanceError */ "./lib/core/enhanceError.js"); + +/** + * Create an Error with the specified message, config, error code, request and response. + * + * @param {string} message The error message. + * @param {Object} config The config. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * @returns {Error} The created error. + */ +module.exports = function createError(message, config, code, request, response) { + var error = new Error(message); + return enhanceError(error, config, code, request, response); +}; + + +/***/ }), + +/***/ "./lib/core/dispatchRequest.js": +/*!*************************************!*\ + !*** ./lib/core/dispatchRequest.js ***! + \*************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js"); +var transformData = __webpack_require__(/*! ./transformData */ "./lib/core/transformData.js"); +var isCancel = __webpack_require__(/*! ../cancel/isCancel */ "./lib/cancel/isCancel.js"); +var defaults = __webpack_require__(/*! ../defaults */ "./lib/defaults/index.js"); +var Cancel = __webpack_require__(/*! ../cancel/Cancel */ "./lib/cancel/Cancel.js"); + +/** + * Throws a `Cancel` if cancellation has been requested. + */ +function throwIfCancellationRequested(config) { + if (config.cancelToken) { + config.cancelToken.throwIfRequested(); + } + + if (config.signal && config.signal.aborted) { + throw new Cancel('canceled'); + } +} + +/** + * Dispatch a request to the server using the configured adapter. + * + * @param {object} config The config that is to be used for the request + * @returns {Promise} The Promise to be fulfilled + */ +module.exports = function dispatchRequest(config) { + throwIfCancellationRequested(config); + + // Ensure headers exist + config.headers = config.headers || {}; + + // Transform request data + config.data = transformData.call( + config, + config.data, + config.headers, + config.transformRequest + ); + + // Flatten headers + config.headers = utils.merge( + config.headers.common || {}, + config.headers[config.method] || {}, + config.headers + ); + + utils.forEach( + ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], + function cleanHeaderConfig(method) { + delete config.headers[method]; + } + ); + + var adapter = config.adapter || defaults.adapter; + + return adapter(config).then(function onAdapterResolution(response) { + throwIfCancellationRequested(config); + + // Transform response data + response.data = transformData.call( + config, + response.data, + response.headers, + config.transformResponse + ); + + return response; + }, function onAdapterRejection(reason) { + if (!isCancel(reason)) { + throwIfCancellationRequested(config); + + // Transform response data + if (reason && reason.response) { + reason.response.data = transformData.call( + config, + reason.response.data, + reason.response.headers, + config.transformResponse + ); + } + } + + return Promise.reject(reason); + }); +}; + + +/***/ }), + +/***/ "./lib/core/enhanceError.js": +/*!**********************************!*\ + !*** ./lib/core/enhanceError.js ***! + \**********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Update an Error with the specified config, error code, and response. + * + * @param {Error} error The error to update. + * @param {Object} config The config. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * @returns {Error} The error. + */ +module.exports = function enhanceError(error, config, code, request, response) { + error.config = config; + if (code) { + error.code = code; + } + + error.request = request; + error.response = response; + error.isAxiosError = true; + + error.toJSON = function toJSON() { + return { + // Standard + message: this.message, + name: this.name, + // Microsoft + description: this.description, + number: this.number, + // Mozilla + fileName: this.fileName, + lineNumber: this.lineNumber, + columnNumber: this.columnNumber, + stack: this.stack, + // Axios + config: this.config, + code: this.code, + status: this.response && this.response.status ? this.response.status : null + }; + }; + return error; +}; + + +/***/ }), + +/***/ "./lib/core/mergeConfig.js": +/*!*********************************!*\ + !*** ./lib/core/mergeConfig.js ***! + \*********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(/*! ../utils */ "./lib/utils.js"); + +/** + * Config-specific merge-function which creates a new config-object + * by merging two configuration objects together. + * + * @param {Object} config1 + * @param {Object} config2 + * @returns {Object} New object resulting from merging config2 to config1 + */ +module.exports = function mergeConfig(config1, config2) { + // eslint-disable-next-line no-param-reassign + config2 = config2 || {}; + var config = {}; + + function getMergedValue(target, source) { + if (utils.isPlainObject(target) && utils.isPlainObject(source)) { + return utils.merge(target, source); + } else if (utils.isPlainObject(source)) { + return utils.merge({}, source); + } else if (utils.isArray(source)) { + return source.slice(); + } + return source; + } + + // eslint-disable-next-line consistent-return + function mergeDeepProperties(prop) { + if (!utils.isUndefined(config2[prop])) { + return getMergedValue(config1[prop], config2[prop]); + } else if (!utils.isUndefined(config1[prop])) { + return getMergedValue(undefined, config1[prop]); + } + } + + // eslint-disable-next-line consistent-return + function valueFromConfig2(prop) { + if (!utils.isUndefined(config2[prop])) { + return getMergedValue(undefined, config2[prop]); + } + } + + // eslint-disable-next-line consistent-return + function defaultToConfig2(prop) { + if (!utils.isUndefined(config2[prop])) { + return getMergedValue(undefined, config2[prop]); + } else if (!utils.isUndefined(config1[prop])) { + return getMergedValue(undefined, config1[prop]); + } + } + + // eslint-disable-next-line consistent-return + function mergeDirectKeys(prop) { + if (prop in config2) { + return getMergedValue(config1[prop], config2[prop]); + } else if (prop in config1) { + return getMergedValue(undefined, config1[prop]); + } + } + + var mergeMap = { + 'url': valueFromConfig2, + 'method': valueFromConfig2, + 'data': valueFromConfig2, + 'baseURL': defaultToConfig2, + 'transformRequest': defaultToConfig2, + 'transformResponse': defaultToConfig2, + 'paramsSerializer': defaultToConfig2, + 'timeout': defaultToConfig2, + 'timeoutMessage': defaultToConfig2, + 'withCredentials': defaultToConfig2, + 'adapter': defaultToConfig2, + 'responseType': defaultToConfig2, + 'xsrfCookieName': defaultToConfig2, + 'xsrfHeaderName': defaultToConfig2, + 'onUploadProgress': defaultToConfig2, + 'onDownloadProgress': defaultToConfig2, + 'decompress': defaultToConfig2, + 'maxContentLength': defaultToConfig2, + 'maxBodyLength': defaultToConfig2, + 'transport': defaultToConfig2, + 'httpAgent': defaultToConfig2, + 'httpsAgent': defaultToConfig2, + 'cancelToken': defaultToConfig2, + 'socketPath': defaultToConfig2, + 'responseEncoding': defaultToConfig2, + 'validateStatus': mergeDirectKeys + }; + + utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) { + var merge = mergeMap[prop] || mergeDeepProperties; + var configValue = merge(prop); + (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue); + }); + + return config; +}; + + +/***/ }), + +/***/ "./lib/core/settle.js": +/*!****************************!*\ + !*** ./lib/core/settle.js ***! + \****************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var createError = __webpack_require__(/*! ./createError */ "./lib/core/createError.js"); + +/** + * Resolve or reject a Promise based on response status. + * + * @param {Function} resolve A function that resolves the promise. + * @param {Function} reject A function that rejects the promise. + * @param {object} response The response. + */ +module.exports = function settle(resolve, reject, response) { + var validateStatus = response.config.validateStatus; + if (!response.status || !validateStatus || validateStatus(response.status)) { + resolve(response); + } else { + reject(createError( + 'Request failed with status code ' + response.status, + response.config, + null, + response.request, + response + )); + } +}; + + +/***/ }), + +/***/ "./lib/core/transformData.js": +/*!***********************************!*\ + !*** ./lib/core/transformData.js ***! + \***********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js"); +var defaults = __webpack_require__(/*! ../defaults */ "./lib/defaults/index.js"); + +/** + * Transform the data for a request or a response + * + * @param {Object|String} data The data to be transformed + * @param {Array} headers The headers for the request or response + * @param {Array|Function} fns A single function or Array of functions + * @returns {*} The resulting transformed data + */ +module.exports = function transformData(data, headers, fns) { + var context = this || defaults; + /*eslint no-param-reassign:0*/ + utils.forEach(fns, function transform(fn) { + data = fn.call(context, data, headers); + }); + + return data; +}; + + +/***/ }), + +/***/ "./lib/defaults/index.js": +/*!*******************************!*\ + !*** ./lib/defaults/index.js ***! + \*******************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(/*! ../utils */ "./lib/utils.js"); +var normalizeHeaderName = __webpack_require__(/*! ../helpers/normalizeHeaderName */ "./lib/helpers/normalizeHeaderName.js"); +var enhanceError = __webpack_require__(/*! ../core/enhanceError */ "./lib/core/enhanceError.js"); +var transitionalDefaults = __webpack_require__(/*! ./transitional */ "./lib/defaults/transitional.js"); + +var DEFAULT_CONTENT_TYPE = { + 'Content-Type': 'application/x-www-form-urlencoded' +}; + +function setContentTypeIfUnset(headers, value) { + if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { + headers['Content-Type'] = value; + } +} + +function getDefaultAdapter() { + var adapter; + if (typeof XMLHttpRequest !== 'undefined') { + // For browsers use XHR adapter + adapter = __webpack_require__(/*! ../adapters/xhr */ "./lib/adapters/xhr.js"); + } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') { + // For node use HTTP adapter + adapter = __webpack_require__(/*! ../adapters/http */ "./lib/adapters/xhr.js"); + } + return adapter; +} + +function stringifySafely(rawValue, parser, encoder) { + if (utils.isString(rawValue)) { + try { + (parser || JSON.parse)(rawValue); + return utils.trim(rawValue); + } catch (e) { + if (e.name !== 'SyntaxError') { + throw e; + } + } + } + + return (encoder || JSON.stringify)(rawValue); +} + +var defaults = { + + transitional: transitionalDefaults, + + adapter: getDefaultAdapter(), + + transformRequest: [function transformRequest(data, headers) { + normalizeHeaderName(headers, 'Accept'); + normalizeHeaderName(headers, 'Content-Type'); + + if (utils.isFormData(data) || + utils.isArrayBuffer(data) || + utils.isBuffer(data) || + utils.isStream(data) || + utils.isFile(data) || + utils.isBlob(data) + ) { + return data; + } + if (utils.isArrayBufferView(data)) { + return data.buffer; + } + if (utils.isURLSearchParams(data)) { + setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); + return data.toString(); + } + if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) { + setContentTypeIfUnset(headers, 'application/json'); + return stringifySafely(data); + } + return data; + }], + + transformResponse: [function transformResponse(data) { + var transitional = this.transitional || defaults.transitional; + var silentJSONParsing = transitional && transitional.silentJSONParsing; + var forcedJSONParsing = transitional && transitional.forcedJSONParsing; + var strictJSONParsing = !silentJSONParsing && this.responseType === 'json'; + + if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) { + try { + return JSON.parse(data); + } catch (e) { + if (strictJSONParsing) { + if (e.name === 'SyntaxError') { + throw enhanceError(e, this, 'E_JSON_PARSE'); + } + throw e; + } + } + } + + return data; + }], + + /** + * A timeout in milliseconds to abort a request. If set to 0 (default) a + * timeout is not created. + */ + timeout: 0, + + xsrfCookieName: 'XSRF-TOKEN', + xsrfHeaderName: 'X-XSRF-TOKEN', + + maxContentLength: -1, + maxBodyLength: -1, + + validateStatus: function validateStatus(status) { + return status >= 200 && status < 300; + }, + + headers: { + common: { + 'Accept': 'application/json, text/plain, */*' + } + } +}; + +utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { + defaults.headers[method] = {}; +}); + +utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { + defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); +}); + +module.exports = defaults; + + +/***/ }), + +/***/ "./lib/defaults/transitional.js": +/*!**************************************!*\ + !*** ./lib/defaults/transitional.js ***! + \**************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = { + silentJSONParsing: true, + forcedJSONParsing: true, + clarifyTimeoutError: false +}; + + +/***/ }), + +/***/ "./lib/env/data.js": +/*!*************************!*\ + !*** ./lib/env/data.js ***! + \*************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = { + "version": "0.26.1" +}; + +/***/ }), + +/***/ "./lib/helpers/bind.js": +/*!*****************************!*\ + !*** ./lib/helpers/bind.js ***! + \*****************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = function bind(fn, thisArg) { + return function wrap() { + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + return fn.apply(thisArg, args); + }; +}; + + +/***/ }), + +/***/ "./lib/helpers/buildURL.js": +/*!*********************************!*\ + !*** ./lib/helpers/buildURL.js ***! + \*********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js"); + +function encode(val) { + return encodeURIComponent(val). + replace(/%3A/gi, ':'). + replace(/%24/g, '$'). + replace(/%2C/gi, ','). + replace(/%20/g, '+'). + replace(/%5B/gi, '['). + replace(/%5D/gi, ']'); +} + +/** + * Build a URL by appending params to the end + * + * @param {string} url The base of the url (e.g., http://www.google.com) + * @param {object} [params] The params to be appended + * @returns {string} The formatted url + */ +module.exports = function buildURL(url, params, paramsSerializer) { + /*eslint no-param-reassign:0*/ + if (!params) { + return url; + } + + var serializedParams; + if (paramsSerializer) { + serializedParams = paramsSerializer(params); + } else if (utils.isURLSearchParams(params)) { + serializedParams = params.toString(); + } else { + var parts = []; + + utils.forEach(params, function serialize(val, key) { + if (val === null || typeof val === 'undefined') { + return; + } + + if (utils.isArray(val)) { + key = key + '[]'; + } else { + val = [val]; + } + + utils.forEach(val, function parseValue(v) { + if (utils.isDate(v)) { + v = v.toISOString(); + } else if (utils.isObject(v)) { + v = JSON.stringify(v); + } + parts.push(encode(key) + '=' + encode(v)); + }); + }); + + serializedParams = parts.join('&'); + } + + if (serializedParams) { + var hashmarkIndex = url.indexOf('#'); + if (hashmarkIndex !== -1) { + url = url.slice(0, hashmarkIndex); + } + + url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; + } + + return url; +}; + + +/***/ }), + +/***/ "./lib/helpers/combineURLs.js": +/*!************************************!*\ + !*** ./lib/helpers/combineURLs.js ***! + \************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Creates a new URL by combining the specified URLs + * + * @param {string} baseURL The base URL + * @param {string} relativeURL The relative URL + * @returns {string} The combined URL + */ +module.exports = function combineURLs(baseURL, relativeURL) { + return relativeURL + ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') + : baseURL; +}; + + +/***/ }), + +/***/ "./lib/helpers/cookies.js": +/*!********************************!*\ + !*** ./lib/helpers/cookies.js ***! + \********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js"); + +module.exports = ( + utils.isStandardBrowserEnv() ? + + // Standard browser envs support document.cookie + (function standardBrowserEnv() { + return { + write: function write(name, value, expires, path, domain, secure) { + var cookie = []; + cookie.push(name + '=' + encodeURIComponent(value)); + + if (utils.isNumber(expires)) { + cookie.push('expires=' + new Date(expires).toGMTString()); + } + + if (utils.isString(path)) { + cookie.push('path=' + path); + } + + if (utils.isString(domain)) { + cookie.push('domain=' + domain); + } + + if (secure === true) { + cookie.push('secure'); + } + + document.cookie = cookie.join('; '); + }, + + read: function read(name) { + var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); + return (match ? decodeURIComponent(match[3]) : null); + }, + + remove: function remove(name) { + this.write(name, '', Date.now() - 86400000); + } + }; + })() : + + // Non standard browser env (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { + return { + write: function write() {}, + read: function read() { return null; }, + remove: function remove() {} + }; + })() +); + + +/***/ }), + +/***/ "./lib/helpers/isAbsoluteURL.js": +/*!**************************************!*\ + !*** ./lib/helpers/isAbsoluteURL.js ***! + \**************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Determines whether the specified URL is absolute + * + * @param {string} url The URL to test + * @returns {boolean} True if the specified URL is absolute, otherwise false + */ +module.exports = function isAbsoluteURL(url) { + // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). + // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed + // by any combination of letters, digits, plus, period, or hyphen. + return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); +}; + + +/***/ }), + +/***/ "./lib/helpers/isAxiosError.js": +/*!*************************************!*\ + !*** ./lib/helpers/isAxiosError.js ***! + \*************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js"); + +/** + * Determines whether the payload is an error thrown by Axios + * + * @param {*} payload The value to test + * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false + */ +module.exports = function isAxiosError(payload) { + return utils.isObject(payload) && (payload.isAxiosError === true); +}; + + +/***/ }), + +/***/ "./lib/helpers/isURLSameOrigin.js": +/*!****************************************!*\ + !*** ./lib/helpers/isURLSameOrigin.js ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js"); + +module.exports = ( + utils.isStandardBrowserEnv() ? + + // Standard browser envs have full support of the APIs needed to test + // whether the request URL is of the same origin as current location. + (function standardBrowserEnv() { + var msie = /(msie|trident)/i.test(navigator.userAgent); + var urlParsingNode = document.createElement('a'); + var originURL; + + /** + * Parse a URL to discover it's components + * + * @param {String} url The URL to be parsed + * @returns {Object} + */ + function resolveURL(url) { + var href = url; + + if (msie) { + // IE needs attribute set twice to normalize properties + urlParsingNode.setAttribute('href', href); + href = urlParsingNode.href; + } + + urlParsingNode.setAttribute('href', href); + + // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils + return { + href: urlParsingNode.href, + protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', + host: urlParsingNode.host, + search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', + hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', + hostname: urlParsingNode.hostname, + port: urlParsingNode.port, + pathname: (urlParsingNode.pathname.charAt(0) === '/') ? + urlParsingNode.pathname : + '/' + urlParsingNode.pathname + }; + } + + originURL = resolveURL(window.location.href); + + /** + * Determine if a URL shares the same origin as the current location + * + * @param {String} requestURL The URL to test + * @returns {boolean} True if URL shares the same origin, otherwise false + */ + return function isURLSameOrigin(requestURL) { + var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; + return (parsed.protocol === originURL.protocol && + parsed.host === originURL.host); + }; + })() : + + // Non standard browser envs (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { + return function isURLSameOrigin() { + return true; + }; + })() +); + + +/***/ }), + +/***/ "./lib/helpers/normalizeHeaderName.js": +/*!********************************************!*\ + !*** ./lib/helpers/normalizeHeaderName.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(/*! ../utils */ "./lib/utils.js"); + +module.exports = function normalizeHeaderName(headers, normalizedName) { + utils.forEach(headers, function processHeader(value, name) { + if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { + headers[normalizedName] = value; + delete headers[name]; + } + }); +}; + + +/***/ }), + +/***/ "./lib/helpers/parseHeaders.js": +/*!*************************************!*\ + !*** ./lib/helpers/parseHeaders.js ***! + \*************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(/*! ./../utils */ "./lib/utils.js"); + +// Headers whose duplicates are ignored by node +// c.f. https://nodejs.org/api/http.html#http_message_headers +var ignoreDuplicateOf = [ + 'age', 'authorization', 'content-length', 'content-type', 'etag', + 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', + 'last-modified', 'location', 'max-forwards', 'proxy-authorization', + 'referer', 'retry-after', 'user-agent' +]; + +/** + * Parse headers into an object + * + * ``` + * Date: Wed, 27 Aug 2014 08:58:49 GMT + * Content-Type: application/json + * Connection: keep-alive + * Transfer-Encoding: chunked + * ``` + * + * @param {String} headers Headers needing to be parsed + * @returns {Object} Headers parsed into an object + */ +module.exports = function parseHeaders(headers) { + var parsed = {}; + var key; + var val; + var i; + + if (!headers) { return parsed; } + + utils.forEach(headers.split('\n'), function parser(line) { + i = line.indexOf(':'); + key = utils.trim(line.substr(0, i)).toLowerCase(); + val = utils.trim(line.substr(i + 1)); + + if (key) { + if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) { + return; + } + if (key === 'set-cookie') { + parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]); + } else { + parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; + } + } + }); + + return parsed; +}; + + +/***/ }), + +/***/ "./lib/helpers/spread.js": +/*!*******************************!*\ + !*** ./lib/helpers/spread.js ***! + \*******************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Syntactic sugar for invoking a function and expanding an array for arguments. + * + * Common use case would be to use `Function.prototype.apply`. + * + * ```js + * function f(x, y, z) {} + * var args = [1, 2, 3]; + * f.apply(null, args); + * ``` + * + * With `spread` this example can be re-written. + * + * ```js + * spread(function(x, y, z) {})([1, 2, 3]); + * ``` + * + * @param {Function} callback + * @returns {Function} + */ +module.exports = function spread(callback) { + return function wrap(arr) { + return callback.apply(null, arr); + }; +}; + + +/***/ }), + +/***/ "./lib/helpers/validator.js": +/*!**********************************!*\ + !*** ./lib/helpers/validator.js ***! + \**********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var VERSION = __webpack_require__(/*! ../env/data */ "./lib/env/data.js").version; + +var validators = {}; + +// eslint-disable-next-line func-names +['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) { + validators[type] = function validator(thing) { + return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; + }; +}); + +var deprecatedWarnings = {}; + +/** + * Transitional option validator + * @param {function|boolean?} validator - set to false if the transitional option has been removed + * @param {string?} version - deprecated version / removed since version + * @param {string?} message - some message with additional info + * @returns {function} + */ +validators.transitional = function transitional(validator, version, message) { + function formatMessage(opt, desc) { + return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : ''); + } + + // eslint-disable-next-line func-names + return function(value, opt, opts) { + if (validator === false) { + throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : ''))); + } + + if (version && !deprecatedWarnings[opt]) { + deprecatedWarnings[opt] = true; + // eslint-disable-next-line no-console + console.warn( + formatMessage( + opt, + ' has been deprecated since v' + version + ' and will be removed in the near future' + ) + ); + } + + return validator ? validator(value, opt, opts) : true; + }; +}; + +/** + * Assert object's properties type + * @param {object} options + * @param {object} schema + * @param {boolean?} allowUnknown + */ + +function assertOptions(options, schema, allowUnknown) { + if (typeof options !== 'object') { + throw new TypeError('options must be an object'); + } + var keys = Object.keys(options); + var i = keys.length; + while (i-- > 0) { + var opt = keys[i]; + var validator = schema[opt]; + if (validator) { + var value = options[opt]; + var result = value === undefined || validator(value, opt, options); + if (result !== true) { + throw new TypeError('option ' + opt + ' must be ' + result); + } + continue; + } + if (allowUnknown !== true) { + throw Error('Unknown option ' + opt); + } + } +} + +module.exports = { + assertOptions: assertOptions, + validators: validators +}; + + +/***/ }), + +/***/ "./lib/utils.js": +/*!**********************!*\ + !*** ./lib/utils.js ***! + \**********************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(/*! ./helpers/bind */ "./lib/helpers/bind.js"); + +// utils is a library of generic helper functions non-specific to axios + +var toString = Object.prototype.toString; + +/** + * Determine if a value is an Array + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an Array, otherwise false + */ +function isArray(val) { + return Array.isArray(val); +} + +/** + * Determine if a value is undefined + * + * @param {Object} val The value to test + * @returns {boolean} True if the value is undefined, otherwise false + */ +function isUndefined(val) { + return typeof val === 'undefined'; +} + +/** + * Determine if a value is a Buffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Buffer, otherwise false + */ +function isBuffer(val) { + return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) + && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val); +} + +/** + * Determine if a value is an ArrayBuffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an ArrayBuffer, otherwise false + */ +function isArrayBuffer(val) { + return toString.call(val) === '[object ArrayBuffer]'; +} + +/** + * Determine if a value is a FormData + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an FormData, otherwise false + */ +function isFormData(val) { + return toString.call(val) === '[object FormData]'; +} + +/** + * Determine if a value is a view on an ArrayBuffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false + */ +function isArrayBufferView(val) { + var result; + if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { + result = ArrayBuffer.isView(val); + } else { + result = (val) && (val.buffer) && (isArrayBuffer(val.buffer)); + } + return result; +} + +/** + * Determine if a value is a String + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a String, otherwise false + */ +function isString(val) { + return typeof val === 'string'; +} + +/** + * Determine if a value is a Number + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Number, otherwise false + */ +function isNumber(val) { + return typeof val === 'number'; +} + +/** + * Determine if a value is an Object + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an Object, otherwise false + */ +function isObject(val) { + return val !== null && typeof val === 'object'; +} + +/** + * Determine if a value is a plain Object + * + * @param {Object} val The value to test + * @return {boolean} True if value is a plain Object, otherwise false + */ +function isPlainObject(val) { + if (toString.call(val) !== '[object Object]') { + return false; + } + + var prototype = Object.getPrototypeOf(val); + return prototype === null || prototype === Object.prototype; +} + +/** + * Determine if a value is a Date + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Date, otherwise false + */ +function isDate(val) { + return toString.call(val) === '[object Date]'; +} + +/** + * Determine if a value is a File + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a File, otherwise false + */ +function isFile(val) { + return toString.call(val) === '[object File]'; +} + +/** + * Determine if a value is a Blob + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Blob, otherwise false + */ +function isBlob(val) { + return toString.call(val) === '[object Blob]'; +} + +/** + * Determine if a value is a Function + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Function, otherwise false + */ +function isFunction(val) { + return toString.call(val) === '[object Function]'; +} + +/** + * Determine if a value is a Stream + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Stream, otherwise false + */ +function isStream(val) { + return isObject(val) && isFunction(val.pipe); +} + +/** + * Determine if a value is a URLSearchParams object + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a URLSearchParams object, otherwise false + */ +function isURLSearchParams(val) { + return toString.call(val) === '[object URLSearchParams]'; +} + +/** + * Trim excess whitespace off the beginning and end of a string + * + * @param {String} str The String to trim + * @returns {String} The String freed of excess whitespace + */ +function trim(str) { + return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, ''); +} + +/** + * Determine if we're running in a standard browser environment + * + * This allows axios to run in a web worker, and react-native. + * Both environments support XMLHttpRequest, but not fully standard globals. + * + * web workers: + * typeof window -> undefined + * typeof document -> undefined + * + * react-native: + * navigator.product -> 'ReactNative' + * nativescript + * navigator.product -> 'NativeScript' or 'NS' + */ +function isStandardBrowserEnv() { + if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || + navigator.product === 'NativeScript' || + navigator.product === 'NS')) { + return false; + } + return ( + typeof window !== 'undefined' && + typeof document !== 'undefined' + ); +} + +/** + * Iterate over an Array or an Object invoking a function for each item. + * + * If `obj` is an Array callback will be called passing + * the value, index, and complete array for each item. + * + * If 'obj' is an Object callback will be called passing + * the value, key, and complete object for each property. + * + * @param {Object|Array} obj The object to iterate + * @param {Function} fn The callback to invoke for each item + */ +function forEach(obj, fn) { + // Don't bother if no value provided + if (obj === null || typeof obj === 'undefined') { + return; + } + + // Force an array if not already something iterable + if (typeof obj !== 'object') { + /*eslint no-param-reassign:0*/ + obj = [obj]; + } + + if (isArray(obj)) { + // Iterate over array values + for (var i = 0, l = obj.length; i < l; i++) { + fn.call(null, obj[i], i, obj); + } + } else { + // Iterate over object keys + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + fn.call(null, obj[key], key, obj); + } + } + } +} + +/** + * Accepts varargs expecting each argument to be an object, then + * immutably merges the properties of each object and returns result. + * + * When multiple objects contain the same key the later object in + * the arguments list will take precedence. + * + * Example: + * + * ```js + * var result = merge({foo: 123}, {foo: 456}); + * console.log(result.foo); // outputs 456 + * ``` + * + * @param {Object} obj1 Object to merge + * @returns {Object} Result of all merge properties + */ +function merge(/* obj1, obj2, obj3, ... */) { + var result = {}; + function assignValue(val, key) { + if (isPlainObject(result[key]) && isPlainObject(val)) { + result[key] = merge(result[key], val); + } else if (isPlainObject(val)) { + result[key] = merge({}, val); + } else if (isArray(val)) { + result[key] = val.slice(); + } else { + result[key] = val; + } + } + + for (var i = 0, l = arguments.length; i < l; i++) { + forEach(arguments[i], assignValue); + } + return result; +} + +/** + * Extends object a by mutably adding to it the properties of object b. + * + * @param {Object} a The object to be extended + * @param {Object} b The object to copy properties from + * @param {Object} thisArg The object to bind function to + * @return {Object} The resulting value of object a + */ +function extend(a, b, thisArg) { + forEach(b, function assignValue(val, key) { + if (thisArg && typeof val === 'function') { + a[key] = bind(val, thisArg); + } else { + a[key] = val; + } + }); + return a; +} + +/** + * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) + * + * @param {string} content with BOM + * @return {string} content value without BOM + */ +function stripBOM(content) { + if (content.charCodeAt(0) === 0xFEFF) { + content = content.slice(1); + } + return content; +} + +module.exports = { + isArray: isArray, + isArrayBuffer: isArrayBuffer, + isBuffer: isBuffer, + isFormData: isFormData, + isArrayBufferView: isArrayBufferView, + isString: isString, + isNumber: isNumber, + isObject: isObject, + isPlainObject: isPlainObject, + isUndefined: isUndefined, + isDate: isDate, + isFile: isFile, + isBlob: isBlob, + isFunction: isFunction, + isStream: isStream, + isURLSearchParams: isURLSearchParams, + isStandardBrowserEnv: isStandardBrowserEnv, + forEach: forEach, + merge: merge, + extend: extend, + trim: trim, + stripBOM: stripBOM +}; + + +/***/ }) + +/******/ }); +}); +//# sourceMappingURL=axios.map \ No newline at end of file diff --git a/test/node_modules/axios/dist/axios.map b/test/node_modules/axios/dist/axios.map new file mode 100644 index 0000000..f0beb46 --- /dev/null +++ b/test/node_modules/axios/dist/axios.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://axios/webpack/universalModuleDefinition","webpack://axios/webpack/bootstrap","webpack://axios/./index.js","webpack://axios/./lib/adapters/xhr.js","webpack://axios/./lib/axios.js","webpack://axios/./lib/cancel/Cancel.js","webpack://axios/./lib/cancel/CancelToken.js","webpack://axios/./lib/cancel/isCancel.js","webpack://axios/./lib/core/Axios.js","webpack://axios/./lib/core/InterceptorManager.js","webpack://axios/./lib/core/buildFullPath.js","webpack://axios/./lib/core/createError.js","webpack://axios/./lib/core/dispatchRequest.js","webpack://axios/./lib/core/enhanceError.js","webpack://axios/./lib/core/mergeConfig.js","webpack://axios/./lib/core/settle.js","webpack://axios/./lib/core/transformData.js","webpack://axios/./lib/defaults/index.js","webpack://axios/./lib/defaults/transitional.js","webpack://axios/./lib/env/data.js","webpack://axios/./lib/helpers/bind.js","webpack://axios/./lib/helpers/buildURL.js","webpack://axios/./lib/helpers/combineURLs.js","webpack://axios/./lib/helpers/cookies.js","webpack://axios/./lib/helpers/isAbsoluteURL.js","webpack://axios/./lib/helpers/isAxiosError.js","webpack://axios/./lib/helpers/isURLSameOrigin.js","webpack://axios/./lib/helpers/normalizeHeaderName.js","webpack://axios/./lib/helpers/parseHeaders.js","webpack://axios/./lib/helpers/spread.js","webpack://axios/./lib/helpers/validator.js","webpack://axios/./lib/utils.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;AClFA,iBAAiB,mBAAO,CAAC,mCAAa,E;;;;;;;;;;;;ACAzB;;AAEb,YAAY,mBAAO,CAAC,kCAAY;AAChC,aAAa,mBAAO,CAAC,8CAAkB;AACvC,cAAc,mBAAO,CAAC,sDAAsB;AAC5C,eAAe,mBAAO,CAAC,wDAAuB;AAC9C,oBAAoB,mBAAO,CAAC,0DAAuB;AACnD,mBAAmB,mBAAO,CAAC,gEAA2B;AACtD,sBAAsB,mBAAO,CAAC,sEAA8B;AAC5D,kBAAkB,mBAAO,CAAC,sDAAqB;AAC/C,2BAA2B,mBAAO,CAAC,gEAA0B;AAC7D,aAAa,mBAAO,CAAC,gDAAkB;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,4CAA4C;AAC5C;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;ACnNa;;AAEb,YAAY,mBAAO,CAAC,+BAAS;AAC7B,WAAW,mBAAO,CAAC,6CAAgB;AACnC,YAAY,mBAAO,CAAC,yCAAc;AAClC,kBAAkB,mBAAO,CAAC,qDAAoB;AAC9C,eAAe,mBAAO,CAAC,2CAAY;;AAEnC;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA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AACjD,kBAAkB,mBAAO,CAAC,gDAAe;AACzC,gBAAgB,mBAAO,CAAC,wDAAsB;;AAE9C;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA,yBAAyB;AACzB,KAAK;AACL;AACA,CAAC;;AAED;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;;AAED;;;;;;;;;;;;;ACnJa;;AAEb,YAAY,mBAAO,CAAC,kCAAY;;AAEhC;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;;;;;;;;;;;;ACrDa;;AAEb,oBAAoB,mBAAO,CAAC,gEAA0B;AACtD,kBAAkB,mBAAO,CAAC,4DAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnBa;;AAEb,mBAAmB,mBAAO,CAAC,kDAAgB;;AAE3C;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACjBa;;AAEb,YAAY,mBAAO,CAAC,kCAAY;AAChC,oBAAoB,mBAAO,CAAC,oDAAiB;AAC7C,eAAe,mBAAO,CAAC,oDAAoB;AAC3C,eAAe,mBAAO,CAAC,4CAAa;AACpC,aAAa,mBAAO,CAAC,gDAAkB;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+BAA+B;AAC/B,uCAAuC;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;;;;;;;;;;;;ACtFa;;AAEb;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1Ca;;AAEb,YAAY,mBAAO,CAAC,gCAAU;;AAE9B;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,2BAA2B;AAC3B,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;;;;;;;;;;;;AClGa;;AAEb,kBAAkB,mBAAO,CAAC,gDAAe;;AAEzC;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxBa;;AAEb,YAAY,mBAAO,CAAC,kCAAY;AAChC,eAAe,mBAAO,CAAC,4CAAa;;AAEpC;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,MAAM;AACjB,WAAW,eAAe;AAC1B,aAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;;;;;;;;;;;;ACrBa;;AAEb,YAAY,mBAAO,CAAC,gCAAU;AAC9B,0BAA0B,mBAAO,CAAC,4EAAgC;AAClE,mBAAmB,mBAAO,CAAC,wDAAsB;AACjD,2BAA2B,mBAAO,CAAC,sDAAgB;;AAEnD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,mBAAO,CAAC,8CAAiB;AACvC,GAAG;AACH;AACA,cAAc,mBAAO,CAAC,+CAAkB;AACxC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;;;;;;;;;;;;;AClIa;;AAEb;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACNA;AACA;AACA,E;;;;;;;;;;;;ACFa;;AAEb;AACA;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACVa;;AAEb,YAAY,mBAAO,CAAC,kCAAY;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;ACrEa;;AAEb;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACba;;AAEb,YAAY,mBAAO,CAAC,kCAAY;;AAEhC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,0CAA0C;AAC1C,SAAS;;AAET;AACA,4DAA4D,wBAAwB;AACpF;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,kCAAkC;AAClC,+BAA+B,aAAa,EAAE;AAC9C;AACA;AACA,KAAK;AACL;;;;;;;;;;;;;ACpDa;;AAEb;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACba;;AAEb,YAAY,mBAAO,CAAC,kCAAY;;AAEhC;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;;;;;;;;;;;;ACZa;;AAEb,YAAY,mBAAO,CAAC,kCAAY;;AAEhC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;;;;;;;;;;;;ACnEa;;AAEb,YAAY,mBAAO,CAAC,gCAAU;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;ACXa;;AAEb,YAAY,mBAAO,CAAC,kCAAY;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,eAAe;;AAEhC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;;AAEH;AACA;;;;;;;;;;;;;ACpDa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA,WAAW,SAAS;AACpB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1Ba;;AAEb,cAAc,mBAAO,CAAC,sCAAa;;AAEnC;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;ACjFa;;AAEb,WAAW,mBAAO,CAAC,6CAAgB;;AAEnC;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC,OAAO;AAC1C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS,GAAG,SAAS;AAC5C,2BAA2B;AAC3B;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,4BAA4B;AAC5B,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;;AAEA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"axios.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"axios\"] = factory();\n\telse\n\t\troot[\"axios\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./index.js\");\n","module.exports = require('./lib/axios');","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\nvar transitionalDefaults = require('../defaults/transitional');\nvar Cancel = require('../cancel/Cancel');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n var responseType = config.responseType;\n var onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n var transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(\n timeoutErrorMessage,\n config,\n transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = function(cancel) {\n if (!request) {\n return;\n }\n reject(!cancel || (cancel && cancel.type) ? new Cancel('canceled') : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\naxios.VERSION = require('./env/data').version;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\n// Expose isAxiosError\naxios.isAxiosError = require('./helpers/isAxiosError');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(function(cancel) {\n if (!token._listeners) return;\n\n var i;\n var l = token._listeners.length;\n\n for (i = 0; i < l; i++) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = function(onfulfilled) {\n var _resolve;\n // eslint-disable-next-line func-names\n var promise = new Promise(function(resolve) {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Subscribe to the cancel signal\n */\n\nCancelToken.prototype.subscribe = function subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n};\n\n/**\n * Unsubscribe from the cancel signal\n */\n\nCancelToken.prototype.unsubscribe = function unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n var index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\nvar validator = require('../helpers/validator');\n\nvar validators = validator.validators;\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n var transitional = config.transitional;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n // filter out skipped interceptors\n var requestInterceptorChain = [];\n var synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n var responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n var promise;\n\n if (!synchronousRequestInterceptors) {\n var chain = [dispatchRequest, undefined];\n\n Array.prototype.unshift.apply(chain, requestInterceptorChain);\n chain = chain.concat(responseInterceptorChain);\n\n promise = Promise.resolve(config);\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n }\n\n\n var newConfig = config;\n while (requestInterceptorChain.length) {\n var onFulfilled = requestInterceptorChain.shift();\n var onRejected = requestInterceptorChain.shift();\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected(error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest(newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n while (responseInterceptorChain.length) {\n promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\nvar Cancel = require('../cancel/Cancel');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new Cancel('canceled');\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n };\n return error;\n};\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(undefined, config2[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(prop) {\n if (prop in config2) {\n return getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n var mergeMap = {\n 'url': valueFromConfig2,\n 'method': valueFromConfig2,\n 'data': valueFromConfig2,\n 'baseURL': defaultToConfig2,\n 'transformRequest': defaultToConfig2,\n 'transformResponse': defaultToConfig2,\n 'paramsSerializer': defaultToConfig2,\n 'timeout': defaultToConfig2,\n 'timeoutMessage': defaultToConfig2,\n 'withCredentials': defaultToConfig2,\n 'adapter': defaultToConfig2,\n 'responseType': defaultToConfig2,\n 'xsrfCookieName': defaultToConfig2,\n 'xsrfHeaderName': defaultToConfig2,\n 'onUploadProgress': defaultToConfig2,\n 'onDownloadProgress': defaultToConfig2,\n 'decompress': defaultToConfig2,\n 'maxContentLength': defaultToConfig2,\n 'maxBodyLength': defaultToConfig2,\n 'transport': defaultToConfig2,\n 'httpAgent': defaultToConfig2,\n 'httpsAgent': defaultToConfig2,\n 'cancelToken': defaultToConfig2,\n 'socketPath': defaultToConfig2,\n 'responseEncoding': defaultToConfig2,\n 'validateStatus': mergeDirectKeys\n };\n\n utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {\n var merge = mergeMap[prop] || mergeDeepProperties;\n var configValue = merge(prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar defaults = require('../defaults');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n var context = this || defaults;\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn.call(context, data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar normalizeHeaderName = require('../helpers/normalizeHeaderName');\nvar enhanceError = require('../core/enhanceError');\nvar transitionalDefaults = require('./transitional');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('../adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('../adapters/http');\n }\n return adapter;\n}\n\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nvar defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {\n setContentTypeIfUnset(headers, 'application/json');\n return stringifySafely(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n var transitional = this.transitional || defaults.transitional;\n var silentJSONParsing = transitional && transitional.silentJSONParsing;\n var forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';\n\n if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw enhanceError(e, this, 'E_JSON_PARSE');\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nmodule.exports = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","module.exports = {\n \"version\": \"0.26.1\"\n};","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\nvar VERSION = require('../env/data').version;\n\nvar validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nvar deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return function(value, opt, opts) {\n if (validator === false) {\n throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')));\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n var keys = Object.keys(options);\n var i = keys.length;\n while (i-- > 0) {\n var opt = keys[i];\n var validator = schema[opt];\n if (validator) {\n var value = options[opt];\n var result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new TypeError('option ' + opt + ' must be ' + result);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw Error('Unknown option ' + opt);\n }\n }\n}\n\nmodule.exports = {\n assertOptions: assertOptions,\n validators: validators\n};\n","'use strict';\n\nvar bind = require('./helpers/bind');\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return Array.isArray(val);\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return toString.call(val) === '[object FormData]';\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return toString.call(val) === '[object URLSearchParams]';\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n"],"sourceRoot":""} \ No newline at end of file diff --git a/test/node_modules/axios/dist/axios.min.js b/test/node_modules/axios/dist/axios.min.js new file mode 100644 index 0000000..1ed7cf3 --- /dev/null +++ b/test/node_modules/axios/dist/axios.min.js @@ -0,0 +1,2 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.axios=t():e.axios=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=12)}([function(e,t,n){"use strict";var r=n(3),o=Object.prototype.toString;function i(e){return Array.isArray(e)}function s(e){return void 0===e}function a(e){return"[object ArrayBuffer]"===o.call(e)}function u(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function f(e){return"[object Function]"===o.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;n=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){f.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){f.headers[e]=r.merge(a)})),e.exports=f},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([n]):s[t]?s[t]+", "+n:n}})),s):s}},function(e,t,n){"use strict";var r=n(0);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(11).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var i={};o.transitional=function(e,t,n){function o(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,s){if(!1===e)throw new Error(o(r," has been removed"+(t?" in "+t:"")));return t&&!i[r]&&(i[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],s=t[i];if(s){var a=e[i],u=void 0===a||s(a,i,e);if(!0!==u)throw new TypeError("option "+i+" must be "+u)}else if(!0!==n)throw Error("Unknown option "+i)}},validators:o}},function(e,t,n){"use strict";var r=n(1);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nvar utils = require('../utils');\nvar normalizeHeaderName = require('../helpers/normalizeHeaderName');\nvar enhanceError = require('../core/enhanceError');\nvar transitionalDefaults = require('./transitional');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('../adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('../adapters/http');\n }\n return adapter;\n}\n\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nvar defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {\n setContentTypeIfUnset(headers, 'application/json');\n return stringifySafely(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n var transitional = this.transitional || defaults.transitional;\n var silentJSONParsing = transitional && transitional.silentJSONParsing;\n var forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';\n\n if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw enhanceError(e, this, 'E_JSON_PARSE');\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n };\n return error;\n};\n","'use strict';\n\nmodule.exports = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\nvar transitionalDefaults = require('../defaults/transitional');\nvar Cancel = require('../cancel/Cancel');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n var responseType = config.responseType;\n var onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n var transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(\n timeoutErrorMessage,\n config,\n transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = function(cancel) {\n if (!request) {\n return;\n }\n reject(!cancel || (cancel && cancel.type) ? new Cancel('canceled') : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(undefined, config2[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(prop) {\n if (prop in config2) {\n return getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n var mergeMap = {\n 'url': valueFromConfig2,\n 'method': valueFromConfig2,\n 'data': valueFromConfig2,\n 'baseURL': defaultToConfig2,\n 'transformRequest': defaultToConfig2,\n 'transformResponse': defaultToConfig2,\n 'paramsSerializer': defaultToConfig2,\n 'timeout': defaultToConfig2,\n 'timeoutMessage': defaultToConfig2,\n 'withCredentials': defaultToConfig2,\n 'adapter': defaultToConfig2,\n 'responseType': defaultToConfig2,\n 'xsrfCookieName': defaultToConfig2,\n 'xsrfHeaderName': defaultToConfig2,\n 'onUploadProgress': defaultToConfig2,\n 'onDownloadProgress': defaultToConfig2,\n 'decompress': defaultToConfig2,\n 'maxContentLength': defaultToConfig2,\n 'maxBodyLength': defaultToConfig2,\n 'transport': defaultToConfig2,\n 'httpAgent': defaultToConfig2,\n 'httpsAgent': defaultToConfig2,\n 'cancelToken': defaultToConfig2,\n 'socketPath': defaultToConfig2,\n 'responseEncoding': defaultToConfig2,\n 'validateStatus': mergeDirectKeys\n };\n\n utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {\n var merge = mergeMap[prop] || mergeDeepProperties;\n var configValue = merge(prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n};\n","module.exports = {\n \"version\": \"0.26.1\"\n};","module.exports = require('./lib/axios');","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\naxios.VERSION = require('./env/data').version;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\n// Expose isAxiosError\naxios.isAxiosError = require('./helpers/isAxiosError');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\nvar validator = require('../helpers/validator');\n\nvar validators = validator.validators;\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n var transitional = config.transitional;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n // filter out skipped interceptors\n var requestInterceptorChain = [];\n var synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n var responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n var promise;\n\n if (!synchronousRequestInterceptors) {\n var chain = [dispatchRequest, undefined];\n\n Array.prototype.unshift.apply(chain, requestInterceptorChain);\n chain = chain.concat(responseInterceptorChain);\n\n promise = Promise.resolve(config);\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n }\n\n\n var newConfig = config;\n while (requestInterceptorChain.length) {\n var onFulfilled = requestInterceptorChain.shift();\n var onRejected = requestInterceptorChain.shift();\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected(error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest(newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n while (responseInterceptorChain.length) {\n promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\nvar Cancel = require('../cancel/Cancel');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new Cancel('canceled');\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar defaults = require('../defaults');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n var context = this || defaults;\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn.call(context, data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar VERSION = require('../env/data').version;\n\nvar validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nvar deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return function(value, opt, opts) {\n if (validator === false) {\n throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')));\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n var keys = Object.keys(options);\n var i = keys.length;\n while (i-- > 0) {\n var opt = keys[i];\n var validator = schema[opt];\n if (validator) {\n var value = options[opt];\n var result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new TypeError('option ' + opt + ' must be ' + result);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw Error('Unknown option ' + opt);\n }\n }\n}\n\nmodule.exports = {\n assertOptions: assertOptions,\n validators: validators\n};\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(function(cancel) {\n if (!token._listeners) return;\n\n var i;\n var l = token._listeners.length;\n\n for (i = 0; i < l; i++) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = function(onfulfilled) {\n var _resolve;\n // eslint-disable-next-line func-names\n var promise = new Promise(function(resolve) {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Subscribe to the cancel signal\n */\n\nCancelToken.prototype.subscribe = function subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n};\n\n/**\n * Unsubscribe from the cancel signal\n */\n\nCancelToken.prototype.unsubscribe = function unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n var index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n};\n"],"sourceRoot":""} \ No newline at end of file diff --git a/test/node_modules/axios/index.d.ts b/test/node_modules/axios/index.d.ts new file mode 100644 index 0000000..b681915 --- /dev/null +++ b/test/node_modules/axios/index.d.ts @@ -0,0 +1,221 @@ +// TypeScript Version: 3.0 + +export type AxiosRequestHeaders = Record; + +export type AxiosResponseHeaders = Record & { + "set-cookie"?: string[] +}; + +export interface AxiosRequestTransformer { + (data: any, headers?: AxiosRequestHeaders): any; +} + +export interface AxiosResponseTransformer { + (data: any, headers?: AxiosResponseHeaders): any; +} + +export interface AxiosAdapter { + (config: AxiosRequestConfig): AxiosPromise; +} + +export interface AxiosBasicCredentials { + username: string; + password: string; +} + +export interface AxiosProxyConfig { + host: string; + port: number; + auth?: { + username: string; + password: string; + }; + protocol?: string; +} + +export type Method = + | 'get' | 'GET' + | 'delete' | 'DELETE' + | 'head' | 'HEAD' + | 'options' | 'OPTIONS' + | 'post' | 'POST' + | 'put' | 'PUT' + | 'patch' | 'PATCH' + | 'purge' | 'PURGE' + | 'link' | 'LINK' + | 'unlink' | 'UNLINK'; + +export type ResponseType = + | 'arraybuffer' + | 'blob' + | 'document' + | 'json' + | 'text' + | 'stream'; + + export type responseEncoding = + | 'ascii' | 'ASCII' + | 'ansi' | 'ANSI' + | 'binary' | 'BINARY' + | 'base64' | 'BASE64' + | 'base64url' | 'BASE64URL' + | 'hex' | 'HEX' + | 'latin1' | 'LATIN1' + | 'ucs-2' | 'UCS-2' + | 'ucs2' | 'UCS2' + | 'utf-8' | 'UTF-8' + | 'utf8' | 'UTF8' + | 'utf16le' | 'UTF16LE'; + +export interface TransitionalOptions { + silentJSONParsing?: boolean; + forcedJSONParsing?: boolean; + clarifyTimeoutError?: boolean; +} + +export interface AxiosRequestConfig { + url?: string; + method?: Method; + baseURL?: string; + transformRequest?: AxiosRequestTransformer | AxiosRequestTransformer[]; + transformResponse?: AxiosResponseTransformer | AxiosResponseTransformer[]; + headers?: AxiosRequestHeaders; + params?: any; + paramsSerializer?: (params: any) => string; + data?: D; + timeout?: number; + timeoutErrorMessage?: string; + withCredentials?: boolean; + adapter?: AxiosAdapter; + auth?: AxiosBasicCredentials; + responseType?: ResponseType; + responseEncoding?: responseEncoding | string; + xsrfCookieName?: string; + xsrfHeaderName?: string; + onUploadProgress?: (progressEvent: any) => void; + onDownloadProgress?: (progressEvent: any) => void; + maxContentLength?: number; + validateStatus?: ((status: number) => boolean) | null; + maxBodyLength?: number; + maxRedirects?: number; + socketPath?: string | null; + httpAgent?: any; + httpsAgent?: any; + proxy?: AxiosProxyConfig | false; + cancelToken?: CancelToken; + decompress?: boolean; + transitional?: TransitionalOptions; + signal?: AbortSignal; + insecureHTTPParser?: boolean; +} + +export interface HeadersDefaults { + common: AxiosRequestHeaders; + delete: AxiosRequestHeaders; + get: AxiosRequestHeaders; + head: AxiosRequestHeaders; + post: AxiosRequestHeaders; + put: AxiosRequestHeaders; + patch: AxiosRequestHeaders; + options?: AxiosRequestHeaders; + purge?: AxiosRequestHeaders; + link?: AxiosRequestHeaders; + unlink?: AxiosRequestHeaders; +} + +export interface AxiosDefaults extends Omit, 'headers'> { + headers: HeadersDefaults; +} + +export interface AxiosResponse { + data: T; + status: number; + statusText: string; + headers: AxiosResponseHeaders; + config: AxiosRequestConfig; + request?: any; +} + +export interface AxiosError extends Error { + config: AxiosRequestConfig; + code?: string; + request?: any; + response?: AxiosResponse; + isAxiosError: boolean; + toJSON: () => object; +} + +export interface AxiosPromise extends Promise> { +} + +export interface CancelStatic { + new (message?: string): Cancel; +} + +export interface Cancel { + message: string | undefined; +} + +export interface Canceler { + (message?: string): void; +} + +export interface CancelTokenStatic { + new (executor: (cancel: Canceler) => void): CancelToken; + source(): CancelTokenSource; +} + +export interface CancelToken { + promise: Promise; + reason?: Cancel; + throwIfRequested(): void; +} + +export interface CancelTokenSource { + token: CancelToken; + cancel: Canceler; +} + +export interface AxiosInterceptorManager { + use(onFulfilled?: (value: V) => T | Promise, onRejected?: (error: any) => any): number; + eject(id: number): void; +} + +export class Axios { + constructor(config?: AxiosRequestConfig); + defaults: AxiosDefaults; + interceptors: { + request: AxiosInterceptorManager; + response: AxiosInterceptorManager; + }; + getUri(config?: AxiosRequestConfig): string; + request, D = any>(config: AxiosRequestConfig): Promise; + get, D = any>(url: string, config?: AxiosRequestConfig): Promise; + delete, D = any>(url: string, config?: AxiosRequestConfig): Promise; + head, D = any>(url: string, config?: AxiosRequestConfig): Promise; + options, D = any>(url: string, config?: AxiosRequestConfig): Promise; + post, D = any>(url: string, data?: D, config?: AxiosRequestConfig): Promise; + put, D = any>(url: string, data?: D, config?: AxiosRequestConfig): Promise; + patch, D = any>(url: string, data?: D, config?: AxiosRequestConfig): Promise; +} + +export interface AxiosInstance extends Axios { + (config: AxiosRequestConfig): AxiosPromise; + (url: string, config?: AxiosRequestConfig): AxiosPromise; +} + +export interface AxiosStatic extends AxiosInstance { + create(config?: AxiosRequestConfig): AxiosInstance; + Cancel: CancelStatic; + CancelToken: CancelTokenStatic; + Axios: typeof Axios; + readonly VERSION: string; + isCancel(value: any): boolean; + all(values: Array>): Promise; + spread(callback: (...args: T[]) => R): (array: T[]) => R; + isAxiosError(payload: any): payload is AxiosError; +} + +declare const axios: AxiosStatic; + +export default axios; diff --git a/test/node_modules/axios/index.js b/test/node_modules/axios/index.js new file mode 100644 index 0000000..79dfd09 --- /dev/null +++ b/test/node_modules/axios/index.js @@ -0,0 +1 @@ +module.exports = require('./lib/axios'); \ No newline at end of file diff --git a/test/node_modules/axios/lib/adapters/README.md b/test/node_modules/axios/lib/adapters/README.md new file mode 100644 index 0000000..68f1118 --- /dev/null +++ b/test/node_modules/axios/lib/adapters/README.md @@ -0,0 +1,37 @@ +# axios // adapters + +The modules under `adapters/` are modules that handle dispatching a request and settling a returned `Promise` once a response is received. + +## Example + +```js +var settle = require('./../core/settle'); + +module.exports = function myAdapter(config) { + // At this point: + // - config has been merged with defaults + // - request transformers have already run + // - request interceptors have already run + + // Make the request using config provided + // Upon response settle the Promise + + return new Promise(function(resolve, reject) { + + var response = { + data: responseData, + status: request.status, + statusText: request.statusText, + headers: responseHeaders, + config: config, + request: request + }; + + settle(resolve, reject, response); + + // From here: + // - response transformers will run + // - response interceptors will run + }); +} +``` diff --git a/test/node_modules/axios/lib/adapters/http.js b/test/node_modules/axios/lib/adapters/http.js new file mode 100755 index 0000000..28317c1 --- /dev/null +++ b/test/node_modules/axios/lib/adapters/http.js @@ -0,0 +1,404 @@ +'use strict'; + +var utils = require('./../utils'); +var settle = require('./../core/settle'); +var buildFullPath = require('../core/buildFullPath'); +var buildURL = require('./../helpers/buildURL'); +var http = require('http'); +var https = require('https'); +var httpFollow = require('follow-redirects').http; +var httpsFollow = require('follow-redirects').https; +var url = require('url'); +var zlib = require('zlib'); +var VERSION = require('./../env/data').version; +var createError = require('../core/createError'); +var enhanceError = require('../core/enhanceError'); +var transitionalDefaults = require('../defaults/transitional'); +var Cancel = require('../cancel/Cancel'); + +var isHttps = /https:?/; + +/** + * + * @param {http.ClientRequestArgs} options + * @param {AxiosProxyConfig} proxy + * @param {string} location + */ +function setProxy(options, proxy, location) { + options.hostname = proxy.host; + options.host = proxy.host; + options.port = proxy.port; + options.path = location; + + // Basic proxy authorization + if (proxy.auth) { + var base64 = Buffer.from(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64'); + options.headers['Proxy-Authorization'] = 'Basic ' + base64; + } + + // If a proxy is used, any redirects must also pass through the proxy + options.beforeRedirect = function beforeRedirect(redirection) { + redirection.headers.host = redirection.host; + setProxy(redirection, proxy, redirection.href); + }; +} + +/*eslint consistent-return:0*/ +module.exports = function httpAdapter(config) { + return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) { + var onCanceled; + function done() { + if (config.cancelToken) { + config.cancelToken.unsubscribe(onCanceled); + } + + if (config.signal) { + config.signal.removeEventListener('abort', onCanceled); + } + } + var resolve = function resolve(value) { + done(); + resolvePromise(value); + }; + var rejected = false; + var reject = function reject(value) { + done(); + rejected = true; + rejectPromise(value); + }; + var data = config.data; + var headers = config.headers; + var headerNames = {}; + + Object.keys(headers).forEach(function storeLowerName(name) { + headerNames[name.toLowerCase()] = name; + }); + + // Set User-Agent (required by some servers) + // See https://github.com/axios/axios/issues/69 + if ('user-agent' in headerNames) { + // User-Agent is specified; handle case where no UA header is desired + if (!headers[headerNames['user-agent']]) { + delete headers[headerNames['user-agent']]; + } + // Otherwise, use specified value + } else { + // Only set header if it hasn't been set in config + headers['User-Agent'] = 'axios/' + VERSION; + } + + if (data && !utils.isStream(data)) { + if (Buffer.isBuffer(data)) { + // Nothing to do... + } else if (utils.isArrayBuffer(data)) { + data = Buffer.from(new Uint8Array(data)); + } else if (utils.isString(data)) { + data = Buffer.from(data, 'utf-8'); + } else { + return reject(createError( + 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream', + config + )); + } + + if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) { + return reject(createError('Request body larger than maxBodyLength limit', config)); + } + + // Add Content-Length header if data exists + if (!headerNames['content-length']) { + headers['Content-Length'] = data.length; + } + } + + // HTTP basic authentication + var auth = undefined; + if (config.auth) { + var username = config.auth.username || ''; + var password = config.auth.password || ''; + auth = username + ':' + password; + } + + // Parse url + var fullPath = buildFullPath(config.baseURL, config.url); + var parsed = url.parse(fullPath); + var protocol = parsed.protocol || 'http:'; + + if (!auth && parsed.auth) { + var urlAuth = parsed.auth.split(':'); + var urlUsername = urlAuth[0] || ''; + var urlPassword = urlAuth[1] || ''; + auth = urlUsername + ':' + urlPassword; + } + + if (auth && headerNames.authorization) { + delete headers[headerNames.authorization]; + } + + var isHttpsRequest = isHttps.test(protocol); + var agent = isHttpsRequest ? config.httpsAgent : config.httpAgent; + + try { + buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, ''); + } catch (err) { + var customErr = new Error(err.message); + customErr.config = config; + customErr.url = config.url; + customErr.exists = true; + reject(customErr); + } + + var options = { + path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, ''), + method: config.method.toUpperCase(), + headers: headers, + agent: agent, + agents: { http: config.httpAgent, https: config.httpsAgent }, + auth: auth + }; + + if (config.socketPath) { + options.socketPath = config.socketPath; + } else { + options.hostname = parsed.hostname; + options.port = parsed.port; + } + + var proxy = config.proxy; + if (!proxy && proxy !== false) { + var proxyEnv = protocol.slice(0, -1) + '_proxy'; + var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()]; + if (proxyUrl) { + var parsedProxyUrl = url.parse(proxyUrl); + var noProxyEnv = process.env.no_proxy || process.env.NO_PROXY; + var shouldProxy = true; + + if (noProxyEnv) { + var noProxy = noProxyEnv.split(',').map(function trim(s) { + return s.trim(); + }); + + shouldProxy = !noProxy.some(function proxyMatch(proxyElement) { + if (!proxyElement) { + return false; + } + if (proxyElement === '*') { + return true; + } + if (proxyElement[0] === '.' && + parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement) { + return true; + } + + return parsed.hostname === proxyElement; + }); + } + + if (shouldProxy) { + proxy = { + host: parsedProxyUrl.hostname, + port: parsedProxyUrl.port, + protocol: parsedProxyUrl.protocol + }; + + if (parsedProxyUrl.auth) { + var proxyUrlAuth = parsedProxyUrl.auth.split(':'); + proxy.auth = { + username: proxyUrlAuth[0], + password: proxyUrlAuth[1] + }; + } + } + } + } + + if (proxy) { + options.headers.host = parsed.hostname + (parsed.port ? ':' + parsed.port : ''); + setProxy(options, proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path); + } + + var transport; + var isHttpsProxy = isHttpsRequest && (proxy ? isHttps.test(proxy.protocol) : true); + if (config.transport) { + transport = config.transport; + } else if (config.maxRedirects === 0) { + transport = isHttpsProxy ? https : http; + } else { + if (config.maxRedirects) { + options.maxRedirects = config.maxRedirects; + } + transport = isHttpsProxy ? httpsFollow : httpFollow; + } + + if (config.maxBodyLength > -1) { + options.maxBodyLength = config.maxBodyLength; + } + + if (config.insecureHTTPParser) { + options.insecureHTTPParser = config.insecureHTTPParser; + } + + // Create the request + var req = transport.request(options, function handleResponse(res) { + if (req.aborted) return; + + // uncompress the response body transparently if required + var stream = res; + + // return the last request in case of redirects + var lastRequest = res.req || req; + + + // if no content, is HEAD request or decompress disabled we should not decompress + if (res.statusCode !== 204 && lastRequest.method !== 'HEAD' && config.decompress !== false) { + switch (res.headers['content-encoding']) { + /*eslint default-case:0*/ + case 'gzip': + case 'compress': + case 'deflate': + // add the unzipper to the body stream processing pipeline + stream = stream.pipe(zlib.createUnzip()); + + // remove the content-encoding in order to not confuse downstream operations + delete res.headers['content-encoding']; + break; + } + } + + var response = { + status: res.statusCode, + statusText: res.statusMessage, + headers: res.headers, + config: config, + request: lastRequest + }; + + if (config.responseType === 'stream') { + response.data = stream; + settle(resolve, reject, response); + } else { + var responseBuffer = []; + var totalResponseBytes = 0; + stream.on('data', function handleStreamData(chunk) { + responseBuffer.push(chunk); + totalResponseBytes += chunk.length; + + // make sure the content length is not over the maxContentLength if specified + if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) { + // stream.destoy() emit aborted event before calling reject() on Node.js v16 + rejected = true; + stream.destroy(); + reject(createError('maxContentLength size of ' + config.maxContentLength + ' exceeded', + config, null, lastRequest)); + } + }); + + stream.on('aborted', function handlerStreamAborted() { + if (rejected) { + return; + } + stream.destroy(); + reject(createError('error request aborted', config, 'ERR_REQUEST_ABORTED', lastRequest)); + }); + + stream.on('error', function handleStreamError(err) { + if (req.aborted) return; + reject(enhanceError(err, config, null, lastRequest)); + }); + + stream.on('end', function handleStreamEnd() { + try { + var responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer); + if (config.responseType !== 'arraybuffer') { + responseData = responseData.toString(config.responseEncoding); + if (!config.responseEncoding || config.responseEncoding === 'utf8') { + responseData = utils.stripBOM(responseData); + } + } + response.data = responseData; + } catch (err) { + reject(enhanceError(err, config, err.code, response.request, response)); + } + settle(resolve, reject, response); + }); + } + }); + + // Handle errors + req.on('error', function handleRequestError(err) { + if (req.aborted && err.code !== 'ERR_FR_TOO_MANY_REDIRECTS') return; + reject(enhanceError(err, config, null, req)); + }); + + // set tcp keep alive to prevent drop connection by peer + req.on('socket', function handleRequestSocket(socket) { + // default interval of sending ack packet is 1 minute + socket.setKeepAlive(true, 1000 * 60); + }); + + // Handle request timeout + if (config.timeout) { + // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types. + var timeout = parseInt(config.timeout, 10); + + if (isNaN(timeout)) { + reject(createError( + 'error trying to parse `config.timeout` to int', + config, + 'ERR_PARSE_TIMEOUT', + req + )); + + return; + } + + // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system. + // And timer callback will be fired, and abort() will be invoked before connection, then get "socket hang up" and code ECONNRESET. + // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up. + // And then these socket which be hang up will devoring CPU little by little. + // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect. + req.setTimeout(timeout, function handleRequestTimeout() { + req.abort(); + var timeoutErrorMessage = ''; + if (config.timeoutErrorMessage) { + timeoutErrorMessage = config.timeoutErrorMessage; + } else { + timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded'; + } + var transitional = config.transitional || transitionalDefaults; + reject(createError( + timeoutErrorMessage, + config, + transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED', + req + )); + }); + } + + if (config.cancelToken || config.signal) { + // Handle cancellation + // eslint-disable-next-line func-names + onCanceled = function(cancel) { + if (req.aborted) return; + + req.abort(); + reject(!cancel || (cancel && cancel.type) ? new Cancel('canceled') : cancel); + }; + + config.cancelToken && config.cancelToken.subscribe(onCanceled); + if (config.signal) { + config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled); + } + } + + + // Send the request + if (utils.isStream(data)) { + data.on('error', function handleStreamError(err) { + reject(enhanceError(err, config, null, req)); + }).pipe(req); + } else { + req.end(data); + } + }); +}; diff --git a/test/node_modules/axios/lib/adapters/xhr.js b/test/node_modules/axios/lib/adapters/xhr.js new file mode 100644 index 0000000..e58625a --- /dev/null +++ b/test/node_modules/axios/lib/adapters/xhr.js @@ -0,0 +1,212 @@ +'use strict'; + +var utils = require('./../utils'); +var settle = require('./../core/settle'); +var cookies = require('./../helpers/cookies'); +var buildURL = require('./../helpers/buildURL'); +var buildFullPath = require('../core/buildFullPath'); +var parseHeaders = require('./../helpers/parseHeaders'); +var isURLSameOrigin = require('./../helpers/isURLSameOrigin'); +var createError = require('../core/createError'); +var transitionalDefaults = require('../defaults/transitional'); +var Cancel = require('../cancel/Cancel'); + +module.exports = function xhrAdapter(config) { + return new Promise(function dispatchXhrRequest(resolve, reject) { + var requestData = config.data; + var requestHeaders = config.headers; + var responseType = config.responseType; + var onCanceled; + function done() { + if (config.cancelToken) { + config.cancelToken.unsubscribe(onCanceled); + } + + if (config.signal) { + config.signal.removeEventListener('abort', onCanceled); + } + } + + if (utils.isFormData(requestData)) { + delete requestHeaders['Content-Type']; // Let the browser set it + } + + var request = new XMLHttpRequest(); + + // HTTP basic authentication + if (config.auth) { + var username = config.auth.username || ''; + var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : ''; + requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); + } + + var fullPath = buildFullPath(config.baseURL, config.url); + request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true); + + // Set the request timeout in MS + request.timeout = config.timeout; + + function onloadend() { + if (!request) { + return; + } + // Prepare the response + var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; + var responseData = !responseType || responseType === 'text' || responseType === 'json' ? + request.responseText : request.response; + var response = { + data: responseData, + status: request.status, + statusText: request.statusText, + headers: responseHeaders, + config: config, + request: request + }; + + settle(function _resolve(value) { + resolve(value); + done(); + }, function _reject(err) { + reject(err); + done(); + }, response); + + // Clean up request + request = null; + } + + if ('onloadend' in request) { + // Use onloadend if available + request.onloadend = onloadend; + } else { + // Listen for ready state to emulate onloadend + request.onreadystatechange = function handleLoad() { + if (!request || request.readyState !== 4) { + return; + } + + // The request errored out and we didn't get a response, this will be + // handled by onerror instead + // With one exception: request that using file: protocol, most browsers + // will return status as 0 even though it's a successful request + if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { + return; + } + // readystate handler is calling before onerror or ontimeout handlers, + // so we should call onloadend on the next 'tick' + setTimeout(onloadend); + }; + } + + // Handle browser request cancellation (as opposed to a manual cancellation) + request.onabort = function handleAbort() { + if (!request) { + return; + } + + reject(createError('Request aborted', config, 'ECONNABORTED', request)); + + // Clean up request + request = null; + }; + + // Handle low level network errors + request.onerror = function handleError() { + // Real errors are hidden from us by the browser + // onerror should only fire if it's a network error + reject(createError('Network Error', config, null, request)); + + // Clean up request + request = null; + }; + + // Handle timeout + request.ontimeout = function handleTimeout() { + var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded'; + var transitional = config.transitional || transitionalDefaults; + if (config.timeoutErrorMessage) { + timeoutErrorMessage = config.timeoutErrorMessage; + } + reject(createError( + timeoutErrorMessage, + config, + transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED', + request)); + + // Clean up request + request = null; + }; + + // Add xsrf header + // This is only done if running in a standard browser environment. + // Specifically not if we're in a web worker, or react-native. + if (utils.isStandardBrowserEnv()) { + // Add xsrf header + var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? + cookies.read(config.xsrfCookieName) : + undefined; + + if (xsrfValue) { + requestHeaders[config.xsrfHeaderName] = xsrfValue; + } + } + + // Add headers to the request + if ('setRequestHeader' in request) { + utils.forEach(requestHeaders, function setRequestHeader(val, key) { + if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { + // Remove Content-Type if data is undefined + delete requestHeaders[key]; + } else { + // Otherwise add header to the request + request.setRequestHeader(key, val); + } + }); + } + + // Add withCredentials to request if needed + if (!utils.isUndefined(config.withCredentials)) { + request.withCredentials = !!config.withCredentials; + } + + // Add responseType to request if needed + if (responseType && responseType !== 'json') { + request.responseType = config.responseType; + } + + // Handle progress if needed + if (typeof config.onDownloadProgress === 'function') { + request.addEventListener('progress', config.onDownloadProgress); + } + + // Not all browsers support upload events + if (typeof config.onUploadProgress === 'function' && request.upload) { + request.upload.addEventListener('progress', config.onUploadProgress); + } + + if (config.cancelToken || config.signal) { + // Handle cancellation + // eslint-disable-next-line func-names + onCanceled = function(cancel) { + if (!request) { + return; + } + reject(!cancel || (cancel && cancel.type) ? new Cancel('canceled') : cancel); + request.abort(); + request = null; + }; + + config.cancelToken && config.cancelToken.subscribe(onCanceled); + if (config.signal) { + config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled); + } + } + + if (!requestData) { + requestData = null; + } + + // Send the request + request.send(requestData); + }); +}; diff --git a/test/node_modules/axios/lib/axios.js b/test/node_modules/axios/lib/axios.js new file mode 100644 index 0000000..c032327 --- /dev/null +++ b/test/node_modules/axios/lib/axios.js @@ -0,0 +1,57 @@ +'use strict'; + +var utils = require('./utils'); +var bind = require('./helpers/bind'); +var Axios = require('./core/Axios'); +var mergeConfig = require('./core/mergeConfig'); +var defaults = require('./defaults'); + +/** + * Create an instance of Axios + * + * @param {Object} defaultConfig The default config for the instance + * @return {Axios} A new instance of Axios + */ +function createInstance(defaultConfig) { + var context = new Axios(defaultConfig); + var instance = bind(Axios.prototype.request, context); + + // Copy axios.prototype to instance + utils.extend(instance, Axios.prototype, context); + + // Copy context to instance + utils.extend(instance, context); + + // Factory for creating new instances + instance.create = function create(instanceConfig) { + return createInstance(mergeConfig(defaultConfig, instanceConfig)); + }; + + return instance; +} + +// Create the default instance to be exported +var axios = createInstance(defaults); + +// Expose Axios class to allow class inheritance +axios.Axios = Axios; + +// Expose Cancel & CancelToken +axios.Cancel = require('./cancel/Cancel'); +axios.CancelToken = require('./cancel/CancelToken'); +axios.isCancel = require('./cancel/isCancel'); +axios.VERSION = require('./env/data').version; + +// Expose all/spread +axios.all = function all(promises) { + return Promise.all(promises); +}; +axios.spread = require('./helpers/spread'); + +// Expose isAxiosError +axios.isAxiosError = require('./helpers/isAxiosError'); + +module.exports = axios; + +// Allow use of default import syntax in TypeScript +module.exports.default = axios; diff --git a/test/node_modules/axios/lib/cancel/Cancel.js b/test/node_modules/axios/lib/cancel/Cancel.js new file mode 100644 index 0000000..e0de400 --- /dev/null +++ b/test/node_modules/axios/lib/cancel/Cancel.js @@ -0,0 +1,19 @@ +'use strict'; + +/** + * A `Cancel` is an object that is thrown when an operation is canceled. + * + * @class + * @param {string=} message The message. + */ +function Cancel(message) { + this.message = message; +} + +Cancel.prototype.toString = function toString() { + return 'Cancel' + (this.message ? ': ' + this.message : ''); +}; + +Cancel.prototype.__CANCEL__ = true; + +module.exports = Cancel; diff --git a/test/node_modules/axios/lib/cancel/CancelToken.js b/test/node_modules/axios/lib/cancel/CancelToken.js new file mode 100644 index 0000000..089d6b9 --- /dev/null +++ b/test/node_modules/axios/lib/cancel/CancelToken.js @@ -0,0 +1,119 @@ +'use strict'; + +var Cancel = require('./Cancel'); + +/** + * A `CancelToken` is an object that can be used to request cancellation of an operation. + * + * @class + * @param {Function} executor The executor function. + */ +function CancelToken(executor) { + if (typeof executor !== 'function') { + throw new TypeError('executor must be a function.'); + } + + var resolvePromise; + + this.promise = new Promise(function promiseExecutor(resolve) { + resolvePromise = resolve; + }); + + var token = this; + + // eslint-disable-next-line func-names + this.promise.then(function(cancel) { + if (!token._listeners) return; + + var i; + var l = token._listeners.length; + + for (i = 0; i < l; i++) { + token._listeners[i](cancel); + } + token._listeners = null; + }); + + // eslint-disable-next-line func-names + this.promise.then = function(onfulfilled) { + var _resolve; + // eslint-disable-next-line func-names + var promise = new Promise(function(resolve) { + token.subscribe(resolve); + _resolve = resolve; + }).then(onfulfilled); + + promise.cancel = function reject() { + token.unsubscribe(_resolve); + }; + + return promise; + }; + + executor(function cancel(message) { + if (token.reason) { + // Cancellation has already been requested + return; + } + + token.reason = new Cancel(message); + resolvePromise(token.reason); + }); +} + +/** + * Throws a `Cancel` if cancellation has been requested. + */ +CancelToken.prototype.throwIfRequested = function throwIfRequested() { + if (this.reason) { + throw this.reason; + } +}; + +/** + * Subscribe to the cancel signal + */ + +CancelToken.prototype.subscribe = function subscribe(listener) { + if (this.reason) { + listener(this.reason); + return; + } + + if (this._listeners) { + this._listeners.push(listener); + } else { + this._listeners = [listener]; + } +}; + +/** + * Unsubscribe from the cancel signal + */ + +CancelToken.prototype.unsubscribe = function unsubscribe(listener) { + if (!this._listeners) { + return; + } + var index = this._listeners.indexOf(listener); + if (index !== -1) { + this._listeners.splice(index, 1); + } +}; + +/** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ +CancelToken.source = function source() { + var cancel; + var token = new CancelToken(function executor(c) { + cancel = c; + }); + return { + token: token, + cancel: cancel + }; +}; + +module.exports = CancelToken; diff --git a/test/node_modules/axios/lib/cancel/isCancel.js b/test/node_modules/axios/lib/cancel/isCancel.js new file mode 100644 index 0000000..051f3ae --- /dev/null +++ b/test/node_modules/axios/lib/cancel/isCancel.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function isCancel(value) { + return !!(value && value.__CANCEL__); +}; diff --git a/test/node_modules/axios/lib/core/Axios.js b/test/node_modules/axios/lib/core/Axios.js new file mode 100644 index 0000000..a1be08a --- /dev/null +++ b/test/node_modules/axios/lib/core/Axios.js @@ -0,0 +1,148 @@ +'use strict'; + +var utils = require('./../utils'); +var buildURL = require('../helpers/buildURL'); +var InterceptorManager = require('./InterceptorManager'); +var dispatchRequest = require('./dispatchRequest'); +var mergeConfig = require('./mergeConfig'); +var validator = require('../helpers/validator'); + +var validators = validator.validators; +/** + * Create a new instance of Axios + * + * @param {Object} instanceConfig The default config for the instance + */ +function Axios(instanceConfig) { + this.defaults = instanceConfig; + this.interceptors = { + request: new InterceptorManager(), + response: new InterceptorManager() + }; +} + +/** + * Dispatch a request + * + * @param {Object} config The config specific for this request (merged with this.defaults) + */ +Axios.prototype.request = function request(configOrUrl, config) { + /*eslint no-param-reassign:0*/ + // Allow for axios('example/url'[, config]) a la fetch API + if (typeof configOrUrl === 'string') { + config = config || {}; + config.url = configOrUrl; + } else { + config = configOrUrl || {}; + } + + config = mergeConfig(this.defaults, config); + + // Set config.method + if (config.method) { + config.method = config.method.toLowerCase(); + } else if (this.defaults.method) { + config.method = this.defaults.method.toLowerCase(); + } else { + config.method = 'get'; + } + + var transitional = config.transitional; + + if (transitional !== undefined) { + validator.assertOptions(transitional, { + silentJSONParsing: validators.transitional(validators.boolean), + forcedJSONParsing: validators.transitional(validators.boolean), + clarifyTimeoutError: validators.transitional(validators.boolean) + }, false); + } + + // filter out skipped interceptors + var requestInterceptorChain = []; + var synchronousRequestInterceptors = true; + this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { + if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { + return; + } + + synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; + + requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); + }); + + var responseInterceptorChain = []; + this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { + responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + }); + + var promise; + + if (!synchronousRequestInterceptors) { + var chain = [dispatchRequest, undefined]; + + Array.prototype.unshift.apply(chain, requestInterceptorChain); + chain = chain.concat(responseInterceptorChain); + + promise = Promise.resolve(config); + while (chain.length) { + promise = promise.then(chain.shift(), chain.shift()); + } + + return promise; + } + + + var newConfig = config; + while (requestInterceptorChain.length) { + var onFulfilled = requestInterceptorChain.shift(); + var onRejected = requestInterceptorChain.shift(); + try { + newConfig = onFulfilled(newConfig); + } catch (error) { + onRejected(error); + break; + } + } + + try { + promise = dispatchRequest(newConfig); + } catch (error) { + return Promise.reject(error); + } + + while (responseInterceptorChain.length) { + promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift()); + } + + return promise; +}; + +Axios.prototype.getUri = function getUri(config) { + config = mergeConfig(this.defaults, config); + return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, ''); +}; + +// Provide aliases for supported request methods +utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = function(url, config) { + return this.request(mergeConfig(config || {}, { + method: method, + url: url, + data: (config || {}).data + })); + }; +}); + +utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = function(url, data, config) { + return this.request(mergeConfig(config || {}, { + method: method, + url: url, + data: data + })); + }; +}); + +module.exports = Axios; diff --git a/test/node_modules/axios/lib/core/InterceptorManager.js b/test/node_modules/axios/lib/core/InterceptorManager.js new file mode 100644 index 0000000..900f448 --- /dev/null +++ b/test/node_modules/axios/lib/core/InterceptorManager.js @@ -0,0 +1,54 @@ +'use strict'; + +var utils = require('./../utils'); + +function InterceptorManager() { + this.handlers = []; +} + +/** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * + * @return {Number} An ID used to remove interceptor later + */ +InterceptorManager.prototype.use = function use(fulfilled, rejected, options) { + this.handlers.push({ + fulfilled: fulfilled, + rejected: rejected, + synchronous: options ? options.synchronous : false, + runWhen: options ? options.runWhen : null + }); + return this.handlers.length - 1; +}; + +/** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + */ +InterceptorManager.prototype.eject = function eject(id) { + if (this.handlers[id]) { + this.handlers[id] = null; + } +}; + +/** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + */ +InterceptorManager.prototype.forEach = function forEach(fn) { + utils.forEach(this.handlers, function forEachHandler(h) { + if (h !== null) { + fn(h); + } + }); +}; + +module.exports = InterceptorManager; diff --git a/test/node_modules/axios/lib/core/README.md b/test/node_modules/axios/lib/core/README.md new file mode 100644 index 0000000..84559ce --- /dev/null +++ b/test/node_modules/axios/lib/core/README.md @@ -0,0 +1,8 @@ +# axios // core + +The modules found in `core/` should be modules that are specific to the domain logic of axios. These modules would most likely not make sense to be consumed outside of the axios module, as their logic is too specific. Some examples of core modules are: + +- Dispatching requests + - Requests sent via `adapters/` (see lib/adapters/README.md) +- Managing interceptors +- Handling config diff --git a/test/node_modules/axios/lib/core/buildFullPath.js b/test/node_modules/axios/lib/core/buildFullPath.js new file mode 100644 index 0000000..00b2b05 --- /dev/null +++ b/test/node_modules/axios/lib/core/buildFullPath.js @@ -0,0 +1,20 @@ +'use strict'; + +var isAbsoluteURL = require('../helpers/isAbsoluteURL'); +var combineURLs = require('../helpers/combineURLs'); + +/** + * Creates a new URL by combining the baseURL with the requestedURL, + * only when the requestedURL is not already an absolute URL. + * If the requestURL is absolute, this function returns the requestedURL untouched. + * + * @param {string} baseURL The base URL + * @param {string} requestedURL Absolute or relative URL to combine + * @returns {string} The combined full path + */ +module.exports = function buildFullPath(baseURL, requestedURL) { + if (baseURL && !isAbsoluteURL(requestedURL)) { + return combineURLs(baseURL, requestedURL); + } + return requestedURL; +}; diff --git a/test/node_modules/axios/lib/core/createError.js b/test/node_modules/axios/lib/core/createError.js new file mode 100644 index 0000000..933680f --- /dev/null +++ b/test/node_modules/axios/lib/core/createError.js @@ -0,0 +1,18 @@ +'use strict'; + +var enhanceError = require('./enhanceError'); + +/** + * Create an Error with the specified message, config, error code, request and response. + * + * @param {string} message The error message. + * @param {Object} config The config. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * @returns {Error} The created error. + */ +module.exports = function createError(message, config, code, request, response) { + var error = new Error(message); + return enhanceError(error, config, code, request, response); +}; diff --git a/test/node_modules/axios/lib/core/dispatchRequest.js b/test/node_modules/axios/lib/core/dispatchRequest.js new file mode 100644 index 0000000..36da48b --- /dev/null +++ b/test/node_modules/axios/lib/core/dispatchRequest.js @@ -0,0 +1,87 @@ +'use strict'; + +var utils = require('./../utils'); +var transformData = require('./transformData'); +var isCancel = require('../cancel/isCancel'); +var defaults = require('../defaults'); +var Cancel = require('../cancel/Cancel'); + +/** + * Throws a `Cancel` if cancellation has been requested. + */ +function throwIfCancellationRequested(config) { + if (config.cancelToken) { + config.cancelToken.throwIfRequested(); + } + + if (config.signal && config.signal.aborted) { + throw new Cancel('canceled'); + } +} + +/** + * Dispatch a request to the server using the configured adapter. + * + * @param {object} config The config that is to be used for the request + * @returns {Promise} The Promise to be fulfilled + */ +module.exports = function dispatchRequest(config) { + throwIfCancellationRequested(config); + + // Ensure headers exist + config.headers = config.headers || {}; + + // Transform request data + config.data = transformData.call( + config, + config.data, + config.headers, + config.transformRequest + ); + + // Flatten headers + config.headers = utils.merge( + config.headers.common || {}, + config.headers[config.method] || {}, + config.headers + ); + + utils.forEach( + ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], + function cleanHeaderConfig(method) { + delete config.headers[method]; + } + ); + + var adapter = config.adapter || defaults.adapter; + + return adapter(config).then(function onAdapterResolution(response) { + throwIfCancellationRequested(config); + + // Transform response data + response.data = transformData.call( + config, + response.data, + response.headers, + config.transformResponse + ); + + return response; + }, function onAdapterRejection(reason) { + if (!isCancel(reason)) { + throwIfCancellationRequested(config); + + // Transform response data + if (reason && reason.response) { + reason.response.data = transformData.call( + config, + reason.response.data, + reason.response.headers, + config.transformResponse + ); + } + } + + return Promise.reject(reason); + }); +}; diff --git a/test/node_modules/axios/lib/core/enhanceError.js b/test/node_modules/axios/lib/core/enhanceError.js new file mode 100644 index 0000000..db04ec8 --- /dev/null +++ b/test/node_modules/axios/lib/core/enhanceError.js @@ -0,0 +1,43 @@ +'use strict'; + +/** + * Update an Error with the specified config, error code, and response. + * + * @param {Error} error The error to update. + * @param {Object} config The config. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * @returns {Error} The error. + */ +module.exports = function enhanceError(error, config, code, request, response) { + error.config = config; + if (code) { + error.code = code; + } + + error.request = request; + error.response = response; + error.isAxiosError = true; + + error.toJSON = function toJSON() { + return { + // Standard + message: this.message, + name: this.name, + // Microsoft + description: this.description, + number: this.number, + // Mozilla + fileName: this.fileName, + lineNumber: this.lineNumber, + columnNumber: this.columnNumber, + stack: this.stack, + // Axios + config: this.config, + code: this.code, + status: this.response && this.response.status ? this.response.status : null + }; + }; + return error; +}; diff --git a/test/node_modules/axios/lib/core/mergeConfig.js b/test/node_modules/axios/lib/core/mergeConfig.js new file mode 100644 index 0000000..05d1438 --- /dev/null +++ b/test/node_modules/axios/lib/core/mergeConfig.js @@ -0,0 +1,99 @@ +'use strict'; + +var utils = require('../utils'); + +/** + * Config-specific merge-function which creates a new config-object + * by merging two configuration objects together. + * + * @param {Object} config1 + * @param {Object} config2 + * @returns {Object} New object resulting from merging config2 to config1 + */ +module.exports = function mergeConfig(config1, config2) { + // eslint-disable-next-line no-param-reassign + config2 = config2 || {}; + var config = {}; + + function getMergedValue(target, source) { + if (utils.isPlainObject(target) && utils.isPlainObject(source)) { + return utils.merge(target, source); + } else if (utils.isPlainObject(source)) { + return utils.merge({}, source); + } else if (utils.isArray(source)) { + return source.slice(); + } + return source; + } + + // eslint-disable-next-line consistent-return + function mergeDeepProperties(prop) { + if (!utils.isUndefined(config2[prop])) { + return getMergedValue(config1[prop], config2[prop]); + } else if (!utils.isUndefined(config1[prop])) { + return getMergedValue(undefined, config1[prop]); + } + } + + // eslint-disable-next-line consistent-return + function valueFromConfig2(prop) { + if (!utils.isUndefined(config2[prop])) { + return getMergedValue(undefined, config2[prop]); + } + } + + // eslint-disable-next-line consistent-return + function defaultToConfig2(prop) { + if (!utils.isUndefined(config2[prop])) { + return getMergedValue(undefined, config2[prop]); + } else if (!utils.isUndefined(config1[prop])) { + return getMergedValue(undefined, config1[prop]); + } + } + + // eslint-disable-next-line consistent-return + function mergeDirectKeys(prop) { + if (prop in config2) { + return getMergedValue(config1[prop], config2[prop]); + } else if (prop in config1) { + return getMergedValue(undefined, config1[prop]); + } + } + + var mergeMap = { + 'url': valueFromConfig2, + 'method': valueFromConfig2, + 'data': valueFromConfig2, + 'baseURL': defaultToConfig2, + 'transformRequest': defaultToConfig2, + 'transformResponse': defaultToConfig2, + 'paramsSerializer': defaultToConfig2, + 'timeout': defaultToConfig2, + 'timeoutMessage': defaultToConfig2, + 'withCredentials': defaultToConfig2, + 'adapter': defaultToConfig2, + 'responseType': defaultToConfig2, + 'xsrfCookieName': defaultToConfig2, + 'xsrfHeaderName': defaultToConfig2, + 'onUploadProgress': defaultToConfig2, + 'onDownloadProgress': defaultToConfig2, + 'decompress': defaultToConfig2, + 'maxContentLength': defaultToConfig2, + 'maxBodyLength': defaultToConfig2, + 'transport': defaultToConfig2, + 'httpAgent': defaultToConfig2, + 'httpsAgent': defaultToConfig2, + 'cancelToken': defaultToConfig2, + 'socketPath': defaultToConfig2, + 'responseEncoding': defaultToConfig2, + 'validateStatus': mergeDirectKeys + }; + + utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) { + var merge = mergeMap[prop] || mergeDeepProperties; + var configValue = merge(prop); + (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue); + }); + + return config; +}; diff --git a/test/node_modules/axios/lib/core/settle.js b/test/node_modules/axios/lib/core/settle.js new file mode 100644 index 0000000..886adb0 --- /dev/null +++ b/test/node_modules/axios/lib/core/settle.js @@ -0,0 +1,25 @@ +'use strict'; + +var createError = require('./createError'); + +/** + * Resolve or reject a Promise based on response status. + * + * @param {Function} resolve A function that resolves the promise. + * @param {Function} reject A function that rejects the promise. + * @param {object} response The response. + */ +module.exports = function settle(resolve, reject, response) { + var validateStatus = response.config.validateStatus; + if (!response.status || !validateStatus || validateStatus(response.status)) { + resolve(response); + } else { + reject(createError( + 'Request failed with status code ' + response.status, + response.config, + null, + response.request, + response + )); + } +}; diff --git a/test/node_modules/axios/lib/core/transformData.js b/test/node_modules/axios/lib/core/transformData.js new file mode 100644 index 0000000..82ee7dd --- /dev/null +++ b/test/node_modules/axios/lib/core/transformData.js @@ -0,0 +1,22 @@ +'use strict'; + +var utils = require('./../utils'); +var defaults = require('../defaults'); + +/** + * Transform the data for a request or a response + * + * @param {Object|String} data The data to be transformed + * @param {Array} headers The headers for the request or response + * @param {Array|Function} fns A single function or Array of functions + * @returns {*} The resulting transformed data + */ +module.exports = function transformData(data, headers, fns) { + var context = this || defaults; + /*eslint no-param-reassign:0*/ + utils.forEach(fns, function transform(fn) { + data = fn.call(context, data, headers); + }); + + return data; +}; diff --git a/test/node_modules/axios/lib/defaults/index.js b/test/node_modules/axios/lib/defaults/index.js new file mode 100644 index 0000000..8b57b88 --- /dev/null +++ b/test/node_modules/axios/lib/defaults/index.js @@ -0,0 +1,131 @@ +'use strict'; + +var utils = require('../utils'); +var normalizeHeaderName = require('../helpers/normalizeHeaderName'); +var enhanceError = require('../core/enhanceError'); +var transitionalDefaults = require('./transitional'); + +var DEFAULT_CONTENT_TYPE = { + 'Content-Type': 'application/x-www-form-urlencoded' +}; + +function setContentTypeIfUnset(headers, value) { + if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { + headers['Content-Type'] = value; + } +} + +function getDefaultAdapter() { + var adapter; + if (typeof XMLHttpRequest !== 'undefined') { + // For browsers use XHR adapter + adapter = require('../adapters/xhr'); + } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') { + // For node use HTTP adapter + adapter = require('../adapters/http'); + } + return adapter; +} + +function stringifySafely(rawValue, parser, encoder) { + if (utils.isString(rawValue)) { + try { + (parser || JSON.parse)(rawValue); + return utils.trim(rawValue); + } catch (e) { + if (e.name !== 'SyntaxError') { + throw e; + } + } + } + + return (encoder || JSON.stringify)(rawValue); +} + +var defaults = { + + transitional: transitionalDefaults, + + adapter: getDefaultAdapter(), + + transformRequest: [function transformRequest(data, headers) { + normalizeHeaderName(headers, 'Accept'); + normalizeHeaderName(headers, 'Content-Type'); + + if (utils.isFormData(data) || + utils.isArrayBuffer(data) || + utils.isBuffer(data) || + utils.isStream(data) || + utils.isFile(data) || + utils.isBlob(data) + ) { + return data; + } + if (utils.isArrayBufferView(data)) { + return data.buffer; + } + if (utils.isURLSearchParams(data)) { + setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); + return data.toString(); + } + if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) { + setContentTypeIfUnset(headers, 'application/json'); + return stringifySafely(data); + } + return data; + }], + + transformResponse: [function transformResponse(data) { + var transitional = this.transitional || defaults.transitional; + var silentJSONParsing = transitional && transitional.silentJSONParsing; + var forcedJSONParsing = transitional && transitional.forcedJSONParsing; + var strictJSONParsing = !silentJSONParsing && this.responseType === 'json'; + + if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) { + try { + return JSON.parse(data); + } catch (e) { + if (strictJSONParsing) { + if (e.name === 'SyntaxError') { + throw enhanceError(e, this, 'E_JSON_PARSE'); + } + throw e; + } + } + } + + return data; + }], + + /** + * A timeout in milliseconds to abort a request. If set to 0 (default) a + * timeout is not created. + */ + timeout: 0, + + xsrfCookieName: 'XSRF-TOKEN', + xsrfHeaderName: 'X-XSRF-TOKEN', + + maxContentLength: -1, + maxBodyLength: -1, + + validateStatus: function validateStatus(status) { + return status >= 200 && status < 300; + }, + + headers: { + common: { + 'Accept': 'application/json, text/plain, */*' + } + } +}; + +utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { + defaults.headers[method] = {}; +}); + +utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { + defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); +}); + +module.exports = defaults; diff --git a/test/node_modules/axios/lib/defaults/transitional.js b/test/node_modules/axios/lib/defaults/transitional.js new file mode 100644 index 0000000..601dd7e --- /dev/null +++ b/test/node_modules/axios/lib/defaults/transitional.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = { + silentJSONParsing: true, + forcedJSONParsing: true, + clarifyTimeoutError: false +}; diff --git a/test/node_modules/axios/lib/env/README.md b/test/node_modules/axios/lib/env/README.md new file mode 100644 index 0000000..b41baff --- /dev/null +++ b/test/node_modules/axios/lib/env/README.md @@ -0,0 +1,3 @@ +# axios // env + +The `data.js` file is updated automatically when the package version is upgrading. Please do not edit it manually. diff --git a/test/node_modules/axios/lib/env/data.js b/test/node_modules/axios/lib/env/data.js new file mode 100644 index 0000000..9fd3106 --- /dev/null +++ b/test/node_modules/axios/lib/env/data.js @@ -0,0 +1,3 @@ +module.exports = { + "version": "0.26.1" +}; \ No newline at end of file diff --git a/test/node_modules/axios/lib/helpers/README.md b/test/node_modules/axios/lib/helpers/README.md new file mode 100644 index 0000000..4ae3419 --- /dev/null +++ b/test/node_modules/axios/lib/helpers/README.md @@ -0,0 +1,7 @@ +# axios // helpers + +The modules found in `helpers/` should be generic modules that are _not_ specific to the domain logic of axios. These modules could theoretically be published to npm on their own and consumed by other modules or apps. Some examples of generic modules are things like: + +- Browser polyfills +- Managing cookies +- Parsing HTTP headers diff --git a/test/node_modules/axios/lib/helpers/bind.js b/test/node_modules/axios/lib/helpers/bind.js new file mode 100644 index 0000000..6147c60 --- /dev/null +++ b/test/node_modules/axios/lib/helpers/bind.js @@ -0,0 +1,11 @@ +'use strict'; + +module.exports = function bind(fn, thisArg) { + return function wrap() { + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + return fn.apply(thisArg, args); + }; +}; diff --git a/test/node_modules/axios/lib/helpers/buildURL.js b/test/node_modules/axios/lib/helpers/buildURL.js new file mode 100644 index 0000000..31595c3 --- /dev/null +++ b/test/node_modules/axios/lib/helpers/buildURL.js @@ -0,0 +1,70 @@ +'use strict'; + +var utils = require('./../utils'); + +function encode(val) { + return encodeURIComponent(val). + replace(/%3A/gi, ':'). + replace(/%24/g, '$'). + replace(/%2C/gi, ','). + replace(/%20/g, '+'). + replace(/%5B/gi, '['). + replace(/%5D/gi, ']'); +} + +/** + * Build a URL by appending params to the end + * + * @param {string} url The base of the url (e.g., http://www.google.com) + * @param {object} [params] The params to be appended + * @returns {string} The formatted url + */ +module.exports = function buildURL(url, params, paramsSerializer) { + /*eslint no-param-reassign:0*/ + if (!params) { + return url; + } + + var serializedParams; + if (paramsSerializer) { + serializedParams = paramsSerializer(params); + } else if (utils.isURLSearchParams(params)) { + serializedParams = params.toString(); + } else { + var parts = []; + + utils.forEach(params, function serialize(val, key) { + if (val === null || typeof val === 'undefined') { + return; + } + + if (utils.isArray(val)) { + key = key + '[]'; + } else { + val = [val]; + } + + utils.forEach(val, function parseValue(v) { + if (utils.isDate(v)) { + v = v.toISOString(); + } else if (utils.isObject(v)) { + v = JSON.stringify(v); + } + parts.push(encode(key) + '=' + encode(v)); + }); + }); + + serializedParams = parts.join('&'); + } + + if (serializedParams) { + var hashmarkIndex = url.indexOf('#'); + if (hashmarkIndex !== -1) { + url = url.slice(0, hashmarkIndex); + } + + url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; + } + + return url; +}; diff --git a/test/node_modules/axios/lib/helpers/combineURLs.js b/test/node_modules/axios/lib/helpers/combineURLs.js new file mode 100644 index 0000000..f1b58a5 --- /dev/null +++ b/test/node_modules/axios/lib/helpers/combineURLs.js @@ -0,0 +1,14 @@ +'use strict'; + +/** + * Creates a new URL by combining the specified URLs + * + * @param {string} baseURL The base URL + * @param {string} relativeURL The relative URL + * @returns {string} The combined URL + */ +module.exports = function combineURLs(baseURL, relativeURL) { + return relativeURL + ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') + : baseURL; +}; diff --git a/test/node_modules/axios/lib/helpers/cookies.js b/test/node_modules/axios/lib/helpers/cookies.js new file mode 100644 index 0000000..5a8a666 --- /dev/null +++ b/test/node_modules/axios/lib/helpers/cookies.js @@ -0,0 +1,53 @@ +'use strict'; + +var utils = require('./../utils'); + +module.exports = ( + utils.isStandardBrowserEnv() ? + + // Standard browser envs support document.cookie + (function standardBrowserEnv() { + return { + write: function write(name, value, expires, path, domain, secure) { + var cookie = []; + cookie.push(name + '=' + encodeURIComponent(value)); + + if (utils.isNumber(expires)) { + cookie.push('expires=' + new Date(expires).toGMTString()); + } + + if (utils.isString(path)) { + cookie.push('path=' + path); + } + + if (utils.isString(domain)) { + cookie.push('domain=' + domain); + } + + if (secure === true) { + cookie.push('secure'); + } + + document.cookie = cookie.join('; '); + }, + + read: function read(name) { + var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); + return (match ? decodeURIComponent(match[3]) : null); + }, + + remove: function remove(name) { + this.write(name, '', Date.now() - 86400000); + } + }; + })() : + + // Non standard browser env (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { + return { + write: function write() {}, + read: function read() { return null; }, + remove: function remove() {} + }; + })() +); diff --git a/test/node_modules/axios/lib/helpers/deprecatedMethod.js b/test/node_modules/axios/lib/helpers/deprecatedMethod.js new file mode 100644 index 0000000..ed40965 --- /dev/null +++ b/test/node_modules/axios/lib/helpers/deprecatedMethod.js @@ -0,0 +1,24 @@ +'use strict'; + +/*eslint no-console:0*/ + +/** + * Supply a warning to the developer that a method they are using + * has been deprecated. + * + * @param {string} method The name of the deprecated method + * @param {string} [instead] The alternate method to use if applicable + * @param {string} [docs] The documentation URL to get further details + */ +module.exports = function deprecatedMethod(method, instead, docs) { + try { + console.warn( + 'DEPRECATED method `' + method + '`.' + + (instead ? ' Use `' + instead + '` instead.' : '') + + ' This method will be removed in a future release.'); + + if (docs) { + console.warn('For more information about usage see ' + docs); + } + } catch (e) { /* Ignore */ } +}; diff --git a/test/node_modules/axios/lib/helpers/isAbsoluteURL.js b/test/node_modules/axios/lib/helpers/isAbsoluteURL.js new file mode 100644 index 0000000..43fea78 --- /dev/null +++ b/test/node_modules/axios/lib/helpers/isAbsoluteURL.js @@ -0,0 +1,14 @@ +'use strict'; + +/** + * Determines whether the specified URL is absolute + * + * @param {string} url The URL to test + * @returns {boolean} True if the specified URL is absolute, otherwise false + */ +module.exports = function isAbsoluteURL(url) { + // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). + // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed + // by any combination of letters, digits, plus, period, or hyphen. + return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); +}; diff --git a/test/node_modules/axios/lib/helpers/isAxiosError.js b/test/node_modules/axios/lib/helpers/isAxiosError.js new file mode 100644 index 0000000..a037bec --- /dev/null +++ b/test/node_modules/axios/lib/helpers/isAxiosError.js @@ -0,0 +1,13 @@ +'use strict'; + +var utils = require('./../utils'); + +/** + * Determines whether the payload is an error thrown by Axios + * + * @param {*} payload The value to test + * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false + */ +module.exports = function isAxiosError(payload) { + return utils.isObject(payload) && (payload.isAxiosError === true); +}; diff --git a/test/node_modules/axios/lib/helpers/isURLSameOrigin.js b/test/node_modules/axios/lib/helpers/isURLSameOrigin.js new file mode 100644 index 0000000..f1d89ad --- /dev/null +++ b/test/node_modules/axios/lib/helpers/isURLSameOrigin.js @@ -0,0 +1,68 @@ +'use strict'; + +var utils = require('./../utils'); + +module.exports = ( + utils.isStandardBrowserEnv() ? + + // Standard browser envs have full support of the APIs needed to test + // whether the request URL is of the same origin as current location. + (function standardBrowserEnv() { + var msie = /(msie|trident)/i.test(navigator.userAgent); + var urlParsingNode = document.createElement('a'); + var originURL; + + /** + * Parse a URL to discover it's components + * + * @param {String} url The URL to be parsed + * @returns {Object} + */ + function resolveURL(url) { + var href = url; + + if (msie) { + // IE needs attribute set twice to normalize properties + urlParsingNode.setAttribute('href', href); + href = urlParsingNode.href; + } + + urlParsingNode.setAttribute('href', href); + + // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils + return { + href: urlParsingNode.href, + protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', + host: urlParsingNode.host, + search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', + hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', + hostname: urlParsingNode.hostname, + port: urlParsingNode.port, + pathname: (urlParsingNode.pathname.charAt(0) === '/') ? + urlParsingNode.pathname : + '/' + urlParsingNode.pathname + }; + } + + originURL = resolveURL(window.location.href); + + /** + * Determine if a URL shares the same origin as the current location + * + * @param {String} requestURL The URL to test + * @returns {boolean} True if URL shares the same origin, otherwise false + */ + return function isURLSameOrigin(requestURL) { + var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; + return (parsed.protocol === originURL.protocol && + parsed.host === originURL.host); + }; + })() : + + // Non standard browser envs (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { + return function isURLSameOrigin() { + return true; + }; + })() +); diff --git a/test/node_modules/axios/lib/helpers/normalizeHeaderName.js b/test/node_modules/axios/lib/helpers/normalizeHeaderName.js new file mode 100644 index 0000000..738c9fe --- /dev/null +++ b/test/node_modules/axios/lib/helpers/normalizeHeaderName.js @@ -0,0 +1,12 @@ +'use strict'; + +var utils = require('../utils'); + +module.exports = function normalizeHeaderName(headers, normalizedName) { + utils.forEach(headers, function processHeader(value, name) { + if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { + headers[normalizedName] = value; + delete headers[name]; + } + }); +}; diff --git a/test/node_modules/axios/lib/helpers/parseHeaders.js b/test/node_modules/axios/lib/helpers/parseHeaders.js new file mode 100644 index 0000000..8af2cc7 --- /dev/null +++ b/test/node_modules/axios/lib/helpers/parseHeaders.js @@ -0,0 +1,53 @@ +'use strict'; + +var utils = require('./../utils'); + +// Headers whose duplicates are ignored by node +// c.f. https://nodejs.org/api/http.html#http_message_headers +var ignoreDuplicateOf = [ + 'age', 'authorization', 'content-length', 'content-type', 'etag', + 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', + 'last-modified', 'location', 'max-forwards', 'proxy-authorization', + 'referer', 'retry-after', 'user-agent' +]; + +/** + * Parse headers into an object + * + * ``` + * Date: Wed, 27 Aug 2014 08:58:49 GMT + * Content-Type: application/json + * Connection: keep-alive + * Transfer-Encoding: chunked + * ``` + * + * @param {String} headers Headers needing to be parsed + * @returns {Object} Headers parsed into an object + */ +module.exports = function parseHeaders(headers) { + var parsed = {}; + var key; + var val; + var i; + + if (!headers) { return parsed; } + + utils.forEach(headers.split('\n'), function parser(line) { + i = line.indexOf(':'); + key = utils.trim(line.substr(0, i)).toLowerCase(); + val = utils.trim(line.substr(i + 1)); + + if (key) { + if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) { + return; + } + if (key === 'set-cookie') { + parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]); + } else { + parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; + } + } + }); + + return parsed; +}; diff --git a/test/node_modules/axios/lib/helpers/spread.js b/test/node_modules/axios/lib/helpers/spread.js new file mode 100644 index 0000000..25e3cdd --- /dev/null +++ b/test/node_modules/axios/lib/helpers/spread.js @@ -0,0 +1,27 @@ +'use strict'; + +/** + * Syntactic sugar for invoking a function and expanding an array for arguments. + * + * Common use case would be to use `Function.prototype.apply`. + * + * ```js + * function f(x, y, z) {} + * var args = [1, 2, 3]; + * f.apply(null, args); + * ``` + * + * With `spread` this example can be re-written. + * + * ```js + * spread(function(x, y, z) {})([1, 2, 3]); + * ``` + * + * @param {Function} callback + * @returns {Function} + */ +module.exports = function spread(callback) { + return function wrap(arr) { + return callback.apply(null, arr); + }; +}; diff --git a/test/node_modules/axios/lib/helpers/toFormData.js b/test/node_modules/axios/lib/helpers/toFormData.js new file mode 100644 index 0000000..e21d0a7 --- /dev/null +++ b/test/node_modules/axios/lib/helpers/toFormData.js @@ -0,0 +1,55 @@ +'use strict'; + +function combinedKey(parentKey, elKey) { + return parentKey + '.' + elKey; +} + +function buildFormData(formData, data, parentKey) { + if (Array.isArray(data)) { + data.forEach(function buildArray(el, i) { + buildFormData(formData, el, combinedKey(parentKey, i)); + }); + } else if ( + typeof data === 'object' && + !(data instanceof File || data === null) + ) { + Object.keys(data).forEach(function buildObject(key) { + buildFormData( + formData, + data[key], + parentKey ? combinedKey(parentKey, key) : key + ); + }); + } else { + if (data === undefined) { + return; + } + + var value = + typeof data === 'boolean' || typeof data === 'number' + ? data.toString() + : data; + formData.append(parentKey, value); + } +} + +/** + * convert a data object to FormData + * + * type FormDataPrimitive = string | Blob | number | boolean + * interface FormDataNest { + * [x: string]: FormVal + * } + * + * type FormVal = FormDataNest | FormDataPrimitive + * + * @param {FormVal} data + */ + +module.exports = function getFormData(data) { + var formData = new FormData(); + + buildFormData(formData, data); + + return formData; +}; diff --git a/test/node_modules/axios/lib/helpers/validator.js b/test/node_modules/axios/lib/helpers/validator.js new file mode 100644 index 0000000..a4ec413 --- /dev/null +++ b/test/node_modules/axios/lib/helpers/validator.js @@ -0,0 +1,82 @@ +'use strict'; + +var VERSION = require('../env/data').version; + +var validators = {}; + +// eslint-disable-next-line func-names +['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) { + validators[type] = function validator(thing) { + return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; + }; +}); + +var deprecatedWarnings = {}; + +/** + * Transitional option validator + * @param {function|boolean?} validator - set to false if the transitional option has been removed + * @param {string?} version - deprecated version / removed since version + * @param {string?} message - some message with additional info + * @returns {function} + */ +validators.transitional = function transitional(validator, version, message) { + function formatMessage(opt, desc) { + return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : ''); + } + + // eslint-disable-next-line func-names + return function(value, opt, opts) { + if (validator === false) { + throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : ''))); + } + + if (version && !deprecatedWarnings[opt]) { + deprecatedWarnings[opt] = true; + // eslint-disable-next-line no-console + console.warn( + formatMessage( + opt, + ' has been deprecated since v' + version + ' and will be removed in the near future' + ) + ); + } + + return validator ? validator(value, opt, opts) : true; + }; +}; + +/** + * Assert object's properties type + * @param {object} options + * @param {object} schema + * @param {boolean?} allowUnknown + */ + +function assertOptions(options, schema, allowUnknown) { + if (typeof options !== 'object') { + throw new TypeError('options must be an object'); + } + var keys = Object.keys(options); + var i = keys.length; + while (i-- > 0) { + var opt = keys[i]; + var validator = schema[opt]; + if (validator) { + var value = options[opt]; + var result = value === undefined || validator(value, opt, options); + if (result !== true) { + throw new TypeError('option ' + opt + ' must be ' + result); + } + continue; + } + if (allowUnknown !== true) { + throw Error('Unknown option ' + opt); + } + } +} + +module.exports = { + assertOptions: assertOptions, + validators: validators +}; diff --git a/test/node_modules/axios/lib/utils.js b/test/node_modules/axios/lib/utils.js new file mode 100644 index 0000000..f0f9043 --- /dev/null +++ b/test/node_modules/axios/lib/utils.js @@ -0,0 +1,349 @@ +'use strict'; + +var bind = require('./helpers/bind'); + +// utils is a library of generic helper functions non-specific to axios + +var toString = Object.prototype.toString; + +/** + * Determine if a value is an Array + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an Array, otherwise false + */ +function isArray(val) { + return Array.isArray(val); +} + +/** + * Determine if a value is undefined + * + * @param {Object} val The value to test + * @returns {boolean} True if the value is undefined, otherwise false + */ +function isUndefined(val) { + return typeof val === 'undefined'; +} + +/** + * Determine if a value is a Buffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Buffer, otherwise false + */ +function isBuffer(val) { + return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) + && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val); +} + +/** + * Determine if a value is an ArrayBuffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an ArrayBuffer, otherwise false + */ +function isArrayBuffer(val) { + return toString.call(val) === '[object ArrayBuffer]'; +} + +/** + * Determine if a value is a FormData + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an FormData, otherwise false + */ +function isFormData(val) { + return toString.call(val) === '[object FormData]'; +} + +/** + * Determine if a value is a view on an ArrayBuffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false + */ +function isArrayBufferView(val) { + var result; + if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { + result = ArrayBuffer.isView(val); + } else { + result = (val) && (val.buffer) && (isArrayBuffer(val.buffer)); + } + return result; +} + +/** + * Determine if a value is a String + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a String, otherwise false + */ +function isString(val) { + return typeof val === 'string'; +} + +/** + * Determine if a value is a Number + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Number, otherwise false + */ +function isNumber(val) { + return typeof val === 'number'; +} + +/** + * Determine if a value is an Object + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an Object, otherwise false + */ +function isObject(val) { + return val !== null && typeof val === 'object'; +} + +/** + * Determine if a value is a plain Object + * + * @param {Object} val The value to test + * @return {boolean} True if value is a plain Object, otherwise false + */ +function isPlainObject(val) { + if (toString.call(val) !== '[object Object]') { + return false; + } + + var prototype = Object.getPrototypeOf(val); + return prototype === null || prototype === Object.prototype; +} + +/** + * Determine if a value is a Date + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Date, otherwise false + */ +function isDate(val) { + return toString.call(val) === '[object Date]'; +} + +/** + * Determine if a value is a File + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a File, otherwise false + */ +function isFile(val) { + return toString.call(val) === '[object File]'; +} + +/** + * Determine if a value is a Blob + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Blob, otherwise false + */ +function isBlob(val) { + return toString.call(val) === '[object Blob]'; +} + +/** + * Determine if a value is a Function + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Function, otherwise false + */ +function isFunction(val) { + return toString.call(val) === '[object Function]'; +} + +/** + * Determine if a value is a Stream + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Stream, otherwise false + */ +function isStream(val) { + return isObject(val) && isFunction(val.pipe); +} + +/** + * Determine if a value is a URLSearchParams object + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a URLSearchParams object, otherwise false + */ +function isURLSearchParams(val) { + return toString.call(val) === '[object URLSearchParams]'; +} + +/** + * Trim excess whitespace off the beginning and end of a string + * + * @param {String} str The String to trim + * @returns {String} The String freed of excess whitespace + */ +function trim(str) { + return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, ''); +} + +/** + * Determine if we're running in a standard browser environment + * + * This allows axios to run in a web worker, and react-native. + * Both environments support XMLHttpRequest, but not fully standard globals. + * + * web workers: + * typeof window -> undefined + * typeof document -> undefined + * + * react-native: + * navigator.product -> 'ReactNative' + * nativescript + * navigator.product -> 'NativeScript' or 'NS' + */ +function isStandardBrowserEnv() { + if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || + navigator.product === 'NativeScript' || + navigator.product === 'NS')) { + return false; + } + return ( + typeof window !== 'undefined' && + typeof document !== 'undefined' + ); +} + +/** + * Iterate over an Array or an Object invoking a function for each item. + * + * If `obj` is an Array callback will be called passing + * the value, index, and complete array for each item. + * + * If 'obj' is an Object callback will be called passing + * the value, key, and complete object for each property. + * + * @param {Object|Array} obj The object to iterate + * @param {Function} fn The callback to invoke for each item + */ +function forEach(obj, fn) { + // Don't bother if no value provided + if (obj === null || typeof obj === 'undefined') { + return; + } + + // Force an array if not already something iterable + if (typeof obj !== 'object') { + /*eslint no-param-reassign:0*/ + obj = [obj]; + } + + if (isArray(obj)) { + // Iterate over array values + for (var i = 0, l = obj.length; i < l; i++) { + fn.call(null, obj[i], i, obj); + } + } else { + // Iterate over object keys + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + fn.call(null, obj[key], key, obj); + } + } + } +} + +/** + * Accepts varargs expecting each argument to be an object, then + * immutably merges the properties of each object and returns result. + * + * When multiple objects contain the same key the later object in + * the arguments list will take precedence. + * + * Example: + * + * ```js + * var result = merge({foo: 123}, {foo: 456}); + * console.log(result.foo); // outputs 456 + * ``` + * + * @param {Object} obj1 Object to merge + * @returns {Object} Result of all merge properties + */ +function merge(/* obj1, obj2, obj3, ... */) { + var result = {}; + function assignValue(val, key) { + if (isPlainObject(result[key]) && isPlainObject(val)) { + result[key] = merge(result[key], val); + } else if (isPlainObject(val)) { + result[key] = merge({}, val); + } else if (isArray(val)) { + result[key] = val.slice(); + } else { + result[key] = val; + } + } + + for (var i = 0, l = arguments.length; i < l; i++) { + forEach(arguments[i], assignValue); + } + return result; +} + +/** + * Extends object a by mutably adding to it the properties of object b. + * + * @param {Object} a The object to be extended + * @param {Object} b The object to copy properties from + * @param {Object} thisArg The object to bind function to + * @return {Object} The resulting value of object a + */ +function extend(a, b, thisArg) { + forEach(b, function assignValue(val, key) { + if (thisArg && typeof val === 'function') { + a[key] = bind(val, thisArg); + } else { + a[key] = val; + } + }); + return a; +} + +/** + * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) + * + * @param {string} content with BOM + * @return {string} content value without BOM + */ +function stripBOM(content) { + if (content.charCodeAt(0) === 0xFEFF) { + content = content.slice(1); + } + return content; +} + +module.exports = { + isArray: isArray, + isArrayBuffer: isArrayBuffer, + isBuffer: isBuffer, + isFormData: isFormData, + isArrayBufferView: isArrayBufferView, + isString: isString, + isNumber: isNumber, + isObject: isObject, + isPlainObject: isPlainObject, + isUndefined: isUndefined, + isDate: isDate, + isFile: isFile, + isBlob: isBlob, + isFunction: isFunction, + isStream: isStream, + isURLSearchParams: isURLSearchParams, + isStandardBrowserEnv: isStandardBrowserEnv, + forEach: forEach, + merge: merge, + extend: extend, + trim: trim, + stripBOM: stripBOM +}; diff --git a/test/node_modules/axios/package.json b/test/node_modules/axios/package.json new file mode 100644 index 0000000..32c275c --- /dev/null +++ b/test/node_modules/axios/package.json @@ -0,0 +1,86 @@ +{ + "name": "axios", + "version": "0.26.1", + "description": "Promise based HTTP client for the browser and node.js", + "main": "index.js", + "types": "index.d.ts", + "scripts": { + "test": "grunt test && dtslint", + "start": "node ./sandbox/server.js", + "build": "NODE_ENV=production grunt build", + "preversion": "grunt version && npm test", + "version": "npm run build && git add -A dist && git add CHANGELOG.md bower.json package.json", + "postversion": "git push && git push --tags", + "examples": "node ./examples/server.js", + "coveralls": "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js", + "fix": "eslint --fix lib/**/*.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/axios/axios.git" + }, + "keywords": [ + "xhr", + "http", + "ajax", + "promise", + "node" + ], + "author": "Matt Zabriskie", + "license": "MIT", + "bugs": { + "url": "https://github.com/axios/axios/issues" + }, + "homepage": "https://axios-http.com", + "devDependencies": { + "abortcontroller-polyfill": "^1.5.0", + "coveralls": "^3.0.0", + "dtslint": "^4.1.6", + "es6-promise": "^4.2.4", + "grunt": "^1.3.0", + "grunt-banner": "^0.6.0", + "grunt-cli": "^1.2.0", + "grunt-contrib-clean": "^1.1.0", + "grunt-contrib-watch": "^1.0.0", + "grunt-eslint": "^23.0.0", + "grunt-karma": "^4.0.0", + "grunt-mocha-test": "^0.13.3", + "grunt-webpack": "^4.0.2", + "istanbul-instrumenter-loader": "^1.0.0", + "jasmine-core": "^2.4.1", + "karma": "^6.3.2", + "karma-chrome-launcher": "^3.1.0", + "karma-firefox-launcher": "^2.1.0", + "karma-jasmine": "^1.1.1", + "karma-jasmine-ajax": "^0.1.13", + "karma-safari-launcher": "^1.0.0", + "karma-sauce-launcher": "^4.3.6", + "karma-sinon": "^1.0.5", + "karma-sourcemap-loader": "^0.3.8", + "karma-webpack": "^4.0.2", + "load-grunt-tasks": "^3.5.2", + "minimist": "^1.2.0", + "mocha": "^8.2.1", + "sinon": "^4.5.0", + "terser-webpack-plugin": "^4.2.3", + "typescript": "^4.0.5", + "url-search-params": "^0.10.0", + "webpack": "^4.44.2", + "webpack-dev-server": "^3.11.0" + }, + "browser": { + "./lib/adapters/http.js": "./lib/adapters/xhr.js" + }, + "jsdelivr": "dist/axios.min.js", + "unpkg": "dist/axios.min.js", + "typings": "./index.d.ts", + "dependencies": { + "follow-redirects": "^1.14.8" + }, + "bundlesize": [ + { + "path": "./dist/axios.min.js", + "threshold": "5kB" + } + ] +} diff --git a/test/node_modules/axios/tsconfig.json b/test/node_modules/axios/tsconfig.json new file mode 100644 index 0000000..6665188 --- /dev/null +++ b/test/node_modules/axios/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "module": "es2015", + "lib": ["dom", "es2015"], + "types": [], + "moduleResolution": "node", + "strict": true, + "noEmit": true, + "baseUrl": ".", + "paths": { + "axios": ["."] + } + } +} diff --git a/test/node_modules/axios/tslint.json b/test/node_modules/axios/tslint.json new file mode 100644 index 0000000..3ec44a7 --- /dev/null +++ b/test/node_modules/axios/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dtslint.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/test/node_modules/bech32/LICENSE b/test/node_modules/bech32/LICENSE new file mode 100644 index 0000000..8ae7d39 --- /dev/null +++ b/test/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/test/node_modules/bech32/README.md b/test/node_modules/bech32/README.md new file mode 100644 index 0000000..dce2696 --- /dev/null +++ b/test/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/test/node_modules/bech32/index.d.ts b/test/node_modules/bech32/index.d.ts new file mode 100644 index 0000000..df604d9 --- /dev/null +++ b/test/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/test/node_modules/bech32/index.js b/test/node_modules/bech32/index.js new file mode 100644 index 0000000..9b28fec --- /dev/null +++ b/test/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/test/node_modules/bech32/package.json b/test/node_modules/bech32/package.json new file mode 100644 index 0000000..61cb681 --- /dev/null +++ b/test/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/test/node_modules/bn.js/LICENSE b/test/node_modules/bn.js/LICENSE new file mode 100644 index 0000000..c328f04 --- /dev/null +++ b/test/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/test/node_modules/bn.js/README.md b/test/node_modules/bn.js/README.md new file mode 100644 index 0000000..cc4226f --- /dev/null +++ b/test/node_modules/bn.js/README.md @@ -0,0 +1,214 @@ +# 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. + +## Sponsors + +[![Scout APM](./sponsors/scout-apm.png)](https://scoutapm.com/) +My Open Source work is supported by [Scout APM](https://scoutapm.com/) and +[other sponsors](https://github.com/sponsors/indutny). + +## Notation + +### Prefixes + +There are several prefixes to instructions that affect the way they 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 + +* `n` - the argument of the function must be a plain JavaScript + Number. Decimals are not supported. +* `rn` - both argument and return value of the function are plain JavaScript + Numbers. 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 end 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 +* `BN.max(a, b)` - return `a` if `a` bigger than `b` +* `BN.min(a, b)` - return `a` if `a` less than `b` + +### 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.divmod(b)` - quotient and modulus obtained by dividing +* `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, value)` - set specified bit to `value` +* `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 trick 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 + +### Number Size + +Optimized for elliptic curves that work with 256-bit numbers. +There is no limitation on the size of the numbers. + +## 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/test/node_modules/bn.js/lib/bn.js b/test/node_modules/bn.js/lib/bn.js new file mode 100644 index 0000000..adecc94 --- /dev/null +++ b/test/node_modules/bn.js/lib/bn.js @@ -0,0 +1,3547 @@ +(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); + // '0' - '9' + if (c >= 48 && c <= 57) { + return c - 48; + // 'A' - 'F' + } else if (c >= 65 && c <= 70) { + return c - 55; + // 'a' - 'f' + } else if (c >= 97 && c <= 102) { + return c - 87; + } else { + assert(false, 'Invalid character in ' + string); + } + } + + 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 b = 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) { + b = c - 49 + 0xa; + + // 'A' + } else if (c >= 17) { + b = c - 17 + 0xa; + + // '0' - '9' + } else { + b = c; + } + assert(c >= 0 && b < mul, 'Invalid character'); + r += b; + } + 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; + }; + + function move (dest, src) { + dest.words = src.words; + dest.length = src.length; + dest.negative = src.negative; + dest.red = src.red; + } + + BN.prototype._move = function _move (dest) { + move(dest, this); + }; + + 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; + }; + + // Check Symbol.for because not everywhere where Symbol defined + // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#Browser_compatibility + if (typeof Symbol !== 'undefined' && typeof Symbol.for === 'function') { + try { + BN.prototype[Symbol.for('nodejs.util.inspect.custom')] = inspect; + } catch (e) { + BN.prototype.inspect = inspect; + } + } else { + BN.prototype.inspect = 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; + off += 2; + if (off >= 26) { + off -= 26; + i--; + } + if (carry !== 0 || i !== this.length - 1) { + out = zeros[6 - word.length] + word + out; + } else { + out = word + out; + } + } + 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.modrn(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, 2); + }; + + if (Buffer) { + BN.prototype.toBuffer = function toBuffer (endian, length) { + return this.toArrayLike(Buffer, endian, length); + }; + } + + BN.prototype.toArray = function toArray (endian, length) { + return this.toArrayLike(Array, endian, length); + }; + + var allocate = function allocate (ArrayType, size) { + if (ArrayType.allocUnsafe) { + return ArrayType.allocUnsafe(size); + } + return new ArrayType(size); + }; + + BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) { + this._strip(); + + 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'); + + var res = allocate(ArrayType, reqLength); + var postfix = endian === 'le' ? 'LE' : 'BE'; + this['_toArrayLike' + postfix](res, byteLength); + return res; + }; + + BN.prototype._toArrayLikeLE = function _toArrayLikeLE (res, byteLength) { + var position = 0; + var carry = 0; + + for (var i = 0, shift = 0; i < this.length; i++) { + var word = (this.words[i] << shift) | carry; + + res[position++] = word & 0xff; + if (position < res.length) { + res[position++] = (word >> 8) & 0xff; + } + if (position < res.length) { + res[position++] = (word >> 16) & 0xff; + } + + if (shift === 6) { + if (position < res.length) { + res[position++] = (word >> 24) & 0xff; + } + carry = 0; + shift = 0; + } else { + carry = word >>> 24; + shift += 2; + } + } + + if (position < res.length) { + res[position++] = carry; + + while (position < res.length) { + res[position++] = 0; + } + } + }; + + BN.prototype._toArrayLikeBE = function _toArrayLikeBE (res, byteLength) { + var position = res.length - 1; + var carry = 0; + + for (var i = 0, shift = 0; i < this.length; i++) { + var word = (this.words[i] << shift) | carry; + + res[position--] = word & 0xff; + if (position >= 0) { + res[position--] = (word >> 8) & 0xff; + } + if (position >= 0) { + res[position--] = (word >> 16) & 0xff; + } + + if (shift === 6) { + if (position >= 0) { + res[position--] = (word >> 24) & 0xff; + } + carry = 0; + shift = 0; + } else { + carry = word >>> 24; + shift += 2; + } + } + + if (position >= 0) { + res[position--] = carry; + + while (position >= 0) { + res[position--] = 0; + } + } + }; + + 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] >>> wbit) & 0x01; + } + + 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) { + // Temporary disable, see https://github.com/indutny/bn.js/issues/211 + // var fftm = new FFTM(); + // return fftm.mulp(self, num, out); + return bigMulTo(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) { + var isNegNum = num < 0; + if (isNegNum) num = -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 isNegNum ? this.ineg() : 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.modrn(num.words[0])) + }; + } + + return { + div: this.divn(num.words[0]), + mod: new BN(this.modrn(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.modrn = function modrn (num) { + var isNegNum = num < 0; + if (isNegNum) num = -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 isNegNum ? -acc : acc; + }; + + // WARNING: DEPRECATED + BN.prototype.modn = function modn (num) { + return this.modrn(num); + }; + + // In-place division by number + BN.prototype.idivn = function idivn (num) { + var isNegNum = num < 0; + if (isNegNum) num = -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; + } + + this._strip(); + return isNegNum ? this.ineg() : this; + }; + + 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 a BN v4 instance + r.strip(); + } else { + // r is a 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); + + move(a, a.umod(this.m)._forceRed(this)); + return a; + }; + + 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/test/node_modules/bn.js/package.json b/test/node_modules/bn.js/package.json new file mode 100644 index 0000000..fd038f2 --- /dev/null +++ b/test/node_modules/bn.js/package.json @@ -0,0 +1,39 @@ +{ + "name": "bn.js", + "version": "5.2.1", + "description": "Big number implementation in pure javascript", + "keywords": [ + "BN", + "Big number", + "BigNum", + "Modulo", + "Montgomery" + ], + "homepage": "https://github.com/indutny/bn.js", + "bugs": { + "url": "https://github.com/indutny/bn.js/issues" + }, + "repository": { + "type": "git", + "url": "git@github.com:indutny/bn.js" + }, + "license": "MIT", + "author": "Fedor Indutny ", + "files": [ + "lib/bn.js" + ], + "main": "lib/bn.js", + "browser": { + "buffer": false + }, + "scripts": { + "lint": "standardx", + "test": "npm run lint && npm run unit", + "unit": "mocha --reporter=spec test/*-test.js" + }, + "devDependencies": { + "eslint-plugin-es5": "^1.5.0", + "mocha": "^8.3.0", + "standardx": "^7.0.0" + } +} diff --git a/test/node_modules/brorand/.npmignore b/test/node_modules/brorand/.npmignore new file mode 100644 index 0000000..1ca9571 --- /dev/null +++ b/test/node_modules/brorand/.npmignore @@ -0,0 +1,2 @@ +node_modules/ +npm-debug.log diff --git a/test/node_modules/brorand/README.md b/test/node_modules/brorand/README.md new file mode 100644 index 0000000..f80437d --- /dev/null +++ b/test/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/test/node_modules/brorand/index.js b/test/node_modules/brorand/index.js new file mode 100644 index 0000000..9a0fff4 --- /dev/null +++ b/test/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/test/node_modules/brorand/package.json b/test/node_modules/brorand/package.json new file mode 100644 index 0000000..f213c9d --- /dev/null +++ b/test/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/test/node_modules/brorand/test/api-test.js b/test/node_modules/brorand/test/api-test.js new file mode 100644 index 0000000..b6c876d --- /dev/null +++ b/test/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/test/node_modules/bufferutil/LICENSE b/test/node_modules/bufferutil/LICENSE new file mode 100644 index 0000000..541fa41 --- /dev/null +++ b/test/node_modules/bufferutil/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2011 Einar Otto Stangvik (http://2x.io) + +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/test/node_modules/bufferutil/README.md b/test/node_modules/bufferutil/README.md new file mode 100644 index 0000000..36a4503 --- /dev/null +++ b/test/node_modules/bufferutil/README.md @@ -0,0 +1,78 @@ +# bufferutil + +[![Version npm](https://img.shields.io/npm/v/bufferutil.svg?logo=npm)](https://www.npmjs.com/package/bufferutil) +[![Linux/macOS/Windows Build](https://img.shields.io/github/workflow/status/websockets/bufferutil/CI/master?label=build&logo=github)](https://github.com/websockets/bufferutil/actions?query=workflow%3ACI+branch%3Amaster) + +`bufferutil` is what makes `ws` fast. It provides some utilities to efficiently +perform some operations such as masking and unmasking the data payload of +WebSocket frames. + +## Installation + +``` +npm install bufferutil --save-optional +``` + +The `--save-optional` flag tells npm to save the package in your package.json +under the +[`optionalDependencies`](https://docs.npmjs.com/files/package.json#optionaldependencies) +key. + +## API + +The module exports two functions. + +### `bufferUtil.mask(source, mask, output, offset, length)` + +Masks a buffer using the given masking-key as specified by the WebSocket +protocol. + +#### Arguments + +- `source` - The buffer to mask. +- `mask` - A buffer representing the masking-key. +- `output` - The buffer where to store the result. +- `offset` - The offset at which to start writing. +- `length` - The number of bytes to mask. + +#### Example + +```js +'use strict'; + +const bufferUtil = require('bufferutil'); +const crypto = require('crypto'); + +const source = crypto.randomBytes(10); +const mask = crypto.randomBytes(4); + +bufferUtil.mask(source, mask, source, 0, source.length); +``` + +### `bufferUtil.unmask(buffer, mask)` + +Unmasks a buffer using the given masking-key as specified by the WebSocket +protocol. + +#### Arguments + +- `buffer` - The buffer to unmask. +- `mask` - A buffer representing the masking-key. + +#### Example + +```js +'use strict'; + +const bufferUtil = require('bufferutil'); +const crypto = require('crypto'); + +const buffer = crypto.randomBytes(10); +const mask = crypto.randomBytes(4); + +bufferUtil.unmask(buffer, mask); +``` + +## License + +[MIT](LICENSE) diff --git a/test/node_modules/bufferutil/binding.gyp b/test/node_modules/bufferutil/binding.gyp new file mode 100644 index 0000000..1e97c0c --- /dev/null +++ b/test/node_modules/bufferutil/binding.gyp @@ -0,0 +1,18 @@ +{ + 'targets': [ + { + 'target_name': 'bufferutil', + 'sources': ['src/bufferutil.c'], + 'cflags': ['-std=c99'], + 'conditions': [ + ["OS=='mac'", { + 'xcode_settings': { + 'MACOSX_DEPLOYMENT_TARGET': '10.7', + 'OTHER_CFLAGS': ['-arch x86_64', '-arch arm64'], + 'OTHER_LDFLAGS': ['-arch x86_64', '-arch arm64'] + } + }] + ] + } + ] +} diff --git a/test/node_modules/bufferutil/fallback.js b/test/node_modules/bufferutil/fallback.js new file mode 100644 index 0000000..d28b9e3 --- /dev/null +++ b/test/node_modules/bufferutil/fallback.js @@ -0,0 +1,34 @@ +'use strict'; + +/** + * Masks a buffer using the given mask. + * + * @param {Buffer} source The buffer to mask + * @param {Buffer} mask The mask to use + * @param {Buffer} output The buffer where to store the result + * @param {Number} offset The offset at which to start writing + * @param {Number} length The number of bytes to mask. + * @public + */ +const mask = (source, mask, output, offset, length) => { + for (var i = 0; i < length; i++) { + output[offset + i] = source[i] ^ mask[i & 3]; + } +}; + +/** + * Unmasks a buffer using the given mask. + * + * @param {Buffer} buffer The buffer to unmask + * @param {Buffer} mask The mask to use + * @public + */ +const unmask = (buffer, mask) => { + // Required until https://github.com/nodejs/node/issues/9006 is resolved. + const length = buffer.length; + for (var i = 0; i < length; i++) { + buffer[i] ^= mask[i & 3]; + } +}; + +module.exports = { mask, unmask }; diff --git a/test/node_modules/bufferutil/index.js b/test/node_modules/bufferutil/index.js new file mode 100644 index 0000000..8c30561 --- /dev/null +++ b/test/node_modules/bufferutil/index.js @@ -0,0 +1,7 @@ +'use strict'; + +try { + module.exports = require('node-gyp-build')(__dirname); +} catch (e) { + module.exports = require('./fallback'); +} diff --git a/test/node_modules/bufferutil/package.json b/test/node_modules/bufferutil/package.json new file mode 100644 index 0000000..4c33e67 --- /dev/null +++ b/test/node_modules/bufferutil/package.json @@ -0,0 +1,36 @@ +{ + "name": "bufferutil", + "version": "4.0.7", + "description": "WebSocket buffer utils", + "main": "index.js", + "engines": { + "node": ">=6.14.2" + }, + "scripts": { + "install": "node-gyp-build", + "prebuild": "prebuildify --napi --strip --target=14.0.0", + "prebuild-darwin-x64+arm64": "prebuildify --arch x64+arm64 --napi --strip --target=14.0.0", + "test": "mocha" + }, + "repository": { + "type": "git", + "url": "https://github.com/websockets/bufferutil" + }, + "keywords": [ + "bufferutil" + ], + "author": "Einar Otto Stangvik (http://2x.io)", + "license": "MIT", + "bugs": { + "url": "https://github.com/websockets/bufferutil/issues" + }, + "homepage": "https://github.com/websockets/bufferutil", + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "devDependencies": { + "mocha": "^10.0.0", + "node-gyp": "^9.1.0", + "prebuildify": "^5.0.0" + } +} diff --git a/test/node_modules/bufferutil/prebuilds/darwin-x64+arm64/node.napi.node b/test/node_modules/bufferutil/prebuilds/darwin-x64+arm64/node.napi.node new file mode 100644 index 0000000..824132d Binary files /dev/null and b/test/node_modules/bufferutil/prebuilds/darwin-x64+arm64/node.napi.node differ diff --git a/test/node_modules/bufferutil/prebuilds/linux-x64/node.napi.node b/test/node_modules/bufferutil/prebuilds/linux-x64/node.napi.node new file mode 100644 index 0000000..b96d32d Binary files /dev/null and b/test/node_modules/bufferutil/prebuilds/linux-x64/node.napi.node differ diff --git a/test/node_modules/bufferutil/prebuilds/win32-ia32/node.napi.node b/test/node_modules/bufferutil/prebuilds/win32-ia32/node.napi.node new file mode 100644 index 0000000..aea0bf3 Binary files /dev/null and b/test/node_modules/bufferutil/prebuilds/win32-ia32/node.napi.node differ diff --git a/test/node_modules/bufferutil/prebuilds/win32-x64/node.napi.node b/test/node_modules/bufferutil/prebuilds/win32-x64/node.napi.node new file mode 100644 index 0000000..dd47faa Binary files /dev/null and b/test/node_modules/bufferutil/prebuilds/win32-x64/node.napi.node differ diff --git a/test/node_modules/bufferutil/src/bufferutil.c b/test/node_modules/bufferutil/src/bufferutil.c new file mode 100644 index 0000000..b89f8dd --- /dev/null +++ b/test/node_modules/bufferutil/src/bufferutil.c @@ -0,0 +1,171 @@ +#define NAPI_VERSION 1 +#include +#include + +napi_value Mask(napi_env env, napi_callback_info info) { + napi_status status; + size_t argc = 5; + napi_value argv[5]; + + status = napi_get_cb_info(env, info, &argc, argv, NULL, NULL); + assert(status == napi_ok); + + uint8_t *source; + uint8_t *mask; + uint8_t *destination; + uint32_t offset; + uint32_t length; + + status = napi_get_buffer_info(env, argv[0], (void **)&source, NULL); + assert(status == napi_ok); + + status = napi_get_buffer_info(env, argv[1], (void **)&mask, NULL); + assert(status == napi_ok); + + status = napi_get_buffer_info(env, argv[2], (void **)&destination, NULL); + assert(status == napi_ok); + + status = napi_get_value_uint32(env, argv[3], &offset); + assert(status == napi_ok); + + status = napi_get_value_uint32(env, argv[4], &length); + assert(status == napi_ok); + + destination += offset; + uint32_t index = 0; + + // + // Alignment preamble. + // + while (index < length && ((size_t)source % 8)) { + *destination++ = *source++ ^ mask[index % 4]; + index++; + } + + length -= index; + if (!length) + return NULL; + + // + // Realign mask and convert to 64 bit. + // + uint8_t maskAlignedArray[8]; + + for (uint8_t i = 0; i < 8; i++, index++) { + maskAlignedArray[i] = mask[index % 4]; + } + + // + // Apply 64 bit mask in 8 byte chunks. + // + uint32_t loop = length / 8; + uint64_t *pMask8 = (uint64_t *)maskAlignedArray; + + while (loop--) { + uint64_t *pFrom8 = (uint64_t *)source; + uint64_t *pTo8 = (uint64_t *)destination; + *pTo8 = *pFrom8 ^ *pMask8; + source += 8; + destination += 8; + } + + // + // Apply mask to remaining data. + // + uint8_t *pmaskAlignedArray = maskAlignedArray; + + length %= 8; + while (length--) { + *destination++ = *source++ ^ *pmaskAlignedArray++; + } + + return NULL; +} + +napi_value Unmask(napi_env env, napi_callback_info info) { + napi_status status; + size_t argc = 2; + napi_value argv[2]; + + status = napi_get_cb_info(env, info, &argc, argv, NULL, NULL); + assert(status == napi_ok); + + uint8_t *source; + size_t length; + uint8_t *mask; + + status = napi_get_buffer_info(env, argv[0], (void **)&source, &length); + assert(status == napi_ok); + + status = napi_get_buffer_info(env, argv[1], (void **)&mask, NULL); + assert(status == napi_ok); + + uint32_t index = 0; + + // + // Alignment preamble. + // + while (index < length && ((size_t)source % 8)) { + *source++ ^= mask[index % 4]; + index++; + } + + length -= index; + if (!length) + return NULL; + + // + // Realign mask and convert to 64 bit. + // + uint8_t maskAlignedArray[8]; + + for (uint8_t i = 0; i < 8; i++, index++) { + maskAlignedArray[i] = mask[index % 4]; + } + + // + // Apply 64 bit mask in 8 byte chunks. + // + uint32_t loop = length / 8; + uint64_t *pMask8 = (uint64_t *)maskAlignedArray; + + while (loop--) { + uint64_t *pSource8 = (uint64_t *)source; + *pSource8 ^= *pMask8; + source += 8; + } + + // + // Apply mask to remaining data. + // + uint8_t *pmaskAlignedArray = maskAlignedArray; + + length %= 8; + while (length--) { + *source++ ^= *pmaskAlignedArray++; + } + + return NULL; +} + +napi_value Init(napi_env env, napi_value exports) { + napi_status status; + napi_value mask; + napi_value unmask; + + status = napi_create_function(env, NULL, 0, Mask, NULL, &mask); + assert(status == napi_ok); + + status = napi_create_function(env, NULL, 0, Unmask, NULL, &unmask); + assert(status == napi_ok); + + status = napi_set_named_property(env, exports, "mask", mask); + assert(status == napi_ok); + + status = napi_set_named_property(env, exports, "unmask", unmask); + assert(status == napi_ok); + + return exports; +} + +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/node_modules/d/.editorconfig b/test/node_modules/d/.editorconfig new file mode 100755 index 0000000..cbfa577 --- /dev/null +++ b/test/node_modules/d/.editorconfig @@ -0,0 +1,15 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = tab +trim_trailing_whitespace = true + +[{*.md,*.yml}] +indent_size = 2 +indent_style = space diff --git a/test/node_modules/d/.github/FUNDING.yml b/test/node_modules/d/.github/FUNDING.yml new file mode 100644 index 0000000..bd80ae6 --- /dev/null +++ b/test/node_modules/d/.github/FUNDING.yml @@ -0,0 +1 @@ +tidelift: "npm/d" diff --git a/test/node_modules/d/CHANGELOG.md b/test/node_modules/d/CHANGELOG.md new file mode 100644 index 0000000..d30cc82 --- /dev/null +++ b/test/node_modules/d/CHANGELOG.md @@ -0,0 +1,9 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +### [1.0.1](https://github.com/medikoo/d/compare/v0.1.1...v1.0.1) (2019-06-14) + +## Changelog for previous versions + +See `CHANGES` file diff --git a/test/node_modules/d/CHANGES b/test/node_modules/d/CHANGES new file mode 100644 index 0000000..73234d5 --- /dev/null +++ b/test/node_modules/d/CHANGES @@ -0,0 +1,17 @@ +For recent changelog see CHANGELOG.md + +----- + +v1.0.0 -- 2015.12.04 +- autoBind changes: + - replace `bindTo` argument with options and `resolveContext` option + - Add support `overwriteDefinition` +- Introduce IE11 bug workaround in `lazy` handler + +v0.1.1 -- 2014.04.24 +- Add `autoBind` and `lazy` utilities +- Allow to pass other options to be merged onto created descriptor. + Useful when used with other custom utilties + +v0.1.0 -- 2013.06.20 +Initial (derived from es5-ext project) diff --git a/test/node_modules/d/LICENSE b/test/node_modules/d/LICENSE new file mode 100644 index 0000000..44745e2 --- /dev/null +++ b/test/node_modules/d/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2013-2019, Mariusz Nowak, @medikoo, medikoo.com + +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/test/node_modules/d/README.md b/test/node_modules/d/README.md new file mode 100644 index 0000000..95097d4 --- /dev/null +++ b/test/node_modules/d/README.md @@ -0,0 +1,134 @@ +# D + +## Property descriptor factory + +_Originally derived from [es5-ext](https://github.com/medikoo/es5-ext) package._ + +Defining properties with descriptors is very verbose: + +```javascript +var Account = function () {}; +Object.defineProperties(Account.prototype, { + deposit: { + value: function () { + /* ... */ + }, + configurable: true, + enumerable: false, + writable: true + }, + withdraw: { + value: function () { + /* ... */ + }, + configurable: true, + enumerable: false, + writable: true + }, + balance: { + get: function () { + /* ... */ + }, + configurable: true, + enumerable: false + } +}); +``` + +D cuts that to: + +```javascript +var d = require("d"); + +var Account = function () {}; +Object.defineProperties(Account.prototype, { + deposit: d(function () { + /* ... */ + }), + withdraw: d(function () { + /* ... */ + }), + balance: d.gs(function () { + /* ... */ + }) +}); +``` + +By default, created descriptor follow characteristics of native ES5 properties, and defines values as: + +```javascript +{ configurable: true, enumerable: false, writable: true } +``` + +You can overwrite it by preceding _value_ argument with instruction: + +```javascript +d("c", value); // { configurable: true, enumerable: false, writable: false } +d("ce", value); // { configurable: true, enumerable: true, writable: false } +d("e", value); // { configurable: false, enumerable: true, writable: false } + +// Same way for get/set: +d.gs("e", value); // { configurable: false, enumerable: true } +``` + +### Installation + + $ npm install d + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +### Other utilities + +#### autoBind(obj, props) _(d/auto-bind)_ + +Define methods which will be automatically bound to its instances + +```javascript +var d = require('d'); +var autoBind = require('d/auto-bind'); + +var Foo = function () { this._count = 0; }; +Object.defineProperties(Foo.prototype, autoBind({ + increment: d(function () { ++this._count; }); +})); + +var foo = new Foo(); + +// Increment foo counter on each domEl click +domEl.addEventListener('click', foo.increment, false); +``` + +#### lazy(obj, props) _(d/lazy)_ + +Define lazy properties, which will be resolved on first access + +```javascript +var d = require("d"); +var lazy = require("d/lazy"); + +var Foo = function () {}; +Object.defineProperties(Foo.prototype, lazy({ items: d(function () { return []; }) })); + +var foo = new Foo(); +foo.items.push(1, 2); // foo.items array created and defined directly on foo +``` + +## Tests [![Build Status](https://travis-ci.org/medikoo/d.png)](https://travis-ci.org/medikoo/d) + + $ npm test + +## Security contact information + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. + +--- + +
+ + Get professional support for d with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/test/node_modules/d/auto-bind.js b/test/node_modules/d/auto-bind.js new file mode 100644 index 0000000..a0037fa --- /dev/null +++ b/test/node_modules/d/auto-bind.js @@ -0,0 +1,33 @@ +"use strict"; + +var isValue = require("type/value/is") + , ensureValue = require("type/value/ensure") + , ensurePlainFunction = require("type/plain-function/ensure") + , copy = require("es5-ext/object/copy") + , normalizeOptions = require("es5-ext/object/normalize-options") + , map = require("es5-ext/object/map"); + +var bind = Function.prototype.bind + , defineProperty = Object.defineProperty + , hasOwnProperty = Object.prototype.hasOwnProperty + , define; + +define = function (name, desc, options) { + var value = ensureValue(desc) && ensurePlainFunction(desc.value), dgs; + dgs = copy(desc); + delete dgs.writable; + delete dgs.value; + dgs.get = function () { + if (!options.overwriteDefinition && hasOwnProperty.call(this, name)) return value; + desc.value = bind.call(value, options.resolveContext ? options.resolveContext(this) : this); + defineProperty(this, name, desc); + return this[name]; + }; + return dgs; +}; + +module.exports = function (props/*, options*/) { + var options = normalizeOptions(arguments[1]); + if (isValue(options.resolveContext)) ensurePlainFunction(options.resolveContext); + return map(props, function (desc, name) { return define(name, desc, options); }); +}; diff --git a/test/node_modules/d/index.js b/test/node_modules/d/index.js new file mode 100644 index 0000000..b05448b --- /dev/null +++ b/test/node_modules/d/index.js @@ -0,0 +1,62 @@ +"use strict"; + +var isValue = require("type/value/is") + , isPlainFunction = require("type/plain-function/is") + , assign = require("es5-ext/object/assign") + , normalizeOpts = require("es5-ext/object/normalize-options") + , contains = require("es5-ext/string/#/contains"); + +var d = (module.exports = function (dscr, value/*, options*/) { + var c, e, w, options, desc; + if (arguments.length < 2 || typeof dscr !== "string") { + options = value; + value = dscr; + dscr = null; + } else { + options = arguments[2]; + } + if (isValue(dscr)) { + c = contains.call(dscr, "c"); + e = contains.call(dscr, "e"); + w = contains.call(dscr, "w"); + } else { + c = w = true; + e = false; + } + + desc = { value: value, configurable: c, enumerable: e, writable: w }; + return !options ? desc : assign(normalizeOpts(options), desc); +}); + +d.gs = function (dscr, get, set/*, options*/) { + var c, e, options, desc; + if (typeof dscr !== "string") { + options = set; + set = get; + get = dscr; + dscr = null; + } else { + options = arguments[3]; + } + if (!isValue(get)) { + get = undefined; + } else if (!isPlainFunction(get)) { + options = get; + get = set = undefined; + } else if (!isValue(set)) { + set = undefined; + } else if (!isPlainFunction(set)) { + options = set; + set = undefined; + } + if (isValue(dscr)) { + c = contains.call(dscr, "c"); + e = contains.call(dscr, "e"); + } else { + c = true; + e = false; + } + + desc = { get: get, set: set, configurable: c, enumerable: e }; + return !options ? desc : assign(normalizeOpts(options), desc); +}; diff --git a/test/node_modules/d/lazy.js b/test/node_modules/d/lazy.js new file mode 100644 index 0000000..bae0d6a --- /dev/null +++ b/test/node_modules/d/lazy.js @@ -0,0 +1,115 @@ +"use strict"; + +var isPlainFunction = require("type/plain-function/is") + , ensureValue = require("type/value/ensure") + , isValue = require("type/value/is") + , map = require("es5-ext/object/map") + , contains = require("es5-ext/string/#/contains"); + +var call = Function.prototype.call + , defineProperty = Object.defineProperty + , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor + , getPrototypeOf = Object.getPrototypeOf + , hasOwnProperty = Object.prototype.hasOwnProperty + , cacheDesc = { configurable: false, enumerable: false, writable: false, value: null } + , define; + +define = function (name, options) { + var value, dgs, cacheName, desc, writable = false, resolvable, flat; + options = Object(ensureValue(options)); + cacheName = options.cacheName; + flat = options.flat; + if (!isValue(cacheName)) cacheName = name; + delete options.cacheName; + value = options.value; + resolvable = isPlainFunction(value); + delete options.value; + dgs = { configurable: Boolean(options.configurable), enumerable: Boolean(options.enumerable) }; + if (name !== cacheName) { + dgs.get = function () { + if (hasOwnProperty.call(this, cacheName)) return this[cacheName]; + cacheDesc.value = resolvable ? call.call(value, this, options) : value; + cacheDesc.writable = writable; + defineProperty(this, cacheName, cacheDesc); + cacheDesc.value = null; + if (desc) defineProperty(this, name, desc); + return this[cacheName]; + }; + } else if (!flat) { + dgs.get = function self() { + var ownDesc; + if (hasOwnProperty.call(this, name)) { + ownDesc = getOwnPropertyDescriptor(this, name); + // It happens in Safari, that getter is still called after property + // was defined with a value, following workarounds that + // While in IE11 it may happen that here ownDesc is undefined (go figure) + if (ownDesc) { + if (ownDesc.hasOwnProperty("value")) return ownDesc.value; + if (typeof ownDesc.get === "function" && ownDesc.get !== self) { + return ownDesc.get.call(this); + } + return value; + } + } + desc.value = resolvable ? call.call(value, this, options) : value; + defineProperty(this, name, desc); + desc.value = null; + return this[name]; + }; + } else { + dgs.get = function self() { + var base = this, ownDesc; + if (hasOwnProperty.call(this, name)) { + // It happens in Safari, that getter is still called after property + // was defined with a value, following workarounds that + ownDesc = getOwnPropertyDescriptor(this, name); + if (ownDesc.hasOwnProperty("value")) return ownDesc.value; + if (typeof ownDesc.get === "function" && ownDesc.get !== self) { + return ownDesc.get.call(this); + } + } + while (!hasOwnProperty.call(base, name)) base = getPrototypeOf(base); + desc.value = resolvable ? call.call(value, base, options) : value; + defineProperty(base, name, desc); + desc.value = null; + return base[name]; + }; + } + dgs.set = function (value) { + if (hasOwnProperty.call(this, name)) { + throw new TypeError("Cannot assign to lazy defined '" + name + "' property of " + this); + } + dgs.get.call(this); + this[cacheName] = value; + }; + if (options.desc) { + desc = { + configurable: contains.call(options.desc, "c"), + enumerable: contains.call(options.desc, "e") + }; + if (cacheName === name) { + desc.writable = contains.call(options.desc, "w"); + desc.value = null; + } else { + writable = contains.call(options.desc, "w"); + desc.get = dgs.get; + desc.set = dgs.set; + } + delete options.desc; + } else if (cacheName === name) { + desc = { + configurable: Boolean(options.configurable), + enumerable: Boolean(options.enumerable), + writable: Boolean(options.writable), + value: null + }; + } + delete options.configurable; + delete options.enumerable; + delete options.writable; + return dgs; +}; + +module.exports = function (props) { + return map(props, function (desc, name) { return define(name, desc); }); +}; diff --git a/test/node_modules/d/package.json b/test/node_modules/d/package.json new file mode 100644 index 0000000..e0370df --- /dev/null +++ b/test/node_modules/d/package.json @@ -0,0 +1,72 @@ +{ + "name": "d", + "version": "1.0.1", + "description": "Property descriptor factory", + "author": "Mariusz Nowak (http://www.medikoo.com/)", + "keywords": [ + "descriptor", + "es", + "ecmascript", + "ecma", + "property", + "descriptors", + "meta", + "properties" + ], + "repository": { + "type": "git", + "url": "git://github.com/medikoo/d.git" + }, + "dependencies": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + }, + "devDependencies": { + "eslint": "^5.16.0", + "eslint-config-medikoo": "^2.3.0", + "git-list-updated": "^1.1.2", + "husky": "^2.4.1", + "lint-staged": "^8.2.1", + "prettier-elastic": "^1.18.2", + "tad": "^2.0.1" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "*.js": [ + "eslint" + ], + "*.{css,html,js,json,md,yaml,yml}": [ + "prettier -c" + ] + }, + "eslintConfig": { + "extends": "medikoo/es5", + "root": true + }, + "prettier": { + "printWidth": 100, + "tabWidth": 4, + "overrides": [ + { + "files": [ + "*.md" + ], + "options": { + "tabWidth": 2 + } + } + ] + }, + "scripts": { + "lint": "eslint --ignore-path=.gitignore .", + "lint-updated": "pipe-git-updated --ext=js -- eslint --ignore-pattern '!*'", + "prettier-check-updated": "pipe-git-updated --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier -c", + "prettify": "prettier --write --ignore-path .gitignore '**/*.{css,html,js,json,md,yaml,yml}'", + "test": "node node_modules/tad/bin/tad" + }, + "license": "ISC" +} diff --git a/test/node_modules/d/test/auto-bind.js b/test/node_modules/d/test/auto-bind.js new file mode 100644 index 0000000..993308e --- /dev/null +++ b/test/node_modules/d/test/auto-bind.js @@ -0,0 +1,11 @@ +"use strict"; + +var d = require("../"); + +module.exports = function (t, a) { + var o = Object.defineProperties( + {}, t({ bar: d(function () { return this === o; }), bar2: d(function () { return this; }) }) + ); + + a.deep([o.bar(), o.bar2()], [true, o]); +}; diff --git a/test/node_modules/d/test/index.js b/test/node_modules/d/test/index.js new file mode 100644 index 0000000..43e61a3 --- /dev/null +++ b/test/node_modules/d/test/index.js @@ -0,0 +1,209 @@ +"use strict"; + +var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + +module.exports = function (t, a) { + var o, c, cg, cs, ce, ceg, ces, cew, cw, e, eg, es, ew, v, vg, vs, w, df, dfg, dfs; + + o = Object.create(Object.prototype, { + c: t("c", (c = {})), + cgs: t.gs("c", (cg = function () {}), (cs = function () {})), + ce: t("ce", (ce = {})), + cegs: t.gs("ce", (ceg = function () {}), (ces = function () {})), + cew: t("cew", (cew = {})), + cw: t("cw", (cw = {})), + e: t("e", (e = {})), + egs: t.gs("e", (eg = function () {}), (es = function () {})), + ew: t("ew", (ew = {})), + v: t("", (v = {})), + vgs: t.gs("", (vg = function () {}), (vs = function () {})), + w: t("w", (w = {})), + + df: t((df = {})), + dfgs: t.gs((dfg = function () {}), (dfs = function () {})) + }); + + return { + c: function (a) { + var d = getOwnPropertyDescriptor(o, "c"); + a(d.value, c, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, true, "Configurable"); + a(d.enumerable, false, "Enumerable"); + a(d.writable, false, "Writable"); + + d = getOwnPropertyDescriptor(o, "cgs"); + a(d.value, undefined, "GS Value"); + a(d.get, cg, "GS Get"); + a(d.set, cs, "GS Set"); + a(d.configurable, true, "GS Configurable"); + a(d.enumerable, false, "GS Enumerable"); + a(d.writable, undefined, "GS Writable"); + }, + ce: function (a) { + var d = getOwnPropertyDescriptor(o, "ce"); + a(d.value, ce, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, true, "Configurable"); + a(d.enumerable, true, "Enumerable"); + a(d.writable, false, "Writable"); + + d = getOwnPropertyDescriptor(o, "cegs"); + a(d.value, undefined, "GS Value"); + a(d.get, ceg, "GS Get"); + a(d.set, ces, "GS Set"); + a(d.configurable, true, "GS Configurable"); + a(d.enumerable, true, "GS Enumerable"); + a(d.writable, undefined, "GS Writable"); + }, + cew: function (a) { + var d = getOwnPropertyDescriptor(o, "cew"); + a(d.value, cew, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, true, "Configurable"); + a(d.enumerable, true, "Enumerable"); + a(d.writable, true, "Writable"); + }, + cw: function (a) { + var d = getOwnPropertyDescriptor(o, "cw"); + a(d.value, cw, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, true, "Configurable"); + a(d.enumerable, false, "Enumerable"); + a(d.writable, true, "Writable"); + }, + e: function (a) { + var d = getOwnPropertyDescriptor(o, "e"); + a(d.value, e, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, false, "Configurable"); + a(d.enumerable, true, "Enumerable"); + a(d.writable, false, "Writable"); + + d = getOwnPropertyDescriptor(o, "egs"); + a(d.value, undefined, "GS Value"); + a(d.get, eg, "GS Get"); + a(d.set, es, "GS Set"); + a(d.configurable, false, "GS Configurable"); + a(d.enumerable, true, "GS Enumerable"); + a(d.writable, undefined, "GS Writable"); + }, + ew: function (a) { + var d = getOwnPropertyDescriptor(o, "ew"); + a(d.value, ew, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, false, "Configurable"); + a(d.enumerable, true, "Enumerable"); + a(d.writable, true, "Writable"); + }, + v: function (a) { + var d = getOwnPropertyDescriptor(o, "v"); + a(d.value, v, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, false, "Configurable"); + a(d.enumerable, false, "Enumerable"); + a(d.writable, false, "Writable"); + + d = getOwnPropertyDescriptor(o, "vgs"); + a(d.value, undefined, "GS Value"); + a(d.get, vg, "GS Get"); + a(d.set, vs, "GS Set"); + a(d.configurable, false, "GS Configurable"); + a(d.enumerable, false, "GS Enumerable"); + a(d.writable, undefined, "GS Writable"); + }, + w: function (a) { + var d = getOwnPropertyDescriptor(o, "w"); + a(d.value, w, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, false, "Configurable"); + a(d.enumerable, false, "Enumerable"); + a(d.writable, true, "Writable"); + }, + d: function (a) { + var d = getOwnPropertyDescriptor(o, "df"); + a(d.value, df, "Value"); + a(d.get, undefined, "Get"); + a(d.set, undefined, "Set"); + a(d.configurable, true, "Configurable"); + a(d.enumerable, false, "Enumerable"); + a(d.writable, true, "Writable"); + + d = getOwnPropertyDescriptor(o, "dfgs"); + a(d.value, undefined, "GS Value"); + a(d.get, dfg, "GS Get"); + a(d.set, dfs, "GS Set"); + a(d.configurable, true, "GS Configurable"); + a(d.enumerable, false, "GS Enumerable"); + a(d.writable, undefined, "GS Writable"); + }, + Options: { + v: function (a) { + var x = {}, d = t(x, { foo: true }); + a.deep( + d, + { configurable: true, enumerable: false, writable: true, value: x, foo: true }, + "No descriptor" + ); + d = t("c", "foo", { marko: "elo" }); + a.deep( + d, + { + configurable: true, + enumerable: false, + writable: false, + value: "foo", + marko: "elo" + }, + "Descriptor" + ); + }, + gs: function (a) { + var gFn = function () {}, sFn = function () {}, d; + d = t.gs(gFn, sFn, { foo: true }); + a.deep( + d, { configurable: true, enumerable: false, get: gFn, set: sFn, foo: true }, + "No descriptor" + ); + d = t.gs(null, sFn, { foo: true }); + a.deep( + d, + { configurable: true, enumerable: false, get: undefined, set: sFn, foo: true }, + "No descriptor: Just set" + ); + d = t.gs(gFn, { foo: true }); + a.deep( + d, + { configurable: true, enumerable: false, get: gFn, set: undefined, foo: true }, + "No descriptor: Just get" + ); + + d = t.gs("e", gFn, sFn, { bar: true }); + a.deep( + d, { configurable: false, enumerable: true, get: gFn, set: sFn, bar: true }, + "Descriptor" + ); + d = t.gs("e", null, sFn, { bar: true }); + a.deep( + d, + { configurable: false, enumerable: true, get: undefined, set: sFn, bar: true }, + "Descriptor: Just set" + ); + d = t.gs("e", gFn, { bar: true }); + a.deep( + d, + { configurable: false, enumerable: true, get: gFn, set: undefined, bar: true }, + "Descriptor: Just get" + ); + } + } + }; +}; diff --git a/test/node_modules/d/test/lazy.js b/test/node_modules/d/test/lazy.js new file mode 100644 index 0000000..e446dd5 --- /dev/null +++ b/test/node_modules/d/test/lazy.js @@ -0,0 +1,97 @@ +"use strict"; + +var d = require("../") + , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + +module.exports = function (t, a) { + var Foo = function () {}, i = 1, o, o2, desc; + Object.defineProperties( + Foo.prototype, + t({ + bar: d(function () { return ++i; }), + bar2: d(function () { return this.bar + 23; }), + bar3: d(function () { return this.bar2 + 34; }, { desc: "ew" }), + bar4: d(function () { return this.bar3 + 12; }, { cacheName: "_bar4_" }), + bar5: d(function () { return this.bar4 + 3; }, { cacheName: "_bar5_", desc: "e" }) + }) + ); + + desc = getOwnPropertyDescriptor(Foo.prototype, "bar"); + a(desc.configurable, true, "Configurable: default"); + a(desc.enumerable, false, "Enumerable: default"); + + o = new Foo(); + a.deep([o.bar, o.bar2, o.bar3, o.bar4, o.bar5], [2, 25, 59, 71, 74], "Values"); + + a.deep( + getOwnPropertyDescriptor(o, "bar3"), + { configurable: false, enumerable: true, writable: true, value: 59 }, "Desc" + ); + a(o.hasOwnProperty("bar4"), false, "Cache not exposed"); + desc = getOwnPropertyDescriptor(o, "bar5"); + a.deep( + desc, { configurable: false, enumerable: true, get: desc.get, set: desc.set }, + "Cache & Desc: desc" + ); + + o2 = Object.create(o); + o2.bar = 30; + o2.bar3 = 100; + + a.deep( + [o2.bar, o2.bar2, o2.bar3, o2.bar4, o2.bar5], [30, 25, 100, 112, 115], "Extension Values" + ); + + Foo = function () {}; + Object.defineProperties( + Foo.prototype, + t({ + test: d("w", function () { return "raz"; }), + test2: d("", function () { return "raz"; }, { desc: "w" }), + test3: d("", function () { return "raz"; }, { cacheName: "__test3__", desc: "w" }), + test4: d("w", "bar") + }) + ); + + o = new Foo(); + o.test = "marko"; + a.deep( + getOwnPropertyDescriptor(o, "test"), + { configurable: false, enumerable: false, writable: true, value: "marko" }, "Set before get" + ); + o.test2 = "marko2"; + a.deep( + getOwnPropertyDescriptor(o, "test2"), + { configurable: false, enumerable: false, writable: true, value: "marko2" }, + "Set before get: Custom desc" + ); + o.test3 = "marko3"; + a.deep( + getOwnPropertyDescriptor(o, "__test3__"), + { configurable: false, enumerable: false, writable: true, value: "marko3" }, + "Set before get: Custom cache name" + ); + a(o.test4, "bar", "Resolve by value"); + + a.h1("Flat"); + Object.defineProperties( + Foo.prototype, + t({ + flat: d(function () { return "foo"; }, { flat: true }), + flat2: d(function () { return "bar"; }, { flat: true }) + }) + ); + + a.h2("Instance"); + a(o.flat, "foo", "Value"); + a(o.hasOwnProperty("flat"), false, "Instance"); + a(Foo.prototype.flat, "foo", "Prototype"); + + a.h2("Direct"); + a(Foo.prototype.flat2, "bar"); + + a.h2("Reset direct"); + Object.defineProperties(Foo.prototype, t({ testResetDirect: d(false) })); + + a.throws(function () { Foo.prototype.testResetDirect = false; }, TypeError); +}; diff --git a/test/node_modules/debug/.coveralls.yml b/test/node_modules/debug/.coveralls.yml new file mode 100644 index 0000000..20a7068 --- /dev/null +++ b/test/node_modules/debug/.coveralls.yml @@ -0,0 +1 @@ +repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve diff --git a/test/node_modules/debug/.eslintrc b/test/node_modules/debug/.eslintrc new file mode 100644 index 0000000..8a37ae2 --- /dev/null +++ b/test/node_modules/debug/.eslintrc @@ -0,0 +1,11 @@ +{ + "env": { + "browser": true, + "node": true + }, + "rules": { + "no-console": 0, + "no-empty": [1, { "allowEmptyCatch": true }] + }, + "extends": "eslint:recommended" +} diff --git a/test/node_modules/debug/.npmignore b/test/node_modules/debug/.npmignore new file mode 100644 index 0000000..5f60eec --- /dev/null +++ b/test/node_modules/debug/.npmignore @@ -0,0 +1,9 @@ +support +test +examples +example +*.sock +dist +yarn.lock +coverage +bower.json diff --git a/test/node_modules/debug/.travis.yml b/test/node_modules/debug/.travis.yml new file mode 100644 index 0000000..6c6090c --- /dev/null +++ b/test/node_modules/debug/.travis.yml @@ -0,0 +1,14 @@ + +language: node_js +node_js: + - "6" + - "5" + - "4" + +install: + - make node_modules + +script: + - make lint + - make test + - make coveralls diff --git a/test/node_modules/debug/CHANGELOG.md b/test/node_modules/debug/CHANGELOG.md new file mode 100644 index 0000000..eadaa18 --- /dev/null +++ b/test/node_modules/debug/CHANGELOG.md @@ -0,0 +1,362 @@ + +2.6.9 / 2017-09-22 +================== + + * remove ReDoS regexp in %o formatter (#504) + +2.6.8 / 2017-05-18 +================== + + * Fix: Check for undefined on browser globals (#462, @marbemac) + +2.6.7 / 2017-05-16 +================== + + * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom) + * Fix: Inline extend function in node implementation (#452, @dougwilson) + * Docs: Fix typo (#455, @msasad) + +2.6.5 / 2017-04-27 +================== + + * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek) + * Misc: clean up browser reference checks (#447, @thebigredgeek) + * Misc: add npm-debug.log to .gitignore (@thebigredgeek) + + +2.6.4 / 2017-04-20 +================== + + * Fix: bug that would occure if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo) + * Chore: ignore bower.json in npm installations. (#437, @joaovieira) + * Misc: update "ms" to v0.7.3 (@tootallnate) + +2.6.3 / 2017-03-13 +================== + + * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts) + * Docs: Changelog fix (@thebigredgeek) + +2.6.2 / 2017-03-10 +================== + + * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin) + * Docs: Add backers and sponsors from Open Collective (#422, @piamancini) + * Docs: Add Slackin invite badge (@tootallnate) + +2.6.1 / 2017-02-10 +================== + + * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error + * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0) + * Fix: IE8 "Expected identifier" error (#414, @vgoma) + * Fix: Namespaces would not disable once enabled (#409, @musikov) + +2.6.0 / 2016-12-28 +================== + + * Fix: added better null pointer checks for browser useColors (@thebigredgeek) + * Improvement: removed explicit `window.debug` export (#404, @tootallnate) + * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate) + +2.5.2 / 2016-12-25 +================== + + * Fix: reference error on window within webworkers (#393, @KlausTrainer) + * Docs: fixed README typo (#391, @lurch) + * Docs: added notice about v3 api discussion (@thebigredgeek) + +2.5.1 / 2016-12-20 +================== + + * Fix: babel-core compatibility + +2.5.0 / 2016-12-20 +================== + + * Fix: wrong reference in bower file (@thebigredgeek) + * Fix: webworker compatibility (@thebigredgeek) + * Fix: output formatting issue (#388, @kribblo) + * Fix: babel-loader compatibility (#383, @escwald) + * Misc: removed built asset from repo and publications (@thebigredgeek) + * Misc: moved source files to /src (#378, @yamikuronue) + * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue) + * Test: coveralls integration (#378, @yamikuronue) + * Docs: simplified language in the opening paragraph (#373, @yamikuronue) + +2.4.5 / 2016-12-17 +================== + + * Fix: `navigator` undefined in Rhino (#376, @jochenberger) + * Fix: custom log function (#379, @hsiliev) + * Improvement: bit of cleanup + linting fixes (@thebigredgeek) + * Improvement: rm non-maintainted `dist/` dir (#375, @freewil) + * Docs: simplified language in the opening paragraph. (#373, @yamikuronue) + +2.4.4 / 2016-12-14 +================== + + * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts) + +2.4.3 / 2016-12-14 +================== + + * Fix: navigation.userAgent error for react native (#364, @escwald) + +2.4.2 / 2016-12-14 +================== + + * Fix: browser colors (#367, @tootallnate) + * Misc: travis ci integration (@thebigredgeek) + * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek) + +2.4.1 / 2016-12-13 +================== + + * Fix: typo that broke the package (#356) + +2.4.0 / 2016-12-13 +================== + + * Fix: bower.json references unbuilt src entry point (#342, @justmatt) + * Fix: revert "handle regex special characters" (@tootallnate) + * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate) + * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate) + * Improvement: allow colors in workers (#335, @botverse) + * Improvement: use same color for same namespace. (#338, @lchenay) + +2.3.3 / 2016-11-09 +================== + + * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne) + * Fix: Returning `localStorage` saved values (#331, Levi Thomason) + * Improvement: Don't create an empty object when no `process` (Nathan Rajlich) + +2.3.2 / 2016-11-09 +================== + + * Fix: be super-safe in index.js as well (@TooTallNate) + * Fix: should check whether process exists (Tom Newby) + +2.3.1 / 2016-11-09 +================== + + * Fix: Added electron compatibility (#324, @paulcbetts) + * Improvement: Added performance optimizations (@tootallnate) + * Readme: Corrected PowerShell environment variable example (#252, @gimre) + * Misc: Removed yarn lock file from source control (#321, @fengmk2) + +2.3.0 / 2016-11-07 +================== + + * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic) + * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos) + * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15) + * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran) + * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom) + * Package: Update "ms" to 0.7.2 (#315, @DevSide) + * Package: removed superfluous version property from bower.json (#207 @kkirsche) + * Readme: fix USE_COLORS to DEBUG_COLORS + * Readme: Doc fixes for format string sugar (#269, @mlucool) + * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0) + * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable) + * Readme: better docs for browser support (#224, @matthewmueller) + * Tooling: Added yarn integration for development (#317, @thebigredgeek) + * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek) + * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman) + * Misc: Updated contributors (@thebigredgeek) + +2.2.0 / 2015-05-09 +================== + + * package: update "ms" to v0.7.1 (#202, @dougwilson) + * README: add logging to file example (#193, @DanielOchoa) + * README: fixed a typo (#191, @amir-s) + * browser: expose `storage` (#190, @stephenmathieson) + * Makefile: add a `distclean` target (#189, @stephenmathieson) + +2.1.3 / 2015-03-13 +================== + + * Updated stdout/stderr example (#186) + * Updated example/stdout.js to match debug current behaviour + * Renamed example/stderr.js to stdout.js + * Update Readme.md (#184) + * replace high intensity foreground color for bold (#182, #183) + +2.1.2 / 2015-03-01 +================== + + * dist: recompile + * update "ms" to v0.7.0 + * package: update "browserify" to v9.0.3 + * component: fix "ms.js" repo location + * changed bower package name + * updated documentation about using debug in a browser + * fix: security error on safari (#167, #168, @yields) + +2.1.1 / 2014-12-29 +================== + + * browser: use `typeof` to check for `console` existence + * browser: check for `console.log` truthiness (fix IE 8/9) + * browser: add support for Chrome apps + * Readme: added Windows usage remarks + * Add `bower.json` to properly support bower install + +2.1.0 / 2014-10-15 +================== + + * node: implement `DEBUG_FD` env variable support + * package: update "browserify" to v6.1.0 + * package: add "license" field to package.json (#135, @panuhorsmalahti) + +2.0.0 / 2014-09-01 +================== + + * package: update "browserify" to v5.11.0 + * node: use stderr rather than stdout for logging (#29, @stephenmathieson) + +1.0.4 / 2014-07-15 +================== + + * dist: recompile + * example: remove `console.info()` log usage + * example: add "Content-Type" UTF-8 header to browser example + * browser: place %c marker after the space character + * browser: reset the "content" color via `color: inherit` + * browser: add colors support for Firefox >= v31 + * debug: prefer an instance `log()` function over the global one (#119) + * Readme: update documentation about styled console logs for FF v31 (#116, @wryk) + +1.0.3 / 2014-07-09 +================== + + * Add support for multiple wildcards in namespaces (#122, @seegno) + * browser: fix lint + +1.0.2 / 2014-06-10 +================== + + * browser: update color palette (#113, @gscottolson) + * common: make console logging function configurable (#108, @timoxley) + * node: fix %o colors on old node <= 0.8.x + * Makefile: find node path using shell/which (#109, @timoxley) + +1.0.1 / 2014-06-06 +================== + + * browser: use `removeItem()` to clear localStorage + * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777) + * package: add "contributors" section + * node: fix comment typo + * README: list authors + +1.0.0 / 2014-06-04 +================== + + * make ms diff be global, not be scope + * debug: ignore empty strings in enable() + * node: make DEBUG_COLORS able to disable coloring + * *: export the `colors` array + * npmignore: don't publish the `dist` dir + * Makefile: refactor to use browserify + * package: add "browserify" as a dev dependency + * Readme: add Web Inspector Colors section + * node: reset terminal color for the debug content + * node: map "%o" to `util.inspect()` + * browser: map "%j" to `JSON.stringify()` + * debug: add custom "formatters" + * debug: use "ms" module for humanizing the diff + * Readme: add "bash" syntax highlighting + * browser: add Firebug color support + * browser: add colors for WebKit browsers + * node: apply log to `console` + * rewrite: abstract common logic for Node & browsers + * add .jshintrc file + +0.8.1 / 2014-04-14 +================== + + * package: re-add the "component" section + +0.8.0 / 2014-03-30 +================== + + * add `enable()` method for nodejs. Closes #27 + * change from stderr to stdout + * remove unnecessary index.js file + +0.7.4 / 2013-11-13 +================== + + * remove "browserify" key from package.json (fixes something in browserify) + +0.7.3 / 2013-10-30 +================== + + * fix: catch localStorage security error when cookies are blocked (Chrome) + * add debug(err) support. Closes #46 + * add .browser prop to package.json. Closes #42 + +0.7.2 / 2013-02-06 +================== + + * fix package.json + * fix: Mobile Safari (private mode) is broken with debug + * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript + +0.7.1 / 2013-02-05 +================== + + * add repository URL to package.json + * add DEBUG_COLORED to force colored output + * add browserify support + * fix component. Closes #24 + +0.7.0 / 2012-05-04 +================== + + * Added .component to package.json + * Added debug.component.js build + +0.6.0 / 2012-03-16 +================== + + * Added support for "-" prefix in DEBUG [Vinay Pulim] + * Added `.enabled` flag to the node version [TooTallNate] + +0.5.0 / 2012-02-02 +================== + + * Added: humanize diffs. Closes #8 + * Added `debug.disable()` to the CS variant + * Removed padding. Closes #10 + * Fixed: persist client-side variant again. Closes #9 + +0.4.0 / 2012-02-01 +================== + + * Added browser variant support for older browsers [TooTallNate] + * Added `debug.enable('project:*')` to browser variant [TooTallNate] + * Added padding to diff (moved it to the right) + +0.3.0 / 2012-01-26 +================== + + * Added millisecond diff when isatty, otherwise UTC string + +0.2.0 / 2012-01-22 +================== + + * Added wildcard support + +0.1.0 / 2011-12-02 +================== + + * Added: remove colors unless stderr isatty [TooTallNate] + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/test/node_modules/debug/LICENSE b/test/node_modules/debug/LICENSE new file mode 100644 index 0000000..658c933 --- /dev/null +++ b/test/node_modules/debug/LICENSE @@ -0,0 +1,19 @@ +(The MIT License) + +Copyright (c) 2014 TJ Holowaychuk + +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/test/node_modules/debug/Makefile b/test/node_modules/debug/Makefile new file mode 100644 index 0000000..584da8b --- /dev/null +++ b/test/node_modules/debug/Makefile @@ -0,0 +1,50 @@ +# get Makefile directory name: http://stackoverflow.com/a/5982798/376773 +THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) +THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) + +# BIN directory +BIN := $(THIS_DIR)/node_modules/.bin + +# Path +PATH := node_modules/.bin:$(PATH) +SHELL := /bin/bash + +# applications +NODE ?= $(shell which node) +YARN ?= $(shell which yarn) +PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm)) +BROWSERIFY ?= $(NODE) $(BIN)/browserify + +.FORCE: + +install: node_modules + +node_modules: package.json + @NODE_ENV= $(PKG) install + @touch node_modules + +lint: .FORCE + eslint browser.js debug.js index.js node.js + +test-node: .FORCE + istanbul cover node_modules/mocha/bin/_mocha -- test/**.js + +test-browser: .FORCE + mkdir -p dist + + @$(BROWSERIFY) \ + --standalone debug \ + . > dist/debug.js + + karma start --single-run + rimraf dist + +test: .FORCE + concurrently \ + "make test-node" \ + "make test-browser" + +coveralls: + cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js + +.PHONY: all install clean distclean diff --git a/test/node_modules/debug/README.md b/test/node_modules/debug/README.md new file mode 100644 index 0000000..f67be6b --- /dev/null +++ b/test/node_modules/debug/README.md @@ -0,0 +1,312 @@ +# debug +[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/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 node.js debugging utility modelled after node core's debugging technique. + +**Discussion around the V3 API is under way [here](https://github.com/visionmedia/debug/issues/370)** + +## 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_: + +```js +var debug = require('debug')('http') + , http = require('http') + , name = 'My App'; + +// fake app + +debug('booting %s', 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_: + +```js +var debug = require('debug')('worker'); + +setInterval(function(){ + debug('doing some work'); +}, 1000); +``` + + The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples: + + ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png) + + ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png) + +#### Windows note + + On Windows the environment variable is set using the `set` command. + + ```cmd + set DEBUG=*,-not_this + ``` + + Note that PowerShell uses different syntax to set environment variables. + + ```cmd + $env:DEBUG = "*,-not_this" + ``` + +Then, run the program to be debugged as usual. + +## 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. + + ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png) + + When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below: + + ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png) + +## 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". + +## 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_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); +``` + +#### Web Inspector Colors + + 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). + + Colored output looks something like: + + ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png) + + +## Output streams + + By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: + +Example _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'); +``` + + +## Authors + + - TJ Holowaychuk + - Nathan Rajlich + - Andrew Rhyne + +## 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-2016 TJ Holowaychuk <tj@vision-media.ca> + +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/test/node_modules/debug/component.json b/test/node_modules/debug/component.json new file mode 100644 index 0000000..9de2641 --- /dev/null +++ b/test/node_modules/debug/component.json @@ -0,0 +1,19 @@ +{ + "name": "debug", + "repo": "visionmedia/debug", + "description": "small debugging utility", + "version": "2.6.9", + "keywords": [ + "debug", + "log", + "debugger" + ], + "main": "src/browser.js", + "scripts": [ + "src/browser.js", + "src/debug.js" + ], + "dependencies": { + "rauchg/ms.js": "0.7.1" + } +} diff --git a/test/node_modules/debug/karma.conf.js b/test/node_modules/debug/karma.conf.js new file mode 100644 index 0000000..103a82d --- /dev/null +++ b/test/node_modules/debug/karma.conf.js @@ -0,0 +1,70 @@ +// Karma configuration +// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC) + +module.exports = function(config) { + config.set({ + + // base path that will be used to resolve all patterns (eg. files, exclude) + basePath: '', + + + // frameworks to use + // available frameworks: https://npmjs.org/browse/keyword/karma-adapter + frameworks: ['mocha', 'chai', 'sinon'], + + + // list of files / patterns to load in the browser + files: [ + 'dist/debug.js', + 'test/*spec.js' + ], + + + // list of files to exclude + exclude: [ + 'src/node.js' + ], + + + // preprocess matching files before serving them to the browser + // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor + preprocessors: { + }, + + // test results reporter to use + // possible values: 'dots', 'progress' + // available reporters: https://npmjs.org/browse/keyword/karma-reporter + reporters: ['progress'], + + + // web server port + port: 9876, + + + // enable / disable colors in the output (reporters and logs) + colors: true, + + + // level of logging + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG + logLevel: config.LOG_INFO, + + + // enable / disable watching file and executing tests whenever any file changes + autoWatch: true, + + + // start these browsers + // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher + browsers: ['PhantomJS'], + + + // Continuous Integration mode + // if true, Karma captures browsers, runs the tests and exits + singleRun: false, + + // Concurrency level + // how many browser should be started simultaneous + concurrency: Infinity + }) +} diff --git a/test/node_modules/debug/node.js b/test/node_modules/debug/node.js new file mode 100644 index 0000000..7fc36fe --- /dev/null +++ b/test/node_modules/debug/node.js @@ -0,0 +1 @@ +module.exports = require('./src/node'); diff --git a/test/node_modules/debug/package.json b/test/node_modules/debug/package.json new file mode 100644 index 0000000..dc787ba --- /dev/null +++ b/test/node_modules/debug/package.json @@ -0,0 +1,49 @@ +{ + "name": "debug", + "version": "2.6.9", + "repository": { + "type": "git", + "url": "git://github.com/visionmedia/debug.git" + }, + "description": "small debugging utility", + "keywords": [ + "debug", + "log", + "debugger" + ], + "author": "TJ Holowaychuk ", + "contributors": [ + "Nathan Rajlich (http://n8.io)", + "Andrew Rhyne " + ], + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + }, + "devDependencies": { + "browserify": "9.0.3", + "chai": "^3.5.0", + "concurrently": "^3.1.0", + "coveralls": "^2.11.15", + "eslint": "^3.12.1", + "istanbul": "^0.4.5", + "karma": "^1.3.0", + "karma-chai": "^0.1.0", + "karma-mocha": "^1.3.0", + "karma-phantomjs-launcher": "^1.0.2", + "karma-sinon": "^1.0.5", + "mocha": "^3.2.0", + "mocha-lcov-reporter": "^1.2.0", + "rimraf": "^2.5.4", + "sinon": "^1.17.6", + "sinon-chai": "^2.8.0" + }, + "main": "./src/index.js", + "browser": "./src/browser.js", + "component": { + "scripts": { + "debug/index.js": "browser.js", + "debug/debug.js": "debug.js" + } + } +} diff --git a/test/node_modules/debug/src/browser.js b/test/node_modules/debug/src/browser.js new file mode 100644 index 0000000..7106924 --- /dev/null +++ b/test/node_modules/debug/src/browser.js @@ -0,0 +1,185 @@ +/** + * This is the web browser implementation of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = require('./debug'); +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = 'undefined' != typeof chrome + && 'undefined' != typeof chrome.storage + ? chrome.storage.local + : localstorage(); + +/** + * Colors. + */ + +exports.colors = [ + 'lightseagreen', + 'forestgreen', + 'goldenrod', + 'dodgerblue', + 'darkorchid', + 'crimson' +]; + +/** + * 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 + */ + +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') { + return true; + } + + // 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+)/)); +} + +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + +exports.formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (err) { + return '[UnexpectedJSONParseError]: ' + err.message; + } +}; + + +/** + * Colorize log arguments if enabled. + * + * @api public + */ + +function formatArgs(args) { + var useColors = this.useColors; + + args[0] = (useColors ? '%c' : '') + + this.namespace + + (useColors ? ' %c' : ' ') + + args[0] + + (useColors ? '%c ' : ' ') + + '+' + exports.humanize(this.diff); + + if (!useColors) return; + + var 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 + var index = 0; + var lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, function(match) { + if ('%%' === match) return; + index++; + if ('%c' === match) { + // we only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); +} + +/** + * Invokes `console.log()` when available. + * No-op when `console.log` is not a "function". + * + * @api public + */ + +function log() { + // this hackery is required for IE8/9, where + // the `console.log` function doesn't have 'apply' + return 'object' === typeof console + && console.log + && Function.prototype.apply.call(console.log, console, arguments); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + +function save(namespaces) { + try { + if (null == namespaces) { + exports.storage.removeItem('debug'); + } else { + exports.storage.debug = namespaces; + } + } catch(e) {} +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + var r; + try { + r = exports.storage.debug; + } catch(e) {} + + // 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; +} + +/** + * Enable namespaces listed in `localStorage.debug` initially. + */ + +exports.enable(load()); + +/** + * 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 { + return window.localStorage; + } catch (e) {} +} diff --git a/test/node_modules/debug/src/debug.js b/test/node_modules/debug/src/debug.js new file mode 100644 index 0000000..6a5e3fc --- /dev/null +++ b/test/node_modules/debug/src/debug.js @@ -0,0 +1,202 @@ + +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = createDebug.debug = createDebug['default'] = createDebug; +exports.coerce = coerce; +exports.disable = disable; +exports.enable = enable; +exports.enabled = enabled; +exports.humanize = require('ms'); + +/** + * The currently active debug mode names, and names to skip. + */ + +exports.names = []; +exports.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". + */ + +exports.formatters = {}; + +/** + * Previous log timestamp. + */ + +var prevTime; + +/** + * Select a color. + * @param {String} namespace + * @return {Number} + * @api private + */ + +function selectColor(namespace) { + var hash = 0, i; + + for (i in namespace) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return exports.colors[Math.abs(hash) % exports.colors.length]; +} + +/** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + +function createDebug(namespace) { + + function debug() { + // disabled? + if (!debug.enabled) return; + + var self = debug; + + // set `diff` timestamp + var curr = +new Date(); + var ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + // turn the `arguments` into a proper Array + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + + args[0] = exports.coerce(args[0]); + + if ('string' !== typeof args[0]) { + // anything else let's inspect with %O + args.unshift('%O'); + } + + // apply any `formatters` transformations + var index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) { + // if we encounter an escaped % then don't increase the array index + if (match === '%%') return match; + index++; + var formatter = exports.formatters[format]; + if ('function' === typeof formatter) { + var 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.) + exports.formatArgs.call(self, args); + + var logFn = debug.log || exports.log || console.log.bind(console); + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.enabled = exports.enabled(namespace); + debug.useColors = exports.useColors(); + debug.color = selectColor(namespace); + + // env-specific initialization logic for debug instances + if ('function' === typeof exports.init) { + exports.init(debug); + } + + return debug; +} + +/** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + +function enable(namespaces) { + exports.save(namespaces); + + exports.names = []; + exports.skips = []; + + var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + var len = split.length; + + for (var i = 0; i < len; i++) { + if (!split[i]) continue; // ignore empty strings + namespaces = split[i].replace(/\*/g, '.*?'); + if (namespaces[0] === '-') { + exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + exports.names.push(new RegExp('^' + namespaces + '$')); + } + } +} + +/** + * Disable debug output. + * + * @api public + */ + +function disable() { + exports.enable(''); +} + +/** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + +function enabled(name) { + var i, len; + for (i = 0, len = exports.skips.length; i < len; i++) { + if (exports.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = exports.names.length; i < len; i++) { + if (exports.names[i].test(name)) { + return true; + } + } + return false; +} + +/** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + +function coerce(val) { + if (val instanceof Error) return val.stack || val.message; + return val; +} diff --git a/test/node_modules/debug/src/index.js b/test/node_modules/debug/src/index.js new file mode 100644 index 0000000..e12cf4d --- /dev/null +++ b/test/node_modules/debug/src/index.js @@ -0,0 +1,10 @@ +/** + * Detect Electron renderer process, which is node, but we should + * treat as a browser. + */ + +if (typeof process !== 'undefined' && process.type === 'renderer') { + module.exports = require('./browser.js'); +} else { + module.exports = require('./node.js'); +} diff --git a/test/node_modules/debug/src/inspector-log.js b/test/node_modules/debug/src/inspector-log.js new file mode 100644 index 0000000..60ea6c0 --- /dev/null +++ b/test/node_modules/debug/src/inspector-log.js @@ -0,0 +1,15 @@ +module.exports = inspectorLog; + +// black hole +const nullStream = new (require('stream').Writable)(); +nullStream._write = () => {}; + +/** + * Outputs a `console.log()` to the Node.js Inspector console *only*. + */ +function inspectorLog() { + const stdout = console._stdout; + console._stdout = nullStream; + console.log.apply(console, arguments); + console._stdout = stdout; +} diff --git a/test/node_modules/debug/src/node.js b/test/node_modules/debug/src/node.js new file mode 100644 index 0000000..b15109c --- /dev/null +++ b/test/node_modules/debug/src/node.js @@ -0,0 +1,248 @@ +/** + * Module dependencies. + */ + +var tty = require('tty'); +var util = require('util'); + +/** + * This is the Node.js implementation of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = require('./debug'); +exports.init = init; +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; + +/** + * Colors. + */ + +exports.colors = [6, 2, 3, 4, 5, 1]; + +/** + * 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(function (key) { + return /^debug_/i.test(key); +}).reduce(function (obj, key) { + // camel-case + var prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() }); + + // coerce string value into JS value + var 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; +}, {}); + +/** + * The file descriptor to write the `debug()` calls to. + * Set the `DEBUG_FD` env variable to override with another value. i.e.: + * + * $ DEBUG_FD=3 node script.js 3>debug.log + */ + +var fd = parseInt(process.env.DEBUG_FD, 10) || 2; + +if (1 !== fd && 2 !== fd) { + util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')() +} + +var stream = 1 === fd ? process.stdout : + 2 === fd ? process.stderr : + createWritableStdioStream(fd); + +/** + * Is stdout a TTY? Colored output is enabled when `true`. + */ + +function useColors() { + return 'colors' in exports.inspectOpts + ? Boolean(exports.inspectOpts.colors) + : tty.isatty(fd); +} + +/** + * Map %o to `util.inspect()`, all on a single line. + */ + +exports.formatters.o = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .split('\n').map(function(str) { + return str.trim() + }).join(' '); +}; + +/** + * Map %o to `util.inspect()`, allowing multiple lines if needed. + */ + +exports.formatters.O = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); +}; + +/** + * Adds ANSI color escape codes if enabled. + * + * @api public + */ + +function formatArgs(args) { + var name = this.namespace; + var useColors = this.useColors; + + if (useColors) { + var c = this.color; + var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m'; + + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m'); + } else { + args[0] = new Date().toUTCString() + + ' ' + name + ' ' + args[0]; + } +} + +/** + * Invokes `util.format()` with the specified arguments and writes to `stream`. + */ + +function log() { + return stream.write(util.format.apply(util, arguments) + '\n'); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + +function save(namespaces) { + if (null == namespaces) { + // 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; + } else { + process.env.DEBUG = namespaces; + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + return process.env.DEBUG; +} + +/** + * Copied from `node/src/node.js`. + * + * XXX: It's lame that node doesn't expose this API out-of-the-box. It also + * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame. + */ + +function createWritableStdioStream (fd) { + var stream; + var tty_wrap = process.binding('tty_wrap'); + + // Note stream._type is used for test-module-load-list.js + + switch (tty_wrap.guessHandleType(fd)) { + case 'TTY': + stream = new tty.WriteStream(fd); + stream._type = 'tty'; + + // Hack to have stream not keep the event loop alive. + // See https://github.com/joyent/node/issues/1726 + if (stream._handle && stream._handle.unref) { + stream._handle.unref(); + } + break; + + case 'FILE': + var fs = require('fs'); + stream = new fs.SyncWriteStream(fd, { autoClose: false }); + stream._type = 'fs'; + break; + + case 'PIPE': + case 'TCP': + var net = require('net'); + stream = new net.Socket({ + fd: fd, + readable: false, + writable: true + }); + + // FIXME Should probably have an option in net.Socket to create a + // stream from an existing fd which is writable only. But for now + // we'll just add this hack and set the `readable` member to false. + // Test: ./node test/fixtures/echo.js < /etc/passwd + stream.readable = false; + stream.read = null; + stream._type = 'pipe'; + + // FIXME Hack to have stream not keep the event loop alive. + // See https://github.com/joyent/node/issues/1726 + if (stream._handle && stream._handle.unref) { + stream._handle.unref(); + } + break; + + default: + // Probably an error on in uv_guess_handle() + throw new Error('Implement me. Unknown stream file type!'); + } + + // For supporting legacy API we put the FD here. + stream.fd = fd; + + stream._isStdio = true; + + return stream; +} + +/** + * 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 = {}; + + var keys = Object.keys(exports.inspectOpts); + for (var i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } +} + +/** + * Enable namespaces listed in `process.env.DEBUG` initially. + */ + +exports.enable(load()); diff --git a/test/node_modules/elliptic/README.md b/test/node_modules/elliptic/README.md new file mode 100644 index 0000000..96219e5 --- /dev/null +++ b/test/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/test/node_modules/elliptic/lib/elliptic.js b/test/node_modules/elliptic/lib/elliptic.js new file mode 100644 index 0000000..dfe2fe7 --- /dev/null +++ b/test/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/test/node_modules/elliptic/lib/elliptic/curve/base.js b/test/node_modules/elliptic/lib/elliptic/curve/base.js new file mode 100644 index 0000000..8543fa8 --- /dev/null +++ b/test/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/test/node_modules/elliptic/lib/elliptic/curve/edwards.js b/test/node_modules/elliptic/lib/elliptic/curve/edwards.js new file mode 100644 index 0000000..6e757c6 --- /dev/null +++ b/test/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/test/node_modules/elliptic/lib/elliptic/curve/index.js b/test/node_modules/elliptic/lib/elliptic/curve/index.js new file mode 100644 index 0000000..c589281 --- /dev/null +++ b/test/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/test/node_modules/elliptic/lib/elliptic/curve/mont.js b/test/node_modules/elliptic/lib/elliptic/curve/mont.js new file mode 100644 index 0000000..4b9f80f --- /dev/null +++ b/test/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/test/node_modules/elliptic/lib/elliptic/curve/short.js b/test/node_modules/elliptic/lib/elliptic/curve/short.js new file mode 100644 index 0000000..eec36ec --- /dev/null +++ b/test/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/test/node_modules/elliptic/lib/elliptic/curves.js b/test/node_modules/elliptic/lib/elliptic/curves.js new file mode 100644 index 0000000..6c36e03 --- /dev/null +++ b/test/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/test/node_modules/elliptic/lib/elliptic/ec/index.js b/test/node_modules/elliptic/lib/elliptic/ec/index.js new file mode 100644 index 0000000..8b58781 --- /dev/null +++ b/test/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/test/node_modules/elliptic/lib/elliptic/ec/key.js b/test/node_modules/elliptic/lib/elliptic/ec/key.js new file mode 100644 index 0000000..55bf299 --- /dev/null +++ b/test/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/test/node_modules/elliptic/lib/elliptic/ec/signature.js b/test/node_modules/elliptic/lib/elliptic/ec/signature.js new file mode 100644 index 0000000..539df6a --- /dev/null +++ b/test/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/test/node_modules/elliptic/lib/elliptic/eddsa/index.js b/test/node_modules/elliptic/lib/elliptic/eddsa/index.js new file mode 100644 index 0000000..d777983 --- /dev/null +++ b/test/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/test/node_modules/elliptic/lib/elliptic/eddsa/key.js b/test/node_modules/elliptic/lib/elliptic/eddsa/key.js new file mode 100644 index 0000000..a00028f --- /dev/null +++ b/test/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/test/node_modules/elliptic/lib/elliptic/eddsa/signature.js b/test/node_modules/elliptic/lib/elliptic/eddsa/signature.js new file mode 100644 index 0000000..30ebc92 --- /dev/null +++ b/test/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/test/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js b/test/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js new file mode 100644 index 0000000..01a7c4d --- /dev/null +++ b/test/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/test/node_modules/elliptic/lib/elliptic/utils.js b/test/node_modules/elliptic/lib/elliptic/utils.js new file mode 100644 index 0000000..627a9f1 --- /dev/null +++ b/test/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/test/node_modules/elliptic/node_modules/bn.js/LICENSE b/test/node_modules/elliptic/node_modules/bn.js/LICENSE new file mode 100644 index 0000000..c328f04 --- /dev/null +++ b/test/node_modules/elliptic/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/test/node_modules/elliptic/node_modules/bn.js/README.md b/test/node_modules/elliptic/node_modules/bn.js/README.md new file mode 100644 index 0000000..aecc3ba --- /dev/null +++ b/test/node_modules/elliptic/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/test/node_modules/elliptic/node_modules/bn.js/lib/bn.js b/test/node_modules/elliptic/node_modules/bn.js/lib/bn.js new file mode 100644 index 0000000..3a4371e --- /dev/null +++ b/test/node_modules/elliptic/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/test/node_modules/elliptic/node_modules/bn.js/package.json b/test/node_modules/elliptic/node_modules/bn.js/package.json new file mode 100644 index 0000000..098b805 --- /dev/null +++ b/test/node_modules/elliptic/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/test/node_modules/elliptic/package.json b/test/node_modules/elliptic/package.json new file mode 100644 index 0000000..7719d33 --- /dev/null +++ b/test/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/test/node_modules/es5-ext/CHANGELOG.md b/test/node_modules/es5-ext/CHANGELOG.md new file mode 100644 index 0000000..60bcd02 --- /dev/null +++ b/test/node_modules/es5-ext/CHANGELOG.md @@ -0,0 +1,389 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +### [0.10.62](https://github.com/medikoo/es5-ext/compare/v0.10.61...v0.10.62) (2022-08-02) + +### Maintenance Improvements + +- **Manifest improvements:** + - ([#190](https://github.com/medikoo/es5-ext/issues/190)) ([b8dc53f](https://github.com/medikoo/es5-ext/commit/b8dc53fa439b98541644c64c1275f25d9f2e2235)) + - ([c51d552](https://github.com/medikoo/es5-ext/commit/c51d552c03967858b8f14a4afa305338ba648cce)) + +### [0.10.61](https://github.com/medikoo/es5-ext/compare/v0.10.60...v0.10.61) (2022-04-20) + +### Bug Fixes + +- Ensure postinstall script does not error ([a0be4fd](https://github.com/medikoo/es5-ext/commit/a0be4fdacdbc3aefd6f2952b7b9215827d362bbb)) + +### Maintenance Improvements + +- Bump dependencies ([d7e0a61](https://github.com/medikoo/es5-ext/commit/d7e0a612b7d895c1c7238c779feae1e39d4634c4)) + +### [0.10.60](https://github.com/medikoo/es5-ext/compare/v0.10.59...v0.10.60) (2022-04-07) + +### Maintenance Improvements + +- Improve `postinstall` script configuration ([ab6b121](https://github.com/medikoo/es5-ext/commit/ab6b121f0ca4f033bba9b6f400b24d07869bd716)) + +### [0.10.59](https://github.com/medikoo/es5-ext/compare/v0.10.58...v0.10.59) (2022-03-17) + +### Maintenance Improvements + +- Improve manifest wording ([#122](https://github.com/medikoo/es5-ext/issues/122)) ([eb7ae59](https://github.com/medikoo/es5-ext/commit/eb7ae59966774a8c26f1717415c627d90bb3d954)) +- Update data in manifest ([3d2935a](https://github.com/medikoo/es5-ext/commit/3d2935ac6f1a0969c7569840d5b3bdeed6940e56)) + +### [0.10.58](https://github.com/medikoo/es5-ext/compare/v0.10.57...v0.10.58) (2022-03-11) + +### Maintenance Improvements + +- Improve "call for peace" manifest ([3beace4](https://github.com/medikoo/es5-ext/commit/3beace4b3d00f02da61b72dd328f90cf069d46de)) + +### [0.10.57](https://github.com/medikoo/es5-ext/compare/v0.10.56...v0.10.57) (2022-03-08) + +### Bug Fixes + +- Workaround `postinstall` script prevent npx error ([#110](https://github.com/medikoo/es5-ext/issues/110)) ([e212d5a](https://github.com/medikoo/es5-ext/commit/e212d5a0adf186f1fadf85fdc07aab25085ee097)) ([martindrq](https://github.com/martindrq)) + +### [0.10.56](https://github.com/medikoo/es5-ext/compare/v0.10.55...v0.10.56) (2022-03-07) + +### Maintenance Improvements + +- Add missing shebang to postinstall script ([e423fd7](https://github.com/medikoo/es5-ext/commit/e423fd7264c4f145921e461037d571b35b6a9833)) + +### [0.10.55](https://github.com/medikoo/es5-ext/compare/v0.10.54...v0.10.55) (2022-03-07) + +### Maintenance Improvements + +- Configure `.npmignore` file (exclude tests from publication) ([d3ed4b6](https://github.com/medikoo/es5-ext/commit/d3ed4b6a873900a2abf3957bbebdcf18c4e564e0)) + +### [0.10.54](https://github.com/medikoo/es5-ext/compare/v0.10.53...v0.10.54) (2022-03-07) + +### Maintenance Improvements + +- Convert dependency ranges ([765eb8e](https://github.com/medikoo/es5-ext/commit/765eb8e897cabc76f0351443d84b4843a1187b27)) +- Give Peace a Chance ([28de285](https://github.com/medikoo/es5-ext/commit/28de285ed433b45113f01e4ce7c74e9a356b2af2)) + +### [0.10.53](https://github.com/medikoo/es5-ext/compare/v0.10.52...v0.10.53) (2019-11-21) + +_Maintenance improvements_ + +### [0.10.52](https://github.com/medikoo/es5-ext/compare/v0.10.51...v0.10.52) (2019-10-29) + +### Bug Fixes + +- Fix global resolution for Safari ([00731d2](https://github.com/medikoo/es5-ext/commit/00731d2)) +- Keep support for old Node.js versions ([2fa2a11](https://github.com/medikoo/es5-ext/commit/2fa2a11)) + +### [0.10.51](https://github.com/medikoo/es5-ext/compare/v0.10.50...v0.10.51) (2019-08-30) + +### Bug Fixes + +- Ensure Function.isFunction recognizes async functions ([6f06e66](https://github.com/medikoo/es5-ext/commit/6f06e66)) + +### Tests + +- Fix after prettification changes ([dd6fc3f](https://github.com/medikoo/es5-ext/commit/dd6fc3f)) + +## [0.10.50](https://github.com/medikoo/es5-ext/compare/v0.10.49...v0.10.50) (2019-04-30) + +### Bug Fixes + +- maximum time value reference ([708202d](https://github.com/medikoo/es5-ext/commit/708202d)) + +### Features + +- ensure global resolves in strict mode ([c6a19d7](https://github.com/medikoo/es5-ext/commit/c6a19d7)), closes [#86](https://github.com/medikoo/es5-ext/issues/86) + +## [0.10.49](https://github.com/medikoo/es5-ext/compare/v0.10.48...v0.10.49) (2019-03-11) + +### Features + +- allow plain function usage of fn.compose ([2bafef7](https://github.com/medikoo/es5-ext/commit/2bafef7)) + +## [0.10.48](https://github.com/medikoo/es5-ext/compare/v0.10.47...v0.10.48) (2019-02-22) + +### Features + +- Object.ensurePlainObject util ([f48fbcf](https://github.com/medikoo/es5-ext/commit/f48fbcf)) + + + +## [0.10.47](https://github.com/medikoo/es5-ext/compare/v0.10.46...v0.10.47) (2019-01-16) + +### Features + +- Promise.prototype.finally shim ([4dadbc7](https://github.com/medikoo/es5-ext/commit/4dadbc7)) + + + +## [0.10.46](https://github.com/medikoo/es5-ext/compare/v0.10.45...v0.10.46) (2018-08-13) + +### Bug Fixes + +- assign-deep to not modify following arguments ([bf43d57](https://github.com/medikoo/es5-ext/commit/bf43d57)) + + + +## [0.10.45](https://github.com/medikoo/es5-ext/compare/v0.10.44...v0.10.45) (2018-06-01) + +### Bug Fixes + +- improve error message readbility ([adc91b9](https://github.com/medikoo/es5-ext/commit/adc91b9)) + + + +## [0.10.44](https://github.com/medikoo/es5-ext/compare/v0.10.43...v0.10.44) (2018-05-30) + +### Features + +- add Object.entries ([51d2f43](https://github.com/medikoo/es5-ext/commit/51d2f43)) + + + +## [0.10.43](https://github.com/medikoo/es5-ext/compare/v0.10.42...v0.10.43) (2018-05-28) + +### Features + +- improve patch string ([6a25b10](https://github.com/medikoo/es5-ext/commit/6a25b10)) + + + +## [0.10.42](https://github.com/medikoo/es5-ext/compare/v0.10.41...v0.10.42) (2018-03-28) + +### Bug Fixes + +- Date.isDate to exclude NaN dates ([3b61bc6](https://github.com/medikoo/es5-ext/commit/3b61bc6)) + +### Features + +- improve non-coercible string representation ([20bfb78](https://github.com/medikoo/es5-ext/commit/20bfb78)) +- improve non-stringifiable string representation ([2e4512d](https://github.com/medikoo/es5-ext/commit/2e4512d)) + + + +## [0.10.41](https://github.com/medikoo/es5-ext/compare/v0.10.40...v0.10.41) (2018-03-16) + +### Features + +- Add function.microtaskDelay method ([66481c0](https://github.com/medikoo/es5-ext/commit/66481c0)) +- Add Object.isThenable ([8d5a45c](https://github.com/medikoo/es5-ext/commit/8d5a45c)) +- Add promise.asCallback method ([dcc1451](https://github.com/medikoo/es5-ext/commit/dcc1451)) +- Object.ensurePlainFunction ([2682be6](https://github.com/medikoo/es5-ext/commit/2682be6)) + + + +## [0.10.40](https://github.com/medikoo/es5-ext/compare/v0.10.39...v0.10.40) (2018-03-09) + +### Features + +- **math:** decimal round, floor and ceil ([39290c6](https://github.com/medikoo/es5-ext/commit/39290c6)) +- **object:** isInteger and ensureInteger ([a5f7d04](https://github.com/medikoo/es5-ext/commit/a5f7d04)) + + + +## [0.10.39](https://github.com/medikoo/es5-ext/compare/v0.10.38...v0.10.39) (2018-02-16) + +### Features + +- Promise.lazy ([7a30a78](https://github.com/medikoo/es5-ext/commit/7a30a78)) + + + +## [0.10.38](https://github.com/medikoo/es5-ext/compare/v0.10.37...v0.10.38) (2018-01-16) + +### Features + +- Object.isNaturalNumber an Object.isNaturalNumberValue ([66a40af](https://github.com/medikoo/es5-ext/commit/66a40af)) + + + +## [0.10.37](https://github.com/medikoo/es5-ext/compare/v0.10.36...v0.10.37) (2017-11-23) + +### Features + +- String.random util ([7c28739](https://github.com/medikoo/es5-ext/commit/7c28739)) + + + +## [0.10.36](https://github.com/medikoo/es5-ext/compare/v0.10.35...v0.10.36) (2017-11-23) + +### Features + +- **date:** isTimeValue and ensureTimeValue utils ([7659dc5](https://github.com/medikoo/es5-ext/commit/7659dc5)) + + + +## [0.10.35](https://github.com/medikoo/es5-ext/compare/v0.10.34...v0.10.35) (2017-10-13) + +### Bug Fixes + +- **Object.copy:** do not upgrade primitives to objects ([dd4d88f](https://github.com/medikoo/es5-ext/commit/dd4d88f)) + + + +## [0.10.34](https://github.com/medikoo/es5-ext/compare/v0.10.33...v0.10.34) (2017-10-13) + +### Features + +- **copyDeep:** duplicate only recursive instances ([bba529a](https://github.com/medikoo/es5-ext/commit/bba529a)) + + + +## [0.10.33](https://github.com/medikoo/es5-ext/compare/v0.10.32...v0.10.33) (2017-10-13) + +### Bug Fixes + +- **Object.assignDeep:** relax input validation ([1baf57d](https://github.com/medikoo/es5-ext/commit/1baf57d)) + + + +## [0.10.32](https://github.com/medikoo/es5-ext/compare/v0.10.31...v0.10.32) (2017-10-13) + +### Features + +- Object.assignDeep ([2345e0b](https://github.com/medikoo/es5-ext/commit/2345e0b)) + + + +## [0.10.31](https://github.com/medikoo/es5-ext/compare/v0.10.30...v0.10.31) (2017-10-09) + +### Features + +- Object.isPlainFunction utility ([031be0a](https://github.com/medikoo/es5-ext/commit/031be0a)) + + + +## [0.10.30](https://github.com/medikoo/es5-ext/compare/v0.10.29...v0.10.30) (2017-08-25) + +### Bug Fixes + +- value stringification for error message ([37bb96b](https://github.com/medikoo/es5-ext/commit/37bb96b)) + + + +## [0.10.29](https://github.com/medikoo/es5-ext/compare/v0.10.28...v0.10.29) (2017-08-18) + +### Bug Fixes + +- string.repeat after recent regression ([b02fab4](https://github.com/medikoo/es5-ext/commit/b02fab4)) + + + +## [0.10.28](https://github.com/medikoo/es5-ext/compare/v0.10.27...v0.10.28) (2017-08-18) + +### Features + +- array.isEmpty method ([b0cfbdd](https://github.com/medikoo/es5-ext/commit/b0cfbdd)) +- improve new lines representation ([860fe8b](https://github.com/medikoo/es5-ext/commit/860fe8b)) +- Object.ensureArray util ([595c341](https://github.com/medikoo/es5-ext/commit/595c341)) +- toShortStringRepresentation util ([6842d06](https://github.com/medikoo/es5-ext/commit/6842d06)) + + + +## [0.10.27](https://github.com/medikoo/es5-ext/compare/v0.10.26...v0.10.27) (2017-08-11) + +### Bug Fixes + +- isNumberValue should not crash on non-coercible values ([0db765e](https://github.com/medikoo/es5-ext/commit/0db765e)) + +### Features + +- add Object.ensureFiniteNumber util ([11c67f5](https://github.com/medikoo/es5-ext/commit/11c67f5)) +- add Object.isFiniteNumber util ([fe5b55a](https://github.com/medikoo/es5-ext/commit/fe5b55a)) + + + +## [0.10.26](https://github.com/medikoo/es5-ext/compare/v0.10.25...v0.10.26) (2017-08-02) + +### Bug Fixes + +- **general:** ensure optionalChaining in index ([3df879a](https://github.com/medikoo/es5-ext/commit/3df879a)) + + + +## [0.10.25](https://github.com/medikoo/es5-ext/compare/v0.10.24...v0.10.25) (2017-08-02) + +### Features + +- **general:** optionalChaining utility ([26332b5](https://github.com/medikoo/es5-ext/commit/26332b5)) + + + +## [0.10.24](https://github.com/medikoo/es5-ext/compare/v0.10.23...v0.10.24) (2017-07-10) + +### Features + +- resolve global with CSP safe method ([d386449](https://github.com/medikoo/es5-ext/commit/d386449)) + + + +## [0.10.23](https://github.com/medikoo/es5-ext/compare/v0.10.22...v0.10.23) (2017-06-05) + +### Bug Fixes + +- **Error.custom:** allow non-string code ([e8db3a0](https://github.com/medikoo/es5-ext/commit/e8db3a0)) +- **Error.custom:** improve `ext` argument detection ([0edbfbc](https://github.com/medikoo/es5-ext/commit/0edbfbc)) + + + +## [0.10.22](https://github.com/medikoo/es5-ext/compare/v0.10.21...v0.10.22) (2017-05-31) + +### Bug Fixes + +- ensure proper symbols stringification in early implementations ([ce51900](https://github.com/medikoo/es5-ext/commit/ce51900)) + + + +## [0.10.21](https://github.com/medikoo/es5-ext/compare/v0.10.20...v0.10.21) (2017-05-22) + +### Features + +- support arrow functions in Function/#/to-tring-tokens.js ([ad3de1e](https://github.com/medikoo/es5-ext/commit/ad3de1e)) + + + +## [0.10.20](https://github.com/medikoo/es5-ext/compare/v0.10.19...v0.10.20) (2017-05-17) + +### Features + +- if listed copy not only if own property ([d7e7cef](https://github.com/medikoo/es5-ext/commit/d7e7cef)) +- support `ensure` option in Object.copy ([295326f](https://github.com/medikoo/es5-ext/commit/295326f)) + + + +## [0.10.19](https://github.com/medikoo/es5-ext/compare/v0.10.18...v0.10.19) (2017-05-17) + +### Features + +- support propertyNames option in Object.copy ([5442279](https://github.com/medikoo/es5-ext/commit/5442279)) + + + +## [0.10.18](https://github.com/medikoo/es5-ext/compare/v0.10.17...v0.10.18) (2017-05-15) + +### Bug Fixes + +- take all changes in safeToString ([3c5cd12](https://github.com/medikoo/es5-ext/commit/3c5cd12)) + + + +## [0.10.17](https://github.com/medikoo/es5-ext/compare/v0.10.16...v0.10.17) (2017-05-15) + +### Features + +- introduce Object.ensurePromise ([46a2f45](https://github.com/medikoo/es5-ext/commit/46a2f45)) +- introduce Object.isPromise ([27aecc8](https://github.com/medikoo/es5-ext/commit/27aecc8)) +- introduce safeToString ([0cc6a7b](https://github.com/medikoo/es5-ext/commit/0cc6a7b)) + + + +## [0.10.16](https://github.com/medikoo/es5-ext/compare/v0.10.15...v0.10.16) (2017-05-09) + +### Features + +- add String.prototype.count ([2e53241](https://github.com/medikoo/es5-ext/commit/2e53241)) + +## Changelog for previous versions + +See `CHANGES` file diff --git a/test/node_modules/es5-ext/LICENSE b/test/node_modules/es5-ext/LICENSE new file mode 100644 index 0000000..7df6b3d --- /dev/null +++ b/test/node_modules/es5-ext/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2011-2022, Mariusz Nowak, @medikoo, medikoo.com + +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/test/node_modules/es5-ext/README.md b/test/node_modules/es5-ext/README.md new file mode 100644 index 0000000..56918cf --- /dev/null +++ b/test/node_modules/es5-ext/README.md @@ -0,0 +1,1039 @@ +[![Build status][build-image]][build-url] +[![Tests coverage][cov-image]][cov-url] +[![npm version][npm-image]][npm-url] + +# es5-ext + +## ECMAScript 5 extensions + +### (with respect to ECMAScript 6 standard) + +Shims for upcoming ES6 standard and other goodies implemented strictly with ECMAScript conventions in mind. + +It's designed to be used in compliant ECMAScript 5 or ECMAScript 6 environments. Older environments are not supported, although most of the features should work with correct ECMAScript 5 shim on board. + +When used in ECMAScript 6 environment, native implementation (if valid) takes precedence over shims. + +### Installation + +```bash +npm install es5-ext +``` + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +### Usage + +#### ECMAScript 6 features + +You can force ES6 features to be implemented in your environment, e.g. following will assign `from` function to `Array` (only if it's not implemented already). + +```javascript +require("es5-ext/array/from/implement"); +Array.from("foo"); // ['f', 'o', 'o'] +``` + +You can also access shims directly, without fixing native objects. Following will return native `Array.from` if it's available and fallback to shim if it's not. + +```javascript +var aFrom = require("es5-ext/array/from"); +aFrom("foo"); // ['f', 'o', 'o'] +``` + +If you want to use shim unconditionally (even if native implementation exists) do: + +```javascript +var aFrom = require("es5-ext/array/from/shim"); +aFrom("foo"); // ['f', 'o', 'o'] +``` + +##### List of ES6 shims + +It's about properties introduced with ES6 and those that have been updated in new spec. + +- `Array.from` -> `require('es5-ext/array/from')` +- `Array.of` -> `require('es5-ext/array/of')` +- `Array.prototype.concat` -> `require('es5-ext/array/#/concat')` +- `Array.prototype.copyWithin` -> `require('es5-ext/array/#/copy-within')` +- `Array.prototype.entries` -> `require('es5-ext/array/#/entries')` +- `Array.prototype.fill` -> `require('es5-ext/array/#/fill')` +- `Array.prototype.filter` -> `require('es5-ext/array/#/filter')` +- `Array.prototype.find` -> `require('es5-ext/array/#/find')` +- `Array.prototype.findIndex` -> `require('es5-ext/array/#/find-index')` +- `Array.prototype.keys` -> `require('es5-ext/array/#/keys')` +- `Array.prototype.map` -> `require('es5-ext/array/#/map')` +- `Array.prototype.slice` -> `require('es5-ext/array/#/slice')` +- `Array.prototype.splice` -> `require('es5-ext/array/#/splice')` +- `Array.prototype.values` -> `require('es5-ext/array/#/values')` +- `Array.prototype[@@iterator]` -> `require('es5-ext/array/#/@@iterator')` +- `Math.acosh` -> `require('es5-ext/math/acosh')` +- `Math.asinh` -> `require('es5-ext/math/asinh')` +- `Math.atanh` -> `require('es5-ext/math/atanh')` +- `Math.cbrt` -> `require('es5-ext/math/cbrt')` +- `Math.clz32` -> `require('es5-ext/math/clz32')` +- `Math.cosh` -> `require('es5-ext/math/cosh')` +- `Math.exmp1` -> `require('es5-ext/math/expm1')` +- `Math.fround` -> `require('es5-ext/math/fround')` +- `Math.hypot` -> `require('es5-ext/math/hypot')` +- `Math.imul` -> `require('es5-ext/math/imul')` +- `Math.log1p` -> `require('es5-ext/math/log1p')` +- `Math.log2` -> `require('es5-ext/math/log2')` +- `Math.log10` -> `require('es5-ext/math/log10')` +- `Math.sign` -> `require('es5-ext/math/sign')` +- `Math.signh` -> `require('es5-ext/math/signh')` +- `Math.tanh` -> `require('es5-ext/math/tanh')` +- `Math.trunc` -> `require('es5-ext/math/trunc')` +- `Number.EPSILON` -> `require('es5-ext/number/epsilon')` +- `Number.MAX_SAFE_INTEGER` -> `require('es5-ext/number/max-safe-integer')` +- `Number.MIN_SAFE_INTEGER` -> `require('es5-ext/number/min-safe-integer')` +- `Number.isFinite` -> `require('es5-ext/number/is-finite')` +- `Number.isInteger` -> `require('es5-ext/number/is-integer')` +- `Number.isNaN` -> `require('es5-ext/number/is-nan')` +- `Number.isSafeInteger` -> `require('es5-ext/number/is-safe-integer')` +- `Object.assign` -> `require('es5-ext/object/assign')` +- `Object.keys` -> `require('es5-ext/object/keys')` +- `Object.setPrototypeOf` -> `require('es5-ext/object/set-prototype-of')` +- `Promise.prototype.finally` -> `require('es5-ext/promise/#/finally')` +- `RegExp.prototype.match` -> `require('es5-ext/reg-exp/#/match')` +- `RegExp.prototype.replace` -> `require('es5-ext/reg-exp/#/replace')` +- `RegExp.prototype.search` -> `require('es5-ext/reg-exp/#/search')` +- `RegExp.prototype.split` -> `require('es5-ext/reg-exp/#/split')` +- `RegExp.prototype.sticky` -> Implement with `require('es5-ext/reg-exp/#/sticky/implement')`, use as function with `require('es5-ext/reg-exp/#/is-sticky')` +- `RegExp.prototype.unicode` -> Implement with `require('es5-ext/reg-exp/#/unicode/implement')`, use as function with `require('es5-ext/reg-exp/#/is-unicode')` +- `String.fromCodePoint` -> `require('es5-ext/string/from-code-point')` +- `String.raw` -> `require('es5-ext/string/raw')` +- `String.prototype.codePointAt` -> `require('es5-ext/string/#/code-point-at')` +- `String.prototype.contains` -> `require('es5-ext/string/#/contains')` +- `String.prototype.endsWith` -> `require('es5-ext/string/#/ends-with')` +- `String.prototype.normalize` -> `require('es5-ext/string/#/normalize')` +- `String.prototype.repeat` -> `require('es5-ext/string/#/repeat')` +- `String.prototype.startsWith` -> `require('es5-ext/string/#/starts-with')` +- `String.prototype[@@iterator]` -> `require('es5-ext/string/#/@@iterator')` + +#### Non ECMAScript standard features + +**es5-ext** provides also other utils, and implements them as if they were proposed for a standard. It mostly offers methods (not functions) which can directly be assigned to native prototypes: + +```javascript +Object.defineProperty(Function.prototype, "partial", { + value: require("es5-ext/function/#/partial"), + configurable: true, + enumerable: false, + writable: true +}); +Object.defineProperty(Array.prototype, "flatten", { + value: require("es5-ext/array/#/flatten"), + configurable: true, + enumerable: false, + writable: true +}); +Object.defineProperty(String.prototype, "capitalize", { + value: require("es5-ext/string/#/capitalize"), + configurable: true, + enumerable: false, + writable: true +}); +``` + +See [es5-extend](https://github.com/wookieb/es5-extend#es5-extend), a great utility that automatically will extend natives for you. + +**Important:** Remember to **not** extend natives in scope of generic reusable packages (e.g. ones you intend to publish to npm). Extending natives is fine **only** if you're the _owner_ of the global scope, so e.g. in final project you lead development of. + +When you're in situation when native extensions are not good idea, then you should use methods indirectly: + +```javascript +var flatten = require("es5-ext/array/#/flatten"); + +flatten.call([1, [2, [3, 4]]]); // [1, 2, 3, 4] +``` + +for better convenience you can turn methods into functions: + +```javascript +var call = Function.prototype.call; +var flatten = call.bind(require("es5-ext/array/#/flatten")); + +flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4] +``` + +You can configure custom toolkit (like [underscorejs](http://underscorejs.org/)), and use it throughout your application + +```javascript +var util = {}; +util.partial = call.bind(require("es5-ext/function/#/partial")); +util.flatten = call.bind(require("es5-ext/array/#/flatten")); +util.startsWith = call.bind(require("es5-ext/string/#/starts-with")); + +util.flatten([1, [2, [3, 4]]]); // [1, 2, 3, 4] +``` + +As with native ones most methods are generic and can be run on any type of object. + +## API + +### Global extensions + +#### global _(es5-ext/global)_ + +Object that represents global scope + +### Array Constructor extensions + +#### from(arrayLike[, mapFn[, thisArg]]) _(es5-ext/array/from)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from). +Returns array representation of _iterable_ or _arrayLike_. If _arrayLike_ is an instance of array, its copy is returned. + +#### generate([length[, …fill]]) _(es5-ext/array/generate)_ + +Generate an array of pre-given _length_ built of repeated arguments. + +#### isPlainArray(x) _(es5-ext/array/is-plain-array)_ + +Returns true if object is plain array (not instance of one of the Array's extensions). + +#### of([…items]) _(es5-ext/array/of)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.of). +Create an array from given arguments. + +#### toArray(obj) _(es5-ext/array/to-array)_ + +Returns array representation of `obj`. If `obj` is already an array, `obj` is returned back. + +#### validArray(obj) _(es5-ext/array/valid-array)_ + +Returns `obj` if it's an array, otherwise throws `TypeError` + +### Array Prototype extensions + +#### arr.binarySearch(compareFn) _(es5-ext/array/#/binary-search)_ + +In **sorted** list search for index of item for which _compareFn_ returns value closest to _0_. +It's variant of binary search algorithm + +#### arr.clear() _(es5-ext/array/#/clear)_ + +Clears the array + +#### arr.compact() _(es5-ext/array/#/compact)_ + +Returns a copy of the context with all non-values (`null` or `undefined`) removed. + +#### arr.concat() _(es5-ext/array/#/concat)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.concat). +ES6's version of `concat`. Supports `isConcatSpreadable` symbol, and returns array of same type as the context. + +#### arr.contains(searchElement[, position]) _(es5-ext/array/#/contains)_ + +Whether list contains the given value. + +#### arr.copyWithin(target, start[, end]) _(es5-ext/array/#/copy-within)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.copywithin). + +#### arr.diff(other) _(es5-ext/array/#/diff)_ + +Returns the array of elements that are present in context list but not present in other list. + +#### arr.eIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-index-of)_ + +_egal_ version of `indexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision + +#### arr.eLastIndexOf(searchElement[, fromIndex]) _(es5-ext/array/#/e-last-index-of)_ + +_egal_ version of `lastIndexOf` method. [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) logic is used for comparision + +#### arr.entries() _(es5-ext/array/#/entries)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.entries). +Returns iterator object, which traverses the array. Each value is represented with an array, where first value is an index and second is corresponding to index value. + +#### arr.exclusion([…lists]]) _(es5-ext/array/#/exclusion)_ + +Returns the array of elements that are found only in one of the lists (either context list or list provided in arguments). + +#### arr.fill(value[, start, end]) _(es5-ext/array/#/fill)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.fill). + +#### arr.filter(callback[, thisArg]) _(es5-ext/array/#/filter)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.filter). +ES6's version of `filter`, returns array of same type as the context. + +#### arr.find(predicate[, thisArg]) _(es5-ext/array/#/find)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.find). +Return first element for which given function returns true + +#### arr.findIndex(predicate[, thisArg]) _(es5-ext/array/#/find-index)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.findindex). +Return first index for which given function returns true + +#### arr.first() _(es5-ext/array/#/first)_ + +Returns value for first defined index + +#### arr.firstIndex() _(es5-ext/array/#/first-index)_ + +Returns first declared index of the array + +#### arr.flatten() _(es5-ext/array/#/flatten)_ + +Returns flattened version of the array + +#### arr.forEachRight(cb[, thisArg]) _(es5-ext/array/#/for-each-right)_ + +`forEach` starting from last element + +#### arr.group(cb[, thisArg]) _(es5-ext/array/#/group)_ + +Group list elements by value returned by _cb_ function + +#### arr.indexesOf(searchElement[, fromIndex]) _(es5-ext/array/#/indexes-of)_ + +Returns array of all indexes of given value + +#### arr.intersection([…lists]) _(es5-ext/array/#/intersection)_ + +Computes the array of values that are the intersection of all lists (context list and lists given in arguments) + +#### arr.isCopy(other) _(es5-ext/array/#/is-copy)_ + +Returns true if both context and _other_ lists have same content + +#### arr.isUniq() _(es5-ext/array/#/is-uniq)_ + +Returns true if all values in array are unique + +#### arr.keys() _(es5-ext/array/#/keys)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.keys). +Returns iterator object, which traverses all array indexes. + +#### arr.last() _(es5-ext/array/#/last)_ + +Returns value of last defined index + +#### arr.lastIndex() _(es5-ext/array/#/last)_ + +Returns last defined index of the array + +#### arr.map(callback[, thisArg]) _(es5-ext/array/#/map)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.map). +ES6's version of `map`, returns array of same type as the context. + +#### arr.remove(value[, …valuen]) _(es5-ext/array/#/remove)_ + +Remove values from the array + +#### arr.separate(sep) _(es5-ext/array/#/separate)_ + +Returns array with items separated with `sep` value + +#### arr.slice(callback[, thisArg]) _(es5-ext/array/#/slice)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.slice). +ES6's version of `slice`, returns array of same type as the context. + +#### arr.someRight(cb[, thisArg]) _(es5-ext/array/#/someRight)_ + +`some` starting from last element + +#### arr.splice(callback[, thisArg]) _(es5-ext/array/#/splice)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.splice). +ES6's version of `splice`, returns array of same type as the context. + +#### arr.uniq() _(es5-ext/array/#/uniq)_ + +Returns duplicate-free version of the array + +#### arr.values() _(es5-ext/array/#/values)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.values). +Returns iterator object which traverses all array values. + +#### arr[@@iterator] _(es5-ext/array/#/@@iterator)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype-@@iterator). +Returns iterator object which traverses all array values. + +### Boolean Constructor extensions + +#### isBoolean(x) _(es5-ext/boolean/is-boolean)_ + +Whether value is boolean + +### Date Constructor extensions + +#### isDate(x) _(es5-ext/date/is-date)_ + +Whether value is date instance + +#### validDate(x) _(es5-ext/date/valid-date)_ + +If given object is not date throw TypeError in other case return it. + +### Date Prototype extensions + +#### date.copy(date) _(es5-ext/date/#/copy)_ + +Returns a copy of the date object + +#### date.daysInMonth() _(es5-ext/date/#/days-in-month)_ + +Returns number of days of date's month + +#### date.floorDay() _(es5-ext/date/#/floor-day)_ + +Sets the date time to 00:00:00.000 + +#### date.floorMonth() _(es5-ext/date/#/floor-month)_ + +Sets date day to 1 and date time to 00:00:00.000 + +#### date.floorYear() _(es5-ext/date/#/floor-year)_ + +Sets date month to 0, day to 1 and date time to 00:00:00.000 + +#### date.format(pattern) _(es5-ext/date/#/format)_ + +Formats date up to given string. Supported patterns: + +- `%Y` - Year with century, 1999, 2003 +- `%y` - Year without century, 99, 03 +- `%m` - Month, 01..12 +- `%d` - Day of the month 01..31 +- `%H` - Hour (24-hour clock), 00..23 +- `%M` - Minute, 00..59 +- `%S` - Second, 00..59 +- `%L` - Milliseconds, 000..999 + +### Error Constructor extensions + +#### custom(message/_, code, ext_/) _(es5-ext/error/custom)_ + +Creates custom error object, optinally extended with `code` and other extension properties (provided with `ext` object) + +#### isError(x) _(es5-ext/error/is-error)_ + +Whether value is an error (instance of `Error`). + +#### validError(x) _(es5-ext/error/valid-error)_ + +If given object is not error throw TypeError in other case return it. + +### Error Prototype extensions + +#### err.throw() _(es5-ext/error/#/throw)_ + +Throws error + +### Function Constructor extensions + +Some of the functions were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele + +#### constant(x) _(es5-ext/function/constant)_ + +Returns a constant function that returns pregiven argument + +_k(x)(y) =def x_ + +#### identity(x) _(es5-ext/function/identity)_ + +Identity function. Returns first argument + +_i(x) =def x_ + +#### invoke(name[, …args]) _(es5-ext/function/invoke)_ + +Returns a function that takes an object as an argument, and applies object's +_name_ method to arguments. +_name_ can be name of the method or method itself. + +_invoke(name, …args)(object, …args2) =def object\[name\]\(…args, …args2\)_ + +#### isArguments(x) _(es5-ext/function/is-arguments)_ + +Whether value is arguments object + +#### isFunction(arg) _(es5-ext/function/is-function)_ + +Whether value is instance of function + +#### noop() _(es5-ext/function/noop)_ + +No operation function + +#### pluck(name) _(es5-ext/function/pluck)_ + +Returns a function that takes an object, and returns the value of its _name_ +property + +_pluck(name)(obj) =def obj[name]_ + +#### validFunction(arg) _(es5-ext/function/valid-function)_ + +If given object is not function throw TypeError in other case return it. + +### Function Prototype extensions + +Some of the methods were inspired by [Functional JavaScript](http://osteele.com/sources/javascript/functional/) project by Olivier Steele + +#### fn.compose([…fns]) _(es5-ext/function/#/compose)_ + +Applies the functions in reverse argument-list order. + +_f1.compose(f2, f3, f4)(…args) =def f1(f2(f3(f4(…arg))))_ + +`compose` can also be used in plain function form as: + +_compose(f1, f2, f3, f4)(…args) =def f1(f2(f3(f4(…arg))))_ + +#### fn.copy() _(es5-ext/function/#/copy)_ + +Produces copy of given function + +#### fn.curry([n]) _(es5-ext/function/#/curry)_ + +Invoking the function returned by this function only _n_ arguments are passed to the underlying function. If the underlying function is not saturated, the result is a function that passes all its arguments to the underlying function. +If _n_ is not provided then it defaults to context function length + +_f.curry(4)(arg1, arg2)(arg3)(arg4) =def f(arg1, args2, arg3, arg4)_ + +#### fn.lock([…args]) _(es5-ext/function/#/lock)_ + +Returns a function that applies the underlying function to _args_, and ignores its own arguments. + +_f.lock(…args)(…args2) =def f(…args)_ + +_Named after it's counterpart in Google Closure_ + +#### fn.not() _(es5-ext/function/#/not)_ + +Returns a function that returns boolean negation of value returned by underlying function. + +_f.not()(…args) =def !f(…args)_ + +#### fn.partial([…args]) _(es5-ext/function/#/partial)_ + +Returns a function that when called will behave like context function called with initially passed arguments. If more arguments are suplilied, they are appended to initial args. + +_f.partial(…args1)(…args2) =def f(…args1, …args2)_ + +#### fn.spread() _(es5-ext/function/#/spread)_ + +Returns a function that applies underlying function with first list argument + +_f.match()(args) =def f.apply(null, args)_ + +#### fn.toStringTokens() _(es5-ext/function/#/to-string-tokens)_ + +Serializes function into two (arguments and body) string tokens. Result is plain object with `args` and `body` properties. + +### Math extensions + +#### acosh(x) _(es5-ext/math/acosh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.acosh). + +#### asinh(x) _(es5-ext/math/asinh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.asinh). + +#### atanh(x) _(es5-ext/math/atanh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.atanh). + +#### cbrt(x) _(es5-ext/math/cbrt)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cbrt). + +#### clz32(x) _(es5-ext/math/clz32)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.clz32). + +#### cosh(x) _(es5-ext/math/cosh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.cosh). + +#### expm1(x) _(es5-ext/math/expm1)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.expm1). + +#### fround(x) _(es5-ext/math/fround)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.fround). + +#### hypot([…values]) _(es5-ext/math/hypot)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.hypot). + +#### imul(x, y) _(es5-ext/math/imul)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.imul). + +#### log1p(x) _(es5-ext/math/log1p)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log1p). + +#### log2(x) _(es5-ext/math/log2)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log2). + +#### log10(x) _(es5-ext/math/log10)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.log10). + +#### sign(x) _(es5-ext/math/sign)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sign). + +#### sinh(x) _(es5-ext/math/sinh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.sinh). + +#### tanh(x) _(es5-ext/math/tanh)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.tanh). + +#### trunc(x) _(es5-ext/math/trunc)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-math.trunc). + +### Number Constructor extensions + +#### EPSILON _(es5-ext/number/epsilon)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.epsilon). + +The difference between 1 and the smallest value greater than 1 that is representable as a Number value, which is approximately 2.2204460492503130808472633361816 x 10-16. + +#### isFinite(x) _(es5-ext/number/is-finite)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isfinite). +Whether value is finite. Differs from global isNaN that it doesn't do type coercion. + +#### isInteger(x) _(es5-ext/number/is-integer)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isinteger). +Whether value is integer. + +#### isNaN(x) _(es5-ext/number/is-nan)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isnan). +Whether value is NaN. Differs from global isNaN that it doesn't do type coercion. + +#### isNumber(x) _(es5-ext/number/is-number)_ + +Whether given value is number + +#### isSafeInteger(x) _(es5-ext/number/is-safe-integer)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.issafeinteger). + +#### MAX*SAFE_INTEGER *(es5-ext/number/max-safe-integer)\_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.maxsafeinteger). +The value of Number.MAX_SAFE_INTEGER is 9007199254740991. + +#### MIN*SAFE_INTEGER *(es5-ext/number/min-safe-integer)\_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.minsafeinteger). +The value of Number.MIN_SAFE_INTEGER is -9007199254740991 (253-1). + +#### toInteger(x) _(es5-ext/number/to-integer)_ + +Converts value to integer + +#### toPosInteger(x) _(es5-ext/number/to-pos-integer)_ + +Converts value to positive integer. If provided value is less than 0, then 0 is returned + +#### toUint32(x) _(es5-ext/number/to-uint32)_ + +Converts value to unsigned 32 bit integer. This type is used for array lengths. +See: http://www.2ality.com/2012/02/js-integers.html + +### Number Prototype extensions + +#### num.pad(length[, precision]) _(es5-ext/number/#/pad)_ + +Pad given number with zeros. Returns string + +### Object Constructor extensions + +#### assign(target, source[, …sourcen]) _(es5-ext/object/assign)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign). +Extend _target_ by enumerable own properties of other objects. If properties are already set on target object, they will be overwritten. + +#### clear(obj) _(es5-ext/object/clear)_ + +Remove all enumerable own properties of the object + +#### compact(obj) _(es5-ext/object/compact)_ + +Returns copy of the object with all enumerable properties that have no falsy values + +#### compare(obj1, obj2) _(es5-ext/object/compare)_ + +Universal cross-type compare function. To be used for e.g. array sort. + +#### copy(obj) _(es5-ext/object/copy)_ + +Returns copy of the object with all enumerable properties. + +#### copyDeep(obj) _(es5-ext/object/copy-deep)_ + +Returns deep copy of the object with all enumerable properties. + +#### count(obj) _(es5-ext/object/count)_ + +Counts number of enumerable own properties on object + +#### create(obj[, properties]) _(es5-ext/object/create)_ + +`Object.create` alternative that provides workaround for [V8 issue](http://code.google.com/p/v8/issues/detail?id=2804). + +When `null` is provided as a prototype, it's substituted with specially prepared object that derives from Object.prototype but has all Object.prototype properties shadowed with undefined. + +It's quirky solution that allows us to have plain objects with no truthy properties but with turnable prototype. + +Use only for objects that you plan to switch prototypes of and be aware of limitations of this workaround. + +#### eq(x, y) _(es5-ext/object/eq)_ + +Whether two values are equal, using [_SameValueZero_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm. + +#### every(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/every)_ + +Analogous to Array.prototype.every. Returns true if every key-value pair in this object satisfies the provided testing function. +Optionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key). + +#### filter(obj, cb[, thisArg]) _(es5-ext/object/filter)_ + +Analogous to Array.prototype.filter. Returns new object with properites for which _cb_ function returned truthy value. + +#### firstKey(obj) _(es5-ext/object/first-key)_ + +Returns first enumerable key of the object, as keys are unordered by specification, it can be any key of an object. + +#### flatten(obj) _(es5-ext/object/flatten)_ + +Returns new object, with flatten properties of input object + +_flatten({ a: { b: 1 }, c: { d: 1 } }) =def { b: 1, d: 1 }_ + +#### forEach(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/for-each)_ + +Analogous to Array.prototype.forEach. Calls a function for each key-value pair found in object +Optionally _compareFn_ can be provided which assures that properties are iterated in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key). + +#### getPropertyNames() _(es5-ext/object/get-property-names)_ + +Get all (not just own) property names of the object + +#### is(x, y) _(es5-ext/object/is)_ + +Whether two values are equal, using [_SameValue_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) algorithm. + +#### isArrayLike(x) _(es5-ext/object/is-array-like)_ + +Whether object is array-like object + +#### isCopy(x, y) _(es5-ext/object/is-copy)_ + +Two values are considered a copy of same value when all of their own enumerable properties have same values. + +#### isCopyDeep(x, y) _(es5-ext/object/is-copy-deep)_ + +Deep comparision of objects + +#### isEmpty(obj) _(es5-ext/object/is-empty)_ + +True if object doesn't have any own enumerable property + +#### isObject(arg) _(es5-ext/object/is-object)_ + +Whether value is not primitive + +#### isPlainObject(arg) _(es5-ext/object/is-plain-object)_ + +Whether object is plain object, its protototype should be Object.prototype and it cannot be host object. + +#### keyOf(obj, searchValue) _(es5-ext/object/key-of)_ + +Search object for value + +#### keys(obj) _(es5-ext/object/keys)_ + +[_Updated with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys). +ES6's version of `keys`, doesn't throw on primitive input + +#### map(obj, cb[, thisArg]) _(es5-ext/object/map)_ + +Analogous to Array.prototype.map. Creates a new object with properties which values are results of calling a provided function on every key-value pair in this object. + +#### mapKeys(obj, cb[, thisArg]) _(es5-ext/object/map-keys)_ + +Create new object with same values, but remapped keys + +#### mixin(target, source) _(es5-ext/object/mixin)_ + +Extend _target_ by all own properties of other objects. Properties found in both objects will be overwritten (unless they're not configurable and cannot be overwritten). +_It was for a moment part of ECMAScript 6 draft._ + +#### mixinPrototypes(target, …source]) _(es5-ext/object/mixin-prototypes)_ + +Extends _target_, with all source and source's prototype properties. +Useful as an alternative for `setPrototypeOf` in environments in which it cannot be shimmed (no `__proto__` support). + +#### normalizeOptions(options) _(es5-ext/object/normalize-options)_ + +Normalizes options object into flat plain object. + +Useful for functions in which we either need to keep options object for future reference or need to modify it for internal use. + +- It never returns input `options` object back (always a copy is created) +- `options` can be undefined in such case empty plain object is returned. +- Copies all enumerable properties found down prototype chain. + +#### primitiveSet([…names]) _(es5-ext/object/primitive-set)_ + +Creates `null` prototype based plain object, and sets on it all property names provided in arguments to true. + +#### safeTraverse(obj[, …names]) _(es5-ext/object/safe-traverse)_ + +Safe navigation of object properties. See http://wiki.ecmascript.org/doku.php?id=strawman:existential_operator + +#### serialize(value) _(es5-ext/object/serialize)_ + +Serialize value into string. Differs from [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) that it serializes also dates, functions and regular expresssions. + +#### setPrototypeOf(object, proto) _(es5-ext/object/set-prototype-of)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.setprototypeof). +If native version is not provided, it depends on existence of `__proto__` functionality, if it's missing, `null` instead of function is exposed. + +#### some(obj, cb[, thisArg[, compareFn]]) _(es5-ext/object/some)_ + +Analogous to Array.prototype.some Returns true if any key-value pair satisfies the provided +testing function. +Optionally _compareFn_ can be provided which assures that keys are tested in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key). + +#### toArray(obj[, cb[, thisArg[, compareFn]]]) _(es5-ext/object/to-array)_ + +Creates an array of results of calling a provided function on every key-value pair in this object. +Optionally _compareFn_ can be provided which assures that results are added in given order. If provided _compareFn_ is equal to `true`, then order is alphabetical (by key). + +#### unserialize(str) _(es5-ext/object/unserialize)_ + +Userializes value previously serialized with [serialize](#serializevalue-es5-extobjectserialize) + +#### validCallable(x) _(es5-ext/object/valid-callable)_ + +If given object is not callable throw TypeError in other case return it. + +#### validObject(x) _(es5-ext/object/valid-object)_ + +Throws error if given value is not an object, otherwise it is returned. + +#### validValue(x) _(es5-ext/object/valid-value)_ + +Throws error if given value is `null` or `undefined`, otherwise returns value. + +### Promise Prototype extensions + +#### promise.finally(onFinally) _(es5-ext/promise/#/finally)_ + +[_Introduced with ECMAScript 2018_](https://tc39.github.io/ecma262/#sec-promise.prototype.finally). + +### RegExp Constructor extensions + +#### escape(str) _(es5-ext/reg-exp/escape)_ + +Escapes string to be used in regular expression + +#### isRegExp(x) _(es5-ext/reg-exp/is-reg-exp)_ + +Whether object is regular expression + +#### validRegExp(x) _(es5-ext/reg-exp/valid-reg-exp)_ + +If object is regular expression it is returned, otherwise TypeError is thrown. + +### RegExp Prototype extensions + +#### re.isSticky(x) _(es5-ext/reg-exp/#/is-sticky)_ + +Whether regular expression has `sticky` flag. + +It's to be used as counterpart to [regExp.sticky](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.sticky) if it's not implemented. + +#### re.isUnicode(x) _(es5-ext/reg-exp/#/is-unicode)_ + +Whether regular expression has `unicode` flag. + +It's to be used as counterpart to [regExp.unicode](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-get-regexp.prototype.unicode) if it's not implemented. + +#### re.match(string) _(es5-ext/reg-exp/#/match)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.match). + +#### re.replace(string, replaceValue) _(es5-ext/reg-exp/#/replace)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.replace). + +#### re.search(string) _(es5-ext/reg-exp/#/search)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.search). + +#### re.split(string) _(es5-ext/reg-exp/#/search)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.split). + +#### re.sticky _(es5-ext/reg-exp/#/sticky/implement)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.sticky). +It's a getter, so only `implement` and `is-implemented` modules are provided. + +#### re.unicode _(es5-ext/reg-exp/#/unicode/implement)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype.unicode). +It's a getter, so only `implement` and `is-implemented` modules are provided. + +### String Constructor extensions + +#### formatMethod(fMap) _(es5-ext/string/format-method)_ + +Creates format method. It's used e.g. to create `Date.prototype.format` method + +#### fromCodePoint([…codePoints]) _(es5-ext/string/from-code-point)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.fromcodepoint) + +#### isString(x) _(es5-ext/string/is-string)_ + +Whether object is string + +#### randomUniq() _(es5-ext/string/random-uniq)_ + +Returns randomly generated id, with guarantee of local uniqueness (no same id will be returned twice) + +#### raw(callSite[, …substitutions]) _(es5-ext/string/raw)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.raw) + +### String Prototype extensions + +#### str.at(pos) _(es5-ext/string/#/at)_ + +_Proposed for ECMAScript 6/7 standard, but not (yet) in a draft_ + +Returns a string at given position in Unicode-safe manner. +Based on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.at). + +#### str.camelToHyphen() _(es5-ext/string/#/camel-to-hyphen)_ + +Convert camelCase string to hyphen separated, e.g. one-two-three -> oneTwoThree. +Useful when converting names from js property convention into filename convention. + +#### str.capitalize() _(es5-ext/string/#/capitalize)_ + +Capitalize first character of a string + +#### str.caseInsensitiveCompare(str) _(es5-ext/string/#/case-insensitive-compare)_ + +Case insensitive compare + +#### str.codePointAt(pos) _(es5-ext/string/#/code-point-at)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.codepointat) + +Based on [implementation by Mathias Bynens](https://github.com/mathiasbynens/String.prototype.codePointAt). + +#### str.contains(searchString[, position]) _(es5-ext/string/#/contains)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.contains) + +Whether string contains given string. + +#### str.endsWith(searchString[, endPosition]) _(es5-ext/string/#/ends-with)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.endswith). +Whether strings ends with given string + +#### str.hyphenToCamel() _(es5-ext/string/#/hyphen-to-camel)_ + +Convert hyphen separated string to camelCase, e.g. one-two-three -> oneTwoThree. +Useful when converting names from filename convention to js property name convention. + +#### str.indent(str[, count]) _(es5-ext/string/#/indent)_ + +Indents each line with provided _str_ (if _count_ given then _str_ is repeated _count_ times). + +#### str.last() _(es5-ext/string/#/last)_ + +Return last character + +#### str.normalize([form]) _(es5-ext/string/#/normalize)_ + +[_Introduced with ECMAScript 6_](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize). +Returns the Unicode Normalization Form of a given string. +Based on Matsuza's version. Code used for integrated shim can be found at [github.com/walling/unorm](https://github.com/walling/unorm/blob/master/lib/unorm.js) + +#### str.pad(fill[, length]) _(es5-ext/string/#/pad)_ + +Pad string with _fill_. +If _length_ si given than _fill_ is reapated _length_ times. +If _length_ is negative then pad is applied from right. + +#### str.repeat(n) _(es5-ext/string/#/repeat)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.repeat). +Repeat given string _n_ times + +#### str.plainReplace(search, replace) _(es5-ext/string/#/plain-replace)_ + +Simple `replace` version. Doesn't support regular expressions. Replaces just first occurrence of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _\$_ characters escape in such case). + +#### str.plainReplaceAll(search, replace) _(es5-ext/string/#/plain-replace-all)_ + +Simple `replace` version. Doesn't support regular expressions. Replaces all occurrences of search string. Doesn't support insert patterns, therefore it is safe to replace text with text obtained programmatically (there's no need for additional _\$_ characters escape in such case). + +#### str.startsWith(searchString[, position]) _(es5-ext/string/#/starts-with)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype.startswith). +Whether strings starts with given string + +#### str[@@iterator] _(es5-ext/string/#/@@iterator)_ + +[_Introduced with ECMAScript 6_](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype-@@iterator). +Returns iterator object which traverses all string characters (with respect to unicode symbols) + +### Tests + + $ npm test + +## Security contact information + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. + +## es5-ext for enterprise + +Available as part of the Tidelift Subscription + +The maintainers of es5-ext and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-es5-ext?utm_source=npm-es5-ext&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) + +[build-image]: https://github.com/medikoo/es5-ext/workflows/Integrate/badge.svg +[build-url]: https://github.com/medikoo/es5-ext/actions?query=workflow%3AIntegrate +[cov-image]: https://img.shields.io/codecov/c/github/medikoo/es5-ext.svg +[cov-url]: https://codecov.io/gh/medikoo/es5-ext +[npm-image]: https://img.shields.io/npm/v/es5-ext.svg +[npm-url]: https://www.npmjs.com/package/es5-ext diff --git a/test/node_modules/es5-ext/_postinstall.js b/test/node_modules/es5-ext/_postinstall.js new file mode 100755 index 0000000..f11ce4c --- /dev/null +++ b/test/node_modules/es5-ext/_postinstall.js @@ -0,0 +1,73 @@ +#!/usr/bin/env node + +// Broadcasts "Call for peace" message when package is installed in Russia, otherwise no-op + +"use strict"; + +try { + if ( + [ + "Asia/Anadyr", "Asia/Barnaul", "Asia/Chita", "Asia/Irkutsk", "Asia/Kamchatka", + "Asia/Khandyga", "Asia/Krasnoyarsk", "Asia/Magadan", "Asia/Novokuznetsk", + "Asia/Novosibirsk", "Asia/Omsk", "Asia/Sakhalin", "Asia/Srednekolymsk", "Asia/Tomsk", + "Asia/Ust-Nera", "Asia/Vladivostok", "Asia/Yakutsk", "Asia/Yekaterinburg", + "Europe/Astrakhan", "Europe/Kaliningrad", "Europe/Kirov", "Europe/Moscow", + "Europe/Samara", "Europe/Saratov", "Europe/Simferopol", "Europe/Ulyanovsk", + "Europe/Volgograd", "W-SU" + ].indexOf(new Intl.DateTimeFormat().resolvedOptions().timeZone) === -1 + ) { + return; + } + + var bold = function (msg) { return "\x1b[97m\x1b[1m" + msg + "\x1b[22m\x1b[37m"; }; + + var flags = function () { + return ( + "🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦" + + " 🇷🇺 🇺🇦 🇷🇺 🇺🇦 🇷🇺 🇺🇦" + ); + }; + + process._rawDebug( + [ + "", flags(), "", + "\x1b[37m24 февраля " + + bold("Россия напала на Украину") + + ", что уже стало причиной " + + bold("15000+ жертв среди российских военных") + + " и примерно " + + bold("10000+ - среди украинских") + + ", а также " + + bold("5000+ убитых граждан, в том числе 300+ детей") + + ".", + "", + "Народ Украины всеобще мобилизован и готов защищать свою страну от вражеского" + + " вторжения. " + + bold( + "91% украинцев полностью поддерживает своего президента Владимира Зеленского" + ) + + " и его ответные действия на нападение России.", + "", + "Весь мир осудил необоснованное вторжение и решил ввести " + + bold("невиданные ранее санкции против России") + + ". С каждым новым днем они будут ощущаться все сильнее и сильнее среди мирных" + + " граждан.", + "", + "В то же время, " + + bold("российское правительство ограничивает доступ граждан к внешней информации") + + ", насаждая однобокие формулировки и версии происходящего.", + "", "В качестве надежного источника информации загрузите безопасный браузер Tor:", "", + bold( + "https://forum.torproject.net/t/tor-blocked-in-russia-how-to-circumvent-censorship/982" + ), + "", "И посетите:", "", + bold( + "https://www.bbcweb3hytmzhn5d532owbu6oqadra5z3ar726vq5kgwwn6aucdccrad.onion/russian" + ), + bold("https://www.dwnewsgngmhlplxy6o2twtfgjnrnjxbegbwqx6wnotdhkzt562tszfid.onion/ru/"), + "", flags(), "" + ].join("\n") + ); +} catch (error) { + // ignore +} diff --git a/test/node_modules/es5-ext/array/#/@@iterator/implement.js b/test/node_modules/es5-ext/array/#/@@iterator/implement.js new file mode 100644 index 0000000..8073f2b --- /dev/null +++ b/test/node_modules/es5-ext/array/#/@@iterator/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, require("es6-symbol").iterator, { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/array/#/@@iterator/index.js b/test/node_modules/es5-ext/array/#/@@iterator/index.js new file mode 100644 index 0000000..1d0a389 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/@@iterator/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? Array.prototype[require("es6-symbol").iterator] + : require("./shim"); diff --git a/test/node_modules/es5-ext/array/#/@@iterator/is-implemented.js b/test/node_modules/es5-ext/array/#/@@iterator/is-implemented.js new file mode 100644 index 0000000..6445c04 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/@@iterator/is-implemented.js @@ -0,0 +1,16 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function () { + var arr = ["foo", 1], iterator, result; + if (typeof arr[iteratorSymbol] !== "function") return false; + iterator = arr[iteratorSymbol](); + if (!iterator) return false; + if (typeof iterator.next !== "function") return false; + result = iterator.next(); + if (!result) return false; + if (result.value !== "foo") return false; + if (result.done !== false) return false; + return true; +}; diff --git a/test/node_modules/es5-ext/array/#/@@iterator/shim.js b/test/node_modules/es5-ext/array/#/@@iterator/shim.js new file mode 100644 index 0000000..307b1c0 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/@@iterator/shim.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("../values/shim"); diff --git a/test/node_modules/es5-ext/array/#/_compare-by-length.js b/test/node_modules/es5-ext/array/#/_compare-by-length.js new file mode 100644 index 0000000..db5a040 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/_compare-by-length.js @@ -0,0 +1,7 @@ +// Used internally to sort array of lists by length + +"use strict"; + +var toPosInt = require("../../number/to-pos-integer"); + +module.exports = function (arr1, arr2) { return toPosInt(arr1.length) - toPosInt(arr2.length); }; diff --git a/test/node_modules/es5-ext/array/#/binary-search.js b/test/node_modules/es5-ext/array/#/binary-search.js new file mode 100644 index 0000000..bdabe27 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/binary-search.js @@ -0,0 +1,27 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , callable = require("../../object/valid-callable") + , value = require("../../object/valid-value") + , floor = Math.floor; + +module.exports = function (compareFn) { + var length, low, high, middle; + + value(this); + callable(compareFn); + + length = toPosInt(this.length); + low = 0; + high = length - 1; + + while (low <= high) { + middle = floor((low + high) / 2); + if (compareFn(this[middle]) < 0) high = middle - 1; + else low = middle + 1; + } + + if (high < 0) return 0; + if (high >= length) return length - 1; + return high; +}; diff --git a/test/node_modules/es5-ext/array/#/clear.js b/test/node_modules/es5-ext/array/#/clear.js new file mode 100644 index 0000000..fd539c9 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/clear.js @@ -0,0 +1,12 @@ +// Inspired by Google Closure: +// http://closure-library.googlecode.com/svn/docs/ +// closure_goog_array_array.js.html#goog.array.clear + +"use strict"; + +var value = require("../../object/valid-value"); + +module.exports = function () { + value(this).length = 0; + return this; +}; diff --git a/test/node_modules/es5-ext/array/#/compact.js b/test/node_modules/es5-ext/array/#/compact.js new file mode 100644 index 0000000..462e100 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/compact.js @@ -0,0 +1,11 @@ +// Inspired by: http://documentcloud.github.com/underscore/#compact + +"use strict"; + +var isValue = require("../../object/is-value"); + +var filter = Array.prototype.filter; + +module.exports = function () { + return filter.call(this, function (val) { return isValue(val); }); +}; diff --git a/test/node_modules/es5-ext/array/#/concat/implement.js b/test/node_modules/es5-ext/array/#/concat/implement.js new file mode 100644 index 0000000..714a3c1 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/concat/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "concat", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/array/#/concat/index.js b/test/node_modules/es5-ext/array/#/concat/index.js new file mode 100644 index 0000000..deac0ee --- /dev/null +++ b/test/node_modules/es5-ext/array/#/concat/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.prototype.concat : require("./shim"); diff --git a/test/node_modules/es5-ext/array/#/concat/is-implemented.js b/test/node_modules/es5-ext/array/#/concat/is-implemented.js new file mode 100644 index 0000000..ba5a154 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/concat/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +var SubArray = require("../../_sub-array-dummy-safe"); + +module.exports = function () { return new SubArray().concat("foo") instanceof SubArray; }; diff --git a/test/node_modules/es5-ext/array/#/concat/shim.js b/test/node_modules/es5-ext/array/#/concat/shim.js new file mode 100644 index 0000000..e4cfacc --- /dev/null +++ b/test/node_modules/es5-ext/array/#/concat/shim.js @@ -0,0 +1,44 @@ +"use strict"; + +var isPlainArray = require("../../is-plain-array") + , toPosInt = require("../../../number/to-pos-integer") + , isObject = require("../../../object/is-object") + , isConcatSpreadable = require("es6-symbol").isConcatSpreadable + , isArray = Array.isArray + , concat = Array.prototype.concat + , forEach = Array.prototype.forEach + , isSpreadable; + +isSpreadable = function (value) { + if (!value) return false; + if (!isObject(value)) return false; + if (value[isConcatSpreadable] !== undefined) { + return Boolean(value[isConcatSpreadable]); + } + return isArray(value); +}; + +// eslint-disable-next-line no-unused-vars +module.exports = function (item /*, …items*/) { + var result; + if (!this || !isArray(this) || isPlainArray(this)) { + return concat.apply(this, arguments); + } + result = new this.constructor(); + if (isSpreadable(this)) { + forEach.call(this, function (val, i) { result[i] = val; }); + } else { + result[0] = this; + } + forEach.call(arguments, function (arg) { + var base; + if (isSpreadable(arg)) { + base = result.length; + result.length += toPosInt(arg.length); + forEach.call(arg, function (val, i) { result[base + i] = val; }); + return; + } + result.push(arg); + }); + return result; +}; diff --git a/test/node_modules/es5-ext/array/#/contains.js b/test/node_modules/es5-ext/array/#/contains.js new file mode 100644 index 0000000..6dda9c4 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/contains.js @@ -0,0 +1,7 @@ +"use strict"; + +var indexOf = require("./e-index-of"); + +module.exports = function (searchElement /*, position*/) { + return indexOf.call(this, searchElement, arguments[1]) > -1; +}; diff --git a/test/node_modules/es5-ext/array/#/copy-within/implement.js b/test/node_modules/es5-ext/array/#/copy-within/implement.js new file mode 100644 index 0000000..4658fcb --- /dev/null +++ b/test/node_modules/es5-ext/array/#/copy-within/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "copyWithin", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/array/#/copy-within/index.js b/test/node_modules/es5-ext/array/#/copy-within/index.js new file mode 100644 index 0000000..37db0ec --- /dev/null +++ b/test/node_modules/es5-ext/array/#/copy-within/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.prototype.copyWithin : require("./shim"); diff --git a/test/node_modules/es5-ext/array/#/copy-within/is-implemented.js b/test/node_modules/es5-ext/array/#/copy-within/is-implemented.js new file mode 100644 index 0000000..40c499e --- /dev/null +++ b/test/node_modules/es5-ext/array/#/copy-within/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var arr = [1, 2, 3, 4, 5]; + if (typeof arr.copyWithin !== "function") return false; + return String(arr.copyWithin(1, 3)) === "1,4,5,4,5"; +}; diff --git a/test/node_modules/es5-ext/array/#/copy-within/shim.js b/test/node_modules/es5-ext/array/#/copy-within/shim.js new file mode 100644 index 0000000..aad220c --- /dev/null +++ b/test/node_modules/es5-ext/array/#/copy-within/shim.js @@ -0,0 +1,45 @@ +// Taken from: https://github.com/paulmillr/es6-shim/ + +"use strict"; + +var toInteger = require("../../../number/to-integer") + , toPosInt = require("../../../number/to-pos-integer") + , validValue = require("../../../object/valid-value") + , objHasOwnProperty = Object.prototype.hasOwnProperty + , max = Math.max + , min = Math.min; + +module.exports = function (target, start /*, end*/) { + var arr = validValue(this) + , end = arguments[2] + , length = toPosInt(arr.length) + , to + , from + , fin + , count + , direction; + + target = toInteger(target); + start = toInteger(start); + end = end === undefined ? length : toInteger(end); + + to = target < 0 ? max(length + target, 0) : min(target, length); + from = start < 0 ? max(length + start, 0) : min(start, length); + fin = end < 0 ? max(length + end, 0) : min(end, length); + count = min(fin - from, length - to); + direction = 1; + + if (from < to && to < from + count) { + direction = -1; + from += count - 1; + to += count - 1; + } + while (count > 0) { + if (objHasOwnProperty.call(arr, from)) arr[to] = arr[from]; + else delete arr[from]; + from += direction; + to += direction; + count -= 1; + } + return arr; +}; diff --git a/test/node_modules/es5-ext/array/#/diff.js b/test/node_modules/es5-ext/array/#/diff.js new file mode 100644 index 0000000..002e6a3 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/diff.js @@ -0,0 +1,11 @@ +"use strict"; + +var value = require("../../object/valid-value") + , contains = require("./contains") + , filter = Array.prototype.filter; + +module.exports = function (other) { + value(this); + value(other); + return filter.call(this, function (item) { return !contains.call(other, item); }); +}; diff --git a/test/node_modules/es5-ext/array/#/e-index-of.js b/test/node_modules/es5-ext/array/#/e-index-of.js new file mode 100644 index 0000000..8b07011 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/e-index-of.js @@ -0,0 +1,28 @@ +"use strict"; + +var numberIsNaN = require("../../number/is-nan") + , toPosInt = require("../../number/to-pos-integer") + , value = require("../../object/valid-value") + , indexOf = Array.prototype.indexOf + , objHasOwnProperty = Object.prototype.hasOwnProperty + , abs = Math.abs + , floor = Math.floor; + +module.exports = function (searchElement /*, fromIndex*/) { + var i, length, fromIndex, val; + if (!numberIsNaN(searchElement)) return indexOf.apply(this, arguments); + + length = toPosInt(value(this).length); + fromIndex = arguments[1]; + if (isNaN(fromIndex)) fromIndex = 0; + else if (fromIndex >= 0) fromIndex = floor(fromIndex); + else fromIndex = toPosInt(this.length) - floor(abs(fromIndex)); + + for (i = fromIndex; i < length; ++i) { + if (objHasOwnProperty.call(this, i)) { + val = this[i]; + if (numberIsNaN(val)) return i; // Jslint: ignore + } + } + return -1; +}; diff --git a/test/node_modules/es5-ext/array/#/e-last-index-of.js b/test/node_modules/es5-ext/array/#/e-last-index-of.js new file mode 100644 index 0000000..15dbe05 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/e-last-index-of.js @@ -0,0 +1,31 @@ +"use strict"; + +var numberIsNaN = require("../../number/is-nan") + , toPosInt = require("../../number/to-pos-integer") + , value = require("../../object/valid-value") + , lastIndexOf = Array.prototype.lastIndexOf + , objHasOwnProperty = Object.prototype.hasOwnProperty + , abs = Math.abs + , floor = Math.floor; + +module.exports = function (searchElement /*, fromIndex*/) { + var i, fromIndex, val; + if (!numberIsNaN(searchElement)) { + // Jslint: ignore + return lastIndexOf.apply(this, arguments); + } + + value(this); + fromIndex = arguments[1]; + if (isNaN(fromIndex)) fromIndex = toPosInt(this.length) - 1; + else if (fromIndex >= 0) fromIndex = floor(fromIndex); + else fromIndex = toPosInt(this.length) - floor(abs(fromIndex)); + + for (i = fromIndex; i >= 0; --i) { + if (objHasOwnProperty.call(this, i)) { + val = this[i]; + if (numberIsNaN(val)) return i; // Jslint: ignore + } + } + return -1; +}; diff --git a/test/node_modules/es5-ext/array/#/entries/implement.js b/test/node_modules/es5-ext/array/#/entries/implement.js new file mode 100644 index 0000000..b89ce44 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/entries/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "entries", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/array/#/entries/index.js b/test/node_modules/es5-ext/array/#/entries/index.js new file mode 100644 index 0000000..e7588f7 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/entries/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.prototype.entries : require("./shim"); diff --git a/test/node_modules/es5-ext/array/#/entries/is-implemented.js b/test/node_modules/es5-ext/array/#/entries/is-implemented.js new file mode 100644 index 0000000..335f1c2 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/entries/is-implemented.js @@ -0,0 +1,15 @@ +"use strict"; + +module.exports = function () { + var arr = [1, "foo"], iterator, result; + if (typeof arr.entries !== "function") return false; + iterator = arr.entries(); + if (!iterator) return false; + if (typeof iterator.next !== "function") return false; + result = iterator.next(); + if (!result || !result.value) return false; + if (result.value[0] !== 0) return false; + if (result.value[1] !== 1) return false; + if (result.done !== false) return false; + return true; +}; diff --git a/test/node_modules/es5-ext/array/#/entries/shim.js b/test/node_modules/es5-ext/array/#/entries/shim.js new file mode 100644 index 0000000..f47af86 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/entries/shim.js @@ -0,0 +1,4 @@ +"use strict"; + +var ArrayIterator = require("es6-iterator/array"); +module.exports = function () { return new ArrayIterator(this, "key+value"); }; diff --git a/test/node_modules/es5-ext/array/#/exclusion.js b/test/node_modules/es5-ext/array/#/exclusion.js new file mode 100644 index 0000000..4e9e71d --- /dev/null +++ b/test/node_modules/es5-ext/array/#/exclusion.js @@ -0,0 +1,25 @@ +"use strict"; + +var value = require("../../object/valid-value") + , aFrom = require("../from") + , toArray = require("../to-array") + , contains = require("./contains") + , byLength = require("./_compare-by-length") + , filter = Array.prototype.filter + , push = Array.prototype.push; + +module.exports = function (/* …lists*/) { + var lists, seen, result; + if (!arguments.length) return aFrom(this); + push.apply((lists = [this]), arguments); + lists.forEach(value); + seen = []; + result = []; + lists.sort(byLength).forEach(function (list) { + result = result + .filter(function (item) { return !contains.call(list, item); }) + .concat(filter.call(list, function (item) { return !contains.call(seen, item); })); + push.apply(seen, toArray(list)); + }); + return result; +}; diff --git a/test/node_modules/es5-ext/array/#/fill/implement.js b/test/node_modules/es5-ext/array/#/fill/implement.js new file mode 100644 index 0000000..0efad16 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/fill/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "fill", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/array/#/fill/index.js b/test/node_modules/es5-ext/array/#/fill/index.js new file mode 100644 index 0000000..6a66ae1 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/fill/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.prototype.fill : require("./shim"); diff --git a/test/node_modules/es5-ext/array/#/fill/is-implemented.js b/test/node_modules/es5-ext/array/#/fill/is-implemented.js new file mode 100644 index 0000000..5d6d02e --- /dev/null +++ b/test/node_modules/es5-ext/array/#/fill/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var arr = [1, 2, 3, 4, 5, 6]; + if (typeof arr.fill !== "function") return false; + return String(arr.fill(-1, -3)) === "1,2,3,-1,-1,-1"; +}; diff --git a/test/node_modules/es5-ext/array/#/fill/shim.js b/test/node_modules/es5-ext/array/#/fill/shim.js new file mode 100644 index 0000000..0040bf8 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/fill/shim.js @@ -0,0 +1,25 @@ +// Taken from: https://github.com/paulmillr/es6-shim/ + +"use strict"; + +var toInteger = require("../../../number/to-integer") + , toPosInt = require("../../../number/to-pos-integer") + , validValue = require("../../../object/valid-value") + , max = Math.max + , min = Math.min; + +module.exports = function (value /*, start, end*/) { + var arr = validValue(this) + , start = arguments[1] + , end = arguments[2] + , length = toPosInt(arr.length) + , relativeStart + , i; + + start = start === undefined ? 0 : toInteger(start); + end = end === undefined ? length : toInteger(end); + + relativeStart = start < 0 ? max(length + start, 0) : min(start, length); + for (i = relativeStart; i < length && i < end; ++i) arr[i] = value; + return arr; +}; diff --git a/test/node_modules/es5-ext/array/#/filter/implement.js b/test/node_modules/es5-ext/array/#/filter/implement.js new file mode 100644 index 0000000..76f4a5e --- /dev/null +++ b/test/node_modules/es5-ext/array/#/filter/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "filter", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/array/#/filter/index.js b/test/node_modules/es5-ext/array/#/filter/index.js new file mode 100644 index 0000000..9a25c9b --- /dev/null +++ b/test/node_modules/es5-ext/array/#/filter/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.prototype.filter : require("./shim"); diff --git a/test/node_modules/es5-ext/array/#/filter/is-implemented.js b/test/node_modules/es5-ext/array/#/filter/is-implemented.js new file mode 100644 index 0000000..6082513 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/filter/is-implemented.js @@ -0,0 +1,6 @@ +"use strict"; + +var SubArray = require("../../_sub-array-dummy-safe") + , pass = function () { return true; }; + +module.exports = function () { return new SubArray().filter(pass) instanceof SubArray; }; diff --git a/test/node_modules/es5-ext/array/#/filter/shim.js b/test/node_modules/es5-ext/array/#/filter/shim.js new file mode 100644 index 0000000..38304e4 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/filter/shim.js @@ -0,0 +1,23 @@ +"use strict"; + +var isPlainArray = require("../../is-plain-array") + , callable = require("../../../object/valid-callable") + , isArray = Array.isArray + , filter = Array.prototype.filter + , forEach = Array.prototype.forEach + , call = Function.prototype.call; + +module.exports = function (callbackFn /*, thisArg*/) { + var result, thisArg, i; + if (!this || !isArray(this) || isPlainArray(this)) { + return filter.apply(this, arguments); + } + callable(callbackFn); + thisArg = arguments[1]; + result = new this.constructor(); + i = 0; + forEach.call(this, function (val, j, self) { + if (call.call(callbackFn, thisArg, val, j, self)) result[i++] = val; + }); + return result; +}; diff --git a/test/node_modules/es5-ext/array/#/find-index/implement.js b/test/node_modules/es5-ext/array/#/find-index/implement.js new file mode 100644 index 0000000..4e14e29 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/find-index/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "findIndex", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/array/#/find-index/index.js b/test/node_modules/es5-ext/array/#/find-index/index.js new file mode 100644 index 0000000..5e07d8d --- /dev/null +++ b/test/node_modules/es5-ext/array/#/find-index/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.prototype.findIndex : require("./shim"); diff --git a/test/node_modules/es5-ext/array/#/find-index/is-implemented.js b/test/node_modules/es5-ext/array/#/find-index/is-implemented.js new file mode 100644 index 0000000..72aa28f --- /dev/null +++ b/test/node_modules/es5-ext/array/#/find-index/is-implemented.js @@ -0,0 +1,9 @@ +"use strict"; + +var fn = function (value) { return value > 3; }; + +module.exports = function () { + var arr = [1, 2, 3, 4, 5, 6]; + if (typeof arr.findIndex !== "function") return false; + return arr.findIndex(fn) === 3; +}; diff --git a/test/node_modules/es5-ext/array/#/find-index/shim.js b/test/node_modules/es5-ext/array/#/find-index/shim.js new file mode 100644 index 0000000..bc82827 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/find-index/shim.js @@ -0,0 +1,26 @@ +"use strict"; + +var callable = require("../../../object/valid-callable") + , ensureValue = require("../../../object/valid-value") + , some = Array.prototype.some + , apply = Function.prototype.apply; + +module.exports = function (predicate /*, thisArg*/) { + var k, self; + self = Object(ensureValue(this)); + callable(predicate); + + return some.call( + self, + function (value, index) { + if (apply.call(predicate, this, arguments)) { + k = index; + return true; + } + return false; + }, + arguments[1] + ) + ? k + : -1; +}; diff --git a/test/node_modules/es5-ext/array/#/find/implement.js b/test/node_modules/es5-ext/array/#/find/implement.js new file mode 100644 index 0000000..66035a5 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/find/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "find", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/array/#/find/index.js b/test/node_modules/es5-ext/array/#/find/index.js new file mode 100644 index 0000000..2f9d0d6 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/find/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.prototype.find : require("./shim"); diff --git a/test/node_modules/es5-ext/array/#/find/is-implemented.js b/test/node_modules/es5-ext/array/#/find/is-implemented.js new file mode 100644 index 0000000..8fdacb1 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/find/is-implemented.js @@ -0,0 +1,9 @@ +"use strict"; + +var fn = function (value) { return value > 3; }; + +module.exports = function () { + var arr = [1, 2, 3, 4, 5, 6]; + if (typeof arr.find !== "function") return false; + return arr.find(fn) === 4; +}; diff --git a/test/node_modules/es5-ext/array/#/find/shim.js b/test/node_modules/es5-ext/array/#/find/shim.js new file mode 100644 index 0000000..c45a938 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/find/shim.js @@ -0,0 +1,9 @@ +"use strict"; + +var findIndex = require("../find-index/shim"); + +// eslint-disable-next-line no-unused-vars +module.exports = function (predicate /*, thisArg*/) { + var index = findIndex.apply(this, arguments); + return index === -1 ? undefined : this[index]; +}; diff --git a/test/node_modules/es5-ext/array/#/first-index.js b/test/node_modules/es5-ext/array/#/first-index.js new file mode 100644 index 0000000..19bff54 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/first-index.js @@ -0,0 +1,15 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , value = require("../../object/valid-value") + , objHasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function () { + var i, length; + if (!(length = toPosInt(value(this).length))) return null; + i = 0; + while (!objHasOwnProperty.call(this, i)) { + if (++i === length) return null; + } + return i; +}; diff --git a/test/node_modules/es5-ext/array/#/first.js b/test/node_modules/es5-ext/array/#/first.js new file mode 100644 index 0000000..ca76833 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/first.js @@ -0,0 +1,9 @@ +"use strict"; + +var firstIndex = require("./first-index"); + +module.exports = function () { + var i; + if ((i = firstIndex.call(this)) !== null) return this[i]; + return undefined; +}; diff --git a/test/node_modules/es5-ext/array/#/flatten.js b/test/node_modules/es5-ext/array/#/flatten.js new file mode 100644 index 0000000..4016727 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/flatten.js @@ -0,0 +1,40 @@ +// Stack grow safe implementation + +"use strict"; + +var ensureValue = require("../../object/valid-value") + , isArray = Array.isArray + , objHasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function () { + var input = ensureValue(this), index = 0, remaining, remainingIndexes, length, i, result = []; + // Jslint: ignore + main: while (input) { + length = input.length; + for (i = index; i < length; ++i) { + if (!objHasOwnProperty.call(input, i)) continue; + if (isArray(input[i])) { + if (i < length - 1) { + // eslint-disable-next-line max-depth + if (!remaining) { + remaining = []; + remainingIndexes = []; + } + remaining.push(input); + remainingIndexes.push(i + 1); + } + input = input[i]; + index = 0; + continue main; + } + result.push(input[i]); + } + if (remaining) { + input = remaining.pop(); + index = remainingIndexes.pop(); + } else { + input = null; + } + } + return result; +}; diff --git a/test/node_modules/es5-ext/array/#/for-each-right.js b/test/node_modules/es5-ext/array/#/for-each-right.js new file mode 100644 index 0000000..ebf076b --- /dev/null +++ b/test/node_modules/es5-ext/array/#/for-each-right.js @@ -0,0 +1,19 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , callable = require("../../object/valid-callable") + , value = require("../../object/valid-value") + , objHasOwnProperty = Object.prototype.hasOwnProperty + , call = Function.prototype.call; + +module.exports = function (cb /*, thisArg*/) { + var i, self, thisArg; + + self = Object(value(this)); + callable(cb); + thisArg = arguments[1]; + + for (i = toPosInt(self.length) - 1; i >= 0; --i) { + if (objHasOwnProperty.call(self, i)) call.call(cb, thisArg, self[i], i, self); + } +}; diff --git a/test/node_modules/es5-ext/array/#/group.js b/test/node_modules/es5-ext/array/#/group.js new file mode 100644 index 0000000..711eb58 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/group.js @@ -0,0 +1,28 @@ +// Inspired by Underscore's groupBy: +// http://documentcloud.github.com/underscore/#groupBy + +"use strict"; + +var callable = require("../../object/valid-callable") + , value = require("../../object/valid-value") + , forEach = Array.prototype.forEach + , apply = Function.prototype.apply; + +module.exports = function (cb /*, thisArg*/) { + var result; + + value(this); + callable(cb); + + result = Object.create(null); + forEach.call( + this, + function (item) { + var key = apply.call(cb, this, arguments); + if (!result[key]) result[key] = []; + result[key].push(item); + }, + arguments[1] + ); + return result; +}; diff --git a/test/node_modules/es5-ext/array/#/index.js b/test/node_modules/es5-ext/array/#/index.js new file mode 100644 index 0000000..596e83b --- /dev/null +++ b/test/node_modules/es5-ext/array/#/index.js @@ -0,0 +1,41 @@ +"use strict"; + +module.exports = { + "@@iterator": require("./@@iterator"), + "binarySearch": require("./binary-search"), + "clear": require("./clear"), + "compact": require("./compact"), + "concat": require("./concat"), + "contains": require("./contains"), + "copyWithin": require("./copy-within"), + "diff": require("./diff"), + "eIndexOf": require("./e-index-of"), + "eLastIndexOf": require("./e-last-index-of"), + "entries": require("./entries"), + "exclusion": require("./exclusion"), + "fill": require("./fill"), + "filter": require("./filter"), + "find": require("./find"), + "findIndex": require("./find-index"), + "first": require("./first"), + "firstIndex": require("./first-index"), + "flatten": require("./flatten"), + "forEachRight": require("./for-each-right"), + "keys": require("./keys"), + "group": require("./group"), + "indexesOf": require("./indexes-of"), + "intersection": require("./intersection"), + "isCopy": require("./is-copy"), + "isEmpty": require("./is-empty"), + "isUniq": require("./is-uniq"), + "last": require("./last"), + "lastIndex": require("./last-index"), + "map": require("./map"), + "remove": require("./remove"), + "separate": require("./separate"), + "slice": require("./slice"), + "someRight": require("./some-right"), + "splice": require("./splice"), + "uniq": require("./uniq"), + "values": require("./values") +}; diff --git a/test/node_modules/es5-ext/array/#/indexes-of.js b/test/node_modules/es5-ext/array/#/indexes-of.js new file mode 100644 index 0000000..6c39cd9 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/indexes-of.js @@ -0,0 +1,12 @@ +"use strict"; + +var indexOf = require("./e-index-of"); + +module.exports = function (value /*, fromIndex*/) { + var result = [], i, fromIndex = arguments[1]; + while ((i = indexOf.call(this, value, fromIndex)) !== -1) { + result.push(i); + fromIndex = i + 1; + } + return result; +}; diff --git a/test/node_modules/es5-ext/array/#/intersection.js b/test/node_modules/es5-ext/array/#/intersection.js new file mode 100644 index 0000000..7dca9dc --- /dev/null +++ b/test/node_modules/es5-ext/array/#/intersection.js @@ -0,0 +1,19 @@ +"use strict"; + +var value = require("../../object/valid-value") + , contains = require("./contains") + , byLength = require("./_compare-by-length") + , filter = Array.prototype.filter + , push = Array.prototype.push + , slice = Array.prototype.slice; + +module.exports = function (/* …list*/) { + var lists; + if (!arguments.length) slice.call(this); + push.apply((lists = [this]), arguments); + lists.forEach(value); + lists.sort(byLength); + return lists.reduce(function (list1, list2) { + return filter.call(list1, function (item) { return contains.call(list2, item); }); + }); +}; diff --git a/test/node_modules/es5-ext/array/#/is-copy.js b/test/node_modules/es5-ext/array/#/is-copy.js new file mode 100644 index 0000000..1413b95 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/is-copy.js @@ -0,0 +1,21 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , eq = require("../../object/eq") + , value = require("../../object/valid-value") + , objHasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function (other) { + var i, length; + value(this); + value(other); + length = toPosInt(this.length); + if (length !== toPosInt(other.length)) return false; + for (i = 0; i < length; ++i) { + if (objHasOwnProperty.call(this, i) !== objHasOwnProperty.call(other, i)) { + return false; + } + if (!eq(this[i], other[i])) return false; + } + return true; +}; diff --git a/test/node_modules/es5-ext/array/#/is-empty.js b/test/node_modules/es5-ext/array/#/is-empty.js new file mode 100644 index 0000000..9b336fe --- /dev/null +++ b/test/node_modules/es5-ext/array/#/is-empty.js @@ -0,0 +1,6 @@ +"use strict"; + +var ensureArray = require("../../object/ensure-array") + , firstIndex = require("./first-index"); + +module.exports = function () { return firstIndex.call(ensureArray(this)) === null; }; diff --git a/test/node_modules/es5-ext/array/#/is-uniq.js b/test/node_modules/es5-ext/array/#/is-uniq.js new file mode 100644 index 0000000..75f7734 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/is-uniq.js @@ -0,0 +1,9 @@ +"use strict"; + +var indexOf = require("./e-index-of") + , every = Array.prototype.every + , isFirst; + +isFirst = function (value, index) { return indexOf.call(this, value) === index; }; + +module.exports = function () { return every.call(this, isFirst, this); }; diff --git a/test/node_modules/es5-ext/array/#/keys/implement.js b/test/node_modules/es5-ext/array/#/keys/implement.js new file mode 100644 index 0000000..101a5e3 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/keys/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "keys", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/array/#/keys/index.js b/test/node_modules/es5-ext/array/#/keys/index.js new file mode 100644 index 0000000..c8753e5 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/keys/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.prototype.keys : require("./shim"); diff --git a/test/node_modules/es5-ext/array/#/keys/is-implemented.js b/test/node_modules/es5-ext/array/#/keys/is-implemented.js new file mode 100644 index 0000000..70a171f --- /dev/null +++ b/test/node_modules/es5-ext/array/#/keys/is-implemented.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = function () { + var arr = [1, "foo"], iterator, result; + if (typeof arr.keys !== "function") return false; + iterator = arr.keys(); + if (!iterator) return false; + if (typeof iterator.next !== "function") return false; + result = iterator.next(); + if (!result) return false; + if (result.value !== 0) return false; + if (result.done !== false) return false; + return true; +}; diff --git a/test/node_modules/es5-ext/array/#/keys/shim.js b/test/node_modules/es5-ext/array/#/keys/shim.js new file mode 100644 index 0000000..8136cdc --- /dev/null +++ b/test/node_modules/es5-ext/array/#/keys/shim.js @@ -0,0 +1,4 @@ +"use strict"; + +var ArrayIterator = require("es6-iterator/array"); +module.exports = function () { return new ArrayIterator(this, "key"); }; diff --git a/test/node_modules/es5-ext/array/#/last-index.js b/test/node_modules/es5-ext/array/#/last-index.js new file mode 100644 index 0000000..74aaba4 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/last-index.js @@ -0,0 +1,15 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , value = require("../../object/valid-value") + , objHasOwnProperty = Object.prototype.hasOwnProperty; + +module.exports = function () { + var i, length; + if (!(length = toPosInt(value(this).length))) return null; + i = length - 1; + while (!objHasOwnProperty.call(this, i)) { + if (--i === -1) return null; + } + return i; +}; diff --git a/test/node_modules/es5-ext/array/#/last.js b/test/node_modules/es5-ext/array/#/last.js new file mode 100644 index 0000000..38bb359 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/last.js @@ -0,0 +1,9 @@ +"use strict"; + +var lastIndex = require("./last-index"); + +module.exports = function () { + var i; + if ((i = lastIndex.call(this)) !== null) return this[i]; + return undefined; +}; diff --git a/test/node_modules/es5-ext/array/#/map/implement.js b/test/node_modules/es5-ext/array/#/map/implement.js new file mode 100644 index 0000000..42e0b47 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/map/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "map", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/array/#/map/index.js b/test/node_modules/es5-ext/array/#/map/index.js new file mode 100644 index 0000000..49e0267 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/map/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.prototype.map : require("./shim"); diff --git a/test/node_modules/es5-ext/array/#/map/is-implemented.js b/test/node_modules/es5-ext/array/#/map/is-implemented.js new file mode 100644 index 0000000..f09bd7d --- /dev/null +++ b/test/node_modules/es5-ext/array/#/map/is-implemented.js @@ -0,0 +1,6 @@ +"use strict"; + +var identity = require("../../../function/identity") + , SubArray = require("../../_sub-array-dummy-safe"); + +module.exports = function () { return new SubArray().map(identity) instanceof SubArray; }; diff --git a/test/node_modules/es5-ext/array/#/map/shim.js b/test/node_modules/es5-ext/array/#/map/shim.js new file mode 100644 index 0000000..6e935d3 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/map/shim.js @@ -0,0 +1,22 @@ +"use strict"; + +var isPlainArray = require("../../is-plain-array") + , callable = require("../../../object/valid-callable") + , isArray = Array.isArray + , map = Array.prototype.map + , forEach = Array.prototype.forEach + , call = Function.prototype.call; + +module.exports = function (callbackFn /*, thisArg*/) { + var result, thisArg; + if (!this || !isArray(this) || isPlainArray(this)) { + return map.apply(this, arguments); + } + callable(callbackFn); + thisArg = arguments[1]; + result = new this.constructor(this.length); + forEach.call(this, function (val, i, self) { + result[i] = call.call(callbackFn, thisArg, val, i, self); + }); + return result; +}; diff --git a/test/node_modules/es5-ext/array/#/remove.js b/test/node_modules/es5-ext/array/#/remove.js new file mode 100644 index 0000000..6a8a086 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/remove.js @@ -0,0 +1,17 @@ +"use strict"; + +var indexOf = require("./e-index-of") + , forEach = Array.prototype.forEach + , splice = Array.prototype.splice; + +// eslint-disable-next-line no-unused-vars +module.exports = function (itemToRemove /*, …item*/) { + forEach.call( + arguments, + function (item) { + var index = indexOf.call(this, item); + if (index !== -1) splice.call(this, index, 1); + }, + this + ); +}; diff --git a/test/node_modules/es5-ext/array/#/separate.js b/test/node_modules/es5-ext/array/#/separate.js new file mode 100644 index 0000000..248662f --- /dev/null +++ b/test/node_modules/es5-ext/array/#/separate.js @@ -0,0 +1,10 @@ +"use strict"; + +var forEach = Array.prototype.forEach; + +module.exports = function (sep) { + var result = []; + forEach.call(this, function (val) { result.push(val, sep); }); + result.pop(); + return result; +}; diff --git a/test/node_modules/es5-ext/array/#/slice/implement.js b/test/node_modules/es5-ext/array/#/slice/implement.js new file mode 100644 index 0000000..113d34d --- /dev/null +++ b/test/node_modules/es5-ext/array/#/slice/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "slice", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/array/#/slice/index.js b/test/node_modules/es5-ext/array/#/slice/index.js new file mode 100644 index 0000000..716b7e0 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/slice/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.prototype.slice : require("./shim"); diff --git a/test/node_modules/es5-ext/array/#/slice/is-implemented.js b/test/node_modules/es5-ext/array/#/slice/is-implemented.js new file mode 100644 index 0000000..4c83bfa --- /dev/null +++ b/test/node_modules/es5-ext/array/#/slice/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +var SubArray = require("../../_sub-array-dummy-safe"); + +module.exports = function () { return new SubArray().slice() instanceof SubArray; }; diff --git a/test/node_modules/es5-ext/array/#/slice/shim.js b/test/node_modules/es5-ext/array/#/slice/shim.js new file mode 100644 index 0000000..ff13085 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/slice/shim.js @@ -0,0 +1,36 @@ +"use strict"; + +var toInteger = require("../../../number/to-integer") + , toPosInt = require("../../../number/to-pos-integer") + , isPlainArray = require("../../is-plain-array") + , isArray = Array.isArray + , slice = Array.prototype.slice + , objHasOwnProperty = Object.prototype.hasOwnProperty + , max = Math.max; + +module.exports = function (start, end) { + var length, result, i; + if (!this || !isArray(this) || isPlainArray(this)) { + return slice.apply(this, arguments); + } + length = toPosInt(this.length); + start = toInteger(start); + if (start < 0) start = max(length + start, 0); + else if (start > length) start = length; + if (end === undefined) { + end = length; + } else { + end = toInteger(end); + if (end < 0) end = max(length + end, 0); + else if (end > length) end = length; + } + if (start > end) start = end; + result = new this.constructor(end - start); + i = 0; + while (start !== end) { + if (objHasOwnProperty.call(this, start)) result[i] = this[start]; + ++i; + ++start; + } + return result; +}; diff --git a/test/node_modules/es5-ext/array/#/some-right.js b/test/node_modules/es5-ext/array/#/some-right.js new file mode 100644 index 0000000..d9a665f --- /dev/null +++ b/test/node_modules/es5-ext/array/#/some-right.js @@ -0,0 +1,21 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , callable = require("../../object/valid-callable") + , value = require("../../object/valid-value") + , objHasOwnProperty = Object.prototype.hasOwnProperty + , call = Function.prototype.call; + +module.exports = function (cb /*, thisArg*/) { + var i, self, thisArg; + self = Object(value(this)); + callable(cb); + thisArg = arguments[1]; + + for (i = toPosInt(self.length) - 1; i >= 0; --i) { + if (objHasOwnProperty.call(self, i) && call.call(cb, thisArg, self[i], i, self)) { + return true; + } + } + return false; +}; diff --git a/test/node_modules/es5-ext/array/#/splice/implement.js b/test/node_modules/es5-ext/array/#/splice/implement.js new file mode 100644 index 0000000..236b1cb --- /dev/null +++ b/test/node_modules/es5-ext/array/#/splice/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "splice", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/array/#/splice/index.js b/test/node_modules/es5-ext/array/#/splice/index.js new file mode 100644 index 0000000..cd5c3ec --- /dev/null +++ b/test/node_modules/es5-ext/array/#/splice/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.prototype.splice : require("./shim"); diff --git a/test/node_modules/es5-ext/array/#/splice/is-implemented.js b/test/node_modules/es5-ext/array/#/splice/is-implemented.js new file mode 100644 index 0000000..085cba5 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/splice/is-implemented.js @@ -0,0 +1,5 @@ +"use strict"; + +var SubArray = require("../../_sub-array-dummy-safe"); + +module.exports = function () { return new SubArray().splice(0) instanceof SubArray; }; diff --git a/test/node_modules/es5-ext/array/#/splice/shim.js b/test/node_modules/es5-ext/array/#/splice/shim.js new file mode 100644 index 0000000..fe1f8c2 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/splice/shim.js @@ -0,0 +1,15 @@ +"use strict"; + +var isPlainArray = require("../../is-plain-array") + , isArray = Array.isArray + , splice = Array.prototype.splice + , forEach = Array.prototype.forEach; + +// eslint-disable-next-line no-unused-vars +module.exports = function (start, deleteCount /*, …items*/) { + var arr = splice.apply(this, arguments), result; + if (!this || !isArray(this) || isPlainArray(this)) return arr; + result = new this.constructor(arr.length); + forEach.call(arr, function (val, i) { result[i] = val; }); + return result; +}; diff --git a/test/node_modules/es5-ext/array/#/uniq.js b/test/node_modules/es5-ext/array/#/uniq.js new file mode 100644 index 0000000..2d28bf5 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/uniq.js @@ -0,0 +1,9 @@ +"use strict"; + +var indexOf = require("./e-index-of") + , filter = Array.prototype.filter + , isFirst; + +isFirst = function (value, index) { return indexOf.call(this, value) === index; }; + +module.exports = function () { return filter.call(this, isFirst, this); }; diff --git a/test/node_modules/es5-ext/array/#/values/implement.js b/test/node_modules/es5-ext/array/#/values/implement.js new file mode 100644 index 0000000..dce17ac --- /dev/null +++ b/test/node_modules/es5-ext/array/#/values/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array.prototype, "values", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/array/#/values/index.js b/test/node_modules/es5-ext/array/#/values/index.js new file mode 100644 index 0000000..30a50ba --- /dev/null +++ b/test/node_modules/es5-ext/array/#/values/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.prototype.values : require("./shim"); diff --git a/test/node_modules/es5-ext/array/#/values/is-implemented.js b/test/node_modules/es5-ext/array/#/values/is-implemented.js new file mode 100644 index 0000000..8b72568 --- /dev/null +++ b/test/node_modules/es5-ext/array/#/values/is-implemented.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = function () { + var arr = ["foo", 1], iterator, result; + if (typeof arr.values !== "function") return false; + iterator = arr.values(); + if (!iterator) return false; + if (typeof iterator.next !== "function") return false; + result = iterator.next(); + if (!result) return false; + if (result.value !== "foo") return false; + if (result.done !== false) return false; + return true; +}; diff --git a/test/node_modules/es5-ext/array/#/values/shim.js b/test/node_modules/es5-ext/array/#/values/shim.js new file mode 100644 index 0000000..5d013ab --- /dev/null +++ b/test/node_modules/es5-ext/array/#/values/shim.js @@ -0,0 +1,4 @@ +"use strict"; + +var ArrayIterator = require("es6-iterator/array"); +module.exports = function () { return new ArrayIterator(this, "value"); }; diff --git a/test/node_modules/es5-ext/array/_is-extensible.js b/test/node_modules/es5-ext/array/_is-extensible.js new file mode 100644 index 0000000..c475711 --- /dev/null +++ b/test/node_modules/es5-ext/array/_is-extensible.js @@ -0,0 +1,14 @@ +"use strict"; + +module.exports = (function () { + var SubArray = require("./_sub-array-dummy") + , arr; + + if (!SubArray) return false; + arr = new SubArray(); + if (!Array.isArray(arr)) return false; + if (!(arr instanceof SubArray)) return false; + + arr[34] = "foo"; + return arr.length === 35; +})(); diff --git a/test/node_modules/es5-ext/array/_sub-array-dummy-safe.js b/test/node_modules/es5-ext/array/_sub-array-dummy-safe.js new file mode 100644 index 0000000..bef50be --- /dev/null +++ b/test/node_modules/es5-ext/array/_sub-array-dummy-safe.js @@ -0,0 +1,22 @@ +"use strict"; + +var setPrototypeOf = require("../object/set-prototype-of") + , isExtensible = require("./_is-extensible"); + +module.exports = (function () { + var SubArray; + + if (isExtensible) return require("./_sub-array-dummy"); + + if (!setPrototypeOf) return null; + SubArray = function () { + var arr = Array.apply(this, arguments); + setPrototypeOf(arr, SubArray.prototype); + return arr; + }; + setPrototypeOf(SubArray, Array); + SubArray.prototype = Object.create(Array.prototype, { + constructor: { value: SubArray, enumerable: false, writable: true, configurable: true } + }); + return SubArray; +})(); diff --git a/test/node_modules/es5-ext/array/_sub-array-dummy.js b/test/node_modules/es5-ext/array/_sub-array-dummy.js new file mode 100644 index 0000000..5969309 --- /dev/null +++ b/test/node_modules/es5-ext/array/_sub-array-dummy.js @@ -0,0 +1,15 @@ +"use strict"; + +var setPrototypeOf = require("../object/set-prototype-of"); + +module.exports = (function () { + var SubArray; + + if (!setPrototypeOf) return null; + SubArray = function () { Array.apply(this, arguments); }; + setPrototypeOf(SubArray, Array); + SubArray.prototype = Object.create(Array.prototype, { + constructor: { value: SubArray, enumerable: false, writable: true, configurable: true } + }); + return SubArray; +})(); diff --git a/test/node_modules/es5-ext/array/from/implement.js b/test/node_modules/es5-ext/array/from/implement.js new file mode 100644 index 0000000..c08d407 --- /dev/null +++ b/test/node_modules/es5-ext/array/from/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array, "from", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/array/from/index.js b/test/node_modules/es5-ext/array/from/index.js new file mode 100644 index 0000000..81cf8d9 --- /dev/null +++ b/test/node_modules/es5-ext/array/from/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.from : require("./shim"); diff --git a/test/node_modules/es5-ext/array/from/is-implemented.js b/test/node_modules/es5-ext/array/from/is-implemented.js new file mode 100644 index 0000000..a786c76 --- /dev/null +++ b/test/node_modules/es5-ext/array/from/is-implemented.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function () { + var from = Array.from, arr, result; + if (typeof from !== "function") return false; + arr = ["raz", "dwa"]; + result = from(arr); + return Boolean(result && result !== arr && result[1] === "dwa"); +}; diff --git a/test/node_modules/es5-ext/array/from/shim.js b/test/node_modules/es5-ext/array/from/shim.js new file mode 100644 index 0000000..bf660b6 --- /dev/null +++ b/test/node_modules/es5-ext/array/from/shim.js @@ -0,0 +1,119 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator + , isArguments = require("../../function/is-arguments") + , isFunction = require("../../function/is-function") + , toPosInt = require("../../number/to-pos-integer") + , callable = require("../../object/valid-callable") + , validValue = require("../../object/valid-value") + , isValue = require("../../object/is-value") + , isString = require("../../string/is-string") + , isArray = Array.isArray + , call = Function.prototype.call + , desc = { configurable: true, enumerable: true, writable: true, value: null } + , defineProperty = Object.defineProperty; + +// eslint-disable-next-line complexity, max-lines-per-function +module.exports = function (arrayLike /*, mapFn, thisArg*/) { + var mapFn = arguments[1] + , thisArg = arguments[2] + , Context + , i + , j + , arr + , length + , code + , iterator + , result + , getIterator + , value; + + arrayLike = Object(validValue(arrayLike)); + + if (isValue(mapFn)) callable(mapFn); + if (!this || this === Array || !isFunction(this)) { + // Result: Plain array + if (!mapFn) { + if (isArguments(arrayLike)) { + // Source: Arguments + length = arrayLike.length; + if (length !== 1) return Array.apply(null, arrayLike); + arr = new Array(1); + arr[0] = arrayLike[0]; + return arr; + } + if (isArray(arrayLike)) { + // Source: Array + arr = new Array((length = arrayLike.length)); + for (i = 0; i < length; ++i) arr[i] = arrayLike[i]; + return arr; + } + } + arr = []; + } else { + // Result: Non plain array + Context = this; + } + + if (!isArray(arrayLike)) { + if ((getIterator = arrayLike[iteratorSymbol]) !== undefined) { + // Source: Iterator + iterator = callable(getIterator).call(arrayLike); + if (Context) arr = new Context(); + result = iterator.next(); + i = 0; + while (!result.done) { + value = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value; + if (Context) { + desc.value = value; + defineProperty(arr, i, desc); + } else { + arr[i] = value; + } + result = iterator.next(); + ++i; + } + length = i; + } else if (isString(arrayLike)) { + // Source: String + length = arrayLike.length; + if (Context) arr = new Context(); + for (i = 0, j = 0; i < length; ++i) { + value = arrayLike[i]; + if (i + 1 < length) { + code = value.charCodeAt(0); + // eslint-disable-next-line max-depth + if (code >= 0xd800 && code <= 0xdbff) value += arrayLike[++i]; + } + value = mapFn ? call.call(mapFn, thisArg, value, j) : value; + if (Context) { + desc.value = value; + defineProperty(arr, j, desc); + } else { + arr[j] = value; + } + ++j; + } + length = j; + } + } + if (length === undefined) { + // Source: array or array-like + length = toPosInt(arrayLike.length); + if (Context) arr = new Context(length); + for (i = 0; i < length; ++i) { + value = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i]; + if (Context) { + desc.value = value; + defineProperty(arr, i, desc); + } else { + arr[i] = value; + } + } + } + if (Context) { + desc.value = null; + arr.length = length; + } + return arr; +}; diff --git a/test/node_modules/es5-ext/array/generate.js b/test/node_modules/es5-ext/array/generate.js new file mode 100644 index 0000000..42b6930 --- /dev/null +++ b/test/node_modules/es5-ext/array/generate.js @@ -0,0 +1,18 @@ +"use strict"; + +var toPosInt = require("../number/to-pos-integer") + , value = require("../object/valid-value") + , slice = Array.prototype.slice; + +module.exports = function (length /*, …fill*/) { + var arr, currentLength; + length = toPosInt(value(length)); + if (length === 0) return []; + + arr = arguments.length < 2 ? [undefined] : slice.call(arguments, 1, 1 + length); + + while ((currentLength = arr.length) < length) { + arr = arr.concat(arr.slice(0, length - currentLength)); + } + return arr; +}; diff --git a/test/node_modules/es5-ext/array/index.js b/test/node_modules/es5-ext/array/index.js new file mode 100644 index 0000000..49ff58e --- /dev/null +++ b/test/node_modules/es5-ext/array/index.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = { + "#": require("./#"), + "from": require("./from"), + "generate": require("./generate"), + "isPlainArray": require("./is-plain-array"), + "of": require("./of"), + "toArray": require("./to-array"), + "validArray": require("./valid-array") +}; diff --git a/test/node_modules/es5-ext/array/is-plain-array.js b/test/node_modules/es5-ext/array/is-plain-array.js new file mode 100644 index 0000000..ca3d25b --- /dev/null +++ b/test/node_modules/es5-ext/array/is-plain-array.js @@ -0,0 +1,11 @@ +"use strict"; + +var isArray = Array.isArray, getPrototypeOf = Object.getPrototypeOf; + +module.exports = function (obj) { + var proto; + if (!obj || !isArray(obj)) return false; + proto = getPrototypeOf(obj); + if (!isArray(proto)) return false; + return !isArray(getPrototypeOf(proto)); +}; diff --git a/test/node_modules/es5-ext/array/of/implement.js b/test/node_modules/es5-ext/array/of/implement.js new file mode 100644 index 0000000..6665c77 --- /dev/null +++ b/test/node_modules/es5-ext/array/of/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Array, "of", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/array/of/index.js b/test/node_modules/es5-ext/array/of/index.js new file mode 100644 index 0000000..503c749 --- /dev/null +++ b/test/node_modules/es5-ext/array/of/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Array.of : require("./shim"); diff --git a/test/node_modules/es5-ext/array/of/is-implemented.js b/test/node_modules/es5-ext/array/of/is-implemented.js new file mode 100644 index 0000000..3f232ca --- /dev/null +++ b/test/node_modules/es5-ext/array/of/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = function () { + var of = Array.of, result; + if (typeof of !== "function") return false; + result = of("foo", "bar"); + return Boolean(result && result[1] === "bar"); +}; diff --git a/test/node_modules/es5-ext/array/of/shim.js b/test/node_modules/es5-ext/array/of/shim.js new file mode 100644 index 0000000..0202a8a --- /dev/null +++ b/test/node_modules/es5-ext/array/of/shim.js @@ -0,0 +1,19 @@ +"use strict"; + +var isFunction = require("../../function/is-function") + , slice = Array.prototype.slice + , defineProperty = Object.defineProperty + , desc = { configurable: true, enumerable: true, writable: true, value: null }; + +module.exports = function (/* …items*/) { + var result, i, length; + if (!this || this === Array || !isFunction(this)) return slice.call(arguments); + result = new this((length = arguments.length)); + for (i = 0; i < length; ++i) { + desc.value = arguments[i]; + defineProperty(result, i, desc); + } + desc.value = null; + result.length = length; + return result; +}; diff --git a/test/node_modules/es5-ext/array/to-array.js b/test/node_modules/es5-ext/array/to-array.js new file mode 100644 index 0000000..2515e02 --- /dev/null +++ b/test/node_modules/es5-ext/array/to-array.js @@ -0,0 +1,6 @@ +"use strict"; + +var from = require("./from") + , isArray = Array.isArray; + +module.exports = function (arrayLike) { return isArray(arrayLike) ? arrayLike : from(arrayLike); }; diff --git a/test/node_modules/es5-ext/array/valid-array.js b/test/node_modules/es5-ext/array/valid-array.js new file mode 100644 index 0000000..1e58c39 --- /dev/null +++ b/test/node_modules/es5-ext/array/valid-array.js @@ -0,0 +1,8 @@ +"use strict"; + +var isArray = Array.isArray; + +module.exports = function (value) { + if (isArray(value)) return value; + throw new TypeError(value + " is not an array"); +}; diff --git a/test/node_modules/es5-ext/boolean/index.js b/test/node_modules/es5-ext/boolean/index.js new file mode 100644 index 0000000..3513642 --- /dev/null +++ b/test/node_modules/es5-ext/boolean/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = { isBoolean: require("./is-boolean") }; diff --git a/test/node_modules/es5-ext/boolean/is-boolean.js b/test/node_modules/es5-ext/boolean/is-boolean.js new file mode 100644 index 0000000..394845f --- /dev/null +++ b/test/node_modules/es5-ext/boolean/is-boolean.js @@ -0,0 +1,10 @@ +"use strict"; + +var objToString = Object.prototype.toString, id = objToString.call(true); + +module.exports = function (value) { + return ( + typeof value === "boolean" || + (typeof value === "object" && (value instanceof Boolean || objToString.call(value) === id)) + ); +}; diff --git a/test/node_modules/es5-ext/date/#/copy.js b/test/node_modules/es5-ext/date/#/copy.js new file mode 100644 index 0000000..1262ae0 --- /dev/null +++ b/test/node_modules/es5-ext/date/#/copy.js @@ -0,0 +1,5 @@ +"use strict"; + +var getTime = Date.prototype.getTime; + +module.exports = function () { return new Date(getTime.call(this)); }; diff --git a/test/node_modules/es5-ext/date/#/days-in-month.js b/test/node_modules/es5-ext/date/#/days-in-month.js new file mode 100644 index 0000000..731d4d5 --- /dev/null +++ b/test/node_modules/es5-ext/date/#/days-in-month.js @@ -0,0 +1,17 @@ +"use strict"; + +var getMonth = Date.prototype.getMonth; + +module.exports = function () { + switch (getMonth.call(this)) { + case 1: + return this.getFullYear() % 4 ? 28 : 29; + case 3: + case 5: + case 8: + case 10: + return 30; + default: + return 31; + } +}; diff --git a/test/node_modules/es5-ext/date/#/floor-day.js b/test/node_modules/es5-ext/date/#/floor-day.js new file mode 100644 index 0000000..db696d3 --- /dev/null +++ b/test/node_modules/es5-ext/date/#/floor-day.js @@ -0,0 +1,8 @@ +"use strict"; + +var setHours = Date.prototype.setHours; + +module.exports = function () { + setHours.call(this, 0, 0, 0, 0); + return this; +}; diff --git a/test/node_modules/es5-ext/date/#/floor-month.js b/test/node_modules/es5-ext/date/#/floor-month.js new file mode 100644 index 0000000..c9c0460 --- /dev/null +++ b/test/node_modules/es5-ext/date/#/floor-month.js @@ -0,0 +1,8 @@ +"use strict"; + +var floorDay = require("./floor-day"); + +module.exports = function () { + floorDay.call(this).setDate(1); + return this; +}; diff --git a/test/node_modules/es5-ext/date/#/floor-year.js b/test/node_modules/es5-ext/date/#/floor-year.js new file mode 100644 index 0000000..e9b6f0f --- /dev/null +++ b/test/node_modules/es5-ext/date/#/floor-year.js @@ -0,0 +1,8 @@ +"use strict"; + +var floorMonth = require("./floor-month"); + +module.exports = function () { + floorMonth.call(this).setMonth(0); + return this; +}; diff --git a/test/node_modules/es5-ext/date/#/format.js b/test/node_modules/es5-ext/date/#/format.js new file mode 100644 index 0000000..8474dbb --- /dev/null +++ b/test/node_modules/es5-ext/date/#/format.js @@ -0,0 +1,20 @@ +/* eslint id-length: "off" */ + +"use strict"; + +var pad = require("../../number/#/pad") + , date = require("../valid-date") + , format; + +format = require("../../string/format-method")({ + Y: function () { return String(this.getFullYear()); }, + y: function () { return String(this.getFullYear()).slice(-2); }, + m: function () { return pad.call(this.getMonth() + 1, 2); }, + d: function () { return pad.call(this.getDate(), 2); }, + H: function () { return pad.call(this.getHours(), 2); }, + M: function () { return pad.call(this.getMinutes(), 2); }, + S: function () { return pad.call(this.getSeconds(), 2); }, + L: function () { return pad.call(this.getMilliseconds(), 3); } +}); + +module.exports = function (pattern) { return format.call(date(this), pattern); }; diff --git a/test/node_modules/es5-ext/date/#/index.js b/test/node_modules/es5-ext/date/#/index.js new file mode 100644 index 0000000..1781e21 --- /dev/null +++ b/test/node_modules/es5-ext/date/#/index.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = { + copy: require("./copy"), + daysInMonth: require("./days-in-month"), + floorDay: require("./floor-day"), + floorMonth: require("./floor-month"), + floorYear: require("./floor-year"), + format: require("./format") +}; diff --git a/test/node_modules/es5-ext/date/ensure-time-value.js b/test/node_modules/es5-ext/date/ensure-time-value.js new file mode 100644 index 0000000..09f5afc --- /dev/null +++ b/test/node_modules/es5-ext/date/ensure-time-value.js @@ -0,0 +1,10 @@ +"use strict"; + +var safeToString = require("../safe-to-string") + , toInteger = require("../number/to-integer") + , isTimeValue = require("./is-time-value"); + +module.exports = function (value) { + if (isTimeValue(value)) return toInteger(value); + throw new TypeError(safeToString(value) + " is not a valid time value"); +}; diff --git a/test/node_modules/es5-ext/date/index.js b/test/node_modules/es5-ext/date/index.js new file mode 100644 index 0000000..c143149 --- /dev/null +++ b/test/node_modules/es5-ext/date/index.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = { + "#": require("./#"), + "ensureTimeValue": require("./ensure-time-value"), + "isDate": require("./is-date"), + "isTimeValue": require("./is-time-value"), + "validDate": require("./valid-date") +}; diff --git a/test/node_modules/es5-ext/date/is-date.js b/test/node_modules/es5-ext/date/is-date.js new file mode 100644 index 0000000..f45bde4 --- /dev/null +++ b/test/node_modules/es5-ext/date/is-date.js @@ -0,0 +1,10 @@ +"use strict"; + +var objToString = Object.prototype.toString, id = objToString.call(new Date()); + +module.exports = function (value) { + return ( + (value && !isNaN(value) && (value instanceof Date || objToString.call(value) === id)) || + false + ); +}; diff --git a/test/node_modules/es5-ext/date/is-time-value.js b/test/node_modules/es5-ext/date/is-time-value.js new file mode 100644 index 0000000..0deb0b9 --- /dev/null +++ b/test/node_modules/es5-ext/date/is-time-value.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function (value) { + try { value = Number(value); } + catch (e) { return false; } + if (isNaN(value)) return false; + if (Math.abs(value) > 8.64e15) return false; + return true; +}; diff --git a/test/node_modules/es5-ext/date/valid-date.js b/test/node_modules/es5-ext/date/valid-date.js new file mode 100644 index 0000000..0c73dc5 --- /dev/null +++ b/test/node_modules/es5-ext/date/valid-date.js @@ -0,0 +1,8 @@ +"use strict"; + +var isDate = require("./is-date"); + +module.exports = function (value) { + if (!isDate(value)) throw new TypeError(value + " is not valid Date object"); + return value; +}; diff --git a/test/node_modules/es5-ext/error/#/index.js b/test/node_modules/es5-ext/error/#/index.js new file mode 100644 index 0000000..973a9d4 --- /dev/null +++ b/test/node_modules/es5-ext/error/#/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = { throw: require("./throw") }; diff --git a/test/node_modules/es5-ext/error/#/throw.js b/test/node_modules/es5-ext/error/#/throw.js new file mode 100644 index 0000000..3eb196d --- /dev/null +++ b/test/node_modules/es5-ext/error/#/throw.js @@ -0,0 +1,5 @@ +"use strict"; + +var error = require("../valid-error"); + +module.exports = function () { throw error(this); }; diff --git a/test/node_modules/es5-ext/error/custom.js b/test/node_modules/es5-ext/error/custom.js new file mode 100644 index 0000000..22ea5d8 --- /dev/null +++ b/test/node_modules/es5-ext/error/custom.js @@ -0,0 +1,20 @@ +"use strict"; + +var assign = require("../object/assign") + , isObject = require("../object/is-object") + , isValue = require("../object/is-value") + , captureStackTrace = Error.captureStackTrace; + +module.exports = function (message /*, code, ext*/) { + var err = new Error(message), code = arguments[1], ext = arguments[2]; + if (!isValue(ext)) { + if (isObject(code)) { + ext = code; + code = null; + } + } + if (isValue(ext)) assign(err, ext); + if (isValue(code)) err.code = code; + if (captureStackTrace) captureStackTrace(err, module.exports); + return err; +}; diff --git a/test/node_modules/es5-ext/error/index.js b/test/node_modules/es5-ext/error/index.js new file mode 100644 index 0000000..cb7054a --- /dev/null +++ b/test/node_modules/es5-ext/error/index.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = { + "#": require("./#"), + "custom": require("./custom"), + "isError": require("./is-error"), + "validError": require("./valid-error") +}; diff --git a/test/node_modules/es5-ext/error/is-error.js b/test/node_modules/es5-ext/error/is-error.js new file mode 100644 index 0000000..aad67ed --- /dev/null +++ b/test/node_modules/es5-ext/error/is-error.js @@ -0,0 +1,7 @@ +"use strict"; + +var objToString = Object.prototype.toString, id = objToString.call(new Error()); + +module.exports = function (value) { + return (value && (value instanceof Error || objToString.call(value) === id)) || false; +}; diff --git a/test/node_modules/es5-ext/error/valid-error.js b/test/node_modules/es5-ext/error/valid-error.js new file mode 100644 index 0000000..432f7ba --- /dev/null +++ b/test/node_modules/es5-ext/error/valid-error.js @@ -0,0 +1,8 @@ +"use strict"; + +var isError = require("./is-error"); + +module.exports = function (value) { + if (!isError(value)) throw new TypeError(value + " is not an Error object"); + return value; +}; diff --git a/test/node_modules/es5-ext/function/#/compose.js b/test/node_modules/es5-ext/function/#/compose.js new file mode 100644 index 0000000..d16b2b1 --- /dev/null +++ b/test/node_modules/es5-ext/function/#/compose.js @@ -0,0 +1,20 @@ +"use strict"; + +var isValue = require("../../object/is-value") + , callable = require("../../object/valid-callable") + , aFrom = require("../../array/from"); + +var apply = Function.prototype.apply + , call = Function.prototype.call + , callFn = function (arg, fn) { return call.call(fn, this, arg); }; + +module.exports = function (fnIgnored /*, …fnn*/) { + var fns, first; + var args = aFrom(arguments); + fns = isValue(this) ? [this].concat(args) : args; + fns.forEach(callable); + fns = fns.reverse(); + first = fns[0]; + fns = fns.slice(1); + return function (argIgnored) { return fns.reduce(callFn, apply.call(first, this, arguments)); }; +}; diff --git a/test/node_modules/es5-ext/function/#/copy.js b/test/node_modules/es5-ext/function/#/copy.js new file mode 100644 index 0000000..81ae783 --- /dev/null +++ b/test/node_modules/es5-ext/function/#/copy.js @@ -0,0 +1,22 @@ +"use strict"; + +var mixin = require("../../object/mixin") + , validFunction = require("../valid-function") + , re = /^\s*function\s*([\0-')-\uffff]+)*\s*\(([\0-(*-\uffff]*)\)\s*\{/; + +module.exports = function () { + var match = String(validFunction(this)).match(re), fn; + + // eslint-disable-next-line no-new-func + fn = new Function( + "fn", + "return function " + + match[1].trim() + + "(" + + match[2] + + ") { return fn.apply(this, arguments); };" + )(this); + try { mixin(fn, this); } + catch (ignore) {} + return fn; +}; diff --git a/test/node_modules/es5-ext/function/#/curry.js b/test/node_modules/es5-ext/function/#/curry.js new file mode 100644 index 0000000..9296458 --- /dev/null +++ b/test/node_modules/es5-ext/function/#/curry.js @@ -0,0 +1,25 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , callable = require("../../object/valid-callable") + , defineLength = require("../_define-length") + , slice = Array.prototype.slice + , apply = Function.prototype.apply + , curry; + +curry = function self(fn, length, preArgs) { + return defineLength( + function () { + var args = preArgs + ? preArgs.concat(slice.call(arguments, 0, length - preArgs.length)) + : slice.call(arguments, 0, length); + return args.length === length ? apply.call(fn, this, args) : self(fn, length, args); + }, + preArgs ? length - preArgs.length : length + ); +}; + +module.exports = function (/* Length*/) { + var length = arguments[0]; + return curry(callable(this), isNaN(length) ? toPosInt(this.length) : toPosInt(length)); +}; diff --git a/test/node_modules/es5-ext/function/#/index.js b/test/node_modules/es5-ext/function/#/index.js new file mode 100644 index 0000000..02ae9f4 --- /dev/null +++ b/test/node_modules/es5-ext/function/#/index.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = { + compose: require("./compose"), + copy: require("./copy"), + curry: require("./curry"), + lock: require("./lock"), + microtaskDelay: require("./microtask-delay"), + not: require("./not"), + partial: require("./partial"), + spread: require("./spread"), + toStringTokens: require("./to-string-tokens") +}; diff --git a/test/node_modules/es5-ext/function/#/lock.js b/test/node_modules/es5-ext/function/#/lock.js new file mode 100644 index 0000000..afd83b9 --- /dev/null +++ b/test/node_modules/es5-ext/function/#/lock.js @@ -0,0 +1,10 @@ +"use strict"; + +var callable = require("../../object/valid-callable") + , apply = Function.prototype.apply; + +module.exports = function (/* …args*/) { + var fn = callable(this), args = arguments; + + return function () { return apply.call(fn, this, args); }; +}; diff --git a/test/node_modules/es5-ext/function/#/microtask-delay.js b/test/node_modules/es5-ext/function/#/microtask-delay.js new file mode 100644 index 0000000..3741ebe --- /dev/null +++ b/test/node_modules/es5-ext/function/#/microtask-delay.js @@ -0,0 +1,12 @@ +"use strict"; + +var ensurePlainFunction = require("../../object/ensure-plain-function") + , defineLength = require("../_define-length") + , nextTick = require("next-tick"); + +var apply = Function.prototype.apply; + +module.exports = function () { + var src = ensurePlainFunction(this); + return defineLength(function () { nextTick(apply.bind(src, this, arguments)); }, this.length); +}; diff --git a/test/node_modules/es5-ext/function/#/not.js b/test/node_modules/es5-ext/function/#/not.js new file mode 100644 index 0000000..b3b7d62 --- /dev/null +++ b/test/node_modules/es5-ext/function/#/not.js @@ -0,0 +1,11 @@ +"use strict"; + +var callable = require("../../object/valid-callable") + , defineLength = require("../_define-length") + , apply = Function.prototype.apply; + +module.exports = function () { + var fn = callable(this); + + return defineLength(function () { return !apply.call(fn, this, arguments); }, fn.length); +}; diff --git a/test/node_modules/es5-ext/function/#/partial.js b/test/node_modules/es5-ext/function/#/partial.js new file mode 100644 index 0000000..8f09c4f --- /dev/null +++ b/test/node_modules/es5-ext/function/#/partial.js @@ -0,0 +1,14 @@ +"use strict"; + +var callable = require("../../object/valid-callable") + , aFrom = require("../../array/from") + , defineLength = require("../_define-length") + , apply = Function.prototype.apply; + +module.exports = function (/* …args*/) { + var fn = callable(this), args = aFrom(arguments); + + return defineLength(function () { + return apply.call(fn, this, args.concat(aFrom(arguments))); + }, fn.length - args.length); +}; diff --git a/test/node_modules/es5-ext/function/#/spread.js b/test/node_modules/es5-ext/function/#/spread.js new file mode 100644 index 0000000..555d991 --- /dev/null +++ b/test/node_modules/es5-ext/function/#/spread.js @@ -0,0 +1,9 @@ +"use strict"; + +var callable = require("../../object/valid-callable") + , apply = Function.prototype.apply; + +module.exports = function () { + var fn = callable(this); + return function (args) { return apply.call(fn, this, args); }; +}; diff --git a/test/node_modules/es5-ext/function/#/to-string-tokens.js b/test/node_modules/es5-ext/function/#/to-string-tokens.js new file mode 100644 index 0000000..4ce026a --- /dev/null +++ b/test/node_modules/es5-ext/function/#/to-string-tokens.js @@ -0,0 +1,17 @@ +"use strict"; + +var validFunction = require("../valid-function"); + +var re1 = /^\s*function[\0-')-\uffff]*\(([\0-(*-\uffff]*)\)\s*\{([\0-\uffff]*)\}\s*$/ + , re2 = /^\s*\(?([\0-'*-\uffff]*)\)?\s*=>\s*(\{?[\0-\uffff]*\}?)\s*$/; + +module.exports = function () { + var str = String(validFunction(this)), data = str.match(re1); + if (!data) { + data = str.match(re2); + if (!data) throw new Error("Unrecognized string format"); + data[1] = data[1].trim(); + if (data[2][0] === "{") data[2] = data[2].trim().slice(1, -1); + } + return { args: data[1], body: data[2] }; +}; diff --git a/test/node_modules/es5-ext/function/_define-length.js b/test/node_modules/es5-ext/function/_define-length.js new file mode 100644 index 0000000..d77a433 --- /dev/null +++ b/test/node_modules/es5-ext/function/_define-length.js @@ -0,0 +1,54 @@ +"use strict"; + +var toPosInt = require("../number/to-pos-integer"); + +var test = function (arg1, arg2) { return arg2; }; + +var desc, defineProperty, generate, mixin; + +try { + Object.defineProperty(test, "length", { + configurable: true, + writable: false, + enumerable: false, + value: 1 + }); +} +catch (ignore) {} + +if (test.length === 1) { + // ES6 + desc = { configurable: true, writable: false, enumerable: false }; + defineProperty = Object.defineProperty; + module.exports = function (fn, length) { + length = toPosInt(length); + if (fn.length === length) return fn; + desc.value = length; + return defineProperty(fn, "length", desc); + }; +} else { + mixin = require("../object/mixin"); + generate = (function () { + var cache = []; + return function (length) { + var args, i = 0; + if (cache[length]) return cache[length]; + args = []; + while (length--) args.push("a" + (++i).toString(36)); + // eslint-disable-next-line no-new-func + return new Function( + "fn", + "return function (" + args.join(", ") + ") { return fn.apply(this, arguments); };" + ); + }; + })(); + module.exports = function (src, length) { + var target; + length = toPosInt(length); + if (src.length === length) return src; + target = generate(length)(src); + try { mixin(target, src); } + catch (ignore) {} + return target; + }; +} diff --git a/test/node_modules/es5-ext/function/constant.js b/test/node_modules/es5-ext/function/constant.js new file mode 100644 index 0000000..79d81e4 --- /dev/null +++ b/test/node_modules/es5-ext/function/constant.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function (value) { + return function () { return value; }; +}; diff --git a/test/node_modules/es5-ext/function/identity.js b/test/node_modules/es5-ext/function/identity.js new file mode 100644 index 0000000..cde213f --- /dev/null +++ b/test/node_modules/es5-ext/function/identity.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = function (value) { return value; }; diff --git a/test/node_modules/es5-ext/function/index.js b/test/node_modules/es5-ext/function/index.js new file mode 100644 index 0000000..1574fbb --- /dev/null +++ b/test/node_modules/es5-ext/function/index.js @@ -0,0 +1,15 @@ +// Export all modules. + +"use strict"; + +module.exports = { + "#": require("./#"), + "constant": require("./constant"), + "identity": require("./identity"), + "invoke": require("./invoke"), + "isArguments": require("./is-arguments"), + "isFunction": require("./is-function"), + "noop": require("./noop"), + "pluck": require("./pluck"), + "validFunction": require("./valid-function") +}; diff --git a/test/node_modules/es5-ext/function/invoke.js b/test/node_modules/es5-ext/function/invoke.js new file mode 100644 index 0000000..8fdb32b --- /dev/null +++ b/test/node_modules/es5-ext/function/invoke.js @@ -0,0 +1,14 @@ +"use strict"; + +var isCallable = require("../object/is-callable") + , value = require("../object/valid-value") + , slice = Array.prototype.slice + , apply = Function.prototype.apply; + +module.exports = function (name /*, …args*/) { + var args = slice.call(arguments, 1), isFn = isCallable(name); + return function (obj) { + value(obj); + return apply.call(isFn ? name : obj[name], obj, args.concat(slice.call(arguments, 1))); + }; +}; diff --git a/test/node_modules/es5-ext/function/is-arguments.js b/test/node_modules/es5-ext/function/is-arguments.js new file mode 100644 index 0000000..833a747 --- /dev/null +++ b/test/node_modules/es5-ext/function/is-arguments.js @@ -0,0 +1,6 @@ +"use strict"; + +var objToString = Object.prototype.toString + , id = objToString.call((function () { return arguments; })()); + +module.exports = function (value) { return objToString.call(value) === id; }; diff --git a/test/node_modules/es5-ext/function/is-function.js b/test/node_modules/es5-ext/function/is-function.js new file mode 100644 index 0000000..0d7cab3 --- /dev/null +++ b/test/node_modules/es5-ext/function/is-function.js @@ -0,0 +1,8 @@ +"use strict"; + +var objToString = Object.prototype.toString + , isFunctionStringTag = RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/); + +module.exports = function (value) { + return typeof value === "function" && isFunctionStringTag(objToString.call(value)); +}; diff --git a/test/node_modules/es5-ext/function/noop.js b/test/node_modules/es5-ext/function/noop.js new file mode 100644 index 0000000..6174f03 --- /dev/null +++ b/test/node_modules/es5-ext/function/noop.js @@ -0,0 +1,4 @@ +"use strict"; + +// eslint-disable-next-line no-empty-function +module.exports = function () {}; diff --git a/test/node_modules/es5-ext/function/pluck.js b/test/node_modules/es5-ext/function/pluck.js new file mode 100644 index 0000000..432cd46 --- /dev/null +++ b/test/node_modules/es5-ext/function/pluck.js @@ -0,0 +1,7 @@ +"use strict"; + +var value = require("../object/valid-value"); + +module.exports = function (name) { + return function (obj) { return value(obj)[name]; }; +}; diff --git a/test/node_modules/es5-ext/function/valid-function.js b/test/node_modules/es5-ext/function/valid-function.js new file mode 100644 index 0000000..060bd64 --- /dev/null +++ b/test/node_modules/es5-ext/function/valid-function.js @@ -0,0 +1,8 @@ +"use strict"; + +var isFunction = require("./is-function"); + +module.exports = function (value) { + if (!isFunction(value)) throw new TypeError(value + " is not a function"); + return value; +}; diff --git a/test/node_modules/es5-ext/global.js b/test/node_modules/es5-ext/global.js new file mode 100644 index 0000000..61071e6 --- /dev/null +++ b/test/node_modules/es5-ext/global.js @@ -0,0 +1,35 @@ +var naiveFallback = function () { + if (typeof self === "object" && self) return self; + if (typeof window === "object" && window) return window; + throw new Error("Unable to resolve global `this`"); +}; + +module.exports = (function () { + if (this) return this; + + // Unexpected strict mode (may happen if e.g. bundled into ESM module) + + // Fallback to standard globalThis if available + if (typeof globalThis === "object" && globalThis) return globalThis; + + // Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis + // In all ES5+ engines global object inherits from Object.prototype + // (if you approached one that doesn't please report) + try { + Object.defineProperty(Object.prototype, "__global__", { + get: function () { return this; }, + configurable: true + }); + } catch (error) { + // Unfortunate case of updates to Object.prototype being restricted + // via preventExtensions, seal or freeze + return naiveFallback(); + } + try { + // Safari case (window.__global__ works, but __global__ does not) + if (!__global__) return naiveFallback(); + return __global__; + } finally { + delete Object.prototype.__global__; + } +})(); diff --git a/test/node_modules/es5-ext/index.js b/test/node_modules/es5-ext/index.js new file mode 100644 index 0000000..0919764 --- /dev/null +++ b/test/node_modules/es5-ext/index.js @@ -0,0 +1,22 @@ +"use strict"; + +module.exports = { + global: require("./global"), + optionalChaining: require("./optional-chaining"), + safeToString: require("./safe-to-string"), + toShortStringRepresentation: require("./to-short-string-representation"), + + array: require("./array"), + boolean: require("./boolean"), + date: require("./date"), + error: require("./error"), + function: require("./function"), + iterable: require("./iterable"), + json: require("./json"), + math: require("./math"), + number: require("./number"), + object: require("./object"), + promise: require("./promise"), + regExp: require("./reg-exp"), + string: require("./string") +}; diff --git a/test/node_modules/es5-ext/iterable/for-each.js b/test/node_modules/es5-ext/iterable/for-each.js new file mode 100644 index 0000000..9157f65 --- /dev/null +++ b/test/node_modules/es5-ext/iterable/for-each.js @@ -0,0 +1,11 @@ +"use strict"; + +var forOf = require("es6-iterator/for-of") + , isIterable = require("es6-iterator/is-iterable") + , iterable = require("./validate") + , forEach = Array.prototype.forEach; + +module.exports = function (target, cb /*, thisArg*/) { + if (isIterable(iterable(target))) forOf(target, cb, arguments[2]); + else forEach.call(target, cb, arguments[2]); +}; diff --git a/test/node_modules/es5-ext/iterable/index.js b/test/node_modules/es5-ext/iterable/index.js new file mode 100644 index 0000000..4b898fc --- /dev/null +++ b/test/node_modules/es5-ext/iterable/index.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = { + forEach: require("./for-each"), + is: require("./is"), + validate: require("./validate"), + validateObject: require("./validate-object") +}; diff --git a/test/node_modules/es5-ext/iterable/is.js b/test/node_modules/es5-ext/iterable/is.js new file mode 100644 index 0000000..aa5a9b9 --- /dev/null +++ b/test/node_modules/es5-ext/iterable/is.js @@ -0,0 +1,11 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator + , isValue = require("../object/is-value") + , isArrayLike = require("../object/is-array-like"); + +module.exports = function (value) { + if (!isValue(value)) return false; + if (typeof value[iteratorSymbol] === "function") return true; + return isArrayLike(value); +}; diff --git a/test/node_modules/es5-ext/iterable/validate-object.js b/test/node_modules/es5-ext/iterable/validate-object.js new file mode 100644 index 0000000..26e622b --- /dev/null +++ b/test/node_modules/es5-ext/iterable/validate-object.js @@ -0,0 +1,9 @@ +"use strict"; + +var isObject = require("../object/is-object") + , is = require("./is"); + +module.exports = function (value) { + if (is(value) && isObject(value)) return value; + throw new TypeError(value + " is not an iterable or array-like object"); +}; diff --git a/test/node_modules/es5-ext/iterable/validate.js b/test/node_modules/es5-ext/iterable/validate.js new file mode 100644 index 0000000..94a91c4 --- /dev/null +++ b/test/node_modules/es5-ext/iterable/validate.js @@ -0,0 +1,8 @@ +"use strict"; + +var is = require("./is"); + +module.exports = function (value) { + if (is(value)) return value; + throw new TypeError(value + " is not an iterable or array-like"); +}; diff --git a/test/node_modules/es5-ext/json/index.js b/test/node_modules/es5-ext/json/index.js new file mode 100644 index 0000000..d26ac56 --- /dev/null +++ b/test/node_modules/es5-ext/json/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = { safeStringify: require("./safe-stringify") }; diff --git a/test/node_modules/es5-ext/json/safe-stringify.js b/test/node_modules/es5-ext/json/safe-stringify.js new file mode 100644 index 0000000..28169f1 --- /dev/null +++ b/test/node_modules/es5-ext/json/safe-stringify.js @@ -0,0 +1,37 @@ +"use strict"; + +var compact = require("../array/#/compact") + , isObject = require("../object/is-object") + , toArray = require("../object/to-array") + , isArray = Array.isArray + , stringify = JSON.stringify; + +module.exports = function self(value /*, replacer, space*/) { + var replacer = arguments[1], space = arguments[2]; + try { + return stringify(value, replacer, space); + } catch (e) { + if (!isObject(value)) return null; + if (typeof value.toJSON === "function") return null; + if (isArray(value)) { + return ( + "[" + + compact.call(value.map(function (item) { return self(item, replacer, space); })) + + "]" + ); + } + return ( + "{" + + compact + .call( + toArray(value, function (item, key) { + item = self(item, replacer, space); + if (!item) return null; + return stringify(key) + ":" + item; + }) + ) + .join(",") + + "}" + ); + } +}; diff --git a/test/node_modules/es5-ext/math/_decimal-adjust.js b/test/node_modules/es5-ext/math/_decimal-adjust.js new file mode 100644 index 0000000..c6374d6 --- /dev/null +++ b/test/node_modules/es5-ext/math/_decimal-adjust.js @@ -0,0 +1,29 @@ +// Credit: +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round +// #Decimal_rounding + +"use strict"; + +var isValue = require("../object/is-value") + , ensureInteger = require("../object/ensure-integer"); + +var split = String.prototype.split; + +module.exports = function (type) { + return function (value /*, exp*/) { + value = Number(value); + var exp = arguments[1]; + if (isValue(exp)) exp = ensureInteger(exp); + if (!value) return value; + if (!exp) return Math[type](value); + if (!isFinite(value)) return value; + + // Shift + var tokens = split.call(value, "e"); + value = Math[type](tokens[0] + "e" + ((tokens[1] || 0) - exp)); + + // Shift back + tokens = value.toString().split("e"); + return Number(tokens[0] + "e" + (Number(tokens[1] || 0) + exp)); + }; +}; diff --git a/test/node_modules/es5-ext/math/_pack-ieee754.js b/test/node_modules/es5-ext/math/_pack-ieee754.js new file mode 100644 index 0000000..b3edf8d --- /dev/null +++ b/test/node_modules/es5-ext/math/_pack-ieee754.js @@ -0,0 +1,88 @@ +/* eslint no-bitwise: "off" */ +// Credit: https://github.com/paulmillr/es6-shim/ + +"use strict"; + +var abs = Math.abs + , floor = Math.floor + , log = Math.log + , min = Math.min + , pow = Math.pow + , LN2 = Math.LN2 + , roundToEven; + +roundToEven = function (num) { + var whole = floor(num), fraction = num - whole; + if (fraction < 0.5) return whole; + if (fraction > 0.5) return whole + 1; + return whole % 2 ? whole + 1 : whole; +}; + +// eslint-disable-next-line max-statements, max-lines-per-function +module.exports = function (value, ebits, fbits) { + var bias = (1 << (ebits - 1)) - 1, sign, e, fraction, i, bits, str, bytes; + + // Compute sign, exponent, fraction + if (isNaN(value)) { + // NaN + // http://dev.w3.org/2006/webapi/WebIDL/#es-type-mapping + e = (1 << ebits) - 1; + fraction = pow(2, fbits - 1); + sign = 0; + } else if (value === Infinity || value === -Infinity) { + e = (1 << ebits) - 1; + fraction = 0; + sign = value < 0 ? 1 : 0; + } else if (value === 0) { + e = 0; + fraction = 0; + sign = 1 / value === -Infinity ? 1 : 0; + } else { + sign = value < 0; + value = abs(value); + + if (value >= pow(2, 1 - bias)) { + e = min(floor(log(value) / LN2), 1023); + fraction = roundToEven((value / pow(2, e)) * pow(2, fbits)); + if (fraction / pow(2, fbits) >= 2) { + e += 1; + fraction = 1; + } + if (e > bias) { + // Overflow + e = (1 << ebits) - 1; + fraction = 0; + } else { + // Normal + e += bias; + fraction -= pow(2, fbits); + } + } else { + // Subnormal + e = 0; + fraction = roundToEven(value / pow(2, 1 - bias - fbits)); + } + } + + // Pack sign, exponent, fraction + bits = []; + for (i = fbits; i; i -= 1) { + bits.push(fraction % 2 ? 1 : 0); + fraction = floor(fraction / 2); + } + for (i = ebits; i; i -= 1) { + bits.push(e % 2 ? 1 : 0); + e = floor(e / 2); + } + bits.push(sign ? 1 : 0); + bits.reverse(); + str = bits.join(""); + + // Bits to bytes + bytes = []; + while (str.length) { + bytes.push(parseInt(str.substring(0, 8), 2)); + str = str.substring(8); + } + return bytes; +}; diff --git a/test/node_modules/es5-ext/math/_unpack-ieee754.js b/test/node_modules/es5-ext/math/_unpack-ieee754.js new file mode 100644 index 0000000..83fa947 --- /dev/null +++ b/test/node_modules/es5-ext/math/_unpack-ieee754.js @@ -0,0 +1,33 @@ +/* eslint no-bitwise: "off" */ +// Credit: https://github.com/paulmillr/es6-shim/ + +"use strict"; + +var pow = Math.pow; + +module.exports = function (bytes, ebits, fbits) { + // Bytes to bits + var bits = [], i, j, bit, str, bias, sign, e, fraction; + + for (i = bytes.length; i; i -= 1) { + bit = bytes[i - 1]; + for (j = 8; j; j -= 1) { + bits.push(bit % 2 ? 1 : 0); + bit >>= 1; + } + } + bits.reverse(); + str = bits.join(""); + + // Unpack sign, exponent, fraction + bias = (1 << (ebits - 1)) - 1; + sign = parseInt(str.substring(0, 1), 2) ? -1 : 1; + e = parseInt(str.substring(1, 1 + ebits), 2); + fraction = parseInt(str.substring(1 + ebits), 2); + + // Produce number + if (e === (1 << ebits) - 1) return fraction === 0 ? sign * Infinity : NaN; + if (e > 0) return sign * pow(2, e - bias) * (1 + fraction / pow(2, fbits)); + if (fraction !== 0) return sign * pow(2, -(bias - 1)) * (fraction / pow(2, fbits)); + return sign < 0 ? -0 : 0; +}; diff --git a/test/node_modules/es5-ext/math/acosh/implement.js b/test/node_modules/es5-ext/math/acosh/implement.js new file mode 100644 index 0000000..9e4582f --- /dev/null +++ b/test/node_modules/es5-ext/math/acosh/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "acosh", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/math/acosh/index.js b/test/node_modules/es5-ext/math/acosh/index.js new file mode 100644 index 0000000..da176cb --- /dev/null +++ b/test/node_modules/es5-ext/math/acosh/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.acosh : require("./shim"); diff --git a/test/node_modules/es5-ext/math/acosh/is-implemented.js b/test/node_modules/es5-ext/math/acosh/is-implemented.js new file mode 100644 index 0000000..2e97301 --- /dev/null +++ b/test/node_modules/es5-ext/math/acosh/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var acosh = Math.acosh; + if (typeof acosh !== "function") return false; + return acosh(2) === 1.3169578969248166; +}; diff --git a/test/node_modules/es5-ext/math/acosh/shim.js b/test/node_modules/es5-ext/math/acosh/shim.js new file mode 100644 index 0000000..3e632ff --- /dev/null +++ b/test/node_modules/es5-ext/math/acosh/shim.js @@ -0,0 +1,12 @@ +"use strict"; + +var log = Math.log, sqrt = Math.sqrt; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value < 1) return NaN; + if (value === 1) return 0; + if (value === Infinity) return value; + return log(value + sqrt(value * value - 1)); +}; diff --git a/test/node_modules/es5-ext/math/asinh/implement.js b/test/node_modules/es5-ext/math/asinh/implement.js new file mode 100644 index 0000000..1c0d7e4 --- /dev/null +++ b/test/node_modules/es5-ext/math/asinh/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "asinh", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/math/asinh/index.js b/test/node_modules/es5-ext/math/asinh/index.js new file mode 100644 index 0000000..8ca3026 --- /dev/null +++ b/test/node_modules/es5-ext/math/asinh/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.asinh : require("./shim"); diff --git a/test/node_modules/es5-ext/math/asinh/is-implemented.js b/test/node_modules/es5-ext/math/asinh/is-implemented.js new file mode 100644 index 0000000..a7e0f20 --- /dev/null +++ b/test/node_modules/es5-ext/math/asinh/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var asinh = Math.asinh; + if (typeof asinh !== "function") return false; + return asinh(2) === 1.4436354751788103; +}; diff --git a/test/node_modules/es5-ext/math/asinh/shim.js b/test/node_modules/es5-ext/math/asinh/shim.js new file mode 100644 index 0000000..30ce2e4 --- /dev/null +++ b/test/node_modules/es5-ext/math/asinh/shim.js @@ -0,0 +1,15 @@ +"use strict"; + +var log = Math.log, sqrt = Math.sqrt; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (!isFinite(value)) return value; + if (value < 0) { + value = -value; + return -log(value + sqrt(value * value + 1)); + } + return log(value + sqrt(value * value + 1)); +}; diff --git a/test/node_modules/es5-ext/math/atanh/implement.js b/test/node_modules/es5-ext/math/atanh/implement.js new file mode 100644 index 0000000..53f5871 --- /dev/null +++ b/test/node_modules/es5-ext/math/atanh/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "atanh", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/math/atanh/index.js b/test/node_modules/es5-ext/math/atanh/index.js new file mode 100644 index 0000000..feff0a7 --- /dev/null +++ b/test/node_modules/es5-ext/math/atanh/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.atanh : require("./shim"); diff --git a/test/node_modules/es5-ext/math/atanh/is-implemented.js b/test/node_modules/es5-ext/math/atanh/is-implemented.js new file mode 100644 index 0000000..4787c4f --- /dev/null +++ b/test/node_modules/es5-ext/math/atanh/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var atanh = Math.atanh; + if (typeof atanh !== "function") return false; + return Math.round(atanh(0.5) * 1e15) === 549306144334055; +}; diff --git a/test/node_modules/es5-ext/math/atanh/shim.js b/test/node_modules/es5-ext/math/atanh/shim.js new file mode 100644 index 0000000..9383e97 --- /dev/null +++ b/test/node_modules/es5-ext/math/atanh/shim.js @@ -0,0 +1,14 @@ +"use strict"; + +var log = Math.log; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value < -1) return NaN; + if (value > 1) return NaN; + if (value === -1) return -Infinity; + if (value === 1) return Infinity; + if (value === 0) return value; + return 0.5 * log((1 + value) / (1 - value)); +}; diff --git a/test/node_modules/es5-ext/math/cbrt/implement.js b/test/node_modules/es5-ext/math/cbrt/implement.js new file mode 100644 index 0000000..826314c --- /dev/null +++ b/test/node_modules/es5-ext/math/cbrt/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "cbrt", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/math/cbrt/index.js b/test/node_modules/es5-ext/math/cbrt/index.js new file mode 100644 index 0000000..a6c71c6 --- /dev/null +++ b/test/node_modules/es5-ext/math/cbrt/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.cbrt : require("./shim"); diff --git a/test/node_modules/es5-ext/math/cbrt/is-implemented.js b/test/node_modules/es5-ext/math/cbrt/is-implemented.js new file mode 100644 index 0000000..a8ac0db --- /dev/null +++ b/test/node_modules/es5-ext/math/cbrt/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var cbrt = Math.cbrt; + if (typeof cbrt !== "function") return false; + return cbrt(2) === 1.2599210498948732; +}; diff --git a/test/node_modules/es5-ext/math/cbrt/shim.js b/test/node_modules/es5-ext/math/cbrt/shim.js new file mode 100644 index 0000000..8871c55 --- /dev/null +++ b/test/node_modules/es5-ext/math/cbrt/shim.js @@ -0,0 +1,12 @@ +"use strict"; + +var pow = Math.pow; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (!isFinite(value)) return value; + if (value < 0) return -pow(-value, 1 / 3); + return pow(value, 1 / 3); +}; diff --git a/test/node_modules/es5-ext/math/ceil-10.js b/test/node_modules/es5-ext/math/ceil-10.js new file mode 100644 index 0000000..351221f --- /dev/null +++ b/test/node_modules/es5-ext/math/ceil-10.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./_decimal-adjust")("ceil"); diff --git a/test/node_modules/es5-ext/math/clz32/implement.js b/test/node_modules/es5-ext/math/clz32/implement.js new file mode 100644 index 0000000..70562df --- /dev/null +++ b/test/node_modules/es5-ext/math/clz32/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "clz32", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/math/clz32/index.js b/test/node_modules/es5-ext/math/clz32/index.js new file mode 100644 index 0000000..2380335 --- /dev/null +++ b/test/node_modules/es5-ext/math/clz32/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.clz32 : require("./shim"); diff --git a/test/node_modules/es5-ext/math/clz32/is-implemented.js b/test/node_modules/es5-ext/math/clz32/is-implemented.js new file mode 100644 index 0000000..ee6d882 --- /dev/null +++ b/test/node_modules/es5-ext/math/clz32/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var clz32 = Math.clz32; + if (typeof clz32 !== "function") return false; + return clz32(1000) === 22; +}; diff --git a/test/node_modules/es5-ext/math/clz32/shim.js b/test/node_modules/es5-ext/math/clz32/shim.js new file mode 100644 index 0000000..2b526c2 --- /dev/null +++ b/test/node_modules/es5-ext/math/clz32/shim.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (value) { + // eslint-disable-next-line no-bitwise + value >>>= 0; + return value ? 32 - value.toString(2).length : 32; +}; diff --git a/test/node_modules/es5-ext/math/cosh/implement.js b/test/node_modules/es5-ext/math/cosh/implement.js new file mode 100644 index 0000000..74e7eea --- /dev/null +++ b/test/node_modules/es5-ext/math/cosh/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "cosh", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/math/cosh/index.js b/test/node_modules/es5-ext/math/cosh/index.js new file mode 100644 index 0000000..c7a7167 --- /dev/null +++ b/test/node_modules/es5-ext/math/cosh/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.cosh : require("./shim"); diff --git a/test/node_modules/es5-ext/math/cosh/is-implemented.js b/test/node_modules/es5-ext/math/cosh/is-implemented.js new file mode 100644 index 0000000..7173054 --- /dev/null +++ b/test/node_modules/es5-ext/math/cosh/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var cosh = Math.cosh; + if (typeof cosh !== "function") return false; + return cosh(1) === 1.5430806348152437; +}; diff --git a/test/node_modules/es5-ext/math/cosh/shim.js b/test/node_modules/es5-ext/math/cosh/shim.js new file mode 100644 index 0000000..c762c84 --- /dev/null +++ b/test/node_modules/es5-ext/math/cosh/shim.js @@ -0,0 +1,11 @@ +"use strict"; + +var exp = Math.exp; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return 1; + if (!isFinite(value)) return Infinity; + return (exp(value) + exp(-value)) / 2; +}; diff --git a/test/node_modules/es5-ext/math/expm1/implement.js b/test/node_modules/es5-ext/math/expm1/implement.js new file mode 100644 index 0000000..9739bf5 --- /dev/null +++ b/test/node_modules/es5-ext/math/expm1/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "expm1", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/math/expm1/index.js b/test/node_modules/es5-ext/math/expm1/index.js new file mode 100644 index 0000000..daf4395 --- /dev/null +++ b/test/node_modules/es5-ext/math/expm1/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.expm1 : require("./shim"); diff --git a/test/node_modules/es5-ext/math/expm1/is-implemented.js b/test/node_modules/es5-ext/math/expm1/is-implemented.js new file mode 100644 index 0000000..dfd056e --- /dev/null +++ b/test/node_modules/es5-ext/math/expm1/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var expm1 = Math.expm1; + if (typeof expm1 !== "function") return false; + return expm1(1).toFixed(15) === "1.718281828459045"; +}; diff --git a/test/node_modules/es5-ext/math/expm1/shim.js b/test/node_modules/es5-ext/math/expm1/shim.js new file mode 100644 index 0000000..6daf2bf --- /dev/null +++ b/test/node_modules/es5-ext/math/expm1/shim.js @@ -0,0 +1,16 @@ +// Thanks: https://github.com/monolithed/ECMAScript-6 + +"use strict"; + +var exp = Math.exp; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (value === Infinity) return Infinity; + if (value === -Infinity) return -1; + + if (value > -1.0e-6 && value < 1.0e-6) return value + (value * value) / 2; + return exp(value) - 1; +}; diff --git a/test/node_modules/es5-ext/math/floor-10.js b/test/node_modules/es5-ext/math/floor-10.js new file mode 100644 index 0000000..3cb0c11 --- /dev/null +++ b/test/node_modules/es5-ext/math/floor-10.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./_decimal-adjust")("floor"); diff --git a/test/node_modules/es5-ext/math/fround/implement.js b/test/node_modules/es5-ext/math/fround/implement.js new file mode 100644 index 0000000..9ce9cf2 --- /dev/null +++ b/test/node_modules/es5-ext/math/fround/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "fround", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/math/fround/index.js b/test/node_modules/es5-ext/math/fround/index.js new file mode 100644 index 0000000..9f0dbc0 --- /dev/null +++ b/test/node_modules/es5-ext/math/fround/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.fround : require("./shim"); diff --git a/test/node_modules/es5-ext/math/fround/is-implemented.js b/test/node_modules/es5-ext/math/fround/is-implemented.js new file mode 100644 index 0000000..ad2b705 --- /dev/null +++ b/test/node_modules/es5-ext/math/fround/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var fround = Math.fround; + if (typeof fround !== "function") return false; + return fround(1.337) === 1.3370000123977661; +}; diff --git a/test/node_modules/es5-ext/math/fround/shim.js b/test/node_modules/es5-ext/math/fround/shim.js new file mode 100644 index 0000000..b0dfaab --- /dev/null +++ b/test/node_modules/es5-ext/math/fround/shim.js @@ -0,0 +1,33 @@ +/* global Float32Array */ + +// Credit: https://github.com/paulmillr/es6-shim/blob/master/es6-shim.js + +"use strict"; + +var toFloat32; + +if (typeof Float32Array === "undefined") { + toFloat32 = (function () { + var pack = require("../_pack-ieee754") + , unpack = require("../_unpack-ieee754"); + + return function (value) { return unpack(pack(value, 8, 23), 8, 23); }; + })(); +} else { + toFloat32 = (function () { + var float32Array = new Float32Array(1); + return function (num) { + float32Array[0] = num; + return float32Array[0]; + }; + })(); +} + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (!isFinite(value)) return value; + + return toFloat32(value); +}; diff --git a/test/node_modules/es5-ext/math/hypot/implement.js b/test/node_modules/es5-ext/math/hypot/implement.js new file mode 100644 index 0000000..e051add --- /dev/null +++ b/test/node_modules/es5-ext/math/hypot/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "hypot", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/math/hypot/index.js b/test/node_modules/es5-ext/math/hypot/index.js new file mode 100644 index 0000000..f8de46b --- /dev/null +++ b/test/node_modules/es5-ext/math/hypot/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.hypot : require("./shim"); diff --git a/test/node_modules/es5-ext/math/hypot/is-implemented.js b/test/node_modules/es5-ext/math/hypot/is-implemented.js new file mode 100644 index 0000000..d317bc7 --- /dev/null +++ b/test/node_modules/es5-ext/math/hypot/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var hypot = Math.hypot; + if (typeof hypot !== "function") return false; + return hypot(3, 4) === 5; +}; diff --git a/test/node_modules/es5-ext/math/hypot/shim.js b/test/node_modules/es5-ext/math/hypot/shim.js new file mode 100644 index 0000000..2d0eec7 --- /dev/null +++ b/test/node_modules/es5-ext/math/hypot/shim.js @@ -0,0 +1,37 @@ +// Thanks for hints: https://github.com/paulmillr/es6-shim + +"use strict"; + +var some = Array.prototype.some + , abs = Math.abs + , sqrt = Math.sqrt + , compare = function (val1, val2) { return val2 - val1; } + , divide = function (value) { return value / this; } + , add = function (sum, number) { return sum + number * number; }; + +// eslint-disable-next-line no-unused-vars +module.exports = function (val1, val2 /*, …valn*/) { + var result, numbers; + if (!arguments.length) return 0; + some.call(arguments, function (val) { + if (isNaN(val)) { + result = NaN; + return false; + } + if (!isFinite(val)) { + result = Infinity; + return true; + } + if (result !== undefined) return false; + val = Number(val); + if (val === 0) return false; + if (numbers) numbers.push(abs(val)); + else numbers = [abs(val)]; + return false; + }); + if (result !== undefined) return result; + if (!numbers) return 0; + + numbers.sort(compare); + return numbers[0] * sqrt(numbers.map(divide, numbers[0]).reduce(add, 0)); +}; diff --git a/test/node_modules/es5-ext/math/imul/implement.js b/test/node_modules/es5-ext/math/imul/implement.js new file mode 100644 index 0000000..3aff479 --- /dev/null +++ b/test/node_modules/es5-ext/math/imul/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "imul", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/math/imul/index.js b/test/node_modules/es5-ext/math/imul/index.js new file mode 100644 index 0000000..969124c --- /dev/null +++ b/test/node_modules/es5-ext/math/imul/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.imul : require("./shim"); diff --git a/test/node_modules/es5-ext/math/imul/is-implemented.js b/test/node_modules/es5-ext/math/imul/is-implemented.js new file mode 100644 index 0000000..0f32919 --- /dev/null +++ b/test/node_modules/es5-ext/math/imul/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var imul = Math.imul; + if (typeof imul !== "function") return false; + return imul(-1, 8) === -8; +}; diff --git a/test/node_modules/es5-ext/math/imul/shim.js b/test/node_modules/es5-ext/math/imul/shim.js new file mode 100644 index 0000000..7511707 --- /dev/null +++ b/test/node_modules/es5-ext/math/imul/shim.js @@ -0,0 +1,17 @@ +/* eslint no-bitwise: "off" */ + +// Thanks: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference +// /Global_Objects/Math/imul + +"use strict"; + +module.exports = function (val1, val2) { + var xh = (val1 >>> 16) & 0xffff + , xl = val1 & 0xffff + , yh = (val2 >>> 16) & 0xffff + , yl = val2 & 0xffff; + + // The shift by 0 fixes the sign on the high part + // the final |0 converts the unsigned value into a signed value + return (xl * yl + (((xh * yl + xl * yh) << 16) >>> 0)) | 0; +}; diff --git a/test/node_modules/es5-ext/math/index.js b/test/node_modules/es5-ext/math/index.js new file mode 100644 index 0000000..a59269c --- /dev/null +++ b/test/node_modules/es5-ext/math/index.js @@ -0,0 +1,24 @@ +"use strict"; + +module.exports = { + acosh: require("./acosh"), + asinh: require("./asinh"), + atanh: require("./atanh"), + cbrt: require("./cbrt"), + ceil10: require("./ceil-10"), + clz32: require("./clz32"), + cosh: require("./cosh"), + expm1: require("./expm1"), + floor10: require("./floor-10"), + fround: require("./fround"), + hypot: require("./hypot"), + imul: require("./imul"), + log10: require("./log10"), + log2: require("./log2"), + log1p: require("./log1p"), + round10: require("./round-10"), + sign: require("./sign"), + sinh: require("./sinh"), + tanh: require("./tanh"), + trunc: require("./trunc") +}; diff --git a/test/node_modules/es5-ext/math/log10/implement.js b/test/node_modules/es5-ext/math/log10/implement.js new file mode 100644 index 0000000..f6153c1 --- /dev/null +++ b/test/node_modules/es5-ext/math/log10/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "log10", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/math/log10/index.js b/test/node_modules/es5-ext/math/log10/index.js new file mode 100644 index 0000000..abda55b --- /dev/null +++ b/test/node_modules/es5-ext/math/log10/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.log10 : require("./shim"); diff --git a/test/node_modules/es5-ext/math/log10/is-implemented.js b/test/node_modules/es5-ext/math/log10/is-implemented.js new file mode 100644 index 0000000..f221759 --- /dev/null +++ b/test/node_modules/es5-ext/math/log10/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var log10 = Math.log10; + if (typeof log10 !== "function") return false; + return log10(2) === 0.3010299956639812; +}; diff --git a/test/node_modules/es5-ext/math/log10/shim.js b/test/node_modules/es5-ext/math/log10/shim.js new file mode 100644 index 0000000..e8599a2 --- /dev/null +++ b/test/node_modules/es5-ext/math/log10/shim.js @@ -0,0 +1,14 @@ +"use strict"; + +var log = Math.log, LOG10E = Math.LOG10E; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value < 0) return NaN; + if (value === 0) return -Infinity; + if (value === 1) return 0; + if (value === Infinity) return Infinity; + + return log(value) * LOG10E; +}; diff --git a/test/node_modules/es5-ext/math/log1p/implement.js b/test/node_modules/es5-ext/math/log1p/implement.js new file mode 100644 index 0000000..21e94e6 --- /dev/null +++ b/test/node_modules/es5-ext/math/log1p/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "log1p", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/math/log1p/index.js b/test/node_modules/es5-ext/math/log1p/index.js new file mode 100644 index 0000000..76eacc5 --- /dev/null +++ b/test/node_modules/es5-ext/math/log1p/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.log1p : require("./shim"); diff --git a/test/node_modules/es5-ext/math/log1p/is-implemented.js b/test/node_modules/es5-ext/math/log1p/is-implemented.js new file mode 100644 index 0000000..7626ab4 --- /dev/null +++ b/test/node_modules/es5-ext/math/log1p/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var log1p = Math.log1p; + if (typeof log1p !== "function") return false; + return log1p(1) === 0.6931471805599453; +}; diff --git a/test/node_modules/es5-ext/math/log1p/shim.js b/test/node_modules/es5-ext/math/log1p/shim.js new file mode 100644 index 0000000..15f1182 --- /dev/null +++ b/test/node_modules/es5-ext/math/log1p/shim.js @@ -0,0 +1,17 @@ +// Thanks: https://github.com/monolithed/ECMAScript-6/blob/master/ES6.js + +"use strict"; + +var log = Math.log; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value < -1) return NaN; + if (value === -1) return -Infinity; + if (value === 0) return value; + if (value === Infinity) return Infinity; + + if (value > -1.0e-8 && value < 1.0e-8) return value - (value * value) / 2; + return log(1 + value); +}; diff --git a/test/node_modules/es5-ext/math/log2/implement.js b/test/node_modules/es5-ext/math/log2/implement.js new file mode 100644 index 0000000..91c06b1 --- /dev/null +++ b/test/node_modules/es5-ext/math/log2/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "log2", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/math/log2/index.js b/test/node_modules/es5-ext/math/log2/index.js new file mode 100644 index 0000000..a561977 --- /dev/null +++ b/test/node_modules/es5-ext/math/log2/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.log2 : require("./shim"); diff --git a/test/node_modules/es5-ext/math/log2/is-implemented.js b/test/node_modules/es5-ext/math/log2/is-implemented.js new file mode 100644 index 0000000..c70963f --- /dev/null +++ b/test/node_modules/es5-ext/math/log2/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var log2 = Math.log2; + if (typeof log2 !== "function") return false; + return log2(3).toFixed(15) === "1.584962500721156"; +}; diff --git a/test/node_modules/es5-ext/math/log2/shim.js b/test/node_modules/es5-ext/math/log2/shim.js new file mode 100644 index 0000000..51fcdae --- /dev/null +++ b/test/node_modules/es5-ext/math/log2/shim.js @@ -0,0 +1,14 @@ +"use strict"; + +var log = Math.log, LOG2E = Math.LOG2E; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value < 0) return NaN; + if (value === 0) return -Infinity; + if (value === 1) return 0; + if (value === Infinity) return Infinity; + + return log(value) * LOG2E; +}; diff --git a/test/node_modules/es5-ext/math/round-10.js b/test/node_modules/es5-ext/math/round-10.js new file mode 100644 index 0000000..228c235 --- /dev/null +++ b/test/node_modules/es5-ext/math/round-10.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./_decimal-adjust")("round"); diff --git a/test/node_modules/es5-ext/math/sign/implement.js b/test/node_modules/es5-ext/math/sign/implement.js new file mode 100644 index 0000000..daf1769 --- /dev/null +++ b/test/node_modules/es5-ext/math/sign/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "sign", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/math/sign/index.js b/test/node_modules/es5-ext/math/sign/index.js new file mode 100644 index 0000000..d2659cb --- /dev/null +++ b/test/node_modules/es5-ext/math/sign/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.sign : require("./shim"); diff --git a/test/node_modules/es5-ext/math/sign/is-implemented.js b/test/node_modules/es5-ext/math/sign/is-implemented.js new file mode 100644 index 0000000..4318cf2 --- /dev/null +++ b/test/node_modules/es5-ext/math/sign/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var sign = Math.sign; + if (typeof sign !== "function") return false; + return sign(10) === 1 && sign(-20) === -1; +}; diff --git a/test/node_modules/es5-ext/math/sign/shim.js b/test/node_modules/es5-ext/math/sign/shim.js new file mode 100644 index 0000000..9acb495 --- /dev/null +++ b/test/node_modules/es5-ext/math/sign/shim.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function (value) { + value = Number(value); + if (isNaN(value) || value === 0) return value; + return value > 0 ? 1 : -1; +}; diff --git a/test/node_modules/es5-ext/math/sinh/implement.js b/test/node_modules/es5-ext/math/sinh/implement.js new file mode 100644 index 0000000..4655f6b --- /dev/null +++ b/test/node_modules/es5-ext/math/sinh/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "sinh", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/math/sinh/index.js b/test/node_modules/es5-ext/math/sinh/index.js new file mode 100644 index 0000000..107ef2e --- /dev/null +++ b/test/node_modules/es5-ext/math/sinh/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.sinh : require("./shim"); diff --git a/test/node_modules/es5-ext/math/sinh/is-implemented.js b/test/node_modules/es5-ext/math/sinh/is-implemented.js new file mode 100644 index 0000000..aad22b0 --- /dev/null +++ b/test/node_modules/es5-ext/math/sinh/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var sinh = Math.sinh; + if (typeof sinh !== "function") return false; + return sinh(1) === 1.1752011936438014 && sinh(Number.MIN_VALUE) === 5e-324; +}; diff --git a/test/node_modules/es5-ext/math/sinh/shim.js b/test/node_modules/es5-ext/math/sinh/shim.js new file mode 100644 index 0000000..b161eca --- /dev/null +++ b/test/node_modules/es5-ext/math/sinh/shim.js @@ -0,0 +1,18 @@ +// Parts of implementation taken from es6-shim project +// See: https://github.com/paulmillr/es6-shim/blob/master/es6-shim.js + +"use strict"; + +var expm1 = require("../expm1") + , abs = Math.abs + , exp = Math.exp + , e = Math.E; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (!isFinite(value)) return value; + if (abs(value) < 1) return (expm1(value) - expm1(-value)) / 2; + return ((exp(value - 1) - exp(-value - 1)) * e) / 2; +}; diff --git a/test/node_modules/es5-ext/math/tanh/implement.js b/test/node_modules/es5-ext/math/tanh/implement.js new file mode 100644 index 0000000..52d2957 --- /dev/null +++ b/test/node_modules/es5-ext/math/tanh/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "tanh", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/math/tanh/index.js b/test/node_modules/es5-ext/math/tanh/index.js new file mode 100644 index 0000000..54b3251 --- /dev/null +++ b/test/node_modules/es5-ext/math/tanh/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.tanh : require("./shim"); diff --git a/test/node_modules/es5-ext/math/tanh/is-implemented.js b/test/node_modules/es5-ext/math/tanh/is-implemented.js new file mode 100644 index 0000000..b6226b4 --- /dev/null +++ b/test/node_modules/es5-ext/math/tanh/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var tanh = Math.tanh; + if (typeof tanh !== "function") return false; + return tanh(1) === 0.7615941559557649 && tanh(Number.MAX_VALUE) === 1; +}; diff --git a/test/node_modules/es5-ext/math/tanh/shim.js b/test/node_modules/es5-ext/math/tanh/shim.js new file mode 100644 index 0000000..974dd7c --- /dev/null +++ b/test/node_modules/es5-ext/math/tanh/shim.js @@ -0,0 +1,17 @@ +"use strict"; + +var exp = Math.exp; + +module.exports = function (value) { + var num1, num2; + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (value === Infinity) return 1; + if (value === -Infinity) return -1; + num1 = exp(value); + if (num1 === Infinity) return 1; + num2 = exp(-value); + if (num2 === Infinity) return -1; + return (num1 - num2) / (num1 + num2); +}; diff --git a/test/node_modules/es5-ext/math/trunc/implement.js b/test/node_modules/es5-ext/math/trunc/implement.js new file mode 100644 index 0000000..bf1bf64 --- /dev/null +++ b/test/node_modules/es5-ext/math/trunc/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Math, "trunc", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/math/trunc/index.js b/test/node_modules/es5-ext/math/trunc/index.js new file mode 100644 index 0000000..8e3874c --- /dev/null +++ b/test/node_modules/es5-ext/math/trunc/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Math.trunc : require("./shim"); diff --git a/test/node_modules/es5-ext/math/trunc/is-implemented.js b/test/node_modules/es5-ext/math/trunc/is-implemented.js new file mode 100644 index 0000000..861b5c0 --- /dev/null +++ b/test/node_modules/es5-ext/math/trunc/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var trunc = Math.trunc; + if (typeof trunc !== "function") return false; + return trunc(13.67) === 13 && trunc(-13.67) === -13; +}; diff --git a/test/node_modules/es5-ext/math/trunc/shim.js b/test/node_modules/es5-ext/math/trunc/shim.js new file mode 100644 index 0000000..bf6ac8c --- /dev/null +++ b/test/node_modules/es5-ext/math/trunc/shim.js @@ -0,0 +1,13 @@ +"use strict"; + +var floor = Math.floor; + +module.exports = function (value) { + if (isNaN(value)) return NaN; + value = Number(value); + if (value === 0) return value; + if (value === Infinity) return Infinity; + if (value === -Infinity) return -Infinity; + if (value > 0) return floor(value); + return -floor(-value); +}; diff --git a/test/node_modules/es5-ext/number/#/index.js b/test/node_modules/es5-ext/number/#/index.js new file mode 100644 index 0000000..50b6418 --- /dev/null +++ b/test/node_modules/es5-ext/number/#/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = { pad: require("./pad") }; diff --git a/test/node_modules/es5-ext/number/#/pad.js b/test/node_modules/es5-ext/number/#/pad.js new file mode 100644 index 0000000..f5af869 --- /dev/null +++ b/test/node_modules/es5-ext/number/#/pad.js @@ -0,0 +1,16 @@ +"use strict"; + +var pad = require("../../string/#/pad") + , toPosInt = require("../to-pos-integer") + , toFixed = Number.prototype.toFixed; + +module.exports = function (length /*, precision*/) { + var precision; + length = toPosInt(length); + precision = toPosInt(arguments[1]); + + return pad.call( + precision ? toFixed.call(this, precision) : this, "0", + length + (precision ? 1 + precision : 0) + ); +}; diff --git a/test/node_modules/es5-ext/number/epsilon/implement.js b/test/node_modules/es5-ext/number/epsilon/implement.js new file mode 100644 index 0000000..5a22cf5 --- /dev/null +++ b/test/node_modules/es5-ext/number/epsilon/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "EPSILON", { + value: require("./"), + configurable: false, + enumerable: false, + writable: false + }); +} diff --git a/test/node_modules/es5-ext/number/epsilon/index.js b/test/node_modules/es5-ext/number/epsilon/index.js new file mode 100644 index 0000000..12e8a8d --- /dev/null +++ b/test/node_modules/es5-ext/number/epsilon/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = 2.220446049250313e-16; diff --git a/test/node_modules/es5-ext/number/epsilon/is-implemented.js b/test/node_modules/es5-ext/number/epsilon/is-implemented.js new file mode 100644 index 0000000..5ddc9d6 --- /dev/null +++ b/test/node_modules/es5-ext/number/epsilon/is-implemented.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = function () { return typeof Number.EPSILON === "number"; }; diff --git a/test/node_modules/es5-ext/number/index.js b/test/node_modules/es5-ext/number/index.js new file mode 100644 index 0000000..b57ff15 --- /dev/null +++ b/test/node_modules/es5-ext/number/index.js @@ -0,0 +1,17 @@ +"use strict"; + +module.exports = { + "#": require("./#"), + "EPSILON": require("./epsilon"), + "isFinite": require("./is-finite"), + "isInteger": require("./is-integer"), + "isNaN": require("./is-nan"), + "isNatural": require("./is-natural"), + "isNumber": require("./is-number"), + "isSafeInteger": require("./is-safe-integer"), + "MAX_SAFE_INTEGER": require("./max-safe-integer"), + "MIN_SAFE_INTEGER": require("./min-safe-integer"), + "toInteger": require("./to-integer"), + "toPosInteger": require("./to-pos-integer"), + "toUint32": require("./to-uint32") +}; diff --git a/test/node_modules/es5-ext/number/is-finite/implement.js b/test/node_modules/es5-ext/number/is-finite/implement.js new file mode 100644 index 0000000..41109fb --- /dev/null +++ b/test/node_modules/es5-ext/number/is-finite/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "isFinite", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/number/is-finite/index.js b/test/node_modules/es5-ext/number/is-finite/index.js new file mode 100644 index 0000000..f3a7112 --- /dev/null +++ b/test/node_modules/es5-ext/number/is-finite/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Number.isFinite : require("./shim"); diff --git a/test/node_modules/es5-ext/number/is-finite/is-implemented.js b/test/node_modules/es5-ext/number/is-finite/is-implemented.js new file mode 100644 index 0000000..eadd050 --- /dev/null +++ b/test/node_modules/es5-ext/number/is-finite/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var numberIsFinite = Number.isFinite; + if (typeof numberIsFinite !== "function") return false; + return !numberIsFinite("23") && numberIsFinite(34) && !numberIsFinite(Infinity); +}; diff --git a/test/node_modules/es5-ext/number/is-finite/shim.js b/test/node_modules/es5-ext/number/is-finite/shim.js new file mode 100644 index 0000000..ce700f6 --- /dev/null +++ b/test/node_modules/es5-ext/number/is-finite/shim.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = function (value) { return typeof value === "number" && isFinite(value); }; diff --git a/test/node_modules/es5-ext/number/is-integer/implement.js b/test/node_modules/es5-ext/number/is-integer/implement.js new file mode 100644 index 0000000..48b4cd2 --- /dev/null +++ b/test/node_modules/es5-ext/number/is-integer/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "isInteger", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/number/is-integer/index.js b/test/node_modules/es5-ext/number/is-integer/index.js new file mode 100644 index 0000000..2805b11 --- /dev/null +++ b/test/node_modules/es5-ext/number/is-integer/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Number.isInteger : require("./shim"); diff --git a/test/node_modules/es5-ext/number/is-integer/is-implemented.js b/test/node_modules/es5-ext/number/is-integer/is-implemented.js new file mode 100644 index 0000000..f357c71 --- /dev/null +++ b/test/node_modules/es5-ext/number/is-integer/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var isInteger = Number.isInteger; + if (typeof isInteger !== "function") return false; + return !isInteger("23") && isInteger(34) && !isInteger(32.34); +}; diff --git a/test/node_modules/es5-ext/number/is-integer/shim.js b/test/node_modules/es5-ext/number/is-integer/shim.js new file mode 100644 index 0000000..12058b5 --- /dev/null +++ b/test/node_modules/es5-ext/number/is-integer/shim.js @@ -0,0 +1,8 @@ +// Credit: http://www.2ality.com/2014/05/is-integer.html + +"use strict"; + +module.exports = function (value) { + if (typeof value !== "number") return false; + return value % 1 === 0; +}; diff --git a/test/node_modules/es5-ext/number/is-nan/implement.js b/test/node_modules/es5-ext/number/is-nan/implement.js new file mode 100644 index 0000000..f704e4c --- /dev/null +++ b/test/node_modules/es5-ext/number/is-nan/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "isNaN", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/number/is-nan/index.js b/test/node_modules/es5-ext/number/is-nan/index.js new file mode 100644 index 0000000..2cec8fc --- /dev/null +++ b/test/node_modules/es5-ext/number/is-nan/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Number.isNaN : require("./shim"); diff --git a/test/node_modules/es5-ext/number/is-nan/is-implemented.js b/test/node_modules/es5-ext/number/is-nan/is-implemented.js new file mode 100644 index 0000000..756838a --- /dev/null +++ b/test/node_modules/es5-ext/number/is-nan/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var numberIsNaN = Number.isNaN; + if (typeof numberIsNaN !== "function") return false; + return !numberIsNaN({}) && numberIsNaN(NaN) && !numberIsNaN(34); +}; diff --git a/test/node_modules/es5-ext/number/is-nan/shim.js b/test/node_modules/es5-ext/number/is-nan/shim.js new file mode 100644 index 0000000..b5730d1 --- /dev/null +++ b/test/node_modules/es5-ext/number/is-nan/shim.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (value) { + // eslint-disable-next-line no-self-compare + return value !== value; +}; diff --git a/test/node_modules/es5-ext/number/is-natural.js b/test/node_modules/es5-ext/number/is-natural.js new file mode 100644 index 0000000..2bbb5a2 --- /dev/null +++ b/test/node_modules/es5-ext/number/is-natural.js @@ -0,0 +1,5 @@ +"use strict"; + +var isInteger = require("./is-integer"); + +module.exports = function (num) { return isInteger(num) && num >= 0; }; diff --git a/test/node_modules/es5-ext/number/is-number.js b/test/node_modules/es5-ext/number/is-number.js new file mode 100644 index 0000000..5c11a52 --- /dev/null +++ b/test/node_modules/es5-ext/number/is-number.js @@ -0,0 +1,11 @@ +"use strict"; + +var objToString = Object.prototype.toString, id = objToString.call(1); + +module.exports = function (value) { + return ( + typeof value === "number" || + value instanceof Number || + (typeof value === "object" && objToString.call(value) === id) + ); +}; diff --git a/test/node_modules/es5-ext/number/is-safe-integer/implement.js b/test/node_modules/es5-ext/number/is-safe-integer/implement.js new file mode 100644 index 0000000..571b214 --- /dev/null +++ b/test/node_modules/es5-ext/number/is-safe-integer/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "isSafeInteger", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/number/is-safe-integer/index.js b/test/node_modules/es5-ext/number/is-safe-integer/index.js new file mode 100644 index 0000000..26c2b9f --- /dev/null +++ b/test/node_modules/es5-ext/number/is-safe-integer/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Number.isSafeInteger : require("./shim"); diff --git a/test/node_modules/es5-ext/number/is-safe-integer/is-implemented.js b/test/node_modules/es5-ext/number/is-safe-integer/is-implemented.js new file mode 100644 index 0000000..5ed3763 --- /dev/null +++ b/test/node_modules/es5-ext/number/is-safe-integer/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var isSafeInteger = Number.isSafeInteger; + if (typeof isSafeInteger !== "function") return false; + return !isSafeInteger("23") && isSafeInteger(34232322323) && !isSafeInteger(9007199254740992); +}; diff --git a/test/node_modules/es5-ext/number/is-safe-integer/shim.js b/test/node_modules/es5-ext/number/is-safe-integer/shim.js new file mode 100644 index 0000000..fb4f4d5 --- /dev/null +++ b/test/node_modules/es5-ext/number/is-safe-integer/shim.js @@ -0,0 +1,10 @@ +"use strict"; + +var isInteger = require("../is-integer/shim") + , maxValue = require("../max-safe-integer") + , abs = Math.abs; + +module.exports = function (value) { + if (!isInteger(value)) return false; + return abs(value) <= maxValue; +}; diff --git a/test/node_modules/es5-ext/number/max-safe-integer/implement.js b/test/node_modules/es5-ext/number/max-safe-integer/implement.js new file mode 100644 index 0000000..4ee3231 --- /dev/null +++ b/test/node_modules/es5-ext/number/max-safe-integer/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "MAX_SAFE_INTEGER", { + value: require("./"), + configurable: false, + enumerable: false, + writable: false + }); +} diff --git a/test/node_modules/es5-ext/number/max-safe-integer/index.js b/test/node_modules/es5-ext/number/max-safe-integer/index.js new file mode 100644 index 0000000..75a41e7 --- /dev/null +++ b/test/node_modules/es5-ext/number/max-safe-integer/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = Math.pow(2, 53) - 1; diff --git a/test/node_modules/es5-ext/number/max-safe-integer/is-implemented.js b/test/node_modules/es5-ext/number/max-safe-integer/is-implemented.js new file mode 100644 index 0000000..3d6e914 --- /dev/null +++ b/test/node_modules/es5-ext/number/max-safe-integer/is-implemented.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = function () { return typeof Number.MAX_SAFE_INTEGER === "number"; }; diff --git a/test/node_modules/es5-ext/number/min-safe-integer/implement.js b/test/node_modules/es5-ext/number/min-safe-integer/implement.js new file mode 100644 index 0000000..979dc39 --- /dev/null +++ b/test/node_modules/es5-ext/number/min-safe-integer/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Number, "MIN_SAFE_INTEGER", { + value: require("./"), + configurable: false, + enumerable: false, + writable: false + }); +} diff --git a/test/node_modules/es5-ext/number/min-safe-integer/index.js b/test/node_modules/es5-ext/number/min-safe-integer/index.js new file mode 100644 index 0000000..cde4514 --- /dev/null +++ b/test/node_modules/es5-ext/number/min-safe-integer/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = -(Math.pow(2, 53) - 1); diff --git a/test/node_modules/es5-ext/number/min-safe-integer/is-implemented.js b/test/node_modules/es5-ext/number/min-safe-integer/is-implemented.js new file mode 100644 index 0000000..71e6a31 --- /dev/null +++ b/test/node_modules/es5-ext/number/min-safe-integer/is-implemented.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = function () { return typeof Number.MIN_SAFE_INTEGER === "number"; }; diff --git a/test/node_modules/es5-ext/number/to-integer.js b/test/node_modules/es5-ext/number/to-integer.js new file mode 100644 index 0000000..4df5572 --- /dev/null +++ b/test/node_modules/es5-ext/number/to-integer.js @@ -0,0 +1,12 @@ +"use strict"; + +var sign = require("../math/sign") + , abs = Math.abs + , floor = Math.floor; + +module.exports = function (value) { + if (isNaN(value)) return 0; + value = Number(value); + if (value === 0 || !isFinite(value)) return value; + return sign(value) * floor(abs(value)); +}; diff --git a/test/node_modules/es5-ext/number/to-pos-integer.js b/test/node_modules/es5-ext/number/to-pos-integer.js new file mode 100644 index 0000000..28f6d40 --- /dev/null +++ b/test/node_modules/es5-ext/number/to-pos-integer.js @@ -0,0 +1,6 @@ +"use strict"; + +var toInteger = require("./to-integer") + , max = Math.max; + +module.exports = function (value) { return max(0, toInteger(value)); }; diff --git a/test/node_modules/es5-ext/number/to-uint32.js b/test/node_modules/es5-ext/number/to-uint32.js new file mode 100644 index 0000000..cb3590a --- /dev/null +++ b/test/node_modules/es5-ext/number/to-uint32.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (value) { + // eslint-disable-next-line no-bitwise + return value >>> 0; +}; diff --git a/test/node_modules/es5-ext/object/_iterate.js b/test/node_modules/es5-ext/object/_iterate.js new file mode 100644 index 0000000..1f0c85f --- /dev/null +++ b/test/node_modules/es5-ext/object/_iterate.js @@ -0,0 +1,30 @@ +// Internal method, used by iteration functions. +// Calls a function for each key-value pair found in object +// Optionally takes compareFn to iterate object in specific order + +"use strict"; + +var callable = require("./valid-callable") + , value = require("./valid-value") + , bind = Function.prototype.bind + , call = Function.prototype.call + , keys = Object.keys + , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; + +module.exports = function (method, defVal) { + return function (obj, cb /*, thisArg, compareFn*/) { + var list, thisArg = arguments[2], compareFn = arguments[3]; + obj = Object(value(obj)); + callable(cb); + + list = keys(obj); + if (compareFn) { + list.sort(typeof compareFn === "function" ? bind.call(compareFn, obj) : undefined); + } + if (typeof method !== "function") method = list[method]; + return call.call(method, list, function (key, index) { + if (!objPropertyIsEnumerable.call(obj, key)) return defVal; + return call.call(cb, thisArg, obj[key], key, obj, index); + }); + }; +}; diff --git a/test/node_modules/es5-ext/object/assign-deep.js b/test/node_modules/es5-ext/object/assign-deep.js new file mode 100644 index 0000000..87fd78b --- /dev/null +++ b/test/node_modules/es5-ext/object/assign-deep.js @@ -0,0 +1,34 @@ +"use strict"; + +var includes = require("../array/#/contains") + , uniq = require("../array/#/uniq") + , copyDeep = require("./copy-deep") + , objForEach = require("./for-each") + , isPlainObject = require("./is-plain-object") + , ensureValue = require("./valid-value"); + +var isArray = Array.isArray, slice = Array.prototype.slice; + +var deepAssign = function (target, source) { + if (target === source) return target; + if (isPlainObject(target) && isPlainObject(source)) { + objForEach(source, function (value, key) { target[key] = deepAssign(target[key], value); }); + return target; + } + if (isArray(target) && isArray(source)) { + source.forEach(function (item) { + if (includes.call(target, item)) return; + if (isArray(item) || isPlainObject(item)) item = copyDeep(item); + target.push(item); + }); + return target; + } + if (isPlainObject(source) || isArray(source)) return copyDeep(source); + return source; +}; + +module.exports = function (target /*, ...objects*/) { + return uniq + .call([ensureValue(target)].concat(slice.call(arguments, 1).map(ensureValue))) + .reduce(deepAssign); +}; diff --git a/test/node_modules/es5-ext/object/assign/implement.js b/test/node_modules/es5-ext/object/assign/implement.js new file mode 100644 index 0000000..f20371d --- /dev/null +++ b/test/node_modules/es5-ext/object/assign/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Object, "assign", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/object/assign/index.js b/test/node_modules/es5-ext/object/assign/index.js new file mode 100644 index 0000000..9585b55 --- /dev/null +++ b/test/node_modules/es5-ext/object/assign/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Object.assign : require("./shim"); diff --git a/test/node_modules/es5-ext/object/assign/is-implemented.js b/test/node_modules/es5-ext/object/assign/is-implemented.js new file mode 100644 index 0000000..8bf71ae --- /dev/null +++ b/test/node_modules/es5-ext/object/assign/is-implemented.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function () { + var assign = Object.assign, obj; + if (typeof assign !== "function") return false; + obj = { foo: "raz" }; + assign(obj, { bar: "dwa" }, { trzy: "trzy" }); + return obj.foo + obj.bar + obj.trzy === "razdwatrzy"; +}; diff --git a/test/node_modules/es5-ext/object/assign/shim.js b/test/node_modules/es5-ext/object/assign/shim.js new file mode 100644 index 0000000..afa58f2 --- /dev/null +++ b/test/node_modules/es5-ext/object/assign/shim.js @@ -0,0 +1,23 @@ +"use strict"; + +var keys = require("../keys") + , value = require("../valid-value") + , max = Math.max; + +module.exports = function (dest, src /*, …srcn*/) { + var error, i, length = max(arguments.length, 2), assign; + dest = Object(value(dest)); + assign = function (key) { + try { + dest[key] = src[key]; + } catch (e) { + if (!error) error = e; + } + }; + for (i = 1; i < length; ++i) { + src = arguments[i]; + keys(src).forEach(assign); + } + if (error !== undefined) throw error; + return dest; +}; diff --git a/test/node_modules/es5-ext/object/clear.js b/test/node_modules/es5-ext/object/clear.js new file mode 100644 index 0000000..268cc5b --- /dev/null +++ b/test/node_modules/es5-ext/object/clear.js @@ -0,0 +1,16 @@ +"use strict"; + +var keys = require("./keys"); + +module.exports = function (obj) { + var error; + keys(obj).forEach(function (key) { + try { + delete this[key]; + } catch (e) { + if (!error) error = e; + } + }, obj); + if (error !== undefined) throw error; + return obj; +}; diff --git a/test/node_modules/es5-ext/object/compact.js b/test/node_modules/es5-ext/object/compact.js new file mode 100644 index 0000000..a1794bb --- /dev/null +++ b/test/node_modules/es5-ext/object/compact.js @@ -0,0 +1,8 @@ +"use strict"; + +var filter = require("./filter") + , isValue = require("./is-value"); + +module.exports = function (obj) { + return filter(obj, function (val) { return isValue(val); }); +}; diff --git a/test/node_modules/es5-ext/object/compare.js b/test/node_modules/es5-ext/object/compare.js new file mode 100644 index 0000000..261a732 --- /dev/null +++ b/test/node_modules/es5-ext/object/compare.js @@ -0,0 +1,39 @@ +"use strict"; + +var strCompare = require("../string/#/case-insensitive-compare") + , isObject = require("./is-object") + , isValue = require("./is-value") + , numIsNaN = require("../number/is-nan") + , resolve + , typeMap; + +typeMap = { undefined: 0, object: 1, boolean: 2, string: 3, number: 4 }; + +resolve = function (a) { + if (isObject(a)) { + if (typeof a.valueOf !== "function") return NaN; + a = a.valueOf(); + if (isObject(a)) { + if (typeof a.toString !== "function") return NaN; + a = a.toString(); + if (typeof a !== "string") return NaN; + } + } + return a; +}; + +module.exports = function (val1, val2) { + if (val1 === val2) return 0; // Same + + val1 = resolve(val1); + val2 = resolve(val2); + // eslint-disable-next-line eqeqeq + if (val1 == val2) return typeMap[typeof val1] - typeMap[typeof val2]; + if (!isValue(val1)) return -1; + if (!isValue(val2)) return 1; + if (typeof val1 === "string" || typeof val2 === "string") { + return strCompare.call(val1, val2); + } + if (numIsNaN(val1) && numIsNaN(val2)) return 0; // Jslint: ignore + return Number(val1) - Number(val2); +}; diff --git a/test/node_modules/es5-ext/object/copy-deep.js b/test/node_modules/es5-ext/object/copy-deep.js new file mode 100644 index 0000000..1d1bed2 --- /dev/null +++ b/test/node_modules/es5-ext/object/copy-deep.js @@ -0,0 +1,35 @@ +"use strict"; + +var forEach = require("./for-each") + , isPlainObject = require("./is-plain-object") + , ensureValue = require("./valid-value") + , isArray = Array.isArray; + +var copyValue = function (value, ancestors, ancestorsCopy) { + var mode; + if (isPlainObject(value)) mode = "object"; + else if (isArray(value)) mode = "array"; + if (!mode) return value; + + var copy = ancestorsCopy[ancestors.indexOf(value)]; + if (copy) return copy; + copy = mode === "object" ? {} : []; + + ancestors.push(value); + ancestorsCopy.push(copy); + if (mode === "object") { + forEach(value, function (item, key) { + copy[key] = copyValue(item, ancestors, ancestorsCopy); + }); + } else { + value.forEach(function (item, index) { + copy[index] = copyValue(item, ancestors, ancestorsCopy); + }); + } + ancestors.pop(); + ancestorsCopy.pop(); + + return copy; +}; + +module.exports = function (source) { return copyValue(ensureValue(source), [], []); }; diff --git a/test/node_modules/es5-ext/object/copy.js b/test/node_modules/es5-ext/object/copy.js new file mode 100644 index 0000000..2bd591d --- /dev/null +++ b/test/node_modules/es5-ext/object/copy.js @@ -0,0 +1,19 @@ +"use strict"; + +var aFrom = require("../array/from") + , assign = require("./assign") + , value = require("./valid-value"); + +module.exports = function (obj /*, propertyNames, options*/) { + var copy = Object(value(obj)), propertyNames = arguments[1], options = Object(arguments[2]); + if (copy !== obj && !propertyNames) return copy; + var result = {}; + if (propertyNames) { + aFrom(propertyNames, function (propertyName) { + if (options.ensure || propertyName in obj) result[propertyName] = obj[propertyName]; + }); + } else { + assign(result, obj); + } + return result; +}; diff --git a/test/node_modules/es5-ext/object/count.js b/test/node_modules/es5-ext/object/count.js new file mode 100644 index 0000000..6c018bb --- /dev/null +++ b/test/node_modules/es5-ext/object/count.js @@ -0,0 +1,5 @@ +"use strict"; + +var keys = require("./keys"); + +module.exports = function (obj) { return keys(obj).length; }; diff --git a/test/node_modules/es5-ext/object/create.js b/test/node_modules/es5-ext/object/create.js new file mode 100644 index 0000000..a391ec1 --- /dev/null +++ b/test/node_modules/es5-ext/object/create.js @@ -0,0 +1,43 @@ +// Workaround for http://code.google.com/p/v8/issues/detail?id=2804 + +"use strict"; + +var create = Object.create, shim; + +if (!require("./set-prototype-of/is-implemented")()) { + shim = require("./set-prototype-of/shim"); +} + +module.exports = (function () { + var nullObject, polyProps, desc; + if (!shim) return create; + if (shim.level !== 1) return create; + + nullObject = {}; + polyProps = {}; + desc = { configurable: false, enumerable: false, writable: true, value: undefined }; + Object.getOwnPropertyNames(Object.prototype).forEach(function (name) { + if (name === "__proto__") { + polyProps[name] = { + configurable: true, + enumerable: false, + writable: true, + value: undefined + }; + return; + } + polyProps[name] = desc; + }); + Object.defineProperties(nullObject, polyProps); + + Object.defineProperty(shim, "nullPolyfill", { + configurable: false, + enumerable: false, + writable: false, + value: nullObject + }); + + return function (prototype, props) { + return create(prototype === null ? nullObject : prototype, props); + }; +})(); diff --git a/test/node_modules/es5-ext/object/ensure-array.js b/test/node_modules/es5-ext/object/ensure-array.js new file mode 100644 index 0000000..5ca7a94 --- /dev/null +++ b/test/node_modules/es5-ext/object/ensure-array.js @@ -0,0 +1,9 @@ +"use strict"; + +var toShortString = require("../to-short-string-representation") + , isArray = require("./is-array-like"); + +module.exports = function (value) { + if (isArray(value)) return value; + throw new TypeError(toShortString(value) + " is not a array"); +}; diff --git a/test/node_modules/es5-ext/object/ensure-finite-number.js b/test/node_modules/es5-ext/object/ensure-finite-number.js new file mode 100644 index 0000000..4f6e4b4 --- /dev/null +++ b/test/node_modules/es5-ext/object/ensure-finite-number.js @@ -0,0 +1,9 @@ +"use strict"; + +var isFiniteNumber = require("./is-finite-number") + , safeToString = require("../safe-to-string"); + +module.exports = function (value) { + if (isFiniteNumber(value)) return Number(value); + throw new TypeError(safeToString(value) + " does not represent a finite number value"); +}; diff --git a/test/node_modules/es5-ext/object/ensure-integer.js b/test/node_modules/es5-ext/object/ensure-integer.js new file mode 100644 index 0000000..9ec64b5 --- /dev/null +++ b/test/node_modules/es5-ext/object/ensure-integer.js @@ -0,0 +1,9 @@ +"use strict"; + +var toShortString = require("../to-short-string-representation") + , isInteger = require("./is-integer"); + +module.exports = function (num) { + if (!isInteger(num)) throw new TypeError(toShortString(num) + " is not a integer"); + return Number(num); +}; diff --git a/test/node_modules/es5-ext/object/ensure-natural-number-value.js b/test/node_modules/es5-ext/object/ensure-natural-number-value.js new file mode 100644 index 0000000..1a901aa --- /dev/null +++ b/test/node_modules/es5-ext/object/ensure-natural-number-value.js @@ -0,0 +1,10 @@ +"use strict"; + +var isNaturalValue = require("./is-natural-number-value") + , toShortString = require("../to-short-string-representation"); + +module.exports = function (arg) { + var num = Number(arg); + if (!isNaturalValue(arg)) throw new TypeError(toShortString(arg) + " is not a natural number"); + return num; +}; diff --git a/test/node_modules/es5-ext/object/ensure-natural-number.js b/test/node_modules/es5-ext/object/ensure-natural-number.js new file mode 100644 index 0000000..ec7e514 --- /dev/null +++ b/test/node_modules/es5-ext/object/ensure-natural-number.js @@ -0,0 +1,10 @@ +"use strict"; + +var isNatural = require("../number/is-natural") + , toShortString = require("../to-short-string-representation"); + +module.exports = function (arg) { + var num = Number(arg); + if (!isNatural(num)) throw new TypeError(toShortString(arg) + " is not a natural number"); + return num; +}; diff --git a/test/node_modules/es5-ext/object/ensure-plain-function.js b/test/node_modules/es5-ext/object/ensure-plain-function.js new file mode 100644 index 0000000..6cd9853 --- /dev/null +++ b/test/node_modules/es5-ext/object/ensure-plain-function.js @@ -0,0 +1,11 @@ +"use strict"; + +var safeToString = require("../safe-to-string") + , isPlainFunction = require("./is-plain-function"); + +module.exports = function (value) { + if (!isPlainFunction(value)) { + throw new TypeError(safeToString(value) + " is not a plain function"); + } + return value; +}; diff --git a/test/node_modules/es5-ext/object/ensure-plain-object.js b/test/node_modules/es5-ext/object/ensure-plain-object.js new file mode 100644 index 0000000..7fb2b93 --- /dev/null +++ b/test/node_modules/es5-ext/object/ensure-plain-object.js @@ -0,0 +1,9 @@ +"use strict"; + +var safeToString = require("../safe-to-string") + , isPlainObject = require("./is-plain-object"); + +module.exports = function (value) { + if (!isPlainObject(value)) throw new TypeError(safeToString(value) + " is not a plain object"); + return value; +}; diff --git a/test/node_modules/es5-ext/object/ensure-promise.js b/test/node_modules/es5-ext/object/ensure-promise.js new file mode 100644 index 0000000..b5b5356 --- /dev/null +++ b/test/node_modules/es5-ext/object/ensure-promise.js @@ -0,0 +1,9 @@ +"use strict"; + +var safeToString = require("../safe-to-string") + , isPromise = require("./is-promise"); + +module.exports = function (value) { + if (!isPromise(value)) throw new TypeError(safeToString(value) + " is not a promise"); + return value; +}; diff --git a/test/node_modules/es5-ext/object/ensure-thenable.js b/test/node_modules/es5-ext/object/ensure-thenable.js new file mode 100644 index 0000000..c55c17a --- /dev/null +++ b/test/node_modules/es5-ext/object/ensure-thenable.js @@ -0,0 +1,9 @@ +"use strict"; + +var safeToString = require("../safe-to-string") + , isThenable = require("./is-thenable"); + +module.exports = function (value) { + if (!isThenable(value)) throw new TypeError(safeToString(value) + " is not a thenable"); + return value; +}; diff --git a/test/node_modules/es5-ext/object/entries/implement.js b/test/node_modules/es5-ext/object/entries/implement.js new file mode 100644 index 0000000..5c2a246 --- /dev/null +++ b/test/node_modules/es5-ext/object/entries/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Object, "entries", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/object/entries/index.js b/test/node_modules/es5-ext/object/entries/index.js new file mode 100644 index 0000000..4a297d6 --- /dev/null +++ b/test/node_modules/es5-ext/object/entries/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Object.entries : require("./shim"); diff --git a/test/node_modules/es5-ext/object/entries/is-implemented.js b/test/node_modules/es5-ext/object/entries/is-implemented.js new file mode 100644 index 0000000..aad52b2 --- /dev/null +++ b/test/node_modules/es5-ext/object/entries/is-implemented.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function () { + try { return Object.entries({ foo: 12 })[0][0] === "foo"; } + catch (e) { return false; } +}; diff --git a/test/node_modules/es5-ext/object/entries/shim.js b/test/node_modules/es5-ext/object/entries/shim.js new file mode 100644 index 0000000..2348e44 --- /dev/null +++ b/test/node_modules/es5-ext/object/entries/shim.js @@ -0,0 +1,14 @@ +"use strict"; + +var ensureValue = require("../valid-value"); + +module.exports = function (object) { + ensureValue(object); + var result = []; + object = Object(object); + for (var key in object) { + if (!propertyIsEnumerable.call(object, key)) continue; + result.push([key, object[key]]); + } + return result; +}; diff --git a/test/node_modules/es5-ext/object/eq.js b/test/node_modules/es5-ext/object/eq.js new file mode 100644 index 0000000..0312468 --- /dev/null +++ b/test/node_modules/es5-ext/object/eq.js @@ -0,0 +1,7 @@ +"use strict"; + +var numIsNaN = require("../number/is-nan"); + +module.exports = function (val1, val2) { + return val1 === val2 || (numIsNaN(val1) && numIsNaN(val2)); +}; diff --git a/test/node_modules/es5-ext/object/every.js b/test/node_modules/es5-ext/object/every.js new file mode 100644 index 0000000..892b548 --- /dev/null +++ b/test/node_modules/es5-ext/object/every.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./_iterate")("every", true); diff --git a/test/node_modules/es5-ext/object/filter.js b/test/node_modules/es5-ext/object/filter.js new file mode 100644 index 0000000..c7dd969 --- /dev/null +++ b/test/node_modules/es5-ext/object/filter.js @@ -0,0 +1,14 @@ +"use strict"; + +var callable = require("./valid-callable") + , forEach = require("./for-each") + , call = Function.prototype.call; + +module.exports = function (obj, cb /*, thisArg*/) { + var result = {}, thisArg = arguments[2]; + callable(cb); + forEach(obj, function (value, key, targetObj, index) { + if (call.call(cb, thisArg, value, key, targetObj, index)) result[key] = targetObj[key]; + }); + return result; +}; diff --git a/test/node_modules/es5-ext/object/find-key.js b/test/node_modules/es5-ext/object/find-key.js new file mode 100644 index 0000000..6da6ba6 --- /dev/null +++ b/test/node_modules/es5-ext/object/find-key.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./_iterate")(require("../array/#/find"), false); diff --git a/test/node_modules/es5-ext/object/find.js b/test/node_modules/es5-ext/object/find.js new file mode 100644 index 0000000..5960421 --- /dev/null +++ b/test/node_modules/es5-ext/object/find.js @@ -0,0 +1,10 @@ +"use strict"; + +var findKey = require("./find-key") + , isValue = require("./is-value"); + +// eslint-disable-next-line no-unused-vars +module.exports = function (obj, cb /*, thisArg, compareFn*/) { + var key = findKey.apply(this, arguments); + return isValue(key) ? obj[key] : key; +}; diff --git a/test/node_modules/es5-ext/object/first-key.js b/test/node_modules/es5-ext/object/first-key.js new file mode 100644 index 0000000..3666de5 --- /dev/null +++ b/test/node_modules/es5-ext/object/first-key.js @@ -0,0 +1,13 @@ +"use strict"; + +var value = require("./valid-value") + , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; + +module.exports = function (obj) { + var i; + value(obj); + for (i in obj) { + if (objPropertyIsEnumerable.call(obj, i)) return i; + } + return null; +}; diff --git a/test/node_modules/es5-ext/object/flatten.js b/test/node_modules/es5-ext/object/flatten.js new file mode 100644 index 0000000..cda7475 --- /dev/null +++ b/test/node_modules/es5-ext/object/flatten.js @@ -0,0 +1,16 @@ +"use strict"; + +var isPlainObject = require("./is-plain-object") + , forEach = require("./for-each") + , process; + +process = function self(value, key) { + if (isPlainObject(value)) forEach(value, self, this); + else this[key] = value; +}; + +module.exports = function (obj) { + var flattened = {}; + forEach(obj, process, flattened); + return flattened; +}; diff --git a/test/node_modules/es5-ext/object/for-each.js b/test/node_modules/es5-ext/object/for-each.js new file mode 100644 index 0000000..d282956 --- /dev/null +++ b/test/node_modules/es5-ext/object/for-each.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./_iterate")("forEach"); diff --git a/test/node_modules/es5-ext/object/get-property-names.js b/test/node_modules/es5-ext/object/get-property-names.js new file mode 100644 index 0000000..7dfef27 --- /dev/null +++ b/test/node_modules/es5-ext/object/get-property-names.js @@ -0,0 +1,17 @@ +"use strict"; + +var uniq = require("../array/#/uniq") + , value = require("./valid-value") + , push = Array.prototype.push + , getOwnPropertyNames = Object.getOwnPropertyNames + , getPrototypeOf = Object.getPrototypeOf; + +module.exports = function (obj) { + var keys; + obj = Object(value(obj)); + keys = getOwnPropertyNames(obj); + while ((obj = getPrototypeOf(obj))) { + push.apply(keys, getOwnPropertyNames(obj)); + } + return uniq.call(keys); +}; diff --git a/test/node_modules/es5-ext/object/index.js b/test/node_modules/es5-ext/object/index.js new file mode 100644 index 0000000..13cfb95 --- /dev/null +++ b/test/node_modules/es5-ext/object/index.js @@ -0,0 +1,70 @@ +"use strict"; + +module.exports = { + assign: require("./assign"), + assignDeep: require("./assign-deep"), + clear: require("./clear"), + compact: require("./compact"), + compare: require("./compare"), + copy: require("./copy"), + copyDeep: require("./copy-deep"), + count: require("./count"), + create: require("./create"), + ensureArray: require("./ensure-array"), + ensureFiniteNumber: require("./ensure-finite-number"), + ensureInteger: require("./ensure-integer"), + ensureNaturalNumber: require("./ensure-natural-number"), + ensureNaturalNumberValue: require("./ensure-natural-number-value"), + ensurePlainFunction: require("./ensure-plain-function"), + ensurePlainObject: require("./ensure-plain-object"), + ensurePromise: require("./ensure-promise"), + ensureThenable: require("./ensure-thenable"), + entries: require("./entries"), + eq: require("./eq"), + every: require("./every"), + filter: require("./filter"), + find: require("./find"), + findKey: require("./find-key"), + firstKey: require("./first-key"), + flatten: require("./flatten"), + forEach: require("./for-each"), + getPropertyNames: require("./get-property-names"), + is: require("./is"), + isArrayLike: require("./is-array-like"), + isCallable: require("./is-callable"), + isCopy: require("./is-copy"), + isCopyDeep: require("./is-copy-deep"), + isEmpty: require("./is-empty"), + isFiniteNumber: require("./is-finite-number"), + isInteger: require("./is-integer"), + isNaturalNumber: require("./is-natural-number"), + isNaturalNumberValue: require("./is-natural-number-value"), + isNumberValue: require("./is-number-value"), + isObject: require("./is-object"), + isPlainFunction: require("./is-plain-function"), + isPlainObject: require("./is-plain-object"), + isPromise: require("./is-promise"), + isThenable: require("./is-thenable"), + isValue: require("./is-value"), + keyOf: require("./key-of"), + keys: require("./keys"), + map: require("./map"), + mapKeys: require("./map-keys"), + normalizeOptions: require("./normalize-options"), + mixin: require("./mixin"), + mixinPrototypes: require("./mixin-prototypes"), + primitiveSet: require("./primitive-set"), + safeTraverse: require("./safe-traverse"), + serialize: require("./serialize"), + setPrototypeOf: require("./set-prototype-of"), + some: require("./some"), + toArray: require("./to-array"), + unserialize: require("./unserialize"), + validateArrayLike: require("./validate-array-like"), + validateArrayLikeObject: require("./validate-array-like-object"), + validCallable: require("./valid-callable"), + validObject: require("./valid-object"), + validateStringifiable: require("./validate-stringifiable"), + validateStringifiableValue: require("./validate-stringifiable-value"), + validValue: require("./valid-value") +}; diff --git a/test/node_modules/es5-ext/object/is-array-like.js b/test/node_modules/es5-ext/object/is-array-like.js new file mode 100644 index 0000000..fcb9115 --- /dev/null +++ b/test/node_modules/es5-ext/object/is-array-like.js @@ -0,0 +1,17 @@ +"use strict"; + +var isFunction = require("../function/is-function") + , isObject = require("./is-object") + , isValue = require("./is-value"); + +module.exports = function (value) { + return ( + (isValue(value) && + typeof value.length === "number" && + // Just checking ((typeof x === 'object') && (typeof x !== 'function')) + // won't work right for some cases, e.g.: + // type of instance of NodeList in Safari is a 'function' + ((isObject(value) && !isFunction(value)) || typeof value === "string")) || + false + ); +}; diff --git a/test/node_modules/es5-ext/object/is-callable.js b/test/node_modules/es5-ext/object/is-callable.js new file mode 100644 index 0000000..927e5e8 --- /dev/null +++ b/test/node_modules/es5-ext/object/is-callable.js @@ -0,0 +1,5 @@ +// Deprecated + +"use strict"; + +module.exports = function (obj) { return typeof obj === "function"; }; diff --git a/test/node_modules/es5-ext/object/is-copy-deep.js b/test/node_modules/es5-ext/object/is-copy-deep.js new file mode 100644 index 0000000..a1206ae --- /dev/null +++ b/test/node_modules/es5-ext/object/is-copy-deep.js @@ -0,0 +1,59 @@ +"use strict"; + +var eq = require("./eq") + , isPlainObject = require("./is-plain-object") + , value = require("./valid-value"); + +var isArray = Array.isArray + , keys = Object.keys + , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable + , objHasOwnProperty = Object.prototype.hasOwnProperty + , eqArr + , eqVal + , eqObj; + +eqArr = function (arr1, arr2, recMap) { + var i, length = arr1.length; + if (length !== arr2.length) return false; + for (i = 0; i < length; ++i) { + if (objHasOwnProperty.call(arr1, i) !== objHasOwnProperty.call(arr2, i)) return false; + if (!eqVal(arr1[i], arr2[i], recMap)) return false; + } + return true; +}; + +eqObj = function (obj1, obj2, recMap) { + var k1 = keys(obj1), k2 = keys(obj2); + if (k1.length !== k2.length) return false; + return k1.every(function (key) { + if (!objPropertyIsEnumerable.call(obj2, key)) return false; + return eqVal(obj1[key], obj2[key], recMap); + }); +}; + +eqVal = function (val1, val2, recMap) { + var i, eqX, c1, c2; + if (eq(val1, val2)) return true; + if (isPlainObject(val1)) { + if (!isPlainObject(val2)) return false; + eqX = eqObj; + } else if (isArray(val1) && isArray(val2)) { + eqX = eqArr; + } else { + return false; + } + c1 = recMap[0]; + c2 = recMap[1]; + i = c1.indexOf(val1); + if (i === -1) { + i = c1.push(val1) - 1; + c2[i] = []; + } else if (c2[i].indexOf(val2) !== -1) return true; + c2[i].push(val2); + return eqX(val1, val2, recMap); +}; + +module.exports = function (val1, val2) { + if (eq(value(val1), value(val2))) return true; + return eqVal(Object(val1), Object(val2), [[], []]); +}; diff --git a/test/node_modules/es5-ext/object/is-copy.js b/test/node_modules/es5-ext/object/is-copy.js new file mode 100644 index 0000000..8c6ae5e --- /dev/null +++ b/test/node_modules/es5-ext/object/is-copy.js @@ -0,0 +1,23 @@ +"use strict"; + +var eq = require("./eq") + , value = require("./valid-value") + , keys = Object.keys + , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; + +module.exports = function (val1, val2) { + var k1, k2; + + if (eq(value(val1), value(val2))) return true; + + val1 = Object(val1); + val2 = Object(val2); + + k1 = keys(val1); + k2 = keys(val2); + if (k1.length !== k2.length) return false; + return k1.every(function (key) { + if (!objPropertyIsEnumerable.call(val2, key)) return false; + return eq(val1[key], val2[key]); + }); +}; diff --git a/test/node_modules/es5-ext/object/is-empty.js b/test/node_modules/es5-ext/object/is-empty.js new file mode 100644 index 0000000..dbc52d0 --- /dev/null +++ b/test/node_modules/es5-ext/object/is-empty.js @@ -0,0 +1,14 @@ +"use strict"; + +var value = require("./valid-value") + , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; + +module.exports = function (obj) { + var i; + value(obj); + for (i in obj) { + // Jslint: ignore + if (objPropertyIsEnumerable.call(obj, i)) return false; + } + return true; +}; diff --git a/test/node_modules/es5-ext/object/is-finite-number.js b/test/node_modules/es5-ext/object/is-finite-number.js new file mode 100644 index 0000000..e016f8d --- /dev/null +++ b/test/node_modules/es5-ext/object/is-finite-number.js @@ -0,0 +1,5 @@ +"use strict"; + +var isNumber = require("./is-number-value"); + +module.exports = function (value) { return isNumber(value) && isFinite(value); }; diff --git a/test/node_modules/es5-ext/object/is-integer.js b/test/node_modules/es5-ext/object/is-integer.js new file mode 100644 index 0000000..1745b82 --- /dev/null +++ b/test/node_modules/es5-ext/object/is-integer.js @@ -0,0 +1,10 @@ +"use strict"; + +var isInteger = require("../number/is-integer") + , isValue = require("./is-value"); + +module.exports = function (arg) { + if (!isValue(arg)) return false; + arg = Number(arg); + return isInteger(arg); +}; diff --git a/test/node_modules/es5-ext/object/is-natural-number-value.js b/test/node_modules/es5-ext/object/is-natural-number-value.js new file mode 100644 index 0000000..c744521 --- /dev/null +++ b/test/node_modules/es5-ext/object/is-natural-number-value.js @@ -0,0 +1,9 @@ +"use strict"; + +var isNaturalNumber = require("./is-natural-number") + , isValue = require("./is-value"); + +module.exports = function (arg) { + if (!isValue(arg)) return false; + return isNaturalNumber(arg); +}; diff --git a/test/node_modules/es5-ext/object/is-natural-number.js b/test/node_modules/es5-ext/object/is-natural-number.js new file mode 100644 index 0000000..3e2c1f5 --- /dev/null +++ b/test/node_modules/es5-ext/object/is-natural-number.js @@ -0,0 +1,5 @@ +"use strict"; + +var isNatural = require("../number/is-natural"); + +module.exports = function (arg) { return isNatural(Number(arg)); }; diff --git a/test/node_modules/es5-ext/object/is-number-value.js b/test/node_modules/es5-ext/object/is-number-value.js new file mode 100644 index 0000000..f701bf5 --- /dev/null +++ b/test/node_modules/es5-ext/object/is-number-value.js @@ -0,0 +1,9 @@ +"use strict"; + +var isValue = require("./is-value"); + +module.exports = function (value) { + if (!isValue(value)) return false; + try { return !isNaN(value); } + catch (e) { return false; } +}; diff --git a/test/node_modules/es5-ext/object/is-object.js b/test/node_modules/es5-ext/object/is-object.js new file mode 100644 index 0000000..0e576d7 --- /dev/null +++ b/test/node_modules/es5-ext/object/is-object.js @@ -0,0 +1,7 @@ +"use strict"; + +var isValue = require("./is-value"); + +var map = { function: true, object: true }; + +module.exports = function (value) { return (isValue(value) && map[typeof value]) || false; }; diff --git a/test/node_modules/es5-ext/object/is-plain-function.js b/test/node_modules/es5-ext/object/is-plain-function.js new file mode 100644 index 0000000..a2f3234 --- /dev/null +++ b/test/node_modules/es5-ext/object/is-plain-function.js @@ -0,0 +1,11 @@ +"use strict"; + +var isClassStr = RegExp.prototype.test.bind(/^\s*class[\s{/}]/) + , fnToString = Function.prototype.toString; + +module.exports = function (fn) { + if (typeof fn !== "function") return false; + if (typeof fn.call !== "function") return false; + if (typeof fn.apply !== "function") return false; + return !isClassStr(fnToString.call(fn)); +}; diff --git a/test/node_modules/es5-ext/object/is-plain-object.js b/test/node_modules/es5-ext/object/is-plain-object.js new file mode 100644 index 0000000..ff15328 --- /dev/null +++ b/test/node_modules/es5-ext/object/is-plain-object.js @@ -0,0 +1,20 @@ +"use strict"; + +var getPrototypeOf = Object.getPrototypeOf + , prototype = Object.prototype + , objToString = prototype.toString + , id = Object().toString(); + +module.exports = function (value) { + var proto, valueConstructor; + if (!value || typeof value !== "object" || objToString.call(value) !== id) { + return false; + } + proto = getPrototypeOf(value); + if (proto === null) { + valueConstructor = value.constructor; + if (typeof valueConstructor !== "function") return true; + return valueConstructor.prototype !== value; + } + return proto === prototype || getPrototypeOf(proto) === null; +}; diff --git a/test/node_modules/es5-ext/object/is-promise.js b/test/node_modules/es5-ext/object/is-promise.js new file mode 100644 index 0000000..33d6df1 --- /dev/null +++ b/test/node_modules/es5-ext/object/is-promise.js @@ -0,0 +1,4 @@ +"use strict"; + +// In next major this check will also confirm on promise constructor +module.exports = require("./is-thenable"); diff --git a/test/node_modules/es5-ext/object/is-thenable.js b/test/node_modules/es5-ext/object/is-thenable.js new file mode 100644 index 0000000..06db0fd --- /dev/null +++ b/test/node_modules/es5-ext/object/is-thenable.js @@ -0,0 +1,6 @@ +"use strict"; + +var isCallable = require("./is-callable") + , isObject = require("./is-object"); + +module.exports = function (value) { return isObject(value) && isCallable(value.then); }; diff --git a/test/node_modules/es5-ext/object/is-value.js b/test/node_modules/es5-ext/object/is-value.js new file mode 100644 index 0000000..4ee3805 --- /dev/null +++ b/test/node_modules/es5-ext/object/is-value.js @@ -0,0 +1,5 @@ +"use strict"; + +var _undefined = require("../function/noop")(); // Support ES3 engines + +module.exports = function (val) { return val !== _undefined && val !== null; }; diff --git a/test/node_modules/es5-ext/object/is.js b/test/node_modules/es5-ext/object/is.js new file mode 100644 index 0000000..54baade --- /dev/null +++ b/test/node_modules/es5-ext/object/is.js @@ -0,0 +1,10 @@ +// Implementation credits go to: +// http://wiki.ecmascript.org/doku.php?id=harmony:egal + +"use strict"; + +var numIsNaN = require("../number/is-nan"); + +module.exports = function (val1, val2) { + return val1 === val2 ? val1 !== 0 || 1 / val1 === 1 / val2 : numIsNaN(val1) && numIsNaN(val2); +}; diff --git a/test/node_modules/es5-ext/object/key-of.js b/test/node_modules/es5-ext/object/key-of.js new file mode 100644 index 0000000..dc640e4 --- /dev/null +++ b/test/node_modules/es5-ext/object/key-of.js @@ -0,0 +1,17 @@ +"use strict"; + +var eq = require("./eq") + , some = require("./some"); + +module.exports = function (obj, searchValue) { + var result; + return some(obj, function (value, name) { + if (eq(value, searchValue)) { + result = name; + return true; + } + return false; + }) + ? result + : null; +}; diff --git a/test/node_modules/es5-ext/object/keys/implement.js b/test/node_modules/es5-ext/object/keys/implement.js new file mode 100644 index 0000000..72ecfbd --- /dev/null +++ b/test/node_modules/es5-ext/object/keys/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Object, "keys", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/object/keys/index.js b/test/node_modules/es5-ext/object/keys/index.js new file mode 100644 index 0000000..d194227 --- /dev/null +++ b/test/node_modules/es5-ext/object/keys/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Object.keys : require("./shim"); diff --git a/test/node_modules/es5-ext/object/keys/is-implemented.js b/test/node_modules/es5-ext/object/keys/is-implemented.js new file mode 100644 index 0000000..2dfcf1b --- /dev/null +++ b/test/node_modules/es5-ext/object/keys/is-implemented.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function () { + try { + Object.keys("primitive"); + return true; + } catch (e) { + return false; + } +}; diff --git a/test/node_modules/es5-ext/object/keys/shim.js b/test/node_modules/es5-ext/object/keys/shim.js new file mode 100644 index 0000000..a8908d5 --- /dev/null +++ b/test/node_modules/es5-ext/object/keys/shim.js @@ -0,0 +1,7 @@ +"use strict"; + +var isValue = require("../is-value"); + +var keys = Object.keys; + +module.exports = function (object) { return keys(isValue(object) ? Object(object) : object); }; diff --git a/test/node_modules/es5-ext/object/map-keys.js b/test/node_modules/es5-ext/object/map-keys.js new file mode 100644 index 0000000..72dada0 --- /dev/null +++ b/test/node_modules/es5-ext/object/map-keys.js @@ -0,0 +1,18 @@ +"use strict"; + +var callable = require("./valid-callable") + , forEach = require("./for-each") + , call = Function.prototype.call; + +module.exports = function (obj, cb /*, thisArg*/) { + var result = {}, thisArg = arguments[2]; + callable(cb); + forEach( + obj, + function (value, key, targetObj, index) { + result[call.call(cb, thisArg, key, value, this, index)] = value; + }, + obj + ); + return result; +}; diff --git a/test/node_modules/es5-ext/object/map.js b/test/node_modules/es5-ext/object/map.js new file mode 100644 index 0000000..7b718db --- /dev/null +++ b/test/node_modules/es5-ext/object/map.js @@ -0,0 +1,14 @@ +"use strict"; + +var callable = require("./valid-callable") + , forEach = require("./for-each") + , call = Function.prototype.call; + +module.exports = function (obj, cb /*, thisArg*/) { + var result = {}, thisArg = arguments[2]; + callable(cb); + forEach(obj, function (value, key, targetObj, index) { + result[key] = call.call(cb, thisArg, value, key, targetObj, index); + }); + return result; +}; diff --git a/test/node_modules/es5-ext/object/mixin-prototypes.js b/test/node_modules/es5-ext/object/mixin-prototypes.js new file mode 100644 index 0000000..81e27c7 --- /dev/null +++ b/test/node_modules/es5-ext/object/mixin-prototypes.js @@ -0,0 +1,25 @@ +"use strict"; + +var value = require("./valid-value") + , mixin = require("./mixin"); + +var getPrototypeOf = Object.getPrototypeOf; + +module.exports = function (target, source) { + target = Object(value(target)); + source = Object(value(source)); + if (target === source) return target; + + var sources = []; + while (source && !isPrototypeOf.call(source, target)) { + sources.unshift(source); + source = getPrototypeOf(source); + } + + var error; + sources.forEach(function (sourceProto) { + try { mixin(target, sourceProto); } catch (mixinError) { error = mixinError; } + }); + if (error) throw error; + return target; +}; diff --git a/test/node_modules/es5-ext/object/mixin.js b/test/node_modules/es5-ext/object/mixin.js new file mode 100644 index 0000000..f5cf9dd --- /dev/null +++ b/test/node_modules/es5-ext/object/mixin.js @@ -0,0 +1,26 @@ +"use strict"; + +var value = require("./valid-value") + , defineProperty = Object.defineProperty + , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor + , getOwnPropertyNames = Object.getOwnPropertyNames + , getOwnPropertySymbols = Object.getOwnPropertySymbols; + +module.exports = function (target, source) { + var error, sourceObject = Object(value(source)); + target = Object(value(target)); + getOwnPropertyNames(sourceObject).forEach(function (name) { + try { + defineProperty(target, name, getOwnPropertyDescriptor(source, name)); + } catch (e) { error = e; } + }); + if (typeof getOwnPropertySymbols === "function") { + getOwnPropertySymbols(sourceObject).forEach(function (symbol) { + try { + defineProperty(target, symbol, getOwnPropertyDescriptor(source, symbol)); + } catch (e) { error = e; } + }); + } + if (error !== undefined) throw error; + return target; +}; diff --git a/test/node_modules/es5-ext/object/normalize-options.js b/test/node_modules/es5-ext/object/normalize-options.js new file mode 100644 index 0000000..6c394fe --- /dev/null +++ b/test/node_modules/es5-ext/object/normalize-options.js @@ -0,0 +1,20 @@ +"use strict"; + +var isValue = require("./is-value"); + +var forEach = Array.prototype.forEach, create = Object.create; + +var process = function (src, obj) { + var key; + for (key in src) obj[key] = src[key]; +}; + +// eslint-disable-next-line no-unused-vars +module.exports = function (opts1 /*, …options*/) { + var result = create(null); + forEach.call(arguments, function (options) { + if (!isValue(options)) return; + process(Object(options), result); + }); + return result; +}; diff --git a/test/node_modules/es5-ext/object/primitive-set.js b/test/node_modules/es5-ext/object/primitive-set.js new file mode 100644 index 0000000..840808d --- /dev/null +++ b/test/node_modules/es5-ext/object/primitive-set.js @@ -0,0 +1,10 @@ +"use strict"; + +var forEach = Array.prototype.forEach, create = Object.create; + +// eslint-disable-next-line no-unused-vars +module.exports = function (arg /*, …args*/) { + var set = create(null); + forEach.call(arguments, function (name) { set[name] = true; }); + return set; +}; diff --git a/test/node_modules/es5-ext/object/safe-traverse.js b/test/node_modules/es5-ext/object/safe-traverse.js new file mode 100644 index 0000000..7b72d55 --- /dev/null +++ b/test/node_modules/es5-ext/object/safe-traverse.js @@ -0,0 +1,16 @@ +"use strict"; + +var value = require("./valid-value") + , isValue = require("./is-value"); + +module.exports = function (obj /*, …names*/) { + var length, current = 1; + value(obj); + length = arguments.length - 1; + if (!length) return obj; + while (current < length) { + obj = obj[arguments[current++]]; + if (!isValue(obj)) return undefined; + } + return obj[arguments[current]]; +}; diff --git a/test/node_modules/es5-ext/object/serialize.js b/test/node_modules/es5-ext/object/serialize.js new file mode 100644 index 0000000..ec868c1 --- /dev/null +++ b/test/node_modules/es5-ext/object/serialize.js @@ -0,0 +1,41 @@ +"use strict"; + +var toArray = require("./to-array") + , isDate = require("../date/is-date") + , isValue = require("../object/is-value") + , isRegExp = require("../reg-exp/is-reg-exp"); + +var isArray = Array.isArray + , stringify = JSON.stringify + , objHasOwnProperty = Object.prototype.hasOwnProperty; +var keyValueToString = function (value, key) { + return stringify(key) + ":" + module.exports(value); +}; + +var sparseMap = function (arr) { + var i, length = arr.length, result = new Array(length); + for (i = 0; i < length; ++i) { + if (!objHasOwnProperty.call(arr, i)) continue; + result[i] = module.exports(arr[i]); + } + return result; +}; + +module.exports = function (obj) { + if (!isValue(obj)) return String(obj); + switch (typeof obj) { + case "string": + return stringify(obj); + case "number": + case "boolean": + case "function": + return String(obj); + case "object": + if (isArray(obj)) return "[" + sparseMap(obj) + "]"; + if (isRegExp(obj)) return String(obj); + if (isDate(obj)) return "new Date(" + obj.valueOf() + ")"; + return "{" + toArray(obj, keyValueToString) + "}"; + default: + throw new TypeError("Serialization of " + String(obj) + "is unsupported"); + } +}; diff --git a/test/node_modules/es5-ext/object/set-prototype-of/implement.js b/test/node_modules/es5-ext/object/set-prototype-of/implement.js new file mode 100644 index 0000000..386a300 --- /dev/null +++ b/test/node_modules/es5-ext/object/set-prototype-of/implement.js @@ -0,0 +1,12 @@ +"use strict"; + +var shim; + +if (!require("./is-implemented")() && (shim = require("./shim"))) { + Object.defineProperty(Object, "setPrototypeOf", { + value: shim, + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/object/set-prototype-of/index.js b/test/node_modules/es5-ext/object/set-prototype-of/index.js new file mode 100644 index 0000000..ac07b99 --- /dev/null +++ b/test/node_modules/es5-ext/object/set-prototype-of/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Object.setPrototypeOf : require("./shim"); diff --git a/test/node_modules/es5-ext/object/set-prototype-of/is-implemented.js b/test/node_modules/es5-ext/object/set-prototype-of/is-implemented.js new file mode 100644 index 0000000..1a00627 --- /dev/null +++ b/test/node_modules/es5-ext/object/set-prototype-of/is-implemented.js @@ -0,0 +1,9 @@ +"use strict"; + +var create = Object.create, getPrototypeOf = Object.getPrototypeOf, plainObject = {}; + +module.exports = function (/* CustomCreate*/) { + var setPrototypeOf = Object.setPrototypeOf, customCreate = arguments[0] || create; + if (typeof setPrototypeOf !== "function") return false; + return getPrototypeOf(setPrototypeOf(customCreate(null), plainObject)) === plainObject; +}; diff --git a/test/node_modules/es5-ext/object/set-prototype-of/shim.js b/test/node_modules/es5-ext/object/set-prototype-of/shim.js new file mode 100644 index 0000000..97b0b50 --- /dev/null +++ b/test/node_modules/es5-ext/object/set-prototype-of/shim.js @@ -0,0 +1,81 @@ +/* eslint no-proto: "off" */ + +// Big thanks to @WebReflection for sorting this out +// https://gist.github.com/WebReflection/5593554 + +"use strict"; + +var isObject = require("../is-object") + , value = require("../valid-value") + , objIsPrototypeOf = Object.prototype.isPrototypeOf + , defineProperty = Object.defineProperty + , nullDesc = { configurable: true, enumerable: false, writable: true, value: undefined } + , validate; + +validate = function (obj, prototype) { + value(obj); + if (prototype === null || isObject(prototype)) return obj; + throw new TypeError("Prototype must be null or an object"); +}; + +module.exports = (function (status) { + var fn, set; + if (!status) return null; + if (status.level === 2) { + if (status.set) { + set = status.set; + fn = function (obj, prototype) { + set.call(validate(obj, prototype), prototype); + return obj; + }; + } else { + fn = function (obj, prototype) { + validate(obj, prototype).__proto__ = prototype; + return obj; + }; + } + } else { + fn = function self(obj, prototype) { + var isNullBase; + validate(obj, prototype); + isNullBase = objIsPrototypeOf.call(self.nullPolyfill, obj); + if (isNullBase) delete self.nullPolyfill.__proto__; + if (prototype === null) prototype = self.nullPolyfill; + obj.__proto__ = prototype; + if (isNullBase) defineProperty(self.nullPolyfill, "__proto__", nullDesc); + return obj; + }; + } + return Object.defineProperty(fn, "level", { + configurable: false, + enumerable: false, + writable: false, + value: status.level + }); +})( + (function () { + var tmpObj1 = Object.create(null) + , tmpObj2 = {} + , set + , desc = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__"); + + if (desc) { + try { + set = desc.set; // Opera crashes at this point + set.call(tmpObj1, tmpObj2); + } catch (ignore) {} + if (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { set: set, level: 2 }; + } + + tmpObj1.__proto__ = tmpObj2; + if (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { level: 2 }; + + tmpObj1 = {}; + tmpObj1.__proto__ = tmpObj2; + if (Object.getPrototypeOf(tmpObj1) === tmpObj2) return { level: 1 }; + + return false; + })() +); + +require("../create"); diff --git a/test/node_modules/es5-ext/object/some.js b/test/node_modules/es5-ext/object/some.js new file mode 100644 index 0000000..c919466 --- /dev/null +++ b/test/node_modules/es5-ext/object/some.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./_iterate")("some", false); diff --git a/test/node_modules/es5-ext/object/to-array.js b/test/node_modules/es5-ext/object/to-array.js new file mode 100644 index 0000000..8912b45 --- /dev/null +++ b/test/node_modules/es5-ext/object/to-array.js @@ -0,0 +1,21 @@ +"use strict"; + +var callable = require("./valid-callable") + , isValue = require("./is-value") + , forEach = require("./for-each") + , call = Function.prototype.call + , defaultCb = function (value, key) { return [key, value]; }; + +module.exports = function (obj /*, cb, thisArg, compareFn*/) { + var a = [], cb = arguments[1], thisArg = arguments[2]; + cb = isValue(cb) ? callable(cb) : defaultCb; + + forEach( + obj, + function (value, key, targetObj, index) { + a.push(call.call(cb, thisArg, value, key, this, index)); + }, + obj, arguments[3] + ); + return a; +}; diff --git a/test/node_modules/es5-ext/object/unserialize.js b/test/node_modules/es5-ext/object/unserialize.js new file mode 100644 index 0000000..f62ea78 --- /dev/null +++ b/test/node_modules/es5-ext/object/unserialize.js @@ -0,0 +1,8 @@ +"use strict"; + +var value = require("./valid-value"); + +module.exports = function (code) { + // eslint-disable-next-line no-new-func + return new Function("return " + value(code))(); +}; diff --git a/test/node_modules/es5-ext/object/valid-callable.js b/test/node_modules/es5-ext/object/valid-callable.js new file mode 100644 index 0000000..a97fb3e --- /dev/null +++ b/test/node_modules/es5-ext/object/valid-callable.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function (fn) { + if (typeof fn !== "function") throw new TypeError(fn + " is not a function"); + return fn; +}; diff --git a/test/node_modules/es5-ext/object/valid-object.js b/test/node_modules/es5-ext/object/valid-object.js new file mode 100644 index 0000000..74b5e5f --- /dev/null +++ b/test/node_modules/es5-ext/object/valid-object.js @@ -0,0 +1,8 @@ +"use strict"; + +var isObject = require("./is-object"); + +module.exports = function (value) { + if (!isObject(value)) throw new TypeError(value + " is not an Object"); + return value; +}; diff --git a/test/node_modules/es5-ext/object/valid-value.js b/test/node_modules/es5-ext/object/valid-value.js new file mode 100644 index 0000000..d0ced8a --- /dev/null +++ b/test/node_modules/es5-ext/object/valid-value.js @@ -0,0 +1,8 @@ +"use strict"; + +var isValue = require("./is-value"); + +module.exports = function (value) { + if (!isValue(value)) throw new TypeError("Cannot use null or undefined"); + return value; +}; diff --git a/test/node_modules/es5-ext/object/validate-array-like-object.js b/test/node_modules/es5-ext/object/validate-array-like-object.js new file mode 100644 index 0000000..d7c45b3 --- /dev/null +++ b/test/node_modules/es5-ext/object/validate-array-like-object.js @@ -0,0 +1,9 @@ +"use strict"; + +var isArrayLike = require("./is-array-like") + , isObject = require("./is-object"); + +module.exports = function (obj) { + if (isObject(obj) && isArrayLike(obj)) return obj; + throw new TypeError(obj + " is not array-like object"); +}; diff --git a/test/node_modules/es5-ext/object/validate-array-like.js b/test/node_modules/es5-ext/object/validate-array-like.js new file mode 100644 index 0000000..07aa794 --- /dev/null +++ b/test/node_modules/es5-ext/object/validate-array-like.js @@ -0,0 +1,8 @@ +"use strict"; + +var isArrayLike = require("./is-array-like"); + +module.exports = function (obj) { + if (isArrayLike(obj)) return obj; + throw new TypeError(obj + " is not array-like value"); +}; diff --git a/test/node_modules/es5-ext/object/validate-stringifiable-value.js b/test/node_modules/es5-ext/object/validate-stringifiable-value.js new file mode 100644 index 0000000..b58f18c --- /dev/null +++ b/test/node_modules/es5-ext/object/validate-stringifiable-value.js @@ -0,0 +1,6 @@ +"use strict"; + +var ensureValue = require("./valid-value") + , stringifiable = require("./validate-stringifiable"); + +module.exports = function (value) { return stringifiable(ensureValue(value)); }; diff --git a/test/node_modules/es5-ext/object/validate-stringifiable.js b/test/node_modules/es5-ext/object/validate-stringifiable.js new file mode 100644 index 0000000..2b1f127 --- /dev/null +++ b/test/node_modules/es5-ext/object/validate-stringifiable.js @@ -0,0 +1,12 @@ +"use strict"; + +var isCallable = require("./is-callable"); + +module.exports = function (stringifiable) { + try { + if (stringifiable && isCallable(stringifiable.toString)) return stringifiable.toString(); + return String(stringifiable); + } catch (e) { + throw new TypeError("Passed argument cannot be stringifed"); + } +}; diff --git a/test/node_modules/es5-ext/optional-chaining.js b/test/node_modules/es5-ext/optional-chaining.js new file mode 100644 index 0000000..f181127 --- /dev/null +++ b/test/node_modules/es5-ext/optional-chaining.js @@ -0,0 +1,12 @@ +"use strict"; + +var isValue = require("./object/is-value"); + +var slice = Array.prototype.slice; + +// eslint-disable-next-line no-unused-vars +module.exports = function (value, propertyName1 /*, …propertyNamen*/) { + var propertyNames = slice.call(arguments, 1), index = 0, length = propertyNames.length; + while (isValue(value) && index < length) value = value[propertyNames[index++]]; + return index === length ? value : undefined; +}; diff --git a/test/node_modules/es5-ext/package.json b/test/node_modules/es5-ext/package.json new file mode 100644 index 0000000..b91b917 --- /dev/null +++ b/test/node_modules/es5-ext/package.json @@ -0,0 +1,126 @@ +{ + "name": "es5-ext", + "version": "0.10.62", + "description": "ECMAScript extensions and shims", + "author": "Mariusz Nowak (http://www.medikoo.com/)", + "keywords": [ + "ecmascript", + "ecmascript5", + "ecmascript6", + "es5", + "es6", + "extensions", + "ext", + "addons", + "extras", + "harmony", + "javascript", + "polyfill", + "shim", + "util", + "utils", + "utilities" + ], + "repository": "medikoo/es5-ext", + "dependencies": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" + }, + "devDependencies": { + "eslint": "^8.13.0", + "eslint-config-medikoo": "^4.1.2", + "git-list-updated": "^1.2.1", + "github-release-from-cc-changelog": "^2.3.0", + "husky": "^4.3.8", + "lint-staged": "^12.3.8", + "nyc": "^15.1.0", + "plain-promise": "^0.1.1", + "prettier-elastic": "^2.2.1", + "tad": "^3.1.0" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "*.js": [ + "eslint" + ], + "*.{css,html,js,json,md,yaml,yml}": [ + "prettier -c" + ] + }, + "eslintConfig": { + "extends": "medikoo/es5", + "root": true, + "rules": { + "no-extend-native": "off" + }, + "overrides": [ + { + "files": "global.js", + "globals": { + "__global__": true, + "globalThis": true, + "self": true, + "window": true + }, + "rules": { + "strict": "off" + } + }, + { + "files": "_postinstall.js", + "env": { + "node": true + } + } + ] + }, + "prettier": { + "printWidth": 100, + "tabWidth": 4, + "overrides": [ + { + "files": [ + "*.md", + "*.yml" + ], + "options": { + "tabWidth": 2 + } + } + ] + }, + "nyc": { + "all": true, + "exclude": [ + ".github", + "coverage/**", + "test/**", + "*.config.js" + ], + "reporter": [ + "lcov", + "html", + "text-summary" + ] + }, + "scripts": { + "coverage": "nyc npm test", + "lint": "eslint --ignore-path=.gitignore .", + "lint:updated": "pipe-git-updated --base=main --ext=js -- eslint --ignore-pattern '!*'", + "postinstall": " node -e \"try{require('./_postinstall')}catch(e){}\" || exit 0", + "prettier-check": "prettier -c --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"", + "prettier-check:updated": "pipe-git-updated --base=main --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier -c", + "prettify": "prettier --write --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"", + "prettify:updated": "pipe-git-updated ---base=main -ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier --write", + "test": "node ./node_modules/tad/bin/tad" + }, + "engines": { + "node": ">=0.10" + }, + "license": "ISC" +} diff --git a/test/node_modules/es5-ext/promise/#/as-callback.js b/test/node_modules/es5-ext/promise/#/as-callback.js new file mode 100644 index 0000000..ba310b3 --- /dev/null +++ b/test/node_modules/es5-ext/promise/#/as-callback.js @@ -0,0 +1,15 @@ +"use strict"; + +var ensurePlainFunction = require("../../object/ensure-plain-function") + , ensureThenable = require("../../object/ensure-thenable") + , microtaskDelay = require("../../function/#/microtask-delay"); + +module.exports = function (callback) { + ensureThenable(this); + ensurePlainFunction(callback); + // Rely on microtaskDelay to escape eventual error swallowing + this.then( + microtaskDelay.call(function (value) { callback(null, value); }), + microtaskDelay.call(function (reason) { callback(reason); }) + ); +}; diff --git a/test/node_modules/es5-ext/promise/#/finally/implement.js b/test/node_modules/es5-ext/promise/#/finally/implement.js new file mode 100644 index 0000000..77592b3 --- /dev/null +++ b/test/node_modules/es5-ext/promise/#/finally/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Promise.prototype, "finally", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/promise/#/finally/index.js b/test/node_modules/es5-ext/promise/#/finally/index.js new file mode 100644 index 0000000..f6bb447 --- /dev/null +++ b/test/node_modules/es5-ext/promise/#/finally/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Promise.prototype.finally : require("./shim"); diff --git a/test/node_modules/es5-ext/promise/#/finally/is-implemented.js b/test/node_modules/es5-ext/promise/#/finally/is-implemented.js new file mode 100644 index 0000000..0534ce6 --- /dev/null +++ b/test/node_modules/es5-ext/promise/#/finally/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + if (typeof Promise !== "function") return false; + if (typeof Promise.prototype.finally !== "function") return false; + return true; +}; diff --git a/test/node_modules/es5-ext/promise/#/finally/shim.js b/test/node_modules/es5-ext/promise/#/finally/shim.js new file mode 100644 index 0000000..f29f5b3 --- /dev/null +++ b/test/node_modules/es5-ext/promise/#/finally/shim.js @@ -0,0 +1,24 @@ +"use strict"; + +var ensurePlainFunction = require("../../../object/ensure-plain-function") + , isThenable = require("../../../object/is-thenable") + , ensureThenable = require("../../../object/ensure-thenable"); + +var resolveCallback = function (callback, next) { + var callbackResult = callback(); + if (!isThenable(callbackResult)) return next(); + return callbackResult.then(next); +}; + +module.exports = function (callback) { + ensureThenable(this); + ensurePlainFunction(callback); + return this.then( + function (result) { + return resolveCallback(callback, function () { return result; }); + }, + function (error) { + return resolveCallback(callback, function () { throw error; }); + } + ); +}; diff --git a/test/node_modules/es5-ext/promise/#/index.js b/test/node_modules/es5-ext/promise/#/index.js new file mode 100644 index 0000000..4601803 --- /dev/null +++ b/test/node_modules/es5-ext/promise/#/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = { asCallback: require("./as-callback"), finally: require("./finally") }; diff --git a/test/node_modules/es5-ext/promise/.eslintrc.json b/test/node_modules/es5-ext/promise/.eslintrc.json new file mode 100644 index 0000000..0d86fe7 --- /dev/null +++ b/test/node_modules/es5-ext/promise/.eslintrc.json @@ -0,0 +1 @@ +{ "globals": { "Promise": true } } diff --git a/test/node_modules/es5-ext/promise/index.js b/test/node_modules/es5-ext/promise/index.js new file mode 100644 index 0000000..6aa66bb --- /dev/null +++ b/test/node_modules/es5-ext/promise/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = { "#": require("./#"), "lazy": require("./lazy") }; diff --git a/test/node_modules/es5-ext/promise/lazy.js b/test/node_modules/es5-ext/promise/lazy.js new file mode 100644 index 0000000..ad97a53 --- /dev/null +++ b/test/node_modules/es5-ext/promise/lazy.js @@ -0,0 +1,35 @@ +"use strict"; + +var isFunction = require("../function/is-function"); + +module.exports = function (executor) { + var Constructor; + if (isFunction(this)) { + Constructor = this; + } else if (typeof Promise === "function") { + Constructor = Promise; + } else { + throw new TypeError("Could not resolve Promise constuctor"); + } + + var lazyThen; + var promise = new Constructor(function (resolve, reject) { + lazyThen = function (onSuccess, onFailure) { + if (!hasOwnProperty.call(this, "then")) { + // Sanity check + throw new Error("Unexpected (inherited) lazy then invocation"); + } + + try { executor(resolve, reject); } + catch (reason) { reject(reason); } + delete this.then; + return this.then(onSuccess, onFailure); + }; + }); + + return Object.defineProperty(promise, "then", { + configurable: true, + writable: true, + value: lazyThen + }); +}; diff --git a/test/node_modules/es5-ext/reg-exp/#/index.js b/test/node_modules/es5-ext/reg-exp/#/index.js new file mode 100644 index 0000000..9b098e0 --- /dev/null +++ b/test/node_modules/es5-ext/reg-exp/#/index.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = { + isSticky: require("./is-sticky"), + isUnicode: require("./is-unicode"), + match: require("./match"), + replace: require("./replace"), + search: require("./search"), + split: require("./split") +}; diff --git a/test/node_modules/es5-ext/reg-exp/#/is-sticky.js b/test/node_modules/es5-ext/reg-exp/#/is-sticky.js new file mode 100644 index 0000000..6e99533 --- /dev/null +++ b/test/node_modules/es5-ext/reg-exp/#/is-sticky.js @@ -0,0 +1,6 @@ +"use strict"; + +var validRegExp = require("../valid-reg-exp") + , re = /\/[a-xz]*y[a-xz]*$/; + +module.exports = function () { return Boolean(String(validRegExp(this)).match(re)); }; diff --git a/test/node_modules/es5-ext/reg-exp/#/is-unicode.js b/test/node_modules/es5-ext/reg-exp/#/is-unicode.js new file mode 100644 index 0000000..63a457f --- /dev/null +++ b/test/node_modules/es5-ext/reg-exp/#/is-unicode.js @@ -0,0 +1,6 @@ +"use strict"; + +var validRegExp = require("../valid-reg-exp") + , re = /\/[a-xz]*u[a-xz]*$/; + +module.exports = function () { return Boolean(String(validRegExp(this)).match(re)); }; diff --git a/test/node_modules/es5-ext/reg-exp/#/match/implement.js b/test/node_modules/es5-ext/reg-exp/#/match/implement.js new file mode 100644 index 0000000..68dcd55 --- /dev/null +++ b/test/node_modules/es5-ext/reg-exp/#/match/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(RegExp.prototype, "match", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/reg-exp/#/match/index.js b/test/node_modules/es5-ext/reg-exp/#/match/index.js new file mode 100644 index 0000000..4b33296 --- /dev/null +++ b/test/node_modules/es5-ext/reg-exp/#/match/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? RegExp.prototype.match : require("./shim"); diff --git a/test/node_modules/es5-ext/reg-exp/#/match/is-implemented.js b/test/node_modules/es5-ext/reg-exp/#/match/is-implemented.js new file mode 100644 index 0000000..a5065fc --- /dev/null +++ b/test/node_modules/es5-ext/reg-exp/#/match/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var re = /foo/; + +module.exports = function () { + if (typeof re.match !== "function") return false; + return re.match("barfoobar") && !re.match("elo"); +}; diff --git a/test/node_modules/es5-ext/reg-exp/#/match/shim.js b/test/node_modules/es5-ext/reg-exp/#/match/shim.js new file mode 100644 index 0000000..2955821 --- /dev/null +++ b/test/node_modules/es5-ext/reg-exp/#/match/shim.js @@ -0,0 +1,8 @@ +"use strict"; + +var validRegExp = require("../../valid-reg-exp"); + +module.exports = function (string) { + validRegExp(this); + return String(string).match(this); +}; diff --git a/test/node_modules/es5-ext/reg-exp/#/replace/implement.js b/test/node_modules/es5-ext/reg-exp/#/replace/implement.js new file mode 100644 index 0000000..f990c4f --- /dev/null +++ b/test/node_modules/es5-ext/reg-exp/#/replace/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(RegExp.prototype, "replace", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/reg-exp/#/replace/index.js b/test/node_modules/es5-ext/reg-exp/#/replace/index.js new file mode 100644 index 0000000..be54b52 --- /dev/null +++ b/test/node_modules/es5-ext/reg-exp/#/replace/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? RegExp.prototype.replace : require("./shim"); diff --git a/test/node_modules/es5-ext/reg-exp/#/replace/is-implemented.js b/test/node_modules/es5-ext/reg-exp/#/replace/is-implemented.js new file mode 100644 index 0000000..0a2e7c2 --- /dev/null +++ b/test/node_modules/es5-ext/reg-exp/#/replace/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var re = /foo/; + +module.exports = function () { + if (typeof re.replace !== "function") return false; + return re.replace("foobar", "mar") === "marbar"; +}; diff --git a/test/node_modules/es5-ext/reg-exp/#/replace/shim.js b/test/node_modules/es5-ext/reg-exp/#/replace/shim.js new file mode 100644 index 0000000..66f5d5b --- /dev/null +++ b/test/node_modules/es5-ext/reg-exp/#/replace/shim.js @@ -0,0 +1,8 @@ +"use strict"; + +var validRegExp = require("../../valid-reg-exp"); + +module.exports = function (string, replaceValue) { + validRegExp(this); + return String(string).replace(this, replaceValue); +}; diff --git a/test/node_modules/es5-ext/reg-exp/#/search/implement.js b/test/node_modules/es5-ext/reg-exp/#/search/implement.js new file mode 100644 index 0000000..df4a337 --- /dev/null +++ b/test/node_modules/es5-ext/reg-exp/#/search/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(RegExp.prototype, "search", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/reg-exp/#/search/index.js b/test/node_modules/es5-ext/reg-exp/#/search/index.js new file mode 100644 index 0000000..25ca76a --- /dev/null +++ b/test/node_modules/es5-ext/reg-exp/#/search/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? RegExp.prototype.search : require("./shim"); diff --git a/test/node_modules/es5-ext/reg-exp/#/search/is-implemented.js b/test/node_modules/es5-ext/reg-exp/#/search/is-implemented.js new file mode 100644 index 0000000..7f38669 --- /dev/null +++ b/test/node_modules/es5-ext/reg-exp/#/search/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var re = /foo/; + +module.exports = function () { + if (typeof re.search !== "function") return false; + return re.search("barfoo") === 3; +}; diff --git a/test/node_modules/es5-ext/reg-exp/#/search/shim.js b/test/node_modules/es5-ext/reg-exp/#/search/shim.js new file mode 100644 index 0000000..c97a787 --- /dev/null +++ b/test/node_modules/es5-ext/reg-exp/#/search/shim.js @@ -0,0 +1,8 @@ +"use strict"; + +var validRegExp = require("../../valid-reg-exp"); + +module.exports = function (string) { + validRegExp(this); + return String(string).search(this); +}; diff --git a/test/node_modules/es5-ext/reg-exp/#/split/implement.js b/test/node_modules/es5-ext/reg-exp/#/split/implement.js new file mode 100644 index 0000000..b979db0 --- /dev/null +++ b/test/node_modules/es5-ext/reg-exp/#/split/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(RegExp.prototype, "split", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/reg-exp/#/split/index.js b/test/node_modules/es5-ext/reg-exp/#/split/index.js new file mode 100644 index 0000000..6d4f177 --- /dev/null +++ b/test/node_modules/es5-ext/reg-exp/#/split/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? RegExp.prototype.split : require("./shim"); diff --git a/test/node_modules/es5-ext/reg-exp/#/split/is-implemented.js b/test/node_modules/es5-ext/reg-exp/#/split/is-implemented.js new file mode 100644 index 0000000..90fca0c --- /dev/null +++ b/test/node_modules/es5-ext/reg-exp/#/split/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var re = /\|/; + +module.exports = function () { + if (typeof re.split !== "function") return false; + return re.split("bar|foo")[1] === "foo"; +}; diff --git a/test/node_modules/es5-ext/reg-exp/#/split/shim.js b/test/node_modules/es5-ext/reg-exp/#/split/shim.js new file mode 100644 index 0000000..c9c73cc --- /dev/null +++ b/test/node_modules/es5-ext/reg-exp/#/split/shim.js @@ -0,0 +1,8 @@ +"use strict"; + +var validRegExp = require("../../valid-reg-exp"); + +module.exports = function (string) { + validRegExp(this); + return String(string).split(this); +}; diff --git a/test/node_modules/es5-ext/reg-exp/#/sticky/implement.js b/test/node_modules/es5-ext/reg-exp/#/sticky/implement.js new file mode 100644 index 0000000..7864c6c --- /dev/null +++ b/test/node_modules/es5-ext/reg-exp/#/sticky/implement.js @@ -0,0 +1,11 @@ +"use strict"; + +var isSticky = require("../is-sticky"); + +if (!require("./is-implemented")()) { + Object.defineProperty(RegExp.prototype, "sticky", { + configurable: true, + enumerable: false, + get: isSticky + }); +} diff --git a/test/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js b/test/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js new file mode 100644 index 0000000..a1ade11 --- /dev/null +++ b/test/node_modules/es5-ext/reg-exp/#/sticky/is-implemented.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function () { + var dummyRegExp = /a/; + // We need to do check on instance and not on prototype due to how ES2015 spec evolved: + // https://github.com/tc39/ecma262/issues/262 + // https://github.com/tc39/ecma262/pull/263 + // https://bugs.chromium.org/p/v8/issues/detail?id=4617 + return "sticky" in dummyRegExp; +}; diff --git a/test/node_modules/es5-ext/reg-exp/#/unicode/implement.js b/test/node_modules/es5-ext/reg-exp/#/unicode/implement.js new file mode 100644 index 0000000..8b99be5 --- /dev/null +++ b/test/node_modules/es5-ext/reg-exp/#/unicode/implement.js @@ -0,0 +1,11 @@ +"use strict"; + +var isUnicode = require("../is-unicode"); + +if (!require("./is-implemented")()) { + Object.defineProperty(RegExp.prototype, "unicode", { + configurable: true, + enumerable: false, + get: isUnicode + }); +} diff --git a/test/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js b/test/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js new file mode 100644 index 0000000..48605d7 --- /dev/null +++ b/test/node_modules/es5-ext/reg-exp/#/unicode/is-implemented.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function () { + var dummyRegExp = /a/; + // We need to do check on instance and not on prototype due to how ES2015 spec evolved: + // https://github.com/tc39/ecma262/issues/262 + // https://github.com/tc39/ecma262/pull/263 + // https://bugs.chromium.org/p/v8/issues/detail?id=4617 + return "unicode" in dummyRegExp; +}; diff --git a/test/node_modules/es5-ext/reg-exp/escape.js b/test/node_modules/es5-ext/reg-exp/escape.js new file mode 100644 index 0000000..b65b351 --- /dev/null +++ b/test/node_modules/es5-ext/reg-exp/escape.js @@ -0,0 +1,9 @@ +// Thanks to Andrew Clover: +// http://stackoverflow.com/questions/3561493 +// /is-there-a-regexp-escape-function-in-javascript + +"use strict"; + +var re = /[-/\\^$*+?.()|[\]{}]/g; + +module.exports = function (str) { return String(str).replace(re, "\\$&"); }; diff --git a/test/node_modules/es5-ext/reg-exp/index.js b/test/node_modules/es5-ext/reg-exp/index.js new file mode 100644 index 0000000..f023fe0 --- /dev/null +++ b/test/node_modules/es5-ext/reg-exp/index.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = { + "#": require("./#"), + "escape": require("./escape"), + "isRegExp": require("./is-reg-exp"), + "validRegExp": require("./valid-reg-exp") +}; diff --git a/test/node_modules/es5-ext/reg-exp/is-reg-exp.js b/test/node_modules/es5-ext/reg-exp/is-reg-exp.js new file mode 100644 index 0000000..b966b0f --- /dev/null +++ b/test/node_modules/es5-ext/reg-exp/is-reg-exp.js @@ -0,0 +1,7 @@ +"use strict"; + +var objToString = Object.prototype.toString, id = objToString.call(/a/); + +module.exports = function (value) { + return (value && (value instanceof RegExp || objToString.call(value) === id)) || false; +}; diff --git a/test/node_modules/es5-ext/reg-exp/valid-reg-exp.js b/test/node_modules/es5-ext/reg-exp/valid-reg-exp.js new file mode 100644 index 0000000..a05927a --- /dev/null +++ b/test/node_modules/es5-ext/reg-exp/valid-reg-exp.js @@ -0,0 +1,8 @@ +"use strict"; + +var isRegExp = require("./is-reg-exp"); + +module.exports = function (value) { + if (!isRegExp(value)) throw new TypeError(value + " is not a RegExp object"); + return value; +}; diff --git a/test/node_modules/es5-ext/safe-to-string.js b/test/node_modules/es5-ext/safe-to-string.js new file mode 100644 index 0000000..f49a238 --- /dev/null +++ b/test/node_modules/es5-ext/safe-to-string.js @@ -0,0 +1,12 @@ +"use strict"; + +var isCallable = require("./object/is-callable"); + +module.exports = function (value) { + try { + if (value && isCallable(value.toString)) return value.toString(); + return String(value); + } catch (e) { + return ""; + } +}; diff --git a/test/node_modules/es5-ext/string/#/@@iterator/implement.js b/test/node_modules/es5-ext/string/#/@@iterator/implement.js new file mode 100644 index 0000000..b51ad9f --- /dev/null +++ b/test/node_modules/es5-ext/string/#/@@iterator/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, require("es6-symbol").iterator, { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/string/#/@@iterator/index.js b/test/node_modules/es5-ext/string/#/@@iterator/index.js new file mode 100644 index 0000000..4572443 --- /dev/null +++ b/test/node_modules/es5-ext/string/#/@@iterator/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? String.prototype[require("es6-symbol").iterator] + : require("./shim"); diff --git a/test/node_modules/es5-ext/string/#/@@iterator/is-implemented.js b/test/node_modules/es5-ext/string/#/@@iterator/is-implemented.js new file mode 100644 index 0000000..bb8a8d6 --- /dev/null +++ b/test/node_modules/es5-ext/string/#/@@iterator/is-implemented.js @@ -0,0 +1,16 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function () { + var str = "🙈f", iterator, result; + if (typeof str[iteratorSymbol] !== "function") return false; + iterator = str[iteratorSymbol](); + if (!iterator) return false; + if (typeof iterator.next !== "function") return false; + result = iterator.next(); + if (!result) return false; + if (result.value !== "🙈") return false; + if (result.done !== false) return false; + return true; +}; diff --git a/test/node_modules/es5-ext/string/#/@@iterator/shim.js b/test/node_modules/es5-ext/string/#/@@iterator/shim.js new file mode 100644 index 0000000..2160619 --- /dev/null +++ b/test/node_modules/es5-ext/string/#/@@iterator/shim.js @@ -0,0 +1,6 @@ +"use strict"; + +var StringIterator = require("es6-iterator/string") + , value = require("../../../object/valid-value"); + +module.exports = function () { return new StringIterator(value(this)); }; diff --git a/test/node_modules/es5-ext/string/#/at.js b/test/node_modules/es5-ext/string/#/at.js new file mode 100644 index 0000000..a8c2917 --- /dev/null +++ b/test/node_modules/es5-ext/string/#/at.js @@ -0,0 +1,35 @@ +// Based on: https://github.com/mathiasbynens/String.prototype.at +// Thanks @mathiasbynens ! + +"use strict"; + +var toInteger = require("../../number/to-integer") + , validValue = require("../../object/valid-value"); + +module.exports = function (pos) { + var str = String(validValue(this)), size = str.length, cuFirst, cuSecond, nextPos, len; + pos = toInteger(pos); + + // Account for out-of-bounds indices + // The odd lower bound is because the ToInteger operation is + // going to round `n` to `0` for `-1 < n <= 0`. + if (pos <= -1 || pos >= size) return ""; + + // Second half of `ToInteger` + // eslint-disable-next-line no-bitwise + pos |= 0; + // Get the first code unit and code unit value + cuFirst = str.charCodeAt(pos); + nextPos = pos + 1; + len = 1; + if ( + // Check if it’s the start of a surrogate pair + cuFirst >= 0xd800 && + cuFirst <= 0xdbff && // High surrogate + size > nextPos // There is a next code unit + ) { + cuSecond = str.charCodeAt(nextPos); + if (cuSecond >= 0xdc00 && cuSecond <= 0xdfff) len = 2; // Low surrogate + } + return str.slice(pos, pos + len); +}; diff --git a/test/node_modules/es5-ext/string/#/camel-to-hyphen.js b/test/node_modules/es5-ext/string/#/camel-to-hyphen.js new file mode 100644 index 0000000..5add3ed --- /dev/null +++ b/test/node_modules/es5-ext/string/#/camel-to-hyphen.js @@ -0,0 +1,9 @@ +"use strict"; + +var replace = String.prototype.replace, re = /([A-Z])/g; + +module.exports = function () { + var str = replace.call(this, re, "-$1").toLowerCase(); + if (str[0] === "-") str = str.slice(1); + return str; +}; diff --git a/test/node_modules/es5-ext/string/#/capitalize.js b/test/node_modules/es5-ext/string/#/capitalize.js new file mode 100644 index 0000000..fc92a9f --- /dev/null +++ b/test/node_modules/es5-ext/string/#/capitalize.js @@ -0,0 +1,8 @@ +"use strict"; + +var value = require("../../object/valid-value"); + +module.exports = function () { + var str = String(value(this)); + return str.charAt(0).toUpperCase() + str.slice(1); +}; diff --git a/test/node_modules/es5-ext/string/#/case-insensitive-compare.js b/test/node_modules/es5-ext/string/#/case-insensitive-compare.js new file mode 100644 index 0000000..5d961a5 --- /dev/null +++ b/test/node_modules/es5-ext/string/#/case-insensitive-compare.js @@ -0,0 +1,7 @@ +"use strict"; + +var toLowerCase = String.prototype.toLowerCase; + +module.exports = function (other) { + return toLowerCase.call(this).localeCompare(toLowerCase.call(String(other))); +}; diff --git a/test/node_modules/es5-ext/string/#/code-point-at/implement.js b/test/node_modules/es5-ext/string/#/code-point-at/implement.js new file mode 100644 index 0000000..25752f9 --- /dev/null +++ b/test/node_modules/es5-ext/string/#/code-point-at/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, "codePointAt", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/string/#/code-point-at/index.js b/test/node_modules/es5-ext/string/#/code-point-at/index.js new file mode 100644 index 0000000..0a22f84 --- /dev/null +++ b/test/node_modules/es5-ext/string/#/code-point-at/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? String.prototype.codePointAt : require("./shim"); diff --git a/test/node_modules/es5-ext/string/#/code-point-at/is-implemented.js b/test/node_modules/es5-ext/string/#/code-point-at/is-implemented.js new file mode 100644 index 0000000..47e4c93 --- /dev/null +++ b/test/node_modules/es5-ext/string/#/code-point-at/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var str = "abc\uD834\uDF06def"; + +module.exports = function () { + if (typeof str.codePointAt !== "function") return false; + return str.codePointAt(3) === 0x1d306; +}; diff --git a/test/node_modules/es5-ext/string/#/code-point-at/shim.js b/test/node_modules/es5-ext/string/#/code-point-at/shim.js new file mode 100644 index 0000000..0f331c3 --- /dev/null +++ b/test/node_modules/es5-ext/string/#/code-point-at/shim.js @@ -0,0 +1,26 @@ +// Based on: https://github.com/mathiasbynens/String.prototype.codePointAt +// Thanks @mathiasbynens ! + +"use strict"; + +var toInteger = require("../../../number/to-integer") + , validValue = require("../../../object/valid-value"); + +module.exports = function (pos) { + var str = String(validValue(this)), length = str.length, first, second; + pos = toInteger(pos); + + // Account for out-of-bounds indices: + if (pos < 0 || pos >= length) return undefined; + + // Get the first code unit + first = str.charCodeAt(pos); + if (first >= 0xd800 && first <= 0xdbff && length > pos + 1) { + second = str.charCodeAt(pos + 1); + if (second >= 0xdc00 && second <= 0xdfff) { + // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + return (first - 0xd800) * 0x400 + second - 0xdc00 + 0x10000; + } + } + return first; +}; diff --git a/test/node_modules/es5-ext/string/#/contains/implement.js b/test/node_modules/es5-ext/string/#/contains/implement.js new file mode 100644 index 0000000..03cc091 --- /dev/null +++ b/test/node_modules/es5-ext/string/#/contains/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, "contains", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/string/#/contains/index.js b/test/node_modules/es5-ext/string/#/contains/index.js new file mode 100644 index 0000000..5f8d993 --- /dev/null +++ b/test/node_modules/es5-ext/string/#/contains/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? String.prototype.contains : require("./shim"); diff --git a/test/node_modules/es5-ext/string/#/contains/is-implemented.js b/test/node_modules/es5-ext/string/#/contains/is-implemented.js new file mode 100644 index 0000000..d9b3e9a --- /dev/null +++ b/test/node_modules/es5-ext/string/#/contains/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var str = "razdwatrzy"; + +module.exports = function () { + if (typeof str.contains !== "function") return false; + return str.contains("dwa") === true && str.contains("foo") === false; +}; diff --git a/test/node_modules/es5-ext/string/#/contains/shim.js b/test/node_modules/es5-ext/string/#/contains/shim.js new file mode 100644 index 0000000..de2483d --- /dev/null +++ b/test/node_modules/es5-ext/string/#/contains/shim.js @@ -0,0 +1,7 @@ +"use strict"; + +var indexOf = String.prototype.indexOf; + +module.exports = function (searchString /*, position*/) { + return indexOf.call(this, searchString, arguments[1]) > -1; +}; diff --git a/test/node_modules/es5-ext/string/#/count.js b/test/node_modules/es5-ext/string/#/count.js new file mode 100644 index 0000000..7607013 --- /dev/null +++ b/test/node_modules/es5-ext/string/#/count.js @@ -0,0 +1,15 @@ +"use strict"; + +var ensureString = require("../../object/validate-stringifiable-value"); + +module.exports = function (search) { + var string = ensureString(this), count = 0, index = 0; + + search = ensureString(search); + if (!search) throw new TypeError("Search string cannot be empty"); + while ((index = string.indexOf(search, index)) !== -1) { + ++count; + index += search.length; + } + return count; +}; diff --git a/test/node_modules/es5-ext/string/#/ends-with/implement.js b/test/node_modules/es5-ext/string/#/ends-with/implement.js new file mode 100644 index 0000000..62457cc --- /dev/null +++ b/test/node_modules/es5-ext/string/#/ends-with/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, "endsWith", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/string/#/ends-with/index.js b/test/node_modules/es5-ext/string/#/ends-with/index.js new file mode 100644 index 0000000..04c8264 --- /dev/null +++ b/test/node_modules/es5-ext/string/#/ends-with/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? String.prototype.endsWith : require("./shim"); diff --git a/test/node_modules/es5-ext/string/#/ends-with/is-implemented.js b/test/node_modules/es5-ext/string/#/ends-with/is-implemented.js new file mode 100644 index 0000000..1abaff7 --- /dev/null +++ b/test/node_modules/es5-ext/string/#/ends-with/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var str = "razdwatrzy"; + +module.exports = function () { + if (typeof str.endsWith !== "function") return false; + return str.endsWith("trzy") === true && str.endsWith("raz") === false; +}; diff --git a/test/node_modules/es5-ext/string/#/ends-with/shim.js b/test/node_modules/es5-ext/string/#/ends-with/shim.js new file mode 100644 index 0000000..c5371aa --- /dev/null +++ b/test/node_modules/es5-ext/string/#/ends-with/shim.js @@ -0,0 +1,18 @@ +"use strict"; + +var toInteger = require("../../../number/to-integer") + , value = require("../../../object/valid-value") + , isValue = require("../../../object/is-value") + , min = Math.min + , max = Math.max; + +module.exports = function (searchString /*, endPosition*/) { + var self, start, endPos; + self = String(value(this)); + searchString = String(searchString); + endPos = arguments[1]; + start = + (isValue(endPos) ? min(max(toInteger(endPos), 0), self.length) : self.length) - + searchString.length; + return start < 0 ? false : self.indexOf(searchString, start) === start; +}; diff --git a/test/node_modules/es5-ext/string/#/hyphen-to-camel.js b/test/node_modules/es5-ext/string/#/hyphen-to-camel.js new file mode 100644 index 0000000..9feef5b --- /dev/null +++ b/test/node_modules/es5-ext/string/#/hyphen-to-camel.js @@ -0,0 +1,6 @@ +"use strict"; + +var replace = String.prototype.replace, re = /-([a-z0-9])/g; +var toUpperCase = function (ignored, a) { return a.toUpperCase(); }; + +module.exports = function () { return replace.call(this, re, toUpperCase); }; diff --git a/test/node_modules/es5-ext/string/#/indent.js b/test/node_modules/es5-ext/string/#/indent.js new file mode 100644 index 0000000..df8869d --- /dev/null +++ b/test/node_modules/es5-ext/string/#/indent.js @@ -0,0 +1,12 @@ +"use strict"; + +var isValue = require("../../object/is-value") + , repeat = require("./repeat") + , replace = String.prototype.replace + , re = /(\r\n|[\n\r\u2028\u2029])([\u0000-\u0009\u000b-\uffff]+)/g; + +module.exports = function (indent /*, count*/) { + var count = arguments[1]; + indent = repeat.call(String(indent), isValue(count) ? count : 1); + return indent + replace.call(this, re, "$1" + indent + "$2"); +}; diff --git a/test/node_modules/es5-ext/string/#/index.js b/test/node_modules/es5-ext/string/#/index.js new file mode 100644 index 0000000..2344489 --- /dev/null +++ b/test/node_modules/es5-ext/string/#/index.js @@ -0,0 +1,23 @@ +"use strict"; + +module.exports = { + "@@iterator": require("./@@iterator"), + "at": require("./at"), + "count": require("./count"), + "camelToHyphen": require("./camel-to-hyphen"), + "capitalize": require("./capitalize"), + "caseInsensitiveCompare": require("./case-insensitive-compare"), + "codePointAt": require("./code-point-at"), + "contains": require("./contains"), + "hyphenToCamel": require("./hyphen-to-camel"), + "endsWith": require("./ends-with"), + "indent": require("./indent"), + "last": require("./last"), + "normalize": require("./normalize"), + "pad": require("./pad"), + "plainReplace": require("./plain-replace"), + "plainReplaceAll": require("./plain-replace-all"), + "repeat": require("./repeat"), + "startsWith": require("./starts-with"), + "uncapitalize": require("./uncapitalize") +}; diff --git a/test/node_modules/es5-ext/string/#/last.js b/test/node_modules/es5-ext/string/#/last.js new file mode 100644 index 0000000..f5c957f --- /dev/null +++ b/test/node_modules/es5-ext/string/#/last.js @@ -0,0 +1,8 @@ +"use strict"; + +var value = require("../../object/valid-value"); + +module.exports = function () { + var self = String(value(this)), length = self.length; + return length ? self[length - 1] : null; +}; diff --git a/test/node_modules/es5-ext/string/#/normalize/_data.js b/test/node_modules/es5-ext/string/#/normalize/_data.js new file mode 100644 index 0000000..ae4f153 --- /dev/null +++ b/test/node_modules/es5-ext/string/#/normalize/_data.js @@ -0,0 +1,6988 @@ +/* eslint max-lines: "off", no-sparse-arrays: "off", comma-style: "off" */ + +"use strict"; + +module.exports = { + 0: { + 60: [, , { 824: 8814 }], + 61: [, , { 824: 8800 }], + 62: [, , { 824: 8815 }], + 65: [ + , , + { + 768: 192, + 769: 193, + 770: 194, + 771: 195, + 772: 256, + 774: 258, + 775: 550, + 776: 196, + 777: 7842, + 778: 197, + 780: 461, + 783: 512, + 785: 514, + 803: 7840, + 805: 7680, + 808: 260 + } + ], + 66: [, , { 775: 7682, 803: 7684, 817: 7686 }], + 67: [, , { 769: 262, 770: 264, 775: 266, 780: 268, 807: 199 }], + 68: [, , { 775: 7690, 780: 270, 803: 7692, 807: 7696, 813: 7698, 817: 7694 }], + 69: [ + , , + { + 768: 200, + 769: 201, + 770: 202, + 771: 7868, + 772: 274, + 774: 276, + 775: 278, + 776: 203, + 777: 7866, + 780: 282, + 783: 516, + 785: 518, + 803: 7864, + 807: 552, + 808: 280, + 813: 7704, + 816: 7706 + } + ], + 70: [, , { 775: 7710 }], + 71: [, , { 769: 500, 770: 284, 772: 7712, 774: 286, 775: 288, 780: 486, 807: 290 }], + 72: [, , { 770: 292, 775: 7714, 776: 7718, 780: 542, 803: 7716, 807: 7720, 814: 7722 }], + 73: [ + , , + { + 768: 204, + 769: 205, + 770: 206, + 771: 296, + 772: 298, + 774: 300, + 775: 304, + 776: 207, + 777: 7880, + 780: 463, + 783: 520, + 785: 522, + 803: 7882, + 808: 302, + 816: 7724 + } + ], + 74: [, , { 770: 308 }], + 75: [, , { 769: 7728, 780: 488, 803: 7730, 807: 310, 817: 7732 }], + 76: [, , { 769: 313, 780: 317, 803: 7734, 807: 315, 813: 7740, 817: 7738 }], + 77: [, , { 769: 7742, 775: 7744, 803: 7746 }], + 78: [ + , , + { + 768: 504, + 769: 323, + 771: 209, + 775: 7748, + 780: 327, + 803: 7750, + 807: 325, + 813: 7754, + 817: 7752 + } + ], + 79: [ + , , + { + 768: 210, + 769: 211, + 770: 212, + 771: 213, + 772: 332, + 774: 334, + 775: 558, + 776: 214, + 777: 7886, + 779: 336, + 780: 465, + 783: 524, + 785: 526, + 795: 416, + 803: 7884, + 808: 490 + } + ], + 80: [, , { 769: 7764, 775: 7766 }], + 82: [ + , , + { 769: 340, 775: 7768, 780: 344, 783: 528, 785: 530, 803: 7770, 807: 342, 817: 7774 } + ], + 83: [, , { 769: 346, 770: 348, 775: 7776, 780: 352, 803: 7778, 806: 536, 807: 350 }], + 84: [, , { 775: 7786, 780: 356, 803: 7788, 806: 538, 807: 354, 813: 7792, 817: 7790 }], + 85: [ + , , + { + 768: 217, + 769: 218, + 770: 219, + 771: 360, + 772: 362, + 774: 364, + 776: 220, + 777: 7910, + 778: 366, + 779: 368, + 780: 467, + 783: 532, + 785: 534, + 795: 431, + 803: 7908, + 804: 7794, + 808: 370, + 813: 7798, + 816: 7796 + } + ], + 86: [, , { 771: 7804, 803: 7806 }], + 87: [, , { 768: 7808, 769: 7810, 770: 372, 775: 7814, 776: 7812, 803: 7816 }], + 88: [, , { 775: 7818, 776: 7820 }], + 89: [ + , , + { + 768: 7922, + 769: 221, + 770: 374, + 771: 7928, + 772: 562, + 775: 7822, + 776: 376, + 777: 7926, + 803: 7924 + } + ], + 90: [, , { 769: 377, 770: 7824, 775: 379, 780: 381, 803: 7826, 817: 7828 }], + 97: [ + , , + { + 768: 224, + 769: 225, + 770: 226, + 771: 227, + 772: 257, + 774: 259, + 775: 551, + 776: 228, + 777: 7843, + 778: 229, + 780: 462, + 783: 513, + 785: 515, + 803: 7841, + 805: 7681, + 808: 261 + } + ], + 98: [, , { 775: 7683, 803: 7685, 817: 7687 }], + 99: [, , { 769: 263, 770: 265, 775: 267, 780: 269, 807: 231 }], + 100: [, , { 775: 7691, 780: 271, 803: 7693, 807: 7697, 813: 7699, 817: 7695 }], + 101: [ + , , + { + 768: 232, + 769: 233, + 770: 234, + 771: 7869, + 772: 275, + 774: 277, + 775: 279, + 776: 235, + 777: 7867, + 780: 283, + 783: 517, + 785: 519, + 803: 7865, + 807: 553, + 808: 281, + 813: 7705, + 816: 7707 + } + ], + 102: [, , { 775: 7711 }], + 103: [, , { 769: 501, 770: 285, 772: 7713, 774: 287, 775: 289, 780: 487, 807: 291 }], + 104: [ + , , + { 770: 293, 775: 7715, 776: 7719, 780: 543, 803: 7717, 807: 7721, 814: 7723, 817: 7830 } + ], + 105: [ + , , + { + 768: 236, + 769: 237, + 770: 238, + 771: 297, + 772: 299, + 774: 301, + 776: 239, + 777: 7881, + 780: 464, + 783: 521, + 785: 523, + 803: 7883, + 808: 303, + 816: 7725 + } + ], + 106: [, , { 770: 309, 780: 496 }], + 107: [, , { 769: 7729, 780: 489, 803: 7731, 807: 311, 817: 7733 }], + 108: [, , { 769: 314, 780: 318, 803: 7735, 807: 316, 813: 7741, 817: 7739 }], + 109: [, , { 769: 7743, 775: 7745, 803: 7747 }], + 110: [ + , , + { + 768: 505, + 769: 324, + 771: 241, + 775: 7749, + 780: 328, + 803: 7751, + 807: 326, + 813: 7755, + 817: 7753 + } + ], + 111: [ + , , + { + 768: 242, + 769: 243, + 770: 244, + 771: 245, + 772: 333, + 774: 335, + 775: 559, + 776: 246, + 777: 7887, + 779: 337, + 780: 466, + 783: 525, + 785: 527, + 795: 417, + 803: 7885, + 808: 491 + } + ], + 112: [, , { 769: 7765, 775: 7767 }], + 114: [ + , , + { 769: 341, 775: 7769, 780: 345, 783: 529, 785: 531, 803: 7771, 807: 343, 817: 7775 } + ], + 115: [, , { 769: 347, 770: 349, 775: 7777, 780: 353, 803: 7779, 806: 537, 807: 351 }], + 116: [ + , , + { 775: 7787, 776: 7831, 780: 357, 803: 7789, 806: 539, 807: 355, 813: 7793, 817: 7791 } + ], + 117: [ + , , + { + 768: 249, + 769: 250, + 770: 251, + 771: 361, + 772: 363, + 774: 365, + 776: 252, + 777: 7911, + 778: 367, + 779: 369, + 780: 468, + 783: 533, + 785: 535, + 795: 432, + 803: 7909, + 804: 7795, + 808: 371, + 813: 7799, + 816: 7797 + } + ], + 118: [, , { 771: 7805, 803: 7807 }], + 119: [, , { 768: 7809, 769: 7811, 770: 373, 775: 7815, 776: 7813, 778: 7832, 803: 7817 }], + 120: [, , { 775: 7819, 776: 7821 }], + 121: [ + , , + { + 768: 7923, + 769: 253, + 770: 375, + 771: 7929, + 772: 563, + 775: 7823, + 776: 255, + 777: 7927, + 778: 7833, + 803: 7925 + } + ], + 122: [, , { 769: 378, 770: 7825, 775: 380, 780: 382, 803: 7827, 817: 7829 }], + 160: [[32], 256], + 168: [[32, 776], 256, { 768: 8173, 769: 901, 834: 8129 }], + 170: [[97], 256], + 175: [[32, 772], 256], + 178: [[50], 256], + 179: [[51], 256], + 180: [[32, 769], 256], + 181: [[956], 256], + 184: [[32, 807], 256], + 185: [[49], 256], + 186: [[111], 256], + 188: [[49, 8260, 52], 256], + 189: [[49, 8260, 50], 256], + 190: [[51, 8260, 52], 256], + 192: [[65, 768]], + 193: [[65, 769]], + 194: [[65, 770], , { 768: 7846, 769: 7844, 771: 7850, 777: 7848 }], + 195: [[65, 771]], + 196: [[65, 776], , { 772: 478 }], + 197: [[65, 778], , { 769: 506 }], + 198: [, , { 769: 508, 772: 482 }], + 199: [[67, 807], , { 769: 7688 }], + 200: [[69, 768]], + 201: [[69, 769]], + 202: [[69, 770], , { 768: 7872, 769: 7870, 771: 7876, 777: 7874 }], + 203: [[69, 776]], + 204: [[73, 768]], + 205: [[73, 769]], + 206: [[73, 770]], + 207: [[73, 776], , { 769: 7726 }], + 209: [[78, 771]], + 210: [[79, 768]], + 211: [[79, 769]], + 212: [[79, 770], , { 768: 7890, 769: 7888, 771: 7894, 777: 7892 }], + 213: [[79, 771], , { 769: 7756, 772: 556, 776: 7758 }], + 214: [[79, 776], , { 772: 554 }], + 216: [, , { 769: 510 }], + 217: [[85, 768]], + 218: [[85, 769]], + 219: [[85, 770]], + 220: [[85, 776], , { 768: 475, 769: 471, 772: 469, 780: 473 }], + 221: [[89, 769]], + 224: [[97, 768]], + 225: [[97, 769]], + 226: [[97, 770], , { 768: 7847, 769: 7845, 771: 7851, 777: 7849 }], + 227: [[97, 771]], + 228: [[97, 776], , { 772: 479 }], + 229: [[97, 778], , { 769: 507 }], + 230: [, , { 769: 509, 772: 483 }], + 231: [[99, 807], , { 769: 7689 }], + 232: [[101, 768]], + 233: [[101, 769]], + 234: [[101, 770], , { 768: 7873, 769: 7871, 771: 7877, 777: 7875 }], + 235: [[101, 776]], + 236: [[105, 768]], + 237: [[105, 769]], + 238: [[105, 770]], + 239: [[105, 776], , { 769: 7727 }], + 241: [[110, 771]], + 242: [[111, 768]], + 243: [[111, 769]], + 244: [[111, 770], , { 768: 7891, 769: 7889, 771: 7895, 777: 7893 }], + 245: [[111, 771], , { 769: 7757, 772: 557, 776: 7759 }], + 246: [[111, 776], , { 772: 555 }], + 248: [, , { 769: 511 }], + 249: [[117, 768]], + 250: [[117, 769]], + 251: [[117, 770]], + 252: [[117, 776], , { 768: 476, 769: 472, 772: 470, 780: 474 }], + 253: [[121, 769]], + 255: [[121, 776]] + }, + 256: { + 256: [[65, 772]], + 257: [[97, 772]], + 258: [[65, 774], , { 768: 7856, 769: 7854, 771: 7860, 777: 7858 }], + 259: [[97, 774], , { 768: 7857, 769: 7855, 771: 7861, 777: 7859 }], + 260: [[65, 808]], + 261: [[97, 808]], + 262: [[67, 769]], + 263: [[99, 769]], + 264: [[67, 770]], + 265: [[99, 770]], + 266: [[67, 775]], + 267: [[99, 775]], + 268: [[67, 780]], + 269: [[99, 780]], + 270: [[68, 780]], + 271: [[100, 780]], + 274: [[69, 772], , { 768: 7700, 769: 7702 }], + 275: [[101, 772], , { 768: 7701, 769: 7703 }], + 276: [[69, 774]], + 277: [[101, 774]], + 278: [[69, 775]], + 279: [[101, 775]], + 280: [[69, 808]], + 281: [[101, 808]], + 282: [[69, 780]], + 283: [[101, 780]], + 284: [[71, 770]], + 285: [[103, 770]], + 286: [[71, 774]], + 287: [[103, 774]], + 288: [[71, 775]], + 289: [[103, 775]], + 290: [[71, 807]], + 291: [[103, 807]], + 292: [[72, 770]], + 293: [[104, 770]], + 296: [[73, 771]], + 297: [[105, 771]], + 298: [[73, 772]], + 299: [[105, 772]], + 300: [[73, 774]], + 301: [[105, 774]], + 302: [[73, 808]], + 303: [[105, 808]], + 304: [[73, 775]], + 306: [[73, 74], 256], + 307: [[105, 106], 256], + 308: [[74, 770]], + 309: [[106, 770]], + 310: [[75, 807]], + 311: [[107, 807]], + 313: [[76, 769]], + 314: [[108, 769]], + 315: [[76, 807]], + 316: [[108, 807]], + 317: [[76, 780]], + 318: [[108, 780]], + 319: [[76, 183], 256], + 320: [[108, 183], 256], + 323: [[78, 769]], + 324: [[110, 769]], + 325: [[78, 807]], + 326: [[110, 807]], + 327: [[78, 780]], + 328: [[110, 780]], + 329: [[700, 110], 256], + 332: [[79, 772], , { 768: 7760, 769: 7762 }], + 333: [[111, 772], , { 768: 7761, 769: 7763 }], + 334: [[79, 774]], + 335: [[111, 774]], + 336: [[79, 779]], + 337: [[111, 779]], + 340: [[82, 769]], + 341: [[114, 769]], + 342: [[82, 807]], + 343: [[114, 807]], + 344: [[82, 780]], + 345: [[114, 780]], + 346: [[83, 769], , { 775: 7780 }], + 347: [[115, 769], , { 775: 7781 }], + 348: [[83, 770]], + 349: [[115, 770]], + 350: [[83, 807]], + 351: [[115, 807]], + 352: [[83, 780], , { 775: 7782 }], + 353: [[115, 780], , { 775: 7783 }], + 354: [[84, 807]], + 355: [[116, 807]], + 356: [[84, 780]], + 357: [[116, 780]], + 360: [[85, 771], , { 769: 7800 }], + 361: [[117, 771], , { 769: 7801 }], + 362: [[85, 772], , { 776: 7802 }], + 363: [[117, 772], , { 776: 7803 }], + 364: [[85, 774]], + 365: [[117, 774]], + 366: [[85, 778]], + 367: [[117, 778]], + 368: [[85, 779]], + 369: [[117, 779]], + 370: [[85, 808]], + 371: [[117, 808]], + 372: [[87, 770]], + 373: [[119, 770]], + 374: [[89, 770]], + 375: [[121, 770]], + 376: [[89, 776]], + 377: [[90, 769]], + 378: [[122, 769]], + 379: [[90, 775]], + 380: [[122, 775]], + 381: [[90, 780]], + 382: [[122, 780]], + 383: [[115], 256, { 775: 7835 }], + 416: [[79, 795], , { 768: 7900, 769: 7898, 771: 7904, 777: 7902, 803: 7906 }], + 417: [[111, 795], , { 768: 7901, 769: 7899, 771: 7905, 777: 7903, 803: 7907 }], + 431: [[85, 795], , { 768: 7914, 769: 7912, 771: 7918, 777: 7916, 803: 7920 }], + 432: [[117, 795], , { 768: 7915, 769: 7913, 771: 7919, 777: 7917, 803: 7921 }], + 439: [, , { 780: 494 }], + 452: [[68, 381], 256], + 453: [[68, 382], 256], + 454: [[100, 382], 256], + 455: [[76, 74], 256], + 456: [[76, 106], 256], + 457: [[108, 106], 256], + 458: [[78, 74], 256], + 459: [[78, 106], 256], + 460: [[110, 106], 256], + 461: [[65, 780]], + 462: [[97, 780]], + 463: [[73, 780]], + 464: [[105, 780]], + 465: [[79, 780]], + 466: [[111, 780]], + 467: [[85, 780]], + 468: [[117, 780]], + 469: [[220, 772]], + 470: [[252, 772]], + 471: [[220, 769]], + 472: [[252, 769]], + 473: [[220, 780]], + 474: [[252, 780]], + 475: [[220, 768]], + 476: [[252, 768]], + 478: [[196, 772]], + 479: [[228, 772]], + 480: [[550, 772]], + 481: [[551, 772]], + 482: [[198, 772]], + 483: [[230, 772]], + 486: [[71, 780]], + 487: [[103, 780]], + 488: [[75, 780]], + 489: [[107, 780]], + 490: [[79, 808], , { 772: 492 }], + 491: [[111, 808], , { 772: 493 }], + 492: [[490, 772]], + 493: [[491, 772]], + 494: [[439, 780]], + 495: [[658, 780]], + 496: [[106, 780]], + 497: [[68, 90], 256], + 498: [[68, 122], 256], + 499: [[100, 122], 256], + 500: [[71, 769]], + 501: [[103, 769]], + 504: [[78, 768]], + 505: [[110, 768]], + 506: [[197, 769]], + 507: [[229, 769]], + 508: [[198, 769]], + 509: [[230, 769]], + 510: [[216, 769]], + 511: [[248, 769]], + 66045: [, 220] + }, + 512: { + 512: [[65, 783]], + 513: [[97, 783]], + 514: [[65, 785]], + 515: [[97, 785]], + 516: [[69, 783]], + 517: [[101, 783]], + 518: [[69, 785]], + 519: [[101, 785]], + 520: [[73, 783]], + 521: [[105, 783]], + 522: [[73, 785]], + 523: [[105, 785]], + 524: [[79, 783]], + 525: [[111, 783]], + 526: [[79, 785]], + 527: [[111, 785]], + 528: [[82, 783]], + 529: [[114, 783]], + 530: [[82, 785]], + 531: [[114, 785]], + 532: [[85, 783]], + 533: [[117, 783]], + 534: [[85, 785]], + 535: [[117, 785]], + 536: [[83, 806]], + 537: [[115, 806]], + 538: [[84, 806]], + 539: [[116, 806]], + 542: [[72, 780]], + 543: [[104, 780]], + 550: [[65, 775], , { 772: 480 }], + 551: [[97, 775], , { 772: 481 }], + 552: [[69, 807], , { 774: 7708 }], + 553: [[101, 807], , { 774: 7709 }], + 554: [[214, 772]], + 555: [[246, 772]], + 556: [[213, 772]], + 557: [[245, 772]], + 558: [[79, 775], , { 772: 560 }], + 559: [[111, 775], , { 772: 561 }], + 560: [[558, 772]], + 561: [[559, 772]], + 562: [[89, 772]], + 563: [[121, 772]], + 658: [, , { 780: 495 }], + 688: [[104], 256], + 689: [[614], 256], + 690: [[106], 256], + 691: [[114], 256], + 692: [[633], 256], + 693: [[635], 256], + 694: [[641], 256], + 695: [[119], 256], + 696: [[121], 256], + 728: [[32, 774], 256], + 729: [[32, 775], 256], + 730: [[32, 778], 256], + 731: [[32, 808], 256], + 732: [[32, 771], 256], + 733: [[32, 779], 256], + 736: [[611], 256], + 737: [[108], 256], + 738: [[115], 256], + 739: [[120], 256], + 740: [[661], 256] + }, + 768: { + 768: [, 230], + 769: [, 230], + 770: [, 230], + 771: [, 230], + 772: [, 230], + 773: [, 230], + 774: [, 230], + 775: [, 230], + 776: [, 230, { 769: 836 }], + 777: [, 230], + 778: [, 230], + 779: [, 230], + 780: [, 230], + 781: [, 230], + 782: [, 230], + 783: [, 230], + 784: [, 230], + 785: [, 230], + 786: [, 230], + 787: [, 230], + 788: [, 230], + 789: [, 232], + 790: [, 220], + 791: [, 220], + 792: [, 220], + 793: [, 220], + 794: [, 232], + 795: [, 216], + 796: [, 220], + 797: [, 220], + 798: [, 220], + 799: [, 220], + 800: [, 220], + 801: [, 202], + 802: [, 202], + 803: [, 220], + 804: [, 220], + 805: [, 220], + 806: [, 220], + 807: [, 202], + 808: [, 202], + 809: [, 220], + 810: [, 220], + 811: [, 220], + 812: [, 220], + 813: [, 220], + 814: [, 220], + 815: [, 220], + 816: [, 220], + 817: [, 220], + 818: [, 220], + 819: [, 220], + 820: [, 1], + 821: [, 1], + 822: [, 1], + 823: [, 1], + 824: [, 1], + 825: [, 220], + 826: [, 220], + 827: [, 220], + 828: [, 220], + 829: [, 230], + 830: [, 230], + 831: [, 230], + 832: [[768], 230], + 833: [[769], 230], + 834: [, 230], + 835: [[787], 230], + 836: [[776, 769], 230], + 837: [, 240], + 838: [, 230], + 839: [, 220], + 840: [, 220], + 841: [, 220], + 842: [, 230], + 843: [, 230], + 844: [, 230], + 845: [, 220], + 846: [, 220], + 848: [, 230], + 849: [, 230], + 850: [, 230], + 851: [, 220], + 852: [, 220], + 853: [, 220], + 854: [, 220], + 855: [, 230], + 856: [, 232], + 857: [, 220], + 858: [, 220], + 859: [, 230], + 860: [, 233], + 861: [, 234], + 862: [, 234], + 863: [, 233], + 864: [, 234], + 865: [, 234], + 866: [, 233], + 867: [, 230], + 868: [, 230], + 869: [, 230], + 870: [, 230], + 871: [, 230], + 872: [, 230], + 873: [, 230], + 874: [, 230], + 875: [, 230], + 876: [, 230], + 877: [, 230], + 878: [, 230], + 879: [, 230], + 884: [[697]], + 890: [[32, 837], 256], + 894: [[59]], + 900: [[32, 769], 256], + 901: [[168, 769]], + 902: [[913, 769]], + 903: [[183]], + 904: [[917, 769]], + 905: [[919, 769]], + 906: [[921, 769]], + 908: [[927, 769]], + 910: [[933, 769]], + 911: [[937, 769]], + 912: [[970, 769]], + 913: [, , { 768: 8122, 769: 902, 772: 8121, 774: 8120, 787: 7944, 788: 7945, 837: 8124 }], + 917: [, , { 768: 8136, 769: 904, 787: 7960, 788: 7961 }], + 919: [, , { 768: 8138, 769: 905, 787: 7976, 788: 7977, 837: 8140 }], + 921: [, , { 768: 8154, 769: 906, 772: 8153, 774: 8152, 776: 938, 787: 7992, 788: 7993 }], + 927: [, , { 768: 8184, 769: 908, 787: 8008, 788: 8009 }], + 929: [, , { 788: 8172 }], + 933: [, , { 768: 8170, 769: 910, 772: 8169, 774: 8168, 776: 939, 788: 8025 }], + 937: [, , { 768: 8186, 769: 911, 787: 8040, 788: 8041, 837: 8188 }], + 938: [[921, 776]], + 939: [[933, 776]], + 940: [[945, 769], , { 837: 8116 }], + 941: [[949, 769]], + 942: [[951, 769], , { 837: 8132 }], + 943: [[953, 769]], + 944: [[971, 769]], + 945: [ + , , + { + 768: 8048, + 769: 940, + 772: 8113, + 774: 8112, + 787: 7936, + 788: 7937, + 834: 8118, + 837: 8115 + } + ], + 949: [, , { 768: 8050, 769: 941, 787: 7952, 788: 7953 }], + 951: [, , { 768: 8052, 769: 942, 787: 7968, 788: 7969, 834: 8134, 837: 8131 }], + 953: [ + , , + { 768: 8054, 769: 943, 772: 8145, 774: 8144, 776: 970, 787: 7984, 788: 7985, 834: 8150 } + ], + 959: [, , { 768: 8056, 769: 972, 787: 8000, 788: 8001 }], + 961: [, , { 787: 8164, 788: 8165 }], + 965: [ + , , + { 768: 8058, 769: 973, 772: 8161, 774: 8160, 776: 971, 787: 8016, 788: 8017, 834: 8166 } + ], + 969: [, , { 768: 8060, 769: 974, 787: 8032, 788: 8033, 834: 8182, 837: 8179 }], + 970: [[953, 776], , { 768: 8146, 769: 912, 834: 8151 }], + 971: [[965, 776], , { 768: 8162, 769: 944, 834: 8167 }], + 972: [[959, 769]], + 973: [[965, 769]], + 974: [[969, 769], , { 837: 8180 }], + 976: [[946], 256], + 977: [[952], 256], + 978: [[933], 256, { 769: 979, 776: 980 }], + 979: [[978, 769]], + 980: [[978, 776]], + 981: [[966], 256], + 982: [[960], 256], + 1008: [[954], 256], + 1009: [[961], 256], + 1010: [[962], 256], + 1012: [[920], 256], + 1013: [[949], 256], + 1017: [[931], 256] + }, + 1024: { + 1024: [[1045, 768]], + 1025: [[1045, 776]], + 1027: [[1043, 769]], + 1030: [, , { 776: 1031 }], + 1031: [[1030, 776]], + 1036: [[1050, 769]], + 1037: [[1048, 768]], + 1038: [[1059, 774]], + 1040: [, , { 774: 1232, 776: 1234 }], + 1043: [, , { 769: 1027 }], + 1045: [, , { 768: 1024, 774: 1238, 776: 1025 }], + 1046: [, , { 774: 1217, 776: 1244 }], + 1047: [, , { 776: 1246 }], + 1048: [, , { 768: 1037, 772: 1250, 774: 1049, 776: 1252 }], + 1049: [[1048, 774]], + 1050: [, , { 769: 1036 }], + 1054: [, , { 776: 1254 }], + 1059: [, , { 772: 1262, 774: 1038, 776: 1264, 779: 1266 }], + 1063: [, , { 776: 1268 }], + 1067: [, , { 776: 1272 }], + 1069: [, , { 776: 1260 }], + 1072: [, , { 774: 1233, 776: 1235 }], + 1075: [, , { 769: 1107 }], + 1077: [, , { 768: 1104, 774: 1239, 776: 1105 }], + 1078: [, , { 774: 1218, 776: 1245 }], + 1079: [, , { 776: 1247 }], + 1080: [, , { 768: 1117, 772: 1251, 774: 1081, 776: 1253 }], + 1081: [[1080, 774]], + 1082: [, , { 769: 1116 }], + 1086: [, , { 776: 1255 }], + 1091: [, , { 772: 1263, 774: 1118, 776: 1265, 779: 1267 }], + 1095: [, , { 776: 1269 }], + 1099: [, , { 776: 1273 }], + 1101: [, , { 776: 1261 }], + 1104: [[1077, 768]], + 1105: [[1077, 776]], + 1107: [[1075, 769]], + 1110: [, , { 776: 1111 }], + 1111: [[1110, 776]], + 1116: [[1082, 769]], + 1117: [[1080, 768]], + 1118: [[1091, 774]], + 1140: [, , { 783: 1142 }], + 1141: [, , { 783: 1143 }], + 1142: [[1140, 783]], + 1143: [[1141, 783]], + 1155: [, 230], + 1156: [, 230], + 1157: [, 230], + 1158: [, 230], + 1159: [, 230], + 1217: [[1046, 774]], + 1218: [[1078, 774]], + 1232: [[1040, 774]], + 1233: [[1072, 774]], + 1234: [[1040, 776]], + 1235: [[1072, 776]], + 1238: [[1045, 774]], + 1239: [[1077, 774]], + 1240: [, , { 776: 1242 }], + 1241: [, , { 776: 1243 }], + 1242: [[1240, 776]], + 1243: [[1241, 776]], + 1244: [[1046, 776]], + 1245: [[1078, 776]], + 1246: [[1047, 776]], + 1247: [[1079, 776]], + 1250: [[1048, 772]], + 1251: [[1080, 772]], + 1252: [[1048, 776]], + 1253: [[1080, 776]], + 1254: [[1054, 776]], + 1255: [[1086, 776]], + 1256: [, , { 776: 1258 }], + 1257: [, , { 776: 1259 }], + 1258: [[1256, 776]], + 1259: [[1257, 776]], + 1260: [[1069, 776]], + 1261: [[1101, 776]], + 1262: [[1059, 772]], + 1263: [[1091, 772]], + 1264: [[1059, 776]], + 1265: [[1091, 776]], + 1266: [[1059, 779]], + 1267: [[1091, 779]], + 1268: [[1063, 776]], + 1269: [[1095, 776]], + 1272: [[1067, 776]], + 1273: [[1099, 776]] + }, + 1280: { + 1415: [[1381, 1410], 256], + 1425: [, 220], + 1426: [, 230], + 1427: [, 230], + 1428: [, 230], + 1429: [, 230], + 1430: [, 220], + 1431: [, 230], + 1432: [, 230], + 1433: [, 230], + 1434: [, 222], + 1435: [, 220], + 1436: [, 230], + 1437: [, 230], + 1438: [, 230], + 1439: [, 230], + 1440: [, 230], + 1441: [, 230], + 1442: [, 220], + 1443: [, 220], + 1444: [, 220], + 1445: [, 220], + 1446: [, 220], + 1447: [, 220], + 1448: [, 230], + 1449: [, 230], + 1450: [, 220], + 1451: [, 230], + 1452: [, 230], + 1453: [, 222], + 1454: [, 228], + 1455: [, 230], + 1456: [, 10], + 1457: [, 11], + 1458: [, 12], + 1459: [, 13], + 1460: [, 14], + 1461: [, 15], + 1462: [, 16], + 1463: [, 17], + 1464: [, 18], + 1465: [, 19], + 1466: [, 19], + 1467: [, 20], + 1468: [, 21], + 1469: [, 22], + 1471: [, 23], + 1473: [, 24], + 1474: [, 25], + 1476: [, 230], + 1477: [, 220], + 1479: [, 18] + }, + 1536: { + 1552: [, 230], + 1553: [, 230], + 1554: [, 230], + 1555: [, 230], + 1556: [, 230], + 1557: [, 230], + 1558: [, 230], + 1559: [, 230], + 1560: [, 30], + 1561: [, 31], + 1562: [, 32], + 1570: [[1575, 1619]], + 1571: [[1575, 1620]], + 1572: [[1608, 1620]], + 1573: [[1575, 1621]], + 1574: [[1610, 1620]], + 1575: [, , { 1619: 1570, 1620: 1571, 1621: 1573 }], + 1608: [, , { 1620: 1572 }], + 1610: [, , { 1620: 1574 }], + 1611: [, 27], + 1612: [, 28], + 1613: [, 29], + 1614: [, 30], + 1615: [, 31], + 1616: [, 32], + 1617: [, 33], + 1618: [, 34], + 1619: [, 230], + 1620: [, 230], + 1621: [, 220], + 1622: [, 220], + 1623: [, 230], + 1624: [, 230], + 1625: [, 230], + 1626: [, 230], + 1627: [, 230], + 1628: [, 220], + 1629: [, 230], + 1630: [, 230], + 1631: [, 220], + 1648: [, 35], + 1653: [[1575, 1652], 256], + 1654: [[1608, 1652], 256], + 1655: [[1735, 1652], 256], + 1656: [[1610, 1652], 256], + 1728: [[1749, 1620]], + 1729: [, , { 1620: 1730 }], + 1730: [[1729, 1620]], + 1746: [, , { 1620: 1747 }], + 1747: [[1746, 1620]], + 1749: [, , { 1620: 1728 }], + 1750: [, 230], + 1751: [, 230], + 1752: [, 230], + 1753: [, 230], + 1754: [, 230], + 1755: [, 230], + 1756: [, 230], + 1759: [, 230], + 1760: [, 230], + 1761: [, 230], + 1762: [, 230], + 1763: [, 220], + 1764: [, 230], + 1767: [, 230], + 1768: [, 230], + 1770: [, 220], + 1771: [, 230], + 1772: [, 230], + 1773: [, 220] + }, + 1792: { + 1809: [, 36], + 1840: [, 230], + 1841: [, 220], + 1842: [, 230], + 1843: [, 230], + 1844: [, 220], + 1845: [, 230], + 1846: [, 230], + 1847: [, 220], + 1848: [, 220], + 1849: [, 220], + 1850: [, 230], + 1851: [, 220], + 1852: [, 220], + 1853: [, 230], + 1854: [, 220], + 1855: [, 230], + 1856: [, 230], + 1857: [, 230], + 1858: [, 220], + 1859: [, 230], + 1860: [, 220], + 1861: [, 230], + 1862: [, 220], + 1863: [, 230], + 1864: [, 220], + 1865: [, 230], + 1866: [, 230], + 2027: [, 230], + 2028: [, 230], + 2029: [, 230], + 2030: [, 230], + 2031: [, 230], + 2032: [, 230], + 2033: [, 230], + 2034: [, 220], + 2035: [, 230] + }, + 2048: { + 2070: [, 230], + 2071: [, 230], + 2072: [, 230], + 2073: [, 230], + 2075: [, 230], + 2076: [, 230], + 2077: [, 230], + 2078: [, 230], + 2079: [, 230], + 2080: [, 230], + 2081: [, 230], + 2082: [, 230], + 2083: [, 230], + 2085: [, 230], + 2086: [, 230], + 2087: [, 230], + 2089: [, 230], + 2090: [, 230], + 2091: [, 230], + 2092: [, 230], + 2093: [, 230], + 2137: [, 220], + 2138: [, 220], + 2139: [, 220], + 2276: [, 230], + 2277: [, 230], + 2278: [, 220], + 2279: [, 230], + 2280: [, 230], + 2281: [, 220], + 2282: [, 230], + 2283: [, 230], + 2284: [, 230], + 2285: [, 220], + 2286: [, 220], + 2287: [, 220], + 2288: [, 27], + 2289: [, 28], + 2290: [, 29], + 2291: [, 230], + 2292: [, 230], + 2293: [, 230], + 2294: [, 220], + 2295: [, 230], + 2296: [, 230], + 2297: [, 220], + 2298: [, 220], + 2299: [, 230], + 2300: [, 230], + 2301: [, 230], + 2302: [, 230] + }, + 2304: { + 2344: [, , { 2364: 2345 }], + 2345: [[2344, 2364]], + 2352: [, , { 2364: 2353 }], + 2353: [[2352, 2364]], + 2355: [, , { 2364: 2356 }], + 2356: [[2355, 2364]], + 2364: [, 7], + 2381: [, 9], + 2385: [, 230], + 2386: [, 220], + 2387: [, 230], + 2388: [, 230], + 2392: [[2325, 2364], 512], + 2393: [[2326, 2364], 512], + 2394: [[2327, 2364], 512], + 2395: [[2332, 2364], 512], + 2396: [[2337, 2364], 512], + 2397: [[2338, 2364], 512], + 2398: [[2347, 2364], 512], + 2399: [[2351, 2364], 512], + 2492: [, 7], + 2503: [, , { 2494: 2507, 2519: 2508 }], + 2507: [[2503, 2494]], + 2508: [[2503, 2519]], + 2509: [, 9], + 2524: [[2465, 2492], 512], + 2525: [[2466, 2492], 512], + 2527: [[2479, 2492], 512] + }, + 2560: { + 2611: [[2610, 2620], 512], + 2614: [[2616, 2620], 512], + 2620: [, 7], + 2637: [, 9], + 2649: [[2582, 2620], 512], + 2650: [[2583, 2620], 512], + 2651: [[2588, 2620], 512], + 2654: [[2603, 2620], 512], + 2748: [, 7], + 2765: [, 9], + 68109: [, 220], + 68111: [, 230], + 68152: [, 230], + 68153: [, 1], + 68154: [, 220], + 68159: [, 9] + }, + 2816: { + 2876: [, 7], + 2887: [, , { 2878: 2891, 2902: 2888, 2903: 2892 }], + 2888: [[2887, 2902]], + 2891: [[2887, 2878]], + 2892: [[2887, 2903]], + 2893: [, 9], + 2908: [[2849, 2876], 512], + 2909: [[2850, 2876], 512], + 2962: [, , { 3031: 2964 }], + 2964: [[2962, 3031]], + 3014: [, , { 3006: 3018, 3031: 3020 }], + 3015: [, , { 3006: 3019 }], + 3018: [[3014, 3006]], + 3019: [[3015, 3006]], + 3020: [[3014, 3031]], + 3021: [, 9] + }, + 3072: { + 3142: [, , { 3158: 3144 }], + 3144: [[3142, 3158]], + 3149: [, 9], + 3157: [, 84], + 3158: [, 91], + 3260: [, 7], + 3263: [, , { 3285: 3264 }], + 3264: [[3263, 3285]], + 3270: [, , { 3266: 3274, 3285: 3271, 3286: 3272 }], + 3271: [[3270, 3285]], + 3272: [[3270, 3286]], + 3274: [[3270, 3266], , { 3285: 3275 }], + 3275: [[3274, 3285]], + 3277: [, 9] + }, + 3328: { + 3398: [, , { 3390: 3402, 3415: 3404 }], + 3399: [, , { 3390: 3403 }], + 3402: [[3398, 3390]], + 3403: [[3399, 3390]], + 3404: [[3398, 3415]], + 3405: [, 9], + 3530: [, 9], + 3545: [, , { 3530: 3546, 3535: 3548, 3551: 3550 }], + 3546: [[3545, 3530]], + 3548: [[3545, 3535], , { 3530: 3549 }], + 3549: [[3548, 3530]], + 3550: [[3545, 3551]] + }, + 3584: { + 3635: [[3661, 3634], 256], + 3640: [, 103], + 3641: [, 103], + 3642: [, 9], + 3656: [, 107], + 3657: [, 107], + 3658: [, 107], + 3659: [, 107], + 3763: [[3789, 3762], 256], + 3768: [, 118], + 3769: [, 118], + 3784: [, 122], + 3785: [, 122], + 3786: [, 122], + 3787: [, 122], + 3804: [[3755, 3737], 256], + 3805: [[3755, 3745], 256] + }, + 3840: { + 3852: [[3851], 256], + 3864: [, 220], + 3865: [, 220], + 3893: [, 220], + 3895: [, 220], + 3897: [, 216], + 3907: [[3906, 4023], 512], + 3917: [[3916, 4023], 512], + 3922: [[3921, 4023], 512], + 3927: [[3926, 4023], 512], + 3932: [[3931, 4023], 512], + 3945: [[3904, 4021], 512], + 3953: [, 129], + 3954: [, 130], + 3955: [[3953, 3954], 512], + 3956: [, 132], + 3957: [[3953, 3956], 512], + 3958: [[4018, 3968], 512], + 3959: [[4018, 3969], 256], + 3960: [[4019, 3968], 512], + 3961: [[4019, 3969], 256], + 3962: [, 130], + 3963: [, 130], + 3964: [, 130], + 3965: [, 130], + 3968: [, 130], + 3969: [[3953, 3968], 512], + 3970: [, 230], + 3971: [, 230], + 3972: [, 9], + 3974: [, 230], + 3975: [, 230], + 3987: [[3986, 4023], 512], + 3997: [[3996, 4023], 512], + 4002: [[4001, 4023], 512], + 4007: [[4006, 4023], 512], + 4012: [[4011, 4023], 512], + 4025: [[3984, 4021], 512], + 4038: [, 220] + }, + 4096: { + 4133: [, , { 4142: 4134 }], + 4134: [[4133, 4142]], + 4151: [, 7], + 4153: [, 9], + 4154: [, 9], + 4237: [, 220], + 4348: [[4316], 256], + 69702: [, 9], + 69785: [, , { 69818: 69786 }], + 69786: [[69785, 69818]], + 69787: [, , { 69818: 69788 }], + 69788: [[69787, 69818]], + 69797: [, , { 69818: 69803 }], + 69803: [[69797, 69818]], + 69817: [, 9], + 69818: [, 7] + }, + 4352: { + 69888: [, 230], + 69889: [, 230], + 69890: [, 230], + 69934: [[69937, 69927]], + 69935: [[69938, 69927]], + 69937: [, , { 69927: 69934 }], + 69938: [, , { 69927: 69935 }], + 69939: [, 9], + 69940: [, 9], + 70080: [, 9] + }, + 4864: { 4957: [, 230], 4958: [, 230], 4959: [, 230] }, + 5632: { 71350: [, 9], 71351: [, 7] }, + 5888: { 5908: [, 9], 5940: [, 9], 6098: [, 9], 6109: [, 230] }, + 6144: { 6313: [, 228] }, + 6400: { 6457: [, 222], 6458: [, 230], 6459: [, 220] }, + 6656: { + 6679: [, 230], + 6680: [, 220], + 6752: [, 9], + 6773: [, 230], + 6774: [, 230], + 6775: [, 230], + 6776: [, 230], + 6777: [, 230], + 6778: [, 230], + 6779: [, 230], + 6780: [, 230], + 6783: [, 220] + }, + 6912: { + 6917: [, , { 6965: 6918 }], + 6918: [[6917, 6965]], + 6919: [, , { 6965: 6920 }], + 6920: [[6919, 6965]], + 6921: [, , { 6965: 6922 }], + 6922: [[6921, 6965]], + 6923: [, , { 6965: 6924 }], + 6924: [[6923, 6965]], + 6925: [, , { 6965: 6926 }], + 6926: [[6925, 6965]], + 6929: [, , { 6965: 6930 }], + 6930: [[6929, 6965]], + 6964: [, 7], + 6970: [, , { 6965: 6971 }], + 6971: [[6970, 6965]], + 6972: [, , { 6965: 6973 }], + 6973: [[6972, 6965]], + 6974: [, , { 6965: 6976 }], + 6975: [, , { 6965: 6977 }], + 6976: [[6974, 6965]], + 6977: [[6975, 6965]], + 6978: [, , { 6965: 6979 }], + 6979: [[6978, 6965]], + 6980: [, 9], + 7019: [, 230], + 7020: [, 220], + 7021: [, 230], + 7022: [, 230], + 7023: [, 230], + 7024: [, 230], + 7025: [, 230], + 7026: [, 230], + 7027: [, 230], + 7082: [, 9], + 7083: [, 9], + 7142: [, 7], + 7154: [, 9], + 7155: [, 9] + }, + 7168: { + 7223: [, 7], + 7376: [, 230], + 7377: [, 230], + 7378: [, 230], + 7380: [, 1], + 7381: [, 220], + 7382: [, 220], + 7383: [, 220], + 7384: [, 220], + 7385: [, 220], + 7386: [, 230], + 7387: [, 230], + 7388: [, 220], + 7389: [, 220], + 7390: [, 220], + 7391: [, 220], + 7392: [, 230], + 7394: [, 1], + 7395: [, 1], + 7396: [, 1], + 7397: [, 1], + 7398: [, 1], + 7399: [, 1], + 7400: [, 1], + 7405: [, 220], + 7412: [, 230] + }, + 7424: { + 7468: [[65], 256], + 7469: [[198], 256], + 7470: [[66], 256], + 7472: [[68], 256], + 7473: [[69], 256], + 7474: [[398], 256], + 7475: [[71], 256], + 7476: [[72], 256], + 7477: [[73], 256], + 7478: [[74], 256], + 7479: [[75], 256], + 7480: [[76], 256], + 7481: [[77], 256], + 7482: [[78], 256], + 7484: [[79], 256], + 7485: [[546], 256], + 7486: [[80], 256], + 7487: [[82], 256], + 7488: [[84], 256], + 7489: [[85], 256], + 7490: [[87], 256], + 7491: [[97], 256], + 7492: [[592], 256], + 7493: [[593], 256], + 7494: [[7426], 256], + 7495: [[98], 256], + 7496: [[100], 256], + 7497: [[101], 256], + 7498: [[601], 256], + 7499: [[603], 256], + 7500: [[604], 256], + 7501: [[103], 256], + 7503: [[107], 256], + 7504: [[109], 256], + 7505: [[331], 256], + 7506: [[111], 256], + 7507: [[596], 256], + 7508: [[7446], 256], + 7509: [[7447], 256], + 7510: [[112], 256], + 7511: [[116], 256], + 7512: [[117], 256], + 7513: [[7453], 256], + 7514: [[623], 256], + 7515: [[118], 256], + 7516: [[7461], 256], + 7517: [[946], 256], + 7518: [[947], 256], + 7519: [[948], 256], + 7520: [[966], 256], + 7521: [[967], 256], + 7522: [[105], 256], + 7523: [[114], 256], + 7524: [[117], 256], + 7525: [[118], 256], + 7526: [[946], 256], + 7527: [[947], 256], + 7528: [[961], 256], + 7529: [[966], 256], + 7530: [[967], 256], + 7544: [[1085], 256], + 7579: [[594], 256], + 7580: [[99], 256], + 7581: [[597], 256], + 7582: [[240], 256], + 7583: [[604], 256], + 7584: [[102], 256], + 7585: [[607], 256], + 7586: [[609], 256], + 7587: [[613], 256], + 7588: [[616], 256], + 7589: [[617], 256], + 7590: [[618], 256], + 7591: [[7547], 256], + 7592: [[669], 256], + 7593: [[621], 256], + 7594: [[7557], 256], + 7595: [[671], 256], + 7596: [[625], 256], + 7597: [[624], 256], + 7598: [[626], 256], + 7599: [[627], 256], + 7600: [[628], 256], + 7601: [[629], 256], + 7602: [[632], 256], + 7603: [[642], 256], + 7604: [[643], 256], + 7605: [[427], 256], + 7606: [[649], 256], + 7607: [[650], 256], + 7608: [[7452], 256], + 7609: [[651], 256], + 7610: [[652], 256], + 7611: [[122], 256], + 7612: [[656], 256], + 7613: [[657], 256], + 7614: [[658], 256], + 7615: [[952], 256], + 7616: [, 230], + 7617: [, 230], + 7618: [, 220], + 7619: [, 230], + 7620: [, 230], + 7621: [, 230], + 7622: [, 230], + 7623: [, 230], + 7624: [, 230], + 7625: [, 230], + 7626: [, 220], + 7627: [, 230], + 7628: [, 230], + 7629: [, 234], + 7630: [, 214], + 7631: [, 220], + 7632: [, 202], + 7633: [, 230], + 7634: [, 230], + 7635: [, 230], + 7636: [, 230], + 7637: [, 230], + 7638: [, 230], + 7639: [, 230], + 7640: [, 230], + 7641: [, 230], + 7642: [, 230], + 7643: [, 230], + 7644: [, 230], + 7645: [, 230], + 7646: [, 230], + 7647: [, 230], + 7648: [, 230], + 7649: [, 230], + 7650: [, 230], + 7651: [, 230], + 7652: [, 230], + 7653: [, 230], + 7654: [, 230], + 7676: [, 233], + 7677: [, 220], + 7678: [, 230], + 7679: [, 220] + }, + 7680: { + 7680: [[65, 805]], + 7681: [[97, 805]], + 7682: [[66, 775]], + 7683: [[98, 775]], + 7684: [[66, 803]], + 7685: [[98, 803]], + 7686: [[66, 817]], + 7687: [[98, 817]], + 7688: [[199, 769]], + 7689: [[231, 769]], + 7690: [[68, 775]], + 7691: [[100, 775]], + 7692: [[68, 803]], + 7693: [[100, 803]], + 7694: [[68, 817]], + 7695: [[100, 817]], + 7696: [[68, 807]], + 7697: [[100, 807]], + 7698: [[68, 813]], + 7699: [[100, 813]], + 7700: [[274, 768]], + 7701: [[275, 768]], + 7702: [[274, 769]], + 7703: [[275, 769]], + 7704: [[69, 813]], + 7705: [[101, 813]], + 7706: [[69, 816]], + 7707: [[101, 816]], + 7708: [[552, 774]], + 7709: [[553, 774]], + 7710: [[70, 775]], + 7711: [[102, 775]], + 7712: [[71, 772]], + 7713: [[103, 772]], + 7714: [[72, 775]], + 7715: [[104, 775]], + 7716: [[72, 803]], + 7717: [[104, 803]], + 7718: [[72, 776]], + 7719: [[104, 776]], + 7720: [[72, 807]], + 7721: [[104, 807]], + 7722: [[72, 814]], + 7723: [[104, 814]], + 7724: [[73, 816]], + 7725: [[105, 816]], + 7726: [[207, 769]], + 7727: [[239, 769]], + 7728: [[75, 769]], + 7729: [[107, 769]], + 7730: [[75, 803]], + 7731: [[107, 803]], + 7732: [[75, 817]], + 7733: [[107, 817]], + 7734: [[76, 803], , { 772: 7736 }], + 7735: [[108, 803], , { 772: 7737 }], + 7736: [[7734, 772]], + 7737: [[7735, 772]], + 7738: [[76, 817]], + 7739: [[108, 817]], + 7740: [[76, 813]], + 7741: [[108, 813]], + 7742: [[77, 769]], + 7743: [[109, 769]], + 7744: [[77, 775]], + 7745: [[109, 775]], + 7746: [[77, 803]], + 7747: [[109, 803]], + 7748: [[78, 775]], + 7749: [[110, 775]], + 7750: [[78, 803]], + 7751: [[110, 803]], + 7752: [[78, 817]], + 7753: [[110, 817]], + 7754: [[78, 813]], + 7755: [[110, 813]], + 7756: [[213, 769]], + 7757: [[245, 769]], + 7758: [[213, 776]], + 7759: [[245, 776]], + 7760: [[332, 768]], + 7761: [[333, 768]], + 7762: [[332, 769]], + 7763: [[333, 769]], + 7764: [[80, 769]], + 7765: [[112, 769]], + 7766: [[80, 775]], + 7767: [[112, 775]], + 7768: [[82, 775]], + 7769: [[114, 775]], + 7770: [[82, 803], , { 772: 7772 }], + 7771: [[114, 803], , { 772: 7773 }], + 7772: [[7770, 772]], + 7773: [[7771, 772]], + 7774: [[82, 817]], + 7775: [[114, 817]], + 7776: [[83, 775]], + 7777: [[115, 775]], + 7778: [[83, 803], , { 775: 7784 }], + 7779: [[115, 803], , { 775: 7785 }], + 7780: [[346, 775]], + 7781: [[347, 775]], + 7782: [[352, 775]], + 7783: [[353, 775]], + 7784: [[7778, 775]], + 7785: [[7779, 775]], + 7786: [[84, 775]], + 7787: [[116, 775]], + 7788: [[84, 803]], + 7789: [[116, 803]], + 7790: [[84, 817]], + 7791: [[116, 817]], + 7792: [[84, 813]], + 7793: [[116, 813]], + 7794: [[85, 804]], + 7795: [[117, 804]], + 7796: [[85, 816]], + 7797: [[117, 816]], + 7798: [[85, 813]], + 7799: [[117, 813]], + 7800: [[360, 769]], + 7801: [[361, 769]], + 7802: [[362, 776]], + 7803: [[363, 776]], + 7804: [[86, 771]], + 7805: [[118, 771]], + 7806: [[86, 803]], + 7807: [[118, 803]], + 7808: [[87, 768]], + 7809: [[119, 768]], + 7810: [[87, 769]], + 7811: [[119, 769]], + 7812: [[87, 776]], + 7813: [[119, 776]], + 7814: [[87, 775]], + 7815: [[119, 775]], + 7816: [[87, 803]], + 7817: [[119, 803]], + 7818: [[88, 775]], + 7819: [[120, 775]], + 7820: [[88, 776]], + 7821: [[120, 776]], + 7822: [[89, 775]], + 7823: [[121, 775]], + 7824: [[90, 770]], + 7825: [[122, 770]], + 7826: [[90, 803]], + 7827: [[122, 803]], + 7828: [[90, 817]], + 7829: [[122, 817]], + 7830: [[104, 817]], + 7831: [[116, 776]], + 7832: [[119, 778]], + 7833: [[121, 778]], + 7834: [[97, 702], 256], + 7835: [[383, 775]], + 7840: [[65, 803], , { 770: 7852, 774: 7862 }], + 7841: [[97, 803], , { 770: 7853, 774: 7863 }], + 7842: [[65, 777]], + 7843: [[97, 777]], + 7844: [[194, 769]], + 7845: [[226, 769]], + 7846: [[194, 768]], + 7847: [[226, 768]], + 7848: [[194, 777]], + 7849: [[226, 777]], + 7850: [[194, 771]], + 7851: [[226, 771]], + 7852: [[7840, 770]], + 7853: [[7841, 770]], + 7854: [[258, 769]], + 7855: [[259, 769]], + 7856: [[258, 768]], + 7857: [[259, 768]], + 7858: [[258, 777]], + 7859: [[259, 777]], + 7860: [[258, 771]], + 7861: [[259, 771]], + 7862: [[7840, 774]], + 7863: [[7841, 774]], + 7864: [[69, 803], , { 770: 7878 }], + 7865: [[101, 803], , { 770: 7879 }], + 7866: [[69, 777]], + 7867: [[101, 777]], + 7868: [[69, 771]], + 7869: [[101, 771]], + 7870: [[202, 769]], + 7871: [[234, 769]], + 7872: [[202, 768]], + 7873: [[234, 768]], + 7874: [[202, 777]], + 7875: [[234, 777]], + 7876: [[202, 771]], + 7877: [[234, 771]], + 7878: [[7864, 770]], + 7879: [[7865, 770]], + 7880: [[73, 777]], + 7881: [[105, 777]], + 7882: [[73, 803]], + 7883: [[105, 803]], + 7884: [[79, 803], , { 770: 7896 }], + 7885: [[111, 803], , { 770: 7897 }], + 7886: [[79, 777]], + 7887: [[111, 777]], + 7888: [[212, 769]], + 7889: [[244, 769]], + 7890: [[212, 768]], + 7891: [[244, 768]], + 7892: [[212, 777]], + 7893: [[244, 777]], + 7894: [[212, 771]], + 7895: [[244, 771]], + 7896: [[7884, 770]], + 7897: [[7885, 770]], + 7898: [[416, 769]], + 7899: [[417, 769]], + 7900: [[416, 768]], + 7901: [[417, 768]], + 7902: [[416, 777]], + 7903: [[417, 777]], + 7904: [[416, 771]], + 7905: [[417, 771]], + 7906: [[416, 803]], + 7907: [[417, 803]], + 7908: [[85, 803]], + 7909: [[117, 803]], + 7910: [[85, 777]], + 7911: [[117, 777]], + 7912: [[431, 769]], + 7913: [[432, 769]], + 7914: [[431, 768]], + 7915: [[432, 768]], + 7916: [[431, 777]], + 7917: [[432, 777]], + 7918: [[431, 771]], + 7919: [[432, 771]], + 7920: [[431, 803]], + 7921: [[432, 803]], + 7922: [[89, 768]], + 7923: [[121, 768]], + 7924: [[89, 803]], + 7925: [[121, 803]], + 7926: [[89, 777]], + 7927: [[121, 777]], + 7928: [[89, 771]], + 7929: [[121, 771]] + }, + 7936: { + 7936: [[945, 787], , { 768: 7938, 769: 7940, 834: 7942, 837: 8064 }], + 7937: [[945, 788], , { 768: 7939, 769: 7941, 834: 7943, 837: 8065 }], + 7938: [[7936, 768], , { 837: 8066 }], + 7939: [[7937, 768], , { 837: 8067 }], + 7940: [[7936, 769], , { 837: 8068 }], + 7941: [[7937, 769], , { 837: 8069 }], + 7942: [[7936, 834], , { 837: 8070 }], + 7943: [[7937, 834], , { 837: 8071 }], + 7944: [[913, 787], , { 768: 7946, 769: 7948, 834: 7950, 837: 8072 }], + 7945: [[913, 788], , { 768: 7947, 769: 7949, 834: 7951, 837: 8073 }], + 7946: [[7944, 768], , { 837: 8074 }], + 7947: [[7945, 768], , { 837: 8075 }], + 7948: [[7944, 769], , { 837: 8076 }], + 7949: [[7945, 769], , { 837: 8077 }], + 7950: [[7944, 834], , { 837: 8078 }], + 7951: [[7945, 834], , { 837: 8079 }], + 7952: [[949, 787], , { 768: 7954, 769: 7956 }], + 7953: [[949, 788], , { 768: 7955, 769: 7957 }], + 7954: [[7952, 768]], + 7955: [[7953, 768]], + 7956: [[7952, 769]], + 7957: [[7953, 769]], + 7960: [[917, 787], , { 768: 7962, 769: 7964 }], + 7961: [[917, 788], , { 768: 7963, 769: 7965 }], + 7962: [[7960, 768]], + 7963: [[7961, 768]], + 7964: [[7960, 769]], + 7965: [[7961, 769]], + 7968: [[951, 787], , { 768: 7970, 769: 7972, 834: 7974, 837: 8080 }], + 7969: [[951, 788], , { 768: 7971, 769: 7973, 834: 7975, 837: 8081 }], + 7970: [[7968, 768], , { 837: 8082 }], + 7971: [[7969, 768], , { 837: 8083 }], + 7972: [[7968, 769], , { 837: 8084 }], + 7973: [[7969, 769], , { 837: 8085 }], + 7974: [[7968, 834], , { 837: 8086 }], + 7975: [[7969, 834], , { 837: 8087 }], + 7976: [[919, 787], , { 768: 7978, 769: 7980, 834: 7982, 837: 8088 }], + 7977: [[919, 788], , { 768: 7979, 769: 7981, 834: 7983, 837: 8089 }], + 7978: [[7976, 768], , { 837: 8090 }], + 7979: [[7977, 768], , { 837: 8091 }], + 7980: [[7976, 769], , { 837: 8092 }], + 7981: [[7977, 769], , { 837: 8093 }], + 7982: [[7976, 834], , { 837: 8094 }], + 7983: [[7977, 834], , { 837: 8095 }], + 7984: [[953, 787], , { 768: 7986, 769: 7988, 834: 7990 }], + 7985: [[953, 788], , { 768: 7987, 769: 7989, 834: 7991 }], + 7986: [[7984, 768]], + 7987: [[7985, 768]], + 7988: [[7984, 769]], + 7989: [[7985, 769]], + 7990: [[7984, 834]], + 7991: [[7985, 834]], + 7992: [[921, 787], , { 768: 7994, 769: 7996, 834: 7998 }], + 7993: [[921, 788], , { 768: 7995, 769: 7997, 834: 7999 }], + 7994: [[7992, 768]], + 7995: [[7993, 768]], + 7996: [[7992, 769]], + 7997: [[7993, 769]], + 7998: [[7992, 834]], + 7999: [[7993, 834]], + 8000: [[959, 787], , { 768: 8002, 769: 8004 }], + 8001: [[959, 788], , { 768: 8003, 769: 8005 }], + 8002: [[8000, 768]], + 8003: [[8001, 768]], + 8004: [[8000, 769]], + 8005: [[8001, 769]], + 8008: [[927, 787], , { 768: 8010, 769: 8012 }], + 8009: [[927, 788], , { 768: 8011, 769: 8013 }], + 8010: [[8008, 768]], + 8011: [[8009, 768]], + 8012: [[8008, 769]], + 8013: [[8009, 769]], + 8016: [[965, 787], , { 768: 8018, 769: 8020, 834: 8022 }], + 8017: [[965, 788], , { 768: 8019, 769: 8021, 834: 8023 }], + 8018: [[8016, 768]], + 8019: [[8017, 768]], + 8020: [[8016, 769]], + 8021: [[8017, 769]], + 8022: [[8016, 834]], + 8023: [[8017, 834]], + 8025: [[933, 788], , { 768: 8027, 769: 8029, 834: 8031 }], + 8027: [[8025, 768]], + 8029: [[8025, 769]], + 8031: [[8025, 834]], + 8032: [[969, 787], , { 768: 8034, 769: 8036, 834: 8038, 837: 8096 }], + 8033: [[969, 788], , { 768: 8035, 769: 8037, 834: 8039, 837: 8097 }], + 8034: [[8032, 768], , { 837: 8098 }], + 8035: [[8033, 768], , { 837: 8099 }], + 8036: [[8032, 769], , { 837: 8100 }], + 8037: [[8033, 769], , { 837: 8101 }], + 8038: [[8032, 834], , { 837: 8102 }], + 8039: [[8033, 834], , { 837: 8103 }], + 8040: [[937, 787], , { 768: 8042, 769: 8044, 834: 8046, 837: 8104 }], + 8041: [[937, 788], , { 768: 8043, 769: 8045, 834: 8047, 837: 8105 }], + 8042: [[8040, 768], , { 837: 8106 }], + 8043: [[8041, 768], , { 837: 8107 }], + 8044: [[8040, 769], , { 837: 8108 }], + 8045: [[8041, 769], , { 837: 8109 }], + 8046: [[8040, 834], , { 837: 8110 }], + 8047: [[8041, 834], , { 837: 8111 }], + 8048: [[945, 768], , { 837: 8114 }], + 8049: [[940]], + 8050: [[949, 768]], + 8051: [[941]], + 8052: [[951, 768], , { 837: 8130 }], + 8053: [[942]], + 8054: [[953, 768]], + 8055: [[943]], + 8056: [[959, 768]], + 8057: [[972]], + 8058: [[965, 768]], + 8059: [[973]], + 8060: [[969, 768], , { 837: 8178 }], + 8061: [[974]], + 8064: [[7936, 837]], + 8065: [[7937, 837]], + 8066: [[7938, 837]], + 8067: [[7939, 837]], + 8068: [[7940, 837]], + 8069: [[7941, 837]], + 8070: [[7942, 837]], + 8071: [[7943, 837]], + 8072: [[7944, 837]], + 8073: [[7945, 837]], + 8074: [[7946, 837]], + 8075: [[7947, 837]], + 8076: [[7948, 837]], + 8077: [[7949, 837]], + 8078: [[7950, 837]], + 8079: [[7951, 837]], + 8080: [[7968, 837]], + 8081: [[7969, 837]], + 8082: [[7970, 837]], + 8083: [[7971, 837]], + 8084: [[7972, 837]], + 8085: [[7973, 837]], + 8086: [[7974, 837]], + 8087: [[7975, 837]], + 8088: [[7976, 837]], + 8089: [[7977, 837]], + 8090: [[7978, 837]], + 8091: [[7979, 837]], + 8092: [[7980, 837]], + 8093: [[7981, 837]], + 8094: [[7982, 837]], + 8095: [[7983, 837]], + 8096: [[8032, 837]], + 8097: [[8033, 837]], + 8098: [[8034, 837]], + 8099: [[8035, 837]], + 8100: [[8036, 837]], + 8101: [[8037, 837]], + 8102: [[8038, 837]], + 8103: [[8039, 837]], + 8104: [[8040, 837]], + 8105: [[8041, 837]], + 8106: [[8042, 837]], + 8107: [[8043, 837]], + 8108: [[8044, 837]], + 8109: [[8045, 837]], + 8110: [[8046, 837]], + 8111: [[8047, 837]], + 8112: [[945, 774]], + 8113: [[945, 772]], + 8114: [[8048, 837]], + 8115: [[945, 837]], + 8116: [[940, 837]], + 8118: [[945, 834], , { 837: 8119 }], + 8119: [[8118, 837]], + 8120: [[913, 774]], + 8121: [[913, 772]], + 8122: [[913, 768]], + 8123: [[902]], + 8124: [[913, 837]], + 8125: [[32, 787], 256], + 8126: [[953]], + 8127: [[32, 787], 256, { 768: 8141, 769: 8142, 834: 8143 }], + 8128: [[32, 834], 256], + 8129: [[168, 834]], + 8130: [[8052, 837]], + 8131: [[951, 837]], + 8132: [[942, 837]], + 8134: [[951, 834], , { 837: 8135 }], + 8135: [[8134, 837]], + 8136: [[917, 768]], + 8137: [[904]], + 8138: [[919, 768]], + 8139: [[905]], + 8140: [[919, 837]], + 8141: [[8127, 768]], + 8142: [[8127, 769]], + 8143: [[8127, 834]], + 8144: [[953, 774]], + 8145: [[953, 772]], + 8146: [[970, 768]], + 8147: [[912]], + 8150: [[953, 834]], + 8151: [[970, 834]], + 8152: [[921, 774]], + 8153: [[921, 772]], + 8154: [[921, 768]], + 8155: [[906]], + 8157: [[8190, 768]], + 8158: [[8190, 769]], + 8159: [[8190, 834]], + 8160: [[965, 774]], + 8161: [[965, 772]], + 8162: [[971, 768]], + 8163: [[944]], + 8164: [[961, 787]], + 8165: [[961, 788]], + 8166: [[965, 834]], + 8167: [[971, 834]], + 8168: [[933, 774]], + 8169: [[933, 772]], + 8170: [[933, 768]], + 8171: [[910]], + 8172: [[929, 788]], + 8173: [[168, 768]], + 8174: [[901]], + 8175: [[96]], + 8178: [[8060, 837]], + 8179: [[969, 837]], + 8180: [[974, 837]], + 8182: [[969, 834], , { 837: 8183 }], + 8183: [[8182, 837]], + 8184: [[927, 768]], + 8185: [[908]], + 8186: [[937, 768]], + 8187: [[911]], + 8188: [[937, 837]], + 8189: [[180]], + 8190: [[32, 788], 256, { 768: 8157, 769: 8158, 834: 8159 }] + }, + 8192: { + 8192: [[8194]], + 8193: [[8195]], + 8194: [[32], 256], + 8195: [[32], 256], + 8196: [[32], 256], + 8197: [[32], 256], + 8198: [[32], 256], + 8199: [[32], 256], + 8200: [[32], 256], + 8201: [[32], 256], + 8202: [[32], 256], + 8209: [[8208], 256], + 8215: [[32, 819], 256], + 8228: [[46], 256], + 8229: [[46, 46], 256], + 8230: [[46, 46, 46], 256], + 8239: [[32], 256], + 8243: [[8242, 8242], 256], + 8244: [[8242, 8242, 8242], 256], + 8246: [[8245, 8245], 256], + 8247: [[8245, 8245, 8245], 256], + 8252: [[33, 33], 256], + 8254: [[32, 773], 256], + 8263: [[63, 63], 256], + 8264: [[63, 33], 256], + 8265: [[33, 63], 256], + 8279: [[8242, 8242, 8242, 8242], 256], + 8287: [[32], 256], + 8304: [[48], 256], + 8305: [[105], 256], + 8308: [[52], 256], + 8309: [[53], 256], + 8310: [[54], 256], + 8311: [[55], 256], + 8312: [[56], 256], + 8313: [[57], 256], + 8314: [[43], 256], + 8315: [[8722], 256], + 8316: [[61], 256], + 8317: [[40], 256], + 8318: [[41], 256], + 8319: [[110], 256], + 8320: [[48], 256], + 8321: [[49], 256], + 8322: [[50], 256], + 8323: [[51], 256], + 8324: [[52], 256], + 8325: [[53], 256], + 8326: [[54], 256], + 8327: [[55], 256], + 8328: [[56], 256], + 8329: [[57], 256], + 8330: [[43], 256], + 8331: [[8722], 256], + 8332: [[61], 256], + 8333: [[40], 256], + 8334: [[41], 256], + 8336: [[97], 256], + 8337: [[101], 256], + 8338: [[111], 256], + 8339: [[120], 256], + 8340: [[601], 256], + 8341: [[104], 256], + 8342: [[107], 256], + 8343: [[108], 256], + 8344: [[109], 256], + 8345: [[110], 256], + 8346: [[112], 256], + 8347: [[115], 256], + 8348: [[116], 256], + 8360: [[82, 115], 256], + 8400: [, 230], + 8401: [, 230], + 8402: [, 1], + 8403: [, 1], + 8404: [, 230], + 8405: [, 230], + 8406: [, 230], + 8407: [, 230], + 8408: [, 1], + 8409: [, 1], + 8410: [, 1], + 8411: [, 230], + 8412: [, 230], + 8417: [, 230], + 8421: [, 1], + 8422: [, 1], + 8423: [, 230], + 8424: [, 220], + 8425: [, 230], + 8426: [, 1], + 8427: [, 1], + 8428: [, 220], + 8429: [, 220], + 8430: [, 220], + 8431: [, 220], + 8432: [, 230] + }, + 8448: { + 8448: [[97, 47, 99], 256], + 8449: [[97, 47, 115], 256], + 8450: [[67], 256], + 8451: [[176, 67], 256], + 8453: [[99, 47, 111], 256], + 8454: [[99, 47, 117], 256], + 8455: [[400], 256], + 8457: [[176, 70], 256], + 8458: [[103], 256], + 8459: [[72], 256], + 8460: [[72], 256], + 8461: [[72], 256], + 8462: [[104], 256], + 8463: [[295], 256], + 8464: [[73], 256], + 8465: [[73], 256], + 8466: [[76], 256], + 8467: [[108], 256], + 8469: [[78], 256], + 8470: [[78, 111], 256], + 8473: [[80], 256], + 8474: [[81], 256], + 8475: [[82], 256], + 8476: [[82], 256], + 8477: [[82], 256], + 8480: [[83, 77], 256], + 8481: [[84, 69, 76], 256], + 8482: [[84, 77], 256], + 8484: [[90], 256], + 8486: [[937]], + 8488: [[90], 256], + 8490: [[75]], + 8491: [[197]], + 8492: [[66], 256], + 8493: [[67], 256], + 8495: [[101], 256], + 8496: [[69], 256], + 8497: [[70], 256], + 8499: [[77], 256], + 8500: [[111], 256], + 8501: [[1488], 256], + 8502: [[1489], 256], + 8503: [[1490], 256], + 8504: [[1491], 256], + 8505: [[105], 256], + 8507: [[70, 65, 88], 256], + 8508: [[960], 256], + 8509: [[947], 256], + 8510: [[915], 256], + 8511: [[928], 256], + 8512: [[8721], 256], + 8517: [[68], 256], + 8518: [[100], 256], + 8519: [[101], 256], + 8520: [[105], 256], + 8521: [[106], 256], + 8528: [[49, 8260, 55], 256], + 8529: [[49, 8260, 57], 256], + 8530: [[49, 8260, 49, 48], 256], + 8531: [[49, 8260, 51], 256], + 8532: [[50, 8260, 51], 256], + 8533: [[49, 8260, 53], 256], + 8534: [[50, 8260, 53], 256], + 8535: [[51, 8260, 53], 256], + 8536: [[52, 8260, 53], 256], + 8537: [[49, 8260, 54], 256], + 8538: [[53, 8260, 54], 256], + 8539: [[49, 8260, 56], 256], + 8540: [[51, 8260, 56], 256], + 8541: [[53, 8260, 56], 256], + 8542: [[55, 8260, 56], 256], + 8543: [[49, 8260], 256], + 8544: [[73], 256], + 8545: [[73, 73], 256], + 8546: [[73, 73, 73], 256], + 8547: [[73, 86], 256], + 8548: [[86], 256], + 8549: [[86, 73], 256], + 8550: [[86, 73, 73], 256], + 8551: [[86, 73, 73, 73], 256], + 8552: [[73, 88], 256], + 8553: [[88], 256], + 8554: [[88, 73], 256], + 8555: [[88, 73, 73], 256], + 8556: [[76], 256], + 8557: [[67], 256], + 8558: [[68], 256], + 8559: [[77], 256], + 8560: [[105], 256], + 8561: [[105, 105], 256], + 8562: [[105, 105, 105], 256], + 8563: [[105, 118], 256], + 8564: [[118], 256], + 8565: [[118, 105], 256], + 8566: [[118, 105, 105], 256], + 8567: [[118, 105, 105, 105], 256], + 8568: [[105, 120], 256], + 8569: [[120], 256], + 8570: [[120, 105], 256], + 8571: [[120, 105, 105], 256], + 8572: [[108], 256], + 8573: [[99], 256], + 8574: [[100], 256], + 8575: [[109], 256], + 8585: [[48, 8260, 51], 256], + 8592: [, , { 824: 8602 }], + 8594: [, , { 824: 8603 }], + 8596: [, , { 824: 8622 }], + 8602: [[8592, 824]], + 8603: [[8594, 824]], + 8622: [[8596, 824]], + 8653: [[8656, 824]], + 8654: [[8660, 824]], + 8655: [[8658, 824]], + 8656: [, , { 824: 8653 }], + 8658: [, , { 824: 8655 }], + 8660: [, , { 824: 8654 }] + }, + 8704: { + 8707: [, , { 824: 8708 }], + 8708: [[8707, 824]], + 8712: [, , { 824: 8713 }], + 8713: [[8712, 824]], + 8715: [, , { 824: 8716 }], + 8716: [[8715, 824]], + 8739: [, , { 824: 8740 }], + 8740: [[8739, 824]], + 8741: [, , { 824: 8742 }], + 8742: [[8741, 824]], + 8748: [[8747, 8747], 256], + 8749: [[8747, 8747, 8747], 256], + 8751: [[8750, 8750], 256], + 8752: [[8750, 8750, 8750], 256], + 8764: [, , { 824: 8769 }], + 8769: [[8764, 824]], + 8771: [, , { 824: 8772 }], + 8772: [[8771, 824]], + 8773: [, , { 824: 8775 }], + 8775: [[8773, 824]], + 8776: [, , { 824: 8777 }], + 8777: [[8776, 824]], + 8781: [, , { 824: 8813 }], + 8800: [[61, 824]], + 8801: [, , { 824: 8802 }], + 8802: [[8801, 824]], + 8804: [, , { 824: 8816 }], + 8805: [, , { 824: 8817 }], + 8813: [[8781, 824]], + 8814: [[60, 824]], + 8815: [[62, 824]], + 8816: [[8804, 824]], + 8817: [[8805, 824]], + 8818: [, , { 824: 8820 }], + 8819: [, , { 824: 8821 }], + 8820: [[8818, 824]], + 8821: [[8819, 824]], + 8822: [, , { 824: 8824 }], + 8823: [, , { 824: 8825 }], + 8824: [[8822, 824]], + 8825: [[8823, 824]], + 8826: [, , { 824: 8832 }], + 8827: [, , { 824: 8833 }], + 8828: [, , { 824: 8928 }], + 8829: [, , { 824: 8929 }], + 8832: [[8826, 824]], + 8833: [[8827, 824]], + 8834: [, , { 824: 8836 }], + 8835: [, , { 824: 8837 }], + 8836: [[8834, 824]], + 8837: [[8835, 824]], + 8838: [, , { 824: 8840 }], + 8839: [, , { 824: 8841 }], + 8840: [[8838, 824]], + 8841: [[8839, 824]], + 8849: [, , { 824: 8930 }], + 8850: [, , { 824: 8931 }], + 8866: [, , { 824: 8876 }], + 8872: [, , { 824: 8877 }], + 8873: [, , { 824: 8878 }], + 8875: [, , { 824: 8879 }], + 8876: [[8866, 824]], + 8877: [[8872, 824]], + 8878: [[8873, 824]], + 8879: [[8875, 824]], + 8882: [, , { 824: 8938 }], + 8883: [, , { 824: 8939 }], + 8884: [, , { 824: 8940 }], + 8885: [, , { 824: 8941 }], + 8928: [[8828, 824]], + 8929: [[8829, 824]], + 8930: [[8849, 824]], + 8931: [[8850, 824]], + 8938: [[8882, 824]], + 8939: [[8883, 824]], + 8940: [[8884, 824]], + 8941: [[8885, 824]] + }, + 8960: { 9001: [[12296]], 9002: [[12297]] }, + 9216: { + 9312: [[49], 256], + 9313: [[50], 256], + 9314: [[51], 256], + 9315: [[52], 256], + 9316: [[53], 256], + 9317: [[54], 256], + 9318: [[55], 256], + 9319: [[56], 256], + 9320: [[57], 256], + 9321: [[49, 48], 256], + 9322: [[49, 49], 256], + 9323: [[49, 50], 256], + 9324: [[49, 51], 256], + 9325: [[49, 52], 256], + 9326: [[49, 53], 256], + 9327: [[49, 54], 256], + 9328: [[49, 55], 256], + 9329: [[49, 56], 256], + 9330: [[49, 57], 256], + 9331: [[50, 48], 256], + 9332: [[40, 49, 41], 256], + 9333: [[40, 50, 41], 256], + 9334: [[40, 51, 41], 256], + 9335: [[40, 52, 41], 256], + 9336: [[40, 53, 41], 256], + 9337: [[40, 54, 41], 256], + 9338: [[40, 55, 41], 256], + 9339: [[40, 56, 41], 256], + 9340: [[40, 57, 41], 256], + 9341: [[40, 49, 48, 41], 256], + 9342: [[40, 49, 49, 41], 256], + 9343: [[40, 49, 50, 41], 256], + 9344: [[40, 49, 51, 41], 256], + 9345: [[40, 49, 52, 41], 256], + 9346: [[40, 49, 53, 41], 256], + 9347: [[40, 49, 54, 41], 256], + 9348: [[40, 49, 55, 41], 256], + 9349: [[40, 49, 56, 41], 256], + 9350: [[40, 49, 57, 41], 256], + 9351: [[40, 50, 48, 41], 256], + 9352: [[49, 46], 256], + 9353: [[50, 46], 256], + 9354: [[51, 46], 256], + 9355: [[52, 46], 256], + 9356: [[53, 46], 256], + 9357: [[54, 46], 256], + 9358: [[55, 46], 256], + 9359: [[56, 46], 256], + 9360: [[57, 46], 256], + 9361: [[49, 48, 46], 256], + 9362: [[49, 49, 46], 256], + 9363: [[49, 50, 46], 256], + 9364: [[49, 51, 46], 256], + 9365: [[49, 52, 46], 256], + 9366: [[49, 53, 46], 256], + 9367: [[49, 54, 46], 256], + 9368: [[49, 55, 46], 256], + 9369: [[49, 56, 46], 256], + 9370: [[49, 57, 46], 256], + 9371: [[50, 48, 46], 256], + 9372: [[40, 97, 41], 256], + 9373: [[40, 98, 41], 256], + 9374: [[40, 99, 41], 256], + 9375: [[40, 100, 41], 256], + 9376: [[40, 101, 41], 256], + 9377: [[40, 102, 41], 256], + 9378: [[40, 103, 41], 256], + 9379: [[40, 104, 41], 256], + 9380: [[40, 105, 41], 256], + 9381: [[40, 106, 41], 256], + 9382: [[40, 107, 41], 256], + 9383: [[40, 108, 41], 256], + 9384: [[40, 109, 41], 256], + 9385: [[40, 110, 41], 256], + 9386: [[40, 111, 41], 256], + 9387: [[40, 112, 41], 256], + 9388: [[40, 113, 41], 256], + 9389: [[40, 114, 41], 256], + 9390: [[40, 115, 41], 256], + 9391: [[40, 116, 41], 256], + 9392: [[40, 117, 41], 256], + 9393: [[40, 118, 41], 256], + 9394: [[40, 119, 41], 256], + 9395: [[40, 120, 41], 256], + 9396: [[40, 121, 41], 256], + 9397: [[40, 122, 41], 256], + 9398: [[65], 256], + 9399: [[66], 256], + 9400: [[67], 256], + 9401: [[68], 256], + 9402: [[69], 256], + 9403: [[70], 256], + 9404: [[71], 256], + 9405: [[72], 256], + 9406: [[73], 256], + 9407: [[74], 256], + 9408: [[75], 256], + 9409: [[76], 256], + 9410: [[77], 256], + 9411: [[78], 256], + 9412: [[79], 256], + 9413: [[80], 256], + 9414: [[81], 256], + 9415: [[82], 256], + 9416: [[83], 256], + 9417: [[84], 256], + 9418: [[85], 256], + 9419: [[86], 256], + 9420: [[87], 256], + 9421: [[88], 256], + 9422: [[89], 256], + 9423: [[90], 256], + 9424: [[97], 256], + 9425: [[98], 256], + 9426: [[99], 256], + 9427: [[100], 256], + 9428: [[101], 256], + 9429: [[102], 256], + 9430: [[103], 256], + 9431: [[104], 256], + 9432: [[105], 256], + 9433: [[106], 256], + 9434: [[107], 256], + 9435: [[108], 256], + 9436: [[109], 256], + 9437: [[110], 256], + 9438: [[111], 256], + 9439: [[112], 256], + 9440: [[113], 256], + 9441: [[114], 256], + 9442: [[115], 256], + 9443: [[116], 256], + 9444: [[117], 256], + 9445: [[118], 256], + 9446: [[119], 256], + 9447: [[120], 256], + 9448: [[121], 256], + 9449: [[122], 256], + 9450: [[48], 256] + }, + 10752: { + 10764: [[8747, 8747, 8747, 8747], 256], + 10868: [[58, 58, 61], 256], + 10869: [[61, 61], 256], + 10870: [[61, 61, 61], 256], + 10972: [[10973, 824], 512] + }, + 11264: { + 11388: [[106], 256], + 11389: [[86], 256], + 11503: [, 230], + 11504: [, 230], + 11505: [, 230] + }, + 11520: { + 11631: [[11617], 256], + 11647: [, 9], + 11744: [, 230], + 11745: [, 230], + 11746: [, 230], + 11747: [, 230], + 11748: [, 230], + 11749: [, 230], + 11750: [, 230], + 11751: [, 230], + 11752: [, 230], + 11753: [, 230], + 11754: [, 230], + 11755: [, 230], + 11756: [, 230], + 11757: [, 230], + 11758: [, 230], + 11759: [, 230], + 11760: [, 230], + 11761: [, 230], + 11762: [, 230], + 11763: [, 230], + 11764: [, 230], + 11765: [, 230], + 11766: [, 230], + 11767: [, 230], + 11768: [, 230], + 11769: [, 230], + 11770: [, 230], + 11771: [, 230], + 11772: [, 230], + 11773: [, 230], + 11774: [, 230], + 11775: [, 230] + }, + 11776: { 11935: [[27597], 256], 12019: [[40863], 256] }, + 12032: { + 12032: [[19968], 256], + 12033: [[20008], 256], + 12034: [[20022], 256], + 12035: [[20031], 256], + 12036: [[20057], 256], + 12037: [[20101], 256], + 12038: [[20108], 256], + 12039: [[20128], 256], + 12040: [[20154], 256], + 12041: [[20799], 256], + 12042: [[20837], 256], + 12043: [[20843], 256], + 12044: [[20866], 256], + 12045: [[20886], 256], + 12046: [[20907], 256], + 12047: [[20960], 256], + 12048: [[20981], 256], + 12049: [[20992], 256], + 12050: [[21147], 256], + 12051: [[21241], 256], + 12052: [[21269], 256], + 12053: [[21274], 256], + 12054: [[21304], 256], + 12055: [[21313], 256], + 12056: [[21340], 256], + 12057: [[21353], 256], + 12058: [[21378], 256], + 12059: [[21430], 256], + 12060: [[21448], 256], + 12061: [[21475], 256], + 12062: [[22231], 256], + 12063: [[22303], 256], + 12064: [[22763], 256], + 12065: [[22786], 256], + 12066: [[22794], 256], + 12067: [[22805], 256], + 12068: [[22823], 256], + 12069: [[22899], 256], + 12070: [[23376], 256], + 12071: [[23424], 256], + 12072: [[23544], 256], + 12073: [[23567], 256], + 12074: [[23586], 256], + 12075: [[23608], 256], + 12076: [[23662], 256], + 12077: [[23665], 256], + 12078: [[24027], 256], + 12079: [[24037], 256], + 12080: [[24049], 256], + 12081: [[24062], 256], + 12082: [[24178], 256], + 12083: [[24186], 256], + 12084: [[24191], 256], + 12085: [[24308], 256], + 12086: [[24318], 256], + 12087: [[24331], 256], + 12088: [[24339], 256], + 12089: [[24400], 256], + 12090: [[24417], 256], + 12091: [[24435], 256], + 12092: [[24515], 256], + 12093: [[25096], 256], + 12094: [[25142], 256], + 12095: [[25163], 256], + 12096: [[25903], 256], + 12097: [[25908], 256], + 12098: [[25991], 256], + 12099: [[26007], 256], + 12100: [[26020], 256], + 12101: [[26041], 256], + 12102: [[26080], 256], + 12103: [[26085], 256], + 12104: [[26352], 256], + 12105: [[26376], 256], + 12106: [[26408], 256], + 12107: [[27424], 256], + 12108: [[27490], 256], + 12109: [[27513], 256], + 12110: [[27571], 256], + 12111: [[27595], 256], + 12112: [[27604], 256], + 12113: [[27611], 256], + 12114: [[27663], 256], + 12115: [[27668], 256], + 12116: [[27700], 256], + 12117: [[28779], 256], + 12118: [[29226], 256], + 12119: [[29238], 256], + 12120: [[29243], 256], + 12121: [[29247], 256], + 12122: [[29255], 256], + 12123: [[29273], 256], + 12124: [[29275], 256], + 12125: [[29356], 256], + 12126: [[29572], 256], + 12127: [[29577], 256], + 12128: [[29916], 256], + 12129: [[29926], 256], + 12130: [[29976], 256], + 12131: [[29983], 256], + 12132: [[29992], 256], + 12133: [[30000], 256], + 12134: [[30091], 256], + 12135: [[30098], 256], + 12136: [[30326], 256], + 12137: [[30333], 256], + 12138: [[30382], 256], + 12139: [[30399], 256], + 12140: [[30446], 256], + 12141: [[30683], 256], + 12142: [[30690], 256], + 12143: [[30707], 256], + 12144: [[31034], 256], + 12145: [[31160], 256], + 12146: [[31166], 256], + 12147: [[31348], 256], + 12148: [[31435], 256], + 12149: [[31481], 256], + 12150: [[31859], 256], + 12151: [[31992], 256], + 12152: [[32566], 256], + 12153: [[32593], 256], + 12154: [[32650], 256], + 12155: [[32701], 256], + 12156: [[32769], 256], + 12157: [[32780], 256], + 12158: [[32786], 256], + 12159: [[32819], 256], + 12160: [[32895], 256], + 12161: [[32905], 256], + 12162: [[33251], 256], + 12163: [[33258], 256], + 12164: [[33267], 256], + 12165: [[33276], 256], + 12166: [[33292], 256], + 12167: [[33307], 256], + 12168: [[33311], 256], + 12169: [[33390], 256], + 12170: [[33394], 256], + 12171: [[33400], 256], + 12172: [[34381], 256], + 12173: [[34411], 256], + 12174: [[34880], 256], + 12175: [[34892], 256], + 12176: [[34915], 256], + 12177: [[35198], 256], + 12178: [[35211], 256], + 12179: [[35282], 256], + 12180: [[35328], 256], + 12181: [[35895], 256], + 12182: [[35910], 256], + 12183: [[35925], 256], + 12184: [[35960], 256], + 12185: [[35997], 256], + 12186: [[36196], 256], + 12187: [[36208], 256], + 12188: [[36275], 256], + 12189: [[36523], 256], + 12190: [[36554], 256], + 12191: [[36763], 256], + 12192: [[36784], 256], + 12193: [[36789], 256], + 12194: [[37009], 256], + 12195: [[37193], 256], + 12196: [[37318], 256], + 12197: [[37324], 256], + 12198: [[37329], 256], + 12199: [[38263], 256], + 12200: [[38272], 256], + 12201: [[38428], 256], + 12202: [[38582], 256], + 12203: [[38585], 256], + 12204: [[38632], 256], + 12205: [[38737], 256], + 12206: [[38750], 256], + 12207: [[38754], 256], + 12208: [[38761], 256], + 12209: [[38859], 256], + 12210: [[38893], 256], + 12211: [[38899], 256], + 12212: [[38913], 256], + 12213: [[39080], 256], + 12214: [[39131], 256], + 12215: [[39135], 256], + 12216: [[39318], 256], + 12217: [[39321], 256], + 12218: [[39340], 256], + 12219: [[39592], 256], + 12220: [[39640], 256], + 12221: [[39647], 256], + 12222: [[39717], 256], + 12223: [[39727], 256], + 12224: [[39730], 256], + 12225: [[39740], 256], + 12226: [[39770], 256], + 12227: [[40165], 256], + 12228: [[40565], 256], + 12229: [[40575], 256], + 12230: [[40613], 256], + 12231: [[40635], 256], + 12232: [[40643], 256], + 12233: [[40653], 256], + 12234: [[40657], 256], + 12235: [[40697], 256], + 12236: [[40701], 256], + 12237: [[40718], 256], + 12238: [[40723], 256], + 12239: [[40736], 256], + 12240: [[40763], 256], + 12241: [[40778], 256], + 12242: [[40786], 256], + 12243: [[40845], 256], + 12244: [[40860], 256], + 12245: [[40864], 256] + }, + 12288: { + 12288: [[32], 256], + 12330: [, 218], + 12331: [, 228], + 12332: [, 232], + 12333: [, 222], + 12334: [, 224], + 12335: [, 224], + 12342: [[12306], 256], + 12344: [[21313], 256], + 12345: [[21316], 256], + 12346: [[21317], 256], + 12358: [, , { 12441: 12436 }], + 12363: [, , { 12441: 12364 }], + 12364: [[12363, 12441]], + 12365: [, , { 12441: 12366 }], + 12366: [[12365, 12441]], + 12367: [, , { 12441: 12368 }], + 12368: [[12367, 12441]], + 12369: [, , { 12441: 12370 }], + 12370: [[12369, 12441]], + 12371: [, , { 12441: 12372 }], + 12372: [[12371, 12441]], + 12373: [, , { 12441: 12374 }], + 12374: [[12373, 12441]], + 12375: [, , { 12441: 12376 }], + 12376: [[12375, 12441]], + 12377: [, , { 12441: 12378 }], + 12378: [[12377, 12441]], + 12379: [, , { 12441: 12380 }], + 12380: [[12379, 12441]], + 12381: [, , { 12441: 12382 }], + 12382: [[12381, 12441]], + 12383: [, , { 12441: 12384 }], + 12384: [[12383, 12441]], + 12385: [, , { 12441: 12386 }], + 12386: [[12385, 12441]], + 12388: [, , { 12441: 12389 }], + 12389: [[12388, 12441]], + 12390: [, , { 12441: 12391 }], + 12391: [[12390, 12441]], + 12392: [, , { 12441: 12393 }], + 12393: [[12392, 12441]], + 12399: [, , { 12441: 12400, 12442: 12401 }], + 12400: [[12399, 12441]], + 12401: [[12399, 12442]], + 12402: [, , { 12441: 12403, 12442: 12404 }], + 12403: [[12402, 12441]], + 12404: [[12402, 12442]], + 12405: [, , { 12441: 12406, 12442: 12407 }], + 12406: [[12405, 12441]], + 12407: [[12405, 12442]], + 12408: [, , { 12441: 12409, 12442: 12410 }], + 12409: [[12408, 12441]], + 12410: [[12408, 12442]], + 12411: [, , { 12441: 12412, 12442: 12413 }], + 12412: [[12411, 12441]], + 12413: [[12411, 12442]], + 12436: [[12358, 12441]], + 12441: [, 8], + 12442: [, 8], + 12443: [[32, 12441], 256], + 12444: [[32, 12442], 256], + 12445: [, , { 12441: 12446 }], + 12446: [[12445, 12441]], + 12447: [[12424, 12426], 256], + 12454: [, , { 12441: 12532 }], + 12459: [, , { 12441: 12460 }], + 12460: [[12459, 12441]], + 12461: [, , { 12441: 12462 }], + 12462: [[12461, 12441]], + 12463: [, , { 12441: 12464 }], + 12464: [[12463, 12441]], + 12465: [, , { 12441: 12466 }], + 12466: [[12465, 12441]], + 12467: [, , { 12441: 12468 }], + 12468: [[12467, 12441]], + 12469: [, , { 12441: 12470 }], + 12470: [[12469, 12441]], + 12471: [, , { 12441: 12472 }], + 12472: [[12471, 12441]], + 12473: [, , { 12441: 12474 }], + 12474: [[12473, 12441]], + 12475: [, , { 12441: 12476 }], + 12476: [[12475, 12441]], + 12477: [, , { 12441: 12478 }], + 12478: [[12477, 12441]], + 12479: [, , { 12441: 12480 }], + 12480: [[12479, 12441]], + 12481: [, , { 12441: 12482 }], + 12482: [[12481, 12441]], + 12484: [, , { 12441: 12485 }], + 12485: [[12484, 12441]], + 12486: [, , { 12441: 12487 }], + 12487: [[12486, 12441]], + 12488: [, , { 12441: 12489 }], + 12489: [[12488, 12441]], + 12495: [, , { 12441: 12496, 12442: 12497 }], + 12496: [[12495, 12441]], + 12497: [[12495, 12442]], + 12498: [, , { 12441: 12499, 12442: 12500 }], + 12499: [[12498, 12441]], + 12500: [[12498, 12442]], + 12501: [, , { 12441: 12502, 12442: 12503 }], + 12502: [[12501, 12441]], + 12503: [[12501, 12442]], + 12504: [, , { 12441: 12505, 12442: 12506 }], + 12505: [[12504, 12441]], + 12506: [[12504, 12442]], + 12507: [, , { 12441: 12508, 12442: 12509 }], + 12508: [[12507, 12441]], + 12509: [[12507, 12442]], + 12527: [, , { 12441: 12535 }], + 12528: [, , { 12441: 12536 }], + 12529: [, , { 12441: 12537 }], + 12530: [, , { 12441: 12538 }], + 12532: [[12454, 12441]], + 12535: [[12527, 12441]], + 12536: [[12528, 12441]], + 12537: [[12529, 12441]], + 12538: [[12530, 12441]], + 12541: [, , { 12441: 12542 }], + 12542: [[12541, 12441]], + 12543: [[12467, 12488], 256] + }, + 12544: { + 12593: [[4352], 256], + 12594: [[4353], 256], + 12595: [[4522], 256], + 12596: [[4354], 256], + 12597: [[4524], 256], + 12598: [[4525], 256], + 12599: [[4355], 256], + 12600: [[4356], 256], + 12601: [[4357], 256], + 12602: [[4528], 256], + 12603: [[4529], 256], + 12604: [[4530], 256], + 12605: [[4531], 256], + 12606: [[4532], 256], + 12607: [[4533], 256], + 12608: [[4378], 256], + 12609: [[4358], 256], + 12610: [[4359], 256], + 12611: [[4360], 256], + 12612: [[4385], 256], + 12613: [[4361], 256], + 12614: [[4362], 256], + 12615: [[4363], 256], + 12616: [[4364], 256], + 12617: [[4365], 256], + 12618: [[4366], 256], + 12619: [[4367], 256], + 12620: [[4368], 256], + 12621: [[4369], 256], + 12622: [[4370], 256], + 12623: [[4449], 256], + 12624: [[4450], 256], + 12625: [[4451], 256], + 12626: [[4452], 256], + 12627: [[4453], 256], + 12628: [[4454], 256], + 12629: [[4455], 256], + 12630: [[4456], 256], + 12631: [[4457], 256], + 12632: [[4458], 256], + 12633: [[4459], 256], + 12634: [[4460], 256], + 12635: [[4461], 256], + 12636: [[4462], 256], + 12637: [[4463], 256], + 12638: [[4464], 256], + 12639: [[4465], 256], + 12640: [[4466], 256], + 12641: [[4467], 256], + 12642: [[4468], 256], + 12643: [[4469], 256], + 12644: [[4448], 256], + 12645: [[4372], 256], + 12646: [[4373], 256], + 12647: [[4551], 256], + 12648: [[4552], 256], + 12649: [[4556], 256], + 12650: [[4558], 256], + 12651: [[4563], 256], + 12652: [[4567], 256], + 12653: [[4569], 256], + 12654: [[4380], 256], + 12655: [[4573], 256], + 12656: [[4575], 256], + 12657: [[4381], 256], + 12658: [[4382], 256], + 12659: [[4384], 256], + 12660: [[4386], 256], + 12661: [[4387], 256], + 12662: [[4391], 256], + 12663: [[4393], 256], + 12664: [[4395], 256], + 12665: [[4396], 256], + 12666: [[4397], 256], + 12667: [[4398], 256], + 12668: [[4399], 256], + 12669: [[4402], 256], + 12670: [[4406], 256], + 12671: [[4416], 256], + 12672: [[4423], 256], + 12673: [[4428], 256], + 12674: [[4593], 256], + 12675: [[4594], 256], + 12676: [[4439], 256], + 12677: [[4440], 256], + 12678: [[4441], 256], + 12679: [[4484], 256], + 12680: [[4485], 256], + 12681: [[4488], 256], + 12682: [[4497], 256], + 12683: [[4498], 256], + 12684: [[4500], 256], + 12685: [[4510], 256], + 12686: [[4513], 256], + 12690: [[19968], 256], + 12691: [[20108], 256], + 12692: [[19977], 256], + 12693: [[22235], 256], + 12694: [[19978], 256], + 12695: [[20013], 256], + 12696: [[19979], 256], + 12697: [[30002], 256], + 12698: [[20057], 256], + 12699: [[19993], 256], + 12700: [[19969], 256], + 12701: [[22825], 256], + 12702: [[22320], 256], + 12703: [[20154], 256] + }, + 12800: { + 12800: [[40, 4352, 41], 256], + 12801: [[40, 4354, 41], 256], + 12802: [[40, 4355, 41], 256], + 12803: [[40, 4357, 41], 256], + 12804: [[40, 4358, 41], 256], + 12805: [[40, 4359, 41], 256], + 12806: [[40, 4361, 41], 256], + 12807: [[40, 4363, 41], 256], + 12808: [[40, 4364, 41], 256], + 12809: [[40, 4366, 41], 256], + 12810: [[40, 4367, 41], 256], + 12811: [[40, 4368, 41], 256], + 12812: [[40, 4369, 41], 256], + 12813: [[40, 4370, 41], 256], + 12814: [[40, 4352, 4449, 41], 256], + 12815: [[40, 4354, 4449, 41], 256], + 12816: [[40, 4355, 4449, 41], 256], + 12817: [[40, 4357, 4449, 41], 256], + 12818: [[40, 4358, 4449, 41], 256], + 12819: [[40, 4359, 4449, 41], 256], + 12820: [[40, 4361, 4449, 41], 256], + 12821: [[40, 4363, 4449, 41], 256], + 12822: [[40, 4364, 4449, 41], 256], + 12823: [[40, 4366, 4449, 41], 256], + 12824: [[40, 4367, 4449, 41], 256], + 12825: [[40, 4368, 4449, 41], 256], + 12826: [[40, 4369, 4449, 41], 256], + 12827: [[40, 4370, 4449, 41], 256], + 12828: [[40, 4364, 4462, 41], 256], + 12829: [[40, 4363, 4457, 4364, 4453, 4523, 41], 256], + 12830: [[40, 4363, 4457, 4370, 4462, 41], 256], + 12832: [[40, 19968, 41], 256], + 12833: [[40, 20108, 41], 256], + 12834: [[40, 19977, 41], 256], + 12835: [[40, 22235, 41], 256], + 12836: [[40, 20116, 41], 256], + 12837: [[40, 20845, 41], 256], + 12838: [[40, 19971, 41], 256], + 12839: [[40, 20843, 41], 256], + 12840: [[40, 20061, 41], 256], + 12841: [[40, 21313, 41], 256], + 12842: [[40, 26376, 41], 256], + 12843: [[40, 28779, 41], 256], + 12844: [[40, 27700, 41], 256], + 12845: [[40, 26408, 41], 256], + 12846: [[40, 37329, 41], 256], + 12847: [[40, 22303, 41], 256], + 12848: [[40, 26085, 41], 256], + 12849: [[40, 26666, 41], 256], + 12850: [[40, 26377, 41], 256], + 12851: [[40, 31038, 41], 256], + 12852: [[40, 21517, 41], 256], + 12853: [[40, 29305, 41], 256], + 12854: [[40, 36001, 41], 256], + 12855: [[40, 31069, 41], 256], + 12856: [[40, 21172, 41], 256], + 12857: [[40, 20195, 41], 256], + 12858: [[40, 21628, 41], 256], + 12859: [[40, 23398, 41], 256], + 12860: [[40, 30435, 41], 256], + 12861: [[40, 20225, 41], 256], + 12862: [[40, 36039, 41], 256], + 12863: [[40, 21332, 41], 256], + 12864: [[40, 31085, 41], 256], + 12865: [[40, 20241, 41], 256], + 12866: [[40, 33258, 41], 256], + 12867: [[40, 33267, 41], 256], + 12868: [[21839], 256], + 12869: [[24188], 256], + 12870: [[25991], 256], + 12871: [[31631], 256], + 12880: [[80, 84, 69], 256], + 12881: [[50, 49], 256], + 12882: [[50, 50], 256], + 12883: [[50, 51], 256], + 12884: [[50, 52], 256], + 12885: [[50, 53], 256], + 12886: [[50, 54], 256], + 12887: [[50, 55], 256], + 12888: [[50, 56], 256], + 12889: [[50, 57], 256], + 12890: [[51, 48], 256], + 12891: [[51, 49], 256], + 12892: [[51, 50], 256], + 12893: [[51, 51], 256], + 12894: [[51, 52], 256], + 12895: [[51, 53], 256], + 12896: [[4352], 256], + 12897: [[4354], 256], + 12898: [[4355], 256], + 12899: [[4357], 256], + 12900: [[4358], 256], + 12901: [[4359], 256], + 12902: [[4361], 256], + 12903: [[4363], 256], + 12904: [[4364], 256], + 12905: [[4366], 256], + 12906: [[4367], 256], + 12907: [[4368], 256], + 12908: [[4369], 256], + 12909: [[4370], 256], + 12910: [[4352, 4449], 256], + 12911: [[4354, 4449], 256], + 12912: [[4355, 4449], 256], + 12913: [[4357, 4449], 256], + 12914: [[4358, 4449], 256], + 12915: [[4359, 4449], 256], + 12916: [[4361, 4449], 256], + 12917: [[4363, 4449], 256], + 12918: [[4364, 4449], 256], + 12919: [[4366, 4449], 256], + 12920: [[4367, 4449], 256], + 12921: [[4368, 4449], 256], + 12922: [[4369, 4449], 256], + 12923: [[4370, 4449], 256], + 12924: [[4366, 4449, 4535, 4352, 4457], 256], + 12925: [[4364, 4462, 4363, 4468], 256], + 12926: [[4363, 4462], 256], + 12928: [[19968], 256], + 12929: [[20108], 256], + 12930: [[19977], 256], + 12931: [[22235], 256], + 12932: [[20116], 256], + 12933: [[20845], 256], + 12934: [[19971], 256], + 12935: [[20843], 256], + 12936: [[20061], 256], + 12937: [[21313], 256], + 12938: [[26376], 256], + 12939: [[28779], 256], + 12940: [[27700], 256], + 12941: [[26408], 256], + 12942: [[37329], 256], + 12943: [[22303], 256], + 12944: [[26085], 256], + 12945: [[26666], 256], + 12946: [[26377], 256], + 12947: [[31038], 256], + 12948: [[21517], 256], + 12949: [[29305], 256], + 12950: [[36001], 256], + 12951: [[31069], 256], + 12952: [[21172], 256], + 12953: [[31192], 256], + 12954: [[30007], 256], + 12955: [[22899], 256], + 12956: [[36969], 256], + 12957: [[20778], 256], + 12958: [[21360], 256], + 12959: [[27880], 256], + 12960: [[38917], 256], + 12961: [[20241], 256], + 12962: [[20889], 256], + 12963: [[27491], 256], + 12964: [[19978], 256], + 12965: [[20013], 256], + 12966: [[19979], 256], + 12967: [[24038], 256], + 12968: [[21491], 256], + 12969: [[21307], 256], + 12970: [[23447], 256], + 12971: [[23398], 256], + 12972: [[30435], 256], + 12973: [[20225], 256], + 12974: [[36039], 256], + 12975: [[21332], 256], + 12976: [[22812], 256], + 12977: [[51, 54], 256], + 12978: [[51, 55], 256], + 12979: [[51, 56], 256], + 12980: [[51, 57], 256], + 12981: [[52, 48], 256], + 12982: [[52, 49], 256], + 12983: [[52, 50], 256], + 12984: [[52, 51], 256], + 12985: [[52, 52], 256], + 12986: [[52, 53], 256], + 12987: [[52, 54], 256], + 12988: [[52, 55], 256], + 12989: [[52, 56], 256], + 12990: [[52, 57], 256], + 12991: [[53, 48], 256], + 12992: [[49, 26376], 256], + 12993: [[50, 26376], 256], + 12994: [[51, 26376], 256], + 12995: [[52, 26376], 256], + 12996: [[53, 26376], 256], + 12997: [[54, 26376], 256], + 12998: [[55, 26376], 256], + 12999: [[56, 26376], 256], + 13000: [[57, 26376], 256], + 13001: [[49, 48, 26376], 256], + 13002: [[49, 49, 26376], 256], + 13003: [[49, 50, 26376], 256], + 13004: [[72, 103], 256], + 13005: [[101, 114, 103], 256], + 13006: [[101, 86], 256], + 13007: [[76, 84, 68], 256], + 13008: [[12450], 256], + 13009: [[12452], 256], + 13010: [[12454], 256], + 13011: [[12456], 256], + 13012: [[12458], 256], + 13013: [[12459], 256], + 13014: [[12461], 256], + 13015: [[12463], 256], + 13016: [[12465], 256], + 13017: [[12467], 256], + 13018: [[12469], 256], + 13019: [[12471], 256], + 13020: [[12473], 256], + 13021: [[12475], 256], + 13022: [[12477], 256], + 13023: [[12479], 256], + 13024: [[12481], 256], + 13025: [[12484], 256], + 13026: [[12486], 256], + 13027: [[12488], 256], + 13028: [[12490], 256], + 13029: [[12491], 256], + 13030: [[12492], 256], + 13031: [[12493], 256], + 13032: [[12494], 256], + 13033: [[12495], 256], + 13034: [[12498], 256], + 13035: [[12501], 256], + 13036: [[12504], 256], + 13037: [[12507], 256], + 13038: [[12510], 256], + 13039: [[12511], 256], + 13040: [[12512], 256], + 13041: [[12513], 256], + 13042: [[12514], 256], + 13043: [[12516], 256], + 13044: [[12518], 256], + 13045: [[12520], 256], + 13046: [[12521], 256], + 13047: [[12522], 256], + 13048: [[12523], 256], + 13049: [[12524], 256], + 13050: [[12525], 256], + 13051: [[12527], 256], + 13052: [[12528], 256], + 13053: [[12529], 256], + 13054: [[12530], 256] + }, + 13056: { + 13056: [[12450, 12497, 12540, 12488], 256], + 13057: [[12450, 12523, 12501, 12449], 256], + 13058: [[12450, 12531, 12506, 12450], 256], + 13059: [[12450, 12540, 12523], 256], + 13060: [[12452, 12491, 12531, 12464], 256], + 13061: [[12452, 12531, 12481], 256], + 13062: [[12454, 12457, 12531], 256], + 13063: [[12456, 12473, 12463, 12540, 12489], 256], + 13064: [[12456, 12540, 12459, 12540], 256], + 13065: [[12458, 12531, 12473], 256], + 13066: [[12458, 12540, 12512], 256], + 13067: [[12459, 12452, 12522], 256], + 13068: [[12459, 12521, 12483, 12488], 256], + 13069: [[12459, 12525, 12522, 12540], 256], + 13070: [[12460, 12525, 12531], 256], + 13071: [[12460, 12531, 12510], 256], + 13072: [[12462, 12460], 256], + 13073: [[12462, 12491, 12540], 256], + 13074: [[12461, 12517, 12522, 12540], 256], + 13075: [[12462, 12523, 12480, 12540], 256], + 13076: [[12461, 12525], 256], + 13077: [[12461, 12525, 12464, 12521, 12512], 256], + 13078: [[12461, 12525, 12513, 12540, 12488, 12523], 256], + 13079: [[12461, 12525, 12527, 12483, 12488], 256], + 13080: [[12464, 12521, 12512], 256], + 13081: [[12464, 12521, 12512, 12488, 12531], 256], + 13082: [[12463, 12523, 12476, 12452, 12525], 256], + 13083: [[12463, 12525, 12540, 12493], 256], + 13084: [[12465, 12540, 12473], 256], + 13085: [[12467, 12523, 12490], 256], + 13086: [[12467, 12540, 12509], 256], + 13087: [[12469, 12452, 12463, 12523], 256], + 13088: [[12469, 12531, 12481, 12540, 12512], 256], + 13089: [[12471, 12522, 12531, 12464], 256], + 13090: [[12475, 12531, 12481], 256], + 13091: [[12475, 12531, 12488], 256], + 13092: [[12480, 12540, 12473], 256], + 13093: [[12487, 12471], 256], + 13094: [[12489, 12523], 256], + 13095: [[12488, 12531], 256], + 13096: [[12490, 12494], 256], + 13097: [[12494, 12483, 12488], 256], + 13098: [[12495, 12452, 12484], 256], + 13099: [[12497, 12540, 12475, 12531, 12488], 256], + 13100: [[12497, 12540, 12484], 256], + 13101: [[12496, 12540, 12524, 12523], 256], + 13102: [[12500, 12450, 12473, 12488, 12523], 256], + 13103: [[12500, 12463, 12523], 256], + 13104: [[12500, 12467], 256], + 13105: [[12499, 12523], 256], + 13106: [[12501, 12449, 12521, 12483, 12489], 256], + 13107: [[12501, 12451, 12540, 12488], 256], + 13108: [[12502, 12483, 12471, 12455, 12523], 256], + 13109: [[12501, 12521, 12531], 256], + 13110: [[12504, 12463, 12479, 12540, 12523], 256], + 13111: [[12506, 12477], 256], + 13112: [[12506, 12491, 12498], 256], + 13113: [[12504, 12523, 12484], 256], + 13114: [[12506, 12531, 12473], 256], + 13115: [[12506, 12540, 12472], 256], + 13116: [[12505, 12540, 12479], 256], + 13117: [[12509, 12452, 12531, 12488], 256], + 13118: [[12508, 12523, 12488], 256], + 13119: [[12507, 12531], 256], + 13120: [[12509, 12531, 12489], 256], + 13121: [[12507, 12540, 12523], 256], + 13122: [[12507, 12540, 12531], 256], + 13123: [[12510, 12452, 12463, 12525], 256], + 13124: [[12510, 12452, 12523], 256], + 13125: [[12510, 12483, 12495], 256], + 13126: [[12510, 12523, 12463], 256], + 13127: [[12510, 12531, 12471, 12519, 12531], 256], + 13128: [[12511, 12463, 12525, 12531], 256], + 13129: [[12511, 12522], 256], + 13130: [[12511, 12522, 12496, 12540, 12523], 256], + 13131: [[12513, 12460], 256], + 13132: [[12513, 12460, 12488, 12531], 256], + 13133: [[12513, 12540, 12488, 12523], 256], + 13134: [[12516, 12540, 12489], 256], + 13135: [[12516, 12540, 12523], 256], + 13136: [[12518, 12450, 12531], 256], + 13137: [[12522, 12483, 12488, 12523], 256], + 13138: [[12522, 12521], 256], + 13139: [[12523, 12500, 12540], 256], + 13140: [[12523, 12540, 12502, 12523], 256], + 13141: [[12524, 12512], 256], + 13142: [[12524, 12531, 12488, 12466, 12531], 256], + 13143: [[12527, 12483, 12488], 256], + 13144: [[48, 28857], 256], + 13145: [[49, 28857], 256], + 13146: [[50, 28857], 256], + 13147: [[51, 28857], 256], + 13148: [[52, 28857], 256], + 13149: [[53, 28857], 256], + 13150: [[54, 28857], 256], + 13151: [[55, 28857], 256], + 13152: [[56, 28857], 256], + 13153: [[57, 28857], 256], + 13154: [[49, 48, 28857], 256], + 13155: [[49, 49, 28857], 256], + 13156: [[49, 50, 28857], 256], + 13157: [[49, 51, 28857], 256], + 13158: [[49, 52, 28857], 256], + 13159: [[49, 53, 28857], 256], + 13160: [[49, 54, 28857], 256], + 13161: [[49, 55, 28857], 256], + 13162: [[49, 56, 28857], 256], + 13163: [[49, 57, 28857], 256], + 13164: [[50, 48, 28857], 256], + 13165: [[50, 49, 28857], 256], + 13166: [[50, 50, 28857], 256], + 13167: [[50, 51, 28857], 256], + 13168: [[50, 52, 28857], 256], + 13169: [[104, 80, 97], 256], + 13170: [[100, 97], 256], + 13171: [[65, 85], 256], + 13172: [[98, 97, 114], 256], + 13173: [[111, 86], 256], + 13174: [[112, 99], 256], + 13175: [[100, 109], 256], + 13176: [[100, 109, 178], 256], + 13177: [[100, 109, 179], 256], + 13178: [[73, 85], 256], + 13179: [[24179, 25104], 256], + 13180: [[26157, 21644], 256], + 13181: [[22823, 27491], 256], + 13182: [[26126, 27835], 256], + 13183: [[26666, 24335, 20250, 31038], 256], + 13184: [[112, 65], 256], + 13185: [[110, 65], 256], + 13186: [[956, 65], 256], + 13187: [[109, 65], 256], + 13188: [[107, 65], 256], + 13189: [[75, 66], 256], + 13190: [[77, 66], 256], + 13191: [[71, 66], 256], + 13192: [[99, 97, 108], 256], + 13193: [[107, 99, 97, 108], 256], + 13194: [[112, 70], 256], + 13195: [[110, 70], 256], + 13196: [[956, 70], 256], + 13197: [[956, 103], 256], + 13198: [[109, 103], 256], + 13199: [[107, 103], 256], + 13200: [[72, 122], 256], + 13201: [[107, 72, 122], 256], + 13202: [[77, 72, 122], 256], + 13203: [[71, 72, 122], 256], + 13204: [[84, 72, 122], 256], + 13205: [[956, 8467], 256], + 13206: [[109, 8467], 256], + 13207: [[100, 8467], 256], + 13208: [[107, 8467], 256], + 13209: [[102, 109], 256], + 13210: [[110, 109], 256], + 13211: [[956, 109], 256], + 13212: [[109, 109], 256], + 13213: [[99, 109], 256], + 13214: [[107, 109], 256], + 13215: [[109, 109, 178], 256], + 13216: [[99, 109, 178], 256], + 13217: [[109, 178], 256], + 13218: [[107, 109, 178], 256], + 13219: [[109, 109, 179], 256], + 13220: [[99, 109, 179], 256], + 13221: [[109, 179], 256], + 13222: [[107, 109, 179], 256], + 13223: [[109, 8725, 115], 256], + 13224: [[109, 8725, 115, 178], 256], + 13225: [[80, 97], 256], + 13226: [[107, 80, 97], 256], + 13227: [[77, 80, 97], 256], + 13228: [[71, 80, 97], 256], + 13229: [[114, 97, 100], 256], + 13230: [[114, 97, 100, 8725, 115], 256], + 13231: [[114, 97, 100, 8725, 115, 178], 256], + 13232: [[112, 115], 256], + 13233: [[110, 115], 256], + 13234: [[956, 115], 256], + 13235: [[109, 115], 256], + 13236: [[112, 86], 256], + 13237: [[110, 86], 256], + 13238: [[956, 86], 256], + 13239: [[109, 86], 256], + 13240: [[107, 86], 256], + 13241: [[77, 86], 256], + 13242: [[112, 87], 256], + 13243: [[110, 87], 256], + 13244: [[956, 87], 256], + 13245: [[109, 87], 256], + 13246: [[107, 87], 256], + 13247: [[77, 87], 256], + 13248: [[107, 937], 256], + 13249: [[77, 937], 256], + 13250: [[97, 46, 109, 46], 256], + 13251: [[66, 113], 256], + 13252: [[99, 99], 256], + 13253: [[99, 100], 256], + 13254: [[67, 8725, 107, 103], 256], + 13255: [[67, 111, 46], 256], + 13256: [[100, 66], 256], + 13257: [[71, 121], 256], + 13258: [[104, 97], 256], + 13259: [[72, 80], 256], + 13260: [[105, 110], 256], + 13261: [[75, 75], 256], + 13262: [[75, 77], 256], + 13263: [[107, 116], 256], + 13264: [[108, 109], 256], + 13265: [[108, 110], 256], + 13266: [[108, 111, 103], 256], + 13267: [[108, 120], 256], + 13268: [[109, 98], 256], + 13269: [[109, 105, 108], 256], + 13270: [[109, 111, 108], 256], + 13271: [[80, 72], 256], + 13272: [[112, 46, 109, 46], 256], + 13273: [[80, 80, 77], 256], + 13274: [[80, 82], 256], + 13275: [[115, 114], 256], + 13276: [[83, 118], 256], + 13277: [[87, 98], 256], + 13278: [[86, 8725, 109], 256], + 13279: [[65, 8725, 109], 256], + 13280: [[49, 26085], 256], + 13281: [[50, 26085], 256], + 13282: [[51, 26085], 256], + 13283: [[52, 26085], 256], + 13284: [[53, 26085], 256], + 13285: [[54, 26085], 256], + 13286: [[55, 26085], 256], + 13287: [[56, 26085], 256], + 13288: [[57, 26085], 256], + 13289: [[49, 48, 26085], 256], + 13290: [[49, 49, 26085], 256], + 13291: [[49, 50, 26085], 256], + 13292: [[49, 51, 26085], 256], + 13293: [[49, 52, 26085], 256], + 13294: [[49, 53, 26085], 256], + 13295: [[49, 54, 26085], 256], + 13296: [[49, 55, 26085], 256], + 13297: [[49, 56, 26085], 256], + 13298: [[49, 57, 26085], 256], + 13299: [[50, 48, 26085], 256], + 13300: [[50, 49, 26085], 256], + 13301: [[50, 50, 26085], 256], + 13302: [[50, 51, 26085], 256], + 13303: [[50, 52, 26085], 256], + 13304: [[50, 53, 26085], 256], + 13305: [[50, 54, 26085], 256], + 13306: [[50, 55, 26085], 256], + 13307: [[50, 56, 26085], 256], + 13308: [[50, 57, 26085], 256], + 13309: [[51, 48, 26085], 256], + 13310: [[51, 49, 26085], 256], + 13311: [[103, 97, 108], 256] + }, + 42496: { + 42607: [, 230], + 42612: [, 230], + 42613: [, 230], + 42614: [, 230], + 42615: [, 230], + 42616: [, 230], + 42617: [, 230], + 42618: [, 230], + 42619: [, 230], + 42620: [, 230], + 42621: [, 230], + 42655: [, 230], + 42736: [, 230], + 42737: [, 230] + }, + 42752: { 42864: [[42863], 256], 43000: [[294], 256], 43001: [[339], 256] }, + 43008: { + 43014: [, 9], + 43204: [, 9], + 43232: [, 230], + 43233: [, 230], + 43234: [, 230], + 43235: [, 230], + 43236: [, 230], + 43237: [, 230], + 43238: [, 230], + 43239: [, 230], + 43240: [, 230], + 43241: [, 230], + 43242: [, 230], + 43243: [, 230], + 43244: [, 230], + 43245: [, 230], + 43246: [, 230], + 43247: [, 230], + 43248: [, 230], + 43249: [, 230] + }, + 43264: { + 43307: [, 220], + 43308: [, 220], + 43309: [, 220], + 43347: [, 9], + 43443: [, 7], + 43456: [, 9] + }, + 43520: { + 43696: [, 230], + 43698: [, 230], + 43699: [, 230], + 43700: [, 220], + 43703: [, 230], + 43704: [, 230], + 43710: [, 230], + 43711: [, 230], + 43713: [, 230], + 43766: [, 9] + }, + 43776: { 44013: [, 9] }, + 53504: { + 119134: [[119127, 119141], 512], + 119135: [[119128, 119141], 512], + 119136: [[119135, 119150], 512], + 119137: [[119135, 119151], 512], + 119138: [[119135, 119152], 512], + 119139: [[119135, 119153], 512], + 119140: [[119135, 119154], 512], + 119141: [, 216], + 119142: [, 216], + 119143: [, 1], + 119144: [, 1], + 119145: [, 1], + 119149: [, 226], + 119150: [, 216], + 119151: [, 216], + 119152: [, 216], + 119153: [, 216], + 119154: [, 216], + 119163: [, 220], + 119164: [, 220], + 119165: [, 220], + 119166: [, 220], + 119167: [, 220], + 119168: [, 220], + 119169: [, 220], + 119170: [, 220], + 119173: [, 230], + 119174: [, 230], + 119175: [, 230], + 119176: [, 230], + 119177: [, 230], + 119178: [, 220], + 119179: [, 220], + 119210: [, 230], + 119211: [, 230], + 119212: [, 230], + 119213: [, 230], + 119227: [[119225, 119141], 512], + 119228: [[119226, 119141], 512], + 119229: [[119227, 119150], 512], + 119230: [[119228, 119150], 512], + 119231: [[119227, 119151], 512], + 119232: [[119228, 119151], 512] + }, + 53760: { 119362: [, 230], 119363: [, 230], 119364: [, 230] }, + 54272: { + 119808: [[65], 256], + 119809: [[66], 256], + 119810: [[67], 256], + 119811: [[68], 256], + 119812: [[69], 256], + 119813: [[70], 256], + 119814: [[71], 256], + 119815: [[72], 256], + 119816: [[73], 256], + 119817: [[74], 256], + 119818: [[75], 256], + 119819: [[76], 256], + 119820: [[77], 256], + 119821: [[78], 256], + 119822: [[79], 256], + 119823: [[80], 256], + 119824: [[81], 256], + 119825: [[82], 256], + 119826: [[83], 256], + 119827: [[84], 256], + 119828: [[85], 256], + 119829: [[86], 256], + 119830: [[87], 256], + 119831: [[88], 256], + 119832: [[89], 256], + 119833: [[90], 256], + 119834: [[97], 256], + 119835: [[98], 256], + 119836: [[99], 256], + 119837: [[100], 256], + 119838: [[101], 256], + 119839: [[102], 256], + 119840: [[103], 256], + 119841: [[104], 256], + 119842: [[105], 256], + 119843: [[106], 256], + 119844: [[107], 256], + 119845: [[108], 256], + 119846: [[109], 256], + 119847: [[110], 256], + 119848: [[111], 256], + 119849: [[112], 256], + 119850: [[113], 256], + 119851: [[114], 256], + 119852: [[115], 256], + 119853: [[116], 256], + 119854: [[117], 256], + 119855: [[118], 256], + 119856: [[119], 256], + 119857: [[120], 256], + 119858: [[121], 256], + 119859: [[122], 256], + 119860: [[65], 256], + 119861: [[66], 256], + 119862: [[67], 256], + 119863: [[68], 256], + 119864: [[69], 256], + 119865: [[70], 256], + 119866: [[71], 256], + 119867: [[72], 256], + 119868: [[73], 256], + 119869: [[74], 256], + 119870: [[75], 256], + 119871: [[76], 256], + 119872: [[77], 256], + 119873: [[78], 256], + 119874: [[79], 256], + 119875: [[80], 256], + 119876: [[81], 256], + 119877: [[82], 256], + 119878: [[83], 256], + 119879: [[84], 256], + 119880: [[85], 256], + 119881: [[86], 256], + 119882: [[87], 256], + 119883: [[88], 256], + 119884: [[89], 256], + 119885: [[90], 256], + 119886: [[97], 256], + 119887: [[98], 256], + 119888: [[99], 256], + 119889: [[100], 256], + 119890: [[101], 256], + 119891: [[102], 256], + 119892: [[103], 256], + 119894: [[105], 256], + 119895: [[106], 256], + 119896: [[107], 256], + 119897: [[108], 256], + 119898: [[109], 256], + 119899: [[110], 256], + 119900: [[111], 256], + 119901: [[112], 256], + 119902: [[113], 256], + 119903: [[114], 256], + 119904: [[115], 256], + 119905: [[116], 256], + 119906: [[117], 256], + 119907: [[118], 256], + 119908: [[119], 256], + 119909: [[120], 256], + 119910: [[121], 256], + 119911: [[122], 256], + 119912: [[65], 256], + 119913: [[66], 256], + 119914: [[67], 256], + 119915: [[68], 256], + 119916: [[69], 256], + 119917: [[70], 256], + 119918: [[71], 256], + 119919: [[72], 256], + 119920: [[73], 256], + 119921: [[74], 256], + 119922: [[75], 256], + 119923: [[76], 256], + 119924: [[77], 256], + 119925: [[78], 256], + 119926: [[79], 256], + 119927: [[80], 256], + 119928: [[81], 256], + 119929: [[82], 256], + 119930: [[83], 256], + 119931: [[84], 256], + 119932: [[85], 256], + 119933: [[86], 256], + 119934: [[87], 256], + 119935: [[88], 256], + 119936: [[89], 256], + 119937: [[90], 256], + 119938: [[97], 256], + 119939: [[98], 256], + 119940: [[99], 256], + 119941: [[100], 256], + 119942: [[101], 256], + 119943: [[102], 256], + 119944: [[103], 256], + 119945: [[104], 256], + 119946: [[105], 256], + 119947: [[106], 256], + 119948: [[107], 256], + 119949: [[108], 256], + 119950: [[109], 256], + 119951: [[110], 256], + 119952: [[111], 256], + 119953: [[112], 256], + 119954: [[113], 256], + 119955: [[114], 256], + 119956: [[115], 256], + 119957: [[116], 256], + 119958: [[117], 256], + 119959: [[118], 256], + 119960: [[119], 256], + 119961: [[120], 256], + 119962: [[121], 256], + 119963: [[122], 256], + 119964: [[65], 256], + 119966: [[67], 256], + 119967: [[68], 256], + 119970: [[71], 256], + 119973: [[74], 256], + 119974: [[75], 256], + 119977: [[78], 256], + 119978: [[79], 256], + 119979: [[80], 256], + 119980: [[81], 256], + 119982: [[83], 256], + 119983: [[84], 256], + 119984: [[85], 256], + 119985: [[86], 256], + 119986: [[87], 256], + 119987: [[88], 256], + 119988: [[89], 256], + 119989: [[90], 256], + 119990: [[97], 256], + 119991: [[98], 256], + 119992: [[99], 256], + 119993: [[100], 256], + 119995: [[102], 256], + 119997: [[104], 256], + 119998: [[105], 256], + 119999: [[106], 256], + 120000: [[107], 256], + 120001: [[108], 256], + 120002: [[109], 256], + 120003: [[110], 256], + 120005: [[112], 256], + 120006: [[113], 256], + 120007: [[114], 256], + 120008: [[115], 256], + 120009: [[116], 256], + 120010: [[117], 256], + 120011: [[118], 256], + 120012: [[119], 256], + 120013: [[120], 256], + 120014: [[121], 256], + 120015: [[122], 256], + 120016: [[65], 256], + 120017: [[66], 256], + 120018: [[67], 256], + 120019: [[68], 256], + 120020: [[69], 256], + 120021: [[70], 256], + 120022: [[71], 256], + 120023: [[72], 256], + 120024: [[73], 256], + 120025: [[74], 256], + 120026: [[75], 256], + 120027: [[76], 256], + 120028: [[77], 256], + 120029: [[78], 256], + 120030: [[79], 256], + 120031: [[80], 256], + 120032: [[81], 256], + 120033: [[82], 256], + 120034: [[83], 256], + 120035: [[84], 256], + 120036: [[85], 256], + 120037: [[86], 256], + 120038: [[87], 256], + 120039: [[88], 256], + 120040: [[89], 256], + 120041: [[90], 256], + 120042: [[97], 256], + 120043: [[98], 256], + 120044: [[99], 256], + 120045: [[100], 256], + 120046: [[101], 256], + 120047: [[102], 256], + 120048: [[103], 256], + 120049: [[104], 256], + 120050: [[105], 256], + 120051: [[106], 256], + 120052: [[107], 256], + 120053: [[108], 256], + 120054: [[109], 256], + 120055: [[110], 256], + 120056: [[111], 256], + 120057: [[112], 256], + 120058: [[113], 256], + 120059: [[114], 256], + 120060: [[115], 256], + 120061: [[116], 256], + 120062: [[117], 256], + 120063: [[118], 256] + }, + 54528: { + 120064: [[119], 256], + 120065: [[120], 256], + 120066: [[121], 256], + 120067: [[122], 256], + 120068: [[65], 256], + 120069: [[66], 256], + 120071: [[68], 256], + 120072: [[69], 256], + 120073: [[70], 256], + 120074: [[71], 256], + 120077: [[74], 256], + 120078: [[75], 256], + 120079: [[76], 256], + 120080: [[77], 256], + 120081: [[78], 256], + 120082: [[79], 256], + 120083: [[80], 256], + 120084: [[81], 256], + 120086: [[83], 256], + 120087: [[84], 256], + 120088: [[85], 256], + 120089: [[86], 256], + 120090: [[87], 256], + 120091: [[88], 256], + 120092: [[89], 256], + 120094: [[97], 256], + 120095: [[98], 256], + 120096: [[99], 256], + 120097: [[100], 256], + 120098: [[101], 256], + 120099: [[102], 256], + 120100: [[103], 256], + 120101: [[104], 256], + 120102: [[105], 256], + 120103: [[106], 256], + 120104: [[107], 256], + 120105: [[108], 256], + 120106: [[109], 256], + 120107: [[110], 256], + 120108: [[111], 256], + 120109: [[112], 256], + 120110: [[113], 256], + 120111: [[114], 256], + 120112: [[115], 256], + 120113: [[116], 256], + 120114: [[117], 256], + 120115: [[118], 256], + 120116: [[119], 256], + 120117: [[120], 256], + 120118: [[121], 256], + 120119: [[122], 256], + 120120: [[65], 256], + 120121: [[66], 256], + 120123: [[68], 256], + 120124: [[69], 256], + 120125: [[70], 256], + 120126: [[71], 256], + 120128: [[73], 256], + 120129: [[74], 256], + 120130: [[75], 256], + 120131: [[76], 256], + 120132: [[77], 256], + 120134: [[79], 256], + 120138: [[83], 256], + 120139: [[84], 256], + 120140: [[85], 256], + 120141: [[86], 256], + 120142: [[87], 256], + 120143: [[88], 256], + 120144: [[89], 256], + 120146: [[97], 256], + 120147: [[98], 256], + 120148: [[99], 256], + 120149: [[100], 256], + 120150: [[101], 256], + 120151: [[102], 256], + 120152: [[103], 256], + 120153: [[104], 256], + 120154: [[105], 256], + 120155: [[106], 256], + 120156: [[107], 256], + 120157: [[108], 256], + 120158: [[109], 256], + 120159: [[110], 256], + 120160: [[111], 256], + 120161: [[112], 256], + 120162: [[113], 256], + 120163: [[114], 256], + 120164: [[115], 256], + 120165: [[116], 256], + 120166: [[117], 256], + 120167: [[118], 256], + 120168: [[119], 256], + 120169: [[120], 256], + 120170: [[121], 256], + 120171: [[122], 256], + 120172: [[65], 256], + 120173: [[66], 256], + 120174: [[67], 256], + 120175: [[68], 256], + 120176: [[69], 256], + 120177: [[70], 256], + 120178: [[71], 256], + 120179: [[72], 256], + 120180: [[73], 256], + 120181: [[74], 256], + 120182: [[75], 256], + 120183: [[76], 256], + 120184: [[77], 256], + 120185: [[78], 256], + 120186: [[79], 256], + 120187: [[80], 256], + 120188: [[81], 256], + 120189: [[82], 256], + 120190: [[83], 256], + 120191: [[84], 256], + 120192: [[85], 256], + 120193: [[86], 256], + 120194: [[87], 256], + 120195: [[88], 256], + 120196: [[89], 256], + 120197: [[90], 256], + 120198: [[97], 256], + 120199: [[98], 256], + 120200: [[99], 256], + 120201: [[100], 256], + 120202: [[101], 256], + 120203: [[102], 256], + 120204: [[103], 256], + 120205: [[104], 256], + 120206: [[105], 256], + 120207: [[106], 256], + 120208: [[107], 256], + 120209: [[108], 256], + 120210: [[109], 256], + 120211: [[110], 256], + 120212: [[111], 256], + 120213: [[112], 256], + 120214: [[113], 256], + 120215: [[114], 256], + 120216: [[115], 256], + 120217: [[116], 256], + 120218: [[117], 256], + 120219: [[118], 256], + 120220: [[119], 256], + 120221: [[120], 256], + 120222: [[121], 256], + 120223: [[122], 256], + 120224: [[65], 256], + 120225: [[66], 256], + 120226: [[67], 256], + 120227: [[68], 256], + 120228: [[69], 256], + 120229: [[70], 256], + 120230: [[71], 256], + 120231: [[72], 256], + 120232: [[73], 256], + 120233: [[74], 256], + 120234: [[75], 256], + 120235: [[76], 256], + 120236: [[77], 256], + 120237: [[78], 256], + 120238: [[79], 256], + 120239: [[80], 256], + 120240: [[81], 256], + 120241: [[82], 256], + 120242: [[83], 256], + 120243: [[84], 256], + 120244: [[85], 256], + 120245: [[86], 256], + 120246: [[87], 256], + 120247: [[88], 256], + 120248: [[89], 256], + 120249: [[90], 256], + 120250: [[97], 256], + 120251: [[98], 256], + 120252: [[99], 256], + 120253: [[100], 256], + 120254: [[101], 256], + 120255: [[102], 256], + 120256: [[103], 256], + 120257: [[104], 256], + 120258: [[105], 256], + 120259: [[106], 256], + 120260: [[107], 256], + 120261: [[108], 256], + 120262: [[109], 256], + 120263: [[110], 256], + 120264: [[111], 256], + 120265: [[112], 256], + 120266: [[113], 256], + 120267: [[114], 256], + 120268: [[115], 256], + 120269: [[116], 256], + 120270: [[117], 256], + 120271: [[118], 256], + 120272: [[119], 256], + 120273: [[120], 256], + 120274: [[121], 256], + 120275: [[122], 256], + 120276: [[65], 256], + 120277: [[66], 256], + 120278: [[67], 256], + 120279: [[68], 256], + 120280: [[69], 256], + 120281: [[70], 256], + 120282: [[71], 256], + 120283: [[72], 256], + 120284: [[73], 256], + 120285: [[74], 256], + 120286: [[75], 256], + 120287: [[76], 256], + 120288: [[77], 256], + 120289: [[78], 256], + 120290: [[79], 256], + 120291: [[80], 256], + 120292: [[81], 256], + 120293: [[82], 256], + 120294: [[83], 256], + 120295: [[84], 256], + 120296: [[85], 256], + 120297: [[86], 256], + 120298: [[87], 256], + 120299: [[88], 256], + 120300: [[89], 256], + 120301: [[90], 256], + 120302: [[97], 256], + 120303: [[98], 256], + 120304: [[99], 256], + 120305: [[100], 256], + 120306: [[101], 256], + 120307: [[102], 256], + 120308: [[103], 256], + 120309: [[104], 256], + 120310: [[105], 256], + 120311: [[106], 256], + 120312: [[107], 256], + 120313: [[108], 256], + 120314: [[109], 256], + 120315: [[110], 256], + 120316: [[111], 256], + 120317: [[112], 256], + 120318: [[113], 256], + 120319: [[114], 256] + }, + 54784: { + 120320: [[115], 256], + 120321: [[116], 256], + 120322: [[117], 256], + 120323: [[118], 256], + 120324: [[119], 256], + 120325: [[120], 256], + 120326: [[121], 256], + 120327: [[122], 256], + 120328: [[65], 256], + 120329: [[66], 256], + 120330: [[67], 256], + 120331: [[68], 256], + 120332: [[69], 256], + 120333: [[70], 256], + 120334: [[71], 256], + 120335: [[72], 256], + 120336: [[73], 256], + 120337: [[74], 256], + 120338: [[75], 256], + 120339: [[76], 256], + 120340: [[77], 256], + 120341: [[78], 256], + 120342: [[79], 256], + 120343: [[80], 256], + 120344: [[81], 256], + 120345: [[82], 256], + 120346: [[83], 256], + 120347: [[84], 256], + 120348: [[85], 256], + 120349: [[86], 256], + 120350: [[87], 256], + 120351: [[88], 256], + 120352: [[89], 256], + 120353: [[90], 256], + 120354: [[97], 256], + 120355: [[98], 256], + 120356: [[99], 256], + 120357: [[100], 256], + 120358: [[101], 256], + 120359: [[102], 256], + 120360: [[103], 256], + 120361: [[104], 256], + 120362: [[105], 256], + 120363: [[106], 256], + 120364: [[107], 256], + 120365: [[108], 256], + 120366: [[109], 256], + 120367: [[110], 256], + 120368: [[111], 256], + 120369: [[112], 256], + 120370: [[113], 256], + 120371: [[114], 256], + 120372: [[115], 256], + 120373: [[116], 256], + 120374: [[117], 256], + 120375: [[118], 256], + 120376: [[119], 256], + 120377: [[120], 256], + 120378: [[121], 256], + 120379: [[122], 256], + 120380: [[65], 256], + 120381: [[66], 256], + 120382: [[67], 256], + 120383: [[68], 256], + 120384: [[69], 256], + 120385: [[70], 256], + 120386: [[71], 256], + 120387: [[72], 256], + 120388: [[73], 256], + 120389: [[74], 256], + 120390: [[75], 256], + 120391: [[76], 256], + 120392: [[77], 256], + 120393: [[78], 256], + 120394: [[79], 256], + 120395: [[80], 256], + 120396: [[81], 256], + 120397: [[82], 256], + 120398: [[83], 256], + 120399: [[84], 256], + 120400: [[85], 256], + 120401: [[86], 256], + 120402: [[87], 256], + 120403: [[88], 256], + 120404: [[89], 256], + 120405: [[90], 256], + 120406: [[97], 256], + 120407: [[98], 256], + 120408: [[99], 256], + 120409: [[100], 256], + 120410: [[101], 256], + 120411: [[102], 256], + 120412: [[103], 256], + 120413: [[104], 256], + 120414: [[105], 256], + 120415: [[106], 256], + 120416: [[107], 256], + 120417: [[108], 256], + 120418: [[109], 256], + 120419: [[110], 256], + 120420: [[111], 256], + 120421: [[112], 256], + 120422: [[113], 256], + 120423: [[114], 256], + 120424: [[115], 256], + 120425: [[116], 256], + 120426: [[117], 256], + 120427: [[118], 256], + 120428: [[119], 256], + 120429: [[120], 256], + 120430: [[121], 256], + 120431: [[122], 256], + 120432: [[65], 256], + 120433: [[66], 256], + 120434: [[67], 256], + 120435: [[68], 256], + 120436: [[69], 256], + 120437: [[70], 256], + 120438: [[71], 256], + 120439: [[72], 256], + 120440: [[73], 256], + 120441: [[74], 256], + 120442: [[75], 256], + 120443: [[76], 256], + 120444: [[77], 256], + 120445: [[78], 256], + 120446: [[79], 256], + 120447: [[80], 256], + 120448: [[81], 256], + 120449: [[82], 256], + 120450: [[83], 256], + 120451: [[84], 256], + 120452: [[85], 256], + 120453: [[86], 256], + 120454: [[87], 256], + 120455: [[88], 256], + 120456: [[89], 256], + 120457: [[90], 256], + 120458: [[97], 256], + 120459: [[98], 256], + 120460: [[99], 256], + 120461: [[100], 256], + 120462: [[101], 256], + 120463: [[102], 256], + 120464: [[103], 256], + 120465: [[104], 256], + 120466: [[105], 256], + 120467: [[106], 256], + 120468: [[107], 256], + 120469: [[108], 256], + 120470: [[109], 256], + 120471: [[110], 256], + 120472: [[111], 256], + 120473: [[112], 256], + 120474: [[113], 256], + 120475: [[114], 256], + 120476: [[115], 256], + 120477: [[116], 256], + 120478: [[117], 256], + 120479: [[118], 256], + 120480: [[119], 256], + 120481: [[120], 256], + 120482: [[121], 256], + 120483: [[122], 256], + 120484: [[305], 256], + 120485: [[567], 256], + 120488: [[913], 256], + 120489: [[914], 256], + 120490: [[915], 256], + 120491: [[916], 256], + 120492: [[917], 256], + 120493: [[918], 256], + 120494: [[919], 256], + 120495: [[920], 256], + 120496: [[921], 256], + 120497: [[922], 256], + 120498: [[923], 256], + 120499: [[924], 256], + 120500: [[925], 256], + 120501: [[926], 256], + 120502: [[927], 256], + 120503: [[928], 256], + 120504: [[929], 256], + 120505: [[1012], 256], + 120506: [[931], 256], + 120507: [[932], 256], + 120508: [[933], 256], + 120509: [[934], 256], + 120510: [[935], 256], + 120511: [[936], 256], + 120512: [[937], 256], + 120513: [[8711], 256], + 120514: [[945], 256], + 120515: [[946], 256], + 120516: [[947], 256], + 120517: [[948], 256], + 120518: [[949], 256], + 120519: [[950], 256], + 120520: [[951], 256], + 120521: [[952], 256], + 120522: [[953], 256], + 120523: [[954], 256], + 120524: [[955], 256], + 120525: [[956], 256], + 120526: [[957], 256], + 120527: [[958], 256], + 120528: [[959], 256], + 120529: [[960], 256], + 120530: [[961], 256], + 120531: [[962], 256], + 120532: [[963], 256], + 120533: [[964], 256], + 120534: [[965], 256], + 120535: [[966], 256], + 120536: [[967], 256], + 120537: [[968], 256], + 120538: [[969], 256], + 120539: [[8706], 256], + 120540: [[1013], 256], + 120541: [[977], 256], + 120542: [[1008], 256], + 120543: [[981], 256], + 120544: [[1009], 256], + 120545: [[982], 256], + 120546: [[913], 256], + 120547: [[914], 256], + 120548: [[915], 256], + 120549: [[916], 256], + 120550: [[917], 256], + 120551: [[918], 256], + 120552: [[919], 256], + 120553: [[920], 256], + 120554: [[921], 256], + 120555: [[922], 256], + 120556: [[923], 256], + 120557: [[924], 256], + 120558: [[925], 256], + 120559: [[926], 256], + 120560: [[927], 256], + 120561: [[928], 256], + 120562: [[929], 256], + 120563: [[1012], 256], + 120564: [[931], 256], + 120565: [[932], 256], + 120566: [[933], 256], + 120567: [[934], 256], + 120568: [[935], 256], + 120569: [[936], 256], + 120570: [[937], 256], + 120571: [[8711], 256], + 120572: [[945], 256], + 120573: [[946], 256], + 120574: [[947], 256], + 120575: [[948], 256] + }, + 55040: { + 120576: [[949], 256], + 120577: [[950], 256], + 120578: [[951], 256], + 120579: [[952], 256], + 120580: [[953], 256], + 120581: [[954], 256], + 120582: [[955], 256], + 120583: [[956], 256], + 120584: [[957], 256], + 120585: [[958], 256], + 120586: [[959], 256], + 120587: [[960], 256], + 120588: [[961], 256], + 120589: [[962], 256], + 120590: [[963], 256], + 120591: [[964], 256], + 120592: [[965], 256], + 120593: [[966], 256], + 120594: [[967], 256], + 120595: [[968], 256], + 120596: [[969], 256], + 120597: [[8706], 256], + 120598: [[1013], 256], + 120599: [[977], 256], + 120600: [[1008], 256], + 120601: [[981], 256], + 120602: [[1009], 256], + 120603: [[982], 256], + 120604: [[913], 256], + 120605: [[914], 256], + 120606: [[915], 256], + 120607: [[916], 256], + 120608: [[917], 256], + 120609: [[918], 256], + 120610: [[919], 256], + 120611: [[920], 256], + 120612: [[921], 256], + 120613: [[922], 256], + 120614: [[923], 256], + 120615: [[924], 256], + 120616: [[925], 256], + 120617: [[926], 256], + 120618: [[927], 256], + 120619: [[928], 256], + 120620: [[929], 256], + 120621: [[1012], 256], + 120622: [[931], 256], + 120623: [[932], 256], + 120624: [[933], 256], + 120625: [[934], 256], + 120626: [[935], 256], + 120627: [[936], 256], + 120628: [[937], 256], + 120629: [[8711], 256], + 120630: [[945], 256], + 120631: [[946], 256], + 120632: [[947], 256], + 120633: [[948], 256], + 120634: [[949], 256], + 120635: [[950], 256], + 120636: [[951], 256], + 120637: [[952], 256], + 120638: [[953], 256], + 120639: [[954], 256], + 120640: [[955], 256], + 120641: [[956], 256], + 120642: [[957], 256], + 120643: [[958], 256], + 120644: [[959], 256], + 120645: [[960], 256], + 120646: [[961], 256], + 120647: [[962], 256], + 120648: [[963], 256], + 120649: [[964], 256], + 120650: [[965], 256], + 120651: [[966], 256], + 120652: [[967], 256], + 120653: [[968], 256], + 120654: [[969], 256], + 120655: [[8706], 256], + 120656: [[1013], 256], + 120657: [[977], 256], + 120658: [[1008], 256], + 120659: [[981], 256], + 120660: [[1009], 256], + 120661: [[982], 256], + 120662: [[913], 256], + 120663: [[914], 256], + 120664: [[915], 256], + 120665: [[916], 256], + 120666: [[917], 256], + 120667: [[918], 256], + 120668: [[919], 256], + 120669: [[920], 256], + 120670: [[921], 256], + 120671: [[922], 256], + 120672: [[923], 256], + 120673: [[924], 256], + 120674: [[925], 256], + 120675: [[926], 256], + 120676: [[927], 256], + 120677: [[928], 256], + 120678: [[929], 256], + 120679: [[1012], 256], + 120680: [[931], 256], + 120681: [[932], 256], + 120682: [[933], 256], + 120683: [[934], 256], + 120684: [[935], 256], + 120685: [[936], 256], + 120686: [[937], 256], + 120687: [[8711], 256], + 120688: [[945], 256], + 120689: [[946], 256], + 120690: [[947], 256], + 120691: [[948], 256], + 120692: [[949], 256], + 120693: [[950], 256], + 120694: [[951], 256], + 120695: [[952], 256], + 120696: [[953], 256], + 120697: [[954], 256], + 120698: [[955], 256], + 120699: [[956], 256], + 120700: [[957], 256], + 120701: [[958], 256], + 120702: [[959], 256], + 120703: [[960], 256], + 120704: [[961], 256], + 120705: [[962], 256], + 120706: [[963], 256], + 120707: [[964], 256], + 120708: [[965], 256], + 120709: [[966], 256], + 120710: [[967], 256], + 120711: [[968], 256], + 120712: [[969], 256], + 120713: [[8706], 256], + 120714: [[1013], 256], + 120715: [[977], 256], + 120716: [[1008], 256], + 120717: [[981], 256], + 120718: [[1009], 256], + 120719: [[982], 256], + 120720: [[913], 256], + 120721: [[914], 256], + 120722: [[915], 256], + 120723: [[916], 256], + 120724: [[917], 256], + 120725: [[918], 256], + 120726: [[919], 256], + 120727: [[920], 256], + 120728: [[921], 256], + 120729: [[922], 256], + 120730: [[923], 256], + 120731: [[924], 256], + 120732: [[925], 256], + 120733: [[926], 256], + 120734: [[927], 256], + 120735: [[928], 256], + 120736: [[929], 256], + 120737: [[1012], 256], + 120738: [[931], 256], + 120739: [[932], 256], + 120740: [[933], 256], + 120741: [[934], 256], + 120742: [[935], 256], + 120743: [[936], 256], + 120744: [[937], 256], + 120745: [[8711], 256], + 120746: [[945], 256], + 120747: [[946], 256], + 120748: [[947], 256], + 120749: [[948], 256], + 120750: [[949], 256], + 120751: [[950], 256], + 120752: [[951], 256], + 120753: [[952], 256], + 120754: [[953], 256], + 120755: [[954], 256], + 120756: [[955], 256], + 120757: [[956], 256], + 120758: [[957], 256], + 120759: [[958], 256], + 120760: [[959], 256], + 120761: [[960], 256], + 120762: [[961], 256], + 120763: [[962], 256], + 120764: [[963], 256], + 120765: [[964], 256], + 120766: [[965], 256], + 120767: [[966], 256], + 120768: [[967], 256], + 120769: [[968], 256], + 120770: [[969], 256], + 120771: [[8706], 256], + 120772: [[1013], 256], + 120773: [[977], 256], + 120774: [[1008], 256], + 120775: [[981], 256], + 120776: [[1009], 256], + 120777: [[982], 256], + 120778: [[988], 256], + 120779: [[989], 256], + 120782: [[48], 256], + 120783: [[49], 256], + 120784: [[50], 256], + 120785: [[51], 256], + 120786: [[52], 256], + 120787: [[53], 256], + 120788: [[54], 256], + 120789: [[55], 256], + 120790: [[56], 256], + 120791: [[57], 256], + 120792: [[48], 256], + 120793: [[49], 256], + 120794: [[50], 256], + 120795: [[51], 256], + 120796: [[52], 256], + 120797: [[53], 256], + 120798: [[54], 256], + 120799: [[55], 256], + 120800: [[56], 256], + 120801: [[57], 256], + 120802: [[48], 256], + 120803: [[49], 256], + 120804: [[50], 256], + 120805: [[51], 256], + 120806: [[52], 256], + 120807: [[53], 256], + 120808: [[54], 256], + 120809: [[55], 256], + 120810: [[56], 256], + 120811: [[57], 256], + 120812: [[48], 256], + 120813: [[49], 256], + 120814: [[50], 256], + 120815: [[51], 256], + 120816: [[52], 256], + 120817: [[53], 256], + 120818: [[54], 256], + 120819: [[55], 256], + 120820: [[56], 256], + 120821: [[57], 256], + 120822: [[48], 256], + 120823: [[49], 256], + 120824: [[50], 256], + 120825: [[51], 256], + 120826: [[52], 256], + 120827: [[53], 256], + 120828: [[54], 256], + 120829: [[55], 256], + 120830: [[56], 256], + 120831: [[57], 256] + }, + 60928: { + 126464: [[1575], 256], + 126465: [[1576], 256], + 126466: [[1580], 256], + 126467: [[1583], 256], + 126469: [[1608], 256], + 126470: [[1586], 256], + 126471: [[1581], 256], + 126472: [[1591], 256], + 126473: [[1610], 256], + 126474: [[1603], 256], + 126475: [[1604], 256], + 126476: [[1605], 256], + 126477: [[1606], 256], + 126478: [[1587], 256], + 126479: [[1593], 256], + 126480: [[1601], 256], + 126481: [[1589], 256], + 126482: [[1602], 256], + 126483: [[1585], 256], + 126484: [[1588], 256], + 126485: [[1578], 256], + 126486: [[1579], 256], + 126487: [[1582], 256], + 126488: [[1584], 256], + 126489: [[1590], 256], + 126490: [[1592], 256], + 126491: [[1594], 256], + 126492: [[1646], 256], + 126493: [[1722], 256], + 126494: [[1697], 256], + 126495: [[1647], 256], + 126497: [[1576], 256], + 126498: [[1580], 256], + 126500: [[1607], 256], + 126503: [[1581], 256], + 126505: [[1610], 256], + 126506: [[1603], 256], + 126507: [[1604], 256], + 126508: [[1605], 256], + 126509: [[1606], 256], + 126510: [[1587], 256], + 126511: [[1593], 256], + 126512: [[1601], 256], + 126513: [[1589], 256], + 126514: [[1602], 256], + 126516: [[1588], 256], + 126517: [[1578], 256], + 126518: [[1579], 256], + 126519: [[1582], 256], + 126521: [[1590], 256], + 126523: [[1594], 256], + 126530: [[1580], 256], + 126535: [[1581], 256], + 126537: [[1610], 256], + 126539: [[1604], 256], + 126541: [[1606], 256], + 126542: [[1587], 256], + 126543: [[1593], 256], + 126545: [[1589], 256], + 126546: [[1602], 256], + 126548: [[1588], 256], + 126551: [[1582], 256], + 126553: [[1590], 256], + 126555: [[1594], 256], + 126557: [[1722], 256], + 126559: [[1647], 256], + 126561: [[1576], 256], + 126562: [[1580], 256], + 126564: [[1607], 256], + 126567: [[1581], 256], + 126568: [[1591], 256], + 126569: [[1610], 256], + 126570: [[1603], 256], + 126572: [[1605], 256], + 126573: [[1606], 256], + 126574: [[1587], 256], + 126575: [[1593], 256], + 126576: [[1601], 256], + 126577: [[1589], 256], + 126578: [[1602], 256], + 126580: [[1588], 256], + 126581: [[1578], 256], + 126582: [[1579], 256], + 126583: [[1582], 256], + 126585: [[1590], 256], + 126586: [[1592], 256], + 126587: [[1594], 256], + 126588: [[1646], 256], + 126590: [[1697], 256], + 126592: [[1575], 256], + 126593: [[1576], 256], + 126594: [[1580], 256], + 126595: [[1583], 256], + 126596: [[1607], 256], + 126597: [[1608], 256], + 126598: [[1586], 256], + 126599: [[1581], 256], + 126600: [[1591], 256], + 126601: [[1610], 256], + 126603: [[1604], 256], + 126604: [[1605], 256], + 126605: [[1606], 256], + 126606: [[1587], 256], + 126607: [[1593], 256], + 126608: [[1601], 256], + 126609: [[1589], 256], + 126610: [[1602], 256], + 126611: [[1585], 256], + 126612: [[1588], 256], + 126613: [[1578], 256], + 126614: [[1579], 256], + 126615: [[1582], 256], + 126616: [[1584], 256], + 126617: [[1590], 256], + 126618: [[1592], 256], + 126619: [[1594], 256], + 126625: [[1576], 256], + 126626: [[1580], 256], + 126627: [[1583], 256], + 126629: [[1608], 256], + 126630: [[1586], 256], + 126631: [[1581], 256], + 126632: [[1591], 256], + 126633: [[1610], 256], + 126635: [[1604], 256], + 126636: [[1605], 256], + 126637: [[1606], 256], + 126638: [[1587], 256], + 126639: [[1593], 256], + 126640: [[1601], 256], + 126641: [[1589], 256], + 126642: [[1602], 256], + 126643: [[1585], 256], + 126644: [[1588], 256], + 126645: [[1578], 256], + 126646: [[1579], 256], + 126647: [[1582], 256], + 126648: [[1584], 256], + 126649: [[1590], 256], + 126650: [[1592], 256], + 126651: [[1594], 256] + }, + 61696: { + 127232: [[48, 46], 256], + 127233: [[48, 44], 256], + 127234: [[49, 44], 256], + 127235: [[50, 44], 256], + 127236: [[51, 44], 256], + 127237: [[52, 44], 256], + 127238: [[53, 44], 256], + 127239: [[54, 44], 256], + 127240: [[55, 44], 256], + 127241: [[56, 44], 256], + 127242: [[57, 44], 256], + 127248: [[40, 65, 41], 256], + 127249: [[40, 66, 41], 256], + 127250: [[40, 67, 41], 256], + 127251: [[40, 68, 41], 256], + 127252: [[40, 69, 41], 256], + 127253: [[40, 70, 41], 256], + 127254: [[40, 71, 41], 256], + 127255: [[40, 72, 41], 256], + 127256: [[40, 73, 41], 256], + 127257: [[40, 74, 41], 256], + 127258: [[40, 75, 41], 256], + 127259: [[40, 76, 41], 256], + 127260: [[40, 77, 41], 256], + 127261: [[40, 78, 41], 256], + 127262: [[40, 79, 41], 256], + 127263: [[40, 80, 41], 256], + 127264: [[40, 81, 41], 256], + 127265: [[40, 82, 41], 256], + 127266: [[40, 83, 41], 256], + 127267: [[40, 84, 41], 256], + 127268: [[40, 85, 41], 256], + 127269: [[40, 86, 41], 256], + 127270: [[40, 87, 41], 256], + 127271: [[40, 88, 41], 256], + 127272: [[40, 89, 41], 256], + 127273: [[40, 90, 41], 256], + 127274: [[12308, 83, 12309], 256], + 127275: [[67], 256], + 127276: [[82], 256], + 127277: [[67, 68], 256], + 127278: [[87, 90], 256], + 127280: [[65], 256], + 127281: [[66], 256], + 127282: [[67], 256], + 127283: [[68], 256], + 127284: [[69], 256], + 127285: [[70], 256], + 127286: [[71], 256], + 127287: [[72], 256], + 127288: [[73], 256], + 127289: [[74], 256], + 127290: [[75], 256], + 127291: [[76], 256], + 127292: [[77], 256], + 127293: [[78], 256], + 127294: [[79], 256], + 127295: [[80], 256], + 127296: [[81], 256], + 127297: [[82], 256], + 127298: [[83], 256], + 127299: [[84], 256], + 127300: [[85], 256], + 127301: [[86], 256], + 127302: [[87], 256], + 127303: [[88], 256], + 127304: [[89], 256], + 127305: [[90], 256], + 127306: [[72, 86], 256], + 127307: [[77, 86], 256], + 127308: [[83, 68], 256], + 127309: [[83, 83], 256], + 127310: [[80, 80, 86], 256], + 127311: [[87, 67], 256], + 127338: [[77, 67], 256], + 127339: [[77, 68], 256], + 127376: [[68, 74], 256] + }, + 61952: { + 127488: [[12411, 12363], 256], + 127489: [[12467, 12467], 256], + 127490: [[12469], 256], + 127504: [[25163], 256], + 127505: [[23383], 256], + 127506: [[21452], 256], + 127507: [[12487], 256], + 127508: [[20108], 256], + 127509: [[22810], 256], + 127510: [[35299], 256], + 127511: [[22825], 256], + 127512: [[20132], 256], + 127513: [[26144], 256], + 127514: [[28961], 256], + 127515: [[26009], 256], + 127516: [[21069], 256], + 127517: [[24460], 256], + 127518: [[20877], 256], + 127519: [[26032], 256], + 127520: [[21021], 256], + 127521: [[32066], 256], + 127522: [[29983], 256], + 127523: [[36009], 256], + 127524: [[22768], 256], + 127525: [[21561], 256], + 127526: [[28436], 256], + 127527: [[25237], 256], + 127528: [[25429], 256], + 127529: [[19968], 256], + 127530: [[19977], 256], + 127531: [[36938], 256], + 127532: [[24038], 256], + 127533: [[20013], 256], + 127534: [[21491], 256], + 127535: [[25351], 256], + 127536: [[36208], 256], + 127537: [[25171], 256], + 127538: [[31105], 256], + 127539: [[31354], 256], + 127540: [[21512], 256], + 127541: [[28288], 256], + 127542: [[26377], 256], + 127543: [[26376], 256], + 127544: [[30003], 256], + 127545: [[21106], 256], + 127546: [[21942], 256], + 127552: [[12308, 26412, 12309], 256], + 127553: [[12308, 19977, 12309], 256], + 127554: [[12308, 20108, 12309], 256], + 127555: [[12308, 23433, 12309], 256], + 127556: [[12308, 28857, 12309], 256], + 127557: [[12308, 25171, 12309], 256], + 127558: [[12308, 30423, 12309], 256], + 127559: [[12308, 21213, 12309], 256], + 127560: [[12308, 25943, 12309], 256], + 127568: [[24471], 256], + 127569: [[21487], 256] + }, + 63488: { + 194560: [[20029]], + 194561: [[20024]], + 194562: [[20033]], + 194563: [[131362]], + 194564: [[20320]], + 194565: [[20398]], + 194566: [[20411]], + 194567: [[20482]], + 194568: [[20602]], + 194569: [[20633]], + 194570: [[20711]], + 194571: [[20687]], + 194572: [[13470]], + 194573: [[132666]], + 194574: [[20813]], + 194575: [[20820]], + 194576: [[20836]], + 194577: [[20855]], + 194578: [[132380]], + 194579: [[13497]], + 194580: [[20839]], + 194581: [[20877]], + 194582: [[132427]], + 194583: [[20887]], + 194584: [[20900]], + 194585: [[20172]], + 194586: [[20908]], + 194587: [[20917]], + 194588: [[168415]], + 194589: [[20981]], + 194590: [[20995]], + 194591: [[13535]], + 194592: [[21051]], + 194593: [[21062]], + 194594: [[21106]], + 194595: [[21111]], + 194596: [[13589]], + 194597: [[21191]], + 194598: [[21193]], + 194599: [[21220]], + 194600: [[21242]], + 194601: [[21253]], + 194602: [[21254]], + 194603: [[21271]], + 194604: [[21321]], + 194605: [[21329]], + 194606: [[21338]], + 194607: [[21363]], + 194608: [[21373]], + 194609: [[21375]], + 194610: [[21375]], + 194611: [[21375]], + 194612: [[133676]], + 194613: [[28784]], + 194614: [[21450]], + 194615: [[21471]], + 194616: [[133987]], + 194617: [[21483]], + 194618: [[21489]], + 194619: [[21510]], + 194620: [[21662]], + 194621: [[21560]], + 194622: [[21576]], + 194623: [[21608]], + 194624: [[21666]], + 194625: [[21750]], + 194626: [[21776]], + 194627: [[21843]], + 194628: [[21859]], + 194629: [[21892]], + 194630: [[21892]], + 194631: [[21913]], + 194632: [[21931]], + 194633: [[21939]], + 194634: [[21954]], + 194635: [[22294]], + 194636: [[22022]], + 194637: [[22295]], + 194638: [[22097]], + 194639: [[22132]], + 194640: [[20999]], + 194641: [[22766]], + 194642: [[22478]], + 194643: [[22516]], + 194644: [[22541]], + 194645: [[22411]], + 194646: [[22578]], + 194647: [[22577]], + 194648: [[22700]], + 194649: [[136420]], + 194650: [[22770]], + 194651: [[22775]], + 194652: [[22790]], + 194653: [[22810]], + 194654: [[22818]], + 194655: [[22882]], + 194656: [[136872]], + 194657: [[136938]], + 194658: [[23020]], + 194659: [[23067]], + 194660: [[23079]], + 194661: [[23000]], + 194662: [[23142]], + 194663: [[14062]], + 194664: [[14076]], + 194665: [[23304]], + 194666: [[23358]], + 194667: [[23358]], + 194668: [[137672]], + 194669: [[23491]], + 194670: [[23512]], + 194671: [[23527]], + 194672: [[23539]], + 194673: [[138008]], + 194674: [[23551]], + 194675: [[23558]], + 194676: [[24403]], + 194677: [[23586]], + 194678: [[14209]], + 194679: [[23648]], + 194680: [[23662]], + 194681: [[23744]], + 194682: [[23693]], + 194683: [[138724]], + 194684: [[23875]], + 194685: [[138726]], + 194686: [[23918]], + 194687: [[23915]], + 194688: [[23932]], + 194689: [[24033]], + 194690: [[24034]], + 194691: [[14383]], + 194692: [[24061]], + 194693: [[24104]], + 194694: [[24125]], + 194695: [[24169]], + 194696: [[14434]], + 194697: [[139651]], + 194698: [[14460]], + 194699: [[24240]], + 194700: [[24243]], + 194701: [[24246]], + 194702: [[24266]], + 194703: [[172946]], + 194704: [[24318]], + 194705: [[140081]], + 194706: [[140081]], + 194707: [[33281]], + 194708: [[24354]], + 194709: [[24354]], + 194710: [[14535]], + 194711: [[144056]], + 194712: [[156122]], + 194713: [[24418]], + 194714: [[24427]], + 194715: [[14563]], + 194716: [[24474]], + 194717: [[24525]], + 194718: [[24535]], + 194719: [[24569]], + 194720: [[24705]], + 194721: [[14650]], + 194722: [[14620]], + 194723: [[24724]], + 194724: [[141012]], + 194725: [[24775]], + 194726: [[24904]], + 194727: [[24908]], + 194728: [[24910]], + 194729: [[24908]], + 194730: [[24954]], + 194731: [[24974]], + 194732: [[25010]], + 194733: [[24996]], + 194734: [[25007]], + 194735: [[25054]], + 194736: [[25074]], + 194737: [[25078]], + 194738: [[25104]], + 194739: [[25115]], + 194740: [[25181]], + 194741: [[25265]], + 194742: [[25300]], + 194743: [[25424]], + 194744: [[142092]], + 194745: [[25405]], + 194746: [[25340]], + 194747: [[25448]], + 194748: [[25475]], + 194749: [[25572]], + 194750: [[142321]], + 194751: [[25634]], + 194752: [[25541]], + 194753: [[25513]], + 194754: [[14894]], + 194755: [[25705]], + 194756: [[25726]], + 194757: [[25757]], + 194758: [[25719]], + 194759: [[14956]], + 194760: [[25935]], + 194761: [[25964]], + 194762: [[143370]], + 194763: [[26083]], + 194764: [[26360]], + 194765: [[26185]], + 194766: [[15129]], + 194767: [[26257]], + 194768: [[15112]], + 194769: [[15076]], + 194770: [[20882]], + 194771: [[20885]], + 194772: [[26368]], + 194773: [[26268]], + 194774: [[32941]], + 194775: [[17369]], + 194776: [[26391]], + 194777: [[26395]], + 194778: [[26401]], + 194779: [[26462]], + 194780: [[26451]], + 194781: [[144323]], + 194782: [[15177]], + 194783: [[26618]], + 194784: [[26501]], + 194785: [[26706]], + 194786: [[26757]], + 194787: [[144493]], + 194788: [[26766]], + 194789: [[26655]], + 194790: [[26900]], + 194791: [[15261]], + 194792: [[26946]], + 194793: [[27043]], + 194794: [[27114]], + 194795: [[27304]], + 194796: [[145059]], + 194797: [[27355]], + 194798: [[15384]], + 194799: [[27425]], + 194800: [[145575]], + 194801: [[27476]], + 194802: [[15438]], + 194803: [[27506]], + 194804: [[27551]], + 194805: [[27578]], + 194806: [[27579]], + 194807: [[146061]], + 194808: [[138507]], + 194809: [[146170]], + 194810: [[27726]], + 194811: [[146620]], + 194812: [[27839]], + 194813: [[27853]], + 194814: [[27751]], + 194815: [[27926]] + }, + 63744: { + 63744: [[35912]], + 63745: [[26356]], + 63746: [[36554]], + 63747: [[36040]], + 63748: [[28369]], + 63749: [[20018]], + 63750: [[21477]], + 63751: [[40860]], + 63752: [[40860]], + 63753: [[22865]], + 63754: [[37329]], + 63755: [[21895]], + 63756: [[22856]], + 63757: [[25078]], + 63758: [[30313]], + 63759: [[32645]], + 63760: [[34367]], + 63761: [[34746]], + 63762: [[35064]], + 63763: [[37007]], + 63764: [[27138]], + 63765: [[27931]], + 63766: [[28889]], + 63767: [[29662]], + 63768: [[33853]], + 63769: [[37226]], + 63770: [[39409]], + 63771: [[20098]], + 63772: [[21365]], + 63773: [[27396]], + 63774: [[29211]], + 63775: [[34349]], + 63776: [[40478]], + 63777: [[23888]], + 63778: [[28651]], + 63779: [[34253]], + 63780: [[35172]], + 63781: [[25289]], + 63782: [[33240]], + 63783: [[34847]], + 63784: [[24266]], + 63785: [[26391]], + 63786: [[28010]], + 63787: [[29436]], + 63788: [[37070]], + 63789: [[20358]], + 63790: [[20919]], + 63791: [[21214]], + 63792: [[25796]], + 63793: [[27347]], + 63794: [[29200]], + 63795: [[30439]], + 63796: [[32769]], + 63797: [[34310]], + 63798: [[34396]], + 63799: [[36335]], + 63800: [[38706]], + 63801: [[39791]], + 63802: [[40442]], + 63803: [[30860]], + 63804: [[31103]], + 63805: [[32160]], + 63806: [[33737]], + 63807: [[37636]], + 63808: [[40575]], + 63809: [[35542]], + 63810: [[22751]], + 63811: [[24324]], + 63812: [[31840]], + 63813: [[32894]], + 63814: [[29282]], + 63815: [[30922]], + 63816: [[36034]], + 63817: [[38647]], + 63818: [[22744]], + 63819: [[23650]], + 63820: [[27155]], + 63821: [[28122]], + 63822: [[28431]], + 63823: [[32047]], + 63824: [[32311]], + 63825: [[38475]], + 63826: [[21202]], + 63827: [[32907]], + 63828: [[20956]], + 63829: [[20940]], + 63830: [[31260]], + 63831: [[32190]], + 63832: [[33777]], + 63833: [[38517]], + 63834: [[35712]], + 63835: [[25295]], + 63836: [[27138]], + 63837: [[35582]], + 63838: [[20025]], + 63839: [[23527]], + 63840: [[24594]], + 63841: [[29575]], + 63842: [[30064]], + 63843: [[21271]], + 63844: [[30971]], + 63845: [[20415]], + 63846: [[24489]], + 63847: [[19981]], + 63848: [[27852]], + 63849: [[25976]], + 63850: [[32034]], + 63851: [[21443]], + 63852: [[22622]], + 63853: [[30465]], + 63854: [[33865]], + 63855: [[35498]], + 63856: [[27578]], + 63857: [[36784]], + 63858: [[27784]], + 63859: [[25342]], + 63860: [[33509]], + 63861: [[25504]], + 63862: [[30053]], + 63863: [[20142]], + 63864: [[20841]], + 63865: [[20937]], + 63866: [[26753]], + 63867: [[31975]], + 63868: [[33391]], + 63869: [[35538]], + 63870: [[37327]], + 63871: [[21237]], + 63872: [[21570]], + 63873: [[22899]], + 63874: [[24300]], + 63875: [[26053]], + 63876: [[28670]], + 63877: [[31018]], + 63878: [[38317]], + 63879: [[39530]], + 63880: [[40599]], + 63881: [[40654]], + 63882: [[21147]], + 63883: [[26310]], + 63884: [[27511]], + 63885: [[36706]], + 63886: [[24180]], + 63887: [[24976]], + 63888: [[25088]], + 63889: [[25754]], + 63890: [[28451]], + 63891: [[29001]], + 63892: [[29833]], + 63893: [[31178]], + 63894: [[32244]], + 63895: [[32879]], + 63896: [[36646]], + 63897: [[34030]], + 63898: [[36899]], + 63899: [[37706]], + 63900: [[21015]], + 63901: [[21155]], + 63902: [[21693]], + 63903: [[28872]], + 63904: [[35010]], + 63905: [[35498]], + 63906: [[24265]], + 63907: [[24565]], + 63908: [[25467]], + 63909: [[27566]], + 63910: [[31806]], + 63911: [[29557]], + 63912: [[20196]], + 63913: [[22265]], + 63914: [[23527]], + 63915: [[23994]], + 63916: [[24604]], + 63917: [[29618]], + 63918: [[29801]], + 63919: [[32666]], + 63920: [[32838]], + 63921: [[37428]], + 63922: [[38646]], + 63923: [[38728]], + 63924: [[38936]], + 63925: [[20363]], + 63926: [[31150]], + 63927: [[37300]], + 63928: [[38584]], + 63929: [[24801]], + 63930: [[20102]], + 63931: [[20698]], + 63932: [[23534]], + 63933: [[23615]], + 63934: [[26009]], + 63935: [[27138]], + 63936: [[29134]], + 63937: [[30274]], + 63938: [[34044]], + 63939: [[36988]], + 63940: [[40845]], + 63941: [[26248]], + 63942: [[38446]], + 63943: [[21129]], + 63944: [[26491]], + 63945: [[26611]], + 63946: [[27969]], + 63947: [[28316]], + 63948: [[29705]], + 63949: [[30041]], + 63950: [[30827]], + 63951: [[32016]], + 63952: [[39006]], + 63953: [[20845]], + 63954: [[25134]], + 63955: [[38520]], + 63956: [[20523]], + 63957: [[23833]], + 63958: [[28138]], + 63959: [[36650]], + 63960: [[24459]], + 63961: [[24900]], + 63962: [[26647]], + 63963: [[29575]], + 63964: [[38534]], + 63965: [[21033]], + 63966: [[21519]], + 63967: [[23653]], + 63968: [[26131]], + 63969: [[26446]], + 63970: [[26792]], + 63971: [[27877]], + 63972: [[29702]], + 63973: [[30178]], + 63974: [[32633]], + 63975: [[35023]], + 63976: [[35041]], + 63977: [[37324]], + 63978: [[38626]], + 63979: [[21311]], + 63980: [[28346]], + 63981: [[21533]], + 63982: [[29136]], + 63983: [[29848]], + 63984: [[34298]], + 63985: [[38563]], + 63986: [[40023]], + 63987: [[40607]], + 63988: [[26519]], + 63989: [[28107]], + 63990: [[33256]], + 63991: [[31435]], + 63992: [[31520]], + 63993: [[31890]], + 63994: [[29376]], + 63995: [[28825]], + 63996: [[35672]], + 63997: [[20160]], + 63998: [[33590]], + 63999: [[21050]], + 194816: [[27966]], + 194817: [[28023]], + 194818: [[27969]], + 194819: [[28009]], + 194820: [[28024]], + 194821: [[28037]], + 194822: [[146718]], + 194823: [[27956]], + 194824: [[28207]], + 194825: [[28270]], + 194826: [[15667]], + 194827: [[28363]], + 194828: [[28359]], + 194829: [[147153]], + 194830: [[28153]], + 194831: [[28526]], + 194832: [[147294]], + 194833: [[147342]], + 194834: [[28614]], + 194835: [[28729]], + 194836: [[28702]], + 194837: [[28699]], + 194838: [[15766]], + 194839: [[28746]], + 194840: [[28797]], + 194841: [[28791]], + 194842: [[28845]], + 194843: [[132389]], + 194844: [[28997]], + 194845: [[148067]], + 194846: [[29084]], + 194847: [[148395]], + 194848: [[29224]], + 194849: [[29237]], + 194850: [[29264]], + 194851: [[149000]], + 194852: [[29312]], + 194853: [[29333]], + 194854: [[149301]], + 194855: [[149524]], + 194856: [[29562]], + 194857: [[29579]], + 194858: [[16044]], + 194859: [[29605]], + 194860: [[16056]], + 194861: [[16056]], + 194862: [[29767]], + 194863: [[29788]], + 194864: [[29809]], + 194865: [[29829]], + 194866: [[29898]], + 194867: [[16155]], + 194868: [[29988]], + 194869: [[150582]], + 194870: [[30014]], + 194871: [[150674]], + 194872: [[30064]], + 194873: [[139679]], + 194874: [[30224]], + 194875: [[151457]], + 194876: [[151480]], + 194877: [[151620]], + 194878: [[16380]], + 194879: [[16392]], + 194880: [[30452]], + 194881: [[151795]], + 194882: [[151794]], + 194883: [[151833]], + 194884: [[151859]], + 194885: [[30494]], + 194886: [[30495]], + 194887: [[30495]], + 194888: [[30538]], + 194889: [[16441]], + 194890: [[30603]], + 194891: [[16454]], + 194892: [[16534]], + 194893: [[152605]], + 194894: [[30798]], + 194895: [[30860]], + 194896: [[30924]], + 194897: [[16611]], + 194898: [[153126]], + 194899: [[31062]], + 194900: [[153242]], + 194901: [[153285]], + 194902: [[31119]], + 194903: [[31211]], + 194904: [[16687]], + 194905: [[31296]], + 194906: [[31306]], + 194907: [[31311]], + 194908: [[153980]], + 194909: [[154279]], + 194910: [[154279]], + 194911: [[31470]], + 194912: [[16898]], + 194913: [[154539]], + 194914: [[31686]], + 194915: [[31689]], + 194916: [[16935]], + 194917: [[154752]], + 194918: [[31954]], + 194919: [[17056]], + 194920: [[31976]], + 194921: [[31971]], + 194922: [[32000]], + 194923: [[155526]], + 194924: [[32099]], + 194925: [[17153]], + 194926: [[32199]], + 194927: [[32258]], + 194928: [[32325]], + 194929: [[17204]], + 194930: [[156200]], + 194931: [[156231]], + 194932: [[17241]], + 194933: [[156377]], + 194934: [[32634]], + 194935: [[156478]], + 194936: [[32661]], + 194937: [[32762]], + 194938: [[32773]], + 194939: [[156890]], + 194940: [[156963]], + 194941: [[32864]], + 194942: [[157096]], + 194943: [[32880]], + 194944: [[144223]], + 194945: [[17365]], + 194946: [[32946]], + 194947: [[33027]], + 194948: [[17419]], + 194949: [[33086]], + 194950: [[23221]], + 194951: [[157607]], + 194952: [[157621]], + 194953: [[144275]], + 194954: [[144284]], + 194955: [[33281]], + 194956: [[33284]], + 194957: [[36766]], + 194958: [[17515]], + 194959: [[33425]], + 194960: [[33419]], + 194961: [[33437]], + 194962: [[21171]], + 194963: [[33457]], + 194964: [[33459]], + 194965: [[33469]], + 194966: [[33510]], + 194967: [[158524]], + 194968: [[33509]], + 194969: [[33565]], + 194970: [[33635]], + 194971: [[33709]], + 194972: [[33571]], + 194973: [[33725]], + 194974: [[33767]], + 194975: [[33879]], + 194976: [[33619]], + 194977: [[33738]], + 194978: [[33740]], + 194979: [[33756]], + 194980: [[158774]], + 194981: [[159083]], + 194982: [[158933]], + 194983: [[17707]], + 194984: [[34033]], + 194985: [[34035]], + 194986: [[34070]], + 194987: [[160714]], + 194988: [[34148]], + 194989: [[159532]], + 194990: [[17757]], + 194991: [[17761]], + 194992: [[159665]], + 194993: [[159954]], + 194994: [[17771]], + 194995: [[34384]], + 194996: [[34396]], + 194997: [[34407]], + 194998: [[34409]], + 194999: [[34473]], + 195000: [[34440]], + 195001: [[34574]], + 195002: [[34530]], + 195003: [[34681]], + 195004: [[34600]], + 195005: [[34667]], + 195006: [[34694]], + 195007: [[17879]], + 195008: [[34785]], + 195009: [[34817]], + 195010: [[17913]], + 195011: [[34912]], + 195012: [[34915]], + 195013: [[161383]], + 195014: [[35031]], + 195015: [[35038]], + 195016: [[17973]], + 195017: [[35066]], + 195018: [[13499]], + 195019: [[161966]], + 195020: [[162150]], + 195021: [[18110]], + 195022: [[18119]], + 195023: [[35488]], + 195024: [[35565]], + 195025: [[35722]], + 195026: [[35925]], + 195027: [[162984]], + 195028: [[36011]], + 195029: [[36033]], + 195030: [[36123]], + 195031: [[36215]], + 195032: [[163631]], + 195033: [[133124]], + 195034: [[36299]], + 195035: [[36284]], + 195036: [[36336]], + 195037: [[133342]], + 195038: [[36564]], + 195039: [[36664]], + 195040: [[165330]], + 195041: [[165357]], + 195042: [[37012]], + 195043: [[37105]], + 195044: [[37137]], + 195045: [[165678]], + 195046: [[37147]], + 195047: [[37432]], + 195048: [[37591]], + 195049: [[37592]], + 195050: [[37500]], + 195051: [[37881]], + 195052: [[37909]], + 195053: [[166906]], + 195054: [[38283]], + 195055: [[18837]], + 195056: [[38327]], + 195057: [[167287]], + 195058: [[18918]], + 195059: [[38595]], + 195060: [[23986]], + 195061: [[38691]], + 195062: [[168261]], + 195063: [[168474]], + 195064: [[19054]], + 195065: [[19062]], + 195066: [[38880]], + 195067: [[168970]], + 195068: [[19122]], + 195069: [[169110]], + 195070: [[38923]], + 195071: [[38923]] + }, + 64000: { + 64000: [[20999]], + 64001: [[24230]], + 64002: [[25299]], + 64003: [[31958]], + 64004: [[23429]], + 64005: [[27934]], + 64006: [[26292]], + 64007: [[36667]], + 64008: [[34892]], + 64009: [[38477]], + 64010: [[35211]], + 64011: [[24275]], + 64012: [[20800]], + 64013: [[21952]], + 64016: [[22618]], + 64018: [[26228]], + 64021: [[20958]], + 64022: [[29482]], + 64023: [[30410]], + 64024: [[31036]], + 64025: [[31070]], + 64026: [[31077]], + 64027: [[31119]], + 64028: [[38742]], + 64029: [[31934]], + 64030: [[32701]], + 64032: [[34322]], + 64034: [[35576]], + 64037: [[36920]], + 64038: [[37117]], + 64042: [[39151]], + 64043: [[39164]], + 64044: [[39208]], + 64045: [[40372]], + 64046: [[37086]], + 64047: [[38583]], + 64048: [[20398]], + 64049: [[20711]], + 64050: [[20813]], + 64051: [[21193]], + 64052: [[21220]], + 64053: [[21329]], + 64054: [[21917]], + 64055: [[22022]], + 64056: [[22120]], + 64057: [[22592]], + 64058: [[22696]], + 64059: [[23652]], + 64060: [[23662]], + 64061: [[24724]], + 64062: [[24936]], + 64063: [[24974]], + 64064: [[25074]], + 64065: [[25935]], + 64066: [[26082]], + 64067: [[26257]], + 64068: [[26757]], + 64069: [[28023]], + 64070: [[28186]], + 64071: [[28450]], + 64072: [[29038]], + 64073: [[29227]], + 64074: [[29730]], + 64075: [[30865]], + 64076: [[31038]], + 64077: [[31049]], + 64078: [[31048]], + 64079: [[31056]], + 64080: [[31062]], + 64081: [[31069]], + 64082: [[31117]], + 64083: [[31118]], + 64084: [[31296]], + 64085: [[31361]], + 64086: [[31680]], + 64087: [[32244]], + 64088: [[32265]], + 64089: [[32321]], + 64090: [[32626]], + 64091: [[32773]], + 64092: [[33261]], + 64093: [[33401]], + 64094: [[33401]], + 64095: [[33879]], + 64096: [[35088]], + 64097: [[35222]], + 64098: [[35585]], + 64099: [[35641]], + 64100: [[36051]], + 64101: [[36104]], + 64102: [[36790]], + 64103: [[36920]], + 64104: [[38627]], + 64105: [[38911]], + 64106: [[38971]], + 64107: [[24693]], + 64108: [[148206]], + 64109: [[33304]], + 64112: [[20006]], + 64113: [[20917]], + 64114: [[20840]], + 64115: [[20352]], + 64116: [[20805]], + 64117: [[20864]], + 64118: [[21191]], + 64119: [[21242]], + 64120: [[21917]], + 64121: [[21845]], + 64122: [[21913]], + 64123: [[21986]], + 64124: [[22618]], + 64125: [[22707]], + 64126: [[22852]], + 64127: [[22868]], + 64128: [[23138]], + 64129: [[23336]], + 64130: [[24274]], + 64131: [[24281]], + 64132: [[24425]], + 64133: [[24493]], + 64134: [[24792]], + 64135: [[24910]], + 64136: [[24840]], + 64137: [[24974]], + 64138: [[24928]], + 64139: [[25074]], + 64140: [[25140]], + 64141: [[25540]], + 64142: [[25628]], + 64143: [[25682]], + 64144: [[25942]], + 64145: [[26228]], + 64146: [[26391]], + 64147: [[26395]], + 64148: [[26454]], + 64149: [[27513]], + 64150: [[27578]], + 64151: [[27969]], + 64152: [[28379]], + 64153: [[28363]], + 64154: [[28450]], + 64155: [[28702]], + 64156: [[29038]], + 64157: [[30631]], + 64158: [[29237]], + 64159: [[29359]], + 64160: [[29482]], + 64161: [[29809]], + 64162: [[29958]], + 64163: [[30011]], + 64164: [[30237]], + 64165: [[30239]], + 64166: [[30410]], + 64167: [[30427]], + 64168: [[30452]], + 64169: [[30538]], + 64170: [[30528]], + 64171: [[30924]], + 64172: [[31409]], + 64173: [[31680]], + 64174: [[31867]], + 64175: [[32091]], + 64176: [[32244]], + 64177: [[32574]], + 64178: [[32773]], + 64179: [[33618]], + 64180: [[33775]], + 64181: [[34681]], + 64182: [[35137]], + 64183: [[35206]], + 64184: [[35222]], + 64185: [[35519]], + 64186: [[35576]], + 64187: [[35531]], + 64188: [[35585]], + 64189: [[35582]], + 64190: [[35565]], + 64191: [[35641]], + 64192: [[35722]], + 64193: [[36104]], + 64194: [[36664]], + 64195: [[36978]], + 64196: [[37273]], + 64197: [[37494]], + 64198: [[38524]], + 64199: [[38627]], + 64200: [[38742]], + 64201: [[38875]], + 64202: [[38911]], + 64203: [[38923]], + 64204: [[38971]], + 64205: [[39698]], + 64206: [[40860]], + 64207: [[141386]], + 64208: [[141380]], + 64209: [[144341]], + 64210: [[15261]], + 64211: [[16408]], + 64212: [[16441]], + 64213: [[152137]], + 64214: [[154832]], + 64215: [[163539]], + 64216: [[40771]], + 64217: [[40846]], + 195072: [[38953]], + 195073: [[169398]], + 195074: [[39138]], + 195075: [[19251]], + 195076: [[39209]], + 195077: [[39335]], + 195078: [[39362]], + 195079: [[39422]], + 195080: [[19406]], + 195081: [[170800]], + 195082: [[39698]], + 195083: [[40000]], + 195084: [[40189]], + 195085: [[19662]], + 195086: [[19693]], + 195087: [[40295]], + 195088: [[172238]], + 195089: [[19704]], + 195090: [[172293]], + 195091: [[172558]], + 195092: [[172689]], + 195093: [[40635]], + 195094: [[19798]], + 195095: [[40697]], + 195096: [[40702]], + 195097: [[40709]], + 195098: [[40719]], + 195099: [[40726]], + 195100: [[40763]], + 195101: [[173568]] + }, + 64256: { + 64256: [[102, 102], 256], + 64257: [[102, 105], 256], + 64258: [[102, 108], 256], + 64259: [[102, 102, 105], 256], + 64260: [[102, 102, 108], 256], + 64261: [[383, 116], 256], + 64262: [[115, 116], 256], + 64275: [[1396, 1398], 256], + 64276: [[1396, 1381], 256], + 64277: [[1396, 1387], 256], + 64278: [[1406, 1398], 256], + 64279: [[1396, 1389], 256], + 64285: [[1497, 1460], 512], + 64286: [, 26], + 64287: [[1522, 1463], 512], + 64288: [[1506], 256], + 64289: [[1488], 256], + 64290: [[1491], 256], + 64291: [[1492], 256], + 64292: [[1499], 256], + 64293: [[1500], 256], + 64294: [[1501], 256], + 64295: [[1512], 256], + 64296: [[1514], 256], + 64297: [[43], 256], + 64298: [[1513, 1473], 512], + 64299: [[1513, 1474], 512], + 64300: [[64329, 1473], 512], + 64301: [[64329, 1474], 512], + 64302: [[1488, 1463], 512], + 64303: [[1488, 1464], 512], + 64304: [[1488, 1468], 512], + 64305: [[1489, 1468], 512], + 64306: [[1490, 1468], 512], + 64307: [[1491, 1468], 512], + 64308: [[1492, 1468], 512], + 64309: [[1493, 1468], 512], + 64310: [[1494, 1468], 512], + 64312: [[1496, 1468], 512], + 64313: [[1497, 1468], 512], + 64314: [[1498, 1468], 512], + 64315: [[1499, 1468], 512], + 64316: [[1500, 1468], 512], + 64318: [[1502, 1468], 512], + 64320: [[1504, 1468], 512], + 64321: [[1505, 1468], 512], + 64323: [[1507, 1468], 512], + 64324: [[1508, 1468], 512], + 64326: [[1510, 1468], 512], + 64327: [[1511, 1468], 512], + 64328: [[1512, 1468], 512], + 64329: [[1513, 1468], 512], + 64330: [[1514, 1468], 512], + 64331: [[1493, 1465], 512], + 64332: [[1489, 1471], 512], + 64333: [[1499, 1471], 512], + 64334: [[1508, 1471], 512], + 64335: [[1488, 1500], 256], + 64336: [[1649], 256], + 64337: [[1649], 256], + 64338: [[1659], 256], + 64339: [[1659], 256], + 64340: [[1659], 256], + 64341: [[1659], 256], + 64342: [[1662], 256], + 64343: [[1662], 256], + 64344: [[1662], 256], + 64345: [[1662], 256], + 64346: [[1664], 256], + 64347: [[1664], 256], + 64348: [[1664], 256], + 64349: [[1664], 256], + 64350: [[1658], 256], + 64351: [[1658], 256], + 64352: [[1658], 256], + 64353: [[1658], 256], + 64354: [[1663], 256], + 64355: [[1663], 256], + 64356: [[1663], 256], + 64357: [[1663], 256], + 64358: [[1657], 256], + 64359: [[1657], 256], + 64360: [[1657], 256], + 64361: [[1657], 256], + 64362: [[1700], 256], + 64363: [[1700], 256], + 64364: [[1700], 256], + 64365: [[1700], 256], + 64366: [[1702], 256], + 64367: [[1702], 256], + 64368: [[1702], 256], + 64369: [[1702], 256], + 64370: [[1668], 256], + 64371: [[1668], 256], + 64372: [[1668], 256], + 64373: [[1668], 256], + 64374: [[1667], 256], + 64375: [[1667], 256], + 64376: [[1667], 256], + 64377: [[1667], 256], + 64378: [[1670], 256], + 64379: [[1670], 256], + 64380: [[1670], 256], + 64381: [[1670], 256], + 64382: [[1671], 256], + 64383: [[1671], 256], + 64384: [[1671], 256], + 64385: [[1671], 256], + 64386: [[1677], 256], + 64387: [[1677], 256], + 64388: [[1676], 256], + 64389: [[1676], 256], + 64390: [[1678], 256], + 64391: [[1678], 256], + 64392: [[1672], 256], + 64393: [[1672], 256], + 64394: [[1688], 256], + 64395: [[1688], 256], + 64396: [[1681], 256], + 64397: [[1681], 256], + 64398: [[1705], 256], + 64399: [[1705], 256], + 64400: [[1705], 256], + 64401: [[1705], 256], + 64402: [[1711], 256], + 64403: [[1711], 256], + 64404: [[1711], 256], + 64405: [[1711], 256], + 64406: [[1715], 256], + 64407: [[1715], 256], + 64408: [[1715], 256], + 64409: [[1715], 256], + 64410: [[1713], 256], + 64411: [[1713], 256], + 64412: [[1713], 256], + 64413: [[1713], 256], + 64414: [[1722], 256], + 64415: [[1722], 256], + 64416: [[1723], 256], + 64417: [[1723], 256], + 64418: [[1723], 256], + 64419: [[1723], 256], + 64420: [[1728], 256], + 64421: [[1728], 256], + 64422: [[1729], 256], + 64423: [[1729], 256], + 64424: [[1729], 256], + 64425: [[1729], 256], + 64426: [[1726], 256], + 64427: [[1726], 256], + 64428: [[1726], 256], + 64429: [[1726], 256], + 64430: [[1746], 256], + 64431: [[1746], 256], + 64432: [[1747], 256], + 64433: [[1747], 256], + 64467: [[1709], 256], + 64468: [[1709], 256], + 64469: [[1709], 256], + 64470: [[1709], 256], + 64471: [[1735], 256], + 64472: [[1735], 256], + 64473: [[1734], 256], + 64474: [[1734], 256], + 64475: [[1736], 256], + 64476: [[1736], 256], + 64477: [[1655], 256], + 64478: [[1739], 256], + 64479: [[1739], 256], + 64480: [[1733], 256], + 64481: [[1733], 256], + 64482: [[1737], 256], + 64483: [[1737], 256], + 64484: [[1744], 256], + 64485: [[1744], 256], + 64486: [[1744], 256], + 64487: [[1744], 256], + 64488: [[1609], 256], + 64489: [[1609], 256], + 64490: [[1574, 1575], 256], + 64491: [[1574, 1575], 256], + 64492: [[1574, 1749], 256], + 64493: [[1574, 1749], 256], + 64494: [[1574, 1608], 256], + 64495: [[1574, 1608], 256], + 64496: [[1574, 1735], 256], + 64497: [[1574, 1735], 256], + 64498: [[1574, 1734], 256], + 64499: [[1574, 1734], 256], + 64500: [[1574, 1736], 256], + 64501: [[1574, 1736], 256], + 64502: [[1574, 1744], 256], + 64503: [[1574, 1744], 256], + 64504: [[1574, 1744], 256], + 64505: [[1574, 1609], 256], + 64506: [[1574, 1609], 256], + 64507: [[1574, 1609], 256], + 64508: [[1740], 256], + 64509: [[1740], 256], + 64510: [[1740], 256], + 64511: [[1740], 256] + }, + 64512: { + 64512: [[1574, 1580], 256], + 64513: [[1574, 1581], 256], + 64514: [[1574, 1605], 256], + 64515: [[1574, 1609], 256], + 64516: [[1574, 1610], 256], + 64517: [[1576, 1580], 256], + 64518: [[1576, 1581], 256], + 64519: [[1576, 1582], 256], + 64520: [[1576, 1605], 256], + 64521: [[1576, 1609], 256], + 64522: [[1576, 1610], 256], + 64523: [[1578, 1580], 256], + 64524: [[1578, 1581], 256], + 64525: [[1578, 1582], 256], + 64526: [[1578, 1605], 256], + 64527: [[1578, 1609], 256], + 64528: [[1578, 1610], 256], + 64529: [[1579, 1580], 256], + 64530: [[1579, 1605], 256], + 64531: [[1579, 1609], 256], + 64532: [[1579, 1610], 256], + 64533: [[1580, 1581], 256], + 64534: [[1580, 1605], 256], + 64535: [[1581, 1580], 256], + 64536: [[1581, 1605], 256], + 64537: [[1582, 1580], 256], + 64538: [[1582, 1581], 256], + 64539: [[1582, 1605], 256], + 64540: [[1587, 1580], 256], + 64541: [[1587, 1581], 256], + 64542: [[1587, 1582], 256], + 64543: [[1587, 1605], 256], + 64544: [[1589, 1581], 256], + 64545: [[1589, 1605], 256], + 64546: [[1590, 1580], 256], + 64547: [[1590, 1581], 256], + 64548: [[1590, 1582], 256], + 64549: [[1590, 1605], 256], + 64550: [[1591, 1581], 256], + 64551: [[1591, 1605], 256], + 64552: [[1592, 1605], 256], + 64553: [[1593, 1580], 256], + 64554: [[1593, 1605], 256], + 64555: [[1594, 1580], 256], + 64556: [[1594, 1605], 256], + 64557: [[1601, 1580], 256], + 64558: [[1601, 1581], 256], + 64559: [[1601, 1582], 256], + 64560: [[1601, 1605], 256], + 64561: [[1601, 1609], 256], + 64562: [[1601, 1610], 256], + 64563: [[1602, 1581], 256], + 64564: [[1602, 1605], 256], + 64565: [[1602, 1609], 256], + 64566: [[1602, 1610], 256], + 64567: [[1603, 1575], 256], + 64568: [[1603, 1580], 256], + 64569: [[1603, 1581], 256], + 64570: [[1603, 1582], 256], + 64571: [[1603, 1604], 256], + 64572: [[1603, 1605], 256], + 64573: [[1603, 1609], 256], + 64574: [[1603, 1610], 256], + 64575: [[1604, 1580], 256], + 64576: [[1604, 1581], 256], + 64577: [[1604, 1582], 256], + 64578: [[1604, 1605], 256], + 64579: [[1604, 1609], 256], + 64580: [[1604, 1610], 256], + 64581: [[1605, 1580], 256], + 64582: [[1605, 1581], 256], + 64583: [[1605, 1582], 256], + 64584: [[1605, 1605], 256], + 64585: [[1605, 1609], 256], + 64586: [[1605, 1610], 256], + 64587: [[1606, 1580], 256], + 64588: [[1606, 1581], 256], + 64589: [[1606, 1582], 256], + 64590: [[1606, 1605], 256], + 64591: [[1606, 1609], 256], + 64592: [[1606, 1610], 256], + 64593: [[1607, 1580], 256], + 64594: [[1607, 1605], 256], + 64595: [[1607, 1609], 256], + 64596: [[1607, 1610], 256], + 64597: [[1610, 1580], 256], + 64598: [[1610, 1581], 256], + 64599: [[1610, 1582], 256], + 64600: [[1610, 1605], 256], + 64601: [[1610, 1609], 256], + 64602: [[1610, 1610], 256], + 64603: [[1584, 1648], 256], + 64604: [[1585, 1648], 256], + 64605: [[1609, 1648], 256], + 64606: [[32, 1612, 1617], 256], + 64607: [[32, 1613, 1617], 256], + 64608: [[32, 1614, 1617], 256], + 64609: [[32, 1615, 1617], 256], + 64610: [[32, 1616, 1617], 256], + 64611: [[32, 1617, 1648], 256], + 64612: [[1574, 1585], 256], + 64613: [[1574, 1586], 256], + 64614: [[1574, 1605], 256], + 64615: [[1574, 1606], 256], + 64616: [[1574, 1609], 256], + 64617: [[1574, 1610], 256], + 64618: [[1576, 1585], 256], + 64619: [[1576, 1586], 256], + 64620: [[1576, 1605], 256], + 64621: [[1576, 1606], 256], + 64622: [[1576, 1609], 256], + 64623: [[1576, 1610], 256], + 64624: [[1578, 1585], 256], + 64625: [[1578, 1586], 256], + 64626: [[1578, 1605], 256], + 64627: [[1578, 1606], 256], + 64628: [[1578, 1609], 256], + 64629: [[1578, 1610], 256], + 64630: [[1579, 1585], 256], + 64631: [[1579, 1586], 256], + 64632: [[1579, 1605], 256], + 64633: [[1579, 1606], 256], + 64634: [[1579, 1609], 256], + 64635: [[1579, 1610], 256], + 64636: [[1601, 1609], 256], + 64637: [[1601, 1610], 256], + 64638: [[1602, 1609], 256], + 64639: [[1602, 1610], 256], + 64640: [[1603, 1575], 256], + 64641: [[1603, 1604], 256], + 64642: [[1603, 1605], 256], + 64643: [[1603, 1609], 256], + 64644: [[1603, 1610], 256], + 64645: [[1604, 1605], 256], + 64646: [[1604, 1609], 256], + 64647: [[1604, 1610], 256], + 64648: [[1605, 1575], 256], + 64649: [[1605, 1605], 256], + 64650: [[1606, 1585], 256], + 64651: [[1606, 1586], 256], + 64652: [[1606, 1605], 256], + 64653: [[1606, 1606], 256], + 64654: [[1606, 1609], 256], + 64655: [[1606, 1610], 256], + 64656: [[1609, 1648], 256], + 64657: [[1610, 1585], 256], + 64658: [[1610, 1586], 256], + 64659: [[1610, 1605], 256], + 64660: [[1610, 1606], 256], + 64661: [[1610, 1609], 256], + 64662: [[1610, 1610], 256], + 64663: [[1574, 1580], 256], + 64664: [[1574, 1581], 256], + 64665: [[1574, 1582], 256], + 64666: [[1574, 1605], 256], + 64667: [[1574, 1607], 256], + 64668: [[1576, 1580], 256], + 64669: [[1576, 1581], 256], + 64670: [[1576, 1582], 256], + 64671: [[1576, 1605], 256], + 64672: [[1576, 1607], 256], + 64673: [[1578, 1580], 256], + 64674: [[1578, 1581], 256], + 64675: [[1578, 1582], 256], + 64676: [[1578, 1605], 256], + 64677: [[1578, 1607], 256], + 64678: [[1579, 1605], 256], + 64679: [[1580, 1581], 256], + 64680: [[1580, 1605], 256], + 64681: [[1581, 1580], 256], + 64682: [[1581, 1605], 256], + 64683: [[1582, 1580], 256], + 64684: [[1582, 1605], 256], + 64685: [[1587, 1580], 256], + 64686: [[1587, 1581], 256], + 64687: [[1587, 1582], 256], + 64688: [[1587, 1605], 256], + 64689: [[1589, 1581], 256], + 64690: [[1589, 1582], 256], + 64691: [[1589, 1605], 256], + 64692: [[1590, 1580], 256], + 64693: [[1590, 1581], 256], + 64694: [[1590, 1582], 256], + 64695: [[1590, 1605], 256], + 64696: [[1591, 1581], 256], + 64697: [[1592, 1605], 256], + 64698: [[1593, 1580], 256], + 64699: [[1593, 1605], 256], + 64700: [[1594, 1580], 256], + 64701: [[1594, 1605], 256], + 64702: [[1601, 1580], 256], + 64703: [[1601, 1581], 256], + 64704: [[1601, 1582], 256], + 64705: [[1601, 1605], 256], + 64706: [[1602, 1581], 256], + 64707: [[1602, 1605], 256], + 64708: [[1603, 1580], 256], + 64709: [[1603, 1581], 256], + 64710: [[1603, 1582], 256], + 64711: [[1603, 1604], 256], + 64712: [[1603, 1605], 256], + 64713: [[1604, 1580], 256], + 64714: [[1604, 1581], 256], + 64715: [[1604, 1582], 256], + 64716: [[1604, 1605], 256], + 64717: [[1604, 1607], 256], + 64718: [[1605, 1580], 256], + 64719: [[1605, 1581], 256], + 64720: [[1605, 1582], 256], + 64721: [[1605, 1605], 256], + 64722: [[1606, 1580], 256], + 64723: [[1606, 1581], 256], + 64724: [[1606, 1582], 256], + 64725: [[1606, 1605], 256], + 64726: [[1606, 1607], 256], + 64727: [[1607, 1580], 256], + 64728: [[1607, 1605], 256], + 64729: [[1607, 1648], 256], + 64730: [[1610, 1580], 256], + 64731: [[1610, 1581], 256], + 64732: [[1610, 1582], 256], + 64733: [[1610, 1605], 256], + 64734: [[1610, 1607], 256], + 64735: [[1574, 1605], 256], + 64736: [[1574, 1607], 256], + 64737: [[1576, 1605], 256], + 64738: [[1576, 1607], 256], + 64739: [[1578, 1605], 256], + 64740: [[1578, 1607], 256], + 64741: [[1579, 1605], 256], + 64742: [[1579, 1607], 256], + 64743: [[1587, 1605], 256], + 64744: [[1587, 1607], 256], + 64745: [[1588, 1605], 256], + 64746: [[1588, 1607], 256], + 64747: [[1603, 1604], 256], + 64748: [[1603, 1605], 256], + 64749: [[1604, 1605], 256], + 64750: [[1606, 1605], 256], + 64751: [[1606, 1607], 256], + 64752: [[1610, 1605], 256], + 64753: [[1610, 1607], 256], + 64754: [[1600, 1614, 1617], 256], + 64755: [[1600, 1615, 1617], 256], + 64756: [[1600, 1616, 1617], 256], + 64757: [[1591, 1609], 256], + 64758: [[1591, 1610], 256], + 64759: [[1593, 1609], 256], + 64760: [[1593, 1610], 256], + 64761: [[1594, 1609], 256], + 64762: [[1594, 1610], 256], + 64763: [[1587, 1609], 256], + 64764: [[1587, 1610], 256], + 64765: [[1588, 1609], 256], + 64766: [[1588, 1610], 256], + 64767: [[1581, 1609], 256] + }, + 64768: { + 64768: [[1581, 1610], 256], + 64769: [[1580, 1609], 256], + 64770: [[1580, 1610], 256], + 64771: [[1582, 1609], 256], + 64772: [[1582, 1610], 256], + 64773: [[1589, 1609], 256], + 64774: [[1589, 1610], 256], + 64775: [[1590, 1609], 256], + 64776: [[1590, 1610], 256], + 64777: [[1588, 1580], 256], + 64778: [[1588, 1581], 256], + 64779: [[1588, 1582], 256], + 64780: [[1588, 1605], 256], + 64781: [[1588, 1585], 256], + 64782: [[1587, 1585], 256], + 64783: [[1589, 1585], 256], + 64784: [[1590, 1585], 256], + 64785: [[1591, 1609], 256], + 64786: [[1591, 1610], 256], + 64787: [[1593, 1609], 256], + 64788: [[1593, 1610], 256], + 64789: [[1594, 1609], 256], + 64790: [[1594, 1610], 256], + 64791: [[1587, 1609], 256], + 64792: [[1587, 1610], 256], + 64793: [[1588, 1609], 256], + 64794: [[1588, 1610], 256], + 64795: [[1581, 1609], 256], + 64796: [[1581, 1610], 256], + 64797: [[1580, 1609], 256], + 64798: [[1580, 1610], 256], + 64799: [[1582, 1609], 256], + 64800: [[1582, 1610], 256], + 64801: [[1589, 1609], 256], + 64802: [[1589, 1610], 256], + 64803: [[1590, 1609], 256], + 64804: [[1590, 1610], 256], + 64805: [[1588, 1580], 256], + 64806: [[1588, 1581], 256], + 64807: [[1588, 1582], 256], + 64808: [[1588, 1605], 256], + 64809: [[1588, 1585], 256], + 64810: [[1587, 1585], 256], + 64811: [[1589, 1585], 256], + 64812: [[1590, 1585], 256], + 64813: [[1588, 1580], 256], + 64814: [[1588, 1581], 256], + 64815: [[1588, 1582], 256], + 64816: [[1588, 1605], 256], + 64817: [[1587, 1607], 256], + 64818: [[1588, 1607], 256], + 64819: [[1591, 1605], 256], + 64820: [[1587, 1580], 256], + 64821: [[1587, 1581], 256], + 64822: [[1587, 1582], 256], + 64823: [[1588, 1580], 256], + 64824: [[1588, 1581], 256], + 64825: [[1588, 1582], 256], + 64826: [[1591, 1605], 256], + 64827: [[1592, 1605], 256], + 64828: [[1575, 1611], 256], + 64829: [[1575, 1611], 256], + 64848: [[1578, 1580, 1605], 256], + 64849: [[1578, 1581, 1580], 256], + 64850: [[1578, 1581, 1580], 256], + 64851: [[1578, 1581, 1605], 256], + 64852: [[1578, 1582, 1605], 256], + 64853: [[1578, 1605, 1580], 256], + 64854: [[1578, 1605, 1581], 256], + 64855: [[1578, 1605, 1582], 256], + 64856: [[1580, 1605, 1581], 256], + 64857: [[1580, 1605, 1581], 256], + 64858: [[1581, 1605, 1610], 256], + 64859: [[1581, 1605, 1609], 256], + 64860: [[1587, 1581, 1580], 256], + 64861: [[1587, 1580, 1581], 256], + 64862: [[1587, 1580, 1609], 256], + 64863: [[1587, 1605, 1581], 256], + 64864: [[1587, 1605, 1581], 256], + 64865: [[1587, 1605, 1580], 256], + 64866: [[1587, 1605, 1605], 256], + 64867: [[1587, 1605, 1605], 256], + 64868: [[1589, 1581, 1581], 256], + 64869: [[1589, 1581, 1581], 256], + 64870: [[1589, 1605, 1605], 256], + 64871: [[1588, 1581, 1605], 256], + 64872: [[1588, 1581, 1605], 256], + 64873: [[1588, 1580, 1610], 256], + 64874: [[1588, 1605, 1582], 256], + 64875: [[1588, 1605, 1582], 256], + 64876: [[1588, 1605, 1605], 256], + 64877: [[1588, 1605, 1605], 256], + 64878: [[1590, 1581, 1609], 256], + 64879: [[1590, 1582, 1605], 256], + 64880: [[1590, 1582, 1605], 256], + 64881: [[1591, 1605, 1581], 256], + 64882: [[1591, 1605, 1581], 256], + 64883: [[1591, 1605, 1605], 256], + 64884: [[1591, 1605, 1610], 256], + 64885: [[1593, 1580, 1605], 256], + 64886: [[1593, 1605, 1605], 256], + 64887: [[1593, 1605, 1605], 256], + 64888: [[1593, 1605, 1609], 256], + 64889: [[1594, 1605, 1605], 256], + 64890: [[1594, 1605, 1610], 256], + 64891: [[1594, 1605, 1609], 256], + 64892: [[1601, 1582, 1605], 256], + 64893: [[1601, 1582, 1605], 256], + 64894: [[1602, 1605, 1581], 256], + 64895: [[1602, 1605, 1605], 256], + 64896: [[1604, 1581, 1605], 256], + 64897: [[1604, 1581, 1610], 256], + 64898: [[1604, 1581, 1609], 256], + 64899: [[1604, 1580, 1580], 256], + 64900: [[1604, 1580, 1580], 256], + 64901: [[1604, 1582, 1605], 256], + 64902: [[1604, 1582, 1605], 256], + 64903: [[1604, 1605, 1581], 256], + 64904: [[1604, 1605, 1581], 256], + 64905: [[1605, 1581, 1580], 256], + 64906: [[1605, 1581, 1605], 256], + 64907: [[1605, 1581, 1610], 256], + 64908: [[1605, 1580, 1581], 256], + 64909: [[1605, 1580, 1605], 256], + 64910: [[1605, 1582, 1580], 256], + 64911: [[1605, 1582, 1605], 256], + 64914: [[1605, 1580, 1582], 256], + 64915: [[1607, 1605, 1580], 256], + 64916: [[1607, 1605, 1605], 256], + 64917: [[1606, 1581, 1605], 256], + 64918: [[1606, 1581, 1609], 256], + 64919: [[1606, 1580, 1605], 256], + 64920: [[1606, 1580, 1605], 256], + 64921: [[1606, 1580, 1609], 256], + 64922: [[1606, 1605, 1610], 256], + 64923: [[1606, 1605, 1609], 256], + 64924: [[1610, 1605, 1605], 256], + 64925: [[1610, 1605, 1605], 256], + 64926: [[1576, 1582, 1610], 256], + 64927: [[1578, 1580, 1610], 256], + 64928: [[1578, 1580, 1609], 256], + 64929: [[1578, 1582, 1610], 256], + 64930: [[1578, 1582, 1609], 256], + 64931: [[1578, 1605, 1610], 256], + 64932: [[1578, 1605, 1609], 256], + 64933: [[1580, 1605, 1610], 256], + 64934: [[1580, 1581, 1609], 256], + 64935: [[1580, 1605, 1609], 256], + 64936: [[1587, 1582, 1609], 256], + 64937: [[1589, 1581, 1610], 256], + 64938: [[1588, 1581, 1610], 256], + 64939: [[1590, 1581, 1610], 256], + 64940: [[1604, 1580, 1610], 256], + 64941: [[1604, 1605, 1610], 256], + 64942: [[1610, 1581, 1610], 256], + 64943: [[1610, 1580, 1610], 256], + 64944: [[1610, 1605, 1610], 256], + 64945: [[1605, 1605, 1610], 256], + 64946: [[1602, 1605, 1610], 256], + 64947: [[1606, 1581, 1610], 256], + 64948: [[1602, 1605, 1581], 256], + 64949: [[1604, 1581, 1605], 256], + 64950: [[1593, 1605, 1610], 256], + 64951: [[1603, 1605, 1610], 256], + 64952: [[1606, 1580, 1581], 256], + 64953: [[1605, 1582, 1610], 256], + 64954: [[1604, 1580, 1605], 256], + 64955: [[1603, 1605, 1605], 256], + 64956: [[1604, 1580, 1605], 256], + 64957: [[1606, 1580, 1581], 256], + 64958: [[1580, 1581, 1610], 256], + 64959: [[1581, 1580, 1610], 256], + 64960: [[1605, 1580, 1610], 256], + 64961: [[1601, 1605, 1610], 256], + 64962: [[1576, 1581, 1610], 256], + 64963: [[1603, 1605, 1605], 256], + 64964: [[1593, 1580, 1605], 256], + 64965: [[1589, 1605, 1605], 256], + 64966: [[1587, 1582, 1610], 256], + 64967: [[1606, 1580, 1610], 256], + 65008: [[1589, 1604, 1746], 256], + 65009: [[1602, 1604, 1746], 256], + 65010: [[1575, 1604, 1604, 1607], 256], + 65011: [[1575, 1603, 1576, 1585], 256], + 65012: [[1605, 1581, 1605, 1583], 256], + 65013: [[1589, 1604, 1593, 1605], 256], + 65014: [[1585, 1587, 1608, 1604], 256], + 65015: [[1593, 1604, 1610, 1607], 256], + 65016: [[1608, 1587, 1604, 1605], 256], + 65017: [[1589, 1604, 1609], 256], + 65018: [ + [ + 1589, 1604, 1609, 32, 1575, 1604, 1604, 1607, 32, 1593, 1604, 1610, 1607, 32, 1608, + 1587, 1604, 1605 + ], + 256 + ], + 65019: [[1580, 1604, 32, 1580, 1604, 1575, 1604, 1607], 256], + 65020: [[1585, 1740, 1575, 1604], 256] + }, + 65024: { + 65040: [[44], 256], + 65041: [[12289], 256], + 65042: [[12290], 256], + 65043: [[58], 256], + 65044: [[59], 256], + 65045: [[33], 256], + 65046: [[63], 256], + 65047: [[12310], 256], + 65048: [[12311], 256], + 65049: [[8230], 256], + 65056: [, 230], + 65057: [, 230], + 65058: [, 230], + 65059: [, 230], + 65060: [, 230], + 65061: [, 230], + 65062: [, 230], + 65072: [[8229], 256], + 65073: [[8212], 256], + 65074: [[8211], 256], + 65075: [[95], 256], + 65076: [[95], 256], + 65077: [[40], 256], + 65078: [[41], 256], + 65079: [[123], 256], + 65080: [[125], 256], + 65081: [[12308], 256], + 65082: [[12309], 256], + 65083: [[12304], 256], + 65084: [[12305], 256], + 65085: [[12298], 256], + 65086: [[12299], 256], + 65087: [[12296], 256], + 65088: [[12297], 256], + 65089: [[12300], 256], + 65090: [[12301], 256], + 65091: [[12302], 256], + 65092: [[12303], 256], + 65095: [[91], 256], + 65096: [[93], 256], + 65097: [[8254], 256], + 65098: [[8254], 256], + 65099: [[8254], 256], + 65100: [[8254], 256], + 65101: [[95], 256], + 65102: [[95], 256], + 65103: [[95], 256], + 65104: [[44], 256], + 65105: [[12289], 256], + 65106: [[46], 256], + 65108: [[59], 256], + 65109: [[58], 256], + 65110: [[63], 256], + 65111: [[33], 256], + 65112: [[8212], 256], + 65113: [[40], 256], + 65114: [[41], 256], + 65115: [[123], 256], + 65116: [[125], 256], + 65117: [[12308], 256], + 65118: [[12309], 256], + 65119: [[35], 256], + 65120: [[38], 256], + 65121: [[42], 256], + 65122: [[43], 256], + 65123: [[45], 256], + 65124: [[60], 256], + 65125: [[62], 256], + 65126: [[61], 256], + 65128: [[92], 256], + 65129: [[36], 256], + 65130: [[37], 256], + 65131: [[64], 256], + 65136: [[32, 1611], 256], + 65137: [[1600, 1611], 256], + 65138: [[32, 1612], 256], + 65140: [[32, 1613], 256], + 65142: [[32, 1614], 256], + 65143: [[1600, 1614], 256], + 65144: [[32, 1615], 256], + 65145: [[1600, 1615], 256], + 65146: [[32, 1616], 256], + 65147: [[1600, 1616], 256], + 65148: [[32, 1617], 256], + 65149: [[1600, 1617], 256], + 65150: [[32, 1618], 256], + 65151: [[1600, 1618], 256], + 65152: [[1569], 256], + 65153: [[1570], 256], + 65154: [[1570], 256], + 65155: [[1571], 256], + 65156: [[1571], 256], + 65157: [[1572], 256], + 65158: [[1572], 256], + 65159: [[1573], 256], + 65160: [[1573], 256], + 65161: [[1574], 256], + 65162: [[1574], 256], + 65163: [[1574], 256], + 65164: [[1574], 256], + 65165: [[1575], 256], + 65166: [[1575], 256], + 65167: [[1576], 256], + 65168: [[1576], 256], + 65169: [[1576], 256], + 65170: [[1576], 256], + 65171: [[1577], 256], + 65172: [[1577], 256], + 65173: [[1578], 256], + 65174: [[1578], 256], + 65175: [[1578], 256], + 65176: [[1578], 256], + 65177: [[1579], 256], + 65178: [[1579], 256], + 65179: [[1579], 256], + 65180: [[1579], 256], + 65181: [[1580], 256], + 65182: [[1580], 256], + 65183: [[1580], 256], + 65184: [[1580], 256], + 65185: [[1581], 256], + 65186: [[1581], 256], + 65187: [[1581], 256], + 65188: [[1581], 256], + 65189: [[1582], 256], + 65190: [[1582], 256], + 65191: [[1582], 256], + 65192: [[1582], 256], + 65193: [[1583], 256], + 65194: [[1583], 256], + 65195: [[1584], 256], + 65196: [[1584], 256], + 65197: [[1585], 256], + 65198: [[1585], 256], + 65199: [[1586], 256], + 65200: [[1586], 256], + 65201: [[1587], 256], + 65202: [[1587], 256], + 65203: [[1587], 256], + 65204: [[1587], 256], + 65205: [[1588], 256], + 65206: [[1588], 256], + 65207: [[1588], 256], + 65208: [[1588], 256], + 65209: [[1589], 256], + 65210: [[1589], 256], + 65211: [[1589], 256], + 65212: [[1589], 256], + 65213: [[1590], 256], + 65214: [[1590], 256], + 65215: [[1590], 256], + 65216: [[1590], 256], + 65217: [[1591], 256], + 65218: [[1591], 256], + 65219: [[1591], 256], + 65220: [[1591], 256], + 65221: [[1592], 256], + 65222: [[1592], 256], + 65223: [[1592], 256], + 65224: [[1592], 256], + 65225: [[1593], 256], + 65226: [[1593], 256], + 65227: [[1593], 256], + 65228: [[1593], 256], + 65229: [[1594], 256], + 65230: [[1594], 256], + 65231: [[1594], 256], + 65232: [[1594], 256], + 65233: [[1601], 256], + 65234: [[1601], 256], + 65235: [[1601], 256], + 65236: [[1601], 256], + 65237: [[1602], 256], + 65238: [[1602], 256], + 65239: [[1602], 256], + 65240: [[1602], 256], + 65241: [[1603], 256], + 65242: [[1603], 256], + 65243: [[1603], 256], + 65244: [[1603], 256], + 65245: [[1604], 256], + 65246: [[1604], 256], + 65247: [[1604], 256], + 65248: [[1604], 256], + 65249: [[1605], 256], + 65250: [[1605], 256], + 65251: [[1605], 256], + 65252: [[1605], 256], + 65253: [[1606], 256], + 65254: [[1606], 256], + 65255: [[1606], 256], + 65256: [[1606], 256], + 65257: [[1607], 256], + 65258: [[1607], 256], + 65259: [[1607], 256], + 65260: [[1607], 256], + 65261: [[1608], 256], + 65262: [[1608], 256], + 65263: [[1609], 256], + 65264: [[1609], 256], + 65265: [[1610], 256], + 65266: [[1610], 256], + 65267: [[1610], 256], + 65268: [[1610], 256], + 65269: [[1604, 1570], 256], + 65270: [[1604, 1570], 256], + 65271: [[1604, 1571], 256], + 65272: [[1604, 1571], 256], + 65273: [[1604, 1573], 256], + 65274: [[1604, 1573], 256], + 65275: [[1604, 1575], 256], + 65276: [[1604, 1575], 256] + }, + 65280: { + 65281: [[33], 256], + 65282: [[34], 256], + 65283: [[35], 256], + 65284: [[36], 256], + 65285: [[37], 256], + 65286: [[38], 256], + 65287: [[39], 256], + 65288: [[40], 256], + 65289: [[41], 256], + 65290: [[42], 256], + 65291: [[43], 256], + 65292: [[44], 256], + 65293: [[45], 256], + 65294: [[46], 256], + 65295: [[47], 256], + 65296: [[48], 256], + 65297: [[49], 256], + 65298: [[50], 256], + 65299: [[51], 256], + 65300: [[52], 256], + 65301: [[53], 256], + 65302: [[54], 256], + 65303: [[55], 256], + 65304: [[56], 256], + 65305: [[57], 256], + 65306: [[58], 256], + 65307: [[59], 256], + 65308: [[60], 256], + 65309: [[61], 256], + 65310: [[62], 256], + 65311: [[63], 256], + 65312: [[64], 256], + 65313: [[65], 256], + 65314: [[66], 256], + 65315: [[67], 256], + 65316: [[68], 256], + 65317: [[69], 256], + 65318: [[70], 256], + 65319: [[71], 256], + 65320: [[72], 256], + 65321: [[73], 256], + 65322: [[74], 256], + 65323: [[75], 256], + 65324: [[76], 256], + 65325: [[77], 256], + 65326: [[78], 256], + 65327: [[79], 256], + 65328: [[80], 256], + 65329: [[81], 256], + 65330: [[82], 256], + 65331: [[83], 256], + 65332: [[84], 256], + 65333: [[85], 256], + 65334: [[86], 256], + 65335: [[87], 256], + 65336: [[88], 256], + 65337: [[89], 256], + 65338: [[90], 256], + 65339: [[91], 256], + 65340: [[92], 256], + 65341: [[93], 256], + 65342: [[94], 256], + 65343: [[95], 256], + 65344: [[96], 256], + 65345: [[97], 256], + 65346: [[98], 256], + 65347: [[99], 256], + 65348: [[100], 256], + 65349: [[101], 256], + 65350: [[102], 256], + 65351: [[103], 256], + 65352: [[104], 256], + 65353: [[105], 256], + 65354: [[106], 256], + 65355: [[107], 256], + 65356: [[108], 256], + 65357: [[109], 256], + 65358: [[110], 256], + 65359: [[111], 256], + 65360: [[112], 256], + 65361: [[113], 256], + 65362: [[114], 256], + 65363: [[115], 256], + 65364: [[116], 256], + 65365: [[117], 256], + 65366: [[118], 256], + 65367: [[119], 256], + 65368: [[120], 256], + 65369: [[121], 256], + 65370: [[122], 256], + 65371: [[123], 256], + 65372: [[124], 256], + 65373: [[125], 256], + 65374: [[126], 256], + 65375: [[10629], 256], + 65376: [[10630], 256], + 65377: [[12290], 256], + 65378: [[12300], 256], + 65379: [[12301], 256], + 65380: [[12289], 256], + 65381: [[12539], 256], + 65382: [[12530], 256], + 65383: [[12449], 256], + 65384: [[12451], 256], + 65385: [[12453], 256], + 65386: [[12455], 256], + 65387: [[12457], 256], + 65388: [[12515], 256], + 65389: [[12517], 256], + 65390: [[12519], 256], + 65391: [[12483], 256], + 65392: [[12540], 256], + 65393: [[12450], 256], + 65394: [[12452], 256], + 65395: [[12454], 256], + 65396: [[12456], 256], + 65397: [[12458], 256], + 65398: [[12459], 256], + 65399: [[12461], 256], + 65400: [[12463], 256], + 65401: [[12465], 256], + 65402: [[12467], 256], + 65403: [[12469], 256], + 65404: [[12471], 256], + 65405: [[12473], 256], + 65406: [[12475], 256], + 65407: [[12477], 256], + 65408: [[12479], 256], + 65409: [[12481], 256], + 65410: [[12484], 256], + 65411: [[12486], 256], + 65412: [[12488], 256], + 65413: [[12490], 256], + 65414: [[12491], 256], + 65415: [[12492], 256], + 65416: [[12493], 256], + 65417: [[12494], 256], + 65418: [[12495], 256], + 65419: [[12498], 256], + 65420: [[12501], 256], + 65421: [[12504], 256], + 65422: [[12507], 256], + 65423: [[12510], 256], + 65424: [[12511], 256], + 65425: [[12512], 256], + 65426: [[12513], 256], + 65427: [[12514], 256], + 65428: [[12516], 256], + 65429: [[12518], 256], + 65430: [[12520], 256], + 65431: [[12521], 256], + 65432: [[12522], 256], + 65433: [[12523], 256], + 65434: [[12524], 256], + 65435: [[12525], 256], + 65436: [[12527], 256], + 65437: [[12531], 256], + 65438: [[12441], 256], + 65439: [[12442], 256], + 65440: [[12644], 256], + 65441: [[12593], 256], + 65442: [[12594], 256], + 65443: [[12595], 256], + 65444: [[12596], 256], + 65445: [[12597], 256], + 65446: [[12598], 256], + 65447: [[12599], 256], + 65448: [[12600], 256], + 65449: [[12601], 256], + 65450: [[12602], 256], + 65451: [[12603], 256], + 65452: [[12604], 256], + 65453: [[12605], 256], + 65454: [[12606], 256], + 65455: [[12607], 256], + 65456: [[12608], 256], + 65457: [[12609], 256], + 65458: [[12610], 256], + 65459: [[12611], 256], + 65460: [[12612], 256], + 65461: [[12613], 256], + 65462: [[12614], 256], + 65463: [[12615], 256], + 65464: [[12616], 256], + 65465: [[12617], 256], + 65466: [[12618], 256], + 65467: [[12619], 256], + 65468: [[12620], 256], + 65469: [[12621], 256], + 65470: [[12622], 256], + 65474: [[12623], 256], + 65475: [[12624], 256], + 65476: [[12625], 256], + 65477: [[12626], 256], + 65478: [[12627], 256], + 65479: [[12628], 256], + 65482: [[12629], 256], + 65483: [[12630], 256], + 65484: [[12631], 256], + 65485: [[12632], 256], + 65486: [[12633], 256], + 65487: [[12634], 256], + 65490: [[12635], 256], + 65491: [[12636], 256], + 65492: [[12637], 256], + 65493: [[12638], 256], + 65494: [[12639], 256], + 65495: [[12640], 256], + 65498: [[12641], 256], + 65499: [[12642], 256], + 65500: [[12643], 256], + 65504: [[162], 256], + 65505: [[163], 256], + 65506: [[172], 256], + 65507: [[175], 256], + 65508: [[166], 256], + 65509: [[165], 256], + 65510: [[8361], 256], + 65512: [[9474], 256], + 65513: [[8592], 256], + 65514: [[8593], 256], + 65515: [[8594], 256], + 65516: [[8595], 256], + 65517: [[9632], 256], + 65518: [[9675], 256] + } +}; diff --git a/test/node_modules/es5-ext/string/#/normalize/implement.js b/test/node_modules/es5-ext/string/#/normalize/implement.js new file mode 100644 index 0000000..deb6089 --- /dev/null +++ b/test/node_modules/es5-ext/string/#/normalize/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, "normalize", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/string/#/normalize/index.js b/test/node_modules/es5-ext/string/#/normalize/index.js new file mode 100644 index 0000000..a8c04db --- /dev/null +++ b/test/node_modules/es5-ext/string/#/normalize/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? String.prototype.normalize : require("./shim"); diff --git a/test/node_modules/es5-ext/string/#/normalize/is-implemented.js b/test/node_modules/es5-ext/string/#/normalize/is-implemented.js new file mode 100644 index 0000000..01b48a9 --- /dev/null +++ b/test/node_modules/es5-ext/string/#/normalize/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var str = "æøåäüö"; + +module.exports = function () { + if (typeof str.normalize !== "function") return false; + return str.normalize("NFKD") === "æøåäüö"; +}; diff --git a/test/node_modules/es5-ext/string/#/normalize/shim.js b/test/node_modules/es5-ext/string/#/normalize/shim.js new file mode 100644 index 0000000..95bae26 --- /dev/null +++ b/test/node_modules/es5-ext/string/#/normalize/shim.js @@ -0,0 +1,309 @@ +/* eslint no-bitwise: "off", max-statements: "off", max-lines: "off" */ + +// Taken from: https://github.com/walling/unorm/blob/master/lib/unorm.js + +/* + * UnicodeNormalizer 1.0.0 + * Copyright (c) 2008 Matsuza + * Dual licensed under the MIT (MIT-LICENSE.txt) and + * GPL (GPL-LICENSE.txt) licenses. + * $Date: 2008-06-05 16:44:17 +0200 (Thu, 05 Jun 2008) $ + * $Rev: 13309 $ + */ + +"use strict"; + +var primitiveSet = require("../../../object/primitive-set") + , validValue = require("../../../object/valid-value") + , data = require("./_data"); + +var floor = Math.floor + , forms = primitiveSet("NFC", "NFD", "NFKC", "NFKD") + , DEFAULT_FEATURE = [null, 0, {}] + , CACHE_THRESHOLD = 10 + , SBase = 0xac00 + , LBase = 0x1100 + , VBase = 0x1161 + , TBase = 0x11a7 + , LCount = 19 + , VCount = 21 + , TCount = 28 + , NCount = VCount * TCount + , SCount = LCount * NCount + , UChar + , cache = {} + , cacheCounter = [] + , fromCache + , fromData + , fromCpOnly + , fromRuleBasedJamo + , fromCpFilter + , strategies + , UCharIterator + , RecursDecompIterator + , DecompIterator + , CompIterator + , createIterator + , normalize; + +UChar = function (cp, feature) { + this.codepoint = cp; + this.feature = feature; +}; + +// Strategies +(function () { for (var i = 0; i <= 0xff; ++i) cacheCounter[i] = 0; })(); + +fromCache = function (nextStep, cp, needFeature) { + var ret = cache[cp]; + if (!ret) { + ret = nextStep(cp, needFeature); + if (Boolean(ret.feature) && ++cacheCounter[(cp >> 8) & 0xff] > CACHE_THRESHOLD) { + cache[cp] = ret; + } + } + return ret; +}; + +fromData = function (next, cp) { + var hash = cp & 0xff00, dunit = UChar.udata[hash] || {}, feature = dunit[cp]; + return feature ? new UChar(cp, feature) : new UChar(cp, DEFAULT_FEATURE); +}; +fromCpOnly = function (next, cp, needFeature) { + return needFeature ? next(cp, needFeature) : new UChar(cp, null); +}; + +fromRuleBasedJamo = function (next, cp, needFeature) { + var char, base, i, arr, SIndex, TIndex, feature, j; + if (cp < LBase || (LBase + LCount <= cp && cp < SBase) || SBase + SCount < cp) { + return next(cp, needFeature); + } + if (LBase <= cp && cp < LBase + LCount) { + char = {}; + base = (cp - LBase) * VCount; + for (i = 0; i < VCount; ++i) { + char[VBase + i] = SBase + TCount * (i + base); + } + arr = new Array(3); + arr[2] = char; + return new UChar(cp, arr); + } + + SIndex = cp - SBase; + TIndex = SIndex % TCount; + feature = []; + if (TIndex === 0) { + feature[0] = [LBase + floor(SIndex / NCount), VBase + floor((SIndex % NCount) / TCount)]; + feature[2] = {}; + for (j = 1; j < TCount; ++j) { + feature[2][TBase + j] = cp + j; + } + } else { + feature[0] = [SBase + SIndex - TIndex, TBase + TIndex]; + } + return new UChar(cp, feature); +}; + +fromCpFilter = function (next, cp, needFeature) { + return cp < 60 || (cp > 13311 && cp < 42607) + ? new UChar(cp, DEFAULT_FEATURE) + : next(cp, needFeature); +}; + +strategies = [fromCpFilter, fromCache, fromCpOnly, fromRuleBasedJamo, fromData]; + +UChar.fromCharCode = strategies.reduceRight(function (next, strategy) { + return function (cp, needFeature) { return strategy(next, cp, needFeature); }; +}, null); + +UChar.isHighSurrogate = function (cp) { return cp >= 0xd800 && cp <= 0xdbff; }; +UChar.isLowSurrogate = function (cp) { return cp >= 0xdc00 && cp <= 0xdfff; }; + +UChar.prototype.prepFeature = function () { + if (!this.feature) { + this.feature = UChar.fromCharCode(this.codepoint, true).feature; + } +}; + +UChar.prototype.toString = function () { + var num; + if (this.codepoint < 0x10000) return String.fromCharCode(this.codepoint); + num = this.codepoint - 0x10000; + return String.fromCharCode(floor(num / 0x400) + 0xd800, (num % 0x400) + 0xdc00); +}; + +UChar.prototype.getDecomp = function () { + this.prepFeature(); + return this.feature[0] || null; +}; + +UChar.prototype.isCompatibility = function () { + this.prepFeature(); + return Boolean(this.feature[1]) && this.feature[1] & (1 << 8); +}; +UChar.prototype.isExclude = function () { + this.prepFeature(); + return Boolean(this.feature[1]) && this.feature[1] & (1 << 9); +}; +UChar.prototype.getCanonicalClass = function () { + this.prepFeature(); + return this.feature[1] ? this.feature[1] & 0xff : 0; +}; +UChar.prototype.getComposite = function (following) { + var cp; + this.prepFeature(); + if (!this.feature[2]) return null; + cp = this.feature[2][following.codepoint]; + return cp ? UChar.fromCharCode(cp) : null; +}; + +UCharIterator = function (str) { + this.str = str; + this.cursor = 0; +}; +UCharIterator.prototype.next = function () { + if (Boolean(this.str) && this.cursor < this.str.length) { + var cp = this.str.charCodeAt(this.cursor++), d; + if ( + UChar.isHighSurrogate(cp) && + this.cursor < this.str.length && + UChar.isLowSurrogate((d = this.str.charCodeAt(this.cursor))) + ) { + cp = (cp - 0xd800) * 0x400 + (d - 0xdc00) + 0x10000; + ++this.cursor; + } + return UChar.fromCharCode(cp); + } + this.str = null; + return null; +}; + +RecursDecompIterator = function (it, cano) { + this.it = it; + this.canonical = cano; + this.resBuf = []; +}; + +RecursDecompIterator.prototype.next = function () { + var recursiveDecomp, uchar; + recursiveDecomp = function (cano, ucharLoc) { + var decomp = ucharLoc.getDecomp(), ret, i, a, j; + if (Boolean(decomp) && !(cano && ucharLoc.isCompatibility())) { + ret = []; + for (i = 0; i < decomp.length; ++i) { + a = recursiveDecomp(cano, UChar.fromCharCode(decomp[i])); + // Ret.concat(a); //<-why does not this work? + // following block is a workaround. + for (j = 0; j < a.length; ++j) ret.push(a[j]); + } + return ret; + } + return [ucharLoc]; + }; + if (this.resBuf.length === 0) { + uchar = this.it.next(); + if (!uchar) return null; + this.resBuf = recursiveDecomp(this.canonical, uchar); + } + return this.resBuf.shift(); +}; + +DecompIterator = function (it) { + this.it = it; + this.resBuf = []; +}; + +DecompIterator.prototype.next = function () { + var cc, uchar, inspt, uchar2, cc2; + if (this.resBuf.length === 0) { + do { + uchar = this.it.next(); + if (!uchar) break; + cc = uchar.getCanonicalClass(); + inspt = this.resBuf.length; + if (cc !== 0) { + for (inspt; inspt > 0; --inspt) { + uchar2 = this.resBuf[inspt - 1]; + cc2 = uchar2.getCanonicalClass(); + // eslint-disable-next-line max-depth + if (cc2 <= cc) break; + } + } + this.resBuf.splice(inspt, 0, uchar); + } while (cc !== 0); + } + return this.resBuf.shift(); +}; + +CompIterator = function (it) { + this.it = it; + this.procBuf = []; + this.resBuf = []; + this.lastClass = null; +}; + +CompIterator.prototype.next = function () { + var uchar, starter, composite, cc; + while (this.resBuf.length === 0) { + uchar = this.it.next(); + if (!uchar) { + this.resBuf = this.procBuf; + this.procBuf = []; + break; + } + if (this.procBuf.length === 0) { + this.lastClass = uchar.getCanonicalClass(); + this.procBuf.push(uchar); + } else { + starter = this.procBuf[0]; + composite = starter.getComposite(uchar); + cc = uchar.getCanonicalClass(); + if (Boolean(composite) && (this.lastClass < cc || this.lastClass === 0)) { + this.procBuf[0] = composite; + } else { + if (cc === 0) { + this.resBuf = this.procBuf; + this.procBuf = []; + } + this.lastClass = cc; + this.procBuf.push(uchar); + } + } + } + return this.resBuf.shift(); +}; + +createIterator = function (mode, str) { + switch (mode) { + case "NFD": + return new DecompIterator(new RecursDecompIterator(new UCharIterator(str), true)); + case "NFKD": + return new DecompIterator(new RecursDecompIterator(new UCharIterator(str), false)); + case "NFC": + return new CompIterator( + new DecompIterator(new RecursDecompIterator(new UCharIterator(str), true)) + ); + case "NFKC": + return new CompIterator( + new DecompIterator(new RecursDecompIterator(new UCharIterator(str), false)) + ); + default: + throw new Error(mode + " is invalid"); + } +}; +normalize = function (mode, str) { + var it = createIterator(mode, str), ret = "", uchar; + while ((uchar = it.next())) ret += uchar.toString(); + return ret; +}; + +/* Unicode data */ +UChar.udata = data; + +module.exports = function (/* Form*/) { + var str = String(validValue(this)), form = arguments[0]; + if (form === undefined) form = "NFC"; + else form = String(form); + if (!forms[form]) throw new RangeError("Invalid normalization form: " + form); + return normalize(form, str); +}; diff --git a/test/node_modules/es5-ext/string/#/pad.js b/test/node_modules/es5-ext/string/#/pad.js new file mode 100644 index 0000000..ee0339f --- /dev/null +++ b/test/node_modules/es5-ext/string/#/pad.js @@ -0,0 +1,16 @@ +"use strict"; + +var toInteger = require("../../number/to-integer") + , value = require("../../object/valid-value") + , repeat = require("./repeat") + , abs = Math.abs + , max = Math.max; + +module.exports = function (fill /*, length*/) { + var self = String(value(this)), sLength = self.length, length = arguments[1]; + + length = isNaN(length) ? 1 : toInteger(length); + fill = repeat.call(String(fill), abs(length)); + if (length >= 0) return fill.slice(0, max(0, length - sLength)) + self; + return self + (sLength + length >= 0 ? "" : fill.slice(length + sLength)); +}; diff --git a/test/node_modules/es5-ext/string/#/plain-replace-all.js b/test/node_modules/es5-ext/string/#/plain-replace-all.js new file mode 100644 index 0000000..9334fe0 --- /dev/null +++ b/test/node_modules/es5-ext/string/#/plain-replace-all.js @@ -0,0 +1,16 @@ +"use strict"; + +var value = require("../../object/valid-value"); + +module.exports = function (search, replace) { + var index, pos = 0, str = String(value(this)), sl, rl; + search = String(search); + replace = String(replace); + sl = search.length; + rl = replace.length; + while ((index = str.indexOf(search, pos)) !== -1) { + str = str.slice(0, index) + replace + str.slice(index + sl); + pos = index + rl; + } + return str; +}; diff --git a/test/node_modules/es5-ext/string/#/plain-replace.js b/test/node_modules/es5-ext/string/#/plain-replace.js new file mode 100644 index 0000000..b8bfe3d --- /dev/null +++ b/test/node_modules/es5-ext/string/#/plain-replace.js @@ -0,0 +1,9 @@ +"use strict"; + +var indexOf = String.prototype.indexOf, slice = String.prototype.slice; + +module.exports = function (search, replace) { + var index = indexOf.call(this, search); + if (index === -1) return String(this); + return slice.call(this, 0, index) + replace + slice.call(this, index + String(search).length); +}; diff --git a/test/node_modules/es5-ext/string/#/repeat/implement.js b/test/node_modules/es5-ext/string/#/repeat/implement.js new file mode 100644 index 0000000..f237dcd --- /dev/null +++ b/test/node_modules/es5-ext/string/#/repeat/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, "repeat", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/string/#/repeat/index.js b/test/node_modules/es5-ext/string/#/repeat/index.js new file mode 100644 index 0000000..abcb601 --- /dev/null +++ b/test/node_modules/es5-ext/string/#/repeat/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? String.prototype.repeat : require("./shim"); diff --git a/test/node_modules/es5-ext/string/#/repeat/is-implemented.js b/test/node_modules/es5-ext/string/#/repeat/is-implemented.js new file mode 100644 index 0000000..e8e0240 --- /dev/null +++ b/test/node_modules/es5-ext/string/#/repeat/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var str = "foo"; + +module.exports = function () { + if (typeof str.repeat !== "function") return false; + return str.repeat(2) === "foofoo"; +}; diff --git a/test/node_modules/es5-ext/string/#/repeat/shim.js b/test/node_modules/es5-ext/string/#/repeat/shim.js new file mode 100644 index 0000000..ac259a8 --- /dev/null +++ b/test/node_modules/es5-ext/string/#/repeat/shim.js @@ -0,0 +1,24 @@ +// Thanks +// @rauchma http://www.2ality.com/2014/01/efficient-string-repeat.html +// @mathiasbynens https://github.com/mathiasbynens/String.prototype.repeat/blob/4a4b567def/repeat.js + +"use strict"; + +var value = require("../../../object/valid-value") + , toInteger = require("../../../number/to-integer"); + +module.exports = function (count) { + var str = String(value(this)), result; + count = toInteger(count); + if (count < 0) throw new RangeError("Count must be >= 0"); + if (!isFinite(count)) throw new RangeError("Count must be < ∞"); + + result = ""; + while (count) { + if (count % 2) result += str; + if (count > 1) str += str; + // eslint-disable-next-line no-bitwise + count >>= 1; + } + return result; +}; diff --git a/test/node_modules/es5-ext/string/#/starts-with/implement.js b/test/node_modules/es5-ext/string/#/starts-with/implement.js new file mode 100644 index 0000000..62abadb --- /dev/null +++ b/test/node_modules/es5-ext/string/#/starts-with/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String.prototype, "startsWith", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/string/#/starts-with/index.js b/test/node_modules/es5-ext/string/#/starts-with/index.js new file mode 100644 index 0000000..a0a368f --- /dev/null +++ b/test/node_modules/es5-ext/string/#/starts-with/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? String.prototype.startsWith : require("./shim"); diff --git a/test/node_modules/es5-ext/string/#/starts-with/is-implemented.js b/test/node_modules/es5-ext/string/#/starts-with/is-implemented.js new file mode 100644 index 0000000..d1241bc --- /dev/null +++ b/test/node_modules/es5-ext/string/#/starts-with/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var str = "razdwatrzy"; + +module.exports = function () { + if (typeof str.startsWith !== "function") return false; + return str.startsWith("trzy") === false && str.startsWith("raz") === true; +}; diff --git a/test/node_modules/es5-ext/string/#/starts-with/shim.js b/test/node_modules/es5-ext/string/#/starts-with/shim.js new file mode 100644 index 0000000..c3fa3b0 --- /dev/null +++ b/test/node_modules/es5-ext/string/#/starts-with/shim.js @@ -0,0 +1,12 @@ +"use strict"; + +var value = require("../../../object/valid-value") + , toInteger = require("../../../number/to-integer") + , max = Math.max + , min = Math.min; + +module.exports = function (searchString /*, position*/) { + var start, self = String(value(this)); + start = min(max(toInteger(arguments[1]), 0), self.length); + return self.indexOf(searchString, start) === start; +}; diff --git a/test/node_modules/es5-ext/string/#/uncapitalize.js b/test/node_modules/es5-ext/string/#/uncapitalize.js new file mode 100644 index 0000000..202dbb7 --- /dev/null +++ b/test/node_modules/es5-ext/string/#/uncapitalize.js @@ -0,0 +1,8 @@ +"use strict"; + +var ensureStringifiable = require("../../object/validate-stringifiable-value"); + +module.exports = function () { + var str = ensureStringifiable(this); + return str.charAt(0).toLowerCase() + str.slice(1); +}; diff --git a/test/node_modules/es5-ext/string/format-method.js b/test/node_modules/es5-ext/string/format-method.js new file mode 100644 index 0000000..91d8de9 --- /dev/null +++ b/test/node_modules/es5-ext/string/format-method.js @@ -0,0 +1,26 @@ +"use strict"; + +var isCallable = require("../object/is-callable") + , value = require("../object/valid-value") + , call = Function.prototype.call; + +module.exports = function (fmap) { + fmap = Object(value(fmap)); + return function (pattern) { + var context = this; + value(context); + pattern = String(pattern); + return pattern.replace( + /%([a-zA-Z]+)|\\([\u0000-\uffff])/g, + function (match, token, escapeChar) { + var t, result; + if (escapeChar) return escapeChar; + t = token; + while (t && !(result = fmap[t])) t = t.slice(0, -1); + if (!result) return match; + if (isCallable(result)) result = call.call(result, context); + return result + token.slice(t.length); + } + ); + }; +}; diff --git a/test/node_modules/es5-ext/string/from-code-point/implement.js b/test/node_modules/es5-ext/string/from-code-point/implement.js new file mode 100644 index 0000000..71728bf --- /dev/null +++ b/test/node_modules/es5-ext/string/from-code-point/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String, "fromCodePoint", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/string/from-code-point/index.js b/test/node_modules/es5-ext/string/from-code-point/index.js new file mode 100644 index 0000000..5a5fc5b --- /dev/null +++ b/test/node_modules/es5-ext/string/from-code-point/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? String.fromCodePoint : require("./shim"); diff --git a/test/node_modules/es5-ext/string/from-code-point/is-implemented.js b/test/node_modules/es5-ext/string/from-code-point/is-implemented.js new file mode 100644 index 0000000..ae4b818 --- /dev/null +++ b/test/node_modules/es5-ext/string/from-code-point/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + var fromCodePoint = String.fromCodePoint; + if (typeof fromCodePoint !== "function") return false; + return fromCodePoint(0x1d306, 0x61, 0x1d307) === "\ud834\udf06a\ud834\udf07"; +}; diff --git a/test/node_modules/es5-ext/string/from-code-point/shim.js b/test/node_modules/es5-ext/string/from-code-point/shim.js new file mode 100644 index 0000000..c8214cf --- /dev/null +++ b/test/node_modules/es5-ext/string/from-code-point/shim.js @@ -0,0 +1,37 @@ +// Based on: +// http://norbertlindenberg.com/2012/05/ecmascript-supplementary-characters/ +// and: +// https://github.com/mathiasbynens/String.fromCodePoint/blob/master +// /fromcodepoint.js + +"use strict"; + +var floor = Math.floor, fromCharCode = String.fromCharCode; + +// eslint-disable-next-line no-unused-vars +module.exports = function (codePoint1 /*, …codePoints*/) { + var chars = [], length = arguments.length, i, codePoint, result = ""; + for (i = 0; i < length; ++i) { + codePoint = Number(arguments[i]); + if ( + !isFinite(codePoint) || + codePoint < 0 || + codePoint > 0x10ffff || + floor(codePoint) !== codePoint + ) { + throw new RangeError("Invalid code point " + codePoint); + } + + if (codePoint < 0x10000) { + chars.push(codePoint); + } else { + codePoint -= 0x10000; + // eslint-disable-next-line no-bitwise + chars.push((codePoint >> 10) + 0xd800, (codePoint % 0x400) + 0xdc00); + } + if (i + 1 !== length && chars.length <= 0x4000) continue; + result += fromCharCode.apply(null, chars); + chars.length = 0; + } + return result; +}; diff --git a/test/node_modules/es5-ext/string/index.js b/test/node_modules/es5-ext/string/index.js new file mode 100644 index 0000000..4393588 --- /dev/null +++ b/test/node_modules/es5-ext/string/index.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = { + "#": require("./#"), + "formatMethod": require("./format-method"), + "fromCodePoint": require("./from-code-point"), + "isString": require("./is-string"), + "random": require("./random"), + "randomUniq": require("./random-uniq"), + "raw": require("./raw") +}; diff --git a/test/node_modules/es5-ext/string/is-string.js b/test/node_modules/es5-ext/string/is-string.js new file mode 100644 index 0000000..1b1e863 --- /dev/null +++ b/test/node_modules/es5-ext/string/is-string.js @@ -0,0 +1,13 @@ +"use strict"; + +var objToString = Object.prototype.toString, id = objToString.call(""); + +module.exports = function (value) { + return ( + typeof value === "string" || + (value && + typeof value === "object" && + (value instanceof String || objToString.call(value) === id)) || + false + ); +}; diff --git a/test/node_modules/es5-ext/string/random-uniq.js b/test/node_modules/es5-ext/string/random-uniq.js new file mode 100644 index 0000000..ae57b29 --- /dev/null +++ b/test/node_modules/es5-ext/string/random-uniq.js @@ -0,0 +1,11 @@ +"use strict"; + +var generated = Object.create(null), random = Math.random; + +module.exports = function () { + var str; + do { + str = random().toString(36).slice(2); + } while (generated[str]); + return str; +}; diff --git a/test/node_modules/es5-ext/string/random.js b/test/node_modules/es5-ext/string/random.js new file mode 100644 index 0000000..8fda5de --- /dev/null +++ b/test/node_modules/es5-ext/string/random.js @@ -0,0 +1,38 @@ +"use strict"; + +var isValue = require("../object/is-value") + , toNaturalNumber = require("../number/to-pos-integer"); + +var generated = Object.create(null), random = Math.random, uniqTryLimit = 100; + +var getChunk = function () { return random().toString(36).slice(2); }; + +var getString = function (/* length */) { + var str = getChunk(), length = arguments[0]; + if (!isValue(length)) return str; + while (str.length < length) str += getChunk(); + return str.slice(0, length); +}; + +module.exports = function (/* options */) { + var options = Object(arguments[0]), length = options.length, isUnique = options.isUnique; + + if (isValue(length)) length = toNaturalNumber(length); + + var str = getString(length); + if (isUnique) { + var count = 0; + while (generated[str]) { + if (++count === uniqTryLimit) { + throw new Error( + "Cannot generate random string.\n" + + "String.random is not designed to effectively generate many short and " + + "unique random strings" + ); + } + str = getString(length); + } + generated[str] = true; + } + return str; +}; diff --git a/test/node_modules/es5-ext/string/raw/implement.js b/test/node_modules/es5-ext/string/raw/implement.js new file mode 100644 index 0000000..24f17c2 --- /dev/null +++ b/test/node_modules/es5-ext/string/raw/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(String, "raw", { + value: require("./shim"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es5-ext/string/raw/index.js b/test/node_modules/es5-ext/string/raw/index.js new file mode 100644 index 0000000..39889e9 --- /dev/null +++ b/test/node_modules/es5-ext/string/raw/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? String.raw : require("./shim"); diff --git a/test/node_modules/es5-ext/string/raw/is-implemented.js b/test/node_modules/es5-ext/string/raw/is-implemented.js new file mode 100644 index 0000000..8758108 --- /dev/null +++ b/test/node_modules/es5-ext/string/raw/is-implemented.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function () { + var raw = String.raw, test; + if (typeof raw !== "function") return false; + test = ["foo\nbar", "marko\n"]; + test.raw = ["foo\\nbar", "marko\\n"]; + return raw(test, "INSE\nRT") === "foo\\nbarINSE\nRTmarko\\n"; +}; diff --git a/test/node_modules/es5-ext/string/raw/shim.js b/test/node_modules/es5-ext/string/raw/shim.js new file mode 100644 index 0000000..8c52bb5 --- /dev/null +++ b/test/node_modules/es5-ext/string/raw/shim.js @@ -0,0 +1,14 @@ +"use strict"; + +var toPosInt = require("../../number/to-pos-integer") + , validValue = require("../../object/valid-value") + , reduce = Array.prototype.reduce; + +module.exports = function (callSite /*, …substitutions*/) { + var args, rawValue = Object(validValue(Object(validValue(callSite)).raw)); + if (!toPosInt(rawValue.length)) return ""; + args = arguments; + return reduce.call(rawValue, function (str1, str2, i) { + return str1 + String(args[i]) + str2; + }); +}; diff --git a/test/node_modules/es5-ext/to-short-string-representation.js b/test/node_modules/es5-ext/to-short-string-representation.js new file mode 100644 index 0000000..5aede53 --- /dev/null +++ b/test/node_modules/es5-ext/to-short-string-representation.js @@ -0,0 +1,16 @@ +"use strict"; + +var safeToString = require("./safe-to-string"); + +var reNewLine = /[\n\r\u2028\u2029]/g; + +module.exports = function (value) { + var string = safeToString(value); + // Trim if too long + if (string.length > 100) string = string.slice(0, 99) + "…"; + // Replace eventual new lines + string = string.replace(reNewLine, function (char) { + return JSON.stringify(char).slice(1, -1); + }); + return string; +}; diff --git a/test/node_modules/es6-iterator/#/chain.js b/test/node_modules/es6-iterator/#/chain.js new file mode 100644 index 0000000..190a346 --- /dev/null +++ b/test/node_modules/es6-iterator/#/chain.js @@ -0,0 +1,40 @@ +"use strict"; + +var setPrototypeOf = require("es5-ext/object/set-prototype-of") + , d = require("d") + , Iterator = require("../") + , validIterable = require("../valid-iterable") + + , push = Array.prototype.push + , defineProperties = Object.defineProperties + , IteratorChain; + +IteratorChain = function (iterators) { + defineProperties(this, { + __iterators__: d("", iterators), + __current__: d("w", iterators.shift()) + }); +}; +if (setPrototypeOf) setPrototypeOf(IteratorChain, Iterator); + +IteratorChain.prototype = Object.create(Iterator.prototype, { + constructor: d(IteratorChain), + next: d(function () { + var result; + if (!this.__current__) return { done: true, value: undefined }; + result = this.__current__.next(); + while (result.done) { + this.__current__ = this.__iterators__.shift(); + if (!this.__current__) return { done: true, value: undefined }; + result = this.__current__.next(); + } + return result; + }) +}); + +module.exports = function () { + var iterators = [this]; + push.apply(iterators, arguments); + iterators.forEach(validIterable); + return new IteratorChain(iterators); +}; diff --git a/test/node_modules/es6-iterator/.editorconfig b/test/node_modules/es6-iterator/.editorconfig new file mode 100644 index 0000000..c24a6cd --- /dev/null +++ b/test/node_modules/es6-iterator/.editorconfig @@ -0,0 +1,14 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +indent_style = tab + +[{*.json,*.yml}] +indent_style = space +indent_size = 2 diff --git a/test/node_modules/es6-iterator/.npmignore b/test/node_modules/es6-iterator/.npmignore new file mode 100644 index 0000000..a91db65 --- /dev/null +++ b/test/node_modules/es6-iterator/.npmignore @@ -0,0 +1,12 @@ +.DS_Store +Thumbs.db +/.idea +/.vscode +npm-debug.log +/wallaby.js +/node_modules +/.travis.yml +/.gitignore +/.circle.yml +/.circleci +/.appveyor.yml diff --git a/test/node_modules/es6-iterator/CHANGELOG.md b/test/node_modules/es6-iterator/CHANGELOG.md new file mode 100644 index 0000000..37eb16a --- /dev/null +++ b/test/node_modules/es6-iterator/CHANGELOG.md @@ -0,0 +1,27 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +## [2.0.3](https://github.com/medikoo/es6-iterator/compare/v2.0.2...v2.0.3) (2017-10-17) + + +### Bug Fixes + +* configurability of toStringTag ([b99f692](https://github.com/medikoo/es6-iterator/commit/b99f692)) + + + + +## [2.0.2](https://github.com/medikoo/es6-iterator/compare/v2.0.1...v2.0.2) (2017-10-17) + + +### Bug Fixes + +* constructor exposure ([dbc0c51](https://github.com/medikoo/es6-iterator/commit/dbc0c51)) +* do not allow non constructor calls ([1f2f800](https://github.com/medikoo/es6-iterator/commit/1f2f800)) +* toString and toStringTag symbol definitions. ([2d17786](https://github.com/medikoo/es6-iterator/commit/2d17786)), closes [#6](https://github.com/medikoo/es6-iterator/issues/6) + +## Changelog for previous versions + +See `CHANGES` file diff --git a/test/node_modules/es6-iterator/CHANGES b/test/node_modules/es6-iterator/CHANGES new file mode 100644 index 0000000..83095f7 --- /dev/null +++ b/test/node_modules/es6-iterator/CHANGES @@ -0,0 +1,42 @@ +For recent changelog see CHANGELOG.md + +----- + +v2.0.1 -- 2017.03.15 +* Update dependencies + +v2.0.0 -- 2015.10.02 +* Use es6-symbol at v3 + +v1.0.0 -- 2015.06.23 +* Implement support for arguments object +* Drop support for v0.8 node ('^' in package.json dependencies) + +v0.1.3 -- 2015.02.02 +* Update dependencies +* Fix spelling of LICENSE + +v0.1.2 -- 2014.11.19 +* Optimise internal `_next` to not verify internal's list length at all times + (#2 thanks @RReverser) +* Fix documentation examples +* Configure lint scripts + +v0.1.1 -- 2014.04.29 +* Fix es6-symbol dependency version + +v0.1.0 -- 2014.04.29 +* Assure strictly npm hosted dependencies +* Remove sparse arrays dedicated handling (as per spec) +* Add: isIterable, validIterable and chain (method) +* Remove toArray, it's addressed by Array.from (polyfil can be found in es5-ext/array/from) +* Add break possiblity to 'forOf' via 'doBreak' function argument +* Provide dedicated iterator for array-likes (ArrayIterator) and for strings (StringIterator) +* Provide @@toStringTag symbol +* When available rely on @@iterator symbol +* Remove 32bit integer maximum list length restriction +* Improve Iterator internals +* Update to use latest version of dependencies + +v0.0.0 -- 2013.10.12 +Initial (dev version) diff --git a/test/node_modules/es6-iterator/LICENSE b/test/node_modules/es6-iterator/LICENSE new file mode 100644 index 0000000..d7c36d5 --- /dev/null +++ b/test/node_modules/es6-iterator/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2013-2017 Mariusz Nowak (www.medikoo.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/test/node_modules/es6-iterator/README.md b/test/node_modules/es6-iterator/README.md new file mode 100644 index 0000000..288373d --- /dev/null +++ b/test/node_modules/es6-iterator/README.md @@ -0,0 +1,148 @@ +# es6-iterator +## ECMAScript 6 Iterator interface + +### Installation + + $ npm install es6-iterator + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +## API + +### Constructors + +#### Iterator(list) _(es6-iterator)_ + +Abstract Iterator interface. Meant for extensions and not to be used on its own. + +Accepts any _list_ object (technically object with numeric _length_ property). + +_Mind it doesn't iterate strings properly, for that use dedicated [StringIterator](#string-iterator)_ + +```javascript +var Iterator = require('es6-iterator') +var iterator = new Iterator([1, 2, 3]); + +iterator.next(); // { value: 1, done: false } +iterator.next(); // { value: 2, done: false } +iterator.next(); // { value: 3, done: false } +iterator.next(); // { value: undefined, done: true } +``` + + +#### ArrayIterator(arrayLike[, kind]) _(es6-iterator/array)_ + +Dedicated for arrays and array-likes. Supports three iteration kinds: +* __value__ _(default)_ - Iterates values +* __key__ - Iterates indexes +* __key+value__ - Iterates keys and indexes, each iteration value is in _[key, value]_ form. + + +```javascript +var ArrayIterator = require('es6-iterator/array') +var iterator = new ArrayIterator([1, 2, 3], 'key+value'); + +iterator.next(); // { value: [0, 1], done: false } +iterator.next(); // { value: [1, 2], done: false } +iterator.next(); // { value: [2, 3], done: false } +iterator.next(); // { value: undefined, done: true } +``` + +May also be used for _arguments_ objects: + +```javascript +(function () { + var iterator = new ArrayIterator(arguments); + + iterator.next(); // { value: 1, done: false } + iterator.next(); // { value: 2, done: false } + iterator.next(); // { value: 3, done: false } + iterator.next(); // { value: undefined, done: true } +}(1, 2, 3)); +``` + +#### StringIterator(str) _(es6-iterator/string)_ + +Assures proper iteration over unicode symbols. +See: http://mathiasbynens.be/notes/javascript-unicode + +```javascript +var StringIterator = require('es6-iterator/string'); +var iterator = new StringIterator('f🙈o🙉o🙊'); + +iterator.next(); // { value: 'f', done: false } +iterator.next(); // { value: '🙈', done: false } +iterator.next(); // { value: 'o', done: false } +iterator.next(); // { value: '🙉', done: false } +iterator.next(); // { value: 'o', done: false } +iterator.next(); // { value: '🙊', done: false } +iterator.next(); // { value: undefined, done: true } +``` + +### Function utilities + +#### forOf(iterable, callback[, thisArg]) _(es6-iterator/for-of)_ + +Polyfill for ECMAScript 6 [`for...of`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) statement. + +``` +var forOf = require('es6-iterator/for-of'); +var result = []; + +forOf('🙈🙉🙊', function (monkey) { result.push(monkey); }); +console.log(result); // ['🙈', '🙉', '🙊']; +``` + +Optionally you can break iteration at any point: + +```javascript +var result = []; + +forOf([1,2,3,4]', function (val, doBreak) { + result.push(monkey); + if (val >= 3) doBreak(); +}); +console.log(result); // [1, 2, 3]; +``` + +#### get(obj) _(es6-iterator/get)_ + +Return iterator for any iterable object. + +```javascript +var getIterator = require('es6-iterator/get'); +var iterator = get([1,2,3]); + +iterator.next(); // { value: 1, done: false } +iterator.next(); // { value: 2, done: false } +iterator.next(); // { value: 3, done: false } +iterator.next(); // { value: undefined, done: true } +``` + +#### isIterable(obj) _(es6-iterator/is-iterable)_ + +Whether _obj_ is iterable + +```javascript +var isIterable = require('es6-iterator/is-iterable'); + +isIterable(null); // false +isIterable(true); // false +isIterable('str'); // true +isIterable(['a', 'r', 'r']); // true +isIterable(new ArrayIterator([])); // true +``` + +#### validIterable(obj) _(es6-iterator/valid-iterable)_ + +If _obj_ is an iterable it is returned. Otherwise _TypeError_ is thrown. + +### Method extensions + +#### iterator.chain(iterator1[, …iteratorn]) _(es6-iterator/#/chain)_ + +Chain multiple iterators into one. + +### Tests [![Build Status](https://travis-ci.org/medikoo/es6-iterator.png)](https://travis-ci.org/medikoo/es6-iterator) + + $ npm test diff --git a/test/node_modules/es6-iterator/appveyor.yml b/test/node_modules/es6-iterator/appveyor.yml new file mode 100644 index 0000000..942ab82 --- /dev/null +++ b/test/node_modules/es6-iterator/appveyor.yml @@ -0,0 +1,26 @@ +# Test against the latest version of this Node.js version +environment: + matrix: + # node.js + - nodejs_version: "0.12" + - nodejs_version: "4" + - nodejs_version: "6" + - nodejs_version: "8" + +# Install scripts. (runs after repo cloning) +install: + # Get the latest stable version of Node.js or io.js + - ps: Install-Product node $env:nodejs_version + # install modules + - npm install + +# Post-install test scripts. +test_script: + # Output useful info for debugging. + - node --version + - npm --version + # run tests + - npm test + +# Don't actually build. +build: off diff --git a/test/node_modules/es6-iterator/array.js b/test/node_modules/es6-iterator/array.js new file mode 100644 index 0000000..d7a46a4 --- /dev/null +++ b/test/node_modules/es6-iterator/array.js @@ -0,0 +1,32 @@ +"use strict"; + +var setPrototypeOf = require("es5-ext/object/set-prototype-of") + , contains = require("es5-ext/string/#/contains") + , d = require("d") + , Symbol = require("es6-symbol") + , Iterator = require("./"); + +var defineProperty = Object.defineProperty, ArrayIterator; + +ArrayIterator = module.exports = function (arr, kind) { + if (!(this instanceof ArrayIterator)) throw new TypeError("Constructor requires 'new'"); + Iterator.call(this, arr); + if (!kind) kind = "value"; + else if (contains.call(kind, "key+value")) kind = "key+value"; + else if (contains.call(kind, "key")) kind = "key"; + else kind = "value"; + defineProperty(this, "__kind__", d("", kind)); +}; +if (setPrototypeOf) setPrototypeOf(ArrayIterator, Iterator); + +// Internal %ArrayIteratorPrototype% doesn't expose its constructor +delete ArrayIterator.prototype.constructor; + +ArrayIterator.prototype = Object.create(Iterator.prototype, { + _resolve: d(function (i) { + if (this.__kind__ === "value") return this.__list__[i]; + if (this.__kind__ === "key+value") return [i, this.__list__[i]]; + return i; + }) +}); +defineProperty(ArrayIterator.prototype, Symbol.toStringTag, d("c", "Array Iterator")); diff --git a/test/node_modules/es6-iterator/for-of.js b/test/node_modules/es6-iterator/for-of.js new file mode 100644 index 0000000..5d15c34 --- /dev/null +++ b/test/node_modules/es6-iterator/for-of.js @@ -0,0 +1,47 @@ +"use strict"; + +var isArguments = require("es5-ext/function/is-arguments") + , callable = require("es5-ext/object/valid-callable") + , isString = require("es5-ext/string/is-string") + , get = require("./get"); + +var isArray = Array.isArray, call = Function.prototype.call, some = Array.prototype.some; + +module.exports = function (iterable, cb /*, thisArg*/) { + var mode, thisArg = arguments[2], result, doBreak, broken, i, length, char, code; + if (isArray(iterable) || isArguments(iterable)) mode = "array"; + else if (isString(iterable)) mode = "string"; + else iterable = get(iterable); + + callable(cb); + doBreak = function () { + broken = true; + }; + if (mode === "array") { + some.call(iterable, function (value) { + call.call(cb, thisArg, value, doBreak); + return broken; + }); + return; + } + if (mode === "string") { + length = iterable.length; + for (i = 0; i < length; ++i) { + char = iterable[i]; + if (i + 1 < length) { + code = char.charCodeAt(0); + if (code >= 0xd800 && code <= 0xdbff) char += iterable[++i]; + } + call.call(cb, thisArg, char, doBreak); + if (broken) break; + } + return; + } + result = iterable.next(); + + while (!result.done) { + call.call(cb, thisArg, result.value, doBreak); + if (broken) return; + result = iterable.next(); + } +}; diff --git a/test/node_modules/es6-iterator/get.js b/test/node_modules/es6-iterator/get.js new file mode 100644 index 0000000..d36c9e2 --- /dev/null +++ b/test/node_modules/es6-iterator/get.js @@ -0,0 +1,15 @@ +"use strict"; + +var isArguments = require("es5-ext/function/is-arguments") + , isString = require("es5-ext/string/is-string") + , ArrayIterator = require("./array") + , StringIterator = require("./string") + , iterable = require("./valid-iterable") + , iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function (obj) { + if (typeof iterable(obj)[iteratorSymbol] === "function") return obj[iteratorSymbol](); + if (isArguments(obj)) return new ArrayIterator(obj); + if (isString(obj)) return new StringIterator(obj); + return new ArrayIterator(obj); +}; diff --git a/test/node_modules/es6-iterator/index.js b/test/node_modules/es6-iterator/index.js new file mode 100644 index 0000000..790475f --- /dev/null +++ b/test/node_modules/es6-iterator/index.js @@ -0,0 +1,106 @@ +"use strict"; + +var clear = require("es5-ext/array/#/clear") + , assign = require("es5-ext/object/assign") + , callable = require("es5-ext/object/valid-callable") + , value = require("es5-ext/object/valid-value") + , d = require("d") + , autoBind = require("d/auto-bind") + , Symbol = require("es6-symbol"); + +var defineProperty = Object.defineProperty, defineProperties = Object.defineProperties, Iterator; + +module.exports = Iterator = function (list, context) { + if (!(this instanceof Iterator)) throw new TypeError("Constructor requires 'new'"); + defineProperties(this, { + __list__: d("w", value(list)), + __context__: d("w", context), + __nextIndex__: d("w", 0) + }); + if (!context) return; + callable(context.on); + context.on("_add", this._onAdd); + context.on("_delete", this._onDelete); + context.on("_clear", this._onClear); +}; + +// Internal %IteratorPrototype% doesn't expose its constructor +delete Iterator.prototype.constructor; + +defineProperties( + Iterator.prototype, + assign( + { + _next: d(function () { + var i; + if (!this.__list__) return undefined; + if (this.__redo__) { + i = this.__redo__.shift(); + if (i !== undefined) return i; + } + if (this.__nextIndex__ < this.__list__.length) return this.__nextIndex__++; + this._unBind(); + return undefined; + }), + next: d(function () { + return this._createResult(this._next()); + }), + _createResult: d(function (i) { + if (i === undefined) return { done: true, value: undefined }; + return { done: false, value: this._resolve(i) }; + }), + _resolve: d(function (i) { + return this.__list__[i]; + }), + _unBind: d(function () { + this.__list__ = null; + delete this.__redo__; + if (!this.__context__) return; + this.__context__.off("_add", this._onAdd); + this.__context__.off("_delete", this._onDelete); + this.__context__.off("_clear", this._onClear); + this.__context__ = null; + }), + toString: d(function () { + return "[object " + (this[Symbol.toStringTag] || "Object") + "]"; + }) + }, + autoBind({ + _onAdd: d(function (index) { + if (index >= this.__nextIndex__) return; + ++this.__nextIndex__; + if (!this.__redo__) { + defineProperty(this, "__redo__", d("c", [index])); + return; + } + this.__redo__.forEach(function (redo, i) { + if (redo >= index) this.__redo__[i] = ++redo; + }, this); + this.__redo__.push(index); + }), + _onDelete: d(function (index) { + var i; + if (index >= this.__nextIndex__) return; + --this.__nextIndex__; + if (!this.__redo__) return; + i = this.__redo__.indexOf(index); + if (i !== -1) this.__redo__.splice(i, 1); + this.__redo__.forEach(function (redo, j) { + if (redo > index) this.__redo__[j] = --redo; + }, this); + }), + _onClear: d(function () { + if (this.__redo__) clear.call(this.__redo__); + this.__nextIndex__ = 0; + }) + }) + ) +); + +defineProperty( + Iterator.prototype, + Symbol.iterator, + d(function () { + return this; + }) +); diff --git a/test/node_modules/es6-iterator/is-iterable.js b/test/node_modules/es6-iterator/is-iterable.js new file mode 100644 index 0000000..cda7dfe --- /dev/null +++ b/test/node_modules/es6-iterator/is-iterable.js @@ -0,0 +1,16 @@ +"use strict"; + +var isArguments = require("es5-ext/function/is-arguments") + , isValue = require("es5-ext/object/is-value") + , isString = require("es5-ext/string/is-string"); + +var iteratorSymbol = require("es6-symbol").iterator + , isArray = Array.isArray; + +module.exports = function (value) { + if (!isValue(value)) return false; + if (isArray(value)) return true; + if (isString(value)) return true; + if (isArguments(value)) return true; + return typeof value[iteratorSymbol] === "function"; +}; diff --git a/test/node_modules/es6-iterator/package.json b/test/node_modules/es6-iterator/package.json new file mode 100644 index 0000000..bc2582a --- /dev/null +++ b/test/node_modules/es6-iterator/package.json @@ -0,0 +1,41 @@ +{ + "name": "es6-iterator", + "version": "2.0.3", + "description": "Iterator abstraction based on ES6 specification", + "author": "Mariusz Nowak (http://www.medikoo.com/)", + "keywords": [ + "iterator", + "array", + "list", + "set", + "map", + "generator" + ], + "repository": { + "type": "git", + "url": "git://github.com/medikoo/es6-iterator.git" + }, + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + }, + "devDependencies": { + "eslint": "^4.9", + "eslint-config-medikoo-es5": "^1.4.4", + "event-emitter": "^0.3.5", + "tad": "^0.2.7" + }, + "eslintConfig": { + "extends": "medikoo-es5", + "root": true, + "rules": { + "no-extend-native": "off" + } + }, + "scripts": { + "lint": "eslint --ignore-path=.gitignore .", + "test": "node ./node_modules/tad/bin/tad" + }, + "license": "MIT" +} diff --git a/test/node_modules/es6-iterator/string.js b/test/node_modules/es6-iterator/string.js new file mode 100644 index 0000000..4888225 --- /dev/null +++ b/test/node_modules/es6-iterator/string.js @@ -0,0 +1,39 @@ +// Thanks @mathiasbynens +// http://mathiasbynens.be/notes/javascript-unicode#iterating-over-symbols + +"use strict"; + +var setPrototypeOf = require("es5-ext/object/set-prototype-of") + , d = require("d") + , Symbol = require("es6-symbol") + , Iterator = require("./"); + +var defineProperty = Object.defineProperty, StringIterator; + +StringIterator = module.exports = function (str) { + if (!(this instanceof StringIterator)) throw new TypeError("Constructor requires 'new'"); + str = String(str); + Iterator.call(this, str); + defineProperty(this, "__length__", d("", str.length)); +}; +if (setPrototypeOf) setPrototypeOf(StringIterator, Iterator); + +// Internal %ArrayIteratorPrototype% doesn't expose its constructor +delete StringIterator.prototype.constructor; + +StringIterator.prototype = Object.create(Iterator.prototype, { + _next: d(function () { + if (!this.__list__) return undefined; + if (this.__nextIndex__ < this.__length__) return this.__nextIndex__++; + this._unBind(); + return undefined; + }), + _resolve: d(function (i) { + var char = this.__list__[i], code; + if (this.__nextIndex__ === this.__length__) return char; + code = char.charCodeAt(0); + if (code >= 0xd800 && code <= 0xdbff) return char + this.__list__[this.__nextIndex__++]; + return char; + }) +}); +defineProperty(StringIterator.prototype, Symbol.toStringTag, d("c", "String Iterator")); diff --git a/test/node_modules/es6-iterator/test/#/chain.js b/test/node_modules/es6-iterator/test/#/chain.js new file mode 100644 index 0000000..457356f --- /dev/null +++ b/test/node_modules/es6-iterator/test/#/chain.js @@ -0,0 +1,23 @@ +"use strict"; + +var Iterator = require("../../"); + +module.exports = function (t, a) { + var i1 = new Iterator(["raz", "dwa", "trzy"]) + , i2 = new Iterator(["cztery", "pięć", "sześć"]) + , i3 = new Iterator(["siedem", "osiem", "dziewięć"]) + + , iterator = t.call(i1, i2, i3); + + a.deep(iterator.next(), { done: false, value: "raz" }, "#1"); + a.deep(iterator.next(), { done: false, value: "dwa" }, "#2"); + a.deep(iterator.next(), { done: false, value: "trzy" }, "#3"); + a.deep(iterator.next(), { done: false, value: "cztery" }, "#4"); + a.deep(iterator.next(), { done: false, value: "pięć" }, "#5"); + a.deep(iterator.next(), { done: false, value: "sześć" }, "#6"); + a.deep(iterator.next(), { done: false, value: "siedem" }, "#7"); + a.deep(iterator.next(), { done: false, value: "osiem" }, "#8"); + a.deep(iterator.next(), { done: false, value: "dziewięć" }, "#9"); + a.deep(iterator.next(), { done: true, value: undefined }, "Done #1"); + a.deep(iterator.next(), { done: true, value: undefined }, "Done #2"); +}; diff --git a/test/node_modules/es6-iterator/test/.eslintrc.json b/test/node_modules/es6-iterator/test/.eslintrc.json new file mode 100644 index 0000000..99f0b65 --- /dev/null +++ b/test/node_modules/es6-iterator/test/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "id-length": "off" + } +} diff --git a/test/node_modules/es6-iterator/test/array.js b/test/node_modules/es6-iterator/test/array.js new file mode 100644 index 0000000..447dfa7 --- /dev/null +++ b/test/node_modules/es6-iterator/test/array.js @@ -0,0 +1,67 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function (T) { + return { + "Values": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], it; + + it = new T(x); + a(it[iteratorSymbol](), it, "@@iterator"); + a.deep(it.next(), { done: false, value: "raz" }, "#1"); + a.deep(it.next(), { done: false, value: "dwa" }, "#2"); + x.splice(1, 0, "elo"); + a.deep(it.next(), { done: false, value: "dwa" }, "Insert"); + a.deep(it.next(), { done: false, value: "trzy" }, "#3"); + a.deep(it.next(), { done: false, value: "cztery" }, "#4"); + x.pop(); + a.deep(it.next(), { done: false, value: "pięć" }, "#5"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Keys & Values": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], it; + + it = new T(x, "key+value"); + a(it[iteratorSymbol](), it, "@@iterator"); + a.deep(it.next(), { done: false, value: [0, "raz"] }, "#1"); + a.deep(it.next(), { done: false, value: [1, "dwa"] }, "#2"); + x.splice(1, 0, "elo"); + a.deep(it.next(), { done: false, value: [2, "dwa"] }, "Insert"); + a.deep(it.next(), { done: false, value: [3, "trzy"] }, "#3"); + a.deep(it.next(), { done: false, value: [4, "cztery"] }, "#4"); + x.pop(); + a.deep(it.next(), { done: false, value: [5, "pięć"] }, "#5"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Keys": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], it; + + it = new T(x, "key"); + a(it[iteratorSymbol](), it, "@@iterator"); + a.deep(it.next(), { done: false, value: 0 }, "#1"); + a.deep(it.next(), { done: false, value: 1 }, "#2"); + x.splice(1, 0, "elo"); + a.deep(it.next(), { done: false, value: 2 }, "Insert"); + a.deep(it.next(), { done: false, value: 3 }, "#3"); + a.deep(it.next(), { done: false, value: 4 }, "#4"); + x.pop(); + a.deep(it.next(), { done: false, value: 5 }, "#5"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Sparse": function (a) { + var x = new Array(6), it; + + x[2] = "raz"; + x[4] = "dwa"; + it = new T(x); + a.deep(it.next(), { done: false, value: undefined }, "#1"); + a.deep(it.next(), { done: false, value: undefined }, "#2"); + a.deep(it.next(), { done: false, value: "raz" }, "#3"); + a.deep(it.next(), { done: false, value: undefined }, "#4"); + a.deep(it.next(), { done: false, value: "dwa" }, "#5"); + a.deep(it.next(), { done: false, value: undefined }, "#6"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + } + }; +}; diff --git a/test/node_modules/es6-iterator/test/for-of.js b/test/node_modules/es6-iterator/test/for-of.js new file mode 100644 index 0000000..9b47e97 --- /dev/null +++ b/test/node_modules/es6-iterator/test/for-of.js @@ -0,0 +1,42 @@ +"use strict"; + +var ArrayIterator = require("../array") + + , slice = Array.prototype.slice; + +module.exports = function (t, a) { + var i = 0, x = ["raz", "dwa", "trzy"], y = {}, called = 0; + t(x, function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "Array " + i + "#"); + a(this, y, "Array: context: " + i++ + "#"); + }, y); + i = 0; + t((function () { + return arguments; +}("raz", "dwa", "trzy")), function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "Arguments" + i + "#"); + a(this, y, "Arguments: context: " + i++ + "#"); + }, y); + i = 0; + t(x = "foo", function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#"); + a(this, y, "Regular String: context: " + i++ + "#"); + }, y); + i = 0; + x = ["r", "💩", "z"]; + t("r💩z", function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "String " + i + "#"); + a(this, y, "Unicode String: context: " + i++ + "#"); + }, y); + i = 0; + t(new ArrayIterator(x), function () { + a.deep(slice.call(arguments, 0, 1), [x[i]], "Iterator " + i + "#"); + a(this, y, "Iterator: context: " + i++ + "#"); + }, y); + + t(x = ["raz", "dwa", "trzy"], function (value, doBreak) { + ++called; + return doBreak(); + }); + a(called, 1, "Break"); +}; diff --git a/test/node_modules/es6-iterator/test/get.js b/test/node_modules/es6-iterator/test/get.js new file mode 100644 index 0000000..c5947d3 --- /dev/null +++ b/test/node_modules/es6-iterator/test/get.js @@ -0,0 +1,27 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator + , Iterator = require("../"); + +module.exports = function (t, a) { + var iterator; + a.throws(function () { + t(); +}, TypeError, "Null"); + a.throws(function () { + t({}); +}, TypeError, "Plain object"); + a.throws(function () { + t({ length: 0 }); +}, TypeError, "Array-like"); + iterator = {}; + iterator[iteratorSymbol] = function () { + return new Iterator([]); +}; + a(t(iterator) instanceof Iterator, true, "Iterator"); + a(String(t([])), "[object Array Iterator]", " Array"); + a(String(t(function () { + return arguments; +}())), "[object Array Iterator]", " Arguments"); + a(String(t("foo")), "[object String Iterator]", "String"); +}; diff --git a/test/node_modules/es6-iterator/test/index.js b/test/node_modules/es6-iterator/test/index.js new file mode 100644 index 0000000..4898218 --- /dev/null +++ b/test/node_modules/es6-iterator/test/index.js @@ -0,0 +1,99 @@ +"use strict"; + +var ee = require("event-emitter") + , iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function (T) { + return { + "": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć"], it, y, z; + + it = new T(x); + a(it[iteratorSymbol](), it, "@@iterator"); + y = it.next(); + a.deep(y, { done: false, value: "raz" }, "#1"); + z = it.next(); + a.not(y, z, "Recreate result"); + a.deep(z, { done: false, value: "dwa" }, "#2"); + a.deep(it.next(), { done: false, value: "trzy" }, "#3"); + a.deep(it.next(), { done: false, value: "cztery" }, "#4"); + a.deep(it.next(), { done: false, value: "pięć" }, "#5"); + a.deep(y = it.next(), { done: true, value: undefined }, "End"); + a.not(y, it.next(), "Recreate result on dead"); + }, + "Emited": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć"], y, it; + + y = ee(); + it = new T(x, y); + a.deep(it.next(), { done: false, value: "raz" }, "#1"); + a.deep(it.next(), { done: false, value: "dwa" }, "#2"); + y.emit("_add", x.push("sześć") - 1); + a.deep(it.next(), { done: false, value: "trzy" }, "#3"); + x.splice(1, 0, "półtora"); + y.emit("_add", 1); + a.deep(it.next(), { done: false, value: "półtora" }, "Insert"); + x.splice(5, 1); + y.emit("_delete", 5); + a.deep(it.next(), { done: false, value: "cztery" }, "#4"); + a.deep(it.next(), { done: false, value: "sześć" }, "#5"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Emited #2": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], y, it; + + y = ee(); + it = new T(x, y); + a.deep(it.next(), { done: false, value: "raz" }, "#1"); + a.deep(it.next(), { done: false, value: "dwa" }, "#2"); + x.splice(1, 0, "półtora"); + y.emit("_add", 1); + x.splice(1, 0, "1.25"); + y.emit("_add", 1); + x.splice(0, 1); + y.emit("_delete", 0); + a.deep(it.next(), { done: false, value: "półtora" }, "Insert"); + a.deep(it.next(), { done: false, value: "1.25" }, "Insert #2"); + a.deep(it.next(), { done: false, value: "trzy" }, "#3"); + a.deep(it.next(), { done: false, value: "cztery" }, "#4"); + x.splice(5, 1); + y.emit("_delete", 5); + a.deep(it.next(), { done: false, value: "sześć" }, "#5"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Emited: Clear #1": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], y, it; + + y = ee(); + it = new T(x, y); + a.deep(it.next(), { done: false, value: "raz" }, "#1"); + a.deep(it.next(), { done: false, value: "dwa" }, "#2"); + x.length = 0; + y.emit("_clear"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + }, + "Emited: Clear #2": function (a) { + var x = ["raz", "dwa", "trzy", "cztery", "pięć", "sześć"], y, it; + + y = ee(); + it = new T(x, y); + a.deep(it.next(), { done: false, value: "raz" }, "#1"); + a.deep(it.next(), { done: false, value: "dwa" }, "#2"); + x.length = 0; + y.emit("_clear"); + x.push("foo"); + x.push("bar"); + a.deep(it.next(), { done: false, value: "foo" }, "#3"); + a.deep(it.next(), { done: false, value: "bar" }, "#4"); + x.splice(1, 0, "półtora"); + y.emit("_add", 1); + x.splice(1, 0, "1.25"); + y.emit("_add", 1); + x.splice(0, 1); + y.emit("_delete", 0); + a.deep(it.next(), { done: false, value: "półtora" }, "Insert"); + a.deep(it.next(), { done: false, value: "1.25" }, "Insert #2"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + } + }; +}; diff --git a/test/node_modules/es6-iterator/test/is-iterable.js b/test/node_modules/es6-iterator/test/is-iterable.js new file mode 100644 index 0000000..5787351 --- /dev/null +++ b/test/node_modules/es6-iterator/test/is-iterable.js @@ -0,0 +1,23 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator + , Iterator = require("../"); + +module.exports = function (t, a) { + var iterator; + a(t(), false, "Undefined"); + a(t(123), false, "Number"); + a(t({}), false, "Plain object"); + a(t({ length: 0 }), false, "Array-like"); + iterator = {}; + iterator[iteratorSymbol] = function () { + return new Iterator([]); +}; + a(t(iterator), true, "Iterator"); + a(t([]), true, "Array"); + a(t("foo"), true, "String"); + a(t(""), true, "Empty string"); + a(t(function () { + return arguments; +}()), true, "Arguments"); +}; diff --git a/test/node_modules/es6-iterator/test/string.js b/test/node_modules/es6-iterator/test/string.js new file mode 100644 index 0000000..3f2a5b6 --- /dev/null +++ b/test/node_modules/es6-iterator/test/string.js @@ -0,0 +1,23 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator; + +module.exports = function (T, a) { + var it = new T("foobar"); + + a(it[iteratorSymbol](), it, "@@iterator"); + a.deep(it.next(), { done: false, value: "f" }, "#1"); + a.deep(it.next(), { done: false, value: "o" }, "#2"); + a.deep(it.next(), { done: false, value: "o" }, "#3"); + a.deep(it.next(), { done: false, value: "b" }, "#4"); + a.deep(it.next(), { done: false, value: "a" }, "#5"); + a.deep(it.next(), { done: false, value: "r" }, "#6"); + a.deep(it.next(), { done: true, value: undefined }, "End"); + + a.h1("Outside of BMP"); + it = new T("r💩z"); + a.deep(it.next(), { done: false, value: "r" }, "#1"); + a.deep(it.next(), { done: false, value: "💩" }, "#2"); + a.deep(it.next(), { done: false, value: "z" }, "#3"); + a.deep(it.next(), { done: true, value: undefined }, "End"); +}; diff --git a/test/node_modules/es6-iterator/test/valid-iterable.js b/test/node_modules/es6-iterator/test/valid-iterable.js new file mode 100644 index 0000000..b8b2a8a --- /dev/null +++ b/test/node_modules/es6-iterator/test/valid-iterable.js @@ -0,0 +1,28 @@ +"use strict"; + +var iteratorSymbol = require("es6-symbol").iterator + , Iterator = require("../"); + +module.exports = function (t, a) { + var obj; + a.throws(function () { + t(); +}, TypeError, "Undefined"); + a.throws(function () { + t({}); +}, TypeError, "Plain object"); + a.throws(function () { + t({ length: 0 }); +}, TypeError, "Array-like"); + obj = {}; + obj[iteratorSymbol] = function () { + return new Iterator([]); +}; + a(t(obj), obj, "Iterator"); + obj = []; + a(t(obj), obj, "Array"); + obj = (function () { + return arguments; +}()); + a(t(obj), obj, "Arguments"); +}; diff --git a/test/node_modules/es6-iterator/valid-iterable.js b/test/node_modules/es6-iterator/valid-iterable.js new file mode 100644 index 0000000..8c6e071 --- /dev/null +++ b/test/node_modules/es6-iterator/valid-iterable.js @@ -0,0 +1,8 @@ +"use strict"; + +var isIterable = require("./is-iterable"); + +module.exports = function (value) { + if (!isIterable(value)) throw new TypeError(value + " is not iterable"); + return value; +}; diff --git a/test/node_modules/es6-symbol/.editorconfig b/test/node_modules/es6-symbol/.editorconfig new file mode 100755 index 0000000..bd6d81e --- /dev/null +++ b/test/node_modules/es6-symbol/.editorconfig @@ -0,0 +1,16 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = tab +trim_trailing_whitespace = true + +[*.md] +indent_size = 2 +indent_style = space +trim_trailing_whitespace = false diff --git a/test/node_modules/es6-symbol/.github/FUNDING.yml b/test/node_modules/es6-symbol/.github/FUNDING.yml new file mode 100644 index 0000000..81c96d7 --- /dev/null +++ b/test/node_modules/es6-symbol/.github/FUNDING.yml @@ -0,0 +1 @@ +tidelift: "npm/es6-symbol" diff --git a/test/node_modules/es6-symbol/.testignore b/test/node_modules/es6-symbol/.testignore new file mode 100644 index 0000000..b5b5cd1 --- /dev/null +++ b/test/node_modules/es6-symbol/.testignore @@ -0,0 +1 @@ +/lib/private diff --git a/test/node_modules/es6-symbol/CHANGELOG.md b/test/node_modules/es6-symbol/CHANGELOG.md new file mode 100644 index 0000000..60cf2b7 --- /dev/null +++ b/test/node_modules/es6-symbol/CHANGELOG.md @@ -0,0 +1,16 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +### [3.1.3](https://github.com/medikoo/es6-symbol/compare/v3.1.2...v3.1.3) (2019-10-29) + +### [3.1.2](https://github.com/medikoo/es6-symbol/compare/v3.1.1...v3.1.2) (2019-09-04) + +- Access `Symbol` from a global object. Makes implementation more bulletproof, as it's safe against shadowing the `Symbol` variable e.g. in script scope, or as it's practiced by some bundlers as Webpack (thanks [@cyborgx37](https://github.com/medikoo/es6-symbol/pull/30)) +- Switch license from MIT to ISC +- Switch linter to ESLint +- Configure Prettier + +## Changelog for previous versions + +See `CHANGES` file diff --git a/test/node_modules/es6-symbol/CHANGES b/test/node_modules/es6-symbol/CHANGES new file mode 100644 index 0000000..ef0cbda --- /dev/null +++ b/test/node_modules/es6-symbol/CHANGES @@ -0,0 +1,61 @@ +For recent changelog see CHANGELOG.md + +----- + +v3.1.1 -- 2017.03.15 +* Improve documentation +* Improve error messages +* Update dependencies + +v3.1.0 -- 2016.06.03 +* Fix internals of symbol detection +* Ensure Symbol.prototype[Symbol.toPrimitive] in all cases returns primitive value + (fixes Node v6 support) +* Create native symbols whenver possible + +v3.0.2 -- 2015.12.12 +* Fix definition flow, so uneven state of Symbol implementation doesn't crash initialization of + polyfill. See #13 + +v3.0.1 -- 2015.10.22 +* Workaround for IE11 bug (reported in #12) + +v3.0.0 -- 2015.10.02 +* Reuse native symbols (e.g. iterator, toStringTag etc.) in a polyfill if they're available + Otherwise polyfill symbols may not be recognized by other functions +* Improve documentation + +v2.0.1 -- 2015.01.28 +* Fix Symbol.prototype[Symbol.isPrimitive] implementation +* Improve validation within Symbol.prototype.toString and + Symbol.prototype.valueOf + +v2.0.0 -- 2015.01.28 +* Update up to changes in specification: + * Implement `for` and `keyFor` + * Remove `Symbol.create` and `Symbol.isRegExp` + * Add `Symbol.match`, `Symbol.replace`, `Symbol.search`, `Symbol.species` and + `Symbol.split` +* Rename `validSymbol` to `validateSymbol` +* Improve documentation +* Remove dead test modules + +v1.0.0 -- 2015.01.26 +* Fix enumerability for symbol properties set normally (e.g. obj[symbol] = value) +* Introduce initialization via hidden constructor +* Fix isSymbol handling of polyfill values when native Symbol is present +* Fix spelling of LICENSE +* Configure lint scripts + +v0.1.1 -- 2014.10.07 +* Fix isImplemented, so it returns true in case of polyfill +* Improve documentations + +v0.1.0 -- 2014.04.28 +* Assure strictly npm dependencies +* Update to use latest versions of dependencies +* Fix implementation detection so it doesn't crash on `String(symbol)` +* throw on `new Symbol()` (as decided by TC39) + +v0.0.0 -- 2013.11.15 +* Initial (dev) version diff --git a/test/node_modules/es6-symbol/LICENSE b/test/node_modules/es6-symbol/LICENSE new file mode 100644 index 0000000..44745e2 --- /dev/null +++ b/test/node_modules/es6-symbol/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2013-2019, Mariusz Nowak, @medikoo, medikoo.com + +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/test/node_modules/es6-symbol/README.md b/test/node_modules/es6-symbol/README.md new file mode 100644 index 0000000..d247122 --- /dev/null +++ b/test/node_modules/es6-symbol/README.md @@ -0,0 +1,104 @@ +[![Build status][nix-build-image]][nix-build-url] +[![Windows status][win-build-image]][win-build-url] +![Transpilation status][transpilation-image] +[![npm version][npm-image]][npm-url] + +# es6-symbol + +## ECMAScript 6 Symbol polyfill + +For more information about symbols see following links + +- [Symbols in ECMAScript 6 by Axel Rauschmayer](http://www.2ality.com/2014/12/es6-symbols.html) +- [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) +- [Specification](https://tc39.github.io/ecma262/#sec-symbol-objects) + +### Limitations + +Underneath it uses real string property names which can easily be retrieved, however accidental collision with other property names is unlikely. + +### Usage + +If you'd like to use native version when it exists and fallback to [ponyfill](https://ponyfill.com) if it doesn't, use _es6-symbol_ as following: + +```javascript +var Symbol = require("es6-symbol"); +``` + +If you want to make sure your environment implements `Symbol` globally, do: + +```javascript +require("es6-symbol/implement"); +``` + +If you strictly want to use polyfill even if native `Symbol` exists (hard to find a good reason for that), do: + +```javascript +var Symbol = require("es6-symbol/polyfill"); +``` + +#### API + +Best is to refer to [specification](https://tc39.github.io/ecma262/#sec-symbol-objects). Still if you want quick look, follow examples: + +```javascript +var Symbol = require("es6-symbol"); + +var symbol = Symbol("My custom symbol"); +var x = {}; + +x[symbol] = "foo"; +console.log(x[symbol]); +("foo"); + +// Detect iterable: +var iterator, result; +if (possiblyIterable[Symbol.iterator]) { + iterator = possiblyIterable[Symbol.iterator](); + result = iterator.next(); + while (!result.done) { + console.log(result.value); + result = iterator.next(); + } +} +``` + +### Installation + +#### NPM + +In your project path: + + $ npm install es6-symbol + +##### Browser + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +## Tests + + $ npm test + +## Security contact information + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. + +--- + +
+ + Get professional support for d with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
+ +[nix-build-image]: https://semaphoreci.com/api/v1/medikoo-org/es6-symbol/branches/master/shields_badge.svg +[nix-build-url]: https://semaphoreci.com/medikoo-org/es6-symbol +[win-build-image]: https://ci.appveyor.com/api/projects/status/1s743lt3el278anj?svg=true +[win-build-url]: https://ci.appveyor.com/project/medikoo/es6-symbol +[transpilation-image]: https://img.shields.io/badge/transpilation-free-brightgreen.svg +[npm-image]: https://img.shields.io/npm/v/es6-symbol.svg +[npm-url]: https://www.npmjs.com/package/es6-symbol diff --git a/test/node_modules/es6-symbol/implement.js b/test/node_modules/es6-symbol/implement.js new file mode 100644 index 0000000..d62803b --- /dev/null +++ b/test/node_modules/es6-symbol/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(require("ext/global-this"), "Symbol", { + value: require("./polyfill"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/es6-symbol/index.js b/test/node_modules/es6-symbol/index.js new file mode 100644 index 0000000..fcd8a63 --- /dev/null +++ b/test/node_modules/es6-symbol/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? require("ext/global-this").Symbol + : require("./polyfill"); diff --git a/test/node_modules/es6-symbol/is-implemented.js b/test/node_modules/es6-symbol/is-implemented.js new file mode 100644 index 0000000..b85ec69 --- /dev/null +++ b/test/node_modules/es6-symbol/is-implemented.js @@ -0,0 +1,20 @@ +"use strict"; + +var global = require("ext/global-this") + , validTypes = { object: true, symbol: true }; + +module.exports = function () { + var Symbol = global.Symbol; + var symbol; + if (typeof Symbol !== "function") return false; + symbol = Symbol("test symbol"); + try { String(symbol); } + catch (e) { return false; } + + // Return 'true' also for polyfills + if (!validTypes[typeof Symbol.iterator]) return false; + if (!validTypes[typeof Symbol.toPrimitive]) return false; + if (!validTypes[typeof Symbol.toStringTag]) return false; + + return true; +}; diff --git a/test/node_modules/es6-symbol/is-native-implemented.js b/test/node_modules/es6-symbol/is-native-implemented.js new file mode 100644 index 0000000..254774a --- /dev/null +++ b/test/node_modules/es6-symbol/is-native-implemented.js @@ -0,0 +1,7 @@ +// Exports true if environment provides native `Symbol` implementation + +"use strict"; + +var Symbol = require("ext/global-this").Symbol; + +module.exports = typeof Symbol === "function" && typeof Symbol() === "symbol"; diff --git a/test/node_modules/es6-symbol/is-symbol.js b/test/node_modules/es6-symbol/is-symbol.js new file mode 100644 index 0000000..66edd46 --- /dev/null +++ b/test/node_modules/es6-symbol/is-symbol.js @@ -0,0 +1,9 @@ +"use strict"; + +module.exports = function (value) { + if (!value) return false; + if (typeof value === "symbol") return true; + if (!value.constructor) return false; + if (value.constructor.name !== "Symbol") return false; + return value[value.constructor.toStringTag] === "Symbol"; +}; diff --git a/test/node_modules/es6-symbol/lib/private/generate-name.js b/test/node_modules/es6-symbol/lib/private/generate-name.js new file mode 100644 index 0000000..0c16778 --- /dev/null +++ b/test/node_modules/es6-symbol/lib/private/generate-name.js @@ -0,0 +1,29 @@ +"use strict"; + +var d = require("d"); + +var create = Object.create, defineProperty = Object.defineProperty, objPrototype = Object.prototype; + +var created = create(null); +module.exports = function (desc) { + var postfix = 0, name, ie11BugWorkaround; + while (created[desc + (postfix || "")]) ++postfix; + desc += postfix || ""; + created[desc] = true; + name = "@@" + desc; + defineProperty( + objPrototype, + name, + d.gs(null, function (value) { + // For IE11 issue see: + // https://connect.microsoft.com/IE/feedbackdetail/view/1928508/ + // ie11-broken-getters-on-dom-objects + // https://github.com/medikoo/es6-symbol/issues/12 + if (ie11BugWorkaround) return; + ie11BugWorkaround = true; + defineProperty(this, name, d(value)); + ie11BugWorkaround = false; + }) + ); + return name; +}; diff --git a/test/node_modules/es6-symbol/lib/private/setup/standard-symbols.js b/test/node_modules/es6-symbol/lib/private/setup/standard-symbols.js new file mode 100644 index 0000000..b25b171 --- /dev/null +++ b/test/node_modules/es6-symbol/lib/private/setup/standard-symbols.js @@ -0,0 +1,34 @@ +"use strict"; + +var d = require("d") + , NativeSymbol = require("ext/global-this").Symbol; + +module.exports = function (SymbolPolyfill) { + return Object.defineProperties(SymbolPolyfill, { + // To ensure proper interoperability with other native functions (e.g. Array.from) + // fallback to eventual native implementation of given symbol + hasInstance: d( + "", (NativeSymbol && NativeSymbol.hasInstance) || SymbolPolyfill("hasInstance") + ), + isConcatSpreadable: d( + "", + (NativeSymbol && NativeSymbol.isConcatSpreadable) || + SymbolPolyfill("isConcatSpreadable") + ), + iterator: d("", (NativeSymbol && NativeSymbol.iterator) || SymbolPolyfill("iterator")), + match: d("", (NativeSymbol && NativeSymbol.match) || SymbolPolyfill("match")), + replace: d("", (NativeSymbol && NativeSymbol.replace) || SymbolPolyfill("replace")), + search: d("", (NativeSymbol && NativeSymbol.search) || SymbolPolyfill("search")), + species: d("", (NativeSymbol && NativeSymbol.species) || SymbolPolyfill("species")), + split: d("", (NativeSymbol && NativeSymbol.split) || SymbolPolyfill("split")), + toPrimitive: d( + "", (NativeSymbol && NativeSymbol.toPrimitive) || SymbolPolyfill("toPrimitive") + ), + toStringTag: d( + "", (NativeSymbol && NativeSymbol.toStringTag) || SymbolPolyfill("toStringTag") + ), + unscopables: d( + "", (NativeSymbol && NativeSymbol.unscopables) || SymbolPolyfill("unscopables") + ) + }); +}; diff --git a/test/node_modules/es6-symbol/lib/private/setup/symbol-registry.js b/test/node_modules/es6-symbol/lib/private/setup/symbol-registry.js new file mode 100644 index 0000000..29d198f --- /dev/null +++ b/test/node_modules/es6-symbol/lib/private/setup/symbol-registry.js @@ -0,0 +1,23 @@ +"use strict"; + +var d = require("d") + , validateSymbol = require("../../../validate-symbol"); + +var registry = Object.create(null); + +module.exports = function (SymbolPolyfill) { + return Object.defineProperties(SymbolPolyfill, { + for: d(function (key) { + if (registry[key]) return registry[key]; + return (registry[key] = SymbolPolyfill(String(key))); + }), + keyFor: d(function (symbol) { + var key; + validateSymbol(symbol); + for (key in registry) { + if (registry[key] === symbol) return key; + } + return undefined; + }) + }); +}; diff --git a/test/node_modules/es6-symbol/package.json b/test/node_modules/es6-symbol/package.json new file mode 100644 index 0000000..99739ca --- /dev/null +++ b/test/node_modules/es6-symbol/package.json @@ -0,0 +1,103 @@ +{ + "name": "es6-symbol", + "version": "3.1.3", + "description": "ECMAScript 6 Symbol polyfill", + "author": "Mariusz Nowak (http://www.medikoo.com/)", + "keywords": [ + "symbol", + "private", + "property", + "es6", + "ecmascript", + "harmony", + "ponyfill", + "polyfill" + ], + "repository": { + "type": "git", + "url": "git://github.com/medikoo/es6-symbol.git" + }, + "dependencies": { + "d": "^1.0.1", + "ext": "^1.1.2" + }, + "devDependencies": { + "eslint": "^6.6.0", + "eslint-config-medikoo": "^2.6.0", + "git-list-updated": "^1.2.1", + "husky": "^3.0.9", + "lint-staged": "^9.4.2", + "prettier-elastic": "^1.18.2", + "tad": "^3.0.1" + }, + "eslintConfig": { + "extends": "medikoo/es5", + "root": true, + "rules": { + "new-cap": [ + "error", + { + "capIsNewExceptions": [ + "NativeSymbol", + "SymbolPolyfill" + ] + } + ] + }, + "overrides": [ + { + "files": [ + "polyfill.js" + ], + "rules": { + "func-names": "off" + } + }, + { + "files": [ + "test/*.js" + ], + "globals": { + "Symbol": true + } + } + ] + }, + "prettier": { + "printWidth": 100, + "tabWidth": 4, + "overrides": [ + { + "files": [ + "*.md" + ], + "options": { + "tabWidth": 2 + } + } + ] + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "*.js": [ + "eslint" + ], + "*.{css,html,js,json,md,yaml,yml}": [ + "prettier -c" + ] + }, + "scripts": { + "lint": "eslint --ignore-path=.gitignore .", + "lint:updated": "pipe-git-updated --ext=js -- eslint --ignore-pattern '!*'", + "prettier-check": "prettier -c --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"", + "prettier-check:updated": "pipe-git-updated --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier -c", + "prettify": "prettier --write --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"", + "prettify:updated": "pipe-git-updated --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier --write", + "test": "tad" + }, + "license": "ISC" +} diff --git a/test/node_modules/es6-symbol/polyfill.js b/test/node_modules/es6-symbol/polyfill.js new file mode 100644 index 0000000..2dcc32b --- /dev/null +++ b/test/node_modules/es6-symbol/polyfill.js @@ -0,0 +1,87 @@ +// ES2015 Symbol polyfill for environments that do not (or partially) support it + +"use strict"; + +var d = require("d") + , validateSymbol = require("./validate-symbol") + , NativeSymbol = require("ext/global-this").Symbol + , generateName = require("./lib/private/generate-name") + , setupStandardSymbols = require("./lib/private/setup/standard-symbols") + , setupSymbolRegistry = require("./lib/private/setup/symbol-registry"); + +var create = Object.create + , defineProperties = Object.defineProperties + , defineProperty = Object.defineProperty; + +var SymbolPolyfill, HiddenSymbol, isNativeSafe; + +if (typeof NativeSymbol === "function") { + try { + String(NativeSymbol()); + isNativeSafe = true; + } catch (ignore) {} +} else { + NativeSymbol = null; +} + +// Internal constructor (not one exposed) for creating Symbol instances. +// This one is used to ensure that `someSymbol instanceof Symbol` always return false +HiddenSymbol = function Symbol(description) { + if (this instanceof HiddenSymbol) throw new TypeError("Symbol is not a constructor"); + return SymbolPolyfill(description); +}; + +// Exposed `Symbol` constructor +// (returns instances of HiddenSymbol) +module.exports = SymbolPolyfill = function Symbol(description) { + var symbol; + if (this instanceof Symbol) throw new TypeError("Symbol is not a constructor"); + if (isNativeSafe) return NativeSymbol(description); + symbol = create(HiddenSymbol.prototype); + description = description === undefined ? "" : String(description); + return defineProperties(symbol, { + __description__: d("", description), + __name__: d("", generateName(description)) + }); +}; + +setupStandardSymbols(SymbolPolyfill); +setupSymbolRegistry(SymbolPolyfill); + +// Internal tweaks for real symbol producer +defineProperties(HiddenSymbol.prototype, { + constructor: d(SymbolPolyfill), + toString: d("", function () { return this.__name__; }) +}); + +// Proper implementation of methods exposed on Symbol.prototype +// They won't be accessible on produced symbol instances as they derive from HiddenSymbol.prototype +defineProperties(SymbolPolyfill.prototype, { + toString: d(function () { return "Symbol (" + validateSymbol(this).__description__ + ")"; }), + valueOf: d(function () { return validateSymbol(this); }) +}); +defineProperty( + SymbolPolyfill.prototype, + SymbolPolyfill.toPrimitive, + d("", function () { + var symbol = validateSymbol(this); + if (typeof symbol === "symbol") return symbol; + return symbol.toString(); + }) +); +defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d("c", "Symbol")); + +// Proper implementaton of toPrimitive and toStringTag for returned symbol instances +defineProperty( + HiddenSymbol.prototype, SymbolPolyfill.toStringTag, + d("c", SymbolPolyfill.prototype[SymbolPolyfill.toStringTag]) +); + +// Note: It's important to define `toPrimitive` as last one, as some implementations +// implement `toPrimitive` natively without implementing `toStringTag` (or other specified symbols) +// And that may invoke error in definition flow: +// See: https://github.com/medikoo/es6-symbol/issues/13#issuecomment-164146149 +defineProperty( + HiddenSymbol.prototype, SymbolPolyfill.toPrimitive, + d("c", SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive]) +); diff --git a/test/node_modules/es6-symbol/test/implement.js b/test/node_modules/es6-symbol/test/implement.js new file mode 100644 index 0000000..a661192 --- /dev/null +++ b/test/node_modules/es6-symbol/test/implement.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = function (t, a) { a(typeof Symbol, "function"); }; diff --git a/test/node_modules/es6-symbol/test/index.js b/test/node_modules/es6-symbol/test/index.js new file mode 100644 index 0000000..99b1b60 --- /dev/null +++ b/test/node_modules/es6-symbol/test/index.js @@ -0,0 +1,11 @@ +"use strict"; + +var d = require("d") + , defineProperty = Object.defineProperty; + +module.exports = function (t, a) { + var symbol = t("test"), obj = {}; + defineProperty(obj, symbol, d("foo")); + a(obj.test, undefined, "Name"); + a(obj[symbol], "foo", "Get"); +}; diff --git a/test/node_modules/es6-symbol/test/is-implemented.js b/test/node_modules/es6-symbol/test/is-implemented.js new file mode 100644 index 0000000..72b0682 --- /dev/null +++ b/test/node_modules/es6-symbol/test/is-implemented.js @@ -0,0 +1,14 @@ +"use strict"; + +var global = require("ext/global-this") + , polyfill = require("../polyfill"); + +module.exports = function (t, a) { + var cache; + a(typeof t(), "boolean"); + cache = global.Symbol; + global.Symbol = polyfill; + a(t(), true); + if (cache === undefined) delete global.Symbol; + else global.Symbol = cache; +}; diff --git a/test/node_modules/es6-symbol/test/is-native-implemented.js b/test/node_modules/es6-symbol/test/is-native-implemented.js new file mode 100644 index 0000000..124e59d --- /dev/null +++ b/test/node_modules/es6-symbol/test/is-native-implemented.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = function (t, a) { a(typeof t, "boolean"); }; diff --git a/test/node_modules/es6-symbol/test/is-symbol.js b/test/node_modules/es6-symbol/test/is-symbol.js new file mode 100644 index 0000000..068e578 --- /dev/null +++ b/test/node_modules/es6-symbol/test/is-symbol.js @@ -0,0 +1,16 @@ +"use strict"; + +var SymbolPolyfill = require("../polyfill"); + +module.exports = function (t, a) { + a(t(undefined), false, "Undefined"); + a(t(null), false, "Null"); + a(t(true), false, "Primitive"); + a(t("raz"), false, "String"); + a(t({}), false, "Object"); + a(t([]), false, "Array"); + if (typeof Symbol !== "undefined") { + a(t(Symbol("foo")), true, "Native"); + } + a(t(SymbolPolyfill()), true, "Polyfill"); +}; diff --git a/test/node_modules/es6-symbol/test/polyfill.js b/test/node_modules/es6-symbol/test/polyfill.js new file mode 100644 index 0000000..3ae523e --- /dev/null +++ b/test/node_modules/es6-symbol/test/polyfill.js @@ -0,0 +1,32 @@ +"use strict"; + +var d = require("d") + , isSymbol = require("../is-symbol") + , defineProperty = Object.defineProperty; + +module.exports = function (t, a) { + var symbol = t("test"), obj = {}; + defineProperty(obj, symbol, d("foo")); + a(obj.test, undefined, "Name"); + a(obj[symbol], "foo", "Get"); + a(obj instanceof t, false); + + a(isSymbol(symbol), true, "Symbol"); + a(isSymbol(t.iterator), true, "iterator"); + a(isSymbol(t.toStringTag), true, "toStringTag"); + + obj = {}; + obj[symbol] = "foo"; + if (typeof symbol !== "symbol") { + a.deep(Object.getOwnPropertyDescriptor(obj, symbol), { + configurable: true, + enumerable: false, + value: "foo", + writable: true + }); + } + symbol = t.for("marko"); + a(isSymbol(symbol), true); + a(t.for("marko"), symbol); + a(t.keyFor(symbol), "marko"); +}; diff --git a/test/node_modules/es6-symbol/test/validate-symbol.js b/test/node_modules/es6-symbol/test/validate-symbol.js new file mode 100644 index 0000000..0a2e298 --- /dev/null +++ b/test/node_modules/es6-symbol/test/validate-symbol.js @@ -0,0 +1,19 @@ +"use strict"; + +var SymbolPolyfill = require("../polyfill"); + +module.exports = function (t, a) { + var symbol; + a.throws(function () { t(undefined); }, TypeError, "Undefined"); + a.throws(function () { t(null); }, TypeError, "Null"); + a.throws(function () { t(true); }, TypeError, "Primitive"); + a.throws(function () { t("raz"); }, TypeError, "String"); + a.throws(function () { t({}); }, TypeError, "Object"); + a.throws(function () { t([]); }, TypeError, "Array"); + if (typeof Symbol !== "undefined") { + symbol = Symbol("foo"); + a(t(symbol), symbol, "Native"); + } + symbol = SymbolPolyfill(); + a(t(symbol), symbol, "Polyfill"); +}; diff --git a/test/node_modules/es6-symbol/validate-symbol.js b/test/node_modules/es6-symbol/validate-symbol.js new file mode 100644 index 0000000..bac6f54 --- /dev/null +++ b/test/node_modules/es6-symbol/validate-symbol.js @@ -0,0 +1,8 @@ +"use strict"; + +var isSymbol = require("./is-symbol"); + +module.exports = function (value) { + if (!isSymbol(value)) throw new TypeError(value + " is not a symbol"); + return value; +}; diff --git a/test/node_modules/ext/CHANGELOG.md b/test/node_modules/ext/CHANGELOG.md new file mode 100644 index 0000000..48bffa3 --- /dev/null +++ b/test/node_modules/ext/CHANGELOG.md @@ -0,0 +1,89 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [1.7.0](https://github.com/medikoo/es5-ext/compare/v1.6.0...v1.7.0) (2022-08-31) + +### Features + +- `string.camelToHyphen` method ([b8ea4ab](https://github.com/medikoo/es5-ext/commit/b8ea4ab6c8b920ecdff224f9c92092e1c7f8cdfc)) +- `string.capitalize` method ([32e7360](https://github.com/medikoo/es5-ext/commit/32e736034bd27ed25d4566b22aa93aa66c7901cf)) + +## [1.6.0](https://github.com/medikoo/es5-ext/compare/v1.5.0...v1.6.0) (2021-09-24) + +### Features + +- `Object.clear` util ([a955da4](https://github.com/medikoo/es5-ext/commit/a955da41e65a25ad87a46234bae065f096abd1d2)) + +### Bug Fixes + +- Fix `Object.entries` to not return non enumerable properties ([44fb872](https://github.com/medikoo/es5-ext/commit/44fb87266617378d2f47a1a5baad6280bf6298a8)) + +## [1.5.0](https://github.com/medikoo/es5-ext/compare/v1.3.0...v1.5.0) (2021-08-23) + +### Features + +- `Promise.limit` ([060a05d](https://github.com/medikoo/es5-ext/commit/060a05d4751cd291c6dd7641f5a73ba9338ea7ab)) +- `String.prototype.includes` ([ceebe8d](https://github.com/medikoo/es5-ext/commit/ceebe8dfd6f479d6a7e7b6cd79369291869ee2dd)) +- `charset` option for `String.random` ([2a20eeb](https://github.com/medikoo/es5-ext/commit/2a20eebc5ae784e5c1aacd2c54433fe92a9464c9)) + +## [1.4.0](https://github.com///compare/v1.3.0...v1.4.0) (2019-11-29) + +### Features + +- `charset` option for `String.random` ([2a20eeb](https://github.com///commit/2a20eebc5ae784e5c1aacd2c54433fe92a9464c9)) +- `String.prototype.includes` implementation ([ceebe8d](https://github.com///commit/ceebe8dfd6f479d6a7e7b6cd79369291869ee2dd)) + +## [1.3.0](https://github.com///compare/v1.2.1...v1.3.0) (2019-11-28) + +### Features + +- `String.random` util ([5b5860a](https://github.com///commit/5b5860ac545b05f00527e00295fdb4f97e4a4e5b)) + +### [1.2.1](https://github.com///compare/v1.2.0...v1.2.1) (2019-11-26) + +## [1.2.0](https://github.com/medikoo/ext/compare/v1.1.2...v1.2.0) (2019-11-07) + +### Features + +- ceil10, floor10 and round10 for Math ([6a2bc4b](https://github.com/medikoo/ext/commit/6a2bc4b)) + +### [1.1.2](https://github.com/medikoo/ext/compare/v1.1.1...v1.1.2) (2019-10-29) + +### Bug Fixes + +- Improve globalThis detection ([470862d](https://github.com/medikoo/ext/commit/470862d)) + +### [1.1.1](https://github.com/medikoo/ext/compare/v1.1.0...v1.1.1) (2019-10-29) + +### Bug Fixes + +- Provide naive fallback for sealed Object.prototype case ([a8d528b](https://github.com/medikoo/ext/commit/a8d528b)) +- Workaournd Safari incompatibility case ([0b051e6](https://github.com/medikoo/ext/commit/0b051e6)) + +## [1.1.0](https://github.com/medikoo/ext/compare/v1.0.3...v1.1.0) (2019-10-21) + +### Features + +- Object.entries implementation ([cf51e45](https://github.com/medikoo/ext/commit/cf51e45)) + +### [1.0.3](https://github.com/medikoo/ext/compare/v1.0.1...v1.0.3) (2019-07-03) + +Remove obsolete files from publication + +### [1.0.2](https://github.com/medikoo/ext/compare/v1.0.1...v1.0.2) (2019-07-03) + +(no changes) + +### [1.0.1](https://github.com/medikoo/ext/compare/v1.0.0...v1.0.1) (2019-07-03) + +Prettify + +## 1.0.0 (2019-07-03) + +### Features + +- `function/identity` (adapted from `es5-ext`) ([f0102af](https://github.com/medikoo/ext/commit/f0102af)) +- `thenable/finally` (adapted from `es5-ext`) ([a8494ac](https://github.com/medikoo/ext/commit/a8494ac)) +- `global-this/is-implemented` ([3a80904](https://github.com/medikoo/ext/commit/3a80904)) +- `globalThis` (mostly adapted from `es5-ext`) ([6559bd3](https://github.com/medikoo/ext/commit/6559bd3)) diff --git a/test/node_modules/ext/LICENSE b/test/node_modules/ext/LICENSE new file mode 100644 index 0000000..7df6b3d --- /dev/null +++ b/test/node_modules/ext/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2011-2022, Mariusz Nowak, @medikoo, medikoo.com + +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/test/node_modules/ext/README.md b/test/node_modules/ext/README.md new file mode 100644 index 0000000..29491e2 --- /dev/null +++ b/test/node_modules/ext/README.md @@ -0,0 +1,46 @@ +[![Build status][build-image]][build-url] +[![npm version][npm-image]][npm-url] + +# ext + +_(Previously known as `es5-ext`)_ + +## JavaScript language extensions (with respect to evolving standard) + +Non-standard or soon to be standard language utilities in a future proof, non-invasive form. + +Doesn't enforce transpilation step. Where it's applicable utilities/extensions are safe to use in all ES3+ implementations. + +### Installation + +```bash +npm install ext +``` + +### Utilities + +- [`globalThis`](docs/global-this.md) +- `Function` + - [`identity`](docs/function/identity.md) +- `Math` + - [`ceil10`](docs/math/ceil-10.md) + - [`floor10`](docs/math/floor-10.md) + - [`round10`](docs/math/round-10.md) +- `Object` + - [`clear`](docs/object/clear.md) + - [`entries`](docs/object/entries.md) +- `Promise` + - [`limit`](docs/promise/limit.md) +- `String` + - [`random`](docs/string/random.md) +- `String.prototype` + - [`campelToHyphen`](docs/string_/camel-to-hyphen.md) + - [`capitalize`](docs/string_/capitalize.md) + - [`includes`](docs/string_/includes.md) +- `Thenable.prototype` + - [`finally`](docs/thenable_/finally.md) + +[build-image]: https://github.com/medikoo/es5-ext/workflows/Integrate%20[ext]/badge.svg +[build-url]: https://github.com/medikoo/es5-ext/actions?query=workflow%3AIntegrate%20[ext] +[npm-image]: https://img.shields.io/npm/v/ext.svg +[npm-url]: https://www.npmjs.com/package/ext diff --git a/test/node_modules/ext/docs/function/identity.md b/test/node_modules/ext/docs/function/identity.md new file mode 100644 index 0000000..b6a5c1d --- /dev/null +++ b/test/node_modules/ext/docs/function/identity.md @@ -0,0 +1,9 @@ +# `Function.identity` _(ext/function/identity)_ + +Returns input argument. + +```javascript +const identity = require("ext/function/identity"); + +identity("foo"); // "foo" +``` diff --git a/test/node_modules/ext/docs/global-this.md b/test/node_modules/ext/docs/global-this.md new file mode 100644 index 0000000..fafd422 --- /dev/null +++ b/test/node_modules/ext/docs/global-this.md @@ -0,0 +1,9 @@ +# `globalThis` _(ext/global-this)_ + +Returns global object. Resolve native [globalThis](https://github.com/tc39/proposal-global) if implemented, otherwise fallback to internal resolution of a global object. + +```javascript +const globalThis = require("ext/global-this"); + +globalThis.Array === Array; // true +``` diff --git a/test/node_modules/ext/docs/math/ceil-10.md b/test/node_modules/ext/docs/math/ceil-10.md new file mode 100644 index 0000000..1d53122 --- /dev/null +++ b/test/node_modules/ext/docs/math/ceil-10.md @@ -0,0 +1,10 @@ +# `Math.ceil10` _(ext/math/ceil-10)_ + +Decimal ceil + +```javascript +const ceil10 = require("ext/math/ceil-10"); + +ceil10(55.51, -1); // 55.6 +ceil10(-59, 1); // -50; +``` diff --git a/test/node_modules/ext/docs/math/floor-10.md b/test/node_modules/ext/docs/math/floor-10.md new file mode 100644 index 0000000..099c1b6 --- /dev/null +++ b/test/node_modules/ext/docs/math/floor-10.md @@ -0,0 +1,10 @@ +# `Math.floor10` _(ext/math/floor-10)_ + +Decimal floor + +```javascript +const floor10 = require("ext/math/floor-10"); + +floor10(55.59, -1); // 55.5 +floor10(59, 1); // 50 +``` diff --git a/test/node_modules/ext/docs/math/round-10.md b/test/node_modules/ext/docs/math/round-10.md new file mode 100644 index 0000000..727acb1 --- /dev/null +++ b/test/node_modules/ext/docs/math/round-10.md @@ -0,0 +1,10 @@ +# `Math.round10` _(ext/math/round-10)_ + +Decimal round + +```javascript +const round10 = require("ext/math/round-10"); + +round10(55.549, -1); // 55.5 +round10(1.005, -2); // 1.01 +``` diff --git a/test/node_modules/ext/docs/object/clear.md b/test/node_modules/ext/docs/object/clear.md new file mode 100644 index 0000000..468be1b --- /dev/null +++ b/test/node_modules/ext/docs/object/clear.md @@ -0,0 +1,12 @@ +# `Object.clear` _(ext/object/clear)_ + +Deletes all own, enumerable, non-symbol properties in the object + +```javascript +const clear = require("ext/object/clear"); + +const obj = { foo: "bar" }; + +clear(obj); +Object.keys(obj); // [] +``` diff --git a/test/node_modules/ext/docs/object/entries.md b/test/node_modules/ext/docs/object/entries.md new file mode 100644 index 0000000..2d05f4c --- /dev/null +++ b/test/node_modules/ext/docs/object/entries.md @@ -0,0 +1,11 @@ +# `Object.entries` _(ext/object/entries)_ + +[Object.entries](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries) implementation. + +Returns native `Object.entries` if it's implemented, otherwise library implementation is returned + +```javascript +const entries = require("ext/object/entries"); + +entries({ foo: "bar" }); // [["foo", "bar"]] +``` diff --git a/test/node_modules/ext/docs/promise/limit.md b/test/node_modules/ext/docs/promise/limit.md new file mode 100644 index 0000000..8b0ea38 --- /dev/null +++ b/test/node_modules/ext/docs/promise/limit.md @@ -0,0 +1,13 @@ +# `Promise.limit` _(ext/promise/limit)_ + +Helps to limit concurrency of asynchronous operations. + +```javascript +const limit = require("ext/promise/limit").bind(Promise); + +const limittedAsyncFunction = limit(2, asyncFunction); + +imittedAsyncFunction(); // Async operation started +imittedAsyncFunction(); // Async operation started +imittedAsyncFunction(); // On hold until one of previously started finalizes +``` diff --git a/test/node_modules/ext/docs/string/random.md b/test/node_modules/ext/docs/string/random.md new file mode 100644 index 0000000..c3099e9 --- /dev/null +++ b/test/node_modules/ext/docs/string/random.md @@ -0,0 +1,31 @@ +# `String.random(options = { ... })` _(ext/string/random)_ + +Returns generated random string, contained only of ascii cars `a-z` and `0-1`. +By default returns string of length `10`. + +```javascript +const random = require("ext/string/random"); + +random(); // "upcfns0i4t" +random({ length: 3 }); // "5tw" +``` + +## Supported options: + +### `isUnique: false` + +Ensures generated string is unique among ones already returned. + +_Note: When not applying this setting, accidental generation of same string is still highly unlikely. Provided option is just to provide a mean to eliminate possibility of an edge case of duplicate string being returned_ + +### `length: 10` + +Desired length of result string + +### `charset: null` + +Fixed list of possible characters + +```javascript +random({ charset: "abc" }); // "bacbccbbac" +``` diff --git a/test/node_modules/ext/docs/string_/camel-to-hyphen.md b/test/node_modules/ext/docs/string_/camel-to-hyphen.md new file mode 100644 index 0000000..e3e4c03 --- /dev/null +++ b/test/node_modules/ext/docs/string_/camel-to-hyphen.md @@ -0,0 +1,9 @@ +# `string.camelToHyphen()` _(ext/string\_/camel-to-hyphen)_ + +Convert camelCase string to hyphen separated, e.g. `oneTwoThree` into `one-to-three`. Useful when converting names from js property convention into filename convention. + +```javascript +const camelToHyphen = require("ext/string_/camelToHyphen"); + +camelToHyphen.call("razDwaTrzy"); // raz-dwa-trzy +``` diff --git a/test/node_modules/ext/docs/string_/capitalize.md b/test/node_modules/ext/docs/string_/capitalize.md new file mode 100644 index 0000000..319e194 --- /dev/null +++ b/test/node_modules/ext/docs/string_/capitalize.md @@ -0,0 +1,9 @@ +# `string.capitalize()` _(ext/string\_/capitalize)_ + +Capitalize input string, e.g. convert `this is a test` into `This is a test`. + +```javascript +const capitalize = require("ext/string_/capitalize"); + +capitalize.call("this is a test"); // This is a test +``` diff --git a/test/node_modules/ext/docs/string_/includes.md b/test/node_modules/ext/docs/string_/includes.md new file mode 100644 index 0000000..4fe1b58 --- /dev/null +++ b/test/node_modules/ext/docs/string_/includes.md @@ -0,0 +1,10 @@ +# `string.includes(position = 0)` _(ext/string\_/includes)_ + +`includes` method for strings. Resolve native [includes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes) if implemented, otherwise fallback to shim implementation. + +```javascript +const includes = require("ext/string_/includes"); + +includes.call("razdwa", "raz"); // true +includes.call("razdwa", "trzy"); // false +``` diff --git a/test/node_modules/ext/docs/thenable_/finally.md b/test/node_modules/ext/docs/thenable_/finally.md new file mode 100644 index 0000000..978ce0c --- /dev/null +++ b/test/node_modules/ext/docs/thenable_/finally.md @@ -0,0 +1,9 @@ +# `thenable.finally` _(ext/thenable\_/finally)_ + +`finally` method for any _thenable_ input + +```javascript +const finally = require("ext/thenable_/finally"); + +finally.call(thenable, () => console.log("Thenable resolved")); +``` diff --git a/test/node_modules/ext/function/identity.js b/test/node_modules/ext/function/identity.js new file mode 100644 index 0000000..cde213f --- /dev/null +++ b/test/node_modules/ext/function/identity.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = function (value) { return value; }; diff --git a/test/node_modules/ext/global-this/implementation.js b/test/node_modules/ext/global-this/implementation.js new file mode 100644 index 0000000..6a06d52 --- /dev/null +++ b/test/node_modules/ext/global-this/implementation.js @@ -0,0 +1,31 @@ +var naiveFallback = function () { + if (typeof self === "object" && self) return self; + if (typeof window === "object" && window) return window; + throw new Error("Unable to resolve global `this`"); +}; + +module.exports = (function () { + if (this) return this; + + // Unexpected strict mode (may happen if e.g. bundled into ESM module) + + // Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis + // In all ES5+ engines global object inherits from Object.prototype + // (if you approached one that doesn't please report) + try { + Object.defineProperty(Object.prototype, "__global__", { + get: function () { return this; }, + configurable: true + }); + } catch (error) { + // Unfortunate case of Object.prototype being sealed (via preventExtensions, seal or freeze) + return naiveFallback(); + } + try { + // Safari case (window.__global__ is resolved with global context, but __global__ does not) + if (!__global__) return naiveFallback(); + return __global__; + } finally { + delete Object.prototype.__global__; + } +})(); diff --git a/test/node_modules/ext/global-this/index.js b/test/node_modules/ext/global-this/index.js new file mode 100644 index 0000000..8a99c25 --- /dev/null +++ b/test/node_modules/ext/global-this/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? globalThis : require("./implementation"); diff --git a/test/node_modules/ext/global-this/is-implemented.js b/test/node_modules/ext/global-this/is-implemented.js new file mode 100644 index 0000000..3eae23e --- /dev/null +++ b/test/node_modules/ext/global-this/is-implemented.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = function () { + if (typeof globalThis !== "object") return false; + if (!globalThis) return false; + return globalThis.Array === Array; +}; diff --git a/test/node_modules/ext/lib/private/decimal-adjust.js b/test/node_modules/ext/lib/private/decimal-adjust.js new file mode 100644 index 0000000..e04cde9 --- /dev/null +++ b/test/node_modules/ext/lib/private/decimal-adjust.js @@ -0,0 +1,29 @@ +// Credit: +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round +// #Decimal_rounding + +"use strict"; + +var isValue = require("type/object/is") + , ensureInteger = require("type/integer/ensure"); + +var split = String.prototype.split; + +module.exports = function (type) { + return function (value/*, exp*/) { + value = Number(value); + var exp = arguments[1]; + if (isValue(exp)) exp = ensureInteger(exp); + if (!value) return value; + if (!exp) return Math[type](value); + if (!isFinite(value)) return value; + + // Shift + var tokens = split.call(value, "e"); + value = Math[type](tokens[0] + "e" + ((tokens[1] || 0) - exp)); + + // Shift back + tokens = value.toString().split("e"); + return Number(tokens[0] + "e" + (Number(tokens[1] || 0) + exp)); + }; +}; diff --git a/test/node_modules/ext/lib/private/define-function-length.js b/test/node_modules/ext/lib/private/define-function-length.js new file mode 100644 index 0000000..4db3228 --- /dev/null +++ b/test/node_modules/ext/lib/private/define-function-length.js @@ -0,0 +1,56 @@ +"use strict"; + +var test = function (arg1, arg2) { return arg2; }; + +try { + Object.defineProperty(test, "length", { + configurable: true, + writable: false, + enumerable: false, + value: 1 + }); +} +catch (ignore) {} + +if (test.length === 1) { + // ES2015+ + var desc = { configurable: true, writable: false, enumerable: false }; + module.exports = function (length, fn) { + if (fn.length === length) return fn; + desc.value = length; + return Object.defineProperty(fn, "length", desc); + }; + return; +} + +module.exports = function (length, fn) { + if (fn.length === length) return fn; + switch (length) { + case 0: + return function () { return fn.apply(this, arguments); }; + case 1: + return function (ignored1) { return fn.apply(this, arguments); }; + case 2: + return function (ignored1, ignored2) { return fn.apply(this, arguments); }; + case 3: + return function (ignored1, ignored2, ignored3) { return fn.apply(this, arguments); }; + case 4: + return function (ignored1, ignored2, ignored3, ignored4) { + return fn.apply(this, arguments); + }; + case 5: + return function (ignored1, ignored2, ignored3, ignored4, ignored5) { + return fn.apply(this, arguments); + }; + case 6: + return function (ignored1, ignored2, ignored3, ignored4, ignored5, ignored6) { + return fn.apply(this, arguments); + }; + case 7: + return function (ignored1, ignored2, ignored3, ignored4, ignored5, ignored6, ignored7) { + return fn.apply(this, arguments); + }; + default: + throw new Error("Usupported function length"); + } +}; diff --git a/test/node_modules/ext/math/ceil-10.js b/test/node_modules/ext/math/ceil-10.js new file mode 100644 index 0000000..c57a730 --- /dev/null +++ b/test/node_modules/ext/math/ceil-10.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("../lib/private/decimal-adjust")("ceil"); diff --git a/test/node_modules/ext/math/floor-10.js b/test/node_modules/ext/math/floor-10.js new file mode 100644 index 0000000..27dd1aa --- /dev/null +++ b/test/node_modules/ext/math/floor-10.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("../lib/private/decimal-adjust")("floor"); diff --git a/test/node_modules/ext/math/round-10.js b/test/node_modules/ext/math/round-10.js new file mode 100644 index 0000000..643d676 --- /dev/null +++ b/test/node_modules/ext/math/round-10.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("../lib/private/decimal-adjust")("round"); diff --git a/test/node_modules/ext/node_modules/type/CHANGELOG.md b/test/node_modules/ext/node_modules/type/CHANGELOG.md new file mode 100644 index 0000000..001636b --- /dev/null +++ b/test/node_modules/ext/node_modules/type/CHANGELOG.md @@ -0,0 +1,172 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +### [2.7.2](https://github.com/medikoo/type/compare/v2.7.1...v2.7.2) (2022-08-05) + +### Maintenance Improvements + +- **TS:** Improve `ensure` options handling ([#8](https://github.com/medikoo/type/issues/8)) ([4a54066](https://github.com/medikoo/type/commit/4a54066d7b55cef14ac4aa25a6f070296a043a6f)) ([Marco](https://github.com/borracciaBlu)) + +### [2.7.1](https://github.com/medikoo/type/compare/v2.7.0...v2.7.1) (2022-08-04) + +### Maintenance Improvements + +- **TS:** Fix support for `isOptional` in `ensure` options ([#7](https://github.com/medikoo/type/issues/7)) ([320f89b](https://github.com/medikoo/type/commit/320f89b89237e3e0ceff5e26b67cb18bd52cb42d)) ([Marco](https://github.com/borracciaBlu)) + +## [2.7.0](https://github.com/medikoo/type/compare/v2.6.1...v2.7.0) (2022-08-03) + +### Features + +- `BigInt.coerce` and `BigInt.ensure` ([e49ad78](https://github.com/medikoo/type/commit/e49ad787bd3aa67b7aa9f7a8ea4cde22a08bebc5)) + +### [2.6.1](https://github.com/medikoo/type/compare/v2.6.0...v2.6.1) (2022-07-29) + +### Maintenance Improvements + +- Declare TS types ([#6](https://github.com/medikoo/type/issues/6)) ([6378e2c](https://github.com/medikoo/type/commit/6378e2c457670bcb8a9b898e0f2502ed5b942d44)) ([Marco](https://github.com/borracciaBlu)) + +## [2.6.0](https://github.com/medikoo/type/compare/v2.5.0...v2.6.0) (2022-02-02) + +### Features + +- `constructor` validation utils ([74b99bb](https://github.com/medikoo/type/commit/74b99bbf6be27083bf9a053961edb2a585ae3e77)) + +## [2.5.0](https://github.com/medikoo/type/compare/v2.4.0...v2.5.0) (2021-03-08) + +### Features + +- `errorCode` option for `ensure*` utils ([777a1f2](https://github.com/medikoo/type/commit/777a1f2c9fd76defcd24d3a30cce49491947fef7)) + +## [2.4.0](https://github.com/medikoo/type/compare/v2.3.0...v2.4.0) (2021-03-08) + +### Features + +- `set/is` and `set/ensure` utils ([083ec23](https://github.com/medikoo/type/commit/083ec2351718c310f316dcfd8c624a13201e227f)) + +## [2.3.0](https://github.com/medikoo/type/compare/v2.2.0...v2.3.0) (2021-02-16) + +### Features + +- `map/is` and `map/ensure` utils ([aafd1cb](https://github.com/medikoo/type/commit/aafd1cbd8c888fda98d39fd17e59f38b078d7bcf)) + +## [2.2.0](https://github.com/medikoo/type/compare/v2.1.0...v2.2.0) (2021-02-11) + +### Features + +- Support `ensureItem` option in `array/ensure` ([8f74973](https://github.com/medikoo/type/commit/8f749739df9bfebf44087093e09c8f7341a33a09)) + +## [2.1.0](https://github.com/medikoo/type/compare/v2.0.0...v2.1.0) (2020-08-21) + +### Features + +- `ensure` util for cumulated input validation ([814c5a8](https://github.com/medikoo/type/commit/814c5a801ecac23d06d8a5f4bcafc4763a04408c)) +- Provide an alternative error message with `options.name` ([c7751c0](https://github.com/medikoo/type/commit/c7751c084ee4f3d3ed10500db0edde2ff00e03a1)) +- Support `%n` (meaningful name) token in error message resolver ([b0f374e](https://github.com/medikoo/type/commit/b0f374e54345c714fe37a90887ecfe60577ce133)) +- Support `min` validation for natural numbers ([e703512](https://github.com/medikoo/type/commit/e70351248818d3e113110106ad174b42c5fd9b25)) +- Support custom Error constructors ([c6ecb90](https://github.com/medikoo/type/commit/c6ecb90e21c1c778210934204cbe393fb89ef2f6)) + +### Bug Fixes + +- Fix typo in error message ([2735533](https://github.com/medikoo/type/commit/2735533de28d33dfa13222743698169c92d08c09)) + +## [2.0.0](https://github.com/medikoo/type/compare/v1.2.0...v2.0.0) (2019-10-10) + +### Features + +- `allowedKeys` option for plain-object/ensure ([f81e72e](https://github.com/medikoo/type/commit/f81e72e)) +- `ensurePropertyValue` option for plain-object/ensure ([c5ff8fb](https://github.com/medikoo/type/commit/c5ff8fb)) +- Replace `coerceItem` with `ensureItem` option in iterable/ensure ([721494f](https://github.com/medikoo/type/commit/721494f)) +- Seclude lib/resolve-error-message ([12636d9](https://github.com/medikoo/type/commit/12636d9)) +- Validate options.ensureItem in iterable/ensure ([78da6c1](https://github.com/medikoo/type/commit/78da6c1)) + +### BREAKING CHANGES + +- iterable/ensure no longer supports `coerceItem` option. Instead `ensureItem` was introduced + +## [1.2.0](https://github.com/medikoo/type/compare/v1.1.0...v1.2.0) (2019-09-20) + +### Bug Fixes + +- Improve error message so it's not confusing ([97cd6b9](https://github.com/medikoo/type/commit/97cd6b9)) + +### Features + +- 'coerceItem' option for iterable/ensure ([0818860](https://github.com/medikoo/type/commit/0818860)) + +## [1.1.0](https://github.com/medikoo/type/compare/v1.0.3...v1.1.0) (2019-09-20) + +### Features + +- `denyEmpty` option for iterables validation ([301d071](https://github.com/medikoo/type/commit/301d071)) + +### [1.0.3](https://github.com/medikoo/type/compare/v1.0.2...v1.0.3) (2019-08-06) + +### Bug Fixes + +- Recognize custom built ES5 era errors ([6462fac](https://github.com/medikoo/type/commit/6462fac)) + +### [1.0.2](https://github.com/medikoo/type/compare/v1.0.1...v1.0.2) (2019-08-06) + +### Bug Fixes + +- Recognize host errors (e.g. DOMException) ([96ef399](https://github.com/medikoo/type/commit/96ef399)) + +## [1.0.1](https://github.com/medikoo/type/compare/v1.0.0...v1.0.1) (2019-04-08) + +# 1.0.0 (2019-04-05) + +### Bug Fixes + +- ensure 'is' functions can't crash ([59ceb78](https://github.com/medikoo/type/commit/59ceb78)) + +### Features + +- array-length/coerce ([af8ddec](https://github.com/medikoo/type/commit/af8ddec)) +- array-length/ensure ([d313eb6](https://github.com/medikoo/type/commit/d313eb6)) +- array-like/ensure ([45f1ddd](https://github.com/medikoo/type/commit/45f1ddd)) +- array-like/is ([9a026a5](https://github.com/medikoo/type/commit/9a026a5)) +- array/ensure ([9db1515](https://github.com/medikoo/type/commit/9db1515)) +- array/is ([9672839](https://github.com/medikoo/type/commit/9672839)) +- date/ensure ([44e25a0](https://github.com/medikoo/type/commit/44e25a0)) +- date/is ([0316558](https://github.com/medikoo/type/commit/0316558)) +- ensure to not crash ([3998348](https://github.com/medikoo/type/commit/3998348)) +- ensure/number ([134b5cb](https://github.com/medikoo/type/commit/134b5cb)) +- error/ensure ([d5c8a30](https://github.com/medikoo/type/commit/d5c8a30)) +- error/is-error ([4d6b899](https://github.com/medikoo/type/commit/4d6b899)) +- finite/coerce ([accaad1](https://github.com/medikoo/type/commit/accaad1)) +- finite/ensure ([51e4174](https://github.com/medikoo/type/commit/51e4174)) +- function/ensure ([b624c9a](https://github.com/medikoo/type/commit/b624c9a)) +- function/is ([dab8026](https://github.com/medikoo/type/commit/dab8026)) +- integer/coerce ([89dea2e](https://github.com/medikoo/type/commit/89dea2e)) +- integer/ensure ([44a7071](https://github.com/medikoo/type/commit/44a7071)) +- iterable/ensure ([3d48841](https://github.com/medikoo/type/commit/3d48841)) +- iterable/is ([cf09513](https://github.com/medikoo/type/commit/cf09513)) +- lib/is-to-string-tag-supported ([c8c001d](https://github.com/medikoo/type/commit/c8c001d)) +- natural-number/coerce ([d08fdd9](https://github.com/medikoo/type/commit/d08fdd9)) +- natural-number/ensure ([6c24d12](https://github.com/medikoo/type/commit/6c24d12)) +- number/coerce ([86ccf08](https://github.com/medikoo/type/commit/86ccf08)) +- object/ensure ([a9e8eed](https://github.com/medikoo/type/commit/a9e8eed)) +- object/is ([d2d7251](https://github.com/medikoo/type/commit/d2d7251)) +- plain-function/ensure ([5186518](https://github.com/medikoo/type/commit/5186518)) +- plain-function/is ([51bc791](https://github.com/medikoo/type/commit/51bc791)) +- plain-object/ensure ([91cf5e5](https://github.com/medikoo/type/commit/91cf5e5)) +- plain-object/is ([4dcf393](https://github.com/medikoo/type/commit/4dcf393)) +- promise/ensure ([8d096a4](https://github.com/medikoo/type/commit/8d096a4)) +- promise/is ([a00de02](https://github.com/medikoo/type/commit/a00de02)) +- prototype/is ([b23bdcc](https://github.com/medikoo/type/commit/b23bdcc)) +- reg-exp/ensure ([6f7bbcb](https://github.com/medikoo/type/commit/6f7bbcb)) +- reg-exp/is ([9728519](https://github.com/medikoo/type/commit/9728519)) +- safe-integer/coerce ([b8549c4](https://github.com/medikoo/type/commit/b8549c4)) +- safe-integer/ensure ([a70ef3f](https://github.com/medikoo/type/commit/a70ef3f)) +- string/coerce ([b25c71f](https://github.com/medikoo/type/commit/b25c71f)) +- string/ensure ([b62577d](https://github.com/medikoo/type/commit/b62577d)) +- support 'default' in resolveException ([e08332a](https://github.com/medikoo/type/commit/e08332a)) +- switch config to ES3 based ([37606d9](https://github.com/medikoo/type/commit/37606d9)) +- thenable/ensure ([6762c0d](https://github.com/medikoo/type/commit/6762c0d)) +- thenable/is ([2711d70](https://github.com/medikoo/type/commit/2711d70)) +- time-value/coerce ([27fd109](https://github.com/medikoo/type/commit/27fd109)) +- time-value/ensure ([1f6a8ea](https://github.com/medikoo/type/commit/1f6a8ea)) +- **string/coerce:** restrict toString acceptance ([2a87100](https://github.com/medikoo/type/commit/2a87100)) +- value/ensure ([dd6d8cb](https://github.com/medikoo/type/commit/dd6d8cb)) +- value/is ([fdf4763](https://github.com/medikoo/type/commit/fdf4763)) diff --git a/test/node_modules/ext/node_modules/type/LICENSE b/test/node_modules/ext/node_modules/type/LICENSE new file mode 100644 index 0000000..ce541c9 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2019-2022, Mariusz Nowak, @medikoo, medikoo.com + +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/test/node_modules/ext/node_modules/type/README.md b/test/node_modules/ext/node_modules/type/README.md new file mode 100644 index 0000000..6b20794 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/README.md @@ -0,0 +1,168 @@ +[![Build status][build-image]][build-url] +[![Tests coverage][cov-image]][cov-url] +[![npm version][npm-image]][npm-url] + +# type + +## Runtime validation and processing of JavaScript types + +- Respects language nature and acknowledges its quirks +- Allows coercion in restricted forms (rejects clearly invalid input, normalizes permissible type deviations) +- No transpilation implied, written to work in all ECMAScript 3+ engines + +## Use case + +Validate arguments input in public API endpoints. + +_For validation of more sophisticated input structures (as deeply nested configuration objects) it's recommended to consider more powerful schema based utlities (as [AJV](https://ajv.js.org/) or [@hapi/joi](https://hapi.dev/family/joi/))_ + +### Example usage + +Bulletproof input arguments normalization and validation: + +```javascript +const ensureString = require('type/string/ensure') + , ensureDate = require('type/date/ensure') + , ensureNaturalNumber = require('type/natural-number/ensure') + , isObject = require('type/object/is'); + +module.exports = (path, options = { min: 0 }) { + path = ensureString(path, { errorMessage: "%v is not a path" }); + if (!isObject(options)) options = {}; + const min = ensureNaturalNumber(options.min, { default: 0 }) + , max = ensureNaturalNumber(options.max, { isOptional: true }) + , startTime = ensureDate(options.startTime, { isOptional: true }); + + // ...logic +}; +``` + +### Installation + +```bash +npm install type +``` + +## Utilities + +Aside of general [`ensure`](docs/ensure.md) validation util, following kind of utilities for recognized JavaScript types are provided: + +##### `*/coerce` + +Restricted coercion into primitive type. Returns coerced value or `null` if value is not coercible per rules. + +##### `*/is` + +Object type/kind confirmation, returns either `true` or `false`. + +##### `*/ensure` + +Value validation. Returns input value (in primitive cases possibly coerced) or if value doesn't meet the constraints throws `TypeError` . + +Each `*/ensure` utility, accepts following options (eventually passed with second argument): + +- `isOptional` - Makes `null` or `undefined` accepted as valid value. In such case instead of `TypeError` being thrown, `null` is returned. +- `default` - A value to be returned if `null` or `undefined` is passed as an input value. +- `errorMessage` - Custom error message. Following placeholders can be used: + - `%v` - To be replaced with short string representation of invalid value + - `%n` - To be replaced with meaninfgul name (to be passed with `name` option) of validated value. Not effective if `name` option is not present +- `errorCode` - Eventual error code to be exposed on `.code` error property +- `name` - Meaningful name for validated value, to be used in error message, assuming it contains `%n` placeholder +- `Error` - Alternative error constructor to be used (defaults to `TypeError`) + +### Index + +#### General utils: + +- [`ensure`](docs/ensure.md) + +#### Type specific utils: + +- **Value** + - [`value/is`](docs/value.md#valueis) + - [`value/ensure`](docs/value.md#valueensure) +- **Object** + - [`object/is`](docs/object.md#objectis) + - [`object/ensure`](docs/object.md#objectensure) + - **Plain Object** + - [`plain-object/is`](docs/plain-object.md#plain-objectis) + - [`plain-object/ensure`](docs/plain-object.md#plain-objectensure) +- **String** + - [`string/coerce`](docs/string.md#stringcoerce) + - [`string/ensure`](docs/string.md#stringensure) +- **Number** + - [`number/coerce`](docs/number.md#numbercoerce) + - [`number/ensure`](docs/number.md#numberensure) + - **Finite Number** + - [`finite/coerce`](docs/finite.md#finitecoerce) + - [`finite/ensure`](docs/finite.md#finiteensure) + - **Integer Number** + - [`integer/coerce`](docs/integer.md#integercoerce) + - [`integer/ensure`](docs/integer.md#integerensure) + - **Safe Integer Number** + - [`safe-integer/coerce`](docs/safe-integer.md#safe-integercoerce) + - [`safe-integer/ensure`](docs/.md#safe-integerensure) + - **Natural Number** + - [`natural-number/coerce`](docs/natural-number.md#natural-numbercoerce) + - [`natural-number/ensure`](docs/natural-number.md#natural-numberensure) + - **Array Length** + - [`array-length/coerce`](docs/array-length.md#array-lengthcoerce) + - [`array-length/ensure`](docs/array-length.md#array-lengthensure) + - **Time Value** + - [`time-value/coerce`](docs/time-value.md#time-valuecoerce) + - [`time-value/ensure`](docs/time-value.md#time-valueensure) +- **BigInt** + - [`big-int/coerce`](docs/big-int.md#big-intcoerce) + - [`big-int/ensure`](docs/big-int.md#big-intensure) +- **Array Like** + - [`array-like/is`](docs/array-like.md#array-likeis) + - [`array-like/ensure`](docs/array-like.md#array-likeensure) + - **Array** + - [`array/is`](docs/array.md#arrayis) + - [`array/ensure`](docs/array.md#arrayensure) +- **Iterable** + - [`iterable/is`](docs/iterable.md#iterableis) + - [`iterable/ensure`](docs/iterable.md#iterableensure) +- **Set** + - [`set/is`](docs/set.md#setis) + - [`set/ensure`](docs/set.md#setensure) +- **Map** + - [`map/is`](docs/map.md#mapis) + - [`map/ensure`](docs/map.md#mapensure) +- **Date** + - [`date/is`](docs/date.md#dateis) + - [`date/ensure`](docs/date.md#dateensure) +- **Function** + - [`function/is`](docs/function.md#functionis) + - [`function/ensure`](docs/function.md#functionensure) + - **Constructor** + - [`constructor/is`](docs/constructor.md#plain-functionis) + - [`constructor/ensure`](docs/constructor.md#plain-functionensure) + - **Plain Function** + - [`plain-function/is`](docs/plain-function.md#plain-functionis) + - [`plain-function/ensure`](docs/plain-function.md#plain-functionensure) +- **Reg Exp** + - [`reg-exp/is`](docs/reg-exp.md#reg-expis) + - [`reg-exp/ensure`](docs/.md#reg-expensure) +- **Thenable** + - [`thenable/is`](docs/thenable.md#thenableis) + - [`thenable/ensure`](docs/thenable.md#thenableensure) + - **Promise** + - [`promise/is`](docs/promise.md#promiseis) + - [`promise/ensure`](docs/promise.md#promiseensure) +- **Error** + - [`error/is`](docs/error.md#erroris) + - [`error/ensure`](docs/error.md#errorensure) +- **Prototype** + - [`prototype/is`](docs/prototype.md#prototypeis) + +### Tests + + $ npm test + +[build-image]: https://github.com/medikoo/type/workflows/Integrate/badge.svg +[build-url]: https://github.com/medikoo/type/actions?query=workflow%3AIntegrate +[cov-image]: https://img.shields.io/codecov/c/github/medikoo/type.svg +[cov-url]: https://codecov.io/gh/medikoo/type +[npm-image]: https://img.shields.io/npm/v/type.svg +[npm-url]: https://www.npmjs.com/package/type diff --git a/test/node_modules/ext/node_modules/type/array-length/coerce.js b/test/node_modules/ext/node_modules/type/array-length/coerce.js new file mode 100644 index 0000000..3dbbf97 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/array-length/coerce.js @@ -0,0 +1,10 @@ +"use strict"; + +var coerceToSafeInteger = require("../safe-integer/coerce"); + +module.exports = function (value) { + value = coerceToSafeInteger(value); + if (!value) return value; + if (value < 0) return null; + return value; +}; diff --git a/test/node_modules/ext/node_modules/type/array-length/ensure.js b/test/node_modules/ext/node_modules/type/array-length/ensure.js new file mode 100644 index 0000000..2b48ddc --- /dev/null +++ b/test/node_modules/ext/node_modules/type/array-length/ensure.js @@ -0,0 +1,15 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , coerce = require("./coerce"); + +module.exports = function (value/*, options*/) { + var coerced = coerce(value); + if (coerced !== null) return coerced; + var options = arguments[1]; + var errorMessage = + options && options.name + ? "Expected an array length for %n, received %v" + : "%v is not an array length"; + return resolveException(value, errorMessage, options); +}; diff --git a/test/node_modules/ext/node_modules/type/array-like/ensure.js b/test/node_modules/ext/node_modules/type/array-like/ensure.js new file mode 100644 index 0000000..0d1a9f7 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/array-like/ensure.js @@ -0,0 +1,14 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , is = require("./is"); + +module.exports = function (value/*, options*/) { + if (is(value, arguments[1])) return value; + var options = arguments[1]; + var errorMessage = + options && options.name + ? "Expected an array like for %n, received %v" + : "%v is not an array like"; + return resolveException(value, errorMessage, options); +}; diff --git a/test/node_modules/ext/node_modules/type/array-like/is.js b/test/node_modules/ext/node_modules/type/array-like/is.js new file mode 100644 index 0000000..7778fed --- /dev/null +++ b/test/node_modules/ext/node_modules/type/array-like/is.js @@ -0,0 +1,21 @@ +"use strict"; + +var coerceToArrayLength = require("../array-length/coerce") + , isObject = require("../object/is"); + +module.exports = function (value/*, options*/) { + if (!isObject(value)) { + var options = arguments[1]; + if (isObject(options) && options.allowString && typeof value === "string") return true; + return false; + } + + if (typeof value === "function") return false; + + var length; + try { length = value.length; } + catch (error) { return false; } + + if (coerceToArrayLength(length) === null) return false; + return true; +}; diff --git a/test/node_modules/ext/node_modules/type/array/ensure.js b/test/node_modules/ext/node_modules/type/array/ensure.js new file mode 100644 index 0000000..19e4599 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/array/ensure.js @@ -0,0 +1,43 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , resolveErrorMessage = require("../lib/resolve-error-message") + , toShortString = require("../lib/to-short-string") + , ensurePlainFunction = require("../plain-function/ensure") + , is = require("./is"); + +var objHasOwnProperty = Object.prototype.hasOwnProperty, invalidItemsLimit = 3; + +module.exports = function (value /*, options*/) { + var options = arguments[1]; + var mainErrorMessage = + options && options.name ? "Expected an array for %n, received %v" : "%v is not an array"; + if (!is(value)) return resolveException(value, mainErrorMessage, options); + if (!options) return value; + + var ensureItem = ensurePlainFunction(options.ensureItem, { isOptional: true }); + if (ensureItem) { + var coercedValue = [], invalidItems; + for (var index = 0, length = value.length; index < length; ++index) { + if (!objHasOwnProperty.call(value, index)) continue; + var coercedItem; + try { + coercedItem = ensureItem(value[index]); + } catch (error) { + if (!invalidItems) invalidItems = []; + if (invalidItems.push(toShortString(value[index])) === invalidItemsLimit) break; + } + if (invalidItems) continue; + coercedValue[index] = coercedItem; + } + if (invalidItems) { + throw new TypeError( + resolveErrorMessage(mainErrorMessage, value, options) + + ".\n Following items are invalid: " + + invalidItems.join(", ") + ); + } + return coercedValue; + } + return value; +}; diff --git a/test/node_modules/ext/node_modules/type/array/is.js b/test/node_modules/ext/node_modules/type/array/is.js new file mode 100644 index 0000000..13fd8d3 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/array/is.js @@ -0,0 +1,27 @@ +"use strict"; + +var isPrototype = require("../prototype/is"); + +var isArray; +if (typeof Array.isArray === "function") { + isArray = Array.isArray; +} else { + var objectToString = Object.prototype.toString, objectTaggedString = objectToString.call([]); + isArray = function (value) { return objectToString.call(value) === objectTaggedString; }; +} + +module.exports = function (value) { + if (!isArray(value)) return false; + + // Sanity check (reject objects which do not expose common Array interface) + if (!hasOwnProperty.call(value, "length")) return false; + try { + if (typeof value.length !== "number") return false; + if (typeof value.push !== "function") return false; + if (typeof value.splice !== "function") return false; + } catch (error) { + return false; + } + + return !isPrototype(value); +}; diff --git a/test/node_modules/ext/node_modules/type/big-int/coerce.js b/test/node_modules/ext/node_modules/type/big-int/coerce.js new file mode 100644 index 0000000..a600a20 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/big-int/coerce.js @@ -0,0 +1,13 @@ +"use strict"; + +var isValue = require("../value/is"); + +// Sanity BigInt support check +BigInt(0); + +module.exports = function (value) { + if (!isValue(value)) return null; + if (typeof value === "bigint") return value; + try { return BigInt(value); } + catch (error) { return null; } +}; diff --git a/test/node_modules/ext/node_modules/type/big-int/ensure.js b/test/node_modules/ext/node_modules/type/big-int/ensure.js new file mode 100644 index 0000000..319b1b7 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/big-int/ensure.js @@ -0,0 +1,13 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , coerce = require("./coerce"); + +module.exports = function (value /*, options*/) { + var coerced = coerce(value); + if (coerced !== null) return coerced; + var options = arguments[1]; + var errorMessage = + options && options.name ? "Expected bigint for %n, received %v" : "%v is not a bigint"; + return resolveException(value, errorMessage, options); +}; diff --git a/test/node_modules/ext/node_modules/type/constructor/ensure.js b/test/node_modules/ext/node_modules/type/constructor/ensure.js new file mode 100644 index 0000000..4f3e846 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/constructor/ensure.js @@ -0,0 +1,14 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , is = require("./is"); + +module.exports = function (value /*, options*/) { + if (is(value)) return value; + var options = arguments[1]; + var errorMessage = + options && options.name + ? "Expected a constructor function for %n, received %v" + : "%v is not a constructor function"; + return resolveException(value, errorMessage, options); +}; diff --git a/test/node_modules/ext/node_modules/type/constructor/is.js b/test/node_modules/ext/node_modules/type/constructor/is.js new file mode 100644 index 0000000..058a156 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/constructor/is.js @@ -0,0 +1,12 @@ +"use strict"; + +var isFunction = require("../function/is"); + +var constructorRe = /^\s*(?:class[\s{/}]|function[\s(])/ + , functionToString = Function.prototype.toString; + +module.exports = function (value) { + if (!isFunction(value)) return false; + if (!constructorRe.test(functionToString.call(value))) return false; + return true; +}; diff --git a/test/node_modules/ext/node_modules/type/date/ensure.js b/test/node_modules/ext/node_modules/type/date/ensure.js new file mode 100644 index 0000000..0fae4d3 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/date/ensure.js @@ -0,0 +1,12 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , is = require("./is"); + +module.exports = function (value/*, options*/) { + if (is(value)) return value; + var options = arguments[1]; + var errorMessage = + options && options.name ? "Expected a date for %n, received %v" : "%v is not a date"; + return resolveException(value, errorMessage, options); +}; diff --git a/test/node_modules/ext/node_modules/type/date/is.js b/test/node_modules/ext/node_modules/type/date/is.js new file mode 100644 index 0000000..0754085 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/date/is.js @@ -0,0 +1,26 @@ +"use strict"; + +var isPrototype = require("../prototype/is"); + +var dateValueOf = Date.prototype.valueOf; + +module.exports = function (value) { + if (!value) return false; + + try { + // Sanity check (reject objects which do not expose common Date interface) + if (typeof value.getFullYear !== "function") return false; + if (typeof value.getTimezoneOffset !== "function") return false; + if (typeof value.setFullYear !== "function") return false; + + // Ensure its native Date object (has [[DateValue]] slot) + dateValueOf.call(value); + } catch (error) { + return false; + } + + // Ensure it hosts valid date + if (isNaN(value)) return false; + + return !isPrototype(value); +}; diff --git a/test/node_modules/ext/node_modules/type/docs/array-length.md b/test/node_modules/ext/node_modules/type/docs/array-length.md new file mode 100644 index 0000000..cca7d8a --- /dev/null +++ b/test/node_modules/ext/node_modules/type/docs/array-length.md @@ -0,0 +1,27 @@ +# Array length + +_number_ primitive that conforms as valid _array length_ + +## `array-length/coerce` + +Follows [`safe-integer/coerce`](safe-integer.md#safe-integercoerce) but returns `null` in place of values which are below `0` + +```javascript +const coerceToArrayLength = require("type/safe-integer/coerce"); + +coerceToArrayLength("12.95"); // 12 +coerceToArrayLength(9007199254740992); // null +coerceToArrayLength(null); // null +``` + +## `array-length/ensure` + +If given argument is an _array length_ coercible value (via [`array-length/coerce`](#array-lengthcoerce)) returns result number. +Otherwise `TypeError` is thrown. + +```javascript +const ensureArrayLength = require("type/array-length/ensure"); + +ensureArrayLength(12.93); // "12" +ensureArrayLength(9007199254740992); // Thrown TypeError: 9007199254740992 is not a valid array length +``` diff --git a/test/node_modules/ext/node_modules/type/docs/array-like.md b/test/node_modules/ext/node_modules/type/docs/array-like.md new file mode 100644 index 0000000..2a48df8 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/docs/array-like.md @@ -0,0 +1,33 @@ +# Array Like + +_Array-like_ value (any value with `length` property) + +## `array-like/is` + +Restricted _array-like_ confirmation. Returns true for every value that meets following contraints + +- is an _object_ (or with `allowString` option, a _string_) +- is not a _function_ +- Exposes `length` that meets [`array-length`](array-length.md#array-lengthcoerce) constraints + +```javascript +const isArrayLike = require("type/array-like/is"); + +isArrayLike([]); // true +isArrayLike({}); // false +isArrayLike({ length: 0 }); // true +isArrayLike("foo"); // false +isArrayLike("foo", { allowString: true }); // true +``` + +## `array-like/ensure` + +If given argument is an _array-like_, it is returned back. Otherwise `TypeError` is thrown. + +```javascript +const ensureArrayLike = require("type/array-like/ensure"); + +ensureArrayLike({ length: 0 }); // { length: 0 } +ensureArrayLike("foo", { allowString: true }); // "foo" +ensureArrayLike({}); // Thrown TypeError: null is not an iterable +``` diff --git a/test/node_modules/ext/node_modules/type/docs/array.md b/test/node_modules/ext/node_modules/type/docs/array.md new file mode 100644 index 0000000..0c6ac4e --- /dev/null +++ b/test/node_modules/ext/node_modules/type/docs/array.md @@ -0,0 +1,46 @@ +# Array + +_Array_ instance + +## `array/is` + +Confirms if given object is a native array + +```javascript +const isArray = require("type/array/is"); + +isArray([]); // true +isArray({}); // false +isArray("foo"); // false +``` + +## `array/ensure` + +If given argument is an array, it is returned back. Otherwise `TypeError` is thrown. + +```javascript +const ensureArray = require("type/array/ensure"); + +ensureArray(["foo"]); // ["foo"] +ensureArray("foo"); // Thrown TypeError: foo is not an array +``` + +### Confirming on items + +Items can be validated by passing `ensureItem` option. Note that in this case: + +- A newly created instance of an array with coerced item values is returned +- Error message lists up to three items which are invalid + +```javascript +const ensureString = require("type/string/ensure"); + +ensureArray([12], { ensureItem: ensureString }); // ["12"] + +/* + Below invocation with crash with: + TypeError: 23, [object Object], [object Object] is not a valid array. + Following items are invalid: [object Object], [object Object] +*/ +ensureArray([23, {}, {}], { ensureItem: ensureString }); +``` diff --git a/test/node_modules/ext/node_modules/type/docs/big-int.md b/test/node_modules/ext/node_modules/type/docs/big-int.md new file mode 100644 index 0000000..78626fd --- /dev/null +++ b/test/node_modules/ext/node_modules/type/docs/big-int.md @@ -0,0 +1,27 @@ +# BigInt + +_bigint_ primitive + +## `big-int/coerce` + +BigInt coercion. If value can be coerced by `BigInt` its result is returned. +For all other values `null` is returned + +```javascript +const coerceToBigInt = require("type/big-int/coerce"); + +coerceToBigInt(12); // 12n +coerceToBigInt(undefined); // null +``` + +## `big-int/ensure` + +If given argument is a _bigint_ coercible value (via [`big-int/coerce`](#big-intcoerce)) returns result bigint. +Otherwise `TypeError` is thrown. + +```javascript +const ensureBigInt = require("type/big-int/ensure"); + +ensureBigInt(12); // 12n +ensureBigInt(null); // Thrown TypeError: null is not a bigint +``` diff --git a/test/node_modules/ext/node_modules/type/docs/constructor.md b/test/node_modules/ext/node_modules/type/docs/constructor.md new file mode 100644 index 0000000..172462a --- /dev/null +++ b/test/node_modules/ext/node_modules/type/docs/constructor.md @@ -0,0 +1,28 @@ +# Constructor + +A _Function_ instance that's a _constructor_ (either regular function or _class_) + +## `constructor/is` + +Confirms if given object is a constructor function\_ + +```javascript +const isConstructor = require("type/constructor/is"); + +isConstructor(function () {}); // true +isConstructor(() => {}); // false +isConstructor(class {}); // true +isConstructor("foo"); // false +``` + +## `constructor/ensure` + +If given argument is a _constructor function_, it is returned back. Otherwise `TypeError` is thrown. + +```javascript +const ensureConstructor = require("type/constructor/ensure"); + +const fn = function () {}; +ensureConstructor(fn); // fn +ensureConstructor(() => {}); // Thrown TypeError: () => {} is not a constructor function +``` diff --git a/test/node_modules/ext/node_modules/type/docs/date.md b/test/node_modules/ext/node_modules/type/docs/date.md new file mode 100644 index 0000000..98d3654 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/docs/date.md @@ -0,0 +1,28 @@ +# Date + +_Date_ instance + +## `date/is` + +Confirms if given object is a native date, and is not an _Invalid Date_ + +```javascript +const isDate = require("type/date/is"); + +isDate(new Date()); // true +isDate(new Date("Invalid date")); // false +isDate(Date.now()); // false +isDate("foo"); // false +``` + +## `date/ensure` + +If given argument is a date object, it is returned back. Otherwise `TypeError` is thrown. + +```javascript +const ensureDate = require("type/date/ensure"); + +const date = new Date(); +ensureDate(date); // date +ensureDate(123123); // Thrown TypeError: 123123 is not a date object +``` diff --git a/test/node_modules/ext/node_modules/type/docs/ensure.md b/test/node_modules/ext/node_modules/type/docs/ensure.md new file mode 100644 index 0000000..c3a9527 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/docs/ensure.md @@ -0,0 +1,40 @@ +# `ensure(validationDatum1[, ...validationDatumN[, options]])` + +Provides a complete cumulated input validation for an API endpoint. Validates multiple input arguments and consolidates eventual errors into one. + +## Arguments + +### `validationDatum1[, ...validationDatumN]` + +For each argument to be validated a `validationDatum` of following stucture should be defined: + +```javascript +[argumentName, inputValue, ensureFunction, (options = {})]; +``` + +- `argumentName` - Name of validated argument (used for meaningful error messaging) +- `inputValue` - An argument value as passed to function +- `ensureFunction` - An `ensureX` function with which argument should be validated (e.g. if we're after string, then we need [string/ensure](string.md#stringensure)) +- `options` - Optional, extra options to be passed to `ensureX` function + +### `[options]` + +Eventual options be passed to underlying `ensureX` functions. If custom error constructor is passed with an `Error` option, then cumulated error is created with this constructor. + +## Usage example + +```javascript +const ensure = require("type/ensure"); +const ensureString = require("type/string/ensure"); +const ensureNaturalNumber = require("type/natural-number/ensure"); + +const resolveRepositoryIssue = (repoName, issueNumber) => { + // Validate input + [repoName, issueNumber] = ensure( + ["repoName", repoName, ensureString], + ["issueNumber", issueNumber, ensureNaturalNumber], + { Error: UserError } + ); + // ... logic +}; +``` diff --git a/test/node_modules/ext/node_modules/type/docs/error.md b/test/node_modules/ext/node_modules/type/docs/error.md new file mode 100644 index 0000000..c779333 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/docs/error.md @@ -0,0 +1,26 @@ +# Error + +_Error_ instance + +## `error/is` + +Confirms if given object is a native error object + +```javascript +const isError = require("type/error/is"); + +isError(new Error()); // true +isError({ message: "Fake error" }); // false +``` + +## `error/ensure` + +If given argument is an error object, it is returned back. Otherwise `TypeError` is thrown. + +```javascript +const ensureError = require("type/error/ensure"); + +const someError = new Error("Some error"); +ensureError(someError); // someError +ensureError({ message: "Fake error" }); // Thrown TypeError: [object Object] is not an error object +``` diff --git a/test/node_modules/ext/node_modules/type/docs/finite.md b/test/node_modules/ext/node_modules/type/docs/finite.md new file mode 100644 index 0000000..68786ca --- /dev/null +++ b/test/node_modules/ext/node_modules/type/docs/finite.md @@ -0,0 +1,27 @@ +# Finite Number + +Finite _number_ primitive + +## `finite/coerce` + +Follows [`number/coerce`](number.md#numbercoerce) additionally rejecting `Infinity` and `-Infinity` values (`null` is returned if given values coerces to them) + +```javascript +const coerceToFinite = require("type/finite/coerce"); + +coerceToFinite("12"); // 12 +coerceToFinite(Infinity); // null +coerceToFinite(null); // null +``` + +## `finite/ensure` + +If given argument is a finite number coercible value (via [`finite/coerce`](#finitecoerce)) returns result number. +Otherwise `TypeError` is thrown. + +```javascript +const ensureFinite = require("type/finite/ensure"); + +ensureFinite(12); // "12" +ensureFinite(null); // Thrown TypeError: null is not a finite number +``` diff --git a/test/node_modules/ext/node_modules/type/docs/function.md b/test/node_modules/ext/node_modules/type/docs/function.md new file mode 100644 index 0000000..23f3827 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/docs/function.md @@ -0,0 +1,28 @@ +# Function + +_Function_ instance + +## `function/is` + +Confirms if given object is a native function + +```javascript +const isFunction = require("type/function/is"); + +isFunction(function () {}); // true +isFunction(() => {}); // true +isFunction(class {}); // true +isFunction("foo"); // false +``` + +## `function/ensure` + +If given argument is a function object, it is returned back. Otherwise `TypeError` is thrown. + +```javascript +const ensureFunction = require("type/function/ensure"); + +const fn = function () {}; +ensureFunction(fn); // fn +ensureFunction(/foo/); // Thrown TypeError: /foo/ is not a function +``` diff --git a/test/node_modules/ext/node_modules/type/docs/integer.md b/test/node_modules/ext/node_modules/type/docs/integer.md new file mode 100644 index 0000000..9260a46 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/docs/integer.md @@ -0,0 +1,27 @@ +# Integer Number + +Integer _number_ primitive + +## `integer/coerce` + +Follows [`finite/coerce`](finite.md#finitecoerce) additionally stripping decimal part from the number + +```javascript +const coerceToInteger = require("type/integer/coerce"); + +coerceToInteger("12.95"); // 12 +coerceToInteger(Infinity); // null +coerceToInteger(null); // null +``` + +## `integer/ensure` + +If given argument is an integer coercible value (via [`integer/coerce`](#integercoerce)) returns result number. +Otherwise `TypeError` is thrown. + +```javascript +const ensureInteger = require("type/integer/ensure"); + +ensureInteger(12.93); // "12" +ensureInteger(null); // Thrown TypeError: null is not an integer +``` diff --git a/test/node_modules/ext/node_modules/type/docs/iterable.md b/test/node_modules/ext/node_modules/type/docs/iterable.md new file mode 100644 index 0000000..862e6c8 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/docs/iterable.md @@ -0,0 +1,65 @@ +# Iterable + +Value which implements _iterable_ protocol + +## `iterable/is` + +Confirms if given object is an _iterable_ and is not a _string_ (unless `allowString` option is passed) + +```javascript +const isIterable = require("type/iterable/is"); + +isIterable([]); // true +isIterable({}); // false +isIterable("foo"); // false +isIterable("foo", { allowString: true }); // true +``` + +Supports also `denyEmpty` option + +```javascript +isIterable([], { denyEmpty: true }); // false +isIterable(["foo"], { denyEmpty: true }); // true +``` + +## `iterable/ensure` + +If given argument is an _iterable_, it is returned back. Otherwise `TypeError` is thrown. +By default _string_ primitives are rejected unless `allowString` option is passed. + +```javascript +const ensureIterable = require("type/iterable/ensure"); + +ensureIterable([]); // [] +ensureIterable("foo", { allowString: true }); // "foo" +ensureIterable({}); // Thrown TypeError: null is not expected iterable +``` + +### Denying empty iterables + +Pass `denyEmpty` option to require non empty iterables + +```javascript +ensureIterable([], { denyEmpty: true }); // Thrown TypeError: [] is not expected iterable +``` + +### Confirming on items + +Items can be validated by passing `ensureItem` option. Note that in this case: + +- A newly created instance of array with coerced values is returned +- Error message lists up to three invalid items + +```javascript +const ensureString = require("type/string/ensure"); + +ensureIterable(new Set(["foo", 12]), { ensureItem: ensureString }); // ["foo", "12"] + +/* + Below invocation with crash with: + TypeError: [object Set] is not expected iterable value. + Following items are invalid: + - [object Object] +*/ +ensureIterable(new Set(["foo", {}]), { ensureItem: ensureString }); +``` diff --git a/test/node_modules/ext/node_modules/type/docs/map.md b/test/node_modules/ext/node_modules/type/docs/map.md new file mode 100644 index 0000000..c128022 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/docs/map.md @@ -0,0 +1,27 @@ +# Map + +_Map_ instance + +## `map/is` + +Confirms if given object is a native _map_ + +```javascript +const isMap = require("type/map/is"); + +isMap(new Map()); // true +isMap(new Set()); // false +isMap({}); // false +``` + +## `map/ensure` + +If given argument is a _map_, it is returned back. Otherwise `TypeError` is thrown. + +```javascript +const ensureMap = require("type/map/ensure"); + +const map = new Map(); +ensureMap(map); // map +eensureMap({}); // Thrown TypeError: [object Object] is not a map +``` diff --git a/test/node_modules/ext/node_modules/type/docs/natural-number.md b/test/node_modules/ext/node_modules/type/docs/natural-number.md new file mode 100644 index 0000000..c91ee16 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/docs/natural-number.md @@ -0,0 +1,27 @@ +# Natural Number + +Natural _number_ primitive + +## `natural-number/coerce` + +Follows [`integer/coerce`](integer.md#integercoerce) but returns `null` for values below `0` + +```javascript +const coerceToNaturalNumber = require("type/natural-number/coerce"); + +coerceToNaturalNumber("12.95"); // 12 +coerceToNaturalNumber(-120); // null +coerceToNaturalNumber(null); // null +``` + +## `natural-number/ensure` + +If given argument is a natural number coercible value (via [`natural-number/coerce`](#natural-numbercoerce)) returns result number. +Otherwise `TypeError` is thrown. + +```javascript +const ensureNaturalNumber = require("type/natural-number/ensure"); + +ensureNaturalNumber(12.93); // "12" +ensureNaturalNumber(-230); // Thrown TypeError: null is not a natural number +``` diff --git a/test/node_modules/ext/node_modules/type/docs/number.md b/test/node_modules/ext/node_modules/type/docs/number.md new file mode 100644 index 0000000..5f4dfa9 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/docs/number.md @@ -0,0 +1,33 @@ +# Number + +_number_ primitive + +## `number/coerce` + +Restricted number coercion. Returns number presentation for every value that follows below constraints + +- is implicitly coercible to number +- is neither `null` nor `undefined` +- is not `NaN` and doesn't coerce to `NaN` + +For all other values `null` is returned + +```javascript +const coerceToNumber = require("type/number/coerce"); + +coerceToNumber("12"); // 12 +coerceToNumber({}); // null +coerceToNumber(null); // null +``` + +## `number/ensure` + +If given argument is a number coercible value (via [`number/coerce`](#numbercoerce)) returns result number. +Otherwise `TypeError` is thrown. + +```javascript +const ensureNumber = require("type/number/ensure"); + +ensureNumber(12); // "12" +ensureNumber(null); // Thrown TypeError: null is not a number +``` diff --git a/test/node_modules/ext/node_modules/type/docs/object.md b/test/node_modules/ext/node_modules/type/docs/object.md new file mode 100644 index 0000000..ed43b1f --- /dev/null +++ b/test/node_modules/ext/node_modules/type/docs/object.md @@ -0,0 +1,28 @@ +# Object + +_Object_, any non-primitive value + +## `object/is` + +Confirms if passed value is an object + +```javascript +const isObject = require("type/object/is"); + +isObject({}); // true +isObject(true); // false +isObject(null); // false +``` + +## `object/ensure` + +If given argument is an object, it is returned back. Otherwise `TypeError` is thrown. + +```javascript +const ensureObject = require("type/object/ensure"); + +const obj = {}; + +ensureObject(obj); // obj +ensureString(null); // Thrown TypeError: null is not an object +``` diff --git a/test/node_modules/ext/node_modules/type/docs/plain-function.md b/test/node_modules/ext/node_modules/type/docs/plain-function.md new file mode 100644 index 0000000..e3a8895 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/docs/plain-function.md @@ -0,0 +1,28 @@ +# Plain Function + +A _Function_ instance that is not a _Class_ + +## `plain-function/is` + +Confirms if given object is a _plain function_ + +```javascript +const isPlainFunction = require("type/plain-function/is"); + +isPlainFunction(function () {}); // true +isPlainFunction(() => {}); // true +isPlainFunction(class {}); // false +isPlainFunction("foo"); // false +``` + +## `plain-function/ensure` + +If given argument is a _plain function_ object, it is returned back. Otherwise `TypeError` is thrown. + +```javascript +const ensurePlainFunction = require("type/function/ensure"); + +const fn = function () {}; +ensurePlainFunction(fn); // fn +ensurePlainFunction(class {}); // Thrown TypeError: class is not a plain function +``` diff --git a/test/node_modules/ext/node_modules/type/docs/plain-object.md b/test/node_modules/ext/node_modules/type/docs/plain-object.md new file mode 100644 index 0000000..ce3f522 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/docs/plain-object.md @@ -0,0 +1,69 @@ +# Plain Object + +A _plain object_ + +- Inherits directly from `Object.prototype` or `null` +- Is not a constructor's `prototype` property + +## `plain-object/is` + +Confirms if given object is a _plain object_ + +```javascript +const isPlainObject = require("type/plain-object/is"); + +isPlainObject({}); // true +isPlainObject(Object.create(null)); // true +isPlainObject([]); // false +``` + +## `plain-object/ensure` + +If given argument is a plain object it is returned back. Otherwise `TypeError` is thrown. + +```javascript +const ensurePlainObject = require("type/plain-object/ensure"); + +ensurePlainObject({}); // {} +ensurePlainObject("foo"); // Thrown TypeError: foo is not a plain object +``` + +### Confirming on keys + +Keys can be validated by passing `allowedKeys` option. Note that in this case: + +- Error message lists up to three invalid keys + +```javascript +const allowedKeys = ["foo"]; + +ensurePlainObject({}, { allowedKeys }); // {} +ensurePlainObject({ foo: "bar" }, { allowedKeys }); // { foo: 'bar' } + +/* + Below invocation with crash with: + TypeError: [object Object] is not a valid plain object. + Following keys are unexpected: lorem, ipsum +*/ +ensurePlainObject({ foo: "bar", lorem: 1, ipsum: 2 }, { allowedKeys }); +``` + +### Confirming on property values + +Property values can be validated by passing `ensurePropertyValue` option. Note that in this case: + +- A newly created instance of plain object with coerced values is returned +- Error message lists up to three keys that contain invalid values + +```javascript +const ensureString = require("type/string/ensure"); + +ensurePlainObject({ foo: 12 }, { ensurePropertyValue: ensureString }); // { foo: '12' } + +/* + Below invocation with crash with: + TypeError: [object Object] is not a valid plain object. + Valuees for following keys are invalid: lorem, ipsum +*/ +ensurePlainObject({ foo: 23, lorem: {}, ipsum: {} }, { ensurePropertyValue: ensureString }); +``` diff --git a/test/node_modules/ext/node_modules/type/docs/promise.md b/test/node_modules/ext/node_modules/type/docs/promise.md new file mode 100644 index 0000000..ce38794 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/docs/promise.md @@ -0,0 +1,27 @@ +# Promise + +_Promise_ instance + +## `promise/is` + +Confirms if given object is a native _promise_ + +```javascript +const isPromise = require("type/promise/is"); + +isPromise(Promise.resolve()); // true +isPromise({ then: () => {} }); // false +isPromise({}); // false +``` + +## `promise/ensure` + +If given argument is a promise, it is returned back. Otherwise `TypeError` is thrown. + +```javascript +const ensurePromise = require("type/promise/ensure"); + +const promise = Promise.resolve(); +ensurePromise(promise); // promise +eensurePromise({}); // Thrown TypeError: [object Object] is not a promise +``` diff --git a/test/node_modules/ext/node_modules/type/docs/prototype.md b/test/node_modules/ext/node_modules/type/docs/prototype.md new file mode 100644 index 0000000..926c256 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/docs/prototype.md @@ -0,0 +1,15 @@ +# Prototype + +Some constructor's `prototype` property + +## `prototype/is` + +Confirms if given object serves as a _prototype_ property + +```javascript +const isPrototype = require("type/prototype/is"); + +isPrototype({}); // false +isPrototype(Object.prototype); // true +isPrototype(Array.prototype); // true +``` diff --git a/test/node_modules/ext/node_modules/type/docs/reg-exp.md b/test/node_modules/ext/node_modules/type/docs/reg-exp.md new file mode 100644 index 0000000..00d081c --- /dev/null +++ b/test/node_modules/ext/node_modules/type/docs/reg-exp.md @@ -0,0 +1,26 @@ +# RegExp + +_RegExp_ instance + +## `reg-exp/is` + +Confirms if given object is a native regular expression object + +```javascript +const isRegExp = require("type/reg-exp/is"); + +isRegExp(/foo/); +isRegExp({}); // false +isRegExp("foo"); // false +``` + +## `reg-exp/ensure` + +If given argument is a regular expression object, it is returned back. Otherwise `TypeError` is thrown. + +```javascript +const ensureRegExp = require("type/reg-exp/ensure"); + +ensureRegExp(/foo/); // /foo/ +ensureRegExp("foo"); // Thrown TypeError: null is not a regular expression object +``` diff --git a/test/node_modules/ext/node_modules/type/docs/safe-integer.md b/test/node_modules/ext/node_modules/type/docs/safe-integer.md new file mode 100644 index 0000000..cf4bb1c --- /dev/null +++ b/test/node_modules/ext/node_modules/type/docs/safe-integer.md @@ -0,0 +1,27 @@ +# Safe Integer Number + +Safe integer _number_ primitive + +## `safe-integer/coerce` + +Follows [`integer/coerce`](integer.md#integercoerce) but returns `null` in place of values which are beyond `Number.MIN_SAFE_INTEGER` and `Number.MAX_SAFE_INTEGER` range. + +```javascript +const coerceToSafeInteger = require("type/safe-integer/coerce"); + +coerceToInteger("12.95"); // 12 +coerceToInteger(9007199254740992); // null +coerceToInteger(null); // null +``` + +## `safe-integer/ensure` + +If given argument is a safe integer coercible value (via [`safe-integer/coerce`](#safe-integercoerce)) returns result number. +Otherwise `TypeError` is thrown. + +```javascript +const ensureSafeInteger = require("type/safe-integer/ensure"); + +ensureSafeInteger(12.93); // "12" +ensureSafeInteger(9007199254740992); // Thrown TypeError: null is not a safe integer +``` diff --git a/test/node_modules/ext/node_modules/type/docs/set.md b/test/node_modules/ext/node_modules/type/docs/set.md new file mode 100644 index 0000000..33f8876 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/docs/set.md @@ -0,0 +1,27 @@ +# Set + +_Set_ instance + +## `set/is` + +Confirms if given object is a native set\_ + +```javascript +const isSet = require("type/set/is"); + +isSet(new Set()); // true +isSet(new Map()); // false +isSet({}); // false +``` + +## `Set/ensure` + +If given argument is a _set_, it is returned back. Otherwise `TypeError` is thrown. + +```javascript +const ensureSet = require("type/set/ensure"); + +const set = new Set(); +ensureSet(set); // set +eensureSet({}); // Thrown TypeError: [object Object] is not a set +``` diff --git a/test/node_modules/ext/node_modules/type/docs/string.md b/test/node_modules/ext/node_modules/type/docs/string.md new file mode 100644 index 0000000..051b4a3 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/docs/string.md @@ -0,0 +1,32 @@ +# String + +_string_ primitive + +## `string/coerce` + +Restricted string coercion. Returns string presentation for every value that follows below constraints + +- is implicitly coercible to string +- is neither`null` nor `undefined` +- its `toString` method is not `Object.prototype.toString` + +For all other values `null` is returned + +```javascript +const coerceToString = require("type/string/coerce"); + +coerceToString(12); // "12" +coerceToString(undefined); // null +``` + +## `string/ensure` + +If given argument is a string coercible value (via [`string/coerce`](#stringcoerce)) returns result string. +Otherwise `TypeError` is thrown. + +```javascript +const ensureString = require("type/string/ensure"); + +ensureString(12); // "12" +ensureString(null); // Thrown TypeError: null is not a string +``` diff --git a/test/node_modules/ext/node_modules/type/docs/thenable.md b/test/node_modules/ext/node_modules/type/docs/thenable.md new file mode 100644 index 0000000..1bdf92d --- /dev/null +++ b/test/node_modules/ext/node_modules/type/docs/thenable.md @@ -0,0 +1,27 @@ +# Thenable + +_Thenable_ object (an object with `then` method) + +## `thenable/is` + +Confirms if given object is a _thenable_ + +```javascript +const isThenable = require("type/thenable/is"); + +isThenable(Promise.resolve()); // true +isThenable({ then: () => {} }); // true +isThenable({}); // false +``` + +## `thenable/ensure` + +If given argument is a _thenable_ object, it is returned back. Otherwise `TypeError` is thrown. + +```javascript +const ensureThenable = require("type/thenable/ensure"); + +const promise = Promise.resolve(); +ensureThenable(promise); // promise +ensureThenable({}); // Thrown TypeError: [object Object] is not a thenable object +``` diff --git a/test/node_modules/ext/node_modules/type/docs/time-value.md b/test/node_modules/ext/node_modules/type/docs/time-value.md new file mode 100644 index 0000000..98e9e8e --- /dev/null +++ b/test/node_modules/ext/node_modules/type/docs/time-value.md @@ -0,0 +1,27 @@ +# Time value + +_number_ primitive which is a valid _time value_ (as used internally in _Date_ instances) + +## `time-value/coerce` + +Follows [`integer/coerce`](integer.md#integercoerce) but returns `null` in place of values which go beyond 100 000 0000 days from unix epoch + +```javascript +const coerceToTimeValue = require("type/time-value/coerce"); + +coerceToTimeValue(12312312); // true +coerceToTimeValue(Number.MAX_SAFE_INTEGER); // false +coerceToTimeValue("foo"); // false +``` + +## `time-value/ensure` + +If given argument is a _time value_ coercible value (via [`time-value/coerce`](#time-valuecoerce)) returns result number. +Otherwise `TypeError` is thrown. + +```javascript +const ensureTimeValue = require("type/time-value/ensure"); + +ensureTimeValue(12.93); // "12" +ensureTimeValue(Number.MAX_SAFE_INTEGER); // Thrown TypeError: null is not a natural number +``` diff --git a/test/node_modules/ext/node_modules/type/docs/value.md b/test/node_modules/ext/node_modules/type/docs/value.md new file mode 100644 index 0000000..1310609 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/docs/value.md @@ -0,0 +1,27 @@ +# Value + +_Value_, any value that's neither `null` nor `undefined` . + +## `value/is` + +Confirms whether passed argument is a _value_ + +```javascript +const isValue = require("type/value/is"); + +isValue({}); // true +isValue(null); // false +``` + +## `value/ensure` + +Ensures if given argument is a _value_. If it's a value it is returned back, if not `TypeError` is thrown + +```javascript +const ensureValue = require("type/value/ensure"); + +const obj = {}; + +ensureValue(obj); // obj +ensureValue(null); // Thrown TypeError: Cannot use null +``` diff --git a/test/node_modules/ext/node_modules/type/ensure.js b/test/node_modules/ext/node_modules/type/ensure.js new file mode 100644 index 0000000..7fe8220 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ensure.js @@ -0,0 +1,51 @@ +"use strict"; + +var isArray = require("./array/is") + , toShortString = require("./lib/to-short-string"); + +var objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; + +var assign = function (target, source) { + for (var key in source) { + if (objPropertyIsEnumerable.call(source, key)) target[key] = source[key]; + } +}; + +module.exports = function (validationDatum1/*, ...validationDatumN, options */) { + var validationData = [validationDatum1]; + var globalOptions; + if (arguments.length > 1) { + var hasOptions = !isArray(arguments[arguments.length - 1]); + if (hasOptions) globalOptions = arguments[arguments.length - 1]; + var lastDatumIndex = hasOptions ? arguments.length - 2 : arguments.length - 1; + for (var i = 1; i <= lastDatumIndex; ++i) validationData.push(arguments[i]); + } + var result = [], errors; + for (var j = 0; j < validationData.length; ++j) { + var validationDatum = validationData[j]; + var options = { name: validationDatum[0] }; + if (globalOptions) assign(options, globalOptions); + if (validationDatum[3]) assign(options, validationDatum[3]); + var resultItem; + if (typeof validationDatum[2] !== "function") { + throw new TypeError(toShortString(validationDatum[2]) + " is not a function"); + } + try { + resultItem = validationDatum[2](validationDatum[1], options); + } catch (error) { + if (!errors) errors = []; + errors.push(error); + } + if (errors) continue; + result.push(resultItem); + } + if (!errors) return result; + + if (errors.length === 1) throw errors[0]; + var ErrorConstructor = (globalOptions && globalOptions.Error) || TypeError; + var errorMessage = "Approached following errors:"; + for (var k = 0; k < errors.length; ++k) { + errorMessage += "\n - " + errors[k].message.split("\n").join("\n "); + } + throw new ErrorConstructor(errorMessage); +}; diff --git a/test/node_modules/ext/node_modules/type/error/ensure.js b/test/node_modules/ext/node_modules/type/error/ensure.js new file mode 100644 index 0000000..8b28d85 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/error/ensure.js @@ -0,0 +1,12 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , is = require("./is"); + +module.exports = function (value/*, options*/) { + if (is(value)) return value; + var options = arguments[1]; + var errorMessage = + options && options.name ? "Expected an error for %n, received %v" : "%v is not an error"; + return resolveException(value, errorMessage, options); +}; diff --git a/test/node_modules/ext/node_modules/type/error/is.js b/test/node_modules/ext/node_modules/type/error/is.js new file mode 100644 index 0000000..bf04c80 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/error/is.js @@ -0,0 +1,45 @@ +"use strict"; + +var isPrototype = require("../prototype/is") + , isPlainObject = require("../plain-object/is"); + +var objectToString = Object.prototype.toString; + +// Recognize host specific errors (e.g. DOMException) +var errorTaggedStringRe = /^\[object .*(?:Error|Exception)\]$/ + , errorNameRe = /^[^\s]*(?:Error|Exception)$/; + +module.exports = function (value) { + if (!value) return false; + + var name; + // Sanity check (reject objects which do not expose common Error interface) + try { + name = value.name; + if (typeof name !== "string") return false; + if (typeof value.message !== "string") return false; + } catch (error) { + return false; + } + + // Ensure its a native-like Error object + // (has [[ErrorData]] slot, or was created to resemble one) + // Note: It's not a 100% bulletproof check of confirming that as: + // - In ES2015+ string tag can be overriden via Symbol.toStringTag property + // - Host errors do not share native error tag. Still we rely on assumption that + // tag for each error will end either with `Error` or `Exception` string + // - In pre ES2015 era, no custom errors will share the error tag. + if (!errorTaggedStringRe.test(objectToString.call(value))) { + // Definitely not an ES2015 error instance, but could still be an error + // (created via e.g. CustomError.prototype = Object.create(Error.prototype)) + try { + if (name !== value.constructor.name) return false; + } catch (error) { + return false; + } + if (!errorNameRe.test(name)) return false; + if (isPlainObject(value)) return false; + } + + return !isPrototype(value); +}; diff --git a/test/node_modules/ext/node_modules/type/finite/coerce.js b/test/node_modules/ext/node_modules/type/finite/coerce.js new file mode 100644 index 0000000..a3783be --- /dev/null +++ b/test/node_modules/ext/node_modules/type/finite/coerce.js @@ -0,0 +1,8 @@ +"use strict"; + +var coerceToNumber = require("../number/coerce"); + +module.exports = function (value) { + value = coerceToNumber(value); + return isFinite(value) ? value : null; +}; diff --git a/test/node_modules/ext/node_modules/type/finite/ensure.js b/test/node_modules/ext/node_modules/type/finite/ensure.js new file mode 100644 index 0000000..aac96be --- /dev/null +++ b/test/node_modules/ext/node_modules/type/finite/ensure.js @@ -0,0 +1,15 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , coerce = require("./coerce"); + +module.exports = function (value/*, options*/) { + var coerced = coerce(value); + if (coerced !== null) return coerced; + var options = arguments[1]; + var errorMessage = + options && options.name + ? "Expected a finite number for %n, received %v" + : "%v is not a finite number"; + return resolveException(value, errorMessage, options); +}; diff --git a/test/node_modules/ext/node_modules/type/function/ensure.js b/test/node_modules/ext/node_modules/type/function/ensure.js new file mode 100644 index 0000000..d133701 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/function/ensure.js @@ -0,0 +1,14 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , is = require("./is"); + +module.exports = function (value/*, options*/) { + if (is(value)) return value; + var options = arguments[1]; + var errorMessage = + options && options.name + ? "Expected a function for %n, received %v" + : "%v is not a function"; + return resolveException(value, errorMessage, options); +}; diff --git a/test/node_modules/ext/node_modules/type/function/is.js b/test/node_modules/ext/node_modules/type/function/is.js new file mode 100644 index 0000000..981990a --- /dev/null +++ b/test/node_modules/ext/node_modules/type/function/is.js @@ -0,0 +1,19 @@ +"use strict"; + +var isPrototype = require("../prototype/is"); + +module.exports = function (value) { + if (typeof value !== "function") return false; + + if (!hasOwnProperty.call(value, "length")) return false; + + try { + if (typeof value.length !== "number") return false; + if (typeof value.call !== "function") return false; + if (typeof value.apply !== "function") return false; + } catch (error) { + return false; + } + + return !isPrototype(value); +}; diff --git a/test/node_modules/ext/node_modules/type/integer/coerce.js b/test/node_modules/ext/node_modules/type/integer/coerce.js new file mode 100644 index 0000000..cba5e17 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/integer/coerce.js @@ -0,0 +1,11 @@ +"use strict"; + +var coerceToFinite = require("../finite/coerce"); + +var abs = Math.abs, floor = Math.floor; + +module.exports = function (value) { + value = coerceToFinite(value); + if (!value) return value; + return (value > 0 ? 1 : -1) * floor(abs(value)); +}; diff --git a/test/node_modules/ext/node_modules/type/integer/ensure.js b/test/node_modules/ext/node_modules/type/integer/ensure.js new file mode 100644 index 0000000..df1a975 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/integer/ensure.js @@ -0,0 +1,15 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , coerce = require("./coerce"); + +module.exports = function (value/*, options*/) { + var coerced = coerce(value); + if (coerced !== null) return coerced; + var options = arguments[1]; + var errorMessage = + options && options.name + ? "Expected an integer for %n, received %v" + : "%v is not an integer"; + return resolveException(value, errorMessage, options); +}; diff --git a/test/node_modules/ext/node_modules/type/iterable/ensure.js b/test/node_modules/ext/node_modules/type/iterable/ensure.js new file mode 100644 index 0000000..b1a2489 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/iterable/ensure.js @@ -0,0 +1,49 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , resolveErrorMessage = require("../lib/resolve-error-message") + , toShortString = require("../lib/to-short-string") + , ensurePlainFunction = require("../plain-function/ensure") + , is = require("./is"); + +var invalidItemsLimit = 3; + +module.exports = function (value/*, options*/) { + var options = arguments[1]; + var mainErrorMessage = + options && options.name + ? "Expected an iterable for %n, received %v" + : "%v is not expected iterable"; + if (!is(value, options)) return resolveException(value, mainErrorMessage, options); + if (!options) return value; + + var ensureItem = ensurePlainFunction(options.ensureItem, { isOptional: true }); + if (ensureItem) { + var coercedValue = []; + var iterator = value[Symbol.iterator](); + var item, invalidItems; + while (!(item = iterator.next()).done) { + var newItemValue; + try { + newItemValue = ensureItem(item.value); + } catch (error) { + if (!invalidItems) invalidItems = []; + if (invalidItems.push(item.value) === invalidItemsLimit) break; + } + if (invalidItems) continue; + coercedValue.push(newItemValue); + } + if (invalidItems) { + var errorMessage = + resolveErrorMessage(mainErrorMessage, value, options) + + ".\n Following items are invalid:"; + for (var i = 0; i < invalidItems.length; ++i) { + errorMessage += "\n - " + toShortString(invalidItems[i]); + } + throw new TypeError(errorMessage); + } + return coercedValue; + } + + return value; +}; diff --git a/test/node_modules/ext/node_modules/type/iterable/is.js b/test/node_modules/ext/node_modules/type/iterable/is.js new file mode 100644 index 0000000..d35408c --- /dev/null +++ b/test/node_modules/ext/node_modules/type/iterable/is.js @@ -0,0 +1,32 @@ +// Polyfills friendly, therefore ES5 syntax + +"use strict"; + +var isObject = require("../object/is"); + +var iteratorSymbol = Symbol.iterator; + +if (!iteratorSymbol) { + throw new Error("Cannot initialize iterator/is due to Symbol.iterator not being implemented"); +} + +module.exports = function (value/*, options*/) { + var options = arguments[1]; + if (!isObject(value)) { + if (!isObject(options) || !options.allowString || typeof value !== "string") return false; + } + try { + if (typeof value[iteratorSymbol] !== "function") return false; + } catch (error) { + return false; + } + if (!options) return true; + if (options.denyEmpty) { + try { + if (value[iteratorSymbol]().next().done) return false; + } catch (error) { + return false; + } + } + return true; +}; diff --git a/test/node_modules/ext/node_modules/type/lib/ensure/min.js b/test/node_modules/ext/node_modules/type/lib/ensure/min.js new file mode 100644 index 0000000..df878bd --- /dev/null +++ b/test/node_modules/ext/node_modules/type/lib/ensure/min.js @@ -0,0 +1,12 @@ +"use strict"; + +var resolveException = require("../resolve-exception"); + +module.exports = function (value, coerced, options) { + if (coerced >= options.min) return coerced; + var errorMessage = + options && options.name + ? "Expected %n to be greater or equal " + options.min + ", received %v" + : "%v is not greater or equal " + options.min; + return resolveException(value, errorMessage, options); +}; diff --git a/test/node_modules/ext/node_modules/type/lib/is-to-string-tag-supported.js b/test/node_modules/ext/node_modules/type/lib/is-to-string-tag-supported.js new file mode 100644 index 0000000..254d8b3 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/lib/is-to-string-tag-supported.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol"; diff --git a/test/node_modules/ext/node_modules/type/lib/resolve-error-message.js b/test/node_modules/ext/node_modules/type/lib/resolve-error-message.js new file mode 100644 index 0000000..3cb000b --- /dev/null +++ b/test/node_modules/ext/node_modules/type/lib/resolve-error-message.js @@ -0,0 +1,52 @@ +"use strict"; + +var stringCoerce = require("../string/coerce") + , toShortString = require("./to-short-string"); + +module.exports = function (errorMessage, value, inputOptions) { + if (inputOptions && inputOptions.errorMessage) { + errorMessage = stringCoerce(inputOptions.errorMessage); + } + + var valueInsertIndex = errorMessage.indexOf("%v"); + var valueToken = valueInsertIndex > -1 ? toShortString(value) : null; + if (inputOptions && inputOptions.name) { + var nameInsertIndex = errorMessage.indexOf("%n"); + if (nameInsertIndex > -1) { + if (valueInsertIndex > -1) { + var firstToken, secondToken, firstInsertIndex, secondInsertIndex; + if (nameInsertIndex > valueInsertIndex) { + firstToken = valueToken; + firstInsertIndex = valueInsertIndex; + secondToken = inputOptions.name; + secondInsertIndex = nameInsertIndex; + } else { + firstToken = inputOptions.name; + firstInsertIndex = nameInsertIndex; + secondToken = valueToken; + secondInsertIndex = valueInsertIndex; + } + return ( + errorMessage.slice(0, firstInsertIndex) + + firstToken + + errorMessage.slice(firstInsertIndex + 2, secondInsertIndex) + + secondToken + + errorMessage.slice(secondInsertIndex + 2) + ); + } + return ( + errorMessage.slice(0, nameInsertIndex) + + inputOptions.name + + errorMessage.slice(nameInsertIndex + 2) + ); + } + } + if (valueInsertIndex > -1) { + return ( + errorMessage.slice(0, valueInsertIndex) + + valueToken + + errorMessage.slice(valueInsertIndex + 2) + ); + } + return errorMessage; +}; diff --git a/test/node_modules/ext/node_modules/type/lib/resolve-exception.js b/test/node_modules/ext/node_modules/type/lib/resolve-exception.js new file mode 100644 index 0000000..6c99286 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/lib/resolve-exception.js @@ -0,0 +1,15 @@ +"use strict"; + +var isValue = require("../value/is") + , resolveErrorMessage = require("./resolve-error-message"); + +module.exports = function (value, defaultMessage, inputOptions) { + if (inputOptions && !isValue(value)) { + if ("default" in inputOptions) return inputOptions["default"]; + if (inputOptions.isOptional) return null; + } + var ErrorConstructor = (inputOptions && inputOptions.Error) || TypeError; + var error = new ErrorConstructor(resolveErrorMessage(defaultMessage, value, inputOptions)); + if (inputOptions && inputOptions.errorCode) error.code = inputOptions.errorCode; + throw error; +}; diff --git a/test/node_modules/ext/node_modules/type/lib/safe-to-string.js b/test/node_modules/ext/node_modules/type/lib/safe-to-string.js new file mode 100644 index 0000000..a756dd3 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/lib/safe-to-string.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function (value) { + try { + return value.toString(); + } catch (error) { + try { return String(value); } + catch (error2) { return null; } + } +}; diff --git a/test/node_modules/ext/node_modules/type/lib/to-short-string.js b/test/node_modules/ext/node_modules/type/lib/to-short-string.js new file mode 100644 index 0000000..c8d7ed8 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/lib/to-short-string.js @@ -0,0 +1,29 @@ +"use strict"; + +var safeToString = require("./safe-to-string"); + +var reNewLine = /[\n\r\u2028\u2029]/g; + +module.exports = function (value) { + var string = safeToString(value); + if (string === null) return ""; + // Trim if too long + if (string.length > 100) string = string.slice(0, 99) + "…"; + // Replace eventual new lines + string = string.replace(reNewLine, function (char) { + switch (char) { + case "\n": + return "\\n"; + case "\r": + return "\\r"; + case "\u2028": + return "\\u2028"; + case "\u2029": + return "\\u2029"; + /* istanbul ignore next */ + default: + throw new Error("Unexpected character"); + } + }); + return string; +}; diff --git a/test/node_modules/ext/node_modules/type/map/ensure.js b/test/node_modules/ext/node_modules/type/map/ensure.js new file mode 100644 index 0000000..3e3325a --- /dev/null +++ b/test/node_modules/ext/node_modules/type/map/ensure.js @@ -0,0 +1,12 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , is = require("./is"); + +module.exports = function (value /*, options*/) { + if (is(value)) return value; + var options = arguments[1]; + var errorMessage = + options && options.name ? "Expected a map for %n, received %v" : "%v is not a map"; + return resolveException(value, errorMessage, options); +}; diff --git a/test/node_modules/ext/node_modules/type/map/is.js b/test/node_modules/ext/node_modules/type/map/is.js new file mode 100644 index 0000000..4ed7bae --- /dev/null +++ b/test/node_modules/ext/node_modules/type/map/is.js @@ -0,0 +1,28 @@ +"use strict"; + +var isPrototype = require("../prototype/is"); + +// In theory we could rely on Symbol.toStringTag directly, +// still early native implementation (e.g. in FF) predated symbols +var objectToString = Object.prototype.toString, objectTaggedString = objectToString.call(new Map()); + +module.exports = function (value) { + if (!value) return false; + + // Sanity check (reject objects which do not expose common Promise interface) + try { + if (typeof value.set !== "function") return false; + if (typeof value.get !== "function") return false; + if (typeof value.has !== "function") return false; + if (typeof value.clear !== "function") return false; + } catch (error) { + return false; + } + + // Ensure its native Promise object (has [[MapData]] slot) + // Note: it's not 100% precise as string tag may be overriden + // and other objects could be hacked to expose it + if (objectToString.call(value) !== objectTaggedString) return false; + + return !isPrototype(value); +}; diff --git a/test/node_modules/ext/node_modules/type/natural-number/coerce.js b/test/node_modules/ext/node_modules/type/natural-number/coerce.js new file mode 100644 index 0000000..4b7931c --- /dev/null +++ b/test/node_modules/ext/node_modules/type/natural-number/coerce.js @@ -0,0 +1,10 @@ +"use strict"; + +var coerceToInteger = require("../integer/coerce"); + +module.exports = function (value) { + value = coerceToInteger(value); + if (!value) return value; + if (value < 0) return null; + return value; +}; diff --git a/test/node_modules/ext/node_modules/type/natural-number/ensure.js b/test/node_modules/ext/node_modules/type/natural-number/ensure.js new file mode 100644 index 0000000..1f09174 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/natural-number/ensure.js @@ -0,0 +1,21 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , ensureMin = require("../lib/ensure/min") + , coerce = require("./coerce"); + +module.exports = function (value/*, options*/) { + var coerced = coerce(value), options = arguments[1]; + if (coerced !== null) { + if (options) { + if (options.min) ensureMin(value, coerced, options); + } + return coerced; + } + + var errorMessage = + options && options.name + ? "Expected a natural number for %n, received %v" + : "%v is not a natural number"; + return resolveException(value, errorMessage, options); +}; diff --git a/test/node_modules/ext/node_modules/type/number/coerce.js b/test/node_modules/ext/node_modules/type/number/coerce.js new file mode 100644 index 0000000..1bb1512 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/number/coerce.js @@ -0,0 +1,14 @@ +"use strict"; + +var isValue = require("../value/is"); + +module.exports = function (value) { + if (!isValue(value)) return null; + try { + value = +value; // Ensure implicit coercion + } catch (error) { + return null; + } + if (isNaN(value)) return null; + return value; +}; diff --git a/test/node_modules/ext/node_modules/type/number/ensure.js b/test/node_modules/ext/node_modules/type/number/ensure.js new file mode 100644 index 0000000..9ae705d --- /dev/null +++ b/test/node_modules/ext/node_modules/type/number/ensure.js @@ -0,0 +1,13 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , coerce = require("./coerce"); + +module.exports = function (value/*, options*/) { + var coerced = coerce(value); + if (coerced !== null) return coerced; + var options = arguments[1]; + var errorMessage = + options && options.name ? "Expected a number for %n, received %v" : "%v is not a number"; + return resolveException(value, errorMessage, options); +}; diff --git a/test/node_modules/ext/node_modules/type/object/ensure.js b/test/node_modules/ext/node_modules/type/object/ensure.js new file mode 100644 index 0000000..341f55c --- /dev/null +++ b/test/node_modules/ext/node_modules/type/object/ensure.js @@ -0,0 +1,12 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , is = require("./is"); + +module.exports = function (value/*, options*/) { + if (is(value)) return value; + var options = arguments[1]; + var errorMessage = + options && options.name ? "Expected an object for %n, received %v" : "%v is not an object"; + return resolveException(value, errorMessage, options); +}; diff --git a/test/node_modules/ext/node_modules/type/object/is.js b/test/node_modules/ext/node_modules/type/object/is.js new file mode 100644 index 0000000..a254dcb --- /dev/null +++ b/test/node_modules/ext/node_modules/type/object/is.js @@ -0,0 +1,11 @@ +"use strict"; + +var isValue = require("../value/is"); + +// prettier-ignore +var possibleTypes = { "object": true, "function": true, "undefined": true /* document.all */ }; + +module.exports = function (value) { + if (!isValue(value)) return false; + return hasOwnProperty.call(possibleTypes, typeof value); +}; diff --git a/test/node_modules/ext/node_modules/type/package.json b/test/node_modules/ext/node_modules/type/package.json new file mode 100644 index 0000000..a863fbf --- /dev/null +++ b/test/node_modules/ext/node_modules/type/package.json @@ -0,0 +1,120 @@ +{ + "name": "type", + "version": "2.7.2", + "description": "Runtime validation and processing of JavaScript types", + "author": "Mariusz Nowak (https://www.medikoo.com/)", + "keywords": [ + "type", + "coercion" + ], + "repository": "medikoo/type", + "devDependencies": { + "chai": "^4.3.6", + "eslint": "^8.21.0", + "eslint-config-medikoo": "^4.1.2", + "git-list-updated": "^1.2.1", + "github-release-from-cc-changelog": "^2.3.0", + "husky": "^4.3.8", + "lint-staged": "^13.0.3", + "mocha": "^6.2.3", + "nyc": "^15.1.0", + "prettier-elastic": "^2.2.1" + }, + "typesVersions": { + ">=4": { + "*": [ + "ts-types/*" + ] + } + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "*.js": [ + "eslint" + ], + "*.{css,html,js,json,md,yaml,yml}": [ + "prettier -c" + ] + }, + "eslintConfig": { + "extends": "medikoo/es3", + "root": true, + "globals": { + "BigInt": true, + "Map": true, + "Promise": true, + "Set": true, + "Symbol": true + }, + "overrides": [ + { + "files": "test/**/*.js", + "env": { + "mocha": true + }, + "rules": { + "no-eval": "off", + "no-new-wrappers": "off" + } + }, + { + "files": [ + "string/coerce.js", + "number/coerce.js" + ], + "rules": { + "no-implicit-coercion": "off" + } + }, + { + "files": "plain-object/is.js", + "rules": { + "no-proto": "off" + } + } + ] + }, + "prettier": { + "printWidth": 100, + "tabWidth": 4, + "overrides": [ + { + "files": [ + "*.md", + "*.yml" + ], + "options": { + "tabWidth": 2 + } + } + ] + }, + "nyc": { + "all": true, + "exclude": [ + ".github", + "coverage/**", + "test/**", + "*.config.js" + ], + "reporter": [ + "lcov", + "html", + "text-summary" + ] + }, + "scripts": { + "coverage": "nyc npm test", + "lint:updated": "pipe-git-updated --base=main --ext=js -- eslint --ignore-pattern '!*'", + "prettier-check": "prettier -c --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"", + "prettier-check:updated": "pipe-git-updated --base=main --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier -c", + "prettify": "prettier --write --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"", + "prettify:updated": "pipe-git-updated ---base=main -ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier --write", + "test": "mocha --recursive" + }, + "license": "ISC" +} diff --git a/test/node_modules/ext/node_modules/type/plain-function/ensure.js b/test/node_modules/ext/node_modules/type/plain-function/ensure.js new file mode 100644 index 0000000..d3a20e6 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/plain-function/ensure.js @@ -0,0 +1,14 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , is = require("./is"); + +module.exports = function (value/*, options*/) { + if (is(value)) return value; + var options = arguments[1]; + var errorMessage = + options && options.name + ? "Expected a plain function for %n, received %v" + : "%v is not a plain function"; + return resolveException(value, errorMessage, options); +}; diff --git a/test/node_modules/ext/node_modules/type/plain-function/is.js b/test/node_modules/ext/node_modules/type/plain-function/is.js new file mode 100644 index 0000000..b55d4ff --- /dev/null +++ b/test/node_modules/ext/node_modules/type/plain-function/is.js @@ -0,0 +1,11 @@ +"use strict"; + +var isFunction = require("../function/is"); + +var classRe = /^\s*class[\s{/}]/, functionToString = Function.prototype.toString; + +module.exports = function (value) { + if (!isFunction(value)) return false; + if (classRe.test(functionToString.call(value))) return false; + return true; +}; diff --git a/test/node_modules/ext/node_modules/type/plain-object/ensure.js b/test/node_modules/ext/node_modules/type/plain-object/ensure.js new file mode 100644 index 0000000..519261e --- /dev/null +++ b/test/node_modules/ext/node_modules/type/plain-object/ensure.js @@ -0,0 +1,67 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , resolveErrorMessage = require("../lib/resolve-error-message") + , ensurePlainFunction = require("../plain-function/ensure") + , ensureArray = require("../array/ensure") + , is = require("./is"); + +var objHasOwnProperty = Object.prototype.hasOwnProperty, invalidItemsLimit = 3; + +module.exports = function (value/*, options*/) { + var options = arguments[1]; + var mainErrorMessage = + options && options.name + ? "Expected a plain object for %n, received %v" + : "%v is not a plain object"; + if (!is(value)) return resolveException(value, mainErrorMessage, options); + if (!options) return value; + + var invalidKeys, key, errorMessage; + var allowedKeys = ensureArray(options.allowedKeys, { isOptional: true }); + if (allowedKeys) { + for (key in value) { + if (!objHasOwnProperty.call(value, key)) continue; + if (allowedKeys.indexOf(key) > -1) continue; + if (!invalidKeys) invalidKeys = []; + if (invalidKeys.push(key) === invalidItemsLimit) break; + } + if (invalidKeys) { + errorMessage = + resolveErrorMessage(mainErrorMessage, value, options) + + ".\n Following keys are unexpected: " + + invalidKeys.join(", "); + throw new TypeError(errorMessage); + } + } + + var ensurePropertyValue = ensurePlainFunction(options.ensurePropertyValue, { + isOptional: true + }); + if (ensurePropertyValue) { + var coercedValue = {}; + for (key in value) { + if (!objHasOwnProperty.call(value, key)) continue; + var coercedPropertyValue; + try { + coercedPropertyValue = ensurePropertyValue(value[key]); + } catch (error) { + if (!invalidKeys) invalidKeys = []; + if (invalidKeys.push(key) === invalidItemsLimit) break; + } + if (invalidKeys) continue; + coercedValue[key] = coercedPropertyValue; + } + if (invalidKeys) { + errorMessage = + resolveErrorMessage(mainErrorMessage, value, options) + + ".\n Values for following keys are invalid: " + + invalidKeys.join(", "); + throw new TypeError(errorMessage); + } + + return coercedValue; + } + + return value; +}; diff --git a/test/node_modules/ext/node_modules/type/plain-object/is.js b/test/node_modules/ext/node_modules/type/plain-object/is.js new file mode 100644 index 0000000..50d6713 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/plain-object/is.js @@ -0,0 +1,28 @@ +"use strict"; + +var isObject = require("../object/is") + , isPrototype = require("../prototype/is"); + +var getPrototypeOf; +if (typeof Object.getPrototypeOf === "function") { + getPrototypeOf = Object.getPrototypeOf; +} else if ({}.__proto__ === Object.prototype) { + getPrototypeOf = function (object) { return object.__proto__; }; +} + +module.exports = function (value) { + if (!isObject(value)) return false; + var prototype; + if (getPrototypeOf) { + prototype = getPrototypeOf(value); + } else { + try { + var valueConstructor = value.constructor; + if (valueConstructor) prototype = valueConstructor.prototype; + } catch (error) { + return false; + } + } + if (prototype && !hasOwnProperty.call(prototype, "propertyIsEnumerable")) return false; + return !isPrototype(value); +}; diff --git a/test/node_modules/ext/node_modules/type/promise/ensure.js b/test/node_modules/ext/node_modules/type/promise/ensure.js new file mode 100644 index 0000000..7fbebb3 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/promise/ensure.js @@ -0,0 +1,12 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , is = require("./is"); + +module.exports = function (value/*, options*/) { + if (is(value)) return value; + var options = arguments[1]; + var errorMessage = + options && options.name ? "Expected a promise for %n, received %v" : "%v is not a promise"; + return resolveException(value, errorMessage, options); +}; diff --git a/test/node_modules/ext/node_modules/type/promise/is.js b/test/node_modules/ext/node_modules/type/promise/is.js new file mode 100644 index 0000000..5353362 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/promise/is.js @@ -0,0 +1,27 @@ +"use strict"; + +var isPrototype = require("../prototype/is"); + +// In theory we could rely on Symbol.toStringTag directly, +// still early native implementation (e.g. in FF) predated symbols +var objectToString = Object.prototype.toString + , objectTaggedString = objectToString.call(Promise.resolve()); + +module.exports = function (value) { + if (!value) return false; + + // Sanity check (reject objects which do not expose common Promise interface) + try { + if (typeof value.then !== "function") return false; + if (typeof value["catch"] !== "function") return false; + } catch (error) { + return false; + } + + // Ensure its native Promise object (has [[PromiseState]] slot) + // Note: it's not 100% precise as string tag may be overriden + // and other objects could be hacked to expose it + if (objectToString.call(value) !== objectTaggedString) return false; + + return !isPrototype(value); +}; diff --git a/test/node_modules/ext/node_modules/type/prototype/is.js b/test/node_modules/ext/node_modules/type/prototype/is.js new file mode 100644 index 0000000..aaddb2a --- /dev/null +++ b/test/node_modules/ext/node_modules/type/prototype/is.js @@ -0,0 +1,13 @@ +"use strict"; + +var isObject = require("../object/is"); + +module.exports = function (value) { + if (!isObject(value)) return false; + try { + if (!value.constructor) return false; + return value.constructor.prototype === value; + } catch (error) { + return false; + } +}; diff --git a/test/node_modules/ext/node_modules/type/reg-exp/ensure.js b/test/node_modules/ext/node_modules/type/reg-exp/ensure.js new file mode 100644 index 0000000..50669f3 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/reg-exp/ensure.js @@ -0,0 +1,14 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , is = require("./is"); + +module.exports = function (value/*, options*/) { + if (is(value)) return value; + var options = arguments[1]; + var errorMessage = + options && options.name + ? "Expected a regular expression for %n, received %v" + : "%v is not a regular expression"; + return resolveException(value, errorMessage, options); +}; diff --git a/test/node_modules/ext/node_modules/type/reg-exp/is.js b/test/node_modules/ext/node_modules/type/reg-exp/is.js new file mode 100644 index 0000000..f0c69d5 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/reg-exp/is.js @@ -0,0 +1,37 @@ +"use strict"; + +var isToStringTagSupported = require("../lib/is-to-string-tag-supported") + , isPrototype = require("../prototype/is"); + +var regExpTest = RegExp.prototype.test + , objectToString = Object.prototype.toString + , objectTaggedString = objectToString.call(/a/); + +module.exports = function (value) { + if (!value) return false; + + // Sanity check (reject objects which do not expose common RegExp interface) + if (!hasOwnProperty.call(value, "lastIndex")) return false; + try { + if (typeof value.lastIndex !== "number") return false; + if (typeof value.test !== "function") return false; + if (typeof value.exec !== "function") return false; + } catch (error) { + return false; + } + + // Ensure its native RegExp object (has [[RegExpMatcher]] slot) + if (isToStringTagSupported && typeof value[Symbol.toStringTag] === "string") { + // Edge case (possibly a regExp with custom Symbol.toStringTag) + try { + var lastIndex = value.lastIndex; + regExpTest.call(value, ""); + if (value.lastIndex !== lastIndex) value.lastIndex = lastIndex; + return true; + } catch (error) { + return false; + } + } + if (objectToString.call(value) !== objectTaggedString) return false; + return !isPrototype(value); +}; diff --git a/test/node_modules/ext/node_modules/type/safe-integer/coerce.js b/test/node_modules/ext/node_modules/type/safe-integer/coerce.js new file mode 100644 index 0000000..b97e4aa --- /dev/null +++ b/test/node_modules/ext/node_modules/type/safe-integer/coerce.js @@ -0,0 +1,13 @@ +"use strict"; + +var coerceToInteger = require("../integer/coerce"); + +var MAX_SAFE_INTEGER = 9007199254740991, MIN_SAFE_INTEGER = -9007199254740991; + +module.exports = function (value) { + value = coerceToInteger(value); + if (!value) return value; + if (value > MAX_SAFE_INTEGER) return null; + if (value < MIN_SAFE_INTEGER) return null; + return value; +}; diff --git a/test/node_modules/ext/node_modules/type/safe-integer/ensure.js b/test/node_modules/ext/node_modules/type/safe-integer/ensure.js new file mode 100644 index 0000000..dbdc46d --- /dev/null +++ b/test/node_modules/ext/node_modules/type/safe-integer/ensure.js @@ -0,0 +1,15 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , coerce = require("./coerce"); + +module.exports = function (value/*, options*/) { + var coerced = coerce(value); + if (coerced !== null) return coerced; + var options = arguments[1]; + var errorMessage = + options && options.name + ? "Expected a safe integer for %n, received %v" + : "%v is not a safe integer"; + return resolveException(value, errorMessage, options); +}; diff --git a/test/node_modules/ext/node_modules/type/set/ensure.js b/test/node_modules/ext/node_modules/type/set/ensure.js new file mode 100644 index 0000000..c5b6a41 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/set/ensure.js @@ -0,0 +1,12 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , is = require("./is"); + +module.exports = function (value /*, options*/) { + if (is(value)) return value; + var options = arguments[1]; + var errorMessage = + options && options.name ? "Expected a set for %n, received %v" : "%v is not a set"; + return resolveException(value, errorMessage, options); +}; diff --git a/test/node_modules/ext/node_modules/type/set/is.js b/test/node_modules/ext/node_modules/type/set/is.js new file mode 100644 index 0000000..d0b137b --- /dev/null +++ b/test/node_modules/ext/node_modules/type/set/is.js @@ -0,0 +1,27 @@ +"use strict"; + +var isPrototype = require("../prototype/is"); + +// In theory we could rely on Symbol.toStringTag directly, +// still early native implementation (e.g. in FF) predated symbols +var objectToString = Object.prototype.toString, objectTaggedString = objectToString.call(new Set()); + +module.exports = function (value) { + if (!value) return false; + + // Sanity check (reject objects which do not expose common Set interface) + try { + if (typeof value.add !== "function") return false; + if (typeof value.has !== "function") return false; + if (typeof value.clear !== "function") return false; + } catch (error) { + return false; + } + + // Ensure its native Set object (has [[SetData]] slot) + // Note: it's not 100% precise as string tag may be overriden + // and other objects could be hacked to expose it + if (objectToString.call(value) !== objectTaggedString) return false; + + return !isPrototype(value); +}; diff --git a/test/node_modules/ext/node_modules/type/string/coerce.js b/test/node_modules/ext/node_modules/type/string/coerce.js new file mode 100644 index 0000000..43cd931 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/string/coerce.js @@ -0,0 +1,23 @@ +"use strict"; + +var isValue = require("../value/is") + , isObject = require("../object/is"); + +var objectToString = Object.prototype.toString; + +module.exports = function (value) { + if (!isValue(value)) return null; + if (isObject(value)) { + // Reject Object.prototype.toString coercion + var valueToString = value.toString; + if (typeof valueToString !== "function") return null; + if (valueToString === objectToString) return null; + // Note: It can be object coming from other realm, still as there's no ES3 and CSP compliant + // way to resolve its realm's Object.prototype.toString it's left as not addressed edge case + } + try { + return "" + value; // Ensure implicit coercion + } catch (error) { + return null; + } +}; diff --git a/test/node_modules/ext/node_modules/type/string/ensure.js b/test/node_modules/ext/node_modules/type/string/ensure.js new file mode 100644 index 0000000..e26b5f0 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/string/ensure.js @@ -0,0 +1,13 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , coerce = require("./coerce"); + +module.exports = function (value/*, options*/) { + var coerced = coerce(value); + if (coerced !== null) return coerced; + var options = arguments[1]; + var errorMessage = + options && options.name ? "Expected a string for %n, received %v" : "%v is not a string"; + return resolveException(value, errorMessage, options); +}; diff --git a/test/node_modules/ext/node_modules/type/thenable/ensure.js b/test/node_modules/ext/node_modules/type/thenable/ensure.js new file mode 100644 index 0000000..8397c7c --- /dev/null +++ b/test/node_modules/ext/node_modules/type/thenable/ensure.js @@ -0,0 +1,14 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , is = require("./is"); + +module.exports = function (value/*, options*/) { + if (is(value)) return value; + var options = arguments[1]; + var errorMessage = + options && options.name + ? "Expected a thenable for %n, received %v" + : "%v is not a thenable"; + return resolveException(value, errorMessage, options); +}; diff --git a/test/node_modules/ext/node_modules/type/thenable/is.js b/test/node_modules/ext/node_modules/type/thenable/is.js new file mode 100644 index 0000000..1f3d399 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/thenable/is.js @@ -0,0 +1,9 @@ +"use strict"; + +var isObject = require("../object/is"); + +module.exports = function (value) { + if (!isObject(value)) return false; + try { return typeof value.then === "function"; } + catch (error) { return false; } +}; diff --git a/test/node_modules/ext/node_modules/type/time-value/coerce.js b/test/node_modules/ext/node_modules/type/time-value/coerce.js new file mode 100644 index 0000000..7124864 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/time-value/coerce.js @@ -0,0 +1,12 @@ +"use strict"; + +var coerceToInteger = require("../integer/coerce"); + +var abs = Math.abs; + +module.exports = function (value) { + value = coerceToInteger(value); + if (!value) return value; + if (abs(value) > 8.64e15) return null; + return value; +}; diff --git a/test/node_modules/ext/node_modules/type/time-value/ensure.js b/test/node_modules/ext/node_modules/type/time-value/ensure.js new file mode 100644 index 0000000..ddf4f61 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/time-value/ensure.js @@ -0,0 +1,15 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , coerce = require("./coerce"); + +module.exports = function (value/*, options*/) { + var coerced = coerce(value); + if (coerced !== null) return coerced; + var options = arguments[1]; + var errorMessage = + options && options.name + ? "Expected a time value for %n, received %v" + : "%v is not a time value"; + return resolveException(value, errorMessage, options); +}; diff --git a/test/node_modules/ext/node_modules/type/ts-types/array-length/coerce.d.ts b/test/node_modules/ext/node_modules/type/ts-types/array-length/coerce.d.ts new file mode 100644 index 0000000..e949e11 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/array-length/coerce.d.ts @@ -0,0 +1,2 @@ +declare function coerceToArrayLength(value: any): number | null; +export default coerceToArrayLength; diff --git a/test/node_modules/ext/node_modules/type/ts-types/array-length/ensure.d.ts b/test/node_modules/ext/node_modules/type/ts-types/array-length/ensure.d.ts new file mode 100644 index 0000000..25c9370 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/array-length/ensure.d.ts @@ -0,0 +1,7 @@ +import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; + +declare function ensureArrayLength(value: any, options?: EnsureBaseOptions): number; +declare function ensureArrayLength(value: any, options?: EnsureBaseOptions & EnsureIsOptional): number | null; +declare function ensureArrayLength(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): number; + +export default ensureArrayLength; diff --git a/test/node_modules/ext/node_modules/type/ts-types/array-like/ensure.d.ts b/test/node_modules/ext/node_modules/type/ts-types/array-like/ensure.d.ts new file mode 100644 index 0000000..549febe --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/array-like/ensure.d.ts @@ -0,0 +1,11 @@ +import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; + +type LengthwiseObject = { length: number } & object; +type ArrayLikeEnsureOptions = { allowString?: boolean }; + + +declare function ensureArrayLike(value: any, options?: ArrayLikeEnsureOptions & EnsureBaseOptions): T[] | string | LengthwiseObject; +declare function ensureArrayLike(value: any, options?: ArrayLikeEnsureOptions & EnsureBaseOptions & EnsureIsOptional): T[] | string | LengthwiseObject | null; +declare function ensureArrayLike(value: any, options?: ArrayLikeEnsureOptions & EnsureBaseOptions & EnsureIsOptional & EnsureDefault): T[] | string | LengthwiseObject; + +export default ensureArrayLike; diff --git a/test/node_modules/ext/node_modules/type/ts-types/array-like/is.d.ts b/test/node_modules/ext/node_modules/type/ts-types/array-like/is.d.ts new file mode 100644 index 0000000..acdd657 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/array-like/is.d.ts @@ -0,0 +1,2 @@ +declare function isArrayLike(value: any, options?: {allowString?: boolean}): boolean; +export default isArrayLike; diff --git a/test/node_modules/ext/node_modules/type/ts-types/array/ensure.d.ts b/test/node_modules/ext/node_modules/type/ts-types/array/ensure.d.ts new file mode 100644 index 0000000..6c249b7 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/array/ensure.d.ts @@ -0,0 +1,10 @@ +import { EnsureFunction, EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; + +type EnsureArrayOptions = { ensureItem?: EnsureFunction }; + + +declare function ensureArray(value: any, options?: EnsureArrayOptions & EnsureBaseOptions): T[]; +declare function ensureArray(value: any, options?: EnsureArrayOptions & EnsureBaseOptions & EnsureIsOptional): T[] | null; +declare function ensureArray(value: any, options?: EnsureArrayOptions & EnsureBaseOptions & EnsureIsOptional & EnsureDefault): T[]; + +export default ensureArray; diff --git a/test/node_modules/ext/node_modules/type/ts-types/array/is.d.ts b/test/node_modules/ext/node_modules/type/ts-types/array/is.d.ts new file mode 100644 index 0000000..71af03e --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/array/is.d.ts @@ -0,0 +1,2 @@ +declare function isArray(value: any): boolean; +export default isArray; diff --git a/test/node_modules/ext/node_modules/type/ts-types/big-int/coerce.d.ts b/test/node_modules/ext/node_modules/type/ts-types/big-int/coerce.d.ts new file mode 100644 index 0000000..8c73fc6 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/big-int/coerce.d.ts @@ -0,0 +1,2 @@ +declare function coerceToBigInt(value: any): bigint | null; +export default coerceToBigInt; diff --git a/test/node_modules/ext/node_modules/type/ts-types/big-int/ensure.d.ts b/test/node_modules/ext/node_modules/type/ts-types/big-int/ensure.d.ts new file mode 100644 index 0000000..93073cb --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/big-int/ensure.d.ts @@ -0,0 +1,7 @@ +import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; + +declare function ensureBigInt(value: any, options?: EnsureBaseOptions): bigint; +declare function ensureBigInt(value: any, options?: EnsureBaseOptions & EnsureIsOptional): bigint | null; +declare function ensureBigInt(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): bigint; + +export default ensureBigInt; diff --git a/test/node_modules/ext/node_modules/type/ts-types/constructor/ensure.d.ts b/test/node_modules/ext/node_modules/type/ts-types/constructor/ensure.d.ts new file mode 100644 index 0000000..79dd28c --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/constructor/ensure.d.ts @@ -0,0 +1,7 @@ +import { EnsureFunction, EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; + +declare function ensureConstructor(value: any, options?: EnsureBaseOptions): EnsureFunction | object; +declare function ensureConstructor(value: any, options?: EnsureBaseOptions & EnsureIsOptional): EnsureFunction | object | null; +declare function ensureConstructor(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): EnsureFunction | object; + +export default ensureConstructor; diff --git a/test/node_modules/ext/node_modules/type/ts-types/constructor/is.d.ts b/test/node_modules/ext/node_modules/type/ts-types/constructor/is.d.ts new file mode 100644 index 0000000..768a635 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/constructor/is.d.ts @@ -0,0 +1,2 @@ +declare function isConstructor(value: any): boolean; +export default isConstructor; diff --git a/test/node_modules/ext/node_modules/type/ts-types/date/ensure.d.ts b/test/node_modules/ext/node_modules/type/ts-types/date/ensure.d.ts new file mode 100644 index 0000000..d96ad31 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/date/ensure.d.ts @@ -0,0 +1,7 @@ +import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; + +declare function ensureDate(value: any, options?: EnsureBaseOptions): Date; +declare function ensureDate(value: any, options?: EnsureBaseOptions & EnsureIsOptional): Date | null; +declare function ensureDate(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): Date; + +export default ensureDate; diff --git a/test/node_modules/ext/node_modules/type/ts-types/date/is.d.ts b/test/node_modules/ext/node_modules/type/ts-types/date/is.d.ts new file mode 100644 index 0000000..7907a8f --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/date/is.d.ts @@ -0,0 +1,2 @@ +declare function isDate(value: any): boolean; +export default isDate; diff --git a/test/node_modules/ext/node_modules/type/ts-types/ensure.d.ts b/test/node_modules/ext/node_modules/type/ts-types/ensure.d.ts new file mode 100644 index 0000000..62ba597 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/ensure.d.ts @@ -0,0 +1,24 @@ +export type EnsureFunction = (...args: any[]) => any; +export interface EnsureBaseOptions { + name?: string; + errorMessage?: string; + errorCode?: number; + Error?: ErrorConstructor; +} + +export interface EnsureIsOptional { + isOptional: boolean; +} + +export interface EnsureDefault { + default: T; +} + +type EnsureOptions = EnsureBaseOptions & { isOptional?: boolean } & { default?: any }; + +type ValidationDatum = [argumentName: string, inputValue: any, ensureFunction: EnsureFunction, options?: object]; +type ValidationDatumList = ValidationDatum[]; + +declare function ensure(...args: [...ValidationDatumList, EnsureOptions]): T; +declare function ensure(...args: [...ValidationDatumList]): T; +export default ensure; diff --git a/test/node_modules/ext/node_modules/type/ts-types/error/ensure.d.ts b/test/node_modules/ext/node_modules/type/ts-types/error/ensure.d.ts new file mode 100644 index 0000000..b42f446 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/error/ensure.d.ts @@ -0,0 +1,7 @@ +import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; + +declare function ensureError(value: any, options?: EnsureBaseOptions): Error; +declare function ensureError(value: any, options?: EnsureBaseOptions & EnsureIsOptional): Error | null; +declare function ensureError(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): Error; + +export default ensureError; diff --git a/test/node_modules/ext/node_modules/type/ts-types/error/is.d.ts b/test/node_modules/ext/node_modules/type/ts-types/error/is.d.ts new file mode 100644 index 0000000..db64ea3 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/error/is.d.ts @@ -0,0 +1,2 @@ +declare function isError(value: any): boolean; +export default isError; diff --git a/test/node_modules/ext/node_modules/type/ts-types/finite/coerce.d.ts b/test/node_modules/ext/node_modules/type/ts-types/finite/coerce.d.ts new file mode 100644 index 0000000..f1edc2d --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/finite/coerce.d.ts @@ -0,0 +1,2 @@ +declare function coerceToFinite(value: any): number | null; +export default coerceToFinite; diff --git a/test/node_modules/ext/node_modules/type/ts-types/finite/ensure.d.ts b/test/node_modules/ext/node_modules/type/ts-types/finite/ensure.d.ts new file mode 100644 index 0000000..988c511 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/finite/ensure.d.ts @@ -0,0 +1,7 @@ +import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; + +declare function ensureFinite(value: any, options?: EnsureBaseOptions): number; +declare function ensureFinite(value: any, options?: EnsureBaseOptions & EnsureIsOptional): number | null; +declare function ensureFinite(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): number; + +export default ensureFinite; diff --git a/test/node_modules/ext/node_modules/type/ts-types/function/ensure.d.ts b/test/node_modules/ext/node_modules/type/ts-types/function/ensure.d.ts new file mode 100644 index 0000000..30839e5 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/function/ensure.d.ts @@ -0,0 +1,7 @@ +import { EnsureFunction, EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; + +declare function ensureFunction(value: any, options?: EnsureBaseOptions): EnsureFunction; +declare function ensureFunction(value: any, options?: EnsureBaseOptions & EnsureIsOptional): EnsureFunction | null; +declare function ensureFunction(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): EnsureFunction; + +export default ensureFunction; diff --git a/test/node_modules/ext/node_modules/type/ts-types/function/is.d.ts b/test/node_modules/ext/node_modules/type/ts-types/function/is.d.ts new file mode 100644 index 0000000..9d94f95 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/function/is.d.ts @@ -0,0 +1,2 @@ +declare function isFunction(value: any): boolean; +export default isFunction; diff --git a/test/node_modules/ext/node_modules/type/ts-types/integer/coerce.d.ts b/test/node_modules/ext/node_modules/type/ts-types/integer/coerce.d.ts new file mode 100644 index 0000000..3bbb00f --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/integer/coerce.d.ts @@ -0,0 +1,2 @@ +declare function coerceToInteger(value: any): number | null; +export default coerceToInteger; diff --git a/test/node_modules/ext/node_modules/type/ts-types/integer/ensure.d.ts b/test/node_modules/ext/node_modules/type/ts-types/integer/ensure.d.ts new file mode 100644 index 0000000..06f1c8a --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/integer/ensure.d.ts @@ -0,0 +1,7 @@ +import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; + +declare function ensureInteger(value: any, options?: EnsureBaseOptions): number; +declare function ensureInteger(value: any, options?: EnsureBaseOptions & EnsureIsOptional): number | null; +declare function ensureInteger(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): number; + +export default ensureInteger; diff --git a/test/node_modules/ext/node_modules/type/ts-types/iterable/ensure.d.ts b/test/node_modules/ext/node_modules/type/ts-types/iterable/ensure.d.ts new file mode 100644 index 0000000..973d3ea --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/iterable/ensure.d.ts @@ -0,0 +1,10 @@ +import { EnsureFunction, EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; + +type IterableEnsureOptions = { ensureItem?: EnsureFunction, allowString?: boolean, denyEmpty?: boolean}; + + +declare function ensureIterable(value: any, options?: IterableEnsureOptions & EnsureBaseOptions): T[]; +declare function ensureIterable(value: any, options?: IterableEnsureOptions & EnsureBaseOptions & EnsureIsOptional): T[] | null; +declare function ensureIterable(value: any, options?: IterableEnsureOptions & EnsureBaseOptions & EnsureIsOptional & EnsureDefault): T[]; + +export default ensureIterable; diff --git a/test/node_modules/ext/node_modules/type/ts-types/iterable/is.d.ts b/test/node_modules/ext/node_modules/type/ts-types/iterable/is.d.ts new file mode 100644 index 0000000..93686d2 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/iterable/is.d.ts @@ -0,0 +1,2 @@ +declare function isIterable(value: any, options?: { allowString?: boolean, denyEmpty?: boolean }): boolean; +export default isIterable; diff --git a/test/node_modules/ext/node_modules/type/ts-types/map/ensure.d.ts b/test/node_modules/ext/node_modules/type/ts-types/map/ensure.d.ts new file mode 100644 index 0000000..6a23851 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/map/ensure.d.ts @@ -0,0 +1,7 @@ +import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; + +declare function ensureMap(value: any, options?: EnsureBaseOptions): Map; +declare function ensureMap(value: any, options?: EnsureBaseOptions & EnsureIsOptional): Map | null; +declare function ensureMap(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault>): Map; + +export default ensureMap; diff --git a/test/node_modules/ext/node_modules/type/ts-types/map/is.d.ts b/test/node_modules/ext/node_modules/type/ts-types/map/is.d.ts new file mode 100644 index 0000000..340ed1b --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/map/is.d.ts @@ -0,0 +1,2 @@ +declare function isMap(value: any): boolean; +export default isMap; diff --git a/test/node_modules/ext/node_modules/type/ts-types/natural-number/coerce.d.ts b/test/node_modules/ext/node_modules/type/ts-types/natural-number/coerce.d.ts new file mode 100644 index 0000000..633317c --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/natural-number/coerce.d.ts @@ -0,0 +1,2 @@ +declare function coerceToNaturalNumber(value: any): number | null; +export default coerceToNaturalNumber; diff --git a/test/node_modules/ext/node_modules/type/ts-types/natural-number/ensure.d.ts b/test/node_modules/ext/node_modules/type/ts-types/natural-number/ensure.d.ts new file mode 100644 index 0000000..2f6d6b5 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/natural-number/ensure.d.ts @@ -0,0 +1,7 @@ +import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; + +declare function ensureNaturalNumber(value: any, options?: EnsureBaseOptions): number; +declare function ensureNaturalNumber(value: any, options?: EnsureBaseOptions & EnsureIsOptional): number | null; +declare function ensureNaturalNumber(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): number; + +export default ensureNaturalNumber; diff --git a/test/node_modules/ext/node_modules/type/ts-types/number/coerce.d.ts b/test/node_modules/ext/node_modules/type/ts-types/number/coerce.d.ts new file mode 100644 index 0000000..cc9f355 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/number/coerce.d.ts @@ -0,0 +1,2 @@ +declare function coerceToNumber(value: any): number | null; +export default coerceToNumber; diff --git a/test/node_modules/ext/node_modules/type/ts-types/number/ensure.d.ts b/test/node_modules/ext/node_modules/type/ts-types/number/ensure.d.ts new file mode 100644 index 0000000..326b222 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/number/ensure.d.ts @@ -0,0 +1,7 @@ +import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; + +declare function ensureNumber(value: any, options?: EnsureBaseOptions): number; +declare function ensureNumber(value: any, options?: EnsureBaseOptions & EnsureIsOptional): number | null; +declare function ensureNumber(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): number; + +export default ensureNumber; diff --git a/test/node_modules/ext/node_modules/type/ts-types/object/ensure.d.ts b/test/node_modules/ext/node_modules/type/ts-types/object/ensure.d.ts new file mode 100644 index 0000000..f5ccce1 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/object/ensure.d.ts @@ -0,0 +1,7 @@ +import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; + +declare function ensureObject(value: any, options?: EnsureBaseOptions): object; +declare function ensureObject(value: any, options?: EnsureBaseOptions & EnsureIsOptional): object | null; +declare function ensureObject(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): object; + +export default ensureObject; diff --git a/test/node_modules/ext/node_modules/type/ts-types/object/is.d.ts b/test/node_modules/ext/node_modules/type/ts-types/object/is.d.ts new file mode 100644 index 0000000..47fdd9c --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/object/is.d.ts @@ -0,0 +1,2 @@ +declare function isObject(value: any): boolean; +export default isObject; diff --git a/test/node_modules/ext/node_modules/type/ts-types/plain-function/ensure.d.ts b/test/node_modules/ext/node_modules/type/ts-types/plain-function/ensure.d.ts new file mode 100644 index 0000000..8681e77 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/plain-function/ensure.d.ts @@ -0,0 +1,7 @@ +import { EnsureFunction, EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; + +declare function ensurePlainFunction(value: any, options?: EnsureBaseOptions): EnsureFunction; +declare function ensurePlainFunction(value: any, options?: EnsureBaseOptions & EnsureIsOptional): EnsureFunction | null; +declare function ensurePlainFunction(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): EnsureFunction; + +export default ensurePlainFunction; diff --git a/test/node_modules/ext/node_modules/type/ts-types/plain-function/is.d.ts b/test/node_modules/ext/node_modules/type/ts-types/plain-function/is.d.ts new file mode 100644 index 0000000..de32a5e --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/plain-function/is.d.ts @@ -0,0 +1,2 @@ +declare function isPlainFunction(value: any): boolean; +export default isPlainFunction; diff --git a/test/node_modules/ext/node_modules/type/ts-types/plain-object/ensure.d.ts b/test/node_modules/ext/node_modules/type/ts-types/plain-object/ensure.d.ts new file mode 100644 index 0000000..063d709 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/plain-object/ensure.d.ts @@ -0,0 +1,10 @@ +import { EnsureFunction, EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; + +type PlainObjectEnsureOptions = {allowedKeys?: string[], ensurePropertyValue?: EnsureFunction}; + + +declare function ensurePlainObject(value: any, options?: PlainObjectEnsureOptions & EnsureBaseOptions): object; +declare function ensurePlainObject(value: any, options?: PlainObjectEnsureOptions & EnsureBaseOptions & EnsureIsOptional): object | null; +declare function ensurePlainObject(value: any, options?: PlainObjectEnsureOptions & EnsureBaseOptions & EnsureIsOptional & EnsureDefault): object; + +export default ensurePlainObject; diff --git a/test/node_modules/ext/node_modules/type/ts-types/plain-object/is.d.ts b/test/node_modules/ext/node_modules/type/ts-types/plain-object/is.d.ts new file mode 100644 index 0000000..8626085 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/plain-object/is.d.ts @@ -0,0 +1,2 @@ +declare function isPlainObject(value: any): boolean; +export default isPlainObject; diff --git a/test/node_modules/ext/node_modules/type/ts-types/promise/ensure.d.ts b/test/node_modules/ext/node_modules/type/ts-types/promise/ensure.d.ts new file mode 100644 index 0000000..3ddf4ea --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/promise/ensure.d.ts @@ -0,0 +1,7 @@ +import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; + +declare function ensurePromise(value: any, options?: EnsureBaseOptions): Promise; +declare function ensurePromise(value: any, options?: EnsureBaseOptions & EnsureIsOptional): Promise | null; +declare function ensurePromise(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault>): Promise; + +export default ensurePromise; diff --git a/test/node_modules/ext/node_modules/type/ts-types/promise/is.d.ts b/test/node_modules/ext/node_modules/type/ts-types/promise/is.d.ts new file mode 100644 index 0000000..9306fe5 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/promise/is.d.ts @@ -0,0 +1,2 @@ +declare function isPromise(value: any): boolean; +export default isPromise; diff --git a/test/node_modules/ext/node_modules/type/ts-types/prototype/is.d.ts b/test/node_modules/ext/node_modules/type/ts-types/prototype/is.d.ts new file mode 100644 index 0000000..7f2eb12 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/prototype/is.d.ts @@ -0,0 +1,2 @@ +declare function isPrototype(value: any): boolean; +export default isPrototype; diff --git a/test/node_modules/ext/node_modules/type/ts-types/reg-exp/ensure.d.ts b/test/node_modules/ext/node_modules/type/ts-types/reg-exp/ensure.d.ts new file mode 100644 index 0000000..95a2c9b --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/reg-exp/ensure.d.ts @@ -0,0 +1,7 @@ +import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; + +declare function ensureRegExp(value: any, options?: EnsureBaseOptions): RegExp; +declare function ensureRegExp(value: any, options?: EnsureBaseOptions & EnsureIsOptional): RegExp | null; +declare function ensureRegExp(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): RegExp; + +export default ensureRegExp; diff --git a/test/node_modules/ext/node_modules/type/ts-types/reg-exp/is.d.ts b/test/node_modules/ext/node_modules/type/ts-types/reg-exp/is.d.ts new file mode 100644 index 0000000..a325e34 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/reg-exp/is.d.ts @@ -0,0 +1,2 @@ +declare function isRegExp(value: any): boolean; +export default isRegExp; diff --git a/test/node_modules/ext/node_modules/type/ts-types/safe-integer/coerce.d.ts b/test/node_modules/ext/node_modules/type/ts-types/safe-integer/coerce.d.ts new file mode 100644 index 0000000..5e6539c --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/safe-integer/coerce.d.ts @@ -0,0 +1,2 @@ +declare function coerceToSafeInteger(value: any): number | null; +export default coerceToSafeInteger; diff --git a/test/node_modules/ext/node_modules/type/ts-types/safe-integer/ensure.d.ts b/test/node_modules/ext/node_modules/type/ts-types/safe-integer/ensure.d.ts new file mode 100644 index 0000000..5d4b953 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/safe-integer/ensure.d.ts @@ -0,0 +1,7 @@ +import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; + +declare function ensureSafeInteger(value: any, options?: EnsureBaseOptions): number; +declare function ensureSafeInteger(value: any, options?: EnsureBaseOptions & EnsureIsOptional): number | null; +declare function ensureSafeInteger(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): number; + +export default ensureSafeInteger; diff --git a/test/node_modules/ext/node_modules/type/ts-types/set/ensure.d.ts b/test/node_modules/ext/node_modules/type/ts-types/set/ensure.d.ts new file mode 100644 index 0000000..2b14259 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/set/ensure.d.ts @@ -0,0 +1,7 @@ +import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; + +declare function ensureSet(value: any, options?: EnsureBaseOptions): Set; +declare function ensureSet(value: any, options?: EnsureBaseOptions & EnsureIsOptional): Set | null; +declare function ensureSet(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault>): Set; + +export default ensureSet; diff --git a/test/node_modules/ext/node_modules/type/ts-types/set/is.d.ts b/test/node_modules/ext/node_modules/type/ts-types/set/is.d.ts new file mode 100644 index 0000000..530aed3 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/set/is.d.ts @@ -0,0 +1,2 @@ +declare function isSet(value: any): boolean; +export default isSet; diff --git a/test/node_modules/ext/node_modules/type/ts-types/string/coerce.d.ts b/test/node_modules/ext/node_modules/type/ts-types/string/coerce.d.ts new file mode 100644 index 0000000..603519d --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/string/coerce.d.ts @@ -0,0 +1,2 @@ +declare function coerceToString(value: any): string | null; +export default coerceToString; diff --git a/test/node_modules/ext/node_modules/type/ts-types/string/ensure.d.ts b/test/node_modules/ext/node_modules/type/ts-types/string/ensure.d.ts new file mode 100644 index 0000000..d31965a --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/string/ensure.d.ts @@ -0,0 +1,7 @@ +import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; + +declare function ensureString(value: any, options?: EnsureBaseOptions): string; +declare function ensureString(value: any, options?: EnsureBaseOptions & EnsureIsOptional): string | null; +declare function ensureString(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): string; + +export default ensureString; diff --git a/test/node_modules/ext/node_modules/type/ts-types/thenable/ensure.d.ts b/test/node_modules/ext/node_modules/type/ts-types/thenable/ensure.d.ts new file mode 100644 index 0000000..741faad --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/thenable/ensure.d.ts @@ -0,0 +1,10 @@ +import { EnsureFunction, EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; + +type ThenableObject = { then: EnsureFunction } & object; + + +declare function ensureThenable(value: any, options?: EnsureBaseOptions): Promise | ThenableObject; +declare function ensureThenable(value: any, options?: EnsureBaseOptions & EnsureIsOptional): Promise | ThenableObject | null; +declare function ensureThenable(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault | ThenableObject>): Promise | ThenableObject; + +export default ensureThenable; diff --git a/test/node_modules/ext/node_modules/type/ts-types/thenable/is.d.ts b/test/node_modules/ext/node_modules/type/ts-types/thenable/is.d.ts new file mode 100644 index 0000000..c8f207f --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/thenable/is.d.ts @@ -0,0 +1,2 @@ +declare function isThenable(value: any): boolean; +export default isThenable; diff --git a/test/node_modules/ext/node_modules/type/ts-types/time-value/coerce.d.ts b/test/node_modules/ext/node_modules/type/ts-types/time-value/coerce.d.ts new file mode 100644 index 0000000..44849ba --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/time-value/coerce.d.ts @@ -0,0 +1,2 @@ +declare function coerceToTimeValue(value: any): number | null; +export default coerceToTimeValue; diff --git a/test/node_modules/ext/node_modules/type/ts-types/time-value/ensure.d.ts b/test/node_modules/ext/node_modules/type/ts-types/time-value/ensure.d.ts new file mode 100644 index 0000000..f8084b8 --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/time-value/ensure.d.ts @@ -0,0 +1,5 @@ +import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; + +declare function ensureTimeValue(value: any, options?: EnsureBaseOptions & EnsureIsOptional): number | null; +declare function ensureTimeValue(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): number; +export default ensureTimeValue; diff --git a/test/node_modules/ext/node_modules/type/ts-types/value/ensure.d.ts b/test/node_modules/ext/node_modules/type/ts-types/value/ensure.d.ts new file mode 100644 index 0000000..928b29e --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/value/ensure.d.ts @@ -0,0 +1,4 @@ +import { EnsureOptions } from '../ensure'; + +declare function ensureValue(value: any, options?: EnsureOptions): T; +export default ensureValue; diff --git a/test/node_modules/ext/node_modules/type/ts-types/value/is.d.ts b/test/node_modules/ext/node_modules/type/ts-types/value/is.d.ts new file mode 100644 index 0000000..31f306d --- /dev/null +++ b/test/node_modules/ext/node_modules/type/ts-types/value/is.d.ts @@ -0,0 +1,2 @@ +declare function isValue(value: any): boolean; +export default isValue; diff --git a/test/node_modules/ext/node_modules/type/value/ensure.js b/test/node_modules/ext/node_modules/type/value/ensure.js new file mode 100644 index 0000000..3067a3e --- /dev/null +++ b/test/node_modules/ext/node_modules/type/value/ensure.js @@ -0,0 +1,12 @@ +"use strict"; + +var resolveException = require("../lib/resolve-exception") + , is = require("./is"); + +module.exports = function (value/*, options*/) { + if (is(value)) return value; + var options = arguments[1]; + var errorMessage = + options && options.name ? "Expected a value for %n, received %v" : "Cannot use %v"; + return resolveException(value, errorMessage, options); +}; diff --git a/test/node_modules/ext/node_modules/type/value/is.js b/test/node_modules/ext/node_modules/type/value/is.js new file mode 100644 index 0000000..648aa9c --- /dev/null +++ b/test/node_modules/ext/node_modules/type/value/is.js @@ -0,0 +1,6 @@ +"use strict"; + +// ES3 safe +var _undefined = void 0; + +module.exports = function (value) { return value !== _undefined && value !== null; }; diff --git a/test/node_modules/ext/object/clear.js b/test/node_modules/ext/object/clear.js new file mode 100644 index 0000000..be3be2b --- /dev/null +++ b/test/node_modules/ext/object/clear.js @@ -0,0 +1,15 @@ +"use strict"; + +var ensureObject = require("type/object/ensure") + , ensure = require("type/ensure"); + +var objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; + +module.exports = function (object) { + ensure(["object", object, ensureObject]); + for (var key in object) { + if (!objPropertyIsEnumerable.call(object, key)) continue; + delete object[key]; + } + return object; +}; diff --git a/test/node_modules/ext/object/entries/implement.js b/test/node_modules/ext/object/entries/implement.js new file mode 100644 index 0000000..383ceee --- /dev/null +++ b/test/node_modules/ext/object/entries/implement.js @@ -0,0 +1,10 @@ +"use strict"; + +if (!require("./is-implemented")()) { + Object.defineProperty(Object, "entries", { + value: require("./implementation"), + configurable: true, + enumerable: false, + writable: true + }); +} diff --git a/test/node_modules/ext/object/entries/implementation.js b/test/node_modules/ext/object/entries/implementation.js new file mode 100644 index 0000000..d6f121c --- /dev/null +++ b/test/node_modules/ext/object/entries/implementation.js @@ -0,0 +1,15 @@ +"use strict"; + +var ensureValue = require("type/value/ensure"); + +var objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; + +module.exports = function (object) { + object = Object(ensureValue(object)); + var result = []; + for (var key in object) { + if (!objPropertyIsEnumerable.call(object, key)) continue; + result.push([key, object[key]]); + } + return result; +}; diff --git a/test/node_modules/ext/object/entries/index.js b/test/node_modules/ext/object/entries/index.js new file mode 100644 index 0000000..0a784d6 --- /dev/null +++ b/test/node_modules/ext/object/entries/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./is-implemented")() ? Object.entries : require("./implementation"); diff --git a/test/node_modules/ext/object/entries/is-implemented.js b/test/node_modules/ext/object/entries/is-implemented.js new file mode 100644 index 0000000..aad52b2 --- /dev/null +++ b/test/node_modules/ext/object/entries/is-implemented.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function () { + try { return Object.entries({ foo: 12 })[0][0] === "foo"; } + catch (e) { return false; } +}; diff --git a/test/node_modules/ext/package.json b/test/node_modules/ext/package.json new file mode 100644 index 0000000..4bf9e12 --- /dev/null +++ b/test/node_modules/ext/package.json @@ -0,0 +1,152 @@ +{ + "name": "ext", + "version": "1.7.0", + "description": "JavaScript utilities with respect to emerging standard", + "author": "Mariusz Nowak (http://www.medikoo.com/)", + "keywords": [ + "ecmascript", + "es", + "es6", + "extensions", + "ext", + "addons", + "lodash", + "extras", + "harmony", + "javascript", + "polyfill", + "shim", + "util", + "utils", + "utilities" + ], + "repository": { + "type": "git", + "url": "https://github.com/medikoo/es5-ext#ext" + }, + "dependencies": { + "type": "^2.7.2" + }, + "devDependencies": { + "chai": "^4.3.6", + "eslint": "^8.23.0", + "eslint-config-medikoo": "^4.1.2", + "git-list-updated": "^1.2.1", + "github-release-from-cc-changelog": "^2.3.0", + "husky": "^4.3.8", + "lint-staged": "^13.0.3", + "mocha": "^6.2.3", + "nyc": "^15.1.0", + "prettier-elastic": "^2.2.1", + "sinon": "^8.1.1", + "timers-ext": "^0.1.7" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "*.js": [ + "eslint" + ], + "*.{css,html,js,json,md,yaml,yml}": [ + "prettier -c" + ] + }, + "eslintIgnore": [ + "_es5-ext" + ], + "eslintConfig": { + "extends": "medikoo/es3", + "root": true, + "overrides": [ + { + "files": "global-this/implementation.js", + "globals": { + "__global__": true, + "self": true, + "window": true + }, + "rules": { + "no-extend-native": "off", + "strict": "off" + } + }, + { + "files": [ + "global-this/is-implemented.js", + "global-this/index.js" + ], + "globals": { + "globalThis": true + } + }, + { + "files": "string_/camel-to-hyphen.js", + "rules": { + "id-length": "off" + } + }, + { + "files": "test/**/*.js", + "env": { + "mocha": true + } + }, + { + "files": [ + "test/promise/limit.js", + "test/thenable_/finally.js" + ], + "globals": { + "Promise": true + } + } + ] + }, + "prettier": { + "printWidth": 100, + "tabWidth": 4, + "overrides": [ + { + "files": [ + "*.md", + "*.yml" + ], + "options": { + "tabWidth": 2 + } + } + ] + }, + "mocha": { + "recursive": true + }, + "nyc": { + "all": true, + "exclude": [ + ".github", + "_es5-ext", + "coverage/**", + "test/**", + "*.config.js" + ], + "reporter": [ + "lcov", + "html", + "text-summary" + ] + }, + "scripts": { + "coverage": "nyc npm test", + "lint": "eslint .", + "lint:updated": "pipe-git-updated --ext=js -- eslint --ignore-pattern '!*'", + "prettier-check": "prettier -c --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"", + "prettier-check:updated": "pipe-git-updated --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier -c", + "prettify": "prettier --write --ignore-path .gitignore '**/*.{css,html,js,json,md,yaml,yml}'", + "prettify:updated": "pipe-git-updated ---base=main -ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier --write", + "test": "mocha" + }, + "license": "ISC" +} diff --git a/test/node_modules/ext/promise/limit.js b/test/node_modules/ext/promise/limit.js new file mode 100644 index 0000000..841afad --- /dev/null +++ b/test/node_modules/ext/promise/limit.js @@ -0,0 +1,62 @@ +"use strict"; + +var ensureNaturalNumber = require("type/natural-number/ensure") + , ensurePlainFunction = require("type/plain-function/ensure") + , ensure = require("type/ensure") + , defineFunctionLength = require("../lib/private/define-function-length"); + +module.exports = function (limit, callback) { + limit = ensure( + ["limit", limit, ensureNaturalNumber, { min: 1 }], + ["callback", callback, ensurePlainFunction] + )[0]; + + var Promise = this, ongoingCount = 0, pending = []; + var onSuccess, onFailure; + + var release = function () { + --ongoingCount; + if (ongoingCount >= limit) return; + var next = pending.shift(); + if (!next) return; + ++ongoingCount; + try { + next.resolve( + Promise.resolve(callback.apply(next.context, next.arguments)).then( + onSuccess, onFailure + ) + ); + } catch (exception) { + release(); + next.reject(exception); + } + }; + + onSuccess = function (value) { + release(); + return value; + }; + + onFailure = function (exception) { + release(); + throw exception; + }; + + return defineFunctionLength(callback.length, function () { + if (ongoingCount >= limit) { + var context = this, args = arguments; + return new Promise(function (resolve, reject) { + pending.push({ + context: context, + arguments: args, + resolve: resolve, + reject: reject + }); + }); + } + ++ongoingCount; + try { + return Promise.resolve(callback.apply(this, arguments)).then(onSuccess, onFailure); + } catch (exception) { return onFailure(exception); } + }); +}; diff --git a/test/node_modules/ext/string/random.js b/test/node_modules/ext/string/random.js new file mode 100644 index 0000000..c96ef92 --- /dev/null +++ b/test/node_modules/ext/string/random.js @@ -0,0 +1,50 @@ +"use strict"; + +var isObject = require("type/object/is") + , ensureNaturalNumber = require("type/natural-number/ensure") + , ensureString = require("type/string/ensure"); + +var generated = Object.create(null), random = Math.random, uniqTryLimit = 100; + +var getChunk = function () { return random().toString(36).slice(2); }; + +var getString = function (length, charset) { + var str; + if (charset) { + var charsetLength = charset.length; + str = ""; + for (var i = 0; i < length; ++i) { + str += charset.charAt(Math.floor(Math.random() * charsetLength)); + } + return str; + } + str = getChunk(); + if (length === null) return str; + while (str.length < length) str += getChunk(); + return str.slice(0, length); +}; + +module.exports = function (/* options */) { + var options = arguments[0]; + if (!isObject(options)) options = {}; + var length = ensureNaturalNumber(options.length, { "default": 10 }) + , isUnique = options.isUnique + , charset = ensureString(options.charset, { isOptional: true }); + + var str = getString(length, charset); + if (isUnique) { + var count = 0; + while (generated[str]) { + if (++count === uniqTryLimit) { + throw new Error( + "Cannot generate random string.\n" + + "String.random is not designed to effectively generate many short and " + + "unique random strings" + ); + } + str = getString(length); + } + generated[str] = true; + } + return str; +}; diff --git a/test/node_modules/ext/string_/camel-to-hyphen.js b/test/node_modules/ext/string_/camel-to-hyphen.js new file mode 100644 index 0000000..feffae6 --- /dev/null +++ b/test/node_modules/ext/string_/camel-to-hyphen.js @@ -0,0 +1,49 @@ +"use strict"; + +var ensureString = require("type/string/ensure") + , objHasOwnProperty = Object.prototype.hasOwnProperty; + +var capitalLetters = { + A: true, + B: true, + C: true, + D: true, + E: true, + F: true, + G: true, + H: true, + I: true, + J: true, + K: true, + L: true, + M: true, + N: true, + O: true, + P: true, + Q: true, + R: true, + S: true, + T: true, + U: true, + V: true, + W: true, + X: true, + Y: true, + Z: true +}; + +module.exports = function () { + var input = ensureString(this); + if (!input) return input; + var outputLetters = []; + for (var index = 0, letter; (letter = input[index]); ++index) { + if (objHasOwnProperty.call(capitalLetters, letter)) { + if (index) outputLetters.push("-"); + outputLetters.push(letter.toLowerCase()); + } else { + outputLetters.push(letter); + } + } + + return outputLetters.join(""); +}; diff --git a/test/node_modules/ext/string_/capitalize.js b/test/node_modules/ext/string_/capitalize.js new file mode 100644 index 0000000..bc76311 --- /dev/null +++ b/test/node_modules/ext/string_/capitalize.js @@ -0,0 +1,9 @@ +"use strict"; + +var ensureString = require("type/string/ensure"); + +module.exports = function () { + var input = ensureString(this); + if (!input) return input; + return input.charAt(0).toUpperCase() + input.slice(1); +}; diff --git a/test/node_modules/ext/string_/includes/implementation.js b/test/node_modules/ext/string_/includes/implementation.js new file mode 100644 index 0000000..a7219f2 --- /dev/null +++ b/test/node_modules/ext/string_/includes/implementation.js @@ -0,0 +1,7 @@ +"use strict"; + +var indexOf = String.prototype.indexOf; + +module.exports = function (searchString/*, position*/) { + return indexOf.call(this, searchString, arguments[1]) > -1; +}; diff --git a/test/node_modules/ext/string_/includes/index.js b/test/node_modules/ext/string_/includes/index.js new file mode 100644 index 0000000..ee4e284 --- /dev/null +++ b/test/node_modules/ext/string_/includes/index.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = require("./is-implemented")() + ? String.prototype.includes + : require("./implementation"); diff --git a/test/node_modules/ext/string_/includes/is-implemented.js b/test/node_modules/ext/string_/includes/is-implemented.js new file mode 100644 index 0000000..edc4515 --- /dev/null +++ b/test/node_modules/ext/string_/includes/is-implemented.js @@ -0,0 +1,8 @@ +"use strict"; + +var str = "razdwatrzy"; + +module.exports = function () { + if (typeof str.includes !== "function") return false; + return str.includes("dwa") === true && str.includes("foo") === false; +}; diff --git a/test/node_modules/ext/thenable_/finally.js b/test/node_modules/ext/thenable_/finally.js new file mode 100644 index 0000000..42274bf --- /dev/null +++ b/test/node_modules/ext/thenable_/finally.js @@ -0,0 +1,24 @@ +"use strict"; + +var ensurePlainFunction = require("type/plain-function/ensure") + , isThenable = require("type/thenable/is") + , ensureThenable = require("type/thenable/ensure"); + +var resolveCallback = function (callback, next) { + var callbackResult = callback(); + if (!isThenable(callbackResult)) return next(); + return callbackResult.then(next); +}; + +module.exports = function (callback) { + ensureThenable(this); + ensurePlainFunction(callback); + return this.then( + function (result) { + return resolveCallback(callback, function () { return result; }); + }, + function (error) { + return resolveCallback(callback, function () { throw error; }); + } + ); +}; diff --git a/test/node_modules/follow-redirects/LICENSE b/test/node_modules/follow-redirects/LICENSE new file mode 100644 index 0000000..742cbad --- /dev/null +++ b/test/node_modules/follow-redirects/LICENSE @@ -0,0 +1,18 @@ +Copyright 2014–present Olivier Lalonde , James Talmage , Ruben Verborgh + +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/test/node_modules/follow-redirects/README.md b/test/node_modules/follow-redirects/README.md new file mode 100644 index 0000000..eb869a6 --- /dev/null +++ b/test/node_modules/follow-redirects/README.md @@ -0,0 +1,155 @@ +## Follow Redirects + +Drop-in replacement for Node's `http` and `https` modules that automatically follows redirects. + +[![npm version](https://img.shields.io/npm/v/follow-redirects.svg)](https://www.npmjs.com/package/follow-redirects) +[![Build Status](https://github.com/follow-redirects/follow-redirects/workflows/CI/badge.svg)](https://github.com/follow-redirects/follow-redirects/actions) +[![Coverage Status](https://coveralls.io/repos/follow-redirects/follow-redirects/badge.svg?branch=master)](https://coveralls.io/r/follow-redirects/follow-redirects?branch=master) +[![npm downloads](https://img.shields.io/npm/dm/follow-redirects.svg)](https://www.npmjs.com/package/follow-redirects) +[![Sponsor on GitHub](https://img.shields.io/static/v1?label=Sponsor&message=%F0%9F%92%96&logo=GitHub)](https://github.com/sponsors/RubenVerborgh) + +`follow-redirects` provides [request](https://nodejs.org/api/http.html#http_http_request_options_callback) and [get](https://nodejs.org/api/http.html#http_http_get_options_callback) + methods that behave identically to those found on the native [http](https://nodejs.org/api/http.html#http_http_request_options_callback) and [https](https://nodejs.org/api/https.html#https_https_request_options_callback) + modules, with the exception that they will seamlessly follow redirects. + +```javascript +const { http, https } = require('follow-redirects'); + +http.get('http://bit.ly/900913', response => { + response.on('data', chunk => { + console.log(chunk); + }); +}).on('error', err => { + console.error(err); +}); +``` + +You can inspect the final redirected URL through the `responseUrl` property on the `response`. +If no redirection happened, `responseUrl` is the original request URL. + +```javascript +const request = https.request({ + host: 'bitly.com', + path: '/UHfDGO', +}, response => { + console.log(response.responseUrl); + // 'http://duckduckgo.com/robots.txt' +}); +request.end(); +``` + +## Options +### Global options +Global options are set directly on the `follow-redirects` module: + +```javascript +const followRedirects = require('follow-redirects'); +followRedirects.maxRedirects = 10; +followRedirects.maxBodyLength = 20 * 1024 * 1024; // 20 MB +``` + +The following global options are supported: + +- `maxRedirects` (default: `21`) – sets the maximum number of allowed redirects; if exceeded, an error will be emitted. + +- `maxBodyLength` (default: 10MB) – sets the maximum size of the request body; if exceeded, an error will be emitted. + +### Per-request options +Per-request options are set by passing an `options` object: + +```javascript +const url = require('url'); +const { http, https } = require('follow-redirects'); + +const options = url.parse('http://bit.ly/900913'); +options.maxRedirects = 10; +options.beforeRedirect = (options, response, request) => { + // Use this to adjust the request options upon redirecting, + // to inspect the latest response headers, + // or to cancel the request by throwing an error + + // response.headers = the redirect response headers + // response.statusCode = the redirect response code (eg. 301, 307, etc.) + + // request.url = the requested URL that resulted in a redirect + // request.headers = the headers in the request that resulted in a redirect + // request.method = the method of the request that resulted in a redirect + if (options.hostname === "example.com") { + options.auth = "user:password"; + } +}; +http.request(options); +``` + +In addition to the [standard HTTP](https://nodejs.org/api/http.html#http_http_request_options_callback) and [HTTPS options](https://nodejs.org/api/https.html#https_https_request_options_callback), +the following per-request options are supported: +- `followRedirects` (default: `true`) – whether redirects should be followed. + +- `maxRedirects` (default: `21`) – sets the maximum number of allowed redirects; if exceeded, an error will be emitted. + +- `maxBodyLength` (default: 10MB) – sets the maximum size of the request body; if exceeded, an error will be emitted. + +- `beforeRedirect` (default: `undefined`) – optionally change the request `options` on redirects, or abort the request by throwing an error. + +- `agents` (default: `undefined`) – sets the `agent` option per protocol, since HTTP and HTTPS use different agents. Example value: `{ http: new http.Agent(), https: new https.Agent() }` + +- `trackRedirects` (default: `false`) – whether to store the redirected response details into the `redirects` array on the response object. + + +### Advanced usage +By default, `follow-redirects` will use the Node.js default implementations +of [`http`](https://nodejs.org/api/http.html) +and [`https`](https://nodejs.org/api/https.html). +To enable features such as caching and/or intermediate request tracking, +you might instead want to wrap `follow-redirects` around custom protocol implementations: + +```javascript +const { http, https } = require('follow-redirects').wrap({ + http: require('your-custom-http'), + https: require('your-custom-https'), +}); +``` + +Such custom protocols only need an implementation of the `request` method. + +## Browser Usage + +Due to the way the browser works, +the `http` and `https` browser equivalents perform redirects by default. + +By requiring `follow-redirects` this way: +```javascript +const http = require('follow-redirects/http'); +const https = require('follow-redirects/https'); +``` +you can easily tell webpack and friends to replace +`follow-redirect` by the built-in versions: + +```json +{ + "follow-redirects/http" : "http", + "follow-redirects/https" : "https" +} +``` + +## Contributing + +Pull Requests are always welcome. Please [file an issue](https://github.com/follow-redirects/follow-redirects/issues) + detailing your proposal before you invest your valuable time. Additional features and bug fixes should be accompanied + by tests. You can run the test suite locally with a simple `npm test` command. + +## Debug Logging + +`follow-redirects` uses the excellent [debug](https://www.npmjs.com/package/debug) for logging. To turn on logging + set the environment variable `DEBUG=follow-redirects` for debug output from just this module. When running the test + suite it is sometimes advantageous to set `DEBUG=*` to see output from the express server as well. + +## Authors + +- [Ruben Verborgh](https://ruben.verborgh.org/) +- [Olivier Lalonde](mailto:olalonde@gmail.com) +- [James Talmage](mailto:james@talmage.io) + +## License + +[MIT License](https://github.com/follow-redirects/follow-redirects/blob/master/LICENSE) diff --git a/test/node_modules/follow-redirects/debug.js b/test/node_modules/follow-redirects/debug.js new file mode 100644 index 0000000..decb77d --- /dev/null +++ b/test/node_modules/follow-redirects/debug.js @@ -0,0 +1,15 @@ +var debug; + +module.exports = function () { + if (!debug) { + try { + /* eslint global-require: off */ + debug = require("debug")("follow-redirects"); + } + catch (error) { /* */ } + if (typeof debug !== "function") { + debug = function () { /* */ }; + } + } + debug.apply(null, arguments); +}; diff --git a/test/node_modules/follow-redirects/http.js b/test/node_modules/follow-redirects/http.js new file mode 100644 index 0000000..695e356 --- /dev/null +++ b/test/node_modules/follow-redirects/http.js @@ -0,0 +1 @@ +module.exports = require("./").http; diff --git a/test/node_modules/follow-redirects/https.js b/test/node_modules/follow-redirects/https.js new file mode 100644 index 0000000..d21c921 --- /dev/null +++ b/test/node_modules/follow-redirects/https.js @@ -0,0 +1 @@ +module.exports = require("./").https; diff --git a/test/node_modules/follow-redirects/index.js b/test/node_modules/follow-redirects/index.js new file mode 100644 index 0000000..3e199c1 --- /dev/null +++ b/test/node_modules/follow-redirects/index.js @@ -0,0 +1,621 @@ +var url = require("url"); +var URL = url.URL; +var http = require("http"); +var https = require("https"); +var Writable = require("stream").Writable; +var assert = require("assert"); +var debug = require("./debug"); + +// Create handlers that pass events from native requests +var events = ["abort", "aborted", "connect", "error", "socket", "timeout"]; +var eventHandlers = Object.create(null); +events.forEach(function (event) { + eventHandlers[event] = function (arg1, arg2, arg3) { + this._redirectable.emit(event, arg1, arg2, arg3); + }; +}); + +var InvalidUrlError = createErrorType( + "ERR_INVALID_URL", + "Invalid URL", + TypeError +); +// Error types with codes +var RedirectionError = createErrorType( + "ERR_FR_REDIRECTION_FAILURE", + "Redirected request failed" +); +var TooManyRedirectsError = createErrorType( + "ERR_FR_TOO_MANY_REDIRECTS", + "Maximum number of redirects exceeded" +); +var MaxBodyLengthExceededError = createErrorType( + "ERR_FR_MAX_BODY_LENGTH_EXCEEDED", + "Request body larger than maxBodyLength limit" +); +var WriteAfterEndError = createErrorType( + "ERR_STREAM_WRITE_AFTER_END", + "write after end" +); + +// An HTTP(S) request that can be redirected +function RedirectableRequest(options, responseCallback) { + // Initialize the request + Writable.call(this); + this._sanitizeOptions(options); + this._options = options; + this._ended = false; + this._ending = false; + this._redirectCount = 0; + this._redirects = []; + this._requestBodyLength = 0; + this._requestBodyBuffers = []; + + // Attach a callback if passed + if (responseCallback) { + this.on("response", responseCallback); + } + + // React to responses of native requests + var self = this; + this._onNativeResponse = function (response) { + self._processResponse(response); + }; + + // Perform the first request + this._performRequest(); +} +RedirectableRequest.prototype = Object.create(Writable.prototype); + +RedirectableRequest.prototype.abort = function () { + abortRequest(this._currentRequest); + this.emit("abort"); +}; + +// Writes buffered data to the current native request +RedirectableRequest.prototype.write = function (data, encoding, callback) { + // Writing is not allowed if end has been called + if (this._ending) { + throw new WriteAfterEndError(); + } + + // Validate input and shift parameters if necessary + if (!isString(data) && !isBuffer(data)) { + throw new TypeError("data should be a string, Buffer or Uint8Array"); + } + if (isFunction(encoding)) { + callback = encoding; + encoding = null; + } + + // Ignore empty buffers, since writing them doesn't invoke the callback + // https://github.com/nodejs/node/issues/22066 + if (data.length === 0) { + if (callback) { + callback(); + } + return; + } + // Only write when we don't exceed the maximum body length + if (this._requestBodyLength + data.length <= this._options.maxBodyLength) { + this._requestBodyLength += data.length; + this._requestBodyBuffers.push({ data: data, encoding: encoding }); + this._currentRequest.write(data, encoding, callback); + } + // Error when we exceed the maximum body length + else { + this.emit("error", new MaxBodyLengthExceededError()); + this.abort(); + } +}; + +// Ends the current native request +RedirectableRequest.prototype.end = function (data, encoding, callback) { + // Shift parameters if necessary + if (isFunction(data)) { + callback = data; + data = encoding = null; + } + else if (isFunction(encoding)) { + callback = encoding; + encoding = null; + } + + // Write data if needed and end + if (!data) { + this._ended = this._ending = true; + this._currentRequest.end(null, null, callback); + } + else { + var self = this; + var currentRequest = this._currentRequest; + this.write(data, encoding, function () { + self._ended = true; + currentRequest.end(null, null, callback); + }); + this._ending = true; + } +}; + +// Sets a header value on the current native request +RedirectableRequest.prototype.setHeader = function (name, value) { + this._options.headers[name] = value; + this._currentRequest.setHeader(name, value); +}; + +// Clears a header value on the current native request +RedirectableRequest.prototype.removeHeader = function (name) { + delete this._options.headers[name]; + this._currentRequest.removeHeader(name); +}; + +// Global timeout for all underlying requests +RedirectableRequest.prototype.setTimeout = function (msecs, callback) { + var self = this; + + // Destroys the socket on timeout + function destroyOnTimeout(socket) { + socket.setTimeout(msecs); + socket.removeListener("timeout", socket.destroy); + socket.addListener("timeout", socket.destroy); + } + + // Sets up a timer to trigger a timeout event + function startTimer(socket) { + if (self._timeout) { + clearTimeout(self._timeout); + } + self._timeout = setTimeout(function () { + self.emit("timeout"); + clearTimer(); + }, msecs); + destroyOnTimeout(socket); + } + + // Stops a timeout from triggering + function clearTimer() { + // Clear the timeout + if (self._timeout) { + clearTimeout(self._timeout); + self._timeout = null; + } + + // Clean up all attached listeners + self.removeListener("abort", clearTimer); + self.removeListener("error", clearTimer); + self.removeListener("response", clearTimer); + if (callback) { + self.removeListener("timeout", callback); + } + if (!self.socket) { + self._currentRequest.removeListener("socket", startTimer); + } + } + + // Attach callback if passed + if (callback) { + this.on("timeout", callback); + } + + // Start the timer if or when the socket is opened + if (this.socket) { + startTimer(this.socket); + } + else { + this._currentRequest.once("socket", startTimer); + } + + // Clean up on events + this.on("socket", destroyOnTimeout); + this.on("abort", clearTimer); + this.on("error", clearTimer); + this.on("response", clearTimer); + + return this; +}; + +// Proxy all other public ClientRequest methods +[ + "flushHeaders", "getHeader", + "setNoDelay", "setSocketKeepAlive", +].forEach(function (method) { + RedirectableRequest.prototype[method] = function (a, b) { + return this._currentRequest[method](a, b); + }; +}); + +// Proxy all public ClientRequest properties +["aborted", "connection", "socket"].forEach(function (property) { + Object.defineProperty(RedirectableRequest.prototype, property, { + get: function () { return this._currentRequest[property]; }, + }); +}); + +RedirectableRequest.prototype._sanitizeOptions = function (options) { + // Ensure headers are always present + if (!options.headers) { + options.headers = {}; + } + + // Since http.request treats host as an alias of hostname, + // but the url module interprets host as hostname plus port, + // eliminate the host property to avoid confusion. + if (options.host) { + // Use hostname if set, because it has precedence + if (!options.hostname) { + options.hostname = options.host; + } + delete options.host; + } + + // Complete the URL object when necessary + if (!options.pathname && options.path) { + var searchPos = options.path.indexOf("?"); + if (searchPos < 0) { + options.pathname = options.path; + } + else { + options.pathname = options.path.substring(0, searchPos); + options.search = options.path.substring(searchPos); + } + } +}; + + +// Executes the next native request (initial or redirect) +RedirectableRequest.prototype._performRequest = function () { + // Load the native protocol + var protocol = this._options.protocol; + var nativeProtocol = this._options.nativeProtocols[protocol]; + if (!nativeProtocol) { + this.emit("error", new TypeError("Unsupported protocol " + protocol)); + return; + } + + // If specified, use the agent corresponding to the protocol + // (HTTP and HTTPS use different types of agents) + if (this._options.agents) { + var scheme = protocol.slice(0, -1); + this._options.agent = this._options.agents[scheme]; + } + + // Create the native request and set up its event handlers + var request = this._currentRequest = + nativeProtocol.request(this._options, this._onNativeResponse); + request._redirectable = this; + for (var event of events) { + request.on(event, eventHandlers[event]); + } + + // RFC7230§5.3.1: When making a request directly to an origin server, […] + // a client MUST send only the absolute path […] as the request-target. + this._currentUrl = /^\//.test(this._options.path) ? + url.format(this._options) : + // When making a request to a proxy, […] + // a client MUST send the target URI in absolute-form […]. + this._options.path; + + // End a redirected request + // (The first request must be ended explicitly with RedirectableRequest#end) + if (this._isRedirect) { + // Write the request entity and end + var i = 0; + var self = this; + var buffers = this._requestBodyBuffers; + (function writeNext(error) { + // Only write if this request has not been redirected yet + /* istanbul ignore else */ + if (request === self._currentRequest) { + // Report any write errors + /* istanbul ignore if */ + if (error) { + self.emit("error", error); + } + // Write the next buffer if there are still left + else if (i < buffers.length) { + var buffer = buffers[i++]; + /* istanbul ignore else */ + if (!request.finished) { + request.write(buffer.data, buffer.encoding, writeNext); + } + } + // End the request if `end` has been called on us + else if (self._ended) { + request.end(); + } + } + }()); + } +}; + +// Processes a response from the current native request +RedirectableRequest.prototype._processResponse = function (response) { + // Store the redirected response + var statusCode = response.statusCode; + if (this._options.trackRedirects) { + this._redirects.push({ + url: this._currentUrl, + headers: response.headers, + statusCode: statusCode, + }); + } + + // RFC7231§6.4: The 3xx (Redirection) class of status code indicates + // that further action needs to be taken by the user agent in order to + // fulfill the request. If a Location header field is provided, + // the user agent MAY automatically redirect its request to the URI + // referenced by the Location field value, + // even if the specific status code is not understood. + + // If the response is not a redirect; return it as-is + var location = response.headers.location; + if (!location || this._options.followRedirects === false || + statusCode < 300 || statusCode >= 400) { + response.responseUrl = this._currentUrl; + response.redirects = this._redirects; + this.emit("response", response); + + // Clean up + this._requestBodyBuffers = []; + return; + } + + // The response is a redirect, so abort the current request + abortRequest(this._currentRequest); + // Discard the remainder of the response to avoid waiting for data + response.destroy(); + + // RFC7231§6.4: A client SHOULD detect and intervene + // in cyclical redirections (i.e., "infinite" redirection loops). + if (++this._redirectCount > this._options.maxRedirects) { + this.emit("error", new TooManyRedirectsError()); + return; + } + + // Store the request headers if applicable + var requestHeaders; + var beforeRedirect = this._options.beforeRedirect; + if (beforeRedirect) { + requestHeaders = Object.assign({ + // The Host header was set by nativeProtocol.request + Host: response.req.getHeader("host"), + }, this._options.headers); + } + + // RFC7231§6.4: Automatic redirection needs to done with + // care for methods not known to be safe, […] + // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change + // the request method from POST to GET for the subsequent request. + var method = this._options.method; + if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || + // RFC7231§6.4.4: The 303 (See Other) status code indicates that + // the server is redirecting the user agent to a different resource […] + // A user agent can perform a retrieval request targeting that URI + // (a GET or HEAD request if using HTTP) […] + (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) { + this._options.method = "GET"; + // Drop a possible entity and headers related to it + this._requestBodyBuffers = []; + removeMatchingHeaders(/^content-/i, this._options.headers); + } + + // Drop the Host header, as the redirect might lead to a different host + var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); + + // If the redirect is relative, carry over the host of the last request + var currentUrlParts = url.parse(this._currentUrl); + var currentHost = currentHostHeader || currentUrlParts.host; + var currentUrl = /^\w+:/.test(location) ? this._currentUrl : + url.format(Object.assign(currentUrlParts, { host: currentHost })); + + // Determine the URL of the redirection + var redirectUrl; + try { + redirectUrl = url.resolve(currentUrl, location); + } + catch (cause) { + this.emit("error", new RedirectionError({ cause: cause })); + return; + } + + // Create the redirected request + debug("redirecting to", redirectUrl); + this._isRedirect = true; + var redirectUrlParts = url.parse(redirectUrl); + Object.assign(this._options, redirectUrlParts); + + // Drop confidential headers when redirecting to a less secure protocol + // or to a different domain that is not a superdomain + if (redirectUrlParts.protocol !== currentUrlParts.protocol && + redirectUrlParts.protocol !== "https:" || + redirectUrlParts.host !== currentHost && + !isSubdomain(redirectUrlParts.host, currentHost)) { + removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers); + } + + // Evaluate the beforeRedirect callback + if (isFunction(beforeRedirect)) { + var responseDetails = { + headers: response.headers, + statusCode: statusCode, + }; + var requestDetails = { + url: currentUrl, + method: method, + headers: requestHeaders, + }; + try { + beforeRedirect(this._options, responseDetails, requestDetails); + } + catch (err) { + this.emit("error", err); + return; + } + this._sanitizeOptions(this._options); + } + + // Perform the redirected request + try { + this._performRequest(); + } + catch (cause) { + this.emit("error", new RedirectionError({ cause: cause })); + } +}; + +// Wraps the key/value object of protocols with redirect functionality +function wrap(protocols) { + // Default settings + var exports = { + maxRedirects: 21, + maxBodyLength: 10 * 1024 * 1024, + }; + + // Wrap each protocol + var nativeProtocols = {}; + Object.keys(protocols).forEach(function (scheme) { + var protocol = scheme + ":"; + var nativeProtocol = nativeProtocols[protocol] = protocols[scheme]; + var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol); + + // Executes a request, following redirects + function request(input, options, callback) { + // Parse parameters + if (isString(input)) { + var parsed; + try { + parsed = urlToOptions(new URL(input)); + } + catch (err) { + /* istanbul ignore next */ + parsed = url.parse(input); + } + if (!isString(parsed.protocol)) { + throw new InvalidUrlError({ input }); + } + input = parsed; + } + else if (URL && (input instanceof URL)) { + input = urlToOptions(input); + } + else { + callback = options; + options = input; + input = { protocol: protocol }; + } + if (isFunction(options)) { + callback = options; + options = null; + } + + // Set defaults + options = Object.assign({ + maxRedirects: exports.maxRedirects, + maxBodyLength: exports.maxBodyLength, + }, input, options); + options.nativeProtocols = nativeProtocols; + if (!isString(options.host) && !isString(options.hostname)) { + options.hostname = "::1"; + } + + assert.equal(options.protocol, protocol, "protocol mismatch"); + debug("options", options); + return new RedirectableRequest(options, callback); + } + + // Executes a GET request, following redirects + function get(input, options, callback) { + var wrappedRequest = wrappedProtocol.request(input, options, callback); + wrappedRequest.end(); + return wrappedRequest; + } + + // Expose the properties on the wrapped protocol + Object.defineProperties(wrappedProtocol, { + request: { value: request, configurable: true, enumerable: true, writable: true }, + get: { value: get, configurable: true, enumerable: true, writable: true }, + }); + }); + return exports; +} + +/* istanbul ignore next */ +function noop() { /* empty */ } + +// from https://github.com/nodejs/node/blob/master/lib/internal/url.js +function urlToOptions(urlObject) { + var options = { + protocol: urlObject.protocol, + hostname: urlObject.hostname.startsWith("[") ? + /* istanbul ignore next */ + urlObject.hostname.slice(1, -1) : + urlObject.hostname, + hash: urlObject.hash, + search: urlObject.search, + pathname: urlObject.pathname, + path: urlObject.pathname + urlObject.search, + href: urlObject.href, + }; + if (urlObject.port !== "") { + options.port = Number(urlObject.port); + } + return options; +} + +function removeMatchingHeaders(regex, headers) { + var lastValue; + for (var header in headers) { + if (regex.test(header)) { + lastValue = headers[header]; + delete headers[header]; + } + } + return (lastValue === null || typeof lastValue === "undefined") ? + undefined : String(lastValue).trim(); +} + +function createErrorType(code, message, baseClass) { + // Create constructor + function CustomError(properties) { + Error.captureStackTrace(this, this.constructor); + Object.assign(this, properties || {}); + this.code = code; + this.message = this.cause ? message + ": " + this.cause.message : message; + } + + // Attach constructor and set default properties + CustomError.prototype = new (baseClass || Error)(); + CustomError.prototype.constructor = CustomError; + CustomError.prototype.name = "Error [" + code + "]"; + return CustomError; +} + +function abortRequest(request) { + for (var event of events) { + request.removeListener(event, eventHandlers[event]); + } + request.on("error", noop); + request.abort(); +} + +function isSubdomain(subdomain, domain) { + assert(isString(subdomain) && isString(domain)); + var dot = subdomain.length - domain.length - 1; + return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain); +} + +function isString(value) { + return typeof value === "string" || value instanceof String; +} + +function isFunction(value) { + return typeof value === "function"; +} + +function isBuffer(value) { + return typeof value === "object" && ("length" in value); +} + +// Exports +module.exports = wrap({ http: http, https: https }); +module.exports.wrap = wrap; diff --git a/test/node_modules/follow-redirects/package.json b/test/node_modules/follow-redirects/package.json new file mode 100644 index 0000000..97717c5 --- /dev/null +++ b/test/node_modules/follow-redirects/package.json @@ -0,0 +1,59 @@ +{ + "name": "follow-redirects", + "version": "1.15.2", + "description": "HTTP and HTTPS modules that follow redirects.", + "license": "MIT", + "main": "index.js", + "files": [ + "*.js" + ], + "engines": { + "node": ">=4.0" + }, + "scripts": { + "test": "npm run lint && npm run mocha", + "lint": "eslint *.js test", + "mocha": "nyc mocha" + }, + "repository": { + "type": "git", + "url": "git@github.com:follow-redirects/follow-redirects.git" + }, + "homepage": "https://github.com/follow-redirects/follow-redirects", + "bugs": { + "url": "https://github.com/follow-redirects/follow-redirects/issues" + }, + "keywords": [ + "http", + "https", + "url", + "redirect", + "client", + "location", + "utility" + ], + "author": "Ruben Verborgh (https://ruben.verborgh.org/)", + "contributors": [ + "Olivier Lalonde (http://www.syskall.com)", + "James Talmage " + ], + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "peerDependenciesMeta": { + "debug": { + "optional": true + } + }, + "devDependencies": { + "concat-stream": "^2.0.0", + "eslint": "^5.16.0", + "express": "^4.16.4", + "lolex": "^3.1.0", + "mocha": "^6.0.2", + "nyc": "^14.1.1" + } +} diff --git a/test/node_modules/hash.js/.eslintrc.js b/test/node_modules/hash.js/.eslintrc.js new file mode 100644 index 0000000..614f8fc --- /dev/null +++ b/test/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/test/node_modules/hash.js/.travis.yml b/test/node_modules/hash.js/.travis.yml new file mode 100644 index 0000000..5406edc --- /dev/null +++ b/test/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/test/node_modules/hash.js/README.md b/test/node_modules/hash.js/README.md new file mode 100644 index 0000000..006d3bb --- /dev/null +++ b/test/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/test/node_modules/hash.js/lib/hash.d.ts b/test/node_modules/hash.js/lib/hash.d.ts new file mode 100644 index 0000000..abbb5c5 --- /dev/null +++ b/test/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/test/node_modules/hash.js/lib/hash.js b/test/node_modules/hash.js/lib/hash.js new file mode 100644 index 0000000..f59b673 --- /dev/null +++ b/test/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/test/node_modules/hash.js/lib/hash/common.js b/test/node_modules/hash.js/lib/hash/common.js new file mode 100644 index 0000000..c49f476 --- /dev/null +++ b/test/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/test/node_modules/hash.js/lib/hash/hmac.js b/test/node_modules/hash.js/lib/hash/hmac.js new file mode 100644 index 0000000..faff12d --- /dev/null +++ b/test/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/test/node_modules/hash.js/lib/hash/ripemd.js b/test/node_modules/hash.js/lib/hash/ripemd.js new file mode 100644 index 0000000..2dcdff2 --- /dev/null +++ b/test/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/test/node_modules/hash.js/lib/hash/sha.js b/test/node_modules/hash.js/lib/hash/sha.js new file mode 100644 index 0000000..f34a38d --- /dev/null +++ b/test/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/test/node_modules/hash.js/lib/hash/sha/1.js b/test/node_modules/hash.js/lib/hash/sha/1.js new file mode 100644 index 0000000..fcdfa29 --- /dev/null +++ b/test/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/test/node_modules/hash.js/lib/hash/sha/224.js b/test/node_modules/hash.js/lib/hash/sha/224.js new file mode 100644 index 0000000..c69882d --- /dev/null +++ b/test/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/test/node_modules/hash.js/lib/hash/sha/256.js b/test/node_modules/hash.js/lib/hash/sha/256.js new file mode 100644 index 0000000..6dbd6a0 --- /dev/null +++ b/test/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/test/node_modules/hash.js/lib/hash/sha/384.js b/test/node_modules/hash.js/lib/hash/sha/384.js new file mode 100644 index 0000000..01df256 --- /dev/null +++ b/test/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/test/node_modules/hash.js/lib/hash/sha/512.js b/test/node_modules/hash.js/lib/hash/sha/512.js new file mode 100644 index 0000000..c371a25 --- /dev/null +++ b/test/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/test/node_modules/hash.js/lib/hash/sha/common.js b/test/node_modules/hash.js/lib/hash/sha/common.js new file mode 100644 index 0000000..d41b464 --- /dev/null +++ b/test/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/test/node_modules/hash.js/lib/hash/utils.js b/test/node_modules/hash.js/lib/hash/utils.js new file mode 100644 index 0000000..7487f8e --- /dev/null +++ b/test/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/test/node_modules/hash.js/package.json b/test/node_modules/hash.js/package.json new file mode 100644 index 0000000..c1a338a --- /dev/null +++ b/test/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/test/node_modules/hash.js/test/hash-test.js b/test/node_modules/hash.js/test/hash-test.js new file mode 100644 index 0000000..f6ca564 --- /dev/null +++ b/test/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/test/node_modules/hash.js/test/hmac-test.js b/test/node_modules/hash.js/test/hmac-test.js new file mode 100644 index 0000000..6fe18e3 --- /dev/null +++ b/test/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/test/node_modules/hmac-drbg/package.json b/test/node_modules/hmac-drbg/package.json new file mode 100644 index 0000000..b95d391 --- /dev/null +++ b/test/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/test/node_modules/hmac-drbg/test/drbg-test.js b/test/node_modules/hmac-drbg/test/drbg-test.js new file mode 100644 index 0000000..14fd28a --- /dev/null +++ b/test/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/test/node_modules/hmac-drbg/test/fixtures/hmac-drbg-nist.json b/test/node_modules/hmac-drbg/test/fixtures/hmac-drbg-nist.json new file mode 100644 index 0000000..fce148a --- /dev/null +++ b/test/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/test/node_modules/inherits/LICENSE b/test/node_modules/inherits/LICENSE new file mode 100644 index 0000000..dea3013 --- /dev/null +++ b/test/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/test/node_modules/inherits/README.md b/test/node_modules/inherits/README.md new file mode 100644 index 0000000..b1c5665 --- /dev/null +++ b/test/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/test/node_modules/inherits/inherits.js b/test/node_modules/inherits/inherits.js new file mode 100644 index 0000000..f71f2d9 --- /dev/null +++ b/test/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/test/node_modules/inherits/inherits_browser.js b/test/node_modules/inherits/inherits_browser.js new file mode 100644 index 0000000..86bbb3d --- /dev/null +++ b/test/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/test/node_modules/inherits/package.json b/test/node_modules/inherits/package.json new file mode 100644 index 0000000..37b4366 --- /dev/null +++ b/test/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/test/node_modules/is-typedarray/LICENSE.md b/test/node_modules/is-typedarray/LICENSE.md new file mode 100644 index 0000000..ee27ba4 --- /dev/null +++ b/test/node_modules/is-typedarray/LICENSE.md @@ -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/test/node_modules/is-typedarray/README.md b/test/node_modules/is-typedarray/README.md new file mode 100644 index 0000000..2752863 --- /dev/null +++ b/test/node_modules/is-typedarray/README.md @@ -0,0 +1,16 @@ +# is-typedarray [![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges) + +Detect whether or not an object is a +[Typed Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays). + +## Usage + +[![NPM](https://nodei.co/npm/is-typedarray.png)](https://nodei.co/npm/is-typedarray/) + +### isTypedArray(array) + +Returns `true` when array is a Typed Array, and `false` when it is not. + +## License + +MIT. See [LICENSE.md](http://github.com/hughsk/is-typedarray/blob/master/LICENSE.md) for details. diff --git a/test/node_modules/is-typedarray/index.js b/test/node_modules/is-typedarray/index.js new file mode 100644 index 0000000..5859603 --- /dev/null +++ b/test/node_modules/is-typedarray/index.js @@ -0,0 +1,41 @@ +module.exports = isTypedArray +isTypedArray.strict = isStrictTypedArray +isTypedArray.loose = isLooseTypedArray + +var toString = Object.prototype.toString +var names = { + '[object Int8Array]': true + , '[object Int16Array]': true + , '[object Int32Array]': true + , '[object Uint8Array]': true + , '[object Uint8ClampedArray]': true + , '[object Uint16Array]': true + , '[object Uint32Array]': true + , '[object Float32Array]': true + , '[object Float64Array]': true +} + +function isTypedArray(arr) { + return ( + isStrictTypedArray(arr) + || isLooseTypedArray(arr) + ) +} + +function isStrictTypedArray(arr) { + return ( + arr instanceof Int8Array + || arr instanceof Int16Array + || arr instanceof Int32Array + || arr instanceof Uint8Array + || arr instanceof Uint8ClampedArray + || arr instanceof Uint16Array + || arr instanceof Uint32Array + || arr instanceof Float32Array + || arr instanceof Float64Array + ) +} + +function isLooseTypedArray(arr) { + return names[toString.call(arr)] +} diff --git a/test/node_modules/is-typedarray/package.json b/test/node_modules/is-typedarray/package.json new file mode 100644 index 0000000..37f7ae3 --- /dev/null +++ b/test/node_modules/is-typedarray/package.json @@ -0,0 +1,30 @@ +{ + "name": "is-typedarray", + "version": "1.0.0", + "description": "Detect whether or not an object is a Typed Array", + "main": "index.js", + "scripts": { + "test": "node test" + }, + "author": "Hugh Kennedy (http://hughsk.io/)", + "license": "MIT", + "dependencies": {}, + "devDependencies": { + "tape": "^2.13.1" + }, + "repository": { + "type": "git", + "url": "git://github.com/hughsk/is-typedarray.git" + }, + "keywords": [ + "typed", + "array", + "detect", + "is", + "util" + ], + "bugs": { + "url": "https://github.com/hughsk/is-typedarray/issues" + }, + "homepage": "https://github.com/hughsk/is-typedarray" +} diff --git a/test/node_modules/is-typedarray/test.js b/test/node_modules/is-typedarray/test.js new file mode 100644 index 0000000..b0c176f --- /dev/null +++ b/test/node_modules/is-typedarray/test.js @@ -0,0 +1,34 @@ +var test = require('tape') +var ista = require('./') + +test('strict', function(t) { + t.ok(ista.strict(new Int8Array), 'Int8Array') + t.ok(ista.strict(new Int16Array), 'Int16Array') + t.ok(ista.strict(new Int32Array), 'Int32Array') + t.ok(ista.strict(new Uint8Array), 'Uint8Array') + t.ok(ista.strict(new Uint16Array), 'Uint16Array') + t.ok(ista.strict(new Uint32Array), 'Uint32Array') + t.ok(ista.strict(new Float32Array), 'Float32Array') + t.ok(ista.strict(new Float64Array), 'Float64Array') + + t.ok(!ista.strict(new Array), 'Array') + t.ok(!ista.strict([]), '[]') + + t.end() +}) + +test('loose', function(t) { + t.ok(ista.loose(new Int8Array), 'Int8Array') + t.ok(ista.loose(new Int16Array), 'Int16Array') + t.ok(ista.loose(new Int32Array), 'Int32Array') + t.ok(ista.loose(new Uint8Array), 'Uint8Array') + t.ok(ista.loose(new Uint16Array), 'Uint16Array') + t.ok(ista.loose(new Uint32Array), 'Uint32Array') + t.ok(ista.loose(new Float32Array), 'Float32Array') + t.ok(ista.loose(new Float64Array), 'Float64Array') + + t.ok(!ista.loose(new Array), 'Array') + t.ok(!ista.loose([]), '[]') + + t.end() +}) diff --git a/test/node_modules/js-sha3/CHANGELOG.md b/test/node_modules/js-sha3/CHANGELOG.md new file mode 100644 index 0000000..0812bdd --- /dev/null +++ b/test/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/test/node_modules/js-sha3/LICENSE.txt b/test/node_modules/js-sha3/LICENSE.txt new file mode 100644 index 0000000..968ee90 --- /dev/null +++ b/test/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/test/node_modules/js-sha3/README.md b/test/node_modules/js-sha3/README.md new file mode 100644 index 0000000..a675ae7 --- /dev/null +++ b/test/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/test/node_modules/js-sha3/build/sha3.min.js b/test/node_modules/js-sha3/build/sha3.min.js new file mode 100644 index 0000000..965b779 --- /dev/null +++ b/test/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/test/node_modules/js-sha3/src/sha3.js b/test/node_modules/js-sha3/src/sha3.js new file mode 100644 index 0000000..f9a8d9c --- /dev/null +++ b/test/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/test/node_modules/minimalistic-assert/LICENSE b/test/node_modules/minimalistic-assert/LICENSE new file mode 100644 index 0000000..adca66b --- /dev/null +++ b/test/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/test/node_modules/minimalistic-assert/index.js b/test/node_modules/minimalistic-assert/index.js new file mode 100644 index 0000000..70b4ea5 --- /dev/null +++ b/test/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/test/node_modules/minimalistic-assert/package.json b/test/node_modules/minimalistic-assert/package.json new file mode 100644 index 0000000..f8de10d --- /dev/null +++ b/test/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/test/node_modules/minimalistic-assert/readme.md b/test/node_modules/minimalistic-assert/readme.md new file mode 100644 index 0000000..2ca0d25 --- /dev/null +++ b/test/node_modules/minimalistic-assert/readme.md @@ -0,0 +1,4 @@ +minimalistic-assert +=== + +very minimalistic assert module. diff --git a/test/node_modules/minimalistic-crypto-utils/.npmignore b/test/node_modules/minimalistic-crypto-utils/.npmignore new file mode 100644 index 0000000..1ca9571 --- /dev/null +++ b/test/node_modules/minimalistic-crypto-utils/.npmignore @@ -0,0 +1,2 @@ +node_modules/ +npm-debug.log diff --git a/test/node_modules/minimalistic-crypto-utils/.travis.yml b/test/node_modules/minimalistic-crypto-utils/.travis.yml new file mode 100644 index 0000000..ce24b7a --- /dev/null +++ b/test/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/test/node_modules/minimalistic-crypto-utils/README.md b/test/node_modules/minimalistic-crypto-utils/README.md new file mode 100644 index 0000000..9e58eba --- /dev/null +++ b/test/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/test/node_modules/minimalistic-crypto-utils/lib/utils.js b/test/node_modules/minimalistic-crypto-utils/lib/utils.js new file mode 100644 index 0000000..cd48daf --- /dev/null +++ b/test/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/test/node_modules/minimalistic-crypto-utils/package.json b/test/node_modules/minimalistic-crypto-utils/package.json new file mode 100644 index 0000000..bc4c79a --- /dev/null +++ b/test/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/test/node_modules/minimalistic-crypto-utils/test/utils-test.js b/test/node_modules/minimalistic-crypto-utils/test/utils-test.js new file mode 100644 index 0000000..3da812d --- /dev/null +++ b/test/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/test/node_modules/ms/index.js b/test/node_modules/ms/index.js new file mode 100644 index 0000000..6a522b1 --- /dev/null +++ b/test/node_modules/ms/index.js @@ -0,0 +1,152 @@ +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +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' && isNaN(val) === false) { + 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|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 '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) { + if (ms >= d) { + return Math.round(ms / d) + 'd'; + } + if (ms >= h) { + return Math.round(ms / h) + 'h'; + } + if (ms >= m) { + return Math.round(ms / m) + 'm'; + } + if (ms >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtLong(ms) { + return plural(ms, d, 'day') || + plural(ms, h, 'hour') || + plural(ms, m, 'minute') || + plural(ms, s, 'second') || + ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, n, name) { + if (ms < n) { + return; + } + if (ms < n * 1.5) { + return Math.floor(ms / n) + ' ' + name; + } + return Math.ceil(ms / n) + ' ' + name + 's'; +} diff --git a/test/node_modules/ms/license.md b/test/node_modules/ms/license.md new file mode 100644 index 0000000..69b6125 --- /dev/null +++ b/test/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/test/node_modules/ms/package.json b/test/node_modules/ms/package.json new file mode 100644 index 0000000..6a31c81 --- /dev/null +++ b/test/node_modules/ms/package.json @@ -0,0 +1,37 @@ +{ + "name": "ms", + "version": "2.0.0", + "description": "Tiny milisecond 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": "3.19.0", + "expect.js": "0.3.1", + "husky": "0.13.3", + "lint-staged": "3.4.1", + "mocha": "3.4.1" + } +} diff --git a/test/node_modules/ms/readme.md b/test/node_modules/ms/readme.md new file mode 100644 index 0000000..84a9974 --- /dev/null +++ b/test/node_modules/ms/readme.md @@ -0,0 +1,51 @@ +# ms + +[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) +[![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) + +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 +``` + +### Convert from milliseconds + +```js +ms(60000) // "1m" +ms(2 * 60000) // "2m" +ms(ms('10 hours')) // "10h" +``` + +### Time format written-out + +```js +ms(60000, { long: true }) // "1 minute" +ms(2 * 60000, { long: true }) // "2 minutes" +ms(ms('10 hours'), { long: true }) // "10 hours" +``` + +## Features + +- Works both in [node](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 ms is returned. + +## 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 will now use your clone of ms! + +As always, you can run the tests using: `npm test` diff --git a/test/node_modules/next-tick/.editorconfig b/test/node_modules/next-tick/.editorconfig new file mode 100644 index 0000000..bd6d81e --- /dev/null +++ b/test/node_modules/next-tick/.editorconfig @@ -0,0 +1,16 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = tab +trim_trailing_whitespace = true + +[*.md] +indent_size = 2 +indent_style = space +trim_trailing_whitespace = false diff --git a/test/node_modules/next-tick/.github/FUNDING.yml b/test/node_modules/next-tick/.github/FUNDING.yml new file mode 100644 index 0000000..270b1dd --- /dev/null +++ b/test/node_modules/next-tick/.github/FUNDING.yml @@ -0,0 +1 @@ +tidelift: "npm/next-tick" diff --git a/test/node_modules/next-tick/.lint b/test/node_modules/next-tick/.lint new file mode 100644 index 0000000..ac7ad3a --- /dev/null +++ b/test/node_modules/next-tick/.lint @@ -0,0 +1,16 @@ +@root + +module +es5 + +indent 2 +maxlen 100 +tabs + +ass +bitwise +nomen +plusplus +vars + +predef+ queueMicrotask, process, setImmediate, setTimeout, clearTimeout, document, MutationObserver, WebKitMutationObserver diff --git a/test/node_modules/next-tick/CHANGELOG.md b/test/node_modules/next-tick/CHANGELOG.md new file mode 100644 index 0000000..f990e1c --- /dev/null +++ b/test/node_modules/next-tick/CHANGELOG.md @@ -0,0 +1,13 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [1.1.0](https://github.com/medikoo/next-tick/compare/v1.0.0...v1.1.0) (2020-02-11) + +### Features + +* Add support for queueMicrotask (Closes [#13](https://github.com/medikoo/next-tick/issues/13)) ([471986e](https://github.com/medikoo/next-tick/commit/471986ee5f7179a498850cc03138a5ed5b9a248c)) + +## Changelog for previous versions + +See `CHANGES` file diff --git a/test/node_modules/next-tick/CHANGES b/test/node_modules/next-tick/CHANGES new file mode 100644 index 0000000..931a8a4 --- /dev/null +++ b/test/node_modules/next-tick/CHANGES @@ -0,0 +1,28 @@ +For recent changelog see CHANGELOG.md + +----- + +v1.0.0 -- 2016.06.09 +* In case MutationObserver based solution ensure all callbacks are propagated + even if any on the way crashes (fixes #3) +* Support older engines (as IE8) which see typeof setTimeout as 'object' +* Fix spelling of LICENSE +* Configure lint scripts + +v0.2.2 -- 2014.04.18 +- Do not rely on es5-ext's valid-callable. Replace it with simple internal function +- In MutationObserver fallback rely on text node instead of attribute and assure + mutation event is invoked by real change of data + +v0.2.1 -- 2014.02.24 +- Fix case in import path + +v0.2.0 -- 2014.02.24 +- Assure microtask resultion if MutationObserver is available (thanks @Raynos) #1 +- Unify validation of callback. TypeError is throw for any non callable input +- Move main module from `lib` to root directory +- Improve documentation +- Remove Makefile (it's environment agnostic pacakge) + +v0.1.0 -- 2012.08.29 +Initial diff --git a/test/node_modules/next-tick/LICENSE b/test/node_modules/next-tick/LICENSE new file mode 100644 index 0000000..cfd3994 --- /dev/null +++ b/test/node_modules/next-tick/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2012-2020, Mariusz Nowak, @medikoo, medikoo.com + +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/test/node_modules/next-tick/README.md b/test/node_modules/next-tick/README.md new file mode 100644 index 0000000..7878e90 --- /dev/null +++ b/test/node_modules/next-tick/README.md @@ -0,0 +1,41 @@ +# next-tick +## Environment agnostic nextTick polyfill + +To be used in environment agnostic modules that need nextTick functionality. + +- When run in Node.js `process.nextTick` is used +- In modern engines, microtask resolution is guaranteed by `queueMicrotask` +- In older browsers, `MutationObserver` is used as a fallback +- In other engines `setImmediate` or `setTimeout(fn, 0)` is used as fallback. +- If none of the above is supported module resolves to `null` + +## Installation +### NPM + +In your project path: + + $ npm install next-tick + +#### Browser + +To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/) + +## Tests [![Build Status](https://api.travis-ci.org/medikoo/next-tick.png?branch=master)](https://travis-ci.org/medikoo/next-tick) + + $ npm test + +## Security contact information + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. + +--- + +
+ + Get professional support for d with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/test/node_modules/next-tick/index.js b/test/node_modules/next-tick/index.js new file mode 100644 index 0000000..4e3b280 --- /dev/null +++ b/test/node_modules/next-tick/index.js @@ -0,0 +1,74 @@ +'use strict'; + +var ensureCallable = function (fn) { + if (typeof fn !== 'function') throw new TypeError(fn + " is not a function"); + return fn; +}; + +var byObserver = function (Observer) { + var node = document.createTextNode(''), queue, currentQueue, i = 0; + new Observer(function () { + var callback; + if (!queue) { + if (!currentQueue) return; + queue = currentQueue; + } else if (currentQueue) { + queue = currentQueue.concat(queue); + } + currentQueue = queue; + queue = null; + if (typeof currentQueue === 'function') { + callback = currentQueue; + currentQueue = null; + callback(); + return; + } + node.data = (i = ++i % 2); // Invoke other batch, to handle leftover callbacks in case of crash + while (currentQueue) { + callback = currentQueue.shift(); + if (!currentQueue.length) currentQueue = null; + callback(); + } + }).observe(node, { characterData: true }); + return function (fn) { + ensureCallable(fn); + if (queue) { + if (typeof queue === 'function') queue = [queue, fn]; + else queue.push(fn); + return; + } + queue = fn; + node.data = (i = ++i % 2); + }; +}; + +module.exports = (function () { + // Node.js + if ((typeof process === 'object') && process && (typeof process.nextTick === 'function')) { + return process.nextTick; + } + + // queueMicrotask + if (typeof queueMicrotask === "function") { + return function (cb) { queueMicrotask(ensureCallable(cb)); }; + } + + // MutationObserver + if ((typeof document === 'object') && document) { + if (typeof MutationObserver === 'function') return byObserver(MutationObserver); + if (typeof WebKitMutationObserver === 'function') return byObserver(WebKitMutationObserver); + } + + // W3C Draft + // http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/setImmediate/Overview.html + if (typeof setImmediate === 'function') { + return function (cb) { setImmediate(ensureCallable(cb)); }; + } + + // Wide available standard + if ((typeof setTimeout === 'function') || (typeof setTimeout === 'object')) { + return function (cb) { setTimeout(ensureCallable(cb), 0); }; + } + + return null; +}()); diff --git a/test/node_modules/next-tick/package.json b/test/node_modules/next-tick/package.json new file mode 100644 index 0000000..071c8ac --- /dev/null +++ b/test/node_modules/next-tick/package.json @@ -0,0 +1,27 @@ +{ + "name": "next-tick", + "version": "1.1.0", + "description": "Environment agnostic nextTick polyfill", + "author": "Mariusz Nowak (http://www.medikoo.com/)", + "keywords": [ + "nexttick", + "setImmediate", + "setTimeout", + "async" + ], + "repository": { + "type": "git", + "url": "git://github.com/medikoo/next-tick.git" + }, + "devDependencies": { + "tad": "^3.0.1", + "xlint": "^0.2.2", + "xlint-jslint-medikoo": "^0.1.4" + }, + "scripts": { + "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream", + "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch", + "test": "node node_modules/tad/bin/tad" + }, + "license": "ISC" +} diff --git a/test/node_modules/next-tick/test/index.js b/test/node_modules/next-tick/test/index.js new file mode 100644 index 0000000..6b22cf4 --- /dev/null +++ b/test/node_modules/next-tick/test/index.js @@ -0,0 +1,22 @@ +'use strict'; + +module.exports = function (t, a, d) { + var invoked; + + a(t(function () { + a(arguments.length, 0, "Arguments"); + invoked = true; + }), undefined, "Return"); + a(invoked, undefined, "Is not run immediately"); + setTimeout(function () { + a(invoked, true, "Run in next tick"); + invoked = []; + t(function () { invoked.push(0); }); + t(function () { invoked.push(1); }); + t(function () { invoked.push(2); }); + setTimeout(function () { + a.deep(invoked, [0, 1, 2], "Serial"); + d(); + }, 10); + }, 10); +}; diff --git a/test/node_modules/node-gyp-build/LICENSE b/test/node_modules/node-gyp-build/LICENSE new file mode 100644 index 0000000..56fce08 --- /dev/null +++ b/test/node_modules/node-gyp-build/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Mathias Buus + +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/test/node_modules/node-gyp-build/README.md b/test/node_modules/node-gyp-build/README.md new file mode 100644 index 0000000..f712ca6 --- /dev/null +++ b/test/node_modules/node-gyp-build/README.md @@ -0,0 +1,58 @@ +# node-gyp-build + +> Build tool and bindings loader for [`node-gyp`][node-gyp] that supports prebuilds. + +``` +npm install node-gyp-build +``` + +[![Test](https://github.com/prebuild/node-gyp-build/actions/workflows/test.yml/badge.svg)](https://github.com/prebuild/node-gyp-build/actions/workflows/test.yml) + +Use together with [`prebuildify`][prebuildify] to easily support prebuilds for your native modules. + +## Usage + +> **Note.** Prebuild names have changed in [`prebuildify@3`][prebuildify] and `node-gyp-build@4`. Please see the documentation below. + +`node-gyp-build` works similar to [`node-gyp build`][node-gyp] except that it will check if a build or prebuild is present before rebuilding your project. + +It's main intended use is as an npm install script and bindings loader for native modules that bundle prebuilds using [`prebuildify`][prebuildify]. + +First add `node-gyp-build` as an install script to your native project + +``` js +{ + ... + "scripts": { + "install": "node-gyp-build" + } +} +``` + +Then in your `index.js`, instead of using the [`bindings`](https://www.npmjs.com/package/bindings) module use `node-gyp-build` to load your binding. + +``` js +var binding = require('node-gyp-build')(__dirname) +``` + +If you do these two things and bundle prebuilds with [`prebuildify`][prebuildify] your native module will work for most platforms +without having to compile on install time AND will work in both node and electron without the need to recompile between usage. + +Users can override `node-gyp-build` and force compiling by doing `npm install --build-from-source`. + +Prebuilds will be attempted loaded from `MODULE_PATH/prebuilds/...` and then next `EXEC_PATH/prebuilds/...` (the latter allowing use with `zeit/pkg`) + +## Supported prebuild names + +If so desired you can bundle more specific flavors, for example `musl` builds to support Alpine, or targeting a numbered ARM architecture version. + +These prebuilds can be bundled in addition to generic prebuilds; `node-gyp-build` will try to find the most specific flavor first. Prebuild filenames are composed of _tags_. The runtime tag takes precedence, as does an `abi` tag over `napi`. For more details on tags, please see [`prebuildify`][prebuildify]. + +Values for the `libc` and `armv` tags are auto-detected but can be overridden through the `LIBC` and `ARM_VERSION` environment variables, respectively. + +## License + +MIT + +[prebuildify]: https://github.com/prebuild/prebuildify +[node-gyp]: https://www.npmjs.com/package/node-gyp diff --git a/test/node_modules/node-gyp-build/bin.js b/test/node_modules/node-gyp-build/bin.js new file mode 100755 index 0000000..36bd515 --- /dev/null +++ b/test/node_modules/node-gyp-build/bin.js @@ -0,0 +1,77 @@ +#!/usr/bin/env node + +var proc = require('child_process') +var os = require('os') +var path = require('path') + +if (!buildFromSource()) { + proc.exec('node-gyp-build-test', function (err, stdout, stderr) { + if (err) { + if (verbose()) console.error(stderr) + preinstall() + } + }) +} else { + preinstall() +} + +function build () { + var args = [os.platform() === 'win32' ? 'node-gyp.cmd' : 'node-gyp', 'rebuild'] + + try { + args = [ + process.execPath, + path.join(require.resolve('node-gyp/package.json'), '..', require('node-gyp/package.json').bin['node-gyp']), + 'rebuild' + ] + } catch (_) {} + + proc.spawn(args[0], args.slice(1), { stdio: 'inherit' }).on('exit', function (code) { + if (code || !process.argv[3]) process.exit(code) + exec(process.argv[3]).on('exit', function (code) { + process.exit(code) + }) + }) +} + +function preinstall () { + if (!process.argv[2]) return build() + exec(process.argv[2]).on('exit', function (code) { + if (code) process.exit(code) + build() + }) +} + +function exec (cmd) { + if (process.platform !== 'win32') { + var shell = os.platform() === 'android' ? 'sh' : '/bin/sh' + return proc.spawn(shell, ['-c', '--', cmd], { + stdio: 'inherit' + }) + } + + return proc.spawn(process.env.comspec || 'cmd.exe', ['/s', '/c', '"' + cmd + '"'], { + windowsVerbatimArguments: true, + stdio: 'inherit' + }) +} + +function buildFromSource () { + return hasFlag('--build-from-source') || process.env.npm_config_build_from_source === 'true' +} + +function verbose () { + return hasFlag('--verbose') || process.env.npm_config_loglevel === 'verbose' +} + +// TODO (next major): remove in favor of env.npm_config_* which works since npm +// 0.1.8 while npm_config_argv will stop working in npm 7. See npm/rfcs#90 +function hasFlag (flag) { + if (!process.env.npm_config_argv) return false + + try { + return JSON.parse(process.env.npm_config_argv).original.indexOf(flag) !== -1 + } catch (_) { + return false + } +} diff --git a/test/node_modules/node-gyp-build/build-test.js b/test/node_modules/node-gyp-build/build-test.js new file mode 100755 index 0000000..b6622a5 --- /dev/null +++ b/test/node_modules/node-gyp-build/build-test.js @@ -0,0 +1,19 @@ +#!/usr/bin/env node + +process.env.NODE_ENV = 'test' + +var path = require('path') +var test = null + +try { + var pkg = require(path.join(process.cwd(), 'package.json')) + if (pkg.name && process.env[pkg.name.toUpperCase().replace(/-/g, '_')]) { + process.exit(0) + } + test = pkg.prebuild.test +} catch (err) { + // do nothing +} + +if (test) require(path.join(process.cwd(), test)) +else require('./')() diff --git a/test/node_modules/node-gyp-build/index.js b/test/node_modules/node-gyp-build/index.js new file mode 100644 index 0000000..30742b0 --- /dev/null +++ b/test/node_modules/node-gyp-build/index.js @@ -0,0 +1,207 @@ +var fs = require('fs') +var path = require('path') +var os = require('os') + +// Workaround to fix webpack's build warnings: 'the request of a dependency is an expression' +var runtimeRequire = typeof __webpack_require__ === 'function' ? __non_webpack_require__ : require // eslint-disable-line + +var vars = (process.config && process.config.variables) || {} +var prebuildsOnly = !!process.env.PREBUILDS_ONLY +var abi = process.versions.modules // TODO: support old node where this is undef +var runtime = isElectron() ? 'electron' : (isNwjs() ? 'node-webkit' : 'node') + +var arch = process.env.npm_config_arch || os.arch() +var platform = process.env.npm_config_platform || os.platform() +var libc = process.env.LIBC || (isAlpine(platform) ? 'musl' : 'glibc') +var armv = process.env.ARM_VERSION || (arch === 'arm64' ? '8' : vars.arm_version) || '' +var uv = (process.versions.uv || '').split('.')[0] + +module.exports = load + +function load (dir) { + return runtimeRequire(load.path(dir)) +} + +load.path = function (dir) { + dir = path.resolve(dir || '.') + + try { + var name = runtimeRequire(path.join(dir, 'package.json')).name.toUpperCase().replace(/-/g, '_') + if (process.env[name + '_PREBUILD']) dir = process.env[name + '_PREBUILD'] + } catch (err) {} + + if (!prebuildsOnly) { + var release = getFirst(path.join(dir, 'build/Release'), matchBuild) + if (release) return release + + var debug = getFirst(path.join(dir, 'build/Debug'), matchBuild) + if (debug) return debug + } + + var prebuild = resolve(dir) + if (prebuild) return prebuild + + var nearby = resolve(path.dirname(process.execPath)) + if (nearby) return nearby + + var target = [ + 'platform=' + platform, + 'arch=' + arch, + 'runtime=' + runtime, + 'abi=' + abi, + 'uv=' + uv, + armv ? 'armv=' + armv : '', + 'libc=' + libc, + 'node=' + process.versions.node, + process.versions.electron ? 'electron=' + process.versions.electron : '', + typeof __webpack_require__ === 'function' ? 'webpack=true' : '' // eslint-disable-line + ].filter(Boolean).join(' ') + + throw new Error('No native build was found for ' + target + '\n loaded from: ' + dir + '\n') + + function resolve (dir) { + // Find matching "prebuilds/-" directory + var tuples = readdirSync(path.join(dir, 'prebuilds')).map(parseTuple) + var tuple = tuples.filter(matchTuple(platform, arch)).sort(compareTuples)[0] + if (!tuple) return + + // Find most specific flavor first + var prebuilds = path.join(dir, 'prebuilds', tuple.name) + var parsed = readdirSync(prebuilds).map(parseTags) + var candidates = parsed.filter(matchTags(runtime, abi)) + var winner = candidates.sort(compareTags(runtime))[0] + if (winner) return path.join(prebuilds, winner.file) + } +} + +function readdirSync (dir) { + try { + return fs.readdirSync(dir) + } catch (err) { + return [] + } +} + +function getFirst (dir, filter) { + var files = readdirSync(dir).filter(filter) + return files[0] && path.join(dir, files[0]) +} + +function matchBuild (name) { + return /\.node$/.test(name) +} + +function parseTuple (name) { + // Example: darwin-x64+arm64 + var arr = name.split('-') + if (arr.length !== 2) return + + var platform = arr[0] + var architectures = arr[1].split('+') + + if (!platform) return + if (!architectures.length) return + if (!architectures.every(Boolean)) return + + return { name, platform, architectures } +} + +function matchTuple (platform, arch) { + return function (tuple) { + if (tuple == null) return false + if (tuple.platform !== platform) return false + return tuple.architectures.includes(arch) + } +} + +function compareTuples (a, b) { + // Prefer single-arch prebuilds over multi-arch + return a.architectures.length - b.architectures.length +} + +function parseTags (file) { + var arr = file.split('.') + var extension = arr.pop() + var tags = { file: file, specificity: 0 } + + if (extension !== 'node') return + + for (var i = 0; i < arr.length; i++) { + var tag = arr[i] + + if (tag === 'node' || tag === 'electron' || tag === 'node-webkit') { + tags.runtime = tag + } else if (tag === 'napi') { + tags.napi = true + } else if (tag.slice(0, 3) === 'abi') { + tags.abi = tag.slice(3) + } else if (tag.slice(0, 2) === 'uv') { + tags.uv = tag.slice(2) + } else if (tag.slice(0, 4) === 'armv') { + tags.armv = tag.slice(4) + } else if (tag === 'glibc' || tag === 'musl') { + tags.libc = tag + } else { + continue + } + + tags.specificity++ + } + + return tags +} + +function matchTags (runtime, abi) { + return function (tags) { + if (tags == null) return false + if (tags.runtime !== runtime && !runtimeAgnostic(tags)) return false + if (tags.abi !== abi && !tags.napi) return false + if (tags.uv && tags.uv !== uv) return false + if (tags.armv && tags.armv !== armv) return false + if (tags.libc && tags.libc !== libc) return false + + return true + } +} + +function runtimeAgnostic (tags) { + return tags.runtime === 'node' && tags.napi +} + +function compareTags (runtime) { + // Precedence: non-agnostic runtime, abi over napi, then by specificity. + return function (a, b) { + if (a.runtime !== b.runtime) { + return a.runtime === runtime ? -1 : 1 + } else if (a.abi !== b.abi) { + return a.abi ? -1 : 1 + } else if (a.specificity !== b.specificity) { + return a.specificity > b.specificity ? -1 : 1 + } else { + return 0 + } + } +} + +function isNwjs () { + return !!(process.versions && process.versions.nw) +} + +function isElectron () { + if (process.versions && process.versions.electron) return true + if (process.env.ELECTRON_RUN_AS_NODE) return true + return typeof window !== 'undefined' && window.process && window.process.type === 'renderer' +} + +function isAlpine (platform) { + return platform === 'linux' && fs.existsSync('/etc/alpine-release') +} + +// Exposed for unit tests +// TODO: move to lib +load.parseTags = parseTags +load.matchTags = matchTags +load.compareTags = compareTags +load.parseTuple = parseTuple +load.matchTuple = matchTuple +load.compareTuples = compareTuples diff --git a/test/node_modules/node-gyp-build/optional.js b/test/node_modules/node-gyp-build/optional.js new file mode 100755 index 0000000..8daa04a --- /dev/null +++ b/test/node_modules/node-gyp-build/optional.js @@ -0,0 +1,7 @@ +#!/usr/bin/env node + +/* +I am only useful as an install script to make node-gyp not compile for purely optional native deps +*/ + +process.exit(0) diff --git a/test/node_modules/node-gyp-build/package.json b/test/node_modules/node-gyp-build/package.json new file mode 100644 index 0000000..da7085f --- /dev/null +++ b/test/node_modules/node-gyp-build/package.json @@ -0,0 +1,29 @@ +{ + "name": "node-gyp-build", + "version": "4.5.0", + "description": "Build tool and bindings loader for node-gyp that supports prebuilds", + "main": "index.js", + "devDependencies": { + "array-shuffle": "^1.0.1", + "standard": "^14.0.0", + "tape": "^5.0.0" + }, + "scripts": { + "test": "standard && node test" + }, + "bin": { + "node-gyp-build": "./bin.js", + "node-gyp-build-optional": "./optional.js", + "node-gyp-build-test": "./build-test.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/prebuild/node-gyp-build.git" + }, + "author": "Mathias Buus (@mafintosh)", + "license": "MIT", + "bugs": { + "url": "https://github.com/prebuild/node-gyp-build/issues" + }, + "homepage": "https://github.com/prebuild/node-gyp-build" +} diff --git a/test/node_modules/scrypt-js/LICENSE.txt b/test/node_modules/scrypt-js/LICENSE.txt new file mode 100644 index 0000000..a9c5e0a --- /dev/null +++ b/test/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/test/node_modules/scrypt-js/README.md b/test/node_modules/scrypt-js/README.md new file mode 100644 index 0000000..89fc575 --- /dev/null +++ b/test/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/test/node_modules/scrypt-js/index.html b/test/node_modules/scrypt-js/index.html new file mode 100644 index 0000000..8765b56 --- /dev/null +++ b/test/node_modules/scrypt-js/index.html @@ -0,0 +1,291 @@ + + + scrypt-js + + + +
+
+

scrypt-js

+
+ + + + + + +
+
+
+
Nlog2 [1, 63]
+ +
+
+
r
+ +
+
+
p
+ +
+
+
dkLen
+ +
+
+
+ +
0%
+
+
+
+
+ + + + + + + + + diff --git a/test/node_modules/scrypt-js/package.json b/test/node_modules/scrypt-js/package.json new file mode 100644 index 0000000..31e16da --- /dev/null +++ b/test/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/test/node_modules/scrypt-js/scrypt.d.ts b/test/node_modules/scrypt-js/scrypt.d.ts new file mode 100644 index 0000000..e0a9770 --- /dev/null +++ b/test/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/test/node_modules/scrypt-js/scrypt.js b/test/node_modules/scrypt-js/scrypt.js new file mode 100644 index 0000000..406c654 --- /dev/null +++ b/test/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/test/node_modules/scrypt-js/thirdparty/buffer.js b/test/node_modules/scrypt-js/thirdparty/buffer.js new file mode 100644 index 0000000..6aa51e4 --- /dev/null +++ b/test/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/test/node_modules/scrypt-js/thirdparty/setImmediate.js b/test/node_modules/scrypt-js/thirdparty/setImmediate.js new file mode 100644 index 0000000..5abe55c --- /dev/null +++ b/test/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