'\n */\n function wrap(value, wrapper) {\n return partial(castFunction(wrapper), value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Casts `value` as an array if it's not one.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Lang\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast array.\n * @example\n *\n * _.castArray(1);\n * // => [1]\n *\n * _.castArray({ 'a': 1 });\n * // => [{ 'a': 1 }]\n *\n * _.castArray('abc');\n * // => ['abc']\n *\n * _.castArray(null);\n * // => [null]\n *\n * _.castArray(undefined);\n * // => [undefined]\n *\n * _.castArray();\n * // => []\n *\n * var array = [1, 2, 3];\n * console.log(_.castArray(array) === array);\n * // => true\n */\n function castArray() {\n if (!arguments.length) {\n return [];\n }\n var value = arguments[0];\n return isArray(value) ? value : [value];\n }\n\n /**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\n function clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.clone` except that it accepts `customizer` which\n * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n * cloning is handled by the method instead. The `customizer` is invoked with\n * up to four arguments; (value [, index|key, object, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeepWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(false);\n * }\n * }\n *\n * var el = _.cloneWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 0\n */\n function cloneWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\n function cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.cloneWith` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the deep cloned value.\n * @see _.cloneWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(true);\n * }\n * }\n *\n * var el = _.cloneDeepWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 20\n */\n function cloneDeepWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * Checks if `object` conforms to `source` by invoking the predicate\n * properties of `source` with the corresponding property values of `object`.\n *\n * **Note:** This method is equivalent to `_.conforms` when `source` is\n * partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n * // => true\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n * // => false\n */\n function conformsTo(object, source) {\n return source == null || baseConformsTo(object, source, keys(source));\n }\n\n /**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\n function eq(value, other) {\n return value === other || value !== value && other !== other;\n }\n\n /**\n * Checks if `value` is greater than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n * @see _.lt\n * @example\n *\n * _.gt(3, 1);\n * // => true\n *\n * _.gt(3, 3);\n * // => false\n *\n * _.gt(1, 3);\n * // => false\n */\n var gt = createRelationalOperation(baseGt);\n\n /**\n * Checks if `value` is greater than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than or equal to\n * `other`, else `false`.\n * @see _.lte\n * @example\n *\n * _.gte(3, 1);\n * // => true\n *\n * _.gte(3, 3);\n * // => true\n *\n * _.gte(1, 3);\n * // => false\n */\n var gte = createRelationalOperation(function (value, other) {\n return value >= other;\n });\n\n /**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\n var isArguments = baseIsArguments(function () {\n return arguments;\n }()) ? baseIsArguments : function (value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');\n };\n\n /**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\n var isArray = Array.isArray;\n\n /**\n * Checks if `value` is classified as an `ArrayBuffer` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n * @example\n *\n * _.isArrayBuffer(new ArrayBuffer(2));\n * // => true\n *\n * _.isArrayBuffer(new Array(2));\n * // => false\n */\n var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\n /**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\n function isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n }\n\n /**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\n function isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n }\n\n /**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\n function isBoolean(value) {\n return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag;\n }\n\n /**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\n var isBuffer = nativeIsBuffer || stubFalse;\n\n /**\n * Checks if `value` is classified as a `Date` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n * @example\n *\n * _.isDate(new Date);\n * // => true\n *\n * _.isDate('Mon April 23 2012');\n * // => false\n */\n var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n /**\n * Checks if `value` is likely a DOM element.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('');\n * // => false\n */\n function isElement(value) {\n return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n }\n\n /**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\n function isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) && (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\n function isEqual(value, other) {\n return baseIsEqual(value, other);\n }\n\n /**\n * This method is like `_.isEqual` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with up to\n * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqualWith(array, other, customizer);\n * // => true\n */\n function isEqualWith(value, other, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n var result = customizer ? customizer(value, other) : undefined;\n return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n }\n\n /**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\n function isError(value) {\n if (!isObjectLike(value)) {\n return false;\n }\n var tag = baseGetTag(value);\n return tag == errorTag || tag == domExcTag || typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value);\n }\n\n /**\n * Checks if `value` is a finite primitive number.\n *\n * **Note:** This method is based on\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n * @example\n *\n * _.isFinite(3);\n * // => true\n *\n * _.isFinite(Number.MIN_VALUE);\n * // => true\n *\n * _.isFinite(Infinity);\n * // => false\n *\n * _.isFinite('3');\n * // => false\n */\n function isFinite(value) {\n return typeof value == 'number' && nativeIsFinite(value);\n }\n\n /**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n function isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n }\n\n /**\n * Checks if `value` is an integer.\n *\n * **Note:** This method is based on\n * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n * @example\n *\n * _.isInteger(3);\n * // => true\n *\n * _.isInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isInteger(Infinity);\n * // => false\n *\n * _.isInteger('3');\n * // => false\n */\n function isInteger(value) {\n return typeof value == 'number' && value == toInteger(value);\n }\n\n /**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\n function isLength(value) {\n return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\n function isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n }\n\n /**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n function isObjectLike(value) {\n return value != null && typeof value == 'object';\n }\n\n /**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\n var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n /**\n * Performs a partial deep comparison between `object` and `source` to\n * determine if `object` contains equivalent property values.\n *\n * **Note:** This method is equivalent to `_.matches` when `source` is\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.isMatch(object, { 'b': 2 });\n * // => true\n *\n * _.isMatch(object, { 'b': 1 });\n * // => false\n */\n function isMatch(object, source) {\n return object === source || baseIsMatch(object, source, getMatchData(source));\n }\n\n /**\n * This method is like `_.isMatch` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with five\n * arguments: (objValue, srcValue, index|key, object, source).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, srcValue) {\n * if (isGreeting(objValue) && isGreeting(srcValue)) {\n * return true;\n * }\n * }\n *\n * var object = { 'greeting': 'hello' };\n * var source = { 'greeting': 'hi' };\n *\n * _.isMatchWith(object, source, customizer);\n * // => true\n */\n function isMatchWith(object, source, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseIsMatch(object, source, getMatchData(source), customizer);\n }\n\n /**\n * Checks if `value` is `NaN`.\n *\n * **Note:** This method is based on\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n * `undefined` and other non-number values.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n * @example\n *\n * _.isNaN(NaN);\n * // => true\n *\n * _.isNaN(new Number(NaN));\n * // => true\n *\n * isNaN(undefined);\n * // => true\n *\n * _.isNaN(undefined);\n * // => false\n */\n function isNaN(value) {\n // An `NaN` primitive is the only value that is not equal to itself.\n // Perform the `toStringTag` check first to avoid errors with some\n // ActiveX objects in IE.\n return isNumber(value) && value != +value;\n }\n\n /**\n * Checks if `value` is a pristine native function.\n *\n * **Note:** This method can't reliably detect native functions in the presence\n * of the core-js package because core-js circumvents this kind of detection.\n * Despite multiple requests, the core-js maintainer has made it clear: any\n * attempt to fix the detection will be obstructed. As a result, we're left\n * with little choice but to throw an error. Unfortunately, this also affects\n * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n * which rely on core-js.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\n function isNative(value) {\n if (isMaskable(value)) {\n throw new Error(CORE_ERROR_TEXT);\n }\n return baseIsNative(value);\n }\n\n /**\n * Checks if `value` is `null`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n * @example\n *\n * _.isNull(null);\n * // => true\n *\n * _.isNull(void 0);\n * // => false\n */\n function isNull(value) {\n return value === null;\n }\n\n /**\n * Checks if `value` is `null` or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\n function isNil(value) {\n return value == null;\n }\n\n /**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\n function isNumber(value) {\n return typeof value == 'number' || isObjectLike(value) && baseGetTag(value) == numberTag;\n }\n\n /**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\n function isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;\n }\n\n /**\n * Checks if `value` is classified as a `RegExp` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n * @example\n *\n * _.isRegExp(/abc/);\n * // => true\n *\n * _.isRegExp('/abc/');\n * // => false\n */\n var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n /**\n * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n * double precision number which isn't the result of a rounded unsafe integer.\n *\n * **Note:** This method is based on\n * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n * @example\n *\n * _.isSafeInteger(3);\n * // => true\n *\n * _.isSafeInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isSafeInteger(Infinity);\n * // => false\n *\n * _.isSafeInteger('3');\n * // => false\n */\n function isSafeInteger(value) {\n return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\n var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n /**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\n function isString(value) {\n return typeof value == 'string' || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag;\n }\n\n /**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n function isSymbol(value) {\n return typeof value == 'symbol' || isObjectLike(value) && baseGetTag(value) == symbolTag;\n }\n\n /**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\n var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n /**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\n function isUndefined(value) {\n return value === undefined;\n }\n\n /**\n * Checks if `value` is classified as a `WeakMap` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n * @example\n *\n * _.isWeakMap(new WeakMap);\n * // => true\n *\n * _.isWeakMap(new Map);\n * // => false\n */\n function isWeakMap(value) {\n return isObjectLike(value) && getTag(value) == weakMapTag;\n }\n\n /**\n * Checks if `value` is classified as a `WeakSet` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n * @example\n *\n * _.isWeakSet(new WeakSet);\n * // => true\n *\n * _.isWeakSet(new Set);\n * // => false\n */\n function isWeakSet(value) {\n return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n }\n\n /**\n * Checks if `value` is less than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n * @see _.gt\n * @example\n *\n * _.lt(1, 3);\n * // => true\n *\n * _.lt(3, 3);\n * // => false\n *\n * _.lt(3, 1);\n * // => false\n */\n var lt = createRelationalOperation(baseLt);\n\n /**\n * Checks if `value` is less than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than or equal to\n * `other`, else `false`.\n * @see _.gte\n * @example\n *\n * _.lte(1, 3);\n * // => true\n *\n * _.lte(3, 3);\n * // => true\n *\n * _.lte(3, 1);\n * // => false\n */\n var lte = createRelationalOperation(function (value, other) {\n return value <= other;\n });\n\n /**\n * Converts `value` to an array.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Array} Returns the converted array.\n * @example\n *\n * _.toArray({ 'a': 1, 'b': 2 });\n * // => [1, 2]\n *\n * _.toArray('abc');\n * // => ['a', 'b', 'c']\n *\n * _.toArray(1);\n * // => []\n *\n * _.toArray(null);\n * // => []\n */\n function toArray(value) {\n if (!value) {\n return [];\n }\n if (isArrayLike(value)) {\n return isString(value) ? stringToArray(value) : copyArray(value);\n }\n if (symIterator && value[symIterator]) {\n return iteratorToArray(value[symIterator]());\n }\n var tag = getTag(value),\n func = tag == mapTag ? mapToArray : tag == setTag ? setToArray : values;\n return func(value);\n }\n\n /**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\n function toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = value < 0 ? -1 : 1;\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n }\n\n /**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\n function toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n return result === result ? remainder ? result - remainder : result : 0;\n }\n\n /**\n * Converts `value` to an integer suitable for use as the length of an\n * array-like object.\n *\n * **Note:** This method is based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toLength(3.2);\n * // => 3\n *\n * _.toLength(Number.MIN_VALUE);\n * // => 0\n *\n * _.toLength(Infinity);\n * // => 4294967295\n *\n * _.toLength('3.2');\n * // => 3\n */\n function toLength(value) {\n return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n }\n\n /**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\n function toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? other + '' : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;\n }\n\n /**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\n function toPlainObject(value) {\n return copyObject(value, keysIn(value));\n }\n\n /**\n * Converts `value` to a safe integer. A safe integer can be compared and\n * represented correctly.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toSafeInteger(3.2);\n * // => 3\n *\n * _.toSafeInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toSafeInteger(Infinity);\n * // => 9007199254740991\n *\n * _.toSafeInteger('3.2');\n * // => 3\n */\n function toSafeInteger(value) {\n return value ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) : value === 0 ? value : 0;\n }\n\n /**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\n function toString(value) {\n return value == null ? '' : baseToString(value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\n var assign = createAssigner(function (object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n });\n\n /**\n * This method is like `_.assign` except that it iterates over own and\n * inherited source properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extend\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assign\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n */\n var assignIn = createAssigner(function (object, source) {\n copyObject(source, keysIn(source), object);\n });\n\n /**\n * This method is like `_.assignIn` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extendWith\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignInWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignInWith = createAssigner(function (object, source, srcIndex, customizer) {\n copyObject(source, keysIn(source), object, customizer);\n });\n\n /**\n * This method is like `_.assign` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignInWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignWith = createAssigner(function (object, source, srcIndex, customizer) {\n copyObject(source, keys(source), object, customizer);\n });\n\n /**\n * Creates an array of values corresponding to `paths` of `object`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Array} Returns the picked values.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _.at(object, ['a[0].b.c', 'a[1]']);\n * // => [3, 4]\n */\n var at = flatRest(baseAt);\n\n /**\n * Creates an object that inherits from the `prototype` object. If a\n * `properties` object is given, its own enumerable string keyed properties\n * are assigned to the created object.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Object\n * @param {Object} prototype The object to inherit from.\n * @param {Object} [properties] The properties to assign to the object.\n * @returns {Object} Returns the new object.\n * @example\n *\n * function Shape() {\n * this.x = 0;\n * this.y = 0;\n * }\n *\n * function Circle() {\n * Shape.call(this);\n * }\n *\n * Circle.prototype = _.create(Shape.prototype, {\n * 'constructor': Circle\n * });\n *\n * var circle = new Circle;\n * circle instanceof Circle;\n * // => true\n *\n * circle instanceof Shape;\n * // => true\n */\n function create(prototype, properties) {\n var result = baseCreate(prototype);\n return properties == null ? result : baseAssign(result, properties);\n }\n\n /**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var defaults = baseRest(function (object, sources) {\n object = Object(object);\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n if (value === undefined || eq(value, objectProto[key]) && !hasOwnProperty.call(object, key)) {\n object[key] = source[key];\n }\n }\n }\n return object;\n });\n\n /**\n * This method is like `_.defaults` except that it recursively assigns\n * default properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaults\n * @example\n *\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n * // => { 'a': { 'b': 2, 'c': 3 } }\n */\n var defaultsDeep = baseRest(function (args) {\n args.push(undefined, customDefaultsMerge);\n return apply(mergeWith, undefined, args);\n });\n\n /**\n * This method is like `_.find` except that it returns the key of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findKey(users, function(o) { return o.age < 40; });\n * // => 'barney' (iteration order is not guaranteed)\n *\n * // The `_.matches` iteratee shorthand.\n * _.findKey(users, { 'age': 1, 'active': true });\n * // => 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findKey(users, 'active');\n * // => 'barney'\n */\n function findKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n }\n\n /**\n * This method is like `_.findKey` except that it iterates over elements of\n * a collection in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findLastKey(users, function(o) { return o.age < 40; });\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastKey(users, { 'age': 36, 'active': true });\n * // => 'barney'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastKey(users, 'active');\n * // => 'pebbles'\n */\n function findLastKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n }\n\n /**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */\n function forIn(object, iteratee) {\n return object == null ? object : baseFor(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * This method is like `_.forIn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forInRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n */\n function forInRight(object, iteratee) {\n return object == null ? object : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forOwn(object, iteratee) {\n return object && baseForOwn(object, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forOwn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwnRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n */\n function forOwnRight(object, iteratee) {\n return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an array of function property names from own enumerable properties\n * of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functionsIn\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functions(new Foo);\n * // => ['a', 'b']\n */\n function functions(object) {\n return object == null ? [] : baseFunctions(object, keys(object));\n }\n\n /**\n * Creates an array of function property names from own and inherited\n * enumerable properties of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functions\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functionsIn(new Foo);\n * // => ['a', 'b', 'c']\n */\n function functionsIn(object) {\n return object == null ? [] : baseFunctions(object, keysIn(object));\n }\n\n /**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\n function get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n }\n\n /**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\n function has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n }\n\n /**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\n function hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n }\n\n /**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite\n * property assignments of previous values.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Object\n * @param {Object} object The object to invert.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n */\n var invert = createInverter(function (result, value, key) {\n if (value != null && typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n result[value] = key;\n }, constant(identity));\n\n /**\n * This method is like `_.invert` except that the inverted object is generated\n * from the results of running each element of `object` thru `iteratee`. The\n * corresponding inverted value of each inverted key is an array of keys\n * responsible for generating the inverted value. The iteratee is invoked\n * with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Object\n * @param {Object} object The object to invert.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invertBy(object);\n * // => { '1': ['a', 'c'], '2': ['b'] }\n *\n * _.invertBy(object, function(value) {\n * return 'group' + value;\n * });\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n */\n var invertBy = createInverter(function (result, value, key) {\n if (value != null && typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n }, getIteratee);\n\n /**\n * Invokes the method at `path` of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n *\n * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n * // => [2, 3]\n */\n var invoke = baseRest(baseInvoke);\n\n /**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\n function keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n }\n\n /**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\n function keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n }\n\n /**\n * The opposite of `_.mapValues`; this method creates an object with the\n * same values as `object` and keys generated by running each own enumerable\n * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n * with three arguments: (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapValues\n * @example\n *\n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n * return key + value;\n * });\n * // => { 'a1': 1, 'b2': 2 }\n */\n function mapKeys(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n baseForOwn(object, function (value, key, object) {\n baseAssignValue(result, iteratee(value, key, object), value);\n });\n return result;\n }\n\n /**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\n function mapValues(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n baseForOwn(object, function (value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n }\n\n /**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\n var merge = createAssigner(function (object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n });\n\n /**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\n var mergeWith = createAssigner(function (object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n });\n\n /**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable property paths of `object` that are not omitted.\n *\n * **Note:** This method is considerably slower than `_.pick`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\n var omit = flatRest(function (object, paths) {\n var result = {};\n if (object == null) {\n return result;\n }\n var isDeep = false;\n paths = arrayMap(paths, function (path) {\n path = castPath(path, object);\n isDeep || (isDeep = path.length > 1);\n return path;\n });\n copyObject(object, getAllKeysIn(object), result);\n if (isDeep) {\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n }\n var length = paths.length;\n while (length--) {\n baseUnset(result, paths[length]);\n }\n return result;\n });\n\n /**\n * The opposite of `_.pickBy`; this method creates an object composed of\n * the own and inherited enumerable string keyed properties of `object` that\n * `predicate` doesn't return truthy for. The predicate is invoked with two\n * arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omitBy(object, _.isNumber);\n * // => { 'b': '2' }\n */\n function omitBy(object, predicate) {\n return pickBy(object, negate(getIteratee(predicate)));\n }\n\n /**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\n var pick = flatRest(function (object, paths) {\n return object == null ? {} : basePick(object, paths);\n });\n\n /**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\n function pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function (prop) {\n return [prop];\n });\n predicate = getIteratee(predicate);\n return basePickBy(object, props, function (value, path) {\n return predicate(value, path[0]);\n });\n }\n\n /**\n * This method is like `_.get` except that if the resolved value is a\n * function it's invoked with the `this` binding of its parent object and\n * its result is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to resolve.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n *\n * _.result(object, 'a[0].b.c1');\n * // => 3\n *\n * _.result(object, 'a[0].b.c2');\n * // => 4\n *\n * _.result(object, 'a[0].b.c3', 'default');\n * // => 'default'\n *\n * _.result(object, 'a[0].b.c3', _.constant('default'));\n * // => 'default'\n */\n function result(object, path, defaultValue) {\n path = castPath(path, object);\n var index = -1,\n length = path.length;\n\n // Ensure the loop is entered when path is empty.\n if (!length) {\n length = 1;\n object = undefined;\n }\n while (++index < length) {\n var value = object == null ? undefined : object[toKey(path[index])];\n if (value === undefined) {\n index = length;\n value = defaultValue;\n }\n object = isFunction(value) ? value.call(object) : value;\n }\n return object;\n }\n\n /**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\n function set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n }\n\n /**\n * This method is like `_.set` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.setWith(object, '[0][1]', 'a', Object);\n * // => { '0': { '1': 'a' } }\n */\n function setWith(object, path, value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseSet(object, path, value, customizer);\n }\n\n /**\n * Creates an array of own enumerable string keyed-value pairs for `object`\n * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n * entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entries\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairs(new Foo);\n * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n */\n var toPairs = createToPairs(keys);\n\n /**\n * Creates an array of own and inherited enumerable string keyed-value pairs\n * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n * or set, its entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entriesIn\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairsIn(new Foo);\n * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n */\n var toPairsIn = createToPairs(keysIn);\n\n /**\n * An alternative to `_.reduce`; this method transforms `object` to a new\n * `accumulator` object which is the result of running each of its own\n * enumerable string keyed properties thru `iteratee`, with each invocation\n * potentially mutating the `accumulator` object. If `accumulator` is not\n * provided, a new object with the same `[[Prototype]]` will be used. The\n * iteratee is invoked with four arguments: (accumulator, value, key, object).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The custom accumulator value.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.transform([2, 3, 4], function(result, n) {\n * result.push(n *= n);\n * return n % 2 == 0;\n * }, []);\n * // => [4, 9]\n *\n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */\n function transform(object, iteratee, accumulator) {\n var isArr = isArray(object),\n isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n iteratee = getIteratee(iteratee, 4);\n if (accumulator == null) {\n var Ctor = object && object.constructor;\n if (isArrLike) {\n accumulator = isArr ? new Ctor() : [];\n } else if (isObject(object)) {\n accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n } else {\n accumulator = {};\n }\n }\n (isArrLike ? arrayEach : baseForOwn)(object, function (value, index, object) {\n return iteratee(accumulator, value, index, object);\n });\n return accumulator;\n }\n\n /**\n * Removes the property at `path` of `object`.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n * _.unset(object, 'a[0].b.c');\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n *\n * _.unset(object, ['a', '0', 'b', 'c']);\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n */\n function unset(object, path) {\n return object == null ? true : baseUnset(object, path);\n }\n\n /**\n * This method is like `_.set` except that accepts `updater` to produce the\n * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n * is invoked with one argument: (value).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n * console.log(object.a[0].b.c);\n * // => 9\n *\n * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n * console.log(object.x[0].y.z);\n * // => 0\n */\n function update(object, path, updater) {\n return object == null ? object : baseUpdate(object, path, castFunction(updater));\n }\n\n /**\n * This method is like `_.update` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n * // => { '0': { '1': 'a' } }\n */\n function updateWith(object, path, updater, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n }\n\n /**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\n function values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n }\n\n /**\n * Creates an array of the own and inherited enumerable string keyed property\n * values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.valuesIn(new Foo);\n * // => [1, 2, 3] (iteration order is not guaranteed)\n */\n function valuesIn(object) {\n return object == null ? [] : baseValues(object, keysIn(object));\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Number\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n * @example\n *\n * _.clamp(-10, -5, 5);\n * // => -5\n *\n * _.clamp(10, -5, 5);\n * // => 5\n */\n function clamp(number, lower, upper) {\n if (upper === undefined) {\n upper = lower;\n lower = undefined;\n }\n if (upper !== undefined) {\n upper = toNumber(upper);\n upper = upper === upper ? upper : 0;\n }\n if (lower !== undefined) {\n lower = toNumber(lower);\n lower = lower === lower ? lower : 0;\n }\n return baseClamp(toNumber(number), lower, upper);\n }\n\n /**\n * Checks if `n` is between `start` and up to, but not including, `end`. If\n * `end` is not specified, it's set to `start` with `start` then set to `0`.\n * If `start` is greater than `end` the params are swapped to support\n * negative ranges.\n *\n * @static\n * @memberOf _\n * @since 3.3.0\n * @category Number\n * @param {number} number The number to check.\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n * @see _.range, _.rangeRight\n * @example\n *\n * _.inRange(3, 2, 4);\n * // => true\n *\n * _.inRange(4, 8);\n * // => true\n *\n * _.inRange(4, 2);\n * // => false\n *\n * _.inRange(2, 2);\n * // => false\n *\n * _.inRange(1.2, 2);\n * // => true\n *\n * _.inRange(5.2, 4);\n * // => false\n *\n * _.inRange(-3, -2, -6);\n * // => true\n */\n function inRange(number, start, end) {\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n number = toNumber(number);\n return baseInRange(number, start, end);\n }\n\n /**\n * Produces a random number between the inclusive `lower` and `upper` bounds.\n * If only one argument is provided a number between `0` and the given number\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\n * floats, a floating-point number is returned instead of an integer.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Number\n * @param {number} [lower=0] The lower bound.\n * @param {number} [upper=1] The upper bound.\n * @param {boolean} [floating] Specify returning a floating-point number.\n * @returns {number} Returns the random number.\n * @example\n *\n * _.random(0, 5);\n * // => an integer between 0 and 5\n *\n * _.random(5);\n * // => also an integer between 0 and 5\n *\n * _.random(5, true);\n * // => a floating-point number between 0 and 5\n *\n * _.random(1.2, 5.2);\n * // => a floating-point number between 1.2 and 5.2\n */\n function random(lower, upper, floating) {\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n upper = floating = undefined;\n }\n if (floating === undefined) {\n if (typeof upper == 'boolean') {\n floating = upper;\n upper = undefined;\n } else if (typeof lower == 'boolean') {\n floating = lower;\n lower = undefined;\n }\n }\n if (lower === undefined && upper === undefined) {\n lower = 0;\n upper = 1;\n } else {\n lower = toFinite(lower);\n if (upper === undefined) {\n upper = lower;\n lower = 0;\n } else {\n upper = toFinite(upper);\n }\n }\n if (lower > upper) {\n var temp = lower;\n lower = upper;\n upper = temp;\n }\n if (floating || lower % 1 || upper % 1) {\n var rand = nativeRandom();\n return nativeMin(lower + rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1))), upper);\n }\n return baseRandom(lower, upper);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\n var camelCase = createCompounder(function (result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n });\n\n /**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\n function capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n }\n\n /**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\n function deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n }\n\n /**\n * Checks if `string` ends with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=string.length] The position to search up to.\n * @returns {boolean} Returns `true` if `string` ends with `target`,\n * else `false`.\n * @example\n *\n * _.endsWith('abc', 'c');\n * // => true\n *\n * _.endsWith('abc', 'b');\n * // => false\n *\n * _.endsWith('abc', 'b', 2);\n * // => true\n */\n function endsWith(string, target, position) {\n string = toString(string);\n target = baseToString(target);\n var length = string.length;\n position = position === undefined ? length : baseClamp(toInteger(position), 0, length);\n var end = position;\n position -= target.length;\n return position >= 0 && string.slice(position, end) == target;\n }\n\n /**\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n * corresponding HTML entities.\n *\n * **Note:** No other characters are escaped. To escape additional\n * characters use a third-party library like [_he_](https://mths.be/he).\n *\n * Though the \">\" character is escaped for symmetry, characters like\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n * unless they're part of a tag or unquoted attribute value. See\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n * (under \"semi-related fun fact\") for more details.\n *\n * When working with HTML you should always\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n * XSS vectors.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function escape(string) {\n string = toString(string);\n return string && reHasUnescapedHtml.test(string) ? string.replace(reUnescapedHtml, escapeHtmlChar) : string;\n }\n\n /**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */\n function escapeRegExp(string) {\n string = toString(string);\n return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, '\\\\$&') : string;\n }\n\n /**\n * Converts `string` to\n * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the kebab cased string.\n * @example\n *\n * _.kebabCase('Foo Bar');\n * // => 'foo-bar'\n *\n * _.kebabCase('fooBar');\n * // => 'foo-bar'\n *\n * _.kebabCase('__FOO_BAR__');\n * // => 'foo-bar'\n */\n var kebabCase = createCompounder(function (result, word, index) {\n return result + (index ? '-' : '') + word.toLowerCase();\n });\n\n /**\n * Converts `string`, as space separated words, to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.lowerCase('--Foo-Bar--');\n * // => 'foo bar'\n *\n * _.lowerCase('fooBar');\n * // => 'foo bar'\n *\n * _.lowerCase('__FOO_BAR__');\n * // => 'foo bar'\n */\n var lowerCase = createCompounder(function (result, word, index) {\n return result + (index ? ' ' : '') + word.toLowerCase();\n });\n\n /**\n * Converts the first character of `string` to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.lowerFirst('Fred');\n * // => 'fred'\n *\n * _.lowerFirst('FRED');\n * // => 'fRED'\n */\n var lowerFirst = createCaseFirst('toLowerCase');\n\n /**\n * Pads `string` on the left and right sides if it's shorter than `length`.\n * Padding characters are truncated if they can't be evenly divided by `length`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.pad('abc', 8);\n * // => ' abc '\n *\n * _.pad('abc', 8, '_-');\n * // => '_-abc_-_'\n *\n * _.pad('abc', 3);\n * // => 'abc'\n */\n function pad(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n var strLength = length ? stringSize(string) : 0;\n if (!length || strLength >= length) {\n return string;\n }\n var mid = (length - strLength) / 2;\n return createPadding(nativeFloor(mid), chars) + string + createPadding(nativeCeil(mid), chars);\n }\n\n /**\n * Pads `string` on the right side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padEnd('abc', 6);\n * // => 'abc '\n *\n * _.padEnd('abc', 6, '_-');\n * // => 'abc_-_'\n *\n * _.padEnd('abc', 3);\n * // => 'abc'\n */\n function padEnd(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n var strLength = length ? stringSize(string) : 0;\n return length && strLength < length ? string + createPadding(length - strLength, chars) : string;\n }\n\n /**\n * Pads `string` on the left side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padStart('abc', 6);\n * // => ' abc'\n *\n * _.padStart('abc', 6, '_-');\n * // => '_-_abc'\n *\n * _.padStart('abc', 3);\n * // => 'abc'\n */\n function padStart(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n var strLength = length ? stringSize(string) : 0;\n return length && strLength < length ? createPadding(length - strLength, chars) + string : string;\n }\n\n /**\n * Converts `string` to an integer of the specified radix. If `radix` is\n * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n * hexadecimal, in which case a `radix` of `16` is used.\n *\n * **Note:** This method aligns with the\n * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category String\n * @param {string} string The string to convert.\n * @param {number} [radix=10] The radix to interpret `value` by.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.parseInt('08');\n * // => 8\n *\n * _.map(['6', '08', '10'], _.parseInt);\n * // => [6, 8, 10]\n */\n function parseInt(string, radix, guard) {\n if (guard || radix == null) {\n radix = 0;\n } else if (radix) {\n radix = +radix;\n }\n return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n }\n\n /**\n * Repeats the given string `n` times.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to repeat.\n * @param {number} [n=1] The number of times to repeat the string.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the repeated string.\n * @example\n *\n * _.repeat('*', 3);\n * // => '***'\n *\n * _.repeat('abc', 2);\n * // => 'abcabc'\n *\n * _.repeat('abc', 0);\n * // => ''\n */\n function repeat(string, n, guard) {\n if (guard ? isIterateeCall(string, n, guard) : n === undefined) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n return baseRepeat(toString(string), n);\n }\n\n /**\n * Replaces matches for `pattern` in `string` with `replacement`.\n *\n * **Note:** This method is based on\n * [`String#replace`](https://mdn.io/String/replace).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to modify.\n * @param {RegExp|string} pattern The pattern to replace.\n * @param {Function|string} replacement The match replacement.\n * @returns {string} Returns the modified string.\n * @example\n *\n * _.replace('Hi Fred', 'Fred', 'Barney');\n * // => 'Hi Barney'\n */\n function replace() {\n var args = arguments,\n string = toString(args[0]);\n return args.length < 3 ? string : string.replace(args[1], args[2]);\n }\n\n /**\n * Converts `string` to\n * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the snake cased string.\n * @example\n *\n * _.snakeCase('Foo Bar');\n * // => 'foo_bar'\n *\n * _.snakeCase('fooBar');\n * // => 'foo_bar'\n *\n * _.snakeCase('--FOO-BAR--');\n * // => 'foo_bar'\n */\n var snakeCase = createCompounder(function (result, word, index) {\n return result + (index ? '_' : '') + word.toLowerCase();\n });\n\n /**\n * Splits `string` by `separator`.\n *\n * **Note:** This method is based on\n * [`String#split`](https://mdn.io/String/split).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to split.\n * @param {RegExp|string} separator The separator pattern to split by.\n * @param {number} [limit] The length to truncate results to.\n * @returns {Array} Returns the string segments.\n * @example\n *\n * _.split('a-b-c', '-', 2);\n * // => ['a', 'b']\n */\n function split(string, separator, limit) {\n if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n separator = limit = undefined;\n }\n limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n if (!limit) {\n return [];\n }\n string = toString(string);\n if (string && (typeof separator == 'string' || separator != null && !isRegExp(separator))) {\n separator = baseToString(separator);\n if (!separator && hasUnicode(string)) {\n return castSlice(stringToArray(string), 0, limit);\n }\n }\n return string.split(separator, limit);\n }\n\n /**\n * Converts `string` to\n * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n *\n * @static\n * @memberOf _\n * @since 3.1.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the start cased string.\n * @example\n *\n * _.startCase('--foo-bar--');\n * // => 'Foo Bar'\n *\n * _.startCase('fooBar');\n * // => 'Foo Bar'\n *\n * _.startCase('__FOO_BAR__');\n * // => 'FOO BAR'\n */\n var startCase = createCompounder(function (result, word, index) {\n return result + (index ? ' ' : '') + upperFirst(word);\n });\n\n /**\n * Checks if `string` starts with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=0] The position to search from.\n * @returns {boolean} Returns `true` if `string` starts with `target`,\n * else `false`.\n * @example\n *\n * _.startsWith('abc', 'a');\n * // => true\n *\n * _.startsWith('abc', 'b');\n * // => false\n *\n * _.startsWith('abc', 'b', 1);\n * // => true\n */\n function startsWith(string, target, position) {\n string = toString(string);\n position = position == null ? 0 : baseClamp(toInteger(position), 0, string.length);\n target = baseToString(target);\n return string.slice(position, position + target.length) == target;\n }\n\n /**\n * Creates a compiled template function that can interpolate data properties\n * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n * properties may be accessed as free variables in the template. If a setting\n * object is given, it takes precedence over `_.templateSettings` values.\n *\n * **Note:** In the development build `_.template` utilizes\n * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n * for easier debugging.\n *\n * For more information on precompiling templates see\n * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n *\n * For more information on Chrome extension sandboxes see\n * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The template string.\n * @param {Object} [options={}] The options object.\n * @param {RegExp} [options.escape=_.templateSettings.escape]\n * The HTML \"escape\" delimiter.\n * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n * The \"evaluate\" delimiter.\n * @param {Object} [options.imports=_.templateSettings.imports]\n * An object to import into the template as free variables.\n * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n * The \"interpolate\" delimiter.\n * @param {string} [options.sourceURL='lodash.templateSources[n]']\n * The sourceURL of the compiled template.\n * @param {string} [options.variable='obj']\n * The data object variable name.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the compiled template function.\n * @example\n *\n * // Use the \"interpolate\" delimiter to create a compiled template.\n * var compiled = _.template('hello <%= user %>!');\n * compiled({ 'user': 'fred' });\n * // => 'hello fred!'\n *\n * // Use the HTML \"escape\" delimiter to escape data property values.\n * var compiled = _.template('<%- value %>');\n * compiled({ 'value': '\n if (val === '') return true;\n if (val === 'false') return false;\n if (val === 'true') return true;\n return val;\n}\nif (DOCUMENT && typeof DOCUMENT.querySelector === 'function') {\n var attrs = [['data-family-prefix', 'familyPrefix'], ['data-replacement-class', 'replacementClass'], ['data-auto-replace-svg', 'autoReplaceSvg'], ['data-auto-add-css', 'autoAddCss'], ['data-auto-a11y', 'autoA11y'], ['data-search-pseudo-elements', 'searchPseudoElements'], ['data-observe-mutations', 'observeMutations'], ['data-mutate-approach', 'mutateApproach'], ['data-keep-original-source', 'keepOriginalSource'], ['data-measure-performance', 'measurePerformance'], ['data-show-missing-icons', 'showMissingIcons']];\n attrs.forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n attr = _ref2[0],\n key = _ref2[1];\n var val = coerce(getAttrConfig(attr));\n if (val !== undefined && val !== null) {\n initial[key] = val;\n }\n });\n}\nvar _default = {\n familyPrefix: DEFAULT_FAMILY_PREFIX,\n replacementClass: DEFAULT_REPLACEMENT_CLASS,\n autoReplaceSvg: true,\n autoAddCss: true,\n autoA11y: true,\n searchPseudoElements: false,\n observeMutations: true,\n mutateApproach: 'async',\n keepOriginalSource: true,\n measurePerformance: false,\n showMissingIcons: true\n};\nvar _config = _objectSpread({}, _default, initial);\nif (!_config.autoReplaceSvg) _config.observeMutations = false;\nvar config = _objectSpread({}, _config);\nWINDOW.FontAwesomeConfig = config;\nvar w = WINDOW || {};\nif (!w[NAMESPACE_IDENTIFIER]) w[NAMESPACE_IDENTIFIER] = {};\nif (!w[NAMESPACE_IDENTIFIER].styles) w[NAMESPACE_IDENTIFIER].styles = {};\nif (!w[NAMESPACE_IDENTIFIER].hooks) w[NAMESPACE_IDENTIFIER].hooks = {};\nif (!w[NAMESPACE_IDENTIFIER].shims) w[NAMESPACE_IDENTIFIER].shims = [];\nvar namespace = w[NAMESPACE_IDENTIFIER];\nvar functions = [];\nvar listener = function listener() {\n DOCUMENT.removeEventListener('DOMContentLoaded', listener);\n loaded = 1;\n functions.map(function (fn) {\n return fn();\n });\n};\nvar loaded = false;\nif (IS_DOM) {\n loaded = (DOCUMENT.documentElement.doScroll ? /^loaded|^c/ : /^loaded|^i|^c/).test(DOCUMENT.readyState);\n if (!loaded) DOCUMENT.addEventListener('DOMContentLoaded', listener);\n}\nfunction domready(fn) {\n if (!IS_DOM) return;\n loaded ? setTimeout(fn, 0) : functions.push(fn);\n}\nvar PENDING = 'pending';\nvar SETTLED = 'settled';\nvar FULFILLED = 'fulfilled';\nvar REJECTED = 'rejected';\nvar NOOP = function NOOP() {};\nvar isNode = typeof global !== 'undefined' && typeof global.process !== 'undefined' && typeof global.process.emit === 'function';\nvar asyncSetTimer = typeof setImmediate === 'undefined' ? setTimeout : setImmediate;\nvar asyncQueue = [];\nvar asyncTimer;\nfunction asyncFlush() {\n // run promise callbacks\n for (var i = 0; i < asyncQueue.length; i++) {\n asyncQueue[i][0](asyncQueue[i][1]);\n } // reset async asyncQueue\n\n asyncQueue = [];\n asyncTimer = false;\n}\nfunction asyncCall(callback, arg) {\n asyncQueue.push([callback, arg]);\n if (!asyncTimer) {\n asyncTimer = true;\n asyncSetTimer(asyncFlush, 0);\n }\n}\nfunction invokeResolver(resolver, promise) {\n function resolvePromise(value) {\n resolve(promise, value);\n }\n function rejectPromise(reason) {\n reject(promise, reason);\n }\n try {\n resolver(resolvePromise, rejectPromise);\n } catch (e) {\n rejectPromise(e);\n }\n}\nfunction invokeCallback(subscriber) {\n var owner = subscriber.owner;\n var settled = owner._state;\n var value = owner._data;\n var callback = subscriber[settled];\n var promise = subscriber.then;\n if (typeof callback === 'function') {\n settled = FULFILLED;\n try {\n value = callback(value);\n } catch (e) {\n reject(promise, e);\n }\n }\n if (!handleThenable(promise, value)) {\n if (settled === FULFILLED) {\n resolve(promise, value);\n }\n if (settled === REJECTED) {\n reject(promise, value);\n }\n }\n}\nfunction handleThenable(promise, value) {\n var resolved;\n try {\n if (promise === value) {\n throw new TypeError('A promises callback cannot return that same promise.');\n }\n if (value && (typeof value === 'function' || _typeof(value) === 'object')) {\n // then should be retrieved only once\n var then = value.then;\n if (typeof then === 'function') {\n then.call(value, function (val) {\n if (!resolved) {\n resolved = true;\n if (value === val) {\n fulfill(promise, val);\n } else {\n resolve(promise, val);\n }\n }\n }, function (reason) {\n if (!resolved) {\n resolved = true;\n reject(promise, reason);\n }\n });\n return true;\n }\n }\n } catch (e) {\n if (!resolved) {\n reject(promise, e);\n }\n return true;\n }\n return false;\n}\nfunction resolve(promise, value) {\n if (promise === value || !handleThenable(promise, value)) {\n fulfill(promise, value);\n }\n}\nfunction fulfill(promise, value) {\n if (promise._state === PENDING) {\n promise._state = SETTLED;\n promise._data = value;\n asyncCall(publishFulfillment, promise);\n }\n}\nfunction reject(promise, reason) {\n if (promise._state === PENDING) {\n promise._state = SETTLED;\n promise._data = reason;\n asyncCall(publishRejection, promise);\n }\n}\nfunction publish(promise) {\n promise._then = promise._then.forEach(invokeCallback);\n}\nfunction publishFulfillment(promise) {\n promise._state = FULFILLED;\n publish(promise);\n}\nfunction publishRejection(promise) {\n promise._state = REJECTED;\n publish(promise);\n if (!promise._handled && isNode) {\n global.process.emit('unhandledRejection', promise._data, promise);\n }\n}\nfunction notifyRejectionHandled(promise) {\n global.process.emit('rejectionHandled', promise);\n}\n/**\n * @class\n */\n\nfunction P(resolver) {\n if (typeof resolver !== 'function') {\n throw new TypeError('Promise resolver ' + resolver + ' is not a function');\n }\n if (this instanceof P === false) {\n throw new TypeError('Failed to construct \\'Promise\\': Please use the \\'new\\' operator, this object constructor cannot be called as a function.');\n }\n this._then = [];\n invokeResolver(resolver, this);\n}\nP.prototype = {\n constructor: P,\n _state: PENDING,\n _then: null,\n _data: undefined,\n _handled: false,\n then: function then(onFulfillment, onRejection) {\n var subscriber = {\n owner: this,\n then: new this.constructor(NOOP),\n fulfilled: onFulfillment,\n rejected: onRejection\n };\n if ((onRejection || onFulfillment) && !this._handled) {\n this._handled = true;\n if (this._state === REJECTED && isNode) {\n asyncCall(notifyRejectionHandled, this);\n }\n }\n if (this._state === FULFILLED || this._state === REJECTED) {\n // already resolved, call callback async\n asyncCall(invokeCallback, subscriber);\n } else {\n // subscribe\n this._then.push(subscriber);\n }\n return subscriber.then;\n },\n catch: function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};\nP.all = function (promises) {\n if (!Array.isArray(promises)) {\n throw new TypeError('You must pass an array to Promise.all().');\n }\n return new P(function (resolve, reject) {\n var results = [];\n var remaining = 0;\n function resolver(index) {\n remaining++;\n return function (value) {\n results[index] = value;\n if (! --remaining) {\n resolve(results);\n }\n };\n }\n for (var i = 0, promise; i < promises.length; i++) {\n promise = promises[i];\n if (promise && typeof promise.then === 'function') {\n promise.then(resolver(i), reject);\n } else {\n results[i] = promise;\n }\n }\n if (!remaining) {\n resolve(results);\n }\n });\n};\nP.race = function (promises) {\n if (!Array.isArray(promises)) {\n throw new TypeError('You must pass an array to Promise.race().');\n }\n return new P(function (resolve, reject) {\n for (var i = 0, promise; i < promises.length; i++) {\n promise = promises[i];\n if (promise && typeof promise.then === 'function') {\n promise.then(resolve, reject);\n } else {\n resolve(promise);\n }\n }\n });\n};\nP.resolve = function (value) {\n if (value && _typeof(value) === 'object' && value.constructor === P) {\n return value;\n }\n return new P(function (resolve) {\n resolve(value);\n });\n};\nP.reject = function (reason) {\n return new P(function (resolve, reject) {\n reject(reason);\n });\n};\nvar picked = typeof Promise === 'function' ? Promise : P;\nvar d = UNITS_IN_GRID;\nvar meaninglessTransform = {\n size: 16,\n x: 0,\n y: 0,\n rotate: 0,\n flipX: false,\n flipY: false\n};\nfunction isReserved(name) {\n return ~RESERVED_CLASSES.indexOf(name);\n}\nfunction insertCss(css) {\n if (!css || !IS_DOM) {\n return;\n }\n var style = DOCUMENT.createElement('style');\n style.setAttribute('type', 'text/css');\n style.innerHTML = css;\n var headChildren = DOCUMENT.head.childNodes;\n var beforeChild = null;\n for (var i = headChildren.length - 1; i > -1; i--) {\n var child = headChildren[i];\n var tagName = (child.tagName || '').toUpperCase();\n if (['STYLE', 'LINK'].indexOf(tagName) > -1) {\n beforeChild = child;\n }\n }\n DOCUMENT.head.insertBefore(style, beforeChild);\n return css;\n}\nvar idPool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\nfunction nextUniqueId() {\n var size = 12;\n var id = '';\n while (size-- > 0) {\n id += idPool[Math.random() * 62 | 0];\n }\n return id;\n}\nfunction toArray(obj) {\n var array = [];\n for (var i = (obj || []).length >>> 0; i--;) {\n array[i] = obj[i];\n }\n return array;\n}\nfunction classArray(node) {\n if (node.classList) {\n return toArray(node.classList);\n } else {\n return (node.getAttribute('class') || '').split(' ').filter(function (i) {\n return i;\n });\n }\n}\nfunction getIconName(familyPrefix, cls) {\n var parts = cls.split('-');\n var prefix = parts[0];\n var iconName = parts.slice(1).join('-');\n if (prefix === familyPrefix && iconName !== '' && !isReserved(iconName)) {\n return iconName;\n } else {\n return null;\n }\n}\nfunction htmlEscape(str) {\n return \"\".concat(str).replace(/&/g, '&').replace(/\"/g, '"').replace(/'/g, ''').replace(//g, '>');\n}\nfunction joinAttributes(attributes) {\n return Object.keys(attributes || {}).reduce(function (acc, attributeName) {\n return acc + \"\".concat(attributeName, \"=\\\"\").concat(htmlEscape(attributes[attributeName]), \"\\\" \");\n }, '').trim();\n}\nfunction joinStyles(styles) {\n return Object.keys(styles || {}).reduce(function (acc, styleName) {\n return acc + \"\".concat(styleName, \": \").concat(styles[styleName], \";\");\n }, '');\n}\nfunction transformIsMeaningful(transform) {\n return transform.size !== meaninglessTransform.size || transform.x !== meaninglessTransform.x || transform.y !== meaninglessTransform.y || transform.rotate !== meaninglessTransform.rotate || transform.flipX || transform.flipY;\n}\nfunction transformForSvg(_ref) {\n var transform = _ref.transform,\n containerWidth = _ref.containerWidth,\n iconWidth = _ref.iconWidth;\n var outer = {\n transform: \"translate(\".concat(containerWidth / 2, \" 256)\")\n };\n var innerTranslate = \"translate(\".concat(transform.x * 32, \", \").concat(transform.y * 32, \") \");\n var innerScale = \"scale(\".concat(transform.size / 16 * (transform.flipX ? -1 : 1), \", \").concat(transform.size / 16 * (transform.flipY ? -1 : 1), \") \");\n var innerRotate = \"rotate(\".concat(transform.rotate, \" 0 0)\");\n var inner = {\n transform: \"\".concat(innerTranslate, \" \").concat(innerScale, \" \").concat(innerRotate)\n };\n var path = {\n transform: \"translate(\".concat(iconWidth / 2 * -1, \" -256)\")\n };\n return {\n outer: outer,\n inner: inner,\n path: path\n };\n}\nfunction transformForCss(_ref2) {\n var transform = _ref2.transform,\n _ref2$width = _ref2.width,\n width = _ref2$width === void 0 ? UNITS_IN_GRID : _ref2$width,\n _ref2$height = _ref2.height,\n height = _ref2$height === void 0 ? UNITS_IN_GRID : _ref2$height,\n _ref2$startCentered = _ref2.startCentered,\n startCentered = _ref2$startCentered === void 0 ? false : _ref2$startCentered;\n var val = '';\n if (startCentered && IS_IE) {\n val += \"translate(\".concat(transform.x / d - width / 2, \"em, \").concat(transform.y / d - height / 2, \"em) \");\n } else if (startCentered) {\n val += \"translate(calc(-50% + \".concat(transform.x / d, \"em), calc(-50% + \").concat(transform.y / d, \"em)) \");\n } else {\n val += \"translate(\".concat(transform.x / d, \"em, \").concat(transform.y / d, \"em) \");\n }\n val += \"scale(\".concat(transform.size / d * (transform.flipX ? -1 : 1), \", \").concat(transform.size / d * (transform.flipY ? -1 : 1), \") \");\n val += \"rotate(\".concat(transform.rotate, \"deg) \");\n return val;\n}\nvar ALL_SPACE = {\n x: 0,\n y: 0,\n width: '100%',\n height: '100%'\n};\nfunction fillBlack(abstract) {\n var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (abstract.attributes && (abstract.attributes.fill || force)) {\n abstract.attributes.fill = 'black';\n }\n return abstract;\n}\nfunction deGroup(abstract) {\n if (abstract.tag === 'g') {\n return abstract.children;\n } else {\n return [abstract];\n }\n}\nfunction makeIconMasking(_ref) {\n var children = _ref.children,\n attributes = _ref.attributes,\n main = _ref.main,\n mask = _ref.mask,\n explicitMaskId = _ref.maskId,\n transform = _ref.transform;\n var mainWidth = main.width,\n mainPath = main.icon;\n var maskWidth = mask.width,\n maskPath = mask.icon;\n var trans = transformForSvg({\n transform: transform,\n containerWidth: maskWidth,\n iconWidth: mainWidth\n });\n var maskRect = {\n tag: 'rect',\n attributes: _objectSpread({}, ALL_SPACE, {\n fill: 'white'\n })\n };\n var maskInnerGroupChildrenMixin = mainPath.children ? {\n children: mainPath.children.map(fillBlack)\n } : {};\n var maskInnerGroup = {\n tag: 'g',\n attributes: _objectSpread({}, trans.inner),\n children: [fillBlack(_objectSpread({\n tag: mainPath.tag,\n attributes: _objectSpread({}, mainPath.attributes, trans.path)\n }, maskInnerGroupChildrenMixin))]\n };\n var maskOuterGroup = {\n tag: 'g',\n attributes: _objectSpread({}, trans.outer),\n children: [maskInnerGroup]\n };\n var maskId = \"mask-\".concat(explicitMaskId || nextUniqueId());\n var clipId = \"clip-\".concat(explicitMaskId || nextUniqueId());\n var maskTag = {\n tag: 'mask',\n attributes: _objectSpread({}, ALL_SPACE, {\n id: maskId,\n maskUnits: 'userSpaceOnUse',\n maskContentUnits: 'userSpaceOnUse'\n }),\n children: [maskRect, maskOuterGroup]\n };\n var defs = {\n tag: 'defs',\n children: [{\n tag: 'clipPath',\n attributes: {\n id: clipId\n },\n children: deGroup(maskPath)\n }, maskTag]\n };\n children.push(defs, {\n tag: 'rect',\n attributes: _objectSpread({\n fill: 'currentColor',\n 'clip-path': \"url(#\".concat(clipId, \")\"),\n mask: \"url(#\".concat(maskId, \")\")\n }, ALL_SPACE)\n });\n return {\n children: children,\n attributes: attributes\n };\n}\nfunction makeIconStandard(_ref) {\n var children = _ref.children,\n attributes = _ref.attributes,\n main = _ref.main,\n transform = _ref.transform,\n styles = _ref.styles;\n var styleString = joinStyles(styles);\n if (styleString.length > 0) {\n attributes['style'] = styleString;\n }\n if (transformIsMeaningful(transform)) {\n var trans = transformForSvg({\n transform: transform,\n containerWidth: main.width,\n iconWidth: main.width\n });\n children.push({\n tag: 'g',\n attributes: _objectSpread({}, trans.outer),\n children: [{\n tag: 'g',\n attributes: _objectSpread({}, trans.inner),\n children: [{\n tag: main.icon.tag,\n children: main.icon.children,\n attributes: _objectSpread({}, main.icon.attributes, trans.path)\n }]\n }]\n });\n } else {\n children.push(main.icon);\n }\n return {\n children: children,\n attributes: attributes\n };\n}\nfunction asIcon(_ref) {\n var children = _ref.children,\n main = _ref.main,\n mask = _ref.mask,\n attributes = _ref.attributes,\n styles = _ref.styles,\n transform = _ref.transform;\n if (transformIsMeaningful(transform) && main.found && !mask.found) {\n var width = main.width,\n height = main.height;\n var offset = {\n x: width / height / 2,\n y: 0.5\n };\n attributes['style'] = joinStyles(_objectSpread({}, styles, {\n 'transform-origin': \"\".concat(offset.x + transform.x / 16, \"em \").concat(offset.y + transform.y / 16, \"em\")\n }));\n }\n return [{\n tag: 'svg',\n attributes: attributes,\n children: children\n }];\n}\nfunction asSymbol(_ref) {\n var prefix = _ref.prefix,\n iconName = _ref.iconName,\n children = _ref.children,\n attributes = _ref.attributes,\n symbol = _ref.symbol;\n var id = symbol === true ? \"\".concat(prefix, \"-\").concat(config.familyPrefix, \"-\").concat(iconName) : symbol;\n return [{\n tag: 'svg',\n attributes: {\n style: 'display: none;'\n },\n children: [{\n tag: 'symbol',\n attributes: _objectSpread({}, attributes, {\n id: id\n }),\n children: children\n }]\n }];\n}\nfunction makeInlineSvgAbstract(params) {\n var _params$icons = params.icons,\n main = _params$icons.main,\n mask = _params$icons.mask,\n prefix = params.prefix,\n iconName = params.iconName,\n transform = params.transform,\n symbol = params.symbol,\n title = params.title,\n maskId = params.maskId,\n titleId = params.titleId,\n extra = params.extra,\n _params$watchable = params.watchable,\n watchable = _params$watchable === void 0 ? false : _params$watchable;\n var _ref = mask.found ? mask : main,\n width = _ref.width,\n height = _ref.height;\n var isUploadedIcon = prefix === 'fak';\n var widthClass = isUploadedIcon ? '' : \"fa-w-\".concat(Math.ceil(width / height * 16));\n var attrClass = [config.replacementClass, iconName ? \"\".concat(config.familyPrefix, \"-\").concat(iconName) : '', widthClass].filter(function (c) {\n return extra.classes.indexOf(c) === -1;\n }).filter(function (c) {\n return c !== '' || !!c;\n }).concat(extra.classes).join(' ');\n var content = {\n children: [],\n attributes: _objectSpread({}, extra.attributes, {\n 'data-prefix': prefix,\n 'data-icon': iconName,\n 'class': attrClass,\n 'role': extra.attributes.role || 'img',\n 'xmlns': 'http://www.w3.org/2000/svg',\n 'viewBox': \"0 0 \".concat(width, \" \").concat(height)\n })\n };\n var uploadedIconWidthStyle = isUploadedIcon && !~extra.classes.indexOf('fa-fw') ? {\n width: \"\".concat(width / height * 16 * 0.0625, \"em\")\n } : {};\n if (watchable) {\n content.attributes[DATA_FA_I2SVG] = '';\n }\n if (title) content.children.push({\n tag: 'title',\n attributes: {\n id: content.attributes['aria-labelledby'] || \"title-\".concat(titleId || nextUniqueId())\n },\n children: [title]\n });\n var args = _objectSpread({}, content, {\n prefix: prefix,\n iconName: iconName,\n main: main,\n mask: mask,\n maskId: maskId,\n transform: transform,\n symbol: symbol,\n styles: _objectSpread({}, uploadedIconWidthStyle, extra.styles)\n });\n var _ref2 = mask.found && main.found ? makeIconMasking(args) : makeIconStandard(args),\n children = _ref2.children,\n attributes = _ref2.attributes;\n args.children = children;\n args.attributes = attributes;\n if (symbol) {\n return asSymbol(args);\n } else {\n return asIcon(args);\n }\n}\nfunction makeLayersTextAbstract(params) {\n var content = params.content,\n width = params.width,\n height = params.height,\n transform = params.transform,\n title = params.title,\n extra = params.extra,\n _params$watchable2 = params.watchable,\n watchable = _params$watchable2 === void 0 ? false : _params$watchable2;\n var attributes = _objectSpread({}, extra.attributes, title ? {\n 'title': title\n } : {}, {\n 'class': extra.classes.join(' ')\n });\n if (watchable) {\n attributes[DATA_FA_I2SVG] = '';\n }\n var styles = _objectSpread({}, extra.styles);\n if (transformIsMeaningful(transform)) {\n styles['transform'] = transformForCss({\n transform: transform,\n startCentered: true,\n width: width,\n height: height\n });\n styles['-webkit-transform'] = styles['transform'];\n }\n var styleString = joinStyles(styles);\n if (styleString.length > 0) {\n attributes['style'] = styleString;\n }\n var val = [];\n val.push({\n tag: 'span',\n attributes: attributes,\n children: [content]\n });\n if (title) {\n val.push({\n tag: 'span',\n attributes: {\n class: 'sr-only'\n },\n children: [title]\n });\n }\n return val;\n}\nfunction makeLayersCounterAbstract(params) {\n var content = params.content,\n title = params.title,\n extra = params.extra;\n var attributes = _objectSpread({}, extra.attributes, title ? {\n 'title': title\n } : {}, {\n 'class': extra.classes.join(' ')\n });\n var styleString = joinStyles(extra.styles);\n if (styleString.length > 0) {\n attributes['style'] = styleString;\n }\n var val = [];\n val.push({\n tag: 'span',\n attributes: attributes,\n children: [content]\n });\n if (title) {\n val.push({\n tag: 'span',\n attributes: {\n class: 'sr-only'\n },\n children: [title]\n });\n }\n return val;\n}\nvar noop$1 = function noop() {};\nvar p = config.measurePerformance && PERFORMANCE && PERFORMANCE.mark && PERFORMANCE.measure ? PERFORMANCE : {\n mark: noop$1,\n measure: noop$1\n};\nvar preamble = \"FA \\\"5.15.4\\\"\";\nvar begin = function begin(name) {\n p.mark(\"\".concat(preamble, \" \").concat(name, \" begins\"));\n return function () {\n return end(name);\n };\n};\nvar end = function end(name) {\n p.mark(\"\".concat(preamble, \" \").concat(name, \" ends\"));\n p.measure(\"\".concat(preamble, \" \").concat(name), \"\".concat(preamble, \" \").concat(name, \" begins\"), \"\".concat(preamble, \" \").concat(name, \" ends\"));\n};\nvar perf = {\n begin: begin,\n end: end\n};\n\n/**\n * Internal helper to bind a function known to have 4 arguments\n * to a given context.\n */\n\nvar bindInternal4 = function bindInternal4(func, thisContext) {\n return function (a, b, c, d) {\n return func.call(thisContext, a, b, c, d);\n };\n};\n\n/**\n * # Reduce\n *\n * A fast object `.reduce()` implementation.\n *\n * @param {Object} subject The object to reduce over.\n * @param {Function} fn The reducer function.\n * @param {mixed} initialValue The initial value for the reducer, defaults to subject[0].\n * @param {Object} thisContext The context for the reducer.\n * @return {mixed} The final result.\n */\n\nvar reduce = function fastReduceObject(subject, fn, initialValue, thisContext) {\n var keys = Object.keys(subject),\n length = keys.length,\n iterator = thisContext !== undefined ? bindInternal4(fn, thisContext) : fn,\n i,\n key,\n result;\n if (initialValue === undefined) {\n i = 1;\n result = subject[keys[0]];\n } else {\n i = 0;\n result = initialValue;\n }\n for (; i < length; i++) {\n key = keys[i];\n result = iterator(result, subject[key], key, subject);\n }\n return result;\n};\nfunction toHex(unicode) {\n var result = '';\n for (var i = 0; i < unicode.length; i++) {\n var hex = unicode.charCodeAt(i).toString(16);\n result += ('000' + hex).slice(-4);\n }\n return result;\n}\nfunction defineIcons(prefix, icons) {\n var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var _params$skipHooks = params.skipHooks,\n skipHooks = _params$skipHooks === void 0 ? false : _params$skipHooks;\n var normalized = Object.keys(icons).reduce(function (acc, iconName) {\n var icon = icons[iconName];\n var expanded = !!icon.icon;\n if (expanded) {\n acc[icon.iconName] = icon.icon;\n } else {\n acc[iconName] = icon;\n }\n return acc;\n }, {});\n if (typeof namespace.hooks.addPack === 'function' && !skipHooks) {\n namespace.hooks.addPack(prefix, normalized);\n } else {\n namespace.styles[prefix] = _objectSpread({}, namespace.styles[prefix] || {}, normalized);\n }\n /**\n * Font Awesome 4 used the prefix of `fa` for all icons. With the introduction\n * of new styles we needed to differentiate between them. Prefix `fa` is now an alias\n * for `fas` so we'll easy the upgrade process for our users by automatically defining\n * this as well.\n */\n\n if (prefix === 'fas') {\n defineIcons('fa', icons);\n }\n}\nvar styles = namespace.styles,\n shims = namespace.shims;\nvar _byUnicode = {};\nvar _byLigature = {};\nvar _byOldName = {};\nvar build = function build() {\n var lookup = function lookup(reducer) {\n return reduce(styles, function (o, style, prefix) {\n o[prefix] = reduce(style, reducer, {});\n return o;\n }, {});\n };\n _byUnicode = lookup(function (acc, icon, iconName) {\n if (icon[3]) {\n acc[icon[3]] = iconName;\n }\n return acc;\n });\n _byLigature = lookup(function (acc, icon, iconName) {\n var ligatures = icon[2];\n acc[iconName] = iconName;\n ligatures.forEach(function (ligature) {\n acc[ligature] = iconName;\n });\n return acc;\n });\n var hasRegular = ('far' in styles);\n _byOldName = reduce(shims, function (acc, shim) {\n var oldName = shim[0];\n var prefix = shim[1];\n var iconName = shim[2];\n if (prefix === 'far' && !hasRegular) {\n prefix = 'fas';\n }\n acc[oldName] = {\n prefix: prefix,\n iconName: iconName\n };\n return acc;\n }, {});\n};\nbuild();\nfunction byUnicode(prefix, unicode) {\n return (_byUnicode[prefix] || {})[unicode];\n}\nfunction byLigature(prefix, ligature) {\n return (_byLigature[prefix] || {})[ligature];\n}\nfunction byOldName(name) {\n return _byOldName[name] || {\n prefix: null,\n iconName: null\n };\n}\nvar styles$1 = namespace.styles;\nvar emptyCanonicalIcon = function emptyCanonicalIcon() {\n return {\n prefix: null,\n iconName: null,\n rest: []\n };\n};\nfunction getCanonicalIcon(values) {\n return values.reduce(function (acc, cls) {\n var iconName = getIconName(config.familyPrefix, cls);\n if (styles$1[cls]) {\n acc.prefix = cls;\n } else if (config.autoFetchSvg && Object.keys(PREFIX_TO_STYLE).indexOf(cls) > -1) {\n acc.prefix = cls;\n } else if (iconName) {\n var shim = acc.prefix === 'fa' ? byOldName(iconName) : {};\n acc.iconName = shim.iconName || iconName;\n acc.prefix = shim.prefix || acc.prefix;\n } else if (cls !== config.replacementClass && cls.indexOf('fa-w-') !== 0) {\n acc.rest.push(cls);\n }\n return acc;\n }, emptyCanonicalIcon());\n}\nfunction iconFromMapping(mapping, prefix, iconName) {\n if (mapping && mapping[prefix] && mapping[prefix][iconName]) {\n return {\n prefix: prefix,\n iconName: iconName,\n icon: mapping[prefix][iconName]\n };\n }\n}\nfunction toHtml(abstractNodes) {\n var tag = abstractNodes.tag,\n _abstractNodes$attrib = abstractNodes.attributes,\n attributes = _abstractNodes$attrib === void 0 ? {} : _abstractNodes$attrib,\n _abstractNodes$childr = abstractNodes.children,\n children = _abstractNodes$childr === void 0 ? [] : _abstractNodes$childr;\n if (typeof abstractNodes === 'string') {\n return htmlEscape(abstractNodes);\n } else {\n return \"<\".concat(tag, \" \").concat(joinAttributes(attributes), \">\").concat(children.map(toHtml).join(''), \"\").concat(tag, \">\");\n }\n}\nvar noop$2 = function noop() {};\nfunction isWatched(node) {\n var i2svg = node.getAttribute ? node.getAttribute(DATA_FA_I2SVG) : null;\n return typeof i2svg === 'string';\n}\nfunction getMutator() {\n if (config.autoReplaceSvg === true) {\n return mutators.replace;\n }\n var mutator = mutators[config.autoReplaceSvg];\n return mutator || mutators.replace;\n}\nvar mutators = {\n replace: function replace(mutation) {\n var node = mutation[0];\n var abstract = mutation[1];\n var newOuterHTML = abstract.map(function (a) {\n return toHtml(a);\n }).join('\\n');\n if (node.parentNode && node.outerHTML) {\n node.outerHTML = newOuterHTML + (config.keepOriginalSource && node.tagName.toLowerCase() !== 'svg' ? \"\") : '');\n } else if (node.parentNode) {\n var newNode = document.createElement('span');\n node.parentNode.replaceChild(newNode, node);\n newNode.outerHTML = newOuterHTML;\n }\n },\n nest: function nest(mutation) {\n var node = mutation[0];\n var abstract = mutation[1]; // If we already have a replaced node we do not want to continue nesting within it.\n // Short-circuit to the standard replacement\n\n if (~classArray(node).indexOf(config.replacementClass)) {\n return mutators.replace(mutation);\n }\n var forSvg = new RegExp(\"\".concat(config.familyPrefix, \"-.*\"));\n delete abstract[0].attributes.style;\n delete abstract[0].attributes.id;\n var splitClasses = abstract[0].attributes.class.split(' ').reduce(function (acc, cls) {\n if (cls === config.replacementClass || cls.match(forSvg)) {\n acc.toSvg.push(cls);\n } else {\n acc.toNode.push(cls);\n }\n return acc;\n }, {\n toNode: [],\n toSvg: []\n });\n abstract[0].attributes.class = splitClasses.toSvg.join(' ');\n var newInnerHTML = abstract.map(function (a) {\n return toHtml(a);\n }).join('\\n');\n node.setAttribute('class', splitClasses.toNode.join(' '));\n node.setAttribute(DATA_FA_I2SVG, '');\n node.innerHTML = newInnerHTML;\n }\n};\nfunction performOperationSync(op) {\n op();\n}\nfunction perform(mutations, callback) {\n var callbackFunction = typeof callback === 'function' ? callback : noop$2;\n if (mutations.length === 0) {\n callbackFunction();\n } else {\n var frame = performOperationSync;\n if (config.mutateApproach === MUTATION_APPROACH_ASYNC) {\n frame = WINDOW.requestAnimationFrame || performOperationSync;\n }\n frame(function () {\n var mutator = getMutator();\n var mark = perf.begin('mutate');\n mutations.map(mutator);\n mark();\n callbackFunction();\n });\n }\n}\nvar disabled = false;\nfunction disableObservation() {\n disabled = true;\n}\nfunction enableObservation() {\n disabled = false;\n}\nvar mo = null;\nfunction observe(options) {\n if (!MUTATION_OBSERVER) {\n return;\n }\n if (!config.observeMutations) {\n return;\n }\n var treeCallback = options.treeCallback,\n nodeCallback = options.nodeCallback,\n pseudoElementsCallback = options.pseudoElementsCallback,\n _options$observeMutat = options.observeMutationsRoot,\n observeMutationsRoot = _options$observeMutat === void 0 ? DOCUMENT : _options$observeMutat;\n mo = new MUTATION_OBSERVER(function (objects) {\n if (disabled) return;\n toArray(objects).forEach(function (mutationRecord) {\n if (mutationRecord.type === 'childList' && mutationRecord.addedNodes.length > 0 && !isWatched(mutationRecord.addedNodes[0])) {\n if (config.searchPseudoElements) {\n pseudoElementsCallback(mutationRecord.target);\n }\n treeCallback(mutationRecord.target);\n }\n if (mutationRecord.type === 'attributes' && mutationRecord.target.parentNode && config.searchPseudoElements) {\n pseudoElementsCallback(mutationRecord.target.parentNode);\n }\n if (mutationRecord.type === 'attributes' && isWatched(mutationRecord.target) && ~ATTRIBUTES_WATCHED_FOR_MUTATION.indexOf(mutationRecord.attributeName)) {\n if (mutationRecord.attributeName === 'class') {\n var _getCanonicalIcon = getCanonicalIcon(classArray(mutationRecord.target)),\n prefix = _getCanonicalIcon.prefix,\n iconName = _getCanonicalIcon.iconName;\n if (prefix) mutationRecord.target.setAttribute('data-prefix', prefix);\n if (iconName) mutationRecord.target.setAttribute('data-icon', iconName);\n } else {\n nodeCallback(mutationRecord.target);\n }\n }\n });\n });\n if (!IS_DOM) return;\n mo.observe(observeMutationsRoot, {\n childList: true,\n attributes: true,\n characterData: true,\n subtree: true\n });\n}\nfunction disconnect() {\n if (!mo) return;\n mo.disconnect();\n}\nfunction styleParser(node) {\n var style = node.getAttribute('style');\n var val = [];\n if (style) {\n val = style.split(';').reduce(function (acc, style) {\n var styles = style.split(':');\n var prop = styles[0];\n var value = styles.slice(1);\n if (prop && value.length > 0) {\n acc[prop] = value.join(':').trim();\n }\n return acc;\n }, {});\n }\n return val;\n}\nfunction classParser(node) {\n var existingPrefix = node.getAttribute('data-prefix');\n var existingIconName = node.getAttribute('data-icon');\n var innerText = node.innerText !== undefined ? node.innerText.trim() : '';\n var val = getCanonicalIcon(classArray(node));\n if (existingPrefix && existingIconName) {\n val.prefix = existingPrefix;\n val.iconName = existingIconName;\n }\n if (val.prefix && innerText.length > 1) {\n val.iconName = byLigature(val.prefix, node.innerText);\n } else if (val.prefix && innerText.length === 1) {\n val.iconName = byUnicode(val.prefix, toHex(node.innerText));\n }\n return val;\n}\nvar parseTransformString = function parseTransformString(transformString) {\n var transform = {\n size: 16,\n x: 0,\n y: 0,\n flipX: false,\n flipY: false,\n rotate: 0\n };\n if (!transformString) {\n return transform;\n } else {\n return transformString.toLowerCase().split(' ').reduce(function (acc, n) {\n var parts = n.toLowerCase().split('-');\n var first = parts[0];\n var rest = parts.slice(1).join('-');\n if (first && rest === 'h') {\n acc.flipX = true;\n return acc;\n }\n if (first && rest === 'v') {\n acc.flipY = true;\n return acc;\n }\n rest = parseFloat(rest);\n if (isNaN(rest)) {\n return acc;\n }\n switch (first) {\n case 'grow':\n acc.size = acc.size + rest;\n break;\n case 'shrink':\n acc.size = acc.size - rest;\n break;\n case 'left':\n acc.x = acc.x - rest;\n break;\n case 'right':\n acc.x = acc.x + rest;\n break;\n case 'up':\n acc.y = acc.y - rest;\n break;\n case 'down':\n acc.y = acc.y + rest;\n break;\n case 'rotate':\n acc.rotate = acc.rotate + rest;\n break;\n }\n return acc;\n }, transform);\n }\n};\nfunction transformParser(node) {\n return parseTransformString(node.getAttribute('data-fa-transform'));\n}\nfunction symbolParser(node) {\n var symbol = node.getAttribute('data-fa-symbol');\n return symbol === null ? false : symbol === '' ? true : symbol;\n}\nfunction attributesParser(node) {\n var extraAttributes = toArray(node.attributes).reduce(function (acc, attr) {\n if (acc.name !== 'class' && acc.name !== 'style') {\n acc[attr.name] = attr.value;\n }\n return acc;\n }, {});\n var title = node.getAttribute('title');\n var titleId = node.getAttribute('data-fa-title-id');\n if (config.autoA11y) {\n if (title) {\n extraAttributes['aria-labelledby'] = \"\".concat(config.replacementClass, \"-title-\").concat(titleId || nextUniqueId());\n } else {\n extraAttributes['aria-hidden'] = 'true';\n extraAttributes['focusable'] = 'false';\n }\n }\n return extraAttributes;\n}\nfunction maskParser(node) {\n var mask = node.getAttribute('data-fa-mask');\n if (!mask) {\n return emptyCanonicalIcon();\n } else {\n return getCanonicalIcon(mask.split(' ').map(function (i) {\n return i.trim();\n }));\n }\n}\nfunction blankMeta() {\n return {\n iconName: null,\n title: null,\n titleId: null,\n prefix: null,\n transform: meaninglessTransform,\n symbol: false,\n mask: null,\n maskId: null,\n extra: {\n classes: [],\n styles: {},\n attributes: {}\n }\n };\n}\nfunction parseMeta(node) {\n var _classParser = classParser(node),\n iconName = _classParser.iconName,\n prefix = _classParser.prefix,\n extraClasses = _classParser.rest;\n var extraStyles = styleParser(node);\n var transform = transformParser(node);\n var symbol = symbolParser(node);\n var extraAttributes = attributesParser(node);\n var mask = maskParser(node);\n return {\n iconName: iconName,\n title: node.getAttribute('title'),\n titleId: node.getAttribute('data-fa-title-id'),\n prefix: prefix,\n transform: transform,\n symbol: symbol,\n mask: mask,\n maskId: node.getAttribute('data-fa-mask-id'),\n extra: {\n classes: extraClasses,\n styles: extraStyles,\n attributes: extraAttributes\n }\n };\n}\nfunction MissingIcon(error) {\n this.name = 'MissingIcon';\n this.message = error || 'Icon unavailable';\n this.stack = new Error().stack;\n}\nMissingIcon.prototype = Object.create(Error.prototype);\nMissingIcon.prototype.constructor = MissingIcon;\nvar FILL = {\n fill: 'currentColor'\n};\nvar ANIMATION_BASE = {\n attributeType: 'XML',\n repeatCount: 'indefinite',\n dur: '2s'\n};\nvar RING = {\n tag: 'path',\n attributes: _objectSpread({}, FILL, {\n d: 'M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z'\n })\n};\nvar OPACITY_ANIMATE = _objectSpread({}, ANIMATION_BASE, {\n attributeName: 'opacity'\n});\nvar DOT = {\n tag: 'circle',\n attributes: _objectSpread({}, FILL, {\n cx: '256',\n cy: '364',\n r: '28'\n }),\n children: [{\n tag: 'animate',\n attributes: _objectSpread({}, ANIMATION_BASE, {\n attributeName: 'r',\n values: '28;14;28;28;14;28;'\n })\n }, {\n tag: 'animate',\n attributes: _objectSpread({}, OPACITY_ANIMATE, {\n values: '1;0;1;1;0;1;'\n })\n }]\n};\nvar QUESTION = {\n tag: 'path',\n attributes: _objectSpread({}, FILL, {\n opacity: '1',\n d: 'M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z'\n }),\n children: [{\n tag: 'animate',\n attributes: _objectSpread({}, OPACITY_ANIMATE, {\n values: '1;0;0;0;0;1;'\n })\n }]\n};\nvar EXCLAMATION = {\n tag: 'path',\n attributes: _objectSpread({}, FILL, {\n opacity: '0',\n d: 'M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z'\n }),\n children: [{\n tag: 'animate',\n attributes: _objectSpread({}, OPACITY_ANIMATE, {\n values: '0;0;1;1;0;0;'\n })\n }]\n};\nvar missing = {\n tag: 'g',\n children: [RING, DOT, QUESTION, EXCLAMATION]\n};\nvar styles$2 = namespace.styles;\nfunction asFoundIcon(icon) {\n var width = icon[0];\n var height = icon[1];\n var _icon$slice = icon.slice(4),\n _icon$slice2 = _slicedToArray(_icon$slice, 1),\n vectorData = _icon$slice2[0];\n var element = null;\n if (Array.isArray(vectorData)) {\n element = {\n tag: 'g',\n attributes: {\n class: \"\".concat(config.familyPrefix, \"-\").concat(DUOTONE_CLASSES.GROUP)\n },\n children: [{\n tag: 'path',\n attributes: {\n class: \"\".concat(config.familyPrefix, \"-\").concat(DUOTONE_CLASSES.SECONDARY),\n fill: 'currentColor',\n d: vectorData[0]\n }\n }, {\n tag: 'path',\n attributes: {\n class: \"\".concat(config.familyPrefix, \"-\").concat(DUOTONE_CLASSES.PRIMARY),\n fill: 'currentColor',\n d: vectorData[1]\n }\n }]\n };\n } else {\n element = {\n tag: 'path',\n attributes: {\n fill: 'currentColor',\n d: vectorData\n }\n };\n }\n return {\n found: true,\n width: width,\n height: height,\n icon: element\n };\n}\nfunction findIcon(iconName, prefix) {\n return new picked(function (resolve, reject) {\n var val = {\n found: false,\n width: 512,\n height: 512,\n icon: missing\n };\n if (iconName && prefix && styles$2[prefix] && styles$2[prefix][iconName]) {\n var icon = styles$2[prefix][iconName];\n return resolve(asFoundIcon(icon));\n }\n if (iconName && prefix && !config.showMissingIcons) {\n reject(new MissingIcon(\"Icon is missing for prefix \".concat(prefix, \" with icon name \").concat(iconName)));\n } else {\n resolve(val);\n }\n });\n}\nvar styles$3 = namespace.styles;\nfunction generateSvgReplacementMutation(node, nodeMeta) {\n var iconName = nodeMeta.iconName,\n title = nodeMeta.title,\n titleId = nodeMeta.titleId,\n prefix = nodeMeta.prefix,\n transform = nodeMeta.transform,\n symbol = nodeMeta.symbol,\n mask = nodeMeta.mask,\n maskId = nodeMeta.maskId,\n extra = nodeMeta.extra;\n return new picked(function (resolve, reject) {\n picked.all([findIcon(iconName, prefix), findIcon(mask.iconName, mask.prefix)]).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n main = _ref2[0],\n mask = _ref2[1];\n resolve([node, makeInlineSvgAbstract({\n icons: {\n main: main,\n mask: mask\n },\n prefix: prefix,\n iconName: iconName,\n transform: transform,\n symbol: symbol,\n mask: mask,\n maskId: maskId,\n title: title,\n titleId: titleId,\n extra: extra,\n watchable: true\n })]);\n });\n });\n}\nfunction generateLayersText(node, nodeMeta) {\n var title = nodeMeta.title,\n transform = nodeMeta.transform,\n extra = nodeMeta.extra;\n var width = null;\n var height = null;\n if (IS_IE) {\n var computedFontSize = parseInt(getComputedStyle(node).fontSize, 10);\n var boundingClientRect = node.getBoundingClientRect();\n width = boundingClientRect.width / computedFontSize;\n height = boundingClientRect.height / computedFontSize;\n }\n if (config.autoA11y && !title) {\n extra.attributes['aria-hidden'] = 'true';\n }\n return picked.resolve([node, makeLayersTextAbstract({\n content: node.innerHTML,\n width: width,\n height: height,\n transform: transform,\n title: title,\n extra: extra,\n watchable: true\n })]);\n}\nfunction generateMutation(node) {\n var nodeMeta = parseMeta(node);\n if (~nodeMeta.extra.classes.indexOf(LAYERS_TEXT_CLASSNAME)) {\n return generateLayersText(node, nodeMeta);\n } else {\n return generateSvgReplacementMutation(node, nodeMeta);\n }\n}\nfunction onTree(root) {\n var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n if (!IS_DOM) return;\n var htmlClassList = DOCUMENT.documentElement.classList;\n var hclAdd = function hclAdd(suffix) {\n return htmlClassList.add(\"\".concat(HTML_CLASS_I2SVG_BASE_CLASS, \"-\").concat(suffix));\n };\n var hclRemove = function hclRemove(suffix) {\n return htmlClassList.remove(\"\".concat(HTML_CLASS_I2SVG_BASE_CLASS, \"-\").concat(suffix));\n };\n var prefixes = config.autoFetchSvg ? Object.keys(PREFIX_TO_STYLE) : Object.keys(styles$3);\n var prefixesDomQuery = [\".\".concat(LAYERS_TEXT_CLASSNAME, \":not([\").concat(DATA_FA_I2SVG, \"])\")].concat(prefixes.map(function (p) {\n return \".\".concat(p, \":not([\").concat(DATA_FA_I2SVG, \"])\");\n })).join(', ');\n if (prefixesDomQuery.length === 0) {\n return;\n }\n var candidates = [];\n try {\n candidates = toArray(root.querySelectorAll(prefixesDomQuery));\n } catch (e) {// noop\n }\n if (candidates.length > 0) {\n hclAdd('pending');\n hclRemove('complete');\n } else {\n return;\n }\n var mark = perf.begin('onTree');\n var mutations = candidates.reduce(function (acc, node) {\n try {\n var mutation = generateMutation(node);\n if (mutation) {\n acc.push(mutation);\n }\n } catch (e) {\n if (!PRODUCTION) {\n if (e instanceof MissingIcon) {\n console.error(e);\n }\n }\n }\n return acc;\n }, []);\n return new picked(function (resolve, reject) {\n picked.all(mutations).then(function (resolvedMutations) {\n perform(resolvedMutations, function () {\n hclAdd('active');\n hclAdd('complete');\n hclRemove('pending');\n if (typeof callback === 'function') callback();\n mark();\n resolve();\n });\n }).catch(function () {\n mark();\n reject();\n });\n });\n}\nfunction onNode(node) {\n var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n generateMutation(node).then(function (mutation) {\n if (mutation) {\n perform([mutation], callback);\n }\n });\n}\nfunction replaceForPosition(node, position) {\n var pendingAttribute = \"\".concat(DATA_FA_PSEUDO_ELEMENT_PENDING).concat(position.replace(':', '-'));\n return new picked(function (resolve, reject) {\n if (node.getAttribute(pendingAttribute) !== null) {\n // This node is already being processed\n return resolve();\n }\n var children = toArray(node.children);\n var alreadyProcessedPseudoElement = children.filter(function (c) {\n return c.getAttribute(DATA_FA_PSEUDO_ELEMENT) === position;\n })[0];\n var styles = WINDOW.getComputedStyle(node, position);\n var fontFamily = styles.getPropertyValue('font-family').match(FONT_FAMILY_PATTERN);\n var fontWeight = styles.getPropertyValue('font-weight');\n var content = styles.getPropertyValue('content');\n if (alreadyProcessedPseudoElement && !fontFamily) {\n // If we've already processed it but the current computed style does not result in a font-family,\n // that probably means that a class name that was previously present to make the icon has been\n // removed. So we now should delete the icon.\n node.removeChild(alreadyProcessedPseudoElement);\n return resolve();\n } else if (fontFamily && content !== 'none' && content !== '') {\n var _content = styles.getPropertyValue('content');\n var prefix = ~['Solid', 'Regular', 'Light', 'Duotone', 'Brands', 'Kit'].indexOf(fontFamily[2]) ? STYLE_TO_PREFIX[fontFamily[2].toLowerCase()] : FONT_WEIGHT_TO_PREFIX[fontWeight];\n var hexValue = toHex(_content.length === 3 ? _content.substr(1, 1) : _content);\n var iconName = byUnicode(prefix, hexValue);\n var iconIdentifier = iconName; // Only convert the pseudo element in this :before/:after position into an icon if we haven't\n // already done so with the same prefix and iconName\n\n if (iconName && (!alreadyProcessedPseudoElement || alreadyProcessedPseudoElement.getAttribute(DATA_PREFIX) !== prefix || alreadyProcessedPseudoElement.getAttribute(DATA_ICON) !== iconIdentifier)) {\n node.setAttribute(pendingAttribute, iconIdentifier);\n if (alreadyProcessedPseudoElement) {\n // Delete the old one, since we're replacing it with a new one\n node.removeChild(alreadyProcessedPseudoElement);\n }\n var meta = blankMeta();\n var extra = meta.extra;\n extra.attributes[DATA_FA_PSEUDO_ELEMENT] = position;\n findIcon(iconName, prefix).then(function (main) {\n var abstract = makeInlineSvgAbstract(_objectSpread({}, meta, {\n icons: {\n main: main,\n mask: emptyCanonicalIcon()\n },\n prefix: prefix,\n iconName: iconIdentifier,\n extra: extra,\n watchable: true\n }));\n var element = DOCUMENT.createElement('svg');\n if (position === ':before') {\n node.insertBefore(element, node.firstChild);\n } else {\n node.appendChild(element);\n }\n element.outerHTML = abstract.map(function (a) {\n return toHtml(a);\n }).join('\\n');\n node.removeAttribute(pendingAttribute);\n resolve();\n }).catch(reject);\n } else {\n resolve();\n }\n } else {\n resolve();\n }\n });\n}\nfunction replace(node) {\n return picked.all([replaceForPosition(node, ':before'), replaceForPosition(node, ':after')]);\n}\nfunction processable(node) {\n return node.parentNode !== document.head && !~TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS.indexOf(node.tagName.toUpperCase()) && !node.getAttribute(DATA_FA_PSEUDO_ELEMENT) && (!node.parentNode || node.parentNode.tagName !== 'svg');\n}\nfunction searchPseudoElements(root) {\n if (!IS_DOM) return;\n return new picked(function (resolve, reject) {\n var operations = toArray(root.querySelectorAll('*')).filter(processable).map(replace);\n var end = perf.begin('searchPseudoElements');\n disableObservation();\n picked.all(operations).then(function () {\n end();\n enableObservation();\n resolve();\n }).catch(function () {\n end();\n enableObservation();\n reject();\n });\n });\n}\nvar baseStyles = \"svg:not(:root).svg-inline--fa {\\n overflow: visible;\\n}\\n\\n.svg-inline--fa {\\n display: inline-block;\\n font-size: inherit;\\n height: 1em;\\n overflow: visible;\\n vertical-align: -0.125em;\\n}\\n.svg-inline--fa.fa-lg {\\n vertical-align: -0.225em;\\n}\\n.svg-inline--fa.fa-w-1 {\\n width: 0.0625em;\\n}\\n.svg-inline--fa.fa-w-2 {\\n width: 0.125em;\\n}\\n.svg-inline--fa.fa-w-3 {\\n width: 0.1875em;\\n}\\n.svg-inline--fa.fa-w-4 {\\n width: 0.25em;\\n}\\n.svg-inline--fa.fa-w-5 {\\n width: 0.3125em;\\n}\\n.svg-inline--fa.fa-w-6 {\\n width: 0.375em;\\n}\\n.svg-inline--fa.fa-w-7 {\\n width: 0.4375em;\\n}\\n.svg-inline--fa.fa-w-8 {\\n width: 0.5em;\\n}\\n.svg-inline--fa.fa-w-9 {\\n width: 0.5625em;\\n}\\n.svg-inline--fa.fa-w-10 {\\n width: 0.625em;\\n}\\n.svg-inline--fa.fa-w-11 {\\n width: 0.6875em;\\n}\\n.svg-inline--fa.fa-w-12 {\\n width: 0.75em;\\n}\\n.svg-inline--fa.fa-w-13 {\\n width: 0.8125em;\\n}\\n.svg-inline--fa.fa-w-14 {\\n width: 0.875em;\\n}\\n.svg-inline--fa.fa-w-15 {\\n width: 0.9375em;\\n}\\n.svg-inline--fa.fa-w-16 {\\n width: 1em;\\n}\\n.svg-inline--fa.fa-w-17 {\\n width: 1.0625em;\\n}\\n.svg-inline--fa.fa-w-18 {\\n width: 1.125em;\\n}\\n.svg-inline--fa.fa-w-19 {\\n width: 1.1875em;\\n}\\n.svg-inline--fa.fa-w-20 {\\n width: 1.25em;\\n}\\n.svg-inline--fa.fa-pull-left {\\n margin-right: 0.3em;\\n width: auto;\\n}\\n.svg-inline--fa.fa-pull-right {\\n margin-left: 0.3em;\\n width: auto;\\n}\\n.svg-inline--fa.fa-border {\\n height: 1.5em;\\n}\\n.svg-inline--fa.fa-li {\\n width: 2em;\\n}\\n.svg-inline--fa.fa-fw {\\n width: 1.25em;\\n}\\n\\n.fa-layers svg.svg-inline--fa {\\n bottom: 0;\\n left: 0;\\n margin: auto;\\n position: absolute;\\n right: 0;\\n top: 0;\\n}\\n\\n.fa-layers {\\n display: inline-block;\\n height: 1em;\\n position: relative;\\n text-align: center;\\n vertical-align: -0.125em;\\n width: 1em;\\n}\\n.fa-layers svg.svg-inline--fa {\\n -webkit-transform-origin: center center;\\n transform-origin: center center;\\n}\\n\\n.fa-layers-counter, .fa-layers-text {\\n display: inline-block;\\n position: absolute;\\n text-align: center;\\n}\\n\\n.fa-layers-text {\\n left: 50%;\\n top: 50%;\\n -webkit-transform: translate(-50%, -50%);\\n transform: translate(-50%, -50%);\\n -webkit-transform-origin: center center;\\n transform-origin: center center;\\n}\\n\\n.fa-layers-counter {\\n background-color: #ff253a;\\n border-radius: 1em;\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n color: #fff;\\n height: 1.5em;\\n line-height: 1;\\n max-width: 5em;\\n min-width: 1.5em;\\n overflow: hidden;\\n padding: 0.25em;\\n right: 0;\\n text-overflow: ellipsis;\\n top: 0;\\n -webkit-transform: scale(0.25);\\n transform: scale(0.25);\\n -webkit-transform-origin: top right;\\n transform-origin: top right;\\n}\\n\\n.fa-layers-bottom-right {\\n bottom: 0;\\n right: 0;\\n top: auto;\\n -webkit-transform: scale(0.25);\\n transform: scale(0.25);\\n -webkit-transform-origin: bottom right;\\n transform-origin: bottom right;\\n}\\n\\n.fa-layers-bottom-left {\\n bottom: 0;\\n left: 0;\\n right: auto;\\n top: auto;\\n -webkit-transform: scale(0.25);\\n transform: scale(0.25);\\n -webkit-transform-origin: bottom left;\\n transform-origin: bottom left;\\n}\\n\\n.fa-layers-top-right {\\n right: 0;\\n top: 0;\\n -webkit-transform: scale(0.25);\\n transform: scale(0.25);\\n -webkit-transform-origin: top right;\\n transform-origin: top right;\\n}\\n\\n.fa-layers-top-left {\\n left: 0;\\n right: auto;\\n top: 0;\\n -webkit-transform: scale(0.25);\\n transform: scale(0.25);\\n -webkit-transform-origin: top left;\\n transform-origin: top left;\\n}\\n\\n.fa-lg {\\n font-size: 1.3333333333em;\\n line-height: 0.75em;\\n vertical-align: -0.0667em;\\n}\\n\\n.fa-xs {\\n font-size: 0.75em;\\n}\\n\\n.fa-sm {\\n font-size: 0.875em;\\n}\\n\\n.fa-1x {\\n font-size: 1em;\\n}\\n\\n.fa-2x {\\n font-size: 2em;\\n}\\n\\n.fa-3x {\\n font-size: 3em;\\n}\\n\\n.fa-4x {\\n font-size: 4em;\\n}\\n\\n.fa-5x {\\n font-size: 5em;\\n}\\n\\n.fa-6x {\\n font-size: 6em;\\n}\\n\\n.fa-7x {\\n font-size: 7em;\\n}\\n\\n.fa-8x {\\n font-size: 8em;\\n}\\n\\n.fa-9x {\\n font-size: 9em;\\n}\\n\\n.fa-10x {\\n font-size: 10em;\\n}\\n\\n.fa-fw {\\n text-align: center;\\n width: 1.25em;\\n}\\n\\n.fa-ul {\\n list-style-type: none;\\n margin-left: 2.5em;\\n padding-left: 0;\\n}\\n.fa-ul > li {\\n position: relative;\\n}\\n\\n.fa-li {\\n left: -2em;\\n position: absolute;\\n text-align: center;\\n width: 2em;\\n line-height: inherit;\\n}\\n\\n.fa-border {\\n border: solid 0.08em #eee;\\n border-radius: 0.1em;\\n padding: 0.2em 0.25em 0.15em;\\n}\\n\\n.fa-pull-left {\\n float: left;\\n}\\n\\n.fa-pull-right {\\n float: right;\\n}\\n\\n.fa.fa-pull-left,\\n.fas.fa-pull-left,\\n.far.fa-pull-left,\\n.fal.fa-pull-left,\\n.fab.fa-pull-left {\\n margin-right: 0.3em;\\n}\\n.fa.fa-pull-right,\\n.fas.fa-pull-right,\\n.far.fa-pull-right,\\n.fal.fa-pull-right,\\n.fab.fa-pull-right {\\n margin-left: 0.3em;\\n}\\n\\n.fa-spin {\\n -webkit-animation: fa-spin 2s infinite linear;\\n animation: fa-spin 2s infinite linear;\\n}\\n\\n.fa-pulse {\\n -webkit-animation: fa-spin 1s infinite steps(8);\\n animation: fa-spin 1s infinite steps(8);\\n}\\n\\n@-webkit-keyframes fa-spin {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(360deg);\\n transform: rotate(360deg);\\n }\\n}\\n\\n@keyframes fa-spin {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(360deg);\\n transform: rotate(360deg);\\n }\\n}\\n.fa-rotate-90 {\\n -ms-filter: \\\"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)\\\";\\n -webkit-transform: rotate(90deg);\\n transform: rotate(90deg);\\n}\\n\\n.fa-rotate-180 {\\n -ms-filter: \\\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)\\\";\\n -webkit-transform: rotate(180deg);\\n transform: rotate(180deg);\\n}\\n\\n.fa-rotate-270 {\\n -ms-filter: \\\"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)\\\";\\n -webkit-transform: rotate(270deg);\\n transform: rotate(270deg);\\n}\\n\\n.fa-flip-horizontal {\\n -ms-filter: \\\"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)\\\";\\n -webkit-transform: scale(-1, 1);\\n transform: scale(-1, 1);\\n}\\n\\n.fa-flip-vertical {\\n -ms-filter: \\\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\\\";\\n -webkit-transform: scale(1, -1);\\n transform: scale(1, -1);\\n}\\n\\n.fa-flip-both, .fa-flip-horizontal.fa-flip-vertical {\\n -ms-filter: \\\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\\\";\\n -webkit-transform: scale(-1, -1);\\n transform: scale(-1, -1);\\n}\\n\\n:root .fa-rotate-90,\\n:root .fa-rotate-180,\\n:root .fa-rotate-270,\\n:root .fa-flip-horizontal,\\n:root .fa-flip-vertical,\\n:root .fa-flip-both {\\n -webkit-filter: none;\\n filter: none;\\n}\\n\\n.fa-stack {\\n display: inline-block;\\n height: 2em;\\n position: relative;\\n width: 2.5em;\\n}\\n\\n.fa-stack-1x,\\n.fa-stack-2x {\\n bottom: 0;\\n left: 0;\\n margin: auto;\\n position: absolute;\\n right: 0;\\n top: 0;\\n}\\n\\n.svg-inline--fa.fa-stack-1x {\\n height: 1em;\\n width: 1.25em;\\n}\\n.svg-inline--fa.fa-stack-2x {\\n height: 2em;\\n width: 2.5em;\\n}\\n\\n.fa-inverse {\\n color: #fff;\\n}\\n\\n.sr-only {\\n border: 0;\\n clip: rect(0, 0, 0, 0);\\n height: 1px;\\n margin: -1px;\\n overflow: hidden;\\n padding: 0;\\n position: absolute;\\n width: 1px;\\n}\\n\\n.sr-only-focusable:active, .sr-only-focusable:focus {\\n clip: auto;\\n height: auto;\\n margin: 0;\\n overflow: visible;\\n position: static;\\n width: auto;\\n}\\n\\n.svg-inline--fa .fa-primary {\\n fill: var(--fa-primary-color, currentColor);\\n opacity: 1;\\n opacity: var(--fa-primary-opacity, 1);\\n}\\n\\n.svg-inline--fa .fa-secondary {\\n fill: var(--fa-secondary-color, currentColor);\\n opacity: 0.4;\\n opacity: var(--fa-secondary-opacity, 0.4);\\n}\\n\\n.svg-inline--fa.fa-swap-opacity .fa-primary {\\n opacity: 0.4;\\n opacity: var(--fa-secondary-opacity, 0.4);\\n}\\n\\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\\n opacity: 1;\\n opacity: var(--fa-primary-opacity, 1);\\n}\\n\\n.svg-inline--fa mask .fa-primary,\\n.svg-inline--fa mask .fa-secondary {\\n fill: black;\\n}\\n\\n.fad.fa-inverse {\\n color: #fff;\\n}\";\nfunction css() {\n var dfp = DEFAULT_FAMILY_PREFIX;\n var drc = DEFAULT_REPLACEMENT_CLASS;\n var fp = config.familyPrefix;\n var rc = config.replacementClass;\n var s = baseStyles;\n if (fp !== dfp || rc !== drc) {\n var dPatt = new RegExp(\"\\\\.\".concat(dfp, \"\\\\-\"), 'g');\n var customPropPatt = new RegExp(\"\\\\--\".concat(dfp, \"\\\\-\"), 'g');\n var rPatt = new RegExp(\"\\\\.\".concat(drc), 'g');\n s = s.replace(dPatt, \".\".concat(fp, \"-\")).replace(customPropPatt, \"--\".concat(fp, \"-\")).replace(rPatt, \".\".concat(rc));\n }\n return s;\n}\nvar Library = /*#__PURE__*/\nfunction () {\n function Library() {\n _classCallCheck(this, Library);\n this.definitions = {};\n }\n _createClass(Library, [{\n key: \"add\",\n value: function add() {\n var _this = this;\n for (var _len = arguments.length, definitions = new Array(_len), _key = 0; _key < _len; _key++) {\n definitions[_key] = arguments[_key];\n }\n var additions = definitions.reduce(this._pullDefinitions, {});\n Object.keys(additions).forEach(function (key) {\n _this.definitions[key] = _objectSpread({}, _this.definitions[key] || {}, additions[key]);\n defineIcons(key, additions[key]);\n build();\n });\n }\n }, {\n key: \"reset\",\n value: function reset() {\n this.definitions = {};\n }\n }, {\n key: \"_pullDefinitions\",\n value: function _pullDefinitions(additions, definition) {\n var normalized = definition.prefix && definition.iconName && definition.icon ? {\n 0: definition\n } : definition;\n Object.keys(normalized).map(function (key) {\n var _normalized$key = normalized[key],\n prefix = _normalized$key.prefix,\n iconName = _normalized$key.iconName,\n icon = _normalized$key.icon;\n if (!additions[prefix]) additions[prefix] = {};\n additions[prefix][iconName] = icon;\n });\n return additions;\n }\n }]);\n return Library;\n}();\nfunction ensureCss() {\n if (config.autoAddCss && !_cssInserted) {\n insertCss(css());\n _cssInserted = true;\n }\n}\nfunction apiObject(val, abstractCreator) {\n Object.defineProperty(val, 'abstract', {\n get: abstractCreator\n });\n Object.defineProperty(val, 'html', {\n get: function get() {\n return val.abstract.map(function (a) {\n return toHtml(a);\n });\n }\n });\n Object.defineProperty(val, 'node', {\n get: function get() {\n if (!IS_DOM) return;\n var container = DOCUMENT.createElement('div');\n container.innerHTML = val.html;\n return container.children;\n }\n });\n return val;\n}\nfunction findIconDefinition(iconLookup) {\n var _iconLookup$prefix = iconLookup.prefix,\n prefix = _iconLookup$prefix === void 0 ? 'fa' : _iconLookup$prefix,\n iconName = iconLookup.iconName;\n if (!iconName) return;\n return iconFromMapping(library.definitions, prefix, iconName) || iconFromMapping(namespace.styles, prefix, iconName);\n}\nfunction resolveIcons(next) {\n return function (maybeIconDefinition) {\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var iconDefinition = (maybeIconDefinition || {}).icon ? maybeIconDefinition : findIconDefinition(maybeIconDefinition || {});\n var mask = params.mask;\n if (mask) {\n mask = (mask || {}).icon ? mask : findIconDefinition(mask || {});\n }\n return next(iconDefinition, _objectSpread({}, params, {\n mask: mask\n }));\n };\n}\nvar library = new Library();\nvar noAuto = function noAuto() {\n config.autoReplaceSvg = false;\n config.observeMutations = false;\n disconnect();\n};\nvar _cssInserted = false;\nvar dom = {\n i2svg: function i2svg() {\n var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n if (IS_DOM) {\n ensureCss();\n var _params$node = params.node,\n node = _params$node === void 0 ? DOCUMENT : _params$node,\n _params$callback = params.callback,\n callback = _params$callback === void 0 ? function () {} : _params$callback;\n if (config.searchPseudoElements) {\n searchPseudoElements(node);\n }\n return onTree(node, callback);\n } else {\n return picked.reject('Operation requires a DOM of some kind.');\n }\n },\n css: css,\n insertCss: function insertCss$$1() {\n if (!_cssInserted) {\n insertCss(css());\n _cssInserted = true;\n }\n },\n watch: function watch() {\n var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var autoReplaceSvgRoot = params.autoReplaceSvgRoot,\n observeMutationsRoot = params.observeMutationsRoot;\n if (config.autoReplaceSvg === false) {\n config.autoReplaceSvg = true;\n }\n config.observeMutations = true;\n domready(function () {\n autoReplace({\n autoReplaceSvgRoot: autoReplaceSvgRoot\n });\n observe({\n treeCallback: onTree,\n nodeCallback: onNode,\n pseudoElementsCallback: searchPseudoElements,\n observeMutationsRoot: observeMutationsRoot\n });\n });\n }\n};\nvar parse = {\n transform: function transform(transformString) {\n return parseTransformString(transformString);\n }\n};\nvar icon = resolveIcons(function (iconDefinition) {\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _params$transform = params.transform,\n transform = _params$transform === void 0 ? meaninglessTransform : _params$transform,\n _params$symbol = params.symbol,\n symbol = _params$symbol === void 0 ? false : _params$symbol,\n _params$mask = params.mask,\n mask = _params$mask === void 0 ? null : _params$mask,\n _params$maskId = params.maskId,\n maskId = _params$maskId === void 0 ? null : _params$maskId,\n _params$title = params.title,\n title = _params$title === void 0 ? null : _params$title,\n _params$titleId = params.titleId,\n titleId = _params$titleId === void 0 ? null : _params$titleId,\n _params$classes = params.classes,\n classes = _params$classes === void 0 ? [] : _params$classes,\n _params$attributes = params.attributes,\n attributes = _params$attributes === void 0 ? {} : _params$attributes,\n _params$styles = params.styles,\n styles = _params$styles === void 0 ? {} : _params$styles;\n if (!iconDefinition) return;\n var prefix = iconDefinition.prefix,\n iconName = iconDefinition.iconName,\n icon = iconDefinition.icon;\n return apiObject(_objectSpread({\n type: 'icon'\n }, iconDefinition), function () {\n ensureCss();\n if (config.autoA11y) {\n if (title) {\n attributes['aria-labelledby'] = \"\".concat(config.replacementClass, \"-title-\").concat(titleId || nextUniqueId());\n } else {\n attributes['aria-hidden'] = 'true';\n attributes['focusable'] = 'false';\n }\n }\n return makeInlineSvgAbstract({\n icons: {\n main: asFoundIcon(icon),\n mask: mask ? asFoundIcon(mask.icon) : {\n found: false,\n width: null,\n height: null,\n icon: {}\n }\n },\n prefix: prefix,\n iconName: iconName,\n transform: _objectSpread({}, meaninglessTransform, transform),\n symbol: symbol,\n title: title,\n maskId: maskId,\n titleId: titleId,\n extra: {\n attributes: attributes,\n styles: styles,\n classes: classes\n }\n });\n });\n});\nvar text = function text(content) {\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _params$transform2 = params.transform,\n transform = _params$transform2 === void 0 ? meaninglessTransform : _params$transform2,\n _params$title2 = params.title,\n title = _params$title2 === void 0 ? null : _params$title2,\n _params$classes2 = params.classes,\n classes = _params$classes2 === void 0 ? [] : _params$classes2,\n _params$attributes2 = params.attributes,\n attributes = _params$attributes2 === void 0 ? {} : _params$attributes2,\n _params$styles2 = params.styles,\n styles = _params$styles2 === void 0 ? {} : _params$styles2;\n return apiObject({\n type: 'text',\n content: content\n }, function () {\n ensureCss();\n return makeLayersTextAbstract({\n content: content,\n transform: _objectSpread({}, meaninglessTransform, transform),\n title: title,\n extra: {\n attributes: attributes,\n styles: styles,\n classes: [\"\".concat(config.familyPrefix, \"-layers-text\")].concat(_toConsumableArray(classes))\n }\n });\n });\n};\nvar counter = function counter(content) {\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _params$title3 = params.title,\n title = _params$title3 === void 0 ? null : _params$title3,\n _params$classes3 = params.classes,\n classes = _params$classes3 === void 0 ? [] : _params$classes3,\n _params$attributes3 = params.attributes,\n attributes = _params$attributes3 === void 0 ? {} : _params$attributes3,\n _params$styles3 = params.styles,\n styles = _params$styles3 === void 0 ? {} : _params$styles3;\n return apiObject({\n type: 'counter',\n content: content\n }, function () {\n ensureCss();\n return makeLayersCounterAbstract({\n content: content.toString(),\n title: title,\n extra: {\n attributes: attributes,\n styles: styles,\n classes: [\"\".concat(config.familyPrefix, \"-layers-counter\")].concat(_toConsumableArray(classes))\n }\n });\n });\n};\nvar layer = function layer(assembler) {\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _params$classes4 = params.classes,\n classes = _params$classes4 === void 0 ? [] : _params$classes4;\n return apiObject({\n type: 'layer'\n }, function () {\n ensureCss();\n var children = [];\n assembler(function (args) {\n Array.isArray(args) ? args.map(function (a) {\n children = children.concat(a.abstract);\n }) : children = children.concat(args.abstract);\n });\n return [{\n tag: 'span',\n attributes: {\n class: [\"\".concat(config.familyPrefix, \"-layers\")].concat(_toConsumableArray(classes)).join(' ')\n },\n children: children\n }];\n });\n};\nvar api = {\n noAuto: noAuto,\n config: config,\n dom: dom,\n library: library,\n parse: parse,\n findIconDefinition: findIconDefinition,\n icon: icon,\n text: text,\n counter: counter,\n layer: layer,\n toHtml: toHtml\n};\nvar autoReplace = function autoReplace() {\n var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _params$autoReplaceSv = params.autoReplaceSvgRoot,\n autoReplaceSvgRoot = _params$autoReplaceSv === void 0 ? DOCUMENT : _params$autoReplaceSv;\n if ((Object.keys(namespace.styles).length > 0 || config.autoFetchSvg) && IS_DOM && config.autoReplaceSvg) api.dom.i2svg({\n node: autoReplaceSvgRoot\n });\n};\nexport { icon, noAuto, config, toHtml, layer, text, counter, library, dom, parse, findIconDefinition };","function _extends() {\n module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _extends.apply(this, arguments);\n}\nmodule.exports = _extends, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;",";\n(function (root, factory) {\n if (typeof exports === \"object\") {\n // CommonJS\n module.exports = exports = factory(require(\"./core\"));\n } else if (typeof define === \"function\" && define.amd) {\n // AMD\n define([\"./core\"], factory);\n } else {\n // Global (browser)\n factory(root.CryptoJS);\n }\n})(this, function (CryptoJS) {\n (function () {\n // Shortcuts\n var C = CryptoJS;\n var C_lib = C.lib;\n var WordArray = C_lib.WordArray;\n var C_enc = C.enc;\n\n /**\n * Base64 encoding strategy.\n */\n var Base64 = C_enc.Base64 = {\n /**\n * Converts a word array to a Base64 string.\n *\n * @param {WordArray} wordArray The word array.\n *\n * @return {string} The Base64 string.\n *\n * @static\n *\n * @example\n *\n * var base64String = CryptoJS.enc.Base64.stringify(wordArray);\n */\n stringify: function stringify(wordArray) {\n // Shortcuts\n var words = wordArray.words;\n var sigBytes = wordArray.sigBytes;\n var map = this._map;\n\n // Clamp excess bits\n wordArray.clamp();\n\n // Convert\n var base64Chars = [];\n for (var i = 0; i < sigBytes; i += 3) {\n var byte1 = words[i >>> 2] >>> 24 - i % 4 * 8 & 0xff;\n var byte2 = words[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 0xff;\n var byte3 = words[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 0xff;\n var triplet = byte1 << 16 | byte2 << 8 | byte3;\n for (var j = 0; j < 4 && i + j * 0.75 < sigBytes; j++) {\n base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 0x3f));\n }\n }\n\n // Add padding\n var paddingChar = map.charAt(64);\n if (paddingChar) {\n while (base64Chars.length % 4) {\n base64Chars.push(paddingChar);\n }\n }\n return base64Chars.join('');\n },\n /**\n * Converts a Base64 string to a word array.\n *\n * @param {string} base64Str The Base64 string.\n *\n * @return {WordArray} The word array.\n *\n * @static\n *\n * @example\n *\n * var wordArray = CryptoJS.enc.Base64.parse(base64String);\n */\n parse: function parse(base64Str) {\n // Shortcuts\n var base64StrLength = base64Str.length;\n var map = this._map;\n var reverseMap = this._reverseMap;\n if (!reverseMap) {\n reverseMap = this._reverseMap = [];\n for (var j = 0; j < map.length; j++) {\n reverseMap[map.charCodeAt(j)] = j;\n }\n }\n\n // Ignore padding\n var paddingChar = map.charAt(64);\n if (paddingChar) {\n var paddingIndex = base64Str.indexOf(paddingChar);\n if (paddingIndex !== -1) {\n base64StrLength = paddingIndex;\n }\n }\n\n // Convert\n return parseLoop(base64Str, base64StrLength, reverseMap);\n },\n _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='\n };\n function parseLoop(base64Str, base64StrLength, reverseMap) {\n var words = [];\n var nBytes = 0;\n for (var i = 0; i < base64StrLength; i++) {\n if (i % 4) {\n var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2;\n var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2;\n words[nBytes >>> 2] |= (bits1 | bits2) << 24 - nBytes % 4 * 8;\n nBytes++;\n }\n }\n return WordArray.create(words, nBytes);\n }\n })();\n return CryptoJS.enc.Base64;\n});",";\n(function (root, factory) {\n if (typeof exports === \"object\") {\n // CommonJS\n module.exports = exports = factory(require(\"./core\"));\n } else if (typeof define === \"function\" && define.amd) {\n // AMD\n define([\"./core\"], factory);\n } else {\n // Global (browser)\n factory(root.CryptoJS);\n }\n})(this, function (CryptoJS) {\n (function (Math) {\n // Shortcuts\n var C = CryptoJS;\n var C_lib = C.lib;\n var WordArray = C_lib.WordArray;\n var Hasher = C_lib.Hasher;\n var C_algo = C.algo;\n\n // Constants table\n var T = [];\n\n // Compute constants\n (function () {\n for (var i = 0; i < 64; i++) {\n T[i] = Math.abs(Math.sin(i + 1)) * 0x100000000 | 0;\n }\n })();\n\n /**\n * MD5 hash algorithm.\n */\n var MD5 = C_algo.MD5 = Hasher.extend({\n _doReset: function _doReset() {\n this._hash = new WordArray.init([0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476]);\n },\n _doProcessBlock: function _doProcessBlock(M, offset) {\n // Swap endian\n for (var i = 0; i < 16; i++) {\n // Shortcuts\n var offset_i = offset + i;\n var M_offset_i = M[offset_i];\n M[offset_i] = (M_offset_i << 8 | M_offset_i >>> 24) & 0x00ff00ff | (M_offset_i << 24 | M_offset_i >>> 8) & 0xff00ff00;\n }\n\n // Shortcuts\n var H = this._hash.words;\n var M_offset_0 = M[offset + 0];\n var M_offset_1 = M[offset + 1];\n var M_offset_2 = M[offset + 2];\n var M_offset_3 = M[offset + 3];\n var M_offset_4 = M[offset + 4];\n var M_offset_5 = M[offset + 5];\n var M_offset_6 = M[offset + 6];\n var M_offset_7 = M[offset + 7];\n var M_offset_8 = M[offset + 8];\n var M_offset_9 = M[offset + 9];\n var M_offset_10 = M[offset + 10];\n var M_offset_11 = M[offset + 11];\n var M_offset_12 = M[offset + 12];\n var M_offset_13 = M[offset + 13];\n var M_offset_14 = M[offset + 14];\n var M_offset_15 = M[offset + 15];\n\n // Working varialbes\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n\n // Computation\n a = FF(a, b, c, d, M_offset_0, 7, T[0]);\n d = FF(d, a, b, c, M_offset_1, 12, T[1]);\n c = FF(c, d, a, b, M_offset_2, 17, T[2]);\n b = FF(b, c, d, a, M_offset_3, 22, T[3]);\n a = FF(a, b, c, d, M_offset_4, 7, T[4]);\n d = FF(d, a, b, c, M_offset_5, 12, T[5]);\n c = FF(c, d, a, b, M_offset_6, 17, T[6]);\n b = FF(b, c, d, a, M_offset_7, 22, T[7]);\n a = FF(a, b, c, d, M_offset_8, 7, T[8]);\n d = FF(d, a, b, c, M_offset_9, 12, T[9]);\n c = FF(c, d, a, b, M_offset_10, 17, T[10]);\n b = FF(b, c, d, a, M_offset_11, 22, T[11]);\n a = FF(a, b, c, d, M_offset_12, 7, T[12]);\n d = FF(d, a, b, c, M_offset_13, 12, T[13]);\n c = FF(c, d, a, b, M_offset_14, 17, T[14]);\n b = FF(b, c, d, a, M_offset_15, 22, T[15]);\n a = GG(a, b, c, d, M_offset_1, 5, T[16]);\n d = GG(d, a, b, c, M_offset_6, 9, T[17]);\n c = GG(c, d, a, b, M_offset_11, 14, T[18]);\n b = GG(b, c, d, a, M_offset_0, 20, T[19]);\n a = GG(a, b, c, d, M_offset_5, 5, T[20]);\n d = GG(d, a, b, c, M_offset_10, 9, T[21]);\n c = GG(c, d, a, b, M_offset_15, 14, T[22]);\n b = GG(b, c, d, a, M_offset_4, 20, T[23]);\n a = GG(a, b, c, d, M_offset_9, 5, T[24]);\n d = GG(d, a, b, c, M_offset_14, 9, T[25]);\n c = GG(c, d, a, b, M_offset_3, 14, T[26]);\n b = GG(b, c, d, a, M_offset_8, 20, T[27]);\n a = GG(a, b, c, d, M_offset_13, 5, T[28]);\n d = GG(d, a, b, c, M_offset_2, 9, T[29]);\n c = GG(c, d, a, b, M_offset_7, 14, T[30]);\n b = GG(b, c, d, a, M_offset_12, 20, T[31]);\n a = HH(a, b, c, d, M_offset_5, 4, T[32]);\n d = HH(d, a, b, c, M_offset_8, 11, T[33]);\n c = HH(c, d, a, b, M_offset_11, 16, T[34]);\n b = HH(b, c, d, a, M_offset_14, 23, T[35]);\n a = HH(a, b, c, d, M_offset_1, 4, T[36]);\n d = HH(d, a, b, c, M_offset_4, 11, T[37]);\n c = HH(c, d, a, b, M_offset_7, 16, T[38]);\n b = HH(b, c, d, a, M_offset_10, 23, T[39]);\n a = HH(a, b, c, d, M_offset_13, 4, T[40]);\n d = HH(d, a, b, c, M_offset_0, 11, T[41]);\n c = HH(c, d, a, b, M_offset_3, 16, T[42]);\n b = HH(b, c, d, a, M_offset_6, 23, T[43]);\n a = HH(a, b, c, d, M_offset_9, 4, T[44]);\n d = HH(d, a, b, c, M_offset_12, 11, T[45]);\n c = HH(c, d, a, b, M_offset_15, 16, T[46]);\n b = HH(b, c, d, a, M_offset_2, 23, T[47]);\n a = II(a, b, c, d, M_offset_0, 6, T[48]);\n d = II(d, a, b, c, M_offset_7, 10, T[49]);\n c = II(c, d, a, b, M_offset_14, 15, T[50]);\n b = II(b, c, d, a, M_offset_5, 21, T[51]);\n a = II(a, b, c, d, M_offset_12, 6, T[52]);\n d = II(d, a, b, c, M_offset_3, 10, T[53]);\n c = II(c, d, a, b, M_offset_10, 15, T[54]);\n b = II(b, c, d, a, M_offset_1, 21, T[55]);\n a = II(a, b, c, d, M_offset_8, 6, T[56]);\n d = II(d, a, b, c, M_offset_15, 10, T[57]);\n c = II(c, d, a, b, M_offset_6, 15, T[58]);\n b = II(b, c, d, a, M_offset_13, 21, T[59]);\n a = II(a, b, c, d, M_offset_4, 6, T[60]);\n d = II(d, a, b, c, M_offset_11, 10, T[61]);\n c = II(c, d, a, b, M_offset_2, 15, T[62]);\n b = II(b, c, d, a, M_offset_9, 21, T[63]);\n\n // Intermediate hash value\n H[0] = H[0] + a | 0;\n H[1] = H[1] + b | 0;\n H[2] = H[2] + c | 0;\n H[3] = H[3] + d | 0;\n },\n _doFinalize: function _doFinalize() {\n // Shortcuts\n var data = this._data;\n var dataWords = data.words;\n var nBitsTotal = this._nDataBytes * 8;\n var nBitsLeft = data.sigBytes * 8;\n\n // Add padding\n dataWords[nBitsLeft >>> 5] |= 0x80 << 24 - nBitsLeft % 32;\n var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000);\n var nBitsTotalL = nBitsTotal;\n dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = (nBitsTotalH << 8 | nBitsTotalH >>> 24) & 0x00ff00ff | (nBitsTotalH << 24 | nBitsTotalH >>> 8) & 0xff00ff00;\n dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = (nBitsTotalL << 8 | nBitsTotalL >>> 24) & 0x00ff00ff | (nBitsTotalL << 24 | nBitsTotalL >>> 8) & 0xff00ff00;\n data.sigBytes = (dataWords.length + 1) * 4;\n\n // Hash final blocks\n this._process();\n\n // Shortcuts\n var hash = this._hash;\n var H = hash.words;\n\n // Swap endian\n for (var i = 0; i < 4; i++) {\n // Shortcut\n var H_i = H[i];\n H[i] = (H_i << 8 | H_i >>> 24) & 0x00ff00ff | (H_i << 24 | H_i >>> 8) & 0xff00ff00;\n }\n\n // Return final computed hash\n return hash;\n },\n clone: function clone() {\n var clone = Hasher.clone.call(this);\n clone._hash = this._hash.clone();\n return clone;\n }\n });\n function FF(a, b, c, d, x, s, t) {\n var n = a + (b & c | ~b & d) + x + t;\n return (n << s | n >>> 32 - s) + b;\n }\n function GG(a, b, c, d, x, s, t) {\n var n = a + (b & d | c & ~d) + x + t;\n return (n << s | n >>> 32 - s) + b;\n }\n function HH(a, b, c, d, x, s, t) {\n var n = a + (b ^ c ^ d) + x + t;\n return (n << s | n >>> 32 - s) + b;\n }\n function II(a, b, c, d, x, s, t) {\n var n = a + (c ^ (b | ~d)) + x + t;\n return (n << s | n >>> 32 - s) + b;\n }\n\n /**\n * Shortcut function to the hasher's object interface.\n *\n * @param {WordArray|string} message The message to hash.\n *\n * @return {WordArray} The hash.\n *\n * @static\n *\n * @example\n *\n * var hash = CryptoJS.MD5('message');\n * var hash = CryptoJS.MD5(wordArray);\n */\n C.MD5 = Hasher._createHelper(MD5);\n\n /**\n * Shortcut function to the HMAC's object interface.\n *\n * @param {WordArray|string} message The message to hash.\n * @param {WordArray|string} key The secret key.\n *\n * @return {WordArray} The HMAC.\n *\n * @static\n *\n * @example\n *\n * var hmac = CryptoJS.HmacMD5(message, key);\n */\n C.HmacMD5 = Hasher._createHmacHelper(MD5);\n })(Math);\n return CryptoJS.MD5;\n});","'use strict';\n\n// limit of Crypto.getRandomValues()\n// https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues\nvar MAX_BYTES = 65536;\n\n// Node supports requesting up to this number of bytes\n// https://github.com/nodejs/node/blob/master/lib/internal/crypto/random.js#L48\nvar MAX_UINT32 = 4294967295;\nfunction oldBrowser() {\n throw new Error('Secure random number generation is not supported by this browser.\\nUse Chrome, Firefox or Internet Explorer 11');\n}\nvar Buffer = require('safe-buffer').Buffer;\nvar crypto = global.crypto || global.msCrypto;\nif (crypto && crypto.getRandomValues) {\n module.exports = randomBytes;\n} else {\n module.exports = oldBrowser;\n}\nfunction randomBytes(size, cb) {\n // phantomjs needs to throw\n if (size > MAX_UINT32) throw new RangeError('requested too many random bytes');\n var bytes = Buffer.allocUnsafe(size);\n if (size > 0) {\n // getRandomValues fails on IE if size == 0\n if (size > MAX_BYTES) {\n // this is the max bytes crypto.getRandomValues\n // can do at once see https://developer.mozilla.org/en-US/docs/Web/API/window.crypto.getRandomValues\n for (var generated = 0; generated < size; generated += MAX_BYTES) {\n // buffer.slice automatically checks if the end is past the end of\n // the buffer so we don't have to here\n crypto.getRandomValues(bytes.slice(generated, generated + MAX_BYTES));\n }\n } else {\n crypto.getRandomValues(bytes);\n }\n }\n if (typeof cb === 'function') {\n return process.nextTick(function () {\n cb(null, bytes);\n });\n }\n return bytes;\n}","'use strict';\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\nvar codes = {};\nfunction createErrorType(code, message, Base) {\n if (!Base) {\n Base = Error;\n }\n function getMessage(arg1, arg2, arg3) {\n if (typeof message === 'string') {\n return message;\n } else {\n return message(arg1, arg2, arg3);\n }\n }\n var NodeError = /*#__PURE__*/\n function (_Base) {\n _inheritsLoose(NodeError, _Base);\n function NodeError(arg1, arg2, arg3) {\n return _Base.call(this, getMessage(arg1, arg2, arg3)) || this;\n }\n return NodeError;\n }(Base);\n NodeError.prototype.name = Base.name;\n NodeError.prototype.code = code;\n codes[code] = NodeError;\n} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js\n\nfunction oneOf(expected, thing) {\n if (Array.isArray(expected)) {\n var len = expected.length;\n expected = expected.map(function (i) {\n return String(i);\n });\n if (len > 2) {\n return \"one of \".concat(thing, \" \").concat(expected.slice(0, len - 1).join(', '), \", or \") + expected[len - 1];\n } else if (len === 2) {\n return \"one of \".concat(thing, \" \").concat(expected[0], \" or \").concat(expected[1]);\n } else {\n return \"of \".concat(thing, \" \").concat(expected[0]);\n }\n } else {\n return \"of \".concat(thing, \" \").concat(String(expected));\n }\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n\nfunction startsWith(str, search, pos) {\n return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n return str.substring(this_len - search.length, this_len) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n\nfunction includes(str, search, start) {\n if (typeof start !== 'number') {\n start = 0;\n }\n if (start + search.length > str.length) {\n return false;\n } else {\n return str.indexOf(search, start) !== -1;\n }\n}\ncreateErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {\n return 'The value \"' + value + '\" is invalid for option \"' + name + '\"';\n}, TypeError);\ncreateErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {\n // determiner: 'must be' or 'must not be'\n var determiner;\n if (typeof expected === 'string' && startsWith(expected, 'not ')) {\n determiner = 'must not be';\n expected = expected.replace(/^not /, '');\n } else {\n determiner = 'must be';\n }\n var msg;\n if (endsWith(name, ' argument')) {\n // For cases like 'first argument'\n msg = \"The \".concat(name, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } else {\n var type = includes(name, '.') ? 'property' : 'argument';\n msg = \"The \\\"\".concat(name, \"\\\" \").concat(type, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n }\n msg += \". Received type \".concat(typeof actual);\n return msg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');\ncreateErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {\n return 'The ' + name + ' method is not implemented';\n});\ncreateErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');\ncreateErrorType('ERR_STREAM_DESTROYED', function (name) {\n return 'Cannot call ' + name + ' after a stream was destroyed';\n});\ncreateErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');\ncreateErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');\ncreateErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');\ncreateErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);\ncreateErrorType('ERR_UNKNOWN_ENCODING', function (arg) {\n return 'Unknown encoding: ' + arg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');\nmodule.exports.codes = codes;","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n'use strict';\n\n/**/\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) {\n keys.push(key);\n }\n return keys;\n};\n/**/\n\nmodule.exports = Duplex;\nvar Readable = require('./_stream_readable');\nvar Writable = require('./_stream_writable');\nrequire('inherits')(Duplex, Readable);\n{\n // Allow the keys array to be GC'ed.\n var keys = objectKeys(Writable.prototype);\n for (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n }\n}\nfunction Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n Readable.call(this, options);\n Writable.call(this, options);\n this.allowHalfOpen = true;\n if (options) {\n if (options.readable === false) this.readable = false;\n if (options.writable === false) this.writable = false;\n if (options.allowHalfOpen === false) {\n this.allowHalfOpen = false;\n this.once('end', onend);\n }\n }\n}\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n}); // the no-half-open enforcer\n\nfunction onend() {\n // If the writable side ended, then we're ok.\n if (this._writableState.ended) return; // no more data can be written.\n // But allow more writes to happen in this tick.\n\n process.nextTick(onEndNT, this);\n}\nfunction onEndNT(self) {\n self.end();\n}\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined || this._writableState === undefined) {\n return false;\n }\n return this._readableState.destroyed && this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (this._readableState === undefined || this._writableState === undefined) {\n return;\n } // backward compatibility, the user is explicitly\n // managing destroyed\n\n this._readableState.destroyed = value;\n this._writableState.destroyed = value;\n }\n});","var Buffer = require('safe-buffer').Buffer;\n\n// prototype class for hash functions\nfunction Hash(blockSize, finalSize) {\n this._block = Buffer.alloc(blockSize);\n this._finalSize = finalSize;\n this._blockSize = blockSize;\n this._len = 0;\n}\nHash.prototype.update = function (data, enc) {\n if (typeof data === 'string') {\n enc = enc || 'utf8';\n data = Buffer.from(data, enc);\n }\n var block = this._block;\n var blockSize = this._blockSize;\n var length = data.length;\n var accum = this._len;\n for (var offset = 0; offset < length;) {\n var assigned = accum % blockSize;\n var remainder = Math.min(length - offset, blockSize - assigned);\n for (var i = 0; i < remainder; i++) {\n block[assigned + i] = data[offset + i];\n }\n accum += remainder;\n offset += remainder;\n if (accum % blockSize === 0) {\n this._update(block);\n }\n }\n this._len += length;\n return this;\n};\nHash.prototype.digest = function (enc) {\n var rem = this._len % this._blockSize;\n this._block[rem] = 0x80;\n\n // zero (rem + 1) trailing bits, where (rem + 1) is the smallest\n // non-negative solution to the equation (length + 1 + (rem + 1)) === finalSize mod blockSize\n this._block.fill(0, rem + 1);\n if (rem >= this._finalSize) {\n this._update(this._block);\n this._block.fill(0);\n }\n var bits = this._len * 8;\n\n // uint32\n if (bits <= 0xffffffff) {\n this._block.writeUInt32BE(bits, this._blockSize - 4);\n\n // uint64\n } else {\n var lowBits = (bits & 0xffffffff) >>> 0;\n var highBits = (bits - lowBits) / 0x100000000;\n this._block.writeUInt32BE(highBits, this._blockSize - 8);\n this._block.writeUInt32BE(lowBits, this._blockSize - 4);\n }\n this._update(this._block);\n var hash = this._hash();\n return enc ? hash.toString(enc) : hash;\n};\nHash.prototype._update = function () {\n throw new Error('_update must be implemented by subclass');\n};\nmodule.exports = Hash;","'use strict';\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\nvar codes = {};\nfunction createErrorType(code, message, Base) {\n if (!Base) {\n Base = Error;\n }\n function getMessage(arg1, arg2, arg3) {\n if (typeof message === 'string') {\n return message;\n } else {\n return message(arg1, arg2, arg3);\n }\n }\n var NodeError = /*#__PURE__*/\n function (_Base) {\n _inheritsLoose(NodeError, _Base);\n function NodeError(arg1, arg2, arg3) {\n return _Base.call(this, getMessage(arg1, arg2, arg3)) || this;\n }\n return NodeError;\n }(Base);\n NodeError.prototype.name = Base.name;\n NodeError.prototype.code = code;\n codes[code] = NodeError;\n} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js\n\nfunction oneOf(expected, thing) {\n if (Array.isArray(expected)) {\n var len = expected.length;\n expected = expected.map(function (i) {\n return String(i);\n });\n if (len > 2) {\n return \"one of \".concat(thing, \" \").concat(expected.slice(0, len - 1).join(', '), \", or \") + expected[len - 1];\n } else if (len === 2) {\n return \"one of \".concat(thing, \" \").concat(expected[0], \" or \").concat(expected[1]);\n } else {\n return \"of \".concat(thing, \" \").concat(expected[0]);\n }\n } else {\n return \"of \".concat(thing, \" \").concat(String(expected));\n }\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n\nfunction startsWith(str, search, pos) {\n return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n return str.substring(this_len - search.length, this_len) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n\nfunction includes(str, search, start) {\n if (typeof start !== 'number') {\n start = 0;\n }\n if (start + search.length > str.length) {\n return false;\n } else {\n return str.indexOf(search, start) !== -1;\n }\n}\ncreateErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {\n return 'The value \"' + value + '\" is invalid for option \"' + name + '\"';\n}, TypeError);\ncreateErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {\n // determiner: 'must be' or 'must not be'\n var determiner;\n if (typeof expected === 'string' && startsWith(expected, 'not ')) {\n determiner = 'must not be';\n expected = expected.replace(/^not /, '');\n } else {\n determiner = 'must be';\n }\n var msg;\n if (endsWith(name, ' argument')) {\n // For cases like 'first argument'\n msg = \"The \".concat(name, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } else {\n var type = includes(name, '.') ? 'property' : 'argument';\n msg = \"The \\\"\".concat(name, \"\\\" \").concat(type, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n }\n msg += \". Received type \".concat(typeof actual);\n return msg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');\ncreateErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {\n return 'The ' + name + ' method is not implemented';\n});\ncreateErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');\ncreateErrorType('ERR_STREAM_DESTROYED', function (name) {\n return 'Cannot call ' + name + ' after a stream was destroyed';\n});\ncreateErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');\ncreateErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');\ncreateErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');\ncreateErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);\ncreateErrorType('ERR_UNKNOWN_ENCODING', function (arg) {\n return 'Unknown encoding: ' + arg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');\nmodule.exports.codes = codes;","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n'use strict';\n\n/**/\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) {\n keys.push(key);\n }\n return keys;\n};\n/**/\n\nmodule.exports = Duplex;\nvar Readable = require('./_stream_readable');\nvar Writable = require('./_stream_writable');\nrequire('inherits')(Duplex, Readable);\n{\n // Allow the keys array to be GC'ed.\n var keys = objectKeys(Writable.prototype);\n for (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n }\n}\nfunction Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n Readable.call(this, options);\n Writable.call(this, options);\n this.allowHalfOpen = true;\n if (options) {\n if (options.readable === false) this.readable = false;\n if (options.writable === false) this.writable = false;\n if (options.allowHalfOpen === false) {\n this.allowHalfOpen = false;\n this.once('end', onend);\n }\n }\n}\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableBuffer', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n});\nObject.defineProperty(Duplex.prototype, 'writableLength', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.length;\n }\n}); // the no-half-open enforcer\n\nfunction onend() {\n // If the writable side ended, then we're ok.\n if (this._writableState.ended) return; // no more data can be written.\n // But allow more writes to happen in this tick.\n\n process.nextTick(onEndNT, this);\n}\nfunction onEndNT(self) {\n self.end();\n}\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n if (this._readableState === undefined || this._writableState === undefined) {\n return false;\n }\n return this._readableState.destroyed && this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (this._readableState === undefined || this._writableState === undefined) {\n return;\n } // backward compatibility, the user is explicitly\n // managing destroyed\n\n this._readableState.destroyed = value;\n this._writableState.destroyed = value;\n }\n});","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMilliseconds\n * @category Millisecond Helpers\n * @summary Add the specified number of milliseconds to the given date.\n *\n * @description\n * Add the specified number of milliseconds to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 750 milliseconds to 10 July 2014 12:45:30.000:\n * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:30.750\n */\n\nexport default function addMilliseconds(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var timestamp = toDate(dirtyDate).getTime();\n var amount = toInteger(dirtyAmount);\n return new Date(timestamp + amount);\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function getUTCWeekYear(dirtyDate, options) {\n var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getUTCFullYear();\n var defaultOptions = getDefaultOptions();\n var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n var firstWeekOfNextYear = new Date(0);\n firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);\n var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, options);\n var firstWeekOfThisYear = new Date(0);\n firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);\n var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}","var setPrototypeOf = require(\"./setPrototypeOf.js\");\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}\nmodule.exports = _inheritsLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**!\n * @fileOverview Kickass library to create and place poppers near their reference elements.\n * @version 1.16.1\n * @license\n * Copyright (c) 2016 Federico Zivolo and contributors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';\nvar timeoutDuration = function () {\n var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];\n for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {\n if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {\n return 1;\n }\n }\n return 0;\n}();\nfunction microtaskDebounce(fn) {\n var called = false;\n return function () {\n if (called) {\n return;\n }\n called = true;\n window.Promise.resolve().then(function () {\n called = false;\n fn();\n });\n };\n}\nfunction taskDebounce(fn) {\n var scheduled = false;\n return function () {\n if (!scheduled) {\n scheduled = true;\n setTimeout(function () {\n scheduled = false;\n fn();\n }, timeoutDuration);\n }\n };\n}\nvar supportsMicroTasks = isBrowser && window.Promise;\n\n/**\n* Create a debounced version of a method, that's asynchronously deferred\n* but called in the minimum time possible.\n*\n* @method\n* @memberof Popper.Utils\n* @argument {Function} fn\n* @returns {Function}\n*/\nvar debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;\n\n/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nfunction isFunction(functionToCheck) {\n var getType = {};\n return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';\n}\n\n/**\n * Get CSS computed property of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Eement} element\n * @argument {String} property\n */\nfunction getStyleComputedProperty(element, property) {\n if (element.nodeType !== 1) {\n return [];\n }\n // NOTE: 1 DOM access here\n var window = element.ownerDocument.defaultView;\n var css = window.getComputedStyle(element, null);\n return property ? css[property] : css;\n}\n\n/**\n * Returns the parentNode or the host of the element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} parent\n */\nfunction getParentNode(element) {\n if (element.nodeName === 'HTML') {\n return element;\n }\n return element.parentNode || element.host;\n}\n\n/**\n * Returns the scrolling parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} scroll parent\n */\nfunction getScrollParent(element) {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n if (!element) {\n return document.body;\n }\n switch (element.nodeName) {\n case 'HTML':\n case 'BODY':\n return element.ownerDocument.body;\n case '#document':\n return element.body;\n }\n\n // Firefox want us to check `-x` and `-y` variations as well\n\n var _getStyleComputedProp = getStyleComputedProperty(element),\n overflow = _getStyleComputedProp.overflow,\n overflowX = _getStyleComputedProp.overflowX,\n overflowY = _getStyleComputedProp.overflowY;\n if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n return element;\n }\n return getScrollParent(getParentNode(element));\n}\n\n/**\n * Returns the reference node of the reference object, or the reference object itself.\n * @method\n * @memberof Popper.Utils\n * @param {Element|Object} reference - the reference element (the popper will be relative to this)\n * @returns {Element} parent\n */\nfunction getReferenceNode(reference) {\n return reference && reference.referenceNode ? reference.referenceNode : reference;\n}\nvar isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);\nvar isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);\n\n/**\n * Determines if the browser is Internet Explorer\n * @method\n * @memberof Popper.Utils\n * @param {Number} version to check\n * @returns {Boolean} isIE\n */\nfunction isIE(version) {\n if (version === 11) {\n return isIE11;\n }\n if (version === 10) {\n return isIE10;\n }\n return isIE11 || isIE10;\n}\n\n/**\n * Returns the offset parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} offset parent\n */\nfunction getOffsetParent(element) {\n if (!element) {\n return document.documentElement;\n }\n var noOffsetParent = isIE(10) ? document.body : null;\n\n // NOTE: 1 DOM access here\n var offsetParent = element.offsetParent || null;\n // Skip hidden elements which don't have an offsetParent\n while (offsetParent === noOffsetParent && element.nextElementSibling) {\n offsetParent = (element = element.nextElementSibling).offsetParent;\n }\n var nodeName = offsetParent && offsetParent.nodeName;\n if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n return element ? element.ownerDocument.documentElement : document.documentElement;\n }\n\n // .offsetParent will return the closest TH, TD or TABLE in case\n // no offsetParent is present, I hate this job...\n if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {\n return getOffsetParent(offsetParent);\n }\n return offsetParent;\n}\nfunction isOffsetContainer(element) {\n var nodeName = element.nodeName;\n if (nodeName === 'BODY') {\n return false;\n }\n return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;\n}\n\n/**\n * Finds the root node (document, shadowDOM root) of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} node\n * @returns {Element} root node\n */\nfunction getRoot(node) {\n if (node.parentNode !== null) {\n return getRoot(node.parentNode);\n }\n return node;\n}\n\n/**\n * Finds the offset parent common to the two provided nodes\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element1\n * @argument {Element} element2\n * @returns {Element} common offset parent\n */\nfunction findCommonOffsetParent(element1, element2) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n return document.documentElement;\n }\n\n // Here we make sure to give as \"start\" the element that comes first in the DOM\n var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;\n var start = order ? element1 : element2;\n var end = order ? element2 : element1;\n\n // Get common ancestor container\n var range = document.createRange();\n range.setStart(start, 0);\n range.setEnd(end, 0);\n var commonAncestorContainer = range.commonAncestorContainer;\n\n // Both nodes are inside #document\n\n if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {\n if (isOffsetContainer(commonAncestorContainer)) {\n return commonAncestorContainer;\n }\n return getOffsetParent(commonAncestorContainer);\n }\n\n // one of the nodes is inside shadowDOM, find which one\n var element1root = getRoot(element1);\n if (element1root.host) {\n return findCommonOffsetParent(element1root.host, element2);\n } else {\n return findCommonOffsetParent(element1, getRoot(element2).host);\n }\n}\n\n/**\n * Gets the scroll value of the given element in the given side (top and left)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {String} side `top` or `left`\n * @returns {number} amount of scrolled pixels\n */\nfunction getScroll(element) {\n var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';\n var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n var nodeName = element.nodeName;\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n var html = element.ownerDocument.documentElement;\n var scrollingElement = element.ownerDocument.scrollingElement || html;\n return scrollingElement[upperSide];\n }\n return element[upperSide];\n}\n\n/*\n * Sum or subtract the element scroll values (left and top) from a given rect object\n * @method\n * @memberof Popper.Utils\n * @param {Object} rect - Rect object you want to change\n * @param {HTMLElement} element - The element from the function reads the scroll values\n * @param {Boolean} subtract - set to true if you want to subtract the scroll values\n * @return {Object} rect - The modifier rect object\n */\nfunction includeScroll(rect, element) {\n var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var scrollTop = getScroll(element, 'top');\n var scrollLeft = getScroll(element, 'left');\n var modifier = subtract ? -1 : 1;\n rect.top += scrollTop * modifier;\n rect.bottom += scrollTop * modifier;\n rect.left += scrollLeft * modifier;\n rect.right += scrollLeft * modifier;\n return rect;\n}\n\n/*\n * Helper to detect borders of a given element\n * @method\n * @memberof Popper.Utils\n * @param {CSSStyleDeclaration} styles\n * Result of `getStyleComputedProperty` on the given element\n * @param {String} axis - `x` or `y`\n * @return {number} borders - The borders size of the given axis\n */\n\nfunction getBordersSize(styles, axis) {\n var sideA = axis === 'x' ? 'Left' : 'Top';\n var sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n return parseFloat(styles['border' + sideA + 'Width']) + parseFloat(styles['border' + sideB + 'Width']);\n}\nfunction getSize(axis, body, html, computedStyle) {\n return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0);\n}\nfunction getWindowSizes(document) {\n var body = document.body;\n var html = document.documentElement;\n var computedStyle = isIE(10) && getComputedStyle(html);\n return {\n height: getSize('Height', body, html, computedStyle),\n width: getSize('Width', body, html, computedStyle)\n };\n}\nvar classCallCheck = function classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nvar defineProperty = function defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n};\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n};\n\n/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n * @method\n * @memberof Popper.Utils\n * @argument {Object} offsets\n * @returns {Object} ClientRect like output\n */\nfunction getClientRect(offsets) {\n return _extends({}, offsets, {\n right: offsets.left + offsets.width,\n bottom: offsets.top + offsets.height\n });\n}\n\n/**\n * Get bounding client rect of given element\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} element\n * @return {Object} client rect\n */\nfunction getBoundingClientRect(element) {\n var rect = {};\n\n // IE10 10 FIX: Please, don't ask, the element isn't\n // considered in DOM in some circumstances...\n // This isn't reproducible in IE10 compatibility mode of IE11\n try {\n if (isIE(10)) {\n rect = element.getBoundingClientRect();\n var scrollTop = getScroll(element, 'top');\n var scrollLeft = getScroll(element, 'left');\n rect.top += scrollTop;\n rect.left += scrollLeft;\n rect.bottom += scrollTop;\n rect.right += scrollLeft;\n } else {\n rect = element.getBoundingClientRect();\n }\n } catch (e) {}\n var result = {\n left: rect.left,\n top: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n };\n\n // subtract scrollbar size from sizes\n var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};\n var width = sizes.width || element.clientWidth || result.width;\n var height = sizes.height || element.clientHeight || result.height;\n var horizScrollbar = element.offsetWidth - width;\n var vertScrollbar = element.offsetHeight - height;\n\n // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n // we make this check conditional for performance reasons\n if (horizScrollbar || vertScrollbar) {\n var styles = getStyleComputedProperty(element);\n horizScrollbar -= getBordersSize(styles, 'x');\n vertScrollbar -= getBordersSize(styles, 'y');\n result.width -= horizScrollbar;\n result.height -= vertScrollbar;\n }\n return getClientRect(result);\n}\nfunction getOffsetRectRelativeToArbitraryNode(children, parent) {\n var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var isIE10 = isIE(10);\n var isHTML = parent.nodeName === 'HTML';\n var childrenRect = getBoundingClientRect(children);\n var parentRect = getBoundingClientRect(parent);\n var scrollParent = getScrollParent(children);\n var styles = getStyleComputedProperty(parent);\n var borderTopWidth = parseFloat(styles.borderTopWidth);\n var borderLeftWidth = parseFloat(styles.borderLeftWidth);\n\n // In cases where the parent is fixed, we must ignore negative scroll in offset calc\n if (fixedPosition && isHTML) {\n parentRect.top = Math.max(parentRect.top, 0);\n parentRect.left = Math.max(parentRect.left, 0);\n }\n var offsets = getClientRect({\n top: childrenRect.top - parentRect.top - borderTopWidth,\n left: childrenRect.left - parentRect.left - borderLeftWidth,\n width: childrenRect.width,\n height: childrenRect.height\n });\n offsets.marginTop = 0;\n offsets.marginLeft = 0;\n\n // Subtract margins of documentElement in case it's being used as parent\n // we do this only on HTML because it's the only element that behaves\n // differently when margins are applied to it. The margins are included in\n // the box of the documentElement, in the other cases not.\n if (!isIE10 && isHTML) {\n var marginTop = parseFloat(styles.marginTop);\n var marginLeft = parseFloat(styles.marginLeft);\n offsets.top -= borderTopWidth - marginTop;\n offsets.bottom -= borderTopWidth - marginTop;\n offsets.left -= borderLeftWidth - marginLeft;\n offsets.right -= borderLeftWidth - marginLeft;\n\n // Attach marginTop and marginLeft because in some circumstances we may need them\n offsets.marginTop = marginTop;\n offsets.marginLeft = marginLeft;\n }\n if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {\n offsets = includeScroll(offsets, parent);\n }\n return offsets;\n}\nfunction getViewportOffsetRectRelativeToArtbitraryNode(element) {\n var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var html = element.ownerDocument.documentElement;\n var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n var width = Math.max(html.clientWidth, window.innerWidth || 0);\n var height = Math.max(html.clientHeight, window.innerHeight || 0);\n var scrollTop = !excludeScroll ? getScroll(html) : 0;\n var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;\n var offset = {\n top: scrollTop - relativeOffset.top + relativeOffset.marginTop,\n left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,\n width: width,\n height: height\n };\n return getClientRect(offset);\n}\n\n/**\n * Check if the given element is fixed or is inside a fixed parent\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {Element} customContainer\n * @returns {Boolean} answer to \"isFixed?\"\n */\nfunction isFixed(element) {\n var nodeName = element.nodeName;\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n return false;\n }\n if (getStyleComputedProperty(element, 'position') === 'fixed') {\n return true;\n }\n var parentNode = getParentNode(element);\n if (!parentNode) {\n return false;\n }\n return isFixed(parentNode);\n}\n\n/**\n * Finds the first parent of an element that has a transformed property defined\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} first transformed parent or documentElement\n */\n\nfunction getFixedPositionOffsetParent(element) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element || !element.parentElement || isIE()) {\n return document.documentElement;\n }\n var el = element.parentElement;\n while (el && getStyleComputedProperty(el, 'transform') === 'none') {\n el = el.parentElement;\n }\n return el || document.documentElement;\n}\n\n/**\n * Computed the boundaries limits and return them\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} popper\n * @param {HTMLElement} reference\n * @param {number} padding\n * @param {HTMLElement} boundariesElement - Element used to define the boundaries\n * @param {Boolean} fixedPosition - Is in fixed position mode\n * @returns {Object} Coordinates of the boundaries\n */\nfunction getBoundaries(popper, reference, padding, boundariesElement) {\n var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n\n // NOTE: 1 DOM access here\n\n var boundaries = {\n top: 0,\n left: 0\n };\n var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n\n // Handle viewport case\n if (boundariesElement === 'viewport') {\n boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);\n } else {\n // Handle other cases based on DOM element used as boundaries\n var boundariesNode = void 0;\n if (boundariesElement === 'scrollParent') {\n boundariesNode = getScrollParent(getParentNode(reference));\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = popper.ownerDocument.documentElement;\n }\n } else if (boundariesElement === 'window') {\n boundariesNode = popper.ownerDocument.documentElement;\n } else {\n boundariesNode = boundariesElement;\n }\n var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);\n\n // In case of HTML, we need a different computation\n if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n var _getWindowSizes = getWindowSizes(popper.ownerDocument),\n height = _getWindowSizes.height,\n width = _getWindowSizes.width;\n boundaries.top += offsets.top - offsets.marginTop;\n boundaries.bottom = height + offsets.top;\n boundaries.left += offsets.left - offsets.marginLeft;\n boundaries.right = width + offsets.left;\n } else {\n // for all the other DOM elements, this one is good\n boundaries = offsets;\n }\n }\n\n // Add paddings\n padding = padding || 0;\n var isPaddingNumber = typeof padding === 'number';\n boundaries.left += isPaddingNumber ? padding : padding.left || 0;\n boundaries.top += isPaddingNumber ? padding : padding.top || 0;\n boundaries.right -= isPaddingNumber ? padding : padding.right || 0;\n boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0;\n return boundaries;\n}\nfunction getArea(_ref) {\n var width = _ref.width,\n height = _ref.height;\n return width * height;\n}\n\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n * @method\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {\n var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;\n if (placement.indexOf('auto') === -1) {\n return placement;\n }\n var boundaries = getBoundaries(popper, reference, padding, boundariesElement);\n var rects = {\n top: {\n width: boundaries.width,\n height: refRect.top - boundaries.top\n },\n right: {\n width: boundaries.right - refRect.right,\n height: boundaries.height\n },\n bottom: {\n width: boundaries.width,\n height: boundaries.bottom - refRect.bottom\n },\n left: {\n width: refRect.left - boundaries.left,\n height: boundaries.height\n }\n };\n var sortedAreas = Object.keys(rects).map(function (key) {\n return _extends({\n key: key\n }, rects[key], {\n area: getArea(rects[key])\n });\n }).sort(function (a, b) {\n return b.area - a.area;\n });\n var filteredAreas = sortedAreas.filter(function (_ref2) {\n var width = _ref2.width,\n height = _ref2.height;\n return width >= popper.clientWidth && height >= popper.clientHeight;\n });\n var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;\n var variation = placement.split('-')[1];\n return computedPlacement + (variation ? '-' + variation : '');\n}\n\n/**\n * Get offsets to the reference element\n * @method\n * @memberof Popper.Utils\n * @param {Object} state\n * @param {Element} popper - the popper element\n * @param {Element} reference - the reference element (the popper will be relative to this)\n * @param {Element} fixedPosition - is in fixed position mode\n * @returns {Object} An object containing the offsets which will be applied to the popper\n */\nfunction getReferenceOffsets(state, popper, reference) {\n var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);\n}\n\n/**\n * Get the outer sizes of the given element (offset size + margins)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Object} object containing width and height properties\n */\nfunction getOuterSizes(element) {\n var window = element.ownerDocument.defaultView;\n var styles = window.getComputedStyle(element);\n var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);\n var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);\n var result = {\n width: element.offsetWidth + y,\n height: element.offsetHeight + x\n };\n return result;\n}\n\n/**\n * Get the opposite placement of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement\n * @returns {String} flipped placement\n */\nfunction getOppositePlacement(placement) {\n var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n };\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}\n\n/**\n * Get offsets to the popper\n * @method\n * @memberof Popper.Utils\n * @param {Object} position - CSS position the Popper will get applied\n * @param {HTMLElement} popper - the popper element\n * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)\n * @param {String} placement - one of the valid placement options\n * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper\n */\nfunction getPopperOffsets(popper, referenceOffsets, placement) {\n placement = placement.split('-')[0];\n\n // Get popper node sizes\n var popperRect = getOuterSizes(popper);\n\n // Add position, width and height to our offsets object\n var popperOffsets = {\n width: popperRect.width,\n height: popperRect.height\n };\n\n // depending by the popper placement we have to compute its offsets slightly differently\n var isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n var mainSide = isHoriz ? 'top' : 'left';\n var secondarySide = isHoriz ? 'left' : 'top';\n var measurement = isHoriz ? 'height' : 'width';\n var secondaryMeasurement = !isHoriz ? 'height' : 'width';\n popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;\n if (placement === secondarySide) {\n popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];\n } else {\n popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];\n }\n return popperOffsets;\n}\n\n/**\n * Mimics the `find` method of Array\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nfunction find(arr, check) {\n // use native find if supported\n if (Array.prototype.find) {\n return arr.find(check);\n }\n\n // use `filter` to obtain the same behavior of `find`\n return arr.filter(check)[0];\n}\n\n/**\n * Return the index of the matching object\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nfunction findIndex(arr, prop, value) {\n // use native findIndex if supported\n if (Array.prototype.findIndex) {\n return arr.findIndex(function (cur) {\n return cur[prop] === value;\n });\n }\n\n // use `find` + `indexOf` if `findIndex` isn't supported\n var match = find(arr, function (obj) {\n return obj[prop] === value;\n });\n return arr.indexOf(match);\n}\n\n/**\n * Loop trough the list of modifiers and run them in order,\n * each of them will then edit the data object.\n * @method\n * @memberof Popper.Utils\n * @param {dataObject} data\n * @param {Array} modifiers\n * @param {String} ends - Optional modifier name used as stopper\n * @returns {dataObject}\n */\nfunction runModifiers(modifiers, data, ends) {\n var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));\n modifiersToRun.forEach(function (modifier) {\n if (modifier['function']) {\n // eslint-disable-line dot-notation\n console.warn('`modifier.function` is deprecated, use `modifier.fn`!');\n }\n var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation\n if (modifier.enabled && isFunction(fn)) {\n // Add properties to offsets to make them a complete clientRect object\n // we do this before each modifier to make sure the previous one doesn't\n // mess with these values\n data.offsets.popper = getClientRect(data.offsets.popper);\n data.offsets.reference = getClientRect(data.offsets.reference);\n data = fn(data, modifier);\n }\n });\n return data;\n}\n\n/**\n * Updates the position of the popper, computing the new offsets and applying\n * the new style. \n * Prefer `scheduleUpdate` over `update` because of performance reasons.\n * @method\n * @memberof Popper\n */\nfunction update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}\n\n/**\n * Helper used to know if the given modifier is enabled.\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean}\n */\nfunction isModifierEnabled(modifiers, modifierName) {\n return modifiers.some(function (_ref) {\n var name = _ref.name,\n enabled = _ref.enabled;\n return enabled && name === modifierName;\n });\n}\n\n/**\n * Get the prefixed supported property name\n * @method\n * @memberof Popper.Utils\n * @argument {String} property (camelCase)\n * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)\n */\nfunction getSupportedPropertyName(property) {\n var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];\n var upperProp = property.charAt(0).toUpperCase() + property.slice(1);\n for (var i = 0; i < prefixes.length; i++) {\n var prefix = prefixes[i];\n var toCheck = prefix ? '' + prefix + upperProp : property;\n if (typeof document.body.style[toCheck] !== 'undefined') {\n return toCheck;\n }\n }\n return null;\n}\n\n/**\n * Destroys the popper.\n * @method\n * @memberof Popper\n */\nfunction destroy() {\n this.state.isDestroyed = true;\n\n // touch DOM only if `applyStyle` modifier is enabled\n if (isModifierEnabled(this.modifiers, 'applyStyle')) {\n this.popper.removeAttribute('x-placement');\n this.popper.style.position = '';\n this.popper.style.top = '';\n this.popper.style.left = '';\n this.popper.style.right = '';\n this.popper.style.bottom = '';\n this.popper.style.willChange = '';\n this.popper.style[getSupportedPropertyName('transform')] = '';\n }\n this.disableEventListeners();\n\n // remove the popper if user explicitly asked for the deletion on destroy\n // do not use `remove` because IE11 doesn't support it\n if (this.options.removeOnDestroy) {\n this.popper.parentNode.removeChild(this.popper);\n }\n return this;\n}\n\n/**\n * Get the window associated with the element\n * @argument {Element} element\n * @returns {Window}\n */\nfunction getWindow(element) {\n var ownerDocument = element.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView : window;\n}\nfunction attachToScrollParents(scrollParent, event, callback, scrollParents) {\n var isBody = scrollParent.nodeName === 'BODY';\n var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;\n target.addEventListener(event, callback, {\n passive: true\n });\n if (!isBody) {\n attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);\n }\n scrollParents.push(target);\n}\n\n/**\n * Setup needed event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nfunction setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, {\n passive: true\n });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n return state;\n}\n\n/**\n * It will add resize/scroll events and start recalculating\n * position of the popper element when they are triggered.\n * @method\n * @memberof Popper\n */\nfunction enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}\n\n/**\n * Remove event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nfunction removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}\n\n/**\n * It will remove resize/scroll events and won't recalculate popper position\n * when they are triggered. It also won't trigger `onUpdate` callback anymore,\n * unless you call `update` method manually.\n * @method\n * @memberof Popper\n */\nfunction disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}\n\n/**\n * Tells if a given input is a number\n * @method\n * @memberof Popper.Utils\n * @param {*} input to check\n * @return {Boolean}\n */\nfunction isNumeric(n) {\n return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n\n/**\n * Set the style to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the style to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nfunction setStyles(element, styles) {\n Object.keys(styles).forEach(function (prop) {\n var unit = '';\n // add unit if the value is numeric and is one of the following\n if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {\n unit = 'px';\n }\n element.style[prop] = styles[prop] + unit;\n });\n}\n\n/**\n * Set the attributes to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the attributes to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nfunction setAttributes(element, attributes) {\n Object.keys(attributes).forEach(function (prop) {\n var value = attributes[prop];\n if (value !== false) {\n element.setAttribute(prop, attributes[prop]);\n } else {\n element.removeAttribute(prop);\n }\n });\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} data.styles - List of style properties - values to apply to popper element\n * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The same data object\n */\nfunction applyStyle(data) {\n // any property present in `data.styles` will be applied to the popper,\n // in this way we can make the 3rd party modifiers add custom styles to it\n // Be aware, modifiers could override the properties defined in the previous\n // lines of this modifier!\n setStyles(data.instance.popper, data.styles);\n\n // any property present in `data.attributes` will be applied to the popper,\n // they will be set as HTML attributes of the element\n setAttributes(data.instance.popper, data.attributes);\n\n // if arrowElement is defined and arrowStyles has some properties\n if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n setStyles(data.arrowElement, data.arrowStyles);\n }\n return data;\n}\n\n/**\n * Set the x-placement attribute before everything else because it could be used\n * to add margins to the popper margins needs to be calculated to get the\n * correct popper offsets.\n * @method\n * @memberof Popper.modifiers\n * @param {HTMLElement} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper\n * @param {Object} options - Popper.js options\n */\nfunction applyStyleOnLoad(reference, popper, options, modifierOptions, state) {\n // compute reference element offsets\n var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);\n popper.setAttribute('x-placement', placement);\n\n // Apply `position` to popper before anything else because\n // without the position applied we can't guarantee correct computations\n setStyles(popper, {\n position: options.positionFixed ? 'fixed' : 'absolute'\n });\n return options;\n}\n\n/**\n * @function\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Boolean} shouldRound - If the offsets should be rounded at all\n * @returns {Object} The popper's position offsets rounded\n *\n * The tale of pixel-perfect positioning. It's still not 100% perfect, but as\n * good as it can be within reason.\n * Discussion here: https://github.com/FezVrasta/popper.js/pull/715\n *\n * Low DPI screens cause a popper to be blurry if not using full pixels (Safari\n * as well on High DPI screens).\n *\n * Firefox prefers no rounding for positioning and does not have blurriness on\n * high DPI screens.\n *\n * Only horizontal placement and left/right values need to be considered.\n */\nfunction getRoundedOffsets(data, shouldRound) {\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n var round = Math.round,\n floor = Math.floor;\n var noRound = function noRound(v) {\n return v;\n };\n var referenceWidth = round(reference.width);\n var popperWidth = round(popper.width);\n var isVertical = ['left', 'right'].indexOf(data.placement) !== -1;\n var isVariation = data.placement.indexOf('-') !== -1;\n var sameWidthParity = referenceWidth % 2 === popperWidth % 2;\n var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;\n var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor;\n var verticalToInteger = !shouldRound ? noRound : round;\n return {\n left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left),\n top: verticalToInteger(popper.top),\n bottom: verticalToInteger(popper.bottom),\n right: horizontalToInteger(popper.right)\n };\n}\nvar isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction computeStyle(data, options) {\n var x = options.x,\n y = options.y;\n var popper = data.offsets.popper;\n\n // Remove this legacy support in Popper.js v2\n\n var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {\n return modifier.name === 'applyStyle';\n }).gpuAcceleration;\n if (legacyGpuAccelerationOption !== undefined) {\n console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');\n }\n var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;\n var offsetParent = getOffsetParent(data.instance.popper);\n var offsetParentRect = getBoundingClientRect(offsetParent);\n\n // Styles\n var styles = {\n position: popper.position\n };\n var offsets = getRoundedOffsets(data, window.devicePixelRatio < 2 || !isFirefox);\n var sideA = x === 'bottom' ? 'top' : 'bottom';\n var sideB = y === 'right' ? 'left' : 'right';\n\n // if gpuAcceleration is set to `true` and transform is supported,\n // we use `translate3d` to apply the position to the popper we\n // automatically use the supported prefixed version if needed\n var prefixedProperty = getSupportedPropertyName('transform');\n\n // now, let's make a step back and look at this code closely (wtf?)\n // If the content of the popper grows once it's been positioned, it\n // may happen that the popper gets misplaced because of the new content\n // overflowing its reference element\n // To avoid this problem, we provide two options (x and y), which allow\n // the consumer to define the offset origin.\n // If we position a popper on top of a reference element, we can set\n // `x` to `top` to make the popper grow towards its top instead of\n // its bottom.\n var left = void 0,\n top = void 0;\n if (sideA === 'bottom') {\n // when offsetParent is the positioning is relative to the bottom of the screen (excluding the scrollbar)\n // and not the bottom of the html element\n if (offsetParent.nodeName === 'HTML') {\n top = -offsetParent.clientHeight + offsets.bottom;\n } else {\n top = -offsetParentRect.height + offsets.bottom;\n }\n } else {\n top = offsets.top;\n }\n if (sideB === 'right') {\n if (offsetParent.nodeName === 'HTML') {\n left = -offsetParent.clientWidth + offsets.right;\n } else {\n left = -offsetParentRect.width + offsets.right;\n }\n } else {\n left = offsets.left;\n }\n if (gpuAcceleration && prefixedProperty) {\n styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';\n styles[sideA] = 0;\n styles[sideB] = 0;\n styles.willChange = 'transform';\n } else {\n // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties\n var invertTop = sideA === 'bottom' ? -1 : 1;\n var invertLeft = sideB === 'right' ? -1 : 1;\n styles[sideA] = top * invertTop;\n styles[sideB] = left * invertLeft;\n styles.willChange = sideA + ', ' + sideB;\n }\n\n // Attributes\n var attributes = {\n 'x-placement': data.placement\n };\n\n // Update `data` attributes, styles and arrowStyles\n data.attributes = _extends({}, attributes, data.attributes);\n data.styles = _extends({}, styles, data.styles);\n data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);\n return data;\n}\n\n/**\n * Helper used to know if the given modifier depends from another one. \n * It checks if the needed modifier is listed and enabled.\n * @method\n * @memberof Popper.Utils\n * @param {Array} modifiers - list of modifiers\n * @param {String} requestingName - name of requesting modifier\n * @param {String} requestedName - name of requested modifier\n * @returns {Boolean}\n */\nfunction isModifierRequired(modifiers, requestingName, requestedName) {\n var requesting = find(modifiers, function (_ref) {\n var name = _ref.name;\n return name === requestingName;\n });\n var isRequired = !!requesting && modifiers.some(function (modifier) {\n return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;\n });\n if (!isRequired) {\n var _requesting = '`' + requestingName + '`';\n var requested = '`' + requestedName + '`';\n console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');\n }\n return isRequired;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction arrow(data, options) {\n var _data$offsets$arrow;\n\n // arrow depends on keepTogether in order to work\n if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {\n return data;\n }\n var arrowElement = options.element;\n\n // if arrowElement is a string, suppose it's a CSS selector\n if (typeof arrowElement === 'string') {\n arrowElement = data.instance.popper.querySelector(arrowElement);\n\n // if arrowElement is not found, don't run the modifier\n if (!arrowElement) {\n return data;\n }\n } else {\n // if the arrowElement isn't a query selector we must check that the\n // provided DOM node is child of its popper node\n if (!data.instance.popper.contains(arrowElement)) {\n console.warn('WARNING: `arrow.element` must be child of its popper element!');\n return data;\n }\n }\n var placement = data.placement.split('-')[0];\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n var isVertical = ['left', 'right'].indexOf(placement) !== -1;\n var len = isVertical ? 'height' : 'width';\n var sideCapitalized = isVertical ? 'Top' : 'Left';\n var side = sideCapitalized.toLowerCase();\n var altSide = isVertical ? 'left' : 'top';\n var opSide = isVertical ? 'bottom' : 'right';\n var arrowElementSize = getOuterSizes(arrowElement)[len];\n\n //\n // extends keepTogether behavior making sure the popper and its\n // reference have enough pixels in conjunction\n //\n\n // top/left side\n if (reference[opSide] - arrowElementSize < popper[side]) {\n data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);\n }\n // bottom/right side\n if (reference[side] + arrowElementSize > popper[opSide]) {\n data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];\n }\n data.offsets.popper = getClientRect(data.offsets.popper);\n\n // compute center of the popper\n var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;\n\n // Compute the sideValue using the updated popper offsets\n // take popper margin in account because we don't have this info available\n var css = getStyleComputedProperty(data.instance.popper);\n var popperMarginSide = parseFloat(css['margin' + sideCapitalized]);\n var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width']);\n var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;\n\n // prevent arrowElement from being placed not contiguously to its popper\n sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);\n data.arrowElement = arrowElement;\n data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);\n return data;\n}\n\n/**\n * Get the opposite placement variation of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement variation\n * @returns {String} flipped placement variation\n */\nfunction getOppositeVariation(variation) {\n if (variation === 'end') {\n return 'start';\n } else if (variation === 'start') {\n return 'end';\n }\n return variation;\n}\n\n/**\n * List of accepted placements to use as values of the `placement` option. \n * Valid placements are:\n * - `auto`\n * - `top`\n * - `right`\n * - `bottom`\n * - `left`\n *\n * Each placement can have a variation from this list:\n * - `-start`\n * - `-end`\n *\n * Variations are interpreted easily if you think of them as the left to right\n * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`\n * is right. \n * Vertically (`left` and `right`), `start` is top and `end` is bottom.\n *\n * Some valid examples are:\n * - `top-end` (on top of reference, right aligned)\n * - `right-start` (on right of reference, top aligned)\n * - `bottom` (on bottom, centered)\n * - `auto-end` (on the side with more space available, alignment depends by placement)\n *\n * @static\n * @type {Array}\n * @enum {String}\n * @readonly\n * @method placements\n * @memberof Popper\n */\nvar placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];\n\n// Get rid of `auto` `auto-start` and `auto-end`\nvar validPlacements = placements.slice(3);\n\n/**\n * Given an initial placement, returns all the subsequent placements\n * clockwise (or counter-clockwise).\n *\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement - A valid placement (it accepts variations)\n * @argument {Boolean} counter - Set to true to walk the placements counterclockwise\n * @returns {Array} placements including their variations\n */\nfunction clockwise(placement) {\n var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var index = validPlacements.indexOf(placement);\n var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));\n return counter ? arr.reverse() : arr;\n}\nvar BEHAVIORS = {\n FLIP: 'flip',\n CLOCKWISE: 'clockwise',\n COUNTERCLOCKWISE: 'counterclockwise'\n};\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction flip(data, options) {\n // if `inner` modifier is enabled, we can't use the `flip` modifier\n if (isModifierEnabled(data.instance.modifiers, 'inner')) {\n return data;\n }\n if (data.flipped && data.placement === data.originalPlacement) {\n // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides\n return data;\n }\n var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);\n var placement = data.placement.split('-')[0];\n var placementOpposite = getOppositePlacement(placement);\n var variation = data.placement.split('-')[1] || '';\n var flipOrder = [];\n switch (options.behavior) {\n case BEHAVIORS.FLIP:\n flipOrder = [placement, placementOpposite];\n break;\n case BEHAVIORS.CLOCKWISE:\n flipOrder = clockwise(placement);\n break;\n case BEHAVIORS.COUNTERCLOCKWISE:\n flipOrder = clockwise(placement, true);\n break;\n default:\n flipOrder = options.behavior;\n }\n flipOrder.forEach(function (step, index) {\n if (placement !== step || flipOrder.length === index + 1) {\n return data;\n }\n placement = data.placement.split('-')[0];\n placementOpposite = getOppositePlacement(placement);\n var popperOffsets = data.offsets.popper;\n var refOffsets = data.offsets.reference;\n\n // using floor because the reference offsets may contain decimals we are not going to consider here\n var floor = Math.floor;\n var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);\n var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);\n var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);\n var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);\n var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);\n var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;\n\n // flip the variation if required\n var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n\n // flips variation if reference element overflows boundaries\n var flippedVariationByRef = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);\n\n // flips variation if popper content overflows boundaries\n var flippedVariationByContent = !!options.flipVariationsByContent && (isVertical && variation === 'start' && overflowsRight || isVertical && variation === 'end' && overflowsLeft || !isVertical && variation === 'start' && overflowsBottom || !isVertical && variation === 'end' && overflowsTop);\n var flippedVariation = flippedVariationByRef || flippedVariationByContent;\n if (overlapsRef || overflowsBoundaries || flippedVariation) {\n // this boolean to detect any flip loop\n data.flipped = true;\n if (overlapsRef || overflowsBoundaries) {\n placement = flipOrder[index + 1];\n }\n if (flippedVariation) {\n variation = getOppositeVariation(variation);\n }\n data.placement = placement + (variation ? '-' + variation : '');\n\n // this object contains `position`, we want to preserve it along with\n // any additional property we may add in the future\n data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));\n data = runModifiers(data.instance.modifiers, data, 'flip');\n }\n });\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction keepTogether(data) {\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n var placement = data.placement.split('-')[0];\n var floor = Math.floor;\n var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n var side = isVertical ? 'right' : 'bottom';\n var opSide = isVertical ? 'left' : 'top';\n var measurement = isVertical ? 'width' : 'height';\n if (popper[side] < floor(reference[opSide])) {\n data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];\n }\n if (popper[opSide] > floor(reference[side])) {\n data.offsets.popper[opSide] = floor(reference[side]);\n }\n return data;\n}\n\n/**\n * Converts a string containing value + unit into a px value number\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} str - Value + unit string\n * @argument {String} measurement - `height` or `width`\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @returns {Number|String}\n * Value in pixels, or original string if no values were extracted\n */\nfunction toValue(str, measurement, popperOffsets, referenceOffsets) {\n // separate value from unit\n var split = str.match(/((?:\\-|\\+)?\\d*\\.?\\d*)(.*)/);\n var value = +split[1];\n var unit = split[2];\n\n // If it's not a number it's an operator, I guess\n if (!value) {\n return str;\n }\n if (unit.indexOf('%') === 0) {\n var element = void 0;\n switch (unit) {\n case '%p':\n element = popperOffsets;\n break;\n case '%':\n case '%r':\n default:\n element = referenceOffsets;\n }\n var rect = getClientRect(element);\n return rect[measurement] / 100 * value;\n } else if (unit === 'vh' || unit === 'vw') {\n // if is a vh or vw, we calculate the size based on the viewport\n var size = void 0;\n if (unit === 'vh') {\n size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);\n } else {\n size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\n }\n return size / 100 * value;\n } else {\n // if is an explicit pixel unit, we get rid of the unit and keep the value\n // if is an implicit unit, it's px, and we return just the value\n return value;\n }\n}\n\n/**\n * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} offset\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @argument {String} basePlacement\n * @returns {Array} a two cells array with x and y offsets in numbers\n */\nfunction parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {\n var offsets = [0, 0];\n\n // Use height if placement is left or right and index is 0 otherwise use width\n // in this way the first offset will use an axis and the second one\n // will use the other one\n var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;\n\n // Split the offset string to obtain a list of values and operands\n // The regex addresses values with the plus or minus sign in front (+10, -20, etc)\n var fragments = offset.split(/(\\+|\\-)/).map(function (frag) {\n return frag.trim();\n });\n\n // Detect if the offset string contains a pair of values or a single one\n // they could be separated by comma or space\n var divider = fragments.indexOf(find(fragments, function (frag) {\n return frag.search(/,|\\s/) !== -1;\n }));\n if (fragments[divider] && fragments[divider].indexOf(',') === -1) {\n console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');\n }\n\n // If divider is found, we divide the list of values and operands to divide\n // them by ofset X and Y.\n var splitRegex = /\\s*,\\s*|\\s+/;\n var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments];\n\n // Convert the values with units to absolute pixels to allow our computations\n ops = ops.map(function (op, index) {\n // Most of the units rely on the orientation of the popper\n var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';\n var mergeWithPrevious = false;\n return op\n // This aggregates any `+` or `-` sign that aren't considered operators\n // e.g.: 10 + +5 => [10, +, +5]\n .reduce(function (a, b) {\n if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {\n a[a.length - 1] = b;\n mergeWithPrevious = true;\n return a;\n } else if (mergeWithPrevious) {\n a[a.length - 1] += b;\n mergeWithPrevious = false;\n return a;\n } else {\n return a.concat(b);\n }\n }, [])\n // Here we convert the string values into number values (in px)\n .map(function (str) {\n return toValue(str, measurement, popperOffsets, referenceOffsets);\n });\n });\n\n // Loop trough the offsets arrays and execute the operations\n ops.forEach(function (op, index) {\n op.forEach(function (frag, index2) {\n if (isNumeric(frag)) {\n offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);\n }\n });\n });\n return offsets;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @argument {Number|String} options.offset=0\n * The offset value as described in the modifier description\n * @returns {Object} The data object, properly modified\n */\nfunction offset(data, _ref) {\n var offset = _ref.offset;\n var placement = data.placement,\n _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n var basePlacement = placement.split('-')[0];\n var offsets = void 0;\n if (isNumeric(+offset)) {\n offsets = [+offset, 0];\n } else {\n offsets = parseOffset(offset, popper, reference, basePlacement);\n }\n if (basePlacement === 'left') {\n popper.top += offsets[0];\n popper.left -= offsets[1];\n } else if (basePlacement === 'right') {\n popper.top += offsets[0];\n popper.left += offsets[1];\n } else if (basePlacement === 'top') {\n popper.left += offsets[0];\n popper.top -= offsets[1];\n } else if (basePlacement === 'bottom') {\n popper.left += offsets[0];\n popper.top += offsets[1];\n }\n data.popper = popper;\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction preventOverflow(data, options) {\n var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);\n\n // If offsetParent is the reference element, we really want to\n // go one step up and use the next offsetParent as reference to\n // avoid to make this modifier completely useless and look like broken\n if (data.instance.reference === boundariesElement) {\n boundariesElement = getOffsetParent(boundariesElement);\n }\n\n // NOTE: DOM access here\n // resets the popper's position so that the document size can be calculated excluding\n // the size of the popper element itself\n var transformProp = getSupportedPropertyName('transform');\n var popperStyles = data.instance.popper.style; // assignment to help minification\n var top = popperStyles.top,\n left = popperStyles.left,\n transform = popperStyles[transformProp];\n popperStyles.top = '';\n popperStyles.left = '';\n popperStyles[transformProp] = '';\n var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed);\n\n // NOTE: DOM access here\n // restores the original style properties after the offsets have been computed\n popperStyles.top = top;\n popperStyles.left = left;\n popperStyles[transformProp] = transform;\n options.boundaries = boundaries;\n var order = options.priority;\n var popper = data.offsets.popper;\n var check = {\n primary: function primary(placement) {\n var value = popper[placement];\n if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {\n value = Math.max(popper[placement], boundaries[placement]);\n }\n return defineProperty({}, placement, value);\n },\n secondary: function secondary(placement) {\n var mainSide = placement === 'right' ? 'left' : 'top';\n var value = popper[mainSide];\n if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {\n value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));\n }\n return defineProperty({}, mainSide, value);\n }\n };\n order.forEach(function (placement) {\n var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';\n popper = _extends({}, popper, check[side](placement));\n });\n data.offsets.popper = popper;\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction shift(data) {\n var placement = data.placement;\n var basePlacement = placement.split('-')[0];\n var shiftvariation = placement.split('-')[1];\n\n // if shift shiftvariation is specified, run the modifier\n if (shiftvariation) {\n var _data$offsets = data.offsets,\n reference = _data$offsets.reference,\n popper = _data$offsets.popper;\n var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n var side = isVertical ? 'left' : 'top';\n var measurement = isVertical ? 'width' : 'height';\n var shiftOffsets = {\n start: defineProperty({}, side, reference[side]),\n end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])\n };\n data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);\n }\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction hide(data) {\n if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {\n return data;\n }\n var refRect = data.offsets.reference;\n var bound = find(data.instance.modifiers, function (modifier) {\n return modifier.name === 'preventOverflow';\n }).boundaries;\n if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === true) {\n return data;\n }\n data.hide = true;\n data.attributes['x-out-of-boundaries'] = '';\n } else {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === false) {\n return data;\n }\n data.hide = false;\n data.attributes['x-out-of-boundaries'] = false;\n }\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction inner(data) {\n var placement = data.placement;\n var basePlacement = placement.split('-')[0];\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;\n var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;\n popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);\n data.placement = getOppositePlacement(placement);\n data.offsets.popper = getClientRect(popper);\n return data;\n}\n\n/**\n * Modifier function, each modifier can have a function of this type assigned\n * to its `fn` property. \n * These functions will be called on each update, this means that you must\n * make sure they are performant enough to avoid performance bottlenecks.\n *\n * @function ModifierFn\n * @argument {dataObject} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {dataObject} The data object, properly modified\n */\n\n/**\n * Modifiers are plugins used to alter the behavior of your poppers. \n * Popper.js uses a set of 9 modifiers to provide all the basic functionalities\n * needed by the library.\n *\n * Usually you don't want to override the `order`, `fn` and `onLoad` props.\n * All the other properties are configurations that could be tweaked.\n * @namespace modifiers\n */\nvar modifiers = {\n /**\n * Modifier used to shift the popper on the start or end of its reference\n * element. \n * It will read the variation of the `placement` property. \n * It can be one either `-end` or `-start`.\n * @memberof modifiers\n * @inner\n */\n shift: {\n /** @prop {number} order=100 - Index used to define the order of execution */\n order: 100,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: shift\n },\n /**\n * The `offset` modifier can shift your popper on both its axis.\n *\n * It accepts the following units:\n * - `px` or unit-less, interpreted as pixels\n * - `%` or `%r`, percentage relative to the length of the reference element\n * - `%p`, percentage relative to the length of the popper element\n * - `vw`, CSS viewport width unit\n * - `vh`, CSS viewport height unit\n *\n * For length is intended the main axis relative to the placement of the popper. \n * This means that if the placement is `top` or `bottom`, the length will be the\n * `width`. In case of `left` or `right`, it will be the `height`.\n *\n * You can provide a single value (as `Number` or `String`), or a pair of values\n * as `String` divided by a comma or one (or more) white spaces. \n * The latter is a deprecated method because it leads to confusion and will be\n * removed in v2. \n * Additionally, it accepts additions and subtractions between different units.\n * Note that multiplications and divisions aren't supported.\n *\n * Valid examples are:\n * ```\n * 10\n * '10%'\n * '10, 10'\n * '10%, 10'\n * '10 + 10%'\n * '10 - 5vh + 3%'\n * '-10px + 5vh, 5px - 6%'\n * ```\n * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap\n * > with their reference element, unfortunately, you will have to disable the `flip` modifier.\n * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).\n *\n * @memberof modifiers\n * @inner\n */\n offset: {\n /** @prop {number} order=200 - Index used to define the order of execution */\n order: 200,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: offset,\n /** @prop {Number|String} offset=0\n * The offset value as described in the modifier description\n */\n offset: 0\n },\n /**\n * Modifier used to prevent the popper from being positioned outside the boundary.\n *\n * A scenario exists where the reference itself is not within the boundaries. \n * We can say it has \"escaped the boundaries\" — or just \"escaped\". \n * In this case we need to decide whether the popper should either:\n *\n * - detach from the reference and remain \"trapped\" in the boundaries, or\n * - if it should ignore the boundary and \"escape with its reference\"\n *\n * When `escapeWithReference` is set to`true` and reference is completely\n * outside its boundaries, the popper will overflow (or completely leave)\n * the boundaries in order to remain attached to the edge of the reference.\n *\n * @memberof modifiers\n * @inner\n */\n preventOverflow: {\n /** @prop {number} order=300 - Index used to define the order of execution */\n order: 300,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: preventOverflow,\n /**\n * @prop {Array} [priority=['left','right','top','bottom']]\n * Popper will try to prevent overflow following these priorities by default,\n * then, it could overflow on the left and on top of the `boundariesElement`\n */\n priority: ['left', 'right', 'top', 'bottom'],\n /**\n * @prop {number} padding=5\n * Amount of pixel used to define a minimum distance between the boundaries\n * and the popper. This makes sure the popper always has a little padding\n * between the edges of its container\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='scrollParent'\n * Boundaries used by the modifier. Can be `scrollParent`, `window`,\n * `viewport` or any DOM element.\n */\n boundariesElement: 'scrollParent'\n },\n /**\n * Modifier used to make sure the reference and its popper stay near each other\n * without leaving any gap between the two. Especially useful when the arrow is\n * enabled and you want to ensure that it points to its reference element.\n * It cares only about the first axis. You can still have poppers with margin\n * between the popper and its reference element.\n * @memberof modifiers\n * @inner\n */\n keepTogether: {\n /** @prop {number} order=400 - Index used to define the order of execution */\n order: 400,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: keepTogether\n },\n /**\n * This modifier is used to move the `arrowElement` of the popper to make\n * sure it is positioned between the reference element and its popper element.\n * It will read the outer size of the `arrowElement` node to detect how many\n * pixels of conjunction are needed.\n *\n * It has no effect if no `arrowElement` is provided.\n * @memberof modifiers\n * @inner\n */\n arrow: {\n /** @prop {number} order=500 - Index used to define the order of execution */\n order: 500,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: arrow,\n /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */\n element: '[x-arrow]'\n },\n /**\n * Modifier used to flip the popper's placement when it starts to overlap its\n * reference element.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n *\n * **NOTE:** this modifier will interrupt the current update cycle and will\n * restart it if it detects the need to flip the placement.\n * @memberof modifiers\n * @inner\n */\n flip: {\n /** @prop {number} order=600 - Index used to define the order of execution */\n order: 600,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: flip,\n /**\n * @prop {String|Array} behavior='flip'\n * The behavior used to change the popper's placement. It can be one of\n * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid\n * placements (with optional variations)\n */\n behavior: 'flip',\n /**\n * @prop {number} padding=5\n * The popper will flip if it hits the edges of the `boundariesElement`\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='viewport'\n * The element which will define the boundaries of the popper position.\n * The popper will never be placed outside of the defined boundaries\n * (except if `keepTogether` is enabled)\n */\n boundariesElement: 'viewport',\n /**\n * @prop {Boolean} flipVariations=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the reference element overlaps its boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariations: false,\n /**\n * @prop {Boolean} flipVariationsByContent=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the popper element overlaps its reference boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariationsByContent: false\n },\n /**\n * Modifier used to make the popper flow toward the inner of the reference element.\n * By default, when this modifier is disabled, the popper will be placed outside\n * the reference element.\n * @memberof modifiers\n * @inner\n */\n inner: {\n /** @prop {number} order=700 - Index used to define the order of execution */\n order: 700,\n /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */\n enabled: false,\n /** @prop {ModifierFn} */\n fn: inner\n },\n /**\n * Modifier used to hide the popper when its reference element is outside of the\n * popper boundaries. It will set a `x-out-of-boundaries` attribute which can\n * be used to hide with a CSS selector the popper when its reference is\n * out of boundaries.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n * @memberof modifiers\n * @inner\n */\n hide: {\n /** @prop {number} order=800 - Index used to define the order of execution */\n order: 800,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: hide\n },\n /**\n * Computes the style that will be applied to the popper element to gets\n * properly positioned.\n *\n * Note that this modifier will not touch the DOM, it just prepares the styles\n * so that `applyStyle` modifier can apply it. This separation is useful\n * in case you need to replace `applyStyle` with a custom implementation.\n *\n * This modifier has `850` as `order` value to maintain backward compatibility\n * with previous versions of Popper.js. Expect the modifiers ordering method\n * to change in future major versions of the library.\n *\n * @memberof modifiers\n * @inner\n */\n computeStyle: {\n /** @prop {number} order=850 - Index used to define the order of execution */\n order: 850,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: computeStyle,\n /**\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: true,\n /**\n * @prop {string} [x='bottom']\n * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.\n * Change this if your popper should grow in a direction different from `bottom`\n */\n x: 'bottom',\n /**\n * @prop {string} [x='left']\n * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.\n * Change this if your popper should grow in a direction different from `right`\n */\n y: 'right'\n },\n /**\n * Applies the computed styles to the popper element.\n *\n * All the DOM manipulations are limited to this modifier. This is useful in case\n * you want to integrate Popper.js inside a framework or view library and you\n * want to delegate all the DOM manipulations to it.\n *\n * Note that if you disable this modifier, you must make sure the popper element\n * has its position set to `absolute` before Popper.js can do its work!\n *\n * Just disable this modifier and define your own to achieve the desired effect.\n *\n * @memberof modifiers\n * @inner\n */\n applyStyle: {\n /** @prop {number} order=900 - Index used to define the order of execution */\n order: 900,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: applyStyle,\n /** @prop {Function} */\n onLoad: applyStyleOnLoad,\n /**\n * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: undefined\n }\n};\n\n/**\n * The `dataObject` is an object containing all the information used by Popper.js.\n * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.\n * @name dataObject\n * @property {Object} data.instance The Popper.js instance\n * @property {String} data.placement Placement applied to popper\n * @property {String} data.originalPlacement Placement originally defined on init\n * @property {Boolean} data.flipped True if popper has been flipped by flip modifier\n * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper\n * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier\n * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.boundaries Offsets of the popper boundaries\n * @property {Object} data.offsets The measurements of popper, reference and arrow elements\n * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0\n */\n\n/**\n * Default options provided to Popper.js constructor. \n * These can be overridden using the `options` argument of Popper.js. \n * To override an option, simply pass an object with the same\n * structure of the `options` object, as the 3rd argument. For example:\n * ```\n * new Popper(ref, pop, {\n * modifiers: {\n * preventOverflow: { enabled: false }\n * }\n * })\n * ```\n * @type {Object}\n * @static\n * @memberof Popper\n */\nvar Defaults = {\n /**\n * Popper's placement.\n * @prop {Popper.placements} placement='bottom'\n */\n placement: 'bottom',\n /**\n * Set this to true if you want popper to position it self in 'fixed' mode\n * @prop {Boolean} positionFixed=false\n */\n positionFixed: false,\n /**\n * Whether events (resize, scroll) are initially enabled.\n * @prop {Boolean} eventsEnabled=true\n */\n eventsEnabled: true,\n /**\n * Set to true if you want to automatically remove the popper when\n * you call the `destroy` method.\n * @prop {Boolean} removeOnDestroy=false\n */\n removeOnDestroy: false,\n /**\n * Callback called when the popper is created. \n * By default, it is set to no-op. \n * Access Popper.js instance with `data.instance`.\n * @prop {onCreate}\n */\n onCreate: function onCreate() {},\n /**\n * Callback called when the popper is updated. This callback is not called\n * on the initialization/creation of the popper, but only on subsequent\n * updates. \n * By default, it is set to no-op. \n * Access Popper.js instance with `data.instance`.\n * @prop {onUpdate}\n */\n onUpdate: function onUpdate() {},\n /**\n * List of modifiers used to modify the offsets before they are applied to the popper.\n * They provide most of the functionalities of Popper.js.\n * @prop {modifiers}\n */\n modifiers: modifiers\n};\n\n/**\n * @callback onCreate\n * @param {dataObject} data\n */\n\n/**\n * @callback onUpdate\n * @param {dataObject} data\n */\n\n// Utils\n// Methods\nvar Popper = function () {\n /**\n * Creates a new Popper.js instance.\n * @class Popper\n * @param {Element|referenceObject} reference - The reference element used to position the popper\n * @param {Element} popper - The HTML / XML element used as the popper\n * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)\n * @return {Object} instance - The generated Popper.js instance\n */\n function Popper(reference, popper) {\n var _this = this;\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n classCallCheck(this, Popper);\n this.scheduleUpdate = function () {\n return requestAnimationFrame(_this.update);\n };\n\n // make update() debounced, so that it only runs at most once-per-tick\n this.update = debounce(this.update.bind(this));\n\n // with {} we create a new object with the options inside it\n this.options = _extends({}, Popper.Defaults, options);\n\n // init state\n this.state = {\n isDestroyed: false,\n isCreated: false,\n scrollParents: []\n };\n\n // get reference and popper elements (allow jQuery wrappers)\n this.reference = reference && reference.jquery ? reference[0] : reference;\n this.popper = popper && popper.jquery ? popper[0] : popper;\n\n // Deep merge modifiers options\n this.options.modifiers = {};\n Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {\n _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});\n });\n\n // Refactoring modifiers' list (Object => Array)\n this.modifiers = Object.keys(this.options.modifiers).map(function (name) {\n return _extends({\n name: name\n }, _this.options.modifiers[name]);\n })\n // sort the modifiers by order\n .sort(function (a, b) {\n return a.order - b.order;\n });\n\n // modifiers have the ability to execute arbitrary code when Popper.js get inited\n // such code is executed in the same order of its modifier\n // they could add new properties to their options configuration\n // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!\n this.modifiers.forEach(function (modifierOptions) {\n if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {\n modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);\n }\n });\n\n // fire the first update to position the popper in the right place\n this.update();\n var eventsEnabled = this.options.eventsEnabled;\n if (eventsEnabled) {\n // setup event listeners, they will take care of update the position in specific situations\n this.enableEventListeners();\n }\n this.state.eventsEnabled = eventsEnabled;\n }\n\n // We can't use class properties because they don't get listed in the\n // class prototype and break stuff like Sinon stubs\n\n createClass(Popper, [{\n key: 'update',\n value: function update$$1() {\n return update.call(this);\n }\n }, {\n key: 'destroy',\n value: function destroy$$1() {\n return destroy.call(this);\n }\n }, {\n key: 'enableEventListeners',\n value: function enableEventListeners$$1() {\n return enableEventListeners.call(this);\n }\n }, {\n key: 'disableEventListeners',\n value: function disableEventListeners$$1() {\n return disableEventListeners.call(this);\n }\n\n /**\n * Schedules an update. It will run on the next UI update available.\n * @method scheduleUpdate\n * @memberof Popper\n */\n\n /**\n * Collection of utilities useful when writing custom modifiers.\n * Starting from version 1.7, this method is available only if you\n * include `popper-utils.js` before `popper.js`.\n *\n * **DEPRECATION**: This way to access PopperUtils is deprecated\n * and will be removed in v2! Use the PopperUtils module directly instead.\n * Due to the high instability of the methods contained in Utils, we can't\n * guarantee them to follow semver. Use them at your own risk!\n * @static\n * @private\n * @type {Object}\n * @deprecated since version 1.8\n * @member Utils\n * @memberof Popper\n */\n }]);\n\n return Popper;\n}();\n\n/**\n * The `referenceObject` is an object that provides an interface compatible with Popper.js\n * and lets you use it as replacement of a real DOM node. \n * You can use this method to position a popper relatively to a set of coordinates\n * in case you don't have a DOM node to use as reference.\n *\n * ```\n * new Popper(referenceObject, popperNode);\n * ```\n *\n * NB: This feature isn't supported in Internet Explorer 10.\n * @name referenceObject\n * @property {Function} data.getBoundingClientRect\n * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.\n * @property {number} data.clientWidth\n * An ES6 getter that will return the width of the virtual reference element.\n * @property {number} data.clientHeight\n * An ES6 getter that will return the height of the virtual reference element.\n */\n\nPopper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;\nPopper.placements = placements;\nPopper.Defaults = Defaults;\nexport default Popper;","module.exports = function (e) {\n var t = {};\n function r(n) {\n if (t[n]) return t[n].exports;\n var a = t[n] = {\n i: n,\n l: !1,\n exports: {}\n };\n return e[n].call(a.exports, a, a.exports, r), a.l = !0, a.exports;\n }\n return r.m = e, r.c = t, r.d = function (e, t, n) {\n r.o(e, t) || Object.defineProperty(e, t, {\n enumerable: !0,\n get: n\n });\n }, r.r = function (e) {\n \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {\n value: \"Module\"\n }), Object.defineProperty(e, \"__esModule\", {\n value: !0\n });\n }, r.t = function (e, t) {\n if (1 & t && (e = r(e)), 8 & t) return e;\n if (4 & t && \"object\" == typeof e && e && e.__esModule) return e;\n var n = Object.create(null);\n if (r.r(n), Object.defineProperty(n, \"default\", {\n enumerable: !0,\n value: e\n }), 2 & t && \"string\" != typeof e) for (var a in e) r.d(n, a, function (t) {\n return e[t];\n }.bind(null, a));\n return n;\n }, r.n = function (e) {\n var t = e && e.__esModule ? function () {\n return e.default;\n } : function () {\n return e;\n };\n return r.d(t, \"a\", t), t;\n }, r.o = function (e, t) {\n return Object.prototype.hasOwnProperty.call(e, t);\n }, r.p = \"\", r(r.s = 9);\n}([function (e, t) {\n e.exports = require(\"react\");\n}, function (e, t, r) {\n var n;\n /*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n */\n !function () {\n \"use strict\";\n\n var r = {}.hasOwnProperty;\n function a() {\n for (var e = [], t = 0; t < arguments.length; t++) {\n var n = arguments[t];\n if (n) {\n var o = typeof n;\n if (\"string\" === o || \"number\" === o) e.push(n);else if (Array.isArray(n) && n.length) {\n var i = a.apply(null, n);\n i && e.push(i);\n } else if (\"object\" === o) for (var u in n) r.call(n, u) && n[u] && e.push(u);\n }\n }\n return e.join(\" \");\n }\n e.exports ? (a.default = a, e.exports = a) : void 0 === (n = function () {\n return a;\n }.apply(t, [])) || (e.exports = n);\n }();\n}, function (e, t, r) {\n (function (t) {\n var r = /^\\s+|\\s+$/g,\n n = /^[-+]0x[0-9a-f]+$/i,\n a = /^0b[01]+$/i,\n o = /^0o[0-7]+$/i,\n i = parseInt,\n u = \"object\" == typeof t && t && t.Object === Object && t,\n c = \"object\" == typeof self && self && self.Object === Object && self,\n s = u || c || Function(\"return this\")(),\n l = Object.prototype.toString,\n f = s.Symbol,\n d = f ? f.prototype : void 0,\n p = d ? d.toString : void 0;\n function h(e) {\n if (\"string\" == typeof e) return e;\n if (y(e)) return p ? p.call(e) : \"\";\n var t = e + \"\";\n return \"0\" == t && 1 / e == -1 / 0 ? \"-0\" : t;\n }\n function m(e) {\n var t = typeof e;\n return !!e && (\"object\" == t || \"function\" == t);\n }\n function y(e) {\n return \"symbol\" == typeof e || function (e) {\n return !!e && \"object\" == typeof e;\n }(e) && \"[object Symbol]\" == l.call(e);\n }\n function b(e) {\n return e ? (e = function (e) {\n if (\"number\" == typeof e) return e;\n if (y(e)) return NaN;\n if (m(e)) {\n var t = \"function\" == typeof e.valueOf ? e.valueOf() : e;\n e = m(t) ? t + \"\" : t;\n }\n if (\"string\" != typeof e) return 0 === e ? e : +e;\n e = e.replace(r, \"\");\n var u = a.test(e);\n return u || o.test(e) ? i(e.slice(2), u ? 2 : 8) : n.test(e) ? NaN : +e;\n }(e)) === 1 / 0 || e === -1 / 0 ? 17976931348623157e292 * (e < 0 ? -1 : 1) : e == e ? e : 0 : 0 === e ? e : 0;\n }\n e.exports = function (e, t, r) {\n var n, a, o, i;\n return e = null == (n = e) ? \"\" : h(n), a = function (e) {\n var t = b(e),\n r = t % 1;\n return t == t ? r ? t - r : t : 0;\n }(r), o = 0, i = e.length, a == a && (void 0 !== i && (a = a <= i ? a : i), void 0 !== o && (a = a >= o ? a : o)), r = a, t = h(t), e.slice(r, r + t.length) == t;\n };\n }).call(this, r(3));\n}, function (e, t) {\n var r;\n r = function () {\n return this;\n }();\n try {\n r = r || new Function(\"return this\")();\n } catch (e) {\n \"object\" == typeof window && (r = window);\n }\n e.exports = r;\n}, function (e, t, r) {\n (function (t) {\n var r = /^\\[object .+?Constructor\\]$/,\n n = \"object\" == typeof t && t && t.Object === Object && t,\n a = \"object\" == typeof self && self && self.Object === Object && self,\n o = n || a || Function(\"return this\")();\n var i,\n u = Array.prototype,\n c = Function.prototype,\n s = Object.prototype,\n l = o[\"__core-js_shared__\"],\n f = (i = /[^.]+$/.exec(l && l.keys && l.keys.IE_PROTO || \"\")) ? \"Symbol(src)_1.\" + i : \"\",\n d = c.toString,\n p = s.hasOwnProperty,\n h = s.toString,\n m = RegExp(\"^\" + d.call(p).replace(/[\\\\^$.*+?()[\\]{}|]/g, \"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, \"$1.*?\") + \"$\"),\n y = u.splice,\n b = x(o, \"Map\"),\n g = x(Object, \"create\");\n function v(e) {\n var t = -1,\n r = e ? e.length : 0;\n for (this.clear(); ++t < r;) {\n var n = e[t];\n this.set(n[0], n[1]);\n }\n }\n function C(e) {\n var t = -1,\n r = e ? e.length : 0;\n for (this.clear(); ++t < r;) {\n var n = e[t];\n this.set(n[0], n[1]);\n }\n }\n function _(e) {\n var t = -1,\n r = e ? e.length : 0;\n for (this.clear(); ++t < r;) {\n var n = e[t];\n this.set(n[0], n[1]);\n }\n }\n function w(e, t) {\n for (var r, n, a = e.length; a--;) if ((r = e[a][0]) === (n = t) || r != r && n != n) return a;\n return -1;\n }\n function S(e) {\n return !(!O(e) || (t = e, f && f in t)) && (function (e) {\n var t = O(e) ? h.call(e) : \"\";\n return \"[object Function]\" == t || \"[object GeneratorFunction]\" == t;\n }(e) || function (e) {\n var t = !1;\n if (null != e && \"function\" != typeof e.toString) try {\n t = !!(e + \"\");\n } catch (e) {}\n return t;\n }(e) ? m : r).test(function (e) {\n if (null != e) {\n try {\n return d.call(e);\n } catch (e) {}\n try {\n return e + \"\";\n } catch (e) {}\n }\n return \"\";\n }(e));\n var t;\n }\n function j(e, t) {\n var r,\n n,\n a = e.__data__;\n return (\"string\" == (n = typeof (r = t)) || \"number\" == n || \"symbol\" == n || \"boolean\" == n ? \"__proto__\" !== r : null === r) ? a[\"string\" == typeof t ? \"string\" : \"hash\"] : a.map;\n }\n function x(e, t) {\n var r = function (e, t) {\n return null == e ? void 0 : e[t];\n }(e, t);\n return S(r) ? r : void 0;\n }\n function N(e, t) {\n if (\"function\" != typeof e || t && \"function\" != typeof t) throw new TypeError(\"Expected a function\");\n var r = function r() {\n var n = arguments,\n a = t ? t.apply(this, n) : n[0],\n o = r.cache;\n if (o.has(a)) return o.get(a);\n var i = e.apply(this, n);\n return r.cache = o.set(a, i), i;\n };\n return r.cache = new (N.Cache || _)(), r;\n }\n function O(e) {\n var t = typeof e;\n return !!e && (\"object\" == t || \"function\" == t);\n }\n v.prototype.clear = function () {\n this.__data__ = g ? g(null) : {};\n }, v.prototype.delete = function (e) {\n return this.has(e) && delete this.__data__[e];\n }, v.prototype.get = function (e) {\n var t = this.__data__;\n if (g) {\n var r = t[e];\n return \"__lodash_hash_undefined__\" === r ? void 0 : r;\n }\n return p.call(t, e) ? t[e] : void 0;\n }, v.prototype.has = function (e) {\n var t = this.__data__;\n return g ? void 0 !== t[e] : p.call(t, e);\n }, v.prototype.set = function (e, t) {\n return this.__data__[e] = g && void 0 === t ? \"__lodash_hash_undefined__\" : t, this;\n }, C.prototype.clear = function () {\n this.__data__ = [];\n }, C.prototype.delete = function (e) {\n var t = this.__data__,\n r = w(t, e);\n return !(r < 0) && (r == t.length - 1 ? t.pop() : y.call(t, r, 1), !0);\n }, C.prototype.get = function (e) {\n var t = this.__data__,\n r = w(t, e);\n return r < 0 ? void 0 : t[r][1];\n }, C.prototype.has = function (e) {\n return w(this.__data__, e) > -1;\n }, C.prototype.set = function (e, t) {\n var r = this.__data__,\n n = w(r, e);\n return n < 0 ? r.push([e, t]) : r[n][1] = t, this;\n }, _.prototype.clear = function () {\n this.__data__ = {\n hash: new v(),\n map: new (b || C)(),\n string: new v()\n };\n }, _.prototype.delete = function (e) {\n return j(this, e).delete(e);\n }, _.prototype.get = function (e) {\n return j(this, e).get(e);\n }, _.prototype.has = function (e) {\n return j(this, e).has(e);\n }, _.prototype.set = function (e, t) {\n return j(this, e).set(e, t), this;\n }, N.Cache = _, e.exports = N;\n }).call(this, r(3));\n}, function (e, t, r) {\n (function (t) {\n var r = /^\\s+|\\s+$/g,\n n = /^[-+]0x[0-9a-f]+$/i,\n a = /^0b[01]+$/i,\n o = /^0o[0-7]+$/i,\n i = parseInt,\n u = \"object\" == typeof t && t && t.Object === Object && t,\n c = \"object\" == typeof self && self && self.Object === Object && self,\n s = u || c || Function(\"return this\")(),\n l = Object.prototype.toString,\n f = Math.max,\n d = Math.min,\n p = function p() {\n return s.Date.now();\n };\n function h(e) {\n var t = typeof e;\n return !!e && (\"object\" == t || \"function\" == t);\n }\n function m(e) {\n if (\"number\" == typeof e) return e;\n if (function (e) {\n return \"symbol\" == typeof e || function (e) {\n return !!e && \"object\" == typeof e;\n }(e) && \"[object Symbol]\" == l.call(e);\n }(e)) return NaN;\n if (h(e)) {\n var t = \"function\" == typeof e.valueOf ? e.valueOf() : e;\n e = h(t) ? t + \"\" : t;\n }\n if (\"string\" != typeof e) return 0 === e ? e : +e;\n e = e.replace(r, \"\");\n var u = a.test(e);\n return u || o.test(e) ? i(e.slice(2), u ? 2 : 8) : n.test(e) ? NaN : +e;\n }\n e.exports = function (e, t, r) {\n var n,\n a,\n o,\n i,\n u,\n c,\n s = 0,\n l = !1,\n y = !1,\n b = !0;\n if (\"function\" != typeof e) throw new TypeError(\"Expected a function\");\n function g(t) {\n var r = n,\n o = a;\n return n = a = void 0, s = t, i = e.apply(o, r);\n }\n function v(e) {\n return s = e, u = setTimeout(_, t), l ? g(e) : i;\n }\n function C(e) {\n var r = e - c;\n return void 0 === c || r >= t || r < 0 || y && e - s >= o;\n }\n function _() {\n var e = p();\n if (C(e)) return w(e);\n u = setTimeout(_, function (e) {\n var r = t - (e - c);\n return y ? d(r, o - (e - s)) : r;\n }(e));\n }\n function w(e) {\n return u = void 0, b && n ? g(e) : (n = a = void 0, i);\n }\n function S() {\n var e = p(),\n r = C(e);\n if (n = arguments, a = this, c = e, r) {\n if (void 0 === u) return v(c);\n if (y) return u = setTimeout(_, t), g(c);\n }\n return void 0 === u && (u = setTimeout(_, t)), i;\n }\n return t = m(t) || 0, h(r) && (l = !!r.leading, o = (y = \"maxWait\" in r) ? f(m(r.maxWait) || 0, t) : o, b = \"trailing\" in r ? !!r.trailing : b), S.cancel = function () {\n void 0 !== u && clearTimeout(u), s = 0, n = c = a = u = void 0;\n }, S.flush = function () {\n return void 0 === u ? i : w(p());\n }, S;\n };\n }).call(this, r(3));\n}, function (e, t, r) {\n (function (e, r) {\n var n = \"[object Arguments]\",\n a = \"[object Map]\",\n o = \"[object Object]\",\n i = \"[object Set]\",\n u = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n c = /^\\w*$/,\n s = /^\\./,\n l = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,\n f = /\\\\(\\\\)?/g,\n d = /^\\[object .+?Constructor\\]$/,\n p = /^(?:0|[1-9]\\d*)$/,\n h = {};\n h[\"[object Float32Array]\"] = h[\"[object Float64Array]\"] = h[\"[object Int8Array]\"] = h[\"[object Int16Array]\"] = h[\"[object Int32Array]\"] = h[\"[object Uint8Array]\"] = h[\"[object Uint8ClampedArray]\"] = h[\"[object Uint16Array]\"] = h[\"[object Uint32Array]\"] = !0, h[n] = h[\"[object Array]\"] = h[\"[object ArrayBuffer]\"] = h[\"[object Boolean]\"] = h[\"[object DataView]\"] = h[\"[object Date]\"] = h[\"[object Error]\"] = h[\"[object Function]\"] = h[a] = h[\"[object Number]\"] = h[o] = h[\"[object RegExp]\"] = h[i] = h[\"[object String]\"] = h[\"[object WeakMap]\"] = !1;\n var m = \"object\" == typeof e && e && e.Object === Object && e,\n y = \"object\" == typeof self && self && self.Object === Object && self,\n b = m || y || Function(\"return this\")(),\n g = t && !t.nodeType && t,\n v = g && \"object\" == typeof r && r && !r.nodeType && r,\n C = v && v.exports === g && m.process,\n _ = function () {\n try {\n return C && C.binding(\"util\");\n } catch (e) {}\n }(),\n w = _ && _.isTypedArray;\n function S(e, t, r, n) {\n var a = -1,\n o = e ? e.length : 0;\n for (n && o && (r = e[++a]); ++a < o;) r = t(r, e[a], a, e);\n return r;\n }\n function j(e, t) {\n for (var r = -1, n = e ? e.length : 0; ++r < n;) if (t(e[r], r, e)) return !0;\n return !1;\n }\n function x(e, t, r, n, a) {\n return a(e, function (e, a, o) {\n r = n ? (n = !1, e) : t(r, e, a, o);\n }), r;\n }\n function N(e) {\n var t = !1;\n if (null != e && \"function\" != typeof e.toString) try {\n t = !!(e + \"\");\n } catch (e) {}\n return t;\n }\n function O(e) {\n var t = -1,\n r = Array(e.size);\n return e.forEach(function (e, n) {\n r[++t] = [n, e];\n }), r;\n }\n function k(e) {\n var t = -1,\n r = Array(e.size);\n return e.forEach(function (e) {\n r[++t] = e;\n }), r;\n }\n var E,\n T,\n I,\n A = Array.prototype,\n D = Function.prototype,\n P = Object.prototype,\n F = b[\"__core-js_shared__\"],\n M = (E = /[^.]+$/.exec(F && F.keys && F.keys.IE_PROTO || \"\")) ? \"Symbol(src)_1.\" + E : \"\",\n R = D.toString,\n L = P.hasOwnProperty,\n z = P.toString,\n B = RegExp(\"^\" + R.call(L).replace(/[\\\\^$.*+?()[\\]{}|]/g, \"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, \"$1.*?\") + \"$\"),\n G = b.Symbol,\n $ = b.Uint8Array,\n V = P.propertyIsEnumerable,\n K = A.splice,\n U = (T = Object.keys, I = Object, function (e) {\n return T(I(e));\n }),\n q = Ne(b, \"DataView\"),\n H = Ne(b, \"Map\"),\n W = Ne(b, \"Promise\"),\n J = Ne(b, \"Set\"),\n Z = Ne(b, \"WeakMap\"),\n Q = Ne(Object, \"create\"),\n Y = Pe(q),\n X = Pe(H),\n ee = Pe(W),\n te = Pe(J),\n re = Pe(Z),\n ne = G ? G.prototype : void 0,\n ae = ne ? ne.valueOf : void 0,\n oe = ne ? ne.toString : void 0;\n function ie(e) {\n var t = -1,\n r = e ? e.length : 0;\n for (this.clear(); ++t < r;) {\n var n = e[t];\n this.set(n[0], n[1]);\n }\n }\n function ue(e) {\n var t = -1,\n r = e ? e.length : 0;\n for (this.clear(); ++t < r;) {\n var n = e[t];\n this.set(n[0], n[1]);\n }\n }\n function ce(e) {\n var t = -1,\n r = e ? e.length : 0;\n for (this.clear(); ++t < r;) {\n var n = e[t];\n this.set(n[0], n[1]);\n }\n }\n function se(e) {\n var t = -1,\n r = e ? e.length : 0;\n for (this.__data__ = new ce(); ++t < r;) this.add(e[t]);\n }\n function le(e) {\n this.__data__ = new ue(e);\n }\n function fe(e, t) {\n var r = Le(e) || Re(e) ? function (e, t) {\n for (var r = -1, n = Array(e); ++r < e;) n[r] = t(r);\n return n;\n }(e.length, String) : [],\n n = r.length,\n a = !!n;\n for (var o in e) !t && !L.call(e, o) || a && (\"length\" == o || ke(o, n)) || r.push(o);\n return r;\n }\n function de(e, t) {\n for (var r = e.length; r--;) if (Me(e[r][0], t)) return r;\n return -1;\n }\n ie.prototype.clear = function () {\n this.__data__ = Q ? Q(null) : {};\n }, ie.prototype.delete = function (e) {\n return this.has(e) && delete this.__data__[e];\n }, ie.prototype.get = function (e) {\n var t = this.__data__;\n if (Q) {\n var r = t[e];\n return \"__lodash_hash_undefined__\" === r ? void 0 : r;\n }\n return L.call(t, e) ? t[e] : void 0;\n }, ie.prototype.has = function (e) {\n var t = this.__data__;\n return Q ? void 0 !== t[e] : L.call(t, e);\n }, ie.prototype.set = function (e, t) {\n return this.__data__[e] = Q && void 0 === t ? \"__lodash_hash_undefined__\" : t, this;\n }, ue.prototype.clear = function () {\n this.__data__ = [];\n }, ue.prototype.delete = function (e) {\n var t = this.__data__,\n r = de(t, e);\n return !(r < 0) && (r == t.length - 1 ? t.pop() : K.call(t, r, 1), !0);\n }, ue.prototype.get = function (e) {\n var t = this.__data__,\n r = de(t, e);\n return r < 0 ? void 0 : t[r][1];\n }, ue.prototype.has = function (e) {\n return de(this.__data__, e) > -1;\n }, ue.prototype.set = function (e, t) {\n var r = this.__data__,\n n = de(r, e);\n return n < 0 ? r.push([e, t]) : r[n][1] = t, this;\n }, ce.prototype.clear = function () {\n this.__data__ = {\n hash: new ie(),\n map: new (H || ue)(),\n string: new ie()\n };\n }, ce.prototype.delete = function (e) {\n return xe(this, e).delete(e);\n }, ce.prototype.get = function (e) {\n return xe(this, e).get(e);\n }, ce.prototype.has = function (e) {\n return xe(this, e).has(e);\n }, ce.prototype.set = function (e, t) {\n return xe(this, e).set(e, t), this;\n }, se.prototype.add = se.prototype.push = function (e) {\n return this.__data__.set(e, \"__lodash_hash_undefined__\"), this;\n }, se.prototype.has = function (e) {\n return this.__data__.has(e);\n }, le.prototype.clear = function () {\n this.__data__ = new ue();\n }, le.prototype.delete = function (e) {\n return this.__data__.delete(e);\n }, le.prototype.get = function (e) {\n return this.__data__.get(e);\n }, le.prototype.has = function (e) {\n return this.__data__.has(e);\n }, le.prototype.set = function (e, t) {\n var r = this.__data__;\n if (r instanceof ue) {\n var n = r.__data__;\n if (!H || n.length < 199) return n.push([e, t]), this;\n r = this.__data__ = new ce(n);\n }\n return r.set(e, t), this;\n };\n var pe,\n he,\n me = (pe = function pe(e, t) {\n return e && ye(e, t, qe);\n }, function (e, t) {\n if (null == e) return e;\n if (!ze(e)) return pe(e, t);\n for (var r = e.length, n = he ? r : -1, a = Object(e); (he ? n-- : ++n < r) && !1 !== t(a[n], n, a););\n return e;\n }),\n ye = function (e) {\n return function (t, r, n) {\n for (var a = -1, o = Object(t), i = n(t), u = i.length; u--;) {\n var c = i[e ? u : ++a];\n if (!1 === r(o[c], c, o)) break;\n }\n return t;\n };\n }();\n function be(e, t) {\n for (var r = 0, n = (t = Ee(t, e) ? [t] : Se(t)).length; null != e && r < n;) e = e[De(t[r++])];\n return r && r == n ? e : void 0;\n }\n function ge(e, t) {\n return null != e && t in Object(e);\n }\n function ve(e, t, r, u, c) {\n return e === t || (null == e || null == t || !$e(e) && !Ve(t) ? e != e && t != t : function (e, t, r, u, c, s) {\n var l = Le(e),\n f = Le(t),\n d = \"[object Array]\",\n p = \"[object Array]\";\n l || (d = (d = Oe(e)) == n ? o : d);\n f || (p = (p = Oe(t)) == n ? o : p);\n var h = d == o && !N(e),\n m = p == o && !N(t),\n y = d == p;\n if (y && !h) return s || (s = new le()), l || Ue(e) ? je(e, t, r, u, c, s) : function (e, t, r, n, o, u, c) {\n switch (r) {\n case \"[object DataView]\":\n if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1;\n e = e.buffer, t = t.buffer;\n case \"[object ArrayBuffer]\":\n return !(e.byteLength != t.byteLength || !n(new $(e), new $(t)));\n case \"[object Boolean]\":\n case \"[object Date]\":\n case \"[object Number]\":\n return Me(+e, +t);\n case \"[object Error]\":\n return e.name == t.name && e.message == t.message;\n case \"[object RegExp]\":\n case \"[object String]\":\n return e == t + \"\";\n case a:\n var s = O;\n case i:\n var l = 2 & u;\n if (s || (s = k), e.size != t.size && !l) return !1;\n var f = c.get(e);\n if (f) return f == t;\n u |= 1, c.set(e, t);\n var d = je(s(e), s(t), n, o, u, c);\n return c.delete(e), d;\n case \"[object Symbol]\":\n if (ae) return ae.call(e) == ae.call(t);\n }\n return !1;\n }(e, t, d, r, u, c, s);\n if (!(2 & c)) {\n var b = h && L.call(e, \"__wrapped__\"),\n g = m && L.call(t, \"__wrapped__\");\n if (b || g) {\n var v = b ? e.value() : e,\n C = g ? t.value() : t;\n return s || (s = new le()), r(v, C, u, c, s);\n }\n }\n if (!y) return !1;\n return s || (s = new le()), function (e, t, r, n, a, o) {\n var i = 2 & a,\n u = qe(e),\n c = u.length,\n s = qe(t).length;\n if (c != s && !i) return !1;\n var l = c;\n for (; l--;) {\n var f = u[l];\n if (!(i ? f in t : L.call(t, f))) return !1;\n }\n var d = o.get(e);\n if (d && o.get(t)) return d == t;\n var p = !0;\n o.set(e, t), o.set(t, e);\n var h = i;\n for (; ++l < c;) {\n f = u[l];\n var m = e[f],\n y = t[f];\n if (n) var b = i ? n(y, m, f, t, e, o) : n(m, y, f, e, t, o);\n if (!(void 0 === b ? m === y || r(m, y, n, a, o) : b)) {\n p = !1;\n break;\n }\n h || (h = \"constructor\" == f);\n }\n if (p && !h) {\n var g = e.constructor,\n v = t.constructor;\n g == v || !(\"constructor\" in e) || !(\"constructor\" in t) || \"function\" == typeof g && g instanceof g && \"function\" == typeof v && v instanceof v || (p = !1);\n }\n return o.delete(e), o.delete(t), p;\n }(e, t, r, u, c, s);\n }(e, t, ve, r, u, c));\n }\n function Ce(e) {\n return !(!$e(e) || function (e) {\n return !!M && M in e;\n }(e)) && (Be(e) || N(e) ? B : d).test(Pe(e));\n }\n function _e(e) {\n return \"function\" == typeof e ? e : null == e ? He : \"object\" == typeof e ? Le(e) ? function (e, t) {\n if (Ee(e) && Te(t)) return Ie(De(e), t);\n return function (r) {\n var n = function (e, t, r) {\n var n = null == e ? void 0 : be(e, t);\n return void 0 === n ? r : n;\n }(r, e);\n return void 0 === n && n === t ? function (e, t) {\n return null != e && function (e, t, r) {\n t = Ee(t, e) ? [t] : Se(t);\n var n,\n a = -1,\n o = t.length;\n for (; ++a < o;) {\n var i = De(t[a]);\n if (!(n = null != e && r(e, i))) break;\n e = e[i];\n }\n if (n) return n;\n return !!(o = e ? e.length : 0) && Ge(o) && ke(i, o) && (Le(e) || Re(e));\n }(e, t, ge);\n }(r, e) : ve(t, n, void 0, 3);\n };\n }(e[0], e[1]) : function (e) {\n var t = function (e) {\n var t = qe(e),\n r = t.length;\n for (; r--;) {\n var n = t[r],\n a = e[n];\n t[r] = [n, a, Te(a)];\n }\n return t;\n }(e);\n if (1 == t.length && t[0][2]) return Ie(t[0][0], t[0][1]);\n return function (r) {\n return r === e || function (e, t, r, n) {\n var a = r.length,\n o = a,\n i = !n;\n if (null == e) return !o;\n for (e = Object(e); a--;) {\n var u = r[a];\n if (i && u[2] ? u[1] !== e[u[0]] : !(u[0] in e)) return !1;\n }\n for (; ++a < o;) {\n var c = (u = r[a])[0],\n s = e[c],\n l = u[1];\n if (i && u[2]) {\n if (void 0 === s && !(c in e)) return !1;\n } else {\n var f = new le();\n if (n) var d = n(s, l, c, e, t, f);\n if (!(void 0 === d ? ve(l, s, n, 3, f) : d)) return !1;\n }\n }\n return !0;\n }(r, e, t);\n };\n }(e) : Ee(t = e) ? (r = De(t), function (e) {\n return null == e ? void 0 : e[r];\n }) : function (e) {\n return function (t) {\n return be(t, e);\n };\n }(t);\n var t, r;\n }\n function we(e) {\n if (r = (t = e) && t.constructor, n = \"function\" == typeof r && r.prototype || P, t !== n) return U(e);\n var t,\n r,\n n,\n a = [];\n for (var o in Object(e)) L.call(e, o) && \"constructor\" != o && a.push(o);\n return a;\n }\n function Se(e) {\n return Le(e) ? e : Ae(e);\n }\n function je(e, t, r, n, a, o) {\n var i = 2 & a,\n u = e.length,\n c = t.length;\n if (u != c && !(i && c > u)) return !1;\n var s = o.get(e);\n if (s && o.get(t)) return s == t;\n var l = -1,\n f = !0,\n d = 1 & a ? new se() : void 0;\n for (o.set(e, t), o.set(t, e); ++l < u;) {\n var p = e[l],\n h = t[l];\n if (n) var m = i ? n(h, p, l, t, e, o) : n(p, h, l, e, t, o);\n if (void 0 !== m) {\n if (m) continue;\n f = !1;\n break;\n }\n if (d) {\n if (!j(t, function (e, t) {\n if (!d.has(t) && (p === e || r(p, e, n, a, o))) return d.add(t);\n })) {\n f = !1;\n break;\n }\n } else if (p !== h && !r(p, h, n, a, o)) {\n f = !1;\n break;\n }\n }\n return o.delete(e), o.delete(t), f;\n }\n function xe(e, t) {\n var r,\n n,\n a = e.__data__;\n return (\"string\" == (n = typeof (r = t)) || \"number\" == n || \"symbol\" == n || \"boolean\" == n ? \"__proto__\" !== r : null === r) ? a[\"string\" == typeof t ? \"string\" : \"hash\"] : a.map;\n }\n function Ne(e, t) {\n var r = function (e, t) {\n return null == e ? void 0 : e[t];\n }(e, t);\n return Ce(r) ? r : void 0;\n }\n var Oe = function Oe(e) {\n return z.call(e);\n };\n function ke(e, t) {\n return !!(t = null == t ? 9007199254740991 : t) && (\"number\" == typeof e || p.test(e)) && e > -1 && e % 1 == 0 && e < t;\n }\n function Ee(e, t) {\n if (Le(e)) return !1;\n var r = typeof e;\n return !(\"number\" != r && \"symbol\" != r && \"boolean\" != r && null != e && !Ke(e)) || c.test(e) || !u.test(e) || null != t && e in Object(t);\n }\n function Te(e) {\n return e == e && !$e(e);\n }\n function Ie(e, t) {\n return function (r) {\n return null != r && r[e] === t && (void 0 !== t || e in Object(r));\n };\n }\n (q && \"[object DataView]\" != Oe(new q(new ArrayBuffer(1))) || H && Oe(new H()) != a || W && \"[object Promise]\" != Oe(W.resolve()) || J && Oe(new J()) != i || Z && \"[object WeakMap]\" != Oe(new Z())) && (Oe = function Oe(e) {\n var t = z.call(e),\n r = t == o ? e.constructor : void 0,\n n = r ? Pe(r) : void 0;\n if (n) switch (n) {\n case Y:\n return \"[object DataView]\";\n case X:\n return a;\n case ee:\n return \"[object Promise]\";\n case te:\n return i;\n case re:\n return \"[object WeakMap]\";\n }\n return t;\n });\n var Ae = Fe(function (e) {\n var t;\n e = null == (t = e) ? \"\" : function (e) {\n if (\"string\" == typeof e) return e;\n if (Ke(e)) return oe ? oe.call(e) : \"\";\n var t = e + \"\";\n return \"0\" == t && 1 / e == -1 / 0 ? \"-0\" : t;\n }(t);\n var r = [];\n return s.test(e) && r.push(\"\"), e.replace(l, function (e, t, n, a) {\n r.push(n ? a.replace(f, \"$1\") : t || e);\n }), r;\n });\n function De(e) {\n if (\"string\" == typeof e || Ke(e)) return e;\n var t = e + \"\";\n return \"0\" == t && 1 / e == -1 / 0 ? \"-0\" : t;\n }\n function Pe(e) {\n if (null != e) {\n try {\n return R.call(e);\n } catch (e) {}\n try {\n return e + \"\";\n } catch (e) {}\n }\n return \"\";\n }\n function Fe(e, t) {\n if (\"function\" != typeof e || t && \"function\" != typeof t) throw new TypeError(\"Expected a function\");\n var r = function r() {\n var n = arguments,\n a = t ? t.apply(this, n) : n[0],\n o = r.cache;\n if (o.has(a)) return o.get(a);\n var i = e.apply(this, n);\n return r.cache = o.set(a, i), i;\n };\n return r.cache = new (Fe.Cache || ce)(), r;\n }\n function Me(e, t) {\n return e === t || e != e && t != t;\n }\n function Re(e) {\n return function (e) {\n return Ve(e) && ze(e);\n }(e) && L.call(e, \"callee\") && (!V.call(e, \"callee\") || z.call(e) == n);\n }\n Fe.Cache = ce;\n var Le = Array.isArray;\n function ze(e) {\n return null != e && Ge(e.length) && !Be(e);\n }\n function Be(e) {\n var t = $e(e) ? z.call(e) : \"\";\n return \"[object Function]\" == t || \"[object GeneratorFunction]\" == t;\n }\n function Ge(e) {\n return \"number\" == typeof e && e > -1 && e % 1 == 0 && e <= 9007199254740991;\n }\n function $e(e) {\n var t = typeof e;\n return !!e && (\"object\" == t || \"function\" == t);\n }\n function Ve(e) {\n return !!e && \"object\" == typeof e;\n }\n function Ke(e) {\n return \"symbol\" == typeof e || Ve(e) && \"[object Symbol]\" == z.call(e);\n }\n var Ue = w ? function (e) {\n return function (t) {\n return e(t);\n };\n }(w) : function (e) {\n return Ve(e) && Ge(e.length) && !!h[z.call(e)];\n };\n function qe(e) {\n return ze(e) ? fe(e) : we(e);\n }\n function He(e) {\n return e;\n }\n r.exports = function (e, t, r) {\n var n = Le(e) ? S : x,\n a = arguments.length < 3;\n return n(e, _e(t), r, a, me);\n };\n }).call(this, r(3), r(7)(e));\n}, function (e, t) {\n e.exports = function (e) {\n return e.webpackPolyfill || (e.deprecate = function () {}, e.paths = [], e.children || (e.children = []), Object.defineProperty(e, \"loaded\", {\n enumerable: !0,\n get: function get() {\n return e.l;\n }\n }), Object.defineProperty(e, \"id\", {\n enumerable: !0,\n get: function get() {\n return e.i;\n }\n }), e.webpackPolyfill = 1), e;\n };\n}, function (e, t) {\n String.prototype.padEnd || (String.prototype.padEnd = function (e, t) {\n return e >>= 0, t = String(void 0 !== t ? t : \" \"), this.length > e ? String(this) : ((e -= this.length) > t.length && (t += t.repeat(e / t.length)), String(this) + t.slice(0, e));\n });\n}, function (e, t, r) {\n \"use strict\";\n\n function n(e, t, r) {\n return t in e ? Object.defineProperty(e, t, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[t] = r, e;\n }\n function a(e) {\n if (Symbol.iterator in Object(e) || \"[object Arguments]\" === Object.prototype.toString.call(e)) return Array.from(e);\n }\n function o(e) {\n return function (e) {\n if (Array.isArray(e)) {\n for (var t = 0, r = new Array(e.length); t < e.length; t++) r[t] = e[t];\n return r;\n }\n }(e) || a(e) || function () {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n }();\n }\n function i(e) {\n if (Array.isArray(e)) return e;\n }\n function u() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n function c(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }\n function s(e, t) {\n for (var r = 0; r < t.length; r++) {\n var n = t[r];\n n.enumerable = n.enumerable || !1, n.configurable = !0, \"value\" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);\n }\n }\n function l(e) {\n return (l = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (e) {\n return typeof e;\n } : function (e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n })(e);\n }\n function f(e) {\n return (f = \"function\" == typeof Symbol && \"symbol\" === l(Symbol.iterator) ? function (e) {\n return l(e);\n } : function (e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : l(e);\n })(e);\n }\n function d(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n }\n function p(e) {\n return (p = Object.setPrototypeOf ? Object.getPrototypeOf : function (e) {\n return e.__proto__ || Object.getPrototypeOf(e);\n })(e);\n }\n function h(e, t) {\n return (h = Object.setPrototypeOf || function (e, t) {\n return e.__proto__ = t, e;\n })(e, t);\n }\n r.r(t);\n var m = r(0),\n y = r.n(m),\n b = r(5),\n g = r.n(b),\n v = r(4),\n C = r.n(v),\n _ = r(6),\n w = r.n(_),\n S = r(2),\n j = r.n(S),\n x = r(1),\n N = r.n(x);\n r(8);\n function O(e, t) {\n return i(e) || function (e, t) {\n var r = [],\n n = !0,\n a = !1,\n o = void 0;\n try {\n for (var i, u = e[Symbol.iterator](); !(n = (i = u.next()).done) && (r.push(i.value), !t || r.length !== t); n = !0);\n } catch (e) {\n a = !0, o = e;\n } finally {\n try {\n n || null == u.return || u.return();\n } finally {\n if (a) throw o;\n }\n }\n return r;\n }(e, t) || u();\n }\n var k = [[\"Afghanistan\", [\"asia\"], \"af\", \"93\"], [\"Albania\", [\"europe\"], \"al\", \"355\"], [\"Algeria\", [\"africa\", \"north-africa\"], \"dz\", \"213\"], [\"Andorra\", [\"europe\"], \"ad\", \"376\"], [\"Angola\", [\"africa\"], \"ao\", \"244\"], [\"Antigua and Barbuda\", [\"america\", \"carribean\"], \"ag\", \"1268\"], [\"Argentina\", [\"america\", \"south-america\"], \"ar\", \"54\", \"(..) ........\", 0, [\"11\", \"221\", \"223\", \"261\", \"264\", \"2652\", \"280\", \"2905\", \"291\", \"2920\", \"2966\", \"299\", \"341\", \"342\", \"343\", \"351\", \"376\", \"379\", \"381\", \"3833\", \"385\", \"387\", \"388\"]], [\"Armenia\", [\"asia\", \"ex-ussr\"], \"am\", \"374\", \".. ......\"], [\"Aruba\", [\"america\", \"carribean\"], \"aw\", \"297\"], [\"Australia\", [\"oceania\"], \"au\", \"61\", \"(..) .... ....\", 0, [\"2\", \"3\", \"4\", \"7\", \"8\", \"02\", \"03\", \"04\", \"07\", \"08\"]], [\"Austria\", [\"europe\", \"eu-union\"], \"at\", \"43\"], [\"Azerbaijan\", [\"asia\", \"ex-ussr\"], \"az\", \"994\", \"(..) ... .. ..\"], [\"Bahamas\", [\"america\", \"carribean\"], \"bs\", \"1242\"], [\"Bahrain\", [\"middle-east\"], \"bh\", \"973\"], [\"Bangladesh\", [\"asia\"], \"bd\", \"880\"], [\"Barbados\", [\"america\", \"carribean\"], \"bb\", \"1246\"], [\"Belarus\", [\"europe\", \"ex-ussr\"], \"by\", \"375\", \"(..) ... .. ..\"], [\"Belgium\", [\"europe\", \"eu-union\"], \"be\", \"32\", \"... .. .. ..\"], [\"Belize\", [\"america\", \"central-america\"], \"bz\", \"501\"], [\"Benin\", [\"africa\"], \"bj\", \"229\"], [\"Bhutan\", [\"asia\"], \"bt\", \"975\"], [\"Bolivia\", [\"america\", \"south-america\"], \"bo\", \"591\"], [\"Bosnia and Herzegovina\", [\"europe\", \"ex-yugos\"], \"ba\", \"387\"], [\"Botswana\", [\"africa\"], \"bw\", \"267\"], [\"Brazil\", [\"america\", \"south-america\"], \"br\", \"55\", \"(..) .........\"], [\"British Indian Ocean Territory\", [\"asia\"], \"io\", \"246\"], [\"Brunei\", [\"asia\"], \"bn\", \"673\"], [\"Bulgaria\", [\"europe\", \"eu-union\"], \"bg\", \"359\"], [\"Burkina Faso\", [\"africa\"], \"bf\", \"226\"], [\"Burundi\", [\"africa\"], \"bi\", \"257\"], [\"Cambodia\", [\"asia\"], \"kh\", \"855\"], [\"Cameroon\", [\"africa\"], \"cm\", \"237\"], [\"Canada\", [\"america\", \"north-america\"], \"ca\", \"1\", \"(...) ...-....\", 1, [\"204\", \"226\", \"236\", \"249\", \"250\", \"289\", \"306\", \"343\", \"365\", \"387\", \"403\", \"416\", \"418\", \"431\", \"437\", \"438\", \"450\", \"506\", \"514\", \"519\", \"548\", \"579\", \"581\", \"587\", \"604\", \"613\", \"639\", \"647\", \"672\", \"705\", \"709\", \"742\", \"778\", \"780\", \"782\", \"807\", \"819\", \"825\", \"867\", \"873\", \"902\", \"905\"]], [\"Cape Verde\", [\"africa\"], \"cv\", \"238\"], [\"Caribbean Netherlands\", [\"america\", \"carribean\"], \"bq\", \"599\", \"\", 1], [\"Central African Republic\", [\"africa\"], \"cf\", \"236\"], [\"Chad\", [\"africa\"], \"td\", \"235\"], [\"Chile\", [\"america\", \"south-america\"], \"cl\", \"56\"], [\"China\", [\"asia\"], \"cn\", \"86\", \"..-.........\"], [\"Colombia\", [\"america\", \"south-america\"], \"co\", \"57\", \"... ... ....\"], [\"Comoros\", [\"africa\"], \"km\", \"269\"], [\"Congo\", [\"africa\"], \"cd\", \"243\"], [\"Congo\", [\"africa\"], \"cg\", \"242\"], [\"Costa Rica\", [\"america\", \"central-america\"], \"cr\", \"506\", \"....-....\"], [\"Côte d’Ivoire\", [\"africa\"], \"ci\", \"225\", \".. .. .. ..\"], [\"Croatia\", [\"europe\", \"eu-union\", \"ex-yugos\"], \"hr\", \"385\"], [\"Cuba\", [\"america\", \"carribean\"], \"cu\", \"53\"], [\"Curaçao\", [\"america\", \"carribean\"], \"cw\", \"599\", \"\", 0], [\"Cyprus\", [\"europe\", \"eu-union\"], \"cy\", \"357\", \".. ......\"], [\"Czech Republic\", [\"europe\", \"eu-union\"], \"cz\", \"420\", \"... ... ...\"], [\"Denmark\", [\"europe\", \"eu-union\", \"baltic\"], \"dk\", \"45\", \".. .. .. ..\"], [\"Djibouti\", [\"africa\"], \"dj\", \"253\"], [\"Dominica\", [\"america\", \"carribean\"], \"dm\", \"1767\"], [\"Dominican Republic\", [\"america\", \"carribean\"], \"do\", \"1\", \"\", 2, [\"809\", \"829\", \"849\"]], [\"Ecuador\", [\"america\", \"south-america\"], \"ec\", \"593\"], [\"Egypt\", [\"africa\", \"north-africa\"], \"eg\", \"20\"], [\"El Salvador\", [\"america\", \"central-america\"], \"sv\", \"503\", \"....-....\"], [\"Equatorial Guinea\", [\"africa\"], \"gq\", \"240\"], [\"Eritrea\", [\"africa\"], \"er\", \"291\"], [\"Estonia\", [\"europe\", \"eu-union\", \"ex-ussr\", \"baltic\"], \"ee\", \"372\", \".... ......\"], [\"Ethiopia\", [\"africa\"], \"et\", \"251\"], [\"Fiji\", [\"oceania\"], \"fj\", \"679\"], [\"Finland\", [\"europe\", \"eu-union\", \"baltic\"], \"fi\", \"358\", \".. ... .. ..\"], [\"France\", [\"europe\", \"eu-union\"], \"fr\", \"33\", \". .. .. .. ..\"], [\"French Guiana\", [\"america\", \"south-america\"], \"gf\", \"594\"], [\"French Polynesia\", [\"oceania\"], \"pf\", \"689\"], [\"Gabon\", [\"africa\"], \"ga\", \"241\"], [\"Gambia\", [\"africa\"], \"gm\", \"220\"], [\"Georgia\", [\"asia\", \"ex-ussr\"], \"ge\", \"995\"], [\"Germany\", [\"europe\", \"eu-union\", \"baltic\"], \"de\", \"49\", \".... ........\"], [\"Ghana\", [\"africa\"], \"gh\", \"233\"], [\"Greece\", [\"europe\", \"eu-union\"], \"gr\", \"30\"], [\"Grenada\", [\"america\", \"carribean\"], \"gd\", \"1473\"], [\"Guadeloupe\", [\"america\", \"carribean\"], \"gp\", \"590\", \"\", 0], [\"Guam\", [\"oceania\"], \"gu\", \"1671\"], [\"Guatemala\", [\"america\", \"central-america\"], \"gt\", \"502\", \"....-....\"], [\"Guinea\", [\"africa\"], \"gn\", \"224\"], [\"Guinea-Bissau\", [\"africa\"], \"gw\", \"245\"], [\"Guyana\", [\"america\", \"south-america\"], \"gy\", \"592\"], [\"Haiti\", [\"america\", \"carribean\"], \"ht\", \"509\", \"....-....\"], [\"Honduras\", [\"america\", \"central-america\"], \"hn\", \"504\"], [\"Hong Kong\", [\"asia\"], \"hk\", \"852\", \".... ....\"], [\"Hungary\", [\"europe\", \"eu-union\"], \"hu\", \"36\"], [\"Iceland\", [\"europe\"], \"is\", \"354\", \"... ....\"], [\"India\", [\"asia\"], \"in\", \"91\", \".....-.....\"], [\"Indonesia\", [\"asia\"], \"id\", \"62\"], [\"Iran\", [\"middle-east\"], \"ir\", \"98\", \"... ... ....\"], [\"Iraq\", [\"middle-east\"], \"iq\", \"964\"], [\"Ireland\", [\"europe\", \"eu-union\"], \"ie\", \"353\", \".. .......\"], [\"Israel\", [\"middle-east\"], \"il\", \"972\", \"... ... ....\"], [\"Italy\", [\"europe\", \"eu-union\"], \"it\", \"39\", \"... .......\", 0], [\"Jamaica\", [\"america\", \"carribean\"], \"jm\", \"1876\"], [\"Japan\", [\"asia\"], \"jp\", \"81\", \".. .... ....\"], [\"Jordan\", [\"middle-east\"], \"jo\", \"962\"], [\"Kazakhstan\", [\"asia\", \"ex-ussr\"], \"kz\", \"7\", \"... ...-..-..\", 1, [\"310\", \"311\", \"312\", \"313\", \"315\", \"318\", \"321\", \"324\", \"325\", \"326\", \"327\", \"336\", \"7172\", \"73622\"]], [\"Kenya\", [\"africa\"], \"ke\", \"254\"], [\"Kiribati\", [\"oceania\"], \"ki\", \"686\"], [\"Kosovo\", [\"europe\", \"ex-yugos\"], \"xk\", \"383\"], [\"Kuwait\", [\"middle-east\"], \"kw\", \"965\"], [\"Kyrgyzstan\", [\"asia\", \"ex-ussr\"], \"kg\", \"996\", \"... ... ...\"], [\"Laos\", [\"asia\"], \"la\", \"856\"], [\"Latvia\", [\"europe\", \"eu-union\", \"ex-ussr\", \"baltic\"], \"lv\", \"371\", \".. ... ...\"], [\"Lebanon\", [\"middle-east\"], \"lb\", \"961\"], [\"Lesotho\", [\"africa\"], \"ls\", \"266\"], [\"Liberia\", [\"africa\"], \"lr\", \"231\"], [\"Libya\", [\"africa\", \"north-africa\"], \"ly\", \"218\"], [\"Liechtenstein\", [\"europe\"], \"li\", \"423\"], [\"Lithuania\", [\"europe\", \"eu-union\", \"ex-ussr\", \"baltic\"], \"lt\", \"370\"], [\"Luxembourg\", [\"europe\", \"eu-union\"], \"lu\", \"352\"], [\"Macau\", [\"asia\"], \"mo\", \"853\"], [\"Macedonia\", [\"europe\", \"ex-yugos\"], \"mk\", \"389\"], [\"Madagascar\", [\"africa\"], \"mg\", \"261\"], [\"Malawi\", [\"africa\"], \"mw\", \"265\"], [\"Malaysia\", [\"asia\"], \"my\", \"60\", \"..-....-....\"], [\"Maldives\", [\"asia\"], \"mv\", \"960\"], [\"Mali\", [\"africa\"], \"ml\", \"223\"], [\"Malta\", [\"europe\", \"eu-union\"], \"mt\", \"356\"], [\"Marshall Islands\", [\"oceania\"], \"mh\", \"692\"], [\"Martinique\", [\"america\", \"carribean\"], \"mq\", \"596\"], [\"Mauritania\", [\"africa\"], \"mr\", \"222\"], [\"Mauritius\", [\"africa\"], \"mu\", \"230\"], [\"Mexico\", [\"america\", \"central-america\"], \"mx\", \"52\", \"... ... ....\", 0, [\"55\", \"81\", \"33\", \"656\", \"664\", \"998\", \"774\", \"229\"]], [\"Micronesia\", [\"oceania\"], \"fm\", \"691\"], [\"Moldova\", [\"europe\"], \"md\", \"373\", \"(..) ..-..-..\"], [\"Monaco\", [\"europe\"], \"mc\", \"377\"], [\"Mongolia\", [\"asia\"], \"mn\", \"976\"], [\"Montenegro\", [\"europe\", \"ex-yugos\"], \"me\", \"382\"], [\"Morocco\", [\"africa\", \"north-africa\"], \"ma\", \"212\"], [\"Mozambique\", [\"africa\"], \"mz\", \"258\"], [\"Myanmar\", [\"asia\"], \"mm\", \"95\"], [\"Namibia\", [\"africa\"], \"na\", \"264\"], [\"Nauru\", [\"africa\"], \"nr\", \"674\"], [\"Nepal\", [\"asia\"], \"np\", \"977\"], [\"Netherlands\", [\"europe\", \"eu-union\"], \"nl\", \"31\", \".. ........\"], [\"New Caledonia\", [\"oceania\"], \"nc\", \"687\"], [\"New Zealand\", [\"oceania\"], \"nz\", \"64\", \"...-...-....\"], [\"Nicaragua\", [\"america\", \"central-america\"], \"ni\", \"505\"], [\"Niger\", [\"africa\"], \"ne\", \"227\"], [\"Nigeria\", [\"africa\"], \"ng\", \"234\"], [\"North Korea\", [\"asia\"], \"kp\", \"850\"], [\"Norway\", [\"europe\", \"baltic\"], \"no\", \"47\", \"... .. ...\"], [\"Oman\", [\"middle-east\"], \"om\", \"968\"], [\"Pakistan\", [\"asia\"], \"pk\", \"92\", \"...-.......\"], [\"Palau\", [\"oceania\"], \"pw\", \"680\"], [\"Palestine\", [\"middle-east\"], \"ps\", \"970\"], [\"Panama\", [\"america\", \"central-america\"], \"pa\", \"507\"], [\"Papua New Guinea\", [\"oceania\"], \"pg\", \"675\"], [\"Paraguay\", [\"america\", \"south-america\"], \"py\", \"595\"], [\"Peru\", [\"america\", \"south-america\"], \"pe\", \"51\"], [\"Philippines\", [\"asia\"], \"ph\", \"63\", \".... .......\"], [\"Poland\", [\"europe\", \"eu-union\", \"baltic\"], \"pl\", \"48\", \"...-...-...\"], [\"Portugal\", [\"europe\", \"eu-union\"], \"pt\", \"351\"], [\"Puerto Rico\", [\"america\", \"carribean\"], \"pr\", \"1\", \"\", 3, [\"787\", \"939\"]], [\"Qatar\", [\"middle-east\"], \"qa\", \"974\"], [\"Réunion\", [\"africa\"], \"re\", \"262\"], [\"Romania\", [\"europe\", \"eu-union\"], \"ro\", \"40\"], [\"Russia\", [\"europe\", \"asia\", \"ex-ussr\", \"baltic\"], \"ru\", \"7\", \"(...) ...-..-..\", 0], [\"Rwanda\", [\"africa\"], \"rw\", \"250\"], [\"Saint Kitts and Nevis\", [\"america\", \"carribean\"], \"kn\", \"1869\"], [\"Saint Lucia\", [\"america\", \"carribean\"], \"lc\", \"1758\"], [\"Saint Vincent and the Grenadines\", [\"america\", \"carribean\"], \"vc\", \"1784\"], [\"Samoa\", [\"oceania\"], \"ws\", \"685\"], [\"San Marino\", [\"europe\"], \"sm\", \"378\"], [\"São Tomé and Príncipe\", [\"africa\"], \"st\", \"239\"], [\"Saudi Arabia\", [\"middle-east\"], \"sa\", \"966\"], [\"Senegal\", [\"africa\"], \"sn\", \"221\"], [\"Serbia\", [\"europe\", \"ex-yugos\"], \"rs\", \"381\"], [\"Seychelles\", [\"africa\"], \"sc\", \"248\"], [\"Sierra Leone\", [\"africa\"], \"sl\", \"232\"], [\"Singapore\", [\"asia\"], \"sg\", \"65\", \"....-....\"], [\"Slovakia\", [\"europe\", \"eu-union\"], \"sk\", \"421\"], [\"Slovenia\", [\"europe\", \"eu-union\", \"ex-yugos\"], \"si\", \"386\"], [\"Solomon Islands\", [\"oceania\"], \"sb\", \"677\"], [\"Somalia\", [\"africa\"], \"so\", \"252\"], [\"South Africa\", [\"africa\"], \"za\", \"27\"], [\"South Korea\", [\"asia\"], \"kr\", \"82\", \"... .... ....\"], [\"South Sudan\", [\"africa\", \"north-africa\"], \"ss\", \"211\"], [\"Spain\", [\"europe\", \"eu-union\"], \"es\", \"34\", \"... ... ...\"], [\"Sri Lanka\", [\"asia\"], \"lk\", \"94\"], [\"Sudan\", [\"africa\"], \"sd\", \"249\"], [\"Suriname\", [\"america\", \"south-america\"], \"sr\", \"597\"], [\"Swaziland\", [\"africa\"], \"sz\", \"268\"], [\"Sweden\", [\"europe\", \"eu-union\", \"baltic\"], \"se\", \"46\", \"(...) ...-...\"], [\"Switzerland\", [\"europe\"], \"ch\", \"41\", \".. ... .. ..\"], [\"Syria\", [\"middle-east\"], \"sy\", \"963\"], [\"Taiwan\", [\"asia\"], \"tw\", \"886\"], [\"Tajikistan\", [\"asia\", \"ex-ussr\"], \"tj\", \"992\"], [\"Tanzania\", [\"africa\"], \"tz\", \"255\"], [\"Thailand\", [\"asia\"], \"th\", \"66\"], [\"Timor-Leste\", [\"asia\"], \"tl\", \"670\"], [\"Togo\", [\"africa\"], \"tg\", \"228\"], [\"Tonga\", [\"oceania\"], \"to\", \"676\"], [\"Trinidad and Tobago\", [\"america\", \"carribean\"], \"tt\", \"1868\"], [\"Tunisia\", [\"africa\", \"north-africa\"], \"tn\", \"216\"], [\"Turkey\", [\"europe\"], \"tr\", \"90\", \"... ... .. ..\"], [\"Turkmenistan\", [\"asia\", \"ex-ussr\"], \"tm\", \"993\"], [\"Tuvalu\", [\"asia\"], \"tv\", \"688\"], [\"Uganda\", [\"africa\"], \"ug\", \"256\"], [\"Ukraine\", [\"europe\", \"ex-ussr\"], \"ua\", \"380\", \"(..) ... .. ..\"], [\"United Arab Emirates\", [\"middle-east\"], \"ae\", \"971\"], [\"United Kingdom\", [\"europe\", \"eu-union\"], \"gb\", \"44\", \".... ......\"], [\"United States\", [\"america\", \"north-america\"], \"us\", \"1\", \"(...) ...-....\", 0, [\"907\", \"205\", \"251\", \"256\", \"334\", \"479\", \"501\", \"870\", \"480\", \"520\", \"602\", \"623\", \"928\", \"209\", \"213\", \"310\", \"323\", \"408\", \"415\", \"510\", \"530\", \"559\", \"562\", \"619\", \"626\", \"650\", \"661\", \"707\", \"714\", \"760\", \"805\", \"818\", \"831\", \"858\", \"909\", \"916\", \"925\", \"949\", \"951\", \"303\", \"719\", \"970\", \"203\", \"860\", \"202\", \"302\", \"239\", \"305\", \"321\", \"352\", \"386\", \"407\", \"561\", \"727\", \"772\", \"813\", \"850\", \"863\", \"904\", \"941\", \"954\", \"229\", \"404\", \"478\", \"706\", \"770\", \"912\", \"808\", \"319\", \"515\", \"563\", \"641\", \"712\", \"208\", \"217\", \"309\", \"312\", \"618\", \"630\", \"708\", \"773\", \"815\", \"847\", \"219\", \"260\", \"317\", \"574\", \"765\", \"812\", \"316\", \"620\", \"785\", \"913\", \"270\", \"502\", \"606\", \"859\", \"225\", \"318\", \"337\", \"504\", \"985\", \"413\", \"508\", \"617\", \"781\", \"978\", \"301\", \"410\", \"207\", \"231\", \"248\", \"269\", \"313\", \"517\", \"586\", \"616\", \"734\", \"810\", \"906\", \"989\", \"218\", \"320\", \"507\", \"612\", \"651\", \"763\", \"952\", \"314\", \"417\", \"573\", \"636\", \"660\", \"816\", \"228\", \"601\", \"662\", \"406\", \"252\", \"336\", \"704\", \"828\", \"910\", \"919\", \"701\", \"308\", \"402\", \"603\", \"201\", \"609\", \"732\", \"856\", \"908\", \"973\", \"505\", \"575\", \"702\", \"775\", \"212\", \"315\", \"516\", \"518\", \"585\", \"607\", \"631\", \"716\", \"718\", \"845\", \"914\", \"216\", \"330\", \"419\", \"440\", \"513\", \"614\", \"740\", \"937\", \"405\", \"580\", \"918\", \"503\", \"541\", \"215\", \"412\", \"570\", \"610\", \"717\", \"724\", \"814\", \"401\", \"803\", \"843\", \"864\", \"605\", \"423\", \"615\", \"731\", \"865\", \"901\", \"931\", \"210\", \"214\", \"254\", \"281\", \"325\", \"361\", \"409\", \"432\", \"512\", \"713\", \"806\", \"817\", \"830\", \"903\", \"915\", \"936\", \"940\", \"956\", \"972\", \"979\", \"435\", \"801\", \"276\", \"434\", \"540\", \"703\", \"757\", \"804\", \"802\", \"206\", \"253\", \"360\", \"425\", \"509\", \"262\", \"414\", \"608\", \"715\", \"920\", \"304\", \"307\"]], [\"Uruguay\", [\"america\", \"south-america\"], \"uy\", \"598\"], [\"Uzbekistan\", [\"asia\", \"ex-ussr\"], \"uz\", \"998\", \".. ... .. ..\"], [\"Vanuatu\", [\"oceania\"], \"vu\", \"678\"], [\"Vatican City\", [\"europe\"], \"va\", \"39\", \".. .... ....\", 1], [\"Venezuela\", [\"america\", \"south-america\"], \"ve\", \"58\"], [\"Vietnam\", [\"asia\"], \"vn\", \"84\"], [\"Yemen\", [\"middle-east\"], \"ye\", \"967\"], [\"Zambia\", [\"africa\"], \"zm\", \"260\"], [\"Zimbabwe\", [\"africa\"], \"zw\", \"263\"]],\n E = [[\"American Samoa\", [\"oceania\"], \"as\", \"1684\"], [\"Anguilla\", [\"america\", \"carribean\"], \"ai\", \"1264\"], [\"Bermuda\", [\"america\", \"north-america\"], \"bm\", \"1441\"], [\"British Virgin Islands\", [\"america\", \"carribean\"], \"vg\", \"1284\"], [\"Cayman Islands\", [\"america\", \"carribean\"], \"ky\", \"1345\"], [\"Cook Islands\", [\"oceania\"], \"ck\", \"682\"], [\"Falkland Islands\", [\"america\", \"south-america\"], \"fk\", \"500\"], [\"Faroe Islands\", [\"europe\"], \"fo\", \"298\"], [\"Gibraltar\", [\"europe\"], \"gi\", \"350\"], [\"Greenland\", [\"america\"], \"gl\", \"299\"], [\"Jersey\", [\"europe\", \"eu-union\"], \"je\", \"44\", \".... ......\"], [\"Montserrat\", [\"america\", \"carribean\"], \"ms\", \"1664\"], [\"Niue\", [\"asia\"], \"nu\", \"683\"], [\"Norfolk Island\", [\"oceania\"], \"nf\", \"672\"], [\"Northern Mariana Islands\", [\"oceania\"], \"mp\", \"1670\"], [\"Saint Barthélemy\", [\"america\", \"carribean\"], \"bl\", \"590\", \"\", 1], [\"Saint Helena\", [\"africa\"], \"sh\", \"290\"], [\"Saint Martin\", [\"america\", \"carribean\"], \"mf\", \"590\", \"\", 2], [\"Saint Pierre and Miquelon\", [\"america\", \"north-america\"], \"pm\", \"508\"], [\"Sint Maarten\", [\"america\", \"carribean\"], \"sx\", \"1721\"], [\"Tokelau\", [\"oceania\"], \"tk\", \"690\"], [\"Turks and Caicos Islands\", [\"america\", \"carribean\"], \"tc\", \"1649\"], [\"U.S. Virgin Islands\", [\"america\", \"carribean\"], \"vi\", \"1340\"], [\"Wallis and Futuna\", [\"oceania\"], \"wf\", \"681\"]];\n function T(e, t, r, n, a) {\n return !r || a ? e + \"\".padEnd(t.length, \".\") + \" \" + n : e + \"\".padEnd(t.length, \".\") + \" \" + r;\n }\n function I(e, t, r, a, i) {\n var u,\n c,\n s = [];\n return c = !0 === t, [(u = []).concat.apply(u, o(e.map(function (e) {\n var o = {\n name: e[0],\n regions: e[1],\n iso2: e[2],\n countryCode: e[3],\n dialCode: e[3],\n format: T(r, e[3], e[4], a, i),\n priority: e[5] || 0\n },\n u = [];\n return e[6] && e[6].map(function (t) {\n var r = function (e) {\n for (var t = 1; t < arguments.length; t++) {\n var r = null != arguments[t] ? arguments[t] : {},\n a = Object.keys(r);\n \"function\" == typeof Object.getOwnPropertySymbols && (a = a.concat(Object.getOwnPropertySymbols(r).filter(function (e) {\n return Object.getOwnPropertyDescriptor(r, e).enumerable;\n }))), a.forEach(function (t) {\n n(e, t, r[t]);\n });\n }\n return e;\n }({}, o);\n r.dialCode = e[3] + t, r.isAreaCode = !0, r.areaCodeLength = t.length, u.push(r);\n }), u.length > 0 ? (o.mainCode = !0, c || \"Array\" === t.constructor.name && t.includes(e[2]) ? (o.hasAreaCodes = !0, [o].concat(u)) : (s = s.concat(u), [o])) : [o];\n }))), s];\n }\n function A(e, t, r, n) {\n if (null !== r) {\n var a = Object.keys(r),\n o = Object.values(r);\n a.forEach(function (r, a) {\n if (n) return e.push([r, o[a]]);\n var i = e.findIndex(function (e) {\n return e[0] === r;\n });\n if (-1 === i) {\n var u = [r];\n u[t] = o[a], e.push(u);\n } else e[i][t] = o[a];\n });\n }\n }\n function D(e, t) {\n return 0 === t.length ? e : e.map(function (e) {\n var r = t.findIndex(function (t) {\n return t[0] === e[2];\n });\n if (-1 === r) return e;\n var n = t[r];\n return n[1] && (e[4] = n[1]), n[3] && (e[5] = n[3]), n[2] && (e[6] = n[2]), e;\n });\n }\n var P = function e(t, r, n, a, i, u, s, l, f, d, p, h, m, y) {\n c(this, e), this.filterRegions = function (e, t) {\n if (\"string\" == typeof e) {\n var r = e;\n return t.filter(function (e) {\n return e.regions.some(function (e) {\n return e === r;\n });\n });\n }\n return t.filter(function (t) {\n return e.map(function (e) {\n return t.regions.some(function (t) {\n return t === e;\n });\n }).some(function (e) {\n return e;\n });\n });\n }, this.sortTerritories = function (e, t) {\n var r = [].concat(o(e), o(t));\n return r.sort(function (e, t) {\n return e.name < t.name ? -1 : e.name > t.name ? 1 : 0;\n }), r;\n }, this.getFilteredCountryList = function (e, t, r) {\n return 0 === e.length ? t : r ? e.map(function (e) {\n var r = t.find(function (t) {\n return t.iso2 === e;\n });\n if (r) return r;\n }).filter(function (e) {\n return e;\n }) : t.filter(function (t) {\n return e.some(function (e) {\n return e === t.iso2;\n });\n });\n }, this.localizeCountries = function (e, t, r) {\n for (var n = 0; n < e.length; n++) void 0 !== t[e[n].iso2] ? e[n].localName = t[e[n].iso2] : void 0 !== t[e[n].name] && (e[n].localName = t[e[n].name]);\n return r || e.sort(function (e, t) {\n return e.localName < t.localName ? -1 : e.localName > t.localName ? 1 : 0;\n }), e;\n }, this.getCustomAreas = function (e, t) {\n for (var r = [], n = 0; n < t.length; n++) {\n var a = JSON.parse(JSON.stringify(e));\n a.dialCode += t[n], r.push(a);\n }\n return r;\n }, this.excludeCountries = function (e, t) {\n return 0 === t.length ? e : e.filter(function (e) {\n return !t.includes(e.iso2);\n });\n };\n var b = function (e, t, r) {\n var n = [];\n return A(n, 1, e, !0), A(n, 3, t), A(n, 2, r), n;\n }(l, f, d),\n g = D(JSON.parse(JSON.stringify(k)), b),\n v = D(JSON.parse(JSON.stringify(E)), b),\n C = O(I(g, t, h, m, y), 2),\n _ = C[0],\n w = C[1];\n if (r) {\n var S = O(I(v, t, h, m, y), 2),\n j = S[0];\n S[1];\n _ = this.sortTerritories(j, _);\n }\n n && (_ = this.filterRegions(n, _)), this.onlyCountries = this.localizeCountries(this.excludeCountries(this.getFilteredCountryList(a, _, s.includes(\"onlyCountries\")), u), p, s.includes(\"onlyCountries\")), this.preferredCountries = 0 === i.length ? [] : this.localizeCountries(this.getFilteredCountryList(i, _, s.includes(\"preferredCountries\")), p, s.includes(\"preferredCountries\")), this.hiddenAreaCodes = this.excludeCountries(this.getFilteredCountryList(a, w), u);\n },\n F = function (e) {\n function t(e) {\n var r;\n c(this, t), (r = function (e, t) {\n return !t || \"object\" !== f(t) && \"function\" != typeof t ? d(e) : t;\n }(this, p(t).call(this, e))).getProbableCandidate = C()(function (e) {\n return e && 0 !== e.length ? r.state.onlyCountries.filter(function (t) {\n return j()(t.name.toLowerCase(), e.toLowerCase());\n }, d(d(r)))[0] : null;\n }), r.guessSelectedCountry = C()(function (e, t, n, a) {\n var o;\n if (!1 === r.props.enableAreaCodes && (a.some(function (t) {\n if (j()(e, t.dialCode)) return n.some(function (e) {\n if (t.iso2 === e.iso2 && e.mainCode) return o = e, !0;\n }), !0;\n }), o)) return o;\n var i = n.find(function (e) {\n return e.iso2 == t;\n });\n if (\"\" === e.trim()) return i;\n var u = n.reduce(function (t, r) {\n if (j()(e, r.dialCode)) {\n if (r.dialCode.length > t.dialCode.length) return r;\n if (r.dialCode.length === t.dialCode.length && r.priority < t.priority) return r;\n }\n return t;\n }, {\n dialCode: \"\",\n priority: 10001\n }, d(d(r)));\n return u.name ? u : i;\n }), r.updateCountry = function (e) {\n var t,\n n = r.state.onlyCountries;\n (t = e.indexOf(0) >= \"0\" && e.indexOf(0) <= \"9\" ? n.find(function (t) {\n return t.dialCode == +e;\n }) : n.find(function (t) {\n return t.iso2 == e;\n })) && t.dialCode && r.setState({\n selectedCountry: t,\n formattedNumber: r.props.disableCountryCode ? \"\" : r.formatNumber(t.dialCode, t)\n });\n }, r.scrollTo = function (e, t) {\n if (e) {\n var n = r.dropdownRef;\n if (n && document.body) {\n var a = n.offsetHeight,\n o = n.getBoundingClientRect().top + document.body.scrollTop,\n i = o + a,\n u = e,\n c = u.getBoundingClientRect(),\n s = u.offsetHeight,\n l = c.top + document.body.scrollTop,\n f = l + s,\n d = l - o + n.scrollTop,\n p = a / 2 - s / 2;\n if (r.props.enableSearch ? l < o + 32 : l < o) t && (d -= p), n.scrollTop = d;else if (f > i) {\n t && (d += p);\n var h = a - s;\n n.scrollTop = d - h;\n }\n }\n }\n }, r.scrollToTop = function () {\n var e = r.dropdownRef;\n e && document.body && (e.scrollTop = 0);\n }, r.formatNumber = function (e, t) {\n if (!t) return e;\n var n,\n o = t.format,\n c = r.props,\n s = c.disableCountryCode,\n l = c.enableAreaCodeStretch,\n f = c.enableLongNumbers,\n d = c.autoFormat;\n if (s ? ((n = o.split(\" \")).shift(), n = n.join(\" \")) : l && t.isAreaCode ? ((n = o.split(\" \"))[1] = n[1].replace(/\\.+/, \"\".padEnd(t.areaCodeLength, \".\")), n = n.join(\" \")) : n = o, !e || 0 === e.length) return s ? \"\" : r.props.prefix;\n if (e && e.length < 2 || !n || !d) return s ? e : r.props.prefix + e;\n var p,\n h = w()(n, function (e, t) {\n if (0 === e.remainingText.length) return e;\n if (\".\" !== t) return {\n formattedText: e.formattedText + t,\n remainingText: e.remainingText\n };\n var r,\n n = i(r = e.remainingText) || a(r) || u(),\n o = n[0],\n c = n.slice(1);\n return {\n formattedText: e.formattedText + o,\n remainingText: c\n };\n }, {\n formattedText: \"\",\n remainingText: e.split(\"\")\n });\n return (p = f ? h.formattedText + h.remainingText.join(\"\") : h.formattedText).includes(\"(\") && !p.includes(\")\") && (p += \")\"), p;\n }, r.cursorToEnd = function () {\n var e = r.numberInputRef;\n if (document.activeElement === e) {\n e.focus();\n var t = e.value.length;\n \")\" === e.value.charAt(t - 1) && (t -= 1), e.setSelectionRange(t, t);\n }\n }, r.getElement = function (e) {\n return r[\"flag_no_\".concat(e)];\n }, r.getCountryData = function () {\n return r.state.selectedCountry ? {\n name: r.state.selectedCountry.name || \"\",\n dialCode: r.state.selectedCountry.dialCode || \"\",\n countryCode: r.state.selectedCountry.iso2 || \"\",\n format: r.state.selectedCountry.format || \"\"\n } : {};\n }, r.handleFlagDropdownClick = function (e) {\n if (e.preventDefault(), r.state.showDropdown || !r.props.disabled) {\n var t = r.state,\n n = t.preferredCountries,\n a = t.onlyCountries,\n o = t.selectedCountry,\n i = r.concatPreferredCountries(n, a).findIndex(function (e) {\n return e.dialCode === o.dialCode && e.iso2 === o.iso2;\n });\n r.setState({\n showDropdown: !r.state.showDropdown,\n highlightCountryIndex: i\n }, function () {\n r.state.showDropdown && r.scrollTo(r.getElement(r.state.highlightCountryIndex));\n });\n }\n }, r.handleInput = function (e) {\n var t = e.target.value,\n n = r.props,\n a = n.prefix,\n o = n.onChange,\n i = r.props.disableCountryCode ? \"\" : a,\n u = r.state.selectedCountry,\n c = r.state.freezeSelection;\n if (!r.props.countryCodeEditable) {\n var s = a + (u.hasAreaCodes ? r.state.onlyCountries.find(function (e) {\n return e.iso2 === u.iso2 && e.mainCode;\n }).dialCode : u.dialCode);\n if (t.slice(0, s.length) !== s) return;\n }\n if (t === a) return o && o(\"\", r.getCountryData(), e, \"\"), r.setState({\n formattedNumber: \"\"\n });\n if (t.replace(/\\D/g, \"\").length > 15) {\n if (!1 === r.props.enableLongNumbers) return;\n if (\"number\" == typeof r.props.enableLongNumbers && t.replace(/\\D/g, \"\").length > r.props.enableLongNumbers) return;\n }\n if (t !== r.state.formattedNumber) {\n e.preventDefault ? e.preventDefault() : e.returnValue = !1;\n var l = r.props.country,\n f = r.state,\n d = f.onlyCountries,\n p = f.selectedCountry,\n h = f.hiddenAreaCodes;\n if (o && e.persist(), t.length > 0) {\n var m = t.replace(/\\D/g, \"\");\n (!r.state.freezeSelection || p && p.dialCode.length > m.length) && (u = r.props.disableCountryGuess ? p : r.guessSelectedCountry(m.substring(0, 6), l, d, h) || p, c = !1), i = r.formatNumber(m, u), u = u.dialCode ? u : p;\n }\n var y = e.target.selectionStart,\n b = e.target.selectionStart,\n g = r.state.formattedNumber,\n v = i.length - g.length;\n r.setState({\n formattedNumber: i,\n freezeSelection: c,\n selectedCountry: u\n }, function () {\n v > 0 && (b -= v), \")\" == i.charAt(i.length - 1) ? r.numberInputRef.setSelectionRange(i.length - 1, i.length - 1) : b > 0 && g.length >= i.length ? r.numberInputRef.setSelectionRange(b, b) : y < g.length && r.numberInputRef.setSelectionRange(y, y), o && o(i.replace(/[^0-9]+/g, \"\"), r.getCountryData(), e, i);\n });\n }\n }, r.handleInputClick = function (e) {\n r.setState({\n showDropdown: !1\n }), r.props.onClick && r.props.onClick(e, r.getCountryData());\n }, r.handleDoubleClick = function (e) {\n var t = e.target.value.length;\n e.target.setSelectionRange(0, t);\n }, r.handleFlagItemClick = function (e, t) {\n var n = r.state.selectedCountry,\n a = r.state.onlyCountries.find(function (t) {\n return t == e;\n });\n if (a) {\n var o = r.state.formattedNumber.replace(\" \", \"\").replace(\"(\", \"\").replace(\")\", \"\").replace(\"-\", \"\"),\n i = o.length > 1 ? o.replace(n.dialCode, a.dialCode) : a.dialCode,\n u = r.formatNumber(i.replace(/\\D/g, \"\"), a);\n r.setState({\n showDropdown: !1,\n selectedCountry: a,\n freezeSelection: !0,\n formattedNumber: u,\n searchValue: \"\"\n }, function () {\n r.cursorToEnd(), r.props.onChange && r.props.onChange(u.replace(/[^0-9]+/g, \"\"), r.getCountryData(), t, u);\n });\n }\n }, r.handleInputFocus = function (e) {\n r.numberInputRef && r.numberInputRef.value === r.props.prefix && r.state.selectedCountry && !r.props.disableCountryCode && r.setState({\n formattedNumber: r.props.prefix + r.state.selectedCountry.dialCode\n }, function () {\n r.props.jumpCursorToEnd && setTimeout(r.cursorToEnd, 0);\n }), r.setState({\n placeholder: \"\"\n }), r.props.onFocus && r.props.onFocus(e, r.getCountryData()), r.props.jumpCursorToEnd && setTimeout(r.cursorToEnd, 0);\n }, r.handleInputBlur = function (e) {\n e.target.value || r.setState({\n placeholder: r.props.placeholder\n }), r.props.onBlur && r.props.onBlur(e, r.getCountryData());\n }, r.handleInputCopy = function (e) {\n if (r.props.copyNumbersOnly) {\n var t = window.getSelection().toString().replace(/[^0-9]+/g, \"\");\n e.clipboardData.setData(\"text/plain\", t), e.preventDefault();\n }\n }, r.getHighlightCountryIndex = function (e) {\n var t = r.state.highlightCountryIndex + e;\n return t < 0 || t >= r.state.onlyCountries.length + r.state.preferredCountries.length ? t - e : r.props.enableSearch && t > r.getSearchFilteredCountries().length ? 0 : t;\n }, r.searchCountry = function () {\n var e = r.getProbableCandidate(r.state.queryString) || r.state.onlyCountries[0],\n t = r.state.onlyCountries.findIndex(function (t) {\n return t == e;\n }) + r.state.preferredCountries.length;\n r.scrollTo(r.getElement(t), !0), r.setState({\n queryString: \"\",\n highlightCountryIndex: t\n });\n }, r.handleKeydown = function (e) {\n var t = r.props.keys,\n n = e.target.className;\n if (n.includes(\"selected-flag\") && e.which === t.ENTER && !r.state.showDropdown) return r.handleFlagDropdownClick(e);\n if (n.includes(\"form-control\") && (e.which === t.ENTER || e.which === t.ESC)) return e.target.blur();\n if (r.state.showDropdown && !r.props.disabled && (!n.includes(\"search-box\") || e.which === t.UP || e.which === t.DOWN || e.which === t.ENTER || e.which === t.ESC && \"\" === e.target.value)) {\n e.preventDefault ? e.preventDefault() : e.returnValue = !1;\n var a = function a(e) {\n r.setState({\n highlightCountryIndex: r.getHighlightCountryIndex(e)\n }, function () {\n r.scrollTo(r.getElement(r.state.highlightCountryIndex), !0);\n });\n };\n switch (e.which) {\n case t.DOWN:\n a(1);\n break;\n case t.UP:\n a(-1);\n break;\n case t.ENTER:\n r.props.enableSearch ? r.handleFlagItemClick(r.getSearchFilteredCountries()[r.state.highlightCountryIndex] || r.getSearchFilteredCountries()[0], e) : r.handleFlagItemClick([].concat(o(r.state.preferredCountries), o(r.state.onlyCountries))[r.state.highlightCountryIndex], e);\n break;\n case t.ESC:\n case t.TAB:\n r.setState({\n showDropdown: !1\n }, r.cursorToEnd);\n break;\n default:\n (e.which >= t.A && e.which <= t.Z || e.which === t.SPACE) && r.setState({\n queryString: r.state.queryString + String.fromCharCode(e.which)\n }, r.state.debouncedQueryStingSearcher);\n }\n }\n }, r.handleInputKeyDown = function (e) {\n var t = r.props,\n n = t.keys,\n a = t.onEnterKeyPress,\n o = t.onKeyDown;\n e.which === n.ENTER && a && a(e), o && o(e);\n }, r.handleClickOutside = function (e) {\n r.dropdownRef && !r.dropdownContainerRef.contains(e.target) && r.state.showDropdown && r.setState({\n showDropdown: !1\n });\n }, r.handleSearchChange = function (e) {\n var t = e.currentTarget.value,\n n = r.state,\n a = n.preferredCountries,\n o = n.selectedCountry,\n i = 0;\n if (\"\" === t && o) {\n var u = r.state.onlyCountries;\n i = r.concatPreferredCountries(a, u).findIndex(function (e) {\n return e == o;\n }), setTimeout(function () {\n return r.scrollTo(r.getElement(i));\n }, 100);\n }\n r.setState({\n searchValue: t,\n highlightCountryIndex: i\n });\n }, r.concatPreferredCountries = function (e, t) {\n return e.length > 0 ? o(new Set(e.concat(t))) : t;\n }, r.getDropdownCountryName = function (e) {\n return e.localName || e.name;\n }, r.getSearchFilteredCountries = function () {\n var e = r.state,\n t = e.preferredCountries,\n n = e.onlyCountries,\n a = e.searchValue,\n i = r.props.enableSearch,\n u = r.concatPreferredCountries(t, n),\n c = a.trim().toLowerCase().replace(\"+\", \"\");\n if (i && c) {\n if (/^\\d+$/.test(c)) return u.filter(function (e) {\n var t = e.dialCode;\n return [\"\".concat(t)].some(function (e) {\n return e.toLowerCase().includes(c);\n });\n });\n var s = u.filter(function (e) {\n var t = e.iso2;\n return [\"\".concat(t)].some(function (e) {\n return e.toLowerCase().includes(c);\n });\n }),\n l = u.filter(function (e) {\n var t = e.name,\n r = e.localName;\n e.iso2;\n return [\"\".concat(t), \"\".concat(r || \"\")].some(function (e) {\n return e.toLowerCase().includes(c);\n });\n });\n return r.scrollToTop(), o(new Set([].concat(s, l)));\n }\n return u;\n }, r.getCountryDropdownList = function () {\n var e = r.state,\n t = e.preferredCountries,\n a = e.highlightCountryIndex,\n o = e.showDropdown,\n i = e.searchValue,\n u = r.props,\n c = u.disableDropdown,\n s = u.prefix,\n l = r.props,\n f = l.enableSearch,\n d = l.searchNotFound,\n p = l.disableSearchIcon,\n h = l.searchClass,\n m = l.searchStyle,\n b = l.searchPlaceholder,\n g = l.autocompleteSearch,\n v = r.getSearchFilteredCountries().map(function (e, t) {\n var n = a === t,\n o = N()({\n country: !0,\n preferred: \"us\" === e.iso2 || \"gb\" === e.iso2,\n active: \"us\" === e.iso2,\n highlight: n\n }),\n i = \"flag \".concat(e.iso2);\n return y.a.createElement(\"li\", Object.assign({\n ref: function ref(e) {\n return r[\"flag_no_\".concat(t)] = e;\n },\n key: \"flag_no_\".concat(t),\n \"data-flag-key\": \"flag_no_\".concat(t),\n className: o,\n \"data-dial-code\": \"1\",\n tabIndex: c ? \"-1\" : \"0\",\n \"data-country-code\": e.iso2,\n onClick: function onClick(t) {\n return r.handleFlagItemClick(e, t);\n },\n role: \"option\"\n }, n ? {\n \"aria-selected\": !0\n } : {}), y.a.createElement(\"div\", {\n className: i\n }), y.a.createElement(\"span\", {\n className: \"country-name\"\n }, r.getDropdownCountryName(e)), y.a.createElement(\"span\", {\n className: \"dial-code\"\n }, e.format ? r.formatNumber(e.dialCode, e) : s + e.dialCode));\n }),\n C = y.a.createElement(\"li\", {\n key: \"dashes\",\n className: \"divider\"\n });\n t.length > 0 && (!f || f && !i.trim()) && v.splice(t.length, 0, C);\n var _ = N()(n({\n \"country-list\": !0,\n hide: !o\n }, r.props.dropdownClass, !0));\n return y.a.createElement(\"ul\", {\n ref: function ref(e) {\n return !f && e && e.focus(), r.dropdownRef = e;\n },\n className: _,\n style: r.props.dropdownStyle,\n role: \"listbox\",\n tabIndex: \"0\"\n }, f && y.a.createElement(\"li\", {\n className: N()(n({\n search: !0\n }, h, h))\n }, !p && y.a.createElement(\"span\", {\n className: N()(n({\n \"search-emoji\": !0\n }, \"\".concat(h, \"-emoji\"), h)),\n role: \"img\",\n \"aria-label\": \"Magnifying glass\"\n }, \"🔎\"), y.a.createElement(\"input\", {\n className: N()(n({\n \"search-box\": !0\n }, \"\".concat(h, \"-box\"), h)),\n style: m,\n type: \"search\",\n placeholder: b,\n autoFocus: !0,\n autoComplete: g ? \"on\" : \"off\",\n value: i,\n onChange: r.handleSearchChange\n })), v.length > 0 ? v : y.a.createElement(\"li\", {\n className: \"no-entries-message\"\n }, y.a.createElement(\"span\", null, d)));\n };\n var s,\n l = new P(e.enableAreaCodes, e.enableTerritories, e.regions, e.onlyCountries, e.preferredCountries, e.excludeCountries, e.preserveOrder, e.masks, e.priority, e.areaCodes, e.localization, e.prefix, e.defaultMask, e.alwaysDefaultMask),\n h = l.onlyCountries,\n m = l.preferredCountries,\n b = l.hiddenAreaCodes,\n v = e.value ? e.value.replace(/\\D/g, \"\") : \"\";\n s = e.disableInitialCountryGuess ? 0 : v.length > 1 ? r.guessSelectedCountry(v.substring(0, 6), e.country, h, b) || 0 : e.country && h.find(function (t) {\n return t.iso2 == e.country;\n }) || 0;\n var _,\n S = v.length < 2 && s && !j()(v, s.dialCode) ? s.dialCode : \"\";\n _ = \"\" === v && 0 === s ? \"\" : r.formatNumber((e.disableCountryCode ? \"\" : S) + v, s.name ? s : void 0);\n var x = h.findIndex(function (e) {\n return e == s;\n });\n return r.state = {\n showDropdown: e.showDropdown,\n formattedNumber: _,\n onlyCountries: h,\n preferredCountries: m,\n hiddenAreaCodes: b,\n selectedCountry: s,\n highlightCountryIndex: x,\n queryString: \"\",\n freezeSelection: !1,\n debouncedQueryStingSearcher: g()(r.searchCountry, 250),\n searchValue: \"\"\n }, r;\n }\n var r, l, m;\n return function (e, t) {\n if (\"function\" != typeof t && null !== t) throw new TypeError(\"Super expression must either be null or a function\");\n e.prototype = Object.create(t && t.prototype, {\n constructor: {\n value: e,\n writable: !0,\n configurable: !0\n }\n }), t && h(e, t);\n }(t, e), r = t, (l = [{\n key: \"componentDidMount\",\n value: function value() {\n document.addEventListener && this.props.enableClickOutside && document.addEventListener(\"mousedown\", this.handleClickOutside), this.props.onMount && this.props.onMount(this.state.formattedNumber.replace(/[^0-9]+/g, \"\"), this.getCountryData(), this.state.formattedNumber);\n }\n }, {\n key: \"componentWillUnmount\",\n value: function value() {\n document.removeEventListener && this.props.enableClickOutside && document.removeEventListener(\"mousedown\", this.handleClickOutside);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function value(e, t, r) {\n e.country !== this.props.country ? this.updateCountry(this.props.country) : e.value !== this.props.value && this.updateFormattedNumber(this.props.value);\n }\n }, {\n key: \"updateFormattedNumber\",\n value: function value(e) {\n if (null === e) return this.setState({\n selectedCountry: 0,\n formattedNumber: \"\"\n });\n var t = this.state,\n r = t.onlyCountries,\n n = t.selectedCountry,\n a = t.hiddenAreaCodes,\n o = this.props,\n i = o.country,\n u = o.prefix;\n if (\"\" === e) return this.setState({\n selectedCountry: n,\n formattedNumber: \"\"\n });\n var c,\n s,\n l = e.replace(/\\D/g, \"\");\n if (n && j()(e, u + n.dialCode)) s = this.formatNumber(l, n), this.setState({\n formattedNumber: s\n });else {\n var f = (c = this.props.disableCountryGuess ? n : this.guessSelectedCountry(l.substring(0, 6), i, r, a) || n) && j()(l, u + c.dialCode) ? c.dialCode : \"\";\n s = this.formatNumber((this.props.disableCountryCode ? \"\" : f) + l, c || void 0), this.setState({\n selectedCountry: c,\n formattedNumber: s\n });\n }\n }\n }, {\n key: \"render\",\n value: function value() {\n var e,\n t,\n r,\n a = this,\n o = this.state,\n i = o.onlyCountries,\n u = o.selectedCountry,\n c = o.showDropdown,\n s = o.formattedNumber,\n l = o.hiddenAreaCodes,\n f = this.props,\n d = f.disableDropdown,\n p = f.renderStringAsFlag,\n h = f.isValid,\n m = f.defaultErrorMessage,\n b = f.specialLabel;\n if (\"boolean\" == typeof h) t = h;else {\n var g = h(s.replace(/\\D/g, \"\"), u, i, l);\n \"boolean\" == typeof g ? !1 === (t = g) && (r = m) : (t = !1, r = g);\n }\n var v = N()((n(e = {}, this.props.containerClass, !0), n(e, \"react-tel-input\", !0), e)),\n C = N()({\n arrow: !0,\n up: c\n }),\n _ = N()(n({\n \"form-control\": !0,\n \"invalid-number\": !t,\n open: c\n }, this.props.inputClass, !0)),\n w = N()({\n \"selected-flag\": !0,\n open: c\n }),\n S = N()(n({\n \"flag-dropdown\": !0,\n \"invalid-number\": !t,\n open: c\n }, this.props.buttonClass, !0)),\n j = \"flag \".concat(u && u.iso2);\n return y.a.createElement(\"div\", {\n className: \"\".concat(v, \" \").concat(this.props.className),\n style: this.props.style || this.props.containerStyle,\n onKeyDown: this.handleKeydown\n }, b && y.a.createElement(\"div\", {\n className: \"special-label\"\n }, b), r && y.a.createElement(\"div\", {\n className: \"invalid-number-message\"\n }, r), y.a.createElement(\"input\", Object.assign({\n className: _,\n style: this.props.inputStyle,\n onChange: this.handleInput,\n onClick: this.handleInputClick,\n onDoubleClick: this.handleDoubleClick,\n onFocus: this.handleInputFocus,\n onBlur: this.handleInputBlur,\n onCopy: this.handleInputCopy,\n value: s,\n onKeyDown: this.handleInputKeyDown,\n placeholder: this.props.placeholder,\n disabled: this.props.disabled,\n type: \"tel\"\n }, this.props.inputProps, {\n ref: function ref(e) {\n a.numberInputRef = e, \"function\" == typeof a.props.inputProps.ref ? a.props.inputProps.ref(e) : \"object\" == typeof a.props.inputProps.ref && (a.props.inputProps.ref.current = e);\n }\n })), y.a.createElement(\"div\", {\n className: S,\n style: this.props.buttonStyle,\n ref: function ref(e) {\n return a.dropdownContainerRef = e;\n }\n }, p ? y.a.createElement(\"div\", {\n className: w\n }, p) : y.a.createElement(\"div\", {\n onClick: d ? void 0 : this.handleFlagDropdownClick,\n className: w,\n title: u ? \"\".concat(u.localName || u.name, \": + \").concat(u.dialCode) : \"\",\n tabIndex: d ? \"-1\" : \"0\",\n role: \"button\",\n \"aria-haspopup\": \"listbox\",\n \"aria-expanded\": !!c || void 0\n }, y.a.createElement(\"div\", {\n className: j\n }, !d && y.a.createElement(\"div\", {\n className: C\n }))), c && this.getCountryDropdownList()));\n }\n }]) && s(r.prototype, l), m && s(r, m), t;\n }(y.a.Component);\n F.defaultProps = {\n country: \"\",\n value: \"\",\n onlyCountries: [],\n preferredCountries: [],\n excludeCountries: [],\n placeholder: \"1 (702) 123-4567\",\n searchPlaceholder: \"search\",\n searchNotFound: \"No entries to show\",\n flagsImagePath: \"./flags.png\",\n disabled: !1,\n containerStyle: {},\n inputStyle: {},\n buttonStyle: {},\n dropdownStyle: {},\n searchStyle: {},\n containerClass: \"\",\n inputClass: \"\",\n buttonClass: \"\",\n dropdownClass: \"\",\n searchClass: \"\",\n className: \"\",\n autoFormat: !0,\n enableAreaCodes: !1,\n enableTerritories: !1,\n disableCountryCode: !1,\n disableDropdown: !1,\n enableLongNumbers: !1,\n countryCodeEditable: !0,\n enableSearch: !1,\n disableSearchIcon: !1,\n disableInitialCountryGuess: !1,\n disableCountryGuess: !1,\n regions: \"\",\n inputProps: {},\n localization: {},\n masks: null,\n priority: null,\n areaCodes: null,\n preserveOrder: [],\n defaultMask: \"... ... ... ... ..\",\n alwaysDefaultMask: !1,\n prefix: \"+\",\n copyNumbersOnly: !0,\n renderStringAsFlag: \"\",\n autocompleteSearch: !1,\n jumpCursorToEnd: !0,\n enableAreaCodeStretch: !1,\n enableClickOutside: !0,\n showDropdown: !1,\n isValid: !0,\n defaultErrorMessage: \"\",\n specialLabel: \"Phone\",\n onEnterKeyPress: null,\n keys: {\n UP: 38,\n DOWN: 40,\n RIGHT: 39,\n LEFT: 37,\n ENTER: 13,\n ESC: 27,\n PLUS: 43,\n A: 65,\n Z: 90,\n SPACE: 32,\n TAB: 9\n }\n };\n t.default = F;\n}]);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport classNames from 'classnames';\nimport { Arrow, Popper as ReactPopper } from 'react-popper';\nimport { getTarget, targetPropType, mapToCssModules, DOMElement, tagPropType } from './utils';\nvar propTypes = {\n children: PropTypes.node.isRequired,\n className: PropTypes.string,\n placement: PropTypes.string,\n placementPrefix: PropTypes.string,\n arrowClassName: PropTypes.string,\n hideArrow: PropTypes.bool,\n tag: tagPropType,\n isOpen: PropTypes.bool.isRequired,\n cssModule: PropTypes.object,\n offset: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n fallbackPlacement: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),\n flip: PropTypes.bool,\n container: targetPropType,\n target: targetPropType.isRequired,\n modifiers: PropTypes.object,\n boundariesElement: PropTypes.oneOfType([PropTypes.string, DOMElement])\n};\nvar defaultProps = {\n boundariesElement: 'scrollParent',\n placement: 'auto',\n hideArrow: false,\n isOpen: false,\n offset: 0,\n fallbackPlacement: 'flip',\n flip: true,\n container: 'body',\n modifiers: {}\n};\nvar childContextTypes = {\n popperManager: PropTypes.object.isRequired\n};\nvar PopperContent = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(PopperContent, _React$Component);\n function PopperContent(props) {\n var _this;\n _this = _React$Component.call(this, props) || this;\n _this.handlePlacementChange = _this.handlePlacementChange.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.setTargetNode = _this.setTargetNode.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.getTargetNode = _this.getTargetNode.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.getRef = _this.getRef.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.state = {};\n return _this;\n }\n var _proto = PopperContent.prototype;\n _proto.getChildContext = function getChildContext() {\n return {\n popperManager: {\n setTargetNode: this.setTargetNode,\n getTargetNode: this.getTargetNode\n }\n };\n };\n _proto.componentDidUpdate = function componentDidUpdate() {\n if (this._element && this._element.childNodes && this._element.childNodes[0] && this._element.childNodes[0].focus) {\n this._element.childNodes[0].focus();\n }\n };\n _proto.setTargetNode = function setTargetNode(node) {\n this.targetNode = node;\n };\n _proto.getTargetNode = function getTargetNode() {\n return this.targetNode;\n };\n _proto.getContainerNode = function getContainerNode() {\n return getTarget(this.props.container);\n };\n _proto.getRef = function getRef(ref) {\n this._element = ref;\n };\n _proto.handlePlacementChange = function handlePlacementChange(data) {\n if (this.state.placement !== data.placement) {\n this.setState({\n placement: data.placement\n });\n }\n return data;\n };\n _proto.renderChildren = function renderChildren() {\n var _this$props = this.props,\n cssModule = _this$props.cssModule,\n children = _this$props.children,\n isOpen = _this$props.isOpen,\n flip = _this$props.flip,\n target = _this$props.target,\n offset = _this$props.offset,\n fallbackPlacement = _this$props.fallbackPlacement,\n placementPrefix = _this$props.placementPrefix,\n _arrowClassName = _this$props.arrowClassName,\n hideArrow = _this$props.hideArrow,\n className = _this$props.className,\n tag = _this$props.tag,\n container = _this$props.container,\n modifiers = _this$props.modifiers,\n boundariesElement = _this$props.boundariesElement,\n attrs = _objectWithoutPropertiesLoose(_this$props, [\"cssModule\", \"children\", \"isOpen\", \"flip\", \"target\", \"offset\", \"fallbackPlacement\", \"placementPrefix\", \"arrowClassName\", \"hideArrow\", \"className\", \"tag\", \"container\", \"modifiers\", \"boundariesElement\"]);\n var arrowClassName = mapToCssModules(classNames('arrow', _arrowClassName), cssModule);\n var placement = (this.state.placement || attrs.placement).split('-')[0];\n var popperClassName = mapToCssModules(classNames(className, placementPrefix ? placementPrefix + \"-\" + placement : placement), this.props.cssModule);\n var extendedModifiers = _objectSpread({\n offset: {\n offset: offset\n },\n flip: {\n enabled: flip,\n behavior: fallbackPlacement\n },\n preventOverflow: {\n boundariesElement: boundariesElement\n },\n update: {\n enabled: true,\n order: 950,\n fn: this.handlePlacementChange\n }\n }, modifiers);\n return React.createElement(ReactPopper, _extends({\n modifiers: extendedModifiers\n }, attrs, {\n component: tag,\n className: popperClassName,\n \"x-placement\": this.state.placement || attrs.placement\n }), children, !hideArrow && React.createElement(Arrow, {\n className: arrowClassName\n }));\n };\n _proto.render = function render() {\n this.setTargetNode(getTarget(this.props.target));\n if (this.props.isOpen) {\n return this.props.container === 'inline' ? this.renderChildren() : ReactDOM.createPortal(React.createElement(\"div\", {\n ref: this.getRef\n }, this.renderChildren()), this.getContainerNode());\n }\n return null;\n };\n return PopperContent;\n}(React.Component);\nPopperContent.propTypes = propTypes;\nPopperContent.defaultProps = defaultProps;\nPopperContent.childContextTypes = childContextTypes;\nexport default PopperContent;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport PopperContent from './PopperContent';\nimport { getTarget, targetPropType, omit, PopperPlacements, mapToCssModules, DOMElement } from './utils';\nexport var propTypes = {\n placement: PropTypes.oneOf(PopperPlacements),\n target: targetPropType.isRequired,\n container: targetPropType,\n isOpen: PropTypes.bool,\n disabled: PropTypes.bool,\n hideArrow: PropTypes.bool,\n boundariesElement: PropTypes.oneOfType([PropTypes.string, DOMElement]),\n className: PropTypes.string,\n innerClassName: PropTypes.string,\n arrowClassName: PropTypes.string,\n cssModule: PropTypes.object,\n toggle: PropTypes.func,\n autohide: PropTypes.bool,\n placementPrefix: PropTypes.string,\n delay: PropTypes.oneOfType([PropTypes.shape({\n show: PropTypes.number,\n hide: PropTypes.number\n }), PropTypes.number]),\n modifiers: PropTypes.object,\n offset: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.string, PropTypes.object]),\n trigger: PropTypes.string\n};\nvar DEFAULT_DELAYS = {\n show: 0,\n hide: 250\n};\nvar defaultProps = {\n isOpen: false,\n hideArrow: false,\n autohide: false,\n delay: DEFAULT_DELAYS,\n toggle: function toggle() {},\n trigger: 'click'\n};\nfunction isInDOMSubtree(element, subtreeRoot) {\n return subtreeRoot && (element === subtreeRoot || subtreeRoot.contains(element));\n}\nvar TooltipPopoverWrapper = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(TooltipPopoverWrapper, _React$Component);\n function TooltipPopoverWrapper(props) {\n var _this;\n _this = _React$Component.call(this, props) || this;\n _this._target = null;\n _this.addTargetEvents = _this.addTargetEvents.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.handleDocumentClick = _this.handleDocumentClick.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.removeTargetEvents = _this.removeTargetEvents.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.toggle = _this.toggle.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.showWithDelay = _this.showWithDelay.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.hideWithDelay = _this.hideWithDelay.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.onMouseOverTooltipContent = _this.onMouseOverTooltipContent.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.onMouseLeaveTooltipContent = _this.onMouseLeaveTooltipContent.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.show = _this.show.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.hide = _this.hide.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.onEscKeyDown = _this.onEscKeyDown.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.getRef = _this.getRef.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n return _this;\n }\n var _proto = TooltipPopoverWrapper.prototype;\n _proto.componentDidMount = function componentDidMount() {\n this.updateTarget();\n };\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.removeTargetEvents();\n };\n _proto.onMouseOverTooltipContent = function onMouseOverTooltipContent() {\n if (this.props.trigger.indexOf('hover') > -1 && !this.props.autohide) {\n if (this._hideTimeout) {\n this.clearHideTimeout();\n }\n }\n };\n _proto.onMouseLeaveTooltipContent = function onMouseLeaveTooltipContent(e) {\n if (this.props.trigger.indexOf('hover') > -1 && !this.props.autohide) {\n if (this._showTimeout) {\n this.clearShowTimeout();\n }\n e.persist();\n this._hideTimeout = setTimeout(this.hide.bind(this, e), this.getDelay('hide'));\n }\n };\n _proto.onEscKeyDown = function onEscKeyDown(e) {\n if (e.key === 'Escape') {\n this.hide(e);\n }\n };\n _proto.getRef = function getRef(ref) {\n var innerRef = this.props.innerRef;\n if (innerRef) {\n if (typeof innerRef === 'function') {\n innerRef(ref);\n } else if (typeof innerRef === 'object') {\n innerRef.current = ref;\n }\n }\n this._popover = ref;\n };\n _proto.getDelay = function getDelay(key) {\n var delay = this.props.delay;\n if (typeof delay === 'object') {\n return isNaN(delay[key]) ? DEFAULT_DELAYS[key] : delay[key];\n }\n return delay;\n };\n _proto.show = function show(e) {\n if (!this.props.isOpen) {\n this.clearShowTimeout();\n this.toggle(e);\n }\n };\n _proto.showWithDelay = function showWithDelay(e) {\n if (this._hideTimeout) {\n this.clearHideTimeout();\n }\n this._showTimeout = setTimeout(this.show.bind(this, e), this.getDelay('show'));\n };\n _proto.hide = function hide(e) {\n if (this.props.isOpen) {\n this.clearHideTimeout();\n this.toggle(e);\n }\n };\n _proto.hideWithDelay = function hideWithDelay(e) {\n if (this._showTimeout) {\n this.clearShowTimeout();\n }\n this._hideTimeout = setTimeout(this.hide.bind(this, e), this.getDelay('hide'));\n };\n _proto.clearShowTimeout = function clearShowTimeout() {\n clearTimeout(this._showTimeout);\n this._showTimeout = undefined;\n };\n _proto.clearHideTimeout = function clearHideTimeout() {\n clearTimeout(this._hideTimeout);\n this._hideTimeout = undefined;\n };\n _proto.handleDocumentClick = function handleDocumentClick(e) {\n var triggers = this.props.trigger.split(' ');\n if (triggers.indexOf('legacy') > -1 && (this.props.isOpen || isInDOMSubtree(e.target, this._target))) {\n if (this._hideTimeout) {\n this.clearHideTimeout();\n }\n if (this.props.isOpen && !isInDOMSubtree(e.target, this._popover)) {\n this.hideWithDelay(e);\n } else {\n this.showWithDelay(e);\n }\n } else if (triggers.indexOf('click') > -1 && isInDOMSubtree(e.target, this._target)) {\n if (this._hideTimeout) {\n this.clearHideTimeout();\n }\n if (!this.props.isOpen) {\n this.showWithDelay(e);\n } else {\n this.hideWithDelay(e);\n }\n }\n };\n _proto.addTargetEvents = function addTargetEvents() {\n var _this2 = this;\n if (this.props.trigger) {\n var triggers = this.props.trigger.split(' ');\n if (triggers.indexOf('manual') === -1) {\n if (triggers.indexOf('click') > -1 || triggers.indexOf('legacy') > -1) {\n ['click', 'touchstart'].forEach(function (event) {\n return document.addEventListener(event, _this2.handleDocumentClick, true);\n });\n }\n if (this._target) {\n if (triggers.indexOf('hover') > -1) {\n this._target.addEventListener('mouseover', this.showWithDelay, true);\n this._target.addEventListener('mouseout', this.hideWithDelay, true);\n }\n if (triggers.indexOf('focus') > -1) {\n this._target.addEventListener('focusin', this.show, true);\n this._target.addEventListener('focusout', this.hide, true);\n }\n this._target.addEventListener('keydown', this.onEscKeyDown, true);\n }\n }\n }\n };\n _proto.removeTargetEvents = function removeTargetEvents() {\n var _this3 = this;\n if (this._target) {\n this._target.removeEventListener('mouseover', this.showWithDelay, true);\n this._target.removeEventListener('mouseout', this.hideWithDelay, true);\n this._target.removeEventListener('keydown', this.onEscKeyDown, true);\n this._target.removeEventListener('focusin', this.show, true);\n this._target.removeEventListener('focusout', this.hide, true);\n }\n ['click', 'touchstart'].forEach(function (event) {\n return document.removeEventListener(event, _this3.handleDocumentClick, true);\n });\n };\n _proto.updateTarget = function updateTarget() {\n var newTarget = getTarget(this.props.target);\n if (newTarget !== this._target) {\n this.removeTargetEvents();\n this._target = newTarget;\n this.addTargetEvents();\n }\n };\n _proto.toggle = function toggle(e) {\n if (this.props.disabled) {\n return e && e.preventDefault();\n }\n return this.props.toggle(e);\n };\n _proto.render = function render() {\n if (!this.props.isOpen) {\n return null;\n }\n this.updateTarget();\n var _this$props = this.props,\n className = _this$props.className,\n cssModule = _this$props.cssModule,\n innerClassName = _this$props.innerClassName,\n target = _this$props.target,\n isOpen = _this$props.isOpen,\n hideArrow = _this$props.hideArrow,\n boundariesElement = _this$props.boundariesElement,\n placement = _this$props.placement,\n placementPrefix = _this$props.placementPrefix,\n arrowClassName = _this$props.arrowClassName,\n container = _this$props.container,\n modifiers = _this$props.modifiers,\n offset = _this$props.offset;\n var attributes = omit(this.props, Object.keys(propTypes));\n var popperClasses = mapToCssModules(className, cssModule);\n var classes = mapToCssModules(innerClassName, cssModule);\n return React.createElement(PopperContent, {\n className: popperClasses,\n target: target,\n isOpen: isOpen,\n hideArrow: hideArrow,\n boundariesElement: boundariesElement,\n placement: placement,\n placementPrefix: placementPrefix,\n arrowClassName: arrowClassName,\n container: container,\n modifiers: modifiers,\n offset: offset,\n cssModule: cssModule\n }, React.createElement(\"div\", _extends({}, attributes, {\n ref: this.getRef,\n className: classes,\n role: \"tooltip\",\n \"aria-hidden\": isOpen,\n onMouseOver: this.onMouseOverTooltipContent,\n onMouseLeave: this.onMouseLeaveTooltipContent,\n onKeyDown: this.onEscKeyDown\n })));\n };\n return TooltipPopoverWrapper;\n}(React.Component);\nTooltipPopoverWrapper.propTypes = propTypes;\nTooltipPopoverWrapper.defaultProps = defaultProps;\nexport default TooltipPopoverWrapper;","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar origDefineProperty = Object.defineProperty;\nvar isFunction = function isFunction(fn) {\n return typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\nvar hasPropertyDescriptors = require('has-property-descriptors')();\nvar supportsDescriptors = origDefineProperty && hasPropertyDescriptors;\nvar defineProperty = function defineProperty(object, name, value, predicate) {\n if (name in object && (!isFunction(predicate) || !predicate())) {\n return;\n }\n if (supportsDescriptors) {\n origDefineProperty(object, name, {\n configurable: true,\n enumerable: false,\n value: value,\n writable: true\n });\n } else {\n object[name] = value; // eslint-disable-line no-param-reassign\n }\n};\n\nvar defineProperties = function defineProperties(object, map) {\n var predicates = arguments.length > 2 ? arguments[2] : {};\n var props = keys(map);\n if (hasSymbols) {\n props = concat.call(props, Object.getOwnPropertySymbols(map));\n }\n for (var i = 0; i < props.length; i += 1) {\n defineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n }\n};\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\nmodule.exports = defineProperties;","'use strict';\n\nvar inherits = require('inherits');\nvar MD5 = require('md5.js');\nvar RIPEMD160 = require('ripemd160');\nvar sha = require('sha.js');\nvar Base = require('cipher-base');\nfunction Hash(hash) {\n Base.call(this, 'digest');\n this._hash = hash;\n}\ninherits(Hash, Base);\nHash.prototype._update = function (data) {\n this._hash.update(data);\n};\nHash.prototype._final = function () {\n return this._hash.digest();\n};\nmodule.exports = function createHash(alg) {\n alg = alg.toLowerCase();\n if (alg === 'md5') return new MD5();\n if (alg === 'rmd160' || alg === 'ripemd160') return new RIPEMD160();\n return new Hash(sha(alg));\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\n\nfunction isArray(arg) {\n if (Array.isArray) {\n return Array.isArray(arg);\n }\n return objectToString(arg) === '[object Array]';\n}\nexports.isArray = isArray;\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\nfunction isRegExp(re) {\n return objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\nfunction isDate(d) {\n return objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\nfunction isError(e) {\n return objectToString(e) === '[object Error]' || e instanceof Error;\n}\nexports.isError = isError;\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\nfunction isPrimitive(arg) {\n return arg === null || typeof arg === 'boolean' || typeof arg === 'number' || typeof arg === 'string' || typeof arg === 'symbol' ||\n // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\nexports.isBuffer = require('buffer').Buffer.isBuffer;\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}","module.exports = function xor(a, b) {\n var length = Math.min(a.length, b.length);\n var buffer = new Buffer(length);\n for (var i = 0; i < length; ++i) {\n buffer[i] = a[i] ^ b[i];\n }\n return buffer;\n};","'use strict';\n\nvar utils = require('./utils');\nvar assert = require('minimalistic-assert');\nfunction BlockHash() {\n this.pending = null;\n this.pendingTotal = 0;\n this.blockSize = this.constructor.blockSize;\n this.outSize = this.constructor.outSize;\n this.hmacStrength = this.constructor.hmacStrength;\n this.padLength = this.constructor.padLength / 8;\n this.endian = 'big';\n this._delta8 = this.blockSize / 8;\n this._delta32 = this.blockSize / 32;\n}\nexports.BlockHash = BlockHash;\nBlockHash.prototype.update = function update(msg, enc) {\n // Convert message to array, pad it, and join into 32bit blocks\n msg = utils.toArray(msg, enc);\n if (!this.pending) this.pending = msg;else this.pending = this.pending.concat(msg);\n this.pendingTotal += msg.length;\n\n // Enough data, try updating\n if (this.pending.length >= this._delta8) {\n msg = this.pending;\n\n // Process pending data in blocks\n var r = msg.length % this._delta8;\n this.pending = msg.slice(msg.length - r, msg.length);\n if (this.pending.length === 0) this.pending = null;\n msg = utils.join32(msg, 0, msg.length - r, this.endian);\n for (var i = 0; i < msg.length; i += this._delta32) this._update(msg, i, i + this._delta32);\n }\n return this;\n};\nBlockHash.prototype.digest = function digest(enc) {\n this.update(this._pad());\n assert(this.pending === null);\n return this._digest(enc);\n};\nBlockHash.prototype._pad = function pad() {\n var len = this.pendingTotal;\n var bytes = this._delta8;\n var k = bytes - (len + this.padLength) % bytes;\n var res = new Array(k + this.padLength);\n res[0] = 0x80;\n for (var i = 1; i < k; i++) res[i] = 0;\n\n // Append length\n len <<= 3;\n if (this.endian === 'big') {\n for (var t = 8; t < this.padLength; t++) res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = len >>> 24 & 0xff;\n res[i++] = len >>> 16 & 0xff;\n res[i++] = len >>> 8 & 0xff;\n res[i++] = len & 0xff;\n } else {\n res[i++] = len & 0xff;\n res[i++] = len >>> 8 & 0xff;\n res[i++] = len >>> 16 & 0xff;\n res[i++] = len >>> 24 & 0xff;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n for (t = 8; t < this.padLength; t++) res[i++] = 0;\n }\n return res;\n};","'use strict';\n\nvar inherits = require('inherits');\nvar Reporter = require('../base/reporter').Reporter;\nvar Buffer = require('safer-buffer').Buffer;\nfunction DecoderBuffer(base, options) {\n Reporter.call(this, options);\n if (!Buffer.isBuffer(base)) {\n this.error('Input not Buffer');\n return;\n }\n this.base = base;\n this.offset = 0;\n this.length = base.length;\n}\ninherits(DecoderBuffer, Reporter);\nexports.DecoderBuffer = DecoderBuffer;\nDecoderBuffer.isDecoderBuffer = function isDecoderBuffer(data) {\n if (data instanceof DecoderBuffer) {\n return true;\n }\n\n // Or accept compatible API\n var isCompatible = typeof data === 'object' && Buffer.isBuffer(data.base) && data.constructor.name === 'DecoderBuffer' && typeof data.offset === 'number' && typeof data.length === 'number' && typeof data.save === 'function' && typeof data.restore === 'function' && typeof data.isEmpty === 'function' && typeof data.readUInt8 === 'function' && typeof data.skip === 'function' && typeof data.raw === 'function';\n return isCompatible;\n};\nDecoderBuffer.prototype.save = function save() {\n return {\n offset: this.offset,\n reporter: Reporter.prototype.save.call(this)\n };\n};\nDecoderBuffer.prototype.restore = function restore(save) {\n // Return skipped data\n var res = new DecoderBuffer(this.base);\n res.offset = save.offset;\n res.length = this.offset;\n this.offset = save.offset;\n Reporter.prototype.restore.call(this, save.reporter);\n return res;\n};\nDecoderBuffer.prototype.isEmpty = function isEmpty() {\n return this.offset === this.length;\n};\nDecoderBuffer.prototype.readUInt8 = function readUInt8(fail) {\n if (this.offset + 1 <= this.length) return this.base.readUInt8(this.offset++, true);else return this.error(fail || 'DecoderBuffer overrun');\n};\nDecoderBuffer.prototype.skip = function skip(bytes, fail) {\n if (!(this.offset + bytes <= this.length)) return this.error(fail || 'DecoderBuffer overrun');\n var res = new DecoderBuffer(this.base);\n\n // Share reporter state\n res._reporterState = this._reporterState;\n res.offset = this.offset;\n res.length = this.offset + bytes;\n this.offset += bytes;\n return res;\n};\nDecoderBuffer.prototype.raw = function raw(save) {\n return this.base.slice(save ? save.offset : this.offset, this.length);\n};\nfunction EncoderBuffer(value, reporter) {\n if (Array.isArray(value)) {\n this.length = 0;\n this.value = value.map(function (item) {\n if (!EncoderBuffer.isEncoderBuffer(item)) item = new EncoderBuffer(item, reporter);\n this.length += item.length;\n return item;\n }, this);\n } else if (typeof value === 'number') {\n if (!(0 <= value && value <= 0xff)) return reporter.error('non-byte EncoderBuffer value');\n this.value = value;\n this.length = 1;\n } else if (typeof value === 'string') {\n this.value = value;\n this.length = Buffer.byteLength(value);\n } else if (Buffer.isBuffer(value)) {\n this.value = value;\n this.length = value.length;\n } else {\n return reporter.error('Unsupported type: ' + typeof value);\n }\n}\nexports.EncoderBuffer = EncoderBuffer;\nEncoderBuffer.isEncoderBuffer = function isEncoderBuffer(data) {\n if (data instanceof EncoderBuffer) {\n return true;\n }\n\n // Or accept compatible API\n var isCompatible = typeof data === 'object' && data.constructor.name === 'EncoderBuffer' && typeof data.length === 'number' && typeof data.join === 'function';\n return isCompatible;\n};\nEncoderBuffer.prototype.join = function join(out, offset) {\n if (!out) out = Buffer.alloc(this.length);\n if (!offset) offset = 0;\n if (this.length === 0) return out;\n if (Array.isArray(this.value)) {\n this.value.forEach(function (item) {\n item.join(out, offset);\n offset += item.length;\n });\n } else {\n if (typeof this.value === 'number') out[offset] = this.value;else if (typeof this.value === 'string') out.write(this.value, offset);else if (Buffer.isBuffer(this.value)) this.value.copy(out, offset);\n offset += this.length;\n }\n return out;\n};","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} - the new date with the days added\n * @throws {TypeError} - 2 arguments required\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\n\nexport default function addDays(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n if (!amount) {\n // If 0 days, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n date.setDate(date.getDate() + amount);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n */\n\nexport default function addMonths(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n var dayOfMonth = date.getDate(); // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n\n var endOfDesiredMonth = new Date(date.getTime());\n endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);\n var daysInMonth = endOfDesiredMonth.getDate();\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);\n return date;\n }\n}","var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {\n switch (pattern) {\n case 'P':\n return formatLong.date({\n width: 'short'\n });\n case 'PP':\n return formatLong.date({\n width: 'medium'\n });\n case 'PPP':\n return formatLong.date({\n width: 'long'\n });\n case 'PPPP':\n default:\n return formatLong.date({\n width: 'full'\n });\n }\n};\nvar timeLongFormatter = function timeLongFormatter(pattern, formatLong) {\n switch (pattern) {\n case 'p':\n return formatLong.time({\n width: 'short'\n });\n case 'pp':\n return formatLong.time({\n width: 'medium'\n });\n case 'ppp':\n return formatLong.time({\n width: 'long'\n });\n case 'pppp':\n default:\n return formatLong.time({\n width: 'full'\n });\n }\n};\nvar dateTimeLongFormatter = function dateTimeLongFormatter(pattern, formatLong) {\n var matchResult = pattern.match(/(P+)(p+)?/) || [];\n var datePattern = matchResult[1];\n var timePattern = matchResult[2];\n if (!timePattern) {\n return dateLongFormatter(pattern, formatLong);\n }\n var dateTimeFormat;\n switch (datePattern) {\n case 'P':\n dateTimeFormat = formatLong.dateTime({\n width: 'short'\n });\n break;\n case 'PP':\n dateTimeFormat = formatLong.dateTime({\n width: 'medium'\n });\n break;\n case 'PPP':\n dateTimeFormat = formatLong.dateTime({\n width: 'long'\n });\n break;\n case 'PPPP':\n default:\n dateTimeFormat = formatLong.dateTime({\n width: 'full'\n });\n break;\n }\n return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong));\n};\nvar longFormatters = {\n p: timeLongFormatter,\n P: dateTimeLongFormatter\n};\nexport default longFormatters;","!function (t, e) {\n \"object\" == typeof exports && \"object\" == typeof module ? module.exports = e() : \"function\" == typeof define && define.amd ? define([], e) : \"object\" == typeof exports ? exports.ReactPixel = e() : t.ReactPixel = e();\n}(window, function () {\n return function (t) {\n var e = {};\n function n(o) {\n if (e[o]) return e[o].exports;\n var r = e[o] = {\n i: o,\n l: !1,\n exports: {}\n };\n return t[o].call(r.exports, r, r.exports, n), r.l = !0, r.exports;\n }\n return n.m = t, n.c = e, n.d = function (t, e, o) {\n n.o(t, e) || Object.defineProperty(t, e, {\n enumerable: !0,\n get: o\n });\n }, n.r = function (t) {\n \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {\n value: \"Module\"\n }), Object.defineProperty(t, \"__esModule\", {\n value: !0\n });\n }, n.t = function (t, e) {\n if (1 & e && (t = n(t)), 8 & e) return t;\n if (4 & e && \"object\" == typeof t && t && t.__esModule) return t;\n var o = Object.create(null);\n if (n.r(o), Object.defineProperty(o, \"default\", {\n enumerable: !0,\n value: t\n }), 2 & e && \"string\" != typeof t) for (var r in t) n.d(o, r, function (e) {\n return t[e];\n }.bind(null, r));\n return o;\n }, n.n = function (t) {\n var e = t && t.__esModule ? function () {\n return t.default;\n } : function () {\n return t;\n };\n return n.d(e, \"a\", e), e;\n }, n.o = function (t, e) {\n return Object.prototype.hasOwnProperty.call(t, e);\n }, n.p = \"\", n(n.s = 0);\n }([function (t, e, n) {\n t.exports = n(1);\n }, function (t, e, n) {\n \"use strict\";\n\n function o(t) {\n return function (t) {\n if (Array.isArray(t)) {\n for (var e = 0, n = new Array(t.length); e < t.length; e++) n[e] = t[e];\n return n;\n }\n }(t) || function (t) {\n if (Symbol.iterator in Object(t) || \"[object Arguments]\" === Object.prototype.toString.call(t)) return Array.from(t);\n }(t) || function () {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n }();\n }\n n.r(e);\n var r = !!window.fbq,\n i = !1,\n a = function a() {\n var t;\n if (i) {\n for (var e = arguments.length, n = new Array(e), r = 0; r < e; r++) n[r] = arguments[r];\n (t = console).info.apply(t, o([\"[react-facebook-pixel]\"].concat(n)));\n }\n },\n c = function c() {\n var t;\n if (i) {\n for (var e = arguments.length, n = new Array(e), r = 0; r < e; r++) n[r] = arguments[r];\n (t = console).info.apply(t, o([\"[react-facebook-pixel]\"].concat(n)));\n }\n },\n f = function f() {\n return r || a(\"Pixel not initialized before using call ReactPixel.init with required params\"), r;\n },\n u = {\n autoConfig: !0,\n debug: !1\n };\n e.default = {\n init: function init(t) {\n var e,\n n,\n o,\n c,\n f,\n l,\n d = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},\n s = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : u;\n e = window, n = document, o = \"script\", e.fbq || (c = e.fbq = function () {\n c.callMethod ? c.callMethod.apply(c, arguments) : c.queue.push(arguments);\n }, e._fbq || (e._fbq = c), c.push = c, c.loaded = !0, c.version = \"2.0\", c.queue = [], (f = n.createElement(o)).async = !0, f.src = \"https://connect.facebook.net/en_US/fbevents.js\", (l = n.getElementsByTagName(o)[0]).parentNode.insertBefore(f, l)), t ? (!1 === s.autoConfig && fbq(\"set\", \"autoConfig\", !1, t), fbq(\"init\", t, d), r = !0, i = s.debug) : a(\"Please insert pixel id for initializing\");\n },\n pageView: function pageView() {\n f() && (fbq(\"track\", \"PageView\"), i && c(\"called fbq('track', 'PageView');\"));\n },\n track: function track(t, e) {\n f() && (fbq(\"track\", t, e), i && (c(\"called fbq('track', '\".concat(t, \"');\")), e && c(\"with data\", e)));\n },\n trackSingle: function trackSingle(t, e, n) {\n f() && (fbq(\"trackSingle\", t, e, n), i && (c(\"called fbq('trackSingle', '\".concat(t, \"', '\").concat(e, \"');\")), n && c(\"with data\", n)));\n },\n trackCustom: function trackCustom(t, e) {\n f() && (fbq(\"trackCustom\", t, e), i && (c(\"called fbq('trackCustom', '\".concat(t, \"');\")), e && c(\"with data\", e)));\n },\n trackSingleCustom: function trackSingleCustom(t, e, n) {\n f() && (fbq(\"trackSingle\", t, e, n), i && (c(\"called fbq('trackSingleCustom', '\".concat(t, \"', '\").concat(e, \"');\")), n && c(\"with data\", n)));\n },\n grantConsent: function grantConsent() {\n f() && (fbq(\"consent\", \"grant\"), i && c(\"called fbq('consent', 'grant');\"));\n },\n revokeConsent: function revokeConsent() {\n f() && (fbq(\"consent\", \"revoke\"), i && c(\"called fbq('consent', 'revoke');\"));\n },\n fbq: function (t) {\n function e() {\n return t.apply(this, arguments);\n }\n return e.toString = function () {\n return t.toString();\n }, e;\n }(function () {\n if (f()) {\n for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n];\n fbq.apply(void 0, e), i && (c(\"called fbq('\".concat(e.slice(0, 2).join(\"', '\"), \"')\")), e[2] && c(\"with data\", e[2]));\n }\n })\n };\n }]);\n});","!function (e, t) {\n \"object\" == typeof exports && \"object\" == typeof module ? module.exports = t() : \"function\" == typeof define && define.amd ? define([], t) : \"object\" == typeof exports ? exports.LinkedInTag = t() : e.LinkedInTag = t();\n}(\"undefined\" != typeof self ? self : this, function () {\n return function () {\n \"use strict\";\n\n var e = {\n 579: function _(e, t, n) {\n n.r(t), n.d(t, {\n LinkedInTag: function LinkedInTag() {\n return s;\n },\n default: function _default() {\n return c;\n }\n });\n var i = n(818);\n function r(e) {\n return function (e) {\n if (Array.isArray(e)) return o(e);\n }(e) || function (e) {\n if (\"undefined\" != typeof Symbol && Symbol.iterator in Object(e)) return Array.from(e);\n }(e) || function (e, t) {\n if (e) {\n if (\"string\" == typeof e) return o(e, t);\n var n = Object.prototype.toString.call(e).slice(8, -1);\n return \"Object\" === n && e.constructor && (n = e.constructor.name), \"Map\" === n || \"Set\" === n ? Array.from(e) : \"Arguments\" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? o(e, t) : void 0;\n }\n }(e) || function () {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }();\n }\n function o(e, t) {\n (null == t || t > e.length) && (t = e.length);\n for (var n = 0, i = new Array(t); n < t; n++) i[n] = e[n];\n return i;\n }\n function a(e, t) {\n for (var n = 0; n < t.length; n++) {\n var i = t[n];\n i.enumerable = i.enumerable || !1, i.configurable = !0, \"value\" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);\n }\n }\n var s = function () {\n function e() {\n !function (e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, e), this.initialized = !1, this.disabled = !i.jU, this.partnerId = \"\", this.subDomain = \"dc\";\n }\n var t, n;\n return t = e, (n = [{\n key: \"warn\",\n value: function value() {\n for (var e, t = arguments.length, n = new Array(t), i = 0; i < t; i++) n[i] = arguments[i];\n (e = console).info.apply(e, r([\"[linkedin-insight-tag]\"].concat(n)));\n }\n }, {\n key: \"verifyInit\",\n value: function value() {\n return this.initialized || this.warn(\"LinkedIn Insight Tag not initialized. Before using, call LinkedInTag.init with required params\"), this.initialized;\n }\n }, {\n key: \"init\",\n value: function value(e, t, n) {\n if (this.partnerId = e, this.subDomain = t || this.subDomain, null != n && (this.disabled = n), !this.disabled) {\n this.partnerId || this.warn(\"Partner id is required.\"), window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || [], window._linkedin_data_partner_ids.push(e);\n var i = document.getElementsByTagName(\"script\")[0],\n r = document.createElement(\"script\");\n r.type = \"text/javascript\", r.async = !0, r.src = \"https://snap.licdn.com/li.lms-analytics/insight.min.js\", i.parentNode.insertBefore(r, i), this.initialized = !0;\n }\n }\n }, {\n key: \"track\",\n value: function value(e, t, n) {\n if (!this.disabled) {\n if (!this.verifyInit()) return this.warn(\"You must call `init` before calling `track`.\");\n t = t || this.partnerId || window._linkedin_data_partner_ids[0], n = n || this.subDomain;\n var i = \"https://\".concat(n, \".ads.linkedin.com/collect/?pid=\").concat(t, \"&fmt=gif\");\n e && (i = \"\".concat(i, \"&conversionId=\").concat(e));\n var r = document.createElement(\"img\");\n return r.alt = \"\", r.height = 1, r.width = 1, r.src = i, r;\n }\n }\n }]) && a(t.prototype, n), e;\n }();\n var c = new s();\n },\n 818: function _(e, t) {\n var n = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (e) {\n return typeof e;\n } : function (e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n },\n i = \"undefined\" != typeof window && void 0 !== window.document;\n \"object\" === (\"undefined\" == typeof self ? \"undefined\" : n(self)) && self.constructor && self.constructor.name, \"undefined\" != typeof process && null != process.versions && process.versions.node;\n t.jU = i;\n }\n },\n t = {};\n function n(i) {\n if (t[i]) return t[i].exports;\n var r = t[i] = {\n exports: {}\n };\n return e[i](r, r.exports, n), r.exports;\n }\n return n.d = function (e, t) {\n for (var i in t) n.o(t, i) && !n.o(e, i) && Object.defineProperty(e, i, {\n enumerable: !0,\n get: t[i]\n });\n }, n.o = function (e, t) {\n return Object.prototype.hasOwnProperty.call(e, t);\n }, n.r = function (e) {\n \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {\n value: \"Module\"\n }), Object.defineProperty(e, \"__esModule\", {\n value: !0\n });\n }, n(579);\n }();\n});",";\n(function (root, factory) {\n if (typeof exports === \"object\") {\n // CommonJS\n module.exports = exports = factory(require(\"./core\"));\n } else if (typeof define === \"function\" && define.amd) {\n // AMD\n define([\"./core\"], factory);\n } else {\n // Global (browser)\n factory(root.CryptoJS);\n }\n})(this, function (CryptoJS) {\n (function (undefined) {\n // Shortcuts\n var C = CryptoJS;\n var C_lib = C.lib;\n var Base = C_lib.Base;\n var X32WordArray = C_lib.WordArray;\n\n /**\n * x64 namespace.\n */\n var C_x64 = C.x64 = {};\n\n /**\n * A 64-bit word.\n */\n var X64Word = C_x64.Word = Base.extend({\n /**\n * Initializes a newly created 64-bit word.\n *\n * @param {number} high The high 32 bits.\n * @param {number} low The low 32 bits.\n *\n * @example\n *\n * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607);\n */\n init: function init(high, low) {\n this.high = high;\n this.low = low;\n }\n\n /**\n * Bitwise NOTs this word.\n *\n * @return {X64Word} A new x64-Word object after negating.\n *\n * @example\n *\n * var negated = x64Word.not();\n */\n // not: function () {\n // var high = ~this.high;\n // var low = ~this.low;\n\n // return X64Word.create(high, low);\n // },\n\n /**\n * Bitwise ANDs this word with the passed word.\n *\n * @param {X64Word} word The x64-Word to AND with this word.\n *\n * @return {X64Word} A new x64-Word object after ANDing.\n *\n * @example\n *\n * var anded = x64Word.and(anotherX64Word);\n */\n // and: function (word) {\n // var high = this.high & word.high;\n // var low = this.low & word.low;\n\n // return X64Word.create(high, low);\n // },\n\n /**\n * Bitwise ORs this word with the passed word.\n *\n * @param {X64Word} word The x64-Word to OR with this word.\n *\n * @return {X64Word} A new x64-Word object after ORing.\n *\n * @example\n *\n * var ored = x64Word.or(anotherX64Word);\n */\n // or: function (word) {\n // var high = this.high | word.high;\n // var low = this.low | word.low;\n\n // return X64Word.create(high, low);\n // },\n\n /**\n * Bitwise XORs this word with the passed word.\n *\n * @param {X64Word} word The x64-Word to XOR with this word.\n *\n * @return {X64Word} A new x64-Word object after XORing.\n *\n * @example\n *\n * var xored = x64Word.xor(anotherX64Word);\n */\n // xor: function (word) {\n // var high = this.high ^ word.high;\n // var low = this.low ^ word.low;\n\n // return X64Word.create(high, low);\n // },\n\n /**\n * Shifts this word n bits to the left.\n *\n * @param {number} n The number of bits to shift.\n *\n * @return {X64Word} A new x64-Word object after shifting.\n *\n * @example\n *\n * var shifted = x64Word.shiftL(25);\n */\n // shiftL: function (n) {\n // if (n < 32) {\n // var high = (this.high << n) | (this.low >>> (32 - n));\n // var low = this.low << n;\n // } else {\n // var high = this.low << (n - 32);\n // var low = 0;\n // }\n\n // return X64Word.create(high, low);\n // },\n\n /**\n * Shifts this word n bits to the right.\n *\n * @param {number} n The number of bits to shift.\n *\n * @return {X64Word} A new x64-Word object after shifting.\n *\n * @example\n *\n * var shifted = x64Word.shiftR(7);\n */\n // shiftR: function (n) {\n // if (n < 32) {\n // var low = (this.low >>> n) | (this.high << (32 - n));\n // var high = this.high >>> n;\n // } else {\n // var low = this.high >>> (n - 32);\n // var high = 0;\n // }\n\n // return X64Word.create(high, low);\n // },\n\n /**\n * Rotates this word n bits to the left.\n *\n * @param {number} n The number of bits to rotate.\n *\n * @return {X64Word} A new x64-Word object after rotating.\n *\n * @example\n *\n * var rotated = x64Word.rotL(25);\n */\n // rotL: function (n) {\n // return this.shiftL(n).or(this.shiftR(64 - n));\n // },\n\n /**\n * Rotates this word n bits to the right.\n *\n * @param {number} n The number of bits to rotate.\n *\n * @return {X64Word} A new x64-Word object after rotating.\n *\n * @example\n *\n * var rotated = x64Word.rotR(7);\n */\n // rotR: function (n) {\n // return this.shiftR(n).or(this.shiftL(64 - n));\n // },\n\n /**\n * Adds this word with the passed word.\n *\n * @param {X64Word} word The x64-Word to add with this word.\n *\n * @return {X64Word} A new x64-Word object after adding.\n *\n * @example\n *\n * var added = x64Word.add(anotherX64Word);\n */\n // add: function (word) {\n // var low = (this.low + word.low) | 0;\n // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0;\n // var high = (this.high + word.high + carry) | 0;\n\n // return X64Word.create(high, low);\n // }\n });\n\n /**\n * An array of 64-bit words.\n *\n * @property {Array} words The array of CryptoJS.x64.Word objects.\n * @property {number} sigBytes The number of significant bytes in this word array.\n */\n var X64WordArray = C_x64.WordArray = Base.extend({\n /**\n * Initializes a newly created word array.\n *\n * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects.\n * @param {number} sigBytes (Optional) The number of significant bytes in the words.\n *\n * @example\n *\n * var wordArray = CryptoJS.x64.WordArray.create();\n *\n * var wordArray = CryptoJS.x64.WordArray.create([\n * CryptoJS.x64.Word.create(0x00010203, 0x04050607),\n * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)\n * ]);\n *\n * var wordArray = CryptoJS.x64.WordArray.create([\n * CryptoJS.x64.Word.create(0x00010203, 0x04050607),\n * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)\n * ], 10);\n */\n init: function init(words, sigBytes) {\n words = this.words = words || [];\n if (sigBytes != undefined) {\n this.sigBytes = sigBytes;\n } else {\n this.sigBytes = words.length * 8;\n }\n },\n /**\n * Converts this 64-bit word array to a 32-bit word array.\n *\n * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array.\n *\n * @example\n *\n * var x32WordArray = x64WordArray.toX32();\n */\n toX32: function toX32() {\n // Shortcuts\n var x64Words = this.words;\n var x64WordsLength = x64Words.length;\n\n // Convert\n var x32Words = [];\n for (var i = 0; i < x64WordsLength; i++) {\n var x64Word = x64Words[i];\n x32Words.push(x64Word.high);\n x32Words.push(x64Word.low);\n }\n return X32WordArray.create(x32Words, this.sigBytes);\n },\n /**\n * Creates a copy of this word array.\n *\n * @return {X64WordArray} The clone.\n *\n * @example\n *\n * var clone = x64WordArray.clone();\n */\n clone: function clone() {\n var clone = Base.clone.call(this);\n\n // Clone \"words\" array\n var words = clone.words = this.words.slice(0);\n\n // Clone each X64Word object\n var wordsLength = words.length;\n for (var i = 0; i < wordsLength; i++) {\n words[i] = words[i].clone();\n }\n return clone;\n }\n });\n })();\n return CryptoJS;\n});","\"use strict\";\n\nexports.__esModule = true;\nexports.canUseDOM = exports.slidesOnLeft = exports.slidesOnRight = exports.siblingDirection = exports.getTotalSlides = exports.getPostClones = exports.getPreClones = exports.getTrackLeft = exports.getTrackAnimateCSS = exports.getTrackCSS = exports.checkSpecKeys = exports.getSlideCount = exports.checkNavigable = exports.getNavigableIndexes = exports.swipeEnd = exports.swipeMove = exports.swipeStart = exports.keyHandler = exports.changeSlide = exports.slideHandler = exports.initializedState = exports.extractObject = exports.canGoNext = exports.getSwipeDirection = exports.getHeight = exports.getWidth = exports.lazySlidesOnRight = exports.lazySlidesOnLeft = exports.lazyEndIndex = exports.lazyStartIndex = exports.getRequiredLazySlides = exports.getOnDemandLazySlides = undefined;\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n};\nvar _react = require(\"react\");\nvar _react2 = _interopRequireDefault(_react);\nvar _reactDom = require(\"react-dom\");\nvar _reactDom2 = _interopRequireDefault(_reactDom);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nvar getOnDemandLazySlides = exports.getOnDemandLazySlides = function getOnDemandLazySlides(spec) {\n var onDemandSlides = [];\n var startIndex = lazyStartIndex(spec);\n var endIndex = lazyEndIndex(spec);\n for (var slideIndex = startIndex; slideIndex < endIndex; slideIndex++) {\n if (spec.lazyLoadedList.indexOf(slideIndex) < 0) {\n onDemandSlides.push(slideIndex);\n }\n }\n return onDemandSlides;\n};\n\n// return list of slides that need to be present\nvar getRequiredLazySlides = exports.getRequiredLazySlides = function getRequiredLazySlides(spec) {\n var requiredSlides = [];\n var startIndex = lazyStartIndex(spec);\n var endIndex = lazyEndIndex(spec);\n for (var slideIndex = startIndex; slideIndex < endIndex; slideIndex++) {\n requiredSlides.push(slideIndex);\n }\n return requiredSlides;\n};\n\n// startIndex that needs to be present\nvar lazyStartIndex = exports.lazyStartIndex = function lazyStartIndex(spec) {\n return spec.currentSlide - lazySlidesOnLeft(spec);\n};\nvar lazyEndIndex = exports.lazyEndIndex = function lazyEndIndex(spec) {\n return spec.currentSlide + lazySlidesOnRight(spec);\n};\nvar lazySlidesOnLeft = exports.lazySlidesOnLeft = function lazySlidesOnLeft(spec) {\n return spec.centerMode ? Math.floor(spec.slidesToShow / 2) + (parseInt(spec.centerPadding) > 0 ? 1 : 0) : 0;\n};\nvar lazySlidesOnRight = exports.lazySlidesOnRight = function lazySlidesOnRight(spec) {\n return spec.centerMode ? Math.floor((spec.slidesToShow - 1) / 2) + 1 + (parseInt(spec.centerPadding) > 0 ? 1 : 0) : spec.slidesToShow;\n};\n\n// get width of an element\nvar getWidth = exports.getWidth = function getWidth(elem) {\n return elem && elem.offsetWidth || 0;\n};\nvar getHeight = exports.getHeight = function getHeight(elem) {\n return elem && elem.offsetHeight || 0;\n};\nvar getSwipeDirection = exports.getSwipeDirection = function getSwipeDirection(touchObject) {\n var verticalSwiping = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var xDist, yDist, r, swipeAngle;\n xDist = touchObject.startX - touchObject.curX;\n yDist = touchObject.startY - touchObject.curY;\n r = Math.atan2(yDist, xDist);\n swipeAngle = Math.round(r * 180 / Math.PI);\n if (swipeAngle < 0) {\n swipeAngle = 360 - Math.abs(swipeAngle);\n }\n if (swipeAngle <= 45 && swipeAngle >= 0 || swipeAngle <= 360 && swipeAngle >= 315) {\n return \"left\";\n }\n if (swipeAngle >= 135 && swipeAngle <= 225) {\n return \"right\";\n }\n if (verticalSwiping === true) {\n if (swipeAngle >= 35 && swipeAngle <= 135) {\n return \"up\";\n } else {\n return \"down\";\n }\n }\n return \"vertical\";\n};\n\n// whether or not we can go next\nvar canGoNext = exports.canGoNext = function canGoNext(spec) {\n var canGo = true;\n if (!spec.infinite) {\n if (spec.centerMode && spec.currentSlide >= spec.slideCount - 1) {\n canGo = false;\n } else if (spec.slideCount <= spec.slidesToShow || spec.currentSlide >= spec.slideCount - spec.slidesToShow) {\n canGo = false;\n }\n }\n return canGo;\n};\n\n// given an object and a list of keys, return new object with given keys\nvar extractObject = exports.extractObject = function extractObject(spec, keys) {\n var newObject = {};\n keys.forEach(function (key) {\n return newObject[key] = spec[key];\n });\n return newObject;\n};\n\n// get initialized state\nvar initializedState = exports.initializedState = function initializedState(spec) {\n // spec also contains listRef, trackRef\n var slideCount = _react2.default.Children.count(spec.children);\n var listWidth = Math.ceil(getWidth(_reactDom2.default.findDOMNode(spec.listRef)));\n var trackWidth = Math.ceil(getWidth(_reactDom2.default.findDOMNode(spec.trackRef)));\n var slideWidth = void 0;\n if (!spec.vertical) {\n var centerPaddingAdj = spec.centerMode && parseInt(spec.centerPadding) * 2;\n if (typeof spec.centerPadding === \"string\" && spec.centerPadding.slice(-1) === \"%\") {\n centerPaddingAdj *= listWidth / 100;\n }\n slideWidth = Math.ceil((listWidth - centerPaddingAdj) / spec.slidesToShow);\n } else {\n slideWidth = listWidth;\n }\n var slideHeight = _reactDom2.default.findDOMNode(spec.listRef) && getHeight(_reactDom2.default.findDOMNode(spec.listRef).querySelector('[data-index=\"0\"]'));\n var listHeight = slideHeight * spec.slidesToShow;\n var currentSlide = spec.currentSlide === undefined ? spec.initialSlide : spec.currentSlide;\n if (spec.rtl && spec.currentSlide === undefined) {\n currentSlide = slideCount - 1 - spec.initialSlide;\n }\n var lazyLoadedList = spec.lazyLoadedList || [];\n var slidesToLoad = getOnDemandLazySlides({\n currentSlide: currentSlide,\n lazyLoadedList: lazyLoadedList\n }, spec);\n lazyLoadedList.concat(slidesToLoad);\n var state = {\n slideCount: slideCount,\n slideWidth: slideWidth,\n listWidth: listWidth,\n trackWidth: trackWidth,\n currentSlide: currentSlide,\n slideHeight: slideHeight,\n listHeight: listHeight,\n lazyLoadedList: lazyLoadedList\n };\n if (spec.autoplaying === null && spec.autoplay) {\n state[\"autoplaying\"] = \"playing\";\n }\n return state;\n};\nvar slideHandler = exports.slideHandler = function slideHandler(spec) {\n var waitForAnimate = spec.waitForAnimate,\n animating = spec.animating,\n fade = spec.fade,\n infinite = spec.infinite,\n index = spec.index,\n slideCount = spec.slideCount,\n lazyLoadedList = spec.lazyLoadedList,\n lazyLoad = spec.lazyLoad,\n currentSlide = spec.currentSlide,\n centerMode = spec.centerMode,\n slidesToScroll = spec.slidesToScroll,\n slidesToShow = spec.slidesToShow,\n useCSS = spec.useCSS;\n if (waitForAnimate && animating) return {};\n var animationSlide = index,\n finalSlide = void 0,\n animationLeft = void 0,\n finalLeft = void 0;\n var state = {},\n nextState = {};\n if (fade) {\n if (!infinite && (index < 0 || index >= slideCount)) return {};\n if (index < 0) {\n animationSlide = index + slideCount;\n } else if (index >= slideCount) {\n animationSlide = index - slideCount;\n }\n if (lazyLoad && lazyLoadedList.indexOf(animationSlide) < 0) {\n lazyLoadedList.push(animationSlide);\n }\n state = {\n animating: true,\n currentSlide: animationSlide,\n lazyLoadedList: lazyLoadedList\n };\n nextState = {\n animating: false\n };\n } else {\n finalSlide = animationSlide;\n if (animationSlide < 0) {\n finalSlide = animationSlide + slideCount;\n if (!infinite) finalSlide = 0;else if (slideCount % slidesToScroll !== 0) finalSlide = slideCount - slideCount % slidesToScroll;\n } else if (!canGoNext(spec) && animationSlide > currentSlide) {\n animationSlide = finalSlide = currentSlide;\n } else if (centerMode && animationSlide >= slideCount) {\n animationSlide = infinite ? slideCount : slideCount - 1;\n finalSlide = infinite ? 0 : slideCount - 1;\n } else if (animationSlide >= slideCount) {\n finalSlide = animationSlide - slideCount;\n if (!infinite) finalSlide = slideCount - slidesToShow;else if (slideCount % slidesToScroll !== 0) finalSlide = 0;\n }\n animationLeft = getTrackLeft(_extends({}, spec, {\n slideIndex: animationSlide\n }));\n finalLeft = getTrackLeft(_extends({}, spec, {\n slideIndex: finalSlide\n }));\n if (!infinite) {\n if (animationLeft === finalLeft) animationSlide = finalSlide;\n animationLeft = finalLeft;\n }\n lazyLoad && lazyLoadedList.concat(getOnDemandLazySlides(_extends({}, spec, {\n currentSlide: animationSlide\n })));\n if (!useCSS) {\n state = {\n currentSlide: finalSlide,\n trackStyle: getTrackCSS(_extends({}, spec, {\n left: finalLeft\n })),\n lazyLoadedList: lazyLoadedList\n };\n } else {\n state = {\n animating: true,\n currentSlide: finalSlide,\n trackStyle: getTrackAnimateCSS(_extends({}, spec, {\n left: animationLeft\n })),\n lazyLoadedList: lazyLoadedList\n };\n nextState = {\n animating: false,\n currentSlide: finalSlide,\n trackStyle: getTrackCSS(_extends({}, spec, {\n left: finalLeft\n })),\n swipeLeft: null\n };\n }\n }\n return {\n state: state,\n nextState: nextState\n };\n};\nvar changeSlide = exports.changeSlide = function changeSlide(spec, options) {\n var indexOffset, previousInt, slideOffset, unevenOffset, targetSlide;\n var slidesToScroll = spec.slidesToScroll,\n slidesToShow = spec.slidesToShow,\n slideCount = spec.slideCount,\n currentSlide = spec.currentSlide,\n lazyLoad = spec.lazyLoad,\n infinite = spec.infinite;\n unevenOffset = slideCount % slidesToScroll !== 0;\n indexOffset = unevenOffset ? 0 : (slideCount - currentSlide) % slidesToScroll;\n if (options.message === \"previous\") {\n slideOffset = indexOffset === 0 ? slidesToScroll : slidesToShow - indexOffset;\n targetSlide = currentSlide - slideOffset;\n if (lazyLoad && !infinite) {\n previousInt = currentSlide - slideOffset;\n targetSlide = previousInt === -1 ? slideCount - 1 : previousInt;\n }\n } else if (options.message === \"next\") {\n slideOffset = indexOffset === 0 ? slidesToScroll : indexOffset;\n targetSlide = currentSlide + slideOffset;\n if (lazyLoad && !infinite) {\n targetSlide = (currentSlide + slidesToScroll) % slideCount + indexOffset;\n }\n } else if (options.message === \"dots\") {\n // Click on dots\n targetSlide = options.index * options.slidesToScroll;\n if (targetSlide === options.currentSlide) {\n return null;\n }\n } else if (options.message === \"children\") {\n // Click on the slides\n targetSlide = options.index;\n if (targetSlide === options.currentSlide) {\n return null;\n }\n if (infinite) {\n var direction = siblingDirection(_extends({}, spec, {\n targetSlide: targetSlide\n }));\n if (targetSlide > options.currentSlide && direction === \"left\") {\n targetSlide = targetSlide - slideCount;\n } else if (targetSlide < options.currentSlide && direction === \"right\") {\n targetSlide = targetSlide + slideCount;\n }\n }\n } else if (options.message === \"index\") {\n targetSlide = Number(options.index);\n if (targetSlide === options.currentSlide) {\n return null;\n }\n }\n return targetSlide;\n};\nvar keyHandler = exports.keyHandler = function keyHandler(e, accessibility, rtl) {\n if (e.target.tagName.match(\"TEXTAREA|INPUT|SELECT\") || !accessibility) return \"\";\n if (e.keyCode === 37) return rtl ? \"next\" : \"previous\";\n if (e.keyCode === 39) return rtl ? \"previous\" : \"next\";\n return \"\";\n};\nvar swipeStart = exports.swipeStart = function swipeStart(e, swipe, draggable) {\n e.target.tagName === \"IMG\" && e.preventDefault();\n if (!swipe || !draggable && e.type.indexOf(\"mouse\") !== -1) return \"\";\n return {\n dragging: true,\n touchObject: {\n startX: e.touches ? e.touches[0].pageX : e.clientX,\n startY: e.touches ? e.touches[0].pageY : e.clientY,\n curX: e.touches ? e.touches[0].pageX : e.clientX,\n curY: e.touches ? e.touches[0].pageY : e.clientY\n }\n };\n};\nvar swipeMove = exports.swipeMove = function swipeMove(e, spec) {\n // spec also contains, trackRef and slideIndex\n var scrolling = spec.scrolling,\n animating = spec.animating,\n vertical = spec.vertical,\n swipeToSlide = spec.swipeToSlide,\n verticalSwiping = spec.verticalSwiping,\n rtl = spec.rtl,\n currentSlide = spec.currentSlide,\n edgeFriction = spec.edgeFriction,\n edgeDragged = spec.edgeDragged,\n onEdge = spec.onEdge,\n swiped = spec.swiped,\n swiping = spec.swiping,\n slideCount = spec.slideCount,\n slidesToScroll = spec.slidesToScroll,\n infinite = spec.infinite,\n touchObject = spec.touchObject,\n swipeEvent = spec.swipeEvent,\n listHeight = spec.listHeight,\n listWidth = spec.listWidth;\n if (scrolling) return;\n if (animating) return e.preventDefault();\n if (vertical && swipeToSlide && verticalSwiping) e.preventDefault();\n var swipeLeft = void 0,\n state = {};\n var curLeft = getTrackLeft(spec);\n touchObject.curX = e.touches ? e.touches[0].pageX : e.clientX;\n touchObject.curY = e.touches ? e.touches[0].pageY : e.clientY;\n touchObject.swipeLength = Math.round(Math.sqrt(Math.pow(touchObject.curX - touchObject.startX, 2)));\n var verticalSwipeLength = Math.round(Math.sqrt(Math.pow(touchObject.curY - touchObject.startY, 2)));\n if (!verticalSwiping && !swiping && verticalSwipeLength > 10) {\n return {\n scrolling: true\n };\n }\n if (verticalSwiping) touchObject.swipeLength = verticalSwipeLength;\n var positionOffset = (!rtl ? 1 : -1) * (touchObject.curX > touchObject.startX ? 1 : -1);\n if (verticalSwiping) positionOffset = touchObject.curY > touchObject.startY ? 1 : -1;\n var dotCount = Math.ceil(slideCount / slidesToScroll);\n var swipeDirection = getSwipeDirection(spec.touchObject, verticalSwiping);\n var touchSwipeLength = touchObject.swipeLength;\n if (!infinite) {\n if (currentSlide === 0 && swipeDirection === \"right\" || currentSlide + 1 >= dotCount && swipeDirection === \"left\" || !canGoNext(spec) && swipeDirection === \"left\") {\n touchSwipeLength = touchObject.swipeLength * edgeFriction;\n if (edgeDragged === false && onEdge) {\n onEdge(swipeDirection);\n state[\"edgeDragged\"] = true;\n }\n }\n }\n if (!swiped && swipeEvent) {\n swipeEvent(swipeDirection);\n state[\"swiped\"] = true;\n }\n if (!vertical) {\n if (!rtl) {\n swipeLeft = curLeft + touchSwipeLength * positionOffset;\n } else {\n swipeLeft = curLeft - touchSwipeLength * positionOffset;\n }\n } else {\n swipeLeft = curLeft + touchSwipeLength * (listHeight / listWidth) * positionOffset;\n }\n if (verticalSwiping) {\n swipeLeft = curLeft + touchSwipeLength * positionOffset;\n }\n state = _extends({}, state, {\n touchObject: touchObject,\n swipeLeft: swipeLeft,\n trackStyle: getTrackCSS(_extends({}, spec, {\n left: swipeLeft\n }))\n });\n if (Math.abs(touchObject.curX - touchObject.startX) < Math.abs(touchObject.curY - touchObject.startY) * 0.8) {\n return state;\n }\n if (touchObject.swipeLength > 10) {\n state[\"swiping\"] = true;\n e.preventDefault();\n }\n return state;\n};\nvar swipeEnd = exports.swipeEnd = function swipeEnd(e, spec) {\n var dragging = spec.dragging,\n swipe = spec.swipe,\n touchObject = spec.touchObject,\n listWidth = spec.listWidth,\n touchThreshold = spec.touchThreshold,\n verticalSwiping = spec.verticalSwiping,\n listHeight = spec.listHeight,\n currentSlide = spec.currentSlide,\n swipeToSlide = spec.swipeToSlide,\n scrolling = spec.scrolling,\n onSwipe = spec.onSwipe;\n if (!dragging) {\n if (swipe) e.preventDefault();\n return {};\n }\n var minSwipe = verticalSwiping ? listHeight / touchThreshold : listWidth / touchThreshold;\n var swipeDirection = getSwipeDirection(touchObject, verticalSwiping);\n // reset the state of touch related state variables.\n var state = {\n dragging: false,\n edgeDragged: false,\n scrolling: false,\n swiping: false,\n swiped: false,\n swipeLeft: null,\n touchObject: {}\n };\n if (scrolling) {\n return state;\n }\n if (!touchObject.swipeLength) {\n return state;\n }\n if (touchObject.swipeLength > minSwipe) {\n e.preventDefault();\n if (onSwipe) {\n onSwipe(swipeDirection);\n }\n var slideCount = void 0,\n newSlide = void 0;\n switch (swipeDirection) {\n case \"left\":\n case \"up\":\n newSlide = currentSlide + getSlideCount(spec);\n slideCount = swipeToSlide ? checkNavigable(spec, newSlide) : newSlide;\n state[\"currentDirection\"] = 0;\n break;\n case \"right\":\n case \"down\":\n newSlide = currentSlide - getSlideCount(spec);\n slideCount = swipeToSlide ? checkNavigable(spec, newSlide) : newSlide;\n state[\"currentDirection\"] = 1;\n break;\n default:\n slideCount = currentSlide;\n }\n state[\"triggerSlideHandler\"] = slideCount;\n } else {\n // Adjust the track back to it's original position.\n var currentLeft = getTrackLeft(spec);\n state[\"trackStyle\"] = getTrackAnimateCSS(_extends({}, spec, {\n left: currentLeft\n }));\n }\n return state;\n};\nvar getNavigableIndexes = exports.getNavigableIndexes = function getNavigableIndexes(spec) {\n var max = spec.infinite ? spec.slideCount * 2 : spec.slideCount;\n var breakpoint = spec.infinite ? spec.slidesToShow * -1 : 0;\n var counter = spec.infinite ? spec.slidesToShow * -1 : 0;\n var indexes = [];\n while (breakpoint < max) {\n indexes.push(breakpoint);\n breakpoint = counter + spec.slidesToScroll;\n counter += Math.min(spec.slidesToScroll, spec.slidesToShow);\n }\n return indexes;\n};\nvar checkNavigable = exports.checkNavigable = function checkNavigable(spec, index) {\n var navigables = getNavigableIndexes(spec);\n var prevNavigable = 0;\n if (index > navigables[navigables.length - 1]) {\n index = navigables[navigables.length - 1];\n } else {\n for (var n in navigables) {\n if (index < navigables[n]) {\n index = prevNavigable;\n break;\n }\n prevNavigable = navigables[n];\n }\n }\n return index;\n};\nvar getSlideCount = exports.getSlideCount = function getSlideCount(spec) {\n var centerOffset = spec.centerMode ? spec.slideWidth * Math.floor(spec.slidesToShow / 2) : 0;\n if (spec.swipeToSlide) {\n var swipedSlide = void 0;\n var slickList = _reactDom2.default.findDOMNode(spec.listRef);\n var slides = slickList.querySelectorAll(\".slick-slide\");\n Array.from(slides).every(function (slide) {\n if (!spec.vertical) {\n if (slide.offsetLeft - centerOffset + getWidth(slide) / 2 > spec.swipeLeft * -1) {\n swipedSlide = slide;\n return false;\n }\n } else {\n if (slide.offsetTop + getHeight(slide) / 2 > spec.swipeLeft * -1) {\n swipedSlide = slide;\n return false;\n }\n }\n return true;\n });\n if (!swipedSlide) {\n return 0;\n }\n var currentIndex = spec.rtl === true ? spec.slideCount - spec.currentSlide : spec.currentSlide;\n var slidesTraversed = Math.abs(swipedSlide.dataset.index - currentIndex) || 1;\n return slidesTraversed;\n } else {\n return spec.slidesToScroll;\n }\n};\nvar checkSpecKeys = exports.checkSpecKeys = function checkSpecKeys(spec, keysArray) {\n return keysArray.reduce(function (value, key) {\n return value && spec.hasOwnProperty(key);\n }, true) ? null : console.error(\"Keys Missing:\", spec);\n};\nvar getTrackCSS = exports.getTrackCSS = function getTrackCSS(spec) {\n checkSpecKeys(spec, [\"left\", \"variableWidth\", \"slideCount\", \"slidesToShow\", \"slideWidth\"]);\n var trackWidth = void 0,\n trackHeight = void 0;\n var trackChildren = spec.slideCount + 2 * spec.slidesToShow;\n if (!spec.vertical) {\n trackWidth = getTotalSlides(spec) * spec.slideWidth;\n } else {\n trackHeight = trackChildren * spec.slideHeight;\n }\n var style = {\n opacity: 1,\n transition: \"\",\n WebkitTransition: \"\"\n };\n if (spec.useTransform) {\n var WebkitTransform = !spec.vertical ? \"translate3d(\" + spec.left + \"px, 0px, 0px)\" : \"translate3d(0px, \" + spec.left + \"px, 0px)\";\n var transform = !spec.vertical ? \"translate3d(\" + spec.left + \"px, 0px, 0px)\" : \"translate3d(0px, \" + spec.left + \"px, 0px)\";\n var msTransform = !spec.vertical ? \"translateX(\" + spec.left + \"px)\" : \"translateY(\" + spec.left + \"px)\";\n style = _extends({}, style, {\n WebkitTransform: WebkitTransform,\n transform: transform,\n msTransform: msTransform\n });\n } else {\n if (spec.vertical) {\n style[\"top\"] = spec.left;\n } else {\n style[\"left\"] = spec.left;\n }\n }\n if (spec.fade) style = {\n opacity: 1\n };\n if (trackWidth) style.width = trackWidth;\n if (trackHeight) style.height = trackHeight;\n\n // Fallback for IE8\n if (window && !window.addEventListener && window.attachEvent) {\n if (!spec.vertical) {\n style.marginLeft = spec.left + \"px\";\n } else {\n style.marginTop = spec.left + \"px\";\n }\n }\n return style;\n};\nvar getTrackAnimateCSS = exports.getTrackAnimateCSS = function getTrackAnimateCSS(spec) {\n checkSpecKeys(spec, [\"left\", \"variableWidth\", \"slideCount\", \"slidesToShow\", \"slideWidth\", \"speed\", \"cssEase\"]);\n var style = getTrackCSS(spec);\n // useCSS is true by default so it can be undefined\n if (spec.useTransform) {\n style.WebkitTransition = \"-webkit-transform \" + spec.speed + \"ms \" + spec.cssEase;\n style.transition = \"transform \" + spec.speed + \"ms \" + spec.cssEase;\n } else {\n if (spec.vertical) {\n style.transition = \"top \" + spec.speed + \"ms \" + spec.cssEase;\n } else {\n style.transition = \"left \" + spec.speed + \"ms \" + spec.cssEase;\n }\n }\n return style;\n};\nvar getTrackLeft = exports.getTrackLeft = function getTrackLeft(spec) {\n if (spec.unslick) {\n return 0;\n }\n checkSpecKeys(spec, [\"slideIndex\", \"trackRef\", \"infinite\", \"centerMode\", \"slideCount\", \"slidesToShow\", \"slidesToScroll\", \"slideWidth\", \"listWidth\", \"variableWidth\", \"slideHeight\"]);\n var slideIndex = spec.slideIndex,\n trackRef = spec.trackRef,\n infinite = spec.infinite,\n centerMode = spec.centerMode,\n slideCount = spec.slideCount,\n slidesToShow = spec.slidesToShow,\n slidesToScroll = spec.slidesToScroll,\n slideWidth = spec.slideWidth,\n listWidth = spec.listWidth,\n variableWidth = spec.variableWidth,\n slideHeight = spec.slideHeight,\n fade = spec.fade,\n vertical = spec.vertical;\n var slideOffset = 0;\n var targetLeft;\n var targetSlide;\n var verticalOffset = 0;\n if (fade || spec.slideCount === 1) {\n return 0;\n }\n var slidesToOffset = 0;\n if (infinite) {\n slidesToOffset = -getPreClones(spec); // bring active slide to the beginning of visual area\n // if next scroll doesn't have enough children, just reach till the end of original slides instead of shifting slidesToScroll children\n if (slideCount % slidesToScroll !== 0 && slideIndex + slidesToScroll > slideCount) {\n slidesToOffset = -(slideIndex > slideCount ? slidesToShow - (slideIndex - slideCount) : slideCount % slidesToScroll);\n }\n // shift current slide to center of the frame\n if (centerMode) {\n slidesToOffset += parseInt(slidesToShow / 2);\n }\n } else {\n if (slideCount % slidesToScroll !== 0 && slideIndex + slidesToScroll > slideCount) {\n slidesToOffset = slidesToShow - slideCount % slidesToScroll;\n }\n if (centerMode) {\n slidesToOffset = parseInt(slidesToShow / 2);\n }\n }\n slideOffset = slidesToOffset * slideWidth;\n verticalOffset = slidesToOffset * slideHeight;\n if (!vertical) {\n targetLeft = slideIndex * slideWidth * -1 + slideOffset;\n } else {\n targetLeft = slideIndex * slideHeight * -1 + verticalOffset;\n }\n if (variableWidth === true) {\n var targetSlideIndex;\n var trackElem = _reactDom2.default.findDOMNode(trackRef);\n targetSlideIndex = slideIndex + getPreClones(spec);\n targetSlide = trackElem && trackElem.childNodes[targetSlideIndex];\n targetLeft = targetSlide ? targetSlide.offsetLeft * -1 : 0;\n if (centerMode === true) {\n targetSlideIndex = infinite ? slideIndex + getPreClones(spec) : slideIndex;\n targetSlide = trackElem && trackElem.children[targetSlideIndex];\n targetLeft = 0;\n for (var slide = 0; slide < targetSlideIndex; slide++) {\n targetLeft -= trackElem && trackElem.children[slide] && trackElem.children[slide].offsetWidth;\n }\n targetLeft -= parseInt(spec.centerPadding);\n targetLeft += targetSlide && (listWidth - targetSlide.offsetWidth) / 2;\n }\n }\n return targetLeft;\n};\nvar getPreClones = exports.getPreClones = function getPreClones(spec) {\n if (spec.unslick || !spec.infinite) {\n return 0;\n }\n if (spec.variableWidth) {\n return spec.slideCount;\n }\n return spec.slidesToShow + (spec.centerMode ? 1 : 0);\n};\nvar getPostClones = exports.getPostClones = function getPostClones(spec) {\n if (spec.unslick || !spec.infinite) {\n return 0;\n }\n return spec.slideCount;\n};\nvar getTotalSlides = exports.getTotalSlides = function getTotalSlides(spec) {\n return spec.slideCount === 1 ? 1 : getPreClones(spec) + spec.slideCount + getPostClones(spec);\n};\nvar siblingDirection = exports.siblingDirection = function siblingDirection(spec) {\n if (spec.targetSlide > spec.currentSlide) {\n if (spec.targetSlide > spec.currentSlide + slidesOnRight(spec)) {\n return \"left\";\n }\n return \"right\";\n } else {\n if (spec.targetSlide < spec.currentSlide - slidesOnLeft(spec)) {\n return \"right\";\n }\n return \"left\";\n }\n};\nvar slidesOnRight = exports.slidesOnRight = function slidesOnRight(_ref) {\n var slidesToShow = _ref.slidesToShow,\n centerMode = _ref.centerMode,\n rtl = _ref.rtl,\n centerPadding = _ref.centerPadding;\n\n // returns no of slides on the right of active slide\n if (centerMode) {\n var right = (slidesToShow - 1) / 2 + 1;\n if (parseInt(centerPadding) > 0) right += 1;\n if (rtl && slidesToShow % 2 === 0) right += 1;\n return right;\n }\n if (rtl) {\n return 0;\n }\n return slidesToShow - 1;\n};\nvar slidesOnLeft = exports.slidesOnLeft = function slidesOnLeft(_ref2) {\n var slidesToShow = _ref2.slidesToShow,\n centerMode = _ref2.centerMode,\n rtl = _ref2.rtl,\n centerPadding = _ref2.centerPadding;\n\n // returns no of slides on the left of active slide\n if (centerMode) {\n var left = (slidesToShow - 1) / 2 + 1;\n if (parseInt(centerPadding) > 0) left += 1;\n if (!rtl && slidesToShow % 2 === 0) left += 1;\n return left;\n }\n if (rtl) {\n return slidesToShow - 1;\n }\n return 0;\n};\nvar canUseDOM = exports.canUseDOM = function canUseDOM() {\n return !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\n};","'use strict';\n\nif (typeof process === 'undefined' || !process.version || process.version.indexOf('v0.') === 0 || process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {\n module.exports = {\n nextTick: nextTick\n };\n} else {\n module.exports = process;\n}\nfunction nextTick(fn, arg1, arg2, arg3) {\n if (typeof fn !== 'function') {\n throw new TypeError('\"callback\" argument must be a function');\n }\n var len = arguments.length;\n var args, i;\n switch (len) {\n case 0:\n case 1:\n return process.nextTick(fn);\n case 2:\n return process.nextTick(function afterTickOne() {\n fn.call(null, arg1);\n });\n case 3:\n return process.nextTick(function afterTickTwo() {\n fn.call(null, arg1, arg2);\n });\n case 4:\n return process.nextTick(function afterTickThree() {\n fn.call(null, arg1, arg2, arg3);\n });\n default:\n args = new Array(len - 1);\n i = 0;\n while (i < args.length) {\n args[i++] = arguments[i];\n }\n return process.nextTick(function afterTick() {\n fn.apply(null, args);\n });\n }\n}","// based on the aes implimentation in triple sec\n// https://github.com/keybase/triplesec\n// which is in turn based on the one from crypto-js\n// https://code.google.com/p/crypto-js/\n\nvar Buffer = require('safe-buffer').Buffer;\nfunction asUInt32Array(buf) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf);\n var len = buf.length / 4 | 0;\n var out = new Array(len);\n for (var i = 0; i < len; i++) {\n out[i] = buf.readUInt32BE(i * 4);\n }\n return out;\n}\nfunction scrubVec(v) {\n for (var i = 0; i < v.length; v++) {\n v[i] = 0;\n }\n}\nfunction cryptBlock(M, keySchedule, SUB_MIX, SBOX, nRounds) {\n var SUB_MIX0 = SUB_MIX[0];\n var SUB_MIX1 = SUB_MIX[1];\n var SUB_MIX2 = SUB_MIX[2];\n var SUB_MIX3 = SUB_MIX[3];\n var s0 = M[0] ^ keySchedule[0];\n var s1 = M[1] ^ keySchedule[1];\n var s2 = M[2] ^ keySchedule[2];\n var s3 = M[3] ^ keySchedule[3];\n var t0, t1, t2, t3;\n var ksRow = 4;\n for (var round = 1; round < nRounds; round++) {\n t0 = SUB_MIX0[s0 >>> 24] ^ SUB_MIX1[s1 >>> 16 & 0xff] ^ SUB_MIX2[s2 >>> 8 & 0xff] ^ SUB_MIX3[s3 & 0xff] ^ keySchedule[ksRow++];\n t1 = SUB_MIX0[s1 >>> 24] ^ SUB_MIX1[s2 >>> 16 & 0xff] ^ SUB_MIX2[s3 >>> 8 & 0xff] ^ SUB_MIX3[s0 & 0xff] ^ keySchedule[ksRow++];\n t2 = SUB_MIX0[s2 >>> 24] ^ SUB_MIX1[s3 >>> 16 & 0xff] ^ SUB_MIX2[s0 >>> 8 & 0xff] ^ SUB_MIX3[s1 & 0xff] ^ keySchedule[ksRow++];\n t3 = SUB_MIX0[s3 >>> 24] ^ SUB_MIX1[s0 >>> 16 & 0xff] ^ SUB_MIX2[s1 >>> 8 & 0xff] ^ SUB_MIX3[s2 & 0xff] ^ keySchedule[ksRow++];\n s0 = t0;\n s1 = t1;\n s2 = t2;\n s3 = t3;\n }\n t0 = (SBOX[s0 >>> 24] << 24 | SBOX[s1 >>> 16 & 0xff] << 16 | SBOX[s2 >>> 8 & 0xff] << 8 | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++];\n t1 = (SBOX[s1 >>> 24] << 24 | SBOX[s2 >>> 16 & 0xff] << 16 | SBOX[s3 >>> 8 & 0xff] << 8 | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++];\n t2 = (SBOX[s2 >>> 24] << 24 | SBOX[s3 >>> 16 & 0xff] << 16 | SBOX[s0 >>> 8 & 0xff] << 8 | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++];\n t3 = (SBOX[s3 >>> 24] << 24 | SBOX[s0 >>> 16 & 0xff] << 16 | SBOX[s1 >>> 8 & 0xff] << 8 | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++];\n t0 = t0 >>> 0;\n t1 = t1 >>> 0;\n t2 = t2 >>> 0;\n t3 = t3 >>> 0;\n return [t0, t1, t2, t3];\n}\n\n// AES constants\nvar RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36];\nvar G = function () {\n // Compute double table\n var d = new Array(256);\n for (var j = 0; j < 256; j++) {\n if (j < 128) {\n d[j] = j << 1;\n } else {\n d[j] = j << 1 ^ 0x11b;\n }\n }\n var SBOX = [];\n var INV_SBOX = [];\n var SUB_MIX = [[], [], [], []];\n var INV_SUB_MIX = [[], [], [], []];\n\n // Walk GF(2^8)\n var x = 0;\n var xi = 0;\n for (var i = 0; i < 256; ++i) {\n // Compute sbox\n var sx = xi ^ xi << 1 ^ xi << 2 ^ xi << 3 ^ xi << 4;\n sx = sx >>> 8 ^ sx & 0xff ^ 0x63;\n SBOX[x] = sx;\n INV_SBOX[sx] = x;\n\n // Compute multiplication\n var x2 = d[x];\n var x4 = d[x2];\n var x8 = d[x4];\n\n // Compute sub bytes, mix columns tables\n var t = d[sx] * 0x101 ^ sx * 0x1010100;\n SUB_MIX[0][x] = t << 24 | t >>> 8;\n SUB_MIX[1][x] = t << 16 | t >>> 16;\n SUB_MIX[2][x] = t << 8 | t >>> 24;\n SUB_MIX[3][x] = t;\n\n // Compute inv sub bytes, inv mix columns tables\n t = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n INV_SUB_MIX[0][sx] = t << 24 | t >>> 8;\n INV_SUB_MIX[1][sx] = t << 16 | t >>> 16;\n INV_SUB_MIX[2][sx] = t << 8 | t >>> 24;\n INV_SUB_MIX[3][sx] = t;\n if (x === 0) {\n x = xi = 1;\n } else {\n x = x2 ^ d[d[d[x8 ^ x2]]];\n xi ^= d[d[xi]];\n }\n }\n return {\n SBOX: SBOX,\n INV_SBOX: INV_SBOX,\n SUB_MIX: SUB_MIX,\n INV_SUB_MIX: INV_SUB_MIX\n };\n}();\nfunction AES(key) {\n this._key = asUInt32Array(key);\n this._reset();\n}\nAES.blockSize = 4 * 4;\nAES.keySize = 256 / 8;\nAES.prototype.blockSize = AES.blockSize;\nAES.prototype.keySize = AES.keySize;\nAES.prototype._reset = function () {\n var keyWords = this._key;\n var keySize = keyWords.length;\n var nRounds = keySize + 6;\n var ksRows = (nRounds + 1) * 4;\n var keySchedule = [];\n for (var k = 0; k < keySize; k++) {\n keySchedule[k] = keyWords[k];\n }\n for (k = keySize; k < ksRows; k++) {\n var t = keySchedule[k - 1];\n if (k % keySize === 0) {\n t = t << 8 | t >>> 24;\n t = G.SBOX[t >>> 24] << 24 | G.SBOX[t >>> 16 & 0xff] << 16 | G.SBOX[t >>> 8 & 0xff] << 8 | G.SBOX[t & 0xff];\n t ^= RCON[k / keySize | 0] << 24;\n } else if (keySize > 6 && k % keySize === 4) {\n t = G.SBOX[t >>> 24] << 24 | G.SBOX[t >>> 16 & 0xff] << 16 | G.SBOX[t >>> 8 & 0xff] << 8 | G.SBOX[t & 0xff];\n }\n keySchedule[k] = keySchedule[k - keySize] ^ t;\n }\n var invKeySchedule = [];\n for (var ik = 0; ik < ksRows; ik++) {\n var ksR = ksRows - ik;\n var tt = keySchedule[ksR - (ik % 4 ? 0 : 4)];\n if (ik < 4 || ksR <= 4) {\n invKeySchedule[ik] = tt;\n } else {\n invKeySchedule[ik] = G.INV_SUB_MIX[0][G.SBOX[tt >>> 24]] ^ G.INV_SUB_MIX[1][G.SBOX[tt >>> 16 & 0xff]] ^ G.INV_SUB_MIX[2][G.SBOX[tt >>> 8 & 0xff]] ^ G.INV_SUB_MIX[3][G.SBOX[tt & 0xff]];\n }\n }\n this._nRounds = nRounds;\n this._keySchedule = keySchedule;\n this._invKeySchedule = invKeySchedule;\n};\nAES.prototype.encryptBlockRaw = function (M) {\n M = asUInt32Array(M);\n return cryptBlock(M, this._keySchedule, G.SUB_MIX, G.SBOX, this._nRounds);\n};\nAES.prototype.encryptBlock = function (M) {\n var out = this.encryptBlockRaw(M);\n var buf = Buffer.allocUnsafe(16);\n buf.writeUInt32BE(out[0], 0);\n buf.writeUInt32BE(out[1], 4);\n buf.writeUInt32BE(out[2], 8);\n buf.writeUInt32BE(out[3], 12);\n return buf;\n};\nAES.prototype.decryptBlock = function (M) {\n M = asUInt32Array(M);\n\n // swap\n var m1 = M[1];\n M[1] = M[3];\n M[3] = m1;\n var out = cryptBlock(M, this._invKeySchedule, G.INV_SUB_MIX, G.INV_SBOX, this._nRounds);\n var buf = Buffer.allocUnsafe(16);\n buf.writeUInt32BE(out[0], 0);\n buf.writeUInt32BE(out[3], 4);\n buf.writeUInt32BE(out[2], 8);\n buf.writeUInt32BE(out[1], 12);\n return buf;\n};\nAES.prototype.scrub = function () {\n scrubVec(this._keySchedule);\n scrubVec(this._invKeySchedule);\n scrubVec(this._key);\n};\nmodule.exports.AES = AES;","var Buffer = require('safe-buffer').Buffer;\nvar MD5 = require('md5.js');\n\n/* eslint-disable camelcase */\nfunction EVP_BytesToKey(password, salt, keyBits, ivLen) {\n if (!Buffer.isBuffer(password)) password = Buffer.from(password, 'binary');\n if (salt) {\n if (!Buffer.isBuffer(salt)) salt = Buffer.from(salt, 'binary');\n if (salt.length !== 8) throw new RangeError('salt should be Buffer with 8 byte length');\n }\n var keyLen = keyBits / 8;\n var key = Buffer.alloc(keyLen);\n var iv = Buffer.alloc(ivLen || 0);\n var tmp = Buffer.alloc(0);\n while (keyLen > 0 || ivLen > 0) {\n var hash = new MD5();\n hash.update(tmp);\n hash.update(password);\n if (salt) hash.update(salt);\n tmp = hash.digest();\n var used = 0;\n if (keyLen > 0) {\n var keyStart = key.length - keyLen;\n used = Math.min(keyLen, tmp.length);\n tmp.copy(key, keyStart, 0, used);\n keyLen -= used;\n }\n if (used < tmp.length && ivLen > 0) {\n var ivStart = iv.length - ivLen;\n var length = Math.min(ivLen, tmp.length - used);\n tmp.copy(iv, ivStart, used, used + length);\n ivLen -= length;\n }\n }\n tmp.fill(0);\n return {\n key: key,\n iv: iv\n };\n}\nmodule.exports = EVP_BytesToKey;","'use strict';\n\nvar BN = require('bn.js');\nvar utils = require('../utils');\nvar getNAF = utils.getNAF;\nvar getJSF = utils.getJSF;\nvar assert = utils.assert;\nfunction BaseCurve(type, conf) {\n this.type = type;\n this.p = new BN(conf.p, 16);\n\n // Use Montgomery, when there is no fast reduction for the prime\n this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p);\n\n // Useful for many curves\n this.zero = new BN(0).toRed(this.red);\n this.one = new BN(1).toRed(this.red);\n this.two = new BN(2).toRed(this.red);\n\n // Curve configuration, optional\n this.n = conf.n && new BN(conf.n, 16);\n this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed);\n\n // Temporary arrays\n this._wnafT1 = new Array(4);\n this._wnafT2 = new Array(4);\n this._wnafT3 = new Array(4);\n this._wnafT4 = new Array(4);\n this._bitLength = this.n ? this.n.bitLength() : 0;\n\n // Generalized Greg Maxwell's trick\n var adjustCount = this.n && this.p.div(this.n);\n if (!adjustCount || adjustCount.cmpn(100) > 0) {\n this.redN = null;\n } else {\n this._maxwellTrick = true;\n this.redN = this.n.toRed(this.red);\n }\n}\nmodule.exports = BaseCurve;\nBaseCurve.prototype.point = function point() {\n throw new Error('Not implemented');\n};\nBaseCurve.prototype.validate = function validate() {\n throw new Error('Not implemented');\n};\nBaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) {\n assert(p.precomputed);\n var doubles = p._getDoubles();\n var naf = getNAF(k, 1, this._bitLength);\n var I = (1 << doubles.step + 1) - (doubles.step % 2 === 0 ? 2 : 1);\n I /= 3;\n\n // Translate into more windowed form\n var repr = [];\n var j;\n var nafW;\n for (j = 0; j < naf.length; j += doubles.step) {\n nafW = 0;\n for (var l = j + doubles.step - 1; l >= j; l--) nafW = (nafW << 1) + naf[l];\n repr.push(nafW);\n }\n var a = this.jpoint(null, null, null);\n var b = this.jpoint(null, null, null);\n for (var i = I; i > 0; i--) {\n for (j = 0; j < repr.length; j++) {\n nafW = repr[j];\n if (nafW === i) b = b.mixedAdd(doubles.points[j]);else if (nafW === -i) b = b.mixedAdd(doubles.points[j].neg());\n }\n a = a.add(b);\n }\n return a.toP();\n};\nBaseCurve.prototype._wnafMul = function _wnafMul(p, k) {\n var w = 4;\n\n // Precompute window\n var nafPoints = p._getNAFPoints(w);\n w = nafPoints.wnd;\n var wnd = nafPoints.points;\n\n // Get NAF form\n var naf = getNAF(k, w, this._bitLength);\n\n // Add `this`*(N+1) for every w-NAF index\n var acc = this.jpoint(null, null, null);\n for (var i = naf.length - 1; i >= 0; i--) {\n // Count zeroes\n for (var l = 0; i >= 0 && naf[i] === 0; i--) l++;\n if (i >= 0) l++;\n acc = acc.dblp(l);\n if (i < 0) break;\n var z = naf[i];\n assert(z !== 0);\n if (p.type === 'affine') {\n // J +- P\n if (z > 0) acc = acc.mixedAdd(wnd[z - 1 >> 1]);else acc = acc.mixedAdd(wnd[-z - 1 >> 1].neg());\n } else {\n // J +- J\n if (z > 0) acc = acc.add(wnd[z - 1 >> 1]);else acc = acc.add(wnd[-z - 1 >> 1].neg());\n }\n }\n return p.type === 'affine' ? acc.toP() : acc;\n};\nBaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW, points, coeffs, len, jacobianResult) {\n var wndWidth = this._wnafT1;\n var wnd = this._wnafT2;\n var naf = this._wnafT3;\n\n // Fill all arrays\n var max = 0;\n var i;\n var j;\n var p;\n for (i = 0; i < len; i++) {\n p = points[i];\n var nafPoints = p._getNAFPoints(defW);\n wndWidth[i] = nafPoints.wnd;\n wnd[i] = nafPoints.points;\n }\n\n // Comb small window NAFs\n for (i = len - 1; i >= 1; i -= 2) {\n var a = i - 1;\n var b = i;\n if (wndWidth[a] !== 1 || wndWidth[b] !== 1) {\n naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength);\n naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength);\n max = Math.max(naf[a].length, max);\n max = Math.max(naf[b].length, max);\n continue;\n }\n var comb = [points[a], /* 1 */\n null, /* 3 */\n null, /* 5 */\n points[b] /* 7 */];\n\n // Try to avoid Projective points, if possible\n if (points[a].y.cmp(points[b].y) === 0) {\n comb[1] = points[a].add(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].add(points[b].neg());\n } else {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n }\n var index = [-3, /* -1 -1 */\n -1, /* -1 0 */\n -5, /* -1 1 */\n -7, /* 0 -1 */\n 0, /* 0 0 */\n 7, /* 0 1 */\n 5, /* 1 -1 */\n 1, /* 1 0 */\n 3 /* 1 1 */];\n\n var jsf = getJSF(coeffs[a], coeffs[b]);\n max = Math.max(jsf[0].length, max);\n naf[a] = new Array(max);\n naf[b] = new Array(max);\n for (j = 0; j < max; j++) {\n var ja = jsf[0][j] | 0;\n var jb = jsf[1][j] | 0;\n naf[a][j] = index[(ja + 1) * 3 + (jb + 1)];\n naf[b][j] = 0;\n wnd[a] = comb;\n }\n }\n var acc = this.jpoint(null, null, null);\n var tmp = this._wnafT4;\n for (i = max; i >= 0; i--) {\n var k = 0;\n while (i >= 0) {\n var zero = true;\n for (j = 0; j < len; j++) {\n tmp[j] = naf[j][i] | 0;\n if (tmp[j] !== 0) zero = false;\n }\n if (!zero) break;\n k++;\n i--;\n }\n if (i >= 0) k++;\n acc = acc.dblp(k);\n if (i < 0) break;\n for (j = 0; j < len; j++) {\n var z = tmp[j];\n p;\n if (z === 0) continue;else if (z > 0) p = wnd[j][z - 1 >> 1];else if (z < 0) p = wnd[j][-z - 1 >> 1].neg();\n if (p.type === 'affine') acc = acc.mixedAdd(p);else acc = acc.add(p);\n }\n }\n // Zeroify references\n for (i = 0; i < len; i++) wnd[i] = null;\n if (jacobianResult) return acc;else return acc.toP();\n};\nfunction BasePoint(curve, type) {\n this.curve = curve;\n this.type = type;\n this.precomputed = null;\n}\nBaseCurve.BasePoint = BasePoint;\nBasePoint.prototype.eq = function eq( /*other*/\n) {\n throw new Error('Not implemented');\n};\nBasePoint.prototype.validate = function validate() {\n return this.curve.validate(this);\n};\nBaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n bytes = utils.toArray(bytes, enc);\n var len = this.p.byteLength();\n\n // uncompressed, hybrid-odd, hybrid-even\n if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) && bytes.length - 1 === 2 * len) {\n if (bytes[0] === 0x06) assert(bytes[bytes.length - 1] % 2 === 0);else if (bytes[0] === 0x07) assert(bytes[bytes.length - 1] % 2 === 1);\n var res = this.point(bytes.slice(1, 1 + len), bytes.slice(1 + len, 1 + 2 * len));\n return res;\n } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) && bytes.length - 1 === len) {\n return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03);\n }\n throw new Error('Unknown point format');\n};\nBasePoint.prototype.encodeCompressed = function encodeCompressed(enc) {\n return this.encode(enc, true);\n};\nBasePoint.prototype._encode = function _encode(compact) {\n var len = this.curve.p.byteLength();\n var x = this.getX().toArray('be', len);\n if (compact) return [this.getY().isEven() ? 0x02 : 0x03].concat(x);\n return [0x04].concat(x, this.getY().toArray('be', len));\n};\nBasePoint.prototype.encode = function encode(enc, compact) {\n return utils.encode(this._encode(compact), enc);\n};\nBasePoint.prototype.precompute = function precompute(power) {\n if (this.precomputed) return this;\n var precomputed = {\n doubles: null,\n naf: null,\n beta: null\n };\n precomputed.naf = this._getNAFPoints(8);\n precomputed.doubles = this._getDoubles(4, power);\n precomputed.beta = this._getBeta();\n this.precomputed = precomputed;\n return this;\n};\nBasePoint.prototype._hasDoubles = function _hasDoubles(k) {\n if (!this.precomputed) return false;\n var doubles = this.precomputed.doubles;\n if (!doubles) return false;\n return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step);\n};\nBasePoint.prototype._getDoubles = function _getDoubles(step, power) {\n if (this.precomputed && this.precomputed.doubles) return this.precomputed.doubles;\n var doubles = [this];\n var acc = this;\n for (var i = 0; i < power; i += step) {\n for (var j = 0; j < step; j++) acc = acc.dbl();\n doubles.push(acc);\n }\n return {\n step: step,\n points: doubles\n };\n};\nBasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) {\n if (this.precomputed && this.precomputed.naf) return this.precomputed.naf;\n var res = [this];\n var max = (1 << wnd) - 1;\n var dbl = max === 1 ? null : this.dbl();\n for (var i = 1; i < max; i++) res[i] = res[i - 1].add(dbl);\n return {\n wnd: wnd,\n points: res\n };\n};\nBasePoint.prototype._getBeta = function _getBeta() {\n return null;\n};\nBasePoint.prototype.dblp = function dblp(k) {\n var r = this;\n for (var i = 0; i < k; i++) r = r.dbl();\n return r;\n};","var asn1 = require('./asn1');\nvar aesid = require('./aesid.json');\nvar fixProc = require('./fixProc');\nvar ciphers = require('browserify-aes');\nvar compat = require('pbkdf2');\nvar Buffer = require('safe-buffer').Buffer;\nmodule.exports = parseKeys;\nfunction parseKeys(buffer) {\n var password;\n if (typeof buffer === 'object' && !Buffer.isBuffer(buffer)) {\n password = buffer.passphrase;\n buffer = buffer.key;\n }\n if (typeof buffer === 'string') {\n buffer = Buffer.from(buffer);\n }\n var stripped = fixProc(buffer, password);\n var type = stripped.tag;\n var data = stripped.data;\n var subtype, ndata;\n switch (type) {\n case 'CERTIFICATE':\n ndata = asn1.certificate.decode(data, 'der').tbsCertificate.subjectPublicKeyInfo;\n // falls through\n case 'PUBLIC KEY':\n if (!ndata) {\n ndata = asn1.PublicKey.decode(data, 'der');\n }\n subtype = ndata.algorithm.algorithm.join('.');\n switch (subtype) {\n case '1.2.840.113549.1.1.1':\n return asn1.RSAPublicKey.decode(ndata.subjectPublicKey.data, 'der');\n case '1.2.840.10045.2.1':\n ndata.subjectPrivateKey = ndata.subjectPublicKey;\n return {\n type: 'ec',\n data: ndata\n };\n case '1.2.840.10040.4.1':\n ndata.algorithm.params.pub_key = asn1.DSAparam.decode(ndata.subjectPublicKey.data, 'der');\n return {\n type: 'dsa',\n data: ndata.algorithm.params\n };\n default:\n throw new Error('unknown key id ' + subtype);\n }\n // throw new Error('unknown key type ' + type)\n case 'ENCRYPTED PRIVATE KEY':\n data = asn1.EncryptedPrivateKey.decode(data, 'der');\n data = decrypt(data, password);\n // falls through\n case 'PRIVATE KEY':\n ndata = asn1.PrivateKey.decode(data, 'der');\n subtype = ndata.algorithm.algorithm.join('.');\n switch (subtype) {\n case '1.2.840.113549.1.1.1':\n return asn1.RSAPrivateKey.decode(ndata.subjectPrivateKey, 'der');\n case '1.2.840.10045.2.1':\n return {\n curve: ndata.algorithm.curve,\n privateKey: asn1.ECPrivateKey.decode(ndata.subjectPrivateKey, 'der').privateKey\n };\n case '1.2.840.10040.4.1':\n ndata.algorithm.params.priv_key = asn1.DSAparam.decode(ndata.subjectPrivateKey, 'der');\n return {\n type: 'dsa',\n params: ndata.algorithm.params\n };\n default:\n throw new Error('unknown key id ' + subtype);\n }\n // throw new Error('unknown key type ' + type)\n case 'RSA PUBLIC KEY':\n return asn1.RSAPublicKey.decode(data, 'der');\n case 'RSA PRIVATE KEY':\n return asn1.RSAPrivateKey.decode(data, 'der');\n case 'DSA PRIVATE KEY':\n return {\n type: 'dsa',\n params: asn1.DSAPrivateKey.decode(data, 'der')\n };\n case 'EC PRIVATE KEY':\n data = asn1.ECPrivateKey.decode(data, 'der');\n return {\n curve: data.parameters.value,\n privateKey: data.privateKey\n };\n default:\n throw new Error('unknown key type ' + type);\n }\n}\nparseKeys.signature = asn1.signature;\nfunction decrypt(data, password) {\n var salt = data.algorithm.decrypt.kde.kdeparams.salt;\n var iters = parseInt(data.algorithm.decrypt.kde.kdeparams.iters.toString(), 10);\n var algo = aesid[data.algorithm.decrypt.cipher.algo.join('.')];\n var iv = data.algorithm.decrypt.cipher.iv;\n var cipherText = data.subjectPrivateKey;\n var keylen = parseInt(algo.split('-')[1], 10) / 8;\n var key = compat.pbkdf2Sync(password, salt, iters, keylen, 'sha1');\n var cipher = ciphers.createDecipheriv(algo, key, iv);\n var out = [];\n out.push(cipher.update(cipherText));\n out.push(cipher.final());\n return Buffer.concat(out);\n}",";\n(function (root, factory) {\n if (typeof exports === \"object\") {\n // CommonJS\n module.exports = exports = factory(require(\"./core\"));\n } else if (typeof define === \"function\" && define.amd) {\n // AMD\n define([\"./core\"], factory);\n } else {\n // Global (browser)\n factory(root.CryptoJS);\n }\n})(this, function (CryptoJS) {\n return CryptoJS.enc.Utf8;\n});","var _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n};\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n}\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport matchPath from \"./matchPath\";\nvar isEmptyChildren = function isEmptyChildren(children) {\n return React.Children.count(children) === 0;\n};\n\n/**\n * The public API for matching a single path and rendering.\n */\n\nvar Route = function (_React$Component) {\n _inherits(Route, _React$Component);\n function Route() {\n var _temp, _this, _ret;\n _classCallCheck(this, Route);\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n match: _this.computeMatch(_this.props, _this.context.router)\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n Route.prototype.getChildContext = function getChildContext() {\n return {\n router: _extends({}, this.context.router, {\n route: {\n location: this.props.location || this.context.router.route.location,\n match: this.state.match\n }\n })\n };\n };\n Route.prototype.computeMatch = function computeMatch(_ref, router) {\n var computedMatch = _ref.computedMatch,\n location = _ref.location,\n path = _ref.path,\n strict = _ref.strict,\n exact = _ref.exact,\n sensitive = _ref.sensitive;\n if (computedMatch) return computedMatch; // already computed the match for us\n\n invariant(router, \"You should not use or withRouter() outside a \");\n var route = router.route;\n var pathname = (location || route.location).pathname;\n return matchPath(pathname, {\n path: path,\n strict: strict,\n exact: exact,\n sensitive: sensitive\n }, route.match);\n };\n Route.prototype.componentWillMount = function componentWillMount() {\n warning(!(this.props.component && this.props.render), \"You should not use and in the same route; will be ignored\");\n warning(!(this.props.component && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use and in the same route; will be ignored\");\n warning(!(this.props.render && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use and in the same route; will be ignored\");\n };\n Route.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps, nextContext) {\n warning(!(nextProps.location && !this.props.location), ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.');\n warning(!(!nextProps.location && this.props.location), ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.');\n this.setState({\n match: this.computeMatch(nextProps, nextContext.router)\n });\n };\n Route.prototype.render = function render() {\n var match = this.state.match;\n var _props = this.props,\n children = _props.children,\n component = _props.component,\n render = _props.render;\n var _context$router = this.context.router,\n history = _context$router.history,\n route = _context$router.route,\n staticContext = _context$router.staticContext;\n var location = this.props.location || route.location;\n var props = {\n match: match,\n location: location,\n history: history,\n staticContext: staticContext\n };\n if (component) return match ? React.createElement(component, props) : null;\n if (render) return match ? render(props) : null;\n if (typeof children === \"function\") return children(props);\n if (children && !isEmptyChildren(children)) return React.Children.only(children);\n return null;\n };\n return Route;\n}(React.Component);\nRoute.propTypes = {\n computedMatch: PropTypes.object,\n // private, from \n path: PropTypes.string,\n exact: PropTypes.bool,\n strict: PropTypes.bool,\n sensitive: PropTypes.bool,\n component: PropTypes.func,\n render: PropTypes.func,\n children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),\n location: PropTypes.object\n};\nRoute.contextTypes = {\n router: PropTypes.shape({\n history: PropTypes.object.isRequired,\n route: PropTypes.object.isRequired,\n staticContext: PropTypes.object\n })\n};\nRoute.childContextTypes = {\n router: PropTypes.object.isRequired\n};\nexport default Route;","import pathToRegexp from \"path-to-regexp\";\nvar patternCache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\nvar compilePath = function compilePath(pattern, options) {\n var cacheKey = \"\" + options.end + options.strict + options.sensitive;\n var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});\n if (cache[pattern]) return cache[pattern];\n var keys = [];\n var re = pathToRegexp(pattern, keys, options);\n var compiledPattern = {\n re: re,\n keys: keys\n };\n if (cacheCount < cacheLimit) {\n cache[pattern] = compiledPattern;\n cacheCount++;\n }\n return compiledPattern;\n};\n\n/**\n * Public API for matching a URL pathname to a path pattern.\n */\nvar matchPath = function matchPath(pathname) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var parent = arguments[2];\n if (typeof options === \"string\") options = {\n path: options\n };\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === undefined ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === undefined ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === undefined ? false : _options$sensitive;\n if (path == null) return parent;\n var _compilePath = compilePath(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n re = _compilePath.re,\n keys = _compilePath.keys;\n var match = re.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path pattern used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n};\nexport default matchPath;","var isarray = require('isarray');\n\n/**\n * Expose `pathToRegexp`.\n */\nmodule.exports = pathToRegexp;\nmodule.exports.parse = parse;\nmodule.exports.compile = compile;\nmodule.exports.tokensToFunction = tokensToFunction;\nmodule.exports.tokensToRegExp = tokensToRegExp;\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n// Match escaped characters that would otherwise appear in future matches.\n// This allows the user to escape special characters that won't transform.\n'(\\\\\\\\.)',\n// Match Express-style parameters and un-named parameters with a prefix\n// and optional suffixes. Matches appear as:\n//\n// \"/:test(\\\\d+)?\" => [\"/\", \"test\", \"\\d+\", undefined, \"?\", undefined]\n// \"/route(\\\\d+)\" => [undefined, undefined, undefined, \"\\d+\", undefined, undefined]\n// \"/*\" => [\"/\", undefined, undefined, undefined, undefined, \"*\"]\n'([\\\\/.])?(?:(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?|(\\\\*))'].join('|'), 'g');\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */\nfunction parse(str, options) {\n var tokens = [];\n var key = 0;\n var index = 0;\n var path = '';\n var defaultDelimiter = options && options.delimiter || '/';\n var res;\n while ((res = PATH_REGEXP.exec(str)) != null) {\n var m = res[0];\n var escaped = res[1];\n var offset = res.index;\n path += str.slice(index, offset);\n index = offset + m.length;\n\n // Ignore already escaped sequences.\n if (escaped) {\n path += escaped[1];\n continue;\n }\n var next = str[index];\n var prefix = res[2];\n var name = res[3];\n var capture = res[4];\n var group = res[5];\n var modifier = res[6];\n var asterisk = res[7];\n\n // Push the current path onto the tokens.\n if (path) {\n tokens.push(path);\n path = '';\n }\n var partial = prefix != null && next != null && next !== prefix;\n var repeat = modifier === '+' || modifier === '*';\n var optional = modifier === '?' || modifier === '*';\n var delimiter = res[2] || defaultDelimiter;\n var pattern = capture || group;\n tokens.push({\n name: name || key++,\n prefix: prefix || '',\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n partial: partial,\n asterisk: !!asterisk,\n pattern: pattern ? escapeGroup(pattern) : asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?'\n });\n }\n\n // Match any characters still remaining.\n if (index < str.length) {\n path += str.substr(index);\n }\n\n // If the path exists, push it onto the end.\n if (path) {\n tokens.push(path);\n }\n return tokens;\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!function(Object=, Object=)}\n */\nfunction compile(str, options) {\n return tokensToFunction(parse(str, options), options);\n}\n\n/**\n * Prettier encoding of URI path segments.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeURIComponentPretty(str) {\n return encodeURI(str).replace(/[\\/?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\n\n/**\n * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeAsterisk(str) {\n return encodeURI(str).replace(/[?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction(tokens, options) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options));\n }\n }\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n if (typeof token === 'string') {\n path += token;\n continue;\n }\n var value = data[token.name];\n var segment;\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined');\n }\n }\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`');\n }\n if (value.length === 0) {\n if (token.optional) {\n continue;\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty');\n }\n }\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`');\n }\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n continue;\n }\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"');\n }\n path += token.prefix + segment;\n }\n return path;\n };\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param {string} str\n * @return {string}\n */\nfunction escapeString(str) {\n return str.replace(/([.+*?=^!:${}()[\\]|\\/\\\\])/g, '\\\\$1');\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param {string} group\n * @return {string}\n */\nfunction escapeGroup(group) {\n return group.replace(/([=!:$\\/()])/g, '\\\\$1');\n}\n\n/**\n * Attach the keys as a property of the regexp.\n *\n * @param {!RegExp} re\n * @param {Array} keys\n * @return {!RegExp}\n */\nfunction attachKeys(re, keys) {\n re.keys = keys;\n return re;\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param {Object} options\n * @return {string}\n */\nfunction flags(options) {\n return options && options.sensitive ? '' : 'i';\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param {!RegExp} path\n * @param {!Array} keys\n * @return {!RegExp}\n */\nfunction regexpToRegexp(path, keys) {\n // Use a negative lookahead to match only capturing groups.\n var groups = path.source.match(/\\((?!\\?)/g);\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n partial: false,\n asterisk: false,\n pattern: null\n });\n }\n }\n return attachKeys(path, keys);\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param {!Array} path\n * @param {Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction arrayToRegexp(path, keys, options) {\n var parts = [];\n for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source);\n }\n var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options));\n return attachKeys(regexp, keys);\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param {string} path\n * @param {!Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction stringToRegexp(path, keys, options) {\n return tokensToRegExp(parse(path, options), keys, options);\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param {!Array} tokens\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction tokensToRegExp(tokens, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */keys || options;\n keys = [];\n }\n options = options || {};\n var strict = options.strict;\n var end = options.end !== false;\n var route = '';\n\n // Iterate over the tokens and create our regexp string.\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n if (typeof token === 'string') {\n route += escapeString(token);\n } else {\n var prefix = escapeString(token.prefix);\n var capture = '(?:' + token.pattern + ')';\n keys.push(token);\n if (token.repeat) {\n capture += '(?:' + prefix + capture + ')*';\n }\n if (token.optional) {\n if (!token.partial) {\n capture = '(?:' + prefix + '(' + capture + '))?';\n } else {\n capture = prefix + '(' + capture + ')?';\n }\n } else {\n capture = prefix + '(' + capture + ')';\n }\n route += capture;\n }\n }\n var delimiter = escapeString(options.delimiter || '/');\n var endsWithDelimiter = route.slice(-delimiter.length) === delimiter;\n\n // In non-strict mode we allow a slash at the end of match. If the path to\n // match already ends with a slash, we remove it for consistency. The slash\n // is valid at the end of a path match, not in the middle. This is important\n // in non-ending mode, where \"/test/\" shouldn't match \"/test//route\".\n if (!strict) {\n route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?';\n }\n if (end) {\n route += '$';\n } else {\n // In non-ending mode, we need the capturing groups to match as much as\n // possible by using a positive lookahead to the end or next path segment.\n route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)';\n }\n return attachKeys(new RegExp('^' + route, flags(options)), keys);\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param {(string|RegExp|Array)} path\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction pathToRegexp(path, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */keys || options;\n keys = [];\n }\n options = options || {};\n if (path instanceof RegExp) {\n return regexpToRegexp(path, /** @type {!Array} */keys);\n }\n if (isarray(path)) {\n return arrayToRegexp( /** @type {!Array} */path, /** @type {!Array} */keys, options);\n }\n return stringToRegexp( /** @type {string} */path, /** @type {!Array} */keys, options);\n}","import addMilliseconds from \"../addMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n/**\n * @name subMilliseconds\n * @category Millisecond Helpers\n * @summary Subtract the specified number of milliseconds from the given date.\n *\n * @description\n * Subtract the specified number of milliseconds from the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:\n * const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:29.250\n */\n\nexport default function subMilliseconds(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMilliseconds(dirtyDate, -amount);\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nexport default function getUTCISOWeekYear(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getUTCFullYear();\n var fourthOfJanuaryOfNextYear = new Date(0);\n fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);\n var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);\n var fourthOfJanuaryOfThisYear = new Date(0);\n fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);\n var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfQuarter\n * @category Quarter Helpers\n * @summary Return the start of a year quarter for the given date.\n *\n * @description\n * Return the start of a year quarter for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a quarter\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a quarter for 2 September 2014 11:55:00:\n * const result = startOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Jul 01 2014 00:00:00\n */\n\nexport default function startOfQuarter(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var currentMonth = date.getMonth();\n var month = currentMonth - currentMonth % 3;\n date.setMonth(month, 1);\n date.setHours(0, 0, 0, 0);\n return date;\n}","'use strict';\n\nexports.randomBytes = exports.rng = exports.pseudoRandomBytes = exports.prng = require('randombytes');\nexports.createHash = exports.Hash = require('create-hash');\nexports.createHmac = exports.Hmac = require('create-hmac');\nvar algos = require('browserify-sign/algos');\nvar algoKeys = Object.keys(algos);\nvar hashes = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160'].concat(algoKeys);\nexports.getHashes = function () {\n return hashes;\n};\nvar p = require('pbkdf2');\nexports.pbkdf2 = p.pbkdf2;\nexports.pbkdf2Sync = p.pbkdf2Sync;\nvar aes = require('browserify-cipher');\nexports.Cipher = aes.Cipher;\nexports.createCipher = aes.createCipher;\nexports.Cipheriv = aes.Cipheriv;\nexports.createCipheriv = aes.createCipheriv;\nexports.Decipher = aes.Decipher;\nexports.createDecipher = aes.createDecipher;\nexports.Decipheriv = aes.Decipheriv;\nexports.createDecipheriv = aes.createDecipheriv;\nexports.getCiphers = aes.getCiphers;\nexports.listCiphers = aes.listCiphers;\nvar dh = require('diffie-hellman');\nexports.DiffieHellmanGroup = dh.DiffieHellmanGroup;\nexports.createDiffieHellmanGroup = dh.createDiffieHellmanGroup;\nexports.getDiffieHellman = dh.getDiffieHellman;\nexports.createDiffieHellman = dh.createDiffieHellman;\nexports.DiffieHellman = dh.DiffieHellman;\nvar sign = require('browserify-sign');\nexports.createSign = sign.createSign;\nexports.Sign = sign.Sign;\nexports.createVerify = sign.createVerify;\nexports.Verify = sign.Verify;\nexports.createECDH = require('create-ecdh');\nvar publicEncrypt = require('public-encrypt');\nexports.publicEncrypt = publicEncrypt.publicEncrypt;\nexports.privateEncrypt = publicEncrypt.privateEncrypt;\nexports.publicDecrypt = publicEncrypt.publicDecrypt;\nexports.privateDecrypt = publicEncrypt.privateDecrypt;\n\n// the least I can do is make error messages for the rest of the node.js/crypto api.\n// ;[\n// 'createCredentials'\n// ].forEach(function (name) {\n// exports[name] = function () {\n// throw new Error([\n// 'sorry, ' + name + ' is not implemented yet',\n// 'we accept pull requests',\n// 'https://github.com/crypto-browserify/crypto-browserify'\n// ].join('\\n'))\n// }\n// })\n\nvar rf = require('randomfill');\nexports.randomFill = rf.randomFill;\nexports.randomFillSync = rf.randomFillSync;\nexports.createCredentials = function () {\n throw new Error(['sorry, createCredentials is not implemented yet', 'we accept pull requests', 'https://github.com/crypto-browserify/crypto-browserify'].join('\\n'));\n};\nexports.constants = {\n 'DH_CHECK_P_NOT_SAFE_PRIME': 2,\n 'DH_CHECK_P_NOT_PRIME': 1,\n 'DH_UNABLE_TO_CHECK_GENERATOR': 4,\n 'DH_NOT_SUITABLE_GENERATOR': 8,\n 'NPN_ENABLED': 1,\n 'ALPN_ENABLED': 1,\n 'RSA_PKCS1_PADDING': 1,\n 'RSA_SSLV23_PADDING': 2,\n 'RSA_NO_PADDING': 3,\n 'RSA_PKCS1_OAEP_PADDING': 4,\n 'RSA_X931_PADDING': 5,\n 'RSA_PKCS1_PSS_PADDING': 6,\n 'POINT_CONVERSION_COMPRESSED': 2,\n 'POINT_CONVERSION_UNCOMPRESSED': 4,\n 'POINT_CONVERSION_HYBRID': 6\n};","var formatDistanceLocale = {\n lessThanXSeconds: {\n one: 'less than a second',\n other: 'less than {{count}} seconds'\n },\n xSeconds: {\n one: '1 second',\n other: '{{count}} seconds'\n },\n halfAMinute: 'half a minute',\n lessThanXMinutes: {\n one: 'less than a minute',\n other: 'less than {{count}} minutes'\n },\n xMinutes: {\n one: '1 minute',\n other: '{{count}} minutes'\n },\n aboutXHours: {\n one: 'about 1 hour',\n other: 'about {{count}} hours'\n },\n xHours: {\n one: '1 hour',\n other: '{{count}} hours'\n },\n xDays: {\n one: '1 day',\n other: '{{count}} days'\n },\n aboutXWeeks: {\n one: 'about 1 week',\n other: 'about {{count}} weeks'\n },\n xWeeks: {\n one: '1 week',\n other: '{{count}} weeks'\n },\n aboutXMonths: {\n one: 'about 1 month',\n other: 'about {{count}} months'\n },\n xMonths: {\n one: '1 month',\n other: '{{count}} months'\n },\n aboutXYears: {\n one: 'about 1 year',\n other: 'about {{count}} years'\n },\n xYears: {\n one: '1 year',\n other: '{{count}} years'\n },\n overXYears: {\n one: 'over 1 year',\n other: 'over {{count}} years'\n },\n almostXYears: {\n one: 'almost 1 year',\n other: 'almost {{count}} years'\n }\n};\nvar formatDistance = function formatDistance(token, count, options) {\n var result;\n var tokenValue = formatDistanceLocale[token];\n if (typeof tokenValue === 'string') {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace('{{count}}', count.toString());\n }\n if (options !== null && options !== void 0 && options.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return 'in ' + result;\n } else {\n return result + ' ago';\n }\n }\n return result;\n};\nexport default formatDistance;","export default function buildFormatLongFn(args) {\n return function () {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // TODO: Remove String()\n var width = options.width ? String(options.width) : args.defaultWidth;\n var format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}","import buildFormatLongFn from \"../../../_lib/buildFormatLongFn/index.js\";\nvar dateFormats = {\n full: 'EEEE, MMMM do, y',\n long: 'MMMM do, y',\n medium: 'MMM d, y',\n short: 'MM/dd/yyyy'\n};\nvar timeFormats = {\n full: 'h:mm:ss a zzzz',\n long: 'h:mm:ss a z',\n medium: 'h:mm:ss a',\n short: 'h:mm a'\n};\nvar dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: '{{date}}, {{time}}',\n short: '{{date}}, {{time}}'\n};\nvar formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: 'full'\n }),\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: 'full'\n }),\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: 'full'\n })\n};\nexport default formatLong;","var formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: 'P'\n};\nvar formatRelative = function formatRelative(token, _date, _baseDate, _options) {\n return formatRelativeLocale[token];\n};\nexport default formatRelative;","export default function buildLocalizeFn(args) {\n return function (dirtyIndex, options) {\n var context = options !== null && options !== void 0 && options.context ? String(options.context) : 'standalone';\n var valuesArray;\n if (context === 'formatting' && args.formattingValues) {\n var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;\n valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];\n } else {\n var _defaultWidth = args.defaultWidth;\n var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;\n valuesArray = args.values[_width] || args.values[_defaultWidth];\n }\n var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n\n return valuesArray[index];\n };\n}","export default function buildMatchFn(args) {\n return function (string) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var width = options.width;\n var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];\n var matchResult = string.match(matchPattern);\n if (!matchResult) {\n return null;\n }\n var matchedString = matchResult[0];\n var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];\n var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {\n return pattern.test(matchedString);\n }) : findKey(parsePatterns, function (pattern) {\n return pattern.test(matchedString);\n });\n var value;\n value = args.valueCallback ? args.valueCallback(key) : key;\n value = options.valueCallback ? options.valueCallback(value) : value;\n var rest = string.slice(matchedString.length);\n return {\n value: value,\n rest: rest\n };\n };\n}\nfunction findKey(object, predicate) {\n for (var key in object) {\n if (object.hasOwnProperty(key) && predicate(object[key])) {\n return key;\n }\n }\n return undefined;\n}\nfunction findIndex(array, predicate) {\n for (var key = 0; key < array.length; key++) {\n if (predicate(array[key])) {\n return key;\n }\n }\n return undefined;\n}","import buildMatchFn from \"../../../_lib/buildMatchFn/index.js\";\nimport buildMatchPatternFn from \"../../../_lib/buildMatchPatternFn/index.js\";\nvar matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nvar parseOrdinalNumberPattern = /\\d+/i;\nvar matchEraPatterns = {\n narrow: /^(b|a)/i,\n abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n wide: /^(before christ|before common era|anno domini|common era)/i\n};\nvar parseEraPatterns = {\n any: [/^b/i, /^(a|c)/i]\n};\nvar matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](th|st|nd|rd)? quarter/i\n};\nvar parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i]\n};\nvar matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i\n};\nvar parseMonthPatterns = {\n narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],\n any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]\n};\nvar matchDayPatterns = {\n narrow: /^[smtwf]/i,\n short: /^(su|mo|tu|we|th|fr|sa)/i,\n abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i\n};\nvar parseDayPatterns = {\n narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]\n};\nvar matchDayPeriodPatterns = {\n narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i\n};\nvar parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mi/i,\n noon: /^no/i,\n morning: /morning/i,\n afternoon: /afternoon/i,\n evening: /evening/i,\n night: /night/i\n }\n};\nvar match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: function valueCallback(value) {\n return parseInt(value, 10);\n }\n }),\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseEraPatterns,\n defaultParseWidth: 'any'\n }),\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: 'any',\n valueCallback: function valueCallback(index) {\n return index + 1;\n }\n }),\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: 'any'\n }),\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseDayPatterns,\n defaultParseWidth: 'any'\n }),\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: 'any',\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: 'any'\n })\n};\nexport default match;","export default function buildMatchPatternFn(args) {\n return function (string) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var matchResult = string.match(args.matchPattern);\n if (!matchResult) return null;\n var matchedString = matchResult[0];\n var parseResult = string.match(args.parsePattern);\n if (!parseResult) return null;\n var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];\n value = options.valueCallback ? options.valueCallback(value) : value;\n var rest = string.slice(matchedString.length);\n return {\n value: value,\n rest: rest\n };\n };\n}","import formatDistance from \"./_lib/formatDistance/index.js\";\nimport formatLong from \"./_lib/formatLong/index.js\";\nimport formatRelative from \"./_lib/formatRelative/index.js\";\nimport localize from \"./_lib/localize/index.js\";\nimport match from \"./_lib/match/index.js\";\n\n/**\n * @type {Locale}\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}\n * @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}\n */\nvar locale = {\n code: 'en-US',\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 0\n /* Sunday */,\n\n firstWeekContainsDate: 1\n }\n};\nexport default locale;","import buildLocalizeFn from \"../../../_lib/buildLocalizeFn/index.js\";\nvar eraValues = {\n narrow: ['B', 'A'],\n abbreviated: ['BC', 'AD'],\n wide: ['Before Christ', 'Anno Domini']\n};\nvar quarterValues = {\n narrow: ['1', '2', '3', '4'],\n abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],\n wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']\n}; // Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\n\nvar monthValues = {\n narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],\n abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']\n};\nvar dayValues = {\n narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],\n short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']\n};\nvar dayPeriodValues = {\n narrow: {\n am: 'a',\n pm: 'p',\n midnight: 'mi',\n noon: 'n',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n },\n abbreviated: {\n am: 'AM',\n pm: 'PM',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n },\n wide: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n }\n};\nvar formattingDayPeriodValues = {\n narrow: {\n am: 'a',\n pm: 'p',\n midnight: 'mi',\n noon: 'n',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n },\n abbreviated: {\n am: 'AM',\n pm: 'PM',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n },\n wide: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n }\n};\nvar ordinalNumber = function ordinalNumber(dirtyNumber, _options) {\n var number = Number(dirtyNumber); // If ordinal numbers depend on context, for example,\n // if they are different for different grammatical genders,\n // use `options.unit`.\n //\n // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n // 'day', 'hour', 'minute', 'second'.\n\n var rem100 = number % 100;\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + 'st';\n case 2:\n return number + 'nd';\n case 3:\n return number + 'rd';\n }\n }\n return number + 'th';\n};\nvar localize = {\n ordinalNumber: ordinalNumber,\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: 'wide'\n }),\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: 'wide',\n argumentCallback: function argumentCallback(quarter) {\n return quarter - 1;\n }\n }),\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: 'wide'\n }),\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: 'wide'\n }),\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: 'wide',\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: 'wide'\n })\n};\nexport default localize;","import defaultLocale from \"../../locale/en-US/index.js\";\nexport default defaultLocale;","import toDate from \"../../toDate/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport startOfUTCWeekYear from \"../startOfUTCWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\nexport default function getUTCWeek(dirtyDate, options) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","import getUTCWeekYear from \"../getUTCWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function startOfUTCWeekYear(dirtyDate, options) {\n var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n requiredArgs(1, arguments);\n var defaultOptions = getDefaultOptions();\n var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);\n var year = getUTCWeekYear(dirtyDate, options);\n var firstWeek = new Date(0);\n firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setUTCHours(0, 0, 0, 0);\n var date = startOfUTCWeek(firstWeek, options);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nimport startOfUTCISOWeekYear from \"../startOfUTCISOWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\nexport default function getUTCISOWeek(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","import getUTCISOWeekYear from \"../getUTCISOWeekYear/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function startOfUTCISOWeekYear(dirtyDate) {\n requiredArgs(1, arguments);\n var year = getUTCISOWeekYear(dirtyDate);\n var fourthOfJanuary = new Date(0);\n fourthOfJanuary.setUTCFullYear(year, 0, 4);\n fourthOfJanuary.setUTCHours(0, 0, 0, 0);\n var date = startOfUTCISOWeek(fourthOfJanuary);\n return date;\n}","/*!\n * JavaScript Cookie v2.2.1\n * https://github.com/js-cookie/js-cookie\n *\n * Copyright 2006, 2015 Klaus Hartl & Fagner Brack\n * Released under the MIT license\n */\n;\n(function (factory) {\n var registeredInModuleLoader;\n if (typeof define === 'function' && define.amd) {\n define(factory);\n registeredInModuleLoader = true;\n }\n if (typeof exports === 'object') {\n module.exports = factory();\n registeredInModuleLoader = true;\n }\n if (!registeredInModuleLoader) {\n var OldCookies = window.Cookies;\n var api = window.Cookies = factory();\n api.noConflict = function () {\n window.Cookies = OldCookies;\n return api;\n };\n }\n})(function () {\n function extend() {\n var i = 0;\n var result = {};\n for (; i < arguments.length; i++) {\n var attributes = arguments[i];\n for (var key in attributes) {\n result[key] = attributes[key];\n }\n }\n return result;\n }\n function decode(s) {\n return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);\n }\n function init(converter) {\n function api() {}\n function set(key, value, attributes) {\n if (typeof document === 'undefined') {\n return;\n }\n attributes = extend({\n path: '/'\n }, api.defaults, attributes);\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);\n }\n\n // We're using \"expires\" because \"max-age\" is not supported by IE\n attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';\n try {\n var result = JSON.stringify(value);\n if (/^[\\{\\[]/.test(result)) {\n value = result;\n }\n } catch (e) {}\n value = converter.write ? converter.write(value, key) : encodeURIComponent(String(value)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);\n key = encodeURIComponent(String(key)).replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent).replace(/[\\(\\)]/g, escape);\n var stringifiedAttributes = '';\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue;\n }\n stringifiedAttributes += '; ' + attributeName;\n if (attributes[attributeName] === true) {\n continue;\n }\n\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n return document.cookie = key + '=' + value + stringifiedAttributes;\n }\n function get(key, json) {\n if (typeof document === 'undefined') {\n return;\n }\n var jar = {};\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var i = 0;\n for (; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var cookie = parts.slice(1).join('=');\n if (!json && cookie.charAt(0) === '\"') {\n cookie = cookie.slice(1, -1);\n }\n try {\n var name = decode(parts[0]);\n cookie = (converter.read || converter)(cookie, name) || decode(cookie);\n if (json) {\n try {\n cookie = JSON.parse(cookie);\n } catch (e) {}\n }\n jar[name] = cookie;\n if (key === name) {\n break;\n }\n } catch (e) {}\n }\n return key ? jar[key] : jar;\n }\n api.set = set;\n api.get = function (key) {\n return get(key, false /* read as raw */);\n };\n\n api.getJSON = function (key) {\n return get(key, true /* read as json */);\n };\n\n api.remove = function (key, attributes) {\n set(key, '', extend(attributes, {\n expires: -1\n }));\n };\n api.defaults = {};\n api.withConverter = init;\n return api;\n }\n return init(function () {});\n});",";\n(function (root, factory) {\n if (typeof exports === \"object\") {\n // CommonJS\n module.exports = exports = factory(require(\"./core\"));\n } else if (typeof define === \"function\" && define.amd) {\n // AMD\n define([\"./core\"], factory);\n } else {\n // Global (browser)\n factory(root.CryptoJS);\n }\n})(this, function (CryptoJS) {\n (function () {\n // Shortcuts\n var C = CryptoJS;\n var C_lib = C.lib;\n var WordArray = C_lib.WordArray;\n var Hasher = C_lib.Hasher;\n var C_algo = C.algo;\n\n // Reusable object\n var W = [];\n\n /**\n * SHA-1 hash algorithm.\n */\n var SHA1 = C_algo.SHA1 = Hasher.extend({\n _doReset: function _doReset() {\n this._hash = new WordArray.init([0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0]);\n },\n _doProcessBlock: function _doProcessBlock(M, offset) {\n // Shortcut\n var H = this._hash.words;\n\n // Working variables\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n // Computation\n for (var i = 0; i < 80; i++) {\n if (i < 16) {\n W[i] = M[offset + i] | 0;\n } else {\n var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];\n W[i] = n << 1 | n >>> 31;\n }\n var t = (a << 5 | a >>> 27) + e + W[i];\n if (i < 20) {\n t += (b & c | ~b & d) + 0x5a827999;\n } else if (i < 40) {\n t += (b ^ c ^ d) + 0x6ed9eba1;\n } else if (i < 60) {\n t += (b & c | b & d | c & d) - 0x70e44324;\n } else /* if (i < 80) */{\n t += (b ^ c ^ d) - 0x359d3e2a;\n }\n e = d;\n d = c;\n c = b << 30 | b >>> 2;\n b = a;\n a = t;\n }\n\n // Intermediate hash value\n H[0] = H[0] + a | 0;\n H[1] = H[1] + b | 0;\n H[2] = H[2] + c | 0;\n H[3] = H[3] + d | 0;\n H[4] = H[4] + e | 0;\n },\n _doFinalize: function _doFinalize() {\n // Shortcuts\n var data = this._data;\n var dataWords = data.words;\n var nBitsTotal = this._nDataBytes * 8;\n var nBitsLeft = data.sigBytes * 8;\n\n // Add padding\n dataWords[nBitsLeft >>> 5] |= 0x80 << 24 - nBitsLeft % 32;\n dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);\n dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal;\n data.sigBytes = dataWords.length * 4;\n\n // Hash final blocks\n this._process();\n\n // Return final computed hash\n return this._hash;\n },\n clone: function clone() {\n var clone = Hasher.clone.call(this);\n clone._hash = this._hash.clone();\n return clone;\n }\n });\n\n /**\n * Shortcut function to the hasher's object interface.\n *\n * @param {WordArray|string} message The message to hash.\n *\n * @return {WordArray} The hash.\n *\n * @static\n *\n * @example\n *\n * var hash = CryptoJS.SHA1('message');\n * var hash = CryptoJS.SHA1(wordArray);\n */\n C.SHA1 = Hasher._createHelper(SHA1);\n\n /**\n * Shortcut function to the HMAC's object interface.\n *\n * @param {WordArray|string} message The message to hash.\n * @param {WordArray|string} key The secret key.\n *\n * @return {WordArray} The HMAC.\n *\n * @static\n *\n * @example\n *\n * var hmac = CryptoJS.HmacSHA1(message, key);\n */\n C.HmacSHA1 = Hasher._createHmacHelper(SHA1);\n })();\n return CryptoJS.SHA1;\n});",";\n(function (root, factory) {\n if (typeof exports === \"object\") {\n // CommonJS\n module.exports = exports = factory(require(\"./core\"));\n } else if (typeof define === \"function\" && define.amd) {\n // AMD\n define([\"./core\"], factory);\n } else {\n // Global (browser)\n factory(root.CryptoJS);\n }\n})(this, function (CryptoJS) {\n (function () {\n // Shortcuts\n var C = CryptoJS;\n var C_lib = C.lib;\n var Base = C_lib.Base;\n var C_enc = C.enc;\n var Utf8 = C_enc.Utf8;\n var C_algo = C.algo;\n\n /**\n * HMAC algorithm.\n */\n var HMAC = C_algo.HMAC = Base.extend({\n /**\n * Initializes a newly created HMAC.\n *\n * @param {Hasher} hasher The hash algorithm to use.\n * @param {WordArray|string} key The secret key.\n *\n * @example\n *\n * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);\n */\n init: function init(hasher, key) {\n // Init hasher\n hasher = this._hasher = new hasher.init();\n\n // Convert string to WordArray, else assume WordArray already\n if (typeof key == 'string') {\n key = Utf8.parse(key);\n }\n\n // Shortcuts\n var hasherBlockSize = hasher.blockSize;\n var hasherBlockSizeBytes = hasherBlockSize * 4;\n\n // Allow arbitrary length keys\n if (key.sigBytes > hasherBlockSizeBytes) {\n key = hasher.finalize(key);\n }\n\n // Clamp excess bits\n key.clamp();\n\n // Clone key for inner and outer pads\n var oKey = this._oKey = key.clone();\n var iKey = this._iKey = key.clone();\n\n // Shortcuts\n var oKeyWords = oKey.words;\n var iKeyWords = iKey.words;\n\n // XOR keys with pad constants\n for (var i = 0; i < hasherBlockSize; i++) {\n oKeyWords[i] ^= 0x5c5c5c5c;\n iKeyWords[i] ^= 0x36363636;\n }\n oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes;\n\n // Set initial values\n this.reset();\n },\n /**\n * Resets this HMAC to its initial state.\n *\n * @example\n *\n * hmacHasher.reset();\n */\n reset: function reset() {\n // Shortcut\n var hasher = this._hasher;\n\n // Reset\n hasher.reset();\n hasher.update(this._iKey);\n },\n /**\n * Updates this HMAC with a message.\n *\n * @param {WordArray|string} messageUpdate The message to append.\n *\n * @return {HMAC} This HMAC instance.\n *\n * @example\n *\n * hmacHasher.update('message');\n * hmacHasher.update(wordArray);\n */\n update: function update(messageUpdate) {\n this._hasher.update(messageUpdate);\n\n // Chainable\n return this;\n },\n /**\n * Finalizes the HMAC computation.\n * Note that the finalize operation is effectively a destructive, read-once operation.\n *\n * @param {WordArray|string} messageUpdate (Optional) A final message update.\n *\n * @return {WordArray} The HMAC.\n *\n * @example\n *\n * var hmac = hmacHasher.finalize();\n * var hmac = hmacHasher.finalize('message');\n * var hmac = hmacHasher.finalize(wordArray);\n */\n finalize: function finalize(messageUpdate) {\n // Shortcut\n var hasher = this._hasher;\n\n // Compute HMAC\n var innerHash = hasher.finalize(messageUpdate);\n hasher.reset();\n var hmac = hasher.finalize(this._oKey.clone().concat(innerHash));\n return hmac;\n }\n });\n })();\n});","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\nmodule.exports = function hasToStringTagShams() {\n return hasSymbols() && !!Symbol.toStringTag;\n};","'use strict';\n\nvar undefined;\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function getEvalledConstructor(expressionSyntax) {\n try {\n return $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n } catch (e) {}\n};\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n try {\n $gOPD({}, '');\n } catch (e) {\n $gOPD = null; // this is IE 8, which has a broken gOPD\n }\n}\n\nvar throwTypeError = function throwTypeError() {\n throw new $TypeError();\n};\nvar ThrowTypeError = $gOPD ? function () {\n try {\n // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n arguments.callee; // IE 8 does not throw here\n return throwTypeError;\n } catch (calleeThrows) {\n try {\n // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n return $gOPD(arguments, 'callee').get;\n } catch (gOPDthrows) {\n return throwTypeError;\n }\n }\n}() : throwTypeError;\nvar hasSymbols = require('has-symbols')();\nvar getProto = Object.getPrototypeOf || function (x) {\n return x.__proto__;\n}; // eslint-disable-line no-proto\n\nvar needsEval = {};\nvar TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);\nvar INTRINSICS = {\n '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n '%Array%': Array,\n '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,\n '%AsyncFromSyncIteratorPrototype%': undefined,\n '%AsyncFunction%': needsEval,\n '%AsyncGenerator%': needsEval,\n '%AsyncGeneratorFunction%': needsEval,\n '%AsyncIteratorPrototype%': needsEval,\n '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n '%Boolean%': Boolean,\n '%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n '%Date%': Date,\n '%decodeURI%': decodeURI,\n '%decodeURIComponent%': decodeURIComponent,\n '%encodeURI%': encodeURI,\n '%encodeURIComponent%': encodeURIComponent,\n '%Error%': Error,\n '%eval%': eval,\n // eslint-disable-line no-eval\n '%EvalError%': EvalError,\n '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n '%Function%': $Function,\n '%GeneratorFunction%': needsEval,\n '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n '%isFinite%': isFinite,\n '%isNaN%': isNaN,\n '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,\n '%JSON%': typeof JSON === 'object' ? JSON : undefined,\n '%Map%': typeof Map === 'undefined' ? undefined : Map,\n '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),\n '%Math%': Math,\n '%Number%': Number,\n '%Object%': Object,\n '%parseFloat%': parseFloat,\n '%parseInt%': parseInt,\n '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n '%RangeError%': RangeError,\n '%ReferenceError%': ReferenceError,\n '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n '%RegExp%': RegExp,\n '%Set%': typeof Set === 'undefined' ? undefined : Set,\n '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),\n '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n '%String%': String,\n '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,\n '%Symbol%': hasSymbols ? Symbol : undefined,\n '%SyntaxError%': $SyntaxError,\n '%ThrowTypeError%': ThrowTypeError,\n '%TypedArray%': TypedArray,\n '%TypeError%': $TypeError,\n '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n '%URIError%': URIError,\n '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\nvar doEval = function doEval(name) {\n var value;\n if (name === '%AsyncFunction%') {\n value = getEvalledConstructor('async function () {}');\n } else if (name === '%GeneratorFunction%') {\n value = getEvalledConstructor('function* () {}');\n } else if (name === '%AsyncGeneratorFunction%') {\n value = getEvalledConstructor('async function* () {}');\n } else if (name === '%AsyncGenerator%') {\n var fn = doEval('%AsyncGeneratorFunction%');\n if (fn) {\n value = fn.prototype;\n }\n } else if (name === '%AsyncIteratorPrototype%') {\n var gen = doEval('%AsyncGenerator%');\n if (gen) {\n value = getProto(gen.prototype);\n }\n }\n INTRINSICS[name] = value;\n return value;\n};\nvar LEGACY_ALIASES = {\n '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n '%ArrayPrototype%': ['Array', 'prototype'],\n '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n '%ArrayProto_values%': ['Array', 'prototype', 'values'],\n '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n '%BooleanPrototype%': ['Boolean', 'prototype'],\n '%DataViewPrototype%': ['DataView', 'prototype'],\n '%DatePrototype%': ['Date', 'prototype'],\n '%ErrorPrototype%': ['Error', 'prototype'],\n '%EvalErrorPrototype%': ['EvalError', 'prototype'],\n '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n '%FunctionPrototype%': ['Function', 'prototype'],\n '%Generator%': ['GeneratorFunction', 'prototype'],\n '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n '%JSONParse%': ['JSON', 'parse'],\n '%JSONStringify%': ['JSON', 'stringify'],\n '%MapPrototype%': ['Map', 'prototype'],\n '%NumberPrototype%': ['Number', 'prototype'],\n '%ObjectPrototype%': ['Object', 'prototype'],\n '%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n '%PromisePrototype%': ['Promise', 'prototype'],\n '%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n '%Promise_all%': ['Promise', 'all'],\n '%Promise_reject%': ['Promise', 'reject'],\n '%Promise_resolve%': ['Promise', 'resolve'],\n '%RangeErrorPrototype%': ['RangeError', 'prototype'],\n '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n '%RegExpPrototype%': ['RegExp', 'prototype'],\n '%SetPrototype%': ['Set', 'prototype'],\n '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n '%StringPrototype%': ['String', 'prototype'],\n '%SymbolPrototype%': ['Symbol', 'prototype'],\n '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n '%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n '%TypeErrorPrototype%': ['TypeError', 'prototype'],\n '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n '%URIErrorPrototype%': ['URIError', 'prototype'],\n '%WeakMapPrototype%': ['WeakMap', 'prototype'],\n '%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n var first = $strSlice(string, 0, 1);\n var last = $strSlice(string, -1);\n if (first === '%' && last !== '%') {\n throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n } else if (last === '%' && first !== '%') {\n throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n }\n var result = [];\n $replace(string, rePropName, function (match, number, quote, subString) {\n result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n });\n return result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n var intrinsicName = name;\n var alias;\n if (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n alias = LEGACY_ALIASES[intrinsicName];\n intrinsicName = '%' + alias[0] + '%';\n }\n if (hasOwn(INTRINSICS, intrinsicName)) {\n var value = INTRINSICS[intrinsicName];\n if (value === needsEval) {\n value = doEval(intrinsicName);\n }\n if (typeof value === 'undefined' && !allowMissing) {\n throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n }\n return {\n alias: alias,\n name: intrinsicName,\n value: value\n };\n }\n throw new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n if (typeof name !== 'string' || name.length === 0) {\n throw new $TypeError('intrinsic name must be a non-empty string');\n }\n if (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n throw new $TypeError('\"allowMissing\" argument must be a boolean');\n }\n if ($exec(/^%?[^%]*%?$/, name) === null) {\n throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n }\n var parts = stringToPath(name);\n var intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n var intrinsicRealName = intrinsic.name;\n var value = intrinsic.value;\n var skipFurtherCaching = false;\n var alias = intrinsic.alias;\n if (alias) {\n intrinsicBaseName = alias[0];\n $spliceApply(parts, $concat([0, 1], alias));\n }\n for (var i = 1, isOwn = true; i < parts.length; i += 1) {\n var part = parts[i];\n var first = $strSlice(part, 0, 1);\n var last = $strSlice(part, -1);\n if ((first === '\"' || first === \"'\" || first === '`' || last === '\"' || last === \"'\" || last === '`') && first !== last) {\n throw new $SyntaxError('property names with quotes must have matching quotes');\n }\n if (part === 'constructor' || !isOwn) {\n skipFurtherCaching = true;\n }\n intrinsicBaseName += '.' + part;\n intrinsicRealName = '%' + intrinsicBaseName + '%';\n if (hasOwn(INTRINSICS, intrinsicRealName)) {\n value = INTRINSICS[intrinsicRealName];\n } else if (value != null) {\n if (!(part in value)) {\n if (!allowMissing) {\n throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n }\n return void undefined;\n }\n if ($gOPD && i + 1 >= parts.length) {\n var desc = $gOPD(value, part);\n isOwn = !!desc;\n\n // By convention, when a data property is converted to an accessor\n // property to emulate a data property that does not suffer from\n // the override mistake, that accessor's getter is marked with\n // an `originalValue` property. Here, when we detect this, we\n // uphold the illusion by pretending to see that original data\n // property, i.e., returning the value rather than the getter\n // itself.\n if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n value = desc.get;\n } else {\n value = value[part];\n }\n } else {\n isOwn = hasOwn(value, part);\n value = value[part];\n }\n if (isOwn && !skipFurtherCaching) {\n INTRINSICS[intrinsicRealName] = value;\n }\n }\n }\n return value;\n};","'use strict';\n\nvar implementation = require('./implementation');\nmodule.exports = Function.prototype.bind || implementation;","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\nif ($defineProperty) {\n try {\n $defineProperty({}, 'a', {\n value: 1\n });\n } catch (e) {\n // IE 8 has a broken defineProperty\n $defineProperty = null;\n }\n}\nmodule.exports = function callBind(originalFunction) {\n var func = $reflectApply(bind, $call, arguments);\n if ($gOPD && $defineProperty) {\n var desc = $gOPD(func, 'length');\n if (desc.configurable) {\n // original length, plus the receiver, minus any additional arguments (after the receiver)\n $defineProperty(func, 'length', {\n value: 1 + $max(0, originalFunction.length - (arguments.length - 1))\n });\n }\n }\n return func;\n};\nvar applyBind = function applyBind() {\n return $reflectApply(bind, $apply, arguments);\n};\nif ($defineProperty) {\n $defineProperty(module.exports, 'apply', {\n value: applyBind\n });\n} else {\n module.exports.apply = applyBind;\n}","'use strict';\n\nvar inherits = require('inherits');\nvar HashBase = require('hash-base');\nvar Buffer = require('safe-buffer').Buffer;\nvar ARRAY16 = new Array(16);\nfunction MD5() {\n HashBase.call(this, 64);\n\n // state\n this._a = 0x67452301;\n this._b = 0xefcdab89;\n this._c = 0x98badcfe;\n this._d = 0x10325476;\n}\ninherits(MD5, HashBase);\nMD5.prototype._update = function () {\n var M = ARRAY16;\n for (var i = 0; i < 16; ++i) M[i] = this._block.readInt32LE(i * 4);\n var a = this._a;\n var b = this._b;\n var c = this._c;\n var d = this._d;\n a = fnF(a, b, c, d, M[0], 0xd76aa478, 7);\n d = fnF(d, a, b, c, M[1], 0xe8c7b756, 12);\n c = fnF(c, d, a, b, M[2], 0x242070db, 17);\n b = fnF(b, c, d, a, M[3], 0xc1bdceee, 22);\n a = fnF(a, b, c, d, M[4], 0xf57c0faf, 7);\n d = fnF(d, a, b, c, M[5], 0x4787c62a, 12);\n c = fnF(c, d, a, b, M[6], 0xa8304613, 17);\n b = fnF(b, c, d, a, M[7], 0xfd469501, 22);\n a = fnF(a, b, c, d, M[8], 0x698098d8, 7);\n d = fnF(d, a, b, c, M[9], 0x8b44f7af, 12);\n c = fnF(c, d, a, b, M[10], 0xffff5bb1, 17);\n b = fnF(b, c, d, a, M[11], 0x895cd7be, 22);\n a = fnF(a, b, c, d, M[12], 0x6b901122, 7);\n d = fnF(d, a, b, c, M[13], 0xfd987193, 12);\n c = fnF(c, d, a, b, M[14], 0xa679438e, 17);\n b = fnF(b, c, d, a, M[15], 0x49b40821, 22);\n a = fnG(a, b, c, d, M[1], 0xf61e2562, 5);\n d = fnG(d, a, b, c, M[6], 0xc040b340, 9);\n c = fnG(c, d, a, b, M[11], 0x265e5a51, 14);\n b = fnG(b, c, d, a, M[0], 0xe9b6c7aa, 20);\n a = fnG(a, b, c, d, M[5], 0xd62f105d, 5);\n d = fnG(d, a, b, c, M[10], 0x02441453, 9);\n c = fnG(c, d, a, b, M[15], 0xd8a1e681, 14);\n b = fnG(b, c, d, a, M[4], 0xe7d3fbc8, 20);\n a = fnG(a, b, c, d, M[9], 0x21e1cde6, 5);\n d = fnG(d, a, b, c, M[14], 0xc33707d6, 9);\n c = fnG(c, d, a, b, M[3], 0xf4d50d87, 14);\n b = fnG(b, c, d, a, M[8], 0x455a14ed, 20);\n a = fnG(a, b, c, d, M[13], 0xa9e3e905, 5);\n d = fnG(d, a, b, c, M[2], 0xfcefa3f8, 9);\n c = fnG(c, d, a, b, M[7], 0x676f02d9, 14);\n b = fnG(b, c, d, a, M[12], 0x8d2a4c8a, 20);\n a = fnH(a, b, c, d, M[5], 0xfffa3942, 4);\n d = fnH(d, a, b, c, M[8], 0x8771f681, 11);\n c = fnH(c, d, a, b, M[11], 0x6d9d6122, 16);\n b = fnH(b, c, d, a, M[14], 0xfde5380c, 23);\n a = fnH(a, b, c, d, M[1], 0xa4beea44, 4);\n d = fnH(d, a, b, c, M[4], 0x4bdecfa9, 11);\n c = fnH(c, d, a, b, M[7], 0xf6bb4b60, 16);\n b = fnH(b, c, d, a, M[10], 0xbebfbc70, 23);\n a = fnH(a, b, c, d, M[13], 0x289b7ec6, 4);\n d = fnH(d, a, b, c, M[0], 0xeaa127fa, 11);\n c = fnH(c, d, a, b, M[3], 0xd4ef3085, 16);\n b = fnH(b, c, d, a, M[6], 0x04881d05, 23);\n a = fnH(a, b, c, d, M[9], 0xd9d4d039, 4);\n d = fnH(d, a, b, c, M[12], 0xe6db99e5, 11);\n c = fnH(c, d, a, b, M[15], 0x1fa27cf8, 16);\n b = fnH(b, c, d, a, M[2], 0xc4ac5665, 23);\n a = fnI(a, b, c, d, M[0], 0xf4292244, 6);\n d = fnI(d, a, b, c, M[7], 0x432aff97, 10);\n c = fnI(c, d, a, b, M[14], 0xab9423a7, 15);\n b = fnI(b, c, d, a, M[5], 0xfc93a039, 21);\n a = fnI(a, b, c, d, M[12], 0x655b59c3, 6);\n d = fnI(d, a, b, c, M[3], 0x8f0ccc92, 10);\n c = fnI(c, d, a, b, M[10], 0xffeff47d, 15);\n b = fnI(b, c, d, a, M[1], 0x85845dd1, 21);\n a = fnI(a, b, c, d, M[8], 0x6fa87e4f, 6);\n d = fnI(d, a, b, c, M[15], 0xfe2ce6e0, 10);\n c = fnI(c, d, a, b, M[6], 0xa3014314, 15);\n b = fnI(b, c, d, a, M[13], 0x4e0811a1, 21);\n a = fnI(a, b, c, d, M[4], 0xf7537e82, 6);\n d = fnI(d, a, b, c, M[11], 0xbd3af235, 10);\n c = fnI(c, d, a, b, M[2], 0x2ad7d2bb, 15);\n b = fnI(b, c, d, a, M[9], 0xeb86d391, 21);\n this._a = this._a + a | 0;\n this._b = this._b + b | 0;\n this._c = this._c + c | 0;\n this._d = this._d + d | 0;\n};\nMD5.prototype._digest = function () {\n // create padding and handle blocks\n this._block[this._blockOffset++] = 0x80;\n if (this._blockOffset > 56) {\n this._block.fill(0, this._blockOffset, 64);\n this._update();\n this._blockOffset = 0;\n }\n this._block.fill(0, this._blockOffset, 56);\n this._block.writeUInt32LE(this._length[0], 56);\n this._block.writeUInt32LE(this._length[1], 60);\n this._update();\n\n // produce result\n var buffer = Buffer.allocUnsafe(16);\n buffer.writeInt32LE(this._a, 0);\n buffer.writeInt32LE(this._b, 4);\n buffer.writeInt32LE(this._c, 8);\n buffer.writeInt32LE(this._d, 12);\n return buffer;\n};\nfunction rotl(x, n) {\n return x << n | x >>> 32 - n;\n}\nfunction fnF(a, b, c, d, m, k, s) {\n return rotl(a + (b & c | ~b & d) + m + k | 0, s) + b | 0;\n}\nfunction fnG(a, b, c, d, m, k, s) {\n return rotl(a + (b & d | c & ~d) + m + k | 0, s) + b | 0;\n}\nfunction fnH(a, b, c, d, m, k, s) {\n return rotl(a + (b ^ c ^ d) + m + k | 0, s) + b | 0;\n}\nfunction fnI(a, b, c, d, m, k, s) {\n return rotl(a + (c ^ (b | ~d)) + m + k | 0, s) + b | 0;\n}\nmodule.exports = MD5;","/**\n * Module exports.\n */\n\nmodule.exports = deprecate;\n\n/**\n * Mark that a method should not be used.\n * Returns a modified function which warns once by default.\n *\n * If `localStorage.noDeprecation = true` is set, then it is a no-op.\n *\n * If `localStorage.throwDeprecation = true` is set, then deprecated functions\n * will throw an Error when invoked.\n *\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\n * will invoke `console.trace()` instead of `console.error()`.\n *\n * @param {Function} fn - the function to deprecate\n * @param {String} msg - the string to print to the console when `fn` is invoked\n * @returns {Function} a new \"deprecated\" version of `fn`\n * @api public\n */\n\nfunction deprecate(fn, msg) {\n if (config('noDeprecation')) {\n return fn;\n }\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (config('throwDeprecation')) {\n throw new Error(msg);\n } else if (config('traceDeprecation')) {\n console.trace(msg);\n } else {\n console.warn(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n return deprecated;\n}\n\n/**\n * Checks `localStorage` for boolean values for the given `name`.\n *\n * @param {String} name\n * @returns {Boolean}\n * @api private\n */\n\nfunction config(name) {\n // accessing global.localStorage can trigger a DOMException in sandboxed iframes\n try {\n if (!global.localStorage) return false;\n } catch (_) {\n return false;\n }\n var val = global.localStorage[name];\n if (null == val) return false;\n return String(val).toLowerCase() === 'true';\n}","// Ported from https://github.com/mafintosh/end-of-stream with\n// permission from the author, Mathias Buus (@mafintosh).\n'use strict';\n\nvar ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE;\nfunction once(callback) {\n var called = false;\n return function () {\n if (called) return;\n called = true;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n callback.apply(this, args);\n };\n}\nfunction noop() {}\nfunction isRequest(stream) {\n return stream.setHeader && typeof stream.abort === 'function';\n}\nfunction eos(stream, opts, callback) {\n if (typeof opts === 'function') return eos(stream, null, opts);\n if (!opts) opts = {};\n callback = once(callback || noop);\n var readable = opts.readable || opts.readable !== false && stream.readable;\n var writable = opts.writable || opts.writable !== false && stream.writable;\n var onlegacyfinish = function onlegacyfinish() {\n if (!stream.writable) onfinish();\n };\n var writableEnded = stream._writableState && stream._writableState.finished;\n var onfinish = function onfinish() {\n writable = false;\n writableEnded = true;\n if (!readable) callback.call(stream);\n };\n var readableEnded = stream._readableState && stream._readableState.endEmitted;\n var onend = function onend() {\n readable = false;\n readableEnded = true;\n if (!writable) callback.call(stream);\n };\n var onerror = function onerror(err) {\n callback.call(stream, err);\n };\n var onclose = function onclose() {\n var err;\n if (readable && !readableEnded) {\n if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n if (writable && !writableEnded) {\n if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n };\n var onrequest = function onrequest() {\n stream.req.on('finish', onfinish);\n };\n if (isRequest(stream)) {\n stream.on('complete', onfinish);\n stream.on('abort', onclose);\n if (stream.req) onrequest();else stream.on('request', onrequest);\n } else if (writable && !stream._writableState) {\n // legacy streams\n stream.on('end', onlegacyfinish);\n stream.on('close', onlegacyfinish);\n }\n stream.on('end', onend);\n stream.on('finish', onfinish);\n if (opts.error !== false) stream.on('error', onerror);\n stream.on('close', onclose);\n return function () {\n stream.removeListener('complete', onfinish);\n stream.removeListener('abort', onclose);\n stream.removeListener('request', onrequest);\n if (stream.req) stream.req.removeListener('finish', onfinish);\n stream.removeListener('end', onlegacyfinish);\n stream.removeListener('close', onlegacyfinish);\n stream.removeListener('finish', onfinish);\n stream.removeListener('end', onend);\n stream.removeListener('error', onerror);\n stream.removeListener('close', onclose);\n };\n}\nmodule.exports = eos;","'use strict';\n\nvar Buffer = require('buffer').Buffer;\nvar inherits = require('inherits');\nvar HashBase = require('hash-base');\nvar ARRAY16 = new Array(16);\nvar zl = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13];\nvar zr = [5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11];\nvar sl = [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6];\nvar sr = [8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11];\nvar hl = [0x00000000, 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xa953fd4e];\nvar hr = [0x50a28be6, 0x5c4dd124, 0x6d703ef3, 0x7a6d76e9, 0x00000000];\nfunction RIPEMD160() {\n HashBase.call(this, 64);\n\n // state\n this._a = 0x67452301;\n this._b = 0xefcdab89;\n this._c = 0x98badcfe;\n this._d = 0x10325476;\n this._e = 0xc3d2e1f0;\n}\ninherits(RIPEMD160, HashBase);\nRIPEMD160.prototype._update = function () {\n var words = ARRAY16;\n for (var j = 0; j < 16; ++j) words[j] = this._block.readInt32LE(j * 4);\n var al = this._a | 0;\n var bl = this._b | 0;\n var cl = this._c | 0;\n var dl = this._d | 0;\n var el = this._e | 0;\n var ar = this._a | 0;\n var br = this._b | 0;\n var cr = this._c | 0;\n var dr = this._d | 0;\n var er = this._e | 0;\n\n // computation\n for (var i = 0; i < 80; i += 1) {\n var tl;\n var tr;\n if (i < 16) {\n tl = fn1(al, bl, cl, dl, el, words[zl[i]], hl[0], sl[i]);\n tr = fn5(ar, br, cr, dr, er, words[zr[i]], hr[0], sr[i]);\n } else if (i < 32) {\n tl = fn2(al, bl, cl, dl, el, words[zl[i]], hl[1], sl[i]);\n tr = fn4(ar, br, cr, dr, er, words[zr[i]], hr[1], sr[i]);\n } else if (i < 48) {\n tl = fn3(al, bl, cl, dl, el, words[zl[i]], hl[2], sl[i]);\n tr = fn3(ar, br, cr, dr, er, words[zr[i]], hr[2], sr[i]);\n } else if (i < 64) {\n tl = fn4(al, bl, cl, dl, el, words[zl[i]], hl[3], sl[i]);\n tr = fn2(ar, br, cr, dr, er, words[zr[i]], hr[3], sr[i]);\n } else {\n // if (i<80) {\n tl = fn5(al, bl, cl, dl, el, words[zl[i]], hl[4], sl[i]);\n tr = fn1(ar, br, cr, dr, er, words[zr[i]], hr[4], sr[i]);\n }\n al = el;\n el = dl;\n dl = rotl(cl, 10);\n cl = bl;\n bl = tl;\n ar = er;\n er = dr;\n dr = rotl(cr, 10);\n cr = br;\n br = tr;\n }\n\n // update state\n var t = this._b + cl + dr | 0;\n this._b = this._c + dl + er | 0;\n this._c = this._d + el + ar | 0;\n this._d = this._e + al + br | 0;\n this._e = this._a + bl + cr | 0;\n this._a = t;\n};\nRIPEMD160.prototype._digest = function () {\n // create padding and handle blocks\n this._block[this._blockOffset++] = 0x80;\n if (this._blockOffset > 56) {\n this._block.fill(0, this._blockOffset, 64);\n this._update();\n this._blockOffset = 0;\n }\n this._block.fill(0, this._blockOffset, 56);\n this._block.writeUInt32LE(this._length[0], 56);\n this._block.writeUInt32LE(this._length[1], 60);\n this._update();\n\n // produce result\n var buffer = Buffer.alloc ? Buffer.alloc(20) : new Buffer(20);\n buffer.writeInt32LE(this._a, 0);\n buffer.writeInt32LE(this._b, 4);\n buffer.writeInt32LE(this._c, 8);\n buffer.writeInt32LE(this._d, 12);\n buffer.writeInt32LE(this._e, 16);\n return buffer;\n};\nfunction rotl(x, n) {\n return x << n | x >>> 32 - n;\n}\nfunction fn1(a, b, c, d, e, m, k, s) {\n return rotl(a + (b ^ c ^ d) + m + k | 0, s) + e | 0;\n}\nfunction fn2(a, b, c, d, e, m, k, s) {\n return rotl(a + (b & c | ~b & d) + m + k | 0, s) + e | 0;\n}\nfunction fn3(a, b, c, d, e, m, k, s) {\n return rotl(a + ((b | ~c) ^ d) + m + k | 0, s) + e | 0;\n}\nfunction fn4(a, b, c, d, e, m, k, s) {\n return rotl(a + (b & d | c & ~d) + m + k | 0, s) + e | 0;\n}\nfunction fn5(a, b, c, d, e, m, k, s) {\n return rotl(a + (b ^ (c | ~d)) + m + k | 0, s) + e | 0;\n}\nmodule.exports = RIPEMD160;","var exports = module.exports = function SHA(algorithm) {\n algorithm = algorithm.toLowerCase();\n var Algorithm = exports[algorithm];\n if (!Algorithm) throw new Error(algorithm + ' is not supported (we accept pull requests)');\n return new Algorithm();\n};\nexports.sha = require('./sha');\nexports.sha1 = require('./sha1');\nexports.sha224 = require('./sha224');\nexports.sha256 = require('./sha256');\nexports.sha384 = require('./sha384');\nexports.sha512 = require('./sha512');","exports = module.exports = require('./lib/_stream_readable.js');\nexports.Stream = exports;\nexports.Readable = exports;\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');","/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer');\nvar Buffer = buffer.Buffer;\n\n// alternative to using Object.keys for old browsers\nfunction copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer;\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports);\n exports.Buffer = SafeBuffer;\n}\nfunction SafeBuffer(arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length);\n}\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer);\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number');\n }\n return Buffer(arg, encodingOrOffset, length);\n};\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number');\n }\n var buf = Buffer(size);\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding);\n } else {\n buf.fill(fill);\n }\n } else {\n buf.fill(0);\n }\n return buf;\n};\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number');\n }\n return Buffer(size);\n};\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number');\n }\n return buffer.SlowBuffer(size);\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n'use strict';\n\n/**/\nvar pna = require('process-nextick-args');\n/**/\n\nmodule.exports = Writable;\n\n/* */\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n var _this = this;\n this.next = null;\n this.entry = null;\n this.finish = function () {\n onCorkedFinish(_this, state);\n };\n}\n/* */\n\n/**/\nvar asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;\n/**/\n\n/**/\nvar Duplex;\n/**/\n\nWritable.WritableState = WritableState;\n\n/**/\nvar util = Object.create(require('core-util-is'));\nutil.inherits = require('inherits');\n/**/\n\n/**/\nvar internalUtil = {\n deprecate: require('util-deprecate')\n};\n/**/\n\n/**/\nvar Stream = require('./internal/streams/stream');\n/**/\n\n/**/\n\nvar Buffer = require('safe-buffer').Buffer;\nvar OurUint8Array = global.Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/**/\n\nvar destroyImpl = require('./internal/streams/destroy');\nutil.inherits(Writable, Stream);\nfunction nop() {}\nfunction WritableState(options, stream) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n var isDuplex = stream instanceof Duplex;\n\n // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n var hwm = options.highWaterMark;\n var writableHwm = options.writableHighWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;\n\n // cast to ints.\n this.highWaterMark = Math.floor(this.highWaterMark);\n\n // if _final has been called\n this.finalCalled = false;\n\n // drain event flag.\n this.needDrain = false;\n // at the start of calling end()\n this.ending = false;\n // when end() has been called, and returned\n this.ended = false;\n // when 'finish' is emitted\n this.finished = false;\n\n // has it been destroyed\n this.destroyed = false;\n\n // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n this.length = 0;\n\n // a flag to see when we're in the middle of a write.\n this.writing = false;\n\n // when true all writes will be buffered until .uncork() call\n this.corked = 0;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n this.bufferProcessing = false;\n\n // the callback that's passed to _write(chunk,cb)\n this.onwrite = function (er) {\n onwrite(stream, er);\n };\n\n // the callback that the user supplies to write(chunk,encoding,cb)\n this.writecb = null;\n\n // the amount that is being written when _write is called.\n this.writelen = 0;\n this.bufferedRequest = null;\n this.lastBufferedRequest = null;\n\n // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n this.pendingcb = 0;\n\n // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n this.prefinished = false;\n\n // True if the error was already emitted and should not be thrown again\n this.errorEmitted = false;\n\n // count buffered requests\n this.bufferedRequestCount = 0;\n\n // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n this.corkedRequestsFree = new CorkedRequest(this);\n}\nWritableState.prototype.getBuffer = function getBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n while (current) {\n out.push(current);\n current = current.next;\n }\n return out;\n};\n(function () {\n try {\n Object.defineProperty(WritableState.prototype, 'buffer', {\n get: internalUtil.deprecate(function () {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n });\n } catch (_) {}\n})();\n\n// Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\nvar realHasInstance;\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n realHasInstance = Function.prototype[Symbol.hasInstance];\n Object.defineProperty(Writable, Symbol.hasInstance, {\n value: function value(object) {\n if (realHasInstance.call(this, object)) return true;\n if (this !== Writable) return false;\n return object && object._writableState instanceof WritableState;\n }\n });\n} else {\n realHasInstance = function realHasInstance(object) {\n return object instanceof this;\n };\n}\nfunction Writable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n\n // Writable ctor is applied to Duplexes, too.\n // `realHasInstance` is necessary because using plain `instanceof`\n // would return false, as no `_writableState` property is attached.\n\n // Trying to use the custom `instanceof` for Writable here will also break the\n // Node.js LazyTransform implementation, which has a non-trivial getter for\n // `_writableState` that would lead to infinite recursion.\n if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {\n return new Writable(options);\n }\n this._writableState = new WritableState(options, this);\n\n // legacy.\n this.writable = true;\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n if (typeof options.writev === 'function') this._writev = options.writev;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n if (typeof options.final === 'function') this._final = options.final;\n }\n Stream.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n this.emit('error', new Error('Cannot pipe, not readable'));\n};\nfunction writeAfterEnd(stream, cb) {\n var er = new Error('write after end');\n // TODO: defer error events consistently everywhere, not just the cb\n stream.emit('error', er);\n pna.nextTick(cb, er);\n}\n\n// Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\nfunction validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n pna.nextTick(cb, er);\n valid = false;\n }\n return valid;\n}\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n var isBuf = !state.objectMode && _isUint8Array(chunk);\n if (isBuf && !Buffer.isBuffer(chunk)) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n if (typeof cb !== 'function') cb = nop;\n if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n }\n return ret;\n};\nWritable.prototype.cork = function () {\n var state = this._writableState;\n state.corked++;\n};\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n if (state.corked) {\n state.corked--;\n if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n};\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n return chunk;\n}\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n});\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n if (!isBuf) {\n var newChunk = decodeChunk(state, chunk, encoding);\n if (chunk !== newChunk) {\n isBuf = true;\n encoding = 'buffer';\n chunk = newChunk;\n }\n }\n var len = state.objectMode ? 1 : chunk.length;\n state.length += len;\n var ret = state.length < state.highWaterMark;\n // we must ensure that previous needDrain will not be reset to false.\n if (!ret) state.needDrain = true;\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = {\n chunk: chunk,\n encoding: encoding,\n isBuf: isBuf,\n callback: cb,\n next: null\n };\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n return ret;\n}\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\nfunction onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n if (sync) {\n // defer the callback if we are being called synchronously\n // to avoid piling up things on the stack\n pna.nextTick(cb, er);\n // this can emit finish, and it will always happen\n // after error\n pna.nextTick(finishMaybe, stream, state);\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n } else {\n // the caller expect this to happen before if\n // it is async\n cb(er);\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n // this can emit finish, but finish must\n // always follow error\n finishMaybe(stream, state);\n }\n}\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n onwriteStateUpdate(state);\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state);\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n if (sync) {\n /**/\n asyncWrite(afterWrite, stream, state, finished, cb);\n /**/\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n state.bufferedRequestCount = 0;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n state.bufferedRequestCount--;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n if (entry === null) state.lastBufferedRequest = null;\n }\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new Error('_write() is not implemented'));\n};\nWritable.prototype._writev = null;\nWritable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n // .end() fully uncorks\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n }\n\n // ignore unnecessary end() calls.\n if (!state.ending && !state.finished) endWritable(this, state, cb);\n};\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\nfunction callFinal(stream, state) {\n stream._final(function (err) {\n state.pendingcb--;\n if (err) {\n stream.emit('error', err);\n }\n state.prefinished = true;\n stream.emit('prefinish');\n finishMaybe(stream, state);\n });\n}\nfunction prefinish(stream, state) {\n if (!state.prefinished && !state.finalCalled) {\n if (typeof stream._final === 'function') {\n state.pendingcb++;\n state.finalCalled = true;\n pna.nextTick(callFinal, stream, state);\n } else {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n }\n}\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n if (need) {\n prefinish(stream, state);\n if (state.pendingcb === 0) {\n state.finished = true;\n stream.emit('finish');\n }\n }\n return need;\n}\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n if (cb) {\n if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);\n }\n state.ended = true;\n stream.writable = false;\n}\nfunction onCorkedFinish(corkReq, state, err) {\n var entry = corkReq.entry;\n corkReq.entry = null;\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n }\n if (state.corkedRequestsFree) {\n state.corkedRequestsFree.next = corkReq;\n } else {\n state.corkedRequestsFree = corkReq;\n }\n}\nObject.defineProperty(Writable.prototype, 'destroyed', {\n get: function get() {\n if (this._writableState === undefined) {\n return false;\n }\n return this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._writableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._writableState.destroyed = value;\n }\n});\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\nWritable.prototype._destroy = function (err, cb) {\n this.end();\n cb(err);\n};","'use strict';\n\nvar assert = require('minimalistic-assert');\nfunction Cipher(options) {\n this.options = options;\n this.type = this.options.type;\n this.blockSize = 8;\n this._init();\n this.buffer = new Array(this.blockSize);\n this.bufferOff = 0;\n}\nmodule.exports = Cipher;\nCipher.prototype._init = function _init() {\n // Might be overrided\n};\nCipher.prototype.update = function update(data) {\n if (data.length === 0) return [];\n if (this.type === 'decrypt') return this._updateDecrypt(data);else return this._updateEncrypt(data);\n};\nCipher.prototype._buffer = function _buffer(data, off) {\n // Append data to buffer\n var min = Math.min(this.buffer.length - this.bufferOff, data.length - off);\n for (var i = 0; i < min; i++) this.buffer[this.bufferOff + i] = data[off + i];\n this.bufferOff += min;\n\n // Shift next\n return min;\n};\nCipher.prototype._flushBuffer = function _flushBuffer(out, off) {\n this._update(this.buffer, 0, out, off);\n this.bufferOff = 0;\n return this.blockSize;\n};\nCipher.prototype._updateEncrypt = function _updateEncrypt(data) {\n var inputOff = 0;\n var outputOff = 0;\n var count = (this.bufferOff + data.length) / this.blockSize | 0;\n var out = new Array(count * this.blockSize);\n if (this.bufferOff !== 0) {\n inputOff += this._buffer(data, inputOff);\n if (this.bufferOff === this.buffer.length) outputOff += this._flushBuffer(out, outputOff);\n }\n\n // Write blocks\n var max = data.length - (data.length - inputOff) % this.blockSize;\n for (; inputOff < max; inputOff += this.blockSize) {\n this._update(data, inputOff, out, outputOff);\n outputOff += this.blockSize;\n }\n\n // Queue rest\n for (; inputOff < data.length; inputOff++, this.bufferOff++) this.buffer[this.bufferOff] = data[inputOff];\n return out;\n};\nCipher.prototype._updateDecrypt = function _updateDecrypt(data) {\n var inputOff = 0;\n var outputOff = 0;\n var count = Math.ceil((this.bufferOff + data.length) / this.blockSize) - 1;\n var out = new Array(count * this.blockSize);\n\n // TODO(indutny): optimize it, this is far from optimal\n for (; count > 0; count--) {\n inputOff += this._buffer(data, inputOff);\n outputOff += this._flushBuffer(out, outputOff);\n }\n\n // Buffer rest of the input\n inputOff += this._buffer(data, inputOff);\n return out;\n};\nCipher.prototype.final = function final(buffer) {\n var first;\n if (buffer) first = this.update(buffer);\n var last;\n if (this.type === 'encrypt') last = this._finalEncrypt();else last = this._finalDecrypt();\n if (first) return first.concat(last);else return last;\n};\nCipher.prototype._pad = function _pad(buffer, off) {\n if (off === 0) return false;\n while (off < buffer.length) buffer[off++] = 0;\n return true;\n};\nCipher.prototype._finalEncrypt = function _finalEncrypt() {\n if (!this._pad(this.buffer, this.bufferOff)) return [];\n var out = new Array(this.blockSize);\n this._update(this.buffer, 0, out, 0);\n return out;\n};\nCipher.prototype._unpad = function _unpad(buffer) {\n return buffer;\n};\nCipher.prototype._finalDecrypt = function _finalDecrypt() {\n assert.equal(this.bufferOff, this.blockSize, 'Not enough data to decrypt');\n var out = new Array(this.blockSize);\n this._flushBuffer(out, 0);\n return this._unpad(out);\n};","var ciphers = require('./encrypter');\nvar deciphers = require('./decrypter');\nvar modes = require('./modes/list.json');\nfunction getCiphers() {\n return Object.keys(modes);\n}\nexports.createCipher = exports.Cipher = ciphers.createCipher;\nexports.createCipheriv = exports.Cipheriv = ciphers.createCipheriv;\nexports.createDecipher = exports.Decipher = deciphers.createDecipher;\nexports.createDecipheriv = exports.Decipheriv = deciphers.createDecipheriv;\nexports.listCiphers = exports.getCiphers = getCiphers;","var modeModules = {\n ECB: require('./ecb'),\n CBC: require('./cbc'),\n CFB: require('./cfb'),\n CFB8: require('./cfb8'),\n CFB1: require('./cfb1'),\n OFB: require('./ofb'),\n CTR: require('./ctr'),\n GCM: require('./ctr')\n};\nvar modes = require('./list.json');\nfor (var key in modes) {\n modes[key].module = modeModules[modes[key].mode];\n}\nmodule.exports = modes;","var r;\nmodule.exports = function rand(len) {\n if (!r) r = new Rand(null);\n return r.generate(len);\n};\nfunction Rand(rand) {\n this.rand = rand;\n}\nmodule.exports.Rand = Rand;\nRand.prototype.generate = function generate(len) {\n return this._rand(len);\n};\n\n// Emulate crypto API using randy\nRand.prototype._rand = function _rand(n) {\n if (this.rand.getBytes) return this.rand.getBytes(n);\n var res = new Uint8Array(n);\n for (var i = 0; i < res.length; i++) res[i] = this.rand.getByte();\n return res;\n};\nif (typeof self === 'object') {\n if (self.crypto && self.crypto.getRandomValues) {\n // Modern browsers\n Rand.prototype._rand = function _rand(n) {\n var arr = new Uint8Array(n);\n self.crypto.getRandomValues(arr);\n return arr;\n };\n } else if (self.msCrypto && self.msCrypto.getRandomValues) {\n // IE\n Rand.prototype._rand = function _rand(n) {\n var arr = new Uint8Array(n);\n self.msCrypto.getRandomValues(arr);\n return arr;\n };\n\n // Safari's WebWorkers do not have `crypto`\n } else if (typeof window === 'object') {\n // Old junk\n Rand.prototype._rand = function () {\n throw new Error('Not implemented yet');\n };\n }\n} else {\n // Node.js or Web worker with no crypto support\n try {\n var crypto = require('crypto');\n if (typeof crypto.randomBytes !== 'function') throw new Error('Not supported');\n Rand.prototype._rand = function _rand(n) {\n return crypto.randomBytes(n);\n };\n } catch (e) {}\n}","// Ported from https://github.com/mafintosh/end-of-stream with\n// permission from the author, Mathias Buus (@mafintosh).\n'use strict';\n\nvar ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE;\nfunction once(callback) {\n var called = false;\n return function () {\n if (called) return;\n called = true;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n callback.apply(this, args);\n };\n}\nfunction noop() {}\nfunction isRequest(stream) {\n return stream.setHeader && typeof stream.abort === 'function';\n}\nfunction eos(stream, opts, callback) {\n if (typeof opts === 'function') return eos(stream, null, opts);\n if (!opts) opts = {};\n callback = once(callback || noop);\n var readable = opts.readable || opts.readable !== false && stream.readable;\n var writable = opts.writable || opts.writable !== false && stream.writable;\n var onlegacyfinish = function onlegacyfinish() {\n if (!stream.writable) onfinish();\n };\n var writableEnded = stream._writableState && stream._writableState.finished;\n var onfinish = function onfinish() {\n writable = false;\n writableEnded = true;\n if (!readable) callback.call(stream);\n };\n var readableEnded = stream._readableState && stream._readableState.endEmitted;\n var onend = function onend() {\n readable = false;\n readableEnded = true;\n if (!writable) callback.call(stream);\n };\n var onerror = function onerror(err) {\n callback.call(stream, err);\n };\n var onclose = function onclose() {\n var err;\n if (readable && !readableEnded) {\n if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n if (writable && !writableEnded) {\n if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n return callback.call(stream, err);\n }\n };\n var onrequest = function onrequest() {\n stream.req.on('finish', onfinish);\n };\n if (isRequest(stream)) {\n stream.on('complete', onfinish);\n stream.on('abort', onclose);\n if (stream.req) onrequest();else stream.on('request', onrequest);\n } else if (writable && !stream._writableState) {\n // legacy streams\n stream.on('end', onlegacyfinish);\n stream.on('close', onlegacyfinish);\n }\n stream.on('end', onend);\n stream.on('finish', onfinish);\n if (opts.error !== false) stream.on('error', onerror);\n stream.on('close', onclose);\n return function () {\n stream.removeListener('complete', onfinish);\n stream.removeListener('abort', onclose);\n stream.removeListener('request', onrequest);\n if (stream.req) stream.req.removeListener('finish', onfinish);\n stream.removeListener('end', onlegacyfinish);\n stream.removeListener('close', onlegacyfinish);\n stream.removeListener('finish', onfinish);\n stream.removeListener('end', onend);\n stream.removeListener('error', onerror);\n stream.removeListener('close', onclose);\n };\n}\nmodule.exports = eos;","var BN = require('bn.js');\nvar randomBytes = require('randombytes');\nfunction blind(priv) {\n var r = getr(priv);\n var blinder = r.toRed(BN.mont(priv.modulus)).redPow(new BN(priv.publicExponent)).fromRed();\n return {\n blinder: blinder,\n unblinder: r.invm(priv.modulus)\n };\n}\nfunction getr(priv) {\n var len = priv.modulus.byteLength();\n var r;\n do {\n r = new BN(randomBytes(len));\n } while (r.cmp(priv.modulus) >= 0 || !r.umod(priv.prime1) || !r.umod(priv.prime2));\n return r;\n}\nfunction crt(msg, priv) {\n var blinds = blind(priv);\n var len = priv.modulus.byteLength();\n var blinded = new BN(msg).mul(blinds.blinder).umod(priv.modulus);\n var c1 = blinded.toRed(BN.mont(priv.prime1));\n var c2 = blinded.toRed(BN.mont(priv.prime2));\n var qinv = priv.coefficient;\n var p = priv.prime1;\n var q = priv.prime2;\n var m1 = c1.redPow(priv.exponent1).fromRed();\n var m2 = c2.redPow(priv.exponent2).fromRed();\n var h = m1.isub(m2).imul(qinv).umod(p).imul(q);\n return m2.iadd(h).imul(blinds.unblinder).umod(priv.modulus).toArrayLike(Buffer, 'be', len);\n}\ncrt.getr = getr;\nmodule.exports = crt;","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert(val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits(ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function TempCtor() {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN(number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n BN.BN = BN;\n BN.wordSize = 26;\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {}\n BN.isBN = function isBN(num) {\n if (num instanceof BN) {\n return true;\n }\n return num !== null && typeof num === 'object' && num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n BN.max = function max(left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n BN.min = function min(left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n BN.prototype._init = function init(number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n BN.prototype._initNumber = function _initNumber(number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [number & 0x3ffffff];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [number & 0x3ffffff, number / 0x4000000 & 0x3ffffff];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [number & 0x3ffffff, number / 0x4000000 & 0x3ffffff, 1];\n this.length = 3;\n }\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n BN.prototype._initArray = function _initArray(number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | number[i - 1] << 8 | number[i - 2] << 16;\n this.words[j] |= w << off & 0x3ffffff;\n this.words[j + 1] = w >>> 26 - off & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | number[i + 1] << 8 | number[i + 2] << 16;\n this.words[j] |= w << off & 0x3ffffff;\n this.words[j + 1] = w >>> 26 - off & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this._strip();\n };\n function parseHex4Bits(string, index) {\n var c = string.charCodeAt(index);\n // '0' - '9'\n if (c >= 48 && c <= 57) {\n return c - 48;\n // 'A' - 'F'\n } else if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n } else {\n assert(false, 'Invalid character in ' + string);\n }\n }\n function parseHexByte(string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n BN.prototype._parseHex = function _parseHex(number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n this._strip();\n };\n function parseBase(str, start, end, mul) {\n var r = 0;\n var b = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n b = c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n b = c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n b = c;\n }\n assert(c >= 0 && b < mul, 'Invalid character');\n r += b;\n }\n return r;\n }\n BN.prototype._parseBase = function _parseBase(number, base, start) {\n // Initialize as zero\n this.words = [0];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = limbPow / base | 0;\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n this._strip();\n };\n BN.prototype.copy = function copy(dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n function move(dest, src) {\n dest.words = src.words;\n dest.length = src.length;\n dest.negative = src.negative;\n dest.red = src.red;\n }\n BN.prototype._move = function _move(dest) {\n move(dest, this);\n };\n BN.prototype.clone = function clone() {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n BN.prototype._expand = function _expand(size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype._strip = function strip() {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n BN.prototype._normSign = function _normSign() {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n // Check Symbol.for because not everywhere where Symbol defined\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#Browser_compatibility\n if (typeof Symbol !== 'undefined' && typeof Symbol.for === 'function') {\n try {\n BN.prototype[Symbol.for('nodejs.util.inspect.custom')] = inspect;\n } catch (e) {\n BN.prototype.inspect = inspect;\n }\n } else {\n BN.prototype.inspect = inspect;\n }\n function inspect() {\n return (this.red ? '';\n }\n\n /*\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n */\n\n var zeros = ['', '0', '00', '000', '0000', '00000', '000000', '0000000', '00000000', '000000000', '0000000000', '00000000000', '000000000000', '0000000000000', '00000000000000', '000000000000000', '0000000000000000', '00000000000000000', '000000000000000000', '0000000000000000000', '00000000000000000000', '000000000000000000000', '0000000000000000000000', '00000000000000000000000', '000000000000000000000000', '0000000000000000000000000'];\n var groupSizes = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5];\n var groupBases = [0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632, 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149, 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176];\n BN.prototype.toString = function toString(base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = ((w << off | carry) & 0xffffff).toString(16);\n carry = w >>> 24 - off & 0xffffff;\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modrn(groupBase).toString(base);\n c = c.idivn(groupBase);\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n assert(false, 'Base should be between 2 and 36');\n };\n BN.prototype.toNumber = function toNumber() {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + this.words[1] * 0x4000000;\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return this.negative !== 0 ? -ret : ret;\n };\n BN.prototype.toJSON = function toJSON() {\n return this.toString(16, 2);\n };\n if (Buffer) {\n BN.prototype.toBuffer = function toBuffer(endian, length) {\n return this.toArrayLike(Buffer, endian, length);\n };\n }\n BN.prototype.toArray = function toArray(endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n var allocate = function allocate(ArrayType, size) {\n if (ArrayType.allocUnsafe) {\n return ArrayType.allocUnsafe(size);\n }\n return new ArrayType(size);\n };\n BN.prototype.toArrayLike = function toArrayLike(ArrayType, endian, length) {\n this._strip();\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n var res = allocate(ArrayType, reqLength);\n var postfix = endian === 'le' ? 'LE' : 'BE';\n this['_toArrayLike' + postfix](res, byteLength);\n return res;\n };\n BN.prototype._toArrayLikeLE = function _toArrayLikeLE(res, byteLength) {\n var position = 0;\n var carry = 0;\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = this.words[i] << shift | carry;\n res[position++] = word & 0xff;\n if (position < res.length) {\n res[position++] = word >> 8 & 0xff;\n }\n if (position < res.length) {\n res[position++] = word >> 16 & 0xff;\n }\n if (shift === 6) {\n if (position < res.length) {\n res[position++] = word >> 24 & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n if (position < res.length) {\n res[position++] = carry;\n while (position < res.length) {\n res[position++] = 0;\n }\n }\n };\n BN.prototype._toArrayLikeBE = function _toArrayLikeBE(res, byteLength) {\n var position = res.length - 1;\n var carry = 0;\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = this.words[i] << shift | carry;\n res[position--] = word & 0xff;\n if (position >= 0) {\n res[position--] = word >> 8 & 0xff;\n }\n if (position >= 0) {\n res[position--] = word >> 16 & 0xff;\n }\n if (shift === 6) {\n if (position >= 0) {\n res[position--] = word >> 24 & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n if (position >= 0) {\n res[position--] = carry;\n while (position >= 0) {\n res[position--] = 0;\n }\n }\n };\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits(w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits(w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n BN.prototype._zeroBits = function _zeroBits(w) {\n // Short-cut\n if (w === 0) return 26;\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength() {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n function toBitArray(num) {\n var w = new Array(num.bitLength());\n for (var bit = 0; bit < w.length; bit++) {\n var off = bit / 26 | 0;\n var wbit = bit % 26;\n w[bit] = num.words[off] >>> wbit & 0x01;\n }\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits() {\n if (this.isZero()) return 0;\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n BN.prototype.byteLength = function byteLength() {\n return Math.ceil(this.bitLength() / 8);\n };\n BN.prototype.toTwos = function toTwos(width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n BN.prototype.fromTwos = function fromTwos(width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n BN.prototype.isNeg = function isNeg() {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg() {\n return this.clone().ineg();\n };\n BN.prototype.ineg = function ineg() {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor(num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n return this._strip();\n };\n BN.prototype.ior = function ior(num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or(num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n BN.prototype.uor = function uor(num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand(num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n this.length = b.length;\n return this._strip();\n };\n BN.prototype.iand = function iand(num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and(num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n BN.prototype.uand = function uand(num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor(num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n this.length = a.length;\n return this._strip();\n };\n BN.prototype.ixor = function ixor(num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor(num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n BN.prototype.uxor = function uxor(num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn(width) {\n assert(typeof width === 'number' && width >= 0);\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & 0x3ffffff >> 26 - bitsLeft;\n }\n\n // And remove leading zeroes\n return this._strip();\n };\n BN.prototype.notn = function notn(width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn(bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n var off = bit / 26 | 0;\n var wbit = bit % 26;\n this._expand(off + 1);\n if (val) {\n this.words[off] = this.words[off] | 1 << wbit;\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n return this._strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd(num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add(num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n if (this.length > num.length) return this.clone().iadd(num);\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub(num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n this.length = Math.max(this.length, i);\n if (a !== this) {\n this.negative = 1;\n }\n return this._strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub(num) {\n return this.clone().isub(num);\n };\n function smallMulTo(self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = self.length + num.length | 0;\n out.length = len;\n len = len - 1 | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n var lo = r & 0x3ffffff;\n var carry = r / 0x4000000 | 0;\n out.words[0] = lo;\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += r / 0x4000000 | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n return out._strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo(self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = mid + Math.imul(ah0, bl0) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w0 >>> 26) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = mid + Math.imul(ah1, bl0) | 0;\n hi = Math.imul(ah1, bh0);\n lo = lo + Math.imul(al0, bl1) | 0;\n mid = mid + Math.imul(al0, bh1) | 0;\n mid = mid + Math.imul(ah0, bl1) | 0;\n hi = hi + Math.imul(ah0, bh1) | 0;\n var w1 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w1 >>> 26) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = mid + Math.imul(ah2, bl0) | 0;\n hi = Math.imul(ah2, bh0);\n lo = lo + Math.imul(al1, bl1) | 0;\n mid = mid + Math.imul(al1, bh1) | 0;\n mid = mid + Math.imul(ah1, bl1) | 0;\n hi = hi + Math.imul(ah1, bh1) | 0;\n lo = lo + Math.imul(al0, bl2) | 0;\n mid = mid + Math.imul(al0, bh2) | 0;\n mid = mid + Math.imul(ah0, bl2) | 0;\n hi = hi + Math.imul(ah0, bh2) | 0;\n var w2 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w2 >>> 26) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = mid + Math.imul(ah3, bl0) | 0;\n hi = Math.imul(ah3, bh0);\n lo = lo + Math.imul(al2, bl1) | 0;\n mid = mid + Math.imul(al2, bh1) | 0;\n mid = mid + Math.imul(ah2, bl1) | 0;\n hi = hi + Math.imul(ah2, bh1) | 0;\n lo = lo + Math.imul(al1, bl2) | 0;\n mid = mid + Math.imul(al1, bh2) | 0;\n mid = mid + Math.imul(ah1, bl2) | 0;\n hi = hi + Math.imul(ah1, bh2) | 0;\n lo = lo + Math.imul(al0, bl3) | 0;\n mid = mid + Math.imul(al0, bh3) | 0;\n mid = mid + Math.imul(ah0, bl3) | 0;\n hi = hi + Math.imul(ah0, bh3) | 0;\n var w3 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w3 >>> 26) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = mid + Math.imul(ah4, bl0) | 0;\n hi = Math.imul(ah4, bh0);\n lo = lo + Math.imul(al3, bl1) | 0;\n mid = mid + Math.imul(al3, bh1) | 0;\n mid = mid + Math.imul(ah3, bl1) | 0;\n hi = hi + Math.imul(ah3, bh1) | 0;\n lo = lo + Math.imul(al2, bl2) | 0;\n mid = mid + Math.imul(al2, bh2) | 0;\n mid = mid + Math.imul(ah2, bl2) | 0;\n hi = hi + Math.imul(ah2, bh2) | 0;\n lo = lo + Math.imul(al1, bl3) | 0;\n mid = mid + Math.imul(al1, bh3) | 0;\n mid = mid + Math.imul(ah1, bl3) | 0;\n hi = hi + Math.imul(ah1, bh3) | 0;\n lo = lo + Math.imul(al0, bl4) | 0;\n mid = mid + Math.imul(al0, bh4) | 0;\n mid = mid + Math.imul(ah0, bl4) | 0;\n hi = hi + Math.imul(ah0, bh4) | 0;\n var w4 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w4 >>> 26) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = mid + Math.imul(ah5, bl0) | 0;\n hi = Math.imul(ah5, bh0);\n lo = lo + Math.imul(al4, bl1) | 0;\n mid = mid + Math.imul(al4, bh1) | 0;\n mid = mid + Math.imul(ah4, bl1) | 0;\n hi = hi + Math.imul(ah4, bh1) | 0;\n lo = lo + Math.imul(al3, bl2) | 0;\n mid = mid + Math.imul(al3, bh2) | 0;\n mid = mid + Math.imul(ah3, bl2) | 0;\n hi = hi + Math.imul(ah3, bh2) | 0;\n lo = lo + Math.imul(al2, bl3) | 0;\n mid = mid + Math.imul(al2, bh3) | 0;\n mid = mid + Math.imul(ah2, bl3) | 0;\n hi = hi + Math.imul(ah2, bh3) | 0;\n lo = lo + Math.imul(al1, bl4) | 0;\n mid = mid + Math.imul(al1, bh4) | 0;\n mid = mid + Math.imul(ah1, bl4) | 0;\n hi = hi + Math.imul(ah1, bh4) | 0;\n lo = lo + Math.imul(al0, bl5) | 0;\n mid = mid + Math.imul(al0, bh5) | 0;\n mid = mid + Math.imul(ah0, bl5) | 0;\n hi = hi + Math.imul(ah0, bh5) | 0;\n var w5 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w5 >>> 26) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = mid + Math.imul(ah6, bl0) | 0;\n hi = Math.imul(ah6, bh0);\n lo = lo + Math.imul(al5, bl1) | 0;\n mid = mid + Math.imul(al5, bh1) | 0;\n mid = mid + Math.imul(ah5, bl1) | 0;\n hi = hi + Math.imul(ah5, bh1) | 0;\n lo = lo + Math.imul(al4, bl2) | 0;\n mid = mid + Math.imul(al4, bh2) | 0;\n mid = mid + Math.imul(ah4, bl2) | 0;\n hi = hi + Math.imul(ah4, bh2) | 0;\n lo = lo + Math.imul(al3, bl3) | 0;\n mid = mid + Math.imul(al3, bh3) | 0;\n mid = mid + Math.imul(ah3, bl3) | 0;\n hi = hi + Math.imul(ah3, bh3) | 0;\n lo = lo + Math.imul(al2, bl4) | 0;\n mid = mid + Math.imul(al2, bh4) | 0;\n mid = mid + Math.imul(ah2, bl4) | 0;\n hi = hi + Math.imul(ah2, bh4) | 0;\n lo = lo + Math.imul(al1, bl5) | 0;\n mid = mid + Math.imul(al1, bh5) | 0;\n mid = mid + Math.imul(ah1, bl5) | 0;\n hi = hi + Math.imul(ah1, bh5) | 0;\n lo = lo + Math.imul(al0, bl6) | 0;\n mid = mid + Math.imul(al0, bh6) | 0;\n mid = mid + Math.imul(ah0, bl6) | 0;\n hi = hi + Math.imul(ah0, bh6) | 0;\n var w6 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w6 >>> 26) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = mid + Math.imul(ah7, bl0) | 0;\n hi = Math.imul(ah7, bh0);\n lo = lo + Math.imul(al6, bl1) | 0;\n mid = mid + Math.imul(al6, bh1) | 0;\n mid = mid + Math.imul(ah6, bl1) | 0;\n hi = hi + Math.imul(ah6, bh1) | 0;\n lo = lo + Math.imul(al5, bl2) | 0;\n mid = mid + Math.imul(al5, bh2) | 0;\n mid = mid + Math.imul(ah5, bl2) | 0;\n hi = hi + Math.imul(ah5, bh2) | 0;\n lo = lo + Math.imul(al4, bl3) | 0;\n mid = mid + Math.imul(al4, bh3) | 0;\n mid = mid + Math.imul(ah4, bl3) | 0;\n hi = hi + Math.imul(ah4, bh3) | 0;\n lo = lo + Math.imul(al3, bl4) | 0;\n mid = mid + Math.imul(al3, bh4) | 0;\n mid = mid + Math.imul(ah3, bl4) | 0;\n hi = hi + Math.imul(ah3, bh4) | 0;\n lo = lo + Math.imul(al2, bl5) | 0;\n mid = mid + Math.imul(al2, bh5) | 0;\n mid = mid + Math.imul(ah2, bl5) | 0;\n hi = hi + Math.imul(ah2, bh5) | 0;\n lo = lo + Math.imul(al1, bl6) | 0;\n mid = mid + Math.imul(al1, bh6) | 0;\n mid = mid + Math.imul(ah1, bl6) | 0;\n hi = hi + Math.imul(ah1, bh6) | 0;\n lo = lo + Math.imul(al0, bl7) | 0;\n mid = mid + Math.imul(al0, bh7) | 0;\n mid = mid + Math.imul(ah0, bl7) | 0;\n hi = hi + Math.imul(ah0, bh7) | 0;\n var w7 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w7 >>> 26) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = mid + Math.imul(ah8, bl0) | 0;\n hi = Math.imul(ah8, bh0);\n lo = lo + Math.imul(al7, bl1) | 0;\n mid = mid + Math.imul(al7, bh1) | 0;\n mid = mid + Math.imul(ah7, bl1) | 0;\n hi = hi + Math.imul(ah7, bh1) | 0;\n lo = lo + Math.imul(al6, bl2) | 0;\n mid = mid + Math.imul(al6, bh2) | 0;\n mid = mid + Math.imul(ah6, bl2) | 0;\n hi = hi + Math.imul(ah6, bh2) | 0;\n lo = lo + Math.imul(al5, bl3) | 0;\n mid = mid + Math.imul(al5, bh3) | 0;\n mid = mid + Math.imul(ah5, bl3) | 0;\n hi = hi + Math.imul(ah5, bh3) | 0;\n lo = lo + Math.imul(al4, bl4) | 0;\n mid = mid + Math.imul(al4, bh4) | 0;\n mid = mid + Math.imul(ah4, bl4) | 0;\n hi = hi + Math.imul(ah4, bh4) | 0;\n lo = lo + Math.imul(al3, bl5) | 0;\n mid = mid + Math.imul(al3, bh5) | 0;\n mid = mid + Math.imul(ah3, bl5) | 0;\n hi = hi + Math.imul(ah3, bh5) | 0;\n lo = lo + Math.imul(al2, bl6) | 0;\n mid = mid + Math.imul(al2, bh6) | 0;\n mid = mid + Math.imul(ah2, bl6) | 0;\n hi = hi + Math.imul(ah2, bh6) | 0;\n lo = lo + Math.imul(al1, bl7) | 0;\n mid = mid + Math.imul(al1, bh7) | 0;\n mid = mid + Math.imul(ah1, bl7) | 0;\n hi = hi + Math.imul(ah1, bh7) | 0;\n lo = lo + Math.imul(al0, bl8) | 0;\n mid = mid + Math.imul(al0, bh8) | 0;\n mid = mid + Math.imul(ah0, bl8) | 0;\n hi = hi + Math.imul(ah0, bh8) | 0;\n var w8 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w8 >>> 26) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = mid + Math.imul(ah9, bl0) | 0;\n hi = Math.imul(ah9, bh0);\n lo = lo + Math.imul(al8, bl1) | 0;\n mid = mid + Math.imul(al8, bh1) | 0;\n mid = mid + Math.imul(ah8, bl1) | 0;\n hi = hi + Math.imul(ah8, bh1) | 0;\n lo = lo + Math.imul(al7, bl2) | 0;\n mid = mid + Math.imul(al7, bh2) | 0;\n mid = mid + Math.imul(ah7, bl2) | 0;\n hi = hi + Math.imul(ah7, bh2) | 0;\n lo = lo + Math.imul(al6, bl3) | 0;\n mid = mid + Math.imul(al6, bh3) | 0;\n mid = mid + Math.imul(ah6, bl3) | 0;\n hi = hi + Math.imul(ah6, bh3) | 0;\n lo = lo + Math.imul(al5, bl4) | 0;\n mid = mid + Math.imul(al5, bh4) | 0;\n mid = mid + Math.imul(ah5, bl4) | 0;\n hi = hi + Math.imul(ah5, bh4) | 0;\n lo = lo + Math.imul(al4, bl5) | 0;\n mid = mid + Math.imul(al4, bh5) | 0;\n mid = mid + Math.imul(ah4, bl5) | 0;\n hi = hi + Math.imul(ah4, bh5) | 0;\n lo = lo + Math.imul(al3, bl6) | 0;\n mid = mid + Math.imul(al3, bh6) | 0;\n mid = mid + Math.imul(ah3, bl6) | 0;\n hi = hi + Math.imul(ah3, bh6) | 0;\n lo = lo + Math.imul(al2, bl7) | 0;\n mid = mid + Math.imul(al2, bh7) | 0;\n mid = mid + Math.imul(ah2, bl7) | 0;\n hi = hi + Math.imul(ah2, bh7) | 0;\n lo = lo + Math.imul(al1, bl8) | 0;\n mid = mid + Math.imul(al1, bh8) | 0;\n mid = mid + Math.imul(ah1, bl8) | 0;\n hi = hi + Math.imul(ah1, bh8) | 0;\n lo = lo + Math.imul(al0, bl9) | 0;\n mid = mid + Math.imul(al0, bh9) | 0;\n mid = mid + Math.imul(ah0, bl9) | 0;\n hi = hi + Math.imul(ah0, bh9) | 0;\n var w9 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w9 >>> 26) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = mid + Math.imul(ah9, bl1) | 0;\n hi = Math.imul(ah9, bh1);\n lo = lo + Math.imul(al8, bl2) | 0;\n mid = mid + Math.imul(al8, bh2) | 0;\n mid = mid + Math.imul(ah8, bl2) | 0;\n hi = hi + Math.imul(ah8, bh2) | 0;\n lo = lo + Math.imul(al7, bl3) | 0;\n mid = mid + Math.imul(al7, bh3) | 0;\n mid = mid + Math.imul(ah7, bl3) | 0;\n hi = hi + Math.imul(ah7, bh3) | 0;\n lo = lo + Math.imul(al6, bl4) | 0;\n mid = mid + Math.imul(al6, bh4) | 0;\n mid = mid + Math.imul(ah6, bl4) | 0;\n hi = hi + Math.imul(ah6, bh4) | 0;\n lo = lo + Math.imul(al5, bl5) | 0;\n mid = mid + Math.imul(al5, bh5) | 0;\n mid = mid + Math.imul(ah5, bl5) | 0;\n hi = hi + Math.imul(ah5, bh5) | 0;\n lo = lo + Math.imul(al4, bl6) | 0;\n mid = mid + Math.imul(al4, bh6) | 0;\n mid = mid + Math.imul(ah4, bl6) | 0;\n hi = hi + Math.imul(ah4, bh6) | 0;\n lo = lo + Math.imul(al3, bl7) | 0;\n mid = mid + Math.imul(al3, bh7) | 0;\n mid = mid + Math.imul(ah3, bl7) | 0;\n hi = hi + Math.imul(ah3, bh7) | 0;\n lo = lo + Math.imul(al2, bl8) | 0;\n mid = mid + Math.imul(al2, bh8) | 0;\n mid = mid + Math.imul(ah2, bl8) | 0;\n hi = hi + Math.imul(ah2, bh8) | 0;\n lo = lo + Math.imul(al1, bl9) | 0;\n mid = mid + Math.imul(al1, bh9) | 0;\n mid = mid + Math.imul(ah1, bl9) | 0;\n hi = hi + Math.imul(ah1, bh9) | 0;\n var w10 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w10 >>> 26) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = mid + Math.imul(ah9, bl2) | 0;\n hi = Math.imul(ah9, bh2);\n lo = lo + Math.imul(al8, bl3) | 0;\n mid = mid + Math.imul(al8, bh3) | 0;\n mid = mid + Math.imul(ah8, bl3) | 0;\n hi = hi + Math.imul(ah8, bh3) | 0;\n lo = lo + Math.imul(al7, bl4) | 0;\n mid = mid + Math.imul(al7, bh4) | 0;\n mid = mid + Math.imul(ah7, bl4) | 0;\n hi = hi + Math.imul(ah7, bh4) | 0;\n lo = lo + Math.imul(al6, bl5) | 0;\n mid = mid + Math.imul(al6, bh5) | 0;\n mid = mid + Math.imul(ah6, bl5) | 0;\n hi = hi + Math.imul(ah6, bh5) | 0;\n lo = lo + Math.imul(al5, bl6) | 0;\n mid = mid + Math.imul(al5, bh6) | 0;\n mid = mid + Math.imul(ah5, bl6) | 0;\n hi = hi + Math.imul(ah5, bh6) | 0;\n lo = lo + Math.imul(al4, bl7) | 0;\n mid = mid + Math.imul(al4, bh7) | 0;\n mid = mid + Math.imul(ah4, bl7) | 0;\n hi = hi + Math.imul(ah4, bh7) | 0;\n lo = lo + Math.imul(al3, bl8) | 0;\n mid = mid + Math.imul(al3, bh8) | 0;\n mid = mid + Math.imul(ah3, bl8) | 0;\n hi = hi + Math.imul(ah3, bh8) | 0;\n lo = lo + Math.imul(al2, bl9) | 0;\n mid = mid + Math.imul(al2, bh9) | 0;\n mid = mid + Math.imul(ah2, bl9) | 0;\n hi = hi + Math.imul(ah2, bh9) | 0;\n var w11 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w11 >>> 26) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = mid + Math.imul(ah9, bl3) | 0;\n hi = Math.imul(ah9, bh3);\n lo = lo + Math.imul(al8, bl4) | 0;\n mid = mid + Math.imul(al8, bh4) | 0;\n mid = mid + Math.imul(ah8, bl4) | 0;\n hi = hi + Math.imul(ah8, bh4) | 0;\n lo = lo + Math.imul(al7, bl5) | 0;\n mid = mid + Math.imul(al7, bh5) | 0;\n mid = mid + Math.imul(ah7, bl5) | 0;\n hi = hi + Math.imul(ah7, bh5) | 0;\n lo = lo + Math.imul(al6, bl6) | 0;\n mid = mid + Math.imul(al6, bh6) | 0;\n mid = mid + Math.imul(ah6, bl6) | 0;\n hi = hi + Math.imul(ah6, bh6) | 0;\n lo = lo + Math.imul(al5, bl7) | 0;\n mid = mid + Math.imul(al5, bh7) | 0;\n mid = mid + Math.imul(ah5, bl7) | 0;\n hi = hi + Math.imul(ah5, bh7) | 0;\n lo = lo + Math.imul(al4, bl8) | 0;\n mid = mid + Math.imul(al4, bh8) | 0;\n mid = mid + Math.imul(ah4, bl8) | 0;\n hi = hi + Math.imul(ah4, bh8) | 0;\n lo = lo + Math.imul(al3, bl9) | 0;\n mid = mid + Math.imul(al3, bh9) | 0;\n mid = mid + Math.imul(ah3, bl9) | 0;\n hi = hi + Math.imul(ah3, bh9) | 0;\n var w12 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w12 >>> 26) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = mid + Math.imul(ah9, bl4) | 0;\n hi = Math.imul(ah9, bh4);\n lo = lo + Math.imul(al8, bl5) | 0;\n mid = mid + Math.imul(al8, bh5) | 0;\n mid = mid + Math.imul(ah8, bl5) | 0;\n hi = hi + Math.imul(ah8, bh5) | 0;\n lo = lo + Math.imul(al7, bl6) | 0;\n mid = mid + Math.imul(al7, bh6) | 0;\n mid = mid + Math.imul(ah7, bl6) | 0;\n hi = hi + Math.imul(ah7, bh6) | 0;\n lo = lo + Math.imul(al6, bl7) | 0;\n mid = mid + Math.imul(al6, bh7) | 0;\n mid = mid + Math.imul(ah6, bl7) | 0;\n hi = hi + Math.imul(ah6, bh7) | 0;\n lo = lo + Math.imul(al5, bl8) | 0;\n mid = mid + Math.imul(al5, bh8) | 0;\n mid = mid + Math.imul(ah5, bl8) | 0;\n hi = hi + Math.imul(ah5, bh8) | 0;\n lo = lo + Math.imul(al4, bl9) | 0;\n mid = mid + Math.imul(al4, bh9) | 0;\n mid = mid + Math.imul(ah4, bl9) | 0;\n hi = hi + Math.imul(ah4, bh9) | 0;\n var w13 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w13 >>> 26) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = mid + Math.imul(ah9, bl5) | 0;\n hi = Math.imul(ah9, bh5);\n lo = lo + Math.imul(al8, bl6) | 0;\n mid = mid + Math.imul(al8, bh6) | 0;\n mid = mid + Math.imul(ah8, bl6) | 0;\n hi = hi + Math.imul(ah8, bh6) | 0;\n lo = lo + Math.imul(al7, bl7) | 0;\n mid = mid + Math.imul(al7, bh7) | 0;\n mid = mid + Math.imul(ah7, bl7) | 0;\n hi = hi + Math.imul(ah7, bh7) | 0;\n lo = lo + Math.imul(al6, bl8) | 0;\n mid = mid + Math.imul(al6, bh8) | 0;\n mid = mid + Math.imul(ah6, bl8) | 0;\n hi = hi + Math.imul(ah6, bh8) | 0;\n lo = lo + Math.imul(al5, bl9) | 0;\n mid = mid + Math.imul(al5, bh9) | 0;\n mid = mid + Math.imul(ah5, bl9) | 0;\n hi = hi + Math.imul(ah5, bh9) | 0;\n var w14 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w14 >>> 26) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = mid + Math.imul(ah9, bl6) | 0;\n hi = Math.imul(ah9, bh6);\n lo = lo + Math.imul(al8, bl7) | 0;\n mid = mid + Math.imul(al8, bh7) | 0;\n mid = mid + Math.imul(ah8, bl7) | 0;\n hi = hi + Math.imul(ah8, bh7) | 0;\n lo = lo + Math.imul(al7, bl8) | 0;\n mid = mid + Math.imul(al7, bh8) | 0;\n mid = mid + Math.imul(ah7, bl8) | 0;\n hi = hi + Math.imul(ah7, bh8) | 0;\n lo = lo + Math.imul(al6, bl9) | 0;\n mid = mid + Math.imul(al6, bh9) | 0;\n mid = mid + Math.imul(ah6, bl9) | 0;\n hi = hi + Math.imul(ah6, bh9) | 0;\n var w15 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w15 >>> 26) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = mid + Math.imul(ah9, bl7) | 0;\n hi = Math.imul(ah9, bh7);\n lo = lo + Math.imul(al8, bl8) | 0;\n mid = mid + Math.imul(al8, bh8) | 0;\n mid = mid + Math.imul(ah8, bl8) | 0;\n hi = hi + Math.imul(ah8, bh8) | 0;\n lo = lo + Math.imul(al7, bl9) | 0;\n mid = mid + Math.imul(al7, bh9) | 0;\n mid = mid + Math.imul(ah7, bl9) | 0;\n hi = hi + Math.imul(ah7, bh9) | 0;\n var w16 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w16 >>> 26) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = mid + Math.imul(ah9, bl8) | 0;\n hi = Math.imul(ah9, bh8);\n lo = lo + Math.imul(al8, bl9) | 0;\n mid = mid + Math.imul(al8, bh9) | 0;\n mid = mid + Math.imul(ah8, bl9) | 0;\n hi = hi + Math.imul(ah8, bh9) | 0;\n var w17 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w17 >>> 26) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = mid + Math.imul(ah9, bl9) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w18 >>> 26) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n function bigMulTo(self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n var lo = r & 0x3ffffff;\n ncarry = ncarry + (r / 0x4000000 | 0) | 0;\n lo = lo + rword | 0;\n rword = lo & 0x3ffffff;\n ncarry = ncarry + (lo >>> 26) | 0;\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n return out._strip();\n }\n function jumboMulTo(self, num, out) {\n // Temporary disable, see https://github.com/indutny/bn.js/issues/211\n // var fftm = new FFTM();\n // return fftm.mulp(self, num, out);\n return bigMulTo(self, num, out);\n }\n BN.prototype.mulTo = function mulTo(num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM(x, y) {\n this.x = x;\n this.y = y;\n }\n FFTM.prototype.makeRBT = function makeRBT(N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin(x, l, N) {\n if (x === 0 || x === N - 1) return x;\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << l - i - 1;\n x >>= 1;\n }\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute(rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n FFTM.prototype.transform = function transform(rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n var rx = rtwdf_ * ro - itwdf_ * io;\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n FFTM.prototype.guessLen13b = function guessLen13b(n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n return 1 << i + 1 + odd;\n };\n FFTM.prototype.conjugate = function conjugate(rws, iws, N) {\n if (N <= 1) return;\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n t = iws[i];\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n FFTM.prototype.normalize13b = function normalize13b(ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 + Math.round(ws[2 * i] / N) + carry;\n ws[i] = w & 0x3ffffff;\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n return ws;\n };\n FFTM.prototype.convert13b = function convert13b(ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n rws[2 * i] = carry & 0x1fff;\n carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff;\n carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n FFTM.prototype.stub = function stub(N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n return ph;\n };\n FFTM.prototype.mulp = function mulp(x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n var rbt = this.makeRBT(N);\n var _ = this.stub(N);\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n var rmws = out.words;\n rmws.length = N;\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out._strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul(num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf(num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul(num) {\n return this.clone().mulTo(num, this);\n };\n BN.prototype.imuln = function imuln(num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += w / 0x4000000 | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return isNegNum ? this.ineg() : this;\n };\n BN.prototype.muln = function muln(num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr() {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr() {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow(num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n res = res.mul(q);\n }\n }\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln(bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = 0x3ffffff >>> 26 - r << 26 - r;\n var i;\n if (r !== 0) {\n var carry = 0;\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = (this.words[i] | 0) - newCarry << r;\n this.words[i] = c | carry;\n carry = newCarry >>> 26 - r;\n }\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n this.length += s;\n }\n return this._strip();\n };\n BN.prototype.ishln = function ishln(bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn(bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - hint % 26) / 26;\n } else {\n h = 0;\n }\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ 0x3ffffff >>> r << r;\n var maskedWords = extended;\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = carry << 26 - r | word >>> r;\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n return this._strip();\n };\n BN.prototype.ishrn = function ishrn(bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln(bits) {\n return this.clone().ishln(bits);\n };\n BN.prototype.ushln = function ushln(bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn(bits) {\n return this.clone().ishrn(bits);\n };\n BN.prototype.ushrn = function ushrn(bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn(bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn(bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n if (this.length <= s) {\n return this;\n }\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n if (r !== 0) {\n var mask = 0x3ffffff ^ 0x3ffffff >>> r << r;\n this.words[this.length - 1] &= mask;\n }\n return this._strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn(bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn(num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) <= num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n BN.prototype._iaddn = function _iaddn(num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn(num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n this.words[0] -= num;\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n return this._strip();\n };\n BN.prototype.addn = function addn(num) {\n return this.clone().iaddn(num);\n };\n BN.prototype.subn = function subn(num) {\n return this.clone().isubn(num);\n };\n BN.prototype.iabs = function iabs() {\n this.negative = 0;\n return this;\n };\n BN.prototype.abs = function abs() {\n return this.clone().iabs();\n };\n BN.prototype._ishlnsubmul = function _ishlnsubmul(num, mul, shift) {\n var len = num.length + shift;\n var i;\n this._expand(len);\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - (right / 0x4000000 | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n if (carry === 0) return this._strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n return this._strip();\n };\n BN.prototype._wordDiv = function _wordDiv(num, mode) {\n var shift = this.length - num.length;\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 + (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min(qj / bhi | 0, 0x3ffffff);\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q._strip();\n }\n a._strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod(num, mode, positive) {\n assert(!num.isZero());\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n return {\n div: div,\n mod: mod\n };\n }\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n return {\n div: div,\n mod: res.mod\n };\n }\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div(num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod(num) {\n return this.divmod(num, 'mod', false).mod;\n };\n BN.prototype.umod = function umod(num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound(num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n BN.prototype.modrn = function modrn(num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n return isNegNum ? -acc : acc;\n };\n\n // WARNING: DEPRECATED\n BN.prototype.modn = function modn(num) {\n return this.modrn(num);\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn(num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n assert(num <= 0x3ffffff);\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = w / num | 0;\n carry = w % num;\n }\n this._strip();\n return isNegNum ? this.ineg() : this;\n };\n BN.prototype.divn = function divn(num) {\n return this.clone().idivn(num);\n };\n BN.prototype.egcd = function egcd(p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n var x = this;\n var y = p.clone();\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n var g = 0;\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n var yp = y.clone();\n var xp = x.clone();\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp(p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n var a = this;\n var b = p.clone();\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n var x1 = new BN(1);\n var x2 = new BN(0);\n var delta = b.clone();\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n x1.iushrn(1);\n }\n }\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n x2.iushrn(1);\n }\n }\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n return res;\n };\n BN.prototype.gcd = function gcd(num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n a.isub(b);\n } while (true);\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm(num) {\n return this.egcd(num).a.umod(num);\n };\n BN.prototype.isEven = function isEven() {\n return (this.words[0] & 1) === 0;\n };\n BN.prototype.isOdd = function isOdd() {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln(num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn(bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n BN.prototype.isZero = function isZero() {\n return this.length === 1 && this.words[0] === 0;\n };\n BN.prototype.cmpn = function cmpn(num) {\n var negative = num < 0;\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n this._strip();\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n assert(num <= 0x3ffffff, 'Number is too big');\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp(num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp(num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n BN.prototype.gtn = function gtn(num) {\n return this.cmpn(num) === 1;\n };\n BN.prototype.gt = function gt(num) {\n return this.cmp(num) === 1;\n };\n BN.prototype.gten = function gten(num) {\n return this.cmpn(num) >= 0;\n };\n BN.prototype.gte = function gte(num) {\n return this.cmp(num) >= 0;\n };\n BN.prototype.ltn = function ltn(num) {\n return this.cmpn(num) === -1;\n };\n BN.prototype.lt = function lt(num) {\n return this.cmp(num) === -1;\n };\n BN.prototype.lten = function lten(num) {\n return this.cmpn(num) <= 0;\n };\n BN.prototype.lte = function lte(num) {\n return this.cmp(num) <= 0;\n };\n BN.prototype.eqn = function eqn(num) {\n return this.cmpn(num) === 0;\n };\n BN.prototype.eq = function eq(num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red(num) {\n return new Red(num);\n };\n BN.prototype.toRed = function toRed(ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n BN.prototype.fromRed = function fromRed() {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n BN.prototype._forceRed = function _forceRed(ctx) {\n this.red = ctx;\n return this;\n };\n BN.prototype.forceRed = function forceRed(ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n BN.prototype.redAdd = function redAdd(num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n BN.prototype.redIAdd = function redIAdd(num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n BN.prototype.redSub = function redSub(num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n BN.prototype.redISub = function redISub(num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n BN.prototype.redShl = function redShl(num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n BN.prototype.redMul = function redMul(num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n BN.prototype.redIMul = function redIMul(num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n BN.prototype.redSqr = function redSqr() {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n BN.prototype.redISqr = function redISqr() {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt() {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n BN.prototype.redInvm = function redInvm() {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg() {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n BN.prototype.redPow = function redPow(num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime(name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n this.tmp = this._tmp();\n }\n MPrime.prototype._tmp = function _tmp() {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n MPrime.prototype.ireduce = function ireduce(num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is a BN v4 instance\n r.strip();\n } else {\n // r is a BN v5 instance\n r._strip();\n }\n }\n return r;\n };\n MPrime.prototype.split = function split(input, out) {\n input.iushrn(this.n, 0, out);\n };\n MPrime.prototype.imulK = function imulK(num) {\n return num.imul(this.k);\n };\n function K256() {\n MPrime.call(this, 'k256', 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n K256.prototype.split = function split(input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = (next & mask) << 4 | prev >>> 22;\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n K256.prototype.imulK = function imulK(num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + (lo / 0x4000000 | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n function P224() {\n MPrime.call(this, 'p224', 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n function P192() {\n MPrime.call(this, 'p192', 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n function P25519() {\n // 2 ^ 255 - 19\n MPrime.call(this, '25519', '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n P25519.prototype.imulK = function imulK(num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime(name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red(m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n Red.prototype._verify1 = function _verify1(a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n Red.prototype._verify2 = function _verify2(a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red, 'red works only with red numbers');\n };\n Red.prototype.imod = function imod(a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n move(a, a.umod(this.m)._forceRed(this));\n return a;\n };\n Red.prototype.neg = function neg(a) {\n if (a.isZero()) {\n return a.clone();\n }\n return this.m.sub(a)._forceRed(this);\n };\n Red.prototype.add = function add(a, b) {\n this._verify2(a, b);\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.iadd = function iadd(a, b) {\n this._verify2(a, b);\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n Red.prototype.sub = function sub(a, b) {\n this._verify2(a, b);\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.isub = function isub(a, b) {\n this._verify2(a, b);\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n Red.prototype.shl = function shl(a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n Red.prototype.imul = function imul(a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n Red.prototype.mul = function mul(a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n Red.prototype.isqr = function isqr(a) {\n return this.imul(a, a.clone());\n };\n Red.prototype.sqr = function sqr(a) {\n return this.mul(a, a);\n };\n Red.prototype.sqrt = function sqrt(a) {\n if (a.isZero()) return a.clone();\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n return r;\n };\n Red.prototype.invm = function invm(a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n Red.prototype.pow = function pow(a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = word >> j & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n return res;\n };\n Red.prototype.convertTo = function convertTo(num) {\n var r = num.umod(this.m);\n return r === num ? r.clone() : r;\n };\n Red.prototype.convertFrom = function convertFrom(num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont(num) {\n return new Mont(num);\n };\n function Mont(m) {\n Red.call(this, m);\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - this.shift % 26;\n }\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n Mont.prototype.convertTo = function convertTo(num) {\n return this.imod(num.ushln(this.shift));\n };\n Mont.prototype.convertFrom = function convertFrom(num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n Mont.prototype.imul = function imul(a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.mul = function mul(a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.invm = function invm(a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);","'use strict';\n\nvar elliptic = exports;\nelliptic.version = require('../package.json').version;\nelliptic.utils = require('./elliptic/utils');\nelliptic.rand = require('brorand');\nelliptic.curve = require('./elliptic/curve');\nelliptic.curves = require('./elliptic/curves');\n\n// Protocols\nelliptic.ec = require('./elliptic/ec');\nelliptic.eddsa = require('./elliptic/eddsa');","'use strict';\n\nvar curves = exports;\nvar hash = require('hash.js');\nvar curve = require('./curve');\nvar utils = require('./utils');\nvar assert = utils.assert;\nfunction PresetCurve(options) {\n if (options.type === 'short') this.curve = new curve.short(options);else if (options.type === 'edwards') this.curve = new curve.edwards(options);else this.curve = new curve.mont(options);\n this.g = this.curve.g;\n this.n = this.curve.n;\n this.hash = options.hash;\n assert(this.g.validate(), 'Invalid curve');\n assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O');\n}\ncurves.PresetCurve = PresetCurve;\nfunction defineCurve(name, options) {\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n get: function get() {\n var curve = new PresetCurve(options);\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n value: curve\n });\n return curve;\n }\n });\n}\ndefineCurve('p192', {\n type: 'short',\n prime: 'p192',\n p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc',\n b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1',\n n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831',\n hash: hash.sha256,\n gRed: false,\n g: ['188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012', '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811']\n});\ndefineCurve('p224', {\n type: 'short',\n prime: 'p224',\n p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe',\n b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4',\n n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d',\n hash: hash.sha256,\n gRed: false,\n g: ['b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21', 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34']\n});\ndefineCurve('p256', {\n type: 'short',\n prime: null,\n p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff',\n a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc',\n b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b',\n n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551',\n hash: hash.sha256,\n gRed: false,\n g: ['6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296', '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5']\n});\ndefineCurve('p384', {\n type: 'short',\n prime: null,\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + 'fffffffe ffffffff 00000000 00000000 ffffffff',\n a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + 'fffffffe ffffffff 00000000 00000000 fffffffc',\n b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' + '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef',\n n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' + 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973',\n hash: hash.sha384,\n gRed: false,\n g: ['aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' + '5502f25d bf55296c 3a545e38 72760ab7', '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' + '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f']\n});\ndefineCurve('p521', {\n type: 'short',\n prime: null,\n p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + 'ffffffff ffffffff ffffffff ffffffff ffffffff',\n a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + 'ffffffff ffffffff ffffffff ffffffff fffffffc',\n b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' + '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' + '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00',\n n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' + 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409',\n hash: hash.sha512,\n gRed: false,\n g: ['000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' + '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' + 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66', '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' + '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' + '3fad0761 353c7086 a272c240 88be9476 9fd16650']\n});\ndefineCurve('curve25519', {\n type: 'mont',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '76d06',\n b: '1',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: ['9']\n});\ndefineCurve('ed25519', {\n type: 'edwards',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '-1',\n c: '1',\n // -121665 * (121666^(-1)) (mod P)\n d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: ['216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a',\n // 4/5\n '6666666666666666666666666666666666666666666666666666666666666658']\n});\nvar pre;\ntry {\n pre = require('./precomputed/secp256k1');\n} catch (e) {\n pre = undefined;\n}\ndefineCurve('secp256k1', {\n type: 'short',\n prime: 'k256',\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f',\n a: '0',\n b: '7',\n n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141',\n h: '1',\n hash: hash.sha256,\n // Precomputed endomorphism\n beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee',\n lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72',\n basis: [{\n a: '3086d221a7d46bcde86c90e49284eb15',\n b: '-e4437ed6010e88286f547fa90abfe4c3'\n }, {\n a: '114ca50f7a8e2f3f657c1108d9d44cfd8',\n b: '3086d221a7d46bcde86c90e49284eb15'\n }],\n gRed: false,\n g: ['79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8', pre]\n});","var hash = exports;\nhash.utils = require('./hash/utils');\nhash.common = require('./hash/common');\nhash.sha = require('./hash/sha');\nhash.ripemd = require('./hash/ripemd');\nhash.hmac = require('./hash/hmac');\n\n// Proxy hash functions to the main object\nhash.sha1 = hash.sha.sha1;\nhash.sha256 = hash.sha.sha256;\nhash.sha224 = hash.sha.sha224;\nhash.sha384 = hash.sha.sha384;\nhash.sha512 = hash.sha.sha512;\nhash.ripemd160 = hash.ripemd.ripemd160;","/* eslint-disable node/no-deprecated-api */\n\n'use strict';\n\nvar buffer = require('buffer');\nvar Buffer = buffer.Buffer;\nvar safer = {};\nvar key;\nfor (key in buffer) {\n if (!buffer.hasOwnProperty(key)) continue;\n if (key === 'SlowBuffer' || key === 'Buffer') continue;\n safer[key] = buffer[key];\n}\nvar Safer = safer.Buffer = {};\nfor (key in Buffer) {\n if (!Buffer.hasOwnProperty(key)) continue;\n if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue;\n Safer[key] = Buffer[key];\n}\nsafer.Buffer.prototype = Buffer.prototype;\nif (!Safer.from || Safer.from === Uint8Array.from) {\n Safer.from = function (value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('The \"value\" argument must not be of type number. Received type ' + typeof value);\n }\n if (value && typeof value.length === 'undefined') {\n throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value);\n }\n return Buffer(value, encodingOrOffset, length);\n };\n}\nif (!Safer.alloc) {\n Safer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('The \"size\" argument must be of type number. Received type ' + typeof size);\n }\n if (size < 0 || size >= 2 * (1 << 30)) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"');\n }\n var buf = Buffer(size);\n if (!fill || fill.length === 0) {\n buf.fill(0);\n } else if (typeof encoding === 'string') {\n buf.fill(fill, encoding);\n } else {\n buf.fill(fill);\n }\n return buf;\n };\n}\nif (!safer.kStringMaxLength) {\n try {\n safer.kStringMaxLength = process.binding('buffer').kStringMaxLength;\n } catch (e) {\n // we can't determine kStringMaxLength in environments where process.binding\n // is unsupported, so let's not set it\n }\n}\nif (!safer.constants) {\n safer.constants = {\n MAX_LENGTH: safer.kMaxLength\n };\n if (safer.kStringMaxLength) {\n safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength;\n }\n}\nmodule.exports = safer;","'use strict';\n\nvar Reporter = require('../base/reporter').Reporter;\nvar EncoderBuffer = require('../base/buffer').EncoderBuffer;\nvar DecoderBuffer = require('../base/buffer').DecoderBuffer;\nvar assert = require('minimalistic-assert');\n\n// Supported tags\nvar tags = ['seq', 'seqof', 'set', 'setof', 'objid', 'bool', 'gentime', 'utctime', 'null_', 'enum', 'int', 'objDesc', 'bitstr', 'bmpstr', 'charstr', 'genstr', 'graphstr', 'ia5str', 'iso646str', 'numstr', 'octstr', 'printstr', 't61str', 'unistr', 'utf8str', 'videostr'];\n\n// Public methods list\nvar methods = ['key', 'obj', 'use', 'optional', 'explicit', 'implicit', 'def', 'choice', 'any', 'contains'].concat(tags);\n\n// Overrided methods list\nvar overrided = ['_peekTag', '_decodeTag', '_use', '_decodeStr', '_decodeObjid', '_decodeTime', '_decodeNull', '_decodeInt', '_decodeBool', '_decodeList', '_encodeComposite', '_encodeStr', '_encodeObjid', '_encodeTime', '_encodeNull', '_encodeInt', '_encodeBool'];\nfunction Node(enc, parent, name) {\n var state = {};\n this._baseState = state;\n state.name = name;\n state.enc = enc;\n state.parent = parent || null;\n state.children = null;\n\n // State\n state.tag = null;\n state.args = null;\n state.reverseArgs = null;\n state.choice = null;\n state.optional = false;\n state.any = false;\n state.obj = false;\n state.use = null;\n state.useDecoder = null;\n state.key = null;\n state['default'] = null;\n state.explicit = null;\n state.implicit = null;\n state.contains = null;\n\n // Should create new instance on each method\n if (!state.parent) {\n state.children = [];\n this._wrap();\n }\n}\nmodule.exports = Node;\nvar stateProps = ['enc', 'parent', 'children', 'tag', 'args', 'reverseArgs', 'choice', 'optional', 'any', 'obj', 'use', 'alteredUse', 'key', 'default', 'explicit', 'implicit', 'contains'];\nNode.prototype.clone = function clone() {\n var state = this._baseState;\n var cstate = {};\n stateProps.forEach(function (prop) {\n cstate[prop] = state[prop];\n });\n var res = new this.constructor(cstate.parent);\n res._baseState = cstate;\n return res;\n};\nNode.prototype._wrap = function wrap() {\n var state = this._baseState;\n methods.forEach(function (method) {\n this[method] = function _wrappedMethod() {\n var clone = new this.constructor(this);\n state.children.push(clone);\n return clone[method].apply(clone, arguments);\n };\n }, this);\n};\nNode.prototype._init = function init(body) {\n var state = this._baseState;\n assert(state.parent === null);\n body.call(this);\n\n // Filter children\n state.children = state.children.filter(function (child) {\n return child._baseState.parent === this;\n }, this);\n assert.equal(state.children.length, 1, 'Root node can have only one child');\n};\nNode.prototype._useArgs = function useArgs(args) {\n var state = this._baseState;\n\n // Filter children and args\n var children = args.filter(function (arg) {\n return arg instanceof this.constructor;\n }, this);\n args = args.filter(function (arg) {\n return !(arg instanceof this.constructor);\n }, this);\n if (children.length !== 0) {\n assert(state.children === null);\n state.children = children;\n\n // Replace parent to maintain backward link\n children.forEach(function (child) {\n child._baseState.parent = this;\n }, this);\n }\n if (args.length !== 0) {\n assert(state.args === null);\n state.args = args;\n state.reverseArgs = args.map(function (arg) {\n if (typeof arg !== 'object' || arg.constructor !== Object) return arg;\n var res = {};\n Object.keys(arg).forEach(function (key) {\n if (key == (key | 0)) key |= 0;\n var value = arg[key];\n res[value] = key;\n });\n return res;\n });\n }\n};\n\n//\n// Overrided methods\n//\n\noverrided.forEach(function (method) {\n Node.prototype[method] = function _overrided() {\n var state = this._baseState;\n throw new Error(method + ' not implemented for encoding: ' + state.enc);\n };\n});\n\n//\n// Public methods\n//\n\ntags.forEach(function (tag) {\n Node.prototype[tag] = function _tagMethod() {\n var state = this._baseState;\n var args = Array.prototype.slice.call(arguments);\n assert(state.tag === null);\n state.tag = tag;\n this._useArgs(args);\n return this;\n };\n});\nNode.prototype.use = function use(item) {\n assert(item);\n var state = this._baseState;\n assert(state.use === null);\n state.use = item;\n return this;\n};\nNode.prototype.optional = function optional() {\n var state = this._baseState;\n state.optional = true;\n return this;\n};\nNode.prototype.def = function def(val) {\n var state = this._baseState;\n assert(state['default'] === null);\n state['default'] = val;\n state.optional = true;\n return this;\n};\nNode.prototype.explicit = function explicit(num) {\n var state = this._baseState;\n assert(state.explicit === null && state.implicit === null);\n state.explicit = num;\n return this;\n};\nNode.prototype.implicit = function implicit(num) {\n var state = this._baseState;\n assert(state.explicit === null && state.implicit === null);\n state.implicit = num;\n return this;\n};\nNode.prototype.obj = function obj() {\n var state = this._baseState;\n var args = Array.prototype.slice.call(arguments);\n state.obj = true;\n if (args.length !== 0) this._useArgs(args);\n return this;\n};\nNode.prototype.key = function key(newKey) {\n var state = this._baseState;\n assert(state.key === null);\n state.key = newKey;\n return this;\n};\nNode.prototype.any = function any() {\n var state = this._baseState;\n state.any = true;\n return this;\n};\nNode.prototype.choice = function choice(obj) {\n var state = this._baseState;\n assert(state.choice === null);\n state.choice = obj;\n this._useArgs(Object.keys(obj).map(function (key) {\n return obj[key];\n }));\n return this;\n};\nNode.prototype.contains = function contains(item) {\n var state = this._baseState;\n assert(state.use === null);\n state.contains = item;\n return this;\n};\n\n//\n// Decoding\n//\n\nNode.prototype._decode = function decode(input, options) {\n var state = this._baseState;\n\n // Decode root node\n if (state.parent === null) return input.wrapResult(state.children[0]._decode(input, options));\n var result = state['default'];\n var present = true;\n var prevKey = null;\n if (state.key !== null) prevKey = input.enterKey(state.key);\n\n // Check if tag is there\n if (state.optional) {\n var tag = null;\n if (state.explicit !== null) tag = state.explicit;else if (state.implicit !== null) tag = state.implicit;else if (state.tag !== null) tag = state.tag;\n if (tag === null && !state.any) {\n // Trial and Error\n var save = input.save();\n try {\n if (state.choice === null) this._decodeGeneric(state.tag, input, options);else this._decodeChoice(input, options);\n present = true;\n } catch (e) {\n present = false;\n }\n input.restore(save);\n } else {\n present = this._peekTag(input, tag, state.any);\n if (input.isError(present)) return present;\n }\n }\n\n // Push object on stack\n var prevObj;\n if (state.obj && present) prevObj = input.enterObject();\n if (present) {\n // Unwrap explicit values\n if (state.explicit !== null) {\n var explicit = this._decodeTag(input, state.explicit);\n if (input.isError(explicit)) return explicit;\n input = explicit;\n }\n var start = input.offset;\n\n // Unwrap implicit and normal values\n if (state.use === null && state.choice === null) {\n var _save;\n if (state.any) _save = input.save();\n var body = this._decodeTag(input, state.implicit !== null ? state.implicit : state.tag, state.any);\n if (input.isError(body)) return body;\n if (state.any) result = input.raw(_save);else input = body;\n }\n if (options && options.track && state.tag !== null) options.track(input.path(), start, input.length, 'tagged');\n if (options && options.track && state.tag !== null) options.track(input.path(), input.offset, input.length, 'content');\n\n // Select proper method for tag\n if (state.any) {\n // no-op\n } else if (state.choice === null) {\n result = this._decodeGeneric(state.tag, input, options);\n } else {\n result = this._decodeChoice(input, options);\n }\n if (input.isError(result)) return result;\n\n // Decode children\n if (!state.any && state.choice === null && state.children !== null) {\n state.children.forEach(function decodeChildren(child) {\n // NOTE: We are ignoring errors here, to let parser continue with other\n // parts of encoded data\n child._decode(input, options);\n });\n }\n\n // Decode contained/encoded by schema, only in bit or octet strings\n if (state.contains && (state.tag === 'octstr' || state.tag === 'bitstr')) {\n var data = new DecoderBuffer(result);\n result = this._getUse(state.contains, input._reporterState.obj)._decode(data, options);\n }\n }\n\n // Pop object\n if (state.obj && present) result = input.leaveObject(prevObj);\n\n // Set key\n if (state.key !== null && (result !== null || present === true)) input.leaveKey(prevKey, state.key, result);else if (prevKey !== null) input.exitKey(prevKey);\n return result;\n};\nNode.prototype._decodeGeneric = function decodeGeneric(tag, input, options) {\n var state = this._baseState;\n if (tag === 'seq' || tag === 'set') return null;\n if (tag === 'seqof' || tag === 'setof') return this._decodeList(input, tag, state.args[0], options);else if (/str$/.test(tag)) return this._decodeStr(input, tag, options);else if (tag === 'objid' && state.args) return this._decodeObjid(input, state.args[0], state.args[1], options);else if (tag === 'objid') return this._decodeObjid(input, null, null, options);else if (tag === 'gentime' || tag === 'utctime') return this._decodeTime(input, tag, options);else if (tag === 'null_') return this._decodeNull(input, options);else if (tag === 'bool') return this._decodeBool(input, options);else if (tag === 'objDesc') return this._decodeStr(input, tag, options);else if (tag === 'int' || tag === 'enum') return this._decodeInt(input, state.args && state.args[0], options);\n if (state.use !== null) {\n return this._getUse(state.use, input._reporterState.obj)._decode(input, options);\n } else {\n return input.error('unknown tag: ' + tag);\n }\n};\nNode.prototype._getUse = function _getUse(entity, obj) {\n var state = this._baseState;\n // Create altered use decoder if implicit is set\n state.useDecoder = this._use(entity, obj);\n assert(state.useDecoder._baseState.parent === null);\n state.useDecoder = state.useDecoder._baseState.children[0];\n if (state.implicit !== state.useDecoder._baseState.implicit) {\n state.useDecoder = state.useDecoder.clone();\n state.useDecoder._baseState.implicit = state.implicit;\n }\n return state.useDecoder;\n};\nNode.prototype._decodeChoice = function decodeChoice(input, options) {\n var state = this._baseState;\n var result = null;\n var match = false;\n Object.keys(state.choice).some(function (key) {\n var save = input.save();\n var node = state.choice[key];\n try {\n var value = node._decode(input, options);\n if (input.isError(value)) return false;\n result = {\n type: key,\n value: value\n };\n match = true;\n } catch (e) {\n input.restore(save);\n return false;\n }\n return true;\n }, this);\n if (!match) return input.error('Choice not matched');\n return result;\n};\n\n//\n// Encoding\n//\n\nNode.prototype._createEncoderBuffer = function createEncoderBuffer(data) {\n return new EncoderBuffer(data, this.reporter);\n};\nNode.prototype._encode = function encode(data, reporter, parent) {\n var state = this._baseState;\n if (state['default'] !== null && state['default'] === data) return;\n var result = this._encodeValue(data, reporter, parent);\n if (result === undefined) return;\n if (this._skipDefault(result, reporter, parent)) return;\n return result;\n};\nNode.prototype._encodeValue = function encode(data, reporter, parent) {\n var state = this._baseState;\n\n // Decode root node\n if (state.parent === null) return state.children[0]._encode(data, reporter || new Reporter());\n var result = null;\n\n // Set reporter to share it with a child class\n this.reporter = reporter;\n\n // Check if data is there\n if (state.optional && data === undefined) {\n if (state['default'] !== null) data = state['default'];else return;\n }\n\n // Encode children first\n var content = null;\n var primitive = false;\n if (state.any) {\n // Anything that was given is translated to buffer\n result = this._createEncoderBuffer(data);\n } else if (state.choice) {\n result = this._encodeChoice(data, reporter);\n } else if (state.contains) {\n content = this._getUse(state.contains, parent)._encode(data, reporter);\n primitive = true;\n } else if (state.children) {\n content = state.children.map(function (child) {\n if (child._baseState.tag === 'null_') return child._encode(null, reporter, data);\n if (child._baseState.key === null) return reporter.error('Child should have a key');\n var prevKey = reporter.enterKey(child._baseState.key);\n if (typeof data !== 'object') return reporter.error('Child expected, but input is not object');\n var res = child._encode(data[child._baseState.key], reporter, data);\n reporter.leaveKey(prevKey);\n return res;\n }, this).filter(function (child) {\n return child;\n });\n content = this._createEncoderBuffer(content);\n } else {\n if (state.tag === 'seqof' || state.tag === 'setof') {\n // TODO(indutny): this should be thrown on DSL level\n if (!(state.args && state.args.length === 1)) return reporter.error('Too many args for : ' + state.tag);\n if (!Array.isArray(data)) return reporter.error('seqof/setof, but data is not Array');\n var child = this.clone();\n child._baseState.implicit = null;\n content = this._createEncoderBuffer(data.map(function (item) {\n var state = this._baseState;\n return this._getUse(state.args[0], data)._encode(item, reporter);\n }, child));\n } else if (state.use !== null) {\n result = this._getUse(state.use, parent)._encode(data, reporter);\n } else {\n content = this._encodePrimitive(state.tag, data);\n primitive = true;\n }\n }\n\n // Encode data itself\n if (!state.any && state.choice === null) {\n var tag = state.implicit !== null ? state.implicit : state.tag;\n var cls = state.implicit === null ? 'universal' : 'context';\n if (tag === null) {\n if (state.use === null) reporter.error('Tag could be omitted only for .use()');\n } else {\n if (state.use === null) result = this._encodeComposite(tag, primitive, cls, content);\n }\n }\n\n // Wrap in explicit\n if (state.explicit !== null) result = this._encodeComposite(state.explicit, false, 'context', result);\n return result;\n};\nNode.prototype._encodeChoice = function encodeChoice(data, reporter) {\n var state = this._baseState;\n var node = state.choice[data.type];\n if (!node) {\n assert(false, data.type + ' not found in ' + JSON.stringify(Object.keys(state.choice)));\n }\n return node._encode(data.value, reporter);\n};\nNode.prototype._encodePrimitive = function encodePrimitive(tag, data) {\n var state = this._baseState;\n if (/str$/.test(tag)) return this._encodeStr(data, tag);else if (tag === 'objid' && state.args) return this._encodeObjid(data, state.reverseArgs[0], state.args[1]);else if (tag === 'objid') return this._encodeObjid(data, null, null);else if (tag === 'gentime' || tag === 'utctime') return this._encodeTime(data, tag);else if (tag === 'null_') return this._encodeNull();else if (tag === 'int' || tag === 'enum') return this._encodeInt(data, state.args && state.reverseArgs[0]);else if (tag === 'bool') return this._encodeBool(data);else if (tag === 'objDesc') return this._encodeStr(data, tag);else throw new Error('Unsupported tag: ' + tag);\n};\nNode.prototype._isNumstr = function isNumstr(str) {\n return /^[0-9 ]*$/.test(str);\n};\nNode.prototype._isPrintstr = function isPrintstr(str) {\n return /^[A-Za-z0-9 '()+,-./:=?]*$/.test(str);\n};","'use strict';\n\nvar inherits = require('inherits');\nfunction Reporter(options) {\n this._reporterState = {\n obj: null,\n path: [],\n options: options || {},\n errors: []\n };\n}\nexports.Reporter = Reporter;\nReporter.prototype.isError = function isError(obj) {\n return obj instanceof ReporterError;\n};\nReporter.prototype.save = function save() {\n var state = this._reporterState;\n return {\n obj: state.obj,\n pathLen: state.path.length\n };\n};\nReporter.prototype.restore = function restore(data) {\n var state = this._reporterState;\n state.obj = data.obj;\n state.path = state.path.slice(0, data.pathLen);\n};\nReporter.prototype.enterKey = function enterKey(key) {\n return this._reporterState.path.push(key);\n};\nReporter.prototype.exitKey = function exitKey(index) {\n var state = this._reporterState;\n state.path = state.path.slice(0, index - 1);\n};\nReporter.prototype.leaveKey = function leaveKey(index, key, value) {\n var state = this._reporterState;\n this.exitKey(index);\n if (state.obj !== null) state.obj[key] = value;\n};\nReporter.prototype.path = function path() {\n return this._reporterState.path.join('/');\n};\nReporter.prototype.enterObject = function enterObject() {\n var state = this._reporterState;\n var prev = state.obj;\n state.obj = {};\n return prev;\n};\nReporter.prototype.leaveObject = function leaveObject(prev) {\n var state = this._reporterState;\n var now = state.obj;\n state.obj = prev;\n return now;\n};\nReporter.prototype.error = function error(msg) {\n var err;\n var state = this._reporterState;\n var inherited = msg instanceof ReporterError;\n if (inherited) {\n err = msg;\n } else {\n err = new ReporterError(state.path.map(function (elem) {\n return '[' + JSON.stringify(elem) + ']';\n }).join(''), msg.message || msg, msg.stack);\n }\n if (!state.options.partial) throw err;\n if (!inherited) state.errors.push(err);\n return err;\n};\nReporter.prototype.wrapResult = function wrapResult(result) {\n var state = this._reporterState;\n if (!state.options.partial) return result;\n return {\n result: this.isError(result) ? null : result,\n errors: state.errors\n };\n};\nfunction ReporterError(path, msg) {\n this.path = path;\n this.rethrow(msg);\n}\ninherits(ReporterError, Error);\nReporterError.prototype.rethrow = function rethrow(msg) {\n this.message = msg + ' at: ' + (this.path || '(shallow)');\n if (Error.captureStackTrace) Error.captureStackTrace(this, ReporterError);\n if (!this.stack) {\n try {\n // IE only adds stack when thrown\n throw new Error(this.message);\n } catch (e) {\n this.stack = e.stack;\n }\n }\n return this;\n};","'use strict';\n\n// Helper\nfunction reverse(map) {\n var res = {};\n Object.keys(map).forEach(function (key) {\n // Convert key to integer if it is stringified\n if ((key | 0) == key) key = key | 0;\n var value = map[key];\n res[value] = key;\n });\n return res;\n}\nexports.tagClass = {\n 0: 'universal',\n 1: 'application',\n 2: 'context',\n 3: 'private'\n};\nexports.tagClassByName = reverse(exports.tagClass);\nexports.tag = {\n 0x00: 'end',\n 0x01: 'bool',\n 0x02: 'int',\n 0x03: 'bitstr',\n 0x04: 'octstr',\n 0x05: 'null_',\n 0x06: 'objid',\n 0x07: 'objDesc',\n 0x08: 'external',\n 0x09: 'real',\n 0x0a: 'enum',\n 0x0b: 'embed',\n 0x0c: 'utf8str',\n 0x0d: 'relativeOid',\n 0x10: 'seq',\n 0x11: 'set',\n 0x12: 'numstr',\n 0x13: 'printstr',\n 0x14: 't61str',\n 0x15: 'videostr',\n 0x16: 'ia5str',\n 0x17: 'utctime',\n 0x18: 'gentime',\n 0x19: 'graphstr',\n 0x1a: 'iso646str',\n 0x1b: 'genstr',\n 0x1c: 'unistr',\n 0x1d: 'charstr',\n 0x1e: 'bmpstr'\n};\nexports.tagByName = reverse(exports.tag);","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert(val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits(ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function TempCtor() {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN(number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n BN.BN = BN;\n BN.wordSize = 26;\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {}\n BN.isBN = function isBN(num) {\n if (num instanceof BN) {\n return true;\n }\n return num !== null && typeof num === 'object' && num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n BN.max = function max(left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n BN.min = function min(left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n BN.prototype._init = function init(number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n BN.prototype._initNumber = function _initNumber(number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [number & 0x3ffffff];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [number & 0x3ffffff, number / 0x4000000 & 0x3ffffff];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [number & 0x3ffffff, number / 0x4000000 & 0x3ffffff, 1];\n this.length = 3;\n }\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n BN.prototype._initArray = function _initArray(number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | number[i - 1] << 8 | number[i - 2] << 16;\n this.words[j] |= w << off & 0x3ffffff;\n this.words[j + 1] = w >>> 26 - off & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | number[i + 1] << 8 | number[i + 2] << 16;\n this.words[j] |= w << off & 0x3ffffff;\n this.words[j + 1] = w >>> 26 - off & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this.strip();\n };\n function parseHex4Bits(string, index) {\n var c = string.charCodeAt(index);\n // 'A' - 'F'\n if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n // '0' - '9'\n } else {\n return c - 48 & 0xf;\n }\n }\n function parseHexByte(string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n BN.prototype._parseHex = function _parseHex(number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n this.strip();\n };\n function parseBase(str, start, end, mul) {\n var r = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n r += c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n r += c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n r += c;\n }\n }\n return r;\n }\n BN.prototype._parseBase = function _parseBase(number, base, start) {\n // Initialize as zero\n this.words = [0];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = limbPow / base | 0;\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n this.strip();\n };\n BN.prototype.copy = function copy(dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n BN.prototype.clone = function clone() {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n BN.prototype._expand = function _expand(size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype.strip = function strip() {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n BN.prototype._normSign = function _normSign() {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n BN.prototype.inspect = function inspect() {\n return (this.red ? '';\n };\n\n /*\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n */\n\n var zeros = ['', '0', '00', '000', '0000', '00000', '000000', '0000000', '00000000', '000000000', '0000000000', '00000000000', '000000000000', '0000000000000', '00000000000000', '000000000000000', '0000000000000000', '00000000000000000', '000000000000000000', '0000000000000000000', '00000000000000000000', '000000000000000000000', '0000000000000000000000', '00000000000000000000000', '000000000000000000000000', '0000000000000000000000000'];\n var groupSizes = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5];\n var groupBases = [0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632, 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149, 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176];\n BN.prototype.toString = function toString(base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = ((w << off | carry) & 0xffffff).toString(16);\n carry = w >>> 24 - off & 0xffffff;\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modn(groupBase).toString(base);\n c = c.idivn(groupBase);\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n assert(false, 'Base should be between 2 and 36');\n };\n BN.prototype.toNumber = function toNumber() {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + this.words[1] * 0x4000000;\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return this.negative !== 0 ? -ret : ret;\n };\n BN.prototype.toJSON = function toJSON() {\n return this.toString(16);\n };\n BN.prototype.toBuffer = function toBuffer(endian, length) {\n assert(typeof Buffer !== 'undefined');\n return this.toArrayLike(Buffer, endian, length);\n };\n BN.prototype.toArray = function toArray(endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n BN.prototype.toArrayLike = function toArrayLike(ArrayType, endian, length) {\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n this.strip();\n var littleEndian = endian === 'le';\n var res = new ArrayType(reqLength);\n var b, i;\n var q = this.clone();\n if (!littleEndian) {\n // Assume big-endian\n for (i = 0; i < reqLength - byteLength; i++) {\n res[i] = 0;\n }\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n res[reqLength - i - 1] = b;\n }\n } else {\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n res[i] = b;\n }\n for (; i < reqLength; i++) {\n res[i] = 0;\n }\n }\n return res;\n };\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits(w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits(w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n BN.prototype._zeroBits = function _zeroBits(w) {\n // Short-cut\n if (w === 0) return 26;\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength() {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n function toBitArray(num) {\n var w = new Array(num.bitLength());\n for (var bit = 0; bit < w.length; bit++) {\n var off = bit / 26 | 0;\n var wbit = bit % 26;\n w[bit] = (num.words[off] & 1 << wbit) >>> wbit;\n }\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits() {\n if (this.isZero()) return 0;\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n BN.prototype.byteLength = function byteLength() {\n return Math.ceil(this.bitLength() / 8);\n };\n BN.prototype.toTwos = function toTwos(width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n BN.prototype.fromTwos = function fromTwos(width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n BN.prototype.isNeg = function isNeg() {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg() {\n return this.clone().ineg();\n };\n BN.prototype.ineg = function ineg() {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor(num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n return this.strip();\n };\n BN.prototype.ior = function ior(num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or(num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n BN.prototype.uor = function uor(num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand(num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n this.length = b.length;\n return this.strip();\n };\n BN.prototype.iand = function iand(num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and(num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n BN.prototype.uand = function uand(num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor(num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n this.length = a.length;\n return this.strip();\n };\n BN.prototype.ixor = function ixor(num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor(num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n BN.prototype.uxor = function uxor(num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn(width) {\n assert(typeof width === 'number' && width >= 0);\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & 0x3ffffff >> 26 - bitsLeft;\n }\n\n // And remove leading zeroes\n return this.strip();\n };\n BN.prototype.notn = function notn(width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn(bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n var off = bit / 26 | 0;\n var wbit = bit % 26;\n this._expand(off + 1);\n if (val) {\n this.words[off] = this.words[off] | 1 << wbit;\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n return this.strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd(num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add(num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n if (this.length > num.length) return this.clone().iadd(num);\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub(num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n this.length = Math.max(this.length, i);\n if (a !== this) {\n this.negative = 1;\n }\n return this.strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub(num) {\n return this.clone().isub(num);\n };\n function smallMulTo(self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = self.length + num.length | 0;\n out.length = len;\n len = len - 1 | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n var lo = r & 0x3ffffff;\n var carry = r / 0x4000000 | 0;\n out.words[0] = lo;\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += r / 0x4000000 | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n return out.strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo(self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = mid + Math.imul(ah0, bl0) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w0 >>> 26) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = mid + Math.imul(ah1, bl0) | 0;\n hi = Math.imul(ah1, bh0);\n lo = lo + Math.imul(al0, bl1) | 0;\n mid = mid + Math.imul(al0, bh1) | 0;\n mid = mid + Math.imul(ah0, bl1) | 0;\n hi = hi + Math.imul(ah0, bh1) | 0;\n var w1 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w1 >>> 26) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = mid + Math.imul(ah2, bl0) | 0;\n hi = Math.imul(ah2, bh0);\n lo = lo + Math.imul(al1, bl1) | 0;\n mid = mid + Math.imul(al1, bh1) | 0;\n mid = mid + Math.imul(ah1, bl1) | 0;\n hi = hi + Math.imul(ah1, bh1) | 0;\n lo = lo + Math.imul(al0, bl2) | 0;\n mid = mid + Math.imul(al0, bh2) | 0;\n mid = mid + Math.imul(ah0, bl2) | 0;\n hi = hi + Math.imul(ah0, bh2) | 0;\n var w2 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w2 >>> 26) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = mid + Math.imul(ah3, bl0) | 0;\n hi = Math.imul(ah3, bh0);\n lo = lo + Math.imul(al2, bl1) | 0;\n mid = mid + Math.imul(al2, bh1) | 0;\n mid = mid + Math.imul(ah2, bl1) | 0;\n hi = hi + Math.imul(ah2, bh1) | 0;\n lo = lo + Math.imul(al1, bl2) | 0;\n mid = mid + Math.imul(al1, bh2) | 0;\n mid = mid + Math.imul(ah1, bl2) | 0;\n hi = hi + Math.imul(ah1, bh2) | 0;\n lo = lo + Math.imul(al0, bl3) | 0;\n mid = mid + Math.imul(al0, bh3) | 0;\n mid = mid + Math.imul(ah0, bl3) | 0;\n hi = hi + Math.imul(ah0, bh3) | 0;\n var w3 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w3 >>> 26) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = mid + Math.imul(ah4, bl0) | 0;\n hi = Math.imul(ah4, bh0);\n lo = lo + Math.imul(al3, bl1) | 0;\n mid = mid + Math.imul(al3, bh1) | 0;\n mid = mid + Math.imul(ah3, bl1) | 0;\n hi = hi + Math.imul(ah3, bh1) | 0;\n lo = lo + Math.imul(al2, bl2) | 0;\n mid = mid + Math.imul(al2, bh2) | 0;\n mid = mid + Math.imul(ah2, bl2) | 0;\n hi = hi + Math.imul(ah2, bh2) | 0;\n lo = lo + Math.imul(al1, bl3) | 0;\n mid = mid + Math.imul(al1, bh3) | 0;\n mid = mid + Math.imul(ah1, bl3) | 0;\n hi = hi + Math.imul(ah1, bh3) | 0;\n lo = lo + Math.imul(al0, bl4) | 0;\n mid = mid + Math.imul(al0, bh4) | 0;\n mid = mid + Math.imul(ah0, bl4) | 0;\n hi = hi + Math.imul(ah0, bh4) | 0;\n var w4 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w4 >>> 26) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = mid + Math.imul(ah5, bl0) | 0;\n hi = Math.imul(ah5, bh0);\n lo = lo + Math.imul(al4, bl1) | 0;\n mid = mid + Math.imul(al4, bh1) | 0;\n mid = mid + Math.imul(ah4, bl1) | 0;\n hi = hi + Math.imul(ah4, bh1) | 0;\n lo = lo + Math.imul(al3, bl2) | 0;\n mid = mid + Math.imul(al3, bh2) | 0;\n mid = mid + Math.imul(ah3, bl2) | 0;\n hi = hi + Math.imul(ah3, bh2) | 0;\n lo = lo + Math.imul(al2, bl3) | 0;\n mid = mid + Math.imul(al2, bh3) | 0;\n mid = mid + Math.imul(ah2, bl3) | 0;\n hi = hi + Math.imul(ah2, bh3) | 0;\n lo = lo + Math.imul(al1, bl4) | 0;\n mid = mid + Math.imul(al1, bh4) | 0;\n mid = mid + Math.imul(ah1, bl4) | 0;\n hi = hi + Math.imul(ah1, bh4) | 0;\n lo = lo + Math.imul(al0, bl5) | 0;\n mid = mid + Math.imul(al0, bh5) | 0;\n mid = mid + Math.imul(ah0, bl5) | 0;\n hi = hi + Math.imul(ah0, bh5) | 0;\n var w5 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w5 >>> 26) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = mid + Math.imul(ah6, bl0) | 0;\n hi = Math.imul(ah6, bh0);\n lo = lo + Math.imul(al5, bl1) | 0;\n mid = mid + Math.imul(al5, bh1) | 0;\n mid = mid + Math.imul(ah5, bl1) | 0;\n hi = hi + Math.imul(ah5, bh1) | 0;\n lo = lo + Math.imul(al4, bl2) | 0;\n mid = mid + Math.imul(al4, bh2) | 0;\n mid = mid + Math.imul(ah4, bl2) | 0;\n hi = hi + Math.imul(ah4, bh2) | 0;\n lo = lo + Math.imul(al3, bl3) | 0;\n mid = mid + Math.imul(al3, bh3) | 0;\n mid = mid + Math.imul(ah3, bl3) | 0;\n hi = hi + Math.imul(ah3, bh3) | 0;\n lo = lo + Math.imul(al2, bl4) | 0;\n mid = mid + Math.imul(al2, bh4) | 0;\n mid = mid + Math.imul(ah2, bl4) | 0;\n hi = hi + Math.imul(ah2, bh4) | 0;\n lo = lo + Math.imul(al1, bl5) | 0;\n mid = mid + Math.imul(al1, bh5) | 0;\n mid = mid + Math.imul(ah1, bl5) | 0;\n hi = hi + Math.imul(ah1, bh5) | 0;\n lo = lo + Math.imul(al0, bl6) | 0;\n mid = mid + Math.imul(al0, bh6) | 0;\n mid = mid + Math.imul(ah0, bl6) | 0;\n hi = hi + Math.imul(ah0, bh6) | 0;\n var w6 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w6 >>> 26) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = mid + Math.imul(ah7, bl0) | 0;\n hi = Math.imul(ah7, bh0);\n lo = lo + Math.imul(al6, bl1) | 0;\n mid = mid + Math.imul(al6, bh1) | 0;\n mid = mid + Math.imul(ah6, bl1) | 0;\n hi = hi + Math.imul(ah6, bh1) | 0;\n lo = lo + Math.imul(al5, bl2) | 0;\n mid = mid + Math.imul(al5, bh2) | 0;\n mid = mid + Math.imul(ah5, bl2) | 0;\n hi = hi + Math.imul(ah5, bh2) | 0;\n lo = lo + Math.imul(al4, bl3) | 0;\n mid = mid + Math.imul(al4, bh3) | 0;\n mid = mid + Math.imul(ah4, bl3) | 0;\n hi = hi + Math.imul(ah4, bh3) | 0;\n lo = lo + Math.imul(al3, bl4) | 0;\n mid = mid + Math.imul(al3, bh4) | 0;\n mid = mid + Math.imul(ah3, bl4) | 0;\n hi = hi + Math.imul(ah3, bh4) | 0;\n lo = lo + Math.imul(al2, bl5) | 0;\n mid = mid + Math.imul(al2, bh5) | 0;\n mid = mid + Math.imul(ah2, bl5) | 0;\n hi = hi + Math.imul(ah2, bh5) | 0;\n lo = lo + Math.imul(al1, bl6) | 0;\n mid = mid + Math.imul(al1, bh6) | 0;\n mid = mid + Math.imul(ah1, bl6) | 0;\n hi = hi + Math.imul(ah1, bh6) | 0;\n lo = lo + Math.imul(al0, bl7) | 0;\n mid = mid + Math.imul(al0, bh7) | 0;\n mid = mid + Math.imul(ah0, bl7) | 0;\n hi = hi + Math.imul(ah0, bh7) | 0;\n var w7 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w7 >>> 26) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = mid + Math.imul(ah8, bl0) | 0;\n hi = Math.imul(ah8, bh0);\n lo = lo + Math.imul(al7, bl1) | 0;\n mid = mid + Math.imul(al7, bh1) | 0;\n mid = mid + Math.imul(ah7, bl1) | 0;\n hi = hi + Math.imul(ah7, bh1) | 0;\n lo = lo + Math.imul(al6, bl2) | 0;\n mid = mid + Math.imul(al6, bh2) | 0;\n mid = mid + Math.imul(ah6, bl2) | 0;\n hi = hi + Math.imul(ah6, bh2) | 0;\n lo = lo + Math.imul(al5, bl3) | 0;\n mid = mid + Math.imul(al5, bh3) | 0;\n mid = mid + Math.imul(ah5, bl3) | 0;\n hi = hi + Math.imul(ah5, bh3) | 0;\n lo = lo + Math.imul(al4, bl4) | 0;\n mid = mid + Math.imul(al4, bh4) | 0;\n mid = mid + Math.imul(ah4, bl4) | 0;\n hi = hi + Math.imul(ah4, bh4) | 0;\n lo = lo + Math.imul(al3, bl5) | 0;\n mid = mid + Math.imul(al3, bh5) | 0;\n mid = mid + Math.imul(ah3, bl5) | 0;\n hi = hi + Math.imul(ah3, bh5) | 0;\n lo = lo + Math.imul(al2, bl6) | 0;\n mid = mid + Math.imul(al2, bh6) | 0;\n mid = mid + Math.imul(ah2, bl6) | 0;\n hi = hi + Math.imul(ah2, bh6) | 0;\n lo = lo + Math.imul(al1, bl7) | 0;\n mid = mid + Math.imul(al1, bh7) | 0;\n mid = mid + Math.imul(ah1, bl7) | 0;\n hi = hi + Math.imul(ah1, bh7) | 0;\n lo = lo + Math.imul(al0, bl8) | 0;\n mid = mid + Math.imul(al0, bh8) | 0;\n mid = mid + Math.imul(ah0, bl8) | 0;\n hi = hi + Math.imul(ah0, bh8) | 0;\n var w8 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w8 >>> 26) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = mid + Math.imul(ah9, bl0) | 0;\n hi = Math.imul(ah9, bh0);\n lo = lo + Math.imul(al8, bl1) | 0;\n mid = mid + Math.imul(al8, bh1) | 0;\n mid = mid + Math.imul(ah8, bl1) | 0;\n hi = hi + Math.imul(ah8, bh1) | 0;\n lo = lo + Math.imul(al7, bl2) | 0;\n mid = mid + Math.imul(al7, bh2) | 0;\n mid = mid + Math.imul(ah7, bl2) | 0;\n hi = hi + Math.imul(ah7, bh2) | 0;\n lo = lo + Math.imul(al6, bl3) | 0;\n mid = mid + Math.imul(al6, bh3) | 0;\n mid = mid + Math.imul(ah6, bl3) | 0;\n hi = hi + Math.imul(ah6, bh3) | 0;\n lo = lo + Math.imul(al5, bl4) | 0;\n mid = mid + Math.imul(al5, bh4) | 0;\n mid = mid + Math.imul(ah5, bl4) | 0;\n hi = hi + Math.imul(ah5, bh4) | 0;\n lo = lo + Math.imul(al4, bl5) | 0;\n mid = mid + Math.imul(al4, bh5) | 0;\n mid = mid + Math.imul(ah4, bl5) | 0;\n hi = hi + Math.imul(ah4, bh5) | 0;\n lo = lo + Math.imul(al3, bl6) | 0;\n mid = mid + Math.imul(al3, bh6) | 0;\n mid = mid + Math.imul(ah3, bl6) | 0;\n hi = hi + Math.imul(ah3, bh6) | 0;\n lo = lo + Math.imul(al2, bl7) | 0;\n mid = mid + Math.imul(al2, bh7) | 0;\n mid = mid + Math.imul(ah2, bl7) | 0;\n hi = hi + Math.imul(ah2, bh7) | 0;\n lo = lo + Math.imul(al1, bl8) | 0;\n mid = mid + Math.imul(al1, bh8) | 0;\n mid = mid + Math.imul(ah1, bl8) | 0;\n hi = hi + Math.imul(ah1, bh8) | 0;\n lo = lo + Math.imul(al0, bl9) | 0;\n mid = mid + Math.imul(al0, bh9) | 0;\n mid = mid + Math.imul(ah0, bl9) | 0;\n hi = hi + Math.imul(ah0, bh9) | 0;\n var w9 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w9 >>> 26) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = mid + Math.imul(ah9, bl1) | 0;\n hi = Math.imul(ah9, bh1);\n lo = lo + Math.imul(al8, bl2) | 0;\n mid = mid + Math.imul(al8, bh2) | 0;\n mid = mid + Math.imul(ah8, bl2) | 0;\n hi = hi + Math.imul(ah8, bh2) | 0;\n lo = lo + Math.imul(al7, bl3) | 0;\n mid = mid + Math.imul(al7, bh3) | 0;\n mid = mid + Math.imul(ah7, bl3) | 0;\n hi = hi + Math.imul(ah7, bh3) | 0;\n lo = lo + Math.imul(al6, bl4) | 0;\n mid = mid + Math.imul(al6, bh4) | 0;\n mid = mid + Math.imul(ah6, bl4) | 0;\n hi = hi + Math.imul(ah6, bh4) | 0;\n lo = lo + Math.imul(al5, bl5) | 0;\n mid = mid + Math.imul(al5, bh5) | 0;\n mid = mid + Math.imul(ah5, bl5) | 0;\n hi = hi + Math.imul(ah5, bh5) | 0;\n lo = lo + Math.imul(al4, bl6) | 0;\n mid = mid + Math.imul(al4, bh6) | 0;\n mid = mid + Math.imul(ah4, bl6) | 0;\n hi = hi + Math.imul(ah4, bh6) | 0;\n lo = lo + Math.imul(al3, bl7) | 0;\n mid = mid + Math.imul(al3, bh7) | 0;\n mid = mid + Math.imul(ah3, bl7) | 0;\n hi = hi + Math.imul(ah3, bh7) | 0;\n lo = lo + Math.imul(al2, bl8) | 0;\n mid = mid + Math.imul(al2, bh8) | 0;\n mid = mid + Math.imul(ah2, bl8) | 0;\n hi = hi + Math.imul(ah2, bh8) | 0;\n lo = lo + Math.imul(al1, bl9) | 0;\n mid = mid + Math.imul(al1, bh9) | 0;\n mid = mid + Math.imul(ah1, bl9) | 0;\n hi = hi + Math.imul(ah1, bh9) | 0;\n var w10 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w10 >>> 26) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = mid + Math.imul(ah9, bl2) | 0;\n hi = Math.imul(ah9, bh2);\n lo = lo + Math.imul(al8, bl3) | 0;\n mid = mid + Math.imul(al8, bh3) | 0;\n mid = mid + Math.imul(ah8, bl3) | 0;\n hi = hi + Math.imul(ah8, bh3) | 0;\n lo = lo + Math.imul(al7, bl4) | 0;\n mid = mid + Math.imul(al7, bh4) | 0;\n mid = mid + Math.imul(ah7, bl4) | 0;\n hi = hi + Math.imul(ah7, bh4) | 0;\n lo = lo + Math.imul(al6, bl5) | 0;\n mid = mid + Math.imul(al6, bh5) | 0;\n mid = mid + Math.imul(ah6, bl5) | 0;\n hi = hi + Math.imul(ah6, bh5) | 0;\n lo = lo + Math.imul(al5, bl6) | 0;\n mid = mid + Math.imul(al5, bh6) | 0;\n mid = mid + Math.imul(ah5, bl6) | 0;\n hi = hi + Math.imul(ah5, bh6) | 0;\n lo = lo + Math.imul(al4, bl7) | 0;\n mid = mid + Math.imul(al4, bh7) | 0;\n mid = mid + Math.imul(ah4, bl7) | 0;\n hi = hi + Math.imul(ah4, bh7) | 0;\n lo = lo + Math.imul(al3, bl8) | 0;\n mid = mid + Math.imul(al3, bh8) | 0;\n mid = mid + Math.imul(ah3, bl8) | 0;\n hi = hi + Math.imul(ah3, bh8) | 0;\n lo = lo + Math.imul(al2, bl9) | 0;\n mid = mid + Math.imul(al2, bh9) | 0;\n mid = mid + Math.imul(ah2, bl9) | 0;\n hi = hi + Math.imul(ah2, bh9) | 0;\n var w11 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w11 >>> 26) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = mid + Math.imul(ah9, bl3) | 0;\n hi = Math.imul(ah9, bh3);\n lo = lo + Math.imul(al8, bl4) | 0;\n mid = mid + Math.imul(al8, bh4) | 0;\n mid = mid + Math.imul(ah8, bl4) | 0;\n hi = hi + Math.imul(ah8, bh4) | 0;\n lo = lo + Math.imul(al7, bl5) | 0;\n mid = mid + Math.imul(al7, bh5) | 0;\n mid = mid + Math.imul(ah7, bl5) | 0;\n hi = hi + Math.imul(ah7, bh5) | 0;\n lo = lo + Math.imul(al6, bl6) | 0;\n mid = mid + Math.imul(al6, bh6) | 0;\n mid = mid + Math.imul(ah6, bl6) | 0;\n hi = hi + Math.imul(ah6, bh6) | 0;\n lo = lo + Math.imul(al5, bl7) | 0;\n mid = mid + Math.imul(al5, bh7) | 0;\n mid = mid + Math.imul(ah5, bl7) | 0;\n hi = hi + Math.imul(ah5, bh7) | 0;\n lo = lo + Math.imul(al4, bl8) | 0;\n mid = mid + Math.imul(al4, bh8) | 0;\n mid = mid + Math.imul(ah4, bl8) | 0;\n hi = hi + Math.imul(ah4, bh8) | 0;\n lo = lo + Math.imul(al3, bl9) | 0;\n mid = mid + Math.imul(al3, bh9) | 0;\n mid = mid + Math.imul(ah3, bl9) | 0;\n hi = hi + Math.imul(ah3, bh9) | 0;\n var w12 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w12 >>> 26) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = mid + Math.imul(ah9, bl4) | 0;\n hi = Math.imul(ah9, bh4);\n lo = lo + Math.imul(al8, bl5) | 0;\n mid = mid + Math.imul(al8, bh5) | 0;\n mid = mid + Math.imul(ah8, bl5) | 0;\n hi = hi + Math.imul(ah8, bh5) | 0;\n lo = lo + Math.imul(al7, bl6) | 0;\n mid = mid + Math.imul(al7, bh6) | 0;\n mid = mid + Math.imul(ah7, bl6) | 0;\n hi = hi + Math.imul(ah7, bh6) | 0;\n lo = lo + Math.imul(al6, bl7) | 0;\n mid = mid + Math.imul(al6, bh7) | 0;\n mid = mid + Math.imul(ah6, bl7) | 0;\n hi = hi + Math.imul(ah6, bh7) | 0;\n lo = lo + Math.imul(al5, bl8) | 0;\n mid = mid + Math.imul(al5, bh8) | 0;\n mid = mid + Math.imul(ah5, bl8) | 0;\n hi = hi + Math.imul(ah5, bh8) | 0;\n lo = lo + Math.imul(al4, bl9) | 0;\n mid = mid + Math.imul(al4, bh9) | 0;\n mid = mid + Math.imul(ah4, bl9) | 0;\n hi = hi + Math.imul(ah4, bh9) | 0;\n var w13 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w13 >>> 26) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = mid + Math.imul(ah9, bl5) | 0;\n hi = Math.imul(ah9, bh5);\n lo = lo + Math.imul(al8, bl6) | 0;\n mid = mid + Math.imul(al8, bh6) | 0;\n mid = mid + Math.imul(ah8, bl6) | 0;\n hi = hi + Math.imul(ah8, bh6) | 0;\n lo = lo + Math.imul(al7, bl7) | 0;\n mid = mid + Math.imul(al7, bh7) | 0;\n mid = mid + Math.imul(ah7, bl7) | 0;\n hi = hi + Math.imul(ah7, bh7) | 0;\n lo = lo + Math.imul(al6, bl8) | 0;\n mid = mid + Math.imul(al6, bh8) | 0;\n mid = mid + Math.imul(ah6, bl8) | 0;\n hi = hi + Math.imul(ah6, bh8) | 0;\n lo = lo + Math.imul(al5, bl9) | 0;\n mid = mid + Math.imul(al5, bh9) | 0;\n mid = mid + Math.imul(ah5, bl9) | 0;\n hi = hi + Math.imul(ah5, bh9) | 0;\n var w14 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w14 >>> 26) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = mid + Math.imul(ah9, bl6) | 0;\n hi = Math.imul(ah9, bh6);\n lo = lo + Math.imul(al8, bl7) | 0;\n mid = mid + Math.imul(al8, bh7) | 0;\n mid = mid + Math.imul(ah8, bl7) | 0;\n hi = hi + Math.imul(ah8, bh7) | 0;\n lo = lo + Math.imul(al7, bl8) | 0;\n mid = mid + Math.imul(al7, bh8) | 0;\n mid = mid + Math.imul(ah7, bl8) | 0;\n hi = hi + Math.imul(ah7, bh8) | 0;\n lo = lo + Math.imul(al6, bl9) | 0;\n mid = mid + Math.imul(al6, bh9) | 0;\n mid = mid + Math.imul(ah6, bl9) | 0;\n hi = hi + Math.imul(ah6, bh9) | 0;\n var w15 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w15 >>> 26) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = mid + Math.imul(ah9, bl7) | 0;\n hi = Math.imul(ah9, bh7);\n lo = lo + Math.imul(al8, bl8) | 0;\n mid = mid + Math.imul(al8, bh8) | 0;\n mid = mid + Math.imul(ah8, bl8) | 0;\n hi = hi + Math.imul(ah8, bh8) | 0;\n lo = lo + Math.imul(al7, bl9) | 0;\n mid = mid + Math.imul(al7, bh9) | 0;\n mid = mid + Math.imul(ah7, bl9) | 0;\n hi = hi + Math.imul(ah7, bh9) | 0;\n var w16 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w16 >>> 26) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = mid + Math.imul(ah9, bl8) | 0;\n hi = Math.imul(ah9, bh8);\n lo = lo + Math.imul(al8, bl9) | 0;\n mid = mid + Math.imul(al8, bh9) | 0;\n mid = mid + Math.imul(ah8, bl9) | 0;\n hi = hi + Math.imul(ah8, bh9) | 0;\n var w17 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w17 >>> 26) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = mid + Math.imul(ah9, bl9) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (c + lo | 0) + ((mid & 0x1fff) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w18 >>> 26) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n function bigMulTo(self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n var lo = r & 0x3ffffff;\n ncarry = ncarry + (r / 0x4000000 | 0) | 0;\n lo = lo + rword | 0;\n rword = lo & 0x3ffffff;\n ncarry = ncarry + (lo >>> 26) | 0;\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n return out.strip();\n }\n function jumboMulTo(self, num, out) {\n var fftm = new FFTM();\n return fftm.mulp(self, num, out);\n }\n BN.prototype.mulTo = function mulTo(num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM(x, y) {\n this.x = x;\n this.y = y;\n }\n FFTM.prototype.makeRBT = function makeRBT(N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin(x, l, N) {\n if (x === 0 || x === N - 1) return x;\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << l - i - 1;\n x >>= 1;\n }\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute(rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n FFTM.prototype.transform = function transform(rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n var rx = rtwdf_ * ro - itwdf_ * io;\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n FFTM.prototype.guessLen13b = function guessLen13b(n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n return 1 << i + 1 + odd;\n };\n FFTM.prototype.conjugate = function conjugate(rws, iws, N) {\n if (N <= 1) return;\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n t = iws[i];\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n FFTM.prototype.normalize13b = function normalize13b(ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 + Math.round(ws[2 * i] / N) + carry;\n ws[i] = w & 0x3ffffff;\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n return ws;\n };\n FFTM.prototype.convert13b = function convert13b(ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n rws[2 * i] = carry & 0x1fff;\n carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff;\n carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n FFTM.prototype.stub = function stub(N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n return ph;\n };\n FFTM.prototype.mulp = function mulp(x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n var rbt = this.makeRBT(N);\n var _ = this.stub(N);\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n var rmws = out.words;\n rmws.length = N;\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out.strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul(num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf(num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul(num) {\n return this.clone().mulTo(num, this);\n };\n BN.prototype.imuln = function imuln(num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += w / 0x4000000 | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n BN.prototype.muln = function muln(num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr() {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr() {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow(num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n res = res.mul(q);\n }\n }\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln(bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = 0x3ffffff >>> 26 - r << 26 - r;\n var i;\n if (r !== 0) {\n var carry = 0;\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = (this.words[i] | 0) - newCarry << r;\n this.words[i] = c | carry;\n carry = newCarry >>> 26 - r;\n }\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n this.length += s;\n }\n return this.strip();\n };\n BN.prototype.ishln = function ishln(bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn(bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - hint % 26) / 26;\n } else {\n h = 0;\n }\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ 0x3ffffff >>> r << r;\n var maskedWords = extended;\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = carry << 26 - r | word >>> r;\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n return this.strip();\n };\n BN.prototype.ishrn = function ishrn(bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln(bits) {\n return this.clone().ishln(bits);\n };\n BN.prototype.ushln = function ushln(bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn(bits) {\n return this.clone().ishrn(bits);\n };\n BN.prototype.ushrn = function ushrn(bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn(bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn(bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n if (this.length <= s) {\n return this;\n }\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n if (r !== 0) {\n var mask = 0x3ffffff ^ 0x3ffffff >>> r << r;\n this.words[this.length - 1] &= mask;\n }\n return this.strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn(bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn(num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) < num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n BN.prototype._iaddn = function _iaddn(num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn(num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n this.words[0] -= num;\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n return this.strip();\n };\n BN.prototype.addn = function addn(num) {\n return this.clone().iaddn(num);\n };\n BN.prototype.subn = function subn(num) {\n return this.clone().isubn(num);\n };\n BN.prototype.iabs = function iabs() {\n this.negative = 0;\n return this;\n };\n BN.prototype.abs = function abs() {\n return this.clone().iabs();\n };\n BN.prototype._ishlnsubmul = function _ishlnsubmul(num, mul, shift) {\n var len = num.length + shift;\n var i;\n this._expand(len);\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - (right / 0x4000000 | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n if (carry === 0) return this.strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n return this.strip();\n };\n BN.prototype._wordDiv = function _wordDiv(num, mode) {\n var shift = this.length - num.length;\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 + (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min(qj / bhi | 0, 0x3ffffff);\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q.strip();\n }\n a.strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod(num, mode, positive) {\n assert(!num.isZero());\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n return {\n div: div,\n mod: mod\n };\n }\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n return {\n div: div,\n mod: res.mod\n };\n }\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modn(num.words[0]))\n };\n }\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modn(num.words[0]))\n };\n }\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div(num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod(num) {\n return this.divmod(num, 'mod', false).mod;\n };\n BN.prototype.umod = function umod(num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound(num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n BN.prototype.modn = function modn(num) {\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n return acc;\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn(num) {\n assert(num <= 0x3ffffff);\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = w / num | 0;\n carry = w % num;\n }\n return this.strip();\n };\n BN.prototype.divn = function divn(num) {\n return this.clone().idivn(num);\n };\n BN.prototype.egcd = function egcd(p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n var x = this;\n var y = p.clone();\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n var g = 0;\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n var yp = y.clone();\n var xp = x.clone();\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp(p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n var a = this;\n var b = p.clone();\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n var x1 = new BN(1);\n var x2 = new BN(0);\n var delta = b.clone();\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n x1.iushrn(1);\n }\n }\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n x2.iushrn(1);\n }\n }\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n return res;\n };\n BN.prototype.gcd = function gcd(num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n a.isub(b);\n } while (true);\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm(num) {\n return this.egcd(num).a.umod(num);\n };\n BN.prototype.isEven = function isEven() {\n return (this.words[0] & 1) === 0;\n };\n BN.prototype.isOdd = function isOdd() {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln(num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn(bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n BN.prototype.isZero = function isZero() {\n return this.length === 1 && this.words[0] === 0;\n };\n BN.prototype.cmpn = function cmpn(num) {\n var negative = num < 0;\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n this.strip();\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n assert(num <= 0x3ffffff, 'Number is too big');\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp(num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp(num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n BN.prototype.gtn = function gtn(num) {\n return this.cmpn(num) === 1;\n };\n BN.prototype.gt = function gt(num) {\n return this.cmp(num) === 1;\n };\n BN.prototype.gten = function gten(num) {\n return this.cmpn(num) >= 0;\n };\n BN.prototype.gte = function gte(num) {\n return this.cmp(num) >= 0;\n };\n BN.prototype.ltn = function ltn(num) {\n return this.cmpn(num) === -1;\n };\n BN.prototype.lt = function lt(num) {\n return this.cmp(num) === -1;\n };\n BN.prototype.lten = function lten(num) {\n return this.cmpn(num) <= 0;\n };\n BN.prototype.lte = function lte(num) {\n return this.cmp(num) <= 0;\n };\n BN.prototype.eqn = function eqn(num) {\n return this.cmpn(num) === 0;\n };\n BN.prototype.eq = function eq(num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red(num) {\n return new Red(num);\n };\n BN.prototype.toRed = function toRed(ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n BN.prototype.fromRed = function fromRed() {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n BN.prototype._forceRed = function _forceRed(ctx) {\n this.red = ctx;\n return this;\n };\n BN.prototype.forceRed = function forceRed(ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n BN.prototype.redAdd = function redAdd(num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n BN.prototype.redIAdd = function redIAdd(num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n BN.prototype.redSub = function redSub(num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n BN.prototype.redISub = function redISub(num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n BN.prototype.redShl = function redShl(num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n BN.prototype.redMul = function redMul(num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n BN.prototype.redIMul = function redIMul(num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n BN.prototype.redSqr = function redSqr() {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n BN.prototype.redISqr = function redISqr() {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt() {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n BN.prototype.redInvm = function redInvm() {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg() {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n BN.prototype.redPow = function redPow(num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime(name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n this.tmp = this._tmp();\n }\n MPrime.prototype._tmp = function _tmp() {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n MPrime.prototype.ireduce = function ireduce(num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is BN v4 instance\n r.strip();\n } else {\n // r is BN v5 instance\n r._strip();\n }\n }\n return r;\n };\n MPrime.prototype.split = function split(input, out) {\n input.iushrn(this.n, 0, out);\n };\n MPrime.prototype.imulK = function imulK(num) {\n return num.imul(this.k);\n };\n function K256() {\n MPrime.call(this, 'k256', 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n K256.prototype.split = function split(input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = (next & mask) << 4 | prev >>> 22;\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n K256.prototype.imulK = function imulK(num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + (lo / 0x4000000 | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n function P224() {\n MPrime.call(this, 'p224', 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n function P192() {\n MPrime.call(this, 'p192', 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n function P25519() {\n // 2 ^ 255 - 19\n MPrime.call(this, '25519', '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n P25519.prototype.imulK = function imulK(num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime(name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red(m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n Red.prototype._verify1 = function _verify1(a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n Red.prototype._verify2 = function _verify2(a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red, 'red works only with red numbers');\n };\n Red.prototype.imod = function imod(a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n return a.umod(this.m)._forceRed(this);\n };\n Red.prototype.neg = function neg(a) {\n if (a.isZero()) {\n return a.clone();\n }\n return this.m.sub(a)._forceRed(this);\n };\n Red.prototype.add = function add(a, b) {\n this._verify2(a, b);\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.iadd = function iadd(a, b) {\n this._verify2(a, b);\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n Red.prototype.sub = function sub(a, b) {\n this._verify2(a, b);\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.isub = function isub(a, b) {\n this._verify2(a, b);\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n Red.prototype.shl = function shl(a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n Red.prototype.imul = function imul(a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n Red.prototype.mul = function mul(a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n Red.prototype.isqr = function isqr(a) {\n return this.imul(a, a.clone());\n };\n Red.prototype.sqr = function sqr(a) {\n return this.mul(a, a);\n };\n Red.prototype.sqrt = function sqrt(a) {\n if (a.isZero()) return a.clone();\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n return r;\n };\n Red.prototype.invm = function invm(a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n Red.prototype.pow = function pow(a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = word >> j & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n return res;\n };\n Red.prototype.convertTo = function convertTo(num) {\n var r = num.umod(this.m);\n return r === num ? r.clone() : r;\n };\n Red.prototype.convertFrom = function convertFrom(num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont(num) {\n return new Mont(num);\n };\n function Mont(m) {\n Red.call(this, m);\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - this.shift % 26;\n }\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n Mont.prototype.convertTo = function convertTo(num) {\n return this.imod(num.ushln(this.shift));\n };\n Mont.prototype.convertFrom = function convertFrom(num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n Mont.prototype.imul = function imul(a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.mul = function mul(a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.invm = function invm(a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n return _typeof(obj);\n}\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param {*} value - the value to check\n * @returns {boolean} true if the given value is a date\n * @throws {TypeError} 1 arguments required\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\n\nexport default function isDate(value) {\n requiredArgs(1, arguments);\n return value instanceof Date || _typeof(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';\n}","import isDate from \"../isDate/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param {*} date - the date to check\n * @returns {Boolean} the date is valid\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertable into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\n\nexport default function isValid(dirtyDate) {\n requiredArgs(1, arguments);\n if (!isDate(dirtyDate) && typeof dirtyDate !== 'number') {\n return false;\n }\n var date = toDate(dirtyDate);\n return !isNaN(Number(date));\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMilliseconds from \"../addMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MILLISECONDS_IN_MINUTE = 60000;\n/**\n * @name addMinutes\n * @category Minute Helpers\n * @summary Add the specified number of minutes to the given date.\n *\n * @description\n * Add the specified number of minutes to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of minutes to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the minutes added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 30 minutes to 10 July 2014 12:00:00:\n * const result = addMinutes(new Date(2014, 6, 10, 12, 0), 30)\n * //=> Thu Jul 10 2014 12:30:00\n */\n\nexport default function addMinutes(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMilliseconds(dirtyDate, amount * MILLISECONDS_IN_MINUTE);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMilliseconds from \"../addMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MILLISECONDS_IN_HOUR = 3600000;\n/**\n * @name addHours\n * @category Hour Helpers\n * @summary Add the specified number of hours to the given date.\n *\n * @description\n * Add the specified number of hours to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of hours to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the hours added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 2 hours to 10 July 2014 23:00:00:\n * const result = addHours(new Date(2014, 6, 10, 23, 0), 2)\n * //=> Fri Jul 11 2014 01:00:00\n */\n\nexport default function addHours(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMilliseconds(dirtyDate, amount * MILLISECONDS_IN_HOUR);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addDays from \"../addDays/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addWeeks\n * @category Week Helpers\n * @summary Add the specified number of weeks to the given date.\n *\n * @description\n * Add the specified number of week to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of weeks to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the weeks added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 4 weeks to 1 September 2014:\n * const result = addWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Sep 29 2014 00:00:00\n */\n\nexport default function addWeeks(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n var days = amount * 7;\n return addDays(dirtyDate, days);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addYears\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of years to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the years added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * const result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\n\nexport default function addYears(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMonths(dirtyDate, amount * 12);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport getDaysInMonth from \"../getDaysInMonth/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} month - the month of the new date\n * @returns {Date} the new date with the month set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\n\nexport default function setMonth(dirtyDate, dirtyMonth) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var month = toInteger(dirtyMonth);\n var year = date.getFullYear();\n var day = date.getDate();\n var dateWithDesiredMonth = new Date(0);\n dateWithDesiredMonth.setFullYear(year, month, 15);\n dateWithDesiredMonth.setHours(0, 0, 0, 0);\n var daysInMonth = getDaysInMonth(dateWithDesiredMonth); // Set the last day of the new month\n // if the original date was the last day of the longer month\n\n date.setMonth(month, Math.min(day, daysInMonth));\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the number of days in a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\n\nexport default function getDaysInMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getFullYear();\n var monthIndex = date.getMonth();\n var lastDayOfMonth = new Date(0);\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n lastDayOfMonth.setHours(0, 0, 0, 0);\n return lastDayOfMonth.getDate();\n}","var CAN_USE_DOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\n// Adapted from Modernizr\n// https://github.com/Modernizr/Modernizr/blob/acb3f0d9/feature-detects/dom/passiveeventlisteners.js#L26-L37\nfunction testPassiveEventListeners() {\n if (!CAN_USE_DOM) {\n return false;\n }\n if (!window.addEventListener || !window.removeEventListener || !Object.defineProperty) {\n return false;\n }\n var supportsPassiveOption = false;\n try {\n var opts = Object.defineProperty({}, 'passive', {\n // eslint-disable-next-line getter-return\n get: function () {\n function get() {\n supportsPassiveOption = true;\n }\n return get;\n }()\n });\n var noop = function noop() {};\n window.addEventListener('testPassiveEventSupport', noop, opts);\n window.removeEventListener('testPassiveEventSupport', noop, opts);\n } catch (e) {\n // do nothing\n }\n return supportsPassiveOption;\n}\nvar memoized = void 0;\nfunction canUsePassiveEventListeners() {\n if (memoized === undefined) {\n memoized = testPassiveEventListeners();\n }\n return memoized;\n}\nfunction normalizeEventOptions(eventOptions) {\n if (!eventOptions) {\n return undefined;\n }\n if (!canUsePassiveEventListeners()) {\n // If the browser does not support the passive option, then it is expecting\n // a boolean for the options argument to specify whether it should use\n // capture or not. In more modern browsers, this is passed via the `capture`\n // option, so let's just hoist that value up.\n return !!eventOptions.capture;\n }\n return eventOptions;\n}\n\n/* eslint-disable no-bitwise */\n\n/**\n * Generate a unique key for any set of event options\n */\nfunction eventOptionsKey(normalizedEventOptions) {\n if (!normalizedEventOptions) {\n return 0;\n }\n\n // If the browser does not support passive event listeners, the normalized\n // event options will be a boolean.\n if (normalizedEventOptions === true) {\n return 100;\n }\n\n // At this point, the browser supports passive event listeners, so we expect\n // the event options to be an object with possible properties of capture,\n // passive, and once.\n //\n // We want to consistently return the same value, regardless of the order of\n // these properties, so let's use binary maths to assign each property to a\n // bit, and then add those together (with an offset to account for the\n // booleans at the beginning of this function).\n var capture = normalizedEventOptions.capture << 0;\n var passive = normalizedEventOptions.passive << 1;\n var once = normalizedEventOptions.once << 2;\n return capture + passive + once;\n}\nfunction ensureCanMutateNextEventHandlers(eventHandlers) {\n if (eventHandlers.handlers === eventHandlers.nextHandlers) {\n // eslint-disable-next-line no-param-reassign\n eventHandlers.nextHandlers = eventHandlers.handlers.slice();\n }\n}\nfunction TargetEventHandlers(target) {\n this.target = target;\n this.events = {};\n}\nTargetEventHandlers.prototype.getEventHandlers = function () {\n function getEventHandlers(eventName, options) {\n var key = String(eventName) + ' ' + String(eventOptionsKey(options));\n if (!this.events[key]) {\n this.events[key] = {\n handlers: [],\n handleEvent: undefined\n };\n this.events[key].nextHandlers = this.events[key].handlers;\n }\n return this.events[key];\n }\n return getEventHandlers;\n}();\nTargetEventHandlers.prototype.handleEvent = function () {\n function handleEvent(eventName, options, event) {\n var eventHandlers = this.getEventHandlers(eventName, options);\n eventHandlers.handlers = eventHandlers.nextHandlers;\n eventHandlers.handlers.forEach(function (handler) {\n if (handler) {\n // We need to check for presence here because a handler function may\n // cause later handlers to get removed. This can happen if you for\n // instance have a waypoint that unmounts another waypoint as part of an\n // onEnter/onLeave handler.\n handler(event);\n }\n });\n }\n return handleEvent;\n}();\nTargetEventHandlers.prototype.add = function () {\n function add(eventName, listener, options) {\n var _this = this;\n\n // options has already been normalized at this point.\n var eventHandlers = this.getEventHandlers(eventName, options);\n ensureCanMutateNextEventHandlers(eventHandlers);\n if (eventHandlers.nextHandlers.length === 0) {\n eventHandlers.handleEvent = this.handleEvent.bind(this, eventName, options);\n this.target.addEventListener(eventName, eventHandlers.handleEvent, options);\n }\n eventHandlers.nextHandlers.push(listener);\n var isSubscribed = true;\n var unsubscribe = function () {\n function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n isSubscribed = false;\n ensureCanMutateNextEventHandlers(eventHandlers);\n var index = eventHandlers.nextHandlers.indexOf(listener);\n eventHandlers.nextHandlers.splice(index, 1);\n if (eventHandlers.nextHandlers.length === 0) {\n // All event handlers have been removed, so we want to remove the event\n // listener from the target node.\n\n if (_this.target) {\n // There can be a race condition where the target may no longer exist\n // when this function is called, e.g. when a React component is\n // unmounting. Guarding against this prevents the following error:\n //\n // Cannot read property 'removeEventListener' of undefined\n _this.target.removeEventListener(eventName, eventHandlers.handleEvent, options);\n }\n eventHandlers.handleEvent = undefined;\n }\n }\n return unsubscribe;\n }();\n return unsubscribe;\n }\n return add;\n}();\nvar EVENT_HANDLERS_KEY = '__consolidated_events_handlers__';\n\n// eslint-disable-next-line import/prefer-default-export\nfunction addEventListener(target, eventName, listener, options) {\n if (!target[EVENT_HANDLERS_KEY]) {\n // eslint-disable-next-line no-param-reassign\n target[EVENT_HANDLERS_KEY] = new TargetEventHandlers(target);\n }\n var normalizedEventOptions = normalizeEventOptions(options);\n return target[EVENT_HANDLERS_KEY].add(eventName, listener, normalizedEventOptions);\n}\nexport { addEventListener };","!function (e, t) {\n \"object\" == typeof exports && \"undefined\" != typeof module ? t(exports, require(\"react\"), require(\"prop-types\"), require(\"classnames\"), require(\"date-fns/isDate\"), require(\"date-fns/isValid\"), require(\"date-fns/format\"), require(\"date-fns/addMinutes\"), require(\"date-fns/addHours\"), require(\"date-fns/addDays\"), require(\"date-fns/addWeeks\"), require(\"date-fns/addMonths\"), require(\"date-fns/addYears\"), require(\"date-fns/subMinutes\"), require(\"date-fns/subHours\"), require(\"date-fns/subDays\"), require(\"date-fns/subWeeks\"), require(\"date-fns/subMonths\"), require(\"date-fns/subYears\"), require(\"date-fns/getSeconds\"), require(\"date-fns/getMinutes\"), require(\"date-fns/getHours\"), require(\"date-fns/getDay\"), require(\"date-fns/getDate\"), require(\"date-fns/getWeek\"), require(\"date-fns/getMonth\"), require(\"date-fns/getQuarter\"), require(\"date-fns/getYear\"), require(\"date-fns/getTime\"), require(\"date-fns/setSeconds\"), require(\"date-fns/setMinutes\"), require(\"date-fns/setHours\"), require(\"date-fns/setMonth\"), require(\"date-fns/setQuarter\"), require(\"date-fns/setYear\"), require(\"date-fns/min\"), require(\"date-fns/max\"), require(\"date-fns/differenceInCalendarDays\"), require(\"date-fns/differenceInCalendarMonths\"), require(\"date-fns/differenceInCalendarWeeks\"), require(\"date-fns/differenceInCalendarYears\"), require(\"date-fns/startOfDay\"), require(\"date-fns/startOfWeek\"), require(\"date-fns/startOfMonth\"), require(\"date-fns/startOfQuarter\"), require(\"date-fns/startOfYear\"), require(\"date-fns/endOfDay\"), require(\"date-fns/endOfWeek\"), require(\"date-fns/endOfMonth\"), require(\"date-fns/isEqual\"), require(\"date-fns/isSameDay\"), require(\"date-fns/isSameMonth\"), require(\"date-fns/isSameYear\"), require(\"date-fns/isSameQuarter\"), require(\"date-fns/isAfter\"), require(\"date-fns/isBefore\"), require(\"date-fns/isWithinInterval\"), require(\"date-fns/toDate\"), require(\"date-fns/parse\"), require(\"date-fns/parseISO\"), require(\"react-onclickoutside\"), require(\"react-popper\")) : \"function\" == typeof define && define.amd ? define([\"exports\", \"react\", \"prop-types\", \"classnames\", \"date-fns/isDate\", \"date-fns/isValid\", \"date-fns/format\", \"date-fns/addMinutes\", \"date-fns/addHours\", \"date-fns/addDays\", \"date-fns/addWeeks\", \"date-fns/addMonths\", \"date-fns/addYears\", \"date-fns/subMinutes\", \"date-fns/subHours\", \"date-fns/subDays\", \"date-fns/subWeeks\", \"date-fns/subMonths\", \"date-fns/subYears\", \"date-fns/getSeconds\", \"date-fns/getMinutes\", \"date-fns/getHours\", \"date-fns/getDay\", \"date-fns/getDate\", \"date-fns/getWeek\", \"date-fns/getMonth\", \"date-fns/getQuarter\", \"date-fns/getYear\", \"date-fns/getTime\", \"date-fns/setSeconds\", \"date-fns/setMinutes\", \"date-fns/setHours\", \"date-fns/setMonth\", \"date-fns/setQuarter\", \"date-fns/setYear\", \"date-fns/min\", \"date-fns/max\", \"date-fns/differenceInCalendarDays\", \"date-fns/differenceInCalendarMonths\", \"date-fns/differenceInCalendarWeeks\", \"date-fns/differenceInCalendarYears\", \"date-fns/startOfDay\", \"date-fns/startOfWeek\", \"date-fns/startOfMonth\", \"date-fns/startOfQuarter\", \"date-fns/startOfYear\", \"date-fns/endOfDay\", \"date-fns/endOfWeek\", \"date-fns/endOfMonth\", \"date-fns/isEqual\", \"date-fns/isSameDay\", \"date-fns/isSameMonth\", \"date-fns/isSameYear\", \"date-fns/isSameQuarter\", \"date-fns/isAfter\", \"date-fns/isBefore\", \"date-fns/isWithinInterval\", \"date-fns/toDate\", \"date-fns/parse\", \"date-fns/parseISO\", \"react-onclickoutside\", \"react-popper\"], t) : t((e = e || self).DatePicker = {}, e.React, e.PropTypes, e.classNames, e.isDate, e.isValidDate, e.format, e.addMinutes, e.addHours, e.utils, e.utils$1, e.addMonths, e.addYears, e.subMinutes, e.subHours, e.subDays, e.subWeeks, e.subMonths, e.subYears, e.getSeconds, e.getMinutes, e.getHours, e.getDay, e.getDate, e.dfgetWeek, e.getMonth, e.getQuarter, e.getYear, e.getTime, e.setSeconds, e.setMinutes, e.setHours, e.utils$2, e.utils$3, e.setYear, e.min, e.max, e.differenceInCalendarDays, e.differenceInCalendarMonths, e.differenceInCalendarWeeks, e.differenceInCalendarYears, e.startOfDay, e.startOfWeek, e.startOfMonth, e.startOfQuarter, e.startOfYear, e.endOfDay, e.endOfWeek, e.endOfMonth, e.dfIsEqual, e.dfIsSameDay, e.dfIsSameMonth, e.dfIsSameYear, e.dfIsSameQuarter, e.isAfter, e.isBefore, e.isWithinInterval, e.toDate, e.parse, e.parseISO, e.onClickOutside, e.ReactPopper);\n}(this, function (e, t, r, n, a, o, s, p, i, c, l, d, u, h, f, m, y, v, w, D, k, g, b, C, _, O, S, P, M, E, N, Y, x, T, I, L, j, F, q, W, R, A, B, H, K, Q, V, U, $, z, G, J, X, Z, ee, te, re, ne, ae, oe, se, pe) {\n \"use strict\";\n\n function ie(e) {\n return (ie = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (e) {\n return typeof e;\n } : function (e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n })(e);\n }\n function ce(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }\n function le(e, t) {\n for (var r = 0; r < t.length; r++) {\n var n = t[r];\n n.enumerable = n.enumerable || !1, n.configurable = !0, \"value\" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);\n }\n }\n function de(e, t, r) {\n return t && le(e.prototype, t), r && le(e, r), e;\n }\n function ue(e, t, r) {\n return t in e ? Object.defineProperty(e, t, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[t] = r, e;\n }\n function he() {\n return (he = Object.assign || function (e) {\n for (var t = 1; t < arguments.length; t++) {\n var r = arguments[t];\n for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);\n }\n return e;\n }).apply(this, arguments);\n }\n function fe(e, t) {\n var r = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var n = Object.getOwnPropertySymbols(e);\n t && (n = n.filter(function (t) {\n return Object.getOwnPropertyDescriptor(e, t).enumerable;\n })), r.push.apply(r, n);\n }\n return r;\n }\n function me(e) {\n for (var t = 1; t < arguments.length; t++) {\n var r = null != arguments[t] ? arguments[t] : {};\n t % 2 ? fe(Object(r), !0).forEach(function (t) {\n ue(e, t, r[t]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : fe(Object(r)).forEach(function (t) {\n Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));\n });\n }\n return e;\n }\n function ye(e, t) {\n if (\"function\" != typeof t && null !== t) throw new TypeError(\"Super expression must either be null or a function\");\n e.prototype = Object.create(t && t.prototype, {\n constructor: {\n value: e,\n writable: !0,\n configurable: !0\n }\n }), t && we(e, t);\n }\n function ve(e) {\n return (ve = Object.setPrototypeOf ? Object.getPrototypeOf : function (e) {\n return e.__proto__ || Object.getPrototypeOf(e);\n })(e);\n }\n function we(e, t) {\n return (we = Object.setPrototypeOf || function (e, t) {\n return e.__proto__ = t, e;\n })(e, t);\n }\n function De(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n }\n function ke(e, t) {\n return !t || \"object\" != typeof t && \"function\" != typeof t ? De(e) : t;\n }\n function ge(e) {\n var t = function () {\n if (\"undefined\" == typeof Reflect || !Reflect.construct) return !1;\n if (Reflect.construct.sham) return !1;\n if (\"function\" == typeof Proxy) return !0;\n try {\n return Date.prototype.toString.call(Reflect.construct(Date, [], function () {})), !0;\n } catch (e) {\n return !1;\n }\n }();\n return function () {\n var r,\n n = ve(e);\n if (t) {\n var a = ve(this).constructor;\n r = Reflect.construct(n, arguments, a);\n } else r = n.apply(this, arguments);\n return ke(this, r);\n };\n }\n function be(e, t) {\n switch (e) {\n case \"P\":\n return t.date({\n width: \"short\"\n });\n case \"PP\":\n return t.date({\n width: \"medium\"\n });\n case \"PPP\":\n return t.date({\n width: \"long\"\n });\n case \"PPPP\":\n default:\n return t.date({\n width: \"full\"\n });\n }\n }\n function Ce(e, t) {\n switch (e) {\n case \"p\":\n return t.time({\n width: \"short\"\n });\n case \"pp\":\n return t.time({\n width: \"medium\"\n });\n case \"ppp\":\n return t.time({\n width: \"long\"\n });\n case \"pppp\":\n default:\n return t.time({\n width: \"full\"\n });\n }\n }\n t = t && Object.prototype.hasOwnProperty.call(t, \"default\") ? t.default : t, r = r && Object.prototype.hasOwnProperty.call(r, \"default\") ? r.default : r, n = n && Object.prototype.hasOwnProperty.call(n, \"default\") ? n.default : n, a = a && Object.prototype.hasOwnProperty.call(a, \"default\") ? a.default : a, o = o && Object.prototype.hasOwnProperty.call(o, \"default\") ? o.default : o, s = s && Object.prototype.hasOwnProperty.call(s, \"default\") ? s.default : s, p = p && Object.prototype.hasOwnProperty.call(p, \"default\") ? p.default : p, i = i && Object.prototype.hasOwnProperty.call(i, \"default\") ? i.default : i, c = c && Object.prototype.hasOwnProperty.call(c, \"default\") ? c.default : c, l = l && Object.prototype.hasOwnProperty.call(l, \"default\") ? l.default : l, d = d && Object.prototype.hasOwnProperty.call(d, \"default\") ? d.default : d, u = u && Object.prototype.hasOwnProperty.call(u, \"default\") ? u.default : u, h = h && Object.prototype.hasOwnProperty.call(h, \"default\") ? h.default : h, f = f && Object.prototype.hasOwnProperty.call(f, \"default\") ? f.default : f, m = m && Object.prototype.hasOwnProperty.call(m, \"default\") ? m.default : m, y = y && Object.prototype.hasOwnProperty.call(y, \"default\") ? y.default : y, v = v && Object.prototype.hasOwnProperty.call(v, \"default\") ? v.default : v, w = w && Object.prototype.hasOwnProperty.call(w, \"default\") ? w.default : w, D = D && Object.prototype.hasOwnProperty.call(D, \"default\") ? D.default : D, k = k && Object.prototype.hasOwnProperty.call(k, \"default\") ? k.default : k, g = g && Object.prototype.hasOwnProperty.call(g, \"default\") ? g.default : g, b = b && Object.prototype.hasOwnProperty.call(b, \"default\") ? b.default : b, C = C && Object.prototype.hasOwnProperty.call(C, \"default\") ? C.default : C, _ = _ && Object.prototype.hasOwnProperty.call(_, \"default\") ? _.default : _, O = O && Object.prototype.hasOwnProperty.call(O, \"default\") ? O.default : O, S = S && Object.prototype.hasOwnProperty.call(S, \"default\") ? S.default : S, P = P && Object.prototype.hasOwnProperty.call(P, \"default\") ? P.default : P, M = M && Object.prototype.hasOwnProperty.call(M, \"default\") ? M.default : M, E = E && Object.prototype.hasOwnProperty.call(E, \"default\") ? E.default : E, N = N && Object.prototype.hasOwnProperty.call(N, \"default\") ? N.default : N, Y = Y && Object.prototype.hasOwnProperty.call(Y, \"default\") ? Y.default : Y, x = x && Object.prototype.hasOwnProperty.call(x, \"default\") ? x.default : x, T = T && Object.prototype.hasOwnProperty.call(T, \"default\") ? T.default : T, I = I && Object.prototype.hasOwnProperty.call(I, \"default\") ? I.default : I, L = L && Object.prototype.hasOwnProperty.call(L, \"default\") ? L.default : L, j = j && Object.prototype.hasOwnProperty.call(j, \"default\") ? j.default : j, F = F && Object.prototype.hasOwnProperty.call(F, \"default\") ? F.default : F, q = q && Object.prototype.hasOwnProperty.call(q, \"default\") ? q.default : q, W = W && Object.prototype.hasOwnProperty.call(W, \"default\") ? W.default : W, R = R && Object.prototype.hasOwnProperty.call(R, \"default\") ? R.default : R, A = A && Object.prototype.hasOwnProperty.call(A, \"default\") ? A.default : A, B = B && Object.prototype.hasOwnProperty.call(B, \"default\") ? B.default : B, H = H && Object.prototype.hasOwnProperty.call(H, \"default\") ? H.default : H, K = K && Object.prototype.hasOwnProperty.call(K, \"default\") ? K.default : K, Q = Q && Object.prototype.hasOwnProperty.call(Q, \"default\") ? Q.default : Q, V = V && Object.prototype.hasOwnProperty.call(V, \"default\") ? V.default : V, U = U && Object.prototype.hasOwnProperty.call(U, \"default\") ? U.default : U, $ = $ && Object.prototype.hasOwnProperty.call($, \"default\") ? $.default : $, z = z && Object.prototype.hasOwnProperty.call(z, \"default\") ? z.default : z, G = G && Object.prototype.hasOwnProperty.call(G, \"default\") ? G.default : G, J = J && Object.prototype.hasOwnProperty.call(J, \"default\") ? J.default : J, X = X && Object.prototype.hasOwnProperty.call(X, \"default\") ? X.default : X, Z = Z && Object.prototype.hasOwnProperty.call(Z, \"default\") ? Z.default : Z, ee = ee && Object.prototype.hasOwnProperty.call(ee, \"default\") ? ee.default : ee, te = te && Object.prototype.hasOwnProperty.call(te, \"default\") ? te.default : te, re = re && Object.prototype.hasOwnProperty.call(re, \"default\") ? re.default : re, ne = ne && Object.prototype.hasOwnProperty.call(ne, \"default\") ? ne.default : ne, ae = ae && Object.prototype.hasOwnProperty.call(ae, \"default\") ? ae.default : ae, oe = oe && Object.prototype.hasOwnProperty.call(oe, \"default\") ? oe.default : oe, se = se && Object.prototype.hasOwnProperty.call(se, \"default\") ? se.default : se;\n var _e = {\n p: Ce,\n P: function P(e, t) {\n var r,\n n = e.match(/(P+)(p+)?/),\n a = n[1],\n o = n[2];\n if (!o) return be(e, t);\n switch (a) {\n case \"P\":\n r = t.dateTime({\n width: \"short\"\n });\n break;\n case \"PP\":\n r = t.dateTime({\n width: \"medium\"\n });\n break;\n case \"PPP\":\n r = t.dateTime({\n width: \"long\"\n });\n break;\n case \"PPPP\":\n default:\n r = t.dateTime({\n width: \"full\"\n });\n }\n return r.replace(\"{{date}}\", be(a, t)).replace(\"{{time}}\", Ce(o, t));\n }\n },\n Oe = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\n function Se(e) {\n var t = e ? \"string\" == typeof e || e instanceof String ? oe(e) : ne(e) : new Date();\n return Me(t) ? t : null;\n }\n function Pe(e, t, r, n) {\n var a = null,\n o = Ke(r) || He(),\n p = !0;\n return Array.isArray(t) ? (t.forEach(function (t) {\n var r = ae(e, t, new Date(), {\n locale: o\n });\n n && (p = Me(r) && e === s(r, t, {\n awareOfUnicodeTokens: !0\n })), Me(r) && p && (a = r);\n }), a) : (a = ae(e, t, new Date(), {\n locale: o\n }), n ? p = Me(a) && e === s(a, t, {\n awareOfUnicodeTokens: !0\n }) : Me(a) || (t = t.match(Oe).map(function (e) {\n var t = e[0];\n return \"p\" === t || \"P\" === t ? o ? (0, _e[t])(e, o.formatLong) : t : e;\n }).join(\"\"), e.length > 0 && (a = ae(e, t.slice(0, e.length), new Date())), Me(a) || (a = new Date(e))), Me(a) && p ? a : null);\n }\n function Me(e) {\n return o(e) && ee(e, new Date(\"1/1/1000\"));\n }\n function Ee(e, t, r) {\n if (\"en\" === r) return s(e, t, {\n awareOfUnicodeTokens: !0\n });\n var n = Ke(r);\n return r && !n && console.warn('A locale object was not found for the provided string [\"'.concat(r, '\"].')), !n && He() && Ke(He()) && (n = Ke(He())), s(e, t, {\n locale: n || null,\n awareOfUnicodeTokens: !0\n });\n }\n function Ne(e, t) {\n var r = t.hour,\n n = void 0 === r ? 0 : r,\n a = t.minute,\n o = void 0 === a ? 0 : a,\n s = t.second;\n return Y(N(E(e, void 0 === s ? 0 : s), o), n);\n }\n function Ye(e, t) {\n var r = t && Ke(t) || He() && Ke(He());\n return _(e, r ? {\n locale: r\n } : null);\n }\n function xe(e, t) {\n return Ee(e, \"ddd\", t);\n }\n function Te(e) {\n return A(e);\n }\n function Ie(e, t) {\n var r = Ke(t || He());\n return B(e, {\n locale: r\n });\n }\n function Le(e) {\n return H(e);\n }\n function je(e) {\n return K(e);\n }\n function Fe(e, t) {\n return e && t ? X(e, t) : !e && !t;\n }\n function qe(e, t) {\n return e && t ? J(e, t) : !e && !t;\n }\n function We(e, t) {\n return e && t ? Z(e, t) : !e && !t;\n }\n function Re(e, t) {\n return e && t ? G(e, t) : !e && !t;\n }\n function Ae(e, t) {\n return e && t ? z(e, t) : !e && !t;\n }\n function Be(e, t, r) {\n var n,\n a = A(t),\n o = V(r);\n try {\n n = re(e, {\n start: a,\n end: o\n });\n } catch (e) {\n n = !1;\n }\n return n;\n }\n function He() {\n return (\"undefined\" != typeof window ? window : global).__localeId__;\n }\n function Ke(e) {\n if (\"string\" == typeof e) {\n var t = \"undefined\" != typeof window ? window : global;\n return t.__localeData__ ? t.__localeData__[e] : null;\n }\n return e;\n }\n function Qe(e, t) {\n return Ee(x(Se(), e), \"LLLL\", t);\n }\n function Ve(e, t) {\n return Ee(x(Se(), e), \"LLL\", t);\n }\n function Ue(e, t) {\n return Ee(T(Se(), e), \"QQQ\", t);\n }\n function $e(e) {\n var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},\n r = t.minDate,\n n = t.maxDate,\n a = t.excludeDates,\n o = t.includeDates,\n s = t.filterDate;\n return et(e, {\n minDate: r,\n maxDate: n\n }) || a && a.some(function (t) {\n return Re(e, t);\n }) || o && !o.some(function (t) {\n return Re(e, t);\n }) || s && !s(Se(e)) || !1;\n }\n function ze(e) {\n var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},\n r = t.excludeDates;\n return r && r.some(function (t) {\n return Re(e, t);\n }) || !1;\n }\n function Ge(e) {\n var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},\n r = t.minDate,\n n = t.maxDate,\n a = t.excludeDates,\n o = t.includeDates,\n s = t.filterDate;\n return et(e, {\n minDate: r,\n maxDate: n\n }) || a && a.some(function (t) {\n return qe(e, t);\n }) || o && !o.some(function (t) {\n return qe(e, t);\n }) || s && !s(Se(e)) || !1;\n }\n function Je(e, t, r, n) {\n var a = P(e),\n o = O(e),\n s = P(t),\n p = O(t),\n i = P(n);\n return a === s && a === i ? o <= r && r <= p : a < s ? i === a && o <= r || i === s && p >= r || i < s && i > a : void 0;\n }\n function Xe(e) {\n var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},\n r = t.minDate,\n n = t.maxDate,\n a = t.excludeDates,\n o = t.includeDates,\n s = t.filterDate;\n return et(e, {\n minDate: r,\n maxDate: n\n }) || a && a.some(function (t) {\n return We(e, t);\n }) || o && !o.some(function (t) {\n return We(e, t);\n }) || s && !s(Se(e)) || !1;\n }\n function Ze(e, t, r, n) {\n var a = P(e),\n o = S(e),\n s = P(t),\n p = S(t),\n i = P(n);\n return a === s && a === i ? o <= r && r <= p : a < s ? i === a && o <= r || i === s && p >= r || i < s && i > a : void 0;\n }\n function et(e) {\n var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},\n r = t.minDate,\n n = t.maxDate;\n return r && F(e, r) < 0 || n && F(e, n) > 0;\n }\n function tt(e, t) {\n for (var r = t.length, n = 0; n < r; n++) if (g(t[n]) === g(e) && k(t[n]) === k(e)) return !0;\n return !1;\n }\n function rt(e, t) {\n var r = t.minTime,\n n = t.maxTime;\n if (!r || !n) throw new Error(\"Both minTime and maxTime props required\");\n var a,\n o = Se(),\n s = Y(N(o, k(e)), g(e)),\n p = Y(N(o, k(r)), g(r)),\n i = Y(N(o, k(n)), g(n));\n try {\n a = !re(s, {\n start: p,\n end: i\n });\n } catch (e) {\n a = !1;\n }\n return a;\n }\n function nt(e) {\n var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},\n r = t.minDate,\n n = t.includeDates,\n a = v(e, 1);\n return r && q(r, a) > 0 || n && n.every(function (e) {\n return q(e, a) > 0;\n }) || !1;\n }\n function at(e) {\n var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},\n r = t.maxDate,\n n = t.includeDates,\n a = d(e, 1);\n return r && q(a, r) > 0 || n && n.every(function (e) {\n return q(a, e) > 0;\n }) || !1;\n }\n function ot(e) {\n var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},\n r = t.minDate,\n n = t.includeDates,\n a = w(e, 1);\n return r && R(r, a) > 0 || n && n.every(function (e) {\n return R(e, a) > 0;\n }) || !1;\n }\n function st(e) {\n var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},\n r = t.maxDate,\n n = t.includeDates,\n a = u(e, 1);\n return r && R(a, r) > 0 || n && n.every(function (e) {\n return R(a, e) > 0;\n }) || !1;\n }\n function pt(e) {\n var t = e.minDate,\n r = e.includeDates;\n if (r && t) {\n var n = r.filter(function (e) {\n return F(e, t) >= 0;\n });\n return L(n);\n }\n return r ? L(r) : t;\n }\n function it(e) {\n var t = e.maxDate,\n r = e.includeDates;\n if (r && t) {\n var n = r.filter(function (e) {\n return F(e, t) <= 0;\n });\n return j(n);\n }\n return r ? j(r) : t;\n }\n function ct() {\n for (var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : \"react-datepicker__day--highlighted\", r = new Map(), n = 0, o = e.length; n < o; n++) {\n var s = e[n];\n if (a(s)) {\n var p = Ee(s, \"MM.dd.yyyy\"),\n i = r.get(p) || [];\n i.includes(t) || (i.push(t), r.set(p, i));\n } else if (\"object\" === ie(s)) {\n var c = Object.keys(s),\n l = c[0],\n d = s[c[0]];\n if (\"string\" == typeof l && d.constructor === Array) for (var u = 0, h = d.length; u < h; u++) {\n var f = Ee(d[u], \"MM.dd.yyyy\"),\n m = r.get(f) || [];\n m.includes(l) || (m.push(l), r.set(f, m));\n }\n }\n }\n return r;\n }\n function lt(e, t, r, n, a) {\n for (var o = a.length, s = [], c = 0; c < o; c++) {\n var l = p(i(e, g(a[c])), k(a[c])),\n d = p(e, (r + 1) * n);\n ee(l, t) && te(l, d) && s.push(a[c]);\n }\n return s;\n }\n function dt(e) {\n return e < 10 ? \"0\".concat(e) : \"\".concat(e);\n }\n function ut(e, t, r, n) {\n for (var a = [], o = 0; o < 2 * t + 1; o++) {\n var s = e + t - o,\n p = !0;\n r && (p = P(r) <= s), n && p && (p = P(n) >= s), p && a.push(s);\n }\n return a;\n }\n var ht = se(function (e) {\n ye(a, e);\n var r = ge(a);\n function a(e) {\n var n;\n ce(this, a), ue(De(n = r.call(this, e)), \"renderOptions\", function () {\n var e = n.props.year,\n r = n.state.yearsList.map(function (r) {\n return t.createElement(\"div\", {\n className: e === r ? \"react-datepicker__year-option react-datepicker__year-option--selected_year\" : \"react-datepicker__year-option\",\n key: r,\n onClick: n.onChange.bind(De(n), r)\n }, e === r ? t.createElement(\"span\", {\n className: \"react-datepicker__year-option--selected\"\n }, \"✓\") : \"\", r);\n }),\n a = n.props.minDate ? P(n.props.minDate) : null,\n o = n.props.maxDate ? P(n.props.maxDate) : null;\n return o && n.state.yearsList.find(function (e) {\n return e === o;\n }) || r.unshift(t.createElement(\"div\", {\n className: \"react-datepicker__year-option\",\n key: \"upcoming\",\n onClick: n.incrementYears\n }, t.createElement(\"a\", {\n className: \"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming\"\n }))), a && n.state.yearsList.find(function (e) {\n return e === a;\n }) || r.push(t.createElement(\"div\", {\n className: \"react-datepicker__year-option\",\n key: \"previous\",\n onClick: n.decrementYears\n }, t.createElement(\"a\", {\n className: \"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous\"\n }))), r;\n }), ue(De(n), \"onChange\", function (e) {\n n.props.onChange(e);\n }), ue(De(n), \"handleClickOutside\", function () {\n n.props.onCancel();\n }), ue(De(n), \"shiftYears\", function (e) {\n var t = n.state.yearsList.map(function (t) {\n return t + e;\n });\n n.setState({\n yearsList: t\n });\n }), ue(De(n), \"incrementYears\", function () {\n return n.shiftYears(1);\n }), ue(De(n), \"decrementYears\", function () {\n return n.shiftYears(-1);\n });\n var o = e.yearDropdownItemNumber,\n s = e.scrollableYearDropdown,\n p = o || (s ? 10 : 5);\n return n.state = {\n yearsList: ut(n.props.year, p, n.props.minDate, n.props.maxDate)\n }, n;\n }\n return de(a, [{\n key: \"render\",\n value: function value() {\n var e = n({\n \"react-datepicker__year-dropdown\": !0,\n \"react-datepicker__year-dropdown--scrollable\": this.props.scrollableYearDropdown\n });\n return t.createElement(\"div\", {\n className: e\n }, this.renderOptions());\n }\n }]), a;\n }(t.Component)),\n ft = function (e) {\n ye(n, e);\n var r = ge(n);\n function n() {\n var e;\n ce(this, n);\n for (var a = arguments.length, o = new Array(a), s = 0; s < a; s++) o[s] = arguments[s];\n return ue(De(e = r.call.apply(r, [this].concat(o))), \"state\", {\n dropdownVisible: !1\n }), ue(De(e), \"renderSelectOptions\", function () {\n for (var r = e.props.minDate ? P(e.props.minDate) : 1900, n = e.props.maxDate ? P(e.props.maxDate) : 2100, a = [], o = r; o <= n; o++) a.push(t.createElement(\"option\", {\n key: o,\n value: o\n }, o));\n return a;\n }), ue(De(e), \"onSelectChange\", function (t) {\n e.onChange(t.target.value);\n }), ue(De(e), \"renderSelectMode\", function () {\n return t.createElement(\"select\", {\n value: e.props.year,\n className: \"react-datepicker__year-select\",\n onChange: e.onSelectChange\n }, e.renderSelectOptions());\n }), ue(De(e), \"renderReadView\", function (r) {\n return t.createElement(\"div\", {\n key: \"read\",\n style: {\n visibility: r ? \"visible\" : \"hidden\"\n },\n className: \"react-datepicker__year-read-view\",\n onClick: function onClick(t) {\n return e.toggleDropdown(t);\n }\n }, t.createElement(\"span\", {\n className: \"react-datepicker__year-read-view--down-arrow\"\n }), t.createElement(\"span\", {\n className: \"react-datepicker__year-read-view--selected-year\"\n }, e.props.year));\n }), ue(De(e), \"renderDropdown\", function () {\n return t.createElement(ht, {\n key: \"dropdown\",\n year: e.props.year,\n onChange: e.onChange,\n onCancel: e.toggleDropdown,\n minDate: e.props.minDate,\n maxDate: e.props.maxDate,\n scrollableYearDropdown: e.props.scrollableYearDropdown,\n yearDropdownItemNumber: e.props.yearDropdownItemNumber\n });\n }), ue(De(e), \"renderScrollMode\", function () {\n var t = e.state.dropdownVisible,\n r = [e.renderReadView(!t)];\n return t && r.unshift(e.renderDropdown()), r;\n }), ue(De(e), \"onChange\", function (t) {\n e.toggleDropdown(), t !== e.props.year && e.props.onChange(t);\n }), ue(De(e), \"toggleDropdown\", function (t) {\n e.setState({\n dropdownVisible: !e.state.dropdownVisible\n }, function () {\n e.props.adjustDateOnChange && e.handleYearChange(e.props.date, t);\n });\n }), ue(De(e), \"handleYearChange\", function (t, r) {\n e.onSelect(t, r), e.setOpen();\n }), ue(De(e), \"onSelect\", function (t, r) {\n e.props.onSelect && e.props.onSelect(t, r);\n }), ue(De(e), \"setOpen\", function () {\n e.props.setOpen && e.props.setOpen(!0);\n }), e;\n }\n return de(n, [{\n key: \"render\",\n value: function value() {\n var e;\n switch (this.props.dropdownMode) {\n case \"scroll\":\n e = this.renderScrollMode();\n break;\n case \"select\":\n e = this.renderSelectMode();\n }\n return t.createElement(\"div\", {\n className: \"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--\".concat(this.props.dropdownMode)\n }, e);\n }\n }]), n;\n }(t.Component),\n mt = se(function (e) {\n ye(n, e);\n var r = ge(n);\n function n() {\n var e;\n ce(this, n);\n for (var a = arguments.length, o = new Array(a), s = 0; s < a; s++) o[s] = arguments[s];\n return ue(De(e = r.call.apply(r, [this].concat(o))), \"renderOptions\", function () {\n return e.props.monthNames.map(function (r, n) {\n return t.createElement(\"div\", {\n className: e.props.month === n ? \"react-datepicker__month-option react-datepicker__month-option--selected_month\" : \"react-datepicker__month-option\",\n key: r,\n onClick: e.onChange.bind(De(e), n)\n }, e.props.month === n ? t.createElement(\"span\", {\n className: \"react-datepicker__month-option--selected\"\n }, \"✓\") : \"\", r);\n });\n }), ue(De(e), \"onChange\", function (t) {\n return e.props.onChange(t);\n }), ue(De(e), \"handleClickOutside\", function () {\n return e.props.onCancel();\n }), e;\n }\n return de(n, [{\n key: \"render\",\n value: function value() {\n return t.createElement(\"div\", {\n className: \"react-datepicker__month-dropdown\"\n }, this.renderOptions());\n }\n }]), n;\n }(t.Component)),\n yt = function (e) {\n ye(n, e);\n var r = ge(n);\n function n() {\n var e;\n ce(this, n);\n for (var a = arguments.length, o = new Array(a), s = 0; s < a; s++) o[s] = arguments[s];\n return ue(De(e = r.call.apply(r, [this].concat(o))), \"state\", {\n dropdownVisible: !1\n }), ue(De(e), \"renderSelectOptions\", function (e) {\n return e.map(function (e, r) {\n return t.createElement(\"option\", {\n key: r,\n value: r\n }, e);\n });\n }), ue(De(e), \"renderSelectMode\", function (r) {\n return t.createElement(\"select\", {\n value: e.props.month,\n className: \"react-datepicker__month-select\",\n onChange: function onChange(t) {\n return e.onChange(t.target.value);\n }\n }, e.renderSelectOptions(r));\n }), ue(De(e), \"renderReadView\", function (r, n) {\n return t.createElement(\"div\", {\n key: \"read\",\n style: {\n visibility: r ? \"visible\" : \"hidden\"\n },\n className: \"react-datepicker__month-read-view\",\n onClick: e.toggleDropdown\n }, t.createElement(\"span\", {\n className: \"react-datepicker__month-read-view--down-arrow\"\n }), t.createElement(\"span\", {\n className: \"react-datepicker__month-read-view--selected-month\"\n }, n[e.props.month]));\n }), ue(De(e), \"renderDropdown\", function (r) {\n return t.createElement(mt, {\n key: \"dropdown\",\n month: e.props.month,\n monthNames: r,\n onChange: e.onChange,\n onCancel: e.toggleDropdown\n });\n }), ue(De(e), \"renderScrollMode\", function (t) {\n var r = e.state.dropdownVisible,\n n = [e.renderReadView(!r, t)];\n return r && n.unshift(e.renderDropdown(t)), n;\n }), ue(De(e), \"onChange\", function (t) {\n e.toggleDropdown(), t !== e.props.month && e.props.onChange(t);\n }), ue(De(e), \"toggleDropdown\", function () {\n return e.setState({\n dropdownVisible: !e.state.dropdownVisible\n });\n }), e;\n }\n return de(n, [{\n key: \"render\",\n value: function value() {\n var e,\n r = this,\n n = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].map(this.props.useShortMonthInDropdown ? function (e) {\n return Ve(e, r.props.locale);\n } : function (e) {\n return Qe(e, r.props.locale);\n });\n switch (this.props.dropdownMode) {\n case \"scroll\":\n e = this.renderScrollMode(n);\n break;\n case \"select\":\n e = this.renderSelectMode(n);\n }\n return t.createElement(\"div\", {\n className: \"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--\".concat(this.props.dropdownMode)\n }, e);\n }\n }]), n;\n }(t.Component);\n function vt(e, t) {\n for (var r = [], n = Le(e), a = Le(t); !ee(n, a);) r.push(Se(n)), n = d(n, 1);\n return r;\n }\n var wt = se(function (e) {\n ye(a, e);\n var r = ge(a);\n function a(e) {\n var n;\n return ce(this, a), ue(De(n = r.call(this, e)), \"renderOptions\", function () {\n return n.state.monthYearsList.map(function (e) {\n var r = M(e),\n a = Fe(n.props.date, e) && qe(n.props.date, e);\n return t.createElement(\"div\", {\n className: a ? \"react-datepicker__month-year-option --selected_month-year\" : \"react-datepicker__month-year-option\",\n key: r,\n onClick: n.onChange.bind(De(n), r)\n }, a ? t.createElement(\"span\", {\n className: \"react-datepicker__month-year-option--selected\"\n }, \"✓\") : \"\", Ee(e, n.props.dateFormat));\n });\n }), ue(De(n), \"onChange\", function (e) {\n return n.props.onChange(e);\n }), ue(De(n), \"handleClickOutside\", function () {\n n.props.onCancel();\n }), n.state = {\n monthYearsList: vt(n.props.minDate, n.props.maxDate)\n }, n;\n }\n return de(a, [{\n key: \"render\",\n value: function value() {\n var e = n({\n \"react-datepicker__month-year-dropdown\": !0,\n \"react-datepicker__month-year-dropdown--scrollable\": this.props.scrollableMonthYearDropdown\n });\n return t.createElement(\"div\", {\n className: e\n }, this.renderOptions());\n }\n }]), a;\n }(t.Component)),\n Dt = function (e) {\n ye(n, e);\n var r = ge(n);\n function n() {\n var e;\n ce(this, n);\n for (var a = arguments.length, o = new Array(a), s = 0; s < a; s++) o[s] = arguments[s];\n return ue(De(e = r.call.apply(r, [this].concat(o))), \"state\", {\n dropdownVisible: !1\n }), ue(De(e), \"renderSelectOptions\", function () {\n for (var r = Le(e.props.minDate), n = Le(e.props.maxDate), a = []; !ee(r, n);) {\n var o = M(r);\n a.push(t.createElement(\"option\", {\n key: o,\n value: o\n }, Ee(r, e.props.dateFormat, e.props.locale))), r = d(r, 1);\n }\n return a;\n }), ue(De(e), \"onSelectChange\", function (t) {\n e.onChange(t.target.value);\n }), ue(De(e), \"renderSelectMode\", function () {\n return t.createElement(\"select\", {\n value: M(Le(e.props.date)),\n className: \"react-datepicker__month-year-select\",\n onChange: e.onSelectChange\n }, e.renderSelectOptions());\n }), ue(De(e), \"renderReadView\", function (r) {\n var n = Ee(e.props.date, e.props.dateFormat, e.props.locale);\n return t.createElement(\"div\", {\n key: \"read\",\n style: {\n visibility: r ? \"visible\" : \"hidden\"\n },\n className: \"react-datepicker__month-year-read-view\",\n onClick: function onClick(t) {\n return e.toggleDropdown(t);\n }\n }, t.createElement(\"span\", {\n className: \"react-datepicker__month-year-read-view--down-arrow\"\n }), t.createElement(\"span\", {\n className: \"react-datepicker__month-year-read-view--selected-month-year\"\n }, n));\n }), ue(De(e), \"renderDropdown\", function () {\n return t.createElement(wt, {\n key: \"dropdown\",\n date: e.props.date,\n dateFormat: e.props.dateFormat,\n onChange: e.onChange,\n onCancel: e.toggleDropdown,\n minDate: e.props.minDate,\n maxDate: e.props.maxDate,\n scrollableMonthYearDropdown: e.props.scrollableMonthYearDropdown\n });\n }), ue(De(e), \"renderScrollMode\", function () {\n var t = e.state.dropdownVisible,\n r = [e.renderReadView(!t)];\n return t && r.unshift(e.renderDropdown()), r;\n }), ue(De(e), \"onChange\", function (t) {\n e.toggleDropdown();\n var r = Se(parseInt(t));\n Fe(e.props.date, r) && qe(e.props.date, r) || e.props.onChange(r);\n }), ue(De(e), \"toggleDropdown\", function () {\n return e.setState({\n dropdownVisible: !e.state.dropdownVisible\n });\n }), e;\n }\n return de(n, [{\n key: \"render\",\n value: function value() {\n var e;\n switch (this.props.dropdownMode) {\n case \"scroll\":\n e = this.renderScrollMode();\n break;\n case \"select\":\n e = this.renderSelectMode();\n }\n return t.createElement(\"div\", {\n className: \"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--\".concat(this.props.dropdownMode)\n }, e);\n }\n }]), n;\n }(t.Component),\n kt = function (e) {\n ye(a, e);\n var r = ge(a);\n function a() {\n var e;\n ce(this, a);\n for (var o = arguments.length, s = new Array(o), p = 0; p < o; p++) s[p] = arguments[p];\n return ue(De(e = r.call.apply(r, [this].concat(s))), \"dayEl\", t.createRef()), ue(De(e), \"handleClick\", function (t) {\n !e.isDisabled() && e.props.onClick && e.props.onClick(t);\n }), ue(De(e), \"handleMouseEnter\", function (t) {\n !e.isDisabled() && e.props.onMouseEnter && e.props.onMouseEnter(t);\n }), ue(De(e), \"handleOnKeyDown\", function (t) {\n \" \" === t.key && (t.preventDefault(), t.key = \"Enter\"), e.props.handleOnKeyDown(t);\n }), ue(De(e), \"isSameDay\", function (t) {\n return Re(e.props.day, t);\n }), ue(De(e), \"isKeyboardSelected\", function () {\n return !e.props.disabledKeyboardNavigation && !e.props.inline && !e.isSameDay(e.props.selected) && e.isSameDay(e.props.preSelection);\n }), ue(De(e), \"isDisabled\", function () {\n return $e(e.props.day, e.props);\n }), ue(De(e), \"isExcluded\", function () {\n return ze(e.props.day, e.props);\n }), ue(De(e), \"getHighLightedClass\", function (t) {\n var r = e.props,\n n = r.day,\n a = r.highlightDates;\n if (!a) return !1;\n var o = Ee(n, \"MM.dd.yyyy\");\n return a.get(o);\n }), ue(De(e), \"isInRange\", function () {\n var t = e.props,\n r = t.day,\n n = t.startDate,\n a = t.endDate;\n return !(!n || !a) && Be(r, n, a);\n }), ue(De(e), \"isInSelectingRange\", function () {\n var t = e.props,\n r = t.day,\n n = t.selectsStart,\n a = t.selectsEnd,\n o = t.selectingDate,\n s = t.startDate,\n p = t.endDate;\n return !(!n && !a || !o || e.isDisabled()) && (n && p && (te(o, p) || Ae(o, p)) ? Be(r, o, p) : !(!a || !s || !ee(o, s) && !Ae(o, s)) && Be(r, s, o));\n }), ue(De(e), \"isSelectingRangeStart\", function () {\n if (!e.isInSelectingRange()) return !1;\n var t = e.props,\n r = t.day,\n n = t.selectingDate,\n a = t.startDate;\n return Re(r, t.selectsStart ? n : a);\n }), ue(De(e), \"isSelectingRangeEnd\", function () {\n if (!e.isInSelectingRange()) return !1;\n var t = e.props,\n r = t.day,\n n = t.selectingDate,\n a = t.endDate;\n return Re(r, t.selectsEnd ? n : a);\n }), ue(De(e), \"isRangeStart\", function () {\n var t = e.props,\n r = t.day,\n n = t.startDate,\n a = t.endDate;\n return !(!n || !a) && Re(n, r);\n }), ue(De(e), \"isRangeEnd\", function () {\n var t = e.props,\n r = t.day,\n n = t.startDate,\n a = t.endDate;\n return !(!n || !a) && Re(a, r);\n }), ue(De(e), \"isWeekend\", function () {\n var t = b(e.props.day);\n return 0 === t || 6 === t;\n }), ue(De(e), \"isOutsideMonth\", function () {\n return void 0 !== e.props.month && e.props.month !== O(e.props.day);\n }), ue(De(e), \"getClassNames\", function (t) {\n var r = e.props.dayClassName ? e.props.dayClassName(t) : void 0;\n return n(\"react-datepicker__day\", r, \"react-datepicker__day--\" + xe(e.props.day), {\n \"react-datepicker__day--disabled\": e.isDisabled(),\n \"react-datepicker__day--excluded\": e.isExcluded(),\n \"react-datepicker__day--selected\": e.isSameDay(e.props.selected),\n \"react-datepicker__day--keyboard-selected\": e.isKeyboardSelected(),\n \"react-datepicker__day--range-start\": e.isRangeStart(),\n \"react-datepicker__day--range-end\": e.isRangeEnd(),\n \"react-datepicker__day--in-range\": e.isInRange(),\n \"react-datepicker__day--in-selecting-range\": e.isInSelectingRange(),\n \"react-datepicker__day--selecting-range-start\": e.isSelectingRangeStart(),\n \"react-datepicker__day--selecting-range-end\": e.isSelectingRangeEnd(),\n \"react-datepicker__day--today\": e.isSameDay(Se()),\n \"react-datepicker__day--weekend\": e.isWeekend(),\n \"react-datepicker__day--outside-month\": e.isOutsideMonth()\n }, e.getHighLightedClass(\"react-datepicker__day--highlighted\"));\n }), ue(De(e), \"getAriaLabel\", function () {\n var t = e.props,\n r = t.day,\n n = t.ariaLabelPrefixWhenEnabled,\n a = void 0 === n ? \"Choose\" : n,\n o = t.ariaLabelPrefixWhenDisabled,\n s = void 0 === o ? \"Not available\" : o,\n p = e.isDisabled() || e.isExcluded() ? s : a;\n return \"\".concat(p, \" \").concat(Ee(r, \"PPPP\"));\n }), ue(De(e), \"getTabIndex\", function (t, r) {\n var n = t || e.props.selected,\n a = r || e.props.preSelection;\n return e.isKeyboardSelected() || e.isSameDay(n) && Re(a, n) ? 0 : -1;\n }), ue(De(e), \"handleFocusDay\", function () {\n var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},\n r = !1;\n 0 === e.getTabIndex() && !t.isInputFocused && e.isSameDay(e.props.preSelection) && (document.activeElement && document.activeElement !== document.body || (r = !0), e.props.containerRef && e.props.containerRef.current && e.props.containerRef.current.contains(document.activeElement) && document.activeElement.classList.contains(\"react-datepicker__day\") && (r = !0)), r && e.dayEl.current.focus();\n }), ue(De(e), \"render\", function () {\n return t.createElement(\"div\", {\n ref: e.dayEl,\n className: e.getClassNames(e.props.day),\n onKeyDown: e.handleOnKeyDown,\n onClick: e.handleClick,\n onMouseEnter: e.handleMouseEnter,\n tabIndex: e.getTabIndex(),\n \"aria-label\": e.getAriaLabel(),\n role: \"button\",\n \"aria-disabled\": e.isDisabled()\n }, e.props.renderDayContents ? e.props.renderDayContents(C(e.props.day), e.props.day) : C(e.props.day));\n }), e;\n }\n return de(a, [{\n key: \"componentDidMount\",\n value: function value() {\n this.handleFocusDay();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function value(e) {\n this.handleFocusDay(e);\n }\n }]), a;\n }(t.Component),\n gt = function (e) {\n ye(a, e);\n var r = ge(a);\n function a() {\n var e;\n ce(this, a);\n for (var t = arguments.length, n = new Array(t), o = 0; o < t; o++) n[o] = arguments[o];\n return ue(De(e = r.call.apply(r, [this].concat(n))), \"handleClick\", function (t) {\n e.props.onClick && e.props.onClick(t);\n }), e;\n }\n return de(a, [{\n key: \"render\",\n value: function value() {\n var e = this.props,\n r = e.weekNumber,\n a = e.ariaLabelPrefix,\n o = void 0 === a ? \"week \" : a,\n s = {\n \"react-datepicker__week-number\": !0,\n \"react-datepicker__week-number--clickable\": !!e.onClick\n };\n return t.createElement(\"div\", {\n className: n(s),\n \"aria-label\": \"\".concat(o, \" \").concat(this.props.weekNumber),\n onClick: this.handleClick\n }, r);\n }\n }]), a;\n }(t.Component),\n bt = function (e) {\n ye(n, e);\n var r = ge(n);\n function n() {\n var e;\n ce(this, n);\n for (var a = arguments.length, o = new Array(a), s = 0; s < a; s++) o[s] = arguments[s];\n return ue(De(e = r.call.apply(r, [this].concat(o))), \"handleDayClick\", function (t, r) {\n e.props.onDayClick && e.props.onDayClick(t, r);\n }), ue(De(e), \"handleDayMouseEnter\", function (t) {\n e.props.onDayMouseEnter && e.props.onDayMouseEnter(t);\n }), ue(De(e), \"handleWeekClick\", function (t, r, n) {\n \"function\" == typeof e.props.onWeekSelect && e.props.onWeekSelect(t, r, n), e.props.shouldCloseOnSelect && e.props.setOpen(!1);\n }), ue(De(e), \"formatWeekNumber\", function (t) {\n return e.props.formatWeekNumber ? e.props.formatWeekNumber(t) : Ye(t, e.props.locale);\n }), ue(De(e), \"renderDays\", function () {\n var r = Ie(e.props.day, e.props.locale),\n n = [],\n a = e.formatWeekNumber(r);\n if (e.props.showWeekNumber) {\n var o = e.props.onWeekSelect ? e.handleWeekClick.bind(De(e), r, a) : void 0;\n n.push(t.createElement(gt, {\n key: \"W\",\n weekNumber: a,\n onClick: o,\n ariaLabelPrefix: e.props.ariaLabelPrefix\n }));\n }\n return n.concat([0, 1, 2, 3, 4, 5, 6].map(function (n) {\n var a = c(r, n);\n return t.createElement(kt, {\n ariaLabelPrefixWhenEnabled: e.props.chooseDayAriaLabelPrefix,\n ariaLabelPrefixWhenDisabled: e.props.disabledDayAriaLabelPrefix,\n key: a.valueOf(),\n day: a,\n month: e.props.month,\n onClick: e.handleDayClick.bind(De(e), a),\n onMouseEnter: e.handleDayMouseEnter.bind(De(e), a),\n minDate: e.props.minDate,\n maxDate: e.props.maxDate,\n excludeDates: e.props.excludeDates,\n includeDates: e.props.includeDates,\n inline: e.props.inline,\n highlightDates: e.props.highlightDates,\n selectingDate: e.props.selectingDate,\n filterDate: e.props.filterDate,\n preSelection: e.props.preSelection,\n selected: e.props.selected,\n selectsStart: e.props.selectsStart,\n selectsEnd: e.props.selectsEnd,\n startDate: e.props.startDate,\n endDate: e.props.endDate,\n dayClassName: e.props.dayClassName,\n renderDayContents: e.props.renderDayContents,\n disabledKeyboardNavigation: e.props.disabledKeyboardNavigation,\n handleOnKeyDown: e.props.handleOnKeyDown,\n isInputFocused: e.props.isInputFocused,\n containerRef: e.props.containerRef\n });\n }));\n }), e;\n }\n return de(n, [{\n key: \"render\",\n value: function value() {\n return t.createElement(\"div\", {\n className: \"react-datepicker__week\"\n }, this.renderDays());\n }\n }], [{\n key: \"defaultProps\",\n get: function get() {\n return {\n shouldCloseOnSelect: !0\n };\n }\n }]), n;\n }(t.Component),\n Ct = function (e) {\n ye(a, e);\n var r = ge(a);\n function a() {\n var e;\n ce(this, a);\n for (var o = arguments.length, s = new Array(o), p = 0; p < o; p++) s[p] = arguments[p];\n return ue(De(e = r.call.apply(r, [this].concat(s))), \"handleDayClick\", function (t, r) {\n e.props.onDayClick && e.props.onDayClick(t, r, e.props.orderInDisplay);\n }), ue(De(e), \"handleDayMouseEnter\", function (t) {\n e.props.onDayMouseEnter && e.props.onDayMouseEnter(t);\n }), ue(De(e), \"handleMouseLeave\", function () {\n e.props.onMouseLeave && e.props.onMouseLeave();\n }), ue(De(e), \"isRangeStartMonth\", function (t) {\n var r = e.props,\n n = r.day,\n a = r.startDate,\n o = r.endDate;\n return !(!a || !o) && qe(x(n, t), a);\n }), ue(De(e), \"isRangeStartQuarter\", function (t) {\n var r = e.props,\n n = r.day,\n a = r.startDate,\n o = r.endDate;\n return !(!a || !o) && We(T(n, t), a);\n }), ue(De(e), \"isRangeEndMonth\", function (t) {\n var r = e.props,\n n = r.day,\n a = r.startDate,\n o = r.endDate;\n return !(!a || !o) && qe(x(n, t), o);\n }), ue(De(e), \"isRangeEndQuarter\", function (t) {\n var r = e.props,\n n = r.day,\n a = r.startDate,\n o = r.endDate;\n return !(!a || !o) && We(T(n, t), o);\n }), ue(De(e), \"isWeekInMonth\", function (t) {\n var r = e.props.day,\n n = c(t, 6);\n return qe(t, r) || qe(n, r);\n }), ue(De(e), \"renderWeeks\", function () {\n for (var r = [], n = e.props.fixedHeight, a = Ie(Le(e.props.day), e.props.locale), o = 0, s = !1; r.push(t.createElement(bt, {\n ariaLabelPrefix: e.props.weekAriaLabelPrefix,\n chooseDayAriaLabelPrefix: e.props.chooseDayAriaLabelPrefix,\n disabledDayAriaLabelPrefix: e.props.disabledDayAriaLabelPrefix,\n key: o,\n day: a,\n month: O(e.props.day),\n onDayClick: e.handleDayClick,\n onDayMouseEnter: e.handleDayMouseEnter,\n onWeekSelect: e.props.onWeekSelect,\n formatWeekNumber: e.props.formatWeekNumber,\n locale: e.props.locale,\n minDate: e.props.minDate,\n maxDate: e.props.maxDate,\n excludeDates: e.props.excludeDates,\n includeDates: e.props.includeDates,\n inline: e.props.inline,\n highlightDates: e.props.highlightDates,\n selectingDate: e.props.selectingDate,\n filterDate: e.props.filterDate,\n preSelection: e.props.preSelection,\n selected: e.props.selected,\n selectsStart: e.props.selectsStart,\n selectsEnd: e.props.selectsEnd,\n showWeekNumber: e.props.showWeekNumbers,\n startDate: e.props.startDate,\n endDate: e.props.endDate,\n dayClassName: e.props.dayClassName,\n setOpen: e.props.setOpen,\n shouldCloseOnSelect: e.props.shouldCloseOnSelect,\n disabledKeyboardNavigation: e.props.disabledKeyboardNavigation,\n renderDayContents: e.props.renderDayContents,\n handleOnKeyDown: e.props.handleOnKeyDown,\n isInputFocused: e.props.isInputFocused,\n containerRef: e.props.containerRef\n })), !s;) {\n o++, a = l(a, 1);\n var p = n && o >= 6,\n i = !n && !e.isWeekInMonth(a);\n if (p || i) {\n if (!e.props.peekNextMonth) break;\n s = !0;\n }\n }\n return r;\n }), ue(De(e), \"onMonthClick\", function (t, r) {\n e.handleDayClick(Le(x(e.props.day, r)), t);\n }), ue(De(e), \"onQuarterClick\", function (t, r) {\n e.handleDayClick(je(T(e.props.day, r)), t);\n }), ue(De(e), \"getMonthClassNames\", function (t) {\n var r = e.props,\n a = r.day,\n o = r.startDate,\n s = r.endDate,\n p = r.selected,\n i = r.minDate,\n c = r.maxDate;\n return n(\"react-datepicker__month-text\", \"react-datepicker__month-\".concat(t), {\n \"react-datepicker__month--disabled\": (i || c) && Ge(x(a, t), e.props),\n \"react-datepicker__month--selected\": O(a) === t && P(a) === P(p),\n \"react-datepicker__month--in-range\": Je(o, s, t, a),\n \"react-datepicker__month--range-start\": e.isRangeStartMonth(t),\n \"react-datepicker__month--range-end\": e.isRangeEndMonth(t)\n });\n }), ue(De(e), \"getQuarterClassNames\", function (t) {\n var r = e.props,\n a = r.day,\n o = r.startDate,\n s = r.endDate,\n p = r.selected,\n i = r.minDate,\n c = r.maxDate;\n return n(\"react-datepicker__quarter-text\", \"react-datepicker__quarter-\".concat(t), {\n \"react-datepicker__quarter--disabled\": (i || c) && Xe(T(a, t), e.props),\n \"react-datepicker__quarter--selected\": S(a) === t && P(a) === P(p),\n \"react-datepicker__quarter--in-range\": Ze(o, s, t, a),\n \"react-datepicker__quarter--range-start\": e.isRangeStartQuarter(t),\n \"react-datepicker__quarter--range-end\": e.isRangeEndQuarter(t)\n });\n }), ue(De(e), \"renderMonths\", function () {\n var r = e.props,\n n = r.showFullMonthYearPicker,\n a = r.locale;\n return [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9, 10, 11]].map(function (r, o) {\n return t.createElement(\"div\", {\n className: \"react-datepicker__month-wrapper\",\n key: o\n }, r.map(function (r, o) {\n return t.createElement(\"div\", {\n key: o,\n onClick: function onClick(t) {\n e.onMonthClick(t, r);\n },\n className: e.getMonthClassNames(r)\n }, n ? Qe(r, a) : Ve(r, a));\n }));\n });\n }), ue(De(e), \"renderQuarters\", function () {\n return t.createElement(\"div\", {\n className: \"react-datepicker__quarter-wrapper\"\n }, [1, 2, 3, 4].map(function (r, n) {\n return t.createElement(\"div\", {\n key: n,\n onClick: function onClick(t) {\n e.onQuarterClick(t, r);\n },\n className: e.getQuarterClassNames(r)\n }, Ue(r, e.props.locale));\n }));\n }), ue(De(e), \"getClassNames\", function () {\n var t = e.props,\n r = t.selectingDate,\n a = t.selectsStart,\n o = t.selectsEnd,\n s = t.showMonthYearPicker,\n p = t.showQuarterYearPicker;\n return n(\"react-datepicker__month\", {\n \"react-datepicker__month--selecting-range\": r && (a || o)\n }, {\n \"react-datepicker__monthPicker\": s\n }, {\n \"react-datepicker__quarterPicker\": p\n });\n }), e;\n }\n return de(a, [{\n key: \"render\",\n value: function value() {\n var e = this.props,\n r = e.showMonthYearPicker,\n n = e.showQuarterYearPicker,\n a = e.day,\n o = e.ariaLabelPrefix,\n s = void 0 === o ? \"month \" : o;\n return t.createElement(\"div\", {\n className: this.getClassNames(),\n onMouseLeave: this.handleMouseLeave,\n \"aria-label\": \"\".concat(s, \" \").concat(Ee(a, \"yyyy-MM\"))\n }, r ? this.renderMonths() : n ? this.renderQuarters() : this.renderWeeks());\n }\n }]), a;\n }(t.Component),\n _t = function (e) {\n ye(n, e);\n var r = ge(n);\n function n() {\n var e;\n ce(this, n);\n for (var a = arguments.length, o = new Array(a), s = 0; s < a; s++) o[s] = arguments[s];\n return ue(De(e = r.call.apply(r, [this].concat(o))), \"state\", {\n height: null\n }), ue(De(e), \"handleClick\", function (t) {\n (e.props.minTime || e.props.maxTime) && rt(t, e.props) || e.props.excludeTimes && tt(t, e.props.excludeTimes) || e.props.includeTimes && !tt(t, e.props.includeTimes) || e.props.onChange(t);\n }), ue(De(e), \"liClasses\", function (t, r, n) {\n var a = [\"react-datepicker__time-list-item\", e.props.timeClassName ? e.props.timeClassName(t, r, n) : void 0];\n return e.props.selected && r === g(t) && n === k(t) && a.push(\"react-datepicker__time-list-item--selected\"), ((e.props.minTime || e.props.maxTime) && rt(t, e.props) || e.props.excludeTimes && tt(t, e.props.excludeTimes) || e.props.includeTimes && !tt(t, e.props.includeTimes)) && a.push(\"react-datepicker__time-list-item--disabled\"), e.props.injectTimes && (60 * g(t) + k(t)) % e.props.intervals != 0 && a.push(\"react-datepicker__time-list-item--injected\"), a.join(\" \");\n }), ue(De(e), \"renderTimes\", function () {\n for (var r = [], n = e.props.format ? e.props.format : \"p\", a = e.props.intervals, o = e.props.selected || e.props.openToDate || Se(), s = g(o), i = k(o), c = Te(Se()), l = 1440 / a, d = e.props.injectTimes && e.props.injectTimes.sort(function (e, t) {\n return e - t;\n }), u = 0; u < l; u++) {\n var h = p(c, u * a);\n if (r.push(h), d) {\n var f = lt(c, h, u, a, d);\n r = r.concat(f);\n }\n }\n return r.map(function (r, a) {\n return t.createElement(\"li\", {\n key: a,\n onClick: e.handleClick.bind(De(e), r),\n className: e.liClasses(r, s, i),\n ref: function ref(t) {\n s === g(r) && i >= k(r) && (e.centerLi = t);\n }\n }, Ee(r, n, e.props.locale));\n });\n }), e;\n }\n return de(n, [{\n key: \"componentDidMount\",\n value: function value() {\n this.list.scrollTop = n.calcCenterPosition(this.props.monthRef ? this.props.monthRef.clientHeight - this.header.clientHeight : this.list.clientHeight, this.centerLi), this.props.monthRef && this.header && this.setState({\n height: this.props.monthRef.clientHeight - this.header.clientHeight\n });\n }\n }, {\n key: \"render\",\n value: function value() {\n var e = this,\n r = this.state.height;\n return t.createElement(\"div\", {\n className: \"react-datepicker__time-container \".concat(this.props.todayButton ? \"react-datepicker__time-container--with-today-button\" : \"\")\n }, t.createElement(\"div\", {\n className: \"react-datepicker__header react-datepicker__header--time\",\n ref: function ref(t) {\n e.header = t;\n }\n }, t.createElement(\"div\", {\n className: \"react-datepicker-time__header\"\n }, this.props.timeCaption)), t.createElement(\"div\", {\n className: \"react-datepicker__time\"\n }, t.createElement(\"div\", {\n className: \"react-datepicker__time-box\"\n }, t.createElement(\"ul\", {\n className: \"react-datepicker__time-list\",\n ref: function ref(t) {\n e.list = t;\n },\n style: r ? {\n height: r\n } : {}\n }, this.renderTimes()))));\n }\n }], [{\n key: \"defaultProps\",\n get: function get() {\n return {\n intervals: 30,\n onTimeChange: function onTimeChange() {},\n todayButton: null,\n timeCaption: \"Time\"\n };\n }\n }]), n;\n }(t.Component);\n ue(_t, \"calcCenterPosition\", function (e, t) {\n return t.offsetTop - (e / 2 - t.clientHeight / 2);\n });\n var Ot = function (e) {\n ye(n, e);\n var r = ge(n);\n function n(e) {\n var t;\n return ce(this, n), ue(De(t = r.call(this, e)), \"handleYearClick\", function (e, r) {\n t.props.onDayClick && t.props.onDayClick(e, r);\n }), ue(De(t), \"onYearClick\", function (e, r) {\n var n;\n t.handleYearClick((n = I(t.props.date, r), Q(n)), e);\n }), t;\n }\n return de(n, [{\n key: \"render\",\n value: function value() {\n for (var e = this, r = [], n = this.props.date, a = function a(n, _a) {\n r.push(t.createElement(\"div\", {\n onClick: function onClick(t) {\n e.onYearClick(t, n);\n },\n className: \"react-datepicker__year-container-text\",\n key: n\n }, n));\n }, o = P(n) - 11, s = 0; o <= P(n); o++, s++) a(o);\n return t.createElement(\"div\", {\n className: \"react-datepicker__year-container\"\n }, r);\n }\n }]), n;\n }(t.Component),\n St = function (e) {\n ye(n, e);\n var r = ge(n);\n function n(e) {\n var a;\n return ce(this, n), ue(De(a = r.call(this, e)), \"onTimeChange\", function (e) {\n a.setState({\n time: e\n });\n var t = new Date();\n t.setHours(e.split(\":\")[0]), t.setMinutes(e.split(\":\")[1]), a.props.onChange(t);\n }), ue(De(a), \"renderTimeInput\", function () {\n var e = a.state.time,\n r = a.props,\n n = r.timeString,\n o = r.customTimeInput;\n return o ? t.cloneElement(o, {\n value: e,\n onChange: a.onTimeChange\n }) : t.createElement(\"input\", {\n type: \"time\",\n className: \"react-datepicker-time__input\",\n placeholder: \"Time\",\n name: \"time-input\",\n required: !0,\n value: e,\n onChange: function onChange(e) {\n a.onTimeChange(e.target.value || n);\n }\n });\n }), a.state = {\n time: a.props.timeString\n }, a;\n }\n return de(n, [{\n key: \"render\",\n value: function value() {\n return t.createElement(\"div\", {\n className: \"react-datepicker__input-time-container\"\n }, t.createElement(\"div\", {\n className: \"react-datepicker-time__caption\"\n }, this.props.timeInputLabel), t.createElement(\"div\", {\n className: \"react-datepicker-time__input-container\"\n }, t.createElement(\"div\", {\n className: \"react-datepicker-time__input\"\n }, this.renderTimeInput())));\n }\n }]), n;\n }(t.Component);\n function Pt(e) {\n var r = e.className,\n n = e.children,\n a = e.showPopperArrow,\n o = e.arrowProps,\n s = void 0 === o ? {} : o;\n return t.createElement(\"div\", {\n className: r\n }, a && t.createElement(\"div\", he({\n className: \"react-datepicker__triangle\"\n }, s)), n);\n }\n var Mt = [\"react-datepicker__year-select\", \"react-datepicker__month-select\", \"react-datepicker__month-year-select\"],\n Et = function (e) {\n ye(a, e);\n var r = ge(a);\n function a(e) {\n var o;\n return ce(this, a), ue(De(o = r.call(this, e)), \"handleClickOutside\", function (e) {\n o.props.onClickOutside(e);\n }), ue(De(o), \"setClickOutsideRef\", function () {\n return o.containerRef.current;\n }), ue(De(o), \"handleDropdownFocus\", function (e) {\n (function () {\n var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},\n t = (e.className || \"\").split(/\\s+/);\n return Mt.some(function (e) {\n return t.indexOf(e) >= 0;\n });\n })(e.target) && o.props.onDropdownFocus();\n }), ue(De(o), \"getDateInView\", function () {\n var e = o.props,\n t = e.preSelection,\n r = e.selected,\n n = e.openToDate,\n a = pt(o.props),\n s = it(o.props),\n p = Se(),\n i = n || r || t;\n return i || (a && te(p, a) ? a : s && ee(p, s) ? s : p);\n }), ue(De(o), \"increaseMonth\", function () {\n o.setState(function (e) {\n var t = e.date;\n return {\n date: d(t, 1)\n };\n }, function () {\n return o.handleMonthChange(o.state.date);\n });\n }), ue(De(o), \"decreaseMonth\", function () {\n o.setState(function (e) {\n var t = e.date;\n return {\n date: v(t, 1)\n };\n }, function () {\n return o.handleMonthChange(o.state.date);\n });\n }), ue(De(o), \"handleDayClick\", function (e, t, r) {\n return o.props.onSelect(e, t, r);\n }), ue(De(o), \"handleDayMouseEnter\", function (e) {\n o.setState({\n selectingDate: e\n }), o.props.onDayMouseEnter && o.props.onDayMouseEnter(e);\n }), ue(De(o), \"handleMonthMouseLeave\", function () {\n o.setState({\n selectingDate: null\n }), o.props.onMonthMouseLeave && o.props.onMonthMouseLeave();\n }), ue(De(o), \"handleYearChange\", function (e) {\n o.props.onYearChange && o.props.onYearChange(e);\n }), ue(De(o), \"handleMonthChange\", function (e) {\n o.props.onMonthChange && o.props.onMonthChange(e), o.props.adjustDateOnChange && (o.props.onSelect && o.props.onSelect(e), o.props.setOpen && o.props.setOpen(!0)), o.props.setPreSelection && o.props.setPreSelection(e);\n }), ue(De(o), \"handleMonthYearChange\", function (e) {\n o.handleYearChange(e), o.handleMonthChange(e);\n }), ue(De(o), \"changeYear\", function (e) {\n o.setState(function (t) {\n var r = t.date;\n return {\n date: I(r, e)\n };\n }, function () {\n return o.handleYearChange(o.state.date);\n });\n }), ue(De(o), \"changeMonth\", function (e) {\n o.setState(function (t) {\n var r = t.date;\n return {\n date: x(r, e)\n };\n }, function () {\n return o.handleMonthChange(o.state.date);\n });\n }), ue(De(o), \"changeMonthYear\", function (e) {\n o.setState(function (t) {\n var r = t.date;\n return {\n date: I(x(r, O(e)), P(e))\n };\n }, function () {\n return o.handleMonthYearChange(o.state.date);\n });\n }), ue(De(o), \"header\", function () {\n var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : o.state.date,\n r = Ie(e, o.props.locale),\n a = [];\n return o.props.showWeekNumbers && a.push(t.createElement(\"div\", {\n key: \"W\",\n className: \"react-datepicker__day-name\"\n }, o.props.weekLabel || \"#\")), a.concat([0, 1, 2, 3, 4, 5, 6].map(function (e) {\n var a = c(r, e),\n s = o.formatWeekday(a, o.props.locale),\n p = o.props.weekDayClassName ? o.props.weekDayClassName(a) : void 0;\n return t.createElement(\"div\", {\n key: e,\n className: n(\"react-datepicker__day-name\", p)\n }, s);\n }));\n }), ue(De(o), \"formatWeekday\", function (e, t) {\n return o.props.formatWeekDay ? function (e, t, r) {\n return t(Ee(e, \"EEEE\", r));\n }(e, o.props.formatWeekDay, t) : o.props.useWeekdaysShort ? function (e, t) {\n return Ee(e, \"EEE\", t);\n }(e, t) : function (e, t) {\n return Ee(e, \"EEEEEE\", t);\n }(e, t);\n }), ue(De(o), \"decreaseYear\", function () {\n o.setState(function (e) {\n var t = e.date;\n return {\n date: w(t, o.props.showYearPicker ? 11 : 1)\n };\n }, function () {\n return o.handleYearChange(o.state.date);\n });\n }), ue(De(o), \"renderPreviousButton\", function () {\n if (!o.props.renderCustomHeader) {\n var e = o.props.showMonthYearPicker ? ot(o.state.date, o.props) : nt(o.state.date, o.props);\n if ((o.props.forceShowMonthNavigation || o.props.showDisabledMonthNavigation || !e) && !o.props.showTimeSelectOnly) {\n var r = [\"react-datepicker__navigation\", \"react-datepicker__navigation--previous\"],\n n = o.decreaseMonth;\n (o.props.showMonthYearPicker || o.props.showQuarterYearPicker || o.props.showYearPicker) && (n = o.decreaseYear), e && o.props.showDisabledMonthNavigation && (r.push(\"react-datepicker__navigation--previous--disabled\"), n = null);\n var a = o.props.showMonthYearPicker || o.props.showQuarterYearPicker,\n s = o.props,\n p = s.previousMonthAriaLabel,\n i = void 0 === p ? \"Previous Month\" : p,\n c = s.previousYearAriaLabel,\n l = void 0 === c ? \"Previous Year\" : c;\n return t.createElement(\"button\", {\n type: \"button\",\n className: r.join(\" \"),\n onClick: n,\n \"aria-label\": a ? l : i\n }, a ? o.props.previousYearButtonLabel : o.props.previousMonthButtonLabel);\n }\n }\n }), ue(De(o), \"increaseYear\", function () {\n o.setState(function (e) {\n var t = e.date;\n return {\n date: u(t, o.props.showYearPicker ? 11 : 1)\n };\n }, function () {\n return o.handleYearChange(o.state.date);\n });\n }), ue(De(o), \"renderNextButton\", function () {\n if (!o.props.renderCustomHeader) {\n var e = o.props.showMonthYearPicker ? st(o.state.date, o.props) : at(o.state.date, o.props);\n if ((o.props.forceShowMonthNavigation || o.props.showDisabledMonthNavigation || !e) && !o.props.showTimeSelectOnly) {\n var r = [\"react-datepicker__navigation\", \"react-datepicker__navigation--next\"];\n o.props.showTimeSelect && r.push(\"react-datepicker__navigation--next--with-time\"), o.props.todayButton && r.push(\"react-datepicker__navigation--next--with-today-button\");\n var n = o.increaseMonth;\n (o.props.showMonthYearPicker || o.props.showQuarterYearPicker || o.props.showYearPicker) && (n = o.increaseYear), e && o.props.showDisabledMonthNavigation && (r.push(\"react-datepicker__navigation--next--disabled\"), n = null);\n var a = o.props.showMonthYearPicker || o.props.showQuarterYearPicker,\n s = o.props,\n p = s.nextMonthAriaLabel,\n i = void 0 === p ? \"Next Month\" : p,\n c = s.nextYearAriaLabel,\n l = void 0 === c ? \"Next Year\" : c;\n return t.createElement(\"button\", {\n type: \"button\",\n className: r.join(\" \"),\n onClick: n,\n \"aria-label\": a ? l : i\n }, a ? o.props.nextYearButtonLabel : o.props.nextMonthButtonLabel);\n }\n }\n }), ue(De(o), \"renderCurrentMonth\", function () {\n var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : o.state.date,\n r = [\"react-datepicker__current-month\"];\n return o.props.showYearDropdown && r.push(\"react-datepicker__current-month--hasYearDropdown\"), o.props.showMonthDropdown && r.push(\"react-datepicker__current-month--hasMonthDropdown\"), o.props.showMonthYearDropdown && r.push(\"react-datepicker__current-month--hasMonthYearDropdown\"), t.createElement(\"div\", {\n className: r.join(\" \")\n }, Ee(e, o.props.dateFormat, o.props.locale));\n }), ue(De(o), \"renderYearDropdown\", function () {\n var e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0];\n if (o.props.showYearDropdown && !e) return t.createElement(ft, {\n adjustDateOnChange: o.props.adjustDateOnChange,\n date: o.state.date,\n onSelect: o.props.onSelect,\n setOpen: o.props.setOpen,\n dropdownMode: o.props.dropdownMode,\n onChange: o.changeYear,\n minDate: o.props.minDate,\n maxDate: o.props.maxDate,\n year: P(o.state.date),\n scrollableYearDropdown: o.props.scrollableYearDropdown,\n yearDropdownItemNumber: o.props.yearDropdownItemNumber\n });\n }), ue(De(o), \"renderMonthDropdown\", function () {\n var e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0];\n if (o.props.showMonthDropdown && !e) return t.createElement(yt, {\n dropdownMode: o.props.dropdownMode,\n locale: o.props.locale,\n onChange: o.changeMonth,\n month: O(o.state.date),\n useShortMonthInDropdown: o.props.useShortMonthInDropdown\n });\n }), ue(De(o), \"renderMonthYearDropdown\", function () {\n var e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0];\n if (o.props.showMonthYearDropdown && !e) return t.createElement(Dt, {\n dropdownMode: o.props.dropdownMode,\n locale: o.props.locale,\n dateFormat: o.props.dateFormat,\n onChange: o.changeMonthYear,\n minDate: o.props.minDate,\n maxDate: o.props.maxDate,\n date: o.state.date,\n scrollableMonthYearDropdown: o.props.scrollableMonthYearDropdown\n });\n }), ue(De(o), \"renderTodayButton\", function () {\n if (o.props.todayButton && !o.props.showTimeSelectOnly) return t.createElement(\"div\", {\n className: \"react-datepicker__today-button\",\n onClick: function onClick(e) {\n return o.props.onSelect(A(Se()), e);\n }\n }, o.props.todayButton);\n }), ue(De(o), \"renderDefaultHeader\", function (e) {\n var r = e.monthDate,\n n = e.i;\n return t.createElement(\"div\", {\n className: \"react-datepicker__header\"\n }, o.renderCurrentMonth(r), t.createElement(\"div\", {\n className: \"react-datepicker__header__dropdown react-datepicker__header__dropdown--\".concat(o.props.dropdownMode),\n onFocus: o.handleDropdownFocus\n }, o.renderMonthDropdown(0 !== n), o.renderMonthYearDropdown(0 !== n), o.renderYearDropdown(0 !== n)), t.createElement(\"div\", {\n className: \"react-datepicker__day-names\"\n }, o.header(r)));\n }), ue(De(o), \"renderCustomHeader\", function () {\n var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},\n r = e.monthDate,\n n = e.i;\n if (0 !== n && void 0 !== n) return null;\n var a = nt(o.state.date, o.props),\n s = at(o.state.date, o.props),\n p = ot(o.state.date, o.props),\n i = st(o.state.date, o.props),\n c = !o.props.showMonthYearPicker && !o.props.showQuarterYearPicker && !o.props.showYearPicker;\n return t.createElement(\"div\", {\n className: \"react-datepicker__header react-datepicker__header--custom\",\n onFocus: o.props.onDropdownFocus\n }, o.props.renderCustomHeader(me(me({}, o.state), {}, {\n changeMonth: o.changeMonth,\n changeYear: o.changeYear,\n decreaseMonth: o.decreaseMonth,\n increaseMonth: o.increaseMonth,\n decreaseYear: o.decreaseYear,\n increaseYear: o.increaseYear,\n prevMonthButtonDisabled: a,\n nextMonthButtonDisabled: s,\n prevYearButtonDisabled: p,\n nextYearButtonDisabled: i\n })), c && t.createElement(\"div\", {\n className: \"react-datepicker__day-names\"\n }, o.header(r)));\n }), ue(De(o), \"renderYearHeader\", function () {\n return t.createElement(\"div\", {\n className: \"react-datepicker__header react-datepicker-year-header\"\n }, o.props.showYearPicker ? \"\".concat(P(o.state.date) - 11, \" - \").concat(P(o.state.date)) : P(o.state.date));\n }), ue(De(o), \"renderHeader\", function (e) {\n switch (!0) {\n case void 0 !== o.props.renderCustomHeader:\n return o.renderCustomHeader(e);\n case o.props.showMonthYearPicker || o.props.showQuarterYearPicker || o.props.showYearPicker:\n return o.renderYearHeader(e);\n default:\n return o.renderDefaultHeader(e);\n }\n }), ue(De(o), \"renderMonths\", function () {\n if (!o.props.showTimeSelectOnly && !o.props.showYearPicker) {\n for (var e = [], r = o.props.showPreviousMonths ? o.props.monthsShown - 1 : 0, n = v(o.state.date, r), a = 0; a < o.props.monthsShown; ++a) {\n var s = a - o.props.monthSelectedIn,\n p = d(n, s),\n i = \"month-\".concat(a);\n e.push(t.createElement(\"div\", {\n key: i,\n ref: function ref(e) {\n o.monthContainer = e;\n },\n className: \"react-datepicker__month-container\"\n }, o.renderHeader({\n monthDate: p,\n i: a\n }), t.createElement(Ct, {\n chooseDayAriaLabelPrefix: o.props.chooseDayAriaLabelPrefix,\n disabledDayAriaLabelPrefix: o.props.disabledDayAriaLabelPrefix,\n weekAriaLabelPrefix: o.props.weekAriaLabelPrefix,\n onChange: o.changeMonthYear,\n day: p,\n dayClassName: o.props.dayClassName,\n monthClassName: o.props.monthClassName,\n onDayClick: o.handleDayClick,\n handleOnKeyDown: o.props.handleOnKeyDown,\n onDayMouseEnter: o.handleDayMouseEnter,\n onMouseLeave: o.handleMonthMouseLeave,\n onWeekSelect: o.props.onWeekSelect,\n orderInDisplay: a,\n formatWeekNumber: o.props.formatWeekNumber,\n locale: o.props.locale,\n minDate: o.props.minDate,\n maxDate: o.props.maxDate,\n excludeDates: o.props.excludeDates,\n highlightDates: o.props.highlightDates,\n selectingDate: o.state.selectingDate,\n includeDates: o.props.includeDates,\n inline: o.props.inline,\n fixedHeight: o.props.fixedHeight,\n filterDate: o.props.filterDate,\n preSelection: o.props.preSelection,\n selected: o.props.selected,\n selectsStart: o.props.selectsStart,\n selectsEnd: o.props.selectsEnd,\n showWeekNumbers: o.props.showWeekNumbers,\n startDate: o.props.startDate,\n endDate: o.props.endDate,\n peekNextMonth: o.props.peekNextMonth,\n setOpen: o.props.setOpen,\n shouldCloseOnSelect: o.props.shouldCloseOnSelect,\n renderDayContents: o.props.renderDayContents,\n disabledKeyboardNavigation: o.props.disabledKeyboardNavigation,\n showMonthYearPicker: o.props.showMonthYearPicker,\n showFullMonthYearPicker: o.props.showFullMonthYearPicker,\n showYearPicker: o.props.showYearPicker,\n showQuarterYearPicker: o.props.showQuarterYearPicker,\n isInputFocused: o.props.isInputFocused,\n containerRef: o.containerRef\n })));\n }\n return e;\n }\n }), ue(De(o), \"renderYears\", function () {\n if (!o.props.showTimeSelectOnly) return o.props.showYearPicker ? t.createElement(\"div\", {\n className: \"react-datepicker__year\"\n }, o.renderHeader(), t.createElement(Ot, {\n onDayClick: o.handleDayClick,\n date: o.state.date\n })) : void 0;\n }), ue(De(o), \"renderTimeSection\", function () {\n if (o.props.showTimeSelect && (o.state.monthContainer || o.props.showTimeSelectOnly)) return t.createElement(_t, {\n selected: o.props.selected,\n openToDate: o.props.openToDate,\n onChange: o.props.onTimeChange,\n timeClassName: o.props.timeClassName,\n format: o.props.timeFormat,\n includeTimes: o.props.includeTimes,\n intervals: o.props.timeIntervals,\n minTime: o.props.minTime,\n maxTime: o.props.maxTime,\n excludeTimes: o.props.excludeTimes,\n timeCaption: o.props.timeCaption,\n todayButton: o.props.todayButton,\n showMonthDropdown: o.props.showMonthDropdown,\n showMonthYearDropdown: o.props.showMonthYearDropdown,\n showYearDropdown: o.props.showYearDropdown,\n withPortal: o.props.withPortal,\n monthRef: o.state.monthContainer,\n injectTimes: o.props.injectTimes,\n locale: o.props.locale\n });\n }), ue(De(o), \"renderInputTimeSection\", function () {\n var e = new Date(o.props.selected),\n r = \"\".concat(dt(e.getHours()), \":\").concat(dt(e.getMinutes()));\n if (o.props.showTimeInput) return t.createElement(St, {\n timeString: r,\n timeInputLabel: o.props.timeInputLabel,\n onChange: o.props.onTimeChange,\n customTimeInput: o.props.customTimeInput\n });\n }), o.containerRef = t.createRef(), o.state = {\n date: o.getDateInView(),\n selectingDate: null,\n monthContainer: null\n }, o;\n }\n return de(a, null, [{\n key: \"defaultProps\",\n get: function get() {\n return {\n onDropdownFocus: function onDropdownFocus() {},\n monthsShown: 1,\n monthSelectedIn: 0,\n forceShowMonthNavigation: !1,\n timeCaption: \"Time\",\n previousYearButtonLabel: \"Previous Year\",\n nextYearButtonLabel: \"Next Year\",\n previousMonthButtonLabel: \"Previous Month\",\n nextMonthButtonLabel: \"Next Month\",\n customTimeInput: null\n };\n }\n }]), de(a, [{\n key: \"componentDidMount\",\n value: function value() {\n var e = this;\n this.props.showTimeSelect && (this.assignMonthContainer = void e.setState({\n monthContainer: e.monthContainer\n }));\n }\n }, {\n key: \"componentDidUpdate\",\n value: function value(e) {\n this.props.preSelection && !Re(this.props.preSelection, e.preSelection) ? this.setState({\n date: this.props.preSelection\n }) : this.props.openToDate && !Re(this.props.openToDate, e.openToDate) && this.setState({\n date: this.props.openToDate\n });\n }\n }, {\n key: \"render\",\n value: function value() {\n var e = this.props.container || Pt;\n return t.createElement(\"div\", {\n ref: this.containerRef\n }, t.createElement(e, {\n className: n(\"react-datepicker\", this.props.className, {\n \"react-datepicker--time-only\": this.props.showTimeSelectOnly\n }),\n showPopperArrow: this.props.showPopperArrow\n }, this.renderPreviousButton(), this.renderNextButton(), this.renderMonths(), this.renderYears(), this.renderTodayButton(), this.renderTimeSection(), this.renderInputTimeSection(), this.props.children));\n }\n }]), a;\n }(t.Component),\n Nt = function Nt(e) {\n return !e.disabled && -1 !== e.tabIndex;\n },\n Yt = function (e) {\n ye(n, e);\n var r = ge(n);\n function n(e) {\n var a;\n return ce(this, n), ue(De(a = r.call(this, e)), \"getTabChildren\", function () {\n return Array.prototype.slice.call(a.tabLoopRef.current.querySelectorAll(\"[tabindex], a, button, input, select, textarea\"), 1, -1).filter(Nt);\n }), ue(De(a), \"handleFocusStart\", function (e) {\n var t = a.getTabChildren();\n t && t.length > 1 && t[t.length - 1].focus();\n }), ue(De(a), \"handleFocusEnd\", function (e) {\n var t = a.getTabChildren();\n t && t.length > 1 && t[0].focus();\n }), a.tabLoopRef = t.createRef(), a;\n }\n return de(n, null, [{\n key: \"defaultProps\",\n get: function get() {\n return {\n enableTabLoop: !0\n };\n }\n }]), de(n, [{\n key: \"render\",\n value: function value() {\n return this.props.enableTabLoop ? t.createElement(\"div\", {\n className: \"react-datepicker__tab-loop\",\n ref: this.tabLoopRef\n }, t.createElement(\"div\", {\n className: \"react-datepicker__tab-loop__start\",\n tabIndex: \"0\",\n onFocus: this.handleFocusStart\n }), this.props.children, t.createElement(\"div\", {\n className: \"react-datepicker__tab-loop__end\",\n tabIndex: \"0\",\n onFocus: this.handleFocusEnd\n })) : this.props.children;\n }\n }]), n;\n }(t.Component),\n xt = function (e) {\n ye(a, e);\n var r = ge(a);\n function a() {\n return ce(this, a), r.apply(this, arguments);\n }\n return de(a, [{\n key: \"render\",\n value: function value() {\n var e,\n r = this.props,\n a = r.className,\n o = r.wrapperClassName,\n s = r.hidePopper,\n p = r.popperComponent,\n i = r.popperModifiers,\n c = r.popperPlacement,\n l = r.popperProps,\n d = r.targetComponent,\n u = r.enableTabLoop,\n h = r.popperOnKeyDown;\n if (!s) {\n var f = n(\"react-datepicker-popper\", a);\n e = t.createElement(pe.Popper, he({\n modifiers: i,\n placement: c\n }, l), function (e) {\n var r = e.ref,\n n = e.style,\n a = e.placement,\n o = e.arrowProps;\n return t.createElement(Yt, {\n enableTabLoop: u\n }, t.createElement(\"div\", he({\n ref: r,\n style: n\n }, {\n className: f,\n \"data-placement\": a,\n onKeyDown: h\n }), t.cloneElement(p, {\n arrowProps: o\n })));\n });\n }\n this.props.popperContainer && (e = t.createElement(this.props.popperContainer, {}, e));\n var m = n(\"react-datepicker-wrapper\", o);\n return t.createElement(pe.Manager, {\n className: \"react-datepicker-manager\"\n }, t.createElement(pe.Reference, null, function (e) {\n var r = e.ref;\n return t.createElement(\"div\", {\n ref: r,\n className: m\n }, d);\n }), e);\n }\n }], [{\n key: \"defaultProps\",\n get: function get() {\n return {\n hidePopper: !0,\n popperModifiers: {\n preventOverflow: {\n enabled: !0,\n escapeWithReference: !0,\n boundariesElement: \"viewport\"\n }\n },\n popperProps: {},\n popperPlacement: \"bottom-start\"\n };\n }\n }]), a;\n }(t.Component),\n Tt = se(Et);\n var It = function (e) {\n ye(o, e);\n var r = ge(o);\n function o(e) {\n var s;\n return ce(this, o), ue(De(s = r.call(this, e)), \"getPreSelection\", function () {\n return s.props.openToDate ? s.props.openToDate : s.props.selectsEnd && s.props.startDate ? s.props.startDate : s.props.selectsStart && s.props.endDate ? s.props.endDate : Se();\n }), ue(De(s), \"calcInitialState\", function () {\n var e = s.getPreSelection(),\n t = pt(s.props),\n r = it(s.props),\n n = t && te(e, t) ? t : r && ee(e, r) ? r : e;\n return {\n open: s.props.startOpen || !1,\n preventFocus: !1,\n preSelection: s.props.selected ? s.props.selected : n,\n highlightDates: ct(s.props.highlightDates),\n focused: !1\n };\n }), ue(De(s), \"clearPreventFocusTimeout\", function () {\n s.preventFocusTimeout && clearTimeout(s.preventFocusTimeout);\n }), ue(De(s), \"setFocus\", function () {\n s.input && s.input.focus && s.input.focus();\n }), ue(De(s), \"setBlur\", function () {\n s.input && s.input.blur && s.input.blur(), s.cancelFocusInput();\n }), ue(De(s), \"setOpen\", function (e) {\n var t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];\n s.setState({\n open: e,\n preSelection: e && s.state.open ? s.state.preSelection : s.calcInitialState().preSelection,\n lastPreSelectChange: jt\n }, function () {\n e || s.setState(function (e) {\n return {\n focused: !!t && e.focused\n };\n }, function () {\n !t && s.setBlur(), s.setState({\n inputValue: null\n });\n });\n });\n }), ue(De(s), \"inputOk\", function () {\n return a(s.state.preSelection);\n }), ue(De(s), \"isCalendarOpen\", function () {\n return void 0 === s.props.open ? s.state.open && !s.props.disabled && !s.props.readOnly : s.props.open;\n }), ue(De(s), \"handleFocus\", function (e) {\n s.state.preventFocus || (s.props.onFocus(e), s.props.preventOpenOnFocus || s.props.readOnly || s.setOpen(!0)), s.setState({\n focused: !0\n });\n }), ue(De(s), \"cancelFocusInput\", function () {\n clearTimeout(s.inputFocusTimeout), s.inputFocusTimeout = null;\n }), ue(De(s), \"deferFocusInput\", function () {\n s.cancelFocusInput(), s.inputFocusTimeout = setTimeout(function () {\n return s.setFocus();\n }, 1);\n }), ue(De(s), \"handleDropdownFocus\", function () {\n s.cancelFocusInput();\n }), ue(De(s), \"handleBlur\", function (e) {\n (!s.state.open || s.props.withPortal || s.props.showTimeInput) && s.props.onBlur(e), s.setState({\n focused: !1\n });\n }), ue(De(s), \"handleCalendarClickOutside\", function (e) {\n s.props.inline || s.setOpen(!1), s.props.onClickOutside(e), s.props.withPortal && e.preventDefault();\n }), ue(De(s), \"handleChange\", function () {\n for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) t[r] = arguments[r];\n var n = t[0];\n if (!s.props.onChangeRaw || (s.props.onChangeRaw.apply(De(s), t), \"function\" == typeof n.isDefaultPrevented && !n.isDefaultPrevented())) {\n s.setState({\n inputValue: n.target.value,\n lastPreSelectChange: Lt\n });\n var a = Pe(n.target.value, s.props.dateFormat, s.props.locale, s.props.strictParsing);\n !a && n.target.value || s.setSelected(a, n, !0);\n }\n }), ue(De(s), \"handleSelect\", function (e, t, r) {\n s.setState({\n preventFocus: !0\n }, function () {\n return s.preventFocusTimeout = setTimeout(function () {\n return s.setState({\n preventFocus: !1\n });\n }, 50), s.preventFocusTimeout;\n }), s.setSelected(e, t, !1, r), !s.props.shouldCloseOnSelect || s.props.showTimeSelect ? s.setPreSelection(e) : s.props.inline || s.setOpen(!1);\n }), ue(De(s), \"setSelected\", function (e, t, r, n) {\n var a = e;\n null !== a && $e(a, s.props) || (Ae(s.props.selected, a) && !s.props.allowSameDay || (null !== a && (!s.props.selected || r && (s.props.showTimeSelect || s.props.showTimeSelectOnly || s.props.showTimeInput) || (a = Ne(a, {\n hour: g(s.props.selected),\n minute: k(s.props.selected),\n second: D(s.props.selected)\n })), s.props.inline || s.setState({\n preSelection: a\n }), s.props.inline && s.props.monthsShown > 1 && !s.props.inlineFocusSelectedMonth && s.setState({\n monthSelectedIn: n\n })), s.props.onChange(a, t)), s.props.onSelect(a, t), r || s.setState({\n inputValue: null\n }));\n }), ue(De(s), \"setPreSelection\", function (e) {\n var t = void 0 !== s.props.minDate,\n r = void 0 !== s.props.maxDate,\n n = !0;\n e && (t && r ? n = Be(e, s.props.minDate, s.props.maxDate) : t ? n = ee(e, s.props.minDate) : r && (n = te(e, s.props.maxDate))), n && s.setState({\n preSelection: e\n });\n }), ue(De(s), \"handleTimeChange\", function (e) {\n var t = Ne(s.props.selected ? s.props.selected : s.getPreSelection(), {\n hour: g(e),\n minute: k(e)\n });\n s.setState({\n preSelection: t\n }), s.props.onChange(t), s.props.shouldCloseOnSelect && s.setOpen(!1), s.props.showTimeInput && s.setOpen(!0), s.setState({\n inputValue: null\n });\n }), ue(De(s), \"onInputClick\", function () {\n s.props.disabled || s.props.readOnly || s.setOpen(!0), s.props.onInputClick();\n }), ue(De(s), \"onInputKeyDown\", function (e) {\n s.props.onKeyDown(e);\n var t = e.key;\n if (s.state.open || s.props.inline || s.props.preventOpenOnFocus) {\n if (s.state.open) {\n if (\"ArrowDown\" === t || \"ArrowUp\" === t) {\n e.preventDefault();\n var r = s.calendar.componentNode && s.calendar.componentNode.querySelector('.react-datepicker__day[tabindex=\"0\"]');\n return void (r && r.focus());\n }\n var n = Se(s.state.preSelection);\n \"Enter\" === t ? (e.preventDefault(), s.inputOk() && s.state.lastPreSelectChange === jt ? (s.handleSelect(n, e), !s.props.shouldCloseOnSelect && s.setPreSelection(n)) : s.setOpen(!1)) : \"Escape\" === t && (e.preventDefault(), s.setOpen(!1)), s.inputOk() || s.props.onInputError({\n code: 1,\n msg: \"Date input not valid.\"\n });\n }\n } else \"ArrowDown\" !== t && \"ArrowUp\" !== t && \"Enter\" !== t || s.onInputClick();\n }), ue(De(s), \"onDayKeyDown\", function (e) {\n s.props.onKeyDown(e);\n var t = e.key,\n r = Se(s.state.preSelection);\n if (\"Enter\" === t) e.preventDefault(), s.handleSelect(r, e), !s.props.shouldCloseOnSelect && s.setPreSelection(r);else if (\"Escape\" === t) e.preventDefault(), s.setOpen(!1), s.inputOk() || s.props.onInputError({\n code: 1,\n msg: \"Date input not valid.\"\n });else if (!s.props.disabledKeyboardNavigation) {\n var n;\n switch (t) {\n case \"ArrowLeft\":\n n = m(r, 1);\n break;\n case \"ArrowRight\":\n n = c(r, 1);\n break;\n case \"ArrowUp\":\n n = y(r, 1);\n break;\n case \"ArrowDown\":\n n = l(r, 1);\n break;\n case \"PageUp\":\n n = v(r, 1);\n break;\n case \"PageDown\":\n n = d(r, 1);\n break;\n case \"Home\":\n n = w(r, 1);\n break;\n case \"End\":\n n = u(r, 1);\n }\n if (!n) return void (s.props.onInputError && s.props.onInputError({\n code: 1,\n msg: \"Date input not valid.\"\n }));\n e.preventDefault(), s.setState({\n lastPreSelectChange: jt\n }), s.props.adjustDateOnChange && s.setSelected(n), s.setPreSelection(n);\n }\n }), ue(De(s), \"onPopperKeyDown\", function (e) {\n \"Escape\" === e.key && (e.preventDefault(), s.setState({\n preventFocus: !0\n }, function () {\n s.setOpen(!1), setTimeout(function () {\n s.setFocus(), s.setState({\n preventFocus: !1\n });\n });\n }));\n }), ue(De(s), \"onClearClick\", function (e) {\n e && e.preventDefault && e.preventDefault(), s.props.onChange(null, e), s.setState({\n inputValue: null\n });\n }), ue(De(s), \"clear\", function () {\n s.onClearClick();\n }), ue(De(s), \"renderCalendar\", function () {\n return s.props.inline || s.isCalendarOpen() ? t.createElement(Tt, {\n ref: function ref(e) {\n s.calendar = e;\n },\n locale: s.props.locale,\n chooseDayAriaLabelPrefix: s.props.chooseDayAriaLabelPrefix,\n disabledDayAriaLabelPrefix: s.props.disabledDayAriaLabelPrefix,\n weekAriaLabelPrefix: s.props.weekAriaLabelPrefix,\n adjustDateOnChange: s.props.adjustDateOnChange,\n setOpen: s.setOpen,\n shouldCloseOnSelect: s.props.shouldCloseOnSelect,\n dateFormat: s.props.dateFormatCalendar,\n useWeekdaysShort: s.props.useWeekdaysShort,\n formatWeekDay: s.props.formatWeekDay,\n dropdownMode: s.props.dropdownMode,\n selected: s.props.selected,\n preSelection: s.state.preSelection,\n onSelect: s.handleSelect,\n onWeekSelect: s.props.onWeekSelect,\n openToDate: s.props.openToDate,\n minDate: s.props.minDate,\n maxDate: s.props.maxDate,\n selectsStart: s.props.selectsStart,\n selectsEnd: s.props.selectsEnd,\n startDate: s.props.startDate,\n endDate: s.props.endDate,\n excludeDates: s.props.excludeDates,\n filterDate: s.props.filterDate,\n onClickOutside: s.handleCalendarClickOutside,\n formatWeekNumber: s.props.formatWeekNumber,\n highlightDates: s.state.highlightDates,\n includeDates: s.props.includeDates,\n includeTimes: s.props.includeTimes,\n injectTimes: s.props.injectTimes,\n inline: s.props.inline,\n peekNextMonth: s.props.peekNextMonth,\n showMonthDropdown: s.props.showMonthDropdown,\n showPreviousMonths: s.props.showPreviousMonths,\n useShortMonthInDropdown: s.props.useShortMonthInDropdown,\n showMonthYearDropdown: s.props.showMonthYearDropdown,\n showWeekNumbers: s.props.showWeekNumbers,\n showYearDropdown: s.props.showYearDropdown,\n withPortal: s.props.withPortal,\n forceShowMonthNavigation: s.props.forceShowMonthNavigation,\n showDisabledMonthNavigation: s.props.showDisabledMonthNavigation,\n scrollableYearDropdown: s.props.scrollableYearDropdown,\n scrollableMonthYearDropdown: s.props.scrollableMonthYearDropdown,\n todayButton: s.props.todayButton,\n weekLabel: s.props.weekLabel,\n outsideClickIgnoreClass: \"react-datepicker-ignore-onclickoutside\",\n fixedHeight: s.props.fixedHeight,\n monthsShown: s.props.monthsShown,\n monthSelectedIn: s.state.monthSelectedIn,\n onDropdownFocus: s.handleDropdownFocus,\n onMonthChange: s.props.onMonthChange,\n onYearChange: s.props.onYearChange,\n dayClassName: s.props.dayClassName,\n weekDayClassName: s.props.weekDayClassName,\n monthClassName: s.props.monthClassName,\n timeClassName: s.props.timeClassName,\n showTimeSelect: s.props.showTimeSelect,\n showTimeSelectOnly: s.props.showTimeSelectOnly,\n onTimeChange: s.handleTimeChange,\n timeFormat: s.props.timeFormat,\n timeIntervals: s.props.timeIntervals,\n minTime: s.props.minTime,\n maxTime: s.props.maxTime,\n excludeTimes: s.props.excludeTimes,\n timeCaption: s.props.timeCaption,\n className: s.props.calendarClassName,\n container: s.props.calendarContainer,\n yearDropdownItemNumber: s.props.yearDropdownItemNumber,\n previousMonthButtonLabel: s.props.previousMonthButtonLabel,\n nextMonthButtonLabel: s.props.nextMonthButtonLabel,\n previousYearButtonLabel: s.props.previousYearButtonLabel,\n nextYearButtonLabel: s.props.nextYearButtonLabel,\n timeInputLabel: s.props.timeInputLabel,\n disabledKeyboardNavigation: s.props.disabledKeyboardNavigation,\n renderCustomHeader: s.props.renderCustomHeader,\n popperProps: s.props.popperProps,\n renderDayContents: s.props.renderDayContents,\n onDayMouseEnter: s.props.onDayMouseEnter,\n onMonthMouseLeave: s.props.onMonthMouseLeave,\n showTimeInput: s.props.showTimeInput,\n showMonthYearPicker: s.props.showMonthYearPicker,\n showFullMonthYearPicker: s.props.showFullMonthYearPicker,\n showYearPicker: s.props.showYearPicker,\n showQuarterYearPicker: s.props.showQuarterYearPicker,\n showPopperArrow: s.props.showPopperArrow,\n excludeScrollbar: s.props.excludeScrollbar,\n handleOnKeyDown: s.onDayKeyDown,\n isInputFocused: s.state.focused,\n customTimeInput: s.props.customTimeInput,\n setPreSelection: s.setPreSelection\n }, s.props.children) : null;\n }), ue(De(s), \"renderDateInput\", function () {\n var e,\n r,\n a,\n o,\n p,\n i = n(s.props.className, ue({}, \"react-datepicker-ignore-onclickoutside\", s.state.open)),\n c = s.props.customInput || t.createElement(\"input\", {\n type: \"text\"\n }),\n l = s.props.customInputRef || \"ref\",\n d = \"string\" == typeof s.props.value ? s.props.value : \"string\" == typeof s.state.inputValue ? s.state.inputValue : (r = s.props.selected, a = s.props, o = a.dateFormat, p = a.locale, r && Ee(r, Array.isArray(o) ? o[0] : o, p) || \"\");\n return t.cloneElement(c, (ue(e = {}, l, function (e) {\n s.input = e;\n }), ue(e, \"value\", d), ue(e, \"onBlur\", s.handleBlur), ue(e, \"onChange\", s.handleChange), ue(e, \"onClick\", s.onInputClick), ue(e, \"onFocus\", s.handleFocus), ue(e, \"onKeyDown\", s.onInputKeyDown), ue(e, \"id\", s.props.id), ue(e, \"name\", s.props.name), ue(e, \"autoFocus\", s.props.autoFocus), ue(e, \"placeholder\", s.props.placeholderText), ue(e, \"disabled\", s.props.disabled), ue(e, \"autoComplete\", s.props.autoComplete), ue(e, \"className\", n(c.props.className, i)), ue(e, \"title\", s.props.title), ue(e, \"readOnly\", s.props.readOnly), ue(e, \"required\", s.props.required), ue(e, \"tabIndex\", s.props.tabIndex), ue(e, \"aria-labelledby\", s.props.ariaLabelledBy), e));\n }), ue(De(s), \"renderClearButton\", function () {\n var e = s.props,\n r = e.isClearable,\n n = e.selected,\n a = e.clearButtonTitle,\n o = e.ariaLabelClose,\n p = void 0 === o ? \"Close\" : o;\n return r && null != n ? t.createElement(\"button\", {\n type: \"button\",\n className: \"react-datepicker__close-icon\",\n \"aria-label\": p,\n onClick: s.onClearClick,\n title: a,\n tabIndex: -1\n }) : null;\n }), s.state = s.calcInitialState(), s;\n }\n return de(o, null, [{\n key: \"defaultProps\",\n get: function get() {\n return {\n allowSameDay: !1,\n dateFormat: \"MM/dd/yyyy\",\n dateFormatCalendar: \"LLLL yyyy\",\n onChange: function onChange() {},\n disabled: !1,\n disabledKeyboardNavigation: !1,\n dropdownMode: \"scroll\",\n onFocus: function onFocus() {},\n onBlur: function onBlur() {},\n onKeyDown: function onKeyDown() {},\n onInputClick: function onInputClick() {},\n onSelect: function onSelect() {},\n onClickOutside: function onClickOutside() {},\n onMonthChange: function onMonthChange() {},\n onCalendarOpen: function onCalendarOpen() {},\n onCalendarClose: function onCalendarClose() {},\n preventOpenOnFocus: !1,\n onYearChange: function onYearChange() {},\n onInputError: function onInputError() {},\n monthsShown: 1,\n readOnly: !1,\n withPortal: !1,\n shouldCloseOnSelect: !0,\n showTimeSelect: !1,\n showTimeInput: !1,\n showPreviousMonths: !1,\n showMonthYearPicker: !1,\n showFullMonthYearPicker: !1,\n showYearPicker: !1,\n showQuarterYearPicker: !1,\n strictParsing: !1,\n timeIntervals: 30,\n timeCaption: \"Time\",\n previousMonthButtonLabel: \"Previous Month\",\n nextMonthButtonLabel: \"Next Month\",\n previousYearButtonLabel: \"Previous Year\",\n nextYearButtonLabel: \"Next Year\",\n timeInputLabel: \"Time\",\n enableTabLoop: !0,\n renderDayContents: function renderDayContents(e) {\n return e;\n },\n inlineFocusSelectedMonth: !1,\n showPopperArrow: !0,\n excludeScrollbar: !0,\n customTimeInput: null\n };\n }\n }]), de(o, [{\n key: \"componentDidUpdate\",\n value: function value(e, t) {\n var r, n;\n e.inline && (r = e.selected, n = this.props.selected, r && n ? O(r) !== O(n) || P(r) !== P(n) : r !== n) && this.setPreSelection(this.props.selected), void 0 !== this.state.monthSelectedIn && e.monthsShown !== this.props.monthsShown && this.setState({\n monthSelectedIn: 0\n }), e.highlightDates !== this.props.highlightDates && this.setState({\n highlightDates: ct(this.props.highlightDates)\n }), t.focused || Ae(e.selected, this.props.selected) || this.setState({\n inputValue: null\n }), t.open !== this.state.open && (!1 === t.open && !0 === this.state.open && this.props.onCalendarOpen(), !0 === t.open && !1 === this.state.open && this.props.onCalendarClose());\n }\n }, {\n key: \"componentWillUnmount\",\n value: function value() {\n this.clearPreventFocusTimeout();\n }\n }, {\n key: \"render\",\n value: function value() {\n var e = this.renderCalendar();\n return this.props.inline && !this.props.withPortal ? e : this.props.withPortal ? t.createElement(\"div\", null, this.props.inline ? null : t.createElement(\"div\", {\n className: \"react-datepicker__input-container\"\n }, this.renderDateInput(), this.renderClearButton()), this.state.open || this.props.inline ? t.createElement(\"div\", {\n className: \"react-datepicker__portal\"\n }, e) : null) : t.createElement(xt, {\n className: this.props.popperClassName,\n wrapperClassName: this.props.wrapperClassName,\n hidePopper: !this.isCalendarOpen(),\n popperModifiers: this.props.popperModifiers,\n targetComponent: t.createElement(\"div\", {\n className: \"react-datepicker__input-container\"\n }, this.renderDateInput(), this.renderClearButton()),\n popperContainer: this.props.popperContainer,\n popperComponent: e,\n popperPlacement: this.props.popperPlacement,\n popperProps: this.props.popperProps,\n popperOnKeyDown: this.onPopperKeyDown,\n enableTabLoop: this.props.enableTabLoop\n });\n }\n }]), o;\n }(t.Component),\n Lt = \"input\",\n jt = \"navigate\";\n e.CalendarContainer = Pt, e.default = It, e.getDefaultLocale = He, e.registerLocale = function (e, t) {\n var r = \"undefined\" != typeof window ? window : global;\n r.__localeData__ || (r.__localeData__ = {}), r.__localeData__[e] = t;\n }, e.setDefaultLocale = function (e) {\n (\"undefined\" != typeof window ? window : global).__localeId__ = e;\n }, Object.defineProperty(e, \"__esModule\", {\n value: !0\n });\n});","'use strict';\n\nexports.__esModule = true;\nvar _react = require('react');\nvar _react2 = _interopRequireDefault(_react);\nvar _implementation = require('./implementation');\nvar _implementation2 = _interopRequireDefault(_implementation);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nexports.default = _react2.default.createContext || _implementation2.default;\nmodule.exports = exports['default'];","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\nfunction toObject(val) {\n if (val === null || val === undefined) {\n throw new TypeError('Object.assign cannot be called with null or undefined');\n }\n return Object(val);\n}\nfunction shouldUseNative() {\n try {\n if (!Object.assign) {\n return false;\n }\n\n // Detect buggy property enumeration order in older V8 versions.\n\n // https://bugs.chromium.org/p/v8/issues/detail?id=4118\n var test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n test1[5] = 'de';\n if (Object.getOwnPropertyNames(test1)[0] === '5') {\n return false;\n }\n\n // https://bugs.chromium.org/p/v8/issues/detail?id=3056\n var test2 = {};\n for (var i = 0; i < 10; i++) {\n test2['_' + String.fromCharCode(i)] = i;\n }\n var order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n return test2[n];\n });\n if (order2.join('') !== '0123456789') {\n return false;\n }\n\n // https://bugs.chromium.org/p/v8/issues/detail?id=3056\n var test3 = {};\n 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n test3[letter] = letter;\n });\n if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {\n return false;\n }\n return true;\n } catch (err) {\n // We don't expect any of the above to throw, but better to be safe.\n return false;\n }\n}\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n var from;\n var to = toObject(target);\n var symbols;\n for (var s = 1; s < arguments.length; s++) {\n from = Object(arguments[s]);\n for (var key in from) {\n if (hasOwnProperty.call(from, key)) {\n to[key] = from[key];\n }\n }\n if (getOwnPropertySymbols) {\n symbols = getOwnPropertySymbols(from);\n for (var i = 0; i < symbols.length; i++) {\n if (propIsEnumerable.call(from, symbols[i])) {\n to[symbols[i]] = from[symbols[i]];\n }\n }\n }\n }\n return to;\n};",";\n(function (root, factory) {\n if (typeof exports === \"object\") {\n // CommonJS\n module.exports = exports = factory(require(\"./core\"));\n } else if (typeof define === \"function\" && define.amd) {\n // AMD\n define([\"./core\"], factory);\n } else {\n // Global (browser)\n factory(root.CryptoJS);\n }\n})(this, function (CryptoJS) {\n (function (Math) {\n // Shortcuts\n var C = CryptoJS;\n var C_lib = C.lib;\n var WordArray = C_lib.WordArray;\n var Hasher = C_lib.Hasher;\n var C_algo = C.algo;\n\n // Initialization and round constants tables\n var H = [];\n var K = [];\n\n // Compute constants\n (function () {\n function isPrime(n) {\n var sqrtN = Math.sqrt(n);\n for (var factor = 2; factor <= sqrtN; factor++) {\n if (!(n % factor)) {\n return false;\n }\n }\n return true;\n }\n function getFractionalBits(n) {\n return (n - (n | 0)) * 0x100000000 | 0;\n }\n var n = 2;\n var nPrime = 0;\n while (nPrime < 64) {\n if (isPrime(n)) {\n if (nPrime < 8) {\n H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2));\n }\n K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3));\n nPrime++;\n }\n n++;\n }\n })();\n\n // Reusable object\n var W = [];\n\n /**\n * SHA-256 hash algorithm.\n */\n var SHA256 = C_algo.SHA256 = Hasher.extend({\n _doReset: function _doReset() {\n this._hash = new WordArray.init(H.slice(0));\n },\n _doProcessBlock: function _doProcessBlock(M, offset) {\n // Shortcut\n var H = this._hash.words;\n\n // Working variables\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n var f = H[5];\n var g = H[6];\n var h = H[7];\n\n // Computation\n for (var i = 0; i < 64; i++) {\n if (i < 16) {\n W[i] = M[offset + i] | 0;\n } else {\n var gamma0x = W[i - 15];\n var gamma0 = (gamma0x << 25 | gamma0x >>> 7) ^ (gamma0x << 14 | gamma0x >>> 18) ^ gamma0x >>> 3;\n var gamma1x = W[i - 2];\n var gamma1 = (gamma1x << 15 | gamma1x >>> 17) ^ (gamma1x << 13 | gamma1x >>> 19) ^ gamma1x >>> 10;\n W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];\n }\n var ch = e & f ^ ~e & g;\n var maj = a & b ^ a & c ^ b & c;\n var sigma0 = (a << 30 | a >>> 2) ^ (a << 19 | a >>> 13) ^ (a << 10 | a >>> 22);\n var sigma1 = (e << 26 | e >>> 6) ^ (e << 21 | e >>> 11) ^ (e << 7 | e >>> 25);\n var t1 = h + sigma1 + ch + K[i] + W[i];\n var t2 = sigma0 + maj;\n h = g;\n g = f;\n f = e;\n e = d + t1 | 0;\n d = c;\n c = b;\n b = a;\n a = t1 + t2 | 0;\n }\n\n // Intermediate hash value\n H[0] = H[0] + a | 0;\n H[1] = H[1] + b | 0;\n H[2] = H[2] + c | 0;\n H[3] = H[3] + d | 0;\n H[4] = H[4] + e | 0;\n H[5] = H[5] + f | 0;\n H[6] = H[6] + g | 0;\n H[7] = H[7] + h | 0;\n },\n _doFinalize: function _doFinalize() {\n // Shortcuts\n var data = this._data;\n var dataWords = data.words;\n var nBitsTotal = this._nDataBytes * 8;\n var nBitsLeft = data.sigBytes * 8;\n\n // Add padding\n dataWords[nBitsLeft >>> 5] |= 0x80 << 24 - nBitsLeft % 32;\n dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);\n dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal;\n data.sigBytes = dataWords.length * 4;\n\n // Hash final blocks\n this._process();\n\n // Return final computed hash\n return this._hash;\n },\n clone: function clone() {\n var clone = Hasher.clone.call(this);\n clone._hash = this._hash.clone();\n return clone;\n }\n });\n\n /**\n * Shortcut function to the hasher's object interface.\n *\n * @param {WordArray|string} message The message to hash.\n *\n * @return {WordArray} The hash.\n *\n * @static\n *\n * @example\n *\n * var hash = CryptoJS.SHA256('message');\n * var hash = CryptoJS.SHA256(wordArray);\n */\n C.SHA256 = Hasher._createHelper(SHA256);\n\n /**\n * Shortcut function to the HMAC's object interface.\n *\n * @param {WordArray|string} message The message to hash.\n * @param {WordArray|string} key The secret key.\n *\n * @return {WordArray} The HMAC.\n *\n * @static\n *\n * @example\n *\n * var hmac = CryptoJS.HmacSHA256(message, key);\n */\n C.HmacSHA256 = Hasher._createHmacHelper(SHA256);\n })(Math);\n return CryptoJS.SHA256;\n});",";\n(function (root, factory, undef) {\n if (typeof exports === \"object\") {\n // CommonJS\n module.exports = exports = factory(require(\"./core\"), require(\"./x64-core\"));\n } else if (typeof define === \"function\" && define.amd) {\n // AMD\n define([\"./core\", \"./x64-core\"], factory);\n } else {\n // Global (browser)\n factory(root.CryptoJS);\n }\n})(this, function (CryptoJS) {\n (function () {\n // Shortcuts\n var C = CryptoJS;\n var C_lib = C.lib;\n var Hasher = C_lib.Hasher;\n var C_x64 = C.x64;\n var X64Word = C_x64.Word;\n var X64WordArray = C_x64.WordArray;\n var C_algo = C.algo;\n function X64Word_create() {\n return X64Word.create.apply(X64Word, arguments);\n }\n\n // Constants\n var K = [X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd), X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc), X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019), X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118), X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe), X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2), X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1), X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694), X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3), X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65), X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483), X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5), X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210), X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4), X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725), X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70), X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926), X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df), X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8), X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b), X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001), X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30), X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910), X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8), X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53), X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8), X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb), X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3), X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60), X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec), X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9), X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b), X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207), X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178), X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6), X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b), X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493), X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c), X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a), X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817)];\n\n // Reusable objects\n var W = [];\n (function () {\n for (var i = 0; i < 80; i++) {\n W[i] = X64Word_create();\n }\n })();\n\n /**\n * SHA-512 hash algorithm.\n */\n var SHA512 = C_algo.SHA512 = Hasher.extend({\n _doReset: function _doReset() {\n this._hash = new X64WordArray.init([new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b), new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1), new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f), new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179)]);\n },\n _doProcessBlock: function _doProcessBlock(M, offset) {\n // Shortcuts\n var H = this._hash.words;\n var H0 = H[0];\n var H1 = H[1];\n var H2 = H[2];\n var H3 = H[3];\n var H4 = H[4];\n var H5 = H[5];\n var H6 = H[6];\n var H7 = H[7];\n var H0h = H0.high;\n var H0l = H0.low;\n var H1h = H1.high;\n var H1l = H1.low;\n var H2h = H2.high;\n var H2l = H2.low;\n var H3h = H3.high;\n var H3l = H3.low;\n var H4h = H4.high;\n var H4l = H4.low;\n var H5h = H5.high;\n var H5l = H5.low;\n var H6h = H6.high;\n var H6l = H6.low;\n var H7h = H7.high;\n var H7l = H7.low;\n\n // Working variables\n var ah = H0h;\n var al = H0l;\n var bh = H1h;\n var bl = H1l;\n var ch = H2h;\n var cl = H2l;\n var dh = H3h;\n var dl = H3l;\n var eh = H4h;\n var el = H4l;\n var fh = H5h;\n var fl = H5l;\n var gh = H6h;\n var gl = H6l;\n var hh = H7h;\n var hl = H7l;\n\n // Rounds\n for (var i = 0; i < 80; i++) {\n // Shortcut\n var Wi = W[i];\n\n // Extend message\n if (i < 16) {\n var Wih = Wi.high = M[offset + i * 2] | 0;\n var Wil = Wi.low = M[offset + i * 2 + 1] | 0;\n } else {\n // Gamma0\n var gamma0x = W[i - 15];\n var gamma0xh = gamma0x.high;\n var gamma0xl = gamma0x.low;\n var gamma0h = (gamma0xh >>> 1 | gamma0xl << 31) ^ (gamma0xh >>> 8 | gamma0xl << 24) ^ gamma0xh >>> 7;\n var gamma0l = (gamma0xl >>> 1 | gamma0xh << 31) ^ (gamma0xl >>> 8 | gamma0xh << 24) ^ (gamma0xl >>> 7 | gamma0xh << 25);\n\n // Gamma1\n var gamma1x = W[i - 2];\n var gamma1xh = gamma1x.high;\n var gamma1xl = gamma1x.low;\n var gamma1h = (gamma1xh >>> 19 | gamma1xl << 13) ^ (gamma1xh << 3 | gamma1xl >>> 29) ^ gamma1xh >>> 6;\n var gamma1l = (gamma1xl >>> 19 | gamma1xh << 13) ^ (gamma1xl << 3 | gamma1xh >>> 29) ^ (gamma1xl >>> 6 | gamma1xh << 26);\n\n // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]\n var Wi7 = W[i - 7];\n var Wi7h = Wi7.high;\n var Wi7l = Wi7.low;\n var Wi16 = W[i - 16];\n var Wi16h = Wi16.high;\n var Wi16l = Wi16.low;\n var Wil = gamma0l + Wi7l;\n var Wih = gamma0h + Wi7h + (Wil >>> 0 < gamma0l >>> 0 ? 1 : 0);\n var Wil = Wil + gamma1l;\n var Wih = Wih + gamma1h + (Wil >>> 0 < gamma1l >>> 0 ? 1 : 0);\n var Wil = Wil + Wi16l;\n var Wih = Wih + Wi16h + (Wil >>> 0 < Wi16l >>> 0 ? 1 : 0);\n Wi.high = Wih;\n Wi.low = Wil;\n }\n var chh = eh & fh ^ ~eh & gh;\n var chl = el & fl ^ ~el & gl;\n var majh = ah & bh ^ ah & ch ^ bh & ch;\n var majl = al & bl ^ al & cl ^ bl & cl;\n var sigma0h = (ah >>> 28 | al << 4) ^ (ah << 30 | al >>> 2) ^ (ah << 25 | al >>> 7);\n var sigma0l = (al >>> 28 | ah << 4) ^ (al << 30 | ah >>> 2) ^ (al << 25 | ah >>> 7);\n var sigma1h = (eh >>> 14 | el << 18) ^ (eh >>> 18 | el << 14) ^ (eh << 23 | el >>> 9);\n var sigma1l = (el >>> 14 | eh << 18) ^ (el >>> 18 | eh << 14) ^ (el << 23 | eh >>> 9);\n\n // t1 = h + sigma1 + ch + K[i] + W[i]\n var Ki = K[i];\n var Kih = Ki.high;\n var Kil = Ki.low;\n var t1l = hl + sigma1l;\n var t1h = hh + sigma1h + (t1l >>> 0 < hl >>> 0 ? 1 : 0);\n var t1l = t1l + chl;\n var t1h = t1h + chh + (t1l >>> 0 < chl >>> 0 ? 1 : 0);\n var t1l = t1l + Kil;\n var t1h = t1h + Kih + (t1l >>> 0 < Kil >>> 0 ? 1 : 0);\n var t1l = t1l + Wil;\n var t1h = t1h + Wih + (t1l >>> 0 < Wil >>> 0 ? 1 : 0);\n\n // t2 = sigma0 + maj\n var t2l = sigma0l + majl;\n var t2h = sigma0h + majh + (t2l >>> 0 < sigma0l >>> 0 ? 1 : 0);\n\n // Update working variables\n hh = gh;\n hl = gl;\n gh = fh;\n gl = fl;\n fh = eh;\n fl = el;\n el = dl + t1l | 0;\n eh = dh + t1h + (el >>> 0 < dl >>> 0 ? 1 : 0) | 0;\n dh = ch;\n dl = cl;\n ch = bh;\n cl = bl;\n bh = ah;\n bl = al;\n al = t1l + t2l | 0;\n ah = t1h + t2h + (al >>> 0 < t1l >>> 0 ? 1 : 0) | 0;\n }\n\n // Intermediate hash value\n H0l = H0.low = H0l + al;\n H0.high = H0h + ah + (H0l >>> 0 < al >>> 0 ? 1 : 0);\n H1l = H1.low = H1l + bl;\n H1.high = H1h + bh + (H1l >>> 0 < bl >>> 0 ? 1 : 0);\n H2l = H2.low = H2l + cl;\n H2.high = H2h + ch + (H2l >>> 0 < cl >>> 0 ? 1 : 0);\n H3l = H3.low = H3l + dl;\n H3.high = H3h + dh + (H3l >>> 0 < dl >>> 0 ? 1 : 0);\n H4l = H4.low = H4l + el;\n H4.high = H4h + eh + (H4l >>> 0 < el >>> 0 ? 1 : 0);\n H5l = H5.low = H5l + fl;\n H5.high = H5h + fh + (H5l >>> 0 < fl >>> 0 ? 1 : 0);\n H6l = H6.low = H6l + gl;\n H6.high = H6h + gh + (H6l >>> 0 < gl >>> 0 ? 1 : 0);\n H7l = H7.low = H7l + hl;\n H7.high = H7h + hh + (H7l >>> 0 < hl >>> 0 ? 1 : 0);\n },\n _doFinalize: function _doFinalize() {\n // Shortcuts\n var data = this._data;\n var dataWords = data.words;\n var nBitsTotal = this._nDataBytes * 8;\n var nBitsLeft = data.sigBytes * 8;\n\n // Add padding\n dataWords[nBitsLeft >>> 5] |= 0x80 << 24 - nBitsLeft % 32;\n dataWords[(nBitsLeft + 128 >>> 10 << 5) + 30] = Math.floor(nBitsTotal / 0x100000000);\n dataWords[(nBitsLeft + 128 >>> 10 << 5) + 31] = nBitsTotal;\n data.sigBytes = dataWords.length * 4;\n\n // Hash final blocks\n this._process();\n\n // Convert hash to 32-bit word array before returning\n var hash = this._hash.toX32();\n\n // Return final computed hash\n return hash;\n },\n clone: function clone() {\n var clone = Hasher.clone.call(this);\n clone._hash = this._hash.clone();\n return clone;\n },\n blockSize: 1024 / 32\n });\n\n /**\n * Shortcut function to the hasher's object interface.\n *\n * @param {WordArray|string} message The message to hash.\n *\n * @return {WordArray} The hash.\n *\n * @static\n *\n * @example\n *\n * var hash = CryptoJS.SHA512('message');\n * var hash = CryptoJS.SHA512(wordArray);\n */\n C.SHA512 = Hasher._createHelper(SHA512);\n\n /**\n * Shortcut function to the HMAC's object interface.\n *\n * @param {WordArray|string} message The message to hash.\n * @param {WordArray|string} key The secret key.\n *\n * @return {WordArray} The HMAC.\n *\n * @static\n *\n * @example\n *\n * var hmac = CryptoJS.HmacSHA512(message, key);\n */\n C.HmacSHA512 = Hasher._createHmacHelper(SHA512);\n })();\n return CryptoJS.SHA512;\n});","\"use strict\";\n\nexports.__esModule = true;\nexports.default = exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = void 0;\nvar PropTypes = _interopRequireWildcard(require(\"prop-types\"));\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _reactDom = _interopRequireDefault(require(\"react-dom\"));\nvar _reactLifecyclesCompat = require(\"react-lifecycles-compat\");\nvar _PropTypes = require(\"./utils/PropTypes\");\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};\n if (desc.get || desc.set) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n }\n newObj.default = obj;\n return newObj;\n }\n}\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\nvar UNMOUNTED = 'unmounted';\nexports.UNMOUNTED = UNMOUNTED;\nvar EXITED = 'exited';\nexports.EXITED = EXITED;\nvar ENTERING = 'entering';\nexports.ENTERING = ENTERING;\nvar ENTERED = 'entered';\nexports.ENTERED = ENTERED;\nvar EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 0 },\n * entered: { opacity: 1 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * \n * {state => (\n *
\n * I'm a fade Transition!\n *
\n * )}\n * \n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n *
\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nexports.EXITING = EXITING;\nvar Transition = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n function Transition(props, context) {\n var _this;\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context.transitionGroup; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n var _proto = Transition.prototype;\n _proto.getChildContext = function getChildContext() {\n return {\n transitionGroup: null // allows for nested Transitions\n };\n };\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n return null;\n }; // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n if (prevProps !== this.props) {\n var status = this.state.status;\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n this.updateStatus(false, nextStatus);\n };\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n var node = _reactDom.default.findDOMNode(this);\n if (nextStatus === ENTERING) {\n this.performEnter(node, mounting);\n } else {\n this.performExit(node);\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n _proto.performEnter = function performEnter(node, mounting) {\n var _this2 = this;\n var enter = this.props.enter;\n var appearing = this.context.transitionGroup ? this.context.transitionGroup.isMounting : mounting;\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(node);\n });\n return;\n }\n this.props.onEnter(node, appearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(node, appearing);\n _this2.onTransitionEnd(node, enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(node, appearing);\n });\n });\n });\n };\n _proto.performExit = function performExit(node) {\n var _this3 = this;\n var exit = this.props.exit;\n var timeouts = this.getTimeouts(); // no exit animation skip right to EXITED\n\n if (!exit) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(node);\n });\n return;\n }\n this.props.onExit(node);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(node);\n _this3.onTransitionEnd(node, timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(node);\n });\n });\n });\n };\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n var active = true;\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n this.nextCallback.cancel = function () {\n active = false;\n };\n return this.nextCallback;\n };\n _proto.onTransitionEnd = function onTransitionEnd(node, timeout, handler) {\n this.setNextCallback(handler);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n if (this.props.addEndListener) {\n this.props.addEndListener(node, this.nextCallback);\n }\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n _proto.render = function render() {\n var status = this.state.status;\n if (status === UNMOUNTED) {\n return null;\n }\n var _this$props = this.props,\n children = _this$props.children,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\"]); // filter props for Transtition\n\n delete childProps.in;\n delete childProps.mountOnEnter;\n delete childProps.unmountOnExit;\n delete childProps.appear;\n delete childProps.enter;\n delete childProps.exit;\n delete childProps.timeout;\n delete childProps.addEndListener;\n delete childProps.onEnter;\n delete childProps.onEntering;\n delete childProps.onEntered;\n delete childProps.onExit;\n delete childProps.onExiting;\n delete childProps.onExited;\n if (typeof children === 'function') {\n return children(status, childProps);\n }\n var child = _react.default.Children.only(children);\n return _react.default.cloneElement(child, childProps);\n };\n return Transition;\n}(_react.default.Component);\nTransition.contextTypes = {\n transitionGroup: PropTypes.object\n};\nTransition.childContextTypes = {\n transitionGroup: function transitionGroup() {}\n};\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`, `'unmounted'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * \n * {state => (\n * \n * )}\n * \n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n /**\n * Normally a component is not transitioned if it is shown when the `` component mounts.\n * If you want to transition on the first mount set `appear` to `true`, and the\n * component will transition in as soon as the `` mounts.\n *\n * > Note: there are no specific \"appear\" states. `appear` only adds an additional `enter` transition.\n */\n appear: PropTypes.bool,\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = _PropTypes.timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n return pt.apply(void 0, [props].concat(args));\n },\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. **Note:** Timeouts are still used as a fallback if provided.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func // Name the function so it is clearer in the documentation\n} : {};\nfunction noop() {}\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = 0;\nTransition.EXITED = 1;\nTransition.ENTERING = 2;\nTransition.ENTERED = 3;\nTransition.EXITING = 4;\nvar _default = (0, _reactLifecyclesCompat.polyfill)(Transition);\nexports.default = _default;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nfunction componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}\nfunction componentWillReceiveProps(nextProps) {\n // Call this.constructor.gDSFP to support sub-classes.\n // Use the setState() updater to ensure state isn't stale in certain edge cases.\n function updater(prevState) {\n var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);\n return state !== null && state !== undefined ? state : null;\n }\n // Binding \"this\" is important for shallow renderer support.\n this.setState(updater.bind(this));\n}\nfunction componentWillUpdate(nextProps, nextState) {\n try {\n var prevProps = this.props;\n var prevState = this.state;\n this.props = nextProps;\n this.state = nextState;\n this.__reactInternalSnapshotFlag = true;\n this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(prevProps, prevState);\n } finally {\n this.props = prevProps;\n this.state = prevState;\n }\n}\n\n// React may warn about cWM/cWRP/cWU methods being deprecated.\n// Add a flag to suppress these warnings for this special case.\ncomponentWillMount.__suppressDeprecationWarning = true;\ncomponentWillReceiveProps.__suppressDeprecationWarning = true;\ncomponentWillUpdate.__suppressDeprecationWarning = true;\nfunction polyfill(Component) {\n var prototype = Component.prototype;\n if (!prototype || !prototype.isReactComponent) {\n throw new Error('Can only polyfill class components');\n }\n if (typeof Component.getDerivedStateFromProps !== 'function' && typeof prototype.getSnapshotBeforeUpdate !== 'function') {\n return Component;\n }\n\n // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n // Error if any of these lifecycles are present,\n // Because they would work differently between older and newer (16.3+) versions of React.\n var foundWillMountName = null;\n var foundWillReceivePropsName = null;\n var foundWillUpdateName = null;\n if (typeof prototype.componentWillMount === 'function') {\n foundWillMountName = 'componentWillMount';\n } else if (typeof prototype.UNSAFE_componentWillMount === 'function') {\n foundWillMountName = 'UNSAFE_componentWillMount';\n }\n if (typeof prototype.componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'componentWillReceiveProps';\n } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n }\n if (typeof prototype.componentWillUpdate === 'function') {\n foundWillUpdateName = 'componentWillUpdate';\n } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') {\n foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n }\n if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {\n var componentName = Component.displayName || Component.name;\n var newApiName = typeof Component.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';\n throw Error('Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n' + componentName + ' uses ' + newApiName + ' but also contains the following legacy lifecycles:' + (foundWillMountName !== null ? '\\n ' + foundWillMountName : '') + (foundWillReceivePropsName !== null ? '\\n ' + foundWillReceivePropsName : '') + (foundWillUpdateName !== null ? '\\n ' + foundWillUpdateName : '') + '\\n\\nThe above lifecycles should be removed. Learn more about this warning here:\\n' + 'https://fb.me/react-async-component-lifecycle-hooks');\n }\n\n // React <= 16.2 does not support static getDerivedStateFromProps.\n // As a workaround, use cWM and cWRP to invoke the new static lifecycle.\n // Newer versions of React will ignore these lifecycles if gDSFP exists.\n if (typeof Component.getDerivedStateFromProps === 'function') {\n prototype.componentWillMount = componentWillMount;\n prototype.componentWillReceiveProps = componentWillReceiveProps;\n }\n\n // React <= 16.2 does not support getSnapshotBeforeUpdate.\n // As a workaround, use cWU to invoke the new lifecycle.\n // Newer versions of React will ignore that lifecycle if gSBU exists.\n if (typeof prototype.getSnapshotBeforeUpdate === 'function') {\n if (typeof prototype.componentDidUpdate !== 'function') {\n throw new Error('Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype');\n }\n prototype.componentWillUpdate = componentWillUpdate;\n var componentDidUpdate = prototype.componentDidUpdate;\n prototype.componentDidUpdate = function componentDidUpdatePolyfill(prevProps, prevState, maybeSnapshot) {\n // 16.3+ will not execute our will-update method;\n // It will pass a snapshot value to did-update though.\n // Older versions will require our polyfilled will-update value.\n // We need to handle both cases, but can't just check for the presence of \"maybeSnapshot\",\n // Because for <= 15.x versions this might be a \"prevContext\" object.\n // We also can't just check \"__reactInternalSnapshot\",\n // Because get-snapshot might return a falsy value.\n // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior.\n var snapshot = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : maybeSnapshot;\n componentDidUpdate.call(this, prevProps, prevState, snapshot);\n };\n }\n return Component;\n}\nexport { polyfill };","\"use strict\";\n\nexports.__esModule = true;\nexports.classNamesShape = exports.timeoutsShape = void 0;\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nvar timeoutsShape = process.env.NODE_ENV !== 'production' ? _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({\n enter: _propTypes.default.number,\n exit: _propTypes.default.number,\n appear: _propTypes.default.number\n}).isRequired]) : null;\nexports.timeoutsShape = timeoutsShape;\nvar classNamesShape = process.env.NODE_ENV !== 'production' ? _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.shape({\n enter: _propTypes.default.string,\n exit: _propTypes.default.string,\n active: _propTypes.default.string\n}), _propTypes.default.shape({\n enter: _propTypes.default.string,\n enterDone: _propTypes.default.string,\n enterActive: _propTypes.default.string,\n exit: _propTypes.default.string,\n exitDone: _propTypes.default.string,\n exitActive: _propTypes.default.string\n})]) : null;\nexports.classNamesShape = classNamesShape;","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _reactLifecyclesCompat = require(\"react-lifecycles-compat\");\nvar _ChildMapping = require(\"./utils/ChildMapping\");\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\nvar values = Object.values || function (obj) {\n return Object.keys(obj).map(function (k) {\n return obj[k];\n });\n};\nvar defaultProps = {\n component: 'div',\n childFactory: function childFactory(child) {\n return child;\n }\n /**\n * The `` component manages a set of transition components\n * (`` and ``) in a list. Like with the transition\n * components, `` is a state machine for managing the mounting\n * and unmounting of components over time.\n *\n * Consider the example below. As items are removed or added to the TodoList the\n * `in` prop is toggled automatically by the ``.\n *\n * Note that `` does not define any animation behavior!\n * Exactly _how_ a list item animates is up to the individual transition\n * component. This means you can mix and match animations across different list\n * items.\n */\n};\n\nvar TransitionGroup = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(TransitionGroup, _React$Component);\n function TransitionGroup(props, context) {\n var _this;\n _this = _React$Component.call(this, props, context) || this;\n var handleExited = _this.handleExited.bind(_assertThisInitialized(_assertThisInitialized(_this))); // Initial children should all be entering, dependent on appear\n\n _this.state = {\n handleExited: handleExited,\n firstRender: true\n };\n return _this;\n }\n var _proto = TransitionGroup.prototype;\n _proto.getChildContext = function getChildContext() {\n return {\n transitionGroup: {\n isMounting: !this.appeared\n }\n };\n };\n _proto.componentDidMount = function componentDidMount() {\n this.appeared = true;\n this.mounted = true;\n };\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.mounted = false;\n };\n TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {\n var prevChildMapping = _ref.children,\n handleExited = _ref.handleExited,\n firstRender = _ref.firstRender;\n return {\n children: firstRender ? (0, _ChildMapping.getInitialChildMapping)(nextProps, handleExited) : (0, _ChildMapping.getNextChildMapping)(nextProps, prevChildMapping, handleExited),\n firstRender: false\n };\n };\n _proto.handleExited = function handleExited(child, node) {\n var currentChildMapping = (0, _ChildMapping.getChildMapping)(this.props.children);\n if (child.key in currentChildMapping) return;\n if (child.props.onExited) {\n child.props.onExited(node);\n }\n if (this.mounted) {\n this.setState(function (state) {\n var children = _extends({}, state.children);\n delete children[child.key];\n return {\n children: children\n };\n });\n }\n };\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.component,\n childFactory = _this$props.childFactory,\n props = _objectWithoutPropertiesLoose(_this$props, [\"component\", \"childFactory\"]);\n var children = values(this.state.children).map(childFactory);\n delete props.appear;\n delete props.enter;\n delete props.exit;\n if (Component === null) {\n return children;\n }\n return _react.default.createElement(Component, props, children);\n };\n return TransitionGroup;\n}(_react.default.Component);\nTransitionGroup.childContextTypes = {\n transitionGroup: _propTypes.default.object.isRequired\n};\nTransitionGroup.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * `` renders a `
` by default. You can change this\n * behavior by providing a `component` prop.\n * If you use React v16+ and would like to avoid a wrapping `