]> zoso.dev Git - libnemo.git/commitdiff
Version 1.3.0
authorMiro Metsänheimo <miro@metsanheimo.fi>
Tue, 12 Jan 2021 20:30:58 +0000 (22:30 +0200)
committerMiro Metsänheimo <miro@metsanheimo.fi>
Tue, 12 Jan 2021 20:34:41 +0000 (22:34 +0200)
* Add the possibility to generate legacy seeds and mnemonics
* Add the possibility to import legacy mnemonic phrases
* Stop throwing errors if given an upper case hex as input
* Return mnemonic also when creating wallet with a legacy seed
* npm audit fix
* Small refactoring

README.md
index.ts
lib/address-generator.ts
lib/address-importer.ts
lib/bip39-mnemonic.ts
lib/util/convert.ts
package-lock.json
package.json
test/test.js

index a3663f0756c0f610532c4acbf4f39cebbfa7ee9b..6f488823398aa89d42c5df7671e5c396da5372ab 100644 (file)
--- a/README.md
+++ b/README.md
@@ -6,13 +6,14 @@
 
 Toolkit for Nano cryptocurrency client side offline implementations allowing you to build web- and mobile applications using Nano without compromising the user's keys by sending them out of their own device.
 
-The toolkit supports creating and importing wallets and signing blocks on-device. Meaning that the user's keys should never be required to leave the device.
+The toolkit supports creating and importing wallets and signing blocks on-device. Meaning that the user's keys should never be required to leave the device. And much more!
 
 ## Features
 
 * Generate wallets with a BIP32 mnemonic phrase
-* BIP39/44 private key derivation
-* Mnemonic is compatible with the Ledger Nano implementation
+* Generate wallets with legacy Nano mnemonic phrases
+* BIP32/44 private key derivation
+* BIP39 Mnemonic is the same one which Ledger uses in their hardware wallets
 * Import wallets with a mnemonic phrase or a seed
 * Import wallets with the legacy Nano hex seed
 * Sign send, receive and change representative blocks with a private key
@@ -44,9 +45,16 @@ import { wallet } from 'nanocurrency-web'
 // Notice, that losing the password will make the mnemonic phrase void
 const wallet = wallet.generate(entropy?, password?)
 
+// Generates a legacy wallet with a mnemonic phrase, seed and an account
+// You can provide your own seed to be used instead
+const wallet = wallet.generateLegacey(seed?)
+
 // Import a wallet with the mnemonic phrase
 const wallet = wallet.fromMnemonic(mnemonic, seedPassword?)
 
+// Import a wallet with the legacy mnemonic phrase
+const wallet = wallet.fromLegacyMnemonic(mnemonic)
+
 // Import a wallet with a seed
 const wallet = wallet.fromSeed(seed)
 
@@ -210,7 +218,7 @@ const valid = tools.validateMnemonic('edge defense waste choose enrich upon flee
 ### In web
 
 ```html
-<script src="https://unpkg.com/nanocurrency-web@1.2.2" type="text/javascript"></script>
+<script src="https://unpkg.com/nanocurrency-web@1.3.0" type="text/javascript"></script>
 <script type="text/javascript">
     NanocurrencyWeb.wallet.generate(...);
 </script>
index 0e16249c4080ae1ac840402667f17317089c8cfe..b4b31fc4a6fc993bc17866f678e4dafdb60ab509 100644 (file)
--- a/index.ts
+++ b/index.ts
@@ -40,6 +40,25 @@ const wallet = {
                return generator.generateWallet(entropy, seedPassword)
        },
 
+       /**
+        * Generate a new Nano cryptocurrency wallet
+        *
+        * This function generates a legacy wallet from a random seed. Wallet includes
+        * a mnemonic phrase and a seed, the account is derived from the seed at index 0.
+        *
+        * The Nano address is derived from the public key using standard Nano encoding.
+        * The address is prefixed with 'nano_'.
+        *
+        * Generation uses CryptoJS to generate random seed by default. You can give your own seed
+        * as a parameter and it will be used instead.
+        *
+        * @param {string} [seed] - (Optional) 64 byte hexadecimal string seed to be used instead of generating
+        * @returns the generated mnemonic, seed and account
+        */
+       generateLegacy: (seed: string): Wallet => {
+               return generator.generateLegacyWallet(seed)
+       },
+
        /**
         * Import a Nano cryptocurrency wallet from a mnemonic phrase
         *
@@ -59,6 +78,23 @@ const wallet = {
                return importer.fromMnemonic(mnemonic, seedPassword)
        },
 
+       /**
+        * Import a Nano cryptocurrency wallet from a legacy mnemonic phrase
+        *
+        * This function imports a wallet from an old Nano mnemonic phrase. Wallet includes the mnemonic
+        * phrase, a seed which represents the mnemonic and an account derived from the seed at index 0.
+        *
+        * The Nano address is derived from the public key using standard Nano encoding.
+        * The address is prefixed with 'nano_'.
+        *
+        * @param {string} mnemonic - The mnemonic phrase. Words are separated with a space
+        * @throws Throws an error if the mnemonic phrase doesn't pass validations
+        * @returns the wallet derived from the mnemonic (mnemonic, seed, account)
+        */
+       fromLegacyMnemonic: (mnemonic: string): Wallet => {
+               return importer.fromLegacyMnemonic(mnemonic)
+       },
+
        /**
         * Import a Nano cryptocurrency wallet from a seed
         *
index 708fff6169efa744d64a402041e170c619d7a92a..46a324644880da6579f17abc2e58657e8c30737f 100644 (file)
@@ -1,40 +1,35 @@
-import Bip32KeyDerivation from './bip32-key-derivation'
+import AddressImporter, { Wallet } from './address-importer'
 import Bip39Mnemonic from './bip39-mnemonic'
-import Ed25519 from './ed25519'
-import NanoAddress from './nano-address'
-import { Wallet } from './address-importer'
 
 export default class AddressGenerator {
 
        /**
-        * Generates the wallet
+        * Generates a hierarchial deterministic BIP32/39/44 wallet
         *
         * @param {string} [entropy] - (Optional) Custom entropy if the caller doesn't want a default generated entropy
         * @param {string} [seedPassword] - (Optional) Password for the seed
         */
        generateWallet(entropy = '', seedPassword: string = ''): Wallet {
                const bip39 = new Bip39Mnemonic(seedPassword)
-               const wallet = bip39.createWallet(entropy)
-
-               const bip44 = new Bip32KeyDerivation(`44'/165'/0'`, wallet.seed)
-               const privateKey = bip44.derivePath().key
-
-               const ed25519 = new Ed25519()
-               const keyPair = ed25519.generateKeys(privateKey)
-
-               const nano = new NanoAddress()
-               const address = nano.deriveAddress(keyPair.publicKey)
+               const mnemonicSeed = bip39.createWallet(entropy)
+               const wallet = new AddressImporter().fromSeed(mnemonicSeed.seed, 0, 0)
 
                return {
-                       mnemonic: wallet.mnemonic,
-                       seed: wallet.seed,
-                       accounts: [{
-                               accountIndex: 0,
-                               privateKey: keyPair.privateKey,
-                               publicKey: keyPair.publicKey,
-                               address,
-                       }],
+                       ...wallet,
+                       mnemonic: mnemonicSeed.mnemonic,
                }
        }
 
+       /**
+        * Generates a legacy Nano wallet
+        *
+        */
+       generateLegacyWallet(seed?: string): Wallet {
+               const bip39 = new Bip39Mnemonic()
+               const mnemonicSeed = bip39.createLegacyWallet(seed)
+               const wallet = new AddressImporter().fromLegacySeed(mnemonicSeed.seed, 0, 0, mnemonicSeed.mnemonic)
+
+               return wallet
+       }
+
 }
index 2a3a1f1216ab2aa62985a9923d5b5dd6fd51fd2d..1d3ebf04f0b1cc74a4a05c31ae04a161ed43e39d 100644 (file)
@@ -21,7 +21,29 @@ export default class AddressImporter {
                }
 
                const seed = bip39.mnemonicToSeed(mnemonic)
-               return this.nano(seed, 0, 0, mnemonic)
+               const accounts = this.accounts(seed, 0, 0)
+
+               return {
+                       mnemonic,
+                       seed,
+                       accounts,
+               }
+       }
+
+       /**
+        * Import a legacy wallet using a mnemonic phrase
+        *
+        * @param {string} mnemonic - The mnemonic words to import the wallet from
+        * @returns {Wallet} - The wallet derived from the mnemonic phrase
+        */
+       fromLegacyMnemonic(mnemonic: string): Wallet {
+               const bip39 = new Bip39Mnemonic()
+               if (!bip39.validateMnemonic(mnemonic)) {
+                       throw new Error('Invalid mnemonic phrase')
+               }
+
+               const seed = bip39.mnemonicToLegacySeed(mnemonic)
+               return this.fromLegacySeed(seed, 0, 0, mnemonic)
        }
 
        /**
@@ -46,11 +68,17 @@ export default class AddressImporter {
                if (seed.length !== 128) {
                        throw new Error('Invalid seed length, must be a 128 byte hexadecimal string')
                }
-               if (!/^[0-9a-f]+$/i.test(seed)) {
+               if (!/^[0-9a-fA-F]+$/i.test(seed)) {
                        throw new Error('Seed is not a valid hexadecimal string')
                }
 
-               return this.nano(seed, from, to, undefined)
+               const accounts = this.accounts(seed, from, to)
+
+               return {
+                       mnemonic: undefined,
+                       seed,
+                       accounts,
+               }
        }
 
 
@@ -62,12 +90,35 @@ export default class AddressImporter {
         * @param {number} [to] - (Optional) The end index of the private keys to derive to
         * @returns {Wallet} The wallet derived from the seed
         */
-       fromLegacySeed(seed: string, from: number = 0, to: number = 0): Wallet {
-               const signer = new Signer()
+       fromLegacySeed(seed: string, from: number = 0, to: number = 0, mnemonic?: string): Wallet {
+               if (seed.length !== 64) {
+                       throw new Error('Invalid seed length, must be a 64 byte hexadecimal string')
+               }
+               if (!/^[0-9a-fA-F]+$/i.test(seed)) {
+                       throw new Error('Seed is not a valid hexadecimal string')
+               }
+
+               const accounts = this.legacyAccounts(seed, from, to)
+               return {
+                       mnemonic: mnemonic || new Bip39Mnemonic().deriveMnemonic(seed),
+                       seed,
+                       accounts,
+               }
+       }
+
+       /**
+        * Derives BIP32 private keys
+        *
+        * @param {string} seed - The seed to use for private key derivation
+        * @param {number} from - The start index of private keys to derive from
+        * @param {number} to - The end index of private keys to derive to
+        */
+       private accounts(seed: string, from: number, to: number): Account[] {
+               const accounts = []
 
-               const accounts: Account[] = []
                for (let i = from; i <= to; i++) {
-                       const privateKey = Convert.ab2hex(signer.generateHash([seed, Convert.dec2hex(i, 4)]))
+                       const bip44 = new Bip32KeyDerivation(`44'/165'/${i}'`, seed)
+                       const privateKey = bip44.derivePath().key
 
                        const ed25519 = new Ed25519()
                        const keyPair = ed25519.generateKeys(privateKey)
@@ -83,27 +134,21 @@ export default class AddressImporter {
                        })
                }
 
-               return {
-                       mnemonic: undefined,
-                       seed,
-                       accounts,
-               }
+               return accounts
        }
 
        /**
-        * Derives the private keys
+        * Derives legacy private keys
         *
         * @param {string} seed - The seed to use for private key derivation
         * @param {number} from - The start index of private keys to derive from
         * @param {number} to - The end index of private keys to derive to
-        * @param {string} [mnemonic] - (Optional) the mnemonic phrase to return with the wallet
         */
-       private nano(seed: string, from: number, to: number, mnemonic?: string): Wallet {
-               const accounts = []
-
+       private legacyAccounts(seed: string, from: number, to: number): Account[] {
+               const signer = new Signer()
+               const accounts: Account[] = []
                for (let i = from; i <= to; i++) {
-                       const bip44 = new Bip32KeyDerivation(`44'/165'/${i}'`, seed)
-                       const privateKey = bip44.derivePath().key
+                       const privateKey = Convert.ab2hex(signer.generateHash([seed, Convert.dec2hex(i, 4)]))
 
                        const ed25519 = new Ed25519()
                        const keyPair = ed25519.generateKeys(privateKey)
@@ -119,11 +164,7 @@ export default class AddressImporter {
                        })
                }
 
-               return {
-                       mnemonic,
-                       seed,
-                       accounts,
-               }
+               return accounts
        }
 
 }
index ae1053ea1f2f3b958ad6a38a08b585190f954ad5..74f7f42cb7377b8b781f625f2fabbee5011a575d 100644 (file)
@@ -14,7 +14,7 @@ export default class Bip39Mnemonic {
        }
 
        /**
-        * Creates a new wallet
+        * Creates a BIP39 wallet
         *
         * @param {string} [entropy] - (Optional) the entropy to use instead of generating
         * @returns {MnemonicSeed} The mnemonic phrase and a seed derived from the (generated) entropy
@@ -24,7 +24,7 @@ export default class Bip39Mnemonic {
                        if (entropy.length !== 64) {
                                throw new Error('Invalid entropy length, must be a 64 byte hexadecimal string')
                        }
-                       if (!/^[0-9a-f]+$/i.test(entropy)) {
+                       if (!/^[0-9a-fA-F]+$/i.test(entropy)) {
                                throw new Error('Entopy is not a valid hexadecimal string')
                        }
                }
@@ -33,6 +33,44 @@ export default class Bip39Mnemonic {
                        entropy = this.randomHex(64)
                }
 
+               const mnemonic = this.deriveMnemonic(entropy)
+               const seed = this.mnemonicToSeed(mnemonic)
+
+               return {
+                       mnemonic,
+                       seed,
+               }
+       }
+
+       /**
+        * Creates an old Nano wallet
+        *
+        * @param {string} seed - (Optional) the seed to be used for the wallet
+        * @returns {MnemonicSeed} The mnemonic phrase and a generated seed if none provided
+        */
+       createLegacyWallet = (seed?: string): MnemonicSeed => {
+               if (seed) {
+                       if (seed.length !== 64) {
+                               throw new Error('Invalid entropy length, must be a 64 byte hexadecimal string')
+                       }
+                       if (!/^[0-9a-fA-F]+$/i.test(seed)) {
+                               throw new Error('Entopy is not a valid hexadecimal string')
+                       }
+               }
+
+               if (!seed) {
+                       seed = this.randomHex(64)
+               }
+
+               const mnemonic = this.deriveMnemonic(seed)
+
+               return {
+                       mnemonic,
+                       seed,
+               }
+       }
+
+       deriveMnemonic = (entropy: string): string => {
                const entropyBinary = Convert.hexStringToBinary(entropy)
                const entropySha256Binary = Convert.hexStringToBinary(this.calculateChecksum(entropy))
                const entropyBinaryWithChecksum = entropyBinary + entropySha256Binary
@@ -42,13 +80,7 @@ export default class Bip39Mnemonic {
                        mnemonicWords.push(words[parseInt(entropyBinaryWithChecksum.substr(i, 11), 2)])
                }
 
-               const mnemonicFinal = mnemonicWords.join(' ')
-               const seed = this.mnemonicToSeed(mnemonicFinal)
-
-               return {
-                       mnemonic: mnemonicFinal,
-                       seed,
-               }
+               return mnemonicWords.join(' ')
        }
 
        /**
@@ -68,7 +100,7 @@ export default class Bip39Mnemonic {
                        if (wordIndex === -1) {
                                return false
                        }
-                       return (wordIndex.toString(2)).padStart(11, '0')
+                       return (Convert.dec2bin(wordIndex)).padStart(11, '0')
                }).join('')
 
                const dividerIndex = Math.floor(bits.length / 33) * 32
@@ -76,9 +108,17 @@ export default class Bip39Mnemonic {
                const checksumBits = bits.slice(dividerIndex)
                const entropyBytes = entropyBits.match(/(.{1,8})/g).map((bin: string) => parseInt(bin, 2))
 
-               if (entropyBytes.length < 16) return false
-               if (entropyBytes.length > 32) return false
-               if (entropyBytes.length % 4 !== 0) return false
+               if (entropyBytes.length < 16) {
+                       return false
+               }
+
+               if (entropyBytes.length > 32) {
+                       return false
+               }
+
+               if (entropyBytes.length % 4 !== 0) {
+                       return false
+               }
 
                const entropyHex = Convert.bytesToHexString(entropyBytes)
                const newChecksum = this.calculateChecksum(entropyHex)
@@ -91,6 +131,34 @@ export default class Bip39Mnemonic {
                return true
        }
 
+       /**
+        * Converts the mnemonic phrase to an old Nano seed
+        *
+        * @param {string} mnemonic Mnemonic phrase separated by spaces
+        */
+       mnemonicToLegacySeed = (mnemonic: string): string => {
+               const wordArray = Util.normalizeUTF8(mnemonic).split(' ')
+               const bits = wordArray.map((w: string) => {
+                       const wordIndex = words.indexOf(w)
+                       if (wordIndex === -1) {
+                               return false
+                       }
+                       return (Convert.dec2bin(wordIndex)).padStart(11, '0')
+               }).join('')
+
+               const dividerIndex = Math.floor(bits.length / 33) * 32
+               const entropyBits = bits.slice(0, dividerIndex)
+               const entropyBytes = entropyBits.match(/(.{1,8})/g).map((bin: string) => parseInt(bin, 2))
+               const entropyHex = Convert.bytesToHexString(entropyBytes)
+
+               return entropyHex
+       }
+
+       /**
+        * Converts the mnemonic phrase to a BIP39 seed
+        *
+        * @param {string} mnemonic Mnemonic phrase separated by spaces
+        */
        mnemonicToSeed = (mnemonic: string): string => {
                const normalizedMnemonic = Util.normalizeUTF8(mnemonic)
                const normalizedPassword = 'mnemonic' + Util.normalizeUTF8(this.password)
index 46f16bccd61b06f167be98f5d796491d0ca3439b..a7012d153144d2d3e1705e844e1d1cfaf5240fba 100644 (file)
@@ -93,12 +93,16 @@ export default class Convert {
                return joined
        }
 
+       static dec2bin = (dec: number): string => {
+               return (dec >>> 0).toString(2)
+       }
+
        static bytesToHexString = (bytes: number[]): string => {
                return [...bytes].map(b => b.toString(16).padStart(2, '0')).join('')
        }
 
        static hexStringToBinary = (hex: string): string => {
-               return [...hex].map(c => (parseInt(c, 16).toString(2)).padStart(4, '0')).join('')
+               return [...hex].map(c => (Convert.dec2bin(parseInt(c, 16))).padStart(4, '0')).join('')
        }
 
        static binaryToHexString = (bin: string): string => {
index 363a6059d539b4f2f1e5ace1410b90c068e85780..fe9d003cbceef3d59a9959880cf510c6923796d0 100644 (file)
@@ -1,6 +1,6 @@
 {
        "name": "nanocurrency-web",
-       "version": "1.2.1",
+       "version": "1.3.0",
        "lockfileVersion": 1,
        "requires": true,
        "dependencies": {
                        "dev": true
                },
                "acorn": {
-                       "version": "6.3.0",
-                       "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz",
-                       "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==",
+                       "version": "6.4.2",
+                       "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz",
+                       "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==",
                        "dev": true
                },
                "ajv": {
                        }
                },
                "anymatch": {
-                       "version": "2.0.0",
-                       "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz",
-                       "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==",
+                       "version": "3.1.1",
+                       "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
+                       "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
                        "dev": true,
+                       "optional": true,
                        "requires": {
-                               "micromatch": "^3.1.4",
-                               "normalize-path": "^2.1.1"
-                       },
-                       "dependencies": {
-                               "braces": {
-                                       "version": "2.3.2",
-                                       "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
-                                       "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
-                                       "dev": true,
-                                       "requires": {
-                                               "arr-flatten": "^1.1.0",
-                                               "array-unique": "^0.3.2",
-                                               "extend-shallow": "^2.0.1",
-                                               "fill-range": "^4.0.0",
-                                               "isobject": "^3.0.1",
-                                               "repeat-element": "^1.1.2",
-                                               "snapdragon": "^0.8.1",
-                                               "snapdragon-node": "^2.0.1",
-                                               "split-string": "^3.0.2",
-                                               "to-regex": "^3.0.1"
-                                       },
-                                       "dependencies": {
-                                               "extend-shallow": {
-                                                       "version": "2.0.1",
-                                                       "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
-                                                       "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
-                                                       "dev": true,
-                                                       "requires": {
-                                                               "is-extendable": "^0.1.0"
-                                                       }
-                                               }
-                                       }
-                               },
-                               "fill-range": {
-                                       "version": "4.0.0",
-                                       "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
-                                       "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
-                                       "dev": true,
-                                       "requires": {
-                                               "extend-shallow": "^2.0.1",
-                                               "is-number": "^3.0.0",
-                                               "repeat-string": "^1.6.1",
-                                               "to-regex-range": "^2.1.0"
-                                       },
-                                       "dependencies": {
-                                               "extend-shallow": {
-                                                       "version": "2.0.1",
-                                                       "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
-                                                       "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
-                                                       "dev": true,
-                                                       "requires": {
-                                                               "is-extendable": "^0.1.0"
-                                                       }
-                                               }
-                                       }
-                               },
-                               "is-buffer": {
-                                       "version": "1.1.6",
-                                       "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
-                                       "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
-                                       "dev": true
-                               },
-                               "is-number": {
-                                       "version": "3.0.0",
-                                       "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
-                                       "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
-                                       "dev": true,
-                                       "requires": {
-                                               "kind-of": "^3.0.2"
-                                       },
-                                       "dependencies": {
-                                               "kind-of": {
-                                                       "version": "3.2.2",
-                                                       "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
-                                                       "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
-                                                       "dev": true,
-                                                       "requires": {
-                                                               "is-buffer": "^1.1.5"
-                                                       }
-                                               }
-                                       }
-                               },
-                               "micromatch": {
-                                       "version": "3.1.10",
-                                       "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
-                                       "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
-                                       "dev": true,
-                                       "requires": {
-                                               "arr-diff": "^4.0.0",
-                                               "array-unique": "^0.3.2",
-                                               "braces": "^2.3.1",
-                                               "define-property": "^2.0.2",
-                                               "extend-shallow": "^3.0.2",
-                                               "extglob": "^2.0.4",
-                                               "fragment-cache": "^0.2.1",
-                                               "kind-of": "^6.0.2",
-                                               "nanomatch": "^1.2.9",
-                                               "object.pick": "^1.3.0",
-                                               "regex-not": "^1.0.0",
-                                               "snapdragon": "^0.8.1",
-                                               "to-regex": "^3.0.2"
-                                       }
-                               },
-                               "normalize-path": {
-                                       "version": "2.1.1",
-                                       "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
-                                       "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
-                                       "dev": true,
-                                       "requires": {
-                                               "remove-trailing-separator": "^1.0.1"
-                                       }
-                               },
-                               "to-regex-range": {
-                                       "version": "2.1.1",
-                                       "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
-                                       "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
-                                       "dev": true,
-                                       "requires": {
-                                               "is-number": "^3.0.0",
-                                               "repeat-string": "^1.6.1"
-                                       }
-                               }
+                               "normalize-path": "^3.0.0",
+                               "picomatch": "^2.0.4"
                        }
                },
                "aproba": {
                        "version": "1.0.3",
                        "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz",
                        "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==",
-                       "dev": true
+                       "dev": true,
+                       "optional": true
                },
                "atob": {
                        "version": "2.1.2",
                        "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A=="
                },
                "binary-extensions": {
-                       "version": "1.13.1",
-                       "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz",
-                       "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==",
-                       "dev": true
+                       "version": "2.2.0",
+                       "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
+                       "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
+                       "dev": true,
+                       "optional": true
                },
                "blakejs": {
                        "version": "1.1.0",
                        "integrity": "sha1-ad+S75U6qIylGjLfarHFShVfx6U="
                },
                "bluebird": {
-                       "version": "3.7.0",
-                       "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.0.tgz",
-                       "integrity": "sha512-aBQ1FxIa7kSWCcmKHlcHFlT2jt6J/l4FzC7KcPELkOJOsPOb/bccdhmIrKDfXhwFrmc7vDoDrrepFvGqjyXGJg==",
+                       "version": "3.7.2",
+                       "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
+                       "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==",
                        "dev": true
                },
                "bn.js": {
                        "dev": true
                },
                "cacache": {
-                       "version": "12.0.3",
-                       "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.3.tgz",
-                       "integrity": "sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw==",
+                       "version": "12.0.4",
+                       "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.4.tgz",
+                       "integrity": "sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==",
                        "dev": true,
                        "requires": {
                                "bluebird": "^3.5.5",
                        },
                        "dependencies": {
                                "glob": {
-                                       "version": "7.1.4",
-                                       "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz",
-                                       "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==",
+                                       "version": "7.1.6",
+                                       "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
+                                       "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
                                        "dev": true,
                                        "requires": {
                                                "fs.realpath": "^1.0.0",
                        "dev": true
                },
                "chokidar": {
-                       "version": "2.1.8",
-                       "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz",
-                       "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==",
+                       "version": "3.5.0",
+                       "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.0.tgz",
+                       "integrity": "sha512-JgQM9JS92ZbFR4P90EvmzNpSGhpPBGBSj10PILeDyYFwp4h2/D9OM03wsJ4zW1fEp4ka2DGrnUeD7FuvQ2aZ2Q==",
                        "dev": true,
+                       "optional": true,
                        "requires": {
-                               "anymatch": "^2.0.0",
-                               "async-each": "^1.0.1",
-                               "braces": "^2.3.2",
-                               "fsevents": "^1.2.7",
-                               "glob-parent": "^3.1.0",
-                               "inherits": "^2.0.3",
-                               "is-binary-path": "^1.0.0",
-                               "is-glob": "^4.0.0",
-                               "normalize-path": "^3.0.0",
-                               "path-is-absolute": "^1.0.0",
-                               "readdirp": "^2.2.1",
-                               "upath": "^1.1.1"
-                       },
-                       "dependencies": {
-                               "braces": {
-                                       "version": "2.3.2",
-                                       "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
-                                       "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
-                                       "dev": true,
-                                       "requires": {
-                                               "arr-flatten": "^1.1.0",
-                                               "array-unique": "^0.3.2",
-                                               "extend-shallow": "^2.0.1",
-                                               "fill-range": "^4.0.0",
-                                               "isobject": "^3.0.1",
-                                               "repeat-element": "^1.1.2",
-                                               "snapdragon": "^0.8.1",
-                                               "snapdragon-node": "^2.0.1",
-                                               "split-string": "^3.0.2",
-                                               "to-regex": "^3.0.1"
-                                       }
-                               },
-                               "extend-shallow": {
-                                       "version": "2.0.1",
-                                       "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
-                                       "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
-                                       "dev": true,
-                                       "requires": {
-                                               "is-extendable": "^0.1.0"
-                                       }
-                               },
-                               "fill-range": {
-                                       "version": "4.0.0",
-                                       "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
-                                       "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
-                                       "dev": true,
-                                       "requires": {
-                                               "extend-shallow": "^2.0.1",
-                                               "is-number": "^3.0.0",
-                                               "repeat-string": "^1.6.1",
-                                               "to-regex-range": "^2.1.0"
-                                       }
-                               },
-                               "is-buffer": {
-                                       "version": "1.1.6",
-                                       "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
-                                       "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
-                                       "dev": true
-                               },
-                               "is-number": {
-                                       "version": "3.0.0",
-                                       "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
-                                       "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
-                                       "dev": true,
-                                       "requires": {
-                                               "kind-of": "^3.0.2"
-                                       }
-                               },
-                               "kind-of": {
-                                       "version": "3.2.2",
-                                       "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
-                                       "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
-                                       "dev": true,
-                                       "requires": {
-                                               "is-buffer": "^1.1.5"
-                                       }
-                               },
-                               "to-regex-range": {
-                                       "version": "2.1.1",
-                                       "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
-                                       "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
-                                       "dev": true,
-                                       "requires": {
-                                               "is-number": "^3.0.0",
-                                               "repeat-string": "^1.6.1"
-                                       }
-                               }
+                               "anymatch": "~3.1.1",
+                               "braces": "~3.0.2",
+                               "fsevents": "~2.3.1",
+                               "glob-parent": "~5.1.0",
+                               "is-binary-path": "~2.1.0",
+                               "is-glob": "~4.0.1",
+                               "normalize-path": "~3.0.0",
+                               "readdirp": "~3.5.0"
                        }
                },
                "chownr": {
-                       "version": "1.1.3",
-                       "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.3.tgz",
-                       "integrity": "sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw==",
+                       "version": "1.1.4",
+                       "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
+                       "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==",
                        "dev": true
                },
                "chrome-trace-event": {
                        }
                },
                "elliptic": {
-                       "version": "6.5.1",
-                       "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.1.tgz",
-                       "integrity": "sha512-xvJINNLbTeWQjrl6X+7eQCrIy/YPv5XCpKW6kB5mKvtnGILoLDcySuwomfdzt0BMdLNVnuRNTuzKNHj0bva1Cg==",
+                       "version": "6.5.3",
+                       "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz",
+                       "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==",
                        "dev": true,
                        "requires": {
                                "bn.js": "^4.4.0",
                        "dev": true
                },
                "figgy-pudding": {
-                       "version": "3.5.1",
-                       "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz",
-                       "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==",
+                       "version": "3.5.2",
+                       "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz",
+                       "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==",
                        "dev": true
                },
                "fill-range": {
                        "dev": true
                },
                "fsevents": {
-                       "version": "1.2.9",
-                       "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz",
-                       "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==",
-                       "dev": true,
-                       "optional": true,
-                       "requires": {
-                               "nan": "^2.12.1",
-                               "node-pre-gyp": "^0.12.0"
-                       },
-                       "dependencies": {
-                               "abbrev": {
-                                       "version": "1.1.1",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "ansi-regex": {
-                                       "version": "2.1.1",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "aproba": {
-                                       "version": "1.2.0",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "are-we-there-yet": {
-                                       "version": "1.1.5",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "delegates": "^1.0.0",
-                                               "readable-stream": "^2.0.6"
-                                       }
-                               },
-                               "balanced-match": {
-                                       "version": "1.0.0",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "brace-expansion": {
-                                       "version": "1.1.11",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "balanced-match": "^1.0.0",
-                                               "concat-map": "0.0.1"
-                                       }
-                               },
-                               "chownr": {
-                                       "version": "1.1.1",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "code-point-at": {
-                                       "version": "1.1.0",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "concat-map": {
-                                       "version": "0.0.1",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "console-control-strings": {
-                                       "version": "1.1.0",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "core-util-is": {
-                                       "version": "1.0.2",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "debug": {
-                                       "version": "4.1.1",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "ms": "^2.1.1"
-                                       }
-                               },
-                               "deep-extend": {
-                                       "version": "0.6.0",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "delegates": {
-                                       "version": "1.0.0",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "detect-libc": {
-                                       "version": "1.0.3",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "fs-minipass": {
-                                       "version": "1.2.5",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "minipass": "^2.2.1"
-                                       }
-                               },
-                               "fs.realpath": {
-                                       "version": "1.0.0",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "gauge": {
-                                       "version": "2.7.4",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "aproba": "^1.0.3",
-                                               "console-control-strings": "^1.0.0",
-                                               "has-unicode": "^2.0.0",
-                                               "object-assign": "^4.1.0",
-                                               "signal-exit": "^3.0.0",
-                                               "string-width": "^1.0.1",
-                                               "strip-ansi": "^3.0.1",
-                                               "wide-align": "^1.1.0"
-                                       }
-                               },
-                               "glob": {
-                                       "version": "7.1.3",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "fs.realpath": "^1.0.0",
-                                               "inflight": "^1.0.4",
-                                               "inherits": "2",
-                                               "minimatch": "^3.0.4",
-                                               "once": "^1.3.0",
-                                               "path-is-absolute": "^1.0.0"
-                                       }
-                               },
-                               "has-unicode": {
-                                       "version": "2.0.1",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "iconv-lite": {
-                                       "version": "0.4.24",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "safer-buffer": ">= 2.1.2 < 3"
-                                       }
-                               },
-                               "ignore-walk": {
-                                       "version": "3.0.1",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "minimatch": "^3.0.4"
-                                       }
-                               },
-                               "inflight": {
-                                       "version": "1.0.6",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "once": "^1.3.0",
-                                               "wrappy": "1"
-                                       }
-                               },
-                               "inherits": {
-                                       "version": "2.0.3",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "ini": {
-                                       "version": "1.3.5",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "is-fullwidth-code-point": {
-                                       "version": "1.0.0",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "number-is-nan": "^1.0.0"
-                                       }
-                               },
-                               "isarray": {
-                                       "version": "1.0.0",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "minimatch": {
-                                       "version": "3.0.4",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "brace-expansion": "^1.1.7"
-                                       }
-                               },
-                               "minimist": {
-                                       "version": "0.0.8",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "minipass": {
-                                       "version": "2.3.5",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "safe-buffer": "^5.1.2",
-                                               "yallist": "^3.0.0"
-                                       }
-                               },
-                               "minizlib": {
-                                       "version": "1.2.1",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "minipass": "^2.2.1"
-                                       }
-                               },
-                               "mkdirp": {
-                                       "version": "0.5.1",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "minimist": "0.0.8"
-                                       }
-                               },
-                               "ms": {
-                                       "version": "2.1.1",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "needle": {
-                                       "version": "2.3.0",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "debug": "^4.1.0",
-                                               "iconv-lite": "^0.4.4",
-                                               "sax": "^1.2.4"
-                                       }
-                               },
-                               "node-pre-gyp": {
-                                       "version": "0.12.0",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "detect-libc": "^1.0.2",
-                                               "mkdirp": "^0.5.1",
-                                               "needle": "^2.2.1",
-                                               "nopt": "^4.0.1",
-                                               "npm-packlist": "^1.1.6",
-                                               "npmlog": "^4.0.2",
-                                               "rc": "^1.2.7",
-                                               "rimraf": "^2.6.1",
-                                               "semver": "^5.3.0",
-                                               "tar": "^4"
-                                       }
-                               },
-                               "nopt": {
-                                       "version": "4.0.1",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "abbrev": "1",
-                                               "osenv": "^0.1.4"
-                                       }
-                               },
-                               "npm-bundled": {
-                                       "version": "1.0.6",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "npm-packlist": {
-                                       "version": "1.4.1",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "ignore-walk": "^3.0.1",
-                                               "npm-bundled": "^1.0.1"
-                                       }
-                               },
-                               "npmlog": {
-                                       "version": "4.1.2",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "are-we-there-yet": "~1.1.2",
-                                               "console-control-strings": "~1.1.0",
-                                               "gauge": "~2.7.3",
-                                               "set-blocking": "~2.0.0"
-                                       }
-                               },
-                               "number-is-nan": {
-                                       "version": "1.0.1",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "object-assign": {
-                                       "version": "4.1.1",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "once": {
-                                       "version": "1.4.0",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "wrappy": "1"
-                                       }
-                               },
-                               "os-homedir": {
-                                       "version": "1.0.2",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "os-tmpdir": {
-                                       "version": "1.0.2",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "osenv": {
-                                       "version": "0.1.5",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "os-homedir": "^1.0.0",
-                                               "os-tmpdir": "^1.0.0"
-                                       }
-                               },
-                               "path-is-absolute": {
-                                       "version": "1.0.1",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "process-nextick-args": {
-                                       "version": "2.0.0",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "rc": {
-                                       "version": "1.2.8",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "deep-extend": "^0.6.0",
-                                               "ini": "~1.3.0",
-                                               "minimist": "^1.2.0",
-                                               "strip-json-comments": "~2.0.1"
-                                       },
-                                       "dependencies": {
-                                               "minimist": {
-                                                       "version": "1.2.0",
-                                                       "bundled": true,
-                                                       "dev": true,
-                                                       "optional": true
-                                               }
-                                       }
-                               },
-                               "readable-stream": {
-                                       "version": "2.3.6",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "core-util-is": "~1.0.0",
-                                               "inherits": "~2.0.3",
-                                               "isarray": "~1.0.0",
-                                               "process-nextick-args": "~2.0.0",
-                                               "safe-buffer": "~5.1.1",
-                                               "string_decoder": "~1.1.1",
-                                               "util-deprecate": "~1.0.1"
-                                       }
-                               },
-                               "rimraf": {
-                                       "version": "2.6.3",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "glob": "^7.1.3"
-                                       }
-                               },
-                               "safe-buffer": {
-                                       "version": "5.1.2",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "safer-buffer": {
-                                       "version": "2.1.2",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "sax": {
-                                       "version": "1.2.4",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "semver": {
-                                       "version": "5.7.0",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "set-blocking": {
-                                       "version": "2.0.0",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "signal-exit": {
-                                       "version": "3.0.2",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "string-width": {
-                                       "version": "1.0.2",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "code-point-at": "^1.0.0",
-                                               "is-fullwidth-code-point": "^1.0.0",
-                                               "strip-ansi": "^3.0.0"
-                                       }
-                               },
-                               "string_decoder": {
-                                       "version": "1.1.1",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "safe-buffer": "~5.1.0"
-                                       }
-                               },
-                               "strip-ansi": {
-                                       "version": "3.0.1",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "ansi-regex": "^2.0.0"
-                                       }
-                               },
-                               "strip-json-comments": {
-                                       "version": "2.0.1",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "tar": {
-                                       "version": "4.4.8",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "chownr": "^1.1.1",
-                                               "fs-minipass": "^1.2.5",
-                                               "minipass": "^2.3.4",
-                                               "minizlib": "^1.1.1",
-                                               "mkdirp": "^0.5.0",
-                                               "safe-buffer": "^5.1.2",
-                                               "yallist": "^3.0.2"
-                                       }
-                               },
-                               "util-deprecate": {
-                                       "version": "1.0.2",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "wide-align": {
-                                       "version": "1.1.3",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true,
-                                       "requires": {
-                                               "string-width": "^1.0.2 || 2"
-                                       }
-                               },
-                               "wrappy": {
-                                       "version": "1.0.2",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               },
-                               "yallist": {
-                                       "version": "3.0.3",
-                                       "bundled": true,
-                                       "dev": true,
-                                       "optional": true
-                               }
-                       }
-               },
-               "function-bind": {
-                       "version": "1.1.1",
-                       "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
-                       "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
-                       "dev": true
-               },
-               "get-caller-file": {
-                       "version": "2.0.5",
-                       "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
-                       "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
-                       "dev": true
-               },
-               "get-func-name": {
-                       "version": "2.0.0",
-                       "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz",
-                       "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=",
-                       "dev": true
-               },
-               "get-stream": {
-                       "version": "4.1.0",
-                       "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
-                       "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
+                       "version": "2.3.1",
+                       "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.1.tgz",
+                       "integrity": "sha512-YR47Eg4hChJGAB1O3yEAOkGO+rlzutoICGqGo9EZ4lKWokzZRSyIW1QmTzqjtw8MJdj9srP869CuWw/hyzSiBw==",
+                       "dev": true,
+                       "optional": true
+               },
+               "function-bind": {
+                       "version": "1.1.1",
+                       "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+                       "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
+                       "dev": true
+               },
+               "get-caller-file": {
+                       "version": "2.0.5",
+                       "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+                       "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
+                       "dev": true
+               },
+               "get-func-name": {
+                       "version": "2.0.0",
+                       "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz",
+                       "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=",
+                       "dev": true
+               },
+               "get-stream": {
+                       "version": "4.1.0",
+                       "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
+                       "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
                        "dev": true,
                        "requires": {
                                "pump": "^3.0.0"
                        }
                },
                "glob-parent": {
-                       "version": "3.1.0",
-                       "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
-                       "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
+                       "version": "5.1.1",
+                       "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
+                       "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==",
                        "dev": true,
+                       "optional": true,
                        "requires": {
-                               "is-glob": "^3.1.0",
-                               "path-dirname": "^1.0.0"
-                       },
-                       "dependencies": {
-                               "is-glob": {
-                                       "version": "3.1.0",
-                                       "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
-                                       "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
-                                       "dev": true,
-                                       "requires": {
-                                               "is-extglob": "^2.1.0"
-                                       }
-                               }
+                               "is-glob": "^4.0.1"
                        }
                },
                "global-modules": {
                        "dev": true
                },
                "ini": {
-                       "version": "1.3.5",
-                       "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
-                       "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
+                       "version": "1.3.8",
+                       "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
+                       "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
                        "dev": true
                },
                "interpret": {
                        }
                },
                "is-binary-path": {
-                       "version": "1.0.1",
-                       "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
-                       "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=",
+                       "version": "2.1.0",
+                       "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+                       "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
                        "dev": true,
+                       "optional": true,
                        "requires": {
-                               "binary-extensions": "^1.0.0"
+                               "binary-extensions": "^2.0.0"
                        }
                },
                "is-buffer": {
                        },
                        "dependencies": {
                                "minimist": {
-                                       "version": "1.2.0",
-                                       "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
-                                       "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
+                                       "version": "1.2.5",
+                                       "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
+                                       "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
                                        "dev": true
                                }
                        }
                },
                "kind-of": {
-                       "version": "6.0.2",
-                       "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
-                       "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
+                       "version": "6.0.3",
+                       "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
+                       "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
                        "dev": true
                },
                "lcid": {
                        }
                },
                "lodash": {
-                       "version": "4.17.15",
-                       "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
-                       "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+                       "version": "4.17.20",
+                       "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+                       "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
                        "dev": true
                },
                "log-symbols": {
                        }
                },
                "mkdirp": {
-                       "version": "0.5.1",
-                       "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
-                       "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
+                       "version": "0.5.5",
+                       "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+                       "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
                        "dev": true,
                        "requires": {
-                               "minimist": "0.0.8"
+                               "minimist": "^1.2.5"
+                       },
+                       "dependencies": {
+                               "minimist": {
+                                       "version": "1.2.5",
+                                       "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
+                                       "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
+                                       "dev": true
+                               }
                        }
                },
                "mocha": {
                                "yargs": "13.3.0",
                                "yargs-parser": "13.1.1",
                                "yargs-unparser": "1.6.0"
+                       },
+                       "dependencies": {
+                               "mkdirp": {
+                                       "version": "0.5.1",
+                                       "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
+                                       "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
+                                       "dev": true,
+                                       "requires": {
+                                               "minimist": "0.0.8"
+                                       }
+                               },
+                               "yargs-parser": {
+                                       "version": "13.1.1",
+                                       "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz",
+                                       "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==",
+                                       "dev": true,
+                                       "requires": {
+                                               "camelcase": "^5.0.0",
+                                               "decamelize": "^1.2.0"
+                                       }
+                               }
                        }
                },
                "move-concurrently": {
                        "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
                        "dev": true
                },
-               "nan": {
-                       "version": "2.14.0",
-                       "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz",
-                       "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==",
-                       "dev": true,
-                       "optional": true
-               },
                "nanomatch": {
                        "version": "1.2.13",
                        "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
                        "version": "3.0.0",
                        "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
                        "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
-                       "dev": true
+                       "dev": true,
+                       "optional": true
                },
                "npm-run-path": {
                        "version": "2.0.2",
                        "version": "1.0.2",
                        "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz",
                        "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=",
-                       "dev": true
+                       "dev": true,
+                       "optional": true
                },
                "path-exists": {
                        "version": "3.0.0",
                                "pump": {
                                        "version": "2.0.1",
                                        "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz",
-                                       "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==",
-                                       "dev": true,
-                                       "requires": {
-                                               "end-of-stream": "^1.1.0",
-                                               "once": "^1.3.1"
-                                       }
-                               }
-                       }
-               },
-               "punycode": {
-                       "version": "2.1.1",
-                       "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
-                       "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
-                       "dev": true
-               },
-               "querystring": {
-                       "version": "0.2.0",
-                       "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
-                       "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=",
-                       "dev": true
-               },
-               "querystring-es3": {
-                       "version": "0.2.1",
-                       "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz",
-                       "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=",
-                       "dev": true
-               },
-               "randombytes": {
-                       "version": "2.1.0",
-                       "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
-                       "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
-                       "dev": true,
-                       "requires": {
-                               "safe-buffer": "^5.1.0"
-                       }
-               },
-               "randomfill": {
-                       "version": "1.0.4",
-                       "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz",
-                       "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==",
-                       "dev": true,
-                       "requires": {
-                               "randombytes": "^2.0.5",
-                               "safe-buffer": "^5.1.0"
-                       }
-               },
-               "readable-stream": {
-                       "version": "2.3.6",
-                       "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
-                       "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
-                       "dev": true,
-                       "requires": {
-                               "core-util-is": "~1.0.0",
-                               "inherits": "~2.0.3",
-                               "isarray": "~1.0.0",
-                               "process-nextick-args": "~2.0.0",
-                               "safe-buffer": "~5.1.1",
-                               "string_decoder": "~1.1.1",
-                               "util-deprecate": "~1.0.1"
-                       }
-               },
-               "readdirp": {
-                       "version": "2.2.1",
-                       "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz",
-                       "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==",
-                       "dev": true,
-                       "requires": {
-                               "graceful-fs": "^4.1.11",
-                               "micromatch": "^3.1.10",
-                               "readable-stream": "^2.0.2"
-                       },
-                       "dependencies": {
-                               "braces": {
-                                       "version": "2.3.2",
-                                       "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
-                                       "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
-                                       "dev": true,
-                                       "requires": {
-                                               "arr-flatten": "^1.1.0",
-                                               "array-unique": "^0.3.2",
-                                               "extend-shallow": "^2.0.1",
-                                               "fill-range": "^4.0.0",
-                                               "isobject": "^3.0.1",
-                                               "repeat-element": "^1.1.2",
-                                               "snapdragon": "^0.8.1",
-                                               "snapdragon-node": "^2.0.1",
-                                               "split-string": "^3.0.2",
-                                               "to-regex": "^3.0.1"
-                                       },
-                                       "dependencies": {
-                                               "extend-shallow": {
-                                                       "version": "2.0.1",
-                                                       "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
-                                                       "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
-                                                       "dev": true,
-                                                       "requires": {
-                                                               "is-extendable": "^0.1.0"
-                                                       }
-                                               }
-                                       }
-                               },
-                               "fill-range": {
-                                       "version": "4.0.0",
-                                       "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
-                                       "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
-                                       "dev": true,
-                                       "requires": {
-                                               "extend-shallow": "^2.0.1",
-                                               "is-number": "^3.0.0",
-                                               "repeat-string": "^1.6.1",
-                                               "to-regex-range": "^2.1.0"
-                                       },
-                                       "dependencies": {
-                                               "extend-shallow": {
-                                                       "version": "2.0.1",
-                                                       "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
-                                                       "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
-                                                       "dev": true,
-                                                       "requires": {
-                                                               "is-extendable": "^0.1.0"
-                                                       }
-                                               }
-                                       }
-                               },
-                               "is-buffer": {
-                                       "version": "1.1.6",
-                                       "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
-                                       "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
-                                       "dev": true
-                               },
-                               "is-number": {
-                                       "version": "3.0.0",
-                                       "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
-                                       "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
-                                       "dev": true,
-                                       "requires": {
-                                               "kind-of": "^3.0.2"
-                                       },
-                                       "dependencies": {
-                                               "kind-of": {
-                                                       "version": "3.2.2",
-                                                       "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
-                                                       "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
-                                                       "dev": true,
-                                                       "requires": {
-                                                               "is-buffer": "^1.1.5"
-                                                       }
-                                               }
-                                       }
-                               },
-                               "micromatch": {
-                                       "version": "3.1.10",
-                                       "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
-                                       "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
-                                       "dev": true,
-                                       "requires": {
-                                               "arr-diff": "^4.0.0",
-                                               "array-unique": "^0.3.2",
-                                               "braces": "^2.3.1",
-                                               "define-property": "^2.0.2",
-                                               "extend-shallow": "^3.0.2",
-                                               "extglob": "^2.0.4",
-                                               "fragment-cache": "^0.2.1",
-                                               "kind-of": "^6.0.2",
-                                               "nanomatch": "^1.2.9",
-                                               "object.pick": "^1.3.0",
-                                               "regex-not": "^1.0.0",
-                                               "snapdragon": "^0.8.1",
-                                               "to-regex": "^3.0.2"
-                                       }
-                               },
-                               "to-regex-range": {
-                                       "version": "2.1.1",
-                                       "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
-                                       "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
+                                       "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==",
                                        "dev": true,
                                        "requires": {
-                                               "is-number": "^3.0.0",
-                                               "repeat-string": "^1.6.1"
+                                               "end-of-stream": "^1.1.0",
+                                               "once": "^1.3.1"
                                        }
                                }
                        }
                },
+               "punycode": {
+                       "version": "2.1.1",
+                       "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
+                       "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
+                       "dev": true
+               },
+               "querystring": {
+                       "version": "0.2.0",
+                       "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
+                       "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=",
+                       "dev": true
+               },
+               "querystring-es3": {
+                       "version": "0.2.1",
+                       "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz",
+                       "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=",
+                       "dev": true
+               },
+               "randombytes": {
+                       "version": "2.1.0",
+                       "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
+                       "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
+                       "dev": true,
+                       "requires": {
+                               "safe-buffer": "^5.1.0"
+                       }
+               },
+               "randomfill": {
+                       "version": "1.0.4",
+                       "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz",
+                       "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==",
+                       "dev": true,
+                       "requires": {
+                               "randombytes": "^2.0.5",
+                               "safe-buffer": "^5.1.0"
+                       }
+               },
+               "readable-stream": {
+                       "version": "2.3.6",
+                       "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+                       "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+                       "dev": true,
+                       "requires": {
+                               "core-util-is": "~1.0.0",
+                               "inherits": "~2.0.3",
+                               "isarray": "~1.0.0",
+                               "process-nextick-args": "~2.0.0",
+                               "safe-buffer": "~5.1.1",
+                               "string_decoder": "~1.1.1",
+                               "util-deprecate": "~1.0.1"
+                       }
+               },
+               "readdirp": {
+                       "version": "3.5.0",
+                       "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz",
+                       "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==",
+                       "dev": true,
+                       "optional": true,
+                       "requires": {
+                               "picomatch": "^2.2.1"
+                       },
+                       "dependencies": {
+                               "picomatch": {
+                                       "version": "2.2.2",
+                                       "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
+                                       "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==",
+                                       "dev": true,
+                                       "optional": true
+                               }
+                       }
+               },
                "regex-not": {
                        "version": "1.0.2",
                        "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",
                        "version": "1.1.0",
                        "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
                        "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=",
-                       "dev": true
+                       "dev": true,
+                       "optional": true
                },
                "repeat-element": {
                        "version": "1.1.3",
                        "dev": true
                },
                "serialize-javascript": {
-                       "version": "1.9.1",
-                       "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.9.1.tgz",
-                       "integrity": "sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A==",
-                       "dev": true
+                       "version": "4.0.0",
+                       "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz",
+                       "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==",
+                       "dev": true,
+                       "requires": {
+                               "randombytes": "^2.1.0"
+                       }
                },
                "set-blocking": {
                        "version": "2.0.0",
                        }
                },
                "source-map-support": {
-                       "version": "0.5.13",
-                       "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz",
-                       "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==",
+                       "version": "0.5.19",
+                       "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz",
+                       "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==",
                        "dev": true,
                        "requires": {
                                "buffer-from": "^1.0.0",
                        }
                },
                "stream-shift": {
-                       "version": "1.0.0",
-                       "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz",
-                       "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=",
+                       "version": "1.0.1",
+                       "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz",
+                       "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==",
                        "dev": true
                },
                "string-width": {
                        "dev": true
                },
                "terser": {
-                       "version": "4.3.8",
-                       "resolved": "https://registry.npmjs.org/terser/-/terser-4.3.8.tgz",
-                       "integrity": "sha512-otmIRlRVmLChAWsnSFNO0Bfk6YySuBp6G9qrHiJwlLDd4mxe2ta4sjI7TzIR+W1nBMjilzrMcPOz9pSusgx3hQ==",
+                       "version": "4.8.0",
+                       "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz",
+                       "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==",
                        "dev": true,
                        "requires": {
                                "commander": "^2.20.0",
                        }
                },
                "terser-webpack-plugin": {
-                       "version": "1.4.1",
-                       "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.1.tgz",
-                       "integrity": "sha512-ZXmmfiwtCLfz8WKZyYUuuHf3dMYEjg8NrjHMb0JqHVHVOSkzp3cW2/XG1fP3tRhqEqSzMwzzRQGtAPbs4Cncxg==",
+                       "version": "1.4.5",
+                       "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz",
+                       "integrity": "sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw==",
                        "dev": true,
                        "requires": {
                                "cacache": "^12.0.2",
                                "find-cache-dir": "^2.1.0",
                                "is-wsl": "^1.1.0",
                                "schema-utils": "^1.0.0",
-                               "serialize-javascript": "^1.7.0",
+                               "serialize-javascript": "^4.0.0",
                                "source-map": "^0.6.1",
                                "terser": "^4.1.2",
                                "webpack-sources": "^1.4.0",
                        "version": "1.2.0",
                        "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz",
                        "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==",
-                       "dev": true
+                       "dev": true,
+                       "optional": true
                },
                "uri-js": {
                        "version": "4.2.2",
                        "dev": true
                },
                "watchpack": {
-                       "version": "1.6.0",
-                       "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz",
-                       "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==",
+                       "version": "1.7.5",
+                       "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz",
+                       "integrity": "sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ==",
                        "dev": true,
                        "requires": {
-                               "chokidar": "^2.0.2",
+                               "chokidar": "^3.4.1",
                                "graceful-fs": "^4.1.2",
-                               "neo-async": "^2.5.0"
+                               "neo-async": "^2.5.0",
+                               "watchpack-chokidar2": "^2.0.1"
+                       }
+               },
+               "watchpack-chokidar2": {
+                       "version": "2.0.1",
+                       "resolved": "https://registry.npmjs.org/watchpack-chokidar2/-/watchpack-chokidar2-2.0.1.tgz",
+                       "integrity": "sha512-nCFfBIPKr5Sh61s4LPpy1Wtfi0HE8isJ3d2Yb5/Ppw2P2B/3eVSEBjKfN0fmHJSK14+31KwMKmcrzs2GM4P0Ww==",
+                       "dev": true,
+                       "optional": true,
+                       "requires": {
+                               "chokidar": "^2.1.8"
+                       },
+                       "dependencies": {
+                               "anymatch": {
+                                       "version": "2.0.0",
+                                       "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz",
+                                       "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==",
+                                       "dev": true,
+                                       "optional": true,
+                                       "requires": {
+                                               "micromatch": "^3.1.4",
+                                               "normalize-path": "^2.1.1"
+                                       },
+                                       "dependencies": {
+                                               "normalize-path": {
+                                                       "version": "2.1.1",
+                                                       "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
+                                                       "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
+                                                       "dev": true,
+                                                       "optional": true,
+                                                       "requires": {
+                                                               "remove-trailing-separator": "^1.0.1"
+                                                       }
+                                               }
+                                       }
+                               },
+                               "binary-extensions": {
+                                       "version": "1.13.1",
+                                       "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz",
+                                       "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==",
+                                       "dev": true,
+                                       "optional": true
+                               },
+                               "braces": {
+                                       "version": "2.3.2",
+                                       "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
+                                       "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
+                                       "dev": true,
+                                       "optional": true,
+                                       "requires": {
+                                               "arr-flatten": "^1.1.0",
+                                               "array-unique": "^0.3.2",
+                                               "extend-shallow": "^2.0.1",
+                                               "fill-range": "^4.0.0",
+                                               "isobject": "^3.0.1",
+                                               "repeat-element": "^1.1.2",
+                                               "snapdragon": "^0.8.1",
+                                               "snapdragon-node": "^2.0.1",
+                                               "split-string": "^3.0.2",
+                                               "to-regex": "^3.0.1"
+                                       },
+                                       "dependencies": {
+                                               "extend-shallow": {
+                                                       "version": "2.0.1",
+                                                       "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+                                                       "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+                                                       "dev": true,
+                                                       "optional": true,
+                                                       "requires": {
+                                                               "is-extendable": "^0.1.0"
+                                                       }
+                                               }
+                                       }
+                               },
+                               "chokidar": {
+                                       "version": "2.1.8",
+                                       "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz",
+                                       "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==",
+                                       "dev": true,
+                                       "optional": true,
+                                       "requires": {
+                                               "anymatch": "^2.0.0",
+                                               "async-each": "^1.0.1",
+                                               "braces": "^2.3.2",
+                                               "fsevents": "^1.2.7",
+                                               "glob-parent": "^3.1.0",
+                                               "inherits": "^2.0.3",
+                                               "is-binary-path": "^1.0.0",
+                                               "is-glob": "^4.0.0",
+                                               "normalize-path": "^3.0.0",
+                                               "path-is-absolute": "^1.0.0",
+                                               "readdirp": "^2.2.1",
+                                               "upath": "^1.1.1"
+                                       }
+                               },
+                               "fill-range": {
+                                       "version": "4.0.0",
+                                       "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
+                                       "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
+                                       "dev": true,
+                                       "optional": true,
+                                       "requires": {
+                                               "extend-shallow": "^2.0.1",
+                                               "is-number": "^3.0.0",
+                                               "repeat-string": "^1.6.1",
+                                               "to-regex-range": "^2.1.0"
+                                       },
+                                       "dependencies": {
+                                               "extend-shallow": {
+                                                       "version": "2.0.1",
+                                                       "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+                                                       "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+                                                       "dev": true,
+                                                       "optional": true,
+                                                       "requires": {
+                                                               "is-extendable": "^0.1.0"
+                                                       }
+                                               }
+                                       }
+                               },
+                               "fsevents": {
+                                       "version": "1.2.13",
+                                       "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
+                                       "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
+                                       "dev": true,
+                                       "optional": true
+                               },
+                               "glob-parent": {
+                                       "version": "3.1.0",
+                                       "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
+                                       "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
+                                       "dev": true,
+                                       "optional": true,
+                                       "requires": {
+                                               "is-glob": "^3.1.0",
+                                               "path-dirname": "^1.0.0"
+                                       },
+                                       "dependencies": {
+                                               "is-glob": {
+                                                       "version": "3.1.0",
+                                                       "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
+                                                       "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
+                                                       "dev": true,
+                                                       "optional": true,
+                                                       "requires": {
+                                                               "is-extglob": "^2.1.0"
+                                                       }
+                                               }
+                                       }
+                               },
+                               "is-binary-path": {
+                                       "version": "1.0.1",
+                                       "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
+                                       "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=",
+                                       "dev": true,
+                                       "optional": true,
+                                       "requires": {
+                                               "binary-extensions": "^1.0.0"
+                                       }
+                               },
+                               "is-buffer": {
+                                       "version": "1.1.6",
+                                       "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
+                                       "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
+                                       "dev": true,
+                                       "optional": true
+                               },
+                               "is-number": {
+                                       "version": "3.0.0",
+                                       "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+                                       "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
+                                       "dev": true,
+                                       "optional": true,
+                                       "requires": {
+                                               "kind-of": "^3.0.2"
+                                       },
+                                       "dependencies": {
+                                               "kind-of": {
+                                                       "version": "3.2.2",
+                                                       "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+                                                       "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+                                                       "dev": true,
+                                                       "optional": true,
+                                                       "requires": {
+                                                               "is-buffer": "^1.1.5"
+                                                       }
+                                               }
+                                       }
+                               },
+                               "micromatch": {
+                                       "version": "3.1.10",
+                                       "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
+                                       "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
+                                       "dev": true,
+                                       "optional": true,
+                                       "requires": {
+                                               "arr-diff": "^4.0.0",
+                                               "array-unique": "^0.3.2",
+                                               "braces": "^2.3.1",
+                                               "define-property": "^2.0.2",
+                                               "extend-shallow": "^3.0.2",
+                                               "extglob": "^2.0.4",
+                                               "fragment-cache": "^0.2.1",
+                                               "kind-of": "^6.0.2",
+                                               "nanomatch": "^1.2.9",
+                                               "object.pick": "^1.3.0",
+                                               "regex-not": "^1.0.0",
+                                               "snapdragon": "^0.8.1",
+                                               "to-regex": "^3.0.2"
+                                       }
+                               },
+                               "readdirp": {
+                                       "version": "2.2.1",
+                                       "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz",
+                                       "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==",
+                                       "dev": true,
+                                       "optional": true,
+                                       "requires": {
+                                               "graceful-fs": "^4.1.11",
+                                               "micromatch": "^3.1.10",
+                                               "readable-stream": "^2.0.2"
+                                       }
+                               },
+                               "to-regex-range": {
+                                       "version": "2.1.1",
+                                       "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
+                                       "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
+                                       "dev": true,
+                                       "optional": true,
+                                       "requires": {
+                                               "is-number": "^3.0.0",
+                                               "repeat-string": "^1.6.1"
+                                       }
+                               }
                        }
                },
                "webpack": {
                                                "regex-not": "^1.0.0",
                                                "snapdragon": "^0.8.1",
                                                "to-regex": "^3.0.2"
+                                       },
+                                       "dependencies": {
+                                               "kind-of": {
+                                                       "version": "6.0.3",
+                                                       "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
+                                                       "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
+                                                       "dev": true
+                                               }
                                        }
                                },
                                "to-regex-range": {
                        }
                },
                "yargs-parser": {
-                       "version": "13.1.1",
-                       "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz",
-                       "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==",
+                       "version": "13.1.2",
+                       "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
+                       "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
                        "dev": true,
                        "requires": {
                                "camelcase": "^5.0.0",
index 5b46d84e29dbc3e337e826f62c4e52348395bd87..b5f10c3799d76f4f9924dc279c81a513cb781f54 100644 (file)
@@ -1,6 +1,6 @@
 {
        "name": "nanocurrency-web",
-       "version": "1.2.2",
+       "version": "1.3.0",
        "description": "Toolkit for Nano cryptocurrency client side offline integrations",
        "author": "Miro Metsänheimo <miro@metsanheimo.fi>",
        "license": "MIT",
index a93b9ad02d03744e591d9654c66a560307148a78..6fb57be3295d7809a4783d1f122b7c2f99e263b2 100644 (file)
@@ -56,7 +56,7 @@ describe('generate wallet test', () => {
 
 })
 
-// Test vectors from https://docs.nano.org/integration-guides/key-management/
+// Test vectors from https://docs.nano.org/integration-guides/key-management/ and elsewhere
 describe('import wallet with test vectors test', () => {
 
        it('should successfully import a wallet with the official Nano test vectors mnemonic', () => {
@@ -94,7 +94,7 @@ describe('import wallet with test vectors test', () => {
                expect(result).to.have.own.property('mnemonic')
                expect(result).to.have.own.property('seed')
                expect(result).to.have.own.property('accounts')
-               expect(result.mnemonic).to.be.undefined
+               expect(result.mnemonic).to.equal('abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon art')
                expect(result.seed).to.equal('0000000000000000000000000000000000000000000000000000000000000000')
                expect(result.accounts[0].privateKey).to.equal('9f0e444c69f77a49bd0be89db92c38fe713e0963165cca12faf5712d7657120f')
                expect(result.accounts[0].publicKey).to.equal('c008b814a7d269a1fa3c6528b19201a24d797912db9996ff02a1ff356e45552b')
@@ -123,6 +123,19 @@ describe('import wallet with test vectors test', () => {
                expect(() => wallet.generate('0gc285fde768f7ff29b66ce7252d56ed92fe003b605907f7a4f683c3dc8586d34a914d3c71fc099bb38ee4a59e5b081a3497b7a323e90cc68f67b5837690310c')).to.throw(Error)
        })
 
+       it('should successfully create a new legacy wallet and get the same result from importing one from the mnemonic', () => {
+               const result = wallet.generateLegacy('BE3E51EE51BAB11950B2495013512FEB110D9898B4137DA268709621CE2862F4')
+               expect(result).to.have.own.property('mnemonic')
+               expect(result).to.have.own.property('seed')
+               expect(result).to.have.own.property('accounts')
+               expect(result.mnemonic).to.equal('sail verb knee pet prison million drift empty exotic once episode stomach awkward slush glare list laundry battle bring clump brother before mesh pair')
+
+               const imported = wallet.fromLegacyMnemonic(result.mnemonic)
+               expect(imported.mnemonic).to.equal(result.mnemonic)
+               expect(imported.seed.toUpperCase()).to.equal(result.seed)
+               expect(imported.accounts[0].privateKey).to.equal(result.accounts[0].privateKey)
+       })
+
 })
 
 describe('derive more accounts from the same seed test', () => {