diff --git a/.mocharc.json b/.mocharc.json index be224ea..731b4cd 100644 --- a/.mocharc.json +++ b/.mocharc.json @@ -4,5 +4,8 @@ "node-option": [ "experimental-specifier-resolution=node", "loader=ts-node/esm" + ], + "require": [ + "test/babel-register.js" ] } diff --git a/package.json b/package.json index fa0e84e..8416bee 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,10 @@ "types": "lib/index.d.ts", "dependencies": {}, "devDependencies": { + "@babel/core": "^7.20.12", + "@babel/preset-env": "^7.20.2", + "@babel/preset-typescript": "^7.18.6", + "@babel/register": "^7.18.9", "@types/expect": "^24.3.0", "@types/mocha": "^10.0.0", "@types/node": "^18.11.4", diff --git a/test/babel-register.js b/test/babel-register.js new file mode 100644 index 0000000..e700699 --- /dev/null +++ b/test/babel-register.js @@ -0,0 +1,6 @@ +const register = require("@babel/register").default; + +register({ + extensions: [".ts", ".js"], + presets: ["@babel/preset-env", "@babel/preset-typescript"], +}); diff --git a/test/test.rsa.bundle.js b/test/test.rsa.bundle.js index b1948ae..e1b7f83 100644 --- a/test/test.rsa.bundle.js +++ b/test/test.rsa.bundle.js @@ -532,7 +532,7 @@ eval("\n\n/* !\n * Chai - checkError utility\n * Copyright(c) 2012-2016 Jake Lue /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; -eval("\n/* globals Symbol: false, Uint8Array: false, WeakMap: false */\n/*!\n * deep-eql\n * Copyright(c) 2013 Jake Luer \n * MIT Licensed\n */\n\nvar type = __webpack_require__(/*! type-detect */ \"./node_modules/type-detect/type-detect.js\");\nfunction FakeMap() {\n this._key = 'chai/deep-eql__' + Math.random() + Date.now();\n}\n\nFakeMap.prototype = {\n get: function getMap(key) {\n return key[this._key];\n },\n set: function setMap(key, value) {\n if (Object.isExtensible(key)) {\n Object.defineProperty(key, this._key, {\n value: value,\n configurable: true,\n });\n }\n },\n};\n\nvar MemoizeMap = typeof WeakMap === 'function' ? WeakMap : FakeMap;\n/*!\n * Check to see if the MemoizeMap has recorded a result of the two operands\n *\n * @param {Mixed} leftHandOperand\n * @param {Mixed} rightHandOperand\n * @param {MemoizeMap} memoizeMap\n * @returns {Boolean|null} result\n*/\nfunction memoizeCompare(leftHandOperand, rightHandOperand, memoizeMap) {\n // Technically, WeakMap keys can *only* be objects, not primitives.\n if (!memoizeMap || isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) {\n return null;\n }\n var leftHandMap = memoizeMap.get(leftHandOperand);\n if (leftHandMap) {\n var result = leftHandMap.get(rightHandOperand);\n if (typeof result === 'boolean') {\n return result;\n }\n }\n return null;\n}\n\n/*!\n * Set the result of the equality into the MemoizeMap\n *\n * @param {Mixed} leftHandOperand\n * @param {Mixed} rightHandOperand\n * @param {MemoizeMap} memoizeMap\n * @param {Boolean} result\n*/\nfunction memoizeSet(leftHandOperand, rightHandOperand, memoizeMap, result) {\n // Technically, WeakMap keys can *only* be objects, not primitives.\n if (!memoizeMap || isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) {\n return;\n }\n var leftHandMap = memoizeMap.get(leftHandOperand);\n if (leftHandMap) {\n leftHandMap.set(rightHandOperand, result);\n } else {\n leftHandMap = new MemoizeMap();\n leftHandMap.set(rightHandOperand, result);\n memoizeMap.set(leftHandOperand, leftHandMap);\n }\n}\n\n/*!\n * Primary Export\n */\n\nmodule.exports = deepEqual;\nmodule.exports.MemoizeMap = MemoizeMap;\n\n/**\n * Assert deeply nested sameValue equality between two objects of any type.\n *\n * @param {Mixed} leftHandOperand\n * @param {Mixed} rightHandOperand\n * @param {Object} [options] (optional) Additional options\n * @param {Array} [options.comparator] (optional) Override default algorithm, determining custom equality.\n * @param {Array} [options.memoize] (optional) Provide a custom memoization object which will cache the results of\n complex objects for a speed boost. By passing `false` you can disable memoization, but this will cause circular\n references to blow the stack.\n * @return {Boolean} equal match\n */\nfunction deepEqual(leftHandOperand, rightHandOperand, options) {\n // If we have a comparator, we can't assume anything; so bail to its check first.\n if (options && options.comparator) {\n return extensiveDeepEqual(leftHandOperand, rightHandOperand, options);\n }\n\n var simpleResult = simpleEqual(leftHandOperand, rightHandOperand);\n if (simpleResult !== null) {\n return simpleResult;\n }\n\n // Deeper comparisons are pushed through to a larger function\n return extensiveDeepEqual(leftHandOperand, rightHandOperand, options);\n}\n\n/**\n * Many comparisons can be canceled out early via simple equality or primitive checks.\n * @param {Mixed} leftHandOperand\n * @param {Mixed} rightHandOperand\n * @return {Boolean|null} equal match\n */\nfunction simpleEqual(leftHandOperand, rightHandOperand) {\n // Equal references (except for Numbers) can be returned early\n if (leftHandOperand === rightHandOperand) {\n // Handle +-0 cases\n return leftHandOperand !== 0 || 1 / leftHandOperand === 1 / rightHandOperand;\n }\n\n // handle NaN cases\n if (\n leftHandOperand !== leftHandOperand && // eslint-disable-line no-self-compare\n rightHandOperand !== rightHandOperand // eslint-disable-line no-self-compare\n ) {\n return true;\n }\n\n // Anything that is not an 'object', i.e. symbols, functions, booleans, numbers,\n // strings, and undefined, can be compared by reference.\n if (isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) {\n // Easy out b/c it would have passed the first equality check\n return false;\n }\n return null;\n}\n\n/*!\n * The main logic of the `deepEqual` function.\n *\n * @param {Mixed} leftHandOperand\n * @param {Mixed} rightHandOperand\n * @param {Object} [options] (optional) Additional options\n * @param {Array} [options.comparator] (optional) Override default algorithm, determining custom equality.\n * @param {Array} [options.memoize] (optional) Provide a custom memoization object which will cache the results of\n complex objects for a speed boost. By passing `false` you can disable memoization, but this will cause circular\n references to blow the stack.\n * @return {Boolean} equal match\n*/\nfunction extensiveDeepEqual(leftHandOperand, rightHandOperand, options) {\n options = options || {};\n options.memoize = options.memoize === false ? false : options.memoize || new MemoizeMap();\n var comparator = options && options.comparator;\n\n // Check if a memoized result exists.\n var memoizeResultLeft = memoizeCompare(leftHandOperand, rightHandOperand, options.memoize);\n if (memoizeResultLeft !== null) {\n return memoizeResultLeft;\n }\n var memoizeResultRight = memoizeCompare(rightHandOperand, leftHandOperand, options.memoize);\n if (memoizeResultRight !== null) {\n return memoizeResultRight;\n }\n\n // If a comparator is present, use it.\n if (comparator) {\n var comparatorResult = comparator(leftHandOperand, rightHandOperand);\n // Comparators may return null, in which case we want to go back to default behavior.\n if (comparatorResult === false || comparatorResult === true) {\n memoizeSet(leftHandOperand, rightHandOperand, options.memoize, comparatorResult);\n return comparatorResult;\n }\n // To allow comparators to override *any* behavior, we ran them first. Since it didn't decide\n // what to do, we need to make sure to return the basic tests first before we move on.\n var simpleResult = simpleEqual(leftHandOperand, rightHandOperand);\n if (simpleResult !== null) {\n // Don't memoize this, it takes longer to set/retrieve than to just compare.\n return simpleResult;\n }\n }\n\n var leftHandType = type(leftHandOperand);\n if (leftHandType !== type(rightHandOperand)) {\n memoizeSet(leftHandOperand, rightHandOperand, options.memoize, false);\n return false;\n }\n\n // Temporarily set the operands in the memoize object to prevent blowing the stack\n memoizeSet(leftHandOperand, rightHandOperand, options.memoize, true);\n\n var result = extensiveDeepEqualByType(leftHandOperand, rightHandOperand, leftHandType, options);\n memoizeSet(leftHandOperand, rightHandOperand, options.memoize, result);\n return result;\n}\n\nfunction extensiveDeepEqualByType(leftHandOperand, rightHandOperand, leftHandType, options) {\n switch (leftHandType) {\n case 'String':\n case 'Number':\n case 'Boolean':\n case 'Date':\n // If these types are their instance types (e.g. `new Number`) then re-deepEqual against their values\n return deepEqual(leftHandOperand.valueOf(), rightHandOperand.valueOf());\n case 'Promise':\n case 'Symbol':\n case 'function':\n case 'WeakMap':\n case 'WeakSet':\n case 'Error':\n return leftHandOperand === rightHandOperand;\n case 'Arguments':\n case 'Int8Array':\n case 'Uint8Array':\n case 'Uint8ClampedArray':\n case 'Int16Array':\n case 'Uint16Array':\n case 'Int32Array':\n case 'Uint32Array':\n case 'Float32Array':\n case 'Float64Array':\n case 'Array':\n return iterableEqual(leftHandOperand, rightHandOperand, options);\n case 'RegExp':\n return regexpEqual(leftHandOperand, rightHandOperand);\n case 'Generator':\n return generatorEqual(leftHandOperand, rightHandOperand, options);\n case 'DataView':\n return iterableEqual(new Uint8Array(leftHandOperand.buffer), new Uint8Array(rightHandOperand.buffer), options);\n case 'ArrayBuffer':\n return iterableEqual(new Uint8Array(leftHandOperand), new Uint8Array(rightHandOperand), options);\n case 'Set':\n return entriesEqual(leftHandOperand, rightHandOperand, options);\n case 'Map':\n return entriesEqual(leftHandOperand, rightHandOperand, options);\n default:\n return objectEqual(leftHandOperand, rightHandOperand, options);\n }\n}\n\n/*!\n * Compare two Regular Expressions for equality.\n *\n * @param {RegExp} leftHandOperand\n * @param {RegExp} rightHandOperand\n * @return {Boolean} result\n */\n\nfunction regexpEqual(leftHandOperand, rightHandOperand) {\n return leftHandOperand.toString() === rightHandOperand.toString();\n}\n\n/*!\n * Compare two Sets/Maps for equality. Faster than other equality functions.\n *\n * @param {Set} leftHandOperand\n * @param {Set} rightHandOperand\n * @param {Object} [options] (Optional)\n * @return {Boolean} result\n */\n\nfunction entriesEqual(leftHandOperand, rightHandOperand, options) {\n // IE11 doesn't support Set#entries or Set#@@iterator, so we need manually populate using Set#forEach\n if (leftHandOperand.size !== rightHandOperand.size) {\n return false;\n }\n if (leftHandOperand.size === 0) {\n return true;\n }\n var leftHandItems = [];\n var rightHandItems = [];\n leftHandOperand.forEach(function gatherEntries(key, value) {\n leftHandItems.push([ key, value ]);\n });\n rightHandOperand.forEach(function gatherEntries(key, value) {\n rightHandItems.push([ key, value ]);\n });\n return iterableEqual(leftHandItems.sort(), rightHandItems.sort(), options);\n}\n\n/*!\n * Simple equality for flat iterable objects such as Arrays, TypedArrays or Node.js buffers.\n *\n * @param {Iterable} leftHandOperand\n * @param {Iterable} rightHandOperand\n * @param {Object} [options] (Optional)\n * @return {Boolean} result\n */\n\nfunction iterableEqual(leftHandOperand, rightHandOperand, options) {\n var length = leftHandOperand.length;\n if (length !== rightHandOperand.length) {\n return false;\n }\n if (length === 0) {\n return true;\n }\n var index = -1;\n while (++index < length) {\n if (deepEqual(leftHandOperand[index], rightHandOperand[index], options) === false) {\n return false;\n }\n }\n return true;\n}\n\n/*!\n * Simple equality for generator objects such as those returned by generator functions.\n *\n * @param {Iterable} leftHandOperand\n * @param {Iterable} rightHandOperand\n * @param {Object} [options] (Optional)\n * @return {Boolean} result\n */\n\nfunction generatorEqual(leftHandOperand, rightHandOperand, options) {\n return iterableEqual(getGeneratorEntries(leftHandOperand), getGeneratorEntries(rightHandOperand), options);\n}\n\n/*!\n * Determine if the given object has an @@iterator function.\n *\n * @param {Object} target\n * @return {Boolean} `true` if the object has an @@iterator function.\n */\nfunction hasIteratorFunction(target) {\n return typeof Symbol !== 'undefined' &&\n typeof target === 'object' &&\n typeof Symbol.iterator !== 'undefined' &&\n typeof target[Symbol.iterator] === 'function';\n}\n\n/*!\n * Gets all iterator entries from the given Object. If the Object has no @@iterator function, returns an empty array.\n * This will consume the iterator - which could have side effects depending on the @@iterator implementation.\n *\n * @param {Object} target\n * @returns {Array} an array of entries from the @@iterator function\n */\nfunction getIteratorEntries(target) {\n if (hasIteratorFunction(target)) {\n try {\n return getGeneratorEntries(target[Symbol.iterator]());\n } catch (iteratorError) {\n return [];\n }\n }\n return [];\n}\n\n/*!\n * Gets all entries from a Generator. This will consume the generator - which could have side effects.\n *\n * @param {Generator} target\n * @returns {Array} an array of entries from the Generator.\n */\nfunction getGeneratorEntries(generator) {\n var generatorResult = generator.next();\n var accumulator = [ generatorResult.value ];\n while (generatorResult.done === false) {\n generatorResult = generator.next();\n accumulator.push(generatorResult.value);\n }\n return accumulator;\n}\n\n/*!\n * Gets all own and inherited enumerable keys from a target.\n *\n * @param {Object} target\n * @returns {Array} an array of own and inherited enumerable keys from the target.\n */\nfunction getEnumerableKeys(target) {\n var keys = [];\n for (var key in target) {\n keys.push(key);\n }\n return keys;\n}\n\n/*!\n * Determines if two objects have matching values, given a set of keys. Defers to deepEqual for the equality check of\n * each key. If any value of the given key is not equal, the function will return false (early).\n *\n * @param {Mixed} leftHandOperand\n * @param {Mixed} rightHandOperand\n * @param {Array} keys An array of keys to compare the values of leftHandOperand and rightHandOperand against\n * @param {Object} [options] (Optional)\n * @return {Boolean} result\n */\nfunction keysEqual(leftHandOperand, rightHandOperand, keys, options) {\n var length = keys.length;\n if (length === 0) {\n return true;\n }\n for (var i = 0; i < length; i += 1) {\n if (deepEqual(leftHandOperand[keys[i]], rightHandOperand[keys[i]], options) === false) {\n return false;\n }\n }\n return true;\n}\n\n/*!\n * Recursively check the equality of two Objects. Once basic sameness has been established it will defer to `deepEqual`\n * for each enumerable key in the object.\n *\n * @param {Mixed} leftHandOperand\n * @param {Mixed} rightHandOperand\n * @param {Object} [options] (Optional)\n * @return {Boolean} result\n */\n\nfunction objectEqual(leftHandOperand, rightHandOperand, options) {\n var leftHandKeys = getEnumerableKeys(leftHandOperand);\n var rightHandKeys = getEnumerableKeys(rightHandOperand);\n if (leftHandKeys.length && leftHandKeys.length === rightHandKeys.length) {\n leftHandKeys.sort();\n rightHandKeys.sort();\n if (iterableEqual(leftHandKeys, rightHandKeys) === false) {\n return false;\n }\n return keysEqual(leftHandOperand, rightHandOperand, leftHandKeys, options);\n }\n\n var leftHandEntries = getIteratorEntries(leftHandOperand);\n var rightHandEntries = getIteratorEntries(rightHandOperand);\n if (leftHandEntries.length && leftHandEntries.length === rightHandEntries.length) {\n leftHandEntries.sort();\n rightHandEntries.sort();\n return iterableEqual(leftHandEntries, rightHandEntries, options);\n }\n\n if (leftHandKeys.length === 0 &&\n leftHandEntries.length === 0 &&\n rightHandKeys.length === 0 &&\n rightHandEntries.length === 0) {\n return true;\n }\n\n return false;\n}\n\n/*!\n * Returns true if the argument is a primitive.\n *\n * This intentionally returns true for all objects that can be compared by reference,\n * including functions and symbols.\n *\n * @param {Mixed} value\n * @return {Boolean} result\n */\nfunction isPrimitive(value) {\n return value === null || typeof value !== 'object';\n}\n\n\n//# sourceURL=webpack://JSEncrypt/./node_modules/deep-eql/index.js?"); +eval("\n/* globals Symbol: false, Uint8Array: false, WeakMap: false */\n/*!\n * deep-eql\n * Copyright(c) 2013 Jake Luer \n * MIT Licensed\n */\n\nvar type = __webpack_require__(/*! type-detect */ \"./node_modules/type-detect/type-detect.js\");\nfunction FakeMap() {\n this._key = 'chai/deep-eql__' + Math.random() + Date.now();\n}\n\nFakeMap.prototype = {\n get: function get(key) {\n return key[this._key];\n },\n set: function set(key, value) {\n if (Object.isExtensible(key)) {\n Object.defineProperty(key, this._key, {\n value: value,\n configurable: true,\n });\n }\n },\n};\n\nvar MemoizeMap = typeof WeakMap === 'function' ? WeakMap : FakeMap;\n/*!\n * Check to see if the MemoizeMap has recorded a result of the two operands\n *\n * @param {Mixed} leftHandOperand\n * @param {Mixed} rightHandOperand\n * @param {MemoizeMap} memoizeMap\n * @returns {Boolean|null} result\n*/\nfunction memoizeCompare(leftHandOperand, rightHandOperand, memoizeMap) {\n // Technically, WeakMap keys can *only* be objects, not primitives.\n if (!memoizeMap || isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) {\n return null;\n }\n var leftHandMap = memoizeMap.get(leftHandOperand);\n if (leftHandMap) {\n var result = leftHandMap.get(rightHandOperand);\n if (typeof result === 'boolean') {\n return result;\n }\n }\n return null;\n}\n\n/*!\n * Set the result of the equality into the MemoizeMap\n *\n * @param {Mixed} leftHandOperand\n * @param {Mixed} rightHandOperand\n * @param {MemoizeMap} memoizeMap\n * @param {Boolean} result\n*/\nfunction memoizeSet(leftHandOperand, rightHandOperand, memoizeMap, result) {\n // Technically, WeakMap keys can *only* be objects, not primitives.\n if (!memoizeMap || isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) {\n return;\n }\n var leftHandMap = memoizeMap.get(leftHandOperand);\n if (leftHandMap) {\n leftHandMap.set(rightHandOperand, result);\n } else {\n leftHandMap = new MemoizeMap();\n leftHandMap.set(rightHandOperand, result);\n memoizeMap.set(leftHandOperand, leftHandMap);\n }\n}\n\n/*!\n * Primary Export\n */\n\nmodule.exports = deepEqual;\nmodule.exports.MemoizeMap = MemoizeMap;\n\n/**\n * Assert deeply nested sameValue equality between two objects of any type.\n *\n * @param {Mixed} leftHandOperand\n * @param {Mixed} rightHandOperand\n * @param {Object} [options] (optional) Additional options\n * @param {Array} [options.comparator] (optional) Override default algorithm, determining custom equality.\n * @param {Array} [options.memoize] (optional) Provide a custom memoization object which will cache the results of\n complex objects for a speed boost. By passing `false` you can disable memoization, but this will cause circular\n references to blow the stack.\n * @return {Boolean} equal match\n */\nfunction deepEqual(leftHandOperand, rightHandOperand, options) {\n // If we have a comparator, we can't assume anything; so bail to its check first.\n if (options && options.comparator) {\n return extensiveDeepEqual(leftHandOperand, rightHandOperand, options);\n }\n\n var simpleResult = simpleEqual(leftHandOperand, rightHandOperand);\n if (simpleResult !== null) {\n return simpleResult;\n }\n\n // Deeper comparisons are pushed through to a larger function\n return extensiveDeepEqual(leftHandOperand, rightHandOperand, options);\n}\n\n/**\n * Many comparisons can be canceled out early via simple equality or primitive checks.\n * @param {Mixed} leftHandOperand\n * @param {Mixed} rightHandOperand\n * @return {Boolean|null} equal match\n */\nfunction simpleEqual(leftHandOperand, rightHandOperand) {\n // Equal references (except for Numbers) can be returned early\n if (leftHandOperand === rightHandOperand) {\n // Handle +-0 cases\n return leftHandOperand !== 0 || 1 / leftHandOperand === 1 / rightHandOperand;\n }\n\n // handle NaN cases\n if (\n leftHandOperand !== leftHandOperand && // eslint-disable-line no-self-compare\n rightHandOperand !== rightHandOperand // eslint-disable-line no-self-compare\n ) {\n return true;\n }\n\n // Anything that is not an 'object', i.e. symbols, functions, booleans, numbers,\n // strings, and undefined, can be compared by reference.\n if (isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) {\n // Easy out b/c it would have passed the first equality check\n return false;\n }\n return null;\n}\n\n/*!\n * The main logic of the `deepEqual` function.\n *\n * @param {Mixed} leftHandOperand\n * @param {Mixed} rightHandOperand\n * @param {Object} [options] (optional) Additional options\n * @param {Array} [options.comparator] (optional) Override default algorithm, determining custom equality.\n * @param {Array} [options.memoize] (optional) Provide a custom memoization object which will cache the results of\n complex objects for a speed boost. By passing `false` you can disable memoization, but this will cause circular\n references to blow the stack.\n * @return {Boolean} equal match\n*/\nfunction extensiveDeepEqual(leftHandOperand, rightHandOperand, options) {\n options = options || {};\n options.memoize = options.memoize === false ? false : options.memoize || new MemoizeMap();\n var comparator = options && options.comparator;\n\n // Check if a memoized result exists.\n var memoizeResultLeft = memoizeCompare(leftHandOperand, rightHandOperand, options.memoize);\n if (memoizeResultLeft !== null) {\n return memoizeResultLeft;\n }\n var memoizeResultRight = memoizeCompare(rightHandOperand, leftHandOperand, options.memoize);\n if (memoizeResultRight !== null) {\n return memoizeResultRight;\n }\n\n // If a comparator is present, use it.\n if (comparator) {\n var comparatorResult = comparator(leftHandOperand, rightHandOperand);\n // Comparators may return null, in which case we want to go back to default behavior.\n if (comparatorResult === false || comparatorResult === true) {\n memoizeSet(leftHandOperand, rightHandOperand, options.memoize, comparatorResult);\n return comparatorResult;\n }\n // To allow comparators to override *any* behavior, we ran them first. Since it didn't decide\n // what to do, we need to make sure to return the basic tests first before we move on.\n var simpleResult = simpleEqual(leftHandOperand, rightHandOperand);\n if (simpleResult !== null) {\n // Don't memoize this, it takes longer to set/retrieve than to just compare.\n return simpleResult;\n }\n }\n\n var leftHandType = type(leftHandOperand);\n if (leftHandType !== type(rightHandOperand)) {\n memoizeSet(leftHandOperand, rightHandOperand, options.memoize, false);\n return false;\n }\n\n // Temporarily set the operands in the memoize object to prevent blowing the stack\n memoizeSet(leftHandOperand, rightHandOperand, options.memoize, true);\n\n var result = extensiveDeepEqualByType(leftHandOperand, rightHandOperand, leftHandType, options);\n memoizeSet(leftHandOperand, rightHandOperand, options.memoize, result);\n return result;\n}\n\nfunction extensiveDeepEqualByType(leftHandOperand, rightHandOperand, leftHandType, options) {\n switch (leftHandType) {\n case 'String':\n case 'Number':\n case 'Boolean':\n case 'Date':\n // If these types are their instance types (e.g. `new Number`) then re-deepEqual against their values\n return deepEqual(leftHandOperand.valueOf(), rightHandOperand.valueOf());\n case 'Promise':\n case 'Symbol':\n case 'function':\n case 'WeakMap':\n case 'WeakSet':\n return leftHandOperand === rightHandOperand;\n case 'Error':\n return keysEqual(leftHandOperand, rightHandOperand, [ 'name', 'message', 'code' ], options);\n case 'Arguments':\n case 'Int8Array':\n case 'Uint8Array':\n case 'Uint8ClampedArray':\n case 'Int16Array':\n case 'Uint16Array':\n case 'Int32Array':\n case 'Uint32Array':\n case 'Float32Array':\n case 'Float64Array':\n case 'Array':\n return iterableEqual(leftHandOperand, rightHandOperand, options);\n case 'RegExp':\n return regexpEqual(leftHandOperand, rightHandOperand);\n case 'Generator':\n return generatorEqual(leftHandOperand, rightHandOperand, options);\n case 'DataView':\n return iterableEqual(new Uint8Array(leftHandOperand.buffer), new Uint8Array(rightHandOperand.buffer), options);\n case 'ArrayBuffer':\n return iterableEqual(new Uint8Array(leftHandOperand), new Uint8Array(rightHandOperand), options);\n case 'Set':\n return entriesEqual(leftHandOperand, rightHandOperand, options);\n case 'Map':\n return entriesEqual(leftHandOperand, rightHandOperand, options);\n case 'Temporal.PlainDate':\n case 'Temporal.PlainTime':\n case 'Temporal.PlainDateTime':\n case 'Temporal.Instant':\n case 'Temporal.ZonedDateTime':\n case 'Temporal.PlainYearMonth':\n case 'Temporal.PlainMonthDay':\n return leftHandOperand.equals(rightHandOperand);\n case 'Temporal.Duration':\n return leftHandOperand.total('nanoseconds') === rightHandOperand.total('nanoseconds');\n case 'Temporal.TimeZone':\n case 'Temporal.Calendar':\n return leftHandOperand.toString() === rightHandOperand.toString();\n default:\n return objectEqual(leftHandOperand, rightHandOperand, options);\n }\n}\n\n/*!\n * Compare two Regular Expressions for equality.\n *\n * @param {RegExp} leftHandOperand\n * @param {RegExp} rightHandOperand\n * @return {Boolean} result\n */\n\nfunction regexpEqual(leftHandOperand, rightHandOperand) {\n return leftHandOperand.toString() === rightHandOperand.toString();\n}\n\n/*!\n * Compare two Sets/Maps for equality. Faster than other equality functions.\n *\n * @param {Set} leftHandOperand\n * @param {Set} rightHandOperand\n * @param {Object} [options] (Optional)\n * @return {Boolean} result\n */\n\nfunction entriesEqual(leftHandOperand, rightHandOperand, options) {\n // IE11 doesn't support Set#entries or Set#@@iterator, so we need manually populate using Set#forEach\n if (leftHandOperand.size !== rightHandOperand.size) {\n return false;\n }\n if (leftHandOperand.size === 0) {\n return true;\n }\n var leftHandItems = [];\n var rightHandItems = [];\n leftHandOperand.forEach(function gatherEntries(key, value) {\n leftHandItems.push([ key, value ]);\n });\n rightHandOperand.forEach(function gatherEntries(key, value) {\n rightHandItems.push([ key, value ]);\n });\n return iterableEqual(leftHandItems.sort(), rightHandItems.sort(), options);\n}\n\n/*!\n * Simple equality for flat iterable objects such as Arrays, TypedArrays or Node.js buffers.\n *\n * @param {Iterable} leftHandOperand\n * @param {Iterable} rightHandOperand\n * @param {Object} [options] (Optional)\n * @return {Boolean} result\n */\n\nfunction iterableEqual(leftHandOperand, rightHandOperand, options) {\n var length = leftHandOperand.length;\n if (length !== rightHandOperand.length) {\n return false;\n }\n if (length === 0) {\n return true;\n }\n var index = -1;\n while (++index < length) {\n if (deepEqual(leftHandOperand[index], rightHandOperand[index], options) === false) {\n return false;\n }\n }\n return true;\n}\n\n/*!\n * Simple equality for generator objects such as those returned by generator functions.\n *\n * @param {Iterable} leftHandOperand\n * @param {Iterable} rightHandOperand\n * @param {Object} [options] (Optional)\n * @return {Boolean} result\n */\n\nfunction generatorEqual(leftHandOperand, rightHandOperand, options) {\n return iterableEqual(getGeneratorEntries(leftHandOperand), getGeneratorEntries(rightHandOperand), options);\n}\n\n/*!\n * Determine if the given object has an @@iterator function.\n *\n * @param {Object} target\n * @return {Boolean} `true` if the object has an @@iterator function.\n */\nfunction hasIteratorFunction(target) {\n return typeof Symbol !== 'undefined' &&\n typeof target === 'object' &&\n typeof Symbol.iterator !== 'undefined' &&\n typeof target[Symbol.iterator] === 'function';\n}\n\n/*!\n * Gets all iterator entries from the given Object. If the Object has no @@iterator function, returns an empty array.\n * This will consume the iterator - which could have side effects depending on the @@iterator implementation.\n *\n * @param {Object} target\n * @returns {Array} an array of entries from the @@iterator function\n */\nfunction getIteratorEntries(target) {\n if (hasIteratorFunction(target)) {\n try {\n return getGeneratorEntries(target[Symbol.iterator]());\n } catch (iteratorError) {\n return [];\n }\n }\n return [];\n}\n\n/*!\n * Gets all entries from a Generator. This will consume the generator - which could have side effects.\n *\n * @param {Generator} target\n * @returns {Array} an array of entries from the Generator.\n */\nfunction getGeneratorEntries(generator) {\n var generatorResult = generator.next();\n var accumulator = [ generatorResult.value ];\n while (generatorResult.done === false) {\n generatorResult = generator.next();\n accumulator.push(generatorResult.value);\n }\n return accumulator;\n}\n\n/*!\n * Gets all own and inherited enumerable keys from a target.\n *\n * @param {Object} target\n * @returns {Array} an array of own and inherited enumerable keys from the target.\n */\nfunction getEnumerableKeys(target) {\n var keys = [];\n for (var key in target) {\n keys.push(key);\n }\n return keys;\n}\n\nfunction getEnumerableSymbols(target) {\n var keys = [];\n var allKeys = Object.getOwnPropertySymbols(target);\n for (var i = 0; i < allKeys.length; i += 1) {\n var key = allKeys[i];\n if (Object.getOwnPropertyDescriptor(target, key).enumerable) {\n keys.push(key);\n }\n }\n return keys;\n}\n\n/*!\n * Determines if two objects have matching values, given a set of keys. Defers to deepEqual for the equality check of\n * each key. If any value of the given key is not equal, the function will return false (early).\n *\n * @param {Mixed} leftHandOperand\n * @param {Mixed} rightHandOperand\n * @param {Array} keys An array of keys to compare the values of leftHandOperand and rightHandOperand against\n * @param {Object} [options] (Optional)\n * @return {Boolean} result\n */\nfunction keysEqual(leftHandOperand, rightHandOperand, keys, options) {\n var length = keys.length;\n if (length === 0) {\n return true;\n }\n for (var i = 0; i < length; i += 1) {\n if (deepEqual(leftHandOperand[keys[i]], rightHandOperand[keys[i]], options) === false) {\n return false;\n }\n }\n return true;\n}\n\n/*!\n * Recursively check the equality of two Objects. Once basic sameness has been established it will defer to `deepEqual`\n * for each enumerable key in the object.\n *\n * @param {Mixed} leftHandOperand\n * @param {Mixed} rightHandOperand\n * @param {Object} [options] (Optional)\n * @return {Boolean} result\n */\nfunction objectEqual(leftHandOperand, rightHandOperand, options) {\n var leftHandKeys = getEnumerableKeys(leftHandOperand);\n var rightHandKeys = getEnumerableKeys(rightHandOperand);\n var leftHandSymbols = getEnumerableSymbols(leftHandOperand);\n var rightHandSymbols = getEnumerableSymbols(rightHandOperand);\n leftHandKeys = leftHandKeys.concat(leftHandSymbols);\n rightHandKeys = rightHandKeys.concat(rightHandSymbols);\n\n if (leftHandKeys.length && leftHandKeys.length === rightHandKeys.length) {\n if (iterableEqual(mapSymbols(leftHandKeys).sort(), mapSymbols(rightHandKeys).sort()) === false) {\n return false;\n }\n return keysEqual(leftHandOperand, rightHandOperand, leftHandKeys, options);\n }\n\n var leftHandEntries = getIteratorEntries(leftHandOperand);\n var rightHandEntries = getIteratorEntries(rightHandOperand);\n if (leftHandEntries.length && leftHandEntries.length === rightHandEntries.length) {\n leftHandEntries.sort();\n rightHandEntries.sort();\n return iterableEqual(leftHandEntries, rightHandEntries, options);\n }\n\n if (leftHandKeys.length === 0 &&\n leftHandEntries.length === 0 &&\n rightHandKeys.length === 0 &&\n rightHandEntries.length === 0) {\n return true;\n }\n\n return false;\n}\n\n/*!\n * Returns true if the argument is a primitive.\n *\n * This intentionally returns true for all objects that can be compared by reference,\n * including functions and symbols.\n *\n * @param {Mixed} value\n * @return {Boolean} result\n */\nfunction isPrimitive(value) {\n return value === null || typeof value !== 'object';\n}\n\nfunction mapSymbols(arr) {\n return arr.map(function mapSymbol(entry) {\n if (typeof entry === 'symbol') {\n return entry.toString();\n }\n\n return entry;\n });\n}\n\n\n//# sourceURL=webpack://JSEncrypt/./node_modules/deep-eql/index.js?"); /***/ }), @@ -564,7 +564,7 @@ eval("\n\n/* !\n * Chai - getFuncName utility\n * Copyright(c) 2012-2016 Jake Lu \*************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { -eval("/* provided dependency */ var process = __webpack_require__(/*! process/browser */ \"./node_modules/process/browser.js\");\n(function (global, factory) {\n true ? factory(exports) :\n 0;\n}(this, (function (exports) { 'use strict';\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n\n function _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n }\n\n function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n }\n\n function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n }\n\n function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n }\n\n function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n\n function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var ansiColors = {\n bold: ['1', '22'],\n dim: ['2', '22'],\n italic: ['3', '23'],\n underline: ['4', '24'],\n // 5 & 6 are blinking\n inverse: ['7', '27'],\n hidden: ['8', '28'],\n strike: ['9', '29'],\n // 10-20 are fonts\n // 21-29 are resets for 1-9\n black: ['30', '39'],\n red: ['31', '39'],\n green: ['32', '39'],\n yellow: ['33', '39'],\n blue: ['34', '39'],\n magenta: ['35', '39'],\n cyan: ['36', '39'],\n white: ['37', '39'],\n brightblack: ['30;1', '39'],\n brightred: ['31;1', '39'],\n brightgreen: ['32;1', '39'],\n brightyellow: ['33;1', '39'],\n brightblue: ['34;1', '39'],\n brightmagenta: ['35;1', '39'],\n brightcyan: ['36;1', '39'],\n brightwhite: ['37;1', '39'],\n grey: ['90', '39']\n };\n var styles = {\n special: 'cyan',\n number: 'yellow',\n bigint: 'yellow',\n boolean: 'yellow',\n undefined: 'grey',\n null: 'bold',\n string: 'green',\n symbol: 'green',\n date: 'magenta',\n regexp: 'red'\n };\n var truncator = '…';\n\n function colorise(value, styleType) {\n var color = ansiColors[styles[styleType]] || ansiColors[styleType];\n\n if (!color) {\n return String(value);\n }\n\n return \"\\x1B[\".concat(color[0], \"m\").concat(String(value), \"\\x1B[\").concat(color[1], \"m\");\n }\n\n function normaliseOptions() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$showHidden = _ref.showHidden,\n showHidden = _ref$showHidden === void 0 ? false : _ref$showHidden,\n _ref$depth = _ref.depth,\n depth = _ref$depth === void 0 ? 2 : _ref$depth,\n _ref$colors = _ref.colors,\n colors = _ref$colors === void 0 ? false : _ref$colors,\n _ref$customInspect = _ref.customInspect,\n customInspect = _ref$customInspect === void 0 ? true : _ref$customInspect,\n _ref$showProxy = _ref.showProxy,\n showProxy = _ref$showProxy === void 0 ? false : _ref$showProxy,\n _ref$maxArrayLength = _ref.maxArrayLength,\n maxArrayLength = _ref$maxArrayLength === void 0 ? Infinity : _ref$maxArrayLength,\n _ref$breakLength = _ref.breakLength,\n breakLength = _ref$breakLength === void 0 ? Infinity : _ref$breakLength,\n _ref$seen = _ref.seen,\n seen = _ref$seen === void 0 ? [] : _ref$seen,\n _ref$truncate = _ref.truncate,\n truncate = _ref$truncate === void 0 ? Infinity : _ref$truncate,\n _ref$stylize = _ref.stylize,\n stylize = _ref$stylize === void 0 ? String : _ref$stylize;\n\n var options = {\n showHidden: Boolean(showHidden),\n depth: Number(depth),\n colors: Boolean(colors),\n customInspect: Boolean(customInspect),\n showProxy: Boolean(showProxy),\n maxArrayLength: Number(maxArrayLength),\n breakLength: Number(breakLength),\n truncate: Number(truncate),\n seen: seen,\n stylize: stylize\n };\n\n if (options.colors) {\n options.stylize = colorise;\n }\n\n return options;\n }\n function truncate(string, length) {\n var tail = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : truncator;\n string = String(string);\n var tailLength = tail.length;\n var stringLength = string.length;\n\n if (tailLength > length && stringLength > tailLength) {\n return tail;\n }\n\n if (stringLength > length && stringLength > tailLength) {\n return \"\".concat(string.slice(0, length - tailLength)).concat(tail);\n }\n\n return string;\n } // eslint-disable-next-line complexity\n\n function inspectList(list, options, inspectItem) {\n var separator = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ', ';\n inspectItem = inspectItem || options.inspect;\n var size = list.length;\n if (size === 0) return '';\n var originalLength = options.truncate;\n var output = '';\n var peek = '';\n var truncated = '';\n\n for (var i = 0; i < size; i += 1) {\n var last = i + 1 === list.length;\n var secondToLast = i + 2 === list.length;\n truncated = \"\".concat(truncator, \"(\").concat(list.length - i, \")\");\n var value = list[i]; // If there is more than one remaining we need to account for a separator of `, `\n\n options.truncate = originalLength - output.length - (last ? 0 : separator.length);\n var string = peek || inspectItem(value, options) + (last ? '' : separator);\n var nextLength = output.length + string.length;\n var truncatedLength = nextLength + truncated.length; // If this is the last element, and adding it would\n // take us over length, but adding the truncator wouldn't - then break now\n\n if (last && nextLength > originalLength && output.length + truncated.length <= originalLength) {\n break;\n } // If this isn't the last or second to last element to scan,\n // but the string is already over length then break here\n\n\n if (!last && !secondToLast && truncatedLength > originalLength) {\n break;\n } // Peek at the next string to determine if we should\n // break early before adding this item to the output\n\n\n peek = last ? '' : inspectItem(list[i + 1], options) + (secondToLast ? '' : separator); // If we have one element left, but this element and\n // the next takes over length, the break early\n\n if (!last && secondToLast && truncatedLength > originalLength && nextLength + peek.length > originalLength) {\n break;\n }\n\n output += string; // If the next element takes us to length -\n // but there are more after that, then we should truncate now\n\n if (!last && !secondToLast && nextLength + peek.length >= originalLength) {\n truncated = \"\".concat(truncator, \"(\").concat(list.length - i - 1, \")\");\n break;\n }\n\n truncated = '';\n }\n\n return \"\".concat(output).concat(truncated);\n }\n\n function quoteComplexKey(key) {\n if (key.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)) {\n return key;\n }\n\n return JSON.stringify(key).replace(/'/g, \"\\\\'\").replace(/\\\\\"/g, '\"').replace(/(^\"|\"$)/g, \"'\");\n }\n\n function inspectProperty(_ref2, options) {\n var _ref3 = _slicedToArray(_ref2, 2),\n key = _ref3[0],\n value = _ref3[1];\n\n options.truncate -= 2;\n\n if (typeof key === 'string') {\n key = quoteComplexKey(key);\n } else if (typeof key !== 'number') {\n key = \"[\".concat(options.inspect(key, options), \"]\");\n }\n\n options.truncate -= key.length;\n value = options.inspect(value, options);\n return \"\".concat(key, \": \").concat(value);\n }\n\n function inspectArray(array, options) {\n // Object.keys will always output the Array indices first, so we can slice by\n // `array.length` to get non-index properties\n var nonIndexProperties = Object.keys(array).slice(array.length);\n if (!array.length && !nonIndexProperties.length) return '[]';\n options.truncate -= 4;\n var listContents = inspectList(array, options);\n options.truncate -= listContents.length;\n var propertyContents = '';\n\n if (nonIndexProperties.length) {\n propertyContents = inspectList(nonIndexProperties.map(function (key) {\n return [key, array[key]];\n }), options, inspectProperty);\n }\n\n return \"[ \".concat(listContents).concat(propertyContents ? \", \".concat(propertyContents) : '', \" ]\");\n }\n\n /* !\n * Chai - getFuncName utility\n * Copyright(c) 2012-2016 Jake Luer \n * MIT Licensed\n */\n\n /**\n * ### .getFuncName(constructorFn)\n *\n * Returns the name of a function.\n * When a non-function instance is passed, returns `null`.\n * This also includes a polyfill function if `aFunc.name` is not defined.\n *\n * @name getFuncName\n * @param {Function} funct\n * @namespace Utils\n * @api public\n */\n\n var toString = Function.prototype.toString;\n var functionNameMatch = /\\s*function(?:\\s|\\s*\\/\\*[^(?:*\\/)]+\\*\\/\\s*)*([^\\s\\(\\/]+)/;\n function getFuncName(aFunc) {\n if (typeof aFunc !== 'function') {\n return null;\n }\n\n var name = '';\n if (typeof Function.prototype.name === 'undefined' && typeof aFunc.name === 'undefined') {\n // Here we run a polyfill if Function does not support the `name` property and if aFunc.name is not defined\n var match = toString.call(aFunc).match(functionNameMatch);\n if (match) {\n name = match[1];\n }\n } else {\n // If we've got a `name` property we just use it\n name = aFunc.name;\n }\n\n return name;\n }\n\n var getFuncName_1 = getFuncName;\n\n var getArrayName = function getArrayName(array) {\n // We need to special case Node.js' Buffers, which report to be Uint8Array\n if (typeof Buffer === 'function' && array instanceof Buffer) {\n return 'Buffer';\n }\n\n if (array[Symbol.toStringTag]) {\n return array[Symbol.toStringTag];\n }\n\n return getFuncName_1(array.constructor);\n };\n\n function inspectTypedArray(array, options) {\n var name = getArrayName(array);\n options.truncate -= name.length + 4; // Object.keys will always output the Array indices first, so we can slice by\n // `array.length` to get non-index properties\n\n var nonIndexProperties = Object.keys(array).slice(array.length);\n if (!array.length && !nonIndexProperties.length) return \"\".concat(name, \"[]\"); // As we know TypedArrays only contain Unsigned Integers, we can skip inspecting each one and simply\n // stylise the toString() value of them\n\n var output = '';\n\n for (var i = 0; i < array.length; i++) {\n var string = \"\".concat(options.stylize(truncate(array[i], options.truncate), 'number')).concat(i === array.length - 1 ? '' : ', ');\n options.truncate -= string.length;\n\n if (array[i] !== array.length && options.truncate <= 3) {\n output += \"\".concat(truncator, \"(\").concat(array.length - array[i] + 1, \")\");\n break;\n }\n\n output += string;\n }\n\n var propertyContents = '';\n\n if (nonIndexProperties.length) {\n propertyContents = inspectList(nonIndexProperties.map(function (key) {\n return [key, array[key]];\n }), options, inspectProperty);\n }\n\n return \"\".concat(name, \"[ \").concat(output).concat(propertyContents ? \", \".concat(propertyContents) : '', \" ]\");\n }\n\n function inspectDate(dateObject, options) {\n // If we need to - truncate the time portion, but never the date\n var split = dateObject.toJSON().split('T');\n var date = split[0];\n return options.stylize(\"\".concat(date, \"T\").concat(truncate(split[1], options.truncate - date.length - 1)), 'date');\n }\n\n function inspectFunction(func, options) {\n var name = getFuncName_1(func);\n\n if (!name) {\n return options.stylize('[Function]', 'special');\n }\n\n return options.stylize(\"[Function \".concat(truncate(name, options.truncate - 11), \"]\"), 'special');\n }\n\n function inspectMapEntry(_ref, options) {\n var _ref2 = _slicedToArray(_ref, 2),\n key = _ref2[0],\n value = _ref2[1];\n\n options.truncate -= 4;\n key = options.inspect(key, options);\n options.truncate -= key.length;\n value = options.inspect(value, options);\n return \"\".concat(key, \" => \").concat(value);\n } // IE11 doesn't support `map.entries()`\n\n\n function mapToEntries(map) {\n var entries = [];\n map.forEach(function (value, key) {\n entries.push([key, value]);\n });\n return entries;\n }\n\n function inspectMap(map, options) {\n var size = map.size - 1;\n\n if (size <= 0) {\n return 'Map{}';\n }\n\n options.truncate -= 7;\n return \"Map{ \".concat(inspectList(mapToEntries(map), options, inspectMapEntry), \" }\");\n }\n\n var isNaN = Number.isNaN || function (i) {\n return i !== i;\n }; // eslint-disable-line no-self-compare\n\n\n function inspectNumber(number, options) {\n if (isNaN(number)) {\n return options.stylize('NaN', 'number');\n }\n\n if (number === Infinity) {\n return options.stylize('Infinity', 'number');\n }\n\n if (number === -Infinity) {\n return options.stylize('-Infinity', 'number');\n }\n\n if (number === 0) {\n return options.stylize(1 / number === Infinity ? '+0' : '-0', 'number');\n }\n\n return options.stylize(truncate(number, options.truncate), 'number');\n }\n\n function inspectBigInt(number, options) {\n var nums = truncate(number.toString(), options.truncate - 1);\n if (nums !== truncator) nums += 'n';\n return options.stylize(nums, 'bigint');\n }\n\n function inspectRegExp(value, options) {\n var flags = value.toString().split('/')[2];\n var sourceLength = options.truncate - (2 + flags.length);\n var source = value.source;\n return options.stylize(\"/\".concat(truncate(source, sourceLength), \"/\").concat(flags), 'regexp');\n }\n\n function arrayFromSet(set) {\n var values = [];\n set.forEach(function (value) {\n values.push(value);\n });\n return values;\n }\n\n function inspectSet(set, options) {\n if (set.size === 0) return 'Set{}';\n options.truncate -= 7;\n return \"Set{ \".concat(inspectList(arrayFromSet(set), options), \" }\");\n }\n\n var stringEscapeChars = new RegExp(\"['\\\\u0000-\\\\u001f\\\\u007f-\\\\u009f\\\\u00ad\\\\u0600-\\\\u0604\\\\u070f\\\\u17b4\\\\u17b5\" + \"\\\\u200c-\\\\u200f\\\\u2028-\\\\u202f\\\\u2060-\\\\u206f\\\\ufeff\\\\ufff0-\\\\uffff]\", 'g');\n var escapeCharacters = {\n '\\b': '\\\\b',\n '\\t': '\\\\t',\n '\\n': '\\\\n',\n '\\f': '\\\\f',\n '\\r': '\\\\r',\n \"'\": \"\\\\'\",\n '\\\\': '\\\\\\\\'\n };\n var hex = 16;\n var unicodeLength = 4;\n\n function escape(char) {\n return escapeCharacters[char] || \"\\\\u\".concat(\"0000\".concat(char.charCodeAt(0).toString(hex)).slice(-unicodeLength));\n }\n\n function inspectString(string, options) {\n if (stringEscapeChars.test(string)) {\n string = string.replace(stringEscapeChars, escape);\n }\n\n return options.stylize(\"'\".concat(truncate(string, options.truncate - 2), \"'\"), 'string');\n }\n\n function inspectSymbol(value) {\n if ('description' in Symbol.prototype) {\n return value.description ? \"Symbol(\".concat(value.description, \")\") : 'Symbol()';\n }\n\n return value.toString();\n }\n\n var getPromiseValue = function getPromiseValue() {\n return 'Promise{…}';\n };\n\n try {\n var _process$binding = process.binding('util'),\n getPromiseDetails = _process$binding.getPromiseDetails,\n kPending = _process$binding.kPending,\n kRejected = _process$binding.kRejected;\n\n if (Array.isArray(getPromiseDetails(Promise.resolve()))) {\n getPromiseValue = function getPromiseValue(value, options) {\n var _getPromiseDetails = getPromiseDetails(value),\n _getPromiseDetails2 = _slicedToArray(_getPromiseDetails, 2),\n state = _getPromiseDetails2[0],\n innerValue = _getPromiseDetails2[1];\n\n if (state === kPending) {\n return 'Promise{}';\n }\n\n return \"Promise\".concat(state === kRejected ? '!' : '', \"{\").concat(options.inspect(innerValue, options), \"}\");\n };\n }\n } catch (notNode) {\n /* ignore */\n }\n\n var inspectPromise = getPromiseValue;\n\n function inspectObject(object, options) {\n var properties = Object.getOwnPropertyNames(object);\n var symbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(object) : [];\n\n if (properties.length === 0 && symbols.length === 0) {\n return '{}';\n }\n\n options.truncate -= 4;\n options.seen = options.seen || [];\n\n if (options.seen.indexOf(object) >= 0) {\n return '[Circular]';\n }\n\n options.seen.push(object);\n var propertyContents = inspectList(properties.map(function (key) {\n return [key, object[key]];\n }), options, inspectProperty);\n var symbolContents = inspectList(symbols.map(function (key) {\n return [key, object[key]];\n }), options, inspectProperty);\n options.seen.pop();\n var sep = '';\n\n if (propertyContents && symbolContents) {\n sep = ', ';\n }\n\n return \"{ \".concat(propertyContents).concat(sep).concat(symbolContents, \" }\");\n }\n\n var toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag ? Symbol.toStringTag : false;\n function inspectClass(value, options) {\n var name = '';\n\n if (toStringTag && toStringTag in value) {\n name = value[toStringTag];\n }\n\n name = name || getFuncName_1(value.constructor); // Babel transforms anonymous classes to the name `_class`\n\n if (!name || name === '_class') {\n name = '';\n }\n\n options.truncate -= name.length;\n return \"\".concat(name).concat(inspectObject(value, options));\n }\n\n function inspectArguments(args, options) {\n if (args.length === 0) return 'Arguments[]';\n options.truncate -= 13;\n return \"Arguments[ \".concat(inspectList(args, options), \" ]\");\n }\n\n var errorKeys = ['stack', 'line', 'column', 'name', 'message', 'fileName', 'lineNumber', 'columnNumber', 'number', 'description'];\n function inspectObject$1(error, options) {\n var properties = Object.getOwnPropertyNames(error).filter(function (key) {\n return errorKeys.indexOf(key) === -1;\n });\n var name = error.name;\n options.truncate -= name.length;\n var message = '';\n\n if (typeof error.message === 'string') {\n message = truncate(error.message, options.truncate);\n } else {\n properties.unshift('message');\n }\n\n message = message ? \": \".concat(message) : '';\n options.truncate -= message.length + 5;\n var propertyContents = inspectList(properties.map(function (key) {\n return [key, error[key]];\n }), options, inspectProperty);\n return \"\".concat(name).concat(message).concat(propertyContents ? \" { \".concat(propertyContents, \" }\") : '');\n }\n\n function inspectAttribute(_ref, options) {\n var _ref2 = _slicedToArray(_ref, 2),\n key = _ref2[0],\n value = _ref2[1];\n\n options.truncate -= 3;\n\n if (!value) {\n return \"\".concat(options.stylize(key, 'yellow'));\n }\n\n return \"\".concat(options.stylize(key, 'yellow'), \"=\").concat(options.stylize(\"\\\"\".concat(value, \"\\\"\"), 'string'));\n }\n function inspectHTMLCollection(collection, options) {\n // eslint-disable-next-line no-use-before-define\n return inspectList(collection, options, inspectHTML, '\\n');\n }\n function inspectHTML(element, options) {\n var properties = element.getAttributeNames();\n var name = element.tagName.toLowerCase();\n var head = options.stylize(\"<\".concat(name), 'special');\n var headClose = options.stylize(\">\", 'special');\n var tail = options.stylize(\"\"), 'special');\n options.truncate -= name.length * 2 + 5;\n var propertyContents = '';\n\n if (properties.length > 0) {\n propertyContents += ' ';\n propertyContents += inspectList(properties.map(function (key) {\n return [key, element.getAttribute(key)];\n }), options, inspectAttribute, ' ');\n }\n\n options.truncate -= propertyContents.length;\n var truncate = options.truncate;\n var children = inspectHTMLCollection(element.children, options);\n\n if (children && children.length > truncate) {\n children = \"\".concat(truncator, \"(\").concat(element.children.length, \")\");\n }\n\n return \"\".concat(head).concat(propertyContents).concat(headClose).concat(children).concat(tail);\n }\n\n var symbolsSupported = typeof Symbol === 'function' && typeof Symbol.for === 'function';\n var chaiInspect = symbolsSupported ? Symbol.for('chai/inspect') : '@@chai/inspect';\n var nodeInspect = false;\n\n try {\n // eslint-disable-next-line global-require\n var nodeUtil = __webpack_require__(/*! util */ \"?0ac7\");\n\n nodeInspect = nodeUtil.inspect ? nodeUtil.inspect.custom : false;\n } catch (noNodeInspect) {\n nodeInspect = false;\n }\n\n var constructorMap = new WeakMap();\n var stringTagMap = {};\n var baseTypesMap = {\n undefined: function undefined$1(value, options) {\n return options.stylize('undefined', 'undefined');\n },\n null: function _null(value, options) {\n return options.stylize(null, 'null');\n },\n boolean: function boolean(value, options) {\n return options.stylize(value, 'boolean');\n },\n Boolean: function Boolean(value, options) {\n return options.stylize(value, 'boolean');\n },\n number: inspectNumber,\n Number: inspectNumber,\n bigint: inspectBigInt,\n BigInt: inspectBigInt,\n string: inspectString,\n String: inspectString,\n function: inspectFunction,\n Function: inspectFunction,\n symbol: inspectSymbol,\n // A Symbol polyfill will return `Symbol` not `symbol` from typedetect\n Symbol: inspectSymbol,\n Array: inspectArray,\n Date: inspectDate,\n Map: inspectMap,\n Set: inspectSet,\n RegExp: inspectRegExp,\n Promise: inspectPromise,\n // WeakSet, WeakMap are totally opaque to us\n WeakSet: function WeakSet(value, options) {\n return options.stylize('WeakSet{…}', 'special');\n },\n WeakMap: function WeakMap(value, options) {\n return options.stylize('WeakMap{…}', 'special');\n },\n Arguments: inspectArguments,\n Int8Array: inspectTypedArray,\n Uint8Array: inspectTypedArray,\n Uint8ClampedArray: inspectTypedArray,\n Int16Array: inspectTypedArray,\n Uint16Array: inspectTypedArray,\n Int32Array: inspectTypedArray,\n Uint32Array: inspectTypedArray,\n Float32Array: inspectTypedArray,\n Float64Array: inspectTypedArray,\n Generator: function Generator() {\n return '';\n },\n DataView: function DataView() {\n return '';\n },\n ArrayBuffer: function ArrayBuffer() {\n return '';\n },\n Error: inspectObject$1,\n HTMLCollection: inspectHTMLCollection,\n NodeList: inspectHTMLCollection\n }; // eslint-disable-next-line complexity\n\n var inspectCustom = function inspectCustom(value, options, type) {\n if (chaiInspect in value && typeof value[chaiInspect] === 'function') {\n return value[chaiInspect](options);\n }\n\n if (nodeInspect && nodeInspect in value && typeof value[nodeInspect] === 'function') {\n return value[nodeInspect](options.depth, options);\n }\n\n if ('inspect' in value && typeof value.inspect === 'function') {\n return value.inspect(options.depth, options);\n }\n\n if ('constructor' in value && constructorMap.has(value.constructor)) {\n return constructorMap.get(value.constructor)(value, options);\n }\n\n if (stringTagMap[type]) {\n return stringTagMap[type](value, options);\n }\n\n return '';\n };\n\n var toString$1 = Object.prototype.toString; // eslint-disable-next-line complexity\n\n function inspect(value, options) {\n options = normaliseOptions(options);\n options.inspect = inspect;\n var _options = options,\n customInspect = _options.customInspect;\n var type = value === null ? 'null' : _typeof(value);\n\n if (type === 'object') {\n type = toString$1.call(value).slice(8, -1);\n } // If it is a base value that we already support, then use Loupe's inspector\n\n\n if (baseTypesMap[type]) {\n return baseTypesMap[type](value, options);\n } // If `options.customInspect` is set to true then try to use the custom inspector\n\n\n if (customInspect && value) {\n var output = inspectCustom(value, options, type);\n\n if (output) {\n if (typeof output === 'string') return output;\n return inspect(output, options);\n }\n }\n\n var proto = value ? Object.getPrototypeOf(value) : false; // If it's a plain Object then use Loupe's inspector\n\n if (proto === Object.prototype || proto === null) {\n return inspectObject(value, options);\n } // Specifically account for HTMLElements\n // eslint-disable-next-line no-undef\n\n\n if (value && typeof HTMLElement === 'function' && value instanceof HTMLElement) {\n return inspectHTML(value, options);\n }\n\n if ('constructor' in value) {\n // If it is a class, inspect it like an object but add the constructor name\n if (value.constructor !== Object) {\n return inspectClass(value, options);\n } // If it is an object with an anonymous prototype, display it as an object.\n\n\n return inspectObject(value, options);\n } // last chance to check if it's an object\n\n\n if (value === Object(value)) {\n return inspectObject(value, options);\n } // We have run out of options! Just stringify the value\n\n\n return options.stylize(String(value), type);\n }\n function registerConstructor(constructor, inspector) {\n if (constructorMap.has(constructor)) {\n return false;\n }\n\n constructorMap.add(constructor, inspector);\n return true;\n }\n function registerStringTag(stringTag, inspector) {\n if (stringTag in stringTagMap) {\n return false;\n }\n\n stringTagMap[stringTag] = inspector;\n return true;\n }\n var custom = chaiInspect;\n\n exports.custom = custom;\n exports.default = inspect;\n exports.inspect = inspect;\n exports.registerConstructor = registerConstructor;\n exports.registerStringTag = registerStringTag;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n\n\n//# sourceURL=webpack://JSEncrypt/./node_modules/loupe/loupe.js?"); +eval("/* provided dependency */ var process = __webpack_require__(/*! process/browser */ \"./node_modules/process/browser.js\");\n(function (global, factory) {\n true ? factory(exports) :\n 0;\n}(this, (function (exports) { 'use strict';\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n\n function _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n }\n\n function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n }\n\n function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n }\n\n function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n }\n\n function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n\n function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var ansiColors = {\n bold: ['1', '22'],\n dim: ['2', '22'],\n italic: ['3', '23'],\n underline: ['4', '24'],\n // 5 & 6 are blinking\n inverse: ['7', '27'],\n hidden: ['8', '28'],\n strike: ['9', '29'],\n // 10-20 are fonts\n // 21-29 are resets for 1-9\n black: ['30', '39'],\n red: ['31', '39'],\n green: ['32', '39'],\n yellow: ['33', '39'],\n blue: ['34', '39'],\n magenta: ['35', '39'],\n cyan: ['36', '39'],\n white: ['37', '39'],\n brightblack: ['30;1', '39'],\n brightred: ['31;1', '39'],\n brightgreen: ['32;1', '39'],\n brightyellow: ['33;1', '39'],\n brightblue: ['34;1', '39'],\n brightmagenta: ['35;1', '39'],\n brightcyan: ['36;1', '39'],\n brightwhite: ['37;1', '39'],\n grey: ['90', '39']\n };\n var styles = {\n special: 'cyan',\n number: 'yellow',\n bigint: 'yellow',\n boolean: 'yellow',\n undefined: 'grey',\n null: 'bold',\n string: 'green',\n symbol: 'green',\n date: 'magenta',\n regexp: 'red'\n };\n var truncator = '…';\n\n function colorise(value, styleType) {\n var color = ansiColors[styles[styleType]] || ansiColors[styleType];\n\n if (!color) {\n return String(value);\n }\n\n return \"\\x1B[\".concat(color[0], \"m\").concat(String(value), \"\\x1B[\").concat(color[1], \"m\");\n }\n\n function normaliseOptions() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$showHidden = _ref.showHidden,\n showHidden = _ref$showHidden === void 0 ? false : _ref$showHidden,\n _ref$depth = _ref.depth,\n depth = _ref$depth === void 0 ? 2 : _ref$depth,\n _ref$colors = _ref.colors,\n colors = _ref$colors === void 0 ? false : _ref$colors,\n _ref$customInspect = _ref.customInspect,\n customInspect = _ref$customInspect === void 0 ? true : _ref$customInspect,\n _ref$showProxy = _ref.showProxy,\n showProxy = _ref$showProxy === void 0 ? false : _ref$showProxy,\n _ref$maxArrayLength = _ref.maxArrayLength,\n maxArrayLength = _ref$maxArrayLength === void 0 ? Infinity : _ref$maxArrayLength,\n _ref$breakLength = _ref.breakLength,\n breakLength = _ref$breakLength === void 0 ? Infinity : _ref$breakLength,\n _ref$seen = _ref.seen,\n seen = _ref$seen === void 0 ? [] : _ref$seen,\n _ref$truncate = _ref.truncate,\n truncate = _ref$truncate === void 0 ? Infinity : _ref$truncate,\n _ref$stylize = _ref.stylize,\n stylize = _ref$stylize === void 0 ? String : _ref$stylize;\n\n var options = {\n showHidden: Boolean(showHidden),\n depth: Number(depth),\n colors: Boolean(colors),\n customInspect: Boolean(customInspect),\n showProxy: Boolean(showProxy),\n maxArrayLength: Number(maxArrayLength),\n breakLength: Number(breakLength),\n truncate: Number(truncate),\n seen: seen,\n stylize: stylize\n };\n\n if (options.colors) {\n options.stylize = colorise;\n }\n\n return options;\n }\n function truncate(string, length) {\n var tail = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : truncator;\n string = String(string);\n var tailLength = tail.length;\n var stringLength = string.length;\n\n if (tailLength > length && stringLength > tailLength) {\n return tail;\n }\n\n if (stringLength > length && stringLength > tailLength) {\n return \"\".concat(string.slice(0, length - tailLength)).concat(tail);\n }\n\n return string;\n } // eslint-disable-next-line complexity\n\n function inspectList(list, options, inspectItem) {\n var separator = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ', ';\n inspectItem = inspectItem || options.inspect;\n var size = list.length;\n if (size === 0) return '';\n var originalLength = options.truncate;\n var output = '';\n var peek = '';\n var truncated = '';\n\n for (var i = 0; i < size; i += 1) {\n var last = i + 1 === list.length;\n var secondToLast = i + 2 === list.length;\n truncated = \"\".concat(truncator, \"(\").concat(list.length - i, \")\");\n var value = list[i]; // If there is more than one remaining we need to account for a separator of `, `\n\n options.truncate = originalLength - output.length - (last ? 0 : separator.length);\n var string = peek || inspectItem(value, options) + (last ? '' : separator);\n var nextLength = output.length + string.length;\n var truncatedLength = nextLength + truncated.length; // If this is the last element, and adding it would\n // take us over length, but adding the truncator wouldn't - then break now\n\n if (last && nextLength > originalLength && output.length + truncated.length <= originalLength) {\n break;\n } // If this isn't the last or second to last element to scan,\n // but the string is already over length then break here\n\n\n if (!last && !secondToLast && truncatedLength > originalLength) {\n break;\n } // Peek at the next string to determine if we should\n // break early before adding this item to the output\n\n\n peek = last ? '' : inspectItem(list[i + 1], options) + (secondToLast ? '' : separator); // If we have one element left, but this element and\n // the next takes over length, the break early\n\n if (!last && secondToLast && truncatedLength > originalLength && nextLength + peek.length > originalLength) {\n break;\n }\n\n output += string; // If the next element takes us to length -\n // but there are more after that, then we should truncate now\n\n if (!last && !secondToLast && nextLength + peek.length >= originalLength) {\n truncated = \"\".concat(truncator, \"(\").concat(list.length - i - 1, \")\");\n break;\n }\n\n truncated = '';\n }\n\n return \"\".concat(output).concat(truncated);\n }\n\n function quoteComplexKey(key) {\n if (key.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)) {\n return key;\n }\n\n return JSON.stringify(key).replace(/'/g, \"\\\\'\").replace(/\\\\\"/g, '\"').replace(/(^\"|\"$)/g, \"'\");\n }\n\n function inspectProperty(_ref2, options) {\n var _ref3 = _slicedToArray(_ref2, 2),\n key = _ref3[0],\n value = _ref3[1];\n\n options.truncate -= 2;\n\n if (typeof key === 'string') {\n key = quoteComplexKey(key);\n } else if (typeof key !== 'number') {\n key = \"[\".concat(options.inspect(key, options), \"]\");\n }\n\n options.truncate -= key.length;\n value = options.inspect(value, options);\n return \"\".concat(key, \": \").concat(value);\n }\n\n function inspectArray(array, options) {\n // Object.keys will always output the Array indices first, so we can slice by\n // `array.length` to get non-index properties\n var nonIndexProperties = Object.keys(array).slice(array.length);\n if (!array.length && !nonIndexProperties.length) return '[]';\n options.truncate -= 4;\n var listContents = inspectList(array, options);\n options.truncate -= listContents.length;\n var propertyContents = '';\n\n if (nonIndexProperties.length) {\n propertyContents = inspectList(nonIndexProperties.map(function (key) {\n return [key, array[key]];\n }), options, inspectProperty);\n }\n\n return \"[ \".concat(listContents).concat(propertyContents ? \", \".concat(propertyContents) : '', \" ]\");\n }\n\n /* !\n * Chai - getFuncName utility\n * Copyright(c) 2012-2016 Jake Luer \n * MIT Licensed\n */\n\n /**\n * ### .getFuncName(constructorFn)\n *\n * Returns the name of a function.\n * When a non-function instance is passed, returns `null`.\n * This also includes a polyfill function if `aFunc.name` is not defined.\n *\n * @name getFuncName\n * @param {Function} funct\n * @namespace Utils\n * @api public\n */\n\n var toString = Function.prototype.toString;\n var functionNameMatch = /\\s*function(?:\\s|\\s*\\/\\*[^(?:*\\/)]+\\*\\/\\s*)*([^\\s\\(\\/]+)/;\n function getFuncName(aFunc) {\n if (typeof aFunc !== 'function') {\n return null;\n }\n\n var name = '';\n if (typeof Function.prototype.name === 'undefined' && typeof aFunc.name === 'undefined') {\n // Here we run a polyfill if Function does not support the `name` property and if aFunc.name is not defined\n var match = toString.call(aFunc).match(functionNameMatch);\n if (match) {\n name = match[1];\n }\n } else {\n // If we've got a `name` property we just use it\n name = aFunc.name;\n }\n\n return name;\n }\n\n var getFuncName_1 = getFuncName;\n\n var getArrayName = function getArrayName(array) {\n // We need to special case Node.js' Buffers, which report to be Uint8Array\n if (typeof Buffer === 'function' && array instanceof Buffer) {\n return 'Buffer';\n }\n\n if (array[Symbol.toStringTag]) {\n return array[Symbol.toStringTag];\n }\n\n return getFuncName_1(array.constructor);\n };\n\n function inspectTypedArray(array, options) {\n var name = getArrayName(array);\n options.truncate -= name.length + 4; // Object.keys will always output the Array indices first, so we can slice by\n // `array.length` to get non-index properties\n\n var nonIndexProperties = Object.keys(array).slice(array.length);\n if (!array.length && !nonIndexProperties.length) return \"\".concat(name, \"[]\"); // As we know TypedArrays only contain Unsigned Integers, we can skip inspecting each one and simply\n // stylise the toString() value of them\n\n var output = '';\n\n for (var i = 0; i < array.length; i++) {\n var string = \"\".concat(options.stylize(truncate(array[i], options.truncate), 'number')).concat(i === array.length - 1 ? '' : ', ');\n options.truncate -= string.length;\n\n if (array[i] !== array.length && options.truncate <= 3) {\n output += \"\".concat(truncator, \"(\").concat(array.length - array[i] + 1, \")\");\n break;\n }\n\n output += string;\n }\n\n var propertyContents = '';\n\n if (nonIndexProperties.length) {\n propertyContents = inspectList(nonIndexProperties.map(function (key) {\n return [key, array[key]];\n }), options, inspectProperty);\n }\n\n return \"\".concat(name, \"[ \").concat(output).concat(propertyContents ? \", \".concat(propertyContents) : '', \" ]\");\n }\n\n function inspectDate(dateObject, options) {\n var stringRepresentation = dateObject.toJSON();\n\n if (stringRepresentation === null) {\n return 'Invalid Date';\n }\n\n var split = stringRepresentation.split('T');\n var date = split[0]; // If we need to - truncate the time portion, but never the date\n\n return options.stylize(\"\".concat(date, \"T\").concat(truncate(split[1], options.truncate - date.length - 1)), 'date');\n }\n\n function inspectFunction(func, options) {\n var name = getFuncName_1(func);\n\n if (!name) {\n return options.stylize('[Function]', 'special');\n }\n\n return options.stylize(\"[Function \".concat(truncate(name, options.truncate - 11), \"]\"), 'special');\n }\n\n function inspectMapEntry(_ref, options) {\n var _ref2 = _slicedToArray(_ref, 2),\n key = _ref2[0],\n value = _ref2[1];\n\n options.truncate -= 4;\n key = options.inspect(key, options);\n options.truncate -= key.length;\n value = options.inspect(value, options);\n return \"\".concat(key, \" => \").concat(value);\n } // IE11 doesn't support `map.entries()`\n\n\n function mapToEntries(map) {\n var entries = [];\n map.forEach(function (value, key) {\n entries.push([key, value]);\n });\n return entries;\n }\n\n function inspectMap(map, options) {\n var size = map.size - 1;\n\n if (size <= 0) {\n return 'Map{}';\n }\n\n options.truncate -= 7;\n return \"Map{ \".concat(inspectList(mapToEntries(map), options, inspectMapEntry), \" }\");\n }\n\n var isNaN = Number.isNaN || function (i) {\n return i !== i;\n }; // eslint-disable-line no-self-compare\n\n\n function inspectNumber(number, options) {\n if (isNaN(number)) {\n return options.stylize('NaN', 'number');\n }\n\n if (number === Infinity) {\n return options.stylize('Infinity', 'number');\n }\n\n if (number === -Infinity) {\n return options.stylize('-Infinity', 'number');\n }\n\n if (number === 0) {\n return options.stylize(1 / number === Infinity ? '+0' : '-0', 'number');\n }\n\n return options.stylize(truncate(number, options.truncate), 'number');\n }\n\n function inspectBigInt(number, options) {\n var nums = truncate(number.toString(), options.truncate - 1);\n if (nums !== truncator) nums += 'n';\n return options.stylize(nums, 'bigint');\n }\n\n function inspectRegExp(value, options) {\n var flags = value.toString().split('/')[2];\n var sourceLength = options.truncate - (2 + flags.length);\n var source = value.source;\n return options.stylize(\"/\".concat(truncate(source, sourceLength), \"/\").concat(flags), 'regexp');\n }\n\n function arrayFromSet(set) {\n var values = [];\n set.forEach(function (value) {\n values.push(value);\n });\n return values;\n }\n\n function inspectSet(set, options) {\n if (set.size === 0) return 'Set{}';\n options.truncate -= 7;\n return \"Set{ \".concat(inspectList(arrayFromSet(set), options), \" }\");\n }\n\n var stringEscapeChars = new RegExp(\"['\\\\u0000-\\\\u001f\\\\u007f-\\\\u009f\\\\u00ad\\\\u0600-\\\\u0604\\\\u070f\\\\u17b4\\\\u17b5\" + \"\\\\u200c-\\\\u200f\\\\u2028-\\\\u202f\\\\u2060-\\\\u206f\\\\ufeff\\\\ufff0-\\\\uffff]\", 'g');\n var escapeCharacters = {\n '\\b': '\\\\b',\n '\\t': '\\\\t',\n '\\n': '\\\\n',\n '\\f': '\\\\f',\n '\\r': '\\\\r',\n \"'\": \"\\\\'\",\n '\\\\': '\\\\\\\\'\n };\n var hex = 16;\n var unicodeLength = 4;\n\n function escape(char) {\n return escapeCharacters[char] || \"\\\\u\".concat(\"0000\".concat(char.charCodeAt(0).toString(hex)).slice(-unicodeLength));\n }\n\n function inspectString(string, options) {\n if (stringEscapeChars.test(string)) {\n string = string.replace(stringEscapeChars, escape);\n }\n\n return options.stylize(\"'\".concat(truncate(string, options.truncate - 2), \"'\"), 'string');\n }\n\n function inspectSymbol(value) {\n if ('description' in Symbol.prototype) {\n return value.description ? \"Symbol(\".concat(value.description, \")\") : 'Symbol()';\n }\n\n return value.toString();\n }\n\n var getPromiseValue = function getPromiseValue() {\n return 'Promise{…}';\n };\n\n try {\n var _process$binding = process.binding('util'),\n getPromiseDetails = _process$binding.getPromiseDetails,\n kPending = _process$binding.kPending,\n kRejected = _process$binding.kRejected;\n\n if (Array.isArray(getPromiseDetails(Promise.resolve()))) {\n getPromiseValue = function getPromiseValue(value, options) {\n var _getPromiseDetails = getPromiseDetails(value),\n _getPromiseDetails2 = _slicedToArray(_getPromiseDetails, 2),\n state = _getPromiseDetails2[0],\n innerValue = _getPromiseDetails2[1];\n\n if (state === kPending) {\n return 'Promise{}';\n }\n\n return \"Promise\".concat(state === kRejected ? '!' : '', \"{\").concat(options.inspect(innerValue, options), \"}\");\n };\n }\n } catch (notNode) {\n /* ignore */\n }\n\n var inspectPromise = getPromiseValue;\n\n function inspectObject(object, options) {\n var properties = Object.getOwnPropertyNames(object);\n var symbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(object) : [];\n\n if (properties.length === 0 && symbols.length === 0) {\n return '{}';\n }\n\n options.truncate -= 4;\n options.seen = options.seen || [];\n\n if (options.seen.indexOf(object) >= 0) {\n return '[Circular]';\n }\n\n options.seen.push(object);\n var propertyContents = inspectList(properties.map(function (key) {\n return [key, object[key]];\n }), options, inspectProperty);\n var symbolContents = inspectList(symbols.map(function (key) {\n return [key, object[key]];\n }), options, inspectProperty);\n options.seen.pop();\n var sep = '';\n\n if (propertyContents && symbolContents) {\n sep = ', ';\n }\n\n return \"{ \".concat(propertyContents).concat(sep).concat(symbolContents, \" }\");\n }\n\n var toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag ? Symbol.toStringTag : false;\n function inspectClass(value, options) {\n var name = '';\n\n if (toStringTag && toStringTag in value) {\n name = value[toStringTag];\n }\n\n name = name || getFuncName_1(value.constructor); // Babel transforms anonymous classes to the name `_class`\n\n if (!name || name === '_class') {\n name = '';\n }\n\n options.truncate -= name.length;\n return \"\".concat(name).concat(inspectObject(value, options));\n }\n\n function inspectArguments(args, options) {\n if (args.length === 0) return 'Arguments[]';\n options.truncate -= 13;\n return \"Arguments[ \".concat(inspectList(args, options), \" ]\");\n }\n\n var errorKeys = ['stack', 'line', 'column', 'name', 'message', 'fileName', 'lineNumber', 'columnNumber', 'number', 'description'];\n function inspectObject$1(error, options) {\n var properties = Object.getOwnPropertyNames(error).filter(function (key) {\n return errorKeys.indexOf(key) === -1;\n });\n var name = error.name;\n options.truncate -= name.length;\n var message = '';\n\n if (typeof error.message === 'string') {\n message = truncate(error.message, options.truncate);\n } else {\n properties.unshift('message');\n }\n\n message = message ? \": \".concat(message) : '';\n options.truncate -= message.length + 5;\n var propertyContents = inspectList(properties.map(function (key) {\n return [key, error[key]];\n }), options, inspectProperty);\n return \"\".concat(name).concat(message).concat(propertyContents ? \" { \".concat(propertyContents, \" }\") : '');\n }\n\n function inspectAttribute(_ref, options) {\n var _ref2 = _slicedToArray(_ref, 2),\n key = _ref2[0],\n value = _ref2[1];\n\n options.truncate -= 3;\n\n if (!value) {\n return \"\".concat(options.stylize(key, 'yellow'));\n }\n\n return \"\".concat(options.stylize(key, 'yellow'), \"=\").concat(options.stylize(\"\\\"\".concat(value, \"\\\"\"), 'string'));\n }\n function inspectHTMLCollection(collection, options) {\n // eslint-disable-next-line no-use-before-define\n return inspectList(collection, options, inspectHTML, '\\n');\n }\n function inspectHTML(element, options) {\n var properties = element.getAttributeNames();\n var name = element.tagName.toLowerCase();\n var head = options.stylize(\"<\".concat(name), 'special');\n var headClose = options.stylize(\">\", 'special');\n var tail = options.stylize(\"\"), 'special');\n options.truncate -= name.length * 2 + 5;\n var propertyContents = '';\n\n if (properties.length > 0) {\n propertyContents += ' ';\n propertyContents += inspectList(properties.map(function (key) {\n return [key, element.getAttribute(key)];\n }), options, inspectAttribute, ' ');\n }\n\n options.truncate -= propertyContents.length;\n var truncate = options.truncate;\n var children = inspectHTMLCollection(element.children, options);\n\n if (children && children.length > truncate) {\n children = \"\".concat(truncator, \"(\").concat(element.children.length, \")\");\n }\n\n return \"\".concat(head).concat(propertyContents).concat(headClose).concat(children).concat(tail);\n }\n\n var symbolsSupported = typeof Symbol === 'function' && typeof Symbol.for === 'function';\n var chaiInspect = symbolsSupported ? Symbol.for('chai/inspect') : '@@chai/inspect';\n var nodeInspect = false;\n\n try {\n // eslint-disable-next-line global-require\n var nodeUtil = __webpack_require__(/*! util */ \"?0ac7\");\n\n nodeInspect = nodeUtil.inspect ? nodeUtil.inspect.custom : false;\n } catch (noNodeInspect) {\n nodeInspect = false;\n }\n\n function FakeMap() {\n // eslint-disable-next-line prefer-template\n this.key = 'chai/loupe__' + Math.random() + Date.now();\n }\n\n FakeMap.prototype = {\n // eslint-disable-next-line object-shorthand\n get: function get(key) {\n return key[this.key];\n },\n // eslint-disable-next-line object-shorthand\n has: function has(key) {\n return this.key in key;\n },\n // eslint-disable-next-line object-shorthand\n set: function set(key, value) {\n if (Object.isExtensible(key)) {\n Object.defineProperty(key, this.key, {\n // eslint-disable-next-line object-shorthand\n value: value,\n configurable: true\n });\n }\n }\n };\n var constructorMap = new (typeof WeakMap === 'function' ? WeakMap : FakeMap)();\n var stringTagMap = {};\n var baseTypesMap = {\n undefined: function undefined$1(value, options) {\n return options.stylize('undefined', 'undefined');\n },\n null: function _null(value, options) {\n return options.stylize(null, 'null');\n },\n boolean: function boolean(value, options) {\n return options.stylize(value, 'boolean');\n },\n Boolean: function Boolean(value, options) {\n return options.stylize(value, 'boolean');\n },\n number: inspectNumber,\n Number: inspectNumber,\n bigint: inspectBigInt,\n BigInt: inspectBigInt,\n string: inspectString,\n String: inspectString,\n function: inspectFunction,\n Function: inspectFunction,\n symbol: inspectSymbol,\n // A Symbol polyfill will return `Symbol` not `symbol` from typedetect\n Symbol: inspectSymbol,\n Array: inspectArray,\n Date: inspectDate,\n Map: inspectMap,\n Set: inspectSet,\n RegExp: inspectRegExp,\n Promise: inspectPromise,\n // WeakSet, WeakMap are totally opaque to us\n WeakSet: function WeakSet(value, options) {\n return options.stylize('WeakSet{…}', 'special');\n },\n WeakMap: function WeakMap(value, options) {\n return options.stylize('WeakMap{…}', 'special');\n },\n Arguments: inspectArguments,\n Int8Array: inspectTypedArray,\n Uint8Array: inspectTypedArray,\n Uint8ClampedArray: inspectTypedArray,\n Int16Array: inspectTypedArray,\n Uint16Array: inspectTypedArray,\n Int32Array: inspectTypedArray,\n Uint32Array: inspectTypedArray,\n Float32Array: inspectTypedArray,\n Float64Array: inspectTypedArray,\n Generator: function Generator() {\n return '';\n },\n DataView: function DataView() {\n return '';\n },\n ArrayBuffer: function ArrayBuffer() {\n return '';\n },\n Error: inspectObject$1,\n HTMLCollection: inspectHTMLCollection,\n NodeList: inspectHTMLCollection\n }; // eslint-disable-next-line complexity\n\n var inspectCustom = function inspectCustom(value, options, type) {\n if (chaiInspect in value && typeof value[chaiInspect] === 'function') {\n return value[chaiInspect](options);\n }\n\n if (nodeInspect && nodeInspect in value && typeof value[nodeInspect] === 'function') {\n return value[nodeInspect](options.depth, options);\n }\n\n if ('inspect' in value && typeof value.inspect === 'function') {\n return value.inspect(options.depth, options);\n }\n\n if ('constructor' in value && constructorMap.has(value.constructor)) {\n return constructorMap.get(value.constructor)(value, options);\n }\n\n if (stringTagMap[type]) {\n return stringTagMap[type](value, options);\n }\n\n return '';\n };\n\n var toString$1 = Object.prototype.toString; // eslint-disable-next-line complexity\n\n function inspect(value, options) {\n options = normaliseOptions(options);\n options.inspect = inspect;\n var _options = options,\n customInspect = _options.customInspect;\n var type = value === null ? 'null' : _typeof(value);\n\n if (type === 'object') {\n type = toString$1.call(value).slice(8, -1);\n } // If it is a base value that we already support, then use Loupe's inspector\n\n\n if (baseTypesMap[type]) {\n return baseTypesMap[type](value, options);\n } // If `options.customInspect` is set to true then try to use the custom inspector\n\n\n if (customInspect && value) {\n var output = inspectCustom(value, options, type);\n\n if (output) {\n if (typeof output === 'string') return output;\n return inspect(output, options);\n }\n }\n\n var proto = value ? Object.getPrototypeOf(value) : false; // If it's a plain Object then use Loupe's inspector\n\n if (proto === Object.prototype || proto === null) {\n return inspectObject(value, options);\n } // Specifically account for HTMLElements\n // eslint-disable-next-line no-undef\n\n\n if (value && typeof HTMLElement === 'function' && value instanceof HTMLElement) {\n return inspectHTML(value, options);\n }\n\n if ('constructor' in value) {\n // If it is a class, inspect it like an object but add the constructor name\n if (value.constructor !== Object) {\n return inspectClass(value, options);\n } // If it is an object with an anonymous prototype, display it as an object.\n\n\n return inspectObject(value, options);\n } // last chance to check if it's an object\n\n\n if (value === Object(value)) {\n return inspectObject(value, options);\n } // We have run out of options! Just stringify the value\n\n\n return options.stylize(String(value), type);\n }\n function registerConstructor(constructor, inspector) {\n if (constructorMap.has(constructor)) {\n return false;\n }\n\n constructorMap.set(constructor, inspector);\n return true;\n }\n function registerStringTag(stringTag, inspector) {\n if (stringTag in stringTagMap) {\n return false;\n }\n\n stringTagMap[stringTag] = inspector;\n return true;\n }\n var custom = chaiInspect;\n\n exports.custom = custom;\n exports.default = inspect;\n exports.inspect = inspect;\n exports.registerConstructor = registerConstructor;\n exports.registerStringTag = registerStringTag;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n\n\n//# sourceURL=webpack://JSEncrypt/./node_modules/loupe/loupe.js?"); /***/ }),