';\n } // just sets the end timestamp\n\n\n _super.prototype.finish.call(this, endTimestamp);\n\n if (this.sampled !== true) {\n // At this point if `sampled !== true` we want to discard the transaction.\n logger.log('[Tracing] Discarding transaction because its trace was not chosen to be sampled.');\n return undefined;\n }\n\n var finishedSpans = this.spanRecorder ? this.spanRecorder.spans.filter(function (s) {\n return s !== _this && s.endTimestamp;\n }) : [];\n\n if (this._trimEnd && finishedSpans.length > 0) {\n this.endTimestamp = finishedSpans.reduce(function (prev, current) {\n if (prev.endTimestamp && current.endTimestamp) {\n return prev.endTimestamp > current.endTimestamp ? prev : current;\n }\n\n return prev;\n }).endTimestamp;\n }\n\n var transaction = {\n contexts: {\n trace: this.getTraceContext()\n },\n spans: finishedSpans,\n start_timestamp: this.startTimestamp,\n tags: this.tags,\n timestamp: this.endTimestamp,\n transaction: this.name,\n type: 'transaction'\n };\n var hasMeasurements = Object.keys(this._measurements).length > 0;\n\n if (hasMeasurements) {\n logger.log('[Measurements] Adding measurements to transaction', JSON.stringify(this._measurements, undefined, 2));\n transaction.measurements = this._measurements;\n }\n\n return this._hub.captureEvent(transaction);\n };\n\n return Transaction;\n}(SpanClass);\n\nexport { Transaction };","'use strict';\n\nvar _slicedToArray = require(\"C:\\\\j\\\\workspace\\\\Snap_Blockly_develop\\\\node_modules\\\\babel-preset-react-app\\\\node_modules\\\\@babel\\\\runtime/helpers/slicedToArray\");\n\nvar _toConsumableArray = require(\"C:\\\\j\\\\workspace\\\\Snap_Blockly_develop\\\\node_modules\\\\babel-preset-react-app\\\\node_modules\\\\@babel\\\\runtime/helpers/toConsumableArray\");\n\nvar strictUriEncode = require('strict-uri-encode');\n\nvar decodeComponent = require('decode-uri-component');\n\nvar splitOnFirst = require('split-on-first');\n\nfunction encoderForArrayFormat(options) {\n switch (options.arrayFormat) {\n case 'index':\n return function (key) {\n return function (result, value) {\n var index = result.length;\n\n if (value === undefined) {\n return result;\n }\n\n if (value === null) {\n return [].concat(_toConsumableArray(result), [[encode(key, options), '[', index, ']'].join('')]);\n }\n\n return [].concat(_toConsumableArray(result), [[encode(key, options), '[', encode(index, options), ']=', encode(value, options)].join('')]);\n };\n };\n\n case 'bracket':\n return function (key) {\n return function (result, value) {\n if (value === undefined) {\n return result;\n }\n\n if (value === null) {\n return [].concat(_toConsumableArray(result), [[encode(key, options), '[]'].join('')]);\n }\n\n return [].concat(_toConsumableArray(result), [[encode(key, options), '[]=', encode(value, options)].join('')]);\n };\n };\n\n case 'comma':\n return function (key) {\n return function (result, value, index) {\n if (value === null || value === undefined || value.length === 0) {\n return result;\n }\n\n if (index === 0) {\n return [[encode(key, options), '=', encode(value, options)].join('')];\n }\n\n return [[result, encode(value, options)].join(',')];\n };\n };\n\n default:\n return function (key) {\n return function (result, value) {\n if (value === undefined) {\n return result;\n }\n\n if (value === null) {\n return [].concat(_toConsumableArray(result), [encode(key, options)]);\n }\n\n return [].concat(_toConsumableArray(result), [[encode(key, options), '=', encode(value, options)].join('')]);\n };\n };\n }\n}\n\nfunction parserForArrayFormat(options) {\n var result;\n\n switch (options.arrayFormat) {\n case 'index':\n return function (key, value, accumulator) {\n result = /\\[(\\d*)\\]$/.exec(key);\n key = key.replace(/\\[\\d*\\]$/, '');\n\n if (!result) {\n accumulator[key] = value;\n return;\n }\n\n if (accumulator[key] === undefined) {\n accumulator[key] = {};\n }\n\n accumulator[key][result[1]] = value;\n };\n\n case 'bracket':\n return function (key, value, accumulator) {\n result = /(\\[\\])$/.exec(key);\n key = key.replace(/\\[\\]$/, '');\n\n if (!result) {\n accumulator[key] = value;\n return;\n }\n\n if (accumulator[key] === undefined) {\n accumulator[key] = [value];\n return;\n }\n\n accumulator[key] = [].concat(accumulator[key], value);\n };\n\n case 'comma':\n return function (key, value, accumulator) {\n var isArray = typeof value === 'string' && value.split('').indexOf(',') > -1;\n var newValue = isArray ? value.split(',') : value;\n accumulator[key] = newValue;\n };\n\n default:\n return function (key, value, accumulator) {\n if (accumulator[key] === undefined) {\n accumulator[key] = value;\n return;\n }\n\n accumulator[key] = [].concat(accumulator[key], value);\n };\n }\n}\n\nfunction encode(value, options) {\n if (options.encode) {\n return options.strict ? strictUriEncode(value) : encodeURIComponent(value);\n }\n\n return value;\n}\n\nfunction decode(value, options) {\n if (options.decode) {\n return decodeComponent(value);\n }\n\n return value;\n}\n\nfunction keysSorter(input) {\n if (Array.isArray(input)) {\n return input.sort();\n }\n\n if (typeof input === 'object') {\n return keysSorter(Object.keys(input)).sort(function (a, b) {\n return Number(a) - Number(b);\n }).map(function (key) {\n return input[key];\n });\n }\n\n return input;\n}\n\nfunction removeHash(input) {\n var hashStart = input.indexOf('#');\n\n if (hashStart !== -1) {\n input = input.slice(0, hashStart);\n }\n\n return input;\n}\n\nfunction extract(input) {\n input = removeHash(input);\n var queryStart = input.indexOf('?');\n\n if (queryStart === -1) {\n return '';\n }\n\n return input.slice(queryStart + 1);\n}\n\nfunction parse(input, options) {\n options = Object.assign({\n decode: true,\n sort: true,\n arrayFormat: 'none',\n parseNumbers: false,\n parseBooleans: false\n }, options);\n var formatter = parserForArrayFormat(options); // Create an object with no prototype\n\n var ret = Object.create(null);\n\n if (typeof input !== 'string') {\n return ret;\n }\n\n input = input.trim().replace(/^[?#&]/, '');\n\n if (!input) {\n return ret;\n }\n\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = input.split('&')[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var param = _step.value;\n\n var _splitOnFirst = splitOnFirst(param.replace(/\\+/g, ' '), '='),\n _splitOnFirst2 = _slicedToArray(_splitOnFirst, 2),\n key = _splitOnFirst2[0],\n value = _splitOnFirst2[1]; // Missing `=` should be `null`:\n // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n\n\n value = value === undefined ? null : decode(value, options);\n\n if (options.parseNumbers && !Number.isNaN(Number(value))) {\n value = Number(value);\n } else if (options.parseBooleans && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) {\n value = value.toLowerCase() === 'true';\n }\n\n formatter(decode(key, options), value, ret);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n if (options.sort === false) {\n return ret;\n }\n\n return (options.sort === true ? Object.keys(ret).sort() : Object.keys(ret).sort(options.sort)).reduce(function (result, key) {\n var value = ret[key];\n\n if (Boolean(value) && typeof value === 'object' && !Array.isArray(value)) {\n // Sort object keys, not values\n result[key] = keysSorter(value);\n } else {\n result[key] = value;\n }\n\n return result;\n }, Object.create(null));\n}\n\nexports.extract = extract;\nexports.parse = parse;\n\nexports.stringify = function (object, options) {\n if (!object) {\n return '';\n }\n\n options = Object.assign({\n encode: true,\n strict: true,\n arrayFormat: 'none'\n }, options);\n var formatter = encoderForArrayFormat(options);\n var keys = Object.keys(object);\n\n if (options.sort !== false) {\n keys.sort(options.sort);\n }\n\n return keys.map(function (key) {\n var value = object[key];\n\n if (value === undefined) {\n return '';\n }\n\n if (value === null) {\n return encode(key, options);\n }\n\n if (Array.isArray(value)) {\n return value.reduce(formatter(key), []).join('&');\n }\n\n return encode(key, options) + '=' + encode(value, options);\n }).filter(function (x) {\n return x.length > 0;\n }).join('&');\n};\n\nexports.parseUrl = function (input, options) {\n return {\n url: removeHash(input).split('?')[0] || '',\n query: parse(extract(input), options)\n };\n};","var queue = [];\n/**\n Variable to hold a counting semaphore\n - Incrementing adds a lock and puts the scheduler in a `suspended` state (if it's not\n already suspended)\n - Decrementing releases a lock. Zero locks puts the scheduler in a `released` state. This\n triggers flushing the queued tasks.\n**/\n\nvar semaphore = 0;\n/**\n Executes a task 'atomically'. Tasks scheduled during this execution will be queued\n and flushed after this task has finished (assuming the scheduler endup in a released\n state).\n**/\n\nfunction exec(task) {\n try {\n suspend();\n task();\n } finally {\n release();\n }\n}\n/**\n Executes or queues a task depending on the state of the scheduler (`suspended` or `released`)\n**/\n\n\nexport function asap(task) {\n queue.push(task);\n\n if (!semaphore) {\n suspend();\n flush();\n }\n}\n/**\n Puts the scheduler in a `suspended` state. Scheduled tasks will be queued until the\n scheduler is released.\n**/\n\nexport function suspend() {\n semaphore++;\n}\n/**\n Puts the scheduler in a `released` state.\n**/\n\nfunction release() {\n semaphore--;\n}\n/**\n Releases the current lock. Executes all queued tasks if the scheduler is in the released state.\n**/\n\n\nexport function flush() {\n release();\n var task = void 0;\n\n while (!semaphore && (task = queue.shift()) !== undefined) {\n exec(task);\n }\n}","var win = typeof window !== 'undefined' ? window : {};\nvar doc = typeof document !== 'undefined' ? document : {\n documentElement: {}\n}; // IE < 9 & Node\n\nvar scrollElem = typeof win.pageYOffset === 'undefined' ? doc.documentElement : null;\n\nfunction detectScrollElem() {\n var startScrollTop = window.pageYOffset;\n document.documentElement.scrollTop = startScrollTop + 1;\n\n if (window.pageYOffset > startScrollTop) {\n document.documentElement.scrollTop = startScrollTop; // IE > 9 & FF (standard)\n\n return document.documentElement;\n } // Chrome (non-standard)\n\n\n return document.scrollingElement || document.body;\n}\n\nmodule.exports = function scrollDoc() {\n return scrollElem || (scrollElem = detectScrollElem());\n};","'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}","import { getGlobalObject } from './misc';\nimport { dynamicRequire, isNodeEnv } from './node';\n/**\n * A TimestampSource implementation for environments that do not support the Performance Web API natively.\n *\n * Note that this TimestampSource does not use a monotonic clock. A call to `nowSeconds` may return a timestamp earlier\n * than a previously returned value. We do not try to emulate a monotonic behavior in order to facilitate debugging. It\n * is more obvious to explain \"why does my span have negative duration\" than \"why my spans have zero duration\".\n */\n\nvar dateTimestampSource = {\n nowSeconds: function nowSeconds() {\n return Date.now() / 1000;\n }\n};\n/**\n * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not\n * support the API.\n *\n * Wrapping the native API works around differences in behavior from different browsers.\n */\n\nfunction getBrowserPerformance() {\n var performance = getGlobalObject().performance;\n\n if (!performance || !performance.now) {\n return undefined;\n } // Replace performance.timeOrigin with our own timeOrigin based on Date.now().\n //\n // This is a partial workaround for browsers reporting performance.timeOrigin such that performance.timeOrigin +\n // performance.now() gives a date arbitrarily in the past.\n //\n // Additionally, computing timeOrigin in this way fills the gap for browsers where performance.timeOrigin is\n // undefined.\n //\n // The assumption that performance.timeOrigin + performance.now() ~= Date.now() is flawed, but we depend on it to\n // interact with data coming out of performance entries.\n //\n // Note that despite recommendations against it in the spec, browsers implement the Performance API with a clock that\n // might stop when the computer is asleep (and perhaps under other circumstances). Such behavior causes\n // performance.timeOrigin + performance.now() to have an arbitrary skew over Date.now(). In laptop computers, we have\n // observed skews that can be as long as days, weeks or months.\n //\n // See https://github.com/getsentry/sentry-javascript/issues/2590.\n //\n // BUG: despite our best intentions, this workaround has its limitations. It mostly addresses timings of pageload\n // transactions, but ignores the skew built up over time that can aversely affect timestamps of navigation\n // transactions of long-lived web pages.\n\n\n var timeOrigin = Date.now() - performance.now();\n return {\n now: function now() {\n return performance.now();\n },\n timeOrigin: timeOrigin\n };\n}\n/**\n * Returns the native Performance API implementation from Node.js. Returns undefined in old Node.js versions that don't\n * implement the API.\n */\n\n\nfunction getNodePerformance() {\n try {\n var perfHooks = dynamicRequire(module, 'perf_hooks');\n return perfHooks.performance;\n } catch (_) {\n return undefined;\n }\n}\n/**\n * The Performance API implementation for the current platform, if available.\n */\n\n\nvar platformPerformance = isNodeEnv() ? getNodePerformance() : getBrowserPerformance();\nvar timestampSource = platformPerformance === undefined ? dateTimestampSource : {\n nowSeconds: function nowSeconds() {\n return (platformPerformance.timeOrigin + platformPerformance.now()) / 1000;\n }\n};\n/**\n * Returns a timestamp in seconds since the UNIX epoch using the Date API.\n */\n\nexport var dateTimestampInSeconds = dateTimestampSource.nowSeconds.bind(dateTimestampSource);\n/**\n * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the\n * availability of the Performance API.\n *\n * See `usingPerformanceAPI` to test whether the Performance API is used.\n *\n * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is\n * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The\n * skew can grow to arbitrary amounts like days, weeks or months.\n * See https://github.com/getsentry/sentry-javascript/issues/2590.\n */\n\nexport var timestampInSeconds = timestampSource.nowSeconds.bind(timestampSource); // Re-exported with an old name for backwards-compatibility.\n\nexport var timestampWithMs = timestampInSeconds;\n/**\n * A boolean that is true when timestampInSeconds uses the Performance API to produce monotonic timestamps.\n */\n\nexport var usingPerformanceAPI = platformPerformance !== undefined;\n/**\n * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the\n * performance API is available.\n */\n\nexport var browserPerformanceTimeOrigin = function () {\n var performance = getGlobalObject().performance;\n\n if (!performance) {\n return undefined;\n }\n\n if (performance.timeOrigin) {\n return performance.timeOrigin;\n } // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always\n // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the\n // Date API.\n // eslint-disable-next-line deprecation/deprecation\n\n\n return performance.timing && performance.timing.navigationStart || Date.now();\n}();","// shim for using process in browser\nvar process = module.exports = {}; // cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\n\nfunction defaultClearTimeout() {\n throw new Error('clearTimeout has not been defined');\n}\n\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n})();\n\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n } // if setTimeout wasn't available but was latter defined\n\n\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n}\n\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n } // if clearTimeout wasn't available but was latter defined\n\n\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n}\n\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n\n draining = false;\n\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n var len = queue.length;\n\n while (len) {\n currentQueue = queue;\n queue = [];\n\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n\n queueIndex = -1;\n len = queue.length;\n }\n\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n\n queue.push(new Item(fun, args));\n\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n}; // v8 likes predictible objects\n\n\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\n\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\n\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\n\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) {\n return [];\n};\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () {\n return '/';\n};\n\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\n\nprocess.umask = function () {\n return 0;\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// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nfunction isArray(arg) {\n if (Array.isArray) {\n return Array.isArray(arg);\n }\n\n return objectToString(arg) === '[object Array]';\n}\n\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\n\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\n\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\n\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\n\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\n\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\n\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\n\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return objectToString(re) === '[object RegExp]';\n}\n\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\n\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return objectToString(d) === '[object Date]';\n}\n\nexports.isDate = isDate;\n\nfunction isError(e) {\n return objectToString(e) === '[object Error]' || e instanceof Error;\n}\n\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\n\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null || typeof arg === 'boolean' || typeof arg === 'number' || typeof arg === 'string' || typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\n\nexports.isPrimitive = isPrimitive;\nexports.isBuffer = Buffer.isBuffer;\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}","var global = require('../internals/global');\n\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\n\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar defineBuiltIn = require('../internals/define-built-in');\n\nvar defineGlobalProperty = require('../internals/define-global-property');\n\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\n\nvar isForced = require('../internals/is-forced');\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.dontCallGetSet - prevent calling a getter on target\n options.name - the .name of the function if it does not match the key\n*/\n\n\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || defineGlobalProperty(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n\n if (target) for (key in source) {\n sourceProperty = source[key];\n\n if (options.dontCallGetSet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contained in target\n\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty == typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n } // add a flag to not completely full polyfills\n\n\n if (options.sham || targetProperty && targetProperty.sham) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n\n defineBuiltIn(target, key, sourceProperty, options);\n }\n};","var global = require('../internals/global');\n\nvar isCallable = require('../internals/is-callable');\n\nvar aFunction = function aFunction(argument) {\n return isCallable(argument) ? argument : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];\n};","var requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar $Object = Object; // `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\n\nmodule.exports = function (argument) {\n return $Object(requireObjectCoercible(argument));\n};","var toLength = require('../internals/to-length'); // `LengthOfArrayLike` abstract operation\n// https://tc39.es/ecma262/#sec-lengthofarraylike\n\n\nmodule.exports = function (obj) {\n return toLength(obj.length);\n};","module.exports = {};","/**\n * Copyright (c) 2014-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'use strict';\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function warning() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 1 ? len - 1 : 0);\n\n for (var key = 1; key < len; key++) {\n args[key - 1] = arguments[key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n warning = function warning(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;","import { __assign } from \"tslib\";\nimport { getActiveDomain, getMainCarrier } from '@sentry/hub';\nimport { TransactionSamplingMethod } from '@sentry/types';\nimport { dynamicRequire, extractNodeRequestData, getGlobalObject, isInstanceOf, isNodeEnv, logger } from '@sentry/utils';\nimport { registerErrorInstrumentation } from './errors';\nimport { IdleTransaction } from './idletransaction';\nimport { Transaction } from './transaction';\nimport { hasTracingEnabled } from './utils';\n/** Returns all trace headers that are currently on the top scope. */\n\nfunction traceHeaders() {\n var scope = this.getScope();\n\n if (scope) {\n var span = scope.getSpan();\n\n if (span) {\n return {\n 'sentry-trace': span.toTraceparent()\n };\n }\n }\n\n return {};\n}\n/**\n * Makes a sampling decision for the given transaction and stores it on the transaction.\n *\n * Called every time a transaction is created. Only transactions which emerge with a `sampled` value of `true` will be\n * sent to Sentry.\n *\n * @param hub: The hub off of which to read config options\n * @param transaction: The transaction needing a sampling decision\n * @param samplingContext: Default and user-provided data which may be used to help make the decision\n *\n * @returns The given transaction with its `sampled` value set\n */\n\n\nfunction sample(hub, transaction, samplingContext) {\n var _a;\n\n var client = hub.getClient();\n var options = client && client.getOptions() || {}; // nothing to do if there's no client or if tracing is disabled\n\n if (!client || !hasTracingEnabled(options)) {\n transaction.sampled = false;\n return transaction;\n } // if the user has forced a sampling decision by passing a `sampled` value in their transaction context, go with that\n\n\n if (transaction.sampled !== undefined) {\n transaction.tags = __assign(__assign({}, transaction.tags), {\n __sentry_samplingMethod: TransactionSamplingMethod.Explicit\n });\n return transaction;\n } // we would have bailed already if neither `tracesSampler` nor `tracesSampleRate` were defined, so one of these should\n // work; prefer the hook if so\n\n\n var sampleRate;\n\n if (typeof options.tracesSampler === 'function') {\n sampleRate = options.tracesSampler(samplingContext); // cast the rate to a number first in case it's a boolean\n\n transaction.tags = __assign(__assign({}, transaction.tags), {\n __sentry_samplingMethod: TransactionSamplingMethod.Sampler,\n // TODO kmclb - once tag types are loosened, don't need to cast to string here\n __sentry_sampleRate: String(Number(sampleRate))\n });\n } else if (samplingContext.parentSampled !== undefined) {\n sampleRate = samplingContext.parentSampled;\n transaction.tags = __assign(__assign({}, transaction.tags), {\n __sentry_samplingMethod: TransactionSamplingMethod.Inheritance\n });\n } else {\n sampleRate = options.tracesSampleRate; // cast the rate to a number first in case it's a boolean\n\n transaction.tags = __assign(__assign({}, transaction.tags), {\n __sentry_samplingMethod: TransactionSamplingMethod.Rate,\n // TODO kmclb - once tag types are loosened, don't need to cast to string here\n __sentry_sampleRate: String(Number(sampleRate))\n });\n } // Since this is coming from the user (or from a function provided by the user), who knows what we might get. (The\n // only valid values are booleans or numbers between 0 and 1.)\n\n\n if (!isValidSampleRate(sampleRate)) {\n logger.warn(\"[Tracing] Discarding transaction because of invalid sample rate.\");\n transaction.sampled = false;\n return transaction;\n } // if the function returned 0 (or false), or if `tracesSampleRate` is 0, it's a sign the transaction should be dropped\n\n\n if (!sampleRate) {\n logger.log(\"[Tracing] Discarding transaction because \" + (typeof options.tracesSampler === 'function' ? 'tracesSampler returned 0 or false' : 'a negative sampling decision was inherited or tracesSampleRate is set to 0'));\n transaction.sampled = false;\n return transaction;\n } // Now we roll the dice. Math.random is inclusive of 0, but not of 1, so strict < is safe here. In case sampleRate is\n // a boolean, the < comparison will cause it to be automatically cast to 1 if it's true and 0 if it's false.\n\n\n transaction.sampled = Math.random() < sampleRate; // if we're not going to keep it, we're done\n\n if (!transaction.sampled) {\n logger.log(\"[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = \" + Number(sampleRate) + \")\");\n return transaction;\n } // at this point we know we're keeping the transaction, whether because of an inherited decision or because it got\n // lucky with the dice roll\n\n\n transaction.initSpanRecorder((_a = options._experiments) === null || _a === void 0 ? void 0 : _a.maxSpans);\n logger.log(\"[Tracing] starting \" + transaction.op + \" transaction - \" + transaction.name);\n return transaction;\n}\n/**\n * Gets the correct context to pass to the tracesSampler, based on the environment (i.e., which SDK is being used)\n *\n * @returns The default sample context\n */\n\n\nfunction getDefaultSamplingContext(transactionContext) {\n // promote parent sampling decision (if any) for easy access\n var parentSampled = transactionContext.parentSampled;\n var defaultSamplingContext = {\n transactionContext: transactionContext,\n parentSampled: parentSampled\n };\n\n if (isNodeEnv()) {\n var domain = getActiveDomain();\n\n if (domain) {\n // for all node servers that we currently support, we store the incoming request object (which is an instance of\n // http.IncomingMessage) on the domain\n // the domain members are stored as an array, so our only way to find the request is to iterate through the array\n // and compare types\n var nodeHttpModule = dynamicRequire(module, 'http'); // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n\n var requestType_1 = nodeHttpModule.IncomingMessage;\n var request = domain.members.find(function (member) {\n return isInstanceOf(member, requestType_1);\n });\n\n if (request) {\n defaultSamplingContext.request = extractNodeRequestData(request);\n }\n }\n } // we must be in browser-js (or some derivative thereof)\n else {\n // we use `getGlobalObject()` rather than `window` since service workers also have a `location` property on `self`\n var globalObject = getGlobalObject();\n\n if ('location' in globalObject) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n defaultSamplingContext.location = __assign({}, globalObject.location);\n }\n }\n\n return defaultSamplingContext;\n}\n/**\n * Checks the given sample rate to make sure it is valid type and value (a boolean, or a number between 0 and 1).\n */\n\n\nfunction isValidSampleRate(rate) {\n // we need to check NaN explicitly because it's of type 'number' and therefore wouldn't get caught by this typecheck\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isNaN(rate) || !(typeof rate === 'number' || typeof rate === 'boolean')) {\n logger.warn(\"[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got \" + JSON.stringify(rate) + \" of type \" + JSON.stringify(typeof rate) + \".\");\n return false;\n } // in case sampleRate is a boolean, it will get automatically cast to 1 if it's true and 0 if it's false\n\n\n if (rate < 0 || rate > 1) {\n logger.warn(\"[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got \" + rate + \".\");\n return false;\n }\n\n return true;\n}\n/**\n * Creates a new transaction and adds a sampling decision if it doesn't yet have one.\n *\n * The Hub.startTransaction method delegates to this method to do its work, passing the Hub instance in as `this`, as if\n * it had been called on the hub directly. Exists as a separate function so that it can be injected into the class as an\n * \"extension method.\"\n *\n * @param this: The Hub starting the transaction\n * @param transactionContext: Data used to configure the transaction\n * @param CustomSamplingContext: Optional data to be provided to the `tracesSampler` function (if any)\n *\n * @returns The new transaction\n *\n * @see {@link Hub.startTransaction}\n */\n\n\nfunction _startTransaction(transactionContext, customSamplingContext) {\n var transaction = new Transaction(transactionContext, this);\n return sample(this, transaction, __assign(__assign({}, getDefaultSamplingContext(transactionContext)), customSamplingContext));\n}\n/**\n * Create new idle transaction.\n */\n\n\nexport function startIdleTransaction(hub, transactionContext, idleTimeout, onScope) {\n var transaction = new IdleTransaction(transactionContext, hub, idleTimeout, onScope);\n return sample(hub, transaction, getDefaultSamplingContext(transactionContext));\n}\n/**\n * @private\n */\n\nexport function _addTracingExtensions() {\n var carrier = getMainCarrier();\n\n if (carrier.__SENTRY__) {\n carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};\n\n if (!carrier.__SENTRY__.extensions.startTransaction) {\n carrier.__SENTRY__.extensions.startTransaction = _startTransaction;\n }\n\n if (!carrier.__SENTRY__.extensions.traceHeaders) {\n carrier.__SENTRY__.extensions.traceHeaders = traceHeaders;\n }\n }\n}\n/**\n * This patches the global object and injects the Tracing extensions methods\n */\n\nexport function addExtensionMethods() {\n _addTracingExtensions(); // If an error happens globally, we should make sure transaction status is set to error.\n\n\n registerErrorInstrumentation();\n}","import ownerDocument from './ownerDocument';\nexport default function ownerWindow(node) {\n var doc = ownerDocument(node);\n return doc && doc.defaultView || window;\n}","export default function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}","var rUpper = /([A-Z])/g;\nexport default function hyphenate(string) {\n return string.replace(rUpper, '-$1').toLowerCase();\n}","/**\n * Copyright 2013-2014, Facebook, Inc.\n * All rights reserved.\n * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/hyphenateStyleName.js\n */\nimport hyphenate from './hyphenate';\nvar msPattern = /^ms-/;\nexport default function hyphenateStyleName(string) {\n return hyphenate(string).replace(msPattern, '-ms-');\n}","var supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;\nexport default function isTransform(value) {\n return !!(value && supportedTransforms.test(value));\n}","import getComputedStyle from './getComputedStyle';\nimport hyphenate from './hyphenateStyle';\nimport isTransform from './isTransform';\n\nfunction style(node, property) {\n var css = '';\n var transforms = '';\n\n if (typeof property === 'string') {\n return node.style.getPropertyValue(hyphenate(property)) || getComputedStyle(node).getPropertyValue(hyphenate(property));\n }\n\n Object.keys(property).forEach(function (key) {\n var value = property[key];\n\n if (!value && value !== 0) {\n node.style.removeProperty(hyphenate(key));\n } else if (isTransform(key)) {\n transforms += key + \"(\" + value + \") \";\n } else {\n css += hyphenate(key) + \": \" + value + \";\";\n }\n });\n\n if (transforms) {\n css += \"transform: \" + transforms + \";\";\n }\n\n node.style.cssText += \";\" + css;\n}\n\nexport default style;","import ownerWindow from './ownerWindow';\nexport default function getComputedStyle(node, psuedoElement) {\n return ownerWindow(node).getComputedStyle(node, psuedoElement);\n}","/* eslint-disable no-return-assign */\nimport canUseDOM from './canUseDOM';\nexport var optionsSupported = false;\nexport var onceSupported = false;\n\ntry {\n var options = {\n get passive() {\n return optionsSupported = true;\n },\n\n get once() {\n // eslint-disable-next-line no-multi-assign\n return onceSupported = optionsSupported = true;\n }\n\n };\n\n if (canUseDOM) {\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, true);\n }\n} catch (e) {}\n/* */\n\n/**\n * An `addEventListener` ponyfill, supports the `once` option\n */\n\n\nfunction addEventListener(node, eventName, handler, options) {\n if (options && typeof options !== 'boolean' && !onceSupported) {\n var once = options.once,\n capture = options.capture;\n var wrappedHandler = handler;\n\n if (!onceSupported && once) {\n wrappedHandler = handler.__once || function onceHandler(event) {\n this.removeEventListener(eventName, onceHandler, capture);\n handler.call(this, event);\n };\n\n handler.__once = wrappedHandler;\n }\n\n node.addEventListener(eventName, wrappedHandler, optionsSupported ? options : capture);\n }\n\n node.addEventListener(eventName, handler, options);\n}\n\nexport default addEventListener;","function removeEventListener(node, eventName, handler, options) {\n var capture = options && typeof options !== 'boolean' ? options.capture : options;\n node.removeEventListener(eventName, handler, capture);\n\n if (handler.__once) {\n node.removeEventListener(eventName, handler.__once, capture);\n }\n}\n\nexport default removeEventListener;","import addEventListener from './addEventListener';\nimport removeEventListener from './removeEventListener';\n\nfunction listen(node, eventName, handler, options) {\n addEventListener(node, eventName, handler, options);\n return function () {\n removeEventListener(node, eventName, handler, options);\n };\n}\n\nexport default listen;","import css from './css';\nimport listen from './listen';\n\nfunction parseDuration(node) {\n var str = css(node, 'transitionDuration') || '';\n var mult = str.indexOf('ms') === -1 ? 1000 : 1;\n return parseFloat(str) * mult;\n}\n\nfunction triggerTransitionEnd(element) {\n var evt = document.createEvent('HTMLEvents');\n evt.initEvent('transitionend', true, true);\n element.dispatchEvent(evt);\n}\n\nfunction emulateTransitionEnd(element, duration, padding) {\n if (padding === void 0) {\n padding = 5;\n }\n\n var called = false;\n var handle = setTimeout(function () {\n if (!called) triggerTransitionEnd(element);\n }, duration + padding);\n var remove = listen(element, 'transitionend', function () {\n called = true;\n }, {\n once: true\n });\n return function () {\n clearTimeout(handle);\n remove();\n };\n}\n\nexport default function transitionEnd(element, handler, duration, padding) {\n if (duration == null) duration = parseDuration(element) || 0;\n var removeEmulate = emulateTransitionEnd(element, duration, padding);\n var remove = listen(element, 'transitionend', handler);\n return function () {\n removeEmulate();\n remove();\n };\n}","export default {\n disabled: false\n};","import React from 'react';\nexport default React.createContext(null);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport config from './config';\nimport { timeoutsShape } from './utils/PropTypes';\nimport TransitionGroupContext from './TransitionGroupContext';\nexport var UNMOUNTED = 'unmounted';\nexport var EXITED = 'exited';\nexport var ENTERING = 'entering';\nexport var ENTERED = 'entered';\nexport var 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: 1 },\n * entered: { opacity: 1 },\n * exiting: { opacity: 0 },\n * exited: { opacity: 0 },\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 * {state => (\n * // ...\n * )}\n * \n * \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\nvar Transition =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // 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\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\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\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\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\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\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\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\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\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 || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\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\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\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: PropTypes.shape({\n current: typeof Element === 'undefined' ? PropTypes.any : PropTypes.instanceOf(Element)\n }),\n\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'`), 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 /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\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 /**\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 /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\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 = timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\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\n return pt.apply(void 0, [props].concat(args));\n },\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. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\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 /**\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 * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\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 * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\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 * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\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 = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\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\n return target;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\n\nvar _fadeStyles;\n\nimport classNames from 'classnames';\nimport transitionEnd from 'dom-helpers/transitionEnd';\nimport React, { useCallback } from 'react';\nimport Transition, { ENTERED, ENTERING } from 'react-transition-group/Transition';\nimport triggerBrowserReflow from './triggerBrowserReflow';\nvar defaultProps = {\n in: false,\n timeout: 300,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false\n};\nvar fadeStyles = (_fadeStyles = {}, _fadeStyles[ENTERING] = 'show', _fadeStyles[ENTERED] = 'show', _fadeStyles);\nvar Fade = React.forwardRef(function (_ref, ref) {\n var className = _ref.className,\n children = _ref.children,\n props = _objectWithoutPropertiesLoose(_ref, [\"className\", \"children\"]);\n\n var handleEnter = useCallback(function (node) {\n triggerBrowserReflow(node);\n if (props.onEnter) props.onEnter(node);\n }, [props]);\n return (\n /*#__PURE__*/\n React.createElement(Transition, _extends({\n ref: ref,\n addEndListener: transitionEnd\n }, props, {\n onEnter: handleEnter\n }), function (status, innerProps) {\n return React.cloneElement(children, _extends({}, innerProps, {\n className: classNames('fade', className, children.props.className, fadeStyles[status])\n }));\n })\n );\n});\nFade.defaultProps = defaultProps;\nFade.displayName = 'Fade';\nexport default Fade;","// reading a dimension prop will cause the browser to recalculate,\n// which will let our animations work\nexport default function triggerBrowserReflow(node) {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n node.offsetHeight;\n}","var _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nfunction _defineEnumerableProperties(obj, descs) {\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if (\"value\" in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n\n return obj;\n}\n\nimport { noop, kTrue, is, log as _log, check, deferred, uid as nextEffectId, array, remove, object, TASK, CANCEL, SELF_CANCELLATION, makeIterator, createSetContextWarning, deprecate, updateIncentive } from './utils';\nimport { asap, suspend, flush } from './scheduler';\nimport { asEffect } from './io';\nimport { stdChannel as _stdChannel, eventChannel, isEnd } from './channel';\nimport { buffers } from './buffers';\nexport var NOT_ITERATOR_ERROR = 'proc first argument (Saga function result) must be an iterator';\nexport var CHANNEL_END = {\n toString: function toString() {\n return '@@redux-saga/CHANNEL_END';\n }\n};\nexport var TASK_CANCEL = {\n toString: function toString() {\n return '@@redux-saga/TASK_CANCEL';\n }\n};\nvar matchers = {\n wildcard: function wildcard() {\n return kTrue;\n },\n default: function _default(pattern) {\n return (typeof pattern === 'undefined' ? 'undefined' : _typeof(pattern)) === 'symbol' ? function (input) {\n return input.type === pattern;\n } : function (input) {\n return input.type === String(pattern);\n };\n },\n array: function array(patterns) {\n return function (input) {\n return patterns.some(function (p) {\n return matcher(p)(input);\n });\n };\n },\n predicate: function predicate(_predicate) {\n return function (input) {\n return _predicate(input);\n };\n }\n};\n\nfunction matcher(pattern) {\n // prettier-ignore\n return (pattern === '*' ? matchers.wildcard : is.array(pattern) ? matchers.array : is.stringableFunc(pattern) ? matchers.default : is.func(pattern) ? matchers.predicate : matchers.default)(pattern);\n}\n/**\n Used to track a parent task and its forks\n In the new fork model, forked tasks are attached by default to their parent\n We model this using the concept of Parent task && main Task\n main task is the main flow of the current Generator, the parent tasks is the\n aggregation of the main tasks + all its forked tasks.\n Thus the whole model represents an execution tree with multiple branches (vs the\n linear execution tree in sequential (non parallel) programming)\n\n A parent tasks has the following semantics\n - It completes if all its forks either complete or all cancelled\n - If it's cancelled, all forks are cancelled as well\n - It aborts if any uncaught error bubbles up from forks\n - If it completes, the return value is the one returned by the main task\n**/\n\n\nfunction forkQueue(name, mainTask, cb) {\n var tasks = [],\n result = void 0,\n completed = false;\n addTask(mainTask);\n\n function abort(err) {\n cancelAll();\n cb(err, true);\n }\n\n function addTask(task) {\n tasks.push(task);\n\n task.cont = function (res, isErr) {\n if (completed) {\n return;\n }\n\n remove(tasks, task);\n task.cont = noop;\n\n if (isErr) {\n abort(res);\n } else {\n if (task === mainTask) {\n result = res;\n }\n\n if (!tasks.length) {\n completed = true;\n cb(result);\n }\n }\n }; // task.cont.cancel = task.cancel\n\n }\n\n function cancelAll() {\n if (completed) {\n return;\n }\n\n completed = true;\n tasks.forEach(function (t) {\n t.cont = noop;\n t.cancel();\n });\n tasks = [];\n }\n\n return {\n addTask: addTask,\n cancelAll: cancelAll,\n abort: abort,\n getTasks: function getTasks() {\n return tasks;\n },\n taskNames: function taskNames() {\n return tasks.map(function (t) {\n return t.name;\n });\n }\n };\n}\n\nfunction createTaskIterator(_ref) {\n var context = _ref.context,\n fn = _ref.fn,\n args = _ref.args;\n\n if (is.iterator(fn)) {\n return fn;\n } // catch synchronous failures; see #152 and #441\n\n\n var result = void 0,\n error = void 0;\n\n try {\n result = fn.apply(context, args);\n } catch (err) {\n error = err;\n } // i.e. a generator function returns an iterator\n\n\n if (is.iterator(result)) {\n return result;\n } // do not bubble up synchronous failures for detached forks\n // instead create a failed task. See #152 and #441\n\n\n return error ? makeIterator(function () {\n throw error;\n }) : makeIterator(function () {\n var pc = void 0;\n var eff = {\n done: false,\n value: result\n };\n\n var ret = function ret(value) {\n return {\n done: true,\n value: value\n };\n };\n\n return function (arg) {\n if (!pc) {\n pc = true;\n return eff;\n } else {\n return ret(arg);\n }\n };\n }());\n}\n\nvar wrapHelper = function wrapHelper(helper) {\n return {\n fn: helper\n };\n};\n\nexport default function proc(iterator) {\n var subscribe = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {\n return noop;\n };\n var dispatch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noop;\n var getState = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : noop;\n var parentContext = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};\n var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};\n var parentEffectId = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 0;\n var name = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 'anonymous';\n var cont = arguments[8];\n check(iterator, is.iterator, NOT_ITERATOR_ERROR);\n var effectsString = '[...effects]';\n var runParallelEffect = deprecate(runAllEffect, updateIncentive(effectsString, 'all(' + effectsString + ')'));\n var sagaMonitor = options.sagaMonitor,\n logger = options.logger,\n onError = options.onError;\n var log = logger || _log;\n\n var logError = function logError(err) {\n var message = err.sagaStack;\n\n if (!message && err.stack) {\n message = err.stack.split('\\n')[0].indexOf(err.message) !== -1 ? err.stack : 'Error: ' + err.message + '\\n' + err.stack;\n }\n\n log('error', 'uncaught at ' + name, message || err.message || err);\n };\n\n var stdChannel = _stdChannel(subscribe);\n\n var taskContext = Object.create(parentContext);\n /**\n Tracks the current effect cancellation\n Each time the generator progresses. calling runEffect will set a new value\n on it. It allows propagating cancellation to child effects\n **/\n\n next.cancel = noop;\n /**\n Creates a new task descriptor for this generator, We'll also create a main task\n to track the main flow (besides other forked tasks)\n **/\n\n var task = newTask(parentEffectId, name, iterator, cont);\n var mainTask = {\n name: name,\n cancel: cancelMain,\n isRunning: true\n };\n var taskQueue = forkQueue(name, mainTask, end);\n /**\n cancellation of the main task. We'll simply resume the Generator with a Cancel\n **/\n\n function cancelMain() {\n if (mainTask.isRunning && !mainTask.isCancelled) {\n mainTask.isCancelled = true;\n next(TASK_CANCEL);\n }\n }\n /**\n This may be called by a parent generator to trigger/propagate cancellation\n cancel all pending tasks (including the main task), then end the current task.\n Cancellation propagates down to the whole execution tree holded by this Parent task\n It's also propagated to all joiners of this task and their execution tree/joiners\n Cancellation is noop for terminated/Cancelled tasks tasks\n **/\n\n\n function cancel() {\n /**\n We need to check both Running and Cancelled status\n Tasks can be Cancelled but still Running\n **/\n if (iterator._isRunning && !iterator._isCancelled) {\n iterator._isCancelled = true;\n taskQueue.cancelAll();\n /**\n Ending with a Never result will propagate the Cancellation to all joiners\n **/\n\n end(TASK_CANCEL);\n }\n }\n /**\n attaches cancellation logic to this task's continuation\n this will permit cancellation to propagate down the call chain\n **/\n\n\n cont && (cont.cancel = cancel); // tracks the running status\n\n iterator._isRunning = true; // kicks up the generator\n\n next(); // then return the task descriptor to the caller\n\n return task;\n /**\n This is the generator driver\n It's a recursive async/continuation function which calls itself\n until the generator terminates or throws\n **/\n\n function next(arg, isErr) {\n // Preventive measure. If we end up here, then there is really something wrong\n if (!mainTask.isRunning) {\n throw new Error('Trying to resume an already finished generator');\n }\n\n try {\n var result = void 0;\n\n if (isErr) {\n result = iterator.throw(arg);\n } else if (arg === TASK_CANCEL) {\n /**\n getting TASK_CANCEL automatically cancels the main task\n We can get this value here\n - By cancelling the parent task manually\n - By joining a Cancelled task\n **/\n mainTask.isCancelled = true;\n /**\n Cancels the current effect; this will propagate the cancellation down to any called tasks\n **/\n\n next.cancel();\n /**\n If this Generator has a `return` method then invokes it\n This will jump to the finally block\n **/\n\n result = is.func(iterator.return) ? iterator.return(TASK_CANCEL) : {\n done: true,\n value: TASK_CANCEL\n };\n } else if (arg === CHANNEL_END) {\n // We get CHANNEL_END by taking from a channel that ended using `take` (and not `takem` used to trap End of channels)\n result = is.func(iterator.return) ? iterator.return() : {\n done: true\n };\n } else {\n result = iterator.next(arg);\n }\n\n if (!result.done) {\n runEffect(result.value, parentEffectId, '', next);\n } else {\n /**\n This Generator has ended, terminate the main task and notify the fork queue\n **/\n mainTask.isMainRunning = false;\n mainTask.cont && mainTask.cont(result.value);\n }\n } catch (error) {\n if (mainTask.isCancelled) {\n logError(error);\n }\n\n mainTask.isMainRunning = false;\n mainTask.cont(error, true);\n }\n }\n\n function end(result, isErr) {\n iterator._isRunning = false;\n stdChannel.close();\n\n if (!isErr) {\n iterator._result = result;\n iterator._deferredEnd && iterator._deferredEnd.resolve(result);\n } else {\n if (result instanceof Error) {\n Object.defineProperty(result, 'sagaStack', {\n value: 'at ' + name + ' \\n ' + (result.sagaStack || result.stack),\n configurable: true\n });\n }\n\n if (!task.cont) {\n if (result instanceof Error && onError) {\n onError(result);\n } else {\n logError(result);\n }\n }\n\n iterator._error = result;\n iterator._isAborted = true;\n iterator._deferredEnd && iterator._deferredEnd.reject(result);\n }\n\n task.cont && task.cont(result, isErr);\n task.joiners.forEach(function (j) {\n return j.cb(result, isErr);\n });\n task.joiners = null;\n }\n\n function runEffect(effect, parentEffectId) {\n var label = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n var cb = arguments[3];\n var effectId = nextEffectId();\n sagaMonitor && sagaMonitor.effectTriggered({\n effectId: effectId,\n parentEffectId: parentEffectId,\n label: label,\n effect: effect\n });\n /**\n completion callback and cancel callback are mutually exclusive\n We can't cancel an already completed effect\n And We can't complete an already cancelled effectId\n **/\n\n var effectSettled = void 0; // Completion callback passed to the appropriate effect runner\n\n function currCb(res, isErr) {\n if (effectSettled) {\n return;\n }\n\n effectSettled = true;\n cb.cancel = noop; // defensive measure\n\n if (sagaMonitor) {\n isErr ? sagaMonitor.effectRejected(effectId, res) : sagaMonitor.effectResolved(effectId, res);\n }\n\n cb(res, isErr);\n } // tracks down the current cancel\n\n\n currCb.cancel = noop; // setup cancellation logic on the parent cb\n\n cb.cancel = function () {\n // prevents cancelling an already completed effect\n if (effectSettled) {\n return;\n }\n\n effectSettled = true;\n /**\n propagates cancel downward\n catch uncaught cancellations errors; since we can no longer call the completion\n callback, log errors raised during cancellations into the console\n **/\n\n try {\n currCb.cancel();\n } catch (err) {\n logError(err);\n }\n\n currCb.cancel = noop; // defensive measure\n\n sagaMonitor && sagaMonitor.effectCancelled(effectId);\n };\n /**\n each effect runner must attach its own logic of cancellation to the provided callback\n it allows this generator to propagate cancellation downward.\n ATTENTION! effect runners must setup the cancel logic by setting cb.cancel = [cancelMethod]\n And the setup must occur before calling the callback\n This is a sort of inversion of control: called async functions are responsible\n for completing the flow by calling the provided continuation; while caller functions\n are responsible for aborting the current flow by calling the attached cancel function\n Library users can attach their own cancellation logic to promises by defining a\n promise[CANCEL] method in their returned promises\n ATTENTION! calling cancel must have no effect on an already completed or cancelled effect\n **/\n\n\n var data = void 0; // prettier-ignore\n\n return (// Non declarative effect\n is.promise(effect) ? resolvePromise(effect, currCb) : is.helper(effect) ? runForkEffect(wrapHelper(effect), effectId, currCb) : is.iterator(effect) ? resolveIterator(effect, effectId, name, currCb) // declarative effects\n : is.array(effect) ? runParallelEffect(effect, effectId, currCb) : (data = asEffect.take(effect)) ? runTakeEffect(data, currCb) : (data = asEffect.put(effect)) ? runPutEffect(data, currCb) : (data = asEffect.all(effect)) ? runAllEffect(data, effectId, currCb) : (data = asEffect.race(effect)) ? runRaceEffect(data, effectId, currCb) : (data = asEffect.call(effect)) ? runCallEffect(data, effectId, currCb) : (data = asEffect.cps(effect)) ? runCPSEffect(data, currCb) : (data = asEffect.fork(effect)) ? runForkEffect(data, effectId, currCb) : (data = asEffect.join(effect)) ? runJoinEffect(data, currCb) : (data = asEffect.cancel(effect)) ? runCancelEffect(data, currCb) : (data = asEffect.select(effect)) ? runSelectEffect(data, currCb) : (data = asEffect.actionChannel(effect)) ? runChannelEffect(data, currCb) : (data = asEffect.flush(effect)) ? runFlushEffect(data, currCb) : (data = asEffect.cancelled(effect)) ? runCancelledEffect(data, currCb) : (data = asEffect.getContext(effect)) ? runGetContextEffect(data, currCb) : (data = asEffect.setContext(effect)) ? runSetContextEffect(data, currCb) :\n /* anything else returned as is */\n currCb(effect)\n );\n }\n\n function resolvePromise(promise, cb) {\n var cancelPromise = promise[CANCEL];\n\n if (is.func(cancelPromise)) {\n cb.cancel = cancelPromise;\n } else if (is.func(promise.abort)) {\n cb.cancel = function () {\n return promise.abort();\n }; // TODO: add support for the fetch API, whenever they get around to\n // adding cancel support\n\n }\n\n promise.then(cb, function (error) {\n return cb(error, true);\n });\n }\n\n function resolveIterator(iterator, effectId, name, cb) {\n proc(iterator, subscribe, dispatch, getState, taskContext, options, effectId, name, cb);\n }\n\n function runTakeEffect(_ref2, cb) {\n var channel = _ref2.channel,\n pattern = _ref2.pattern,\n maybe = _ref2.maybe;\n channel = channel || stdChannel;\n\n var takeCb = function takeCb(inp) {\n return inp instanceof Error ? cb(inp, true) : isEnd(inp) && !maybe ? cb(CHANNEL_END) : cb(inp);\n };\n\n try {\n channel.take(takeCb, matcher(pattern));\n } catch (err) {\n return cb(err, true);\n }\n\n cb.cancel = takeCb.cancel;\n }\n\n function runPutEffect(_ref3, cb) {\n var channel = _ref3.channel,\n action = _ref3.action,\n resolve = _ref3.resolve;\n /**\n Schedule the put in case another saga is holding a lock.\n The put will be executed atomically. ie nested puts will execute after\n this put has terminated.\n **/\n\n asap(function () {\n var result = void 0;\n\n try {\n result = (channel ? channel.put : dispatch)(action);\n } catch (error) {\n // If we have a channel or `put.resolve` was used then bubble up the error.\n if (channel || resolve) return cb(error, true);\n logError(error);\n }\n\n if (resolve && is.promise(result)) {\n resolvePromise(result, cb);\n } else {\n return cb(result);\n }\n }); // Put effects are non cancellables\n }\n\n function runCallEffect(_ref4, effectId, cb) {\n var context = _ref4.context,\n fn = _ref4.fn,\n args = _ref4.args;\n var result = void 0; // catch synchronous failures; see #152\n\n try {\n result = fn.apply(context, args);\n } catch (error) {\n return cb(error, true);\n }\n\n return is.promise(result) ? resolvePromise(result, cb) : is.iterator(result) ? resolveIterator(result, effectId, fn.name, cb) : cb(result);\n }\n\n function runCPSEffect(_ref5, cb) {\n var context = _ref5.context,\n fn = _ref5.fn,\n args = _ref5.args; // CPS (ie node style functions) can define their own cancellation logic\n // by setting cancel field on the cb\n // catch synchronous failures; see #152\n\n try {\n var cpsCb = function cpsCb(err, res) {\n return is.undef(err) ? cb(res) : cb(err, true);\n };\n\n fn.apply(context, args.concat(cpsCb));\n\n if (cpsCb.cancel) {\n cb.cancel = function () {\n return cpsCb.cancel();\n };\n }\n } catch (error) {\n return cb(error, true);\n }\n }\n\n function runForkEffect(_ref6, effectId, cb) {\n var context = _ref6.context,\n fn = _ref6.fn,\n args = _ref6.args,\n detached = _ref6.detached;\n var taskIterator = createTaskIterator({\n context: context,\n fn: fn,\n args: args\n });\n\n try {\n suspend();\n\n var _task = proc(taskIterator, subscribe, dispatch, getState, taskContext, options, effectId, fn.name, detached ? null : noop);\n\n if (detached) {\n cb(_task);\n } else {\n if (taskIterator._isRunning) {\n taskQueue.addTask(_task);\n cb(_task);\n } else if (taskIterator._error) {\n taskQueue.abort(taskIterator._error);\n } else {\n cb(_task);\n }\n }\n } finally {\n flush();\n } // Fork effects are non cancellables\n\n }\n\n function runJoinEffect(t, cb) {\n if (t.isRunning()) {\n var joiner = {\n task: task,\n cb: cb\n };\n\n cb.cancel = function () {\n return remove(t.joiners, joiner);\n };\n\n t.joiners.push(joiner);\n } else {\n t.isAborted() ? cb(t.error(), true) : cb(t.result());\n }\n }\n\n function runCancelEffect(taskToCancel, cb) {\n if (taskToCancel === SELF_CANCELLATION) {\n taskToCancel = task;\n }\n\n if (taskToCancel.isRunning()) {\n taskToCancel.cancel();\n }\n\n cb(); // cancel effects are non cancellables\n }\n\n function runAllEffect(effects, effectId, cb) {\n var keys = Object.keys(effects);\n\n if (!keys.length) {\n return cb(is.array(effects) ? [] : {});\n }\n\n var completedCount = 0;\n var completed = void 0;\n var results = {};\n var childCbs = {};\n\n function checkEffectEnd() {\n if (completedCount === keys.length) {\n completed = true;\n cb(is.array(effects) ? array.from(_extends({}, results, {\n length: keys.length\n })) : results);\n }\n }\n\n keys.forEach(function (key) {\n var chCbAtKey = function chCbAtKey(res, isErr) {\n if (completed) {\n return;\n }\n\n if (isErr || isEnd(res) || res === CHANNEL_END || res === TASK_CANCEL) {\n cb.cancel();\n cb(res, isErr);\n } else {\n results[key] = res;\n completedCount++;\n checkEffectEnd();\n }\n };\n\n chCbAtKey.cancel = noop;\n childCbs[key] = chCbAtKey;\n });\n\n cb.cancel = function () {\n if (!completed) {\n completed = true;\n keys.forEach(function (key) {\n return childCbs[key].cancel();\n });\n }\n };\n\n keys.forEach(function (key) {\n return runEffect(effects[key], effectId, key, childCbs[key]);\n });\n }\n\n function runRaceEffect(effects, effectId, cb) {\n var completed = void 0;\n var keys = Object.keys(effects);\n var childCbs = {};\n keys.forEach(function (key) {\n var chCbAtKey = function chCbAtKey(res, isErr) {\n if (completed) {\n return;\n }\n\n if (isErr) {\n // Race Auto cancellation\n cb.cancel();\n cb(res, true);\n } else if (!isEnd(res) && res !== CHANNEL_END && res !== TASK_CANCEL) {\n var _response;\n\n cb.cancel();\n completed = true;\n var response = (_response = {}, _response[key] = res, _response);\n cb(is.array(effects) ? [].slice.call(_extends({}, response, {\n length: keys.length\n })) : response);\n }\n };\n\n chCbAtKey.cancel = noop;\n childCbs[key] = chCbAtKey;\n });\n\n cb.cancel = function () {\n // prevents unnecessary cancellation\n if (!completed) {\n completed = true;\n keys.forEach(function (key) {\n return childCbs[key].cancel();\n });\n }\n };\n\n keys.forEach(function (key) {\n if (completed) {\n return;\n }\n\n runEffect(effects[key], effectId, key, childCbs[key]);\n });\n }\n\n function runSelectEffect(_ref7, cb) {\n var selector = _ref7.selector,\n args = _ref7.args;\n\n try {\n var state = selector.apply(undefined, [getState()].concat(args));\n cb(state);\n } catch (error) {\n cb(error, true);\n }\n }\n\n function runChannelEffect(_ref8, cb) {\n var pattern = _ref8.pattern,\n buffer = _ref8.buffer;\n var match = matcher(pattern);\n match.pattern = pattern;\n cb(eventChannel(subscribe, buffer || buffers.fixed(), match));\n }\n\n function runCancelledEffect(data, cb) {\n cb(!!mainTask.isCancelled);\n }\n\n function runFlushEffect(channel, cb) {\n channel.flush(cb);\n }\n\n function runGetContextEffect(prop, cb) {\n cb(taskContext[prop]);\n }\n\n function runSetContextEffect(props, cb) {\n object.assign(taskContext, props);\n cb();\n }\n\n function newTask(id, name, iterator, cont) {\n var _done, _ref9, _mutatorMap;\n\n iterator._deferredEnd = null;\n return _ref9 = {}, _ref9[TASK] = true, _ref9.id = id, _ref9.name = name, _done = 'done', _mutatorMap = {}, _mutatorMap[_done] = _mutatorMap[_done] || {}, _mutatorMap[_done].get = function () {\n if (iterator._deferredEnd) {\n return iterator._deferredEnd.promise;\n } else {\n var def = deferred();\n iterator._deferredEnd = def;\n\n if (!iterator._isRunning) {\n iterator._error ? def.reject(iterator._error) : def.resolve(iterator._result);\n }\n\n return def.promise;\n }\n }, _ref9.cont = cont, _ref9.joiners = [], _ref9.cancel = cancel, _ref9.isRunning = function isRunning() {\n return iterator._isRunning;\n }, _ref9.isCancelled = function isCancelled() {\n return iterator._isCancelled;\n }, _ref9.isAborted = function isAborted() {\n return iterator._isAborted;\n }, _ref9.result = function result() {\n return iterator._result;\n }, _ref9.error = function error() {\n return iterator._error;\n }, _ref9.setContext = function setContext(props) {\n check(props, is.object, createSetContextWarning('task', props));\n object.assign(taskContext, props);\n }, _defineEnumerableProperties(_ref9, _mutatorMap), _ref9;\n }\n}","import { is, check, uid as nextSagaId, wrapSagaDispatch, noop, log } from './utils';\nimport proc from './proc';\nvar RUN_SAGA_SIGNATURE = 'runSaga(storeInterface, saga, ...args)';\nvar NON_GENERATOR_ERR = RUN_SAGA_SIGNATURE + ': saga argument must be a Generator function!';\nexport function runSaga(storeInterface, saga) {\n for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n\n var iterator = void 0;\n\n if (is.iterator(storeInterface)) {\n if (process.env.NODE_ENV === 'development') {\n log('warn', 'runSaga(iterator, storeInterface) has been deprecated in favor of ' + RUN_SAGA_SIGNATURE);\n }\n\n iterator = storeInterface;\n storeInterface = saga;\n } else {\n check(saga, is.func, NON_GENERATOR_ERR);\n iterator = saga.apply(undefined, args);\n check(iterator, is.iterator, NON_GENERATOR_ERR);\n }\n\n var _storeInterface = storeInterface,\n subscribe = _storeInterface.subscribe,\n dispatch = _storeInterface.dispatch,\n getState = _storeInterface.getState,\n context = _storeInterface.context,\n sagaMonitor = _storeInterface.sagaMonitor,\n logger = _storeInterface.logger,\n onError = _storeInterface.onError;\n var effectId = nextSagaId();\n\n if (sagaMonitor) {\n // monitors are expected to have a certain interface, let's fill-in any missing ones\n sagaMonitor.effectTriggered = sagaMonitor.effectTriggered || noop;\n sagaMonitor.effectResolved = sagaMonitor.effectResolved || noop;\n sagaMonitor.effectRejected = sagaMonitor.effectRejected || noop;\n sagaMonitor.effectCancelled = sagaMonitor.effectCancelled || noop;\n sagaMonitor.actionDispatched = sagaMonitor.actionDispatched || noop;\n sagaMonitor.effectTriggered({\n effectId: effectId,\n root: true,\n parentEffectId: 0,\n effect: {\n root: true,\n saga: saga,\n args: args\n }\n });\n }\n\n var task = proc(iterator, subscribe, wrapSagaDispatch(dispatch), getState, context, {\n sagaMonitor: sagaMonitor,\n logger: logger,\n onError: onError\n }, effectId, saga.name);\n\n if (sagaMonitor) {\n sagaMonitor.effectResolved(effectId, task);\n }\n\n return task;\n}","import middleware from './internal/middleware';\nexport default middleware;\nexport { runSaga } from './internal/runSaga';\nexport { END, eventChannel, channel } from './internal/channel';\nexport { buffers } from './internal/buffers';\nexport { takeEvery, takeLatest, throttle } from './internal/sagaHelpers';\nexport { delay, CANCEL } from './internal/utils';\nexport { detach } from './internal/io';\nimport * as effects from './effects';\nimport * as utils from './utils';\nexport { effects, utils };","function _objectWithoutProperties(obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n}\n\nimport { is, check, object, createSetContextWarning } from './utils';\nimport { emitter } from './channel';\nimport { ident } from './utils';\nimport { runSaga } from './runSaga';\nexport default function sagaMiddlewareFactory() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var _ref$context = _ref.context,\n context = _ref$context === undefined ? {} : _ref$context,\n options = _objectWithoutProperties(_ref, ['context']);\n\n var sagaMonitor = options.sagaMonitor,\n logger = options.logger,\n onError = options.onError;\n\n if (is.func(options)) {\n if (process.env.NODE_ENV === 'production') {\n throw new Error('Saga middleware no longer accept Generator functions. Use sagaMiddleware.run instead');\n } else {\n throw new Error('You passed a function to the Saga middleware. You are likely trying to start a Saga by directly passing it to the middleware. This is no longer possible starting from 0.10.0. To run a Saga, you must do it dynamically AFTER mounting the middleware into the store.\\n Example:\\n import createSagaMiddleware from \\'redux-saga\\'\\n ... other imports\\n\\n const sagaMiddleware = createSagaMiddleware()\\n const store = createStore(reducer, applyMiddleware(sagaMiddleware))\\n sagaMiddleware.run(saga, ...args)\\n ');\n }\n }\n\n if (logger && !is.func(logger)) {\n throw new Error('`options.logger` passed to the Saga middleware is not a function!');\n }\n\n if (process.env.NODE_ENV === 'development' && options.onerror) {\n throw new Error('`options.onerror` was removed. Use `options.onError` instead.');\n }\n\n if (onError && !is.func(onError)) {\n throw new Error('`options.onError` passed to the Saga middleware is not a function!');\n }\n\n if (options.emitter && !is.func(options.emitter)) {\n throw new Error('`options.emitter` passed to the Saga middleware is not a function!');\n }\n\n function sagaMiddleware(_ref2) {\n var getState = _ref2.getState,\n dispatch = _ref2.dispatch;\n var sagaEmitter = emitter();\n sagaEmitter.emit = (options.emitter || ident)(sagaEmitter.emit);\n sagaMiddleware.run = runSaga.bind(null, {\n context: context,\n subscribe: sagaEmitter.subscribe,\n dispatch: dispatch,\n getState: getState,\n sagaMonitor: sagaMonitor,\n logger: logger,\n onError: onError\n });\n return function (next) {\n return function (action) {\n if (sagaMonitor && sagaMonitor.actionDispatched) {\n sagaMonitor.actionDispatched(action);\n }\n\n var result = next(action); // hit reducers\n\n sagaEmitter.emit(action);\n return result;\n };\n };\n }\n\n sagaMiddleware.run = function () {\n throw new Error('Before running a Saga, you must mount the Saga middleware on the Store using applyMiddleware');\n };\n\n sagaMiddleware.setContext = function (props) {\n check(props, is.object, createSetContextWarning('sagaMiddleware', props));\n object.assign(context, props);\n };\n\n return sagaMiddleware;\n}","import { useEffect, useRef } from 'react';\n/**\n * Creates a `Ref` whose value is updated in an effect, ensuring the most recent\n * value is the one rendered with. Generally only required for Concurrent mode usage\n * where previous work in `render()` may be discarded befor being used.\n *\n * This is safe to access in an event handler.\n *\n * @param value The `Ref` value\n */\n\nfunction useCommittedRef(value) {\n var ref = useRef(value);\n useEffect(function () {\n ref.current = value;\n }, [value]);\n return ref;\n}\n\nexport default useCommittedRef;","import { useCallback } from 'react';\nimport useCommittedRef from './useCommittedRef';\nexport default function useEventCallback(fn) {\n var ref = useCommittedRef(fn);\n return useCallback(function () {\n return ref.current && ref.current.apply(ref, arguments);\n }, [ref]);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nvar DEVICE_SIZES = ['xl', 'lg', 'md', 'sm', 'xs'];\nvar defaultProps = {\n noGutters: false\n};\nvar Row = React.forwardRef(function (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n className = _ref.className,\n noGutters = _ref.noGutters,\n _ref$as = _ref.as,\n Component = _ref$as === void 0 ? 'div' : _ref$as,\n props = _objectWithoutPropertiesLoose(_ref, [\"bsPrefix\", \"className\", \"noGutters\", \"as\"]);\n\n var decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'row');\n var sizePrefix = decoratedBsPrefix + \"-cols\";\n var classes = [];\n DEVICE_SIZES.forEach(function (brkPoint) {\n var propValue = props[brkPoint];\n delete props[brkPoint];\n var cols;\n\n if (propValue != null && typeof propValue === 'object') {\n cols = propValue.cols;\n } else {\n cols = propValue;\n }\n\n var infix = brkPoint !== 'xs' ? \"-\" + brkPoint : '';\n if (cols != null) classes.push(\"\" + sizePrefix + infix + \"-\" + cols);\n });\n return (\n /*#__PURE__*/\n React.createElement(Component, _extends({\n ref: ref\n }, props, {\n className: classNames.apply(void 0, [className, decoratedBsPrefix, noGutters && 'no-gutters'].concat(classes))\n }))\n );\n});\nRow.displayName = 'Row';\nRow.defaultProps = defaultProps;\nexport default Row;","/* eslint-disable @typescript-eslint/explicit-function-return-type */\n\n/* eslint-disable @typescript-eslint/typedef */\n\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { isThenable } from './is';\n/** SyncPromise internal states */\n\nvar States;\n\n(function (States) {\n /** Pending */\n States[\"PENDING\"] = \"PENDING\";\n /** Resolved / OK */\n\n States[\"RESOLVED\"] = \"RESOLVED\";\n /** Rejected / Error */\n\n States[\"REJECTED\"] = \"REJECTED\";\n})(States || (States = {}));\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\n\n\nvar SyncPromise =\n/** @class */\nfunction () {\n function SyncPromise(executor) {\n var _this = this;\n\n this._state = States.PENDING;\n this._handlers = [];\n /** JSDoc */\n\n this._resolve = function (value) {\n _this._setResult(States.RESOLVED, value);\n };\n /** JSDoc */\n\n\n this._reject = function (reason) {\n _this._setResult(States.REJECTED, reason);\n };\n /** JSDoc */\n\n\n this._setResult = function (state, value) {\n if (_this._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n value.then(_this._resolve, _this._reject);\n return;\n }\n\n _this._state = state;\n _this._value = value;\n\n _this._executeHandlers();\n }; // TODO: FIXME\n\n /** JSDoc */\n\n\n this._attachHandler = function (handler) {\n _this._handlers = _this._handlers.concat(handler);\n\n _this._executeHandlers();\n };\n /** JSDoc */\n\n\n this._executeHandlers = function () {\n if (_this._state === States.PENDING) {\n return;\n }\n\n var cachedHandlers = _this._handlers.slice();\n\n _this._handlers = [];\n cachedHandlers.forEach(function (handler) {\n if (handler.done) {\n return;\n }\n\n if (_this._state === States.RESOLVED) {\n if (handler.onfulfilled) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n handler.onfulfilled(_this._value);\n }\n }\n\n if (_this._state === States.REJECTED) {\n if (handler.onrejected) {\n handler.onrejected(_this._value);\n }\n }\n\n handler.done = true;\n });\n };\n\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n /** JSDoc */\n\n\n SyncPromise.resolve = function (value) {\n return new SyncPromise(function (resolve) {\n resolve(value);\n });\n };\n /** JSDoc */\n\n\n SyncPromise.reject = function (reason) {\n return new SyncPromise(function (_, reject) {\n reject(reason);\n });\n };\n /** JSDoc */\n\n\n SyncPromise.all = function (collection) {\n return new SyncPromise(function (resolve, reject) {\n if (!Array.isArray(collection)) {\n reject(new TypeError(\"Promise.all requires an array as input.\"));\n return;\n }\n\n if (collection.length === 0) {\n resolve([]);\n return;\n }\n\n var counter = collection.length;\n var resolvedCollection = [];\n collection.forEach(function (item, index) {\n SyncPromise.resolve(item).then(function (value) {\n resolvedCollection[index] = value;\n counter -= 1;\n\n if (counter !== 0) {\n return;\n }\n\n resolve(resolvedCollection);\n }).then(null, reject);\n });\n });\n };\n /** JSDoc */\n\n\n SyncPromise.prototype.then = function (_onfulfilled, _onrejected) {\n var _this = this;\n\n return new SyncPromise(function (resolve, reject) {\n _this._attachHandler({\n done: false,\n onfulfilled: function onfulfilled(result) {\n if (!_onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result);\n return;\n }\n\n try {\n resolve(_onfulfilled(result));\n return;\n } catch (e) {\n reject(e);\n return;\n }\n },\n onrejected: function onrejected(reason) {\n if (!_onrejected) {\n reject(reason);\n return;\n }\n\n try {\n resolve(_onrejected(reason));\n return;\n } catch (e) {\n reject(e);\n return;\n }\n }\n });\n });\n };\n /** JSDoc */\n\n\n SyncPromise.prototype.catch = function (onrejected) {\n return this.then(function (val) {\n return val;\n }, onrejected);\n };\n /** JSDoc */\n\n\n SyncPromise.prototype.finally = function (onfinally) {\n var _this = this;\n\n return new SyncPromise(function (resolve, reject) {\n var val;\n var isRejected;\n return _this.then(function (value) {\n isRejected = false;\n val = value;\n\n if (onfinally) {\n onfinally();\n }\n }, function (reason) {\n isRejected = true;\n val = reason;\n\n if (onfinally) {\n onfinally();\n }\n }).then(function () {\n if (isRejected) {\n reject(val);\n return;\n }\n\n resolve(val);\n });\n });\n };\n /** JSDoc */\n\n\n SyncPromise.prototype.toString = function () {\n return '[object SyncPromise]';\n };\n\n return SyncPromise;\n}();\n\nexport { SyncPromise };","/* eslint-disable no-return-assign */\nimport canUseDOM from './canUseDOM';\nexport var optionsSupported = false;\nexport var onceSupported = false;\n\ntry {\n var options = {\n get passive() {\n return optionsSupported = true;\n },\n\n get once() {\n // eslint-disable-next-line no-multi-assign\n return onceSupported = optionsSupported = true;\n }\n\n };\n\n if (canUseDOM) {\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, true);\n }\n} catch (e) {}\n/* */\n\n/**\n * An `addEventListener` ponyfill, supports the `once` option\n */\n\n\nfunction addEventListener(node, eventName, handler, options) {\n if (options && typeof options !== 'boolean' && !onceSupported) {\n var once = options.once,\n capture = options.capture;\n var wrappedHandler = handler;\n\n if (!onceSupported && once) {\n wrappedHandler = handler.__once || function onceHandler(event) {\n this.removeEventListener(eventName, onceHandler, capture);\n handler.call(this, event);\n };\n\n handler.__once = wrappedHandler;\n }\n\n node.addEventListener(eventName, wrappedHandler, optionsSupported ? options : capture);\n }\n\n node.addEventListener(eventName, handler, options);\n}\n\nexport default addEventListener;","function removeEventListener(node, eventName, handler, options) {\n var capture = options && typeof options !== 'boolean' ? options.capture : options;\n node.removeEventListener(eventName, handler, capture);\n\n if (handler.__once) {\n node.removeEventListener(eventName, handler.__once, capture);\n }\n}\n\nexport default removeEventListener;","import addEventListener from './addEventListener';\nimport removeEventListener from './removeEventListener';\n\nfunction listen(node, eventName, handler, options) {\n addEventListener(node, eventName, handler, options);\n return function () {\n removeEventListener(node, eventName, handler, options);\n };\n}\n\nexport default listen;","import { SessionStatus } from '@sentry/types';\nimport { dropUndefinedKeys, uuid4 } from '@sentry/utils';\n/**\n * @inheritdoc\n */\n\nvar Session =\n/** @class */\nfunction () {\n function Session(context) {\n this.errors = 0;\n this.sid = uuid4();\n this.timestamp = Date.now();\n this.started = Date.now();\n this.duration = 0;\n this.status = SessionStatus.Ok;\n\n if (context) {\n this.update(context);\n }\n }\n /** JSDoc */\n // eslint-disable-next-line complexity\n\n\n Session.prototype.update = function (context) {\n if (context === void 0) {\n context = {};\n }\n\n if (context.user) {\n if (context.user.ip_address) {\n this.ipAddress = context.user.ip_address;\n }\n\n if (!context.did) {\n this.did = context.user.id || context.user.email || context.user.username;\n }\n }\n\n this.timestamp = context.timestamp || Date.now();\n\n if (context.sid) {\n // Good enough uuid validation. — Kamil\n this.sid = context.sid.length === 32 ? context.sid : uuid4();\n }\n\n if (context.did) {\n this.did = \"\" + context.did;\n }\n\n if (typeof context.started === 'number') {\n this.started = context.started;\n }\n\n if (typeof context.duration === 'number') {\n this.duration = context.duration;\n } else {\n this.duration = this.timestamp - this.started;\n }\n\n if (context.release) {\n this.release = context.release;\n }\n\n if (context.environment) {\n this.environment = context.environment;\n }\n\n if (context.ipAddress) {\n this.ipAddress = context.ipAddress;\n }\n\n if (context.userAgent) {\n this.userAgent = context.userAgent;\n }\n\n if (typeof context.errors === 'number') {\n this.errors = context.errors;\n }\n\n if (context.status) {\n this.status = context.status;\n }\n };\n /** JSDoc */\n\n\n Session.prototype.close = function (status) {\n if (status) {\n this.update({\n status: status\n });\n } else if (this.status === SessionStatus.Ok) {\n this.update({\n status: SessionStatus.Exited\n });\n } else {\n this.update();\n }\n };\n /** JSDoc */\n\n\n Session.prototype.toJSON = function () {\n return dropUndefinedKeys({\n sid: \"\" + this.sid,\n init: true,\n started: new Date(this.started).toISOString(),\n timestamp: new Date(this.timestamp).toISOString(),\n status: this.status,\n errors: this.errors,\n did: typeof this.did === 'number' || typeof this.did === 'string' ? \"\" + this.did : undefined,\n duration: this.duration,\n attrs: dropUndefinedKeys({\n release: this.release,\n environment: this.environment,\n ip_address: this.ipAddress,\n user_agent: this.userAgent\n })\n });\n };\n\n return Session;\n}();\n\nexport { Session };","import { __assign, __read, __spread } from \"tslib\";\nimport { consoleSandbox, dateTimestampInSeconds, getGlobalObject, isNodeEnv, logger, uuid4 } from '@sentry/utils';\nimport { Scope } from './scope';\nimport { Session } from './session';\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be increased when the global interface\n * changes and new methods are introduced.\n *\n * @hidden\n */\n\nexport var API_VERSION = 3;\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\n\nvar DEFAULT_BREADCRUMBS = 100;\n/**\n * Absolute maximum number of breadcrumbs added to an event. The\n * `maxBreadcrumbs` option cannot be higher than this value.\n */\n\nvar MAX_BREADCRUMBS = 100;\n/**\n * @inheritDoc\n */\n\nvar Hub =\n/** @class */\nfunction () {\n /**\n * Creates a new instance of the hub, will push one {@link Layer} into the\n * internal stack on creation.\n *\n * @param client bound to the hub.\n * @param scope bound to the hub.\n * @param version number, higher number means higher priority.\n */\n function Hub(client, scope, _version) {\n if (scope === void 0) {\n scope = new Scope();\n }\n\n if (_version === void 0) {\n _version = API_VERSION;\n }\n\n this._version = _version;\n /** Is a {@link Layer}[] containing the client and scope */\n\n this._stack = [{}];\n this.getStackTop().scope = scope;\n this.bindClient(client);\n }\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.isOlderThan = function (version) {\n return this._version < version;\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.bindClient = function (client) {\n var top = this.getStackTop();\n top.client = client;\n\n if (client && client.setupIntegrations) {\n client.setupIntegrations();\n }\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.pushScope = function () {\n // We want to clone the content of prev scope\n var scope = Scope.clone(this.getScope());\n this.getStack().push({\n client: this.getClient(),\n scope: scope\n });\n return scope;\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.popScope = function () {\n if (this.getStack().length <= 1) return false;\n return !!this.getStack().pop();\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.withScope = function (callback) {\n var scope = this.pushScope();\n\n try {\n callback(scope);\n } finally {\n this.popScope();\n }\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.getClient = function () {\n return this.getStackTop().client;\n };\n /** Returns the scope of the top stack. */\n\n\n Hub.prototype.getScope = function () {\n return this.getStackTop().scope;\n };\n /** Returns the scope stack for domains or the process. */\n\n\n Hub.prototype.getStack = function () {\n return this._stack;\n };\n /** Returns the topmost scope layer in the order domain > local > process. */\n\n\n Hub.prototype.getStackTop = function () {\n return this._stack[this._stack.length - 1];\n };\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n\n\n Hub.prototype.captureException = function (exception, hint) {\n var eventId = this._lastEventId = uuid4();\n var finalHint = hint; // If there's no explicit hint provided, mimick the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n\n if (!hint) {\n var syntheticException = void 0;\n\n try {\n throw new Error('Sentry syntheticException');\n } catch (exception) {\n syntheticException = exception;\n }\n\n finalHint = {\n originalException: exception,\n syntheticException: syntheticException\n };\n }\n\n this._invokeClient('captureException', exception, __assign(__assign({}, finalHint), {\n event_id: eventId\n }));\n\n return eventId;\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.captureMessage = function (message, level, hint) {\n var eventId = this._lastEventId = uuid4();\n var finalHint = hint; // If there's no explicit hint provided, mimick the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n\n if (!hint) {\n var syntheticException = void 0;\n\n try {\n throw new Error(message);\n } catch (exception) {\n syntheticException = exception;\n }\n\n finalHint = {\n originalException: message,\n syntheticException: syntheticException\n };\n }\n\n this._invokeClient('captureMessage', message, level, __assign(__assign({}, finalHint), {\n event_id: eventId\n }));\n\n return eventId;\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.captureEvent = function (event, hint) {\n var eventId = this._lastEventId = uuid4();\n\n this._invokeClient('captureEvent', event, __assign(__assign({}, hint), {\n event_id: eventId\n }));\n\n return eventId;\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.lastEventId = function () {\n return this._lastEventId;\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.addBreadcrumb = function (breadcrumb, hint) {\n var _a = this.getStackTop(),\n scope = _a.scope,\n client = _a.client;\n\n if (!scope || !client) return; // eslint-disable-next-line @typescript-eslint/unbound-method\n\n var _b = client.getOptions && client.getOptions() || {},\n _c = _b.beforeBreadcrumb,\n beforeBreadcrumb = _c === void 0 ? null : _c,\n _d = _b.maxBreadcrumbs,\n maxBreadcrumbs = _d === void 0 ? DEFAULT_BREADCRUMBS : _d;\n\n if (maxBreadcrumbs <= 0) return;\n var timestamp = dateTimestampInSeconds();\n\n var mergedBreadcrumb = __assign({\n timestamp: timestamp\n }, breadcrumb);\n\n var finalBreadcrumb = beforeBreadcrumb ? consoleSandbox(function () {\n return beforeBreadcrumb(mergedBreadcrumb, hint);\n }) : mergedBreadcrumb;\n if (finalBreadcrumb === null) return;\n scope.addBreadcrumb(finalBreadcrumb, Math.min(maxBreadcrumbs, MAX_BREADCRUMBS));\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.setUser = function (user) {\n var scope = this.getScope();\n if (scope) scope.setUser(user);\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.setTags = function (tags) {\n var scope = this.getScope();\n if (scope) scope.setTags(tags);\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.setExtras = function (extras) {\n var scope = this.getScope();\n if (scope) scope.setExtras(extras);\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.setTag = function (key, value) {\n var scope = this.getScope();\n if (scope) scope.setTag(key, value);\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.setExtra = function (key, extra) {\n var scope = this.getScope();\n if (scope) scope.setExtra(key, extra);\n };\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\n Hub.prototype.setContext = function (name, context) {\n var scope = this.getScope();\n if (scope) scope.setContext(name, context);\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.configureScope = function (callback) {\n var _a = this.getStackTop(),\n scope = _a.scope,\n client = _a.client;\n\n if (scope && client) {\n callback(scope);\n }\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.run = function (callback) {\n var oldHub = makeMain(this);\n\n try {\n callback(this);\n } finally {\n makeMain(oldHub);\n }\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.getIntegration = function (integration) {\n var client = this.getClient();\n if (!client) return null;\n\n try {\n return client.getIntegration(integration);\n } catch (_oO) {\n logger.warn(\"Cannot retrieve integration \" + integration.id + \" from the current Hub\");\n return null;\n }\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.startSpan = function (context) {\n return this._callExtensionMethod('startSpan', context);\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.startTransaction = function (context, customSamplingContext) {\n return this._callExtensionMethod('startTransaction', context, customSamplingContext);\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.traceHeaders = function () {\n return this._callExtensionMethod('traceHeaders');\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.startSession = function (context) {\n // End existing session if there's one\n this.endSession();\n\n var _a = this.getStackTop(),\n scope = _a.scope,\n client = _a.client;\n\n var _b = client && client.getOptions() || {},\n release = _b.release,\n environment = _b.environment;\n\n var session = new Session(__assign(__assign({\n release: release,\n environment: environment\n }, scope && {\n user: scope.getUser()\n }), context));\n\n if (scope) {\n scope.setSession(session);\n }\n\n return session;\n };\n /**\n * @inheritDoc\n */\n\n\n Hub.prototype.endSession = function () {\n var _a = this.getStackTop(),\n scope = _a.scope,\n client = _a.client;\n\n if (!scope) return;\n var session = scope.getSession && scope.getSession();\n\n if (session) {\n session.close();\n\n if (client && client.captureSession) {\n client.captureSession(session);\n }\n\n scope.setSession();\n }\n };\n /**\n * Internal helper function to call a method on the top client if it exists.\n *\n * @param method The method to call on the client.\n * @param args Arguments to pass to the client function.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\n Hub.prototype._invokeClient = function (method) {\n var _a;\n\n var args = [];\n\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n\n var _b = this.getStackTop(),\n scope = _b.scope,\n client = _b.client;\n\n if (client && client[method]) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n (_a = client)[method].apply(_a, __spread(args, [scope]));\n }\n };\n /**\n * Calls global extension method and binding current instance to the function call\n */\n // @ts-ignore Function lacks ending return statement and return type does not include 'undefined'. ts(2366)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\n Hub.prototype._callExtensionMethod = function (method) {\n var args = [];\n\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n\n var carrier = getMainCarrier();\n var sentry = carrier.__SENTRY__;\n\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n return sentry.extensions[method].apply(this, args);\n }\n\n logger.warn(\"Extension method \" + method + \" couldn't be found, doing nothing.\");\n };\n\n return Hub;\n}();\n\nexport { Hub };\n/** Returns the global shim registry. */\n\nexport function getMainCarrier() {\n var carrier = getGlobalObject();\n carrier.__SENTRY__ = carrier.__SENTRY__ || {\n extensions: {},\n hub: undefined\n };\n return carrier;\n}\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n */\n\nexport function makeMain(hub) {\n var registry = getMainCarrier();\n var oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n */\n\nexport function getCurrentHub() {\n // Get main carrier (global for every environment)\n var registry = getMainCarrier(); // If there's no hub, or its an old API, assign a new one\n\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n } // Prefer domains over global if they are there (applicable only to Node environment)\n\n\n if (isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n } // Return hub that lives on a global object\n\n\n return getHubFromCarrier(registry);\n}\n/**\n * Returns the active domain, if one exists\n *\n * @returns The domain, or undefined if there is no active domain\n */\n\nexport function getActiveDomain() {\n var sentry = getMainCarrier().__SENTRY__;\n\n return sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n}\n/**\n * Try to read the hub from an active domain, and fallback to the registry if one doesn't exist\n * @returns discovered hub\n */\n\nfunction getHubFromActiveDomain(registry) {\n try {\n var activeDomain = getActiveDomain(); // If there's no active domain, just return global hub\n\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n } // If there's no hub on current domain, or it's an old API, assign a new one\n\n\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n } // Return hub that lives on a domain\n\n\n return getHubFromCarrier(activeDomain);\n } catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\n\n\nfunction hasHubOnCarrier(carrier) {\n return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n}\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\n\n\nexport function getHubFromCarrier(carrier) {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) return carrier.__SENTRY__.hub;\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = new Hub();\n return carrier.__SENTRY__.hub;\n}\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n */\n\nexport function setHubOnCarrier(carrier, hub) {\n if (!carrier) return false;\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = hub;\n return true;\n}","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n/* eslint-disable no-proto */\n'use strict';\n\nvar base64 = require('base64-js');\n\nvar ieee754 = require('ieee754');\n\nvar isArray = require('isarray');\n\nexports.Buffer = Buffer;\nexports.SlowBuffer = SlowBuffer;\nexports.INSPECT_MAX_BYTES = 50;\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\n\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined ? global.TYPED_ARRAY_SUPPORT : typedArraySupport();\n/*\n * Export kMaxLength after typed array support is determined.\n */\n\nexports.kMaxLength = kMaxLength();\n\nfunction typedArraySupport() {\n try {\n var arr = new Uint8Array(1);\n arr.__proto__ = {\n __proto__: Uint8Array.prototype,\n foo: function foo() {\n return 42;\n }\n };\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0; // ie10 has broken `subarray`\n } catch (e) {\n return false;\n }\n}\n\nfunction kMaxLength() {\n return Buffer.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff;\n}\n\nfunction createBuffer(that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length');\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length);\n that.__proto__ = Buffer.prototype;\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length);\n }\n\n that.length = length;\n }\n\n return that;\n}\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\n\nfunction Buffer(arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length);\n } // Common case.\n\n\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error('If encoding is specified then the first argument must be a string');\n }\n\n return allocUnsafe(this, arg);\n }\n\n return from(this, arg, encodingOrOffset, length);\n}\n\nBuffer.poolSize = 8192; // not used by this implementation\n// TODO: Legacy, not needed anymore. Remove in next major version.\n\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype;\n return arr;\n};\n\nfunction from(that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number');\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length);\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset);\n }\n\n return fromObject(that, value);\n}\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\n\n\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length);\n};\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype;\n Buffer.__proto__ = Uint8Array;\n\n if (typeof Symbol !== 'undefined' && Symbol.species && Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n });\n }\n}\n\nfunction assertSize(size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number');\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative');\n }\n}\n\nfunction alloc(that, size, fill, encoding) {\n assertSize(size);\n\n if (size <= 0) {\n return createBuffer(that, size);\n }\n\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string' ? createBuffer(that, size).fill(fill, encoding) : createBuffer(that, size).fill(fill);\n }\n\n return createBuffer(that, size);\n}\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\n\n\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding);\n};\n\nfunction allocUnsafe(that, size) {\n assertSize(size);\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0);\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0;\n }\n }\n\n return that;\n}\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\n\n\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size);\n};\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\n\n\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size);\n};\n\nfunction fromString(that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8';\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding');\n }\n\n var length = byteLength(string, encoding) | 0;\n that = createBuffer(that, length);\n var actual = that.write(string, encoding);\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual);\n }\n\n return that;\n}\n\nfunction fromArrayLike(that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0;\n that = createBuffer(that, length);\n\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255;\n }\n\n return that;\n}\n\nfunction fromArrayBuffer(that, array, byteOffset, length) {\n array.byteLength; // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds');\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds');\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array);\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset);\n } else {\n array = new Uint8Array(array, byteOffset, length);\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array;\n that.__proto__ = Buffer.prototype;\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array);\n }\n\n return that;\n}\n\nfunction fromObject(that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0;\n that = createBuffer(that, len);\n\n if (that.length === 0) {\n return that;\n }\n\n obj.copy(that, 0, 0, len);\n return that;\n }\n\n if (obj) {\n if (typeof ArrayBuffer !== 'undefined' && obj.buffer instanceof ArrayBuffer || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0);\n }\n\n return fromArrayLike(that, obj);\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data);\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.');\n}\n\nfunction checked(length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength().toString(16) + ' bytes');\n }\n\n return length | 0;\n}\n\nfunction SlowBuffer(length) {\n if (+length != length) {\n // eslint-disable-line eqeqeq\n length = 0;\n }\n\n return Buffer.alloc(+length);\n}\n\nBuffer.isBuffer = function isBuffer(b) {\n return !!(b != null && b._isBuffer);\n};\n\nBuffer.compare = function compare(a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers');\n }\n\n if (a === b) return 0;\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) return -1;\n if (y < x) return 1;\n return 0;\n};\n\nBuffer.isEncoding = function isEncoding(encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true;\n\n default:\n return false;\n }\n};\n\nBuffer.concat = function concat(list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0);\n }\n\n var i;\n\n if (length === undefined) {\n length = 0;\n\n for (i = 0; i < list.length; ++i) {\n length += list[i].length;\n }\n }\n\n var buffer = Buffer.allocUnsafe(length);\n var pos = 0;\n\n for (i = 0; i < list.length; ++i) {\n var buf = list[i];\n\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n }\n\n buf.copy(buffer, pos);\n pos += buf.length;\n }\n\n return buffer;\n};\n\nfunction byteLength(string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length;\n }\n\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength;\n }\n\n if (typeof string !== 'string') {\n string = '' + string;\n }\n\n var len = string.length;\n if (len === 0) return 0; // Use a for loop to avoid recursion\n\n var loweredCase = false;\n\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len;\n\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length;\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2;\n\n case 'hex':\n return len >>> 1;\n\n case 'base64':\n return base64ToBytes(string).length;\n\n default:\n if (loweredCase) return utf8ToBytes(string).length; // assume utf8\n\n encoding = ('' + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n}\n\nBuffer.byteLength = byteLength;\n\nfunction slowToString(encoding, start, end) {\n var loweredCase = false; // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n\n if (start === undefined || start < 0) {\n start = 0;\n } // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n\n\n if (start > this.length) {\n return '';\n }\n\n if (end === undefined || end > this.length) {\n end = this.length;\n }\n\n if (end <= 0) {\n return '';\n } // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n\n\n end >>>= 0;\n start >>>= 0;\n\n if (end <= start) {\n return '';\n }\n\n if (!encoding) encoding = 'utf8';\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end);\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end);\n\n case 'ascii':\n return asciiSlice(this, start, end);\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end);\n\n case 'base64':\n return base64Slice(this, start, end);\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end);\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);\n encoding = (encoding + '').toLowerCase();\n loweredCase = true;\n }\n }\n} // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\n\n\nBuffer.prototype._isBuffer = true;\n\nfunction swap(b, n, m) {\n var i = b[n];\n b[n] = b[m];\n b[m] = i;\n}\n\nBuffer.prototype.swap16 = function swap16() {\n var len = this.length;\n\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits');\n }\n\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1);\n }\n\n return this;\n};\n\nBuffer.prototype.swap32 = function swap32() {\n var len = this.length;\n\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits');\n }\n\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3);\n swap(this, i + 1, i + 2);\n }\n\n return this;\n};\n\nBuffer.prototype.swap64 = function swap64() {\n var len = this.length;\n\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits');\n }\n\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7);\n swap(this, i + 1, i + 6);\n swap(this, i + 2, i + 5);\n swap(this, i + 3, i + 4);\n }\n\n return this;\n};\n\nBuffer.prototype.toString = function toString() {\n var length = this.length | 0;\n if (length === 0) return '';\n if (arguments.length === 0) return utf8Slice(this, 0, length);\n return slowToString.apply(this, arguments);\n};\n\nBuffer.prototype.equals = function equals(b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer');\n if (this === b) return true;\n return Buffer.compare(this, b) === 0;\n};\n\nBuffer.prototype.inspect = function inspect() {\n var str = '';\n var max = exports.INSPECT_MAX_BYTES;\n\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ');\n if (this.length > max) str += ' ... ';\n }\n\n return '';\n};\n\nBuffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer');\n }\n\n if (start === undefined) {\n start = 0;\n }\n\n if (end === undefined) {\n end = target ? target.length : 0;\n }\n\n if (thisStart === undefined) {\n thisStart = 0;\n }\n\n if (thisEnd === undefined) {\n thisEnd = this.length;\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index');\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0;\n }\n\n if (thisStart >= thisEnd) {\n return -1;\n }\n\n if (start >= end) {\n return 1;\n }\n\n start >>>= 0;\n end >>>= 0;\n thisStart >>>= 0;\n thisEnd >>>= 0;\n if (this === target) return 0;\n var x = thisEnd - thisStart;\n var y = end - start;\n var len = Math.min(x, y);\n var thisCopy = this.slice(thisStart, thisEnd);\n var targetCopy = target.slice(start, end);\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i];\n y = targetCopy[i];\n break;\n }\n }\n\n if (x < y) return -1;\n if (y < x) return 1;\n return 0;\n}; // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\n\n\nfunction bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1; // Normalize byteOffset\n\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff;\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000;\n }\n\n byteOffset = +byteOffset; // Coerce to Number.\n\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : buffer.length - 1;\n } // Normalize byteOffset: negative offsets start from the end of the buffer\n\n\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n\n if (byteOffset >= buffer.length) {\n if (dir) return -1;else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;else return -1;\n } // Normalize val\n\n\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding);\n } // Finally, search either indexOf (if dir is true) or lastIndexOf\n\n\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1;\n }\n\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir);\n } else if (typeof val === 'number') {\n val = val & 0xFF; // Search for a byte value [0-255]\n\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);\n }\n }\n\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);\n }\n\n throw new TypeError('val must be string, number or Buffer');\n}\n\nfunction arrayIndexOf(arr, val, byteOffset, encoding, dir) {\n var indexSize = 1;\n var arrLength = arr.length;\n var valLength = val.length;\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase();\n\n if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1;\n }\n\n indexSize = 2;\n arrLength /= 2;\n valLength /= 2;\n byteOffset /= 2;\n }\n }\n\n function read(buf, i) {\n if (indexSize === 1) {\n return buf[i];\n } else {\n return buf.readUInt16BE(i * indexSize);\n }\n }\n\n var i;\n\n if (dir) {\n var foundIndex = -1;\n\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i;\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;\n } else {\n if (foundIndex !== -1) i -= i - foundIndex;\n foundIndex = -1;\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;\n\n for (i = byteOffset; i >= 0; i--) {\n var found = true;\n\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false;\n break;\n }\n }\n\n if (found) return i;\n }\n }\n\n return -1;\n}\n\nBuffer.prototype.includes = function includes(val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1;\n};\n\nBuffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true);\n};\n\nBuffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false);\n};\n\nfunction hexWrite(buf, string, offset, length) {\n offset = Number(offset) || 0;\n var remaining = buf.length - offset;\n\n if (!length) {\n length = remaining;\n } else {\n length = Number(length);\n\n if (length > remaining) {\n length = remaining;\n }\n } // must be an even number of digits\n\n\n var strLen = string.length;\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string');\n\n if (length > strLen / 2) {\n length = strLen / 2;\n }\n\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16);\n if (isNaN(parsed)) return i;\n buf[offset + i] = parsed;\n }\n\n return i;\n}\n\nfunction utf8Write(buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);\n}\n\nfunction asciiWrite(buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length);\n}\n\nfunction latin1Write(buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length);\n}\n\nfunction base64Write(buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length);\n}\n\nfunction ucs2Write(buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);\n}\n\nBuffer.prototype.write = function write(string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8';\n length = this.length;\n offset = 0; // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset;\n length = this.length;\n offset = 0; // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0;\n\n if (isFinite(length)) {\n length = length | 0;\n if (encoding === undefined) encoding = 'utf8';\n } else {\n encoding = length;\n length = undefined;\n } // legacy write(string, encoding, offset, length) - remove in v0.13\n\n } else {\n throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');\n }\n\n var remaining = this.length - offset;\n if (length === undefined || length > remaining) length = remaining;\n\n if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds');\n }\n\n if (!encoding) encoding = 'utf8';\n var loweredCase = false;\n\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length);\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length);\n\n case 'ascii':\n return asciiWrite(this, string, offset, length);\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length);\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length);\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length);\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);\n encoding = ('' + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n};\n\nBuffer.prototype.toJSON = function toJSON() {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n };\n};\n\nfunction base64Slice(buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf);\n } else {\n return base64.fromByteArray(buf.slice(start, end));\n }\n}\n\nfunction utf8Slice(buf, start, end) {\n end = Math.min(buf.length, end);\n var res = [];\n var i = start;\n\n while (i < end) {\n var firstByte = buf[i];\n var codePoint = null;\n var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint;\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte;\n }\n\n break;\n\n case 2:\n secondByte = buf[i + 1];\n\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F;\n\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint;\n }\n }\n\n break;\n\n case 3:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F;\n\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint;\n }\n }\n\n break;\n\n case 4:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n fourthByte = buf[i + 3];\n\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F;\n\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint;\n }\n }\n\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD;\n bytesPerSequence = 1;\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000;\n res.push(codePoint >>> 10 & 0x3FF | 0xD800);\n codePoint = 0xDC00 | codePoint & 0x3FF;\n }\n\n res.push(codePoint);\n i += bytesPerSequence;\n }\n\n return decodeCodePointsArray(res);\n} // Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\n\n\nvar MAX_ARGUMENTS_LENGTH = 0x1000;\n\nfunction decodeCodePointsArray(codePoints) {\n var len = codePoints.length;\n\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints); // avoid extra slice()\n } // Decode in chunks to avoid \"call stack size exceeded\".\n\n\n var res = '';\n var i = 0;\n\n while (i < len) {\n res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));\n }\n\n return res;\n}\n\nfunction asciiSlice(buf, start, end) {\n var ret = '';\n end = Math.min(buf.length, end);\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F);\n }\n\n return ret;\n}\n\nfunction latin1Slice(buf, start, end) {\n var ret = '';\n end = Math.min(buf.length, end);\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i]);\n }\n\n return ret;\n}\n\nfunction hexSlice(buf, start, end) {\n var len = buf.length;\n if (!start || start < 0) start = 0;\n if (!end || end < 0 || end > len) end = len;\n var out = '';\n\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i]);\n }\n\n return out;\n}\n\nfunction utf16leSlice(buf, start, end) {\n var bytes = buf.slice(start, end);\n var res = '';\n\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);\n }\n\n return res;\n}\n\nBuffer.prototype.slice = function slice(start, end) {\n var len = this.length;\n start = ~~start;\n end = end === undefined ? len : ~~end;\n\n if (start < 0) {\n start += len;\n if (start < 0) start = 0;\n } else if (start > len) {\n start = len;\n }\n\n if (end < 0) {\n end += len;\n if (end < 0) end = 0;\n } else if (end > len) {\n end = len;\n }\n\n if (end < start) end = start;\n var newBuf;\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end);\n newBuf.__proto__ = Buffer.prototype;\n } else {\n var sliceLen = end - start;\n newBuf = new Buffer(sliceLen, undefined);\n\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start];\n }\n }\n\n return newBuf;\n};\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\n\n\nfunction checkOffset(offset, ext, length) {\n if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint');\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length');\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n var val = this[offset];\n var mul = 1;\n var i = 0;\n\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul;\n }\n\n return val;\n};\n\nBuffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length);\n }\n\n var val = this[offset + --byteLength];\n var mul = 1;\n\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul;\n }\n\n return val;\n};\n\nBuffer.prototype.readUInt8 = function readUInt8(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length);\n return this[offset];\n};\n\nBuffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n return this[offset] | this[offset + 1] << 8;\n};\n\nBuffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n return this[offset] << 8 | this[offset + 1];\n};\n\nBuffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000;\n};\n\nBuffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);\n};\n\nBuffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n var val = this[offset];\n var mul = 1;\n var i = 0;\n\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul;\n }\n\n mul *= 0x80;\n if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n return val;\n};\n\nBuffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n var i = byteLength;\n var mul = 1;\n var val = this[offset + --i];\n\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul;\n }\n\n mul *= 0x80;\n if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n return val;\n};\n\nBuffer.prototype.readInt8 = function readInt8(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length);\n if (!(this[offset] & 0x80)) return this[offset];\n return (0xff - this[offset] + 1) * -1;\n};\n\nBuffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n var val = this[offset] | this[offset + 1] << 8;\n return val & 0x8000 ? val | 0xFFFF0000 : val;\n};\n\nBuffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n var val = this[offset + 1] | this[offset] << 8;\n return val & 0x8000 ? val | 0xFFFF0000 : val;\n};\n\nBuffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;\n};\n\nBuffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];\n};\n\nBuffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return ieee754.read(this, offset, true, 23, 4);\n};\n\nBuffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return ieee754.read(this, offset, false, 23, 4);\n};\n\nBuffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length);\n return ieee754.read(this, offset, true, 52, 8);\n};\n\nBuffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length);\n return ieee754.read(this, offset, false, 52, 8);\n};\n\nfunction checkInt(buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance');\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds');\n if (offset + ext > buf.length) throw new RangeError('Index out of range');\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n byteLength = byteLength | 0;\n\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1;\n checkInt(this, value, offset, byteLength, maxBytes, 0);\n }\n\n var mul = 1;\n var i = 0;\n this[offset] = value & 0xFF;\n\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = value / mul & 0xFF;\n }\n\n return offset + byteLength;\n};\n\nBuffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n byteLength = byteLength | 0;\n\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1;\n checkInt(this, value, offset, byteLength, maxBytes, 0);\n }\n\n var i = byteLength - 1;\n var mul = 1;\n this[offset + i] = value & 0xFF;\n\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = value / mul & 0xFF;\n }\n\n return offset + byteLength;\n};\n\nBuffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);\n this[offset] = value & 0xff;\n return offset + 1;\n};\n\nfunction objectWriteUInt16(buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1;\n\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & 0xff << 8 * (littleEndian ? i : 1 - i)) >>> (littleEndian ? i : 1 - i) * 8;\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value & 0xff;\n this[offset + 1] = value >>> 8;\n } else {\n objectWriteUInt16(this, value, offset, true);\n }\n\n return offset + 2;\n};\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 8;\n this[offset + 1] = value & 0xff;\n } else {\n objectWriteUInt16(this, value, offset, false);\n }\n\n return offset + 2;\n};\n\nfunction objectWriteUInt32(buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1;\n\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = value >>> (littleEndian ? i : 3 - i) * 8 & 0xff;\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = value >>> 24;\n this[offset + 2] = value >>> 16;\n this[offset + 1] = value >>> 8;\n this[offset] = value & 0xff;\n } else {\n objectWriteUInt32(this, value, offset, true);\n }\n\n return offset + 4;\n};\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 24;\n this[offset + 1] = value >>> 16;\n this[offset + 2] = value >>> 8;\n this[offset + 3] = value & 0xff;\n } else {\n objectWriteUInt32(this, value, offset, false);\n }\n\n return offset + 4;\n};\n\nBuffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1);\n checkInt(this, value, offset, byteLength, limit - 1, -limit);\n }\n\n var i = 0;\n var mul = 1;\n var sub = 0;\n this[offset] = value & 0xFF;\n\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1;\n }\n\n this[offset + i] = (value / mul >> 0) - sub & 0xFF;\n }\n\n return offset + byteLength;\n};\n\nBuffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1);\n checkInt(this, value, offset, byteLength, limit - 1, -limit);\n }\n\n var i = byteLength - 1;\n var mul = 1;\n var sub = 0;\n this[offset + i] = value & 0xFF;\n\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1;\n }\n\n this[offset + i] = (value / mul >> 0) - sub & 0xFF;\n }\n\n return offset + byteLength;\n};\n\nBuffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);\n if (value < 0) value = 0xff + value + 1;\n this[offset] = value & 0xff;\n return offset + 1;\n};\n\nBuffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value & 0xff;\n this[offset + 1] = value >>> 8;\n } else {\n objectWriteUInt16(this, value, offset, true);\n }\n\n return offset + 2;\n};\n\nBuffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 8;\n this[offset + 1] = value & 0xff;\n } else {\n objectWriteUInt16(this, value, offset, false);\n }\n\n return offset + 2;\n};\n\nBuffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value & 0xff;\n this[offset + 1] = value >>> 8;\n this[offset + 2] = value >>> 16;\n this[offset + 3] = value >>> 24;\n } else {\n objectWriteUInt32(this, value, offset, true);\n }\n\n return offset + 4;\n};\n\nBuffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n if (value < 0) value = 0xffffffff + value + 1;\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 24;\n this[offset + 1] = value >>> 16;\n this[offset + 2] = value >>> 8;\n this[offset + 3] = value & 0xff;\n } else {\n objectWriteUInt32(this, value, offset, false);\n }\n\n return offset + 4;\n};\n\nfunction checkIEEE754(buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range');\n if (offset < 0) throw new RangeError('Index out of range');\n}\n\nfunction writeFloat(buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38);\n }\n\n ieee754.write(buf, value, offset, littleEndian, 23, 4);\n return offset + 4;\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert);\n};\n\nBuffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert);\n};\n\nfunction writeDouble(buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308);\n }\n\n ieee754.write(buf, value, offset, littleEndian, 52, 8);\n return offset + 8;\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert);\n};\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert);\n}; // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\n\n\nBuffer.prototype.copy = function copy(target, targetStart, start, end) {\n if (!start) start = 0;\n if (!end && end !== 0) end = this.length;\n if (targetStart >= target.length) targetStart = target.length;\n if (!targetStart) targetStart = 0;\n if (end > 0 && end < start) end = start; // Copy 0 bytes; we're done\n\n if (end === start) return 0;\n if (target.length === 0 || this.length === 0) return 0; // Fatal error conditions\n\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds');\n }\n\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds');\n if (end < 0) throw new RangeError('sourceEnd out of bounds'); // Are we oob?\n\n if (end > this.length) end = this.length;\n\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start;\n }\n\n var len = end - start;\n var i;\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start];\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start];\n }\n } else {\n Uint8Array.prototype.set.call(target, this.subarray(start, start + len), targetStart);\n }\n\n return len;\n}; // Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\n\n\nBuffer.prototype.fill = function fill(val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start;\n start = 0;\n end = this.length;\n } else if (typeof end === 'string') {\n encoding = end;\n end = this.length;\n }\n\n if (val.length === 1) {\n var code = val.charCodeAt(0);\n\n if (code < 256) {\n val = code;\n }\n }\n\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string');\n }\n\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding);\n }\n } else if (typeof val === 'number') {\n val = val & 255;\n } // Invalid ranges are not set to a default, so can range check early.\n\n\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index');\n }\n\n if (end <= start) {\n return this;\n }\n\n start = start >>> 0;\n end = end === undefined ? this.length : end >>> 0;\n if (!val) val = 0;\n var i;\n\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val;\n }\n } else {\n var bytes = Buffer.isBuffer(val) ? val : utf8ToBytes(new Buffer(val, encoding).toString());\n var len = bytes.length;\n\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len];\n }\n }\n\n return this;\n}; // HELPER FUNCTIONS\n// ================\n\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g;\n\nfunction base64clean(str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, ''); // Node converts strings with length < 2 to ''\n\n if (str.length < 2) return ''; // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n\n while (str.length % 4 !== 0) {\n str = str + '=';\n }\n\n return str;\n}\n\nfunction stringtrim(str) {\n if (str.trim) return str.trim();\n return str.replace(/^\\s+|\\s+$/g, '');\n}\n\nfunction toHex(n) {\n if (n < 16) return '0' + n.toString(16);\n return n.toString(16);\n}\n\nfunction utf8ToBytes(string, units) {\n units = units || Infinity;\n var codePoint;\n var length = string.length;\n var leadSurrogate = null;\n var bytes = [];\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i); // is surrogate component\n\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n continue;\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n continue;\n } // valid lead\n\n\n leadSurrogate = codePoint;\n continue;\n } // 2 leads in a row\n\n\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n leadSurrogate = codePoint;\n continue;\n } // valid surrogate pair\n\n\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n }\n\n leadSurrogate = null; // encode utf8\n\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break;\n bytes.push(codePoint);\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break;\n bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80);\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break;\n bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break;\n bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);\n } else {\n throw new Error('Invalid code point');\n }\n }\n\n return bytes;\n}\n\nfunction asciiToBytes(str) {\n var byteArray = [];\n\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF);\n }\n\n return byteArray;\n}\n\nfunction utf16leToBytes(str, units) {\n var c, hi, lo;\n var byteArray = [];\n\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break;\n c = str.charCodeAt(i);\n hi = c >> 8;\n lo = c % 256;\n byteArray.push(lo);\n byteArray.push(hi);\n }\n\n return byteArray;\n}\n\nfunction base64ToBytes(str) {\n return base64.toByteArray(base64clean(str));\n}\n\nfunction blitBuffer(src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if (i + offset >= dst.length || i >= src.length) break;\n dst[i + offset] = src[i];\n }\n\n return i;\n}\n\nfunction isnan(val) {\n return val !== val; // eslint-disable-line no-self-compare\n}","var baseToString = require('./_baseToString');\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\n\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;","'use strict';\n\nif (!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}\n\nfunction nextTick(fn, arg1, arg2, arg3) {\n if (typeof fn !== 'function') {\n throw new TypeError('\"callback\" argument must be a function');\n }\n\n var len = arguments.length;\n var args, i;\n\n switch (len) {\n case 0:\n case 1:\n return process.nextTick(fn);\n\n case 2:\n return process.nextTick(function afterTickOne() {\n fn.call(null, arg1);\n });\n\n case 3:\n return process.nextTick(function afterTickTwo() {\n fn.call(null, arg1, arg2);\n });\n\n case 4:\n return process.nextTick(function afterTickThree() {\n fn.call(null, arg1, arg2, arg3);\n });\n\n default:\n args = new Array(len - 1);\n i = 0;\n\n while (i < args.length) {\n args[i++] = arguments[i];\n }\n\n return process.nextTick(function afterTick() {\n fn.apply(null, args);\n });\n }\n}","/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer');\n\nvar Buffer = buffer.Buffer; // alternative to using Object.keys for old browsers\n\nfunction copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\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}\n\nfunction SafeBuffer(arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length);\n} // Copy static methods from Buffer\n\n\ncopyProps(Buffer, SafeBuffer);\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number');\n }\n\n return Buffer(arg, encodingOrOffset, length);\n};\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number');\n }\n\n var buf = Buffer(size);\n\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\n return buf;\n};\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number');\n }\n\n return Buffer(size);\n};\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number');\n }\n\n return buffer.SlowBuffer(size);\n};","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};","var isCallable = require('../internals/is-callable');\n\nvar tryToString = require('../internals/try-to-string');\n\nvar $TypeError = TypeError; // `Assert: IsCallable(argument) is true`\n\nmodule.exports = function (argument) {\n if (isCallable(argument)) return argument;\n throw $TypeError(tryToString(argument) + ' is not a function');\n};","module.exports = false;","var DESCRIPTORS = require('../internals/descriptors');\n\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};","module.exports = {};","var uncurryThis = require('../internals/function-uncurry-this-clause');\n\nvar aCallable = require('../internals/a-callable');\n\nvar NATIVE_BIND = require('../internals/function-bind-native');\n\nvar bind = uncurryThis(uncurryThis.bind); // optional / simple context binding\n\nmodule.exports = function (fn, that) {\n aCallable(fn);\n return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function ()\n /* ...args */\n {\n return fn.apply(that, arguments);\n };\n};","var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\n\nvar isCallable = require('../internals/is-callable');\n\nvar classofRaw = require('../internals/classof-raw');\n\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar $Object = Object; // ES3 wrong here\n\nvar CORRECT_ARGUMENTS = classofRaw(function () {\n return arguments;\n}()) == 'Arguments'; // fallback for IE11 Script Access Denied error\n\nvar tryGet = function tryGet(it, key) {\n try {\n return it[key];\n } catch (error) {\n /* empty */\n }\n}; // getting tag from ES6+ `Object.prototype.toString`\n\n\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case\n : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O) // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;\n};","var $ = require('../internals/export');\n\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar isObject = require('../internals/is-object');\n\nvar hasOwn = require('../internals/has-own-property');\n\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\n\nvar getOwnPropertyNamesExternalModule = require('../internals/object-get-own-property-names-external');\n\nvar isExtensible = require('../internals/object-is-extensible');\n\nvar uid = require('../internals/uid');\n\nvar FREEZING = require('../internals/freezing');\n\nvar REQUIRED = false;\nvar METADATA = uid('meta');\nvar id = 0;\n\nvar setMetadata = function setMetadata(it) {\n defineProperty(it, METADATA, {\n value: {\n objectID: 'O' + id++,\n // object ID\n weakData: {} // weak collections IDs\n\n }\n });\n};\n\nvar fastKey = function fastKey(it, create) {\n // return a primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n\n if (!hasOwn(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F'; // not necessary to add metadata\n\n if (!create) return 'E'; // add missing metadata\n\n setMetadata(it); // return object ID\n }\n\n return it[METADATA].objectID;\n};\n\nvar getWeakData = function getWeakData(it, create) {\n if (!hasOwn(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true; // not necessary to add metadata\n\n if (!create) return false; // add missing metadata\n\n setMetadata(it); // return the store of weak collections IDs\n }\n\n return it[METADATA].weakData;\n}; // add metadata on freeze-family methods calling\n\n\nvar onFreeze = function onFreeze(it) {\n if (FREEZING && REQUIRED && isExtensible(it) && !hasOwn(it, METADATA)) setMetadata(it);\n return it;\n};\n\nvar enable = function enable() {\n meta.enable = function () {\n /* empty */\n };\n\n REQUIRED = true;\n var getOwnPropertyNames = getOwnPropertyNamesModule.f;\n var splice = uncurryThis([].splice);\n var test = {};\n test[METADATA] = 1; // prevent exposing of metadata key\n\n if (getOwnPropertyNames(test).length) {\n getOwnPropertyNamesModule.f = function (it) {\n var result = getOwnPropertyNames(it);\n\n for (var i = 0, length = result.length; i < length; i++) {\n if (result[i] === METADATA) {\n splice(result, i, 1);\n break;\n }\n }\n\n return result;\n };\n\n $({\n target: 'Object',\n stat: true,\n forced: true\n }, {\n getOwnPropertyNames: getOwnPropertyNamesExternalModule.f\n });\n }\n};\n\nvar meta = module.exports = {\n enable: enable,\n fastKey: fastKey,\n getWeakData: getWeakData,\n onFreeze: onFreeze\n};\nhiddenKeys[METADATA] = true;","/* global ActiveXObject -- old IE, WSH */\nvar anObject = require('../internals/an-object');\n\nvar definePropertiesModule = require('../internals/object-define-properties');\n\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar html = require('../internals/html');\n\nvar documentCreateElement = require('../internals/document-create-element');\n\nvar sharedKey = require('../internals/shared-key');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function EmptyConstructor() {\n /* empty */\n};\n\nvar scriptTag = function scriptTag(content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n}; // Create object with fake `null` prototype: use ActiveX Object with cleared prototype\n\n\nvar NullProtoObjectViaActiveX = function NullProtoObjectViaActiveX(activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n\n return temp;\n}; // Create object with fake `null` prototype: use iframe Object with cleared prototype\n\n\nvar NullProtoObjectViaIFrame = function NullProtoObjectViaIFrame() {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe); // https://github.com/zloirock/core-js/issues/475\n\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n}; // Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\n\n\nvar activeXDocument;\n\nvar _NullProtoObject = function NullProtoObject() {\n try {\n activeXDocument = new ActiveXObject('htmlfile');\n } catch (error) {\n /* ignore */\n }\n\n _NullProtoObject = typeof document != 'undefined' ? document.domain && activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) // old IE\n : NullProtoObjectViaIFrame() : NullProtoObjectViaActiveX(activeXDocument); // WSH\n\n var length = enumBugKeys.length;\n\n while (length--) {\n delete _NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n }\n\n return _NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true; // `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\n// eslint-disable-next-line es/no-object-create -- safe\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null; // add \"__proto__\" for Object.getPrototypeOf polyfill\n\n result[IE_PROTO] = O;\n } else result = _NullProtoObject();\n\n return Properties === undefined ? result : definePropertiesModule.f(result, Properties);\n};","/* @flow */\n// $FlowFixMe\nmodule.exports = require('./dist/post-robot'); // eslint-disable-line import/no-commonjs\n// $FlowFixMe\n\nmodule.exports.default = module.exports; // eslint-disable-line import/no-commonjs","// Reserved word lists for various dialects of the language\nvar reservedWords = {\n 3: \"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile\",\n 5: \"class enum extends super const export import\",\n 6: \"enum\",\n strict: \"implements interface let package private protected public static yield\",\n strictBind: \"eval arguments\"\n}; // And the keywords\n\nvar ecma5AndLessKeywords = \"break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this\";\nvar keywords = {\n 5: ecma5AndLessKeywords,\n 6: ecma5AndLessKeywords + \" const class extends export import super\"\n};\nvar keywordRelationalOperator = /^in(stanceof)?$/; // ## Character categories\n// Big ugly regular expressions that match characters in the\n// whitespace, identifier, and identifier-start categories. These\n// are only applied when a character is found to actually have a\n// code point above 128.\n// Generated by `bin/generate-identifier-regex.js`.\n\nvar nonASCIIidentifierStartChars = \"\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1878\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309B-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FEF\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7B9\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC\";\nvar nonASCIIidentifierChars = \"\\u200C\\u200D\\xB7\\u0300-\\u036F\\u0387\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u0669\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u06F0-\\u06F9\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07C0-\\u07C9\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096F\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09E6-\\u09EF\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A66-\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AE6-\\u0AEF\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B66-\\u0B6F\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C04\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0CE6-\\u0CEF\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D66-\\u0D6F\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0E50-\\u0E59\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1040-\\u1049\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F-\\u109D\\u135D-\\u135F\\u1369-\\u1371\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u194F\\u19D0-\\u19DA\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AB0-\\u1ABD\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BB0-\\u1BB9\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1C40-\\u1C49\\u1C50-\\u1C59\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u203F\\u2040\\u2054\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA620-\\uA629\\uA66F\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8D0-\\uA8D9\\uA8E0-\\uA8F1\\uA8FF-\\uA909\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9D0-\\uA9D9\\uA9E5\\uA9F0-\\uA9F9\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA50-\\uAA59\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF10-\\uFF19\\uFF3F\";\nvar nonASCIIidentifierStart = new RegExp(\"[\" + nonASCIIidentifierStartChars + \"]\");\nvar nonASCIIidentifier = new RegExp(\"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\");\nnonASCIIidentifierStartChars = nonASCIIidentifierChars = null; // These are a run-length and offset encoded representation of the\n// >0xffff code points that are a valid part of identifiers. The\n// offset starts at 0x10000, and each pair of numbers represents an\n// offset to the next range, and then a size of the range. They were\n// generated by bin/generate-identifier-regex.js\n// eslint-disable-next-line comma-spacing\n\nvar astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 477, 28, 11, 0, 9, 21, 190, 52, 76, 44, 33, 24, 27, 35, 30, 0, 12, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 54, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 86, 26, 230, 43, 117, 63, 32, 0, 257, 0, 11, 39, 8, 0, 22, 0, 12, 39, 3, 3, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 270, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 68, 12, 0, 67, 12, 65, 1, 31, 6129, 15, 754, 9486, 286, 82, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 4149, 196, 60, 67, 1213, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42710, 42, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541]; // eslint-disable-next-line comma-spacing\n\nvar astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 525, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 4, 9, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 280, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1016, 45, 17, 3, 19723, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 2214, 6, 110, 6, 6, 9, 792487, 239]; // This has a complexity linear to the value of the code. The\n// assumption is that looking up astral identifier characters is\n// rare.\n\nfunction isInAstralSet(code, set) {\n var pos = 0x10000;\n\n for (var i = 0; i < set.length; i += 2) {\n pos += set[i];\n\n if (pos > code) {\n return false;\n }\n\n pos += set[i + 1];\n\n if (pos >= code) {\n return true;\n }\n }\n} // Test whether a given character code starts an identifier.\n\n\nfunction isIdentifierStart(code, astral) {\n if (code < 65) {\n return code === 36;\n }\n\n if (code < 91) {\n return true;\n }\n\n if (code < 97) {\n return code === 95;\n }\n\n if (code < 123) {\n return true;\n }\n\n if (code <= 0xffff) {\n return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));\n }\n\n if (astral === false) {\n return false;\n }\n\n return isInAstralSet(code, astralIdentifierStartCodes);\n} // Test whether a given character is part of an identifier.\n\n\nfunction isIdentifierChar(code, astral) {\n if (code < 48) {\n return code === 36;\n }\n\n if (code < 58) {\n return true;\n }\n\n if (code < 65) {\n return false;\n }\n\n if (code < 91) {\n return true;\n }\n\n if (code < 97) {\n return code === 95;\n }\n\n if (code < 123) {\n return true;\n }\n\n if (code <= 0xffff) {\n return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));\n }\n\n if (astral === false) {\n return false;\n }\n\n return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);\n} // ## Token types\n// The assignment of fine-grained, information-carrying type objects\n// allows the tokenizer to store the information it has about a\n// token in a way that is very cheap for the parser to look up.\n// All token type variables start with an underscore, to make them\n// easy to recognize.\n// The `beforeExpr` property is used to disambiguate between regular\n// expressions and divisions. It is set on all token types that can\n// be followed by an expression (thus, a slash after them would be a\n// regular expression).\n//\n// The `startsExpr` property is used to check if the token ends a\n// `yield` expression. It is set on all token types that either can\n// directly start an expression (like a quotation mark) or can\n// continue an expression (like the body of a string).\n//\n// `isLoop` marks a keyword as starting a loop, which is important\n// to know when parsing a label, in order to allow or disallow\n// continue jumps to that label.\n\n\nvar TokenType = function TokenType(label, conf) {\n if (conf === void 0) conf = {};\n this.label = label;\n this.keyword = conf.keyword;\n this.beforeExpr = !!conf.beforeExpr;\n this.startsExpr = !!conf.startsExpr;\n this.isLoop = !!conf.isLoop;\n this.isAssign = !!conf.isAssign;\n this.prefix = !!conf.prefix;\n this.postfix = !!conf.postfix;\n this.binop = conf.binop || null;\n this.updateContext = null;\n};\n\nfunction binop(name, prec) {\n return new TokenType(name, {\n beforeExpr: true,\n binop: prec\n });\n}\n\nvar beforeExpr = {\n beforeExpr: true\n};\nvar startsExpr = {\n startsExpr: true\n}; // Map keyword names to token types.\n\nvar keywords$1 = {}; // Succinct definitions of keyword token types\n\nfunction kw(name, options) {\n if (options === void 0) options = {};\n options.keyword = name;\n return keywords$1[name] = new TokenType(name, options);\n}\n\nvar types = {\n num: new TokenType(\"num\", startsExpr),\n regexp: new TokenType(\"regexp\", startsExpr),\n string: new TokenType(\"string\", startsExpr),\n name: new TokenType(\"name\", startsExpr),\n eof: new TokenType(\"eof\"),\n // Punctuation token types.\n bracketL: new TokenType(\"[\", {\n beforeExpr: true,\n startsExpr: true\n }),\n bracketR: new TokenType(\"]\"),\n braceL: new TokenType(\"{\", {\n beforeExpr: true,\n startsExpr: true\n }),\n braceR: new TokenType(\"}\"),\n parenL: new TokenType(\"(\", {\n beforeExpr: true,\n startsExpr: true\n }),\n parenR: new TokenType(\")\"),\n comma: new TokenType(\",\", beforeExpr),\n semi: new TokenType(\";\", beforeExpr),\n colon: new TokenType(\":\", beforeExpr),\n dot: new TokenType(\".\"),\n question: new TokenType(\"?\", beforeExpr),\n arrow: new TokenType(\"=>\", beforeExpr),\n template: new TokenType(\"template\"),\n invalidTemplate: new TokenType(\"invalidTemplate\"),\n ellipsis: new TokenType(\"...\", beforeExpr),\n backQuote: new TokenType(\"`\", startsExpr),\n dollarBraceL: new TokenType(\"${\", {\n beforeExpr: true,\n startsExpr: true\n }),\n // Operators. These carry several kinds of properties to help the\n // parser use them properly (the presence of these properties is\n // what categorizes them as operators).\n //\n // `binop`, when present, specifies that this operator is a binary\n // operator, and will refer to its precedence.\n //\n // `prefix` and `postfix` mark the operator as a prefix or postfix\n // unary operator.\n //\n // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as\n // binary operators with a very low precedence, that should result\n // in AssignmentExpression nodes.\n eq: new TokenType(\"=\", {\n beforeExpr: true,\n isAssign: true\n }),\n assign: new TokenType(\"_=\", {\n beforeExpr: true,\n isAssign: true\n }),\n incDec: new TokenType(\"++/--\", {\n prefix: true,\n postfix: true,\n startsExpr: true\n }),\n prefix: new TokenType(\"!/~\", {\n beforeExpr: true,\n prefix: true,\n startsExpr: true\n }),\n logicalOR: binop(\"||\", 1),\n logicalAND: binop(\"&&\", 2),\n bitwiseOR: binop(\"|\", 3),\n bitwiseXOR: binop(\"^\", 4),\n bitwiseAND: binop(\"&\", 5),\n equality: binop(\"==/!=/===/!==\", 6),\n relational: binop(\">/<=/>=\", 7),\n bitShift: binop(\"<>>/>>>\", 8),\n plusMin: new TokenType(\"+/-\", {\n beforeExpr: true,\n binop: 9,\n prefix: true,\n startsExpr: true\n }),\n modulo: binop(\"%\", 10),\n star: binop(\"*\", 10),\n slash: binop(\"/\", 10),\n starstar: new TokenType(\"**\", {\n beforeExpr: true\n }),\n // Keyword token types.\n _break: kw(\"break\"),\n _case: kw(\"case\", beforeExpr),\n _catch: kw(\"catch\"),\n _continue: kw(\"continue\"),\n _debugger: kw(\"debugger\"),\n _default: kw(\"default\", beforeExpr),\n _do: kw(\"do\", {\n isLoop: true,\n beforeExpr: true\n }),\n _else: kw(\"else\", beforeExpr),\n _finally: kw(\"finally\"),\n _for: kw(\"for\", {\n isLoop: true\n }),\n _function: kw(\"function\", startsExpr),\n _if: kw(\"if\"),\n _return: kw(\"return\", beforeExpr),\n _switch: kw(\"switch\"),\n _throw: kw(\"throw\", beforeExpr),\n _try: kw(\"try\"),\n _var: kw(\"var\"),\n _const: kw(\"const\"),\n _while: kw(\"while\", {\n isLoop: true\n }),\n _with: kw(\"with\"),\n _new: kw(\"new\", {\n beforeExpr: true,\n startsExpr: true\n }),\n _this: kw(\"this\", startsExpr),\n _super: kw(\"super\", startsExpr),\n _class: kw(\"class\", startsExpr),\n _extends: kw(\"extends\", beforeExpr),\n _export: kw(\"export\"),\n _import: kw(\"import\"),\n _null: kw(\"null\", startsExpr),\n _true: kw(\"true\", startsExpr),\n _false: kw(\"false\", startsExpr),\n _in: kw(\"in\", {\n beforeExpr: true,\n binop: 7\n }),\n _instanceof: kw(\"instanceof\", {\n beforeExpr: true,\n binop: 7\n }),\n _typeof: kw(\"typeof\", {\n beforeExpr: true,\n prefix: true,\n startsExpr: true\n }),\n _void: kw(\"void\", {\n beforeExpr: true,\n prefix: true,\n startsExpr: true\n }),\n _delete: kw(\"delete\", {\n beforeExpr: true,\n prefix: true,\n startsExpr: true\n })\n}; // Matches a whole line break (where CRLF is considered a single\n// line break). Used to count lines.\n\nvar lineBreak = /\\r\\n?|\\n|\\u2028|\\u2029/;\nvar lineBreakG = new RegExp(lineBreak.source, \"g\");\n\nfunction isNewLine(code, ecma2019String) {\n return code === 10 || code === 13 || !ecma2019String && (code === 0x2028 || code === 0x2029);\n}\n\nvar nonASCIIwhitespace = /[\\u1680\\u2000-\\u200a\\u202f\\u205f\\u3000\\ufeff]/;\nvar skipWhiteSpace = /(?:\\s|\\/\\/.*|\\/\\*[^]*?\\*\\/)*/g;\nvar ref = Object.prototype;\nvar hasOwnProperty = ref.hasOwnProperty;\nvar toString = ref.toString; // Checks if an object has a property.\n\nfunction has(obj, propName) {\n return hasOwnProperty.call(obj, propName);\n}\n\nvar isArray = Array.isArray || function (obj) {\n return toString.call(obj) === \"[object Array]\";\n};\n\nfunction wordsRegexp(words) {\n return new RegExp(\"^(?:\" + words.replace(/ /g, \"|\") + \")$\");\n} // These are used when `options.locations` is on, for the\n// `startLoc` and `endLoc` properties.\n\n\nvar Position = function Position(line, col) {\n this.line = line;\n this.column = col;\n};\n\nPosition.prototype.offset = function offset(n) {\n return new Position(this.line, this.column + n);\n};\n\nvar SourceLocation = function SourceLocation(p, start, end) {\n this.start = start;\n this.end = end;\n\n if (p.sourceFile !== null) {\n this.source = p.sourceFile;\n }\n}; // The `getLineInfo` function is mostly useful when the\n// `locations` option is off (for performance reasons) and you\n// want to find the line/column position for a given character\n// offset. `input` should be the code string that the offset refers\n// into.\n\n\nfunction getLineInfo(input, offset) {\n for (var line = 1, cur = 0;;) {\n lineBreakG.lastIndex = cur;\n var match = lineBreakG.exec(input);\n\n if (match && match.index < offset) {\n ++line;\n cur = match.index + match[0].length;\n } else {\n return new Position(line, offset - cur);\n }\n }\n} // A second optional argument can be given to further configure\n// the parser process. These options are recognized:\n\n\nvar defaultOptions = {\n // `ecmaVersion` indicates the ECMAScript version to parse. Must be\n // either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018), or 10\n // (2019). This influences support for strict mode, the set of\n // reserved words, and support for new syntax features. The default\n // is 9.\n ecmaVersion: 9,\n // `sourceType` indicates the mode the code should be parsed in.\n // Can be either `\"script\"` or `\"module\"`. This influences global\n // strict mode and parsing of `import` and `export` declarations.\n sourceType: \"script\",\n // `onInsertedSemicolon` can be a callback that will be called\n // when a semicolon is automatically inserted. It will be passed\n // the position of the comma as an offset, and if `locations` is\n // enabled, it is given the location as a `{line, column}` object\n // as second argument.\n onInsertedSemicolon: null,\n // `onTrailingComma` is similar to `onInsertedSemicolon`, but for\n // trailing commas.\n onTrailingComma: null,\n // By default, reserved words are only enforced if ecmaVersion >= 5.\n // Set `allowReserved` to a boolean value to explicitly turn this on\n // an off. When this option has the value \"never\", reserved words\n // and keywords can also not be used as property names.\n allowReserved: null,\n // When enabled, a return at the top level is not considered an\n // error.\n allowReturnOutsideFunction: false,\n // When enabled, import/export statements are not constrained to\n // appearing at the top of the program.\n allowImportExportEverywhere: false,\n // When enabled, await identifiers are allowed to appear at the top-level scope,\n // but they are still not allowed in non-async functions.\n allowAwaitOutsideFunction: false,\n // When enabled, hashbang directive in the beginning of file\n // is allowed and treated as a line comment.\n allowHashBang: false,\n // When `locations` is on, `loc` properties holding objects with\n // `start` and `end` properties in `{line, column}` form (with\n // line being 1-based and column 0-based) will be attached to the\n // nodes.\n locations: false,\n // A function can be passed as `onToken` option, which will\n // cause Acorn to call that function with object in the same\n // format as tokens returned from `tokenizer().getToken()`. Note\n // that you are not allowed to call the parser from the\n // callback—that will corrupt its internal state.\n onToken: null,\n // A function can be passed as `onComment` option, which will\n // cause Acorn to call that function with `(block, text, start,\n // end)` parameters whenever a comment is skipped. `block` is a\n // boolean indicating whether this is a block (`/* */`) comment,\n // `text` is the content of the comment, and `start` and `end` are\n // character offsets that denote the start and end of the comment.\n // When the `locations` option is on, two more parameters are\n // passed, the full `{line, column}` locations of the start and\n // end of the comments. Note that you are not allowed to call the\n // parser from the callback—that will corrupt its internal state.\n onComment: null,\n // Nodes have their start and end characters offsets recorded in\n // `start` and `end` properties (directly on the node, rather than\n // the `loc` object, which holds line/column data. To also add a\n // [semi-standardized][range] `range` property holding a `[start,\n // end]` array with the same numbers, set the `ranges` option to\n // `true`.\n //\n // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678\n ranges: false,\n // It is possible to parse multiple files into a single AST by\n // passing the tree produced by parsing the first file as\n // `program` option in subsequent parses. This will add the\n // toplevel forms of the parsed file to the `Program` (top) node\n // of an existing parse tree.\n program: null,\n // When `locations` is on, you can pass this to record the source\n // file in every node's `loc` object.\n sourceFile: null,\n // This value, if given, is stored in every node, whether\n // `locations` is on or off.\n directSourceFile: null,\n // When enabled, parenthesized expressions are represented by\n // (non-standard) ParenthesizedExpression nodes\n preserveParens: false\n}; // Interpret and default an options object\n\nfunction getOptions(opts) {\n var options = {};\n\n for (var opt in defaultOptions) {\n options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt];\n }\n\n if (options.ecmaVersion >= 2015) {\n options.ecmaVersion -= 2009;\n }\n\n if (options.allowReserved == null) {\n options.allowReserved = options.ecmaVersion < 5;\n }\n\n if (isArray(options.onToken)) {\n var tokens = options.onToken;\n\n options.onToken = function (token) {\n return tokens.push(token);\n };\n }\n\n if (isArray(options.onComment)) {\n options.onComment = pushComment(options, options.onComment);\n }\n\n return options;\n}\n\nfunction pushComment(options, array) {\n return function (block, text, start, end, startLoc, endLoc) {\n var comment = {\n type: block ? \"Block\" : \"Line\",\n value: text,\n start: start,\n end: end\n };\n\n if (options.locations) {\n comment.loc = new SourceLocation(this, startLoc, endLoc);\n }\n\n if (options.ranges) {\n comment.range = [start, end];\n }\n\n array.push(comment);\n };\n} // Each scope gets a bitset that may contain these flags\n\n\nvar SCOPE_TOP = 1;\nvar SCOPE_FUNCTION = 2;\nvar SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION;\nvar SCOPE_ASYNC = 4;\nvar SCOPE_GENERATOR = 8;\nvar SCOPE_ARROW = 16;\nvar SCOPE_SIMPLE_CATCH = 32;\nvar SCOPE_SUPER = 64;\nvar SCOPE_DIRECT_SUPER = 128;\n\nfunction functionFlags(async, generator) {\n return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0);\n} // Used in checkLVal and declareName to determine the type of a binding\n\n\nvar BIND_NONE = 0;\nvar BIND_VAR = 1;\nvar BIND_LEXICAL = 2;\nvar BIND_FUNCTION = 3;\nvar BIND_SIMPLE_CATCH = 4;\nvar BIND_OUTSIDE = 5; // Special case for function names as bound inside the function\n\nvar Parser = function Parser(options, input, startPos) {\n this.options = options = getOptions(options);\n this.sourceFile = options.sourceFile;\n this.keywords = wordsRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5]);\n var reserved = \"\";\n\n if (!options.allowReserved) {\n for (var v = options.ecmaVersion;; v--) {\n if (reserved = reservedWords[v]) {\n break;\n }\n }\n\n if (options.sourceType === \"module\") {\n reserved += \" await\";\n }\n }\n\n this.reservedWords = wordsRegexp(reserved);\n var reservedStrict = (reserved ? reserved + \" \" : \"\") + reservedWords.strict;\n this.reservedWordsStrict = wordsRegexp(reservedStrict);\n this.reservedWordsStrictBind = wordsRegexp(reservedStrict + \" \" + reservedWords.strictBind);\n this.input = String(input); // Used to signal to callers of `readWord1` whether the word\n // contained any escape sequences. This is needed because words with\n // escape sequences must not be interpreted as keywords.\n\n this.containsEsc = false; // Set up token state\n // The current position of the tokenizer in the input.\n\n if (startPos) {\n this.pos = startPos;\n this.lineStart = this.input.lastIndexOf(\"\\n\", startPos - 1) + 1;\n this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length;\n } else {\n this.pos = this.lineStart = 0;\n this.curLine = 1;\n } // Properties of the current token:\n // Its type\n\n\n this.type = types.eof; // For tokens that include more information than their type, the value\n\n this.value = null; // Its start and end offset\n\n this.start = this.end = this.pos; // And, if locations are used, the {line, column} object\n // corresponding to those offsets\n\n this.startLoc = this.endLoc = this.curPosition(); // Position information for the previous token\n\n this.lastTokEndLoc = this.lastTokStartLoc = null;\n this.lastTokStart = this.lastTokEnd = this.pos; // The context stack is used to superficially track syntactic\n // context to predict whether a regular expression is allowed in a\n // given position.\n\n this.context = this.initialContext();\n this.exprAllowed = true; // Figure out if it's a module code.\n\n this.inModule = options.sourceType === \"module\";\n this.strict = this.inModule || this.strictDirective(this.pos); // Used to signify the start of a potential arrow function\n\n this.potentialArrowAt = -1; // Positions to delayed-check that yield/await does not exist in default parameters.\n\n this.yieldPos = this.awaitPos = this.awaitIdentPos = 0; // Labels in scope.\n\n this.labels = []; // Thus-far undefined exports.\n\n this.undefinedExports = {}; // If enabled, skip leading hashbang line.\n\n if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === \"#!\") {\n this.skipLineComment(2);\n } // Scope tracking for duplicate variable names (see scope.js)\n\n\n this.scopeStack = [];\n this.enterScope(SCOPE_TOP); // For RegExp validation\n\n this.regexpState = null;\n};\n\nvar prototypeAccessors = {\n inFunction: {\n configurable: true\n },\n inGenerator: {\n configurable: true\n },\n inAsync: {\n configurable: true\n },\n allowSuper: {\n configurable: true\n },\n allowDirectSuper: {\n configurable: true\n },\n treatFunctionsAsVar: {\n configurable: true\n }\n};\n\nParser.prototype.parse = function parse() {\n var node = this.options.program || this.startNode();\n this.nextToken();\n return this.parseTopLevel(node);\n};\n\nprototypeAccessors.inFunction.get = function () {\n return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0;\n};\n\nprototypeAccessors.inGenerator.get = function () {\n return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0;\n};\n\nprototypeAccessors.inAsync.get = function () {\n return (this.currentVarScope().flags & SCOPE_ASYNC) > 0;\n};\n\nprototypeAccessors.allowSuper.get = function () {\n return (this.currentThisScope().flags & SCOPE_SUPER) > 0;\n};\n\nprototypeAccessors.allowDirectSuper.get = function () {\n return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0;\n};\n\nprototypeAccessors.treatFunctionsAsVar.get = function () {\n return this.treatFunctionsAsVarInScope(this.currentScope());\n}; // Switch to a getter for 7.0.0.\n\n\nParser.prototype.inNonArrowFunction = function inNonArrowFunction() {\n return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0;\n};\n\nParser.extend = function extend() {\n var plugins = [],\n len = arguments.length;\n\n while (len--) {\n plugins[len] = arguments[len];\n }\n\n var cls = this;\n\n for (var i = 0; i < plugins.length; i++) {\n cls = plugins[i](cls);\n }\n\n return cls;\n};\n\nParser.parse = function parse(input, options) {\n return new this(options, input).parse();\n};\n\nParser.parseExpressionAt = function parseExpressionAt(input, pos, options) {\n var parser = new this(options, input, pos);\n parser.nextToken();\n return parser.parseExpression();\n};\n\nParser.tokenizer = function tokenizer(input, options) {\n return new this(options, input);\n};\n\nObject.defineProperties(Parser.prototype, prototypeAccessors);\nvar pp = Parser.prototype; // ## Parser utilities\n\nvar literal = /^(?:'((?:\\\\.|[^'])*?)'|\"((?:\\\\.|[^\"])*?)\")/;\n\npp.strictDirective = function (start) {\n var this$1 = this;\n\n for (;;) {\n // Try to find string literal.\n skipWhiteSpace.lastIndex = start;\n start += skipWhiteSpace.exec(this$1.input)[0].length;\n var match = literal.exec(this$1.input.slice(start));\n\n if (!match) {\n return false;\n }\n\n if ((match[1] || match[2]) === \"use strict\") {\n return true;\n }\n\n start += match[0].length; // Skip semicolon, if any.\n\n skipWhiteSpace.lastIndex = start;\n start += skipWhiteSpace.exec(this$1.input)[0].length;\n\n if (this$1.input[start] === \";\") {\n start++;\n }\n }\n}; // Predicate that tests whether the next token is of the given\n// type, and if yes, consumes it as a side effect.\n\n\npp.eat = function (type) {\n if (this.type === type) {\n this.next();\n return true;\n } else {\n return false;\n }\n}; // Tests whether parsed token is a contextual keyword.\n\n\npp.isContextual = function (name) {\n return this.type === types.name && this.value === name && !this.containsEsc;\n}; // Consumes contextual keyword if possible.\n\n\npp.eatContextual = function (name) {\n if (!this.isContextual(name)) {\n return false;\n }\n\n this.next();\n return true;\n}; // Asserts that following token is given contextual keyword.\n\n\npp.expectContextual = function (name) {\n if (!this.eatContextual(name)) {\n this.unexpected();\n }\n}; // Test whether a semicolon can be inserted at the current position.\n\n\npp.canInsertSemicolon = function () {\n return this.type === types.eof || this.type === types.braceR || lineBreak.test(this.input.slice(this.lastTokEnd, this.start));\n};\n\npp.insertSemicolon = function () {\n if (this.canInsertSemicolon()) {\n if (this.options.onInsertedSemicolon) {\n this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc);\n }\n\n return true;\n }\n}; // Consume a semicolon, or, failing that, see if we are allowed to\n// pretend that there is a semicolon at this position.\n\n\npp.semicolon = function () {\n if (!this.eat(types.semi) && !this.insertSemicolon()) {\n this.unexpected();\n }\n};\n\npp.afterTrailingComma = function (tokType, notNext) {\n if (this.type === tokType) {\n if (this.options.onTrailingComma) {\n this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc);\n }\n\n if (!notNext) {\n this.next();\n }\n\n return true;\n }\n}; // Expect a token of a given type. If found, consume it, otherwise,\n// raise an unexpected token error.\n\n\npp.expect = function (type) {\n this.eat(type) || this.unexpected();\n}; // Raise an unexpected token error.\n\n\npp.unexpected = function (pos) {\n this.raise(pos != null ? pos : this.start, \"Unexpected token\");\n};\n\nfunction DestructuringErrors() {\n this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;\n}\n\npp.checkPatternErrors = function (refDestructuringErrors, isAssign) {\n if (!refDestructuringErrors) {\n return;\n }\n\n if (refDestructuringErrors.trailingComma > -1) {\n this.raiseRecoverable(refDestructuringErrors.trailingComma, \"Comma is not permitted after the rest element\");\n }\n\n var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind;\n\n if (parens > -1) {\n this.raiseRecoverable(parens, \"Parenthesized pattern\");\n }\n};\n\npp.checkExpressionErrors = function (refDestructuringErrors, andThrow) {\n if (!refDestructuringErrors) {\n return false;\n }\n\n var shorthandAssign = refDestructuringErrors.shorthandAssign;\n var doubleProto = refDestructuringErrors.doubleProto;\n\n if (!andThrow) {\n return shorthandAssign >= 0 || doubleProto >= 0;\n }\n\n if (shorthandAssign >= 0) {\n this.raise(shorthandAssign, \"Shorthand property assignments are valid only in destructuring patterns\");\n }\n\n if (doubleProto >= 0) {\n this.raiseRecoverable(doubleProto, \"Redefinition of __proto__ property\");\n }\n};\n\npp.checkYieldAwaitInDefaultParams = function () {\n if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) {\n this.raise(this.yieldPos, \"Yield expression cannot be a default value\");\n }\n\n if (this.awaitPos) {\n this.raise(this.awaitPos, \"Await expression cannot be a default value\");\n }\n};\n\npp.isSimpleAssignTarget = function (expr) {\n if (expr.type === \"ParenthesizedExpression\") {\n return this.isSimpleAssignTarget(expr.expression);\n }\n\n return expr.type === \"Identifier\" || expr.type === \"MemberExpression\";\n};\n\nvar pp$1 = Parser.prototype; // ### Statement parsing\n// Parse a program. Initializes the parser, reads any number of\n// statements, and wraps them in a Program node. Optionally takes a\n// `program` argument. If present, the statements will be appended\n// to its body instead of creating a new node.\n\npp$1.parseTopLevel = function (node) {\n var this$1 = this;\n var exports = {};\n\n if (!node.body) {\n node.body = [];\n }\n\n while (this.type !== types.eof) {\n var stmt = this$1.parseStatement(null, true, exports);\n node.body.push(stmt);\n }\n\n if (this.inModule) {\n for (var i = 0, list = Object.keys(this$1.undefinedExports); i < list.length; i += 1) {\n var name = list[i];\n this$1.raiseRecoverable(this$1.undefinedExports[name].start, \"Export '\" + name + \"' is not defined\");\n }\n }\n\n this.adaptDirectivePrologue(node.body);\n this.next();\n\n if (this.options.ecmaVersion >= 6) {\n node.sourceType = this.options.sourceType;\n }\n\n return this.finishNode(node, \"Program\");\n};\n\nvar loopLabel = {\n kind: \"loop\"\n};\nvar switchLabel = {\n kind: \"switch\"\n};\n\npp$1.isLet = function (context) {\n if (this.options.ecmaVersion < 6 || !this.isContextual(\"let\")) {\n return false;\n }\n\n skipWhiteSpace.lastIndex = this.pos;\n var skip = skipWhiteSpace.exec(this.input);\n var next = this.pos + skip[0].length,\n nextCh = this.input.charCodeAt(next); // For ambiguous cases, determine if a LexicalDeclaration (or only a\n // Statement) is allowed here. If context is not empty then only a Statement\n // is allowed. However, `let [` is an explicit negative lookahead for\n // ExpressionStatement, so special-case it first.\n\n if (nextCh === 91) {\n return true;\n } // '['\n\n\n if (context) {\n return false;\n }\n\n if (nextCh === 123) {\n return true;\n } // '{'\n\n\n if (isIdentifierStart(nextCh, true)) {\n var pos = next + 1;\n\n while (isIdentifierChar(this.input.charCodeAt(pos), true)) {\n ++pos;\n }\n\n var ident = this.input.slice(next, pos);\n\n if (!keywordRelationalOperator.test(ident)) {\n return true;\n }\n }\n\n return false;\n}; // check 'async [no LineTerminator here] function'\n// - 'async /*foo*/ function' is OK.\n// - 'async /*\\n*/ function' is invalid.\n\n\npp$1.isAsyncFunction = function () {\n if (this.options.ecmaVersion < 8 || !this.isContextual(\"async\")) {\n return false;\n }\n\n skipWhiteSpace.lastIndex = this.pos;\n var skip = skipWhiteSpace.exec(this.input);\n var next = this.pos + skip[0].length;\n return !lineBreak.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === \"function\" && (next + 8 === this.input.length || !isIdentifierChar(this.input.charAt(next + 8)));\n}; // Parse a single statement.\n//\n// If expecting a statement and finding a slash operator, parse a\n// regular expression literal. This is to handle cases like\n// `if (foo) /blah/.exec(foo)`, where looking at the previous token\n// does not help.\n\n\npp$1.parseStatement = function (context, topLevel, exports) {\n var starttype = this.type,\n node = this.startNode(),\n kind;\n\n if (this.isLet(context)) {\n starttype = types._var;\n kind = \"let\";\n } // Most types of statements are recognized by the keyword they\n // start with. Many are trivial to parse, some require a bit of\n // complexity.\n\n\n switch (starttype) {\n case types._break:\n case types._continue:\n return this.parseBreakContinueStatement(node, starttype.keyword);\n\n case types._debugger:\n return this.parseDebuggerStatement(node);\n\n case types._do:\n return this.parseDoStatement(node);\n\n case types._for:\n return this.parseForStatement(node);\n\n case types._function:\n // Function as sole body of either an if statement or a labeled statement\n // works, but not when it is part of a labeled statement that is the sole\n // body of an if statement.\n if (context && (this.strict || context !== \"if\" && context !== \"label\") && this.options.ecmaVersion >= 6) {\n this.unexpected();\n }\n\n return this.parseFunctionStatement(node, false, !context);\n\n case types._class:\n if (context) {\n this.unexpected();\n }\n\n return this.parseClass(node, true);\n\n case types._if:\n return this.parseIfStatement(node);\n\n case types._return:\n return this.parseReturnStatement(node);\n\n case types._switch:\n return this.parseSwitchStatement(node);\n\n case types._throw:\n return this.parseThrowStatement(node);\n\n case types._try:\n return this.parseTryStatement(node);\n\n case types._const:\n case types._var:\n kind = kind || this.value;\n\n if (context && kind !== \"var\") {\n this.unexpected();\n }\n\n return this.parseVarStatement(node, kind);\n\n case types._while:\n return this.parseWhileStatement(node);\n\n case types._with:\n return this.parseWithStatement(node);\n\n case types.braceL:\n return this.parseBlock(true, node);\n\n case types.semi:\n return this.parseEmptyStatement(node);\n\n case types._export:\n case types._import:\n if (!this.options.allowImportExportEverywhere) {\n if (!topLevel) {\n this.raise(this.start, \"'import' and 'export' may only appear at the top level\");\n }\n\n if (!this.inModule) {\n this.raise(this.start, \"'import' and 'export' may appear only with 'sourceType: module'\");\n }\n }\n\n return starttype === types._import ? this.parseImport(node) : this.parseExport(node, exports);\n // If the statement does not start with a statement keyword or a\n // brace, it's an ExpressionStatement or LabeledStatement. We\n // simply start parsing an expression, and afterwards, if the\n // next token is a colon and the expression was a simple\n // Identifier node, we switch to interpreting it as a label.\n\n default:\n if (this.isAsyncFunction()) {\n if (context) {\n this.unexpected();\n }\n\n this.next();\n return this.parseFunctionStatement(node, true, !context);\n }\n\n var maybeName = this.value,\n expr = this.parseExpression();\n\n if (starttype === types.name && expr.type === \"Identifier\" && this.eat(types.colon)) {\n return this.parseLabeledStatement(node, maybeName, expr, context);\n } else {\n return this.parseExpressionStatement(node, expr);\n }\n\n }\n};\n\npp$1.parseBreakContinueStatement = function (node, keyword) {\n var this$1 = this;\n var isBreak = keyword === \"break\";\n this.next();\n\n if (this.eat(types.semi) || this.insertSemicolon()) {\n node.label = null;\n } else if (this.type !== types.name) {\n this.unexpected();\n } else {\n node.label = this.parseIdent();\n this.semicolon();\n } // Verify that there is an actual destination to break or\n // continue to.\n\n\n var i = 0;\n\n for (; i < this.labels.length; ++i) {\n var lab = this$1.labels[i];\n\n if (node.label == null || lab.name === node.label.name) {\n if (lab.kind != null && (isBreak || lab.kind === \"loop\")) {\n break;\n }\n\n if (node.label && isBreak) {\n break;\n }\n }\n }\n\n if (i === this.labels.length) {\n this.raise(node.start, \"Unsyntactic \" + keyword);\n }\n\n return this.finishNode(node, isBreak ? \"BreakStatement\" : \"ContinueStatement\");\n};\n\npp$1.parseDebuggerStatement = function (node) {\n this.next();\n this.semicolon();\n return this.finishNode(node, \"DebuggerStatement\");\n};\n\npp$1.parseDoStatement = function (node) {\n this.next();\n this.labels.push(loopLabel);\n node.body = this.parseStatement(\"do\");\n this.labels.pop();\n this.expect(types._while);\n node.test = this.parseParenExpression();\n\n if (this.options.ecmaVersion >= 6) {\n this.eat(types.semi);\n } else {\n this.semicolon();\n }\n\n return this.finishNode(node, \"DoWhileStatement\");\n}; // Disambiguating between a `for` and a `for`/`in` or `for`/`of`\n// loop is non-trivial. Basically, we have to parse the init `var`\n// statement or expression, disallowing the `in` operator (see\n// the second parameter to `parseExpression`), and then check\n// whether the next token is `in` or `of`. When there is no init\n// part (semicolon immediately after the opening parenthesis), it\n// is a regular `for` loop.\n\n\npp$1.parseForStatement = function (node) {\n this.next();\n var awaitAt = this.options.ecmaVersion >= 9 && (this.inAsync || !this.inFunction && this.options.allowAwaitOutsideFunction) && this.eatContextual(\"await\") ? this.lastTokStart : -1;\n this.labels.push(loopLabel);\n this.enterScope(0);\n this.expect(types.parenL);\n\n if (this.type === types.semi) {\n if (awaitAt > -1) {\n this.unexpected(awaitAt);\n }\n\n return this.parseFor(node, null);\n }\n\n var isLet = this.isLet();\n\n if (this.type === types._var || this.type === types._const || isLet) {\n var init$1 = this.startNode(),\n kind = isLet ? \"let\" : this.value;\n this.next();\n this.parseVar(init$1, true, kind);\n this.finishNode(init$1, \"VariableDeclaration\");\n\n if ((this.type === types._in || this.options.ecmaVersion >= 6 && this.isContextual(\"of\")) && init$1.declarations.length === 1 && !(kind !== \"var\" && init$1.declarations[0].init)) {\n if (this.options.ecmaVersion >= 9) {\n if (this.type === types._in) {\n if (awaitAt > -1) {\n this.unexpected(awaitAt);\n }\n } else {\n node.await = awaitAt > -1;\n }\n }\n\n return this.parseForIn(node, init$1);\n }\n\n if (awaitAt > -1) {\n this.unexpected(awaitAt);\n }\n\n return this.parseFor(node, init$1);\n }\n\n var refDestructuringErrors = new DestructuringErrors();\n var init = this.parseExpression(true, refDestructuringErrors);\n\n if (this.type === types._in || this.options.ecmaVersion >= 6 && this.isContextual(\"of\")) {\n if (this.options.ecmaVersion >= 9) {\n if (this.type === types._in) {\n if (awaitAt > -1) {\n this.unexpected(awaitAt);\n }\n } else {\n node.await = awaitAt > -1;\n }\n }\n\n this.toAssignable(init, false, refDestructuringErrors);\n this.checkLVal(init);\n return this.parseForIn(node, init);\n } else {\n this.checkExpressionErrors(refDestructuringErrors, true);\n }\n\n if (awaitAt > -1) {\n this.unexpected(awaitAt);\n }\n\n return this.parseFor(node, init);\n};\n\npp$1.parseFunctionStatement = function (node, isAsync, declarationPosition) {\n this.next();\n return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync);\n};\n\npp$1.parseIfStatement = function (node) {\n this.next();\n node.test = this.parseParenExpression(); // allow function declarations in branches, but only in non-strict mode\n\n node.consequent = this.parseStatement(\"if\");\n node.alternate = this.eat(types._else) ? this.parseStatement(\"if\") : null;\n return this.finishNode(node, \"IfStatement\");\n};\n\npp$1.parseReturnStatement = function (node) {\n if (!this.inFunction && !this.options.allowReturnOutsideFunction) {\n this.raise(this.start, \"'return' outside of function\");\n }\n\n this.next(); // In `return` (and `break`/`continue`), the keywords with\n // optional arguments, we eagerly look for a semicolon or the\n // possibility to insert one.\n\n if (this.eat(types.semi) || this.insertSemicolon()) {\n node.argument = null;\n } else {\n node.argument = this.parseExpression();\n this.semicolon();\n }\n\n return this.finishNode(node, \"ReturnStatement\");\n};\n\npp$1.parseSwitchStatement = function (node) {\n var this$1 = this;\n this.next();\n node.discriminant = this.parseParenExpression();\n node.cases = [];\n this.expect(types.braceL);\n this.labels.push(switchLabel);\n this.enterScope(0); // Statements under must be grouped (by label) in SwitchCase\n // nodes. `cur` is used to keep the node that we are currently\n // adding statements to.\n\n var cur;\n\n for (var sawDefault = false; this.type !== types.braceR;) {\n if (this$1.type === types._case || this$1.type === types._default) {\n var isCase = this$1.type === types._case;\n\n if (cur) {\n this$1.finishNode(cur, \"SwitchCase\");\n }\n\n node.cases.push(cur = this$1.startNode());\n cur.consequent = [];\n this$1.next();\n\n if (isCase) {\n cur.test = this$1.parseExpression();\n } else {\n if (sawDefault) {\n this$1.raiseRecoverable(this$1.lastTokStart, \"Multiple default clauses\");\n }\n\n sawDefault = true;\n cur.test = null;\n }\n\n this$1.expect(types.colon);\n } else {\n if (!cur) {\n this$1.unexpected();\n }\n\n cur.consequent.push(this$1.parseStatement(null));\n }\n }\n\n this.exitScope();\n\n if (cur) {\n this.finishNode(cur, \"SwitchCase\");\n }\n\n this.next(); // Closing brace\n\n this.labels.pop();\n return this.finishNode(node, \"SwitchStatement\");\n};\n\npp$1.parseThrowStatement = function (node) {\n this.next();\n\n if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) {\n this.raise(this.lastTokEnd, \"Illegal newline after throw\");\n }\n\n node.argument = this.parseExpression();\n this.semicolon();\n return this.finishNode(node, \"ThrowStatement\");\n}; // Reused empty array added for node fields that are always empty.\n\n\nvar empty = [];\n\npp$1.parseTryStatement = function (node) {\n this.next();\n node.block = this.parseBlock();\n node.handler = null;\n\n if (this.type === types._catch) {\n var clause = this.startNode();\n this.next();\n\n if (this.eat(types.parenL)) {\n clause.param = this.parseBindingAtom();\n var simple = clause.param.type === \"Identifier\";\n this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0);\n this.checkLVal(clause.param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL);\n this.expect(types.parenR);\n } else {\n if (this.options.ecmaVersion < 10) {\n this.unexpected();\n }\n\n clause.param = null;\n this.enterScope(0);\n }\n\n clause.body = this.parseBlock(false);\n this.exitScope();\n node.handler = this.finishNode(clause, \"CatchClause\");\n }\n\n node.finalizer = this.eat(types._finally) ? this.parseBlock() : null;\n\n if (!node.handler && !node.finalizer) {\n this.raise(node.start, \"Missing catch or finally clause\");\n }\n\n return this.finishNode(node, \"TryStatement\");\n};\n\npp$1.parseVarStatement = function (node, kind) {\n this.next();\n this.parseVar(node, false, kind);\n this.semicolon();\n return this.finishNode(node, \"VariableDeclaration\");\n};\n\npp$1.parseWhileStatement = function (node) {\n this.next();\n node.test = this.parseParenExpression();\n this.labels.push(loopLabel);\n node.body = this.parseStatement(\"while\");\n this.labels.pop();\n return this.finishNode(node, \"WhileStatement\");\n};\n\npp$1.parseWithStatement = function (node) {\n if (this.strict) {\n this.raise(this.start, \"'with' in strict mode\");\n }\n\n this.next();\n node.object = this.parseParenExpression();\n node.body = this.parseStatement(\"with\");\n return this.finishNode(node, \"WithStatement\");\n};\n\npp$1.parseEmptyStatement = function (node) {\n this.next();\n return this.finishNode(node, \"EmptyStatement\");\n};\n\npp$1.parseLabeledStatement = function (node, maybeName, expr, context) {\n var this$1 = this;\n\n for (var i$1 = 0, list = this$1.labels; i$1 < list.length; i$1 += 1) {\n var label = list[i$1];\n\n if (label.name === maybeName) {\n this$1.raise(expr.start, \"Label '\" + maybeName + \"' is already declared\");\n }\n }\n\n var kind = this.type.isLoop ? \"loop\" : this.type === types._switch ? \"switch\" : null;\n\n for (var i = this.labels.length - 1; i >= 0; i--) {\n var label$1 = this$1.labels[i];\n\n if (label$1.statementStart === node.start) {\n // Update information about previous labels on this node\n label$1.statementStart = this$1.start;\n label$1.kind = kind;\n } else {\n break;\n }\n }\n\n this.labels.push({\n name: maybeName,\n kind: kind,\n statementStart: this.start\n });\n node.body = this.parseStatement(context ? context.indexOf(\"label\") === -1 ? context + \"label\" : context : \"label\");\n this.labels.pop();\n node.label = expr;\n return this.finishNode(node, \"LabeledStatement\");\n};\n\npp$1.parseExpressionStatement = function (node, expr) {\n node.expression = expr;\n this.semicolon();\n return this.finishNode(node, \"ExpressionStatement\");\n}; // Parse a semicolon-enclosed block of statements, handling `\"use\n// strict\"` declarations when `allowStrict` is true (used for\n// function bodies).\n\n\npp$1.parseBlock = function (createNewLexicalScope, node) {\n var this$1 = this;\n if (createNewLexicalScope === void 0) createNewLexicalScope = true;\n if (node === void 0) node = this.startNode();\n node.body = [];\n this.expect(types.braceL);\n\n if (createNewLexicalScope) {\n this.enterScope(0);\n }\n\n while (!this.eat(types.braceR)) {\n var stmt = this$1.parseStatement(null);\n node.body.push(stmt);\n }\n\n if (createNewLexicalScope) {\n this.exitScope();\n }\n\n return this.finishNode(node, \"BlockStatement\");\n}; // Parse a regular `for` loop. The disambiguation code in\n// `parseStatement` will already have parsed the init statement or\n// expression.\n\n\npp$1.parseFor = function (node, init) {\n node.init = init;\n this.expect(types.semi);\n node.test = this.type === types.semi ? null : this.parseExpression();\n this.expect(types.semi);\n node.update = this.type === types.parenR ? null : this.parseExpression();\n this.expect(types.parenR);\n node.body = this.parseStatement(\"for\");\n this.exitScope();\n this.labels.pop();\n return this.finishNode(node, \"ForStatement\");\n}; // Parse a `for`/`in` and `for`/`of` loop, which are almost\n// same from parser's perspective.\n\n\npp$1.parseForIn = function (node, init) {\n var type = this.type === types._in ? \"ForInStatement\" : \"ForOfStatement\";\n this.next();\n\n if (type === \"ForInStatement\") {\n if (init.type === \"AssignmentPattern\" || init.type === \"VariableDeclaration\" && init.declarations[0].init != null && (this.strict || init.declarations[0].id.type !== \"Identifier\")) {\n this.raise(init.start, \"Invalid assignment in for-in loop head\");\n }\n }\n\n node.left = init;\n node.right = type === \"ForInStatement\" ? this.parseExpression() : this.parseMaybeAssign();\n this.expect(types.parenR);\n node.body = this.parseStatement(\"for\");\n this.exitScope();\n this.labels.pop();\n return this.finishNode(node, type);\n}; // Parse a list of variable declarations.\n\n\npp$1.parseVar = function (node, isFor, kind) {\n var this$1 = this;\n node.declarations = [];\n node.kind = kind;\n\n for (;;) {\n var decl = this$1.startNode();\n this$1.parseVarId(decl, kind);\n\n if (this$1.eat(types.eq)) {\n decl.init = this$1.parseMaybeAssign(isFor);\n } else if (kind === \"const\" && !(this$1.type === types._in || this$1.options.ecmaVersion >= 6 && this$1.isContextual(\"of\"))) {\n this$1.unexpected();\n } else if (decl.id.type !== \"Identifier\" && !(isFor && (this$1.type === types._in || this$1.isContextual(\"of\")))) {\n this$1.raise(this$1.lastTokEnd, \"Complex binding patterns require an initialization value\");\n } else {\n decl.init = null;\n }\n\n node.declarations.push(this$1.finishNode(decl, \"VariableDeclarator\"));\n\n if (!this$1.eat(types.comma)) {\n break;\n }\n }\n\n return node;\n};\n\npp$1.parseVarId = function (decl, kind) {\n if ((kind === \"const\" || kind === \"let\") && this.isContextual(\"let\")) {\n this.raiseRecoverable(this.start, \"let is disallowed as a lexically bound name\");\n }\n\n decl.id = this.parseBindingAtom();\n this.checkLVal(decl.id, kind === \"var\" ? BIND_VAR : BIND_LEXICAL, false);\n};\n\nvar FUNC_STATEMENT = 1;\nvar FUNC_HANGING_STATEMENT = 2;\nvar FUNC_NULLABLE_ID = 4; // Parse a function declaration or literal (depending on the\n// `statement & FUNC_STATEMENT`).\n// Remove `allowExpressionBody` for 7.0.0, as it is only called with false\n\npp$1.parseFunction = function (node, statement, allowExpressionBody, isAsync) {\n this.initFunction(node);\n\n if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) {\n if (this.type === types.star && statement & FUNC_HANGING_STATEMENT) {\n this.unexpected();\n }\n\n node.generator = this.eat(types.star);\n }\n\n if (this.options.ecmaVersion >= 8) {\n node.async = !!isAsync;\n }\n\n if (statement & FUNC_STATEMENT) {\n node.id = statement & FUNC_NULLABLE_ID && this.type !== types.name ? null : this.parseIdent();\n\n if (node.id && !(statement & FUNC_HANGING_STATEMENT)) // If it is a regular function declaration in sloppy mode, then it is\n // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding\n // mode depends on properties of the current scope (see\n // treatFunctionsAsVar).\n {\n this.checkLVal(node.id, this.strict || node.generator || node.async ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION);\n }\n }\n\n var oldYieldPos = this.yieldPos,\n oldAwaitPos = this.awaitPos,\n oldAwaitIdentPos = this.awaitIdentPos;\n this.yieldPos = 0;\n this.awaitPos = 0;\n this.awaitIdentPos = 0;\n this.enterScope(functionFlags(node.async, node.generator));\n\n if (!(statement & FUNC_STATEMENT)) {\n node.id = this.type === types.name ? this.parseIdent() : null;\n }\n\n this.parseFunctionParams(node);\n this.parseFunctionBody(node, allowExpressionBody, false);\n this.yieldPos = oldYieldPos;\n this.awaitPos = oldAwaitPos;\n this.awaitIdentPos = oldAwaitIdentPos;\n return this.finishNode(node, statement & FUNC_STATEMENT ? \"FunctionDeclaration\" : \"FunctionExpression\");\n};\n\npp$1.parseFunctionParams = function (node) {\n this.expect(types.parenL);\n node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8);\n this.checkYieldAwaitInDefaultParams();\n}; // Parse a class declaration or literal (depending on the\n// `isStatement` parameter).\n\n\npp$1.parseClass = function (node, isStatement) {\n var this$1 = this;\n this.next(); // ecma-262 14.6 Class Definitions\n // A class definition is always strict mode code.\n\n var oldStrict = this.strict;\n this.strict = true;\n this.parseClassId(node, isStatement);\n this.parseClassSuper(node);\n var classBody = this.startNode();\n var hadConstructor = false;\n classBody.body = [];\n this.expect(types.braceL);\n\n while (!this.eat(types.braceR)) {\n var element = this$1.parseClassElement(node.superClass !== null);\n\n if (element) {\n classBody.body.push(element);\n\n if (element.type === \"MethodDefinition\" && element.kind === \"constructor\") {\n if (hadConstructor) {\n this$1.raise(element.start, \"Duplicate constructor in the same class\");\n }\n\n hadConstructor = true;\n }\n }\n }\n\n node.body = this.finishNode(classBody, \"ClassBody\");\n this.strict = oldStrict;\n return this.finishNode(node, isStatement ? \"ClassDeclaration\" : \"ClassExpression\");\n};\n\npp$1.parseClassElement = function (constructorAllowsSuper) {\n var this$1 = this;\n\n if (this.eat(types.semi)) {\n return null;\n }\n\n var method = this.startNode();\n\n var tryContextual = function tryContextual(k, noLineBreak) {\n if (noLineBreak === void 0) noLineBreak = false;\n var start = this$1.start,\n startLoc = this$1.startLoc;\n\n if (!this$1.eatContextual(k)) {\n return false;\n }\n\n if (this$1.type !== types.parenL && (!noLineBreak || !this$1.canInsertSemicolon())) {\n return true;\n }\n\n if (method.key) {\n this$1.unexpected();\n }\n\n method.computed = false;\n method.key = this$1.startNodeAt(start, startLoc);\n method.key.name = k;\n this$1.finishNode(method.key, \"Identifier\");\n return false;\n };\n\n method.kind = \"method\";\n method.static = tryContextual(\"static\");\n var isGenerator = this.eat(types.star);\n var isAsync = false;\n\n if (!isGenerator) {\n if (this.options.ecmaVersion >= 8 && tryContextual(\"async\", true)) {\n isAsync = true;\n isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star);\n } else if (tryContextual(\"get\")) {\n method.kind = \"get\";\n } else if (tryContextual(\"set\")) {\n method.kind = \"set\";\n }\n }\n\n if (!method.key) {\n this.parsePropertyName(method);\n }\n\n var key = method.key;\n var allowsDirectSuper = false;\n\n if (!method.computed && !method.static && (key.type === \"Identifier\" && key.name === \"constructor\" || key.type === \"Literal\" && key.value === \"constructor\")) {\n if (method.kind !== \"method\") {\n this.raise(key.start, \"Constructor can't have get/set modifier\");\n }\n\n if (isGenerator) {\n this.raise(key.start, \"Constructor can't be a generator\");\n }\n\n if (isAsync) {\n this.raise(key.start, \"Constructor can't be an async method\");\n }\n\n method.kind = \"constructor\";\n allowsDirectSuper = constructorAllowsSuper;\n } else if (method.static && key.type === \"Identifier\" && key.name === \"prototype\") {\n this.raise(key.start, \"Classes may not have a static property named prototype\");\n }\n\n this.parseClassMethod(method, isGenerator, isAsync, allowsDirectSuper);\n\n if (method.kind === \"get\" && method.value.params.length !== 0) {\n this.raiseRecoverable(method.value.start, \"getter should have no params\");\n }\n\n if (method.kind === \"set\" && method.value.params.length !== 1) {\n this.raiseRecoverable(method.value.start, \"setter should have exactly one param\");\n }\n\n if (method.kind === \"set\" && method.value.params[0].type === \"RestElement\") {\n this.raiseRecoverable(method.value.params[0].start, \"Setter cannot use rest params\");\n }\n\n return method;\n};\n\npp$1.parseClassMethod = function (method, isGenerator, isAsync, allowsDirectSuper) {\n method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper);\n return this.finishNode(method, \"MethodDefinition\");\n};\n\npp$1.parseClassId = function (node, isStatement) {\n if (this.type === types.name) {\n node.id = this.parseIdent();\n\n if (isStatement) {\n this.checkLVal(node.id, BIND_LEXICAL, false);\n }\n } else {\n if (isStatement === true) {\n this.unexpected();\n }\n\n node.id = null;\n }\n};\n\npp$1.parseClassSuper = function (node) {\n node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null;\n}; // Parses module export declaration.\n\n\npp$1.parseExport = function (node, exports) {\n var this$1 = this;\n this.next(); // export * from '...'\n\n if (this.eat(types.star)) {\n this.expectContextual(\"from\");\n\n if (this.type !== types.string) {\n this.unexpected();\n }\n\n node.source = this.parseExprAtom();\n this.semicolon();\n return this.finishNode(node, \"ExportAllDeclaration\");\n }\n\n if (this.eat(types._default)) {\n // export default ...\n this.checkExport(exports, \"default\", this.lastTokStart);\n var isAsync;\n\n if (this.type === types._function || (isAsync = this.isAsyncFunction())) {\n var fNode = this.startNode();\n this.next();\n\n if (isAsync) {\n this.next();\n }\n\n node.declaration = this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync);\n } else if (this.type === types._class) {\n var cNode = this.startNode();\n node.declaration = this.parseClass(cNode, \"nullableID\");\n } else {\n node.declaration = this.parseMaybeAssign();\n this.semicolon();\n }\n\n return this.finishNode(node, \"ExportDefaultDeclaration\");\n } // export var|const|let|function|class ...\n\n\n if (this.shouldParseExportStatement()) {\n node.declaration = this.parseStatement(null);\n\n if (node.declaration.type === \"VariableDeclaration\") {\n this.checkVariableExport(exports, node.declaration.declarations);\n } else {\n this.checkExport(exports, node.declaration.id.name, node.declaration.id.start);\n }\n\n node.specifiers = [];\n node.source = null;\n } else {\n // export { x, y as z } [from '...']\n node.declaration = null;\n node.specifiers = this.parseExportSpecifiers(exports);\n\n if (this.eatContextual(\"from\")) {\n if (this.type !== types.string) {\n this.unexpected();\n }\n\n node.source = this.parseExprAtom();\n } else {\n for (var i = 0, list = node.specifiers; i < list.length; i += 1) {\n // check for keywords used as local names\n var spec = list[i];\n this$1.checkUnreserved(spec.local); // check if export is defined\n\n this$1.checkLocalExport(spec.local);\n }\n\n node.source = null;\n }\n\n this.semicolon();\n }\n\n return this.finishNode(node, \"ExportNamedDeclaration\");\n};\n\npp$1.checkExport = function (exports, name, pos) {\n if (!exports) {\n return;\n }\n\n if (has(exports, name)) {\n this.raiseRecoverable(pos, \"Duplicate export '\" + name + \"'\");\n }\n\n exports[name] = true;\n};\n\npp$1.checkPatternExport = function (exports, pat) {\n var this$1 = this;\n var type = pat.type;\n\n if (type === \"Identifier\") {\n this.checkExport(exports, pat.name, pat.start);\n } else if (type === \"ObjectPattern\") {\n for (var i = 0, list = pat.properties; i < list.length; i += 1) {\n var prop = list[i];\n this$1.checkPatternExport(exports, prop);\n }\n } else if (type === \"ArrayPattern\") {\n for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {\n var elt = list$1[i$1];\n\n if (elt) {\n this$1.checkPatternExport(exports, elt);\n }\n }\n } else if (type === \"Property\") {\n this.checkPatternExport(exports, pat.value);\n } else if (type === \"AssignmentPattern\") {\n this.checkPatternExport(exports, pat.left);\n } else if (type === \"RestElement\") {\n this.checkPatternExport(exports, pat.argument);\n } else if (type === \"ParenthesizedExpression\") {\n this.checkPatternExport(exports, pat.expression);\n }\n};\n\npp$1.checkVariableExport = function (exports, decls) {\n var this$1 = this;\n\n if (!exports) {\n return;\n }\n\n for (var i = 0, list = decls; i < list.length; i += 1) {\n var decl = list[i];\n this$1.checkPatternExport(exports, decl.id);\n }\n};\n\npp$1.shouldParseExportStatement = function () {\n return this.type.keyword === \"var\" || this.type.keyword === \"const\" || this.type.keyword === \"class\" || this.type.keyword === \"function\" || this.isLet() || this.isAsyncFunction();\n}; // Parses a comma-separated list of module exports.\n\n\npp$1.parseExportSpecifiers = function (exports) {\n var this$1 = this;\n var nodes = [],\n first = true; // export { x, y as z } [from '...']\n\n this.expect(types.braceL);\n\n while (!this.eat(types.braceR)) {\n if (!first) {\n this$1.expect(types.comma);\n\n if (this$1.afterTrailingComma(types.braceR)) {\n break;\n }\n } else {\n first = false;\n }\n\n var node = this$1.startNode();\n node.local = this$1.parseIdent(true);\n node.exported = this$1.eatContextual(\"as\") ? this$1.parseIdent(true) : node.local;\n this$1.checkExport(exports, node.exported.name, node.exported.start);\n nodes.push(this$1.finishNode(node, \"ExportSpecifier\"));\n }\n\n return nodes;\n}; // Parses import declaration.\n\n\npp$1.parseImport = function (node) {\n this.next(); // import '...'\n\n if (this.type === types.string) {\n node.specifiers = empty;\n node.source = this.parseExprAtom();\n } else {\n node.specifiers = this.parseImportSpecifiers();\n this.expectContextual(\"from\");\n node.source = this.type === types.string ? this.parseExprAtom() : this.unexpected();\n }\n\n this.semicolon();\n return this.finishNode(node, \"ImportDeclaration\");\n}; // Parses a comma-separated list of module imports.\n\n\npp$1.parseImportSpecifiers = function () {\n var this$1 = this;\n var nodes = [],\n first = true;\n\n if (this.type === types.name) {\n // import defaultObj, { x, y as z } from '...'\n var node = this.startNode();\n node.local = this.parseIdent();\n this.checkLVal(node.local, BIND_LEXICAL);\n nodes.push(this.finishNode(node, \"ImportDefaultSpecifier\"));\n\n if (!this.eat(types.comma)) {\n return nodes;\n }\n }\n\n if (this.type === types.star) {\n var node$1 = this.startNode();\n this.next();\n this.expectContextual(\"as\");\n node$1.local = this.parseIdent();\n this.checkLVal(node$1.local, BIND_LEXICAL);\n nodes.push(this.finishNode(node$1, \"ImportNamespaceSpecifier\"));\n return nodes;\n }\n\n this.expect(types.braceL);\n\n while (!this.eat(types.braceR)) {\n if (!first) {\n this$1.expect(types.comma);\n\n if (this$1.afterTrailingComma(types.braceR)) {\n break;\n }\n } else {\n first = false;\n }\n\n var node$2 = this$1.startNode();\n node$2.imported = this$1.parseIdent(true);\n\n if (this$1.eatContextual(\"as\")) {\n node$2.local = this$1.parseIdent();\n } else {\n this$1.checkUnreserved(node$2.imported);\n node$2.local = node$2.imported;\n }\n\n this$1.checkLVal(node$2.local, BIND_LEXICAL);\n nodes.push(this$1.finishNode(node$2, \"ImportSpecifier\"));\n }\n\n return nodes;\n}; // Set `ExpressionStatement#directive` property for directive prologues.\n\n\npp$1.adaptDirectivePrologue = function (statements) {\n for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) {\n statements[i].directive = statements[i].expression.raw.slice(1, -1);\n }\n};\n\npp$1.isDirectiveCandidate = function (statement) {\n return statement.type === \"ExpressionStatement\" && statement.expression.type === \"Literal\" && typeof statement.expression.value === \"string\" && ( // Reject parenthesized strings.\n this.input[statement.start] === \"\\\"\" || this.input[statement.start] === \"'\");\n};\n\nvar pp$2 = Parser.prototype; // Convert existing expression atom to assignable pattern\n// if possible.\n\npp$2.toAssignable = function (node, isBinding, refDestructuringErrors) {\n var this$1 = this;\n\n if (this.options.ecmaVersion >= 6 && node) {\n switch (node.type) {\n case \"Identifier\":\n if (this.inAsync && node.name === \"await\") {\n this.raise(node.start, \"Cannot use 'await' as identifier inside an async function\");\n }\n\n break;\n\n case \"ObjectPattern\":\n case \"ArrayPattern\":\n case \"RestElement\":\n break;\n\n case \"ObjectExpression\":\n node.type = \"ObjectPattern\";\n\n if (refDestructuringErrors) {\n this.checkPatternErrors(refDestructuringErrors, true);\n }\n\n for (var i = 0, list = node.properties; i < list.length; i += 1) {\n var prop = list[i];\n this$1.toAssignable(prop, isBinding); // Early error:\n // AssignmentRestProperty[Yield, Await] :\n // `...` DestructuringAssignmentTarget[Yield, Await]\n //\n // It is a Syntax Error if |DestructuringAssignmentTarget| is an |ArrayLiteral| or an |ObjectLiteral|.\n\n if (prop.type === \"RestElement\" && (prop.argument.type === \"ArrayPattern\" || prop.argument.type === \"ObjectPattern\")) {\n this$1.raise(prop.argument.start, \"Unexpected token\");\n }\n }\n\n break;\n\n case \"Property\":\n // AssignmentProperty has type === \"Property\"\n if (node.kind !== \"init\") {\n this.raise(node.key.start, \"Object pattern can't contain getter or setter\");\n }\n\n this.toAssignable(node.value, isBinding);\n break;\n\n case \"ArrayExpression\":\n node.type = \"ArrayPattern\";\n\n if (refDestructuringErrors) {\n this.checkPatternErrors(refDestructuringErrors, true);\n }\n\n this.toAssignableList(node.elements, isBinding);\n break;\n\n case \"SpreadElement\":\n node.type = \"RestElement\";\n this.toAssignable(node.argument, isBinding);\n\n if (node.argument.type === \"AssignmentPattern\") {\n this.raise(node.argument.start, \"Rest elements cannot have a default value\");\n }\n\n break;\n\n case \"AssignmentExpression\":\n if (node.operator !== \"=\") {\n this.raise(node.left.end, \"Only '=' operator can be used for specifying default value.\");\n }\n\n node.type = \"AssignmentPattern\";\n delete node.operator;\n this.toAssignable(node.left, isBinding);\n // falls through to AssignmentPattern\n\n case \"AssignmentPattern\":\n break;\n\n case \"ParenthesizedExpression\":\n this.toAssignable(node.expression, isBinding, refDestructuringErrors);\n break;\n\n case \"MemberExpression\":\n if (!isBinding) {\n break;\n }\n\n default:\n this.raise(node.start, \"Assigning to rvalue\");\n }\n } else if (refDestructuringErrors) {\n this.checkPatternErrors(refDestructuringErrors, true);\n }\n\n return node;\n}; // Convert list of expression atoms to binding list.\n\n\npp$2.toAssignableList = function (exprList, isBinding) {\n var this$1 = this;\n var end = exprList.length;\n\n for (var i = 0; i < end; i++) {\n var elt = exprList[i];\n\n if (elt) {\n this$1.toAssignable(elt, isBinding);\n }\n }\n\n if (end) {\n var last = exprList[end - 1];\n\n if (this.options.ecmaVersion === 6 && isBinding && last && last.type === \"RestElement\" && last.argument.type !== \"Identifier\") {\n this.unexpected(last.argument.start);\n }\n }\n\n return exprList;\n}; // Parses spread element.\n\n\npp$2.parseSpread = function (refDestructuringErrors) {\n var node = this.startNode();\n this.next();\n node.argument = this.parseMaybeAssign(false, refDestructuringErrors);\n return this.finishNode(node, \"SpreadElement\");\n};\n\npp$2.parseRestBinding = function () {\n var node = this.startNode();\n this.next(); // RestElement inside of a function parameter must be an identifier\n\n if (this.options.ecmaVersion === 6 && this.type !== types.name) {\n this.unexpected();\n }\n\n node.argument = this.parseBindingAtom();\n return this.finishNode(node, \"RestElement\");\n}; // Parses lvalue (assignable) atom.\n\n\npp$2.parseBindingAtom = function () {\n if (this.options.ecmaVersion >= 6) {\n switch (this.type) {\n case types.bracketL:\n var node = this.startNode();\n this.next();\n node.elements = this.parseBindingList(types.bracketR, true, true);\n return this.finishNode(node, \"ArrayPattern\");\n\n case types.braceL:\n return this.parseObj(true);\n }\n }\n\n return this.parseIdent();\n};\n\npp$2.parseBindingList = function (close, allowEmpty, allowTrailingComma) {\n var this$1 = this;\n var elts = [],\n first = true;\n\n while (!this.eat(close)) {\n if (first) {\n first = false;\n } else {\n this$1.expect(types.comma);\n }\n\n if (allowEmpty && this$1.type === types.comma) {\n elts.push(null);\n } else if (allowTrailingComma && this$1.afterTrailingComma(close)) {\n break;\n } else if (this$1.type === types.ellipsis) {\n var rest = this$1.parseRestBinding();\n this$1.parseBindingListItem(rest);\n elts.push(rest);\n\n if (this$1.type === types.comma) {\n this$1.raise(this$1.start, \"Comma is not permitted after the rest element\");\n }\n\n this$1.expect(close);\n break;\n } else {\n var elem = this$1.parseMaybeDefault(this$1.start, this$1.startLoc);\n this$1.parseBindingListItem(elem);\n elts.push(elem);\n }\n }\n\n return elts;\n};\n\npp$2.parseBindingListItem = function (param) {\n return param;\n}; // Parses assignment pattern around given atom if possible.\n\n\npp$2.parseMaybeDefault = function (startPos, startLoc, left) {\n left = left || this.parseBindingAtom();\n\n if (this.options.ecmaVersion < 6 || !this.eat(types.eq)) {\n return left;\n }\n\n var node = this.startNodeAt(startPos, startLoc);\n node.left = left;\n node.right = this.parseMaybeAssign();\n return this.finishNode(node, \"AssignmentPattern\");\n}; // Verify that a node is an lval — something that can be assigned\n// to.\n// bindingType can be either:\n// 'var' indicating that the lval creates a 'var' binding\n// 'let' indicating that the lval creates a lexical ('let' or 'const') binding\n// 'none' indicating that the binding should be checked for illegal identifiers, but not for duplicate references\n\n\npp$2.checkLVal = function (expr, bindingType, checkClashes) {\n var this$1 = this;\n if (bindingType === void 0) bindingType = BIND_NONE;\n\n switch (expr.type) {\n case \"Identifier\":\n if (this.strict && this.reservedWordsStrictBind.test(expr.name)) {\n this.raiseRecoverable(expr.start, (bindingType ? \"Binding \" : \"Assigning to \") + expr.name + \" in strict mode\");\n }\n\n if (checkClashes) {\n if (has(checkClashes, expr.name)) {\n this.raiseRecoverable(expr.start, \"Argument name clash\");\n }\n\n checkClashes[expr.name] = true;\n }\n\n if (bindingType !== BIND_NONE && bindingType !== BIND_OUTSIDE) {\n this.declareName(expr.name, bindingType, expr.start);\n }\n\n break;\n\n case \"MemberExpression\":\n if (bindingType) {\n this.raiseRecoverable(expr.start, \"Binding member expression\");\n }\n\n break;\n\n case \"ObjectPattern\":\n for (var i = 0, list = expr.properties; i < list.length; i += 1) {\n var prop = list[i];\n this$1.checkLVal(prop, bindingType, checkClashes);\n }\n\n break;\n\n case \"Property\":\n // AssignmentProperty has type === \"Property\"\n this.checkLVal(expr.value, bindingType, checkClashes);\n break;\n\n case \"ArrayPattern\":\n for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) {\n var elem = list$1[i$1];\n\n if (elem) {\n this$1.checkLVal(elem, bindingType, checkClashes);\n }\n }\n\n break;\n\n case \"AssignmentPattern\":\n this.checkLVal(expr.left, bindingType, checkClashes);\n break;\n\n case \"RestElement\":\n this.checkLVal(expr.argument, bindingType, checkClashes);\n break;\n\n case \"ParenthesizedExpression\":\n this.checkLVal(expr.expression, bindingType, checkClashes);\n break;\n\n default:\n this.raise(expr.start, (bindingType ? \"Binding\" : \"Assigning to\") + \" rvalue\");\n }\n}; // A recursive descent parser operates by defining functions for all\n// syntactic elements, and recursively calling those, each function\n// advancing the input stream and returning an AST node. Precedence\n// of constructs (for example, the fact that `!x[1]` means `!(x[1])`\n// instead of `(!x)[1]` is handled by the fact that the parser\n// function that parses unary prefix operators is called first, and\n// in turn calls the function that parses `[]` subscripts — that\n// way, it'll receive the node for `x[1]` already parsed, and wraps\n// *that* in the unary operator node.\n//\n// Acorn uses an [operator precedence parser][opp] to handle binary\n// operator precedence, because it is much more compact than using\n// the technique outlined above, which uses different, nesting\n// functions to specify precedence, for all of the ten binary\n// precedence levels that JavaScript defines.\n//\n// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser\n\n\nvar pp$3 = Parser.prototype; // Check if property name clashes with already added.\n// Object/class getters and setters are not allowed to clash —\n// either with each other or with an init property — and in\n// strict mode, init properties are also not allowed to be repeated.\n\npp$3.checkPropClash = function (prop, propHash, refDestructuringErrors) {\n if (this.options.ecmaVersion >= 9 && prop.type === \"SpreadElement\") {\n return;\n }\n\n if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) {\n return;\n }\n\n var key = prop.key;\n var name;\n\n switch (key.type) {\n case \"Identifier\":\n name = key.name;\n break;\n\n case \"Literal\":\n name = String(key.value);\n break;\n\n default:\n return;\n }\n\n var kind = prop.kind;\n\n if (this.options.ecmaVersion >= 6) {\n if (name === \"__proto__\" && kind === \"init\") {\n if (propHash.proto) {\n if (refDestructuringErrors && refDestructuringErrors.doubleProto < 0) {\n refDestructuringErrors.doubleProto = key.start;\n } // Backwards-compat kludge. Can be removed in version 6.0\n else {\n this.raiseRecoverable(key.start, \"Redefinition of __proto__ property\");\n }\n }\n\n propHash.proto = true;\n }\n\n return;\n }\n\n name = \"$\" + name;\n var other = propHash[name];\n\n if (other) {\n var redefinition;\n\n if (kind === \"init\") {\n redefinition = this.strict && other.init || other.get || other.set;\n } else {\n redefinition = other.init || other[kind];\n }\n\n if (redefinition) {\n this.raiseRecoverable(key.start, \"Redefinition of property\");\n }\n } else {\n other = propHash[name] = {\n init: false,\n get: false,\n set: false\n };\n }\n\n other[kind] = true;\n}; // ### Expression parsing\n// These nest, from the most general expression type at the top to\n// 'atomic', nondivisible expression types at the bottom. Most of\n// the functions will simply let the function(s) below them parse,\n// and, *if* the syntactic construct they handle is present, wrap\n// the AST node that the inner parser gave them in another node.\n// Parse a full expression. The optional arguments are used to\n// forbid the `in` operator (in for loops initalization expressions)\n// and provide reference for storing '=' operator inside shorthand\n// property assignment in contexts where both object expression\n// and object pattern might appear (so it's possible to raise\n// delayed syntax error at correct position).\n\n\npp$3.parseExpression = function (noIn, refDestructuringErrors) {\n var this$1 = this;\n var startPos = this.start,\n startLoc = this.startLoc;\n var expr = this.parseMaybeAssign(noIn, refDestructuringErrors);\n\n if (this.type === types.comma) {\n var node = this.startNodeAt(startPos, startLoc);\n node.expressions = [expr];\n\n while (this.eat(types.comma)) {\n node.expressions.push(this$1.parseMaybeAssign(noIn, refDestructuringErrors));\n }\n\n return this.finishNode(node, \"SequenceExpression\");\n }\n\n return expr;\n}; // Parse an assignment expression. This includes applications of\n// operators like `+=`.\n\n\npp$3.parseMaybeAssign = function (noIn, refDestructuringErrors, afterLeftParse) {\n if (this.isContextual(\"yield\")) {\n if (this.inGenerator) {\n return this.parseYield(noIn);\n } // The tokenizer will assume an expression is allowed after\n // `yield`, but this isn't that kind of yield\n else {\n this.exprAllowed = false;\n }\n }\n\n var ownDestructuringErrors = false,\n oldParenAssign = -1,\n oldTrailingComma = -1,\n oldShorthandAssign = -1;\n\n if (refDestructuringErrors) {\n oldParenAssign = refDestructuringErrors.parenthesizedAssign;\n oldTrailingComma = refDestructuringErrors.trailingComma;\n oldShorthandAssign = refDestructuringErrors.shorthandAssign;\n refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.shorthandAssign = -1;\n } else {\n refDestructuringErrors = new DestructuringErrors();\n ownDestructuringErrors = true;\n }\n\n var startPos = this.start,\n startLoc = this.startLoc;\n\n if (this.type === types.parenL || this.type === types.name) {\n this.potentialArrowAt = this.start;\n }\n\n var left = this.parseMaybeConditional(noIn, refDestructuringErrors);\n\n if (afterLeftParse) {\n left = afterLeftParse.call(this, left, startPos, startLoc);\n }\n\n if (this.type.isAssign) {\n var node = this.startNodeAt(startPos, startLoc);\n node.operator = this.value;\n node.left = this.type === types.eq ? this.toAssignable(left, false, refDestructuringErrors) : left;\n\n if (!ownDestructuringErrors) {\n DestructuringErrors.call(refDestructuringErrors);\n }\n\n refDestructuringErrors.shorthandAssign = -1; // reset because shorthand default was used correctly\n\n this.checkLVal(left);\n this.next();\n node.right = this.parseMaybeAssign(noIn);\n return this.finishNode(node, \"AssignmentExpression\");\n } else {\n if (ownDestructuringErrors) {\n this.checkExpressionErrors(refDestructuringErrors, true);\n }\n }\n\n if (oldParenAssign > -1) {\n refDestructuringErrors.parenthesizedAssign = oldParenAssign;\n }\n\n if (oldTrailingComma > -1) {\n refDestructuringErrors.trailingComma = oldTrailingComma;\n }\n\n if (oldShorthandAssign > -1) {\n refDestructuringErrors.shorthandAssign = oldShorthandAssign;\n }\n\n return left;\n}; // Parse a ternary conditional (`?:`) operator.\n\n\npp$3.parseMaybeConditional = function (noIn, refDestructuringErrors) {\n var startPos = this.start,\n startLoc = this.startLoc;\n var expr = this.parseExprOps(noIn, refDestructuringErrors);\n\n if (this.checkExpressionErrors(refDestructuringErrors)) {\n return expr;\n }\n\n if (this.eat(types.question)) {\n var node = this.startNodeAt(startPos, startLoc);\n node.test = expr;\n node.consequent = this.parseMaybeAssign();\n this.expect(types.colon);\n node.alternate = this.parseMaybeAssign(noIn);\n return this.finishNode(node, \"ConditionalExpression\");\n }\n\n return expr;\n}; // Start the precedence parser.\n\n\npp$3.parseExprOps = function (noIn, refDestructuringErrors) {\n var startPos = this.start,\n startLoc = this.startLoc;\n var expr = this.parseMaybeUnary(refDestructuringErrors, false);\n\n if (this.checkExpressionErrors(refDestructuringErrors)) {\n return expr;\n }\n\n return expr.start === startPos && expr.type === \"ArrowFunctionExpression\" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, noIn);\n}; // Parse binary operators with the operator precedence parsing\n// algorithm. `left` is the left-hand side of the operator.\n// `minPrec` provides context that allows the function to stop and\n// defer further parser to one of its callers when it encounters an\n// operator that has a lower precedence than the set it is parsing.\n\n\npp$3.parseExprOp = function (left, leftStartPos, leftStartLoc, minPrec, noIn) {\n var prec = this.type.binop;\n\n if (prec != null && (!noIn || this.type !== types._in)) {\n if (prec > minPrec) {\n var logical = this.type === types.logicalOR || this.type === types.logicalAND;\n var op = this.value;\n this.next();\n var startPos = this.start,\n startLoc = this.startLoc;\n var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn);\n var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical);\n return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn);\n }\n }\n\n return left;\n};\n\npp$3.buildBinary = function (startPos, startLoc, left, right, op, logical) {\n var node = this.startNodeAt(startPos, startLoc);\n node.left = left;\n node.operator = op;\n node.right = right;\n return this.finishNode(node, logical ? \"LogicalExpression\" : \"BinaryExpression\");\n}; // Parse unary operators, both prefix and postfix.\n\n\npp$3.parseMaybeUnary = function (refDestructuringErrors, sawUnary) {\n var this$1 = this;\n var startPos = this.start,\n startLoc = this.startLoc,\n expr;\n\n if (this.isContextual(\"await\") && (this.inAsync || !this.inFunction && this.options.allowAwaitOutsideFunction)) {\n expr = this.parseAwait();\n sawUnary = true;\n } else if (this.type.prefix) {\n var node = this.startNode(),\n update = this.type === types.incDec;\n node.operator = this.value;\n node.prefix = true;\n this.next();\n node.argument = this.parseMaybeUnary(null, true);\n this.checkExpressionErrors(refDestructuringErrors, true);\n\n if (update) {\n this.checkLVal(node.argument);\n } else if (this.strict && node.operator === \"delete\" && node.argument.type === \"Identifier\") {\n this.raiseRecoverable(node.start, \"Deleting local variable in strict mode\");\n } else {\n sawUnary = true;\n }\n\n expr = this.finishNode(node, update ? \"UpdateExpression\" : \"UnaryExpression\");\n } else {\n expr = this.parseExprSubscripts(refDestructuringErrors);\n\n if (this.checkExpressionErrors(refDestructuringErrors)) {\n return expr;\n }\n\n while (this.type.postfix && !this.canInsertSemicolon()) {\n var node$1 = this$1.startNodeAt(startPos, startLoc);\n node$1.operator = this$1.value;\n node$1.prefix = false;\n node$1.argument = expr;\n this$1.checkLVal(expr);\n this$1.next();\n expr = this$1.finishNode(node$1, \"UpdateExpression\");\n }\n }\n\n if (!sawUnary && this.eat(types.starstar)) {\n return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), \"**\", false);\n } else {\n return expr;\n }\n}; // Parse call, dot, and `[]`-subscript expressions.\n\n\npp$3.parseExprSubscripts = function (refDestructuringErrors) {\n var startPos = this.start,\n startLoc = this.startLoc;\n var expr = this.parseExprAtom(refDestructuringErrors);\n var skipArrowSubscripts = expr.type === \"ArrowFunctionExpression\" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== \")\";\n\n if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) {\n return expr;\n }\n\n var result = this.parseSubscripts(expr, startPos, startLoc);\n\n if (refDestructuringErrors && result.type === \"MemberExpression\") {\n if (refDestructuringErrors.parenthesizedAssign >= result.start) {\n refDestructuringErrors.parenthesizedAssign = -1;\n }\n\n if (refDestructuringErrors.parenthesizedBind >= result.start) {\n refDestructuringErrors.parenthesizedBind = -1;\n }\n }\n\n return result;\n};\n\npp$3.parseSubscripts = function (base, startPos, startLoc, noCalls) {\n var this$1 = this;\n var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === \"Identifier\" && base.name === \"async\" && this.lastTokEnd === base.end && !this.canInsertSemicolon() && this.input.slice(base.start, base.end) === \"async\";\n\n while (true) {\n var element = this$1.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow);\n\n if (element === base || element.type === \"ArrowFunctionExpression\") {\n return element;\n }\n\n base = element;\n }\n};\n\npp$3.parseSubscript = function (base, startPos, startLoc, noCalls, maybeAsyncArrow) {\n var computed = this.eat(types.bracketL);\n\n if (computed || this.eat(types.dot)) {\n var node = this.startNodeAt(startPos, startLoc);\n node.object = base;\n node.property = computed ? this.parseExpression() : this.parseIdent(true);\n node.computed = !!computed;\n\n if (computed) {\n this.expect(types.bracketR);\n }\n\n base = this.finishNode(node, \"MemberExpression\");\n } else if (!noCalls && this.eat(types.parenL)) {\n var refDestructuringErrors = new DestructuringErrors(),\n oldYieldPos = this.yieldPos,\n oldAwaitPos = this.awaitPos,\n oldAwaitIdentPos = this.awaitIdentPos;\n this.yieldPos = 0;\n this.awaitPos = 0;\n this.awaitIdentPos = 0;\n var exprList = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors);\n\n if (maybeAsyncArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) {\n this.checkPatternErrors(refDestructuringErrors, false);\n this.checkYieldAwaitInDefaultParams();\n\n if (this.awaitIdentPos > 0) {\n this.raise(this.awaitIdentPos, \"Cannot use 'await' as identifier inside an async function\");\n }\n\n this.yieldPos = oldYieldPos;\n this.awaitPos = oldAwaitPos;\n this.awaitIdentPos = oldAwaitIdentPos;\n return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true);\n }\n\n this.checkExpressionErrors(refDestructuringErrors, true);\n this.yieldPos = oldYieldPos || this.yieldPos;\n this.awaitPos = oldAwaitPos || this.awaitPos;\n this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos;\n var node$1 = this.startNodeAt(startPos, startLoc);\n node$1.callee = base;\n node$1.arguments = exprList;\n base = this.finishNode(node$1, \"CallExpression\");\n } else if (this.type === types.backQuote) {\n var node$2 = this.startNodeAt(startPos, startLoc);\n node$2.tag = base;\n node$2.quasi = this.parseTemplate({\n isTagged: true\n });\n base = this.finishNode(node$2, \"TaggedTemplateExpression\");\n }\n\n return base;\n}; // Parse an atomic expression — either a single token that is an\n// expression, an expression started by a keyword like `function` or\n// `new`, or an expression wrapped in punctuation like `()`, `[]`,\n// or `{}`.\n\n\npp$3.parseExprAtom = function (refDestructuringErrors) {\n // If a division operator appears in an expression position, the\n // tokenizer got confused, and we force it to read a regexp instead.\n if (this.type === types.slash) {\n this.readRegexp();\n }\n\n var node,\n canBeArrow = this.potentialArrowAt === this.start;\n\n switch (this.type) {\n case types._super:\n if (!this.allowSuper) {\n this.raise(this.start, \"'super' keyword outside a method\");\n }\n\n node = this.startNode();\n this.next();\n\n if (this.type === types.parenL && !this.allowDirectSuper) {\n this.raise(node.start, \"super() call outside constructor of a subclass\");\n } // The `super` keyword can appear at below:\n // SuperProperty:\n // super [ Expression ]\n // super . IdentifierName\n // SuperCall:\n // super Arguments\n\n\n if (this.type !== types.dot && this.type !== types.bracketL && this.type !== types.parenL) {\n this.unexpected();\n }\n\n return this.finishNode(node, \"Super\");\n\n case types._this:\n node = this.startNode();\n this.next();\n return this.finishNode(node, \"ThisExpression\");\n\n case types.name:\n var startPos = this.start,\n startLoc = this.startLoc,\n containsEsc = this.containsEsc;\n var id = this.parseIdent(false);\n\n if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === \"async\" && !this.canInsertSemicolon() && this.eat(types._function)) {\n return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true);\n }\n\n if (canBeArrow && !this.canInsertSemicolon()) {\n if (this.eat(types.arrow)) {\n return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false);\n }\n\n if (this.options.ecmaVersion >= 8 && id.name === \"async\" && this.type === types.name && !containsEsc) {\n id = this.parseIdent(false);\n\n if (this.canInsertSemicolon() || !this.eat(types.arrow)) {\n this.unexpected();\n }\n\n return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true);\n }\n }\n\n return id;\n\n case types.regexp:\n var value = this.value;\n node = this.parseLiteral(value.value);\n node.regex = {\n pattern: value.pattern,\n flags: value.flags\n };\n return node;\n\n case types.num:\n case types.string:\n return this.parseLiteral(this.value);\n\n case types._null:\n case types._true:\n case types._false:\n node = this.startNode();\n node.value = this.type === types._null ? null : this.type === types._true;\n node.raw = this.type.keyword;\n this.next();\n return this.finishNode(node, \"Literal\");\n\n case types.parenL:\n var start = this.start,\n expr = this.parseParenAndDistinguishExpression(canBeArrow);\n\n if (refDestructuringErrors) {\n if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) {\n refDestructuringErrors.parenthesizedAssign = start;\n }\n\n if (refDestructuringErrors.parenthesizedBind < 0) {\n refDestructuringErrors.parenthesizedBind = start;\n }\n }\n\n return expr;\n\n case types.bracketL:\n node = this.startNode();\n this.next();\n node.elements = this.parseExprList(types.bracketR, true, true, refDestructuringErrors);\n return this.finishNode(node, \"ArrayExpression\");\n\n case types.braceL:\n return this.parseObj(false, refDestructuringErrors);\n\n case types._function:\n node = this.startNode();\n this.next();\n return this.parseFunction(node, 0);\n\n case types._class:\n return this.parseClass(this.startNode(), false);\n\n case types._new:\n return this.parseNew();\n\n case types.backQuote:\n return this.parseTemplate();\n\n default:\n this.unexpected();\n }\n};\n\npp$3.parseLiteral = function (value) {\n var node = this.startNode();\n node.value = value;\n node.raw = this.input.slice(this.start, this.end);\n this.next();\n return this.finishNode(node, \"Literal\");\n};\n\npp$3.parseParenExpression = function () {\n this.expect(types.parenL);\n var val = this.parseExpression();\n this.expect(types.parenR);\n return val;\n};\n\npp$3.parseParenAndDistinguishExpression = function (canBeArrow) {\n var this$1 = this;\n var startPos = this.start,\n startLoc = this.startLoc,\n val,\n allowTrailingComma = this.options.ecmaVersion >= 8;\n\n if (this.options.ecmaVersion >= 6) {\n this.next();\n var innerStartPos = this.start,\n innerStartLoc = this.startLoc;\n var exprList = [],\n first = true,\n lastIsComma = false;\n var refDestructuringErrors = new DestructuringErrors(),\n oldYieldPos = this.yieldPos,\n oldAwaitPos = this.awaitPos,\n spreadStart;\n this.yieldPos = 0;\n this.awaitPos = 0; // Do not save awaitIdentPos to allow checking awaits nested in parameters\n\n while (this.type !== types.parenR) {\n first ? first = false : this$1.expect(types.comma);\n\n if (allowTrailingComma && this$1.afterTrailingComma(types.parenR, true)) {\n lastIsComma = true;\n break;\n } else if (this$1.type === types.ellipsis) {\n spreadStart = this$1.start;\n exprList.push(this$1.parseParenItem(this$1.parseRestBinding()));\n\n if (this$1.type === types.comma) {\n this$1.raise(this$1.start, \"Comma is not permitted after the rest element\");\n }\n\n break;\n } else {\n exprList.push(this$1.parseMaybeAssign(false, refDestructuringErrors, this$1.parseParenItem));\n }\n }\n\n var innerEndPos = this.start,\n innerEndLoc = this.startLoc;\n this.expect(types.parenR);\n\n if (canBeArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) {\n this.checkPatternErrors(refDestructuringErrors, false);\n this.checkYieldAwaitInDefaultParams();\n this.yieldPos = oldYieldPos;\n this.awaitPos = oldAwaitPos;\n return this.parseParenArrowList(startPos, startLoc, exprList);\n }\n\n if (!exprList.length || lastIsComma) {\n this.unexpected(this.lastTokStart);\n }\n\n if (spreadStart) {\n this.unexpected(spreadStart);\n }\n\n this.checkExpressionErrors(refDestructuringErrors, true);\n this.yieldPos = oldYieldPos || this.yieldPos;\n this.awaitPos = oldAwaitPos || this.awaitPos;\n\n if (exprList.length > 1) {\n val = this.startNodeAt(innerStartPos, innerStartLoc);\n val.expressions = exprList;\n this.finishNodeAt(val, \"SequenceExpression\", innerEndPos, innerEndLoc);\n } else {\n val = exprList[0];\n }\n } else {\n val = this.parseParenExpression();\n }\n\n if (this.options.preserveParens) {\n var par = this.startNodeAt(startPos, startLoc);\n par.expression = val;\n return this.finishNode(par, \"ParenthesizedExpression\");\n } else {\n return val;\n }\n};\n\npp$3.parseParenItem = function (item) {\n return item;\n};\n\npp$3.parseParenArrowList = function (startPos, startLoc, exprList) {\n return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList);\n}; // New's precedence is slightly tricky. It must allow its argument to\n// be a `[]` or dot subscript expression, but not a call — at least,\n// not without wrapping it in parentheses. Thus, it uses the noCalls\n// argument to parseSubscripts to prevent it from consuming the\n// argument list.\n\n\nvar empty$1 = [];\n\npp$3.parseNew = function () {\n var node = this.startNode();\n var meta = this.parseIdent(true);\n\n if (this.options.ecmaVersion >= 6 && this.eat(types.dot)) {\n node.meta = meta;\n var containsEsc = this.containsEsc;\n node.property = this.parseIdent(true);\n\n if (node.property.name !== \"target\" || containsEsc) {\n this.raiseRecoverable(node.property.start, \"The only valid meta property for new is new.target\");\n }\n\n if (!this.inNonArrowFunction()) {\n this.raiseRecoverable(node.start, \"new.target can only be used in functions\");\n }\n\n return this.finishNode(node, \"MetaProperty\");\n }\n\n var startPos = this.start,\n startLoc = this.startLoc;\n node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);\n\n if (this.eat(types.parenL)) {\n node.arguments = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8, false);\n } else {\n node.arguments = empty$1;\n }\n\n return this.finishNode(node, \"NewExpression\");\n}; // Parse template expression.\n\n\npp$3.parseTemplateElement = function (ref) {\n var isTagged = ref.isTagged;\n var elem = this.startNode();\n\n if (this.type === types.invalidTemplate) {\n if (!isTagged) {\n this.raiseRecoverable(this.start, \"Bad escape sequence in untagged template literal\");\n }\n\n elem.value = {\n raw: this.value,\n cooked: null\n };\n } else {\n elem.value = {\n raw: this.input.slice(this.start, this.end).replace(/\\r\\n?/g, \"\\n\"),\n cooked: this.value\n };\n }\n\n this.next();\n elem.tail = this.type === types.backQuote;\n return this.finishNode(elem, \"TemplateElement\");\n};\n\npp$3.parseTemplate = function (ref) {\n var this$1 = this;\n if (ref === void 0) ref = {};\n var isTagged = ref.isTagged;\n if (isTagged === void 0) isTagged = false;\n var node = this.startNode();\n this.next();\n node.expressions = [];\n var curElt = this.parseTemplateElement({\n isTagged: isTagged\n });\n node.quasis = [curElt];\n\n while (!curElt.tail) {\n if (this$1.type === types.eof) {\n this$1.raise(this$1.pos, \"Unterminated template literal\");\n }\n\n this$1.expect(types.dollarBraceL);\n node.expressions.push(this$1.parseExpression());\n this$1.expect(types.braceR);\n node.quasis.push(curElt = this$1.parseTemplateElement({\n isTagged: isTagged\n }));\n }\n\n this.next();\n return this.finishNode(node, \"TemplateLiteral\");\n};\n\npp$3.isAsyncProp = function (prop) {\n return !prop.computed && prop.key.type === \"Identifier\" && prop.key.name === \"async\" && (this.type === types.name || this.type === types.num || this.type === types.string || this.type === types.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === types.star) && !lineBreak.test(this.input.slice(this.lastTokEnd, this.start));\n}; // Parse an object literal or binding pattern.\n\n\npp$3.parseObj = function (isPattern, refDestructuringErrors) {\n var this$1 = this;\n var node = this.startNode(),\n first = true,\n propHash = {};\n node.properties = [];\n this.next();\n\n while (!this.eat(types.braceR)) {\n if (!first) {\n this$1.expect(types.comma);\n\n if (this$1.afterTrailingComma(types.braceR)) {\n break;\n }\n } else {\n first = false;\n }\n\n var prop = this$1.parseProperty(isPattern, refDestructuringErrors);\n\n if (!isPattern) {\n this$1.checkPropClash(prop, propHash, refDestructuringErrors);\n }\n\n node.properties.push(prop);\n }\n\n return this.finishNode(node, isPattern ? \"ObjectPattern\" : \"ObjectExpression\");\n};\n\npp$3.parseProperty = function (isPattern, refDestructuringErrors) {\n var prop = this.startNode(),\n isGenerator,\n isAsync,\n startPos,\n startLoc;\n\n if (this.options.ecmaVersion >= 9 && this.eat(types.ellipsis)) {\n if (isPattern) {\n prop.argument = this.parseIdent(false);\n\n if (this.type === types.comma) {\n this.raise(this.start, \"Comma is not permitted after the rest element\");\n }\n\n return this.finishNode(prop, \"RestElement\");\n } // To disallow parenthesized identifier via `this.toAssignable()`.\n\n\n if (this.type === types.parenL && refDestructuringErrors) {\n if (refDestructuringErrors.parenthesizedAssign < 0) {\n refDestructuringErrors.parenthesizedAssign = this.start;\n }\n\n if (refDestructuringErrors.parenthesizedBind < 0) {\n refDestructuringErrors.parenthesizedBind = this.start;\n }\n } // Parse argument.\n\n\n prop.argument = this.parseMaybeAssign(false, refDestructuringErrors); // To disallow trailing comma via `this.toAssignable()`.\n\n if (this.type === types.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) {\n refDestructuringErrors.trailingComma = this.start;\n } // Finish\n\n\n return this.finishNode(prop, \"SpreadElement\");\n }\n\n if (this.options.ecmaVersion >= 6) {\n prop.method = false;\n prop.shorthand = false;\n\n if (isPattern || refDestructuringErrors) {\n startPos = this.start;\n startLoc = this.startLoc;\n }\n\n if (!isPattern) {\n isGenerator = this.eat(types.star);\n }\n }\n\n var containsEsc = this.containsEsc;\n this.parsePropertyName(prop);\n\n if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) {\n isAsync = true;\n isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star);\n this.parsePropertyName(prop, refDestructuringErrors);\n } else {\n isAsync = false;\n }\n\n this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc);\n return this.finishNode(prop, \"Property\");\n};\n\npp$3.parsePropertyValue = function (prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) {\n if ((isGenerator || isAsync) && this.type === types.colon) {\n this.unexpected();\n }\n\n if (this.eat(types.colon)) {\n prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors);\n prop.kind = \"init\";\n } else if (this.options.ecmaVersion >= 6 && this.type === types.parenL) {\n if (isPattern) {\n this.unexpected();\n }\n\n prop.kind = \"init\";\n prop.method = true;\n prop.value = this.parseMethod(isGenerator, isAsync);\n } else if (!isPattern && !containsEsc && this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === \"Identifier\" && (prop.key.name === \"get\" || prop.key.name === \"set\") && this.type !== types.comma && this.type !== types.braceR) {\n if (isGenerator || isAsync) {\n this.unexpected();\n }\n\n prop.kind = prop.key.name;\n this.parsePropertyName(prop);\n prop.value = this.parseMethod(false);\n var paramCount = prop.kind === \"get\" ? 0 : 1;\n\n if (prop.value.params.length !== paramCount) {\n var start = prop.value.start;\n\n if (prop.kind === \"get\") {\n this.raiseRecoverable(start, \"getter should have no params\");\n } else {\n this.raiseRecoverable(start, \"setter should have exactly one param\");\n }\n } else {\n if (prop.kind === \"set\" && prop.value.params[0].type === \"RestElement\") {\n this.raiseRecoverable(prop.value.params[0].start, \"Setter cannot use rest params\");\n }\n }\n } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === \"Identifier\") {\n if (isGenerator || isAsync) {\n this.unexpected();\n }\n\n this.checkUnreserved(prop.key);\n\n if (prop.key.name === \"await\" && !this.awaitIdentPos) {\n this.awaitIdentPos = startPos;\n }\n\n prop.kind = \"init\";\n\n if (isPattern) {\n prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key);\n } else if (this.type === types.eq && refDestructuringErrors) {\n if (refDestructuringErrors.shorthandAssign < 0) {\n refDestructuringErrors.shorthandAssign = this.start;\n }\n\n prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key);\n } else {\n prop.value = prop.key;\n }\n\n prop.shorthand = true;\n } else {\n this.unexpected();\n }\n};\n\npp$3.parsePropertyName = function (prop) {\n if (this.options.ecmaVersion >= 6) {\n if (this.eat(types.bracketL)) {\n prop.computed = true;\n prop.key = this.parseMaybeAssign();\n this.expect(types.bracketR);\n return prop.key;\n } else {\n prop.computed = false;\n }\n }\n\n return prop.key = this.type === types.num || this.type === types.string ? this.parseExprAtom() : this.parseIdent(true);\n}; // Initialize empty function node.\n\n\npp$3.initFunction = function (node) {\n node.id = null;\n\n if (this.options.ecmaVersion >= 6) {\n node.generator = node.expression = false;\n }\n\n if (this.options.ecmaVersion >= 8) {\n node.async = false;\n }\n}; // Parse object or class method.\n\n\npp$3.parseMethod = function (isGenerator, isAsync, allowDirectSuper) {\n var node = this.startNode(),\n oldYieldPos = this.yieldPos,\n oldAwaitPos = this.awaitPos,\n oldAwaitIdentPos = this.awaitIdentPos;\n this.initFunction(node);\n\n if (this.options.ecmaVersion >= 6) {\n node.generator = isGenerator;\n }\n\n if (this.options.ecmaVersion >= 8) {\n node.async = !!isAsync;\n }\n\n this.yieldPos = 0;\n this.awaitPos = 0;\n this.awaitIdentPos = 0;\n this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0));\n this.expect(types.parenL);\n node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8);\n this.checkYieldAwaitInDefaultParams();\n this.parseFunctionBody(node, false, true);\n this.yieldPos = oldYieldPos;\n this.awaitPos = oldAwaitPos;\n this.awaitIdentPos = oldAwaitIdentPos;\n return this.finishNode(node, \"FunctionExpression\");\n}; // Parse arrow function expression with given parameters.\n\n\npp$3.parseArrowExpression = function (node, params, isAsync) {\n var oldYieldPos = this.yieldPos,\n oldAwaitPos = this.awaitPos,\n oldAwaitIdentPos = this.awaitIdentPos;\n this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW);\n this.initFunction(node);\n\n if (this.options.ecmaVersion >= 8) {\n node.async = !!isAsync;\n }\n\n this.yieldPos = 0;\n this.awaitPos = 0;\n this.awaitIdentPos = 0;\n node.params = this.toAssignableList(params, true);\n this.parseFunctionBody(node, true, false);\n this.yieldPos = oldYieldPos;\n this.awaitPos = oldAwaitPos;\n this.awaitIdentPos = oldAwaitIdentPos;\n return this.finishNode(node, \"ArrowFunctionExpression\");\n}; // Parse function body and check parameters.\n\n\npp$3.parseFunctionBody = function (node, isArrowFunction, isMethod) {\n var isExpression = isArrowFunction && this.type !== types.braceL;\n var oldStrict = this.strict,\n useStrict = false;\n\n if (isExpression) {\n node.body = this.parseMaybeAssign();\n node.expression = true;\n this.checkParams(node, false);\n } else {\n var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params);\n\n if (!oldStrict || nonSimple) {\n useStrict = this.strictDirective(this.end); // If this is a strict mode function, verify that argument names\n // are not repeated, and it does not try to bind the words `eval`\n // or `arguments`.\n\n if (useStrict && nonSimple) {\n this.raiseRecoverable(node.start, \"Illegal 'use strict' directive in function with non-simple parameter list\");\n }\n } // Start a new scope with regard to labels and the `inFunction`\n // flag (restore them to their old value afterwards).\n\n\n var oldLabels = this.labels;\n this.labels = [];\n\n if (useStrict) {\n this.strict = true;\n } // Add the params to varDeclaredNames to ensure that an error is thrown\n // if a let/const declaration in the function clashes with one of the params.\n\n\n this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params));\n node.body = this.parseBlock(false);\n node.expression = false;\n this.adaptDirectivePrologue(node.body.body);\n this.labels = oldLabels;\n }\n\n this.exitScope(); // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval'\n\n if (this.strict && node.id) {\n this.checkLVal(node.id, BIND_OUTSIDE);\n }\n\n this.strict = oldStrict;\n};\n\npp$3.isSimpleParamList = function (params) {\n for (var i = 0, list = params; i < list.length; i += 1) {\n var param = list[i];\n\n if (param.type !== \"Identifier\") {\n return false;\n }\n }\n\n return true;\n}; // Checks function params for various disallowed patterns such as using \"eval\"\n// or \"arguments\" and duplicate parameters.\n\n\npp$3.checkParams = function (node, allowDuplicates) {\n var this$1 = this;\n var nameHash = {};\n\n for (var i = 0, list = node.params; i < list.length; i += 1) {\n var param = list[i];\n this$1.checkLVal(param, BIND_VAR, allowDuplicates ? null : nameHash);\n }\n}; // Parses a comma-separated list of expressions, and returns them as\n// an array. `close` is the token type that ends the list, and\n// `allowEmpty` can be turned on to allow subsequent commas with\n// nothing in between them to be parsed as `null` (which is needed\n// for array literals).\n\n\npp$3.parseExprList = function (close, allowTrailingComma, allowEmpty, refDestructuringErrors) {\n var this$1 = this;\n var elts = [],\n first = true;\n\n while (!this.eat(close)) {\n if (!first) {\n this$1.expect(types.comma);\n\n if (allowTrailingComma && this$1.afterTrailingComma(close)) {\n break;\n }\n } else {\n first = false;\n }\n\n var elt = void 0;\n\n if (allowEmpty && this$1.type === types.comma) {\n elt = null;\n } else if (this$1.type === types.ellipsis) {\n elt = this$1.parseSpread(refDestructuringErrors);\n\n if (refDestructuringErrors && this$1.type === types.comma && refDestructuringErrors.trailingComma < 0) {\n refDestructuringErrors.trailingComma = this$1.start;\n }\n } else {\n elt = this$1.parseMaybeAssign(false, refDestructuringErrors);\n }\n\n elts.push(elt);\n }\n\n return elts;\n};\n\npp$3.checkUnreserved = function (ref) {\n var start = ref.start;\n var end = ref.end;\n var name = ref.name;\n\n if (this.inGenerator && name === \"yield\") {\n this.raiseRecoverable(start, \"Cannot use 'yield' as identifier inside a generator\");\n }\n\n if (this.inAsync && name === \"await\") {\n this.raiseRecoverable(start, \"Cannot use 'await' as identifier inside an async function\");\n }\n\n if (this.keywords.test(name)) {\n this.raise(start, \"Unexpected keyword '\" + name + \"'\");\n }\n\n if (this.options.ecmaVersion < 6 && this.input.slice(start, end).indexOf(\"\\\\\") !== -1) {\n return;\n }\n\n var re = this.strict ? this.reservedWordsStrict : this.reservedWords;\n\n if (re.test(name)) {\n if (!this.inAsync && name === \"await\") {\n this.raiseRecoverable(start, \"Cannot use keyword 'await' outside an async function\");\n }\n\n this.raiseRecoverable(start, \"The keyword '\" + name + \"' is reserved\");\n }\n}; // Parse the next token as an identifier. If `liberal` is true (used\n// when parsing properties), it will also convert keywords into\n// identifiers.\n\n\npp$3.parseIdent = function (liberal, isBinding) {\n var node = this.startNode();\n\n if (liberal && this.options.allowReserved === \"never\") {\n liberal = false;\n }\n\n if (this.type === types.name) {\n node.name = this.value;\n } else if (this.type.keyword) {\n node.name = this.type.keyword; // To fix https://github.com/acornjs/acorn/issues/575\n // `class` and `function` keywords push new context into this.context.\n // But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name.\n // If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword\n\n if ((node.name === \"class\" || node.name === \"function\") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) {\n this.context.pop();\n }\n } else {\n this.unexpected();\n }\n\n this.next();\n this.finishNode(node, \"Identifier\");\n\n if (!liberal) {\n this.checkUnreserved(node);\n\n if (node.name === \"await\" && !this.awaitIdentPos) {\n this.awaitIdentPos = node.start;\n }\n }\n\n return node;\n}; // Parses yield expression inside generator.\n\n\npp$3.parseYield = function (noIn) {\n if (!this.yieldPos) {\n this.yieldPos = this.start;\n }\n\n var node = this.startNode();\n this.next();\n\n if (this.type === types.semi || this.canInsertSemicolon() || this.type !== types.star && !this.type.startsExpr) {\n node.delegate = false;\n node.argument = null;\n } else {\n node.delegate = this.eat(types.star);\n node.argument = this.parseMaybeAssign(noIn);\n }\n\n return this.finishNode(node, \"YieldExpression\");\n};\n\npp$3.parseAwait = function () {\n if (!this.awaitPos) {\n this.awaitPos = this.start;\n }\n\n var node = this.startNode();\n this.next();\n node.argument = this.parseMaybeUnary(null, true);\n return this.finishNode(node, \"AwaitExpression\");\n};\n\nvar pp$4 = Parser.prototype; // This function is used to raise exceptions on parse errors. It\n// takes an offset integer (into the current `input`) to indicate\n// the location of the error, attaches the position to the end\n// of the error message, and then raises a `SyntaxError` with that\n// message.\n\npp$4.raise = function (pos, message) {\n var loc = getLineInfo(this.input, pos);\n message += \" (\" + loc.line + \":\" + loc.column + \")\";\n var err = new SyntaxError(message);\n err.pos = pos;\n err.loc = loc;\n err.raisedAt = this.pos;\n throw err;\n};\n\npp$4.raiseRecoverable = pp$4.raise;\n\npp$4.curPosition = function () {\n if (this.options.locations) {\n return new Position(this.curLine, this.pos - this.lineStart);\n }\n};\n\nvar pp$5 = Parser.prototype;\n\nvar Scope = function Scope(flags) {\n this.flags = flags; // A list of var-declared names in the current lexical scope\n\n this.var = []; // A list of lexically-declared names in the current lexical scope\n\n this.lexical = []; // A list of lexically-declared FunctionDeclaration names in the current lexical scope\n\n this.functions = [];\n}; // The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names.\n\n\npp$5.enterScope = function (flags) {\n this.scopeStack.push(new Scope(flags));\n};\n\npp$5.exitScope = function () {\n this.scopeStack.pop();\n}; // The spec says:\n// > At the top level of a function, or script, function declarations are\n// > treated like var declarations rather than like lexical declarations.\n\n\npp$5.treatFunctionsAsVarInScope = function (scope) {\n return scope.flags & SCOPE_FUNCTION || !this.inModule && scope.flags & SCOPE_TOP;\n};\n\npp$5.declareName = function (name, bindingType, pos) {\n var this$1 = this;\n var redeclared = false;\n\n if (bindingType === BIND_LEXICAL) {\n var scope = this.currentScope();\n redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1;\n scope.lexical.push(name);\n\n if (this.inModule && scope.flags & SCOPE_TOP) {\n delete this.undefinedExports[name];\n }\n } else if (bindingType === BIND_SIMPLE_CATCH) {\n var scope$1 = this.currentScope();\n scope$1.lexical.push(name);\n } else if (bindingType === BIND_FUNCTION) {\n var scope$2 = this.currentScope();\n\n if (this.treatFunctionsAsVar) {\n redeclared = scope$2.lexical.indexOf(name) > -1;\n } else {\n redeclared = scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1;\n }\n\n scope$2.functions.push(name);\n } else {\n for (var i = this.scopeStack.length - 1; i >= 0; --i) {\n var scope$3 = this$1.scopeStack[i];\n\n if (scope$3.lexical.indexOf(name) > -1 && !(scope$3.flags & SCOPE_SIMPLE_CATCH && scope$3.lexical[0] === name) || !this$1.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) {\n redeclared = true;\n break;\n }\n\n scope$3.var.push(name);\n\n if (this$1.inModule && scope$3.flags & SCOPE_TOP) {\n delete this$1.undefinedExports[name];\n }\n\n if (scope$3.flags & SCOPE_VAR) {\n break;\n }\n }\n }\n\n if (redeclared) {\n this.raiseRecoverable(pos, \"Identifier '\" + name + \"' has already been declared\");\n }\n};\n\npp$5.checkLocalExport = function (id) {\n // scope.functions must be empty as Module code is always strict.\n if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && this.scopeStack[0].var.indexOf(id.name) === -1) {\n this.undefinedExports[id.name] = id;\n }\n};\n\npp$5.currentScope = function () {\n return this.scopeStack[this.scopeStack.length - 1];\n};\n\npp$5.currentVarScope = function () {\n var this$1 = this;\n\n for (var i = this.scopeStack.length - 1;; i--) {\n var scope = this$1.scopeStack[i];\n\n if (scope.flags & SCOPE_VAR) {\n return scope;\n }\n }\n}; // Could be useful for `this`, `new.target`, `super()`, `super.property`, and `super[property]`.\n\n\npp$5.currentThisScope = function () {\n var this$1 = this;\n\n for (var i = this.scopeStack.length - 1;; i--) {\n var scope = this$1.scopeStack[i];\n\n if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) {\n return scope;\n }\n }\n};\n\nvar Node = function Node(parser, pos, loc) {\n this.type = \"\";\n this.start = pos;\n this.end = 0;\n\n if (parser.options.locations) {\n this.loc = new SourceLocation(parser, loc);\n }\n\n if (parser.options.directSourceFile) {\n this.sourceFile = parser.options.directSourceFile;\n }\n\n if (parser.options.ranges) {\n this.range = [pos, 0];\n }\n}; // Start an AST node, attaching a start offset.\n\n\nvar pp$6 = Parser.prototype;\n\npp$6.startNode = function () {\n return new Node(this, this.start, this.startLoc);\n};\n\npp$6.startNodeAt = function (pos, loc) {\n return new Node(this, pos, loc);\n}; // Finish an AST node, adding `type` and `end` properties.\n\n\nfunction finishNodeAt(node, type, pos, loc) {\n node.type = type;\n node.end = pos;\n\n if (this.options.locations) {\n node.loc.end = loc;\n }\n\n if (this.options.ranges) {\n node.range[1] = pos;\n }\n\n return node;\n}\n\npp$6.finishNode = function (node, type) {\n return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc);\n}; // Finish node at given position\n\n\npp$6.finishNodeAt = function (node, type, pos, loc) {\n return finishNodeAt.call(this, node, type, pos, loc);\n}; // The algorithm used to determine whether a regexp can appear at a\n// given point in the program is loosely based on sweet.js' approach.\n// See https://github.com/mozilla/sweet.js/wiki/design\n\n\nvar TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) {\n this.token = token;\n this.isExpr = !!isExpr;\n this.preserveSpace = !!preserveSpace;\n this.override = override;\n this.generator = !!generator;\n};\n\nvar types$1 = {\n b_stat: new TokContext(\"{\", false),\n b_expr: new TokContext(\"{\", true),\n b_tmpl: new TokContext(\"${\", false),\n p_stat: new TokContext(\"(\", false),\n p_expr: new TokContext(\"(\", true),\n q_tmpl: new TokContext(\"`\", true, true, function (p) {\n return p.tryReadTemplateToken();\n }),\n f_stat: new TokContext(\"function\", false),\n f_expr: new TokContext(\"function\", true),\n f_expr_gen: new TokContext(\"function\", true, false, null, true),\n f_gen: new TokContext(\"function\", false, false, null, true)\n};\nvar pp$7 = Parser.prototype;\n\npp$7.initialContext = function () {\n return [types$1.b_stat];\n};\n\npp$7.braceIsBlock = function (prevType) {\n var parent = this.curContext();\n\n if (parent === types$1.f_expr || parent === types$1.f_stat) {\n return true;\n }\n\n if (prevType === types.colon && (parent === types$1.b_stat || parent === types$1.b_expr)) {\n return !parent.isExpr;\n } // The check for `tt.name && exprAllowed` detects whether we are\n // after a `yield` or `of` construct. See the `updateContext` for\n // `tt.name`.\n\n\n if (prevType === types._return || prevType === types.name && this.exprAllowed) {\n return lineBreak.test(this.input.slice(this.lastTokEnd, this.start));\n }\n\n if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR || prevType === types.arrow) {\n return true;\n }\n\n if (prevType === types.braceL) {\n return parent === types$1.b_stat;\n }\n\n if (prevType === types._var || prevType === types._const || prevType === types.name) {\n return false;\n }\n\n return !this.exprAllowed;\n};\n\npp$7.inGeneratorContext = function () {\n var this$1 = this;\n\n for (var i = this.context.length - 1; i >= 1; i--) {\n var context = this$1.context[i];\n\n if (context.token === \"function\") {\n return context.generator;\n }\n }\n\n return false;\n};\n\npp$7.updateContext = function (prevType) {\n var update,\n type = this.type;\n\n if (type.keyword && prevType === types.dot) {\n this.exprAllowed = false;\n } else if (update = type.updateContext) {\n update.call(this, prevType);\n } else {\n this.exprAllowed = type.beforeExpr;\n }\n}; // Token-specific context update code\n\n\ntypes.parenR.updateContext = types.braceR.updateContext = function () {\n if (this.context.length === 1) {\n this.exprAllowed = true;\n return;\n }\n\n var out = this.context.pop();\n\n if (out === types$1.b_stat && this.curContext().token === \"function\") {\n out = this.context.pop();\n }\n\n this.exprAllowed = !out.isExpr;\n};\n\ntypes.braceL.updateContext = function (prevType) {\n this.context.push(this.braceIsBlock(prevType) ? types$1.b_stat : types$1.b_expr);\n this.exprAllowed = true;\n};\n\ntypes.dollarBraceL.updateContext = function () {\n this.context.push(types$1.b_tmpl);\n this.exprAllowed = true;\n};\n\ntypes.parenL.updateContext = function (prevType) {\n var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while;\n this.context.push(statementParens ? types$1.p_stat : types$1.p_expr);\n this.exprAllowed = true;\n};\n\ntypes.incDec.updateContext = function () {// tokExprAllowed stays unchanged\n};\n\ntypes._function.updateContext = types._class.updateContext = function (prevType) {\n if (prevType.beforeExpr && prevType !== types.semi && prevType !== types._else && !(prevType === types._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && !((prevType === types.colon || prevType === types.braceL) && this.curContext() === types$1.b_stat)) {\n this.context.push(types$1.f_expr);\n } else {\n this.context.push(types$1.f_stat);\n }\n\n this.exprAllowed = false;\n};\n\ntypes.backQuote.updateContext = function () {\n if (this.curContext() === types$1.q_tmpl) {\n this.context.pop();\n } else {\n this.context.push(types$1.q_tmpl);\n }\n\n this.exprAllowed = false;\n};\n\ntypes.star.updateContext = function (prevType) {\n if (prevType === types._function) {\n var index = this.context.length - 1;\n\n if (this.context[index] === types$1.f_expr) {\n this.context[index] = types$1.f_expr_gen;\n } else {\n this.context[index] = types$1.f_gen;\n }\n }\n\n this.exprAllowed = true;\n};\n\ntypes.name.updateContext = function (prevType) {\n var allowed = false;\n\n if (this.options.ecmaVersion >= 6 && prevType !== types.dot) {\n if (this.value === \"of\" && !this.exprAllowed || this.value === \"yield\" && this.inGeneratorContext()) {\n allowed = true;\n }\n }\n\n this.exprAllowed = allowed;\n}; // This file contains Unicode properties extracted from the ECMAScript\n// specification. The lists are extracted like so:\n// $$('#table-binary-unicode-properties > figure > table > tbody > tr > td:nth-child(1) code').map(el => el.innerText)\n// #table-binary-unicode-properties\n\n\nvar ecma9BinaryProperties = \"ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS\";\nvar unicodeBinaryProperties = {\n 9: ecma9BinaryProperties,\n 10: ecma9BinaryProperties + \" Extended_Pictographic\"\n}; // #table-unicode-general-category-values\n\nvar unicodeGeneralCategoryValues = \"Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu\"; // #table-unicode-script-values\n\nvar ecma9ScriptValues = \"Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb\";\nvar unicodeScriptValues = {\n 9: ecma9ScriptValues,\n 10: ecma9ScriptValues + \" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd\"\n};\nvar data = {};\n\nfunction buildUnicodeData(ecmaVersion) {\n var d = data[ecmaVersion] = {\n binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + \" \" + unicodeGeneralCategoryValues),\n nonBinary: {\n General_Category: wordsRegexp(unicodeGeneralCategoryValues),\n Script: wordsRegexp(unicodeScriptValues[ecmaVersion])\n }\n };\n d.nonBinary.Script_Extensions = d.nonBinary.Script;\n d.nonBinary.gc = d.nonBinary.General_Category;\n d.nonBinary.sc = d.nonBinary.Script;\n d.nonBinary.scx = d.nonBinary.Script_Extensions;\n}\n\nbuildUnicodeData(9);\nbuildUnicodeData(10);\nvar pp$9 = Parser.prototype;\n\nvar RegExpValidationState = function RegExpValidationState(parser) {\n this.parser = parser;\n this.validFlags = \"gim\" + (parser.options.ecmaVersion >= 6 ? \"uy\" : \"\") + (parser.options.ecmaVersion >= 9 ? \"s\" : \"\");\n this.unicodeProperties = data[parser.options.ecmaVersion >= 10 ? 10 : parser.options.ecmaVersion];\n this.source = \"\";\n this.flags = \"\";\n this.start = 0;\n this.switchU = false;\n this.switchN = false;\n this.pos = 0;\n this.lastIntValue = 0;\n this.lastStringValue = \"\";\n this.lastAssertionIsQuantifiable = false;\n this.numCapturingParens = 0;\n this.maxBackReference = 0;\n this.groupNames = [];\n this.backReferenceNames = [];\n};\n\nRegExpValidationState.prototype.reset = function reset(start, pattern, flags) {\n var unicode = flags.indexOf(\"u\") !== -1;\n this.start = start | 0;\n this.source = pattern + \"\";\n this.flags = flags;\n this.switchU = unicode && this.parser.options.ecmaVersion >= 6;\n this.switchN = unicode && this.parser.options.ecmaVersion >= 9;\n};\n\nRegExpValidationState.prototype.raise = function raise(message) {\n this.parser.raiseRecoverable(this.start, \"Invalid regular expression: /\" + this.source + \"/: \" + message);\n}; // If u flag is given, this returns the code point at the index (it combines a surrogate pair).\n// Otherwise, this returns the code unit of the index (can be a part of a surrogate pair).\n\n\nRegExpValidationState.prototype.at = function at(i) {\n var s = this.source;\n var l = s.length;\n\n if (i >= l) {\n return -1;\n }\n\n var c = s.charCodeAt(i);\n\n if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) {\n return c;\n }\n\n return (c << 10) + s.charCodeAt(i + 1) - 0x35FDC00;\n};\n\nRegExpValidationState.prototype.nextIndex = function nextIndex(i) {\n var s = this.source;\n var l = s.length;\n\n if (i >= l) {\n return l;\n }\n\n var c = s.charCodeAt(i);\n\n if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) {\n return i + 1;\n }\n\n return i + 2;\n};\n\nRegExpValidationState.prototype.current = function current() {\n return this.at(this.pos);\n};\n\nRegExpValidationState.prototype.lookahead = function lookahead() {\n return this.at(this.nextIndex(this.pos));\n};\n\nRegExpValidationState.prototype.advance = function advance() {\n this.pos = this.nextIndex(this.pos);\n};\n\nRegExpValidationState.prototype.eat = function eat(ch) {\n if (this.current() === ch) {\n this.advance();\n return true;\n }\n\n return false;\n};\n\nfunction codePointToString$1(ch) {\n if (ch <= 0xFFFF) {\n return String.fromCharCode(ch);\n }\n\n ch -= 0x10000;\n return String.fromCharCode((ch >> 10) + 0xD800, (ch & 0x03FF) + 0xDC00);\n}\n/**\n * Validate the flags part of a given RegExpLiteral.\n *\n * @param {RegExpValidationState} state The state to validate RegExp.\n * @returns {void}\n */\n\n\npp$9.validateRegExpFlags = function (state) {\n var this$1 = this;\n var validFlags = state.validFlags;\n var flags = state.flags;\n\n for (var i = 0; i < flags.length; i++) {\n var flag = flags.charAt(i);\n\n if (validFlags.indexOf(flag) === -1) {\n this$1.raise(state.start, \"Invalid regular expression flag\");\n }\n\n if (flags.indexOf(flag, i + 1) > -1) {\n this$1.raise(state.start, \"Duplicate regular expression flag\");\n }\n }\n};\n/**\n * Validate the pattern part of a given RegExpLiteral.\n *\n * @param {RegExpValidationState} state The state to validate RegExp.\n * @returns {void}\n */\n\n\npp$9.validateRegExpPattern = function (state) {\n this.regexp_pattern(state); // The goal symbol for the parse is |Pattern[~U, ~N]|. If the result of\n // parsing contains a |GroupName|, reparse with the goal symbol\n // |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError*\n // exception if _P_ did not conform to the grammar, if any elements of _P_\n // were not matched by the parse, or if any Early Error conditions exist.\n\n if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) {\n state.switchN = true;\n this.regexp_pattern(state);\n }\n}; // https://www.ecma-international.org/ecma-262/8.0/#prod-Pattern\n\n\npp$9.regexp_pattern = function (state) {\n state.pos = 0;\n state.lastIntValue = 0;\n state.lastStringValue = \"\";\n state.lastAssertionIsQuantifiable = false;\n state.numCapturingParens = 0;\n state.maxBackReference = 0;\n state.groupNames.length = 0;\n state.backReferenceNames.length = 0;\n this.regexp_disjunction(state);\n\n if (state.pos !== state.source.length) {\n // Make the same messages as V8.\n if (state.eat(0x29\n /* ) */\n )) {\n state.raise(\"Unmatched ')'\");\n }\n\n if (state.eat(0x5D\n /* [ */\n ) || state.eat(0x7D\n /* } */\n )) {\n state.raise(\"Lone quantifier brackets\");\n }\n }\n\n if (state.maxBackReference > state.numCapturingParens) {\n state.raise(\"Invalid escape\");\n }\n\n for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) {\n var name = list[i];\n\n if (state.groupNames.indexOf(name) === -1) {\n state.raise(\"Invalid named capture referenced\");\n }\n }\n}; // https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction\n\n\npp$9.regexp_disjunction = function (state) {\n var this$1 = this;\n this.regexp_alternative(state);\n\n while (state.eat(0x7C\n /* | */\n )) {\n this$1.regexp_alternative(state);\n } // Make the same message as V8.\n\n\n if (this.regexp_eatQuantifier(state, true)) {\n state.raise(\"Nothing to repeat\");\n }\n\n if (state.eat(0x7B\n /* { */\n )) {\n state.raise(\"Lone quantifier brackets\");\n }\n}; // https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative\n\n\npp$9.regexp_alternative = function (state) {\n while (state.pos < state.source.length && this.regexp_eatTerm(state)) {}\n}; // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term\n\n\npp$9.regexp_eatTerm = function (state) {\n if (this.regexp_eatAssertion(state)) {\n // Handle `QuantifiableAssertion Quantifier` alternative.\n // `state.lastAssertionIsQuantifiable` is true if the last eaten Assertion\n // is a QuantifiableAssertion.\n if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) {\n // Make the same message as V8.\n if (state.switchU) {\n state.raise(\"Invalid quantifier\");\n }\n }\n\n return true;\n }\n\n if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) {\n this.regexp_eatQuantifier(state);\n return true;\n }\n\n return false;\n}; // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Assertion\n\n\npp$9.regexp_eatAssertion = function (state) {\n var start = state.pos;\n state.lastAssertionIsQuantifiable = false; // ^, $\n\n if (state.eat(0x5E\n /* ^ */\n ) || state.eat(0x24\n /* $ */\n )) {\n return true;\n } // \\b \\B\n\n\n if (state.eat(0x5C\n /* \\ */\n )) {\n if (state.eat(0x42\n /* B */\n ) || state.eat(0x62\n /* b */\n )) {\n return true;\n }\n\n state.pos = start;\n } // Lookahead / Lookbehind\n\n\n if (state.eat(0x28\n /* ( */\n ) && state.eat(0x3F\n /* ? */\n )) {\n var lookbehind = false;\n\n if (this.options.ecmaVersion >= 9) {\n lookbehind = state.eat(0x3C\n /* < */\n );\n }\n\n if (state.eat(0x3D\n /* = */\n ) || state.eat(0x21\n /* ! */\n )) {\n this.regexp_disjunction(state);\n\n if (!state.eat(0x29\n /* ) */\n )) {\n state.raise(\"Unterminated group\");\n }\n\n state.lastAssertionIsQuantifiable = !lookbehind;\n return true;\n }\n }\n\n state.pos = start;\n return false;\n}; // https://www.ecma-international.org/ecma-262/8.0/#prod-Quantifier\n\n\npp$9.regexp_eatQuantifier = function (state, noError) {\n if (noError === void 0) noError = false;\n\n if (this.regexp_eatQuantifierPrefix(state, noError)) {\n state.eat(0x3F\n /* ? */\n );\n return true;\n }\n\n return false;\n}; // https://www.ecma-international.org/ecma-262/8.0/#prod-QuantifierPrefix\n\n\npp$9.regexp_eatQuantifierPrefix = function (state, noError) {\n return state.eat(0x2A\n /* * */\n ) || state.eat(0x2B\n /* + */\n ) || state.eat(0x3F\n /* ? */\n ) || this.regexp_eatBracedQuantifier(state, noError);\n};\n\npp$9.regexp_eatBracedQuantifier = function (state, noError) {\n var start = state.pos;\n\n if (state.eat(0x7B\n /* { */\n )) {\n var min = 0,\n max = -1;\n\n if (this.regexp_eatDecimalDigits(state)) {\n min = state.lastIntValue;\n\n if (state.eat(0x2C\n /* , */\n ) && this.regexp_eatDecimalDigits(state)) {\n max = state.lastIntValue;\n }\n\n if (state.eat(0x7D\n /* } */\n )) {\n // SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-term\n if (max !== -1 && max < min && !noError) {\n state.raise(\"numbers out of order in {} quantifier\");\n }\n\n return true;\n }\n }\n\n if (state.switchU && !noError) {\n state.raise(\"Incomplete quantifier\");\n }\n\n state.pos = start;\n }\n\n return false;\n}; // https://www.ecma-international.org/ecma-262/8.0/#prod-Atom\n\n\npp$9.regexp_eatAtom = function (state) {\n return this.regexp_eatPatternCharacters(state) || state.eat(0x2E\n /* . */\n ) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state);\n};\n\npp$9.regexp_eatReverseSolidusAtomEscape = function (state) {\n var start = state.pos;\n\n if (state.eat(0x5C\n /* \\ */\n )) {\n if (this.regexp_eatAtomEscape(state)) {\n return true;\n }\n\n state.pos = start;\n }\n\n return false;\n};\n\npp$9.regexp_eatUncapturingGroup = function (state) {\n var start = state.pos;\n\n if (state.eat(0x28\n /* ( */\n )) {\n if (state.eat(0x3F\n /* ? */\n ) && state.eat(0x3A\n /* : */\n )) {\n this.regexp_disjunction(state);\n\n if (state.eat(0x29\n /* ) */\n )) {\n return true;\n }\n\n state.raise(\"Unterminated group\");\n }\n\n state.pos = start;\n }\n\n return false;\n};\n\npp$9.regexp_eatCapturingGroup = function (state) {\n if (state.eat(0x28\n /* ( */\n )) {\n if (this.options.ecmaVersion >= 9) {\n this.regexp_groupSpecifier(state);\n } else if (state.current() === 0x3F\n /* ? */\n ) {\n state.raise(\"Invalid group\");\n }\n\n this.regexp_disjunction(state);\n\n if (state.eat(0x29\n /* ) */\n )) {\n state.numCapturingParens += 1;\n return true;\n }\n\n state.raise(\"Unterminated group\");\n }\n\n return false;\n}; // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedAtom\n\n\npp$9.regexp_eatExtendedAtom = function (state) {\n return state.eat(0x2E\n /* . */\n ) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state) || this.regexp_eatInvalidBracedQuantifier(state) || this.regexp_eatExtendedPatternCharacter(state);\n}; // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-InvalidBracedQuantifier\n\n\npp$9.regexp_eatInvalidBracedQuantifier = function (state) {\n if (this.regexp_eatBracedQuantifier(state, true)) {\n state.raise(\"Nothing to repeat\");\n }\n\n return false;\n}; // https://www.ecma-international.org/ecma-262/8.0/#prod-SyntaxCharacter\n\n\npp$9.regexp_eatSyntaxCharacter = function (state) {\n var ch = state.current();\n\n if (isSyntaxCharacter(ch)) {\n state.lastIntValue = ch;\n state.advance();\n return true;\n }\n\n return false;\n};\n\nfunction isSyntaxCharacter(ch) {\n return ch === 0x24\n /* $ */\n || ch >= 0x28\n /* ( */\n && ch <= 0x2B\n /* + */\n || ch === 0x2E\n /* . */\n || ch === 0x3F\n /* ? */\n || ch >= 0x5B\n /* [ */\n && ch <= 0x5E\n /* ^ */\n || ch >= 0x7B\n /* { */\n && ch <= 0x7D\n /* } */\n ;\n} // https://www.ecma-international.org/ecma-262/8.0/#prod-PatternCharacter\n// But eat eager.\n\n\npp$9.regexp_eatPatternCharacters = function (state) {\n var start = state.pos;\n var ch = 0;\n\n while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) {\n state.advance();\n }\n\n return state.pos !== start;\n}; // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedPatternCharacter\n\n\npp$9.regexp_eatExtendedPatternCharacter = function (state) {\n var ch = state.current();\n\n if (ch !== -1 && ch !== 0x24\n /* $ */\n && !(ch >= 0x28\n /* ( */\n && ch <= 0x2B\n /* + */\n ) && ch !== 0x2E\n /* . */\n && ch !== 0x3F\n /* ? */\n && ch !== 0x5B\n /* [ */\n && ch !== 0x5E\n /* ^ */\n && ch !== 0x7C\n /* | */\n ) {\n state.advance();\n return true;\n }\n\n return false;\n}; // GroupSpecifier[U] ::\n// [empty]\n// `?` GroupName[?U]\n\n\npp$9.regexp_groupSpecifier = function (state) {\n if (state.eat(0x3F\n /* ? */\n )) {\n if (this.regexp_eatGroupName(state)) {\n if (state.groupNames.indexOf(state.lastStringValue) !== -1) {\n state.raise(\"Duplicate capture group name\");\n }\n\n state.groupNames.push(state.lastStringValue);\n return;\n }\n\n state.raise(\"Invalid group\");\n }\n}; // GroupName[U] ::\n// `<` RegExpIdentifierName[?U] `>`\n// Note: this updates `state.lastStringValue` property with the eaten name.\n\n\npp$9.regexp_eatGroupName = function (state) {\n state.lastStringValue = \"\";\n\n if (state.eat(0x3C\n /* < */\n )) {\n if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E\n /* > */\n )) {\n return true;\n }\n\n state.raise(\"Invalid capture group name\");\n }\n\n return false;\n}; // RegExpIdentifierName[U] ::\n// RegExpIdentifierStart[?U]\n// RegExpIdentifierName[?U] RegExpIdentifierPart[?U]\n// Note: this updates `state.lastStringValue` property with the eaten name.\n\n\npp$9.regexp_eatRegExpIdentifierName = function (state) {\n state.lastStringValue = \"\";\n\n if (this.regexp_eatRegExpIdentifierStart(state)) {\n state.lastStringValue += codePointToString$1(state.lastIntValue);\n\n while (this.regexp_eatRegExpIdentifierPart(state)) {\n state.lastStringValue += codePointToString$1(state.lastIntValue);\n }\n\n return true;\n }\n\n return false;\n}; // RegExpIdentifierStart[U] ::\n// UnicodeIDStart\n// `$`\n// `_`\n// `\\` RegExpUnicodeEscapeSequence[?U]\n\n\npp$9.regexp_eatRegExpIdentifierStart = function (state) {\n var start = state.pos;\n var ch = state.current();\n state.advance();\n\n if (ch === 0x5C\n /* \\ */\n && this.regexp_eatRegExpUnicodeEscapeSequence(state)) {\n ch = state.lastIntValue;\n }\n\n if (isRegExpIdentifierStart(ch)) {\n state.lastIntValue = ch;\n return true;\n }\n\n state.pos = start;\n return false;\n};\n\nfunction isRegExpIdentifierStart(ch) {\n return isIdentifierStart(ch, true) || ch === 0x24\n /* $ */\n || ch === 0x5F;\n /* _ */\n} // RegExpIdentifierPart[U] ::\n// UnicodeIDContinue\n// `$`\n// `_`\n// `\\` RegExpUnicodeEscapeSequence[?U]\n// \n// \n\n\npp$9.regexp_eatRegExpIdentifierPart = function (state) {\n var start = state.pos;\n var ch = state.current();\n state.advance();\n\n if (ch === 0x5C\n /* \\ */\n && this.regexp_eatRegExpUnicodeEscapeSequence(state)) {\n ch = state.lastIntValue;\n }\n\n if (isRegExpIdentifierPart(ch)) {\n state.lastIntValue = ch;\n return true;\n }\n\n state.pos = start;\n return false;\n};\n\nfunction isRegExpIdentifierPart(ch) {\n return isIdentifierChar(ch, true) || ch === 0x24\n /* $ */\n || ch === 0x5F\n /* _ */\n || ch === 0x200C\n /* */\n || ch === 0x200D;\n /* */\n} // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape\n\n\npp$9.regexp_eatAtomEscape = function (state) {\n if (this.regexp_eatBackReference(state) || this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state) || state.switchN && this.regexp_eatKGroupName(state)) {\n return true;\n }\n\n if (state.switchU) {\n // Make the same message as V8.\n if (state.current() === 0x63\n /* c */\n ) {\n state.raise(\"Invalid unicode escape\");\n }\n\n state.raise(\"Invalid escape\");\n }\n\n return false;\n};\n\npp$9.regexp_eatBackReference = function (state) {\n var start = state.pos;\n\n if (this.regexp_eatDecimalEscape(state)) {\n var n = state.lastIntValue;\n\n if (state.switchU) {\n // For SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-atomescape\n if (n > state.maxBackReference) {\n state.maxBackReference = n;\n }\n\n return true;\n }\n\n if (n <= state.numCapturingParens) {\n return true;\n }\n\n state.pos = start;\n }\n\n return false;\n};\n\npp$9.regexp_eatKGroupName = function (state) {\n if (state.eat(0x6B\n /* k */\n )) {\n if (this.regexp_eatGroupName(state)) {\n state.backReferenceNames.push(state.lastStringValue);\n return true;\n }\n\n state.raise(\"Invalid named reference\");\n }\n\n return false;\n}; // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-CharacterEscape\n\n\npp$9.regexp_eatCharacterEscape = function (state) {\n return this.regexp_eatControlEscape(state) || this.regexp_eatCControlLetter(state) || this.regexp_eatZero(state) || this.regexp_eatHexEscapeSequence(state) || this.regexp_eatRegExpUnicodeEscapeSequence(state) || !state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state) || this.regexp_eatIdentityEscape(state);\n};\n\npp$9.regexp_eatCControlLetter = function (state) {\n var start = state.pos;\n\n if (state.eat(0x63\n /* c */\n )) {\n if (this.regexp_eatControlLetter(state)) {\n return true;\n }\n\n state.pos = start;\n }\n\n return false;\n};\n\npp$9.regexp_eatZero = function (state) {\n if (state.current() === 0x30\n /* 0 */\n && !isDecimalDigit(state.lookahead())) {\n state.lastIntValue = 0;\n state.advance();\n return true;\n }\n\n return false;\n}; // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlEscape\n\n\npp$9.regexp_eatControlEscape = function (state) {\n var ch = state.current();\n\n if (ch === 0x74\n /* t */\n ) {\n state.lastIntValue = 0x09;\n /* \\t */\n\n state.advance();\n return true;\n }\n\n if (ch === 0x6E\n /* n */\n ) {\n state.lastIntValue = 0x0A;\n /* \\n */\n\n state.advance();\n return true;\n }\n\n if (ch === 0x76\n /* v */\n ) {\n state.lastIntValue = 0x0B;\n /* \\v */\n\n state.advance();\n return true;\n }\n\n if (ch === 0x66\n /* f */\n ) {\n state.lastIntValue = 0x0C;\n /* \\f */\n\n state.advance();\n return true;\n }\n\n if (ch === 0x72\n /* r */\n ) {\n state.lastIntValue = 0x0D;\n /* \\r */\n\n state.advance();\n return true;\n }\n\n return false;\n}; // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlLetter\n\n\npp$9.regexp_eatControlLetter = function (state) {\n var ch = state.current();\n\n if (isControlLetter(ch)) {\n state.lastIntValue = ch % 0x20;\n state.advance();\n return true;\n }\n\n return false;\n};\n\nfunction isControlLetter(ch) {\n return ch >= 0x41\n /* A */\n && ch <= 0x5A\n /* Z */\n || ch >= 0x61\n /* a */\n && ch <= 0x7A\n /* z */\n ;\n} // https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence\n\n\npp$9.regexp_eatRegExpUnicodeEscapeSequence = function (state) {\n var start = state.pos;\n\n if (state.eat(0x75\n /* u */\n )) {\n if (this.regexp_eatFixedHexDigits(state, 4)) {\n var lead = state.lastIntValue;\n\n if (state.switchU && lead >= 0xD800 && lead <= 0xDBFF) {\n var leadSurrogateEnd = state.pos;\n\n if (state.eat(0x5C\n /* \\ */\n ) && state.eat(0x75\n /* u */\n ) && this.regexp_eatFixedHexDigits(state, 4)) {\n var trail = state.lastIntValue;\n\n if (trail >= 0xDC00 && trail <= 0xDFFF) {\n state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;\n return true;\n }\n }\n\n state.pos = leadSurrogateEnd;\n state.lastIntValue = lead;\n }\n\n return true;\n }\n\n if (state.switchU && state.eat(0x7B\n /* { */\n ) && this.regexp_eatHexDigits(state) && state.eat(0x7D\n /* } */\n ) && isValidUnicode(state.lastIntValue)) {\n return true;\n }\n\n if (state.switchU) {\n state.raise(\"Invalid unicode escape\");\n }\n\n state.pos = start;\n }\n\n return false;\n};\n\nfunction isValidUnicode(ch) {\n return ch >= 0 && ch <= 0x10FFFF;\n} // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-IdentityEscape\n\n\npp$9.regexp_eatIdentityEscape = function (state) {\n if (state.switchU) {\n if (this.regexp_eatSyntaxCharacter(state)) {\n return true;\n }\n\n if (state.eat(0x2F\n /* / */\n )) {\n state.lastIntValue = 0x2F;\n /* / */\n\n return true;\n }\n\n return false;\n }\n\n var ch = state.current();\n\n if (ch !== 0x63\n /* c */\n && (!state.switchN || ch !== 0x6B\n /* k */\n )) {\n state.lastIntValue = ch;\n state.advance();\n return true;\n }\n\n return false;\n}; // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalEscape\n\n\npp$9.regexp_eatDecimalEscape = function (state) {\n state.lastIntValue = 0;\n var ch = state.current();\n\n if (ch >= 0x31\n /* 1 */\n && ch <= 0x39\n /* 9 */\n ) {\n do {\n state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30\n /* 0 */\n );\n state.advance();\n } while ((ch = state.current()) >= 0x30\n /* 0 */\n && ch <= 0x39\n /* 9 */\n );\n\n return true;\n }\n\n return false;\n}; // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClassEscape\n\n\npp$9.regexp_eatCharacterClassEscape = function (state) {\n var ch = state.current();\n\n if (isCharacterClassEscape(ch)) {\n state.lastIntValue = -1;\n state.advance();\n return true;\n }\n\n if (state.switchU && this.options.ecmaVersion >= 9 && (ch === 0x50\n /* P */\n || ch === 0x70\n /* p */\n )) {\n state.lastIntValue = -1;\n state.advance();\n\n if (state.eat(0x7B\n /* { */\n ) && this.regexp_eatUnicodePropertyValueExpression(state) && state.eat(0x7D\n /* } */\n )) {\n return true;\n }\n\n state.raise(\"Invalid property name\");\n }\n\n return false;\n};\n\nfunction isCharacterClassEscape(ch) {\n return ch === 0x64\n /* d */\n || ch === 0x44\n /* D */\n || ch === 0x73\n /* s */\n || ch === 0x53\n /* S */\n || ch === 0x77\n /* w */\n || ch === 0x57\n /* W */\n ;\n} // UnicodePropertyValueExpression ::\n// UnicodePropertyName `=` UnicodePropertyValue\n// LoneUnicodePropertyNameOrValue\n\n\npp$9.regexp_eatUnicodePropertyValueExpression = function (state) {\n var start = state.pos; // UnicodePropertyName `=` UnicodePropertyValue\n\n if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D\n /* = */\n )) {\n var name = state.lastStringValue;\n\n if (this.regexp_eatUnicodePropertyValue(state)) {\n var value = state.lastStringValue;\n this.regexp_validateUnicodePropertyNameAndValue(state, name, value);\n return true;\n }\n }\n\n state.pos = start; // LoneUnicodePropertyNameOrValue\n\n if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) {\n var nameOrValue = state.lastStringValue;\n this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue);\n return true;\n }\n\n return false;\n};\n\npp$9.regexp_validateUnicodePropertyNameAndValue = function (state, name, value) {\n if (!has(state.unicodeProperties.nonBinary, name)) {\n state.raise(\"Invalid property name\");\n }\n\n if (!state.unicodeProperties.nonBinary[name].test(value)) {\n state.raise(\"Invalid property value\");\n }\n};\n\npp$9.regexp_validateUnicodePropertyNameOrValue = function (state, nameOrValue) {\n if (!state.unicodeProperties.binary.test(nameOrValue)) {\n state.raise(\"Invalid property name\");\n }\n}; // UnicodePropertyName ::\n// UnicodePropertyNameCharacters\n\n\npp$9.regexp_eatUnicodePropertyName = function (state) {\n var ch = 0;\n state.lastStringValue = \"\";\n\n while (isUnicodePropertyNameCharacter(ch = state.current())) {\n state.lastStringValue += codePointToString$1(ch);\n state.advance();\n }\n\n return state.lastStringValue !== \"\";\n};\n\nfunction isUnicodePropertyNameCharacter(ch) {\n return isControlLetter(ch) || ch === 0x5F;\n /* _ */\n} // UnicodePropertyValue ::\n// UnicodePropertyValueCharacters\n\n\npp$9.regexp_eatUnicodePropertyValue = function (state) {\n var ch = 0;\n state.lastStringValue = \"\";\n\n while (isUnicodePropertyValueCharacter(ch = state.current())) {\n state.lastStringValue += codePointToString$1(ch);\n state.advance();\n }\n\n return state.lastStringValue !== \"\";\n};\n\nfunction isUnicodePropertyValueCharacter(ch) {\n return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch);\n} // LoneUnicodePropertyNameOrValue ::\n// UnicodePropertyValueCharacters\n\n\npp$9.regexp_eatLoneUnicodePropertyNameOrValue = function (state) {\n return this.regexp_eatUnicodePropertyValue(state);\n}; // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClass\n\n\npp$9.regexp_eatCharacterClass = function (state) {\n if (state.eat(0x5B\n /* [ */\n )) {\n state.eat(0x5E\n /* ^ */\n );\n this.regexp_classRanges(state);\n\n if (state.eat(0x5D\n /* [ */\n )) {\n return true;\n } // Unreachable since it threw \"unterminated regular expression\" error before.\n\n\n state.raise(\"Unterminated character class\");\n }\n\n return false;\n}; // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassRanges\n// https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRanges\n// https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRangesNoDash\n\n\npp$9.regexp_classRanges = function (state) {\n var this$1 = this;\n\n while (this.regexp_eatClassAtom(state)) {\n var left = state.lastIntValue;\n\n if (state.eat(0x2D\n /* - */\n ) && this$1.regexp_eatClassAtom(state)) {\n var right = state.lastIntValue;\n\n if (state.switchU && (left === -1 || right === -1)) {\n state.raise(\"Invalid character class\");\n }\n\n if (left !== -1 && right !== -1 && left > right) {\n state.raise(\"Range out of order in character class\");\n }\n }\n }\n}; // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtom\n// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtomNoDash\n\n\npp$9.regexp_eatClassAtom = function (state) {\n var start = state.pos;\n\n if (state.eat(0x5C\n /* \\ */\n )) {\n if (this.regexp_eatClassEscape(state)) {\n return true;\n }\n\n if (state.switchU) {\n // Make the same message as V8.\n var ch$1 = state.current();\n\n if (ch$1 === 0x63\n /* c */\n || isOctalDigit(ch$1)) {\n state.raise(\"Invalid class escape\");\n }\n\n state.raise(\"Invalid escape\");\n }\n\n state.pos = start;\n }\n\n var ch = state.current();\n\n if (ch !== 0x5D\n /* [ */\n ) {\n state.lastIntValue = ch;\n state.advance();\n return true;\n }\n\n return false;\n}; // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassEscape\n\n\npp$9.regexp_eatClassEscape = function (state) {\n var start = state.pos;\n\n if (state.eat(0x62\n /* b */\n )) {\n state.lastIntValue = 0x08;\n /* */\n\n return true;\n }\n\n if (state.switchU && state.eat(0x2D\n /* - */\n )) {\n state.lastIntValue = 0x2D;\n /* - */\n\n return true;\n }\n\n if (!state.switchU && state.eat(0x63\n /* c */\n )) {\n if (this.regexp_eatClassControlLetter(state)) {\n return true;\n }\n\n state.pos = start;\n }\n\n return this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state);\n}; // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassControlLetter\n\n\npp$9.regexp_eatClassControlLetter = function (state) {\n var ch = state.current();\n\n if (isDecimalDigit(ch) || ch === 0x5F\n /* _ */\n ) {\n state.lastIntValue = ch % 0x20;\n state.advance();\n return true;\n }\n\n return false;\n}; // https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence\n\n\npp$9.regexp_eatHexEscapeSequence = function (state) {\n var start = state.pos;\n\n if (state.eat(0x78\n /* x */\n )) {\n if (this.regexp_eatFixedHexDigits(state, 2)) {\n return true;\n }\n\n if (state.switchU) {\n state.raise(\"Invalid escape\");\n }\n\n state.pos = start;\n }\n\n return false;\n}; // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalDigits\n\n\npp$9.regexp_eatDecimalDigits = function (state) {\n var start = state.pos;\n var ch = 0;\n state.lastIntValue = 0;\n\n while (isDecimalDigit(ch = state.current())) {\n state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30\n /* 0 */\n );\n state.advance();\n }\n\n return state.pos !== start;\n};\n\nfunction isDecimalDigit(ch) {\n return ch >= 0x30\n /* 0 */\n && ch <= 0x39;\n /* 9 */\n} // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigits\n\n\npp$9.regexp_eatHexDigits = function (state) {\n var start = state.pos;\n var ch = 0;\n state.lastIntValue = 0;\n\n while (isHexDigit(ch = state.current())) {\n state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch);\n state.advance();\n }\n\n return state.pos !== start;\n};\n\nfunction isHexDigit(ch) {\n return ch >= 0x30\n /* 0 */\n && ch <= 0x39\n /* 9 */\n || ch >= 0x41\n /* A */\n && ch <= 0x46\n /* F */\n || ch >= 0x61\n /* a */\n && ch <= 0x66\n /* f */\n ;\n}\n\nfunction hexToInt(ch) {\n if (ch >= 0x41\n /* A */\n && ch <= 0x46\n /* F */\n ) {\n return 10 + (ch - 0x41\n /* A */\n );\n }\n\n if (ch >= 0x61\n /* a */\n && ch <= 0x66\n /* f */\n ) {\n return 10 + (ch - 0x61\n /* a */\n );\n }\n\n return ch - 0x30;\n /* 0 */\n} // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-LegacyOctalEscapeSequence\n// Allows only 0-377(octal) i.e. 0-255(decimal).\n\n\npp$9.regexp_eatLegacyOctalEscapeSequence = function (state) {\n if (this.regexp_eatOctalDigit(state)) {\n var n1 = state.lastIntValue;\n\n if (this.regexp_eatOctalDigit(state)) {\n var n2 = state.lastIntValue;\n\n if (n1 <= 3 && this.regexp_eatOctalDigit(state)) {\n state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue;\n } else {\n state.lastIntValue = n1 * 8 + n2;\n }\n } else {\n state.lastIntValue = n1;\n }\n\n return true;\n }\n\n return false;\n}; // https://www.ecma-international.org/ecma-262/8.0/#prod-OctalDigit\n\n\npp$9.regexp_eatOctalDigit = function (state) {\n var ch = state.current();\n\n if (isOctalDigit(ch)) {\n state.lastIntValue = ch - 0x30;\n /* 0 */\n\n state.advance();\n return true;\n }\n\n state.lastIntValue = 0;\n return false;\n};\n\nfunction isOctalDigit(ch) {\n return ch >= 0x30\n /* 0 */\n && ch <= 0x37;\n /* 7 */\n} // https://www.ecma-international.org/ecma-262/8.0/#prod-Hex4Digits\n// https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigit\n// And HexDigit HexDigit in https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence\n\n\npp$9.regexp_eatFixedHexDigits = function (state, length) {\n var start = state.pos;\n state.lastIntValue = 0;\n\n for (var i = 0; i < length; ++i) {\n var ch = state.current();\n\n if (!isHexDigit(ch)) {\n state.pos = start;\n return false;\n }\n\n state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch);\n state.advance();\n }\n\n return true;\n}; // Object type used to represent tokens. Note that normally, tokens\n// simply exist as properties on the parser object. This is only\n// used for the onToken callback and the external tokenizer.\n\n\nvar Token = function Token(p) {\n this.type = p.type;\n this.value = p.value;\n this.start = p.start;\n this.end = p.end;\n\n if (p.options.locations) {\n this.loc = new SourceLocation(p, p.startLoc, p.endLoc);\n }\n\n if (p.options.ranges) {\n this.range = [p.start, p.end];\n }\n}; // ## Tokenizer\n\n\nvar pp$8 = Parser.prototype; // Move to the next token\n\npp$8.next = function () {\n if (this.options.onToken) {\n this.options.onToken(new Token(this));\n }\n\n this.lastTokEnd = this.end;\n this.lastTokStart = this.start;\n this.lastTokEndLoc = this.endLoc;\n this.lastTokStartLoc = this.startLoc;\n this.nextToken();\n};\n\npp$8.getToken = function () {\n this.next();\n return new Token(this);\n}; // If we're in an ES6 environment, make parsers iterable\n\n\nif (typeof Symbol !== \"undefined\") {\n pp$8[Symbol.iterator] = function () {\n var this$1 = this;\n return {\n next: function next() {\n var token = this$1.getToken();\n return {\n done: token.type === types.eof,\n value: token\n };\n }\n };\n };\n} // Toggle strict mode. Re-reads the next number or string to please\n// pedantic tests (`\"use strict\"; 010;` should fail).\n\n\npp$8.curContext = function () {\n return this.context[this.context.length - 1];\n}; // Read a single token, updating the parser object's token-related\n// properties.\n\n\npp$8.nextToken = function () {\n var curContext = this.curContext();\n\n if (!curContext || !curContext.preserveSpace) {\n this.skipSpace();\n }\n\n this.start = this.pos;\n\n if (this.options.locations) {\n this.startLoc = this.curPosition();\n }\n\n if (this.pos >= this.input.length) {\n return this.finishToken(types.eof);\n }\n\n if (curContext.override) {\n return curContext.override(this);\n } else {\n this.readToken(this.fullCharCodeAtPos());\n }\n};\n\npp$8.readToken = function (code) {\n // Identifier or keyword. '\\uXXXX' sequences are allowed in\n // identifiers, so '\\' also dispatches to that.\n if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92\n /* '\\' */\n ) {\n return this.readWord();\n }\n\n return this.getTokenFromCode(code);\n};\n\npp$8.fullCharCodeAtPos = function () {\n var code = this.input.charCodeAt(this.pos);\n\n if (code <= 0xd7ff || code >= 0xe000) {\n return code;\n }\n\n var next = this.input.charCodeAt(this.pos + 1);\n return (code << 10) + next - 0x35fdc00;\n};\n\npp$8.skipBlockComment = function () {\n var this$1 = this;\n var startLoc = this.options.onComment && this.curPosition();\n var start = this.pos,\n end = this.input.indexOf(\"*/\", this.pos += 2);\n\n if (end === -1) {\n this.raise(this.pos - 2, \"Unterminated comment\");\n }\n\n this.pos = end + 2;\n\n if (this.options.locations) {\n lineBreakG.lastIndex = start;\n var match;\n\n while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) {\n ++this$1.curLine;\n this$1.lineStart = match.index + match[0].length;\n }\n }\n\n if (this.options.onComment) {\n this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, startLoc, this.curPosition());\n }\n};\n\npp$8.skipLineComment = function (startSkip) {\n var this$1 = this;\n var start = this.pos;\n var startLoc = this.options.onComment && this.curPosition();\n var ch = this.input.charCodeAt(this.pos += startSkip);\n\n while (this.pos < this.input.length && !isNewLine(ch)) {\n ch = this$1.input.charCodeAt(++this$1.pos);\n }\n\n if (this.options.onComment) {\n this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, startLoc, this.curPosition());\n }\n}; // Called at the start of the parse and after every token. Skips\n// whitespace and comments, and.\n\n\npp$8.skipSpace = function () {\n var this$1 = this;\n\n loop: while (this.pos < this.input.length) {\n var ch = this$1.input.charCodeAt(this$1.pos);\n\n switch (ch) {\n case 32:\n case 160:\n // ' '\n ++this$1.pos;\n break;\n\n case 13:\n if (this$1.input.charCodeAt(this$1.pos + 1) === 10) {\n ++this$1.pos;\n }\n\n case 10:\n case 8232:\n case 8233:\n ++this$1.pos;\n\n if (this$1.options.locations) {\n ++this$1.curLine;\n this$1.lineStart = this$1.pos;\n }\n\n break;\n\n case 47:\n // '/'\n switch (this$1.input.charCodeAt(this$1.pos + 1)) {\n case 42:\n // '*'\n this$1.skipBlockComment();\n break;\n\n case 47:\n this$1.skipLineComment(2);\n break;\n\n default:\n break loop;\n }\n\n break;\n\n default:\n if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {\n ++this$1.pos;\n } else {\n break loop;\n }\n\n }\n }\n}; // Called at the end of every token. Sets `end`, `val`, and\n// maintains `context` and `exprAllowed`, and skips the space after\n// the token, so that the next one's `start` will point at the\n// right position.\n\n\npp$8.finishToken = function (type, val) {\n this.end = this.pos;\n\n if (this.options.locations) {\n this.endLoc = this.curPosition();\n }\n\n var prevType = this.type;\n this.type = type;\n this.value = val;\n this.updateContext(prevType);\n}; // ### Token reading\n// This is the function that is called to fetch the next token. It\n// is somewhat obscure, because it works in character codes rather\n// than characters, and because operator parsing has been inlined\n// into it.\n//\n// All in the name of speed.\n//\n\n\npp$8.readToken_dot = function () {\n var next = this.input.charCodeAt(this.pos + 1);\n\n if (next >= 48 && next <= 57) {\n return this.readNumber(true);\n }\n\n var next2 = this.input.charCodeAt(this.pos + 2);\n\n if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) {\n // 46 = dot '.'\n this.pos += 3;\n return this.finishToken(types.ellipsis);\n } else {\n ++this.pos;\n return this.finishToken(types.dot);\n }\n};\n\npp$8.readToken_slash = function () {\n // '/'\n var next = this.input.charCodeAt(this.pos + 1);\n\n if (this.exprAllowed) {\n ++this.pos;\n return this.readRegexp();\n }\n\n if (next === 61) {\n return this.finishOp(types.assign, 2);\n }\n\n return this.finishOp(types.slash, 1);\n};\n\npp$8.readToken_mult_modulo_exp = function (code) {\n // '%*'\n var next = this.input.charCodeAt(this.pos + 1);\n var size = 1;\n var tokentype = code === 42 ? types.star : types.modulo; // exponentiation operator ** and **=\n\n if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) {\n ++size;\n tokentype = types.starstar;\n next = this.input.charCodeAt(this.pos + 2);\n }\n\n if (next === 61) {\n return this.finishOp(types.assign, size + 1);\n }\n\n return this.finishOp(tokentype, size);\n};\n\npp$8.readToken_pipe_amp = function (code) {\n // '|&'\n var next = this.input.charCodeAt(this.pos + 1);\n\n if (next === code) {\n return this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2);\n }\n\n if (next === 61) {\n return this.finishOp(types.assign, 2);\n }\n\n return this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1);\n};\n\npp$8.readToken_caret = function () {\n // '^'\n var next = this.input.charCodeAt(this.pos + 1);\n\n if (next === 61) {\n return this.finishOp(types.assign, 2);\n }\n\n return this.finishOp(types.bitwiseXOR, 1);\n};\n\npp$8.readToken_plus_min = function (code) {\n // '+-'\n var next = this.input.charCodeAt(this.pos + 1);\n\n if (next === code) {\n if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) {\n // A `-->` line comment\n this.skipLineComment(3);\n this.skipSpace();\n return this.nextToken();\n }\n\n return this.finishOp(types.incDec, 2);\n }\n\n if (next === 61) {\n return this.finishOp(types.assign, 2);\n }\n\n return this.finishOp(types.plusMin, 1);\n};\n\npp$8.readToken_lt_gt = function (code) {\n // '<>'\n var next = this.input.charCodeAt(this.pos + 1);\n var size = 1;\n\n if (next === code) {\n size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2;\n\n if (this.input.charCodeAt(this.pos + size) === 61) {\n return this.finishOp(types.assign, size + 1);\n }\n\n return this.finishOp(types.bitShift, size);\n }\n\n if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && this.input.charCodeAt(this.pos + 3) === 45) {\n // `\") : '');\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 _abstract4 = 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\n var forSvg = new RegExp(\"\".concat(config.familyPrefix, \"-.*\"));\n delete _abstract4[0].attributes.style;\n delete _abstract4[0].attributes.id;\n\n var splitClasses = _abstract4[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\n return acc;\n }, {\n toNode: [],\n toSvg: []\n });\n\n _abstract4[0].attributes.class = splitClasses.toSvg.join(' ');\n\n var newInnerHTML = _abstract4.map(function (a) {\n return toHtml(a);\n }).join('\\n');\n\n node.setAttribute('class', splitClasses.toNode.join(' '));\n node.setAttribute(DATA_FA_I2SVG, '');\n node.innerHTML = newInnerHTML;\n }\n};\n\nfunction performOperationSync(op) {\n op();\n}\n\nfunction perform(mutations, callback) {\n var callbackFunction = typeof callback === 'function' ? callback : noop$2;\n\n if (mutations.length === 0) {\n callbackFunction();\n } else {\n var frame = performOperationSync;\n\n if (config.mutateApproach === MUTATION_APPROACH_ASYNC) {\n frame = WINDOW.requestAnimationFrame || performOperationSync;\n }\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}\n\nvar disabled = false;\n\nfunction disableObservation() {\n disabled = true;\n}\n\nfunction enableObservation() {\n disabled = false;\n}\n\nvar mo = null;\n\nfunction observe(options) {\n if (!MUTATION_OBSERVER) {\n return;\n }\n\n if (!config.observeMutations) {\n return;\n }\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\n treeCallback(mutationRecord.target);\n }\n\n if (mutationRecord.type === 'attributes' && mutationRecord.target.parentNode && config.searchPseudoElements) {\n pseudoElementsCallback(mutationRecord.target.parentNode);\n }\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\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}\n\nfunction disconnect() {\n if (!mo) return;\n mo.disconnect();\n}\n\nfunction styleParser(node) {\n var style = node.getAttribute('style');\n var val = [];\n\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\n if (prop && value.length > 0) {\n acc[prop] = value.join(':').trim();\n }\n\n return acc;\n }, {});\n }\n\n return val;\n}\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\n if (existingPrefix && existingIconName) {\n val.prefix = existingPrefix;\n val.iconName = existingIconName;\n }\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\n return val;\n}\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\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\n if (first && rest === 'h') {\n acc.flipX = true;\n return acc;\n }\n\n if (first && rest === 'v') {\n acc.flipY = true;\n return acc;\n }\n\n rest = parseFloat(rest);\n\n if (isNaN(rest)) {\n return acc;\n }\n\n switch (first) {\n case 'grow':\n acc.size = acc.size + rest;\n break;\n\n case 'shrink':\n acc.size = acc.size - rest;\n break;\n\n case 'left':\n acc.x = acc.x - rest;\n break;\n\n case 'right':\n acc.x = acc.x + rest;\n break;\n\n case 'up':\n acc.y = acc.y - rest;\n break;\n\n case 'down':\n acc.y = acc.y + rest;\n break;\n\n case 'rotate':\n acc.rotate = acc.rotate + rest;\n break;\n }\n\n return acc;\n }, transform);\n }\n};\n\nfunction transformParser(node) {\n return parseTransformString(node.getAttribute('data-fa-transform'));\n}\n\nfunction symbolParser(node) {\n var symbol = node.getAttribute('data-fa-symbol');\n return symbol === null ? false : symbol === '' ? true : symbol;\n}\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\n return acc;\n }, {});\n var title = node.getAttribute('title');\n var titleId = node.getAttribute('data-fa-title-id');\n\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\n return extraAttributes;\n}\n\nfunction maskParser(node) {\n var mask = node.getAttribute('data-fa-mask');\n\n if (!mask) {\n return emptyCanonicalIcon();\n } else {\n return getCanonicalIcon(mask.split(' ').map(function (i) {\n return i.trim();\n }));\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}\n\nfunction parseMeta(node) {\n var _classParser = classParser(node),\n iconName = _classParser.iconName,\n prefix = _classParser.prefix,\n extraClasses = _classParser.rest;\n\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}\n\nfunction MissingIcon(error) {\n this.name = 'MissingIcon';\n this.message = error || 'Icon unavailable';\n this.stack = new Error().stack;\n}\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};\n\nvar OPACITY_ANIMATE = _objectSpread({}, ANIMATION_BASE, {\n attributeName: 'opacity'\n});\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;\n\nfunction resolveCustomIconVersion() {\n var kitConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var iconName = arguments.length > 1 ? arguments[1] : undefined;\n\n if (iconName && isPrivateUnicode(iconName)) {\n if (kitConfig && kitConfig.iconUploads) {\n var iconUploads = kitConfig.iconUploads;\n var descriptiveIconName = Object.keys(iconUploads).find(function (key) {\n return iconUploads[key] && iconUploads[key].u && iconUploads[key].u === toHex(iconName);\n });\n\n if (descriptiveIconName) {\n return iconUploads[descriptiveIconName].v;\n }\n }\n } else {\n if (kitConfig && kitConfig.iconUploads && kitConfig.iconUploads[iconName] && kitConfig.iconUploads[iconName].v) {\n return kitConfig.iconUploads[iconName].v;\n }\n }\n}\n\nfunction asFoundIcon(icon) {\n var width = icon[0];\n var height = icon[1];\n\n var _icon$slice = icon.slice(4),\n _icon$slice2 = _slicedToArray(_icon$slice, 1),\n vectorData = _icon$slice2[0];\n\n var element = null;\n\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\n return {\n found: true,\n width: width,\n height: height,\n icon: element\n };\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\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\n var kitToken = null;\n var iconVersion = resolveCustomIconVersion(WINDOW.FontAwesomeKitConfig, iconName);\n\n if (WINDOW.FontAwesomeKitConfig && WINDOW.FontAwesomeKitConfig.token) {\n kitToken = WINDOW.FontAwesomeKitConfig.token;\n }\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}\n\nvar styles$3 = namespace.styles;\n\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\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}\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\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\n if (config.autoA11y && !title) {\n extra.attributes['aria-hidden'] = 'true';\n }\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}\n\nfunction generateMutation(node) {\n var nodeMeta = parseMeta(node);\n\n if (~nodeMeta.extra.classes.indexOf(LAYERS_TEXT_CLASSNAME)) {\n return generateLayersText(node, nodeMeta);\n } else {\n return generateSvgReplacementMutation(node, nodeMeta);\n }\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\n var hclAdd = function hclAdd(suffix) {\n return htmlClassList.add(\"\".concat(HTML_CLASS_I2SVG_BASE_CLASS, \"-\").concat(suffix));\n };\n\n var hclRemove = function hclRemove(suffix) {\n return htmlClassList.remove(\"\".concat(HTML_CLASS_I2SVG_BASE_CLASS, \"-\").concat(suffix));\n };\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\n if (prefixesDomQuery.length === 0) {\n return;\n }\n\n var candidates = [];\n\n try {\n candidates = toArray(root.querySelectorAll(prefixesDomQuery));\n } catch (e) {// noop\n }\n\n if (candidates.length > 0) {\n hclAdd('pending');\n hclRemove('complete');\n } else {\n return;\n }\n\n var mark = perf.begin('onTree');\n var mutations = candidates.reduce(function (acc, node) {\n try {\n var mutation = generateMutation(node);\n\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\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}\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}\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\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\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\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\n if (alreadyProcessedPseudoElement) {\n // Delete the old one, since we're replacing it with a new one\n node.removeChild(alreadyProcessedPseudoElement);\n }\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 _abstract5 = 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\n var element = DOCUMENT.createElement('svg');\n\n if (position === ':before') {\n node.insertBefore(element, node.firstChild);\n } else {\n node.appendChild(element);\n }\n\n element.outerHTML = _abstract5.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}\n\nfunction replace(node) {\n return picked.all([replaceForPosition(node, ':before'), replaceForPosition(node, ':after')]);\n}\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}\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}\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}\";\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\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\n return s;\n}\n\nvar Library =\n/*#__PURE__*/\nfunction () {\n function Library() {\n _classCallCheck(this, Library);\n\n this.definitions = {};\n }\n\n _createClass(Library, [{\n key: \"add\",\n value: function add() {\n var _this = this;\n\n for (var _len = arguments.length, definitions = new Array(_len), _key = 0; _key < _len; _key++) {\n definitions[_key] = arguments[_key];\n }\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\n return Library;\n}();\n\nfunction ensureCss() {\n if (config.autoAddCss && !_cssInserted) {\n insertCss(css());\n _cssInserted = true;\n }\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}\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}\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\n if (mask) {\n mask = (mask || {}).icon ? mask : findIconDefinition(mask || {});\n }\n\n return next(iconDefinition, _objectSpread({}, params, {\n mask: mask\n }));\n };\n}\n\nvar library = new Library();\n\nvar noAuto = function noAuto() {\n config.autoReplaceSvg = false;\n config.observeMutations = false;\n disconnect();\n};\n\nvar _cssInserted = false;\nvar dom = {\n i2svg: function i2svg() {\n var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\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\n if (config.searchPseudoElements) {\n searchPseudoElements(node);\n }\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\n if (config.autoReplaceSvg === false) {\n config.autoReplaceSvg = true;\n }\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\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\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});\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};\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};\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};\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};\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};\n\nexport { icon, noAuto, config, toHtml, layer, text, counter, library, dom, parse, findIconDefinition };","import { isString } from './is';\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\n\nexport function htmlTreeAsString(elem) {\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n var currentElem = elem;\n var MAX_TRAVERSE_HEIGHT = 5;\n var MAX_OUTPUT_LEN = 80;\n var out = [];\n var height = 0;\n var len = 0;\n var separator = ' > ';\n var sepLength = separator.length;\n var nextStr = void 0; // eslint-disable-next-line no-plusplus\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem); // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds MAX_OUTPUT_LEN\n // (ignore this limit if we are on the first iteration)\n\n if (nextStr === 'html' || height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN) {\n break;\n }\n\n out.push(nextStr);\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '';\n }\n}\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\n\nfunction _htmlElementAsString(el) {\n var elem = el;\n var out = [];\n var className;\n var classes;\n var key;\n var attr;\n var i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n out.push(elem.tagName.toLowerCase());\n\n if (elem.id) {\n out.push(\"#\" + elem.id);\n } // eslint-disable-next-line prefer-const\n\n\n className = elem.className;\n\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n\n for (i = 0; i < classes.length; i++) {\n out.push(\".\" + classes[i]);\n }\n }\n\n var allowedAttrs = ['type', 'name', 'title', 'alt'];\n\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n\n if (attr) {\n out.push(\"[\" + key + \"=\\\"\" + attr + \"\\\"]\");\n }\n }\n\n return out.join('');\n}","import { logger } from './logger';\nimport { getGlobalObject } from './misc';\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\n\nexport function supportsErrorEvent() {\n try {\n new ErrorEvent('');\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\n\nexport function supportsDOMError() {\n try {\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-ignore It really needs 1 argument, not 0.\n new DOMError('');\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\n\nexport function supportsDOMException() {\n try {\n new DOMException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\n\nexport function supportsFetch() {\n if (!('fetch' in getGlobalObject())) {\n return false;\n }\n\n try {\n new Headers();\n new Request('');\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\n\nfunction isNativeFetch(func) {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\n\n\nexport function supportsNativeFetch() {\n if (!supportsFetch()) {\n return false;\n }\n\n var global = getGlobalObject(); // Fast path to avoid DOM I/O\n // eslint-disable-next-line @typescript-eslint/unbound-method\n\n if (isNativeFetch(global.fetch)) {\n return true;\n } // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n\n\n var result = false;\n var doc = global.document; // eslint-disable-next-line deprecation/deprecation\n\n if (doc && typeof doc.createElement === \"function\") {\n try {\n var sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n\n doc.head.removeChild(sandbox);\n } catch (err) {\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n\n return result;\n}\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\n\nexport function supportsReportingObserver() {\n return 'ReportingObserver' in getGlobalObject();\n}\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\n\nexport function supportsReferrerPolicy() {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default\n // https://caniuse.com/#feat=referrer-policy\n // It doesn't. And it throw exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n if (!supportsFetch()) {\n return false;\n }\n\n try {\n new Request('_', {\n referrerPolicy: 'origin'\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\n\nexport function supportsHistory() {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n var global = getGlobalObject();\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n var chrome = global.chrome;\n var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n\n var hasHistoryApi = 'history' in global && !!global.history.pushState && !!global.history.replaceState;\n return !isChromePackagedApp && hasHistoryApi;\n}","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n'use strict';\n/* eslint-disable no-unused-vars */\n\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n if (val === null || val === undefined) {\n throw new TypeError('Object.assign cannot be called with null or undefined');\n }\n\n return Object(val);\n}\n\nfunction shouldUseNative() {\n try {\n if (!Object.assign) {\n return false;\n } // Detect buggy property enumeration order in older V8 versions.\n // https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\n\n var test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\n test1[5] = 'de';\n\n if (Object.getOwnPropertyNames(test1)[0] === '5') {\n return false;\n } // https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\n\n var test2 = {};\n\n for (var i = 0; i < 10; i++) {\n test2['_' + String.fromCharCode(i)] = i;\n }\n\n var order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n return test2[n];\n });\n\n if (order2.join('') !== '0123456789') {\n return false;\n } // https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\n\n var test3 = {};\n 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n test3[letter] = letter;\n });\n\n if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {\n return false;\n }\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}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n var from;\n var to = toObject(target);\n var symbols;\n\n for (var s = 1; s < arguments.length; s++) {\n from = Object(arguments[s]);\n\n for (var key in from) {\n if (hasOwnProperty.call(from, key)) {\n to[key] = from[key];\n }\n }\n\n if (getOwnPropertySymbols) {\n symbols = getOwnPropertySymbols(from);\n\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\n return to;\n};","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};","module.exports = function (module) {\n if (!module.webpackPolyfill) {\n module.deprecate = function () {};\n\n module.paths = []; // module.parent = undefined by default\n\n if (!module.children) module.children = [];\n Object.defineProperty(module, \"loaded\", {\n enumerable: true,\n get: function get() {\n return module.l;\n }\n });\n Object.defineProperty(module, \"id\", {\n enumerable: true,\n get: function get() {\n return module.i;\n }\n });\n module.webpackPolyfill = 1;\n }\n\n return module;\n};","/** Used to compose unicode character classes. */\nvar rsAstralRange = \"\\\\ud800-\\\\udfff\",\n rsComboMarksRange = \"\\\\u0300-\\\\u036f\",\n reComboHalfMarksRange = \"\\\\ufe20-\\\\ufe2f\",\n rsComboSymbolsRange = \"\\\\u20d0-\\\\u20ff\",\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = \"\\\\ufe0e\\\\ufe0f\";\n/** Used to compose unicode capture groups. */\n\nvar rsZWJ = \"\\\\u200d\";\n/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n\nvar reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n/**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\n\nfunction hasUnicode(string) {\n return reHasUnicode.test(string);\n}\n\nmodule.exports = hasUnicode;","// 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'use strict';\n/**/\n\nvar pna = require('process-nextick-args');\n/**/\n\n\nmodule.exports = Readable;\n/**/\n\nvar isArray = require('isarray');\n/**/\n\n/**/\n\n\nvar Duplex;\n/**/\n\nReadable.ReadableState = ReadableState;\n/**/\n\nvar EE = require('events').EventEmitter;\n\nvar EElistenerCount = function EElistenerCount(emitter, type) {\n return emitter.listeners(type).length;\n};\n/**/\n\n/**/\n\n\nvar Stream = require('./internal/streams/stream');\n/**/\n\n/**/\n\n\nvar Buffer = require('safe-buffer').Buffer;\n\nvar OurUint8Array = global.Uint8Array || function () {};\n\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\n\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n/**/\n\n/**/\n\n\nvar util = require('core-util-is');\n\nutil.inherits = require('inherits');\n/**/\n\n/**/\n\nvar debugUtil = require('util');\n\nvar debug = void 0;\n\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function debug() {};\n}\n/**/\n\n\nvar BufferList = require('./internal/streams/BufferList');\n\nvar destroyImpl = require('./internal/streams/destroy');\n\nvar StringDecoder;\nutil.inherits(Readable, Stream);\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\n\nfunction prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n\n if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\n\nfunction ReadableState(options, stream) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {}; // 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\n var isDuplex = stream instanceof Duplex; // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n\n var hwm = options.highWaterMark;\n var readableHwm = options.readableHighWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; // cast to ints.\n\n this.highWaterMark = Math.floor(this.highWaterMark); // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false; // a flag to be able to tell if the event 'readable'/'data' is emitted\n // immediately, or on a later tick. We set this to true at first, because\n // any actions that shouldn't happen until \"later\" should generally also\n // not happen before the first read call.\n\n this.sync = true; // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false; // has it been destroyed\n\n this.destroyed = false; // 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\n this.defaultEncoding = options.defaultEncoding || 'utf8'; // the number of writers that are awaiting a drain event in .pipe()s\n\n this.awaitDrain = 0; // if true, a maybeReadMore has been scheduled\n\n this.readingMore = false;\n this.decoder = null;\n this.encoding = null;\n\n if (options.encoding) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\n\nfunction Readable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n if (!(this instanceof Readable)) return new Readable(options);\n this._readableState = new ReadableState(options, this); // legacy\n\n this.readable = true;\n\n if (options) {\n if (typeof options.read === 'function') this._read = options.read;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n }\n\n Stream.call(this);\n}\n\nObject.defineProperty(Readable.prototype, 'destroyed', {\n get: function get() {\n if (this._readableState === undefined) {\n return false;\n }\n\n return this._readableState.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) {\n return;\n } // backward compatibility, the user is explicitly\n // managing destroyed\n\n\n this._readableState.destroyed = value;\n }\n});\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\n\nReadable.prototype._destroy = function (err, cb) {\n this.push(null);\n cb(err);\n}; // Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\n\n\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n var skipChunkCheck;\n\n if (!state.objectMode) {\n if (typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n\n if (encoding !== state.encoding) {\n chunk = Buffer.from(chunk, encoding);\n encoding = '';\n }\n\n skipChunkCheck = true;\n }\n } else {\n skipChunkCheck = true;\n }\n\n return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n}; // Unshift should *always* be something directly out of read()\n\n\nReadable.prototype.unshift = function (chunk) {\n return readableAddChunk(this, chunk, null, true, false);\n};\n\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n var state = stream._readableState;\n\n if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else {\n var er;\n if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n\n if (er) {\n stream.emit('error', er);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (addToFront) {\n if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);\n } else if (state.ended) {\n stream.emit('error', new Error('stream.push() after EOF'));\n } else {\n state.reading = false;\n\n if (state.decoder && !encoding) {\n chunk = state.decoder.write(chunk);\n if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n } else {\n addChunk(stream, state, chunk, false);\n }\n }\n } else if (!addToFront) {\n state.reading = false;\n }\n }\n\n return needMoreData(state);\n}\n\nfunction addChunk(stream, state, chunk, addToFront) {\n if (state.flowing && state.length === 0 && !state.sync) {\n stream.emit('data', chunk);\n stream.read(0);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n if (state.needReadable) emitReadable(stream);\n }\n\n maybeReadMore(stream, state);\n}\n\nfunction chunkInvalid(state, chunk) {\n var er;\n\n if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n\n return er;\n} // if it's past the high water mark, we can push in some more.\n// Also, if we have no data yet, we can stand some\n// more bytes. This is to work around cases where hwm=0,\n// such as the repl. Also, if the push() triggered a\n// readable event, and the user called read(largeNumber) such that\n// needReadable was set, then we ought to push more, so that another\n// 'readable' event will be triggered.\n\n\nfunction needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}\n\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n}; // backwards compatibility.\n\n\nReadable.prototype.setEncoding = function (enc) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this._readableState.decoder = new StringDecoder(enc);\n this._readableState.encoding = enc;\n return this;\n}; // Don't raise the hwm > 8MB\n\n\nvar MAX_HWM = 0x800000;\n\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n\n return n;\n} // This function is designed to be inlinable, so please take care when making\n// changes to the function body.\n\n\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.\n\n\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n if (n !== 0) state.emittedReadable = false; // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n\n if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n\n n = howMuchToRead(n, state); // if we've ended, and we're now clear, then finish it up.\n\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n } // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n // if we need a readable event, then we need to do some reading.\n\n\n var doRead = state.needReadable;\n debug('need readable', doRead); // if we currently have less than the highWaterMark, then also read some\n\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n } // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n\n\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true; // if the length is currently zero, then we *need* a readable event.\n\n if (state.length === 0) state.needReadable = true; // call internal read method\n\n this._read(state.highWaterMark);\n\n state.sync = false; // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n\n if (ret === null) {\n state.needReadable = true;\n n = 0;\n } else {\n state.length -= n;\n }\n\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true; // If we tried to read() past the EOF, then emit end on the next tick.\n\n if (nOrig !== n && state.ended) endReadable(this);\n }\n\n if (ret !== null) this.emit('data', ret);\n return ret;\n};\n\nfunction onEofChunk(stream, state) {\n if (state.ended) return;\n\n if (state.decoder) {\n var chunk = state.decoder.end();\n\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n\n state.ended = true; // emit 'readable' now to make sure it gets picked up.\n\n emitReadable(stream);\n} // Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\n\n\nfunction emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}\n\nfunction emitReadable_(stream) {\n debug('emit readable');\n stream.emit('readable');\n flow(stream);\n} // at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\n\n\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n pna.nextTick(maybeReadMore_, stream, state);\n }\n}\n\nfunction maybeReadMore_(stream, state) {\n var len = state.length;\n\n while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length) // didn't get any data, stop spinning.\n break;else len = state.length;\n }\n\n state.readingMore = false;\n} // abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\n\n\nReadable.prototype._read = function (n) {\n this.emit('error', new Error('_read() is not implemented'));\n};\n\nReadable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n\n default:\n state.pipes.push(dest);\n break;\n }\n\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n var endFn = doEnd ? onend : unpipe;\n if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);\n dest.on('unpipe', onunpipe);\n\n function onunpipe(readable, unpipeInfo) {\n debug('onunpipe');\n\n if (readable === src) {\n if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n unpipeInfo.hasUnpiped = true;\n cleanup();\n }\n }\n }\n\n function onend() {\n debug('onend');\n dest.end();\n } // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n\n\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n var cleanedUp = false;\n\n function cleanup() {\n debug('cleanup'); // cleanup event handlers once the pipe is broken\n\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', unpipe);\n src.removeListener('data', ondata);\n cleanedUp = true; // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n } // If the user pushes more data while we're writing to dest then we'll end up\n // in ondata again. However, we only want to increase awaitDrain once because\n // dest will only emit one 'drain' event for the multiple writes.\n // => Introduce a guard on increasing awaitDrain.\n\n\n var increasedAwaitDrain = false;\n src.on('data', ondata);\n\n function ondata(chunk) {\n debug('ondata');\n increasedAwaitDrain = false;\n var ret = dest.write(chunk);\n\n if (false === ret && !increasedAwaitDrain) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', src._readableState.awaitDrain);\n src._readableState.awaitDrain++;\n increasedAwaitDrain = true;\n }\n\n src.pause();\n }\n } // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n\n\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\n } // Make sure our error handler is attached before userland ones.\n\n\n prependListener(dest, 'error', onerror); // Both close and finish should trigger unpipe, but only once.\n\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n\n dest.once('close', onclose);\n\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n\n dest.once('finish', onfinish);\n\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n } // tell the dest that it's being piped to\n\n\n dest.emit('pipe', src); // start the flow if it hasn't been started already.\n\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n\n return dest;\n};\n\nfunction pipeOnDrain(src) {\n return function () {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n\n if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n state.flowing = true;\n flow(src);\n }\n };\n}\n\nReadable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n var unpipeInfo = {\n hasUnpiped: false\n }; // if we're not piping anywhere, then do nothing.\n\n if (state.pipesCount === 0) return this; // just one destination. most common case.\n\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n if (!dest) dest = state.pipes; // got a match.\n\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this, unpipeInfo);\n return this;\n } // slow case. multiple pipe destinations.\n\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n\n for (var i = 0; i < len; i++) {\n dests[i].emit('unpipe', this, unpipeInfo);\n }\n\n return this;\n } // try to find the right one.\n\n\n var index = indexOf(state.pipes, dest);\n if (index === -1) return this;\n state.pipes.splice(index, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n dest.emit('unpipe', this, unpipeInfo);\n return this;\n}; // set up data events if they are asked for\n// Ensure readable listeners eventually get something\n\n\nReadable.prototype.on = function (ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n\n if (ev === 'data') {\n // Start flowing on next tick if stream isn't explicitly paused\n if (this._readableState.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n var state = this._readableState;\n\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.emittedReadable = false;\n\n if (!state.reading) {\n pna.nextTick(nReadingNextTick, this);\n } else if (state.length) {\n emitReadable(this);\n }\n }\n }\n\n return res;\n};\n\nReadable.prototype.addListener = Readable.prototype.on;\n\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n} // pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\n\n\nReadable.prototype.resume = function () {\n var state = this._readableState;\n\n if (!state.flowing) {\n debug('resume');\n state.flowing = true;\n resume(this, state);\n }\n\n return this;\n};\n\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n pna.nextTick(resume_, stream, state);\n }\n}\n\nfunction resume_(stream, state) {\n if (!state.reading) {\n debug('resume read 0');\n stream.read(0);\n }\n\n state.resumeScheduled = false;\n state.awaitDrain = 0;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n}\n\nReadable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n\n if (false !== this._readableState.flowing) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n\n return this;\n};\n\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n\n while (state.flowing && stream.read() !== null) {}\n} // wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\n\n\nReadable.prototype.wrap = function (stream) {\n var _this = this;\n\n var state = this._readableState;\n var paused = false;\n stream.on('end', function () {\n debug('wrapped end');\n\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) _this.push(chunk);\n }\n\n _this.push(null);\n });\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk); // don't skip over falsy values in objectMode\n\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n var ret = _this.push(chunk);\n\n if (!ret) {\n paused = true;\n stream.pause();\n }\n }); // proxy all the other methods.\n // important when wrapping filters and duplexes.\n\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function (method) {\n return function () {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n } // proxy certain important events.\n\n\n for (var n = 0; n < kProxyEvents.length; n++) {\n stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n } // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n\n\n this._read = function (n) {\n debug('wrapped _read', n);\n\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n\n return this;\n};\n\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\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._readableState.highWaterMark;\n }\n}); // exposed for testing purposes only.\n\nReadable._fromList = fromList; // Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\n\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = fromListPartial(n, state.buffer, state.decoder);\n }\n return ret;\n} // Extracts only enough buffered data to satisfy the amount requested.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\n\n\nfunction fromListPartial(n, list, hasStrings) {\n var ret;\n\n if (n < list.head.data.length) {\n // slice is the same for buffers and strings\n ret = list.head.data.slice(0, n);\n list.head.data = list.head.data.slice(n);\n } else if (n === list.head.data.length) {\n // first chunk is a perfect match\n ret = list.shift();\n } else {\n // result spans more than one buffer\n ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);\n }\n\n return ret;\n} // Copies a specified amount of characters from the list of buffered data\n// chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\n\n\nfunction copyFromBufferString(n, list) {\n var p = list.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length) ret += str;else ret += str.slice(0, n);\n n -= nb;\n\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = str.slice(nb);\n }\n\n break;\n }\n\n ++c;\n }\n\n list.length -= c;\n return ret;\n} // Copies a specified amount of bytes from the list of buffered data chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\n\n\nfunction copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n\n break;\n }\n\n ++c;\n }\n\n list.length -= c;\n return ret;\n}\n\nfunction endReadable(stream) {\n var state = stream._readableState; // If we get here before consuming all the bytes, then that is a\n // bug in node. Should never happen.\n\n if (state.length > 0) throw new Error('\"endReadable()\" called on non-empty stream');\n\n if (!state.endEmitted) {\n state.ended = true;\n pna.nextTick(endReadableNT, state, stream);\n }\n}\n\nfunction endReadableNT(state, stream) {\n // Check that we didn't get one last unshift.\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n }\n}\n\nfunction indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n\n return -1;\n}","module.exports = require('events').EventEmitter;","'use strict';\n/**/\n\nvar pna = require('process-nextick-args');\n/**/\n// undocumented cb() API, needed for core, not for public API\n\n\nfunction destroy(err, cb) {\n var _this = this;\n\n var readableDestroyed = this._readableState && this._readableState.destroyed;\n var writableDestroyed = this._writableState && this._writableState.destroyed;\n\n if (readableDestroyed || writableDestroyed) {\n if (cb) {\n cb(err);\n } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {\n pna.nextTick(emitErrorNT, this, err);\n }\n\n return this;\n } // we set destroyed to true before firing error callbacks in order\n // to make it re-entrance safe in case destroy() is called within callbacks\n\n\n if (this._readableState) {\n this._readableState.destroyed = true;\n } // if this is a duplex stream mark the writable part as destroyed as well\n\n\n if (this._writableState) {\n this._writableState.destroyed = true;\n }\n\n this._destroy(err || null, function (err) {\n if (!cb && err) {\n pna.nextTick(emitErrorNT, _this, err);\n\n if (_this._writableState) {\n _this._writableState.errorEmitted = true;\n }\n } else if (cb) {\n cb(err);\n }\n });\n\n return this;\n}\n\nfunction undestroy() {\n if (this._readableState) {\n this._readableState.destroyed = false;\n this._readableState.reading = false;\n this._readableState.ended = false;\n this._readableState.endEmitted = false;\n }\n\n if (this._writableState) {\n this._writableState.destroyed = false;\n this._writableState.ended = false;\n this._writableState.ending = false;\n this._writableState.finished = false;\n this._writableState.errorEmitted = false;\n }\n}\n\nfunction emitErrorNT(self, err) {\n self.emit('error', err);\n}\n\nmodule.exports = {\n destroy: destroy,\n undestroy: undestroy\n};","var scope = typeof global !== \"undefined\" && global || typeof self !== \"undefined\" && self || window;\nvar apply = Function.prototype.apply; // DOM APIs, for completeness\n\nexports.setTimeout = function () {\n return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\n\nexports.setInterval = function () {\n return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\n\nexports.clearTimeout = exports.clearInterval = function (timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\n\nTimeout.prototype.unref = Timeout.prototype.ref = function () {};\n\nTimeout.prototype.close = function () {\n this._clearFn.call(scope, this._id);\n}; // Does not start the time, just sets up the members needed.\n\n\nexports.enroll = function (item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function (item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function (item) {\n clearTimeout(item._idleTimeoutId);\n var msecs = item._idleTimeout;\n\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout) item._onTimeout();\n }, msecs);\n }\n}; // setimmediate attaches itself to the global object\n\n\nrequire(\"setimmediate\"); // On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\n\n\nexports.setImmediate = typeof self !== \"undefined\" && self.setImmediate || typeof global !== \"undefined\" && global.setImmediate || this && this.setImmediate;\nexports.clearImmediate = typeof self !== \"undefined\" && self.clearImmediate || typeof global !== \"undefined\" && global.clearImmediate || this && this.clearImmediate;","// 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'use strict';\n/**/\n\nvar Buffer = require('safe-buffer').Buffer;\n/**/\n\n\nvar isEncoding = Buffer.isEncoding || function (encoding) {\n encoding = '' + encoding;\n\n switch (encoding && encoding.toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n case 'raw':\n return true;\n\n default:\n return false;\n }\n};\n\nfunction _normalizeEncoding(enc) {\n if (!enc) return 'utf8';\n var retried;\n\n while (true) {\n switch (enc) {\n case 'utf8':\n case 'utf-8':\n return 'utf8';\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return 'utf16le';\n\n case 'latin1':\n case 'binary':\n return 'latin1';\n\n case 'base64':\n case 'ascii':\n case 'hex':\n return enc;\n\n default:\n if (retried) return; // undefined\n\n enc = ('' + enc).toLowerCase();\n retried = true;\n }\n }\n}\n\n; // Do not cache `Buffer.isEncoding` when checking encoding names as some\n// modules monkey-patch it to support additional encodings\n\nfunction normalizeEncoding(enc) {\n var nenc = _normalizeEncoding(enc);\n\n if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);\n return nenc || enc;\n} // StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters.\n\n\nexports.StringDecoder = StringDecoder;\n\nfunction StringDecoder(encoding) {\n this.encoding = normalizeEncoding(encoding);\n var nb;\n\n switch (this.encoding) {\n case 'utf16le':\n this.text = utf16Text;\n this.end = utf16End;\n nb = 4;\n break;\n\n case 'utf8':\n this.fillLast = utf8FillLast;\n nb = 4;\n break;\n\n case 'base64':\n this.text = base64Text;\n this.end = base64End;\n nb = 3;\n break;\n\n default:\n this.write = simpleWrite;\n this.end = simpleEnd;\n return;\n }\n\n this.lastNeed = 0;\n this.lastTotal = 0;\n this.lastChar = Buffer.allocUnsafe(nb);\n}\n\nStringDecoder.prototype.write = function (buf) {\n if (buf.length === 0) return '';\n var r;\n var i;\n\n if (this.lastNeed) {\n r = this.fillLast(buf);\n if (r === undefined) return '';\n i = this.lastNeed;\n this.lastNeed = 0;\n } else {\n i = 0;\n }\n\n if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);\n return r || '';\n};\n\nStringDecoder.prototype.end = utf8End; // Returns only complete characters in a Buffer\n\nStringDecoder.prototype.text = utf8Text; // Attempts to complete a partial non-UTF-8 character using bytes from a Buffer\n\nStringDecoder.prototype.fillLast = function (buf) {\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);\n this.lastNeed -= buf.length;\n}; // Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a\n// continuation byte. If an invalid byte is detected, -2 is returned.\n\n\nfunction utf8CheckByte(_byte) {\n if (_byte <= 0x7F) return 0;else if (_byte >> 5 === 0x06) return 2;else if (_byte >> 4 === 0x0E) return 3;else if (_byte >> 3 === 0x1E) return 4;\n return _byte >> 6 === 0x02 ? -1 : -2;\n} // Checks at most 3 bytes at the end of a Buffer in order to detect an\n// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)\n// needed to complete the UTF-8 character (if applicable) are returned.\n\n\nfunction utf8CheckIncomplete(self, buf, i) {\n var j = buf.length - 1;\n if (j < i) return 0;\n var nb = utf8CheckByte(buf[j]);\n\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 1;\n return nb;\n }\n\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 2;\n return nb;\n }\n\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n\n if (nb >= 0) {\n if (nb > 0) {\n if (nb === 2) nb = 0;else self.lastNeed = nb - 3;\n }\n\n return nb;\n }\n\n return 0;\n} // Validates as many continuation bytes for a multi-byte UTF-8 character as\n// needed or are available. If we see a non-continuation byte where we expect\n// one, we \"replace\" the validated continuation bytes we've seen so far with\n// a single UTF-8 replacement character ('\\ufffd'), to match v8's UTF-8 decoding\n// behavior. The continuation byte check is included three times in the case\n// where all of the continuation bytes for a character exist in the same buffer.\n// It is also done this way as a slight performance increase instead of using a\n// loop.\n\n\nfunction utf8CheckExtraBytes(self, buf, p) {\n if ((buf[0] & 0xC0) !== 0x80) {\n self.lastNeed = 0;\n return \"\\uFFFD\";\n }\n\n if (self.lastNeed > 1 && buf.length > 1) {\n if ((buf[1] & 0xC0) !== 0x80) {\n self.lastNeed = 1;\n return \"\\uFFFD\";\n }\n\n if (self.lastNeed > 2 && buf.length > 2) {\n if ((buf[2] & 0xC0) !== 0x80) {\n self.lastNeed = 2;\n return \"\\uFFFD\";\n }\n }\n }\n} // Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.\n\n\nfunction utf8FillLast(buf) {\n var p = this.lastTotal - this.lastNeed;\n var r = utf8CheckExtraBytes(this, buf, p);\n if (r !== undefined) return r;\n\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, p, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n\n buf.copy(this.lastChar, p, 0, buf.length);\n this.lastNeed -= buf.length;\n} // Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a\n// partial character, the character's bytes are buffered until the required\n// number of bytes are available.\n\n\nfunction utf8Text(buf, i) {\n var total = utf8CheckIncomplete(this, buf, i);\n if (!this.lastNeed) return buf.toString('utf8', i);\n this.lastTotal = total;\n var end = buf.length - (total - this.lastNeed);\n buf.copy(this.lastChar, 0, end);\n return buf.toString('utf8', i, end);\n} // For UTF-8, a replacement character is added when ending on a partial\n// character.\n\n\nfunction utf8End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + \"\\uFFFD\";\n return r;\n} // UTF-16LE typically needs two bytes per character, but even if we have an even\n// number of bytes available, we need to check if we end on a leading/high\n// surrogate. In that case, we need to wait for the next two bytes in order to\n// decode the last character properly.\n\n\nfunction utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n\n return r;\n }\n\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n} // For UTF-16LE we do not explicitly append special replacement characters if we\n// end on a partial character, we simply let v8 handle that.\n\n\nfunction utf16End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n\n if (this.lastNeed) {\n var end = this.lastTotal - this.lastNeed;\n return r + this.lastChar.toString('utf16le', 0, end);\n }\n\n return r;\n}\n\nfunction base64Text(buf, i) {\n var n = (buf.length - i) % 3;\n if (n === 0) return buf.toString('base64', i);\n this.lastNeed = 3 - n;\n this.lastTotal = 3;\n\n if (n === 1) {\n this.lastChar[0] = buf[buf.length - 1];\n } else {\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n }\n\n return buf.toString('base64', i, buf.length - n);\n}\n\nfunction base64End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);\n return r;\n} // Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)\n\n\nfunction simpleWrite(buf) {\n return buf.toString(this.encoding);\n}\n\nfunction simpleEnd(buf) {\n return buf && buf.length ? this.write(buf) : '';\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// a transform stream is a readable/writable stream where you do\n// something with the data. Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored. (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation. For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes. When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up. When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer. When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks. If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk. However,\n// a pathological inflate type of transform can cause excessive buffering\n// here. For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output. In this case, you could write a very small\n// amount of input, and end up with a very large amount of output. In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform. A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n'use strict';\n\nmodule.exports = Transform;\n\nvar Duplex = require('./_stream_duplex');\n/**/\n\n\nvar util = require('core-util-is');\n\nutil.inherits = require('inherits');\n/**/\n\nutil.inherits(Transform, Duplex);\n\nfunction afterTransform(er, data) {\n var ts = this._transformState;\n ts.transforming = false;\n var cb = ts.writecb;\n\n if (!cb) {\n return this.emit('error', new Error('write callback called multiple times'));\n }\n\n ts.writechunk = null;\n ts.writecb = null;\n if (data != null) // single equals check for both `null` and `undefined`\n this.push(data);\n cb(er);\n var rs = this._readableState;\n rs.reading = false;\n\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n this._read(rs.highWaterMark);\n }\n}\n\nfunction Transform(options) {\n if (!(this instanceof Transform)) return new Transform(options);\n Duplex.call(this, options);\n this._transformState = {\n afterTransform: afterTransform.bind(this),\n needTransform: false,\n transforming: false,\n writecb: null,\n writechunk: null,\n writeencoding: null\n }; // start out asking for a readable event once data is transformed.\n\n this._readableState.needReadable = true; // we have implemented the _read method, and done the other things\n // that Readable wants before the first _read call, so unset the\n // sync guard flag.\n\n this._readableState.sync = false;\n\n if (options) {\n if (typeof options.transform === 'function') this._transform = options.transform;\n if (typeof options.flush === 'function') this._flush = options.flush;\n } // When the writable side finishes, then flush out anything remaining.\n\n\n this.on('prefinish', prefinish);\n}\n\nfunction prefinish() {\n var _this = this;\n\n if (typeof this._flush === 'function') {\n this._flush(function (er, data) {\n done(_this, er, data);\n });\n } else {\n done(this, null, null);\n }\n}\n\nTransform.prototype.push = function (chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\n}; // This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side. You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk. If you pass\n// an error, then that'll put the hurt on the whole operation. If you\n// never call cb(), then you'll never get another chunk.\n\n\nTransform.prototype._transform = function (chunk, encoding, cb) {\n throw new Error('_transform() is not implemented');\n};\n\nTransform.prototype._write = function (chunk, encoding, cb) {\n var ts = this._transformState;\n ts.writecb = cb;\n ts.writechunk = chunk;\n ts.writeencoding = encoding;\n\n if (!ts.transforming) {\n var rs = this._readableState;\n if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n }\n}; // Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\n\n\nTransform.prototype._read = function (n) {\n var ts = this._transformState;\n\n if (ts.writechunk !== null && ts.writecb && !ts.transforming) {\n ts.transforming = true;\n\n this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n } else {\n // mark that we need a transform, so that any data that comes in\n // will get processed, now that we've asked for it.\n ts.needTransform = true;\n }\n};\n\nTransform.prototype._destroy = function (err, cb) {\n var _this2 = this;\n\n Duplex.prototype._destroy.call(this, err, function (err2) {\n cb(err2);\n\n _this2.emit('close');\n });\n};\n\nfunction done(stream, er, data) {\n if (er) return stream.emit('error', er);\n if (data != null) // single equals check for both `null` and `undefined`\n stream.push(data); // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n\n if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');\n if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');\n return stream.push(null);\n}","var React = require('react');\n\nvar hyphenPatternRegex = /-([a-z])/g;\nvar CUSTOM_PROPERTY_OR_NO_HYPHEN_REGEX = /^--[a-zA-Z0-9-]+$|^[^-]+$/;\n/**\n * Converts a string to camelCase.\n *\n * @param {String} string - The string.\n * @return {String}\n */\n\nfunction camelCase(string) {\n if (typeof string !== 'string') {\n throw new TypeError('First argument must be a string');\n } // custom property or no hyphen found\n\n\n if (CUSTOM_PROPERTY_OR_NO_HYPHEN_REGEX.test(string)) {\n return string;\n } // convert to camelCase\n\n\n return string.toLowerCase().replace(hyphenPatternRegex, function (_, character) {\n return character.toUpperCase();\n });\n}\n/**\n * Swap key with value in an object.\n *\n * @param {Object} obj - The object.\n * @param {Function} [override] - The override method.\n * @return {Object} - The inverted object.\n */\n\n\nfunction invertObject(obj, override) {\n if (!obj || typeof obj !== 'object') {\n throw new TypeError('First argument must be an object');\n }\n\n var key;\n var value;\n var isOverridePresent = typeof override === 'function';\n var overrides = {};\n var result = {};\n\n for (key in obj) {\n value = obj[key];\n\n if (isOverridePresent) {\n overrides = override(key, value);\n\n if (overrides && overrides.length === 2) {\n result[overrides[0]] = overrides[1];\n continue;\n }\n }\n\n if (typeof value === 'string') {\n result[value] = key;\n }\n }\n\n return result;\n}\n/**\n * Check if a given tag is a custom component.\n *\n * @see {@link https://github.com/facebook/react/blob/v16.6.3/packages/react-dom/src/shared/isCustomComponent.js}\n *\n * @param {string} tagName - The name of the html tag.\n * @param {Object} props - The props being passed to the element.\n * @return {boolean}\n */\n\n\nfunction isCustomComponent(tagName, props) {\n if (tagName.indexOf('-') === -1) {\n return props && typeof props.is === 'string';\n }\n\n switch (tagName) {\n // These are reserved SVG and MathML elements.\n // We don't mind this whitelist too much because we expect it to never grow.\n // The alternative is to track the namespace in a few places which is convoluted.\n // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts\n case 'annotation-xml':\n case 'color-profile':\n case 'font-face':\n case 'font-face-src':\n case 'font-face-uri':\n case 'font-face-format':\n case 'font-face-name':\n case 'missing-glyph':\n return false;\n\n default:\n return true;\n }\n}\n/**\n * @constant {Boolean}\n * @see {@link https://reactjs.org/blog/2017/09/08/dom-attributes-in-react-16.html}\n */\n\n\nvar PRESERVE_CUSTOM_ATTRIBUTES = React.version.split('.')[0] >= 16;\nmodule.exports = {\n PRESERVE_CUSTOM_ATTRIBUTES: PRESERVE_CUSTOM_ATTRIBUTES,\n camelCase: camelCase,\n invertObject: invertObject,\n isCustomComponent: isCustomComponent\n};","var CASE_SENSITIVE_TAG_NAMES = require('./constants').CASE_SENSITIVE_TAG_NAMES;\n\nvar caseSensitiveTagNamesMap = {};\nvar tagName;\n\nfor (var i = 0, len = CASE_SENSITIVE_TAG_NAMES.length; i < len; i++) {\n tagName = CASE_SENSITIVE_TAG_NAMES[i];\n caseSensitiveTagNamesMap[tagName.toLowerCase()] = tagName;\n}\n/**\n * Gets case-sensitive tag name.\n *\n * @param {String} tagName - The lowercase tag name.\n * @return {String|undefined}\n */\n\n\nfunction getCaseSensitiveTagName(tagName) {\n return caseSensitiveTagNamesMap[tagName];\n}\n/**\n * Formats DOM attributes to a hash map.\n *\n * @param {NamedNodeMap} attributes - The list of attributes.\n * @return {Object} - A map of attribute name to value.\n */\n\n\nfunction formatAttributes(attributes) {\n var result = {};\n var attribute; // `NamedNodeMap` is array-like\n\n for (var i = 0, len = attributes.length; i < len; i++) {\n attribute = attributes[i];\n result[attribute.name] = attribute.value;\n }\n\n return result;\n}\n/**\n * Corrects the tag name if it is case-sensitive (SVG).\n * Otherwise, returns the lowercase tag name (HTML).\n *\n * @param {String} tagName - The lowercase tag name.\n * @return {String} - The formatted tag name.\n */\n\n\nfunction formatTagName(tagName) {\n tagName = tagName.toLowerCase();\n var caseSensitiveTagName = getCaseSensitiveTagName(tagName);\n\n if (caseSensitiveTagName) {\n return caseSensitiveTagName;\n }\n\n return tagName;\n}\n/**\n * Formats the browser DOM nodes to mimic the output of `htmlparser2.parseDOM()`.\n *\n * @param {NodeList} nodes - The DOM nodes.\n * @param {Object} [parentObj] - The formatted parent node.\n * @param {String} [directive] - The directive.\n * @return {Object[]} - The formatted DOM object.\n */\n\n\nfunction formatDOM(nodes, parentObj, directive) {\n parentObj = parentObj || null;\n var result = [];\n var node;\n var prevNode;\n var nodeObj; // `NodeList` is array-like\n\n for (var i = 0, len = nodes.length; i < len; i++) {\n node = nodes[i]; // reset\n\n nodeObj = {\n next: null,\n prev: result[i - 1] || null,\n parent: parentObj\n }; // set the next node for the previous node (if applicable)\n\n prevNode = result[i - 1];\n\n if (prevNode) {\n prevNode.next = nodeObj;\n } // set the node name if it's not \"#text\" or \"#comment\"\n // e.g., \"div\"\n\n\n if (node.nodeName[0] !== '#') {\n nodeObj.name = formatTagName(node.nodeName); // also, nodes of type \"tag\" have \"attribs\"\n\n nodeObj.attribs = {}; // default\n\n if (node.attributes && node.attributes.length) {\n nodeObj.attribs = formatAttributes(node.attributes);\n }\n } // set the node type\n // e.g., \"tag\"\n\n\n switch (node.nodeType) {\n // 1 = element\n case 1:\n if (nodeObj.name === 'script' || nodeObj.name === 'style') {\n nodeObj.type = nodeObj.name;\n } else {\n nodeObj.type = 'tag';\n } // recursively format the children\n\n\n nodeObj.children = formatDOM(node.childNodes, nodeObj);\n break;\n // 2 = attribute\n // 3 = text\n\n case 3:\n nodeObj.type = 'text';\n nodeObj.data = node.nodeValue;\n break;\n // 8 = comment\n\n case 8:\n nodeObj.type = 'comment';\n nodeObj.data = node.nodeValue;\n break;\n }\n\n result.push(nodeObj);\n }\n\n if (directive) {\n result.unshift({\n name: directive.substring(0, directive.indexOf(' ')).toLowerCase(),\n data: directive,\n type: 'directive',\n next: result[0] ? result[0] : null,\n prev: null,\n parent: parentObj\n });\n\n if (result[1]) {\n result[1].prev = result[0];\n }\n }\n\n return result;\n}\n/**\n * Detects IE with or without version.\n *\n * @param {Number} [version] - The IE version to detect.\n * @return {Boolean} - Whether IE or the version has been detected.\n */\n\n\nfunction isIE(version) {\n if (version) {\n return document.documentMode === version;\n }\n\n return /(MSIE |Trident\\/|Edge\\/)/.test(navigator.userAgent);\n}\n\nmodule.exports = {\n formatAttributes: formatAttributes,\n formatDOM: formatDOM,\n isIE: isIE\n};","var DESCRIPTORS = require('../internals/descriptors');\n\nvar call = require('../internals/function-call');\n\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\n\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nvar toIndexedObject = require('../internals/to-indexed-object');\n\nvar toPropertyKey = require('../internals/to-property-key');\n\nvar hasOwn = require('../internals/has-own-property');\n\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define'); // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n\n\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\n\nexports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPropertyKey(P);\n if (IE8_DOM_DEFINE) try {\n return $getOwnPropertyDescriptor(O, P);\n } catch (error) {\n /* empty */\n }\n if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);\n};","'use strict';\n\nvar $propertyIsEnumerable = {}.propertyIsEnumerable; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // Nashorn ~ JDK8 bug\n\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({\n 1: 2\n}, 1); // `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\n\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;","var documentAll = typeof document == 'object' && document.all; // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot\n// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing\n\nvar IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== undefined;\nmodule.exports = {\n all: documentAll,\n IS_HTMLDDA: IS_HTMLDDA\n};","var getBuiltIn = require('../internals/get-built-in');\n\nvar isCallable = require('../internals/is-callable');\n\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\n\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar $Object = Object;\nmodule.exports = USE_SYMBOL_AS_UID ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n var $Symbol = getBuiltIn('Symbol');\n return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));\n};","/* eslint-disable es/no-symbol -- required for testing */\nvar NATIVE_SYMBOL = require('../internals/symbol-constructor-detection');\n\nmodule.exports = NATIVE_SYMBOL && !Symbol.sham && typeof Symbol.iterator == 'symbol';","/* eslint-disable es/no-symbol -- required for testing */\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar fails = require('../internals/fails'); // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing\n\n\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n var symbol = Symbol(); // Chrome 38 Symbol has incorrect toString conversion\n // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances\n\n return !String(symbol) || !(Object(symbol) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n});","var IS_PURE = require('../internals/is-pure');\n\nvar store = require('../internals/shared-store');\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.29.1',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',\n license: 'https://github.com/zloirock/core-js/blob/v3.29.1/LICENSE',\n source: 'https://github.com/zloirock/core-js'\n});","var DESCRIPTORS = require('../internals/descriptors');\n\nvar fails = require('../internals/fails');\n\nvar createElement = require('../internals/document-create-element'); // Thanks to IE8 for its funny defineProperty\n\n\nmodule.exports = !DESCRIPTORS && !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty(createElement('div'), 'a', {\n get: function get() {\n return 7;\n }\n }).a != 7;\n});","var DESCRIPTORS = require('../internals/descriptors');\n\nvar fails = require('../internals/fails'); // V8 ~ Chrome 36-\n// https://bugs.chromium.org/p/v8/issues/detail?id=3334\n\n\nmodule.exports = DESCRIPTORS && fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty(function () {\n /* empty */\n }, 'prototype', {\n value: 42,\n writable: false\n }).prototype != 42;\n});","var uncurryThis = require('../internals/function-uncurry-this');\n\nvar fails = require('../internals/fails');\n\nvar isCallable = require('../internals/is-callable');\n\nvar hasOwn = require('../internals/has-own-property');\n\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar CONFIGURABLE_FUNCTION_NAME = require('../internals/function-name').CONFIGURABLE;\n\nvar inspectSource = require('../internals/inspect-source');\n\nvar InternalStateModule = require('../internals/internal-state');\n\nvar enforceInternalState = InternalStateModule.enforce;\nvar getInternalState = InternalStateModule.get;\nvar $String = String; // eslint-disable-next-line es/no-object-defineproperty -- safe\n\nvar defineProperty = Object.defineProperty;\nvar stringSlice = uncurryThis(''.slice);\nvar replace = uncurryThis(''.replace);\nvar join = uncurryThis([].join);\nvar CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {\n return defineProperty(function () {\n /* empty */\n }, 'length', {\n value: 8\n }).length !== 8;\n});\nvar TEMPLATE = String(String).split('String');\n\nvar makeBuiltIn = module.exports = function (value, name, options) {\n if (stringSlice($String(name), 0, 7) === 'Symbol(') {\n name = '[' + replace($String(name), /^Symbol\\(([^)]*)\\)/, '$1') + ']';\n }\n\n if (options && options.getter) name = 'get ' + name;\n if (options && options.setter) name = 'set ' + name;\n\n if (!hasOwn(value, 'name') || CONFIGURABLE_FUNCTION_NAME && value.name !== name) {\n if (DESCRIPTORS) defineProperty(value, 'name', {\n value: name,\n configurable: true\n });else value.name = name;\n }\n\n if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {\n defineProperty(value, 'length', {\n value: options.arity\n });\n }\n\n try {\n if (options && hasOwn(options, 'constructor') && options.constructor) {\n if (DESCRIPTORS) defineProperty(value, 'prototype', {\n writable: false\n }); // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable\n } else if (value.prototype) value.prototype = undefined;\n } catch (error) {\n /* empty */\n }\n\n var state = enforceInternalState(value);\n\n if (!hasOwn(state, 'source')) {\n state.source = join(TEMPLATE, typeof name == 'string' ? name : '');\n }\n\n return value;\n}; // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n// eslint-disable-next-line no-extend-native -- required\n\n\nFunction.prototype.toString = makeBuiltIn(function toString() {\n return isCallable(this) && getInternalState(this).source || inspectSource(this);\n}, 'toString');","var DESCRIPTORS = require('../internals/descriptors');\n\nvar hasOwn = require('../internals/has-own-property');\n\nvar FunctionPrototype = Function.prototype; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n\nvar getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;\nvar EXISTS = hasOwn(FunctionPrototype, 'name'); // additional protection from minified / mangled / dropped function names\n\nvar PROPER = EXISTS && function something() {\n /* empty */\n}.name === 'something';\n\nvar CONFIGURABLE = EXISTS && (!DESCRIPTORS || DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable);\nmodule.exports = {\n EXISTS: EXISTS,\n PROPER: PROPER,\n CONFIGURABLE: CONFIGURABLE\n};","var uncurryThis = require('../internals/function-uncurry-this');\n\nvar isCallable = require('../internals/is-callable');\n\nvar store = require('../internals/shared-store');\n\nvar functionToString = uncurryThis(Function.toString); // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper\n\nif (!isCallable(store.inspectSource)) {\n store.inspectSource = function (it) {\n return functionToString(it);\n };\n}\n\nmodule.exports = store.inspectSource;","var global = require('../internals/global');\n\nvar isCallable = require('../internals/is-callable');\n\nvar WeakMap = global.WeakMap;\nmodule.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));","var uncurryThis = require('../internals/function-uncurry-this');\n\nvar hasOwn = require('../internals/has-own-property');\n\nvar toIndexedObject = require('../internals/to-indexed-object');\n\nvar indexOf = require('../internals/array-includes').indexOf;\n\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar push = uncurryThis([].push);\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n\n for (key in O) {\n !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);\n } // Don't enum bug & hidden keys\n\n\n while (names.length > i) {\n if (hasOwn(O, key = names[i++])) {\n ~indexOf(result, key) || push(result, key);\n }\n }\n\n return result;\n};","var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar max = Math.max;\nvar min = Math.min; // Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\n\nmodule.exports = function (index, length) {\n var integer = toIntegerOrInfinity(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};","// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;","var fails = require('../internals/fails');\n\nvar isCallable = require('../internals/is-callable');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function isForced(feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true : value == NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\nmodule.exports = isForced;","var call = require('../internals/function-call');\n\nvar anObject = require('../internals/an-object');\n\nvar getMethod = require('../internals/get-method');\n\nmodule.exports = function (iterator, kind, value) {\n var innerResult, innerError;\n anObject(iterator);\n\n try {\n innerResult = getMethod(iterator, 'return');\n\n if (!innerResult) {\n if (kind === 'throw') throw value;\n return value;\n }\n\n innerResult = call(innerResult, iterator);\n } catch (error) {\n innerError = true;\n innerResult = error;\n }\n\n if (kind === 'throw') throw value;\n if (innerError) throw innerResult;\n anObject(innerResult);\n return value;\n};","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar Iterators = require('../internals/iterators');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype; // check on default Array iterator\n\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};","var uncurryThis = require('../internals/function-uncurry-this');\n\nvar fails = require('../internals/fails');\n\nvar isCallable = require('../internals/is-callable');\n\nvar classof = require('../internals/classof');\n\nvar getBuiltIn = require('../internals/get-built-in');\n\nvar inspectSource = require('../internals/inspect-source');\n\nvar noop = function noop() {\n /* empty */\n};\n\nvar empty = [];\nvar construct = getBuiltIn('Reflect', 'construct');\nvar constructorRegExp = /^\\s*(?:class|function)\\b/;\nvar exec = uncurryThis(constructorRegExp.exec);\nvar INCORRECT_TO_STRING = !constructorRegExp.exec(noop);\n\nvar isConstructorModern = function isConstructor(argument) {\n if (!isCallable(argument)) return false;\n\n try {\n construct(noop, empty, argument);\n return true;\n } catch (error) {\n return false;\n }\n};\n\nvar isConstructorLegacy = function isConstructor(argument) {\n if (!isCallable(argument)) return false;\n\n switch (classof(argument)) {\n case 'AsyncFunction':\n case 'GeneratorFunction':\n case 'AsyncGeneratorFunction':\n return false;\n }\n\n try {\n // we can't check .prototype since constructors produced by .bind haven't it\n // `Function#toString` throws on some built-it function in some legacy engines\n // (for example, `DOMQuad` and similar in FF41-)\n return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));\n } catch (error) {\n return true;\n }\n};\n\nisConstructorLegacy.sham = true; // `IsConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-isconstructor\n\nmodule.exports = !construct || fails(function () {\n var called;\n return isConstructorModern(isConstructorModern.call) || !isConstructorModern(Object) || !isConstructorModern(function () {\n called = true;\n }) || called;\n}) ? isConstructorLegacy : isConstructorModern;","'use strict';\n\nvar toPropertyKey = require('../internals/to-property-key');\n\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = function (object, key, value) {\n var propertyKey = toPropertyKey(key);\n if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));else object[propertyKey] = value;\n};","var call = require('../internals/function-call');\n\nvar aCallable = require('../internals/a-callable');\n\nvar anObject = require('../internals/an-object');\n\nvar tryToString = require('../internals/try-to-string');\n\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\nvar $TypeError = TypeError;\n\nmodule.exports = function (argument, usingIterator) {\n var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;\n if (aCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument));\n throw $TypeError(tryToString(argument) + ' is not iterable');\n};","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function next() {\n return {\n done: !!called++\n };\n },\n 'return': function _return() {\n SAFE_CLOSING = true;\n }\n };\n\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n }; // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing\n\n\n Array.from(iteratorWithReturn, function () {\n throw 2;\n });\n} catch (error) {\n /* empty */\n}\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n\n try {\n var object = {};\n\n object[ITERATOR] = function () {\n return {\n next: function next() {\n return {\n done: ITERATION_SUPPORT = true\n };\n }\n };\n };\n\n exec(object);\n } catch (error) {\n /* empty */\n }\n\n return ITERATION_SUPPORT;\n};","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing\n return Object.isExtensible(Object.preventExtensions({}));\n});","/* eslint-disable no-proto -- safe */\nvar uncurryThisAccessor = require('../internals/function-uncurry-this-accessor');\n\nvar anObject = require('../internals/an-object');\n\nvar aPossiblePrototype = require('../internals/a-possible-prototype'); // `Object.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n// eslint-disable-next-line es/no-object-setprototypeof -- safe\n\n\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n\n try {\n setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');\n setter(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) {\n /* empty */\n }\n\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER) setter(O, proto);else O.__proto__ = proto;\n return O;\n };\n}() : undefined);","'use strict';\n\nvar create = require('../internals/object-create');\n\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\n\nvar defineBuiltIns = require('../internals/define-built-ins');\n\nvar bind = require('../internals/function-bind-context');\n\nvar anInstance = require('../internals/an-instance');\n\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\n\nvar iterate = require('../internals/iterate');\n\nvar defineIterator = require('../internals/iterator-define');\n\nvar createIterResultObject = require('../internals/create-iter-result-object');\n\nvar setSpecies = require('../internals/set-species');\n\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar fastKey = require('../internals/internal-metadata').fastKey;\n\nvar InternalStateModule = require('../internals/internal-state');\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\nmodule.exports = {\n getConstructor: function getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n var Constructor = wrapper(function (that, iterable) {\n anInstance(that, Prototype);\n setInternalState(that, {\n type: CONSTRUCTOR_NAME,\n index: create(null),\n first: undefined,\n last: undefined,\n size: 0\n });\n if (!DESCRIPTORS) that.size = 0;\n if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], {\n that: that,\n AS_ENTRIES: IS_MAP\n });\n });\n var Prototype = Constructor.prototype;\n var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n var define = function define(that, key, value) {\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n var previous, index; // change existing entry\n\n if (entry) {\n entry.value = value; // create new entry\n } else {\n state.last = entry = {\n index: index = fastKey(key, true),\n key: key,\n value: value,\n previous: previous = state.last,\n next: undefined,\n removed: false\n };\n if (!state.first) state.first = entry;\n if (previous) previous.next = entry;\n if (DESCRIPTORS) state.size++;else that.size++; // add to index\n\n if (index !== 'F') state.index[index] = entry;\n }\n\n return that;\n };\n\n var getEntry = function getEntry(that, key) {\n var state = getInternalState(that); // fast case\n\n var index = fastKey(key);\n var entry;\n if (index !== 'F') return state.index[index]; // frozen object case\n\n for (entry = state.first; entry; entry = entry.next) {\n if (entry.key == key) return entry;\n }\n };\n\n defineBuiltIns(Prototype, {\n // `{ Map, Set }.prototype.clear()` methods\n // https://tc39.es/ecma262/#sec-map.prototype.clear\n // https://tc39.es/ecma262/#sec-set.prototype.clear\n clear: function clear() {\n var that = this;\n var state = getInternalState(that);\n var data = state.index;\n var entry = state.first;\n\n while (entry) {\n entry.removed = true;\n if (entry.previous) entry.previous = entry.previous.next = undefined;\n delete data[entry.index];\n entry = entry.next;\n }\n\n state.first = state.last = undefined;\n if (DESCRIPTORS) state.size = 0;else that.size = 0;\n },\n // `{ Map, Set }.prototype.delete(key)` methods\n // https://tc39.es/ecma262/#sec-map.prototype.delete\n // https://tc39.es/ecma262/#sec-set.prototype.delete\n 'delete': function _delete(key) {\n var that = this;\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n\n if (entry) {\n var next = entry.next;\n var prev = entry.previous;\n delete state.index[entry.index];\n entry.removed = true;\n if (prev) prev.next = next;\n if (next) next.previous = prev;\n if (state.first == entry) state.first = next;\n if (state.last == entry) state.last = prev;\n if (DESCRIPTORS) state.size--;else that.size--;\n }\n\n return !!entry;\n },\n // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods\n // https://tc39.es/ecma262/#sec-map.prototype.foreach\n // https://tc39.es/ecma262/#sec-set.prototype.foreach\n forEach: function forEach(callbackfn\n /* , that = undefined */\n ) {\n var state = getInternalState(this);\n var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n var entry;\n\n while (entry = entry ? entry.next : state.first) {\n boundFunction(entry.value, entry.key, this); // revert to the last existing entry\n\n while (entry && entry.removed) {\n entry = entry.previous;\n }\n }\n },\n // `{ Map, Set}.prototype.has(key)` methods\n // https://tc39.es/ecma262/#sec-map.prototype.has\n // https://tc39.es/ecma262/#sec-set.prototype.has\n has: function has(key) {\n return !!getEntry(this, key);\n }\n });\n defineBuiltIns(Prototype, IS_MAP ? {\n // `Map.prototype.get(key)` method\n // https://tc39.es/ecma262/#sec-map.prototype.get\n get: function get(key) {\n var entry = getEntry(this, key);\n return entry && entry.value;\n },\n // `Map.prototype.set(key, value)` method\n // https://tc39.es/ecma262/#sec-map.prototype.set\n set: function set(key, value) {\n return define(this, key === 0 ? 0 : key, value);\n }\n } : {\n // `Set.prototype.add(value)` method\n // https://tc39.es/ecma262/#sec-set.prototype.add\n add: function add(value) {\n return define(this, value = value === 0 ? 0 : value, value);\n }\n });\n if (DESCRIPTORS) defineBuiltInAccessor(Prototype, 'size', {\n configurable: true,\n get: function get() {\n return getInternalState(this).size;\n }\n });\n return Constructor;\n },\n setStrong: function setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP) {\n var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';\n var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);\n var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME); // `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods\n // https://tc39.es/ecma262/#sec-map.prototype.entries\n // https://tc39.es/ecma262/#sec-map.prototype.keys\n // https://tc39.es/ecma262/#sec-map.prototype.values\n // https://tc39.es/ecma262/#sec-map.prototype-@@iterator\n // https://tc39.es/ecma262/#sec-set.prototype.entries\n // https://tc39.es/ecma262/#sec-set.prototype.keys\n // https://tc39.es/ecma262/#sec-set.prototype.values\n // https://tc39.es/ecma262/#sec-set.prototype-@@iterator\n\n defineIterator(Constructor, CONSTRUCTOR_NAME, function (iterated, kind) {\n setInternalState(this, {\n type: ITERATOR_NAME,\n target: iterated,\n state: getInternalCollectionState(iterated),\n kind: kind,\n last: undefined\n });\n }, function () {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var entry = state.last; // revert to the last existing entry\n\n while (entry && entry.removed) {\n entry = entry.previous;\n } // get next entry\n\n\n if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {\n // or finish the iteration\n state.target = undefined;\n return createIterResultObject(undefined, true);\n } // return step by kind\n\n\n if (kind == 'keys') return createIterResultObject(entry.key, false);\n if (kind == 'values') return createIterResultObject(entry.value, false);\n return createIterResultObject([entry.key, entry.value], false);\n }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); // `{ Map, Set }.prototype[@@species]` accessors\n // https://tc39.es/ecma262/#sec-get-map-@@species\n // https://tc39.es/ecma262/#sec-get-set-@@species\n\n setSpecies(CONSTRUCTOR_NAME);\n }\n};","var internalObjectKeys = require('../internals/object-keys-internal');\n\nvar enumBugKeys = require('../internals/enum-bug-keys'); // `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n// eslint-disable-next-line es/no-object-keys -- safe\n\n\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};","var makeBuiltIn = require('../internals/make-built-in');\n\nvar defineProperty = require('../internals/object-define-property');\n\nmodule.exports = function (target, name, descriptor) {\n if (descriptor.get) makeBuiltIn(descriptor.get, name, {\n getter: true\n });\n if (descriptor.set) makeBuiltIn(descriptor.set, name, {\n setter: true\n });\n return defineProperty.f(target, name, descriptor);\n};","'use strict';\n\nvar fails = require('../internals/fails');\n\nvar isCallable = require('../internals/is-callable');\n\nvar isObject = require('../internals/is-object');\n\nvar create = require('../internals/object-create');\n\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\n\nvar defineBuiltIn = require('../internals/define-built-in');\n\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false; // `%IteratorPrototype%` object\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-object\n\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n/* eslint-disable es/no-array-prototype-keys -- safe */\n\nif ([].keys) {\n arrayIterator = [].keys(); // Safari 8 has buggy iterators w/o `next`\n\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nvar NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype) || fails(function () {\n var test = {}; // FF44- legacy iterators case\n\n return IteratorPrototype[ITERATOR].call(test) !== test;\n});\nif (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};else if (IS_PURE) IteratorPrototype = create(IteratorPrototype); // `%IteratorPrototype%[@@iterator]()` method\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator\n\nif (!isCallable(IteratorPrototype[ITERATOR])) {\n defineBuiltIn(IteratorPrototype, ITERATOR, function () {\n return this;\n });\n}\n\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};","var hasOwn = require('../internals/has-own-property');\n\nvar isCallable = require('../internals/is-callable');\n\nvar toObject = require('../internals/to-object');\n\nvar sharedKey = require('../internals/shared-key');\n\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar $Object = Object;\nvar ObjectPrototype = $Object.prototype; // `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\n// eslint-disable-next-line es/no-object-getprototypeof -- safe\n\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {\n var object = toObject(O);\n if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];\n var constructor = object.constructor;\n\n if (isCallable(constructor) && object instanceof constructor) {\n return constructor.prototype;\n }\n\n return object instanceof $Object ? ObjectPrototype : null;\n};","var classof = require('../internals/classof');\n\nvar $String = String;\n\nmodule.exports = function (argument) {\n if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');\n return $String(argument);\n};","'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}","import { dynamicRequire, fill, logger } from '@sentry/utils';\n/** Tracing integration for node-postgres package */\n\nvar Postgres =\n/** @class */\nfunction () {\n function Postgres() {\n /**\n * @inheritDoc\n */\n this.name = Postgres.id;\n }\n /**\n * @inheritDoc\n */\n\n\n Postgres.prototype.setupOnce = function (_, getCurrentHub) {\n var client;\n\n try {\n var pgModule = dynamicRequire(module, 'pg');\n client = pgModule.Client;\n } catch (e) {\n logger.error('Postgres Integration was unable to require `pg` package.');\n return;\n }\n /**\n * function (query, callback) => void\n * function (query, params, callback) => void\n * function (query) => Promise\n * function (query, params) => Promise\n */\n\n\n fill(client.prototype, 'query', function (orig) {\n return function (config, values, callback) {\n var _a, _b;\n\n var scope = getCurrentHub().getScope();\n var parentSpan = (_a = scope) === null || _a === void 0 ? void 0 : _a.getSpan();\n var span = (_b = parentSpan) === null || _b === void 0 ? void 0 : _b.startChild({\n description: typeof config === 'string' ? config : config.text,\n op: \"db\"\n });\n\n if (typeof callback === 'function') {\n return orig.call(this, config, values, function (err, result) {\n var _a;\n\n (_a = span) === null || _a === void 0 ? void 0 : _a.finish();\n callback(err, result);\n });\n }\n\n if (typeof values === 'function') {\n return orig.call(this, config, function (err, result) {\n var _a;\n\n (_a = span) === null || _a === void 0 ? void 0 : _a.finish();\n values(err, result);\n });\n }\n\n return orig.call(this, config, values).then(function (res) {\n var _a;\n\n (_a = span) === null || _a === void 0 ? void 0 : _a.finish();\n return res;\n });\n };\n });\n };\n /**\n * @inheritDoc\n */\n\n\n Postgres.id = 'Postgres';\n return Postgres;\n}();\n\nexport { Postgres };","import { dynamicRequire, fill, logger } from '@sentry/utils';\n/** Tracing integration for node-mysql package */\n\nvar Mysql =\n/** @class */\nfunction () {\n function Mysql() {\n /**\n * @inheritDoc\n */\n this.name = Mysql.id;\n }\n /**\n * @inheritDoc\n */\n\n\n Mysql.prototype.setupOnce = function (_, getCurrentHub) {\n var connection;\n\n try {\n // Unfortunatelly mysql is using some custom loading system and `Connection` is not exported directly.\n connection = dynamicRequire(module, 'mysql/lib/Connection.js');\n } catch (e) {\n logger.error('Mysql Integration was unable to require `mysql` package.');\n return;\n } // The original function will have one of these signatures:\n // function (callback) => void\n // function (options, callback) => void\n // function (options, values, callback) => void\n\n\n fill(connection.prototype, 'query', function (orig) {\n return function (options, values, callback) {\n var _a, _b;\n\n var scope = getCurrentHub().getScope();\n var parentSpan = (_a = scope) === null || _a === void 0 ? void 0 : _a.getSpan();\n var span = (_b = parentSpan) === null || _b === void 0 ? void 0 : _b.startChild({\n description: typeof options === 'string' ? options : options.sql,\n op: \"db\"\n });\n\n if (typeof callback === 'function') {\n return orig.call(this, options, values, function (err, result, fields) {\n var _a;\n\n (_a = span) === null || _a === void 0 ? void 0 : _a.finish();\n callback(err, result, fields);\n });\n }\n\n if (typeof values === 'function') {\n return orig.call(this, options, function (err, result, fields) {\n var _a;\n\n (_a = span) === null || _a === void 0 ? void 0 : _a.finish();\n values(err, result, fields);\n });\n }\n\n return orig.call(this, options, values, callback);\n };\n });\n };\n /**\n * @inheritDoc\n */\n\n\n Mysql.id = 'Mysql';\n return Mysql;\n}();\n\nexport { Mysql };","import { __read, __spread } from \"tslib\";\nimport { dynamicRequire, fill, logger } from '@sentry/utils';\nvar OPERATIONS = ['aggregate', 'bulkWrite', 'countDocuments', 'createIndex', 'createIndexes', 'deleteMany', 'deleteOne', 'distinct', 'drop', 'dropIndex', 'dropIndexes', 'estimatedDocumentCount', 'findOne', 'findOneAndDelete', 'findOneAndReplace', 'findOneAndUpdate', 'indexes', 'indexExists', 'indexInformation', 'initializeOrderedBulkOp', 'insertMany', 'insertOne', 'isCapped', 'mapReduce', 'options', 'parallelCollectionScan', 'rename', 'replaceOne', 'stats', 'updateMany', 'updateOne']; // All of the operations above take `options` and `callback` as their final parameters, but some of them\n// take additional parameters as well. For those operations, this is a map of\n// { : [] }, as a way to know what to call the operation's\n// positional arguments when we add them to the span's `data` object later\n\nvar OPERATION_SIGNATURES = {\n // aggregate intentionally not included because `pipeline` arguments are too complex to serialize well\n // see https://github.com/getsentry/sentry-javascript/pull/3102\n bulkWrite: ['operations'],\n countDocuments: ['query'],\n createIndex: ['fieldOrSpec'],\n createIndexes: ['indexSpecs'],\n deleteMany: ['filter'],\n deleteOne: ['filter'],\n distinct: ['key', 'query'],\n dropIndex: ['indexName'],\n findOne: ['query'],\n findOneAndDelete: ['filter'],\n findOneAndReplace: ['filter', 'replacement'],\n findOneAndUpdate: ['filter', 'update'],\n indexExists: ['indexes'],\n insertMany: ['docs'],\n insertOne: ['doc'],\n mapReduce: ['map', 'reduce'],\n rename: ['newName'],\n replaceOne: ['filter', 'doc'],\n updateMany: ['filter', 'update'],\n updateOne: ['filter', 'update']\n};\n/** Tracing integration for mongo package */\n\nvar Mongo =\n/** @class */\nfunction () {\n /**\n * @inheritDoc\n */\n function Mongo(options) {\n if (options === void 0) {\n options = {};\n }\n /**\n * @inheritDoc\n */\n\n\n this.name = Mongo.id;\n this._operations = Array.isArray(options.operations) ? options.operations : OPERATIONS;\n this._describeOperations = 'describeOperations' in options ? options.describeOperations : true;\n }\n /**\n * @inheritDoc\n */\n\n\n Mongo.prototype.setupOnce = function (_, getCurrentHub) {\n var collection;\n\n try {\n var mongodbModule = dynamicRequire(module, 'mongodb');\n collection = mongodbModule.Collection;\n } catch (e) {\n logger.error('Mongo Integration was unable to require `mongodb` package.');\n return;\n }\n\n this._instrumentOperations(collection, this._operations, getCurrentHub);\n };\n /**\n * Patches original collection methods\n */\n\n\n Mongo.prototype._instrumentOperations = function (collection, operations, getCurrentHub) {\n var _this = this;\n\n operations.forEach(function (operation) {\n return _this._patchOperation(collection, operation, getCurrentHub);\n });\n };\n /**\n * Patches original collection to utilize our tracing functionality\n */\n\n\n Mongo.prototype._patchOperation = function (collection, operation, getCurrentHub) {\n if (!(operation in collection.prototype)) return;\n\n var getSpanContext = this._getSpanContextFromOperationArguments.bind(this);\n\n fill(collection.prototype, operation, function (orig) {\n return function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n var _a, _b, _c;\n\n var lastArg = args[args.length - 1];\n var scope = getCurrentHub().getScope();\n var parentSpan = (_a = scope) === null || _a === void 0 ? void 0 : _a.getSpan(); // Check if the operation was passed a callback. (mapReduce requires a different check, as\n // its (non-callback) arguments can also be functions.)\n\n if (typeof lastArg !== 'function' || operation === 'mapReduce' && args.length === 2) {\n var span_1 = (_b = parentSpan) === null || _b === void 0 ? void 0 : _b.startChild(getSpanContext(this, operation, args));\n return orig.call.apply(orig, __spread([this], args)).then(function (res) {\n var _a;\n\n (_a = span_1) === null || _a === void 0 ? void 0 : _a.finish();\n return res;\n });\n }\n\n var span = (_c = parentSpan) === null || _c === void 0 ? void 0 : _c.startChild(getSpanContext(this, operation, args.slice(0, -1)));\n return orig.call.apply(orig, __spread([this], args.slice(0, -1), [function (err, result) {\n var _a;\n\n (_a = span) === null || _a === void 0 ? void 0 : _a.finish();\n lastArg(err, result);\n }]));\n };\n });\n };\n /**\n * Form a SpanContext based on the user input to a given operation.\n */\n\n\n Mongo.prototype._getSpanContextFromOperationArguments = function (collection, operation, args) {\n var data = {\n collectionName: collection.collectionName,\n dbName: collection.dbName,\n namespace: collection.namespace\n };\n var spanContext = {\n op: \"db\",\n description: operation,\n data: data\n }; // If the operation takes no arguments besides `options` and `callback`, or if argument\n // collection is disabled for this operation, just return early.\n\n var signature = OPERATION_SIGNATURES[operation];\n var shouldDescribe = Array.isArray(this._describeOperations) ? this._describeOperations.includes(operation) : this._describeOperations;\n\n if (!signature || !shouldDescribe) {\n return spanContext;\n }\n\n try {\n // Special case for `mapReduce`, as the only one accepting functions as arguments.\n if (operation === 'mapReduce') {\n var _a = __read(args, 2),\n map = _a[0],\n reduce = _a[1];\n\n data[signature[0]] = typeof map === 'string' ? map : map.name || '';\n data[signature[1]] = typeof reduce === 'string' ? reduce : reduce.name || '';\n } else {\n for (var i = 0; i < signature.length; i++) {\n data[signature[i]] = JSON.stringify(args[i]);\n }\n }\n } catch (_oO) {// no-empty\n }\n\n return spanContext;\n };\n /**\n * @inheritDoc\n */\n\n\n Mongo.id = 'Mongo';\n return Mongo;\n}();\n\nexport { Mongo };","'use strict';\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\n\nvar REACT_STATICS = {\n childContextTypes: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = getPrototypeOf && getPrototypeOf(Object);\n\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n\n return targetComponent;\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\nexport default freeGlobal;","export default function symbolObservablePonyfill(root) {\n var result;\n var Symbol = root.Symbol;\n\n if (typeof Symbol === 'function') {\n if (Symbol.observable) {\n result = Symbol.observable;\n } else {\n result = Symbol('observable');\n Symbol.observable = result;\n }\n } else {\n result = '@@observable';\n }\n\n return result;\n}\n;","var capitalize = require('./capitalize'),\n createCompounder = require('./_createCompounder');\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\n\nvar camelCase = createCompounder(function (result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n});\nmodule.exports = camelCase;","// AST walker module for Mozilla Parser API compatible trees\n// A simple walk is one where you simply specify callbacks to be\n// called on specific nodes. The last two arguments are optional. A\n// simple use would be\n//\n// walk.simple(myTree, {\n// Expression: function(node) { ... }\n// });\n//\n// to do something with all expressions. All Parser API node types\n// can be used to identify node types, as well as Expression and\n// Statement, which denote categories of nodes.\n//\n// The base argument can be used to pass a custom (recursive)\n// walker, and state can be used to give this walked an initial\n// state.\nfunction simple(node, visitors, baseVisitor, state, override) {\n if (!baseVisitor) {\n baseVisitor = base;\n }\n\n (function c(node, st, override) {\n var type = override || node.type,\n found = visitors[type];\n baseVisitor[type](node, st, c);\n\n if (found) {\n found(node, st);\n }\n })(node, state, override);\n} // An ancestor walk keeps an array of ancestor nodes (including the\n// current node) and passes them to the callback as third parameter\n// (and also as state parameter when no other state is present).\n\n\nfunction ancestor(node, visitors, baseVisitor, state) {\n var ancestors = [];\n\n if (!baseVisitor) {\n baseVisitor = base;\n }\n\n (function c(node, st, override) {\n var type = override || node.type,\n found = visitors[type];\n var isNew = node !== ancestors[ancestors.length - 1];\n\n if (isNew) {\n ancestors.push(node);\n }\n\n baseVisitor[type](node, st, c);\n\n if (found) {\n found(node, st || ancestors, ancestors);\n }\n\n if (isNew) {\n ancestors.pop();\n }\n })(node, state);\n} // A recursive walk is one where your functions override the default\n// walkers. They can modify and replace the state parameter that's\n// threaded through the walk, and can opt how and whether to walk\n// their child nodes (by calling their third argument on these\n// nodes).\n\n\nfunction recursive(node, state, funcs, baseVisitor, override) {\n var visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor;\n\n (function c(node, st, override) {\n visitor[override || node.type](node, st, c);\n })(node, state, override);\n}\n\nfunction makeTest(test) {\n if (typeof test === \"string\") {\n return function (type) {\n return type === test;\n };\n } else if (!test) {\n return function () {\n return true;\n };\n } else {\n return test;\n }\n}\n\nvar Found = function Found(node, state) {\n this.node = node;\n this.state = state;\n}; // A full walk triggers the callback on each node\n\n\nfunction full(node, callback, baseVisitor, state, override) {\n if (!baseVisitor) {\n baseVisitor = base;\n }\n\n (function c(node, st, override) {\n var type = override || node.type;\n baseVisitor[type](node, st, c);\n\n if (!override) {\n callback(node, st, type);\n }\n })(node, state, override);\n} // An fullAncestor walk is like an ancestor walk, but triggers\n// the callback on each node\n\n\nfunction fullAncestor(node, callback, baseVisitor, state) {\n if (!baseVisitor) {\n baseVisitor = base;\n }\n\n var ancestors = [];\n\n (function c(node, st, override) {\n var type = override || node.type;\n var isNew = node !== ancestors[ancestors.length - 1];\n\n if (isNew) {\n ancestors.push(node);\n }\n\n baseVisitor[type](node, st, c);\n\n if (!override) {\n callback(node, st || ancestors, ancestors, type);\n }\n\n if (isNew) {\n ancestors.pop();\n }\n })(node, state);\n} // Find a node with a given start, end, and type (all are optional,\n// null can be used as wildcard). Returns a {node, state} object, or\n// undefined when it doesn't find a matching node.\n\n\nfunction findNodeAt(node, start, end, test, baseVisitor, state) {\n if (!baseVisitor) {\n baseVisitor = base;\n }\n\n test = makeTest(test);\n\n try {\n (function c(node, st, override) {\n var type = override || node.type;\n\n if ((start == null || node.start <= start) && (end == null || node.end >= end)) {\n baseVisitor[type](node, st, c);\n }\n\n if ((start == null || node.start === start) && (end == null || node.end === end) && test(type, node)) {\n throw new Found(node, st);\n }\n })(node, state);\n } catch (e) {\n if (e instanceof Found) {\n return e;\n }\n\n throw e;\n }\n} // Find the innermost node of a given type that contains the given\n// position. Interface similar to findNodeAt.\n\n\nfunction findNodeAround(node, pos, test, baseVisitor, state) {\n test = makeTest(test);\n\n if (!baseVisitor) {\n baseVisitor = base;\n }\n\n try {\n (function c(node, st, override) {\n var type = override || node.type;\n\n if (node.start > pos || node.end < pos) {\n return;\n }\n\n baseVisitor[type](node, st, c);\n\n if (test(type, node)) {\n throw new Found(node, st);\n }\n })(node, state);\n } catch (e) {\n if (e instanceof Found) {\n return e;\n }\n\n throw e;\n }\n} // Find the outermost matching node after a given position.\n\n\nfunction findNodeAfter(node, pos, test, baseVisitor, state) {\n test = makeTest(test);\n\n if (!baseVisitor) {\n baseVisitor = base;\n }\n\n try {\n (function c(node, st, override) {\n if (node.end < pos) {\n return;\n }\n\n var type = override || node.type;\n\n if (node.start >= pos && test(type, node)) {\n throw new Found(node, st);\n }\n\n baseVisitor[type](node, st, c);\n })(node, state);\n } catch (e) {\n if (e instanceof Found) {\n return e;\n }\n\n throw e;\n }\n} // Find the outermost matching node before a given position.\n\n\nfunction findNodeBefore(node, pos, test, baseVisitor, state) {\n test = makeTest(test);\n\n if (!baseVisitor) {\n baseVisitor = base;\n }\n\n var max;\n\n (function c(node, st, override) {\n if (node.start > pos) {\n return;\n }\n\n var type = override || node.type;\n\n if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node)) {\n max = new Found(node, st);\n }\n\n baseVisitor[type](node, st, c);\n })(node, state);\n\n return max;\n} // Fallback to an Object.create polyfill for older environments.\n\n\nvar create = Object.create || function (proto) {\n function Ctor() {}\n\n Ctor.prototype = proto;\n return new Ctor();\n}; // Used to create a custom walker. Will fill in all missing node\n// type properties with the defaults.\n\n\nfunction make(funcs, baseVisitor) {\n var visitor = create(baseVisitor || base);\n\n for (var type in funcs) {\n visitor[type] = funcs[type];\n }\n\n return visitor;\n}\n\nfunction skipThrough(node, st, c) {\n c(node, st);\n}\n\nfunction ignore(_node, _st, _c) {} // Node walkers.\n\n\nvar base = {};\n\nbase.Program = base.BlockStatement = function (node, st, c) {\n for (var i = 0, list = node.body; i < list.length; i += 1) {\n var stmt = list[i];\n c(stmt, st, \"Statement\");\n }\n};\n\nbase.Statement = skipThrough;\nbase.EmptyStatement = ignore;\n\nbase.ExpressionStatement = base.ParenthesizedExpression = function (node, st, c) {\n return c(node.expression, st, \"Expression\");\n};\n\nbase.IfStatement = function (node, st, c) {\n c(node.test, st, \"Expression\");\n c(node.consequent, st, \"Statement\");\n\n if (node.alternate) {\n c(node.alternate, st, \"Statement\");\n }\n};\n\nbase.LabeledStatement = function (node, st, c) {\n return c(node.body, st, \"Statement\");\n};\n\nbase.BreakStatement = base.ContinueStatement = ignore;\n\nbase.WithStatement = function (node, st, c) {\n c(node.object, st, \"Expression\");\n c(node.body, st, \"Statement\");\n};\n\nbase.SwitchStatement = function (node, st, c) {\n c(node.discriminant, st, \"Expression\");\n\n for (var i = 0, list = node.cases; i < list.length; i += 1) {\n var cs = list[i];\n\n if (cs.test) {\n c(cs.test, st, \"Expression\");\n }\n\n for (var i$1 = 0, list$1 = cs.consequent; i$1 < list$1.length; i$1 += 1) {\n var cons = list$1[i$1];\n c(cons, st, \"Statement\");\n }\n }\n};\n\nbase.SwitchCase = function (node, st, c) {\n if (node.test) {\n c(node.test, st, \"Expression\");\n }\n\n for (var i = 0, list = node.consequent; i < list.length; i += 1) {\n var cons = list[i];\n c(cons, st, \"Statement\");\n }\n};\n\nbase.ReturnStatement = base.YieldExpression = base.AwaitExpression = function (node, st, c) {\n if (node.argument) {\n c(node.argument, st, \"Expression\");\n }\n};\n\nbase.ThrowStatement = base.SpreadElement = function (node, st, c) {\n return c(node.argument, st, \"Expression\");\n};\n\nbase.TryStatement = function (node, st, c) {\n c(node.block, st, \"Statement\");\n\n if (node.handler) {\n c(node.handler, st);\n }\n\n if (node.finalizer) {\n c(node.finalizer, st, \"Statement\");\n }\n};\n\nbase.CatchClause = function (node, st, c) {\n if (node.param) {\n c(node.param, st, \"Pattern\");\n }\n\n c(node.body, st, \"Statement\");\n};\n\nbase.WhileStatement = base.DoWhileStatement = function (node, st, c) {\n c(node.test, st, \"Expression\");\n c(node.body, st, \"Statement\");\n};\n\nbase.ForStatement = function (node, st, c) {\n if (node.init) {\n c(node.init, st, \"ForInit\");\n }\n\n if (node.test) {\n c(node.test, st, \"Expression\");\n }\n\n if (node.update) {\n c(node.update, st, \"Expression\");\n }\n\n c(node.body, st, \"Statement\");\n};\n\nbase.ForInStatement = base.ForOfStatement = function (node, st, c) {\n c(node.left, st, \"ForInit\");\n c(node.right, st, \"Expression\");\n c(node.body, st, \"Statement\");\n};\n\nbase.ForInit = function (node, st, c) {\n if (node.type === \"VariableDeclaration\") {\n c(node, st);\n } else {\n c(node, st, \"Expression\");\n }\n};\n\nbase.DebuggerStatement = ignore;\n\nbase.FunctionDeclaration = function (node, st, c) {\n return c(node, st, \"Function\");\n};\n\nbase.VariableDeclaration = function (node, st, c) {\n for (var i = 0, list = node.declarations; i < list.length; i += 1) {\n var decl = list[i];\n c(decl, st);\n }\n};\n\nbase.VariableDeclarator = function (node, st, c) {\n c(node.id, st, \"Pattern\");\n\n if (node.init) {\n c(node.init, st, \"Expression\");\n }\n};\n\nbase.Function = function (node, st, c) {\n if (node.id) {\n c(node.id, st, \"Pattern\");\n }\n\n for (var i = 0, list = node.params; i < list.length; i += 1) {\n var param = list[i];\n c(param, st, \"Pattern\");\n }\n\n c(node.body, st, node.expression ? \"Expression\" : \"Statement\");\n};\n\nbase.Pattern = function (node, st, c) {\n if (node.type === \"Identifier\") {\n c(node, st, \"VariablePattern\");\n } else if (node.type === \"MemberExpression\") {\n c(node, st, \"MemberPattern\");\n } else {\n c(node, st);\n }\n};\n\nbase.VariablePattern = ignore;\nbase.MemberPattern = skipThrough;\n\nbase.RestElement = function (node, st, c) {\n return c(node.argument, st, \"Pattern\");\n};\n\nbase.ArrayPattern = function (node, st, c) {\n for (var i = 0, list = node.elements; i < list.length; i += 1) {\n var elt = list[i];\n\n if (elt) {\n c(elt, st, \"Pattern\");\n }\n }\n};\n\nbase.ObjectPattern = function (node, st, c) {\n for (var i = 0, list = node.properties; i < list.length; i += 1) {\n var prop = list[i];\n\n if (prop.type === \"Property\") {\n if (prop.computed) {\n c(prop.key, st, \"Expression\");\n }\n\n c(prop.value, st, \"Pattern\");\n } else if (prop.type === \"RestElement\") {\n c(prop.argument, st, \"Pattern\");\n }\n }\n};\n\nbase.Expression = skipThrough;\nbase.ThisExpression = base.Super = base.MetaProperty = ignore;\n\nbase.ArrayExpression = function (node, st, c) {\n for (var i = 0, list = node.elements; i < list.length; i += 1) {\n var elt = list[i];\n\n if (elt) {\n c(elt, st, \"Expression\");\n }\n }\n};\n\nbase.ObjectExpression = function (node, st, c) {\n for (var i = 0, list = node.properties; i < list.length; i += 1) {\n var prop = list[i];\n c(prop, st);\n }\n};\n\nbase.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration;\n\nbase.SequenceExpression = function (node, st, c) {\n for (var i = 0, list = node.expressions; i < list.length; i += 1) {\n var expr = list[i];\n c(expr, st, \"Expression\");\n }\n};\n\nbase.TemplateLiteral = function (node, st, c) {\n for (var i = 0, list = node.quasis; i < list.length; i += 1) {\n var quasi = list[i];\n c(quasi, st);\n }\n\n for (var i$1 = 0, list$1 = node.expressions; i$1 < list$1.length; i$1 += 1) {\n var expr = list$1[i$1];\n c(expr, st, \"Expression\");\n }\n};\n\nbase.TemplateElement = ignore;\n\nbase.UnaryExpression = base.UpdateExpression = function (node, st, c) {\n c(node.argument, st, \"Expression\");\n};\n\nbase.BinaryExpression = base.LogicalExpression = function (node, st, c) {\n c(node.left, st, \"Expression\");\n c(node.right, st, \"Expression\");\n};\n\nbase.AssignmentExpression = base.AssignmentPattern = function (node, st, c) {\n c(node.left, st, \"Pattern\");\n c(node.right, st, \"Expression\");\n};\n\nbase.ConditionalExpression = function (node, st, c) {\n c(node.test, st, \"Expression\");\n c(node.consequent, st, \"Expression\");\n c(node.alternate, st, \"Expression\");\n};\n\nbase.NewExpression = base.CallExpression = function (node, st, c) {\n c(node.callee, st, \"Expression\");\n\n if (node.arguments) {\n for (var i = 0, list = node.arguments; i < list.length; i += 1) {\n var arg = list[i];\n c(arg, st, \"Expression\");\n }\n }\n};\n\nbase.MemberExpression = function (node, st, c) {\n c(node.object, st, \"Expression\");\n\n if (node.computed) {\n c(node.property, st, \"Expression\");\n }\n};\n\nbase.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) {\n if (node.declaration) {\n c(node.declaration, st, node.type === \"ExportNamedDeclaration\" || node.declaration.id ? \"Statement\" : \"Expression\");\n }\n\n if (node.source) {\n c(node.source, st, \"Expression\");\n }\n};\n\nbase.ExportAllDeclaration = function (node, st, c) {\n c(node.source, st, \"Expression\");\n};\n\nbase.ImportDeclaration = function (node, st, c) {\n for (var i = 0, list = node.specifiers; i < list.length; i += 1) {\n var spec = list[i];\n c(spec, st);\n }\n\n c(node.source, st, \"Expression\");\n};\n\nbase.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore;\n\nbase.TaggedTemplateExpression = function (node, st, c) {\n c(node.tag, st, \"Expression\");\n c(node.quasi, st, \"Expression\");\n};\n\nbase.ClassDeclaration = base.ClassExpression = function (node, st, c) {\n return c(node, st, \"Class\");\n};\n\nbase.Class = function (node, st, c) {\n if (node.id) {\n c(node.id, st, \"Pattern\");\n }\n\n if (node.superClass) {\n c(node.superClass, st, \"Expression\");\n }\n\n c(node.body, st);\n};\n\nbase.ClassBody = function (node, st, c) {\n for (var i = 0, list = node.body; i < list.length; i += 1) {\n var elt = list[i];\n c(elt, st);\n }\n};\n\nbase.MethodDefinition = base.Property = function (node, st, c) {\n if (node.computed) {\n c(node.key, st, \"Expression\");\n }\n\n c(node.value, st, \"Expression\");\n};\n\nexport { simple, ancestor, recursive, full, fullAncestor, findNodeAt, findNodeAround, findNodeAfter, findNodeBefore, make, base };","import React, { isValidElement } from 'react';\nimport PropTypes from 'prop-types';\nimport treeChanges from 'tree-changes';\nimport is from 'is-lite';\nimport ReactDOM, { createPortal } from 'react-dom';\nimport ExecutionEnvironment from 'exenv';\nimport scroll from 'scroll';\nimport scrollDoc from 'scroll-doc';\nimport scrollParent from 'scrollparent';\nimport { isValidElementType, Element, ForwardRef, typeOf } from 'react-is';\nimport deepmerge from 'deepmerge';\nimport Floater from 'react-floater';\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _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\n return obj;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n keys.push.apply(keys, Object.getOwnPropertySymbols(object));\n }\n\n if (enumerableOnly) keys = keys.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(source, true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(source).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\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\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\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\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\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\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\n return self;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nvar ACTIONS = {\n INIT: 'init',\n START: 'start',\n STOP: 'stop',\n RESET: 'reset',\n PREV: 'prev',\n NEXT: 'next',\n GO: 'go',\n CLOSE: 'close',\n SKIP: 'skip',\n UPDATE: 'update'\n};\nvar EVENTS = {\n TOUR_START: 'tour:start',\n STEP_BEFORE: 'step:before',\n BEACON: 'beacon',\n TOOLTIP: 'tooltip',\n STEP_AFTER: 'step:after',\n TOUR_END: 'tour:end',\n TOUR_STATUS: 'tour:status',\n TARGET_NOT_FOUND: 'error:target_not_found',\n ERROR: 'error'\n};\nvar LIFECYCLE = {\n INIT: 'init',\n READY: 'ready',\n BEACON: 'beacon',\n TOOLTIP: 'tooltip',\n COMPLETE: 'complete',\n ERROR: 'error'\n};\nvar STATUS = {\n IDLE: 'idle',\n READY: 'ready',\n WAITING: 'waiting',\n RUNNING: 'running',\n PAUSED: 'paused',\n SKIPPED: 'skipped',\n FINISHED: 'finished',\n ERROR: 'error'\n};\nvar canUseDOM = ExecutionEnvironment.canUseDOM;\nvar isReact16 = createPortal !== undefined;\n/**\n * Get the current browser\n *\n * @param {string} userAgent\n *\n * @returns {String}\n */\n\nfunction getBrowser() {\n var userAgent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : navigator.userAgent;\n var browser = userAgent;\n\n if (typeof window === 'undefined') {\n browser = 'node';\n } else if (document.documentMode) {\n browser = 'ie';\n } else if (/Edge/.test(userAgent)) {\n browser = 'edge';\n } // Opera 8.0+\n else if (Boolean(window.opera) || userAgent.indexOf(' OPR/') >= 0) {\n browser = 'opera';\n } // Firefox 1.0+\n else if (typeof window.InstallTrigger !== 'undefined') {\n browser = 'firefox';\n } // Chrome 1+\n else if (window.chrome) {\n browser = 'chrome';\n } // Safari (and Chrome iOS, Firefox iOS)\n else if (/(Version\\/([0-9._]+).*Safari|CriOS|FxiOS| Mobile\\/)/.test(userAgent)) {\n browser = 'safari';\n }\n\n return browser;\n}\n/**\n * Get the toString Object type\n * @param {*} value\n * @returns {string}\n */\n\n\nfunction getObjectType(value) {\n return Object.prototype.toString.call(value).slice(8, -1).toLowerCase();\n}\n/**\n * Get text from React components\n *\n * @param {*} root\n *\n * @returns {string}\n */\n\n\nfunction getText(root) {\n var content = [];\n\n var recurse = function recurse(child) {\n /* istanbul ignore else */\n if (typeof child === 'string' || typeof child === 'number') {\n content.push(child);\n } else if (Array.isArray(child)) {\n child.forEach(function (c) {\n return recurse(c);\n });\n } else if (child && child.props) {\n var children = child.props.children;\n\n if (Array.isArray(children)) {\n children.forEach(function (c) {\n return recurse(c);\n });\n } else {\n recurse(children);\n }\n }\n };\n\n recurse(root);\n return content.join(' ').trim();\n}\n\nfunction hasOwnProperty(value, key) {\n return Object.prototype.hasOwnProperty.call(value, key);\n}\n\nfunction hasValidKeys(value, keys) {\n if (!is.plainObject(value) || !is.array(keys)) {\n return false;\n }\n\n return Object.keys(value).every(function (d) {\n return keys.includes(d);\n });\n}\n/**\n * Convert hex to RGB\n *\n * @param {string} hex\n * @returns {Array}\n */\n\n\nfunction hexToRGB(hex) {\n var shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n var properHex = hex.replace(shorthandRegex, function (m, r, g, b) {\n return r + r + g + g + b + b;\n });\n var result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(properHex);\n return result ? [parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)] : [];\n}\n/**\n * Decide if the step shouldn't skip the beacon\n * @param {Object} step\n *\n * @returns {boolean}\n */\n\n\nfunction hideBeacon(step) {\n return step.disableBeacon || step.placement === 'center';\n}\n/**\n * Compare if two variables are equal\n *\n * @param {*} left\n * @param {*} right\n *\n * @returns {boolean}\n */\n\n\nfunction isEqual(left, right) {\n var type;\n var hasReactElement = isValidElement(left) || isValidElement(right);\n var hasUndefined = is.undefined(left) || is.undefined(right);\n\n if (getObjectType(left) !== getObjectType(right) || hasReactElement || hasUndefined) {\n return false;\n }\n\n if (is.domElement(left)) {\n return left.isSameNode(right);\n }\n\n if (is.number(left)) {\n return left === right;\n }\n\n if (is[\"function\"](left)) {\n return left.toString() === right.toString();\n }\n\n for (var key in left) {\n /* istanbul ignore else */\n if (hasOwnProperty(left, key)) {\n if (typeof left[key] === 'undefined' || typeof right[key] === 'undefined') {\n return false;\n }\n\n type = getObjectType(left[key]);\n\n if (['object', 'array'].includes(type) && isEqual(left[key], right[key])) {\n continue;\n }\n\n if (type === 'function' && isEqual(left[key], right[key])) {\n continue;\n }\n\n if (left[key] !== right[key]) {\n return false;\n }\n }\n }\n\n for (var p in right) {\n /* istanbul ignore else */\n if (hasOwnProperty(right, p)) {\n if (typeof left[p] === 'undefined') {\n return false;\n }\n }\n }\n\n return true;\n}\n/**\n * Detect legacy browsers\n *\n * @returns {boolean}\n */\n\n\nfunction isLegacy() {\n return !['chrome', 'safari', 'firefox', 'opera'].includes(getBrowser());\n}\n/**\n * Log method calls if debug is enabled\n *\n * @private\n * @param {Object} arg\n * @param {string} arg.title - The title the logger was called from\n * @param {Object|Array} [arg.data] - The data to be logged\n * @param {boolean} [arg.warn] - If true, the message will be a warning\n * @param {boolean} [arg.debug] - Nothing will be logged unless debug is true\n */\n\n\nfunction log(_ref) {\n var title = _ref.title,\n data = _ref.data,\n _ref$warn = _ref.warn,\n warn = _ref$warn === void 0 ? false : _ref$warn,\n _ref$debug = _ref.debug,\n debug = _ref$debug === void 0 ? false : _ref$debug;\n /* eslint-disable no-console */\n\n var logFn = warn ? console.warn || console.error : console.log;\n\n if (debug) {\n if (title && data) {\n console.groupCollapsed(\"%creact-joyride: \".concat(title), 'color: #ff0044; font-weight: bold; font-size: 12px;');\n\n if (Array.isArray(data)) {\n data.forEach(function (d) {\n if (is.plainObject(d) && d.key) {\n logFn.apply(console, [d.key, d.value]);\n } else {\n logFn.apply(console, [d]);\n }\n });\n } else {\n logFn.apply(console, [data]);\n }\n\n console.groupEnd();\n } else {\n console.error('Missing title or data props');\n }\n }\n /* eslint-enable */\n\n}\n\nvar defaultState = {\n action: '',\n controlled: false,\n index: 0,\n lifecycle: LIFECYCLE.INIT,\n size: 0,\n status: STATUS.IDLE\n};\nvar validKeys = ['action', 'index', 'lifecycle', 'status'];\n\nfunction createStore(props) {\n var store = new Map();\n var data = new Map();\n\n var Store =\n /*#__PURE__*/\n function () {\n function Store() {\n var _this = this;\n\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$continuous = _ref.continuous,\n continuous = _ref$continuous === void 0 ? false : _ref$continuous,\n stepIndex = _ref.stepIndex,\n _ref$steps = _ref.steps,\n _steps = _ref$steps === void 0 ? [] : _ref$steps;\n\n _classCallCheck(this, Store);\n\n _defineProperty(this, \"listener\", void 0);\n\n _defineProperty(this, \"setSteps\", function (steps) {\n var _this$getState = _this.getState(),\n size = _this$getState.size,\n status = _this$getState.status;\n\n var state = {\n size: steps.length,\n status: status\n };\n data.set('steps', steps);\n\n if (status === STATUS.WAITING && !size && steps.length) {\n state.status = STATUS.RUNNING;\n }\n\n _this.setState(state);\n });\n\n _defineProperty(this, \"addListener\", function (listener) {\n _this.listener = listener;\n });\n\n _defineProperty(this, \"update\", function (state) {\n if (!hasValidKeys(state, validKeys)) {\n throw new Error(\"State is not valid. Valid keys: \".concat(validKeys.join(', ')));\n }\n\n _this.setState(_objectSpread2({}, _this.getNextState(_objectSpread2({}, _this.getState(), {}, state, {\n action: state.action || ACTIONS.UPDATE\n }), true)));\n });\n\n _defineProperty(this, \"start\", function (nextIndex) {\n var _this$getState2 = _this.getState(),\n index = _this$getState2.index,\n size = _this$getState2.size;\n\n _this.setState(_objectSpread2({}, _this.getNextState({\n action: ACTIONS.START,\n index: is.number(nextIndex) ? nextIndex : index\n }, true), {\n status: size ? STATUS.RUNNING : STATUS.WAITING\n }));\n });\n\n _defineProperty(this, \"stop\", function () {\n var advance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n var _this$getState3 = _this.getState(),\n index = _this$getState3.index,\n status = _this$getState3.status;\n\n if ([STATUS.FINISHED, STATUS.SKIPPED].includes(status)) return;\n\n _this.setState(_objectSpread2({}, _this.getNextState({\n action: ACTIONS.STOP,\n index: index + (advance ? 1 : 0)\n }), {\n status: STATUS.PAUSED\n }));\n });\n\n _defineProperty(this, \"close\", function () {\n var _this$getState4 = _this.getState(),\n index = _this$getState4.index,\n status = _this$getState4.status;\n\n if (status !== STATUS.RUNNING) return;\n\n _this.setState(_objectSpread2({}, _this.getNextState({\n action: ACTIONS.CLOSE,\n index: index + 1\n })));\n });\n\n _defineProperty(this, \"go\", function (nextIndex) {\n var _this$getState5 = _this.getState(),\n controlled = _this$getState5.controlled,\n status = _this$getState5.status;\n\n if (controlled || status !== STATUS.RUNNING) return;\n\n var step = _this.getSteps()[nextIndex];\n\n _this.setState(_objectSpread2({}, _this.getNextState({\n action: ACTIONS.GO,\n index: nextIndex\n }), {\n status: step ? status : STATUS.FINISHED\n }));\n });\n\n _defineProperty(this, \"info\", function () {\n return _this.getState();\n });\n\n _defineProperty(this, \"next\", function () {\n var _this$getState6 = _this.getState(),\n index = _this$getState6.index,\n status = _this$getState6.status;\n\n if (status !== STATUS.RUNNING) return;\n\n _this.setState(_this.getNextState({\n action: ACTIONS.NEXT,\n index: index + 1\n }));\n });\n\n _defineProperty(this, \"open\", function () {\n var _this$getState7 = _this.getState(),\n status = _this$getState7.status;\n\n if (status !== STATUS.RUNNING) return;\n\n _this.setState(_objectSpread2({}, _this.getNextState({\n action: ACTIONS.UPDATE,\n lifecycle: LIFECYCLE.TOOLTIP\n })));\n });\n\n _defineProperty(this, \"prev\", function () {\n var _this$getState8 = _this.getState(),\n index = _this$getState8.index,\n status = _this$getState8.status;\n\n if (status !== STATUS.RUNNING) return;\n\n _this.setState(_objectSpread2({}, _this.getNextState({\n action: ACTIONS.PREV,\n index: index - 1\n })));\n });\n\n _defineProperty(this, \"reset\", function () {\n var restart = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n var _this$getState9 = _this.getState(),\n controlled = _this$getState9.controlled;\n\n if (controlled) return;\n\n _this.setState(_objectSpread2({}, _this.getNextState({\n action: ACTIONS.RESET,\n index: 0\n }), {\n status: restart ? STATUS.RUNNING : STATUS.READY\n }));\n });\n\n _defineProperty(this, \"skip\", function () {\n var _this$getState10 = _this.getState(),\n status = _this$getState10.status;\n\n if (status !== STATUS.RUNNING) return;\n\n _this.setState({\n action: ACTIONS.SKIP,\n lifecycle: LIFECYCLE.INIT,\n status: STATUS.SKIPPED\n });\n });\n\n this.setState({\n action: ACTIONS.INIT,\n controlled: is.number(stepIndex),\n continuous: continuous,\n index: is.number(stepIndex) ? stepIndex : 0,\n lifecycle: LIFECYCLE.INIT,\n status: _steps.length ? STATUS.READY : STATUS.IDLE\n }, true);\n this.setSteps(_steps);\n }\n\n _createClass(Store, [{\n key: \"setState\",\n value: function setState(nextState) {\n var initial = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var state = this.getState();\n\n var _state$nextState = _objectSpread2({}, state, {}, nextState),\n action = _state$nextState.action,\n index = _state$nextState.index,\n lifecycle = _state$nextState.lifecycle,\n size = _state$nextState.size,\n status = _state$nextState.status;\n\n store.set('action', action);\n store.set('index', index);\n store.set('lifecycle', lifecycle);\n store.set('size', size);\n store.set('status', status);\n\n if (initial) {\n store.set('controlled', nextState.controlled);\n store.set('continuous', nextState.continuous);\n }\n /* istanbul ignore else */\n\n\n if (this.listener && this.hasUpdatedState(state)) {\n // console.log('▶ ▶ ▶ NEW STATE', this.getState());\n this.listener(this.getState());\n }\n }\n }, {\n key: \"getState\",\n value: function getState() {\n if (!store.size) {\n return _objectSpread2({}, defaultState);\n }\n\n return {\n action: store.get('action') || '',\n controlled: store.get('controlled') || false,\n index: parseInt(store.get('index'), 10),\n lifecycle: store.get('lifecycle') || '',\n size: store.get('size') || 0,\n status: store.get('status') || ''\n };\n }\n }, {\n key: \"getNextState\",\n value: function getNextState(state) {\n var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var _this$getState11 = this.getState(),\n action = _this$getState11.action,\n controlled = _this$getState11.controlled,\n index = _this$getState11.index,\n size = _this$getState11.size,\n status = _this$getState11.status;\n\n var newIndex = is.number(state.index) ? state.index : index;\n var nextIndex = controlled && !force ? index : Math.min(Math.max(newIndex, 0), size);\n return {\n action: state.action || action,\n controlled: controlled,\n index: nextIndex,\n lifecycle: state.lifecycle || LIFECYCLE.INIT,\n size: state.size || size,\n status: nextIndex === size ? STATUS.FINISHED : state.status || status\n };\n }\n }, {\n key: \"hasUpdatedState\",\n value: function hasUpdatedState(oldState) {\n var before = JSON.stringify(oldState);\n var after = JSON.stringify(this.getState());\n return before !== after;\n }\n }, {\n key: \"getSteps\",\n value: function getSteps() {\n var steps = data.get('steps');\n return Array.isArray(steps) ? steps : [];\n }\n }, {\n key: \"getHelpers\",\n value: function getHelpers() {\n return {\n close: this.close,\n go: this.go,\n info: this.info,\n next: this.next,\n open: this.open,\n prev: this.prev,\n reset: this.reset,\n skip: this.skip\n };\n }\n }]);\n\n return Store;\n }();\n\n return new Store(props);\n}\n/**\n * Find the bounding client rect\n *\n * @private\n * @param {HTMLElement} element - The target element\n * @returns {Object}\n */\n\n\nfunction getClientRect(element) {\n if (!element) {\n return {};\n }\n\n return element.getBoundingClientRect();\n}\n/**\n * Helper function to get the browser-normalized \"document height\"\n * @returns {Number}\n */\n\n\nfunction getDocumentHeight() {\n var _document = document,\n body = _document.body,\n html = _document.documentElement;\n\n if (!body || !html) {\n return 0;\n }\n\n return Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);\n}\n/**\n * Find and return the target DOM element based on a step's 'target'.\n *\n * @private\n * @param {string|HTMLElement} element\n *\n * @returns {HTMLElement|null}\n */\n\n\nfunction getElement(element) {\n /* istanbul ignore else */\n if (typeof element === 'string') {\n return document.querySelector(element);\n }\n\n return element;\n}\n/**\n * Get computed style property\n *\n * @param {HTMLElement} el\n *\n * @returns {Object}\n */\n\n\nfunction getStyleComputedProperty(el) {\n if (!el || el.nodeType !== 1) {\n return {};\n }\n\n return getComputedStyle(el);\n}\n/**\n * Get scroll parent with fix\n *\n * @param {HTMLElement} element\n * @param {boolean} skipFix\n * @param {boolean} [forListener]\n *\n * @returns {*}\n */\n\n\nfunction getScrollParent(element, skipFix, forListener) {\n var parent = scrollParent(element);\n\n if (parent.isSameNode(scrollDoc())) {\n if (forListener) {\n return document;\n }\n\n return scrollDoc();\n }\n\n var hasScrolling = parent.scrollHeight > parent.offsetHeight;\n /* istanbul ignore else */\n\n if (!hasScrolling && !skipFix) {\n parent.style.overflow = 'initial';\n return scrollDoc();\n }\n\n return parent;\n}\n/**\n * Check if the element has custom scroll parent\n *\n * @param {HTMLElement} element\n * @param {boolean} skipFix\n *\n * @returns {boolean}\n */\n\n\nfunction hasCustomScrollParent(element, skipFix) {\n if (!element) return false;\n var parent = getScrollParent(element, skipFix);\n return !parent.isSameNode(scrollDoc());\n}\n/**\n * Check if the element has custom offset parent\n *\n * @param {HTMLElement} element\n *\n * @returns {boolean}\n */\n\n\nfunction hasCustomOffsetParent(element) {\n return element.offsetParent !== document.body;\n}\n/**\n * Check if an element has fixed/sticky position\n * @param {HTMLElement|Node} el\n * @param {string} [type]\n *\n * @returns {boolean}\n */\n\n\nfunction hasPosition(el) {\n var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'fixed';\n\n if (!el || !(el instanceof HTMLElement)) {\n return false;\n }\n\n var nodeName = el.nodeName;\n\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n return false;\n }\n\n if (getStyleComputedProperty(el).position === type) {\n return true;\n }\n\n return hasPosition(el.parentNode, type);\n}\n/**\n * Check if the element is visible\n *\n * @param {HTMLElement} element\n *\n * @returns {boolean}\n */\n\n\nfunction isElementVisible(element) {\n if (!element) return false;\n var parentElement = element;\n\n while (parentElement) {\n if (parentElement === document.body) break;\n /* istanbul ignore else */\n\n if (parentElement instanceof HTMLElement) {\n var _getComputedStyle = getComputedStyle(parentElement),\n display = _getComputedStyle.display,\n visibility = _getComputedStyle.visibility;\n\n if (display === 'none' || visibility === 'hidden') {\n return false;\n }\n }\n\n parentElement = parentElement.parentNode;\n }\n\n return true;\n}\n/**\n * Find and return the target DOM element based on a step's 'target'.\n *\n * @private\n * @param {string|HTMLElement} element\n * @param {number} offset\n * @param {boolean} skipFix\n *\n * @returns {HTMLElement|undefined}\n */\n\n\nfunction getElementPosition(element, offset, skipFix) {\n var elementRect = getClientRect(element);\n var parent = getScrollParent(element, skipFix);\n var hasScrollParent = hasCustomScrollParent(element, skipFix);\n var parentTop = 0;\n /* istanbul ignore else */\n\n if (parent instanceof HTMLElement) {\n parentTop = parent.scrollTop;\n }\n\n var top = elementRect.top + (!hasScrollParent && !hasPosition(element) ? parentTop : 0);\n return Math.floor(top - offset);\n}\n/**\n * Get the scrollTop position\n *\n * @param {HTMLElement} element\n * @param {number} offset\n * @param {boolean} skipFix\n *\n * @returns {number}\n */\n\n\nfunction getScrollTo(element, offset, skipFix) {\n if (!element) {\n return 0;\n }\n\n var parent = scrollParent(element);\n var top = element.offsetTop;\n\n if (hasCustomScrollParent(element, skipFix) && !hasCustomOffsetParent(element)) {\n top -= parent.offsetTop;\n }\n\n return Math.floor(top - offset);\n}\n/**\n * Scroll to position\n * @param {number} value\n * @param {HTMLElement} element\n * @returns {Promise<*>}\n */\n\n\nfunction scrollTo(value) {\n var element = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : scrollDoc();\n return new Promise(function (resolve, reject) {\n var scrollTop = element.scrollTop;\n var limit = value > scrollTop ? value - scrollTop : scrollTop - value;\n scroll.top(element, value, {\n duration: limit < 100 ? 50 : 300\n }, function (error) {\n if (error && error.message !== 'Element already at target scroll position') {\n return reject(error);\n }\n\n return resolve();\n });\n });\n}\n\nfunction createChainableTypeChecker(validate) {\n function checkType(isRequired, props, propName, componentName, location, propFullName) {\n var componentNameSafe = componentName || '<>';\n var propFullNameSafe = propFullName || propName;\n /* istanbul ignore else */\n\n if (props[propName] == null) {\n if (isRequired) {\n return new Error(\"Required \".concat(location, \" `\").concat(propFullNameSafe, \"` was not specified in `\").concat(componentNameSafe, \"`.\"));\n }\n\n return null;\n }\n\n for (var _len = arguments.length, args = new Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) {\n args[_key - 6] = arguments[_key];\n }\n\n return validate.apply(void 0, [props, propName, componentNameSafe, location, propFullNameSafe].concat(args));\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n return chainedCheckType;\n}\n\nvar componentTypeWithRefs = createChainableTypeChecker(function (props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var Component = propValue;\n\n if (!React.isValidElement(propValue) && isValidElementType(propValue)) {\n var ownProps = {\n ref: function ref() {},\n step: {}\n };\n Component = React.createElement(Component, ownProps);\n }\n\n if (is.string(propValue) || is.number(propValue) || !isValidElementType(propValue) || ![Element, ForwardRef].includes(typeOf(Component))) {\n return new Error(\"Invalid \".concat(location, \" `\").concat(propFullName, \"` supplied to `\").concat(componentName, \"`. Expected a React class or forwardRef.\"));\n }\n\n return undefined;\n});\nvar defaultOptions = {\n arrowColor: '#fff',\n backgroundColor: '#fff',\n beaconSize: 36,\n overlayColor: 'rgba(0, 0, 0, 0.5)',\n primaryColor: '#f04',\n spotlightShadow: '0 0 15px rgba(0, 0, 0, 0.5)',\n textColor: '#333',\n zIndex: 100\n};\nvar buttonBase = {\n backgroundColor: 'transparent',\n border: 0,\n borderRadius: 0,\n color: '#555',\n cursor: 'pointer',\n fontSize: 16,\n lineHeight: 1,\n padding: 8,\n WebkitAppearance: 'none'\n};\nvar spotlight = {\n borderRadius: 4,\n position: 'absolute'\n};\n\nfunction getStyles() {\n var stepStyles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var options = deepmerge(defaultOptions, stepStyles.options || {});\n var width = 290;\n\n if (window.innerWidth > 480) {\n width = 380;\n }\n\n if (options.width) {\n if (window.innerWidth < options.width) {\n width = window.innerWidth - 30;\n } else {\n width = options.width; //eslint-disable-line prefer-destructuring\n }\n }\n\n var overlay = {\n bottom: 0,\n left: 0,\n overflow: 'hidden',\n position: 'absolute',\n right: 0,\n top: 0,\n zIndex: options.zIndex\n };\n var defaultStyles = {\n beacon: _objectSpread2({}, buttonBase, {\n display: 'inline-block',\n height: options.beaconSize,\n position: 'relative',\n width: options.beaconSize,\n zIndex: options.zIndex\n }),\n beaconInner: {\n animation: 'joyride-beacon-inner 1.2s infinite ease-in-out',\n backgroundColor: options.primaryColor,\n borderRadius: '50%',\n display: 'block',\n height: '50%',\n left: '50%',\n opacity: 0.7,\n position: 'absolute',\n top: '50%',\n transform: 'translate(-50%, -50%)',\n width: '50%'\n },\n beaconOuter: {\n animation: 'joyride-beacon-outer 1.2s infinite ease-in-out',\n backgroundColor: \"rgba(\".concat(hexToRGB(options.primaryColor).join(','), \", 0.2)\"),\n border: \"2px solid \".concat(options.primaryColor),\n borderRadius: '50%',\n boxSizing: 'border-box',\n display: 'block',\n height: '100%',\n left: 0,\n opacity: 0.9,\n position: 'absolute',\n top: 0,\n transformOrigin: 'center',\n width: '100%'\n },\n tooltip: {\n backgroundColor: options.backgroundColor,\n borderRadius: 5,\n boxSizing: 'border-box',\n color: options.textColor,\n fontSize: 16,\n maxWidth: '100%',\n padding: 15,\n position: 'relative',\n width: width\n },\n tooltipContainer: {\n lineHeight: 1.4,\n textAlign: 'center'\n },\n tooltipTitle: {\n fontSize: 18,\n margin: 0\n },\n tooltipContent: {\n padding: '20px 10px'\n },\n tooltipFooter: {\n alignItems: 'center',\n display: 'flex',\n justifyContent: 'flex-end',\n marginTop: 15\n },\n tooltipFooterSpacer: {\n flex: 1\n },\n buttonNext: _objectSpread2({}, buttonBase, {\n backgroundColor: options.primaryColor,\n borderRadius: 4,\n color: '#fff'\n }),\n buttonBack: _objectSpread2({}, buttonBase, {\n color: options.primaryColor,\n marginLeft: 'auto',\n marginRight: 5\n }),\n buttonClose: _objectSpread2({}, buttonBase, {\n color: options.textColor,\n height: 14,\n padding: 15,\n position: 'absolute',\n right: 0,\n top: 0,\n width: 14\n }),\n buttonSkip: _objectSpread2({}, buttonBase, {\n color: options.textColor,\n fontSize: 14\n }),\n overlay: _objectSpread2({}, overlay, {\n backgroundColor: options.overlayColor,\n mixBlendMode: 'hard-light'\n }),\n overlayLegacy: _objectSpread2({}, overlay),\n overlayLegacyCenter: _objectSpread2({}, overlay, {\n backgroundColor: options.overlayColor\n }),\n spotlight: _objectSpread2({}, spotlight, {\n backgroundColor: 'gray'\n }),\n spotlightLegacy: _objectSpread2({}, spotlight, {\n boxShadow: \"0 0 0 9999px \".concat(options.overlayColor, \", \").concat(options.spotlightShadow)\n }),\n floaterStyles: {\n arrow: {\n color: options.arrowColor\n },\n options: {\n zIndex: options.zIndex\n }\n },\n options: options\n };\n return deepmerge(defaultStyles, stepStyles);\n}\n\nvar DEFAULTS = {\n floaterProps: {\n options: {\n preventOverflow: {\n boundariesElement: 'scrollParent'\n }\n },\n wrapperOptions: {\n offset: -18,\n position: true\n }\n },\n locale: {\n back: 'Back',\n close: 'Close',\n last: 'Last',\n next: 'Next',\n open: 'Open the dialog',\n skip: 'Skip'\n },\n step: {\n event: 'click',\n placement: 'bottom',\n offset: 10\n }\n};\n\nfunction getTourProps(props) {\n var sharedTourProps = ['beaconComponent', 'disableCloseOnEsc', 'disableOverlay', 'disableOverlayClose', 'disableScrolling', 'disableScrollParentFix', 'floaterProps', 'hideBackButton', 'locale', 'showProgress', 'showSkipButton', 'spotlightClicks', 'spotlightPadding', 'styles', 'tooltipComponent'];\n return Object.keys(props).filter(function (d) {\n return sharedTourProps.includes(d);\n }).reduce(function (acc, i) {\n acc[i] = props[i]; //eslint-disable-line react/destructuring-assignment\n\n return acc;\n }, {});\n}\n\nfunction getMergedStep(step, props) {\n if (!step) return null;\n var mergedStep = deepmerge.all([getTourProps(props), DEFAULTS.step, step], {\n isMergeableObject: is.plainObject\n });\n var mergedStyles = getStyles(deepmerge(props.styles || {}, step.styles || {}));\n var scrollParent = hasCustomScrollParent(getElement(step.target), mergedStep.disableScrollParentFix);\n var floaterProps = deepmerge.all([props.floaterProps || {}, DEFAULTS.floaterProps, mergedStep.floaterProps || {}]); // Set react-floater props\n\n floaterProps.offset = mergedStep.offset;\n floaterProps.styles = deepmerge(floaterProps.styles || {}, mergedStyles.floaterStyles || {});\n delete mergedStyles.floaterStyles;\n floaterProps.offset += props.spotlightPadding || step.spotlightPadding;\n\n if (step.placementBeacon) {\n floaterProps.wrapperOptions.placement = step.placementBeacon;\n }\n\n if (scrollParent) {\n floaterProps.options.preventOverflow.boundariesElement = 'window';\n }\n\n return _objectSpread2({}, mergedStep, {\n locale: deepmerge.all([DEFAULTS.locale, props.locale || {}, mergedStep.locale || {}]),\n floaterProps: floaterProps,\n styles: mergedStyles\n });\n}\n/**\n * Validate if a step is valid\n *\n * @param {Object} step - A step object\n * @param {boolean} debug\n *\n * @returns {boolean} - True if the step is valid, false otherwise\n */\n\n\nfunction validateStep(step) {\n var debug = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (!is.plainObject(step)) {\n log({\n title: 'validateStep',\n data: 'step must be an object',\n warn: true,\n debug: debug\n });\n return false;\n }\n\n if (!step.target) {\n log({\n title: 'validateStep',\n data: 'target is missing from the step',\n warn: true,\n debug: debug\n });\n return false;\n }\n\n return true;\n}\n/**\n * Validate if steps is valid\n *\n * @param {Array} steps - A steps array\n * @param {boolean} debug\n *\n * @returns {boolean} - True if the steps are valid, false otherwise\n */\n\n\nfunction validateSteps(steps) {\n var debug = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (!is.array(steps)) {\n log({\n title: 'validateSteps',\n data: 'steps must be an array',\n warn: true,\n debug: debug\n });\n return false;\n }\n\n return steps.every(function (d) {\n return validateStep(d, debug);\n });\n}\n\nvar Scope = function Scope(_element) {\n var _this = this;\n\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, Scope);\n\n _defineProperty(this, \"element\", void 0);\n\n _defineProperty(this, \"options\", void 0);\n\n _defineProperty(this, \"canBeTabbed\", function (element) {\n var tabIndex = element.tabIndex;\n if (tabIndex === null || tabIndex < 0) tabIndex = undefined;\n var isTabIndexNaN = isNaN(tabIndex);\n return !isTabIndexNaN && _this.canHaveFocus(element, true);\n });\n\n _defineProperty(this, \"canHaveFocus\", function (element, isTabIndexNotNaN) {\n var validTabNodes = /input|select|textarea|button|object/;\n var nodeName = element.nodeName.toLowerCase();\n var res = validTabNodes.test(nodeName) && !element.getAttribute('disabled') || (nodeName === 'a' ? element.getAttribute('href') || isTabIndexNotNaN : isTabIndexNotNaN);\n return res && _this.isVisible(element);\n });\n\n _defineProperty(this, \"findValidTabElements\", function () {\n return [].slice.call(_this.element.querySelectorAll('*'), 0).filter(_this.canBeTabbed);\n });\n\n _defineProperty(this, \"handleKeyDown\", function (e) {\n var _this$options$keyCode = _this.options.keyCode,\n keyCode = _this$options$keyCode === void 0 ? 9 : _this$options$keyCode;\n /* istanbul ignore else */\n\n if (e.keyCode === keyCode) {\n _this.interceptTab(e);\n }\n });\n\n _defineProperty(this, \"interceptTab\", function (event) {\n event.preventDefault();\n\n var elements = _this.findValidTabElements();\n\n var shiftKey = event.shiftKey;\n\n if (!elements.length) {\n return;\n }\n\n var x = elements.indexOf(document.activeElement);\n\n if (x === -1 || !shiftKey && x + 1 === elements.length) {\n x = 0;\n } else if (shiftKey && x === 0) {\n x = elements.length - 1;\n } else {\n x += shiftKey ? -1 : 1;\n }\n\n elements[x].focus();\n });\n\n _defineProperty(this, \"isHidden\", function (element) {\n var noSize = element.offsetWidth <= 0 && element.offsetHeight <= 0;\n var style = window.getComputedStyle(element);\n if (noSize && !element.innerHTML) return true;\n return noSize && style.getPropertyValue('overflow') !== 'visible' || style.getPropertyValue('display') === 'none';\n });\n\n _defineProperty(this, \"isVisible\", function (element) {\n var parentElement = element;\n\n while (parentElement) {\n /* istanbul ignore else */\n if (parentElement instanceof HTMLElement) {\n if (parentElement === document.body) break;\n /* istanbul ignore else */\n\n if (_this.isHidden(parentElement)) return false;\n parentElement = parentElement.parentNode;\n }\n }\n\n return true;\n });\n\n _defineProperty(this, \"removeScope\", function () {\n window.removeEventListener('keydown', _this.handleKeyDown);\n });\n\n _defineProperty(this, \"setFocus\", function () {\n var selector = _this.options.selector;\n if (!selector) return;\n\n var target = _this.element.querySelector(selector);\n /* istanbul ignore else */\n\n\n if (target) {\n target.focus();\n }\n });\n\n if (!(_element instanceof HTMLElement)) {\n throw new TypeError('Invalid parameter: element must be an HTMLElement');\n }\n\n this.element = _element;\n this.options = options;\n window.addEventListener('keydown', this.handleKeyDown, false);\n this.setFocus();\n};\n\nvar JoyrideBeacon =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(JoyrideBeacon, _React$Component);\n\n function JoyrideBeacon(props) {\n var _this;\n\n _classCallCheck(this, JoyrideBeacon);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(JoyrideBeacon).call(this, props));\n\n _defineProperty(_assertThisInitialized(_this), \"setBeaconRef\", function (c) {\n _this.beacon = c;\n });\n\n if (!props.beaconComponent) {\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n var css = \"\\n @keyframes joyride-beacon-inner {\\n 20% {\\n opacity: 0.9;\\n }\\n \\n 90% {\\n opacity: 0.7;\\n }\\n }\\n \\n @keyframes joyride-beacon-outer {\\n 0% {\\n transform: scale(1);\\n }\\n \\n 45% {\\n opacity: 0.7;\\n transform: scale(0.75);\\n }\\n \\n 100% {\\n opacity: 0.9;\\n transform: scale(1);\\n }\\n }\\n \";\n style.type = 'text/css';\n style.id = 'joyride-beacon-animation';\n style.appendChild(document.createTextNode(css));\n head.appendChild(style);\n }\n\n return _this;\n }\n\n _createClass(JoyrideBeacon, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this2 = this;\n\n var shouldFocus = this.props.shouldFocus;\n\n if (process.env.NODE_ENV !== 'production') {\n if (!is.domElement(this.beacon)) {\n console.warn('beacon is not a valid DOM element'); //eslint-disable-line no-console\n }\n }\n\n setTimeout(function () {\n if (is.domElement(_this2.beacon) && shouldFocus) {\n _this2.beacon.focus();\n }\n }, 0);\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n var style = document.getElementById('joyride-beacon-animation');\n\n if (style) {\n style.parentNode.removeChild(style);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n beaconComponent = _this$props.beaconComponent,\n locale = _this$props.locale,\n onClickOrHover = _this$props.onClickOrHover,\n styles = _this$props.styles;\n var props = {\n 'aria-label': locale.open,\n onClick: onClickOrHover,\n onMouseEnter: onClickOrHover,\n ref: this.setBeaconRef,\n title: locale.open\n };\n var component;\n\n if (beaconComponent) {\n var BeaconComponent = beaconComponent;\n component = React.createElement(BeaconComponent, props);\n } else {\n component = React.createElement(\"button\", _extends({\n key: \"JoyrideBeacon\",\n className: \"react-joyride__beacon\",\n style: styles.beacon,\n type: \"button\",\n \"data-test-id\": \"button-beacon\"\n }, props), React.createElement(\"span\", {\n style: styles.beaconInner\n }), React.createElement(\"span\", {\n style: styles.beaconOuter\n }));\n }\n\n return component;\n }\n }]);\n\n return JoyrideBeacon;\n}(React.Component);\n\n_defineProperty(JoyrideBeacon, \"propTypes\", {\n beaconComponent: componentTypeWithRefs,\n locale: PropTypes.object.isRequired,\n onClickOrHover: PropTypes.func.isRequired,\n shouldFocus: PropTypes.bool.isRequired,\n styles: PropTypes.object.isRequired\n});\n\nvar JoyrideSpotlight = function JoyrideSpotlight(_ref) {\n var styles = _ref.styles;\n return React.createElement(\"div\", {\n key: \"JoyrideSpotlight\",\n className: \"react-joyride__spotlight\",\n style: styles\n });\n};\n\nJoyrideSpotlight.propTypes = {\n styles: PropTypes.object.isRequired\n};\n\nvar JoyrideOverlay =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(JoyrideOverlay, _React$Component);\n\n function JoyrideOverlay() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, JoyrideOverlay);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(JoyrideOverlay)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _defineProperty(_assertThisInitialized(_this), \"_isMounted\", false);\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n mouseOverSpotlight: false,\n isScrolling: false,\n showSpotlight: true\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleMouseMove\", function (e) {\n var mouseOverSpotlight = _this.state.mouseOverSpotlight;\n var _this$spotlightStyles = _this.spotlightStyles,\n height = _this$spotlightStyles.height,\n left = _this$spotlightStyles.left,\n position = _this$spotlightStyles.position,\n top = _this$spotlightStyles.top,\n width = _this$spotlightStyles.width;\n var offsetY = position === 'fixed' ? e.clientY : e.pageY;\n var offsetX = position === 'fixed' ? e.clientX : e.pageX;\n var inSpotlightHeight = offsetY >= top && offsetY <= top + height;\n var inSpotlightWidth = offsetX >= left && offsetX <= left + width;\n var inSpotlight = inSpotlightWidth && inSpotlightHeight;\n\n if (inSpotlight !== mouseOverSpotlight) {\n _this.updateState({\n mouseOverSpotlight: inSpotlight\n });\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleScroll\", function () {\n var target = _this.props.target;\n var element = getElement(target);\n\n if (_this.scrollParent !== document) {\n var isScrolling = _this.state.isScrolling;\n\n if (!isScrolling) {\n _this.updateState({\n isScrolling: true,\n showSpotlight: false\n });\n }\n\n clearTimeout(_this.scrollTimeout);\n _this.scrollTimeout = setTimeout(function () {\n _this.updateState({\n isScrolling: false,\n showSpotlight: true\n });\n }, 50);\n } else if (hasPosition(element, 'sticky')) {\n _this.updateState({});\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleResize\", function () {\n clearTimeout(_this.resizeTimeout);\n _this.resizeTimeout = setTimeout(function () {\n if (!_this._isMounted) {\n return;\n }\n\n _this.forceUpdate();\n }, 100);\n });\n\n return _this;\n }\n\n _createClass(JoyrideOverlay, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this$props = this.props,\n debug = _this$props.debug,\n disableScrolling = _this$props.disableScrolling,\n disableScrollParentFix = _this$props.disableScrollParentFix,\n target = _this$props.target;\n var element = getElement(target);\n this.scrollParent = getScrollParent(element, disableScrollParentFix, true);\n this._isMounted = true;\n /* istanbul ignore else */\n\n if (!disableScrolling) {\n /* istanbul ignore else */\n if (process.env.NODE_ENV === 'development' && hasCustomScrollParent(element, true)) {\n log({\n title: 'step has a custom scroll parent and can cause trouble with scrolling',\n data: [{\n key: 'parent',\n value: this.scrollParent\n }],\n debug: debug\n });\n }\n }\n\n window.addEventListener('resize', this.handleResize);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var _this2 = this;\n\n var _this$props2 = this.props,\n lifecycle = _this$props2.lifecycle,\n spotlightClicks = _this$props2.spotlightClicks;\n\n var _treeChanges = treeChanges(prevProps, this.props),\n changed = _treeChanges.changed,\n changedTo = _treeChanges.changedTo;\n /* istanbul ignore else */\n\n\n if (changedTo('lifecycle', LIFECYCLE.TOOLTIP)) {\n this.scrollParent.addEventListener('scroll', this.handleScroll, {\n passive: true\n });\n setTimeout(function () {\n var isScrolling = _this2.state.isScrolling;\n\n if (!isScrolling) {\n _this2.updateState({\n showSpotlight: true\n });\n }\n }, 100);\n }\n\n if (changed('spotlightClicks') || changed('disableOverlay') || changed('lifecycle')) {\n if (spotlightClicks && lifecycle === LIFECYCLE.TOOLTIP) {\n window.addEventListener('mousemove', this.handleMouseMove, false);\n } else if (lifecycle !== LIFECYCLE.TOOLTIP) {\n window.removeEventListener('mousemove', this.handleMouseMove);\n }\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this._isMounted = false;\n window.removeEventListener('mousemove', this.handleMouseMove);\n window.removeEventListener('resize', this.handleResize);\n clearTimeout(this.resizeTimeout);\n clearTimeout(this.scrollTimeout);\n this.scrollParent.removeEventListener('scroll', this.handleScroll);\n }\n }, {\n key: \"updateState\",\n value: function updateState(state) {\n if (!this._isMounted) {\n return;\n }\n\n this.setState(state);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$state = this.state,\n mouseOverSpotlight = _this$state.mouseOverSpotlight,\n showSpotlight = _this$state.showSpotlight;\n var _this$props3 = this.props,\n disableOverlay = _this$props3.disableOverlay,\n lifecycle = _this$props3.lifecycle,\n onClickOverlay = _this$props3.onClickOverlay,\n placement = _this$props3.placement,\n styles = _this$props3.styles;\n\n if (disableOverlay || lifecycle !== LIFECYCLE.TOOLTIP) {\n return null;\n }\n\n var baseStyles = styles.overlay;\n /* istanbul ignore else */\n\n if (isLegacy()) {\n baseStyles = placement === 'center' ? styles.overlayLegacyCenter : styles.overlayLegacy;\n }\n\n var stylesOverlay = _objectSpread2({\n cursor: 'pointer',\n height: getDocumentHeight(),\n pointerEvents: mouseOverSpotlight ? 'none' : 'auto'\n }, baseStyles);\n\n var spotlight = placement !== 'center' && showSpotlight && React.createElement(JoyrideSpotlight, {\n styles: this.spotlightStyles\n }); // Hack for Safari bug with mix-blend-mode with z-index\n\n if (getBrowser() === 'safari') {\n var mixBlendMode = stylesOverlay.mixBlendMode,\n zIndex = stylesOverlay.zIndex,\n safarOverlay = _objectWithoutProperties(stylesOverlay, [\"mixBlendMode\", \"zIndex\"]);\n\n spotlight = React.createElement(\"div\", {\n style: _objectSpread2({}, safarOverlay)\n }, spotlight);\n delete stylesOverlay.backgroundColor;\n }\n\n return React.createElement(\"div\", {\n className: \"react-joyride__overlay\",\n style: stylesOverlay,\n onClick: onClickOverlay\n }, spotlight);\n }\n }, {\n key: \"spotlightStyles\",\n get: function get() {\n var showSpotlight = this.state.showSpotlight;\n var _this$props4 = this.props,\n disableScrollParentFix = _this$props4.disableScrollParentFix,\n spotlightClicks = _this$props4.spotlightClicks,\n spotlightPadding = _this$props4.spotlightPadding,\n styles = _this$props4.styles,\n target = _this$props4.target;\n var element = getElement(target);\n var elementRect = getClientRect(element);\n var isFixedTarget = hasPosition(element);\n var top = getElementPosition(element, spotlightPadding, disableScrollParentFix);\n return _objectSpread2({}, isLegacy() ? styles.spotlightLegacy : styles.spotlight, {\n height: Math.round(elementRect.height + spotlightPadding * 2),\n left: Math.round(elementRect.left - spotlightPadding),\n opacity: showSpotlight ? 1 : 0,\n pointerEvents: spotlightClicks ? 'none' : 'auto',\n position: isFixedTarget ? 'fixed' : 'absolute',\n top: top,\n transition: 'opacity 0.2s',\n width: Math.round(elementRect.width + spotlightPadding * 2)\n });\n }\n }]);\n\n return JoyrideOverlay;\n}(React.Component);\n\n_defineProperty(JoyrideOverlay, \"propTypes\", {\n debug: PropTypes.bool.isRequired,\n disableOverlay: PropTypes.bool.isRequired,\n disableScrolling: PropTypes.bool.isRequired,\n disableScrollParentFix: PropTypes.bool.isRequired,\n lifecycle: PropTypes.string.isRequired,\n onClickOverlay: PropTypes.func.isRequired,\n placement: PropTypes.string.isRequired,\n spotlightClicks: PropTypes.bool.isRequired,\n spotlightPadding: PropTypes.number,\n styles: PropTypes.object.isRequired,\n target: PropTypes.oneOfType([PropTypes.object, PropTypes.string]).isRequired\n});\n\nvar JoyrideTooltipCloseBtn = function JoyrideTooltipCloseBtn(_ref) {\n var styles = _ref.styles,\n props = _objectWithoutProperties(_ref, [\"styles\"]);\n\n var color = styles.color,\n height = styles.height,\n width = styles.width,\n style = _objectWithoutProperties(styles, [\"color\", \"height\", \"width\"]);\n\n return React.createElement(\"button\", _extends({\n style: style,\n type: \"button\"\n }, props), React.createElement(\"svg\", {\n width: typeof width === 'number' ? \"\".concat(width, \"px\") : width,\n height: typeof height === 'number' ? \"\".concat(height, \"px\") : height,\n viewBox: \"0 0 18 18\",\n version: \"1.1\",\n xmlns: \"http://www.w3.org/2000/svg\",\n preserveAspectRatio: \"xMidYMid\"\n }, React.createElement(\"g\", null, React.createElement(\"path\", {\n d: \"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z\",\n fill: color\n }))));\n};\n\nJoyrideTooltipCloseBtn.propTypes = {\n styles: PropTypes.object.isRequired\n};\n\nvar JoyrideTooltipContainer =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(JoyrideTooltipContainer, _React$Component);\n\n function JoyrideTooltipContainer() {\n _classCallCheck(this, JoyrideTooltipContainer);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(JoyrideTooltipContainer).apply(this, arguments));\n }\n\n _createClass(JoyrideTooltipContainer, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n backProps = _this$props.backProps,\n closeProps = _this$props.closeProps,\n continuous = _this$props.continuous,\n index = _this$props.index,\n isLastStep = _this$props.isLastStep,\n primaryProps = _this$props.primaryProps,\n size = _this$props.size,\n skipProps = _this$props.skipProps,\n step = _this$props.step,\n tooltipProps = _this$props.tooltipProps;\n var content = step.content,\n hideBackButton = step.hideBackButton,\n hideCloseButton = step.hideCloseButton,\n hideFooter = step.hideFooter,\n showProgress = step.showProgress,\n showSkipButton = step.showSkipButton,\n title = step.title,\n styles = step.styles;\n var _step$locale = step.locale,\n back = _step$locale.back,\n close = _step$locale.close,\n last = _step$locale.last,\n next = _step$locale.next,\n skip = _step$locale.skip;\n var output = {\n primary: close\n };\n\n if (continuous) {\n output.primary = isLastStep ? last : next;\n\n if (showProgress) {\n output.primary = React.createElement(\"span\", null, output.primary, \" (\", index + 1, \"/\", size, \")\");\n }\n }\n\n if (showSkipButton && !isLastStep) {\n output.skip = React.createElement(\"button\", _extends({\n style: styles.buttonSkip,\n type: \"button\",\n \"data-test-id\": \"button-skip\",\n \"aria-live\": \"off\"\n }, skipProps), skip);\n }\n\n if (!hideBackButton && index > 0) {\n output.back = React.createElement(\"button\", _extends({\n style: styles.buttonBack,\n type: \"button\",\n \"data-test-id\": \"button-back\"\n }, backProps), back);\n }\n\n output.close = !hideCloseButton && React.createElement(JoyrideTooltipCloseBtn, _extends({\n styles: styles.buttonClose,\n \"data-test-id\": \"button-close\"\n }, closeProps));\n return React.createElement(\"div\", _extends({\n key: \"JoyrideTooltip\",\n className: \"react-joyride__tooltip\",\n style: styles.tooltip\n }, tooltipProps), React.createElement(\"div\", {\n style: styles.tooltipContainer\n }, title && React.createElement(\"h4\", {\n style: styles.tooltipTitle,\n \"aria-label\": title\n }, title), React.createElement(\"div\", {\n style: styles.tooltipContent\n }, content)), !hideFooter && React.createElement(\"div\", {\n style: styles.tooltipFooter\n }, React.createElement(\"div\", {\n style: styles.tooltipFooterSpacer\n }, output.skip), output.back, React.createElement(\"button\", _extends({\n style: styles.buttonNext,\n type: \"button\",\n \"data-test-id\": \"button-primary\"\n }, primaryProps), output.primary)), output.close);\n }\n }]);\n\n return JoyrideTooltipContainer;\n}(React.Component);\n\n_defineProperty(JoyrideTooltipContainer, \"propTypes\", {\n backProps: PropTypes.object.isRequired,\n closeProps: PropTypes.object.isRequired,\n continuous: PropTypes.bool.isRequired,\n index: PropTypes.number.isRequired,\n isLastStep: PropTypes.bool.isRequired,\n primaryProps: PropTypes.object.isRequired,\n size: PropTypes.number.isRequired,\n skipProps: PropTypes.object.isRequired,\n step: PropTypes.object.isRequired,\n tooltipProps: PropTypes.object.isRequired\n});\n\nvar JoyrideTooltip =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(JoyrideTooltip, _React$Component);\n\n function JoyrideTooltip() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, JoyrideTooltip);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(JoyrideTooltip)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _defineProperty(_assertThisInitialized(_this), \"handleClickBack\", function (e) {\n e.preventDefault();\n var helpers = _this.props.helpers;\n helpers.prev();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleClickClose\", function (e) {\n e.preventDefault();\n var helpers = _this.props.helpers;\n helpers.close();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleClickPrimary\", function (e) {\n e.preventDefault();\n var _this$props = _this.props,\n continuous = _this$props.continuous,\n helpers = _this$props.helpers;\n\n if (!continuous) {\n helpers.close();\n return;\n }\n\n helpers.next();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleClickSkip\", function (e) {\n e.preventDefault();\n var helpers = _this.props.helpers;\n helpers.skip();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"getElementsProps\", function () {\n var _this$props2 = _this.props,\n continuous = _this$props2.continuous,\n isLastStep = _this$props2.isLastStep,\n setTooltipRef = _this$props2.setTooltipRef,\n step = _this$props2.step;\n var back = getText(step.locale.back);\n var close = getText(step.locale.close);\n var last = getText(step.locale.last);\n var next = getText(step.locale.next);\n var skip = getText(step.locale.skip);\n var primaryText = continuous ? next : close;\n\n if (isLastStep) {\n primaryText = last;\n }\n\n return {\n backProps: {\n 'aria-label': back,\n 'data-action': 'back',\n onClick: _this.handleClickBack,\n role: 'button',\n title: back\n },\n closeProps: {\n 'aria-label': close,\n 'data-action': 'close',\n onClick: _this.handleClickClose,\n role: 'button',\n title: close\n },\n primaryProps: {\n 'aria-label': primaryText,\n 'data-action': 'primary',\n onClick: _this.handleClickPrimary,\n role: 'button',\n title: primaryText\n },\n skipProps: {\n 'aria-label': skip,\n 'data-action': 'skip',\n onClick: _this.handleClickSkip,\n role: 'button',\n title: skip\n },\n tooltipProps: {\n 'aria-modal': true,\n ref: setTooltipRef,\n role: 'alertdialog'\n }\n };\n });\n\n return _this;\n }\n\n _createClass(JoyrideTooltip, [{\n key: \"render\",\n value: function render() {\n var _this$props3 = this.props,\n continuous = _this$props3.continuous,\n index = _this$props3.index,\n isLastStep = _this$props3.isLastStep,\n size = _this$props3.size,\n step = _this$props3.step;\n\n var beaconComponent = step.beaconComponent,\n tooltipComponent = step.tooltipComponent,\n cleanStep = _objectWithoutProperties(step, [\"beaconComponent\", \"tooltipComponent\"]);\n\n var component;\n\n if (tooltipComponent) {\n var renderProps = _objectSpread2({}, this.getElementsProps(), {\n continuous: continuous,\n index: index,\n isLastStep: isLastStep,\n size: size,\n step: cleanStep\n });\n\n var TooltipComponent = tooltipComponent;\n component = React.createElement(TooltipComponent, renderProps);\n } else {\n component = React.createElement(JoyrideTooltipContainer, _extends({}, this.getElementsProps(), {\n continuous: continuous,\n index: index,\n isLastStep: isLastStep,\n size: size,\n step: step\n }));\n }\n\n return component;\n }\n }]);\n\n return JoyrideTooltip;\n}(React.Component);\n\n_defineProperty(JoyrideTooltip, \"propTypes\", {\n continuous: PropTypes.bool.isRequired,\n helpers: PropTypes.object.isRequired,\n index: PropTypes.number.isRequired,\n isLastStep: PropTypes.bool.isRequired,\n setTooltipRef: PropTypes.func.isRequired,\n size: PropTypes.number.isRequired,\n step: PropTypes.object.isRequired\n});\n\nvar JoyridePortal =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(JoyridePortal, _React$Component);\n\n function JoyridePortal(props) {\n var _this;\n\n _classCallCheck(this, JoyridePortal);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(JoyridePortal).call(this, props));\n if (!canUseDOM) return _possibleConstructorReturn(_this);\n _this.node = document.createElement('div');\n /* istanbul ignore else */\n\n if (props.id) {\n _this.node.id = props.id;\n }\n\n document.body.appendChild(_this.node);\n return _this;\n }\n\n _createClass(JoyridePortal, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (!canUseDOM) return;\n\n if (!isReact16) {\n this.renderReact15();\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n if (!canUseDOM) return;\n\n if (!isReact16) {\n this.renderReact15();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (!canUseDOM || !this.node) return;\n\n if (!isReact16) {\n ReactDOM.unmountComponentAtNode(this.node);\n }\n\n document.body.removeChild(this.node);\n }\n }, {\n key: \"renderReact15\",\n value: function renderReact15() {\n if (!canUseDOM) return null;\n var children = this.props.children;\n ReactDOM.unstable_renderSubtreeIntoContainer(this, children, this.node);\n return null;\n }\n }, {\n key: \"renderReact16\",\n value: function renderReact16() {\n if (!canUseDOM || !isReact16) return null;\n var children = this.props.children;\n return ReactDOM.createPortal(children, this.node);\n }\n }, {\n key: \"render\",\n value: function render() {\n if (!isReact16) {\n return null;\n }\n\n return this.renderReact16();\n }\n }]);\n\n return JoyridePortal;\n}(React.Component);\n\n_defineProperty(JoyridePortal, \"propTypes\", {\n children: PropTypes.element,\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n});\n\nvar JoyrideStep =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(JoyrideStep, _React$Component);\n\n function JoyrideStep() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, JoyrideStep);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(JoyrideStep)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _defineProperty(_assertThisInitialized(_this), \"scope\", {\n removeScope: function removeScope() {}\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleClickHoverBeacon\", function (e) {\n var _this$props = _this.props,\n step = _this$props.step,\n update = _this$props.update;\n\n if (e.type === 'mouseenter' && step.event !== 'hover') {\n return;\n }\n\n update({\n lifecycle: LIFECYCLE.TOOLTIP\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleClickOverlay\", function () {\n var _this$props2 = _this.props,\n helpers = _this$props2.helpers,\n step = _this$props2.step;\n\n if (!step.disableOverlayClose) {\n helpers.close();\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"setTooltipRef\", function (c) {\n _this.tooltip = c;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"setPopper\", function (popper, type) {\n var _this$props3 = _this.props,\n action = _this$props3.action,\n setPopper = _this$props3.setPopper,\n update = _this$props3.update;\n\n if (type === 'wrapper') {\n _this.beaconPopper = popper;\n } else {\n _this.tooltipPopper = popper;\n }\n\n setPopper(popper, type);\n\n if (_this.beaconPopper && _this.tooltipPopper) {\n update({\n action: action === ACTIONS.CLOSE ? ACTIONS.CLOSE : action,\n lifecycle: LIFECYCLE.READY\n });\n }\n });\n\n return _this;\n }\n\n _createClass(JoyrideStep, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this$props4 = this.props,\n debug = _this$props4.debug,\n index = _this$props4.index;\n log({\n title: \"step:\".concat(index),\n data: [{\n key: 'props',\n value: this.props\n }],\n debug: debug\n });\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var _this$props5 = this.props,\n action = _this$props5.action,\n callback = _this$props5.callback,\n continuous = _this$props5.continuous,\n controlled = _this$props5.controlled,\n debug = _this$props5.debug,\n index = _this$props5.index,\n lifecycle = _this$props5.lifecycle,\n size = _this$props5.size,\n status = _this$props5.status,\n step = _this$props5.step,\n update = _this$props5.update;\n\n var _treeChanges = treeChanges(prevProps, this.props),\n changed = _treeChanges.changed,\n changedTo = _treeChanges.changedTo,\n changedFrom = _treeChanges.changedFrom;\n\n var state = {\n action: action,\n controlled: controlled,\n index: index,\n lifecycle: lifecycle,\n size: size,\n status: status\n };\n var skipBeacon = continuous && action !== ACTIONS.CLOSE && (index > 0 || action === ACTIONS.PREV);\n var hasStoreChanged = changed('action') || changed('index') || changed('lifecycle') || changed('status');\n var hasStarted = changedFrom('lifecycle', [LIFECYCLE.TOOLTIP, LIFECYCLE.INIT], LIFECYCLE.INIT);\n var isAfterAction = changedTo('action', [ACTIONS.NEXT, ACTIONS.PREV, ACTIONS.SKIP, ACTIONS.CLOSE]);\n\n if (isAfterAction && (hasStarted || controlled)) {\n callback(_objectSpread2({}, state, {\n index: prevProps.index,\n lifecycle: LIFECYCLE.COMPLETE,\n step: prevProps.step,\n type: EVENTS.STEP_AFTER\n }));\n } // There's a step to use, but there's no target in the DOM\n\n\n if (hasStoreChanged && step) {\n var element = getElement(step.target);\n var hasRenderedTarget = !!element && isElementVisible(element);\n\n if (hasRenderedTarget) {\n if (changedFrom('status', STATUS.READY, STATUS.RUNNING) || changedFrom('lifecycle', LIFECYCLE.INIT, LIFECYCLE.READY)) {\n callback(_objectSpread2({}, state, {\n step: step,\n type: EVENTS.STEP_BEFORE\n }));\n }\n } else {\n console.warn('Target not mounted', step); //eslint-disable-line no-console\n\n callback(_objectSpread2({}, state, {\n type: EVENTS.TARGET_NOT_FOUND,\n step: step\n }));\n\n if (!controlled) {\n update({\n index: index + ([ACTIONS.PREV].includes(action) ? -1 : 1)\n });\n }\n }\n }\n\n if (changedFrom('lifecycle', LIFECYCLE.INIT, LIFECYCLE.READY)) {\n update({\n lifecycle: hideBeacon(step) || skipBeacon ? LIFECYCLE.TOOLTIP : LIFECYCLE.BEACON\n });\n }\n\n if (changed('index')) {\n log({\n title: \"step:\".concat(lifecycle),\n data: [{\n key: 'props',\n value: this.props\n }],\n debug: debug\n });\n }\n /* istanbul ignore else */\n\n\n if (changedTo('lifecycle', LIFECYCLE.BEACON)) {\n callback(_objectSpread2({}, state, {\n step: step,\n type: EVENTS.BEACON\n }));\n }\n\n if (changedTo('lifecycle', LIFECYCLE.TOOLTIP)) {\n callback(_objectSpread2({}, state, {\n step: step,\n type: EVENTS.TOOLTIP\n }));\n this.scope = new Scope(this.tooltip, {\n selector: '[data-action=primary]'\n });\n this.scope.setFocus();\n }\n\n if (changedFrom('lifecycle', [LIFECYCLE.TOOLTIP, LIFECYCLE.INIT], LIFECYCLE.INIT)) {\n this.scope.removeScope();\n delete this.beaconPopper;\n delete this.tooltipPopper;\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.scope.removeScope();\n }\n /**\n * Beacon click/hover event listener\n *\n * @param {Event} e\n */\n\n }, {\n key: \"render\",\n value: function render() {\n var _this$props6 = this.props,\n continuous = _this$props6.continuous,\n debug = _this$props6.debug,\n helpers = _this$props6.helpers,\n index = _this$props6.index,\n lifecycle = _this$props6.lifecycle,\n shouldScroll = _this$props6.shouldScroll,\n size = _this$props6.size,\n step = _this$props6.step;\n var target = getElement(step.target);\n\n if (!validateStep(step) || !is.domElement(target)) {\n return null;\n }\n\n return React.createElement(\"div\", {\n key: \"JoyrideStep-\".concat(index),\n className: \"react-joyride__step\"\n }, React.createElement(JoyridePortal, {\n id: \"react-joyride-portal\"\n }, React.createElement(JoyrideOverlay, _extends({}, step, {\n debug: debug,\n lifecycle: lifecycle,\n onClickOverlay: this.handleClickOverlay\n }))), React.createElement(Floater, _extends({\n component: React.createElement(JoyrideTooltip, {\n continuous: continuous,\n helpers: helpers,\n index: index,\n isLastStep: index + 1 === size,\n setTooltipRef: this.setTooltipRef,\n size: size,\n step: step\n }),\n debug: debug,\n getPopper: this.setPopper,\n id: \"react-joyride-step-\".concat(index),\n isPositioned: step.isFixed || hasPosition(target),\n open: this.open,\n placement: step.placement,\n target: step.target\n }, step.floaterProps), React.createElement(JoyrideBeacon, {\n beaconComponent: step.beaconComponent,\n locale: step.locale,\n onClickOrHover: this.handleClickHoverBeacon,\n shouldFocus: shouldScroll,\n styles: step.styles\n })));\n }\n }, {\n key: \"open\",\n get: function get() {\n var _this$props7 = this.props,\n step = _this$props7.step,\n lifecycle = _this$props7.lifecycle;\n return !!(hideBeacon(step) || lifecycle === LIFECYCLE.TOOLTIP);\n }\n }]);\n\n return JoyrideStep;\n}(React.Component);\n\n_defineProperty(JoyrideStep, \"propTypes\", {\n action: PropTypes.string.isRequired,\n callback: PropTypes.func.isRequired,\n continuous: PropTypes.bool.isRequired,\n controlled: PropTypes.bool.isRequired,\n debug: PropTypes.bool.isRequired,\n helpers: PropTypes.object.isRequired,\n index: PropTypes.number.isRequired,\n lifecycle: PropTypes.string.isRequired,\n setPopper: PropTypes.func.isRequired,\n shouldScroll: PropTypes.bool.isRequired,\n size: PropTypes.number.isRequired,\n status: PropTypes.string.isRequired,\n step: PropTypes.shape({\n beaconComponent: componentTypeWithRefs,\n content: PropTypes.node.isRequired,\n disableBeacon: PropTypes.bool,\n disableOverlay: PropTypes.bool,\n disableOverlayClose: PropTypes.bool,\n disableScrolling: PropTypes.bool,\n disableScrollParentFix: PropTypes.bool,\n event: PropTypes.string,\n floaterProps: PropTypes.shape({\n options: PropTypes.object,\n styles: PropTypes.object,\n wrapperOptions: PropTypes.object\n }),\n hideBackButton: PropTypes.bool,\n hideCloseButton: PropTypes.bool,\n hideFooter: PropTypes.bool,\n isFixed: PropTypes.bool,\n locale: PropTypes.object,\n offset: PropTypes.number.isRequired,\n placement: PropTypes.oneOf(['top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'left', 'left-start', 'left-end', 'right', 'right-start', 'right-end', 'auto', 'center']),\n spotlightClicks: PropTypes.bool,\n spotlightPadding: PropTypes.number,\n styles: PropTypes.object,\n target: PropTypes.oneOfType([PropTypes.object, PropTypes.string]).isRequired,\n title: PropTypes.node,\n tooltipComponent: componentTypeWithRefs\n }).isRequired,\n update: PropTypes.func.isRequired\n});\n\nvar Joyride =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(Joyride, _React$Component);\n\n function Joyride(props) {\n var _this;\n\n _classCallCheck(this, Joyride);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(Joyride).call(this, props));\n\n _defineProperty(_assertThisInitialized(_this), \"initStore\", function () {\n var _this$props = _this.props,\n debug = _this$props.debug,\n getHelpers = _this$props.getHelpers,\n run = _this$props.run,\n stepIndex = _this$props.stepIndex;\n _this.store = new createStore(_objectSpread2({}, _this.props, {\n controlled: run && is.number(stepIndex)\n }));\n _this.helpers = _this.store.getHelpers();\n var addListener = _this.store.addListener;\n log({\n title: 'init',\n data: [{\n key: 'props',\n value: _this.props\n }, {\n key: 'state',\n value: _this.state\n }],\n debug: debug\n }); // Sync the store to this component's state.\n\n addListener(_this.syncState);\n getHelpers(_this.helpers);\n return _this.store.getState();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"callback\", function (data) {\n var callback = _this.props.callback;\n /* istanbul ignore else */\n\n if (is[\"function\"](callback)) {\n callback(data);\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleKeyboard\", function (e) {\n var _this$state = _this.state,\n index = _this$state.index,\n lifecycle = _this$state.lifecycle;\n var steps = _this.props.steps;\n var step = steps[index];\n var intKey = window.Event ? e.which : e.keyCode;\n\n if (lifecycle === LIFECYCLE.TOOLTIP) {\n if (intKey === 27 && step && !step.disableCloseOnEsc) {\n _this.store.close();\n }\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"syncState\", function (state) {\n _this.setState(state);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"setPopper\", function (popper, type) {\n if (type === 'wrapper') {\n _this.beaconPopper = popper;\n } else {\n _this.tooltipPopper = popper;\n }\n });\n\n _this.state = _this.initStore();\n return _this;\n }\n\n _createClass(Joyride, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (!canUseDOM) return;\n var _this$props2 = this.props,\n disableCloseOnEsc = _this$props2.disableCloseOnEsc,\n debug = _this$props2.debug,\n run = _this$props2.run,\n steps = _this$props2.steps;\n var start = this.store.start;\n\n if (validateSteps(steps, debug) && run) {\n start();\n }\n /* istanbul ignore else */\n\n\n if (!disableCloseOnEsc) {\n document.body.addEventListener('keydown', this.handleKeyboard, {\n passive: true\n });\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps, prevState) {\n if (!canUseDOM) return;\n var _this$state2 = this.state,\n action = _this$state2.action,\n controlled = _this$state2.controlled,\n index = _this$state2.index,\n lifecycle = _this$state2.lifecycle,\n status = _this$state2.status;\n var _this$props3 = this.props,\n debug = _this$props3.debug,\n run = _this$props3.run,\n stepIndex = _this$props3.stepIndex,\n steps = _this$props3.steps;\n var prevSteps = prevProps.steps,\n prevStepIndex = prevProps.stepIndex;\n var _this$store = this.store,\n setSteps = _this$store.setSteps,\n reset = _this$store.reset,\n start = _this$store.start,\n stop = _this$store.stop,\n update = _this$store.update;\n\n var _treeChanges = treeChanges(prevProps, this.props),\n changedProps = _treeChanges.changed;\n\n var _treeChanges2 = treeChanges(prevState, this.state),\n changed = _treeChanges2.changed,\n changedFrom = _treeChanges2.changedFrom,\n changedTo = _treeChanges2.changedTo;\n\n var step = getMergedStep(steps[index], this.props);\n var stepsChanged = !isEqual(prevSteps, steps);\n var stepIndexChanged = is.number(stepIndex) && changedProps('stepIndex');\n\n if (stepsChanged) {\n if (validateSteps(steps, debug)) {\n setSteps(steps);\n } else {\n console.warn('Steps are not valid', steps); //eslint-disable-line no-console\n }\n }\n /* istanbul ignore else */\n\n\n if (changedProps('run')) {\n if (run) {\n start(stepIndex);\n } else {\n stop();\n }\n }\n /* istanbul ignore else */\n\n\n if (stepIndexChanged) {\n var nextAction = prevStepIndex < stepIndex ? ACTIONS.NEXT : ACTIONS.PREV;\n\n if (action === ACTIONS.STOP) {\n nextAction = ACTIONS.START;\n }\n\n if (![STATUS.FINISHED, STATUS.SKIPPED].includes(status)) {\n update({\n action: action === ACTIONS.CLOSE ? ACTIONS.CLOSE : nextAction,\n index: stepIndex,\n lifecycle: LIFECYCLE.INIT\n });\n }\n }\n\n var callbackData = _objectSpread2({}, this.state, {\n index: index,\n step: step\n });\n\n var isAfterAction = changedTo('action', [ACTIONS.NEXT, ACTIONS.PREV, ACTIONS.SKIP, ACTIONS.CLOSE]);\n\n if (isAfterAction && changedTo('status', STATUS.PAUSED)) {\n var prevStep = getMergedStep(steps[prevState.index], this.props);\n this.callback(_objectSpread2({}, callbackData, {\n index: prevState.index,\n lifecycle: LIFECYCLE.COMPLETE,\n step: prevStep,\n type: EVENTS.STEP_AFTER\n }));\n }\n\n if (changedTo('status', [STATUS.FINISHED, STATUS.SKIPPED])) {\n var _prevStep = getMergedStep(steps[prevState.index], this.props);\n\n if (!controlled) {\n this.callback(_objectSpread2({}, callbackData, {\n index: prevState.index,\n lifecycle: LIFECYCLE.COMPLETE,\n step: _prevStep,\n type: EVENTS.STEP_AFTER\n }));\n }\n\n this.callback(_objectSpread2({}, callbackData, {\n type: EVENTS.TOUR_END,\n // Return the last step when the tour is finished\n step: _prevStep,\n index: prevState.index\n }));\n reset();\n } else if (changedFrom('status', [STATUS.IDLE, STATUS.READY], STATUS.RUNNING)) {\n this.callback(_objectSpread2({}, callbackData, {\n type: EVENTS.TOUR_START\n }));\n } else if (changed('status')) {\n this.callback(_objectSpread2({}, callbackData, {\n type: EVENTS.TOUR_STATUS\n }));\n } else if (changedTo('action', ACTIONS.RESET)) {\n this.callback(_objectSpread2({}, callbackData, {\n type: EVENTS.TOUR_STATUS\n }));\n }\n\n if (step) {\n this.scrollToStep(prevState);\n\n if (step.placement === 'center' && status === STATUS.RUNNING && lifecycle === LIFECYCLE.INIT) {\n this.store.update({\n lifecycle: LIFECYCLE.READY\n });\n }\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n var disableCloseOnEsc = this.props.disableCloseOnEsc;\n /* istanbul ignore else */\n\n if (!disableCloseOnEsc) {\n document.body.removeEventListener('keydown', this.handleKeyboard);\n }\n }\n }, {\n key: \"scrollToStep\",\n value: function scrollToStep(prevState) {\n var _this$state3 = this.state,\n index = _this$state3.index,\n lifecycle = _this$state3.lifecycle,\n status = _this$state3.status;\n var _this$props4 = this.props,\n debug = _this$props4.debug,\n disableScrolling = _this$props4.disableScrolling,\n disableScrollParentFix = _this$props4.disableScrollParentFix,\n scrollToFirstStep = _this$props4.scrollToFirstStep,\n scrollOffset = _this$props4.scrollOffset,\n steps = _this$props4.steps;\n var step = getMergedStep(steps[index], this.props);\n /* istanbul ignore else */\n\n if (step) {\n var target = getElement(step.target);\n var shouldScroll = !disableScrolling && (index !== 0 || scrollToFirstStep || lifecycle === LIFECYCLE.TOOLTIP) && step.placement !== 'center' && (!step.isFixed || !hasPosition(target)) && // fixed steps don't need to scroll\n prevState.lifecycle !== lifecycle && [LIFECYCLE.BEACON, LIFECYCLE.TOOLTIP].includes(lifecycle);\n\n if (status === STATUS.RUNNING && shouldScroll) {\n var hasCustomScroll = hasCustomScrollParent(target, disableScrollParentFix);\n var scrollParent = getScrollParent(target, disableScrollParentFix);\n var scrollY = Math.floor(getScrollTo(target, scrollOffset, disableScrollParentFix)) || 0;\n log({\n title: 'scrollToStep',\n data: [{\n key: 'index',\n value: index\n }, {\n key: 'lifecycle',\n value: lifecycle\n }, {\n key: 'status',\n value: status\n }],\n debug: debug\n });\n /* istanbul ignore else */\n\n if (lifecycle === LIFECYCLE.BEACON && this.beaconPopper) {\n var _this$beaconPopper = this.beaconPopper,\n placement = _this$beaconPopper.placement,\n popper = _this$beaconPopper.popper;\n /* istanbul ignore else */\n\n if (!['bottom'].includes(placement) && !hasCustomScroll) {\n scrollY = Math.floor(popper.top - scrollOffset);\n }\n } else if (lifecycle === LIFECYCLE.TOOLTIP && this.tooltipPopper) {\n var _this$tooltipPopper = this.tooltipPopper,\n flipped = _this$tooltipPopper.flipped,\n _placement = _this$tooltipPopper.placement,\n _popper = _this$tooltipPopper.popper;\n\n if (['top', 'right', 'left'].includes(_placement) && !flipped && !hasCustomScroll) {\n scrollY = Math.floor(_popper.top - scrollOffset);\n } else {\n scrollY -= step.spotlightPadding;\n }\n }\n\n scrollY = scrollY >= 0 ? scrollY : 0;\n /* istanbul ignore else */\n\n if (status === STATUS.RUNNING) {\n scrollTo(scrollY, scrollParent);\n }\n }\n }\n }\n /**\n * Trigger the callback.\n *\n * @private\n * @param {Object} data\n */\n\n }, {\n key: \"render\",\n value: function render() {\n if (!canUseDOM) return null;\n var _this$state4 = this.state,\n index = _this$state4.index,\n status = _this$state4.status;\n var _this$props5 = this.props,\n continuous = _this$props5.continuous,\n debug = _this$props5.debug,\n disableScrolling = _this$props5.disableScrolling,\n scrollToFirstStep = _this$props5.scrollToFirstStep,\n steps = _this$props5.steps;\n var step = getMergedStep(steps[index], this.props);\n var output;\n\n if (status === STATUS.RUNNING && step) {\n output = React.createElement(JoyrideStep, _extends({}, this.state, {\n callback: this.callback,\n continuous: continuous,\n debug: debug,\n setPopper: this.setPopper,\n helpers: this.helpers,\n shouldScroll: !disableScrolling && (index !== 0 || scrollToFirstStep),\n step: step,\n update: this.store.update\n }));\n }\n\n return React.createElement(\"div\", {\n className: \"react-joyride\"\n }, output);\n }\n }]);\n\n return Joyride;\n}(React.Component);\n\n_defineProperty(Joyride, \"propTypes\", {\n beaconComponent: componentTypeWithRefs,\n callback: PropTypes.func,\n continuous: PropTypes.bool,\n debug: PropTypes.bool,\n disableCloseOnEsc: PropTypes.bool,\n disableOverlay: PropTypes.bool,\n disableOverlayClose: PropTypes.bool,\n disableScrolling: PropTypes.bool,\n disableScrollParentFix: PropTypes.bool,\n floaterProps: PropTypes.shape({\n options: PropTypes.object,\n styles: PropTypes.object,\n wrapperOptions: PropTypes.object\n }),\n getHelpers: PropTypes.func,\n hideBackButton: PropTypes.bool,\n locale: PropTypes.object,\n run: PropTypes.bool,\n scrollOffset: PropTypes.number,\n scrollToFirstStep: PropTypes.bool,\n showProgress: PropTypes.bool,\n showSkipButton: PropTypes.bool,\n spotlightClicks: PropTypes.bool,\n spotlightPadding: PropTypes.number,\n stepIndex: PropTypes.number,\n steps: PropTypes.array,\n styles: PropTypes.object,\n tooltipComponent: componentTypeWithRefs\n});\n\n_defineProperty(Joyride, \"defaultProps\", {\n continuous: false,\n debug: false,\n disableCloseOnEsc: false,\n disableOverlay: false,\n disableOverlayClose: false,\n disableScrolling: false,\n disableScrollParentFix: false,\n getHelpers: function getHelpers() {},\n hideBackButton: false,\n run: true,\n scrollOffset: 20,\n scrollToFirstStep: false,\n showSkipButton: false,\n showProgress: false,\n spotlightClicks: false,\n spotlightPadding: 10,\n steps: []\n});\n\nexport default Joyride;\nexport { ACTIONS, EVENTS, LIFECYCLE, STATUS };",";\n\n(function (root, factory) {\n // eslint-disable-line no-extra-semi\n var deepDiff = factory(root); // eslint-disable-next-line no-undef\n\n if (typeof define === 'function' && define.amd) {\n // AMD\n define('DeepDiff', function () {\n // eslint-disable-line no-undef\n return deepDiff;\n });\n } else if (typeof exports === 'object' || typeof navigator === 'object' && navigator.product.match(/ReactNative/i)) {\n // Node.js or ReactNative\n module.exports = deepDiff;\n } else {\n // Browser globals\n var _deepdiff = root.DeepDiff;\n\n deepDiff.noConflict = function () {\n if (root.DeepDiff === deepDiff) {\n root.DeepDiff = _deepdiff;\n }\n\n return deepDiff;\n };\n\n root.DeepDiff = deepDiff;\n }\n})(this, function (root) {\n var validKinds = ['N', 'E', 'A', 'D']; // nodejs compatible on server side and in the browser.\n\n function inherits(ctor, superCtor) {\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n }\n\n function Diff(kind, path) {\n Object.defineProperty(this, 'kind', {\n value: kind,\n enumerable: true\n });\n\n if (path && path.length) {\n Object.defineProperty(this, 'path', {\n value: path,\n enumerable: true\n });\n }\n }\n\n function DiffEdit(path, origin, value) {\n DiffEdit.super_.call(this, 'E', path);\n Object.defineProperty(this, 'lhs', {\n value: origin,\n enumerable: true\n });\n Object.defineProperty(this, 'rhs', {\n value: value,\n enumerable: true\n });\n }\n\n inherits(DiffEdit, Diff);\n\n function DiffNew(path, value) {\n DiffNew.super_.call(this, 'N', path);\n Object.defineProperty(this, 'rhs', {\n value: value,\n enumerable: true\n });\n }\n\n inherits(DiffNew, Diff);\n\n function DiffDeleted(path, value) {\n DiffDeleted.super_.call(this, 'D', path);\n Object.defineProperty(this, 'lhs', {\n value: value,\n enumerable: true\n });\n }\n\n inherits(DiffDeleted, Diff);\n\n function DiffArray(path, index, item) {\n DiffArray.super_.call(this, 'A', path);\n Object.defineProperty(this, 'index', {\n value: index,\n enumerable: true\n });\n Object.defineProperty(this, 'item', {\n value: item,\n enumerable: true\n });\n }\n\n inherits(DiffArray, Diff);\n\n function arrayRemove(arr, from, to) {\n var rest = arr.slice((to || from) + 1 || arr.length);\n arr.length = from < 0 ? arr.length + from : from;\n arr.push.apply(arr, rest);\n return arr;\n }\n\n function realTypeOf(subject) {\n var type = typeof subject;\n\n if (type !== 'object') {\n return type;\n }\n\n if (subject === Math) {\n return 'math';\n } else if (subject === null) {\n return 'null';\n } else if (Array.isArray(subject)) {\n return 'array';\n } else if (Object.prototype.toString.call(subject) === '[object Date]') {\n return 'date';\n } else if (typeof subject.toString === 'function' && /^\\/.*\\//.test(subject.toString())) {\n return 'regexp';\n }\n\n return 'object';\n } // http://werxltd.com/wp/2010/05/13/javascript-implementation-of-javas-string-hashcode-method/\n\n\n function hashThisString(string) {\n var hash = 0;\n\n if (string.length === 0) {\n return hash;\n }\n\n for (var i = 0; i < string.length; i++) {\n var _char = string.charCodeAt(i);\n\n hash = (hash << 5) - hash + _char;\n hash = hash & hash; // Convert to 32bit integer\n }\n\n return hash;\n } // Gets a hash of the given object in an array order-independent fashion\n // also object key order independent (easier since they can be alphabetized)\n\n\n function getOrderIndependentHash(object) {\n var accum = 0;\n var type = realTypeOf(object);\n\n if (type === 'array') {\n object.forEach(function (item) {\n // Addition is commutative so this is order indep\n accum += getOrderIndependentHash(item);\n });\n var arrayString = '[type: array, hash: ' + accum + ']';\n return accum + hashThisString(arrayString);\n }\n\n if (type === 'object') {\n for (var key in object) {\n if (object.hasOwnProperty(key)) {\n var keyValueString = '[ type: object, key: ' + key + ', value hash: ' + getOrderIndependentHash(object[key]) + ']';\n accum += hashThisString(keyValueString);\n }\n }\n\n return accum;\n } // Non object, non array...should be good?\n\n\n var stringToHash = '[ type: ' + type + ' ; value: ' + object + ']';\n return accum + hashThisString(stringToHash);\n }\n\n function deepDiff(lhs, rhs, changes, prefilter, path, key, stack, orderIndependent) {\n changes = changes || [];\n path = path || [];\n stack = stack || [];\n var currentPath = path.slice(0);\n\n if (typeof key !== 'undefined' && key !== null) {\n if (prefilter) {\n if (typeof prefilter === 'function' && prefilter(currentPath, key)) {\n return;\n } else if (typeof prefilter === 'object') {\n if (prefilter.prefilter && prefilter.prefilter(currentPath, key)) {\n return;\n }\n\n if (prefilter.normalize) {\n var alt = prefilter.normalize(currentPath, key, lhs, rhs);\n\n if (alt) {\n lhs = alt[0];\n rhs = alt[1];\n }\n }\n }\n }\n\n currentPath.push(key);\n } // Use string comparison for regexes\n\n\n if (realTypeOf(lhs) === 'regexp' && realTypeOf(rhs) === 'regexp') {\n lhs = lhs.toString();\n rhs = rhs.toString();\n }\n\n var ltype = typeof lhs;\n var rtype = typeof rhs;\n var i, j, k, other;\n var ldefined = ltype !== 'undefined' || stack && stack.length > 0 && stack[stack.length - 1].lhs && Object.getOwnPropertyDescriptor(stack[stack.length - 1].lhs, key);\n var rdefined = rtype !== 'undefined' || stack && stack.length > 0 && stack[stack.length - 1].rhs && Object.getOwnPropertyDescriptor(stack[stack.length - 1].rhs, key);\n\n if (!ldefined && rdefined) {\n changes.push(new DiffNew(currentPath, rhs));\n } else if (!rdefined && ldefined) {\n changes.push(new DiffDeleted(currentPath, lhs));\n } else if (realTypeOf(lhs) !== realTypeOf(rhs)) {\n changes.push(new DiffEdit(currentPath, lhs, rhs));\n } else if (realTypeOf(lhs) === 'date' && lhs - rhs !== 0) {\n changes.push(new DiffEdit(currentPath, lhs, rhs));\n } else if (ltype === 'object' && lhs !== null && rhs !== null) {\n for (i = stack.length - 1; i > -1; --i) {\n if (stack[i].lhs === lhs) {\n other = true;\n break;\n }\n }\n\n if (!other) {\n stack.push({\n lhs: lhs,\n rhs: rhs\n });\n\n if (Array.isArray(lhs)) {\n // If order doesn't matter, we need to sort our arrays\n if (orderIndependent) {\n lhs.sort(function (a, b) {\n return getOrderIndependentHash(a) - getOrderIndependentHash(b);\n });\n rhs.sort(function (a, b) {\n return getOrderIndependentHash(a) - getOrderIndependentHash(b);\n });\n }\n\n i = rhs.length - 1;\n j = lhs.length - 1;\n\n while (i > j) {\n changes.push(new DiffArray(currentPath, i, new DiffNew(undefined, rhs[i--])));\n }\n\n while (j > i) {\n changes.push(new DiffArray(currentPath, j, new DiffDeleted(undefined, lhs[j--])));\n }\n\n for (; i >= 0; --i) {\n deepDiff(lhs[i], rhs[i], changes, prefilter, currentPath, i, stack, orderIndependent);\n }\n } else {\n var akeys = Object.keys(lhs);\n var pkeys = Object.keys(rhs);\n\n for (i = 0; i < akeys.length; ++i) {\n k = akeys[i];\n other = pkeys.indexOf(k);\n\n if (other >= 0) {\n deepDiff(lhs[k], rhs[k], changes, prefilter, currentPath, k, stack, orderIndependent);\n pkeys[other] = null;\n } else {\n deepDiff(lhs[k], undefined, changes, prefilter, currentPath, k, stack, orderIndependent);\n }\n }\n\n for (i = 0; i < pkeys.length; ++i) {\n k = pkeys[i];\n\n if (k) {\n deepDiff(undefined, rhs[k], changes, prefilter, currentPath, k, stack, orderIndependent);\n }\n }\n }\n\n stack.length = stack.length - 1;\n } else if (lhs !== rhs) {\n // lhs is contains a cycle at this element and it differs from rhs\n changes.push(new DiffEdit(currentPath, lhs, rhs));\n }\n } else if (lhs !== rhs) {\n if (!(ltype === 'number' && isNaN(lhs) && isNaN(rhs))) {\n changes.push(new DiffEdit(currentPath, lhs, rhs));\n }\n }\n }\n\n function observableDiff(lhs, rhs, observer, prefilter, orderIndependent) {\n var changes = [];\n deepDiff(lhs, rhs, changes, prefilter, null, null, null, orderIndependent);\n\n if (observer) {\n for (var i = 0; i < changes.length; ++i) {\n observer(changes[i]);\n }\n }\n\n return changes;\n }\n\n function orderIndependentDeepDiff(lhs, rhs, changes, prefilter, path, key, stack) {\n return deepDiff(lhs, rhs, changes, prefilter, path, key, stack, true);\n }\n\n function accumulateDiff(lhs, rhs, prefilter, accum) {\n var observer = accum ? function (difference) {\n if (difference) {\n accum.push(difference);\n }\n } : undefined;\n var changes = observableDiff(lhs, rhs, observer, prefilter);\n return accum ? accum : changes.length ? changes : undefined;\n }\n\n function accumulateOrderIndependentDiff(lhs, rhs, prefilter, accum) {\n var observer = accum ? function (difference) {\n if (difference) {\n accum.push(difference);\n }\n } : undefined;\n var changes = observableDiff(lhs, rhs, observer, prefilter, true);\n return accum ? accum : changes.length ? changes : undefined;\n }\n\n function applyArrayChange(arr, index, change) {\n if (change.path && change.path.length) {\n var it = arr[index],\n i,\n u = change.path.length - 1;\n\n for (i = 0; i < u; i++) {\n it = it[change.path[i]];\n }\n\n switch (change.kind) {\n case 'A':\n applyArrayChange(it[change.path[i]], change.index, change.item);\n break;\n\n case 'D':\n delete it[change.path[i]];\n break;\n\n case 'E':\n case 'N':\n it[change.path[i]] = change.rhs;\n break;\n }\n } else {\n switch (change.kind) {\n case 'A':\n applyArrayChange(arr[index], change.index, change.item);\n break;\n\n case 'D':\n arr = arrayRemove(arr, index);\n break;\n\n case 'E':\n case 'N':\n arr[index] = change.rhs;\n break;\n }\n }\n\n return arr;\n }\n\n function applyChange(target, source, change) {\n if (typeof change === 'undefined' && source && ~validKinds.indexOf(source.kind)) {\n change = source;\n }\n\n if (target && change && change.kind) {\n var it = target,\n i = -1,\n last = change.path ? change.path.length - 1 : 0;\n\n while (++i < last) {\n if (typeof it[change.path[i]] === 'undefined') {\n it[change.path[i]] = typeof change.path[i + 1] !== 'undefined' && typeof change.path[i + 1] === 'number' ? [] : {};\n }\n\n it = it[change.path[i]];\n }\n\n switch (change.kind) {\n case 'A':\n if (change.path && typeof it[change.path[i]] === 'undefined') {\n it[change.path[i]] = [];\n }\n\n applyArrayChange(change.path ? it[change.path[i]] : it, change.index, change.item);\n break;\n\n case 'D':\n delete it[change.path[i]];\n break;\n\n case 'E':\n case 'N':\n it[change.path[i]] = change.rhs;\n break;\n }\n }\n }\n\n function revertArrayChange(arr, index, change) {\n if (change.path && change.path.length) {\n // the structure of the object at the index has changed...\n var it = arr[index],\n i,\n u = change.path.length - 1;\n\n for (i = 0; i < u; i++) {\n it = it[change.path[i]];\n }\n\n switch (change.kind) {\n case 'A':\n revertArrayChange(it[change.path[i]], change.index, change.item);\n break;\n\n case 'D':\n it[change.path[i]] = change.lhs;\n break;\n\n case 'E':\n it[change.path[i]] = change.lhs;\n break;\n\n case 'N':\n delete it[change.path[i]];\n break;\n }\n } else {\n // the array item is different...\n switch (change.kind) {\n case 'A':\n revertArrayChange(arr[index], change.index, change.item);\n break;\n\n case 'D':\n arr[index] = change.lhs;\n break;\n\n case 'E':\n arr[index] = change.lhs;\n break;\n\n case 'N':\n arr = arrayRemove(arr, index);\n break;\n }\n }\n\n return arr;\n }\n\n function revertChange(target, source, change) {\n if (target && source && change && change.kind) {\n var it = target,\n i,\n u;\n u = change.path.length - 1;\n\n for (i = 0; i < u; i++) {\n if (typeof it[change.path[i]] === 'undefined') {\n it[change.path[i]] = {};\n }\n\n it = it[change.path[i]];\n }\n\n switch (change.kind) {\n case 'A':\n // Array was modified...\n // it will be an array...\n revertArrayChange(it[change.path[i]], change.index, change.item);\n break;\n\n case 'D':\n // Item was deleted...\n it[change.path[i]] = change.lhs;\n break;\n\n case 'E':\n // Item was edited...\n it[change.path[i]] = change.lhs;\n break;\n\n case 'N':\n // Item is new...\n delete it[change.path[i]];\n break;\n }\n }\n }\n\n function applyDiff(target, source, filter) {\n if (target && source) {\n var onChange = function onChange(change) {\n if (!filter || filter(target, source, change)) {\n applyChange(target, source, change);\n }\n };\n\n observableDiff(target, source, onChange);\n }\n }\n\n Object.defineProperties(accumulateDiff, {\n diff: {\n value: accumulateDiff,\n enumerable: true\n },\n orderIndependentDiff: {\n value: accumulateOrderIndependentDiff,\n enumerable: true\n },\n observableDiff: {\n value: observableDiff,\n enumerable: true\n },\n orderIndependentObservableDiff: {\n value: orderIndependentDeepDiff,\n enumerable: true\n },\n orderIndepHash: {\n value: getOrderIndependentHash,\n enumerable: true\n },\n applyDiff: {\n value: applyDiff,\n enumerable: true\n },\n applyChange: {\n value: applyChange,\n enumerable: true\n },\n revertChange: {\n value: revertChange,\n enumerable: true\n },\n isConflict: {\n value: function value() {\n return typeof $conflict !== 'undefined';\n },\n enumerable: true\n }\n }); // hackish...\n\n accumulateDiff.DeepDiff = accumulateDiff; // ...but works with:\n // import DeepDiff from 'deep-diff'\n // import { DeepDiff } from 'deep-diff'\n // const DeepDiff = require('deep-diff');\n // const { DeepDiff } = require('deep-diff');\n\n if (root) {\n root.DeepDiff = accumulateDiff;\n }\n\n return accumulateDiff;\n});","var E_NOSCROLL = new Error('Element already at target scroll position');\nvar E_CANCELLED = new Error('Scroll cancelled');\nvar min = Math.min;\nvar ms = Date.now;\nmodule.exports = {\n left: make('scrollLeft'),\n top: make('scrollTop')\n};\n\nfunction make(prop) {\n return function scroll(el, to, opts, cb) {\n opts = opts || {};\n if (typeof opts == 'function') cb = opts, opts = {};\n if (typeof cb != 'function') cb = noop;\n var start = ms();\n var from = el[prop];\n var ease = opts.ease || inOutSine;\n var duration = !isNaN(opts.duration) ? +opts.duration : 350;\n var cancelled = false;\n return from === to ? cb(E_NOSCROLL, el[prop]) : requestAnimationFrame(animate), cancel;\n\n function cancel() {\n cancelled = true;\n }\n\n function animate(timestamp) {\n if (cancelled) return cb(E_CANCELLED, el[prop]);\n var now = ms();\n var time = min(1, (now - start) / duration);\n var eased = ease(time);\n el[prop] = eased * (to - from) + from;\n time < 1 ? requestAnimationFrame(animate) : requestAnimationFrame(function () {\n cb(null, el[prop]);\n });\n }\n };\n}\n\nfunction inOutSine(n) {\n return 0.5 * (1 - Math.cos(Math.PI * n));\n}\n\nfunction noop() {}","import React from 'react';\nimport PropTypes from 'prop-types';\nimport isRequiredIf from 'react-proptype-conditional-require';\nimport Popper from 'popper.js';\nimport deepmerge from 'deepmerge';\nimport is from 'is-lite';\nimport treeChanges from 'tree-changes';\nimport ReactDOM from 'react-dom';\nimport ExecutionEnvironment from 'exenv';\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _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\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _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\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n keys.push.apply(keys, Object.getOwnPropertySymbols(object));\n }\n\n if (enumerableOnly) keys = keys.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(source, true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(source).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\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\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\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\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\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\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\n return self;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nvar DEFAULTS = {\n flip: {\n padding: 20\n },\n preventOverflow: {\n padding: 10\n }\n};\nvar STATUS = {\n INIT: 'init',\n IDLE: 'idle',\n OPENING: 'opening',\n OPEN: 'open',\n CLOSING: 'closing',\n ERROR: 'error'\n};\nvar canUseDOM = ExecutionEnvironment.canUseDOM;\nvar isReact16 = ReactDOM.createPortal !== undefined;\n\nfunction isMobile() {\n return 'ontouchstart' in window && /Mobi/.test(navigator.userAgent);\n}\n/**\n* Log method calls if debug is enabled\n*\n* @private\n* @param {Object} arg\n* @param {string} arg.title - The title the logger was called from\n* @param {Object|Array} [arg.data] - The data to be logged\n* @param {boolean} [arg.warn] - If true, the message will be a warning\n* @param {boolean} [arg.debug] - Nothing will be logged unless debug is true\n*/\n\n\nfunction log(_ref) {\n var title = _ref.title,\n data = _ref.data,\n _ref$warn = _ref.warn,\n warn = _ref$warn === void 0 ? false : _ref$warn,\n _ref$debug = _ref.debug,\n debug = _ref$debug === void 0 ? false : _ref$debug;\n /* eslint-disable no-console */\n\n var logFn = warn ? console.warn || console.error : console.log;\n\n if (debug && title && data) {\n console.groupCollapsed(\"%creact-floater: \".concat(title), 'color: #9b00ff; font-weight: bold; font-size: 12px;');\n\n if (Array.isArray(data)) {\n data.forEach(function (d) {\n if (is.plainObject(d) && d.key) {\n logFn.apply(console, [d.key, d.value]);\n } else {\n logFn.apply(console, [d]);\n }\n });\n } else {\n logFn.apply(console, [data]);\n }\n\n console.groupEnd();\n }\n /* eslint-enable */\n\n}\n\nfunction on(element, event, cb) {\n var capture = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n element.addEventListener(event, cb, capture);\n}\n\nfunction off(element, event, cb) {\n var capture = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n element.removeEventListener(event, cb, capture);\n}\n\nfunction once(element, event, cb) {\n var capture = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n var _nextCB; // eslint-disable-next-line prefer-const\n\n\n _nextCB = function nextCB(e) {\n cb(e);\n off(element, event, _nextCB);\n };\n\n on(element, event, _nextCB, capture);\n}\n\nfunction noop() {}\n\nvar ReactFloaterPortal =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(ReactFloaterPortal, _React$Component);\n\n function ReactFloaterPortal(props) {\n var _this;\n\n _classCallCheck(this, ReactFloaterPortal);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(ReactFloaterPortal).call(this, props));\n if (!canUseDOM) return _possibleConstructorReturn(_this);\n _this.node = document.createElement('div');\n\n if (props.id) {\n _this.node.id = props.id;\n }\n\n if (props.zIndex) {\n _this.node.style.zIndex = props.zIndex;\n }\n\n document.body.appendChild(_this.node);\n return _this;\n }\n\n _createClass(ReactFloaterPortal, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (!canUseDOM) return;\n\n if (!isReact16) {\n this.renderPortal();\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n if (!canUseDOM) return;\n\n if (!isReact16) {\n this.renderPortal();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (!canUseDOM || !this.node) return;\n\n if (!isReact16) {\n ReactDOM.unmountComponentAtNode(this.node);\n }\n\n document.body.removeChild(this.node);\n }\n }, {\n key: \"renderPortal\",\n value: function renderPortal() {\n if (!canUseDOM) return null;\n var _this$props = this.props,\n children = _this$props.children,\n setRef = _this$props.setRef;\n /* istanbul ignore else */\n\n if (isReact16) {\n return ReactDOM.createPortal(children, this.node);\n }\n\n var portal = ReactDOM.unstable_renderSubtreeIntoContainer(this, children.length > 1 ? React.createElement(\"div\", null, children) : children[0], this.node);\n setRef(portal);\n return null;\n }\n }, {\n key: \"renderReact16\",\n value: function renderReact16() {\n var _this$props2 = this.props,\n hasChildren = _this$props2.hasChildren,\n placement = _this$props2.placement,\n target = _this$props2.target;\n\n if (!hasChildren) {\n if (target || placement === 'center') {\n return this.renderPortal();\n }\n\n return null;\n }\n\n return this.renderPortal();\n }\n }, {\n key: \"render\",\n value: function render() {\n if (!isReact16) {\n return null;\n }\n\n return this.renderReact16();\n }\n }]);\n\n return ReactFloaterPortal;\n}(React.Component);\n\n_defineProperty(ReactFloaterPortal, \"propTypes\", {\n children: PropTypes.oneOfType([PropTypes.element, PropTypes.array]),\n hasChildren: PropTypes.bool,\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n placement: PropTypes.string,\n setRef: PropTypes.func.isRequired,\n target: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),\n zIndex: PropTypes.number\n});\n\nvar FloaterArrow =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(FloaterArrow, _React$Component);\n\n function FloaterArrow() {\n _classCallCheck(this, FloaterArrow);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(FloaterArrow).apply(this, arguments));\n }\n\n _createClass(FloaterArrow, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n placement = _this$props.placement,\n setArrowRef = _this$props.setArrowRef,\n styles = _this$props.styles;\n var _styles$arrow = styles.arrow,\n color = _styles$arrow.color,\n display = _styles$arrow.display,\n length = _styles$arrow.length,\n margin = _styles$arrow.margin,\n position = _styles$arrow.position,\n spread = _styles$arrow.spread;\n var arrowStyles = {\n display: display,\n position: position\n };\n var points;\n var x = spread;\n var y = length;\n /* istanbul ignore else */\n\n if (placement.startsWith('top')) {\n points = \"0,0 \".concat(x / 2, \",\").concat(y, \" \").concat(x, \",0\");\n arrowStyles.bottom = 0;\n arrowStyles.marginLeft = margin;\n arrowStyles.marginRight = margin;\n } else if (placement.startsWith('bottom')) {\n points = \"\".concat(x, \",\").concat(y, \" \").concat(x / 2, \",0 0,\").concat(y);\n arrowStyles.top = 0;\n arrowStyles.marginLeft = margin;\n arrowStyles.marginRight = margin;\n } else if (placement.startsWith('left')) {\n y = spread;\n x = length;\n points = \"0,0 \".concat(x, \",\").concat(y / 2, \" 0,\").concat(y);\n arrowStyles.right = 0;\n arrowStyles.marginTop = margin;\n arrowStyles.marginBottom = margin;\n } else if (placement.startsWith('right')) {\n y = spread;\n x = length;\n points = \"\".concat(x, \",\").concat(y, \" \").concat(x, \",0 0,\").concat(y / 2);\n arrowStyles.left = 0;\n arrowStyles.marginTop = margin;\n arrowStyles.marginBottom = margin;\n }\n\n return React.createElement(\"div\", {\n className: \"__floater__arrow\",\n style: this.parentStyle\n }, React.createElement(\"span\", {\n ref: setArrowRef,\n style: arrowStyles\n }, React.createElement(\"svg\", {\n width: x,\n height: y,\n version: \"1.1\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, React.createElement(\"polygon\", {\n points: points,\n fill: color\n }))));\n }\n }, {\n key: \"parentStyle\",\n get: function get() {\n var _this$props2 = this.props,\n placement = _this$props2.placement,\n styles = _this$props2.styles;\n var length = styles.arrow.length;\n var arrow = {\n position: 'absolute'\n };\n /* istanbul ignore else */\n\n if (placement.startsWith('top')) {\n arrow.bottom = 0;\n arrow.left = 0;\n arrow.right = 0;\n arrow.height = length;\n } else if (placement.startsWith('bottom')) {\n arrow.left = 0;\n arrow.right = 0;\n arrow.top = 0;\n arrow.height = length;\n } else if (placement.startsWith('left')) {\n arrow.right = 0;\n arrow.top = 0;\n arrow.bottom = 0;\n } else if (placement.startsWith('right')) {\n arrow.left = 0;\n arrow.top = 0;\n }\n\n return arrow;\n }\n }]);\n\n return FloaterArrow;\n}(React.Component);\n\n_defineProperty(FloaterArrow, \"propTypes\", {\n placement: PropTypes.string.isRequired,\n setArrowRef: PropTypes.func.isRequired,\n styles: PropTypes.object.isRequired\n});\n\nvar FloaterCloseBtn = function FloaterCloseBtn(_ref) {\n var handleClick = _ref.handleClick,\n styles = _ref.styles;\n\n var color = styles.color,\n height = styles.height,\n width = styles.width,\n style = _objectWithoutProperties(styles, [\"color\", \"height\", \"width\"]);\n\n return React.createElement(\"button\", {\n \"aria-label\": \"close\",\n onClick: handleClick,\n style: style,\n type: \"button\"\n }, React.createElement(\"svg\", {\n width: \"\".concat(width, \"px\"),\n height: \"\".concat(height, \"px\"),\n viewBox: \"0 0 18 18\",\n version: \"1.1\",\n xmlns: \"http://www.w3.org/2000/svg\",\n preserveAspectRatio: \"xMidYMid\"\n }, React.createElement(\"g\", null, React.createElement(\"path\", {\n d: \"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z\",\n fill: color\n }))));\n};\n\nFloaterCloseBtn.propTypes = {\n handleClick: PropTypes.func.isRequired,\n styles: PropTypes.object.isRequired\n};\n\nvar FloaterContainer = function FloaterContainer(_ref) {\n var content = _ref.content,\n footer = _ref.footer,\n handleClick = _ref.handleClick,\n open = _ref.open,\n positionWrapper = _ref.positionWrapper,\n showCloseButton = _ref.showCloseButton,\n title = _ref.title,\n styles = _ref.styles;\n var output = {\n content: React.isValidElement(content) ? content : React.createElement(\"div\", {\n className: \"__floater__content\",\n style: styles.content\n }, content)\n };\n\n if (title) {\n output.title = React.isValidElement(title) ? title : React.createElement(\"div\", {\n className: \"__floater__title\",\n style: styles.title\n }, title);\n }\n\n if (footer) {\n output.footer = React.isValidElement(footer) ? footer : React.createElement(\"div\", {\n className: \"__floater__footer\",\n style: styles.footer\n }, footer);\n }\n\n if ((showCloseButton || positionWrapper) && !is[\"boolean\"](open)) {\n output.close = React.createElement(FloaterCloseBtn, {\n styles: styles.close,\n handleClick: handleClick\n });\n }\n\n return React.createElement(\"div\", {\n className: \"__floater__container\",\n style: styles.container\n }, output.close, output.title, output.content, output.footer);\n};\n\nFloaterContainer.propTypes = {\n content: PropTypes.node.isRequired,\n footer: PropTypes.node,\n handleClick: PropTypes.func.isRequired,\n open: PropTypes.bool,\n positionWrapper: PropTypes.bool.isRequired,\n showCloseButton: PropTypes.bool.isRequired,\n styles: PropTypes.object.isRequired,\n title: PropTypes.node\n};\n\nvar Floater =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(Floater, _React$Component);\n\n function Floater() {\n _classCallCheck(this, Floater);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(Floater).apply(this, arguments));\n }\n\n _createClass(Floater, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n component = _this$props.component,\n closeFn = _this$props.handleClick,\n hideArrow = _this$props.hideArrow,\n setFloaterRef = _this$props.setFloaterRef,\n status = _this$props.status;\n var output = {};\n var classes = ['__floater'];\n\n if (component) {\n if (React.isValidElement(component)) {\n output.content = React.cloneElement(component, {\n closeFn: closeFn\n });\n } else {\n output.content = component({\n closeFn: closeFn\n });\n }\n } else {\n output.content = React.createElement(FloaterContainer, this.props);\n }\n\n if (status === STATUS.OPEN) {\n classes.push('__floater__open');\n }\n\n if (!hideArrow) {\n output.arrow = React.createElement(FloaterArrow, this.props);\n }\n\n return React.createElement(\"div\", {\n ref: setFloaterRef,\n className: classes.join(' '),\n style: this.style\n }, React.createElement(\"div\", {\n className: \"__floater__body\"\n }, output.content, output.arrow));\n }\n }, {\n key: \"style\",\n get: function get() {\n var _this$props2 = this.props,\n disableAnimation = _this$props2.disableAnimation,\n component = _this$props2.component,\n placement = _this$props2.placement,\n hideArrow = _this$props2.hideArrow,\n isPositioned = _this$props2.isPositioned,\n status = _this$props2.status,\n styles = _this$props2.styles;\n var length = styles.arrow.length,\n floater = styles.floater,\n floaterCentered = styles.floaterCentered,\n floaterClosing = styles.floaterClosing,\n floaterOpening = styles.floaterOpening,\n floaterWithAnimation = styles.floaterWithAnimation,\n floaterWithComponent = styles.floaterWithComponent;\n var element = {};\n\n if (!hideArrow) {\n if (placement.startsWith('top')) {\n element.padding = \"0 0 \".concat(length, \"px\");\n } else if (placement.startsWith('bottom')) {\n element.padding = \"\".concat(length, \"px 0 0\");\n } else if (placement.startsWith('left')) {\n element.padding = \"0 \".concat(length, \"px 0 0\");\n } else if (placement.startsWith('right')) {\n element.padding = \"0 0 0 \".concat(length, \"px\");\n }\n }\n\n if ([STATUS.OPENING, STATUS.OPEN].includes(status)) {\n element = _objectSpread2({}, element, {}, floaterOpening);\n }\n\n if (status === STATUS.CLOSING) {\n element = _objectSpread2({}, element, {}, floaterClosing);\n }\n\n if (status === STATUS.OPEN && !disableAnimation && !isPositioned) {\n element = _objectSpread2({}, element, {}, floaterWithAnimation);\n }\n\n if (placement === 'center') {\n element = _objectSpread2({}, element, {}, floaterCentered);\n }\n\n if (component) {\n element = _objectSpread2({}, element, {}, floaterWithComponent);\n }\n\n return _objectSpread2({}, floater, {}, element);\n }\n }]);\n\n return Floater;\n}(React.Component);\n\n_defineProperty(Floater, \"propTypes\", {\n component: PropTypes.oneOfType([PropTypes.func, PropTypes.element]),\n content: PropTypes.node,\n disableAnimation: PropTypes.bool.isRequired,\n footer: PropTypes.node,\n handleClick: PropTypes.func.isRequired,\n hideArrow: PropTypes.bool.isRequired,\n isPositioned: PropTypes.bool,\n open: PropTypes.bool,\n placement: PropTypes.string.isRequired,\n positionWrapper: PropTypes.bool.isRequired,\n setArrowRef: PropTypes.func.isRequired,\n setFloaterRef: PropTypes.func.isRequired,\n showCloseButton: PropTypes.bool,\n status: PropTypes.string.isRequired,\n styles: PropTypes.object.isRequired,\n title: PropTypes.node\n});\n\nvar ReactFloaterWrapper =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(ReactFloaterWrapper, _React$Component);\n\n function ReactFloaterWrapper() {\n _classCallCheck(this, ReactFloaterWrapper);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(ReactFloaterWrapper).apply(this, arguments));\n }\n\n _createClass(ReactFloaterWrapper, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n children = _this$props.children,\n handleClick = _this$props.handleClick,\n handleMouseEnter = _this$props.handleMouseEnter,\n handleMouseLeave = _this$props.handleMouseLeave,\n setChildRef = _this$props.setChildRef,\n setWrapperRef = _this$props.setWrapperRef,\n style = _this$props.style,\n styles = _this$props.styles;\n var element;\n /* istanbul ignore else */\n\n if (children) {\n if (React.Children.count(children) === 1) {\n if (!React.isValidElement(children)) {\n element = React.createElement(\"span\", null, children);\n } else {\n var refProp = is[\"function\"](children.type) ? 'innerRef' : 'ref';\n element = React.cloneElement(React.Children.only(children), _defineProperty({}, refProp, setChildRef));\n }\n } else {\n element = children;\n }\n }\n\n if (!element) {\n return null;\n }\n\n return React.createElement(\"span\", {\n ref: setWrapperRef,\n style: _objectSpread2({}, styles, {}, style),\n onClick: handleClick,\n onMouseEnter: handleMouseEnter,\n onMouseLeave: handleMouseLeave\n }, element);\n }\n }]);\n\n return ReactFloaterWrapper;\n}(React.Component);\n\n_defineProperty(ReactFloaterWrapper, \"propTypes\", {\n children: PropTypes.node,\n handleClick: PropTypes.func.isRequired,\n handleMouseEnter: PropTypes.func.isRequired,\n handleMouseLeave: PropTypes.func.isRequired,\n setChildRef: PropTypes.func.isRequired,\n setWrapperRef: PropTypes.func.isRequired,\n style: PropTypes.object,\n styles: PropTypes.object.isRequired\n});\n\nvar defaultOptions = {\n zIndex: 100\n};\n\nfunction getStyles(styles) {\n var options = deepmerge(defaultOptions, styles.options || {});\n return {\n wrapper: {\n cursor: 'help',\n display: 'inline-flex',\n flexDirection: 'column',\n zIndex: options.zIndex\n },\n wrapperPosition: {\n left: -1000,\n position: 'absolute',\n top: -1000,\n visibility: 'hidden'\n },\n floater: {\n display: 'inline-block',\n filter: 'drop-shadow(0 0 3px rgba(0, 0, 0, 0.3))',\n maxWidth: 300,\n opacity: 0,\n position: 'relative',\n transition: 'opacity 0.3s',\n visibility: 'hidden',\n zIndex: options.zIndex\n },\n floaterOpening: {\n opacity: 1,\n visibility: 'visible'\n },\n floaterWithAnimation: {\n opacity: 1,\n transition: 'opacity 0.3s, transform 0.2s',\n visibility: 'visible'\n },\n floaterWithComponent: {\n maxWidth: '100%'\n },\n floaterClosing: {\n opacity: 0,\n visibility: 'visible'\n },\n floaterCentered: {\n left: '50%',\n position: 'fixed',\n top: '50%',\n transform: 'translate(-50%, -50%)'\n },\n container: {\n backgroundColor: '#fff',\n color: '#666',\n minHeight: 60,\n minWidth: 200,\n padding: 20,\n position: 'relative'\n },\n title: {\n borderBottom: '1px solid #555',\n color: '#555',\n fontSize: 18,\n marginBottom: 5,\n paddingBottom: 6,\n paddingRight: 18\n },\n content: {\n fontSize: 15\n },\n close: {\n backgroundColor: 'transparent',\n border: 0,\n borderRadius: 0,\n color: '#555',\n fontSize: 0,\n height: 15,\n outline: 'none',\n padding: 10,\n position: 'absolute',\n right: 0,\n top: 0,\n width: 15,\n WebkitAppearance: 'none'\n },\n footer: {\n borderTop: '1px solid #ccc',\n fontSize: 13,\n marginTop: 10,\n paddingTop: 5\n },\n arrow: {\n color: '#fff',\n display: 'inline-flex',\n length: 16,\n margin: 8,\n position: 'absolute',\n spread: 32\n },\n options: options\n };\n}\n\nvar POSITIONING_PROPS = ['position', 'top', 'right', 'bottom', 'left'];\n\nvar ReactFloater =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(ReactFloater, _React$Component);\n\n function ReactFloater(props) {\n var _this;\n\n _classCallCheck(this, ReactFloater);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(ReactFloater).call(this, props));\n /* istanbul ignore else */\n\n _defineProperty(_assertThisInitialized(_this), \"setArrowRef\", function (ref) {\n _this.arrowRef = ref;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"setChildRef\", function (ref) {\n _this.childRef = ref;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"setFloaterRef\", function (ref) {\n if (!_this.floaterRef) {\n _this.floaterRef = ref;\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"setWrapperRef\", function (ref) {\n _this.wrapperRef = ref;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleTransitionEnd\", function () {\n var status = _this.state.status;\n var callback = _this.props.callback;\n /* istanbul ignore else */\n\n if (_this.wrapperPopper) {\n _this.wrapperPopper.instance.update();\n }\n\n _this.setState({\n status: status === STATUS.OPENING ? STATUS.OPEN : STATUS.IDLE\n }, function () {\n var newStatus = _this.state.status;\n callback(newStatus === STATUS.OPEN ? 'open' : 'close', _this.props);\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleClick\", function () {\n var _this$props = _this.props,\n event = _this$props.event,\n open = _this$props.open;\n if (is[\"boolean\"](open)) return;\n var _this$state = _this.state,\n positionWrapper = _this$state.positionWrapper,\n status = _this$state.status;\n /* istanbul ignore else */\n\n if (_this.event === 'click' || _this.event === 'hover' && positionWrapper) {\n log({\n title: 'click',\n data: [{\n event: event,\n status: status === STATUS.OPEN ? 'closing' : 'opening'\n }],\n debug: _this.debug\n });\n\n _this.toggle();\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleMouseEnter\", function () {\n var _this$props2 = _this.props,\n event = _this$props2.event,\n open = _this$props2.open;\n if (is[\"boolean\"](open) || isMobile()) return;\n var status = _this.state.status;\n /* istanbul ignore else */\n\n if (_this.event === 'hover' && status === STATUS.IDLE) {\n log({\n title: 'mouseEnter',\n data: [{\n key: 'originalEvent',\n value: event\n }],\n debug: _this.debug\n });\n clearTimeout(_this.eventDelayTimeout);\n\n _this.toggle();\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleMouseLeave\", function () {\n var _this$props3 = _this.props,\n event = _this$props3.event,\n eventDelay = _this$props3.eventDelay,\n open = _this$props3.open;\n if (is[\"boolean\"](open) || isMobile()) return;\n var _this$state2 = _this.state,\n status = _this$state2.status,\n positionWrapper = _this$state2.positionWrapper;\n /* istanbul ignore else */\n\n if (_this.event === 'hover') {\n log({\n title: 'mouseLeave',\n data: [{\n key: 'originalEvent',\n value: event\n }],\n debug: _this.debug\n });\n\n if (!eventDelay) {\n _this.toggle(STATUS.IDLE);\n } else if ([STATUS.OPENING, STATUS.OPEN].includes(status) && !positionWrapper && !_this.eventDelayTimeout) {\n _this.eventDelayTimeout = setTimeout(function () {\n delete _this.eventDelayTimeout;\n\n _this.toggle();\n }, eventDelay * 1000);\n }\n }\n });\n\n if (process.env.NODE_ENV !== 'production') {\n var _this$props4 = _this.props,\n children = _this$props4.children,\n open = _this$props4.open,\n target = _this$props4.target,\n wrapperOptions = _this$props4.wrapperOptions;\n\n if (wrapperOptions.position && !target) {\n console.warn('Missing props! You need to set a `target` to use `wrapperOptions.position`'); //eslint-disable-line no-console\n }\n\n if (!children && !is[\"boolean\"](open)) {\n console.warn('Missing props! You need to set `children`.'); //eslint-disable-line no-console\n }\n }\n\n _this.state = {\n currentPlacement: props.placement,\n positionWrapper: props.wrapperOptions.position && !!props.target,\n status: STATUS.INIT,\n statusWrapper: STATUS.INIT\n };\n _this._isMounted = false;\n\n if (canUseDOM) {\n window.addEventListener('load', function () {\n if (_this.popper) {\n _this.popper.instance.update();\n }\n\n if (_this.wrapperPopper) {\n _this.wrapperPopper.instance.update();\n }\n });\n }\n\n return _this;\n }\n\n _createClass(ReactFloater, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (!canUseDOM) return;\n var positionWrapper = this.state.positionWrapper;\n var _this$props5 = this.props,\n children = _this$props5.children,\n open = _this$props5.open,\n target = _this$props5.target;\n this._isMounted = true;\n log({\n title: 'init',\n data: {\n hasChildren: !!children,\n hasTarget: !!target,\n isControlled: is[\"boolean\"](open),\n positionWrapper: positionWrapper,\n target: this.target,\n floater: this.floaterRef\n },\n debug: this.debug\n });\n this.initPopper();\n if (!children && target && !is[\"boolean\"](open)) ;\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps, prevState) {\n if (!canUseDOM) return;\n var _this$props6 = this.props,\n autoOpen = _this$props6.autoOpen,\n open = _this$props6.open,\n target = _this$props6.target,\n wrapperOptions = _this$props6.wrapperOptions;\n\n var _treeChanges = treeChanges(prevState, this.state),\n changedFrom = _treeChanges.changedFrom,\n changedTo = _treeChanges.changedTo;\n\n if (prevProps.open !== open) {\n var forceStatus; // always follow `open` in controlled mode\n\n if (is[\"boolean\"](open)) {\n forceStatus = open ? STATUS.OPENING : STATUS.CLOSING;\n }\n\n this.toggle(forceStatus);\n }\n\n if (prevProps.wrapperOptions.position !== wrapperOptions.position || prevProps.target !== target) {\n this.changeWrapperPosition(this.props);\n }\n\n if (changedTo('status', STATUS.IDLE) && open) {\n this.toggle(STATUS.OPEN);\n } else if (changedFrom('status', STATUS.INIT, STATUS.IDLE) && autoOpen) {\n this.toggle(STATUS.OPEN);\n }\n\n if (this.popper && changedTo('status', STATUS.OPENING)) {\n this.popper.instance.update();\n }\n\n if (this.floaterRef && (changedTo('status', STATUS.OPENING) || changedTo('status', STATUS.CLOSING))) {\n once(this.floaterRef, 'transitionend', this.handleTransitionEnd);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (!canUseDOM) return;\n this._isMounted = false;\n\n if (this.popper) {\n this.popper.instance.destroy();\n }\n\n if (this.wrapperPopper) {\n this.wrapperPopper.instance.destroy();\n }\n }\n }, {\n key: \"initPopper\",\n value: function initPopper() {\n var _this2 = this;\n\n var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.target;\n var positionWrapper = this.state.positionWrapper;\n var _this$props7 = this.props,\n disableFlip = _this$props7.disableFlip,\n getPopper = _this$props7.getPopper,\n hideArrow = _this$props7.hideArrow,\n offset = _this$props7.offset,\n placement = _this$props7.placement,\n wrapperOptions = _this$props7.wrapperOptions;\n var flipBehavior = placement === 'top' || placement === 'bottom' ? 'flip' : ['right', 'bottom-end', 'top-end', 'left', 'top-start', 'bottom-start'];\n /* istanbul ignore else */\n\n if (placement === 'center') {\n this.setState({\n status: STATUS.IDLE\n });\n } else if (target && this.floaterRef) {\n new Popper(target, this.floaterRef, {\n placement: placement,\n modifiers: {\n arrow: _objectSpread2({\n enabled: !hideArrow,\n element: this.arrowRef\n }, this.options.arrow),\n computeStyle: this.options.computeStyle,\n flip: _objectSpread2({\n enabled: !disableFlip,\n behavior: flipBehavior\n }, this.options.flip),\n keepTogether: this.options.keepTogether,\n hide: this.options.hide,\n inner: this.options.inner,\n offset: _objectSpread2({\n offset: \"0, \".concat(offset, \"px\")\n }, this.options.offset),\n preventOverflow: this.options.preventOverflow,\n shift: this.options.shift\n },\n onCreate: function onCreate(data) {\n _this2.popper = data;\n getPopper(data, 'floater');\n\n if (_this2._isMounted) {\n _this2.setState({\n currentPlacement: data.placement,\n status: STATUS.IDLE\n });\n }\n\n if (placement !== data.placement) {\n setTimeout(function () {\n data.instance.update();\n }, 1);\n }\n },\n onUpdate: function onUpdate(data) {\n _this2.popper = data;\n var currentPlacement = _this2.state.currentPlacement;\n\n if (_this2._isMounted && data.placement !== currentPlacement) {\n _this2.setState({\n currentPlacement: data.placement\n });\n }\n }\n });\n }\n\n if (positionWrapper) {\n var wrapperOffset = !is.undefined(wrapperOptions.offset) ? wrapperOptions.offset : 0;\n new Popper(this.target, this.wrapperRef, {\n placement: wrapperOptions.placement || placement,\n modifiers: {\n arrow: {\n enabled: false\n },\n offset: {\n offset: \"0, \".concat(wrapperOffset, \"px\")\n },\n flip: {\n enabled: false\n }\n },\n onCreate: function onCreate(data) {\n _this2.wrapperPopper = data;\n\n if (_this2._isMounted) {\n _this2.setState({\n statusWrapper: STATUS.IDLE\n });\n }\n\n getPopper(data, 'wrapper');\n\n if (placement !== data.placement) {\n setTimeout(function () {\n data.instance.update();\n }, 1);\n }\n }\n });\n }\n }\n }, {\n key: \"changeWrapperPosition\",\n value: function changeWrapperPosition(_ref) {\n var target = _ref.target,\n wrapperOptions = _ref.wrapperOptions;\n this.setState({\n positionWrapper: wrapperOptions.position && !!target\n });\n }\n }, {\n key: \"toggle\",\n value: function toggle(forceStatus) {\n var status = this.state.status;\n var nextStatus = status === STATUS.OPEN ? STATUS.CLOSING : STATUS.OPENING;\n\n if (!is.undefined(forceStatus)) {\n nextStatus = forceStatus;\n }\n\n this.setState({\n status: nextStatus\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$state3 = this.state,\n currentPlacement = _this$state3.currentPlacement,\n positionWrapper = _this$state3.positionWrapper,\n status = _this$state3.status;\n var _this$props8 = this.props,\n children = _this$props8.children,\n component = _this$props8.component,\n content = _this$props8.content,\n disableAnimation = _this$props8.disableAnimation,\n footer = _this$props8.footer,\n hideArrow = _this$props8.hideArrow,\n id = _this$props8.id,\n isPositioned = _this$props8.isPositioned,\n open = _this$props8.open,\n showCloseButton = _this$props8.showCloseButton,\n style = _this$props8.style,\n target = _this$props8.target,\n title = _this$props8.title;\n var wrapper = React.createElement(ReactFloaterWrapper, {\n handleClick: this.handleClick,\n handleMouseEnter: this.handleMouseEnter,\n handleMouseLeave: this.handleMouseLeave,\n setChildRef: this.setChildRef,\n setWrapperRef: this.setWrapperRef,\n style: style,\n styles: this.styles.wrapper\n }, children);\n var output = {};\n\n if (positionWrapper) {\n output.wrapperInPortal = wrapper;\n } else {\n output.wrapperAsChildren = wrapper;\n }\n\n return React.createElement(\"span\", null, React.createElement(ReactFloaterPortal, {\n hasChildren: !!children,\n id: id,\n placement: currentPlacement,\n setRef: this.setFloaterRef,\n target: target,\n zIndex: this.styles.options.zIndex\n }, React.createElement(Floater, {\n component: component,\n content: content,\n disableAnimation: disableAnimation,\n footer: footer,\n handleClick: this.handleClick,\n hideArrow: hideArrow || currentPlacement === 'center',\n isPositioned: isPositioned,\n open: open,\n placement: currentPlacement,\n positionWrapper: positionWrapper,\n setArrowRef: this.setArrowRef,\n setFloaterRef: this.setFloaterRef,\n showCloseButton: showCloseButton,\n status: status,\n styles: this.styles,\n title: title\n }), output.wrapperInPortal), output.wrapperAsChildren);\n }\n }, {\n key: \"debug\",\n get: function get() {\n var debug = this.props.debug;\n return debug || !!global.ReactFloaterDebug;\n }\n }, {\n key: \"event\",\n get: function get() {\n var _this$props9 = this.props,\n disableHoverToClick = _this$props9.disableHoverToClick,\n event = _this$props9.event;\n\n if (event === 'hover' && isMobile() && !disableHoverToClick) {\n return 'click';\n }\n\n return event;\n }\n }, {\n key: \"options\",\n get: function get() {\n var options = this.props.options;\n return deepmerge(DEFAULTS, options || {});\n }\n }, {\n key: \"styles\",\n get: function get() {\n var _this3 = this;\n\n var _this$state4 = this.state,\n status = _this$state4.status,\n positionWrapper = _this$state4.positionWrapper,\n statusWrapper = _this$state4.statusWrapper;\n var styles = this.props.styles;\n var nextStyles = deepmerge(getStyles(styles), styles);\n\n if (positionWrapper) {\n var wrapperStyles;\n\n if (![STATUS.IDLE].includes(status) || ![STATUS.IDLE].includes(statusWrapper)) {\n wrapperStyles = nextStyles.wrapperPosition;\n } else {\n wrapperStyles = this.wrapperPopper.styles;\n }\n\n nextStyles.wrapper = _objectSpread2({}, nextStyles.wrapper, {}, wrapperStyles);\n }\n /* istanbul ignore else */\n\n\n if (this.target) {\n var targetStyles = window.getComputedStyle(this.target);\n /* istanbul ignore else */\n\n if (this.wrapperStyles) {\n nextStyles.wrapper = _objectSpread2({}, nextStyles.wrapper, {}, this.wrapperStyles);\n } else if (!['relative', 'static'].includes(targetStyles.position)) {\n this.wrapperStyles = {};\n\n if (!positionWrapper) {\n POSITIONING_PROPS.forEach(function (d) {\n _this3.wrapperStyles[d] = targetStyles[d];\n });\n nextStyles.wrapper = _objectSpread2({}, nextStyles.wrapper, {}, this.wrapperStyles);\n this.target.style.position = 'relative';\n this.target.style.top = 'auto';\n this.target.style.right = 'auto';\n this.target.style.bottom = 'auto';\n this.target.style.left = 'auto';\n }\n }\n }\n\n return nextStyles;\n }\n }, {\n key: \"target\",\n get: function get() {\n if (!canUseDOM) return null;\n var target = this.props.target;\n\n if (target) {\n if (is.domElement(target)) {\n return target;\n }\n\n return document.querySelector(target);\n }\n\n return this.childRef || this.wrapperRef;\n }\n }]);\n\n return ReactFloater;\n}(React.Component);\n\n_defineProperty(ReactFloater, \"propTypes\", {\n autoOpen: PropTypes.bool,\n callback: PropTypes.func,\n children: PropTypes.node,\n component: isRequiredIf(PropTypes.oneOfType([PropTypes.func, PropTypes.element]), function (props) {\n return !props.content;\n }),\n content: isRequiredIf(PropTypes.node, function (props) {\n return !props.component;\n }),\n debug: PropTypes.bool,\n disableAnimation: PropTypes.bool,\n disableFlip: PropTypes.bool,\n disableHoverToClick: PropTypes.bool,\n event: PropTypes.oneOf(['hover', 'click']),\n eventDelay: PropTypes.number,\n footer: PropTypes.node,\n getPopper: PropTypes.func,\n hideArrow: PropTypes.bool,\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n isPositioned: PropTypes.bool,\n offset: PropTypes.number,\n open: PropTypes.bool,\n options: PropTypes.object,\n placement: PropTypes.oneOf(['top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'left', 'left-start', 'left-end', 'right', 'right-start', 'right-end', 'auto', 'center']),\n showCloseButton: PropTypes.bool,\n style: PropTypes.object,\n styles: PropTypes.object,\n target: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),\n title: PropTypes.node,\n wrapperOptions: PropTypes.shape({\n offset: PropTypes.number,\n placement: PropTypes.oneOf(['top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'left', 'left-start', 'left-end', 'right', 'right-start', 'right-end', 'auto']),\n position: PropTypes.bool\n })\n});\n\n_defineProperty(ReactFloater, \"defaultProps\", {\n autoOpen: false,\n callback: noop,\n debug: false,\n disableAnimation: false,\n disableFlip: false,\n disableHoverToClick: false,\n event: 'click',\n eventDelay: 0.4,\n getPopper: noop,\n hideArrow: false,\n offset: 15,\n placement: 'bottom',\n showCloseButton: false,\n styles: {},\n target: null,\n wrapperOptions: {\n position: false\n }\n});\n\nexport default ReactFloater;","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n;\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global.moment = factory();\n})(this, function () {\n 'use strict';\n\n var hookCallback;\n\n function hooks() {\n return hookCallback.apply(null, arguments);\n } // This is done to register the method called with moment()\n // without creating circular dependencies.\n\n\n function setHookCallback(callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\n }\n\n function isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return input != null && Object.prototype.toString.call(input) === '[object Object]';\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n\n return true;\n }\n }\n\n function isUndefined(input) {\n return input === void 0;\n }\n\n function isNumber(input) {\n return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';\n }\n\n function isDate(input) {\n return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n }\n\n function map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n\n return res;\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n\n return m._pf;\n }\n\n var some;\n\n if (Array.prototype.some) {\n some = Array.prototype.some;\n } else {\n some = function some(fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n function isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidEra && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts);\n\n if (m._strict) {\n isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n\n return m._isValid;\n }\n\n function createInvalid(flags) {\n var m = createUTC(NaN);\n\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n } // Plugins that add properties should also add the key here (null value),\n // so we can properly clone ourselves.\n\n\n var momentProperties = hooks.momentProperties = [],\n updateInProgress = false;\n\n function copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n } // Moment prototype object\n\n\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n\n if (!this.isValid()) {\n this._d = new Date(NaN);\n } // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n\n\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment(obj) {\n return obj instanceof Moment || obj != null && obj._isAMomentObject != null;\n }\n\n function warn(msg) {\n if (hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n\n for (i = 0; i < argLen; i++) {\n arg = '';\n\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n\n args.push(arg);\n }\n\n warn(msg + '\\nArguments: ' + Array.prototype.slice.call(args).join('') + '\\n' + new Error().stack);\n firstTime = false;\n }\n\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n hooks.suppressDeprecationWarnings = false;\n hooks.deprecationHandler = null;\n\n function isFunction(input) {\n return typeof Function !== 'undefined' && input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n }\n\n function set(config) {\n var prop, i;\n\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n\n this._config = config; // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n\n this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + /\\d{1,2}/.source);\n }\n\n function mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n\n for (prop in parentConfig) {\n if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n\n return res;\n }\n\n function Locale(config) {\n if (config != null) {\n this.set(config);\n }\n }\n\n var keys;\n\n if (Object.keys) {\n keys = Object.keys;\n } else {\n keys = function keys(obj) {\n var i,\n res = [];\n\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n\n return res;\n };\n }\n\n var defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n };\n\n function calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (sign ? forceSign ? '+' : '' : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n }\n\n var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {}; // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n\n function addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n\n if (typeof callback === 'string') {\n func = function func() {\n return this[callback]();\n };\n }\n\n if (token) {\n formatTokenFunctions[token] = func;\n }\n\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(func.apply(this, arguments), token);\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n\n for (i = 0; i < length; i++) {\n output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];\n }\n\n return output;\n };\n } // format date using native date object\n\n\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A'\n };\n\n function longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper.match(formattingTokens).map(function (tok) {\n if (tok === 'MMMM' || tok === 'MM' || tok === 'DD' || tok === 'dddd') {\n return tok.slice(1);\n }\n\n return tok;\n }).join('');\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate() {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n function ordinal(number) {\n return this._ordinal.replace('%d', number);\n }\n\n var defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n };\n\n function relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number);\n }\n\n function pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n }\n\n var aliases = {};\n\n function addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n }\n\n function normalizeUnits(units) {\n return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n var priorities = {};\n\n function addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n }\n\n function getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({\n unit: u,\n priority: priorities[u]\n });\n }\n }\n\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n }\n\n function isLeapYear(year) {\n return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n }\n\n function absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n }\n\n function makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n }\n\n function get(mom, unit) {\n return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;\n }\n\n function set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {\n value = toInt(value);\n\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n } // MOMENTS\n\n\n function stringGet(units) {\n units = normalizeUnits(units);\n\n if (isFunction(this[units])) {\n return this[units]();\n }\n\n return this;\n }\n\n function stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n\n return this;\n }\n\n var match1 = /\\d/,\n // 0 - 9\n match2 = /\\d\\d/,\n // 00 - 99\n match3 = /\\d{3}/,\n // 000 - 999\n match4 = /\\d{4}/,\n // 0000 - 9999\n match6 = /[+-]?\\d{6}/,\n // -999999 - 999999\n match1to2 = /\\d\\d?/,\n // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/,\n // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/,\n // 99999 - 999999\n match1to3 = /\\d{1,3}/,\n // 0 - 999\n match1to4 = /\\d{1,4}/,\n // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/,\n // -999999 - 999999\n matchUnsigned = /\\d+/,\n // 0 - inf\n matchSigned = /[+-]?\\d+/,\n // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi,\n // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi,\n // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/,\n // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord = /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n regexes = {};\n\n function addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n\n\n function unescapeFormat(s) {\n return regexEscape(s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }));\n }\n\n function regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n var tokens = {};\n\n function addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n\n if (typeof token === 'string') {\n token = [token];\n }\n\n if (isNumber(callback)) {\n func = function func(input, array) {\n array[callback] = toInt(input);\n };\n }\n\n tokenLen = token.length;\n\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n var YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\n function mod(n, x) {\n return (n % x + x) % x;\n }\n\n var indexOf;\n\n if (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n } else {\n indexOf = function indexOf(o) {\n // I know\n var i;\n\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n\n return -1;\n };\n }\n\n function daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1 ? isLeapYear(year) ? 29 : 28 : 31 - modMonth % 7 % 2;\n } // FORMATTING\n\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n }); // ALIASES\n\n addUnitAlias('month', 'M'); // PRIORITY\n\n addUnitPriority('month', 8); // PARSING\n\n addRegexToken('M', match1to2);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n });\n addRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n });\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid.\n\n\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n }); // LOCALES\n\n var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\n function localeMonths(m, format) {\n if (!m) {\n return isArray(this._months) ? this._months : this._months['standalone'];\n }\n\n return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n function localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort['standalone'];\n }\n\n return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n function handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n } // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n\n\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n }\n\n if (!strict && !this._monthsParse[i]) {\n regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n } // test the regex\n\n\n if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n return i;\n } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n } // MOMENTS\n\n\n function setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value); // TODO: Another silent failure?\n\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n\n return mom;\n }\n\n function getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n }\n\n function getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n }\n\n function monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n\n return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex;\n }\n }\n\n function monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n\n return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex;\n }\n }\n\n function computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n } // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n\n\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n } // FORMATTING\n\n\n addFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n });\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); // ALIASES\n\n addUnitAlias('year', 'y'); // PRIORITIES\n\n addUnitPriority('year', 1); // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n });\n addParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n }); // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n } // HOOKS\n\n\n hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n }; // MOMENTS\n\n\n var getSetYear = makeGetSet('FullYear', true);\n\n function getIsLeapYear() {\n return isLeapYear(this.year());\n }\n\n function createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date; // the date constructor remaps years 0-99 to 1900-1999\n\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n }\n\n function createUTCDate(y) {\n var date, args; // the Date.UTC function remaps years 0-99 to 1900-1999\n\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments); // preserve leap years using a full 400 year cycle, then reset\n\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n } // start-of-first-week - start-of-year\n\n\n function firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n return -fwdlw + fwd - 1;\n } // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n\n\n function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear\n };\n }\n\n function weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear\n };\n }\n\n function weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n } // FORMATTING\n\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES\n\n addUnitAlias('week', 'w');\n addUnitAlias('isoWeek', 'W'); // PRIORITIES\n\n addUnitPriority('week', 5);\n addUnitPriority('isoWeek', 5); // PARSING\n\n addRegexToken('w', match1to2);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2);\n addRegexToken('WW', match1to2, match2);\n addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }); // HELPERS\n // LOCALES\n\n function localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n };\n\n function localeFirstDayOfWeek() {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear() {\n return this._week.doy;\n } // MOMENTS\n\n\n function getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n } // FORMATTING\n\n\n addFormatToken('d', 0, 'do', 'day');\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday'); // ALIASES\n\n addUnitAlias('day', 'd');\n addUnitAlias('weekday', 'e');\n addUnitAlias('isoWeekday', 'E'); // PRIORITY\n\n addUnitPriority('day', 11);\n addUnitPriority('weekday', 11);\n addUnitPriority('isoWeekday', 11); // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n });\n addRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n });\n addRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n });\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict); // if we didn't get a weekday name, mark the date as invalid\n\n\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n }); // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n function parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n\n return isNaN(input) ? null : input;\n } // LOCALES\n\n\n function shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n }\n\n var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\n function localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[m && m !== true && this._weekdays.isFormat.test(format) ? 'format' : 'standalone'];\n return m === true ? shiftWeekdays(weekdays, this._week.dow) : m ? weekdays[m.day()] : weekdays;\n }\n\n function localeWeekdaysShort(m) {\n return m === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m ? this._weekdaysShort[m.day()] : this._weekdaysShort;\n }\n\n function localeWeekdaysMin(m) {\n return m === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m ? this._weekdaysMin[m.day()] : this._weekdaysMin;\n }\n\n function handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$', 'i');\n }\n\n if (!this._weekdaysParse[i]) {\n regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n } // test the regex\n\n\n if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n } // MOMENTS\n\n\n function getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n } // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n }\n\n function weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n\n return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex;\n }\n }\n\n function weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n\n return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\n }\n }\n\n function weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n\n return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\n }\n }\n\n function computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n } // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n\n\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');\n } // FORMATTING\n\n\n function hFormat() {\n return this.hours() % 12 || 12;\n }\n\n function kFormat() {\n return this.hours() || 24;\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, hFormat);\n addFormatToken('k', ['kk', 2], 0, kFormat);\n addFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n });\n addFormatToken('hmmss', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);\n });\n addFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n });\n addFormatToken('Hmmss', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);\n });\n\n function meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n });\n }\n\n meridiem('a', true);\n meridiem('A', false); // ALIASES\n\n addUnitAlias('hour', 'h'); // PRIORITY\n\n addUnitPriority('hour', 13); // PARSING\n\n function matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2);\n addRegexToken('h', match1to2);\n addRegexToken('k', match1to2);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n addRegexToken('kk', match1to2, match2);\n addRegexToken('hmm', match3to4);\n addRegexToken('hmmss', match5to6);\n addRegexToken('Hmm', match3to4);\n addRegexToken('Hmmss', match5to6);\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n });\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n });\n addParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n }); // LOCALES\n\n function localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\n function localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n }\n\n var baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n week: defaultLocaleWeek,\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n meridiemParse: defaultLocaleMeridiemParse\n }; // internal storage for locale config files\n\n var locales = {},\n localeFamilies = {},\n globalLocale;\n\n function commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n\n return minl;\n }\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n } // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n\n\n function chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n\n if (locale) {\n return locale;\n }\n\n if (next && next.length >= j && commonPrefix(split, next) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n\n j--;\n }\n\n i++;\n }\n\n return globalLocale;\n }\n\n function isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n }\n\n function loadLocale(name) {\n var oldLocale = null,\n aliasedRequire; // TODO: Find a better way to register and load all the locales in Node\n\n if (locales[name] === undefined && typeof module !== 'undefined' && module && module.exports && isLocaleNameSane(name)) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n\n return locales[name];\n } // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n\n\n function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n\n if (locales[name] != null) {\n deprecateSimple('defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale ' + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config\n });\n return null;\n }\n }\n }\n\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n } // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n\n\n getSetGlobalLocale(name);\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n function updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n\n config = mergeConfigs(parentConfig, config);\n\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n } // backwards compat for now: also set the locale\n\n\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n\n return locales[name];\n } // returns locale data\n\n\n function getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n\n if (locale) {\n return locale;\n }\n\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n function listLocales() {\n return keys(locales);\n }\n\n function checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1;\n\n if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n overflow = DATE;\n }\n\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n } // iso 8601 regex\n // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n\n\n var extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/], ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/], ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/], ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false], ['YYYY-DDD', /\\d{4}-\\d{3}/], ['YYYY-MM', /\\d{4}-\\d\\d/, false], ['YYYYYYMMDD', /[+-]\\d{10}/], ['YYYYMMDD', /\\d{8}/], ['GGGG[W]WWE', /\\d{4}W\\d{3}/], ['GGGG[W]WW', /\\d{4}W\\d{2}/, false], ['YYYYDDD', /\\d{7}/], ['YYYYMM', /\\d{6}/, false], ['YYYY', /\\d{4}/, false]],\n // iso time formats and regexes\n isoTimes = [['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/], ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/], ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/], ['HH:mm', /\\d\\d:\\d\\d/], ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/], ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/], ['HHmmss', /\\d\\d\\d\\d\\d\\d/], ['HHmm', /\\d\\d\\d\\d/], ['HH', /\\d\\d/]],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60\n }; // date from iso format\n\n function configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }\n\n function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n var result = [untruncateYear(yearStr), defaultLocaleMonthsShort.indexOf(monthStr), parseInt(dayStr, 10), parseInt(hourStr, 10), parseInt(minuteStr, 10)];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n }\n\n function untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n\n return year;\n }\n\n function preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s.replace(/\\([^()]*\\)|[\\n\\t]/g, ' ').replace(/(\\s\\s+)/g, ' ').replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n }\n\n function checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();\n\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n\n return true;\n }\n\n function calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n } // date and time from ref 2822 format\n\n\n function configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n\n if (match) {\n parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);\n\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n config._d = createUTCDate.apply(null, config._a);\n\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n } // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\n\n\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n }\n\n hooks.createFromInputFallback = deprecate('value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }); // Pick the first defined of two or three arguments.\n\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n\n if (b != null) {\n return b;\n }\n\n return c;\n }\n\n function currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n\n if (config._useUTC) {\n return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\n }\n\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n } // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n\n\n function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays\n\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n } //if the day of the year is set, figure out what it is\n\n\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n } // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n\n\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n } // Zero out whatever was not defaulted, including time\n\n\n for (; i < 7; i++) {\n config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];\n } // Check for 24:00:00.000\n\n\n if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n } // check for mismatching day of week\n\n\n if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n w = config._w;\n\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4; // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n\n weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n curWeek = weekOfYear(createLocal(), dow, doy);\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); // Default to current week.\n\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n } // constant that refers to the ISO standard\n\n\n hooks.ISO_8601 = function () {}; // constant that refers to the RFC 2822 form\n\n\n hooks.RFC_2822 = function () {}; // date from string and format string\n\n\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n\n config._a = [];\n getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC`\n\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n } // don't parse if it's not a known token\n\n\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n } // add remaining unparsed input length to the string\n\n\n getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n } // clear _12h flag if hour is <= 12\n\n\n if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem; // handle meridiem\n\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); // handle era\n\n era = getParsingFlags(config).era;\n\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n }\n\n function meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n\n if (isPm && hour < 12) {\n hour += 12;\n }\n\n if (!isPm && hour === 12) {\n hour = 0;\n }\n\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n } // date from string and array of format strings\n\n\n function configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n } // if there is any input that was not parsed add a penalty for that format\n\n\n currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens\n\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (scoreToBeat == null || currentScore < scoreToBeat || validFormatFound) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map([i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond], function (obj) {\n return obj && parseInt(obj, 10);\n });\n configFromArray(config);\n }\n\n function createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig(config) {\n var input = config._i,\n format = config._f;\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || format === undefined && input === '') {\n return createInvalid({\n nullInput: true\n });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (isObject(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) {\n input = undefined;\n } // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n\n\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n return createFromConfig(c);\n }\n\n function createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate('moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () {\n var other = createLocal.apply(null, arguments);\n\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }),\n prototypeMax = deprecate('moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () {\n var other = createLocal.apply(null, arguments);\n\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }); // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n\n function pickBy(fn, moments) {\n var res, i;\n\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n\n if (!moments.length) {\n return createLocal();\n }\n\n res = moments[0];\n\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n\n return res;\n } // TODO: Use [].sort instead?\n\n\n function min() {\n var args = [].slice.call(arguments, 0);\n return pickBy('isBefore', args);\n }\n\n function max() {\n var args = [].slice.call(arguments, 0);\n return pickBy('isAfter', args);\n }\n\n var now = function now() {\n return Date.now ? Date.now() : +new Date();\n };\n\n var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];\n\n function isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n\n for (key in m) {\n if (hasOwnProp(m, key) && !(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n }\n\n function isValid$1() {\n return this._isValid;\n }\n\n function createInvalid$1() {\n return createDuration(NaN);\n }\n\n function Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n this._isValid = isDurationValid(normalizedInput); // representation for dateAddRemove\n\n this._milliseconds = +milliseconds + seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n\n this._days = +days + weeks * 7; // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n\n this._months = +months + quarters * 3 + years * 12;\n this._data = {};\n this._locale = getLocale();\n\n this._bubble();\n }\n\n function isDuration(obj) {\n return obj instanceof Duration;\n }\n\n function absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n } // compare two arrays, return the number of differences\n\n\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) {\n diffs++;\n }\n }\n\n return diffs + lengthDiff;\n } // FORMATTING\n\n\n function offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n\n return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~offset % 60, 2);\n });\n }\n\n offset('Z', ':');\n offset('ZZ', ''); // PARSING\n\n addRegexToken('Z', matchShortOffset);\n addRegexToken('ZZ', matchShortOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n }); // HELPERS\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n } // Return a moment from input, that is local/utc/zone equivalent to model.\n\n\n function cloneWithOffset(input, model) {\n var res, diff;\n\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api.\n\n res._d.setTime(res._d.valueOf() + diff);\n\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }\n\n function getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n } // HOOKS\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n\n\n hooks.updateOffset = function () {}; // MOMENTS\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n\n\n function getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n\n this._offset = input;\n this._isUTC = true;\n\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n\n return this;\n }\n\n function setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n\n return this;\n }\n\n function hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n\n input = input ? createLocal(input).utcOffset() : 0;\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime() {\n return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();\n }\n\n function isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal() {\n return this.isValid() ? !this._isUTC : false;\n }\n\n function isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n }\n\n function isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n } // ASP.NET json date format regex\n\n\n var aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n function createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if (match = aspNetRegex.exec(input)) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match\n\n };\n } else if (match = isoRegex.exec(input)) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign)\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n }\n\n createDuration.fn = Duration.prototype;\n createDuration.invalid = createInvalid$1;\n\n function parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it\n\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {};\n res.months = other.month() - base.month() + (other.year() - base.year()) * 12;\n\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n\n if (!(base.isValid() && other.isValid())) {\n return {\n milliseconds: 0,\n months: 0\n };\n }\n\n other = cloneWithOffset(other, base);\n\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n } // TODO: remove 'name' arg after deprecation is removed\n\n\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp; //invert the arguments, but complain about it\n\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n }\n\n var add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\n function isString(input) {\n return typeof input === 'string' || input instanceof String;\n } // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\n\n\n function isMomentInput(input) {\n return isMoment(input) || isDate(input) || isString(input) || isNumber(input) || isNumberOrStringArray(input) || isMomentInputObject(input) || input === null || input === undefined;\n }\n\n function isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = ['years', 'year', 'y', 'months', 'month', 'M', 'days', 'day', 'd', 'dates', 'date', 'D', 'hours', 'hour', 'h', 'minutes', 'minute', 'm', 'seconds', 'second', 's', 'milliseconds', 'millisecond', 'ms'],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n }\n\n function isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n\n if (arrayTest) {\n dataTypeTest = input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n\n return arrayTest && dataTypeTest;\n }\n\n function isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = ['sameDay', 'nextDay', 'lastDay', 'nextWeek', 'lastWeek', 'sameElse'],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n }\n\n function getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse';\n }\n\n function calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n } // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n\n\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);\n return this.format(output || this.localeData().calendar(format, this, createLocal(now)));\n }\n\n function clone() {\n return new Moment(this);\n }\n\n function isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n }\n\n function isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n }\n\n function isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n\n inclusivity = inclusivity || '()';\n return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units));\n }\n\n function isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();\n }\n }\n\n function isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n }\n\n function isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n }\n\n function diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n\n case 'month':\n output = monthDiff(this, that);\n break;\n\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n\n case 'second':\n output = (this - that) / 1e3;\n break;\n // 1000\n\n case 'minute':\n output = (this - that) / 6e4;\n break;\n // 1000 * 60\n\n case 'hour':\n output = (this - that) / 36e5;\n break;\n // 1000 * 60 * 60\n\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break;\n // 1000 * 60 * 60 * 24, negate dst\n\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break;\n // 1000 * 60 * 60 * 24 * 7, negate dst\n\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n } // difference in months\n\n\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); // linear across the month\n\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); // linear across the month\n\n adjust = (b - anchor) / (anchor2 - anchor);\n } //check for negative zero, return zero if negative zero\n\n\n return -(wholeMonthDiff + adjust) || 0;\n }\n\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n function toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z'));\n }\n }\n\n return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n /**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\n\n\n function inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n return this.format(prefix + year + datetime + suffix);\n }\n\n function format(inputString) {\n if (!inputString) {\n inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;\n }\n\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n }\n\n function from(time, withoutSuffix) {\n if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {\n return createDuration({\n to: this,\n from: time\n }).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n }\n\n function to(time, withoutSuffix) {\n if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {\n return createDuration({\n from: this,\n to: time\n }).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n } // If passed a locale key, it will set the locale for this\n // instance. Otherwise, it will return the locale configuration\n // variables for this instance.\n\n\n function locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n\n return this;\n }\n }\n\n var lang = deprecate('moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n });\n\n function localeData() {\n return this._locale;\n }\n\n var MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; // actual modulo - handles negative numbers (for dates before 1970):\n\n function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }\n\n function localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n }\n\n function utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n }\n\n function startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3, 1);\n break;\n\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday());\n break;\n\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1));\n break;\n\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR);\n break;\n\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n\n hooks.updateOffset(this, true);\n return this;\n }\n\n function endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1;\n break;\n\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1;\n break;\n\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1;\n break;\n\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n\n case 'hour':\n time = this._d.valueOf();\n time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1;\n break;\n\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n\n hooks.updateOffset(this, true);\n return this;\n }\n\n function valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n }\n\n function unix() {\n return Math.floor(this.valueOf() / 1000);\n }\n\n function toDate() {\n return new Date(this.valueOf());\n }\n\n function toArray() {\n var m = this;\n return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n }\n\n function toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds()\n };\n }\n\n function toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n }\n\n function isValid$2() {\n return isValid(this);\n }\n\n function parsingFlags() {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt() {\n return getParsingFlags(this).overflow;\n }\n\n function creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict\n };\n }\n\n addFormatToken('N', 0, 0, 'eraAbbr');\n addFormatToken('NN', 0, 0, 'eraAbbr');\n addFormatToken('NNN', 0, 0, 'eraAbbr');\n addFormatToken('NNNN', 0, 0, 'eraName');\n addFormatToken('NNNNN', 0, 0, 'eraNarrow');\n addFormatToken('y', ['y', 1], 'yo', 'eraYear');\n addFormatToken('y', ['yy', 2], 0, 'eraYear');\n addFormatToken('y', ['yyy', 3], 0, 'eraYear');\n addFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n addRegexToken('N', matchEraAbbr);\n addRegexToken('NN', matchEraAbbr);\n addRegexToken('NNN', matchEraAbbr);\n addRegexToken('NNNN', matchEraName);\n addRegexToken('NNNNN', matchEraNarrow);\n addParseToken(['N', 'NN', 'NNN', 'NNNN', 'NNNNN'], function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n });\n addRegexToken('y', matchUnsigned);\n addRegexToken('yy', matchUnsigned);\n addRegexToken('yyy', matchUnsigned);\n addRegexToken('yyyy', matchUnsigned);\n addRegexToken('yo', matchEraYearOrdinal);\n addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\n addParseToken(['yo'], function (input, array, config, token) {\n var match;\n\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n });\n\n function localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n\n return eras;\n }\n\n function localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n }\n\n function localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n }\n\n function getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n }\n\n function getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n }\n\n function getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n }\n\n function getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1; // truncate time\n\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until || eras[i].until <= val && val <= eras[i].since) {\n return (this.year() - hooks(eras[i].since).year()) * dir + eras[i].offset;\n }\n }\n\n return this.year();\n }\n\n function erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n\n return isStrict ? this._erasNameRegex : this._erasRegex;\n }\n\n function erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n }\n\n function erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n }\n\n function matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n }\n\n function matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n }\n\n function matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n }\n\n function matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n }\n\n function computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp('^(' + narrowPieces.join('|') + ')', 'i');\n } // FORMATTING\n\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear'); // ALIASES\n\n addUnitAlias('weekYear', 'gg');\n addUnitAlias('isoWeekYear', 'GG'); // PRIORITY\n\n addUnitPriority('weekYear', 1);\n addUnitPriority('isoWeekYear', 1); // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n });\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n }); // MOMENTS\n\n function getSetWeekYear(input) {\n return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy);\n }\n\n function getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4);\n }\n\n function getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n }\n\n function getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n function getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n }\n\n function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n }\n\n function setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n } // FORMATTING\n\n\n addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES\n\n addUnitAlias('quarter', 'Q'); // PRIORITY\n\n addUnitPriority('quarter', 7); // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n }); // MOMENTS\n\n function getSetQuarter(input) {\n return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n } // FORMATTING\n\n\n addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES\n\n addUnitAlias('date', 'D'); // PRIORITY\n\n addUnitPriority('date', 9); // PARSING\n\n addRegexToken('D', match1to2);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict ? locale._dayOfMonthOrdinalParse || locale._ordinalParse : locale._dayOfMonthOrdinalParseLenient;\n });\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n }); // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true); // FORMATTING\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES\n\n addUnitAlias('dayOfYear', 'DDD'); // PRIORITY\n\n addUnitPriority('dayOfYear', 4); // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n }); // HELPERS\n // MOMENTS\n\n function getSetDayOfYear(input) {\n var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n } // FORMATTING\n\n\n addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES\n\n addUnitAlias('minute', 'm'); // PRIORITY\n\n addUnitPriority('minute', 14); // PARSING\n\n addRegexToken('m', match1to2);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE); // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false); // FORMATTING\n\n addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES\n\n addUnitAlias('second', 's'); // PRIORITY\n\n addUnitPriority('second', 15); // PARSING\n\n addRegexToken('s', match1to2);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND); // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false); // FORMATTING\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n }); // ALIASES\n\n addUnitAlias('millisecond', 'ms'); // PRIORITY\n\n addUnitPriority('millisecond', 16); // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n var token, getSetMillisecond;\n\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n }\n\n getSetMillisecond = makeGetSet('Milliseconds', false); // FORMATTING\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName'); // MOMENTS\n\n function getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var proto = Moment.prototype;\n proto.add = add;\n proto.calendar = calendar$1;\n proto.clone = clone;\n proto.diff = diff;\n proto.endOf = endOf;\n proto.format = format;\n proto.from = from;\n proto.fromNow = fromNow;\n proto.to = to;\n proto.toNow = toNow;\n proto.get = stringGet;\n proto.invalidAt = invalidAt;\n proto.isAfter = isAfter;\n proto.isBefore = isBefore;\n proto.isBetween = isBetween;\n proto.isSame = isSame;\n proto.isSameOrAfter = isSameOrAfter;\n proto.isSameOrBefore = isSameOrBefore;\n proto.isValid = isValid$2;\n proto.lang = lang;\n proto.locale = locale;\n proto.localeData = localeData;\n proto.max = prototypeMax;\n proto.min = prototypeMin;\n proto.parsingFlags = parsingFlags;\n proto.set = stringSet;\n proto.startOf = startOf;\n proto.subtract = subtract;\n proto.toArray = toArray;\n proto.toObject = toObject;\n proto.toDate = toDate;\n proto.toISOString = toISOString;\n proto.inspect = inspect;\n\n if (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n }\n\n proto.toJSON = toJSON;\n proto.toString = toString;\n proto.unix = unix;\n proto.valueOf = valueOf;\n proto.creationData = creationData;\n proto.eraName = getEraName;\n proto.eraNarrow = getEraNarrow;\n proto.eraAbbr = getEraAbbr;\n proto.eraYear = getEraYear;\n proto.year = getSetYear;\n proto.isLeapYear = getIsLeapYear;\n proto.weekYear = getSetWeekYear;\n proto.isoWeekYear = getSetISOWeekYear;\n proto.quarter = proto.quarters = getSetQuarter;\n proto.month = getSetMonth;\n proto.daysInMonth = getDaysInMonth;\n proto.week = proto.weeks = getSetWeek;\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n proto.weeksInYear = getWeeksInYear;\n proto.weeksInWeekYear = getWeeksInWeekYear;\n proto.isoWeeksInYear = getISOWeeksInYear;\n proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\n proto.date = getSetDayOfMonth;\n proto.day = proto.days = getSetDayOfWeek;\n proto.weekday = getSetLocaleDayOfWeek;\n proto.isoWeekday = getSetISODayOfWeek;\n proto.dayOfYear = getSetDayOfYear;\n proto.hour = proto.hours = getSetHour;\n proto.minute = proto.minutes = getSetMinute;\n proto.second = proto.seconds = getSetSecond;\n proto.millisecond = proto.milliseconds = getSetMillisecond;\n proto.utcOffset = getSetOffset;\n proto.utc = setOffsetToUTC;\n proto.local = setOffsetToLocal;\n proto.parseZone = setOffsetToParsedOffset;\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\n proto.isDST = isDaylightSavingTime;\n proto.isLocal = isLocal;\n proto.isUtcOffset = isUtcOffset;\n proto.isUtc = isUtc;\n proto.isUTC = isUtc;\n proto.zoneAbbr = getZoneAbbr;\n proto.zoneName = getZoneName;\n proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\n proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\n proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);\n proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);\n proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);\n\n function createUnix(input) {\n return createLocal(input * 1000);\n }\n\n function createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n }\n\n function preParsePostFormat(string) {\n return string;\n }\n\n var proto$1 = Locale.prototype;\n proto$1.calendar = calendar;\n proto$1.longDateFormat = longDateFormat;\n proto$1.invalidDate = invalidDate;\n proto$1.ordinal = ordinal;\n proto$1.preparse = preParsePostFormat;\n proto$1.postformat = preParsePostFormat;\n proto$1.relativeTime = relativeTime;\n proto$1.pastFuture = pastFuture;\n proto$1.set = set;\n proto$1.eras = localeEras;\n proto$1.erasParse = localeErasParse;\n proto$1.erasConvertYear = localeErasConvertYear;\n proto$1.erasAbbrRegex = erasAbbrRegex;\n proto$1.erasNameRegex = erasNameRegex;\n proto$1.erasNarrowRegex = erasNarrowRegex;\n proto$1.months = localeMonths;\n proto$1.monthsShort = localeMonthsShort;\n proto$1.monthsParse = localeMonthsParse;\n proto$1.monthsRegex = monthsRegex;\n proto$1.monthsShortRegex = monthsShortRegex;\n proto$1.week = localeWeek;\n proto$1.firstDayOfYear = localeFirstDayOfYear;\n proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n proto$1.weekdays = localeWeekdays;\n proto$1.weekdaysMin = localeWeekdaysMin;\n proto$1.weekdaysShort = localeWeekdaysShort;\n proto$1.weekdaysParse = localeWeekdaysParse;\n proto$1.weekdaysRegex = weekdaysRegex;\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\n proto$1.weekdaysMinRegex = weekdaysMinRegex;\n proto$1.isPM = localeIsPM;\n proto$1.meridiem = localeMeridiem;\n\n function get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n\n return out;\n } // ()\n // (5)\n // (fmt, 5)\n // (fmt)\n // (true)\n // (true, 5)\n // (true, fmt, 5)\n // (true, fmt)\n\n\n function listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n\n return out;\n }\n\n function listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n }\n\n function listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n }\n\n function listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n }\n\n function listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n }\n\n function listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n }\n\n getSetGlobalLocale('en', {\n eras: [{\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD'\n }, {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC'\n }],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = toInt(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n }\n }); // Side effect imports\n\n hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);\n hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);\n var mathAbs = Math.abs;\n\n function abs() {\n var data = this._data;\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n return this;\n }\n\n function addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n return duration._bubble();\n } // supports only 2.0-style add(1, 's') or add(duration)\n\n\n function add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n } // supports only 2.0-style subtract(1, 's') or subtract(duration)\n\n\n function subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n }\n\n function absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays; // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n\n if (!(milliseconds >= 0 && days >= 0 && months >= 0 || milliseconds <= 0 && days <= 0 && months <= 0)) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n } // The following code bubbles up values, see the tests for\n // examples of what that means.\n\n\n data.milliseconds = milliseconds % 1000;\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n days += absFloor(hours / 24); // convert days to months\n\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays)); // 12 months -> 1 year\n\n years = absFloor(months / 12);\n months %= 12;\n data.days = days;\n data.months = months;\n data.years = years;\n return this;\n }\n\n function daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return days * 4800 / 146097;\n }\n\n function monthsToDays(months) {\n // the reverse of daysToMonths\n return months * 146097 / 4800;\n }\n\n function as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n\n var days,\n months,\n milliseconds = this._milliseconds;\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n\n switch (units) {\n case 'month':\n return months;\n\n case 'quarter':\n return months / 3;\n\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n\n case 'day':\n return days + milliseconds / 864e5;\n\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n } // TODO: Use this.as('ms')?\n\n\n function valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n\n return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6;\n }\n\n function makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\n function clone$1() {\n return createDuration(this);\n }\n\n function get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n }\n\n function makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n }\n\n var milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\n function weeks() {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round,\n thresholds = {\n ss: 44,\n // a few seconds to seconds\n s: 45,\n // seconds to minute\n m: 45,\n // minutes to hour\n h: 22,\n // hours to day\n d: 26,\n // days to month/week\n w: null,\n // weeks to month\n M: 11 // months to year\n\n }; // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a = seconds <= thresholds.ss && ['s', seconds] || seconds < thresholds.s && ['ss', seconds] || minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days <= 1 && ['d'] || days < thresholds.d && ['dd', days];\n\n if (thresholds.w != null) {\n a = a || weeks <= 1 && ['w'] || weeks < thresholds.w && ['ww', weeks];\n }\n\n a = a || months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || years <= 1 && ['y'] || ['yy', years];\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n } // This function allows you to set the rounding function for relative time strings\n\n\n function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n\n return false;\n } // This function allows you to set a threshold for relative time strings\n\n\n function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n\n if (limit === undefined) {\n return thresholds[threshold];\n }\n\n thresholds[threshold] = limit;\n\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n\n return true;\n }\n\n function humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var abs$1 = Math.abs;\n\n function sign(x) {\n return (x > 0) - (x < 0) || +x;\n }\n\n function toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n } // 3600 seconds -> 60 minutes -> 1 hour\n\n\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60; // 12 months -> 1 year\n\n years = absFloor(months / 12);\n months %= 12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n return totalSign + 'P' + (years ? ymSign + years + 'Y' : '') + (months ? ymSign + months + 'M' : '') + (days ? daysSign + days + 'D' : '') + (hours || minutes || seconds ? 'T' : '') + (hours ? hmsSign + hours + 'H' : '') + (minutes ? hmsSign + minutes + 'M' : '') + (seconds ? hmsSign + s + 'S' : '');\n }\n\n var proto$2 = Duration.prototype;\n proto$2.isValid = isValid$1;\n proto$2.abs = abs;\n proto$2.add = add$1;\n proto$2.subtract = subtract$1;\n proto$2.as = as;\n proto$2.asMilliseconds = asMilliseconds;\n proto$2.asSeconds = asSeconds;\n proto$2.asMinutes = asMinutes;\n proto$2.asHours = asHours;\n proto$2.asDays = asDays;\n proto$2.asWeeks = asWeeks;\n proto$2.asMonths = asMonths;\n proto$2.asQuarters = asQuarters;\n proto$2.asYears = asYears;\n proto$2.valueOf = valueOf$1;\n proto$2._bubble = bubble;\n proto$2.clone = clone$1;\n proto$2.get = get$2;\n proto$2.milliseconds = milliseconds;\n proto$2.seconds = seconds;\n proto$2.minutes = minutes;\n proto$2.hours = hours;\n proto$2.days = days;\n proto$2.weeks = weeks;\n proto$2.months = months;\n proto$2.years = years;\n proto$2.humanize = humanize;\n proto$2.toISOString = toISOString$1;\n proto$2.toString = toISOString$1;\n proto$2.toJSON = toISOString$1;\n proto$2.locale = locale;\n proto$2.localeData = localeData;\n proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);\n proto$2.lang = lang; // FORMATTING\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf'); // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n }); //! moment.js\n\n hooks.version = '2.29.4';\n setHookCallback(createLocal);\n hooks.fn = proto;\n hooks.min = min;\n hooks.max = max;\n hooks.now = now;\n hooks.utc = createUTC;\n hooks.unix = createUnix;\n hooks.months = listMonths;\n hooks.isDate = isDate;\n hooks.locale = getSetGlobalLocale;\n hooks.invalid = createInvalid;\n hooks.duration = createDuration;\n hooks.isMoment = isMoment;\n hooks.weekdays = listWeekdays;\n hooks.parseZone = createInZone;\n hooks.localeData = getLocale;\n hooks.isDuration = isDuration;\n hooks.monthsShort = listMonthsShort;\n hooks.weekdaysMin = listWeekdaysMin;\n hooks.defineLocale = defineLocale;\n hooks.updateLocale = updateLocale;\n hooks.locales = listLocales;\n hooks.weekdaysShort = listWeekdaysShort;\n hooks.normalizeUnits = normalizeUnits;\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n hooks.calendarFormat = getCalendarFormat;\n hooks.prototype = proto; // currently HTML5 input type only supports 24-hour formats\n\n hooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm',\n // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss',\n // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS',\n // \n DATE: 'YYYY-MM-DD',\n // \n TIME: 'HH:mm',\n // \n TIME_SECONDS: 'HH:mm:ss',\n // \n TIME_MS: 'HH:mm:ss.SSS',\n // \n WEEK: 'GGGG-[W]WW',\n // \n MONTH: 'YYYY-MM' // \n\n };\n return hooks;\n});","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = addClass;\n\nvar _hasClass = _interopRequireDefault(require(\"./hasClass\"));\n\nfunction addClass(element, className) {\n if (element.classList) element.classList.add(className);else if (!(0, _hasClass.default)(element, className)) if (typeof element.className === 'string') element.className = element.className + ' ' + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + ' ' + className);\n}\n\nmodule.exports = exports[\"default\"];","'use strict';\n\nfunction replaceClassName(origClass, classToRemove) {\n return origClass.replace(new RegExp('(^|\\\\s)' + classToRemove + '(?:\\\\s|$)', 'g'), '$1').replace(/\\s+/g, ' ').replace(/^\\s*|\\s*$/g, '');\n}\n\nmodule.exports = function removeClass(element, className) {\n if (element.classList) element.classList.remove(className);else if (typeof element.className === 'string') element.className = replaceClassName(element.className, className);else element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));\n};","// @flow\n'use strict';\n\nvar key = '__global_unique_id__';\n\nmodule.exports = function () {\n return global[key] = (global[key] || 0) + 1;\n};","'use strict';\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\n\nvar ReactIs = require('react-is');\n\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[ReactIs.ForwardRef] = FORWARD_REF_STATICS;\n\nfunction getStatics(component) {\n if (ReactIs.isMemo(component)) {\n return MEMO_STATICS;\n }\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\n\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n\n return targetComponent;\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport isRequiredForA11y from 'prop-types-extra/lib/isRequiredForA11y';\nimport { useBootstrapPrefix } from './ThemeProvider';\nvar defaultProps = {\n placement: 'right'\n};\nvar Tooltip = React.forwardRef(function (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n placement = _ref.placement,\n className = _ref.className,\n style = _ref.style,\n children = _ref.children,\n arrowProps = _ref.arrowProps,\n _ = _ref.popper,\n _2 = _ref.show,\n props = _objectWithoutPropertiesLoose(_ref, [\"bsPrefix\", \"placement\", \"className\", \"style\", \"children\", \"arrowProps\", \"popper\", \"show\"]);\n\n bsPrefix = useBootstrapPrefix(bsPrefix, 'tooltip');\n\n var _ref2 = (placement == null ? void 0 : placement.split('-')) || [],\n primaryPlacement = _ref2[0];\n\n return (\n /*#__PURE__*/\n React.createElement(\"div\", _extends({\n ref: ref,\n style: style,\n role: \"tooltip\",\n \"x-placement\": primaryPlacement,\n className: classNames(className, bsPrefix, \"bs-tooltip-\" + primaryPlacement)\n }, props),\n /*#__PURE__*/\n React.createElement(\"div\", _extends({\n className: \"arrow\"\n }, arrowProps)),\n /*#__PURE__*/\n React.createElement(\"div\", {\n className: bsPrefix + \"-inner\"\n }, children))\n );\n});\nTooltip.defaultProps = defaultProps;\nTooltip.displayName = 'Tooltip';\nexport default Tooltip;","/* eslint-disable no-bitwise, no-cond-assign */\n// HTML DOM and SVG DOM may have different support levels,\n// so we need to check on context instead of a document root element.\nexport default function contains(context, node) {\n if (context.contains) return context.contains(node);\n if (context.compareDocumentPosition) return context === node || !!(context.compareDocumentPosition(node) & 16);\n}","export default !!(typeof window !== 'undefined' && window.document && window.document.createElement);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nexport function toModifierMap(modifiers) {\n var result = {};\n\n if (!Array.isArray(modifiers)) {\n return modifiers || result;\n } // eslint-disable-next-line no-unused-expressions\n\n\n modifiers == null ? void 0 : modifiers.forEach(function (m) {\n result[m.name] = m;\n });\n return result;\n}\nexport function toModifierArray(map) {\n if (map === void 0) {\n map = {};\n }\n\n if (Array.isArray(map)) return map;\n return Object.keys(map).map(function (k) {\n map[k].name = k;\n return map[k];\n });\n}\nexport default function mergeOptionsWithPopperConfig(_ref) {\n var _modifiers$preventOve, _modifiers$preventOve2, _modifiers$offset, _modifiers$arrow;\n\n var enabled = _ref.enabled,\n enableEvents = _ref.enableEvents,\n placement = _ref.placement,\n flip = _ref.flip,\n offset = _ref.offset,\n containerPadding = _ref.containerPadding,\n arrowElement = _ref.arrowElement,\n _ref$popperConfig = _ref.popperConfig,\n popperConfig = _ref$popperConfig === void 0 ? {} : _ref$popperConfig;\n var modifiers = toModifierMap(popperConfig.modifiers);\n return _extends({}, popperConfig, {\n placement: placement,\n enabled: enabled,\n modifiers: toModifierArray(_extends({}, modifiers, {\n eventListeners: {\n enabled: enableEvents\n },\n preventOverflow: _extends({}, modifiers.preventOverflow, {\n options: containerPadding ? _extends({\n padding: containerPadding\n }, (_modifiers$preventOve = modifiers.preventOverflow) == null ? void 0 : _modifiers$preventOve.options) : (_modifiers$preventOve2 = modifiers.preventOverflow) == null ? void 0 : _modifiers$preventOve2.options\n }),\n offset: {\n options: _extends({\n offset: offset\n }, (_modifiers$offset = modifiers.offset) == null ? void 0 : _modifiers$offset.options)\n },\n arrow: _extends({}, modifiers.arrow, {\n enabled: !!arrowElement,\n options: _extends({}, (_modifiers$arrow = modifiers.arrow) == null ? void 0 : _modifiers$arrow.options, {\n element: arrowElement\n })\n }),\n flip: _extends({\n enabled: !!flip\n }, modifiers.flip)\n }))\n });\n}","export default !!(typeof window !== 'undefined' && window.document && window.document.createElement);","(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define('ReactTagsInput', ['module', 'exports', 'react', 'prop-types'], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(module, exports, require('react'), require('prop-types'));\n } else {\n var mod = {\n exports: {}\n };\n factory(mod, mod.exports, global.React, global.propTypes);\n global.ReactTagsInput = mod.exports;\n }\n})(this, function (module, exports, _react, _propTypes) {\n 'use strict';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n\n var _react2 = _interopRequireDefault(_react);\n\n var _propTypes2 = _interopRequireDefault(_propTypes);\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n }\n\n 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\n return obj;\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n var _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\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n\n function _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n }\n\n function _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\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 }\n\n var _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n function _objectWithoutProperties(obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n }\n\n function uniq(arr) {\n var out = [];\n\n for (var i = 0; i < arr.length; i++) {\n if (out.indexOf(arr[i]) === -1) {\n out.push(arr[i]);\n }\n }\n\n return out;\n }\n /* istanbul ignore next */\n\n\n function getClipboardData(e) {\n if (window.clipboardData) {\n return window.clipboardData.getData('Text');\n }\n\n if (e.clipboardData) {\n return e.clipboardData.getData('text/plain');\n }\n\n return '';\n }\n\n function defaultRenderTag(props) {\n var tag = props.tag,\n key = props.key,\n disabled = props.disabled,\n onRemove = props.onRemove,\n classNameRemove = props.classNameRemove,\n getTagDisplayValue = props.getTagDisplayValue,\n other = _objectWithoutProperties(props, ['tag', 'key', 'disabled', 'onRemove', 'classNameRemove', 'getTagDisplayValue']);\n\n return _react2.default.createElement('span', _extends({\n key: key\n }, other), getTagDisplayValue(tag), !disabled && _react2.default.createElement('a', {\n className: classNameRemove,\n onClick: function onClick(e) {\n return onRemove(key);\n }\n }));\n }\n\n function defaultRenderInput(_ref) {\n var addTag = _ref.addTag,\n props = _objectWithoutProperties(_ref, ['addTag']);\n\n var onChange = props.onChange,\n value = props.value,\n other = _objectWithoutProperties(props, ['onChange', 'value']);\n\n return _react2.default.createElement('input', _extends({\n type: 'text',\n onChange: onChange,\n value: value\n }, other));\n }\n\n function defaultRenderLayout(tagComponents, inputComponent) {\n return _react2.default.createElement('span', null, tagComponents, inputComponent);\n }\n\n function defaultPasteSplit(data) {\n return data.split(' ').map(function (d) {\n return d.trim();\n });\n }\n\n var defaultInputProps = {\n className: 'react-tagsinput-input',\n placeholder: 'Add a tag'\n };\n\n var TagsInput = function (_React$Component) {\n _inherits(TagsInput, _React$Component);\n /* istanbul ignore next */\n\n\n function TagsInput() {\n _classCallCheck(this, TagsInput);\n\n var _this = _possibleConstructorReturn(this, (TagsInput.__proto__ || Object.getPrototypeOf(TagsInput)).call(this));\n\n _this.state = {\n tag: '',\n isFocused: false\n };\n _this.focus = _this.focus.bind(_this);\n _this.blur = _this.blur.bind(_this);\n return _this;\n }\n\n _createClass(TagsInput, [{\n key: '_getTagDisplayValue',\n value: function _getTagDisplayValue(tag) {\n var tagDisplayProp = this.props.tagDisplayProp;\n\n if (tagDisplayProp) {\n return tag[tagDisplayProp];\n }\n\n return tag;\n }\n }, {\n key: '_makeTag',\n value: function _makeTag(tag) {\n var tagDisplayProp = this.props.tagDisplayProp;\n\n if (tagDisplayProp) {\n return _defineProperty({}, tagDisplayProp, tag);\n }\n\n return tag;\n }\n }, {\n key: '_removeTag',\n value: function _removeTag(index) {\n var value = this.props.value.concat([]);\n\n if (index > -1 && index < value.length) {\n var changed = value.splice(index, 1);\n this.props.onChange(value, changed, [index]);\n }\n }\n }, {\n key: '_clearInput',\n value: function _clearInput() {\n if (this.hasControlledInput()) {\n this.props.onChangeInput('');\n } else {\n this.setState({\n tag: ''\n });\n }\n }\n }, {\n key: '_tag',\n value: function _tag() {\n if (this.hasControlledInput()) {\n return this.props.inputValue;\n }\n\n return this.state.tag;\n }\n }, {\n key: '_addTags',\n value: function _addTags(tags) {\n var _this2 = this;\n\n var _props = this.props,\n validationRegex = _props.validationRegex,\n onChange = _props.onChange,\n onValidationReject = _props.onValidationReject,\n onlyUnique = _props.onlyUnique,\n maxTags = _props.maxTags,\n value = _props.value;\n\n if (onlyUnique) {\n tags = uniq(tags);\n tags = tags.filter(function (tag) {\n return value.every(function (currentTag) {\n return _this2._getTagDisplayValue(currentTag) !== _this2._getTagDisplayValue(tag);\n });\n });\n }\n\n var rejectedTags = tags.filter(function (tag) {\n return !validationRegex.test(_this2._getTagDisplayValue(tag));\n });\n tags = tags.filter(function (tag) {\n return validationRegex.test(_this2._getTagDisplayValue(tag));\n });\n tags = tags.filter(function (tag) {\n var tagDisplayValue = _this2._getTagDisplayValue(tag);\n\n if (typeof tagDisplayValue.trim === 'function') {\n return tagDisplayValue.trim().length > 0;\n } else {\n return tagDisplayValue;\n }\n });\n\n if (maxTags >= 0) {\n var remainingLimit = Math.max(maxTags - value.length, 0);\n tags = tags.slice(0, remainingLimit);\n }\n\n if (onValidationReject && rejectedTags.length > 0) {\n onValidationReject(rejectedTags);\n }\n\n if (tags.length > 0) {\n var newValue = value.concat(tags);\n var indexes = [];\n\n for (var i = 0; i < tags.length; i++) {\n indexes.push(value.length + i);\n }\n\n onChange(newValue, tags, indexes);\n\n this._clearInput();\n\n return true;\n }\n\n if (rejectedTags.length > 0) {\n return false;\n }\n\n this._clearInput();\n\n return false;\n }\n }, {\n key: '_shouldPreventDefaultEventOnAdd',\n value: function _shouldPreventDefaultEventOnAdd(added, empty, keyCode) {\n if (added) {\n return true;\n }\n\n if (keyCode === 13) {\n return this.props.preventSubmit || !this.props.preventSubmit && !empty;\n }\n\n return false;\n }\n }, {\n key: 'focus',\n value: function focus() {\n if (this.input && typeof this.input.focus === 'function') {\n this.input.focus();\n }\n\n this.handleOnFocus();\n }\n }, {\n key: 'blur',\n value: function blur() {\n if (this.input && typeof this.input.blur === 'function') {\n this.input.blur();\n }\n\n this.handleOnBlur();\n }\n }, {\n key: 'accept',\n value: function accept() {\n var tag = this._tag();\n\n if (tag !== '') {\n tag = this._makeTag(tag);\n return this._addTags([tag]);\n }\n\n return false;\n }\n }, {\n key: 'addTag',\n value: function addTag(tag) {\n return this._addTags([tag]);\n }\n }, {\n key: 'clearInput',\n value: function clearInput() {\n this._clearInput();\n }\n }, {\n key: 'handlePaste',\n value: function handlePaste(e) {\n var _this3 = this;\n\n var _props2 = this.props,\n addOnPaste = _props2.addOnPaste,\n pasteSplit = _props2.pasteSplit;\n\n if (!addOnPaste) {\n return;\n }\n\n e.preventDefault();\n var data = getClipboardData(e);\n var tags = pasteSplit(data).map(function (tag) {\n return _this3._makeTag(tag);\n });\n\n this._addTags(tags);\n }\n }, {\n key: 'handleKeyDown',\n value: function handleKeyDown(e) {\n if (e.defaultPrevented) {\n return;\n }\n\n var _props3 = this.props,\n value = _props3.value,\n removeKeys = _props3.removeKeys,\n addKeys = _props3.addKeys;\n\n var tag = this._tag();\n\n var empty = tag === '';\n var keyCode = e.keyCode;\n var key = e.key;\n var add = addKeys.indexOf(keyCode) !== -1 || addKeys.indexOf(key) !== -1;\n var remove = removeKeys.indexOf(keyCode) !== -1 || removeKeys.indexOf(key) !== -1;\n\n if (add) {\n var added = this.accept();\n\n if (this._shouldPreventDefaultEventOnAdd(added, empty, keyCode)) {\n e.preventDefault();\n }\n }\n\n if (remove && value.length > 0 && empty) {\n e.preventDefault();\n\n this._removeTag(value.length - 1);\n }\n }\n }, {\n key: 'handleClick',\n value: function handleClick(e) {\n if (e.target === this.div) {\n this.focus();\n }\n }\n }, {\n key: 'handleChange',\n value: function handleChange(e) {\n var onChangeInput = this.props.onChangeInput;\n var onChange = this.props.inputProps.onChange;\n var tag = e.target.value;\n\n if (onChange) {\n onChange(e);\n }\n\n if (this.hasControlledInput()) {\n onChangeInput(tag);\n } else {\n this.setState({\n tag: tag\n });\n }\n }\n }, {\n key: 'handleOnFocus',\n value: function handleOnFocus(e) {\n var onFocus = this.props.inputProps.onFocus;\n\n if (onFocus) {\n onFocus(e);\n }\n\n this.setState({\n isFocused: true\n });\n }\n }, {\n key: 'handleOnBlur',\n value: function handleOnBlur(e) {\n var onBlur = this.props.inputProps.onBlur;\n this.setState({\n isFocused: false\n });\n\n if (e == null) {\n return;\n }\n\n if (onBlur) {\n onBlur(e);\n }\n\n if (this.props.addOnBlur) {\n var tag = this._makeTag(e.target.value);\n\n this._addTags([tag]);\n }\n }\n }, {\n key: 'handleRemove',\n value: function handleRemove(tag) {\n this._removeTag(tag);\n }\n }, {\n key: 'inputProps',\n value: function inputProps() {\n var _props$inputProps = this.props.inputProps,\n onChange = _props$inputProps.onChange,\n onFocus = _props$inputProps.onFocus,\n onBlur = _props$inputProps.onBlur,\n otherInputProps = _objectWithoutProperties(_props$inputProps, ['onChange', 'onFocus', 'onBlur']);\n\n var props = _extends({}, defaultInputProps, otherInputProps);\n\n if (this.props.disabled) {\n props.disabled = true;\n }\n\n return props;\n }\n }, {\n key: 'inputValue',\n value: function inputValue(props) {\n return props.currentValue || props.inputValue || '';\n }\n }, {\n key: 'hasControlledInput',\n value: function hasControlledInput() {\n var _props4 = this.props,\n inputValue = _props4.inputValue,\n onChangeInput = _props4.onChangeInput;\n return typeof onChangeInput === 'function' && typeof inputValue === 'string';\n }\n }, {\n key: 'componentDidMount',\n value: function componentDidMount() {\n if (this.hasControlledInput()) {\n return;\n }\n\n this.setState({\n tag: this.inputValue(this.props)\n });\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n /* istanbul ignore next */\n if (this.hasControlledInput()) {\n return;\n }\n\n if (!this.inputValue(nextProps)) {\n return;\n }\n\n this.setState({\n tag: this.inputValue(nextProps)\n });\n }\n }, {\n key: 'render',\n value: function render() {\n var _this4 = this;\n\n var _props5 = this.props,\n value = _props5.value,\n onChange = _props5.onChange,\n tagProps = _props5.tagProps,\n renderLayout = _props5.renderLayout,\n renderTag = _props5.renderTag,\n renderInput = _props5.renderInput,\n addKeys = _props5.addKeys,\n removeKeys = _props5.removeKeys,\n className = _props5.className,\n focusedClassName = _props5.focusedClassName,\n addOnBlur = _props5.addOnBlur,\n addOnPaste = _props5.addOnPaste,\n inputProps = _props5.inputProps,\n pasteSplit = _props5.pasteSplit,\n onlyUnique = _props5.onlyUnique,\n maxTags = _props5.maxTags,\n validationRegex = _props5.validationRegex,\n disabled = _props5.disabled,\n tagDisplayProp = _props5.tagDisplayProp,\n inputValue = _props5.inputValue,\n onChangeInput = _props5.onChangeInput,\n other = _objectWithoutProperties(_props5, ['value', 'onChange', 'tagProps', 'renderLayout', 'renderTag', 'renderInput', 'addKeys', 'removeKeys', 'className', 'focusedClassName', 'addOnBlur', 'addOnPaste', 'inputProps', 'pasteSplit', 'onlyUnique', 'maxTags', 'validationRegex', 'disabled', 'tagDisplayProp', 'inputValue', 'onChangeInput']);\n\n var isFocused = this.state.isFocused;\n\n if (isFocused) {\n className += ' ' + focusedClassName;\n }\n\n var tagComponents = value.map(function (tag, index) {\n return renderTag(_extends({\n key: index,\n tag: tag,\n onRemove: _this4.handleRemove.bind(_this4),\n disabled: disabled,\n getTagDisplayValue: _this4._getTagDisplayValue.bind(_this4)\n }, tagProps));\n });\n var inputComponent = renderInput(_extends({\n ref: function ref(r) {\n _this4.input = r;\n },\n value: this._tag(),\n onPaste: this.handlePaste.bind(this),\n onKeyDown: this.handleKeyDown.bind(this),\n onChange: this.handleChange.bind(this),\n onFocus: this.handleOnFocus.bind(this),\n onBlur: this.handleOnBlur.bind(this),\n addTag: this.addTag.bind(this)\n }, this.inputProps()));\n return _react2.default.createElement('div', {\n ref: function ref(r) {\n _this4.div = r;\n },\n onClick: this.handleClick.bind(this),\n className: className\n }, renderLayout(tagComponents, inputComponent));\n }\n }]);\n\n return TagsInput;\n }(_react2.default.Component);\n\n TagsInput.defaultProps = {\n className: 'react-tagsinput',\n focusedClassName: 'react-tagsinput--focused',\n addKeys: [9, 13],\n addOnBlur: false,\n addOnPaste: false,\n inputProps: {},\n removeKeys: [8],\n renderInput: defaultRenderInput,\n renderTag: defaultRenderTag,\n renderLayout: defaultRenderLayout,\n pasteSplit: defaultPasteSplit,\n tagProps: {\n className: 'react-tagsinput-tag',\n classNameRemove: 'react-tagsinput-remove'\n },\n onlyUnique: false,\n maxTags: -1,\n validationRegex: /.*/,\n disabled: false,\n tagDisplayProp: null,\n preventSubmit: true\n };\n exports.default = TagsInput;\n module.exports = exports['default'];\n});","function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nmodule.exports = _inheritsLoose;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nvar defaultProps = {\n fluid: false\n};\nvar Container = React.forwardRef(function (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n fluid = _ref.fluid,\n _ref$as = _ref.as,\n Component = _ref$as === void 0 ? 'div' : _ref$as,\n className = _ref.className,\n props = _objectWithoutPropertiesLoose(_ref, [\"bsPrefix\", \"fluid\", \"as\", \"className\"]);\n\n var prefix = useBootstrapPrefix(bsPrefix, 'container');\n var suffix = typeof fluid === 'string' ? \"-\" + fluid : '-fluid';\n return (\n /*#__PURE__*/\n React.createElement(Component, _extends({\n ref: ref\n }, props, {\n className: classNames(className, fluid ? \"\" + prefix + suffix : prefix)\n }))\n );\n});\nContainer.displayName = 'Container';\nContainer.defaultProps = defaultProps;\nexport default Container;","!function (e, t) {\n \"object\" == typeof exports && \"undefined\" != typeof module ? t(exports) : \"function\" == typeof define && define.amd ? define([\"exports\"], t) : t(e.reduxLogger = e.reduxLogger || {});\n}(this, function (e) {\n \"use strict\";\n\n function t(e, t) {\n e.super_ = t, e.prototype = Object.create(t.prototype, {\n constructor: {\n value: e,\n enumerable: !1,\n writable: !0,\n configurable: !0\n }\n });\n }\n\n function r(e, t) {\n Object.defineProperty(this, \"kind\", {\n value: e,\n enumerable: !0\n }), t && t.length && Object.defineProperty(this, \"path\", {\n value: t,\n enumerable: !0\n });\n }\n\n function n(e, t, r) {\n n.super_.call(this, \"E\", e), Object.defineProperty(this, \"lhs\", {\n value: t,\n enumerable: !0\n }), Object.defineProperty(this, \"rhs\", {\n value: r,\n enumerable: !0\n });\n }\n\n function o(e, t) {\n o.super_.call(this, \"N\", e), Object.defineProperty(this, \"rhs\", {\n value: t,\n enumerable: !0\n });\n }\n\n function i(e, t) {\n i.super_.call(this, \"D\", e), Object.defineProperty(this, \"lhs\", {\n value: t,\n enumerable: !0\n });\n }\n\n function a(e, t, r) {\n a.super_.call(this, \"A\", e), Object.defineProperty(this, \"index\", {\n value: t,\n enumerable: !0\n }), Object.defineProperty(this, \"item\", {\n value: r,\n enumerable: !0\n });\n }\n\n function f(e, t, r) {\n var n = e.slice((r || t) + 1 || e.length);\n return e.length = t < 0 ? e.length + t : t, e.push.apply(e, n), e;\n }\n\n function u(e) {\n var t = \"undefined\" == typeof e ? \"undefined\" : N(e);\n return \"object\" !== t ? t : e === Math ? \"math\" : null === e ? \"null\" : Array.isArray(e) ? \"array\" : \"[object Date]\" === Object.prototype.toString.call(e) ? \"date\" : \"function\" == typeof e.toString && /^\\/.*\\//.test(e.toString()) ? \"regexp\" : \"object\";\n }\n\n function l(e, t, r, c, s, d, p) {\n s = s || [], p = p || [];\n var g = s.slice(0);\n\n if (\"undefined\" != typeof d) {\n if (c) {\n if (\"function\" == typeof c && c(g, d)) return;\n\n if (\"object\" === (\"undefined\" == typeof c ? \"undefined\" : N(c))) {\n if (c.prefilter && c.prefilter(g, d)) return;\n\n if (c.normalize) {\n var h = c.normalize(g, d, e, t);\n h && (e = h[0], t = h[1]);\n }\n }\n }\n\n g.push(d);\n }\n\n \"regexp\" === u(e) && \"regexp\" === u(t) && (e = e.toString(), t = t.toString());\n var y = \"undefined\" == typeof e ? \"undefined\" : N(e),\n v = \"undefined\" == typeof t ? \"undefined\" : N(t),\n b = \"undefined\" !== y || p && p[p.length - 1].lhs && p[p.length - 1].lhs.hasOwnProperty(d),\n m = \"undefined\" !== v || p && p[p.length - 1].rhs && p[p.length - 1].rhs.hasOwnProperty(d);\n if (!b && m) r(new o(g, t));else if (!m && b) r(new i(g, e));else if (u(e) !== u(t)) r(new n(g, e, t));else if (\"date\" === u(e) && e - t !== 0) r(new n(g, e, t));else if (\"object\" === y && null !== e && null !== t) {\n if (p.filter(function (t) {\n return t.lhs === e;\n }).length) e !== t && r(new n(g, e, t));else {\n if (p.push({\n lhs: e,\n rhs: t\n }), Array.isArray(e)) {\n var w;\n e.length;\n\n for (w = 0; w < e.length; w++) {\n w >= t.length ? r(new a(g, w, new i(void 0, e[w]))) : l(e[w], t[w], r, c, g, w, p);\n }\n\n for (; w < t.length;) {\n r(new a(g, w, new o(void 0, t[w++])));\n }\n } else {\n var x = Object.keys(e),\n S = Object.keys(t);\n x.forEach(function (n, o) {\n var i = S.indexOf(n);\n i >= 0 ? (l(e[n], t[n], r, c, g, n, p), S = f(S, i)) : l(e[n], void 0, r, c, g, n, p);\n }), S.forEach(function (e) {\n l(void 0, t[e], r, c, g, e, p);\n });\n }\n\n p.length = p.length - 1;\n }\n } else e !== t && (\"number\" === y && isNaN(e) && isNaN(t) || r(new n(g, e, t)));\n }\n\n function c(e, t, r, n) {\n return n = n || [], l(e, t, function (e) {\n e && n.push(e);\n }, r), n.length ? n : void 0;\n }\n\n function s(e, t, r) {\n if (r.path && r.path.length) {\n var n,\n o = e[t],\n i = r.path.length - 1;\n\n for (n = 0; n < i; n++) {\n o = o[r.path[n]];\n }\n\n switch (r.kind) {\n case \"A\":\n s(o[r.path[n]], r.index, r.item);\n break;\n\n case \"D\":\n delete o[r.path[n]];\n break;\n\n case \"E\":\n case \"N\":\n o[r.path[n]] = r.rhs;\n }\n } else switch (r.kind) {\n case \"A\":\n s(e[t], r.index, r.item);\n break;\n\n case \"D\":\n e = f(e, t);\n break;\n\n case \"E\":\n case \"N\":\n e[t] = r.rhs;\n }\n\n return e;\n }\n\n function d(e, t, r) {\n if (e && t && r && r.kind) {\n for (var n = e, o = -1, i = r.path ? r.path.length - 1 : 0; ++o < i;) {\n \"undefined\" == typeof n[r.path[o]] && (n[r.path[o]] = \"number\" == typeof r.path[o] ? [] : {}), n = n[r.path[o]];\n }\n\n switch (r.kind) {\n case \"A\":\n s(r.path ? n[r.path[o]] : n, r.index, r.item);\n break;\n\n case \"D\":\n delete n[r.path[o]];\n break;\n\n case \"E\":\n case \"N\":\n n[r.path[o]] = r.rhs;\n }\n }\n }\n\n function p(e, t, r) {\n if (r.path && r.path.length) {\n var n,\n o = e[t],\n i = r.path.length - 1;\n\n for (n = 0; n < i; n++) {\n o = o[r.path[n]];\n }\n\n switch (r.kind) {\n case \"A\":\n p(o[r.path[n]], r.index, r.item);\n break;\n\n case \"D\":\n o[r.path[n]] = r.lhs;\n break;\n\n case \"E\":\n o[r.path[n]] = r.lhs;\n break;\n\n case \"N\":\n delete o[r.path[n]];\n }\n } else switch (r.kind) {\n case \"A\":\n p(e[t], r.index, r.item);\n break;\n\n case \"D\":\n e[t] = r.lhs;\n break;\n\n case \"E\":\n e[t] = r.lhs;\n break;\n\n case \"N\":\n e = f(e, t);\n }\n\n return e;\n }\n\n function g(e, t, r) {\n if (e && t && r && r.kind) {\n var n,\n o,\n i = e;\n\n for (o = r.path.length - 1, n = 0; n < o; n++) {\n \"undefined\" == typeof i[r.path[n]] && (i[r.path[n]] = {}), i = i[r.path[n]];\n }\n\n switch (r.kind) {\n case \"A\":\n p(i[r.path[n]], r.index, r.item);\n break;\n\n case \"D\":\n i[r.path[n]] = r.lhs;\n break;\n\n case \"E\":\n i[r.path[n]] = r.lhs;\n break;\n\n case \"N\":\n delete i[r.path[n]];\n }\n }\n }\n\n function h(e, t, r) {\n if (e && t) {\n var n = function n(_n) {\n r && !r(e, t, _n) || d(e, t, _n);\n };\n\n l(e, t, n);\n }\n }\n\n function y(e) {\n return \"color: \" + F[e].color + \"; font-weight: bold\";\n }\n\n function v(e) {\n var t = e.kind,\n r = e.path,\n n = e.lhs,\n o = e.rhs,\n i = e.index,\n a = e.item;\n\n switch (t) {\n case \"E\":\n return [r.join(\".\"), n, \"→\", o];\n\n case \"N\":\n return [r.join(\".\"), o];\n\n case \"D\":\n return [r.join(\".\")];\n\n case \"A\":\n return [r.join(\".\") + \"[\" + i + \"]\", a];\n\n default:\n return [];\n }\n }\n\n function b(e, t, r, n) {\n var o = c(e, t);\n\n try {\n n ? r.groupCollapsed(\"diff\") : r.group(\"diff\");\n } catch (e) {\n r.log(\"diff\");\n }\n\n o ? o.forEach(function (e) {\n var t = e.kind,\n n = v(e);\n r.log.apply(r, [\"%c \" + F[t].text, y(t)].concat(P(n)));\n }) : r.log(\"—— no diff ——\");\n\n try {\n r.groupEnd();\n } catch (e) {\n r.log(\"—— diff end —— \");\n }\n }\n\n function m(e, t, r, n) {\n switch (\"undefined\" == typeof e ? \"undefined\" : N(e)) {\n case \"object\":\n return \"function\" == typeof e[n] ? e[n].apply(e, P(r)) : e[n];\n\n case \"function\":\n return e(t);\n\n default:\n return e;\n }\n }\n\n function w(e) {\n var t = e.timestamp,\n r = e.duration;\n return function (e, n, o) {\n var i = [\"action\"];\n return i.push(\"%c\" + String(e.type)), t && i.push(\"%c@ \" + n), r && i.push(\"%c(in \" + o.toFixed(2) + \" ms)\"), i.join(\" \");\n };\n }\n\n function x(e, t) {\n var r = t.logger,\n n = t.actionTransformer,\n o = t.titleFormatter,\n i = void 0 === o ? w(t) : o,\n a = t.collapsed,\n f = t.colors,\n u = t.level,\n l = t.diff,\n c = \"undefined\" == typeof t.titleFormatter;\n e.forEach(function (o, s) {\n var d = o.started,\n p = o.startedTime,\n g = o.action,\n h = o.prevState,\n y = o.error,\n v = o.took,\n w = o.nextState,\n x = e[s + 1];\n x && (w = x.prevState, v = x.started - d);\n var S = n(g),\n k = \"function\" == typeof a ? a(function () {\n return w;\n }, g, o) : a,\n j = D(p),\n E = f.title ? \"color: \" + f.title(S) + \";\" : \"\",\n A = [\"color: gray; font-weight: lighter;\"];\n A.push(E), t.timestamp && A.push(\"color: gray; font-weight: lighter;\"), t.duration && A.push(\"color: gray; font-weight: lighter;\");\n var O = i(S, j, v);\n\n try {\n k ? f.title && c ? r.groupCollapsed.apply(r, [\"%c \" + O].concat(A)) : r.groupCollapsed(O) : f.title && c ? r.group.apply(r, [\"%c \" + O].concat(A)) : r.group(O);\n } catch (e) {\n r.log(O);\n }\n\n var N = m(u, S, [h], \"prevState\"),\n P = m(u, S, [S], \"action\"),\n C = m(u, S, [y, h], \"error\"),\n F = m(u, S, [w], \"nextState\");\n if (N) if (f.prevState) {\n var L = \"color: \" + f.prevState(h) + \"; font-weight: bold\";\n r[N](\"%c prev state\", L, h);\n } else r[N](\"prev state\", h);\n if (P) if (f.action) {\n var T = \"color: \" + f.action(S) + \"; font-weight: bold\";\n r[P](\"%c action \", T, S);\n } else r[P](\"action \", S);\n if (y && C) if (f.error) {\n var M = \"color: \" + f.error(y, h) + \"; font-weight: bold;\";\n r[C](\"%c error \", M, y);\n } else r[C](\"error \", y);\n if (F) if (f.nextState) {\n var _ = \"color: \" + f.nextState(w) + \"; font-weight: bold\";\n\n r[F](\"%c next state\", _, w);\n } else r[F](\"next state\", w);\n l && b(h, w, r, k);\n\n try {\n r.groupEnd();\n } catch (e) {\n r.log(\"—— log end ——\");\n }\n });\n }\n\n function S() {\n var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},\n t = Object.assign({}, L, e),\n r = t.logger,\n n = t.stateTransformer,\n o = t.errorTransformer,\n i = t.predicate,\n a = t.logErrors,\n f = t.diffPredicate;\n if (\"undefined\" == typeof r) return function () {\n return function (e) {\n return function (t) {\n return e(t);\n };\n };\n };\n if (e.getState && e.dispatch) return console.error(\"[redux-logger] redux-logger not installed. Make sure to pass logger instance as middleware:\\n// Logger with default options\\nimport { logger } from 'redux-logger'\\nconst store = createStore(\\n reducer,\\n applyMiddleware(logger)\\n)\\n// Or you can create your own logger with custom options http://bit.ly/redux-logger-options\\nimport createLogger from 'redux-logger'\\nconst logger = createLogger({\\n // ...options\\n});\\nconst store = createStore(\\n reducer,\\n applyMiddleware(logger)\\n)\\n\"), function () {\n return function (e) {\n return function (t) {\n return e(t);\n };\n };\n };\n var u = [];\n return function (e) {\n var r = e.getState;\n return function (e) {\n return function (l) {\n if (\"function\" == typeof i && !i(r, l)) return e(l);\n var c = {};\n u.push(c), c.started = O.now(), c.startedTime = new Date(), c.prevState = n(r()), c.action = l;\n var s = void 0;\n if (a) try {\n s = e(l);\n } catch (e) {\n c.error = o(e);\n } else s = e(l);\n c.took = O.now() - c.started, c.nextState = n(r());\n var d = t.diff && \"function\" == typeof f ? f(r, l) : t.diff;\n if (x(u, Object.assign({}, t, {\n diff: d\n })), u.length = 0, c.error) throw c.error;\n return s;\n };\n };\n };\n }\n\n var k,\n j,\n E = function E(e, t) {\n return new Array(t + 1).join(e);\n },\n A = function A(e, t) {\n return E(\"0\", t - e.toString().length) + e;\n },\n D = function D(e) {\n return A(e.getHours(), 2) + \":\" + A(e.getMinutes(), 2) + \":\" + A(e.getSeconds(), 2) + \".\" + A(e.getMilliseconds(), 3);\n },\n O = \"undefined\" != typeof performance && null !== performance && \"function\" == typeof performance.now ? performance : Date,\n 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 P = function P(e) {\n if (Array.isArray(e)) {\n for (var t = 0, r = Array(e.length); t < e.length; t++) {\n r[t] = e[t];\n }\n\n return r;\n }\n\n return Array.from(e);\n },\n C = [];\n\n k = \"object\" === (\"undefined\" == typeof global ? \"undefined\" : N(global)) && global ? global : \"undefined\" != typeof window ? window : {}, j = k.DeepDiff, j && C.push(function () {\n \"undefined\" != typeof j && k.DeepDiff === c && (k.DeepDiff = j, j = void 0);\n }), t(n, r), t(o, r), t(i, r), t(a, r), Object.defineProperties(c, {\n diff: {\n value: c,\n enumerable: !0\n },\n observableDiff: {\n value: l,\n enumerable: !0\n },\n applyDiff: {\n value: h,\n enumerable: !0\n },\n applyChange: {\n value: d,\n enumerable: !0\n },\n revertChange: {\n value: g,\n enumerable: !0\n },\n isConflict: {\n value: function value() {\n return \"undefined\" != typeof j;\n },\n enumerable: !0\n },\n noConflict: {\n value: function value() {\n return C && (C.forEach(function (e) {\n e();\n }), C = null), c;\n },\n enumerable: !0\n }\n });\n\n var F = {\n E: {\n color: \"#2196F3\",\n text: \"CHANGED:\"\n },\n N: {\n color: \"#4CAF50\",\n text: \"ADDED:\"\n },\n D: {\n color: \"#F44336\",\n text: \"DELETED:\"\n },\n A: {\n color: \"#2196F3\",\n text: \"ARRAY:\"\n }\n },\n L = {\n level: \"log\",\n logger: console,\n logErrors: !0,\n collapsed: void 0,\n predicate: void 0,\n duration: !1,\n timestamp: !0,\n stateTransformer: function stateTransformer(e) {\n return e;\n },\n actionTransformer: function actionTransformer(e) {\n return e;\n },\n errorTransformer: function errorTransformer(e) {\n return e;\n },\n colors: {\n title: function title() {\n return \"inherit\";\n },\n prevState: function prevState() {\n return \"#9E9E9E\";\n },\n action: function action() {\n return \"#03A9F4\";\n },\n nextState: function nextState() {\n return \"#4CAF50\";\n },\n error: function error() {\n return \"#F20404\";\n }\n },\n diff: !1,\n diffPredicate: void 0,\n transformer: void 0\n },\n T = function T() {\n var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},\n t = e.dispatch,\n r = e.getState;\n return \"function\" == typeof t || \"function\" == typeof r ? S()({\n dispatch: t,\n getState: r\n }) : void console.error(\"\\n[redux-logger v3] BREAKING CHANGE\\n[redux-logger v3] Since 3.0.0 redux-logger exports by default logger with default settings.\\n[redux-logger v3] Change\\n[redux-logger v3] import createLogger from 'redux-logger'\\n[redux-logger v3] to\\n[redux-logger v3] import { createLogger } from 'redux-logger'\\n\");\n };\n\n e.defaults = L, e.createLogger = S, e.logger = T, e.default = T, Object.defineProperty(e, \"__esModule\", {\n value: !0\n });\n});","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\n/**\n * Memo class used for decycle json objects. Uses WeakSet if available otherwise array.\n */\nvar Memo =\n/** @class */\nfunction () {\n function Memo() {\n this._hasWeakSet = typeof WeakSet === 'function';\n this._inner = this._hasWeakSet ? new WeakSet() : [];\n }\n /**\n * Sets obj to remember.\n * @param obj Object to remember\n */\n\n\n Memo.prototype.memoize = function (obj) {\n if (this._hasWeakSet) {\n if (this._inner.has(obj)) {\n return true;\n }\n\n this._inner.add(obj);\n\n return false;\n } // eslint-disable-next-line @typescript-eslint/prefer-for-of\n\n\n for (var i = 0; i < this._inner.length; i++) {\n var value = this._inner[i];\n\n if (value === obj) {\n return true;\n }\n }\n\n this._inner.push(obj);\n\n return false;\n };\n /**\n * Removes object from internal storage.\n * @param obj Object to forget\n */\n\n\n Memo.prototype.unmemoize = function (obj) {\n if (this._hasWeakSet) {\n this._inner.delete(obj);\n } else {\n for (var i = 0; i < this._inner.length; i++) {\n if (this._inner[i] === obj) {\n this._inner.splice(i, 1);\n\n break;\n }\n }\n }\n };\n\n return Memo;\n}();\n\nexport { Memo };","import { addInstrumentationHandler, logger } from '@sentry/utils';\nimport { SpanStatus } from './spanstatus';\nimport { getActiveTransaction } from './utils';\n/**\n * Configures global error listeners\n */\n\nexport function registerErrorInstrumentation() {\n addInstrumentationHandler({\n callback: errorCallback,\n type: 'error'\n });\n addInstrumentationHandler({\n callback: errorCallback,\n type: 'unhandledrejection'\n });\n}\n/**\n * If an error or unhandled promise occurs, we mark the active transaction as failed\n */\n\nfunction errorCallback() {\n var activeTransaction = getActiveTransaction();\n\n if (activeTransaction) {\n logger.log(\"[Tracing] Transaction: \" + SpanStatus.InternalError + \" -> Global error occured\");\n activeTransaction.setStatus(SpanStatus.InternalError);\n }\n}","var eventListenerOptions;\nvar eventMap = new WeakMap();\n\nfunction getOptions() {\n if (eventListenerOptions !== undefined) {\n return eventListenerOptions;\n }\n\n var supportPassiveEvent = false;\n\n try {\n var noop = function noop() {};\n\n var options = Object.defineProperty({}, 'passive', {\n enumerable: true,\n get: function get() {\n supportPassiveEvent = true;\n return true;\n }\n });\n window.addEventListener('testPassive', noop, options);\n window.removeEventListener('testPassive', noop, options);\n } catch (e) {}\n\n eventListenerOptions = supportPassiveEvent ? {\n passive: false\n } : false;\n return eventListenerOptions;\n}\n\nexport function eventScope(scrollbar) {\n var configs = eventMap.get(scrollbar) || [];\n eventMap.set(scrollbar, configs);\n return function addEvent(elem, events, fn) {\n function handler(event) {\n // ignore default prevented events\n if (event.defaultPrevented) {\n return;\n }\n\n fn(event);\n }\n\n events.split(/\\s+/g).forEach(function (eventName) {\n configs.push({\n elem: elem,\n eventName: eventName,\n handler: handler\n });\n elem.addEventListener(eventName, handler, getOptions());\n });\n };\n}\nexport function clearEventsOn(scrollbar) {\n var configs = eventMap.get(scrollbar);\n\n if (!configs) {\n return;\n }\n\n configs.forEach(function (_a) {\n var elem = _a.elem,\n eventName = _a.eventName,\n handler = _a.handler;\n elem.removeEventListener(eventName, handler, getOptions());\n });\n eventMap.delete(scrollbar);\n}","import { getPointerData } from './get-pointer-data';\n/**\n * Get pointer/finger position\n */\n\nexport function getPosition(evt) {\n var data = getPointerData(evt);\n return {\n x: data.clientX,\n y: data.clientY\n };\n}","/**\n * Get pointer/touch data\n */\nexport function getPointerData(evt) {\n // if is touch event, return last item in touchList\n // else return original event\n return evt.touches ? evt.touches[evt.touches.length - 1] : evt;\n}","/**\n * Check if `a` is one of `[...b]`\n */\nexport function isOneOf(a, b) {\n if (b === void 0) {\n b = [];\n }\n\n return b.some(function (v) {\n return a === v;\n });\n}","var VENDOR_PREFIX = ['webkit', 'moz', 'ms', 'o'];\nvar RE = new RegExp(\"^-(?!(?:\" + VENDOR_PREFIX.join('|') + \")-)\");\n\nfunction autoPrefix(styles) {\n var res = {};\n Object.keys(styles).forEach(function (prop) {\n if (!RE.test(prop)) {\n res[prop] = styles[prop];\n return;\n }\n\n var val = styles[prop];\n prop = prop.replace(/^-/, '');\n res[prop] = val;\n VENDOR_PREFIX.forEach(function (prefix) {\n res[\"-\" + prefix + \"-\" + prop] = val;\n });\n });\n return res;\n}\n\nexport function setStyle(elem, styles) {\n styles = autoPrefix(styles);\n Object.keys(styles).forEach(function (prop) {\n var cssProp = prop.replace(/^-/, '').replace(/-([a-z])/g, function (_, $1) {\n return $1.toUpperCase();\n });\n elem.style[cssProp] = styles[prop];\n });\n}","import { __assign } from \"tslib\";\nimport { getPosition } from './get-position';\n\nvar Tracker =\n/** @class */\nfunction () {\n function Tracker(touch) {\n this.velocityMultiplier = window.devicePixelRatio;\n this.updateTime = Date.now();\n this.delta = {\n x: 0,\n y: 0\n };\n this.velocity = {\n x: 0,\n y: 0\n };\n this.lastPosition = {\n x: 0,\n y: 0\n };\n this.lastPosition = getPosition(touch);\n }\n\n Tracker.prototype.update = function (touch) {\n var _a = this,\n velocity = _a.velocity,\n updateTime = _a.updateTime,\n lastPosition = _a.lastPosition;\n\n var now = Date.now();\n var position = getPosition(touch);\n var delta = {\n x: -(position.x - lastPosition.x),\n y: -(position.y - lastPosition.y)\n };\n var duration = now - updateTime || 16.7;\n var vx = delta.x / duration * 16.7;\n var vy = delta.y / duration * 16.7;\n velocity.x = vx * this.velocityMultiplier;\n velocity.y = vy * this.velocityMultiplier;\n this.delta = delta;\n this.updateTime = now;\n this.lastPosition = position;\n };\n\n return Tracker;\n}();\n\nexport { Tracker };\n\nvar TouchRecord =\n/** @class */\nfunction () {\n function TouchRecord() {\n this._touchList = {};\n }\n\n Object.defineProperty(TouchRecord.prototype, \"_primitiveValue\", {\n get: function get() {\n return {\n x: 0,\n y: 0\n };\n },\n enumerable: true,\n configurable: true\n });\n\n TouchRecord.prototype.isActive = function () {\n return this._activeTouchID !== undefined;\n };\n\n TouchRecord.prototype.getDelta = function () {\n var tracker = this._getActiveTracker();\n\n if (!tracker) {\n return this._primitiveValue;\n }\n\n return __assign({}, tracker.delta);\n };\n\n TouchRecord.prototype.getVelocity = function () {\n var tracker = this._getActiveTracker();\n\n if (!tracker) {\n return this._primitiveValue;\n }\n\n return __assign({}, tracker.velocity);\n };\n\n TouchRecord.prototype.getEasingDistance = function (damping) {\n var deAcceleration = 1 - damping;\n var distance = {\n x: 0,\n y: 0\n };\n var vel = this.getVelocity();\n Object.keys(vel).forEach(function (dir) {\n // ignore small velocity\n var v = Math.abs(vel[dir]) <= 10 ? 0 : vel[dir];\n\n while (v !== 0) {\n distance[dir] += v;\n v = v * deAcceleration | 0;\n }\n });\n return distance;\n };\n\n TouchRecord.prototype.track = function (evt) {\n var _this = this;\n\n var targetTouches = evt.targetTouches;\n Array.from(targetTouches).forEach(function (touch) {\n _this._add(touch);\n });\n return this._touchList;\n };\n\n TouchRecord.prototype.update = function (evt) {\n var _this = this;\n\n var touches = evt.touches,\n changedTouches = evt.changedTouches;\n Array.from(touches).forEach(function (touch) {\n _this._renew(touch);\n });\n\n this._setActiveID(changedTouches);\n\n return this._touchList;\n };\n\n TouchRecord.prototype.release = function (evt) {\n var _this = this;\n\n delete this._activeTouchID;\n Array.from(evt.changedTouches).forEach(function (touch) {\n _this._delete(touch);\n });\n };\n\n TouchRecord.prototype._add = function (touch) {\n if (this._has(touch)) {\n // reset tracker\n this._delete(touch);\n }\n\n var tracker = new Tracker(touch);\n this._touchList[touch.identifier] = tracker;\n };\n\n TouchRecord.prototype._renew = function (touch) {\n if (!this._has(touch)) {\n return;\n }\n\n var tracker = this._touchList[touch.identifier];\n tracker.update(touch);\n };\n\n TouchRecord.prototype._delete = function (touch) {\n delete this._touchList[touch.identifier];\n };\n\n TouchRecord.prototype._has = function (touch) {\n return this._touchList.hasOwnProperty(touch.identifier);\n };\n\n TouchRecord.prototype._setActiveID = function (touches) {\n this._activeTouchID = touches[touches.length - 1].identifier;\n };\n\n TouchRecord.prototype._getActiveTracker = function () {\n var _a = this,\n _touchList = _a._touchList,\n _activeTouchID = _a._activeTouchID;\n\n return _touchList[_activeTouchID];\n };\n\n return TouchRecord;\n}();\n\nexport { TouchRecord };","export function clamp(value, lower, upper) {\n return Math.max(lower, Math.min(upper, value));\n}","export function debounce(fn, wait, leading) {\n if (wait === void 0) {\n wait = 0;\n }\n\n var timer;\n var lastCalledAt = -Infinity;\n return function debouncedFn() {\n var _this = this;\n\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n if (leading) {\n var now = Date.now();\n var elapsed = now - lastCalledAt;\n lastCalledAt = now;\n\n if (elapsed >= wait) {\n fn.apply(this, args);\n }\n } else {\n return;\n }\n\n clearTimeout(timer);\n timer = setTimeout(function () {\n fn.apply(_this, args);\n }, wait);\n };\n}","import { clamp } from '../utils';\nexport function range(min, max) {\n if (min === void 0) {\n min = -Infinity;\n }\n\n if (max === void 0) {\n max = Infinity;\n }\n\n return function (proto, key) {\n var alias = \"_\" + key;\n Object.defineProperty(proto, key, {\n get: function get() {\n return this[alias];\n },\n set: function set(val) {\n Object.defineProperty(this, alias, {\n value: clamp(val, min, max),\n enumerable: false,\n writable: true,\n configurable: true\n });\n },\n enumerable: true,\n configurable: true\n });\n };\n}","function _boolean(proto, key) {\n var alias = \"_\" + key;\n Object.defineProperty(proto, key, {\n get: function get() {\n return this[alias];\n },\n set: function set(val) {\n Object.defineProperty(this, alias, {\n value: !!val,\n enumerable: false,\n writable: true,\n configurable: true\n });\n },\n enumerable: true,\n configurable: true\n });\n}\n\nexport { _boolean as boolean };","import { __spreadArrays } from \"tslib\";\nimport { debounce as $debounce } from '../utils';\nexport function debounce() {\n var options = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n options[_i] = arguments[_i];\n }\n\n return function (_proto, key, descriptor) {\n var fn = descriptor.value;\n return {\n get: function get() {\n if (!this.hasOwnProperty(key)) {\n Object.defineProperty(this, key, {\n value: $debounce.apply(void 0, __spreadArrays([fn], options))\n });\n }\n\n return this[key];\n }\n };\n };\n}","import { __decorate } from \"tslib\";\nimport { range, boolean as _boolean } from './decorators/';\n\nvar Options =\n/** @class */\nfunction () {\n function Options(config) {\n var _this = this;\n\n if (config === void 0) {\n config = {};\n }\n /**\n * Momentum reduction damping factor, a float value between `(0, 1)`.\n * The lower the value is, the more smooth the scrolling will be\n * (also the more paint frames).\n */\n\n\n this.damping = 0.1;\n /**\n * Minimal size for scrollbar thumbs.\n */\n\n this.thumbMinSize = 20;\n /**\n * Render every frame in integer pixel values\n * set to `true` to improve scrolling performance.\n */\n\n this.renderByPixels = true;\n /**\n * Keep scrollbar tracks visible\n */\n\n this.alwaysShowTracks = false;\n /**\n * Set to `true` to allow outer scrollbars continue scrolling\n * when current scrollbar reaches edge.\n */\n\n this.continuousScrolling = true;\n /**\n * Delegate wheel events and touch events to the given element.\n * By default, the container element is used.\n * This option will be useful for dealing with fixed elements.\n */\n\n this.delegateTo = null;\n /**\n * Options for plugins. Syntax:\n * plugins[pluginName] = pluginOptions: any\n */\n\n this.plugins = {};\n Object.keys(config).forEach(function (prop) {\n _this[prop] = config[prop];\n });\n }\n\n Object.defineProperty(Options.prototype, \"wheelEventTarget\", {\n get: function get() {\n return this.delegateTo;\n },\n set: function set(el) {\n console.warn('[smooth-scrollbar]: `options.wheelEventTarget` is deprecated and will be removed in the future, use `options.delegateTo` instead.');\n this.delegateTo = el;\n },\n enumerable: true,\n configurable: true\n });\n\n __decorate([range(0, 1)], Options.prototype, \"damping\", void 0);\n\n __decorate([range(0, Infinity)], Options.prototype, \"thumbMinSize\", void 0);\n\n __decorate([_boolean], Options.prototype, \"renderByPixels\", void 0);\n\n __decorate([_boolean], Options.prototype, \"alwaysShowTracks\", void 0);\n\n __decorate([_boolean], Options.prototype, \"continuousScrolling\", void 0);\n\n return Options;\n}();\n\nexport { Options };","export var TrackDirection;\n\n(function (TrackDirection) {\n TrackDirection[\"X\"] = \"x\";\n TrackDirection[\"Y\"] = \"y\";\n})(TrackDirection || (TrackDirection = {}));","import { TrackDirection } from './direction';\nimport { setStyle } from '../utils/';\n\nvar ScrollbarThumb =\n/** @class */\nfunction () {\n function ScrollbarThumb(_direction, _minSize) {\n if (_minSize === void 0) {\n _minSize = 0;\n }\n\n this._direction = _direction;\n this._minSize = _minSize;\n /**\n * Thumb element\n */\n\n this.element = document.createElement('div');\n /**\n * Display size of the thumb\n * will always be greater than `scrollbar.options.thumbMinSize`\n */\n\n this.displaySize = 0;\n /**\n * Actual size of the thumb\n */\n\n this.realSize = 0;\n /**\n * Thumb offset to the top\n */\n\n this.offset = 0;\n this.element.className = \"scrollbar-thumb scrollbar-thumb-\" + _direction;\n }\n /**\n * Attach to track element\n *\n * @param trackEl Track element\n */\n\n\n ScrollbarThumb.prototype.attachTo = function (trackEl) {\n trackEl.appendChild(this.element);\n };\n\n ScrollbarThumb.prototype.update = function (scrollOffset, containerSize, pageSize) {\n // calculate thumb size\n // pageSize > containerSize -> scrollable\n this.realSize = Math.min(containerSize / pageSize, 1) * containerSize;\n this.displaySize = Math.max(this.realSize, this._minSize); // calculate thumb offset\n\n this.offset = scrollOffset / pageSize * (containerSize + (this.realSize - this.displaySize));\n setStyle(this.element, this._getStyle());\n };\n\n ScrollbarThumb.prototype._getStyle = function () {\n switch (this._direction) {\n case TrackDirection.X:\n return {\n width: this.displaySize + \"px\",\n '-transform': \"translate3d(\" + this.offset + \"px, 0, 0)\"\n };\n\n case TrackDirection.Y:\n return {\n height: this.displaySize + \"px\",\n '-transform': \"translate3d(0, \" + this.offset + \"px, 0)\"\n };\n\n default:\n return null;\n }\n };\n\n return ScrollbarThumb;\n}();\n\nexport { ScrollbarThumb };","import { ScrollbarThumb } from './thumb';\nimport { setStyle } from '../utils/';\n\nvar ScrollbarTrack =\n/** @class */\nfunction () {\n function ScrollbarTrack(direction, thumbMinSize) {\n if (thumbMinSize === void 0) {\n thumbMinSize = 0;\n }\n /**\n * Track element\n */\n\n\n this.element = document.createElement('div');\n this._isShown = false;\n this.element.className = \"scrollbar-track scrollbar-track-\" + direction;\n this.thumb = new ScrollbarThumb(direction, thumbMinSize);\n this.thumb.attachTo(this.element);\n }\n /**\n * Attach to scrollbar container element\n *\n * @param scrollbarContainer Scrollbar container element\n */\n\n\n ScrollbarTrack.prototype.attachTo = function (scrollbarContainer) {\n scrollbarContainer.appendChild(this.element);\n };\n /**\n * Show track immediately\n */\n\n\n ScrollbarTrack.prototype.show = function () {\n if (this._isShown) {\n return;\n }\n\n this._isShown = true;\n this.element.classList.add('show');\n };\n /**\n * Hide track immediately\n */\n\n\n ScrollbarTrack.prototype.hide = function () {\n if (!this._isShown) {\n return;\n }\n\n this._isShown = false;\n this.element.classList.remove('show');\n };\n\n ScrollbarTrack.prototype.update = function (scrollOffset, containerSize, pageSize) {\n setStyle(this.element, {\n display: pageSize <= containerSize ? 'none' : 'block'\n });\n this.thumb.update(scrollOffset, containerSize, pageSize);\n };\n\n return ScrollbarTrack;\n}();\n\nexport { ScrollbarTrack };","import { __decorate } from \"tslib\";\nimport { ScrollbarTrack } from './track';\nimport { TrackDirection } from './direction';\nimport { debounce } from '../decorators/';\n\nvar TrackController =\n/** @class */\nfunction () {\n function TrackController(_scrollbar) {\n this._scrollbar = _scrollbar;\n var thumbMinSize = _scrollbar.options.thumbMinSize;\n this.xAxis = new ScrollbarTrack(TrackDirection.X, thumbMinSize);\n this.yAxis = new ScrollbarTrack(TrackDirection.Y, thumbMinSize);\n this.xAxis.attachTo(_scrollbar.containerEl);\n this.yAxis.attachTo(_scrollbar.containerEl);\n\n if (_scrollbar.options.alwaysShowTracks) {\n this.xAxis.show();\n this.yAxis.show();\n }\n }\n /**\n * Updates track appearance\n */\n\n\n TrackController.prototype.update = function () {\n var _a = this._scrollbar,\n size = _a.size,\n offset = _a.offset;\n this.xAxis.update(offset.x, size.container.width, size.content.width);\n this.yAxis.update(offset.y, size.container.height, size.content.height);\n };\n /**\n * Automatically hide tracks when scrollbar is in idle state\n */\n\n\n TrackController.prototype.autoHideOnIdle = function () {\n if (this._scrollbar.options.alwaysShowTracks) {\n return;\n }\n\n this.xAxis.hide();\n this.yAxis.hide();\n };\n\n __decorate([debounce(300)], TrackController.prototype, \"autoHideOnIdle\", null);\n\n return TrackController;\n}();\n\nexport { TrackController };","import { clamp } from '../utils';\nvar animationIDStorage = new WeakMap();\nexport function scrollTo(scrollbar, x, y, duration, _a) {\n if (duration === void 0) {\n duration = 0;\n }\n\n var _b = _a === void 0 ? {} : _a,\n _c = _b.easing,\n easing = _c === void 0 ? defaultEasing : _c,\n callback = _b.callback;\n\n var options = scrollbar.options,\n offset = scrollbar.offset,\n limit = scrollbar.limit;\n\n if (options.renderByPixels) {\n // ensure resolved with integer\n x = Math.round(x);\n y = Math.round(y);\n }\n\n var startX = offset.x;\n var startY = offset.y;\n var disX = clamp(x, 0, limit.x) - startX;\n var disY = clamp(y, 0, limit.y) - startY;\n var start = Date.now();\n\n function scroll() {\n var elapse = Date.now() - start;\n var progress = duration ? easing(Math.min(elapse / duration, 1)) : 1;\n scrollbar.setPosition(startX + disX * progress, startY + disY * progress);\n\n if (elapse >= duration) {\n if (typeof callback === 'function') {\n callback.call(scrollbar);\n }\n } else {\n var animationID = requestAnimationFrame(scroll);\n animationIDStorage.set(scrollbar, animationID);\n }\n }\n\n cancelAnimationFrame(animationIDStorage.get(scrollbar));\n scroll();\n}\n/**\n * easeOutCubic\n */\n\nfunction defaultEasing(t) {\n return Math.pow(t - 1, 3) + 1;\n}","import { __assign } from \"tslib\";\n\nvar ScrollbarPlugin =\n/** @class */\nfunction () {\n function ScrollbarPlugin(scrollbar, options) {\n var _newTarget = this.constructor;\n this.scrollbar = scrollbar;\n this.name = _newTarget.pluginName;\n this.options = __assign(__assign({}, _newTarget.defaultOptions), options);\n }\n\n ScrollbarPlugin.prototype.onInit = function () {};\n\n ScrollbarPlugin.prototype.onDestroy = function () {};\n\n ScrollbarPlugin.prototype.onUpdate = function () {};\n\n ScrollbarPlugin.prototype.onRender = function (_remainMomentum) {};\n\n ScrollbarPlugin.prototype.transformDelta = function (delta, _evt) {\n return __assign({}, delta);\n };\n\n ScrollbarPlugin.pluginName = '';\n ScrollbarPlugin.defaultOptions = {};\n return ScrollbarPlugin;\n}();\n\nexport { ScrollbarPlugin };\nexport var globalPlugins = {\n order: new Set(),\n constructors: {}\n};\nexport function addPlugins() {\n var Plugins = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n Plugins[_i] = arguments[_i];\n }\n\n Plugins.forEach(function (P) {\n var pluginName = P.pluginName;\n\n if (!pluginName) {\n throw new TypeError(\"plugin name is required\");\n }\n\n globalPlugins.order.add(pluginName);\n globalPlugins.constructors[pluginName] = P;\n });\n}\nexport function initPlugins(scrollbar, options) {\n return Array.from(globalPlugins.order).filter(function (pluginName) {\n return options[pluginName] !== false;\n }).map(function (pluginName) {\n var Plugin = globalPlugins.constructors[pluginName];\n var instance = new Plugin(scrollbar, options[pluginName]); // bind plugin options to `scrollbar.options`\n\n options[pluginName] = instance.options;\n return instance;\n });\n}","import { eventScope } from '../utils/';\nvar KEY_CODE;\n\n(function (KEY_CODE) {\n KEY_CODE[KEY_CODE[\"TAB\"] = 9] = \"TAB\";\n KEY_CODE[KEY_CODE[\"SPACE\"] = 32] = \"SPACE\";\n KEY_CODE[KEY_CODE[\"PAGE_UP\"] = 33] = \"PAGE_UP\";\n KEY_CODE[KEY_CODE[\"PAGE_DOWN\"] = 34] = \"PAGE_DOWN\";\n KEY_CODE[KEY_CODE[\"END\"] = 35] = \"END\";\n KEY_CODE[KEY_CODE[\"HOME\"] = 36] = \"HOME\";\n KEY_CODE[KEY_CODE[\"LEFT\"] = 37] = \"LEFT\";\n KEY_CODE[KEY_CODE[\"UP\"] = 38] = \"UP\";\n KEY_CODE[KEY_CODE[\"RIGHT\"] = 39] = \"RIGHT\";\n KEY_CODE[KEY_CODE[\"DOWN\"] = 40] = \"DOWN\";\n})(KEY_CODE || (KEY_CODE = {}));\n\nexport function keyboardHandler(scrollbar) {\n var addEvent = eventScope(scrollbar);\n var container = scrollbar.containerEl;\n addEvent(container, 'keydown', function (evt) {\n var activeElement = document.activeElement;\n\n if (activeElement !== container && !container.contains(activeElement)) {\n return;\n }\n\n if (isEditable(activeElement)) {\n return;\n }\n\n var delta = getKeyDelta(scrollbar, evt.keyCode || evt.which);\n\n if (!delta) {\n return;\n }\n\n var x = delta[0],\n y = delta[1];\n scrollbar.addTransformableMomentum(x, y, evt, function (willScroll) {\n if (willScroll) {\n evt.preventDefault();\n } else {\n scrollbar.containerEl.blur();\n\n if (scrollbar.parent) {\n scrollbar.parent.containerEl.focus();\n }\n }\n });\n });\n}\n\nfunction getKeyDelta(scrollbar, keyCode) {\n var size = scrollbar.size,\n limit = scrollbar.limit,\n offset = scrollbar.offset;\n\n switch (keyCode) {\n case KEY_CODE.TAB:\n return handleTabKey(scrollbar);\n\n case KEY_CODE.SPACE:\n return [0, 200];\n\n case KEY_CODE.PAGE_UP:\n return [0, -size.container.height + 40];\n\n case KEY_CODE.PAGE_DOWN:\n return [0, size.container.height - 40];\n\n case KEY_CODE.END:\n return [0, limit.y - offset.y];\n\n case KEY_CODE.HOME:\n return [0, -offset.y];\n\n case KEY_CODE.LEFT:\n return [-40, 0];\n\n case KEY_CODE.UP:\n return [0, -40];\n\n case KEY_CODE.RIGHT:\n return [40, 0];\n\n case KEY_CODE.DOWN:\n return [0, 40];\n\n default:\n return null;\n }\n}\n\nfunction handleTabKey(scrollbar) {\n // handle in next frame\n requestAnimationFrame(function () {\n scrollbar.scrollIntoView(document.activeElement, {\n offsetTop: scrollbar.size.container.height / 2,\n offsetLeft: scrollbar.size.container.width / 2,\n onlyScrollIfNeeded: true\n });\n });\n}\n\nfunction isEditable(elem) {\n if (elem.tagName === 'INPUT' || elem.tagName === 'SELECT' || elem.tagName === 'TEXTAREA' || elem.isContentEditable) {\n return !elem.disabled;\n }\n\n return false;\n}","import { clamp } from '../utils';\nimport { isOneOf, getPosition, eventScope, setStyle } from '../utils/';\nvar Direction;\n\n(function (Direction) {\n Direction[Direction[\"X\"] = 0] = \"X\";\n Direction[Direction[\"Y\"] = 1] = \"Y\";\n})(Direction || (Direction = {}));\n\nexport function mouseHandler(scrollbar) {\n var addEvent = eventScope(scrollbar);\n var container = scrollbar.containerEl;\n var _a = scrollbar.track,\n xAxis = _a.xAxis,\n yAxis = _a.yAxis;\n\n function calcMomentum(direction, clickPosition) {\n var size = scrollbar.size,\n limit = scrollbar.limit,\n offset = scrollbar.offset;\n\n if (direction === Direction.X) {\n var totalWidth = size.container.width + (xAxis.thumb.realSize - xAxis.thumb.displaySize);\n return clamp(clickPosition / totalWidth * size.content.width, 0, limit.x) - offset.x;\n }\n\n if (direction === Direction.Y) {\n var totalHeight = size.container.height + (yAxis.thumb.realSize - yAxis.thumb.displaySize);\n return clamp(clickPosition / totalHeight * size.content.height, 0, limit.y) - offset.y;\n }\n\n return 0;\n }\n\n function getTrackDirection(elem) {\n if (isOneOf(elem, [xAxis.element, xAxis.thumb.element])) {\n return Direction.X;\n }\n\n if (isOneOf(elem, [yAxis.element, yAxis.thumb.element])) {\n return Direction.Y;\n }\n\n return void 0;\n }\n\n var isMouseDown;\n var isMouseMoving;\n var startOffsetToThumb;\n var trackDirection;\n var containerRect;\n addEvent(container, 'click', function (evt) {\n if (isMouseMoving || !isOneOf(evt.target, [xAxis.element, yAxis.element])) {\n return;\n }\n\n var track = evt.target;\n var direction = getTrackDirection(track);\n var rect = track.getBoundingClientRect();\n var clickPos = getPosition(evt);\n\n if (direction === Direction.X) {\n var offsetOnTrack = clickPos.x - rect.left - xAxis.thumb.displaySize / 2;\n scrollbar.setMomentum(calcMomentum(direction, offsetOnTrack), 0);\n }\n\n if (direction === Direction.Y) {\n var offsetOnTrack = clickPos.y - rect.top - yAxis.thumb.displaySize / 2;\n scrollbar.setMomentum(0, calcMomentum(direction, offsetOnTrack));\n }\n });\n addEvent(container, 'mousedown', function (evt) {\n if (!isOneOf(evt.target, [xAxis.thumb.element, yAxis.thumb.element])) {\n return;\n }\n\n isMouseDown = true;\n var thumb = evt.target;\n var cursorPos = getPosition(evt);\n var thumbRect = thumb.getBoundingClientRect();\n trackDirection = getTrackDirection(thumb); // pointer offset to thumb\n\n startOffsetToThumb = {\n x: cursorPos.x - thumbRect.left,\n y: cursorPos.y - thumbRect.top\n }; // container bounding rectangle\n\n containerRect = container.getBoundingClientRect(); // prevent selection, see:\n // https://github.com/idiotWu/smooth-scrollbar/issues/48\n\n setStyle(scrollbar.containerEl, {\n '-user-select': 'none'\n });\n });\n addEvent(window, 'mousemove', function (evt) {\n if (!isMouseDown) return;\n isMouseMoving = true;\n var cursorPos = getPosition(evt);\n\n if (trackDirection === Direction.X) {\n // get percentage of pointer position in track\n // then tranform to px\n // don't need easing\n var offsetOnTrack = cursorPos.x - startOffsetToThumb.x - containerRect.left;\n scrollbar.setMomentum(calcMomentum(trackDirection, offsetOnTrack), 0);\n }\n\n if (trackDirection === Direction.Y) {\n var offsetOnTrack = cursorPos.y - startOffsetToThumb.y - containerRect.top;\n scrollbar.setMomentum(0, calcMomentum(trackDirection, offsetOnTrack));\n }\n });\n addEvent(window, 'mouseup blur', function () {\n isMouseDown = isMouseMoving = false;\n setStyle(scrollbar.containerEl, {\n '-user-select': ''\n });\n });\n}","import { eventScope, TouchRecord } from '../utils/';\nvar activeScrollbar;\nexport function touchHandler(scrollbar) {\n var target = scrollbar.options.delegateTo || scrollbar.containerEl;\n var touchRecord = new TouchRecord();\n var addEvent = eventScope(scrollbar);\n var damping;\n var pointerCount = 0;\n addEvent(target, 'touchstart', function (evt) {\n // start records\n touchRecord.track(evt); // stop scrolling\n\n scrollbar.setMomentum(0, 0); // save damping\n\n if (pointerCount === 0) {\n damping = scrollbar.options.damping;\n scrollbar.options.damping = Math.max(damping, 0.5); // less frames on touchmove\n }\n\n pointerCount++;\n });\n addEvent(target, 'touchmove', function (evt) {\n if (activeScrollbar && activeScrollbar !== scrollbar) return;\n touchRecord.update(evt);\n\n var _a = touchRecord.getDelta(),\n x = _a.x,\n y = _a.y;\n\n scrollbar.addTransformableMomentum(x, y, evt, function (willScroll) {\n if (willScroll && evt.cancelable) {\n evt.preventDefault();\n activeScrollbar = scrollbar;\n }\n });\n });\n addEvent(target, 'touchcancel touchend', function (evt) {\n var delta = touchRecord.getEasingDistance(damping);\n scrollbar.addTransformableMomentum(delta.x, delta.y, evt);\n pointerCount--; // restore damping\n\n if (pointerCount === 0) {\n scrollbar.options.damping = damping;\n }\n\n touchRecord.release(evt);\n activeScrollbar = null;\n });\n}","import { debounce } from '../utils';\nimport { eventScope } from '../utils/';\nexport function resizeHandler(scrollbar) {\n var addEvent = eventScope(scrollbar);\n addEvent(window, 'resize', debounce(scrollbar.update.bind(scrollbar), 300));\n}","import { clamp } from '../utils';\nimport { eventScope, getPosition } from '../utils/';\nexport function selectHandler(scrollbar) {\n var addEvent = eventScope(scrollbar);\n var containerEl = scrollbar.containerEl,\n contentEl = scrollbar.contentEl;\n var isSelected = false;\n var isContextMenuOpened = false; // flag to prevent selection when context menu is opened\n\n var animationID;\n\n function scroll(_a) {\n var x = _a.x,\n y = _a.y;\n if (!x && !y) return;\n var offset = scrollbar.offset,\n limit = scrollbar.limit; // DISALLOW delta transformation\n\n scrollbar.setMomentum(clamp(offset.x + x, 0, limit.x) - offset.x, clamp(offset.y + y, 0, limit.y) - offset.y);\n animationID = requestAnimationFrame(function () {\n scroll({\n x: x,\n y: y\n });\n });\n }\n\n addEvent(window, 'mousemove', function (evt) {\n if (!isSelected) return;\n cancelAnimationFrame(animationID);\n var dir = calcMomentum(scrollbar, evt);\n scroll(dir);\n }); // prevent scrolling when context menu is opened\n // NOTE: `contextmenu` event may be fired\n // 1. BEFORE `selectstart`: when user right-clicks on the text content -> prevent future scrolling,\n // 2. AFTER `selectstart`: when user right-clicks on the blank area -> cancel current scrolling,\n // so we need to both set the flag and cancel current scrolling\n\n addEvent(contentEl, 'contextmenu', function () {\n // set the flag to prevent future scrolling\n isContextMenuOpened = true; // stop current scrolling\n\n cancelAnimationFrame(animationID);\n isSelected = false;\n }); // reset context menu flag on mouse down\n // to ensure the scrolling is allowed in the next selection\n\n addEvent(contentEl, 'mousedown', function () {\n isContextMenuOpened = false;\n });\n addEvent(contentEl, 'selectstart', function () {\n if (isContextMenuOpened) {\n return;\n }\n\n cancelAnimationFrame(animationID);\n isSelected = true;\n });\n addEvent(window, 'mouseup blur', function () {\n cancelAnimationFrame(animationID);\n isSelected = false;\n isContextMenuOpened = false;\n }); // patch for touch devices\n\n addEvent(containerEl, 'scroll', function (evt) {\n evt.preventDefault();\n containerEl.scrollTop = containerEl.scrollLeft = 0;\n });\n}\n\nfunction calcMomentum(scrollbar, evt) {\n var _a = scrollbar.bounding,\n top = _a.top,\n right = _a.right,\n bottom = _a.bottom,\n left = _a.left;\n\n var _b = getPosition(evt),\n x = _b.x,\n y = _b.y;\n\n var res = {\n x: 0,\n y: 0\n };\n var padding = 20;\n if (x === 0 && y === 0) return res;\n\n if (x > right - padding) {\n res.x = x - right + padding;\n } else if (x < left + padding) {\n res.x = x - left - padding;\n }\n\n if (y > bottom - padding) {\n res.y = y - bottom + padding;\n } else if (y < top + padding) {\n res.y = y - top - padding;\n }\n\n res.x *= 2;\n res.y *= 2;\n return res;\n}","import { eventScope } from '../utils/';\nexport function wheelHandler(scrollbar) {\n var addEvent = eventScope(scrollbar);\n var target = scrollbar.options.delegateTo || scrollbar.containerEl;\n var eventName = 'onwheel' in window || document.implementation.hasFeature('Events.wheel', '3.0') ? 'wheel' : 'mousewheel';\n addEvent(target, eventName, function (evt) {\n var _a = normalizeDelta(evt),\n x = _a.x,\n y = _a.y;\n\n scrollbar.addTransformableMomentum(x, y, evt, function (willScroll) {\n if (willScroll) {\n evt.preventDefault();\n }\n });\n });\n} // Normalizing wheel delta\n\nvar DELTA_SCALE = {\n STANDARD: 1,\n OTHERS: -3\n};\nvar DELTA_MODE = [1.0, 28.0, 500.0];\n\nvar getDeltaMode = function getDeltaMode(mode) {\n return DELTA_MODE[mode] || DELTA_MODE[0];\n};\n\nfunction normalizeDelta(evt) {\n if ('deltaX' in evt) {\n var mode = getDeltaMode(evt.deltaMode);\n return {\n x: evt.deltaX / DELTA_SCALE.STANDARD * mode,\n y: evt.deltaY / DELTA_SCALE.STANDARD * mode\n };\n }\n\n if ('wheelDeltaX' in evt) {\n return {\n x: evt.wheelDeltaX / DELTA_SCALE.OTHERS,\n y: evt.wheelDeltaY / DELTA_SCALE.OTHERS\n };\n } // ie with touchpad\n\n\n return {\n x: 0,\n y: evt.wheelDelta / DELTA_SCALE.OTHERS\n };\n}","import { __assign, __decorate } from \"tslib\";\nimport { clamp } from './utils';\nimport { Options } from './options';\nimport { setStyle, clearEventsOn } from './utils/';\nimport { debounce } from './decorators/';\nimport { TrackController } from './track/';\nimport { getSize, update, isVisible } from './geometry/';\nimport { scrollTo, setPosition, scrollIntoView } from './scrolling/';\nimport { initPlugins } from './plugin';\nimport * as eventHandlers from './events/'; // DO NOT use WeakMap here\n// .getAll() methods requires `scrollbarMap.values()`\n\nexport var scrollbarMap = new Map();\n\nvar Scrollbar =\n/** @class */\nfunction () {\n function Scrollbar(containerEl, options) {\n var _this = this;\n /**\n * Current scrolling offsets\n */\n\n\n this.offset = {\n x: 0,\n y: 0\n };\n /**\n * Max-allowed scrolling offsets\n */\n\n this.limit = {\n x: Infinity,\n y: Infinity\n };\n /**\n * Container bounding rect\n */\n\n this.bounding = {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n }; // private _observer: ResizeObserver;\n\n this._plugins = [];\n this._momentum = {\n x: 0,\n y: 0\n };\n this._listeners = new Set();\n this.containerEl = containerEl;\n var contentEl = this.contentEl = document.createElement('div');\n this.options = new Options(options); // mark as a scroll element\n\n containerEl.setAttribute('data-scrollbar', 'true'); // make container focusable\n\n containerEl.setAttribute('tabindex', '-1');\n setStyle(containerEl, {\n overflow: 'hidden',\n outline: 'none'\n }); // enable touch event capturing in IE, see:\n // https://github.com/idiotWu/smooth-scrollbar/issues/39\n\n if (window.navigator.msPointerEnabled) {\n containerEl.style.msTouchAction = 'none';\n } // mount content\n\n\n contentEl.className = 'scroll-content';\n Array.from(containerEl.childNodes).forEach(function (node) {\n contentEl.appendChild(node);\n });\n containerEl.appendChild(contentEl); // attach track\n\n this.track = new TrackController(this); // initial measuring\n\n this.size = this.getSize(); // init plugins\n\n this._plugins = initPlugins(this, this.options.plugins); // preserve scroll offset\n\n var scrollLeft = containerEl.scrollLeft,\n scrollTop = containerEl.scrollTop;\n containerEl.scrollLeft = containerEl.scrollTop = 0;\n this.setPosition(scrollLeft, scrollTop, {\n withoutCallbacks: true\n }); // FIXME: update typescript\n\n var ResizeObserver = window.ResizeObserver; // observe\n\n if (typeof ResizeObserver === 'function') {\n this._observer = new ResizeObserver(function () {\n _this.update();\n });\n\n this._observer.observe(contentEl);\n }\n\n scrollbarMap.set(containerEl, this); // wait for DOM ready\n\n requestAnimationFrame(function () {\n _this._init();\n });\n }\n\n Object.defineProperty(Scrollbar.prototype, \"parent\", {\n /**\n * Parent scrollbar\n */\n get: function get() {\n var elem = this.containerEl.parentElement;\n\n while (elem) {\n var parentScrollbar = scrollbarMap.get(elem);\n\n if (parentScrollbar) {\n return parentScrollbar;\n }\n\n elem = elem.parentElement;\n }\n\n return null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Scrollbar.prototype, \"scrollTop\", {\n /**\n * Gets or sets `scrollbar.offset.y`\n */\n get: function get() {\n return this.offset.y;\n },\n set: function set(y) {\n this.setPosition(this.scrollLeft, y);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Scrollbar.prototype, \"scrollLeft\", {\n /**\n * Gets or sets `scrollbar.offset.x`\n */\n get: function get() {\n return this.offset.x;\n },\n set: function set(x) {\n this.setPosition(x, this.scrollTop);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Returns the size of the scrollbar container element\n * and the content wrapper element\n */\n\n Scrollbar.prototype.getSize = function () {\n return getSize(this);\n };\n /**\n * Forces scrollbar to update geometry infomation.\n *\n * By default, scrollbars are automatically updated with `100ms` debounce (or `MutationObserver` fires).\n * You can call this method to force an update when you modified contents\n */\n\n\n Scrollbar.prototype.update = function () {\n update(this);\n\n this._plugins.forEach(function (plugin) {\n plugin.onUpdate();\n });\n };\n /**\n * Checks if an element is visible in the current view area\n */\n\n\n Scrollbar.prototype.isVisible = function (elem) {\n return isVisible(this, elem);\n };\n /**\n * Sets the scrollbar to the given offset without easing\n */\n\n\n Scrollbar.prototype.setPosition = function (x, y, options) {\n var _this = this;\n\n if (x === void 0) {\n x = this.offset.x;\n }\n\n if (y === void 0) {\n y = this.offset.y;\n }\n\n if (options === void 0) {\n options = {};\n }\n\n var status = setPosition(this, x, y);\n\n if (!status || options.withoutCallbacks) {\n return;\n }\n\n this._listeners.forEach(function (fn) {\n fn.call(_this, status);\n });\n };\n /**\n * Scrolls to given position with easing function\n */\n\n\n Scrollbar.prototype.scrollTo = function (x, y, duration, options) {\n if (x === void 0) {\n x = this.offset.x;\n }\n\n if (y === void 0) {\n y = this.offset.y;\n }\n\n if (duration === void 0) {\n duration = 0;\n }\n\n if (options === void 0) {\n options = {};\n }\n\n scrollTo(this, x, y, duration, options);\n };\n /**\n * Scrolls the target element into visible area of scrollbar,\n * likes the DOM method `element.scrollIntoView().\n */\n\n\n Scrollbar.prototype.scrollIntoView = function (elem, options) {\n if (options === void 0) {\n options = {};\n }\n\n scrollIntoView(this, elem, options);\n };\n /**\n * Adds scrolling listener\n */\n\n\n Scrollbar.prototype.addListener = function (fn) {\n if (typeof fn !== 'function') {\n throw new TypeError('[smooth-scrollbar] scrolling listener should be a function');\n }\n\n this._listeners.add(fn);\n };\n /**\n * Removes listener previously registered with `scrollbar.addListener()`\n */\n\n\n Scrollbar.prototype.removeListener = function (fn) {\n this._listeners.delete(fn);\n };\n /**\n * Adds momentum and applys delta transformers.\n */\n\n\n Scrollbar.prototype.addTransformableMomentum = function (x, y, fromEvent, callback) {\n this._updateDebounced();\n\n var finalDelta = this._plugins.reduce(function (delta, plugin) {\n return plugin.transformDelta(delta, fromEvent) || delta;\n }, {\n x: x,\n y: y\n });\n\n var willScroll = !this._shouldPropagateMomentum(finalDelta.x, finalDelta.y);\n\n if (willScroll) {\n this.addMomentum(finalDelta.x, finalDelta.y);\n }\n\n if (callback) {\n callback.call(this, willScroll);\n }\n };\n /**\n * Increases scrollbar's momentum\n */\n\n\n Scrollbar.prototype.addMomentum = function (x, y) {\n this.setMomentum(this._momentum.x + x, this._momentum.y + y);\n };\n /**\n * Sets scrollbar's momentum to given value\n */\n\n\n Scrollbar.prototype.setMomentum = function (x, y) {\n if (this.limit.x === 0) {\n x = 0;\n }\n\n if (this.limit.y === 0) {\n y = 0;\n }\n\n if (this.options.renderByPixels) {\n x = Math.round(x);\n y = Math.round(y);\n }\n\n this._momentum.x = x;\n this._momentum.y = y;\n };\n /**\n * Update options for specific plugin\n *\n * @param pluginName Name of the plugin\n * @param [options] An object includes the properties that you want to update\n */\n\n\n Scrollbar.prototype.updatePluginOptions = function (pluginName, options) {\n this._plugins.forEach(function (plugin) {\n if (plugin.name === pluginName) {\n Object.assign(plugin.options, options);\n }\n });\n };\n\n Scrollbar.prototype.destroy = function () {\n var _a = this,\n containerEl = _a.containerEl,\n contentEl = _a.contentEl;\n\n clearEventsOn(this);\n\n this._listeners.clear();\n\n this.setMomentum(0, 0);\n cancelAnimationFrame(this._renderID);\n\n if (this._observer) {\n this._observer.disconnect();\n }\n\n scrollbarMap.delete(this.containerEl); // restore contents\n\n var childNodes = Array.from(contentEl.childNodes);\n\n while (containerEl.firstChild) {\n containerEl.removeChild(containerEl.firstChild);\n }\n\n childNodes.forEach(function (el) {\n containerEl.appendChild(el);\n }); // reset scroll position\n\n setStyle(containerEl, {\n overflow: ''\n });\n containerEl.scrollTop = this.scrollTop;\n containerEl.scrollLeft = this.scrollLeft; // invoke plugin.onDestroy\n\n this._plugins.forEach(function (plugin) {\n plugin.onDestroy();\n });\n\n this._plugins.length = 0;\n };\n\n Scrollbar.prototype._init = function () {\n var _this = this;\n\n this.update(); // init evet handlers\n\n Object.keys(eventHandlers).forEach(function (prop) {\n eventHandlers[prop](_this);\n }); // invoke `plugin.onInit`\n\n this._plugins.forEach(function (plugin) {\n plugin.onInit();\n });\n\n this._render();\n };\n\n Scrollbar.prototype._updateDebounced = function () {\n this.update();\n }; // check whether to propagate monmentum to parent scrollbar\n // the following situations are considered as `true`:\n // 1. continuous scrolling is enabled (automatically disabled when overscroll is enabled)\n // 2. scrollbar reaches one side and is not about to scroll on the other direction\n\n\n Scrollbar.prototype._shouldPropagateMomentum = function (deltaX, deltaY) {\n if (deltaX === void 0) {\n deltaX = 0;\n }\n\n if (deltaY === void 0) {\n deltaY = 0;\n }\n\n var _a = this,\n options = _a.options,\n offset = _a.offset,\n limit = _a.limit;\n\n if (!options.continuousScrolling) return false; // force an update when scrollbar is \"unscrollable\", see #106\n\n if (limit.x === 0 && limit.y === 0) {\n this._updateDebounced();\n }\n\n var destX = clamp(deltaX + offset.x, 0, limit.x);\n var destY = clamp(deltaY + offset.y, 0, limit.y);\n var res = true; // offsets are not about to change\n // `&=` operator is not allowed for boolean types\n\n res = res && destX === offset.x;\n res = res && destY === offset.y; // current offsets are on the edge\n\n res = res && (offset.x === limit.x || offset.x === 0 || offset.y === limit.y || offset.y === 0);\n return res;\n };\n\n Scrollbar.prototype._render = function () {\n var _momentum = this._momentum;\n\n if (_momentum.x || _momentum.y) {\n var nextX = this._nextTick('x');\n\n var nextY = this._nextTick('y');\n\n _momentum.x = nextX.momentum;\n _momentum.y = nextY.momentum;\n this.setPosition(nextX.position, nextY.position);\n }\n\n var remain = __assign({}, this._momentum);\n\n this._plugins.forEach(function (plugin) {\n plugin.onRender(remain);\n });\n\n this._renderID = requestAnimationFrame(this._render.bind(this));\n };\n\n Scrollbar.prototype._nextTick = function (direction) {\n var _a = this,\n options = _a.options,\n offset = _a.offset,\n _momentum = _a._momentum;\n\n var current = offset[direction];\n var remain = _momentum[direction];\n\n if (Math.abs(remain) <= 0.1) {\n return {\n momentum: 0,\n position: current + remain\n };\n }\n\n var nextMomentum = remain * (1 - options.damping);\n\n if (options.renderByPixels) {\n nextMomentum |= 0;\n }\n\n return {\n momentum: nextMomentum,\n position: current + remain - nextMomentum\n };\n };\n\n __decorate([debounce(100, true)], Scrollbar.prototype, \"_updateDebounced\", null);\n\n return Scrollbar;\n}();\n\nexport { Scrollbar };","export function getSize(scrollbar) {\n var containerEl = scrollbar.containerEl,\n contentEl = scrollbar.contentEl;\n var containerStyles = getComputedStyle(containerEl);\n var paddings = ['paddingTop', 'paddingBottom', 'paddingLeft', 'paddingRight'].map(function (prop) {\n return containerStyles[prop] ? parseFloat(containerStyles[prop]) : 0;\n });\n var verticalPadding = paddings[0] + paddings[1];\n var horizontalPadding = paddings[2] + paddings[3];\n return {\n container: {\n // requires `overflow: hidden`\n width: containerEl.clientWidth,\n height: containerEl.clientHeight\n },\n content: {\n // border width and paddings should be included\n width: contentEl.offsetWidth - contentEl.clientWidth + contentEl.scrollWidth + horizontalPadding,\n height: contentEl.offsetHeight - contentEl.clientHeight + contentEl.scrollHeight + verticalPadding\n }\n };\n}","export function update(scrollbar) {\n var newSize = scrollbar.getSize();\n var limit = {\n x: Math.max(newSize.content.width - newSize.container.width, 0),\n y: Math.max(newSize.content.height - newSize.container.height, 0)\n }; // metrics\n\n var containerBounding = scrollbar.containerEl.getBoundingClientRect();\n var bounding = {\n top: Math.max(containerBounding.top, 0),\n right: Math.min(containerBounding.right, window.innerWidth),\n bottom: Math.min(containerBounding.bottom, window.innerHeight),\n left: Math.max(containerBounding.left, 0)\n }; // assign props\n\n scrollbar.size = newSize;\n scrollbar.limit = limit;\n scrollbar.bounding = bounding; // update tracks\n\n scrollbar.track.update(); // re-positioning\n\n scrollbar.setPosition();\n}","export function isVisible(scrollbar, elem) {\n var bounding = scrollbar.bounding;\n var targetBounding = elem.getBoundingClientRect(); // check overlapping\n\n var top = Math.max(bounding.top, targetBounding.top);\n var left = Math.max(bounding.left, targetBounding.left);\n var right = Math.min(bounding.right, targetBounding.right);\n var bottom = Math.min(bounding.bottom, targetBounding.bottom);\n return top < bottom && left < right;\n}","import { __assign } from \"tslib\";\nimport { clamp } from '../utils';\nimport { setStyle } from '../utils/';\nexport function setPosition(scrollbar, x, y) {\n var options = scrollbar.options,\n offset = scrollbar.offset,\n limit = scrollbar.limit,\n track = scrollbar.track,\n contentEl = scrollbar.contentEl;\n\n if (options.renderByPixels) {\n x = Math.round(x);\n y = Math.round(y);\n }\n\n x = clamp(x, 0, limit.x);\n y = clamp(y, 0, limit.y); // position changed -> show track for 300ms\n\n if (x !== offset.x) track.xAxis.show();\n if (y !== offset.y) track.yAxis.show();\n\n if (!options.alwaysShowTracks) {\n track.autoHideOnIdle();\n }\n\n if (x === offset.x && y === offset.y) {\n return null;\n }\n\n offset.x = x;\n offset.y = y;\n setStyle(contentEl, {\n '-transform': \"translate3d(\" + -x + \"px, \" + -y + \"px, 0)\"\n });\n track.update();\n return {\n offset: __assign({}, offset),\n limit: __assign({}, limit)\n };\n}","import { clamp } from '../utils';\nexport function scrollIntoView(scrollbar, elem, _a) {\n var _b = _a === void 0 ? {} : _a,\n _c = _b.alignToTop,\n alignToTop = _c === void 0 ? true : _c,\n _d = _b.onlyScrollIfNeeded,\n onlyScrollIfNeeded = _d === void 0 ? false : _d,\n _e = _b.offsetTop,\n offsetTop = _e === void 0 ? 0 : _e,\n _f = _b.offsetLeft,\n offsetLeft = _f === void 0 ? 0 : _f,\n _g = _b.offsetBottom,\n offsetBottom = _g === void 0 ? 0 : _g;\n\n var containerEl = scrollbar.containerEl,\n bounding = scrollbar.bounding,\n offset = scrollbar.offset,\n limit = scrollbar.limit;\n if (!elem || !containerEl.contains(elem)) return;\n var targetBounding = elem.getBoundingClientRect();\n if (onlyScrollIfNeeded && scrollbar.isVisible(elem)) return;\n var delta = alignToTop ? targetBounding.top - bounding.top - offsetTop : targetBounding.bottom - bounding.bottom + offsetBottom;\n scrollbar.setMomentum(targetBounding.left - bounding.left - offsetLeft, clamp(delta, -offset.y, limit.y - offset.y));\n}","var TRACK_BG = 'rgba(222, 222, 222, .75)';\nvar THUMB_BG = 'rgba(0, 0, 0, .5)'; // sets content's display type to `flow-root` to suppress margin collapsing\n\nvar SCROLLBAR_STYLE = \"\\n[data-scrollbar] {\\n display: block;\\n position: relative;\\n}\\n\\n.scroll-content {\\n display: flow-root;\\n -webkit-transform: translate3d(0, 0, 0);\\n transform: translate3d(0, 0, 0);\\n}\\n\\n.scrollbar-track {\\n position: absolute;\\n opacity: 0;\\n z-index: 1;\\n background: \" + TRACK_BG + \";\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none;\\n -webkit-transition: opacity 0.5s 0.5s ease-out;\\n transition: opacity 0.5s 0.5s ease-out;\\n}\\n.scrollbar-track.show,\\n.scrollbar-track:hover {\\n opacity: 1;\\n -webkit-transition-delay: 0s;\\n transition-delay: 0s;\\n}\\n\\n.scrollbar-track-x {\\n bottom: 0;\\n left: 0;\\n width: 100%;\\n height: 8px;\\n}\\n.scrollbar-track-y {\\n top: 0;\\n right: 0;\\n width: 8px;\\n height: 100%;\\n}\\n.scrollbar-thumb {\\n position: absolute;\\n top: 0;\\n left: 0;\\n width: 8px;\\n height: 8px;\\n background: \" + THUMB_BG + \";\\n border-radius: 4px;\\n}\\n\";\nvar STYLE_ID = 'smooth-scrollbar-style';\nvar isStyleAttached = false;\nexport function attachStyle() {\n if (isStyleAttached || typeof window === 'undefined') {\n return;\n }\n\n var styleEl = document.createElement('style');\n styleEl.id = STYLE_ID;\n styleEl.textContent = SCROLLBAR_STYLE;\n\n if (document.head) {\n document.head.appendChild(styleEl);\n }\n\n isStyleAttached = true;\n}\nexport function detachStyle() {\n if (!isStyleAttached || typeof window === 'undefined') {\n return;\n }\n\n var styleEl = document.getElementById(STYLE_ID);\n\n if (!styleEl || !styleEl.parentNode) {\n return;\n }\n\n styleEl.parentNode.removeChild(styleEl);\n isStyleAttached = false;\n}","import { __extends } from \"tslib\";\nimport './polyfills';\nimport { scrollbarMap, Scrollbar } from './scrollbar';\nimport { addPlugins, ScrollbarPlugin } from './plugin';\nimport { attachStyle, detachStyle } from './style';\nexport { ScrollbarPlugin };\n/**\n * cast `I.Scrollbar` to `Scrollbar` to avoid error\n *\n * `I.Scrollbar` is not assignable to `Scrollbar`:\n * \"privateProp\" is missing in `I.Scrollbar`\n *\n * @see https://github.com/Microsoft/TypeScript/issues/2672\n */\n\nvar SmoothScrollbar =\n/** @class */\nfunction (_super) {\n __extends(SmoothScrollbar, _super);\n\n function SmoothScrollbar() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Initializes a scrollbar on the given element.\n *\n * @param elem The DOM element that you want to initialize scrollbar to\n * @param [options] Initial options\n */\n\n\n SmoothScrollbar.init = function (elem, options) {\n if (!elem || elem.nodeType !== 1) {\n throw new TypeError(\"expect element to be DOM Element, but got \" + elem);\n } // attach stylesheet\n\n\n attachStyle();\n\n if (scrollbarMap.has(elem)) {\n return scrollbarMap.get(elem);\n }\n\n return new Scrollbar(elem, options);\n };\n /**\n * Automatically init scrollbar on all elements base on the selector `[data-scrollbar]`\n *\n * @param options Initial options\n */\n\n\n SmoothScrollbar.initAll = function (options) {\n return Array.from(document.querySelectorAll('[data-scrollbar]'), function (elem) {\n return SmoothScrollbar.init(elem, options);\n });\n };\n /**\n * Check if there is a scrollbar on given element\n *\n * @param elem The DOM element that you want to check\n */\n\n\n SmoothScrollbar.has = function (elem) {\n return scrollbarMap.has(elem);\n };\n /**\n * Gets scrollbar on the given element.\n * If no scrollbar instance exsits, returns `undefined`\n *\n * @param elem The DOM element that you want to check.\n */\n\n\n SmoothScrollbar.get = function (elem) {\n return scrollbarMap.get(elem);\n };\n /**\n * Returns an array that contains all scrollbar instances\n */\n\n\n SmoothScrollbar.getAll = function () {\n return Array.from(scrollbarMap.values());\n };\n /**\n * Removes scrollbar on the given element\n */\n\n\n SmoothScrollbar.destroy = function (elem) {\n var scrollbar = scrollbarMap.get(elem);\n\n if (scrollbar) {\n scrollbar.destroy();\n }\n };\n /**\n * Removes all scrollbar instances from current document\n */\n\n\n SmoothScrollbar.destroyAll = function () {\n scrollbarMap.forEach(function (scrollbar) {\n scrollbar.destroy();\n });\n };\n /**\n * Attaches plugins to scrollbars\n *\n * @param ...Plugins Scrollbar plugin classes\n */\n\n\n SmoothScrollbar.use = function () {\n var Plugins = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n Plugins[_i] = arguments[_i];\n }\n\n return addPlugins.apply(void 0, Plugins);\n };\n /**\n * Attaches default style sheets to current document.\n * You don't need to call this method manually unless\n * you removed the default styles via `Scrollbar.detachStyle()`\n */\n\n\n SmoothScrollbar.attachStyle = function () {\n return attachStyle();\n };\n /**\n * Removes default styles from current document.\n * Use this method when you want to use your own css for scrollbars.\n */\n\n\n SmoothScrollbar.detachStyle = function () {\n return detachStyle();\n };\n\n SmoothScrollbar.version = \"8.8.3\";\n SmoothScrollbar.ScrollbarPlugin = ScrollbarPlugin;\n return SmoothScrollbar;\n}(Scrollbar);\n\nexport default SmoothScrollbar;","import { getGlobalObject, logger } from '@sentry/utils';\nimport { SpanStatus } from '../spanstatus';\nimport { getActiveTransaction } from '../utils';\nvar global = getGlobalObject();\n/**\n * Add a listener that cancels and finishes a transaction when the global\n * document is hidden.\n */\n\nexport function registerBackgroundTabDetection() {\n if (global && global.document) {\n global.document.addEventListener('visibilitychange', function () {\n var activeTransaction = getActiveTransaction();\n\n if (global.document.hidden && activeTransaction) {\n logger.log(\"[Tracing] Transaction: \" + SpanStatus.Cancelled + \" -> since tab moved to the background, op: \" + activeTransaction.op); // We should not set status if it is already set, this prevent important statuses like\n // error or data loss from being overwritten on transaction.\n\n if (!activeTransaction.status) {\n activeTransaction.setStatus(SpanStatus.Cancelled);\n }\n\n activeTransaction.setTag('visibilitychange', 'document.hidden');\n activeTransaction.finish();\n }\n });\n } else {\n logger.warn('[Tracing] Could not set up background tab detection due to lack of global document');\n }\n}","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { onHidden } from './onHidden';\nvar firstHiddenTime;\nexport var getFirstHidden = function getFirstHidden() {\n if (firstHiddenTime === undefined) {\n // If the document is hidden when this code runs, assume it was hidden\n // since navigation start. This isn't a perfect heuristic, but it's the\n // best we can do until an API is available to support querying past\n // visibilityState.\n firstHiddenTime = document.visibilityState === 'hidden' ? 0 : Infinity; // Update the time if/when the document becomes hidden.\n\n onHidden(function (_a) {\n var timeStamp = _a.timeStamp;\n return firstHiddenTime = timeStamp;\n }, true);\n }\n\n return {\n get timeStamp() {\n return firstHiddenTime;\n }\n\n };\n};","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar inputPromise;\nexport var whenInput = function whenInput() {\n if (!inputPromise) {\n inputPromise = new Promise(function (r) {\n return ['scroll', 'keydown', 'pointerdown'].map(function (type) {\n addEventListener(type, r, {\n once: true,\n passive: true,\n capture: true\n });\n });\n });\n }\n\n return inputPromise;\n};","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var bindReporter = function bindReporter(callback, metric, po, observeAllUpdates) {\n var prevValue;\n return function () {\n if (po && metric.isFinal) {\n po.disconnect();\n }\n\n if (metric.value >= 0) {\n if (observeAllUpdates || metric.isFinal || document.visibilityState === 'hidden') {\n metric.delta = metric.value - (prevValue || 0); // Report the metric if there's a non-zero delta, if the metric is\n // final, or if no previous value exists (which can happen in the case\n // of the document becoming hidden when the metric value is 0).\n // See: https://github.com/GoogleChrome/web-vitals/issues/14\n\n if (metric.delta || metric.isFinal || prevValue === undefined) {\n callback(metric);\n prevValue = metric.value;\n }\n }\n }\n };\n};","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { generateUniqueID } from './generateUniqueID';\nexport var initMetric = function initMetric(name, value) {\n if (value === void 0) {\n value = -1;\n }\n\n return {\n name: name,\n value: value,\n delta: 0,\n entries: [],\n id: generateUniqueID(),\n isFinal: false\n };\n};","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Performantly generate a unique, 27-char string by combining the current\n * timestamp with a 13-digit random number.\n * @return {string}\n */\nexport var generateUniqueID = function generateUniqueID() {\n return Date.now() + \"-\" + (Math.floor(Math.random() * (9e12 - 1)) + 1e12);\n};","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Takes a performance entry type and a callback function, and creates a\n * `PerformanceObserver` instance that will observe the specified entry type\n * with buffering enabled and call the callback _for each entry_.\n *\n * This function also feature-detects entry support and wraps the logic in a\n * try/catch to avoid errors in unsupporting browsers.\n */\nexport var observe = function observe(type, callback) {\n try {\n if (PerformanceObserver.supportedEntryTypes.includes(type)) {\n var po = new PerformanceObserver(function (l) {\n return l.getEntries().map(callback);\n });\n po.observe({\n type: type,\n buffered: true\n });\n return po;\n }\n } catch (e) {// Do nothing.\n }\n\n return;\n};","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar isUnloading = false;\nvar listenersAdded = false;\n\nvar onPageHide = function onPageHide(event) {\n isUnloading = !event.persisted;\n};\n\nvar addListeners = function addListeners() {\n addEventListener('pagehide', onPageHide); // `beforeunload` is needed to fix this bug:\n // https://bugs.chromium.org/p/chromium/issues/detail?id=987409\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n\n addEventListener('beforeunload', function () {});\n};\n\nexport var onHidden = function onHidden(cb, once) {\n if (once === void 0) {\n once = false;\n }\n\n if (!listenersAdded) {\n addListeners();\n listenersAdded = true;\n }\n\n addEventListener('visibilitychange', function (_a) {\n var timeStamp = _a.timeStamp;\n\n if (document.visibilityState === 'hidden') {\n cb({\n timeStamp: timeStamp,\n isUnloading: isUnloading\n });\n }\n }, {\n capture: true,\n once: once\n });\n};","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { bindReporter } from './lib/bindReporter';\nimport { getFirstHidden } from './lib/getFirstHidden';\nimport { initMetric } from './lib/initMetric';\nimport { observe } from './lib/observe';\nimport { onHidden } from './lib/onHidden';\nimport { whenInput } from './lib/whenInput';\nexport var getLCP = function getLCP(onReport, reportAllChanges) {\n if (reportAllChanges === void 0) {\n reportAllChanges = false;\n }\n\n var metric = initMetric('LCP');\n var firstHidden = getFirstHidden();\n var report;\n\n var entryHandler = function entryHandler(entry) {\n // The startTime attribute returns the value of the renderTime if it is not 0,\n // and the value of the loadTime otherwise.\n var value = entry.startTime; // If the page was hidden prior to paint time of the entry,\n // ignore it and mark the metric as final, otherwise add the entry.\n\n if (value < firstHidden.timeStamp) {\n metric.value = value;\n metric.entries.push(entry);\n } else {\n metric.isFinal = true;\n }\n\n report();\n };\n\n var po = observe('largest-contentful-paint', entryHandler);\n\n if (po) {\n report = bindReporter(onReport, metric, po, reportAllChanges);\n\n var onFinal = function onFinal() {\n if (!metric.isFinal) {\n po.takeRecords().map(entryHandler);\n metric.isFinal = true;\n report();\n }\n };\n\n void whenInput().then(onFinal);\n onHidden(onFinal, true);\n }\n};","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getGlobalObject } from '@sentry/utils';\nimport { initMetric } from './lib/initMetric';\nvar global = getGlobalObject();\n\nvar afterLoad = function afterLoad(callback) {\n if (document.readyState === 'complete') {\n // Queue a task so the callback runs after `loadEventEnd`.\n setTimeout(callback, 0);\n } else {\n // Use `pageshow` so the callback runs after `loadEventEnd`.\n addEventListener('pageshow', callback);\n }\n};\n\nvar getNavigationEntryFromPerformanceTiming = function getNavigationEntryFromPerformanceTiming() {\n // Really annoying that TypeScript errors when using `PerformanceTiming`.\n // eslint-disable-next-line deprecation/deprecation\n var timing = global.performance.timing;\n var navigationEntry = {\n entryType: 'navigation',\n startTime: 0\n };\n\n for (var key in timing) {\n if (key !== 'navigationStart' && key !== 'toJSON') {\n navigationEntry[key] = Math.max(timing[key] - timing.navigationStart, 0);\n }\n }\n\n return navigationEntry;\n};\n\nexport var getTTFB = function getTTFB(onReport) {\n var metric = initMetric('TTFB');\n afterLoad(function () {\n try {\n // Use the NavigationTiming L2 entry if available.\n var navigationEntry = global.performance.getEntriesByType('navigation')[0] || getNavigationEntryFromPerformanceTiming();\n metric.value = metric.delta = navigationEntry.responseStart;\n metric.entries = [navigationEntry];\n onReport(metric);\n } catch (error) {// Do nothing.\n }\n });\n};","import { __assign, __rest } from \"tslib\";\nimport { browserPerformanceTimeOrigin, getGlobalObject, logger } from '@sentry/utils';\nimport { msToSec } from '../utils';\nimport { getCLS } from './web-vitals/getCLS';\nimport { getFID } from './web-vitals/getFID';\nimport { getLCP } from './web-vitals/getLCP';\nimport { getTTFB } from './web-vitals/getTTFB';\nimport { getFirstHidden } from './web-vitals/lib/getFirstHidden';\nvar global = getGlobalObject();\n/** Class tracking metrics */\n\nvar MetricsInstrumentation =\n/** @class */\nfunction () {\n function MetricsInstrumentation() {\n this._measurements = {};\n this._performanceCursor = 0;\n\n if (global && global.performance) {\n if (global.performance.mark) {\n global.performance.mark('sentry-tracing-init');\n }\n\n this._trackCLS();\n\n this._trackLCP();\n\n this._trackFID();\n\n this._trackTTFB();\n }\n }\n /** Add performance related spans to a transaction */\n\n\n MetricsInstrumentation.prototype.addPerformanceEntries = function (transaction) {\n var _this = this;\n\n if (!global || !global.performance || !global.performance.getEntries || !browserPerformanceTimeOrigin) {\n // Gatekeeper if performance API not available\n return;\n }\n\n logger.log('[Tracing] Adding & adjusting spans using Performance API');\n var timeOrigin = msToSec(browserPerformanceTimeOrigin);\n var entryScriptSrc;\n\n if (global.document) {\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (var i = 0; i < document.scripts.length; i++) {\n // We go through all scripts on the page and look for 'data-entry'\n // We remember the name and measure the time between this script finished loading and\n // our mark 'sentry-tracing-init'\n if (document.scripts[i].dataset.entry === 'true') {\n entryScriptSrc = document.scripts[i].src;\n break;\n }\n }\n }\n\n var entryScriptStartTimestamp;\n var tracingInitMarkStartTime;\n global.performance.getEntries().slice(this._performanceCursor).forEach(function (entry) {\n var startTime = msToSec(entry.startTime);\n var duration = msToSec(entry.duration);\n\n if (transaction.op === 'navigation' && timeOrigin + startTime < transaction.startTimestamp) {\n return;\n }\n\n switch (entry.entryType) {\n case 'navigation':\n addNavigationSpans(transaction, entry, timeOrigin);\n break;\n\n case 'mark':\n case 'paint':\n case 'measure':\n {\n var startTimestamp = addMeasureSpans(transaction, entry, startTime, duration, timeOrigin);\n\n if (tracingInitMarkStartTime === undefined && entry.name === 'sentry-tracing-init') {\n tracingInitMarkStartTime = startTimestamp;\n } // capture web vitals\n\n\n var firstHidden = getFirstHidden(); // Only report if the page wasn't hidden prior to the web vital.\n\n var shouldRecord = entry.startTime < firstHidden.timeStamp;\n\n if (entry.name === 'first-paint' && shouldRecord) {\n logger.log('[Measurements] Adding FP');\n _this._measurements['fp'] = {\n value: entry.startTime\n };\n _this._measurements['mark.fp'] = {\n value: startTimestamp\n };\n }\n\n if (entry.name === 'first-contentful-paint' && shouldRecord) {\n logger.log('[Measurements] Adding FCP');\n _this._measurements['fcp'] = {\n value: entry.startTime\n };\n _this._measurements['mark.fcp'] = {\n value: startTimestamp\n };\n }\n\n break;\n }\n\n case 'resource':\n {\n var resourceName = entry.name.replace(window.location.origin, '');\n var endTimestamp = addResourceSpans(transaction, entry, resourceName, startTime, duration, timeOrigin); // We remember the entry script end time to calculate the difference to the first init mark\n\n if (entryScriptStartTimestamp === undefined && (entryScriptSrc || '').indexOf(resourceName) > -1) {\n entryScriptStartTimestamp = endTimestamp;\n }\n\n break;\n }\n\n default: // Ignore other entry types.\n\n }\n });\n\n if (entryScriptStartTimestamp !== undefined && tracingInitMarkStartTime !== undefined) {\n _startChild(transaction, {\n description: 'evaluation',\n endTimestamp: tracingInitMarkStartTime,\n op: 'script',\n startTimestamp: entryScriptStartTimestamp\n });\n }\n\n this._performanceCursor = Math.max(performance.getEntries().length - 1, 0);\n\n this._trackNavigator(transaction); // Measurements are only available for pageload transactions\n\n\n if (transaction.op === 'pageload') {\n // normalize applicable web vital values to be relative to transaction.startTimestamp\n var timeOrigin_1 = msToSec(browserPerformanceTimeOrigin);\n ['fcp', 'fp', 'lcp', 'ttfb'].forEach(function (name) {\n if (!_this._measurements[name] || timeOrigin_1 >= transaction.startTimestamp) {\n return;\n } // The web vitals, fcp, fp, lcp, and ttfb, all measure relative to timeOrigin.\n // Unfortunately, timeOrigin is not captured within the transaction span data, so these web vitals will need\n // to be adjusted to be relative to transaction.startTimestamp.\n\n\n var oldValue = _this._measurements[name].value;\n var measurementTimestamp = timeOrigin_1 + msToSec(oldValue); // normalizedValue should be in milliseconds\n\n var normalizedValue = Math.abs((measurementTimestamp - transaction.startTimestamp) * 1000);\n var delta = normalizedValue - oldValue;\n logger.log(\"[Measurements] Normalized \" + name + \" from \" + oldValue + \" to \" + normalizedValue + \" (\" + delta + \")\");\n _this._measurements[name].value = normalizedValue;\n });\n\n if (this._measurements['mark.fid'] && this._measurements['fid']) {\n // create span for FID\n _startChild(transaction, {\n description: 'first input delay',\n endTimestamp: this._measurements['mark.fid'].value + msToSec(this._measurements['fid'].value),\n op: 'web.vitals',\n startTimestamp: this._measurements['mark.fid'].value\n });\n }\n\n transaction.setMeasurements(this._measurements);\n }\n };\n /** Starts tracking the Cumulative Layout Shift on the current page. */\n\n\n MetricsInstrumentation.prototype._trackCLS = function () {\n var _this = this;\n\n getCLS(function (metric) {\n var entry = metric.entries.pop();\n\n if (!entry) {\n return;\n }\n\n logger.log('[Measurements] Adding CLS');\n _this._measurements['cls'] = {\n value: metric.value\n };\n });\n };\n /**\n * Capture the information of the user agent.\n */\n\n\n MetricsInstrumentation.prototype._trackNavigator = function (transaction) {\n var navigator = global.navigator;\n\n if (!navigator) {\n return;\n } // track network connectivity\n\n\n var connection = navigator.connection;\n\n if (connection) {\n if (connection.effectiveType) {\n transaction.setTag('effectiveConnectionType', connection.effectiveType);\n }\n\n if (connection.type) {\n transaction.setTag('connectionType', connection.type);\n }\n\n if (isMeasurementValue(connection.rtt)) {\n this._measurements['connection.rtt'] = {\n value: connection.rtt\n };\n }\n\n if (isMeasurementValue(connection.downlink)) {\n this._measurements['connection.downlink'] = {\n value: connection.downlink\n };\n }\n }\n\n if (isMeasurementValue(navigator.deviceMemory)) {\n transaction.setTag('deviceMemory', String(navigator.deviceMemory));\n }\n\n if (isMeasurementValue(navigator.hardwareConcurrency)) {\n transaction.setTag('hardwareConcurrency', String(navigator.hardwareConcurrency));\n }\n };\n /** Starts tracking the Largest Contentful Paint on the current page. */\n\n\n MetricsInstrumentation.prototype._trackLCP = function () {\n var _this = this;\n\n getLCP(function (metric) {\n var entry = metric.entries.pop();\n\n if (!entry) {\n return;\n }\n\n var timeOrigin = msToSec(performance.timeOrigin);\n var startTime = msToSec(entry.startTime);\n logger.log('[Measurements] Adding LCP');\n _this._measurements['lcp'] = {\n value: metric.value\n };\n _this._measurements['mark.lcp'] = {\n value: timeOrigin + startTime\n };\n });\n };\n /** Starts tracking the First Input Delay on the current page. */\n\n\n MetricsInstrumentation.prototype._trackFID = function () {\n var _this = this;\n\n getFID(function (metric) {\n var entry = metric.entries.pop();\n\n if (!entry) {\n return;\n }\n\n var timeOrigin = msToSec(performance.timeOrigin);\n var startTime = msToSec(entry.startTime);\n logger.log('[Measurements] Adding FID');\n _this._measurements['fid'] = {\n value: metric.value\n };\n _this._measurements['mark.fid'] = {\n value: timeOrigin + startTime\n };\n });\n };\n /** Starts tracking the Time to First Byte on the current page. */\n\n\n MetricsInstrumentation.prototype._trackTTFB = function () {\n var _this = this;\n\n getTTFB(function (metric) {\n var _a;\n\n var entry = metric.entries.pop();\n\n if (!entry) {\n return;\n }\n\n logger.log('[Measurements] Adding TTFB');\n _this._measurements['ttfb'] = {\n value: metric.value\n }; // Capture the time spent making the request and receiving the first byte of the response\n\n var requestTime = metric.value - (_a = metric.entries[0], _a !== null && _a !== void 0 ? _a : entry).requestStart;\n _this._measurements['ttfb.requestTime'] = {\n value: requestTime\n };\n });\n };\n\n return MetricsInstrumentation;\n}();\n\nexport { MetricsInstrumentation };\n/** Instrument navigation entries */\n\nfunction addNavigationSpans(transaction, entry, timeOrigin) {\n addPerformanceNavigationTiming(transaction, entry, 'unloadEvent', timeOrigin);\n addPerformanceNavigationTiming(transaction, entry, 'redirect', timeOrigin);\n addPerformanceNavigationTiming(transaction, entry, 'domContentLoadedEvent', timeOrigin);\n addPerformanceNavigationTiming(transaction, entry, 'loadEvent', timeOrigin);\n addPerformanceNavigationTiming(transaction, entry, 'connect', timeOrigin);\n addPerformanceNavigationTiming(transaction, entry, 'secureConnection', timeOrigin, 'connectEnd');\n addPerformanceNavigationTiming(transaction, entry, 'fetch', timeOrigin, 'domainLookupStart');\n addPerformanceNavigationTiming(transaction, entry, 'domainLookup', timeOrigin);\n addRequest(transaction, entry, timeOrigin);\n}\n/** Create measure related spans */\n\n\nfunction addMeasureSpans(transaction, entry, startTime, duration, timeOrigin) {\n var measureStartTimestamp = timeOrigin + startTime;\n var measureEndTimestamp = measureStartTimestamp + duration;\n\n _startChild(transaction, {\n description: entry.name,\n endTimestamp: measureEndTimestamp,\n op: entry.entryType,\n startTimestamp: measureStartTimestamp\n });\n\n return measureStartTimestamp;\n}\n/** Create resource related spans */\n\n\nexport function addResourceSpans(transaction, entry, resourceName, startTime, duration, timeOrigin) {\n // we already instrument based on fetch and xhr, so we don't need to\n // duplicate spans here.\n if (entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch') {\n return undefined;\n }\n\n var data = {};\n\n if ('transferSize' in entry) {\n data['Transfer Size'] = entry.transferSize;\n }\n\n if ('encodedBodySize' in entry) {\n data['Encoded Body Size'] = entry.encodedBodySize;\n }\n\n if ('decodedBodySize' in entry) {\n data['Decoded Body Size'] = entry.decodedBodySize;\n }\n\n var startTimestamp = timeOrigin + startTime;\n var endTimestamp = startTimestamp + duration;\n\n _startChild(transaction, {\n description: resourceName,\n endTimestamp: endTimestamp,\n op: entry.initiatorType ? \"resource.\" + entry.initiatorType : 'resource',\n startTimestamp: startTimestamp,\n data: data\n });\n\n return endTimestamp;\n}\n/** Create performance navigation related spans */\n\nfunction addPerformanceNavigationTiming(transaction, entry, event, timeOrigin, eventEnd) {\n var end = eventEnd ? entry[eventEnd] : entry[event + \"End\"];\n var start = entry[event + \"Start\"];\n\n if (!start || !end) {\n return;\n }\n\n _startChild(transaction, {\n description: event,\n endTimestamp: timeOrigin + msToSec(end),\n op: 'browser',\n startTimestamp: timeOrigin + msToSec(start)\n });\n}\n/** Create request and response related spans */\n\n\nfunction addRequest(transaction, entry, timeOrigin) {\n _startChild(transaction, {\n description: 'request',\n endTimestamp: timeOrigin + msToSec(entry.responseEnd),\n op: 'browser',\n startTimestamp: timeOrigin + msToSec(entry.requestStart)\n });\n\n _startChild(transaction, {\n description: 'response',\n endTimestamp: timeOrigin + msToSec(entry.responseEnd),\n op: 'browser',\n startTimestamp: timeOrigin + msToSec(entry.responseStart)\n });\n}\n/**\n * Helper function to start child on transactions. This function will make sure that the transaction will\n * use the start timestamp of the created child span if it is earlier than the transactions actual\n * start timestamp.\n */\n\n\nexport function _startChild(transaction, _a) {\n var startTimestamp = _a.startTimestamp,\n ctx = __rest(_a, [\"startTimestamp\"]);\n\n if (startTimestamp && transaction.startTimestamp > startTimestamp) {\n transaction.startTimestamp = startTimestamp;\n }\n\n return transaction.startChild(__assign({\n startTimestamp: startTimestamp\n }, ctx));\n}\n/**\n * Checks if a given value is a valid measurement value.\n */\n\nfunction isMeasurementValue(value) {\n return typeof value === 'number' && isFinite(value);\n}","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { bindReporter } from './lib/bindReporter';\nimport { initMetric } from './lib/initMetric';\nimport { observe } from './lib/observe';\nimport { onHidden } from './lib/onHidden';\nexport var getCLS = function getCLS(onReport, reportAllChanges) {\n if (reportAllChanges === void 0) {\n reportAllChanges = false;\n }\n\n var metric = initMetric('CLS', 0);\n var report;\n\n var entryHandler = function entryHandler(entry) {\n // Only count layout shifts without recent user input.\n if (!entry.hadRecentInput) {\n metric.value += entry.value;\n metric.entries.push(entry);\n report();\n }\n };\n\n var po = observe('layout-shift', entryHandler);\n\n if (po) {\n report = bindReporter(onReport, metric, po, reportAllChanges);\n onHidden(function (_a) {\n var isUnloading = _a.isUnloading;\n po.takeRecords().map(entryHandler);\n\n if (isUnloading) {\n metric.isFinal = true;\n }\n\n report();\n });\n }\n};","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { bindReporter } from './lib/bindReporter';\nimport { getFirstHidden } from './lib/getFirstHidden';\nimport { initMetric } from './lib/initMetric';\nimport { observe } from './lib/observe';\nimport { onHidden } from './lib/onHidden';\nexport var getFID = function getFID(onReport) {\n var metric = initMetric('FID');\n var firstHidden = getFirstHidden();\n\n var entryHandler = function entryHandler(entry) {\n // Only report if the page wasn't hidden prior to the first input.\n if (entry.startTime < firstHidden.timeStamp) {\n metric.value = entry.processingStart - entry.startTime;\n metric.entries.push(entry);\n metric.isFinal = true;\n report();\n }\n };\n\n var po = observe('first-input', entryHandler);\n var report = bindReporter(onReport, metric, po);\n\n if (po) {\n onHidden(function () {\n po.takeRecords().map(entryHandler);\n po.disconnect();\n }, true);\n } else {\n if (window.perfMetrics && window.perfMetrics.onFirstInputDelay) {\n window.perfMetrics.onFirstInputDelay(function (value, event) {\n // Only report if the page wasn't hidden prior to the first input.\n if (event.timeStamp < firstHidden.timeStamp) {\n metric.value = value;\n metric.isFinal = true;\n metric.entries = [{\n entryType: 'first-input',\n name: event.type,\n target: event.target,\n cancelable: event.cancelable,\n startTime: event.timeStamp,\n processingStart: event.timeStamp + value\n }];\n report();\n }\n });\n }\n }\n};","import { __assign, __read, __spread } from \"tslib\";\nimport { getCurrentHub } from '@sentry/hub';\nimport { addInstrumentationHandler, isInstanceOf, isMatchingPattern } from '@sentry/utils';\nimport { getActiveTransaction, hasTracingEnabled } from '../utils';\nexport var DEFAULT_TRACING_ORIGINS = ['localhost', /^\\//];\nexport var defaultRequestInstrumentationOptions = {\n traceFetch: true,\n traceXHR: true,\n tracingOrigins: DEFAULT_TRACING_ORIGINS\n};\n/** Registers span creators for xhr and fetch requests */\n\nexport function registerRequestInstrumentation(_options) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n var _a = __assign(__assign({}, defaultRequestInstrumentationOptions), _options),\n traceFetch = _a.traceFetch,\n traceXHR = _a.traceXHR,\n tracingOrigins = _a.tracingOrigins,\n shouldCreateSpanForRequest = _a.shouldCreateSpanForRequest; // We should cache url -> decision so that we don't have to compute\n // regexp everytime we create a request.\n\n\n var urlMap = {};\n\n var defaultShouldCreateSpan = function defaultShouldCreateSpan(url) {\n if (urlMap[url]) {\n return urlMap[url];\n }\n\n var origins = tracingOrigins;\n urlMap[url] = origins.some(function (origin) {\n return isMatchingPattern(url, origin);\n }) && !isMatchingPattern(url, 'sentry_key');\n return urlMap[url];\n }; // We want that our users don't have to re-implement shouldCreateSpanForRequest themselves\n // That's why we filter out already unwanted Spans from tracingOrigins\n\n\n var shouldCreateSpan = defaultShouldCreateSpan;\n\n if (typeof shouldCreateSpanForRequest === 'function') {\n shouldCreateSpan = function shouldCreateSpan(url) {\n return defaultShouldCreateSpan(url) && shouldCreateSpanForRequest(url);\n };\n }\n\n var spans = {};\n\n if (traceFetch) {\n addInstrumentationHandler({\n callback: function callback(handlerData) {\n fetchCallback(handlerData, shouldCreateSpan, spans);\n },\n type: 'fetch'\n });\n }\n\n if (traceXHR) {\n addInstrumentationHandler({\n callback: function callback(handlerData) {\n xhrCallback(handlerData, shouldCreateSpan, spans);\n },\n type: 'xhr'\n });\n }\n}\n/**\n * Create and track fetch request spans\n */\n\nexport function fetchCallback(handlerData, shouldCreateSpan, spans) {\n var _a;\n\n var currentClientOptions = (_a = getCurrentHub().getClient()) === null || _a === void 0 ? void 0 : _a.getOptions();\n\n if (!(currentClientOptions && hasTracingEnabled(currentClientOptions)) || !(handlerData.fetchData && shouldCreateSpan(handlerData.fetchData.url))) {\n return;\n }\n\n if (handlerData.endTimestamp && handlerData.fetchData.__span) {\n var span = spans[handlerData.fetchData.__span];\n\n if (span) {\n var response = handlerData.response;\n\n if (response) {\n // TODO (kmclb) remove this once types PR goes through\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n span.setHttpStatus(response.status);\n }\n\n span.finish(); // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n\n delete spans[handlerData.fetchData.__span];\n }\n\n return;\n }\n\n var activeTransaction = getActiveTransaction();\n\n if (activeTransaction) {\n var span = activeTransaction.startChild({\n data: __assign(__assign({}, handlerData.fetchData), {\n type: 'fetch'\n }),\n description: handlerData.fetchData.method + \" \" + handlerData.fetchData.url,\n op: 'http'\n });\n handlerData.fetchData.__span = span.spanId;\n spans[span.spanId] = span;\n var request = handlerData.args[0] = handlerData.args[0]; // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n var options = handlerData.args[1] = handlerData.args[1] || {};\n var headers = options.headers;\n\n if (isInstanceOf(request, Request)) {\n headers = request.headers;\n }\n\n if (headers) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (typeof headers.append === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n headers.append('sentry-trace', span.toTraceparent());\n } else if (Array.isArray(headers)) {\n headers = __spread(headers, [['sentry-trace', span.toTraceparent()]]);\n } else {\n headers = __assign(__assign({}, headers), {\n 'sentry-trace': span.toTraceparent()\n });\n }\n } else {\n headers = {\n 'sentry-trace': span.toTraceparent()\n };\n }\n\n options.headers = headers;\n }\n}\n/**\n * Create and track xhr request spans\n */\n\nexport function xhrCallback(handlerData, shouldCreateSpan, spans) {\n var _a;\n\n var currentClientOptions = (_a = getCurrentHub().getClient()) === null || _a === void 0 ? void 0 : _a.getOptions();\n\n if (!(currentClientOptions && hasTracingEnabled(currentClientOptions)) || !(handlerData.xhr && handlerData.xhr.__sentry_xhr__ && shouldCreateSpan(handlerData.xhr.__sentry_xhr__.url)) || handlerData.xhr.__sentry_own_request__) {\n return;\n }\n\n var xhr = handlerData.xhr.__sentry_xhr__; // check first if the request has finished and is tracked by an existing span which should now end\n\n if (handlerData.endTimestamp && handlerData.xhr.__sentry_xhr_span_id__) {\n var span = spans[handlerData.xhr.__sentry_xhr_span_id__];\n\n if (span) {\n span.setHttpStatus(xhr.status_code);\n span.finish(); // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n\n delete spans[handlerData.xhr.__sentry_xhr_span_id__];\n }\n\n return;\n } // if not, create a new span to track it\n\n\n var activeTransaction = getActiveTransaction();\n\n if (activeTransaction) {\n var span = activeTransaction.startChild({\n data: __assign(__assign({}, xhr.data), {\n type: 'xhr',\n method: xhr.method,\n url: xhr.url\n }),\n description: xhr.method + \" \" + xhr.url,\n op: 'http'\n });\n handlerData.xhr.__sentry_xhr_span_id__ = span.spanId;\n spans[handlerData.xhr.__sentry_xhr_span_id__] = span;\n\n if (handlerData.xhr.setRequestHeader) {\n try {\n handlerData.xhr.setRequestHeader('sentry-trace', span.toTraceparent());\n } catch (_) {// Error: InvalidStateError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.\n }\n }\n }\n}","import { addInstrumentationHandler, getGlobalObject, logger } from '@sentry/utils';\nvar global = getGlobalObject();\n/**\n * Default function implementing pageload and navigation transactions\n */\n\nexport function defaultRoutingInstrumentation(startTransaction, startTransactionOnPageLoad, startTransactionOnLocationChange) {\n if (startTransactionOnPageLoad === void 0) {\n startTransactionOnPageLoad = true;\n }\n\n if (startTransactionOnLocationChange === void 0) {\n startTransactionOnLocationChange = true;\n }\n\n if (!global || !global.location) {\n logger.warn('Could not initialize routing instrumentation due to invalid location');\n return;\n }\n\n var startingUrl = global.location.href;\n var activeTransaction;\n\n if (startTransactionOnPageLoad) {\n activeTransaction = startTransaction({\n name: global.location.pathname,\n op: 'pageload'\n });\n }\n\n if (startTransactionOnLocationChange) {\n addInstrumentationHandler({\n callback: function callback(_a) {\n var to = _a.to,\n from = _a.from;\n /**\n * This early return is there to account for some cases where a navigation transaction starts right after\n * long-running pageload. We make sure that if `from` is undefined and a valid `startingURL` exists, we don't\n * create an uneccessary navigation transaction.\n *\n * This was hard to duplicate, but this behavior stopped as soon as this fix was applied. This issue might also\n * only be caused in certain development environments where the usage of a hot module reloader is causing\n * errors.\n */\n\n if (from === undefined && startingUrl && startingUrl.indexOf(to) !== -1) {\n startingUrl = undefined;\n return;\n }\n\n if (from !== to) {\n startingUrl = undefined;\n\n if (activeTransaction) {\n logger.log(\"[Tracing] Finishing current transaction with op: \" + activeTransaction.op); // If there's an open transaction on the scope, we need to finish it before creating an new one.\n\n activeTransaction.finish();\n }\n\n activeTransaction = startTransaction({\n name: global.location.pathname,\n op: 'navigation'\n });\n }\n },\n type: 'history'\n });\n }\n}","import { __assign } from \"tslib\";\nimport { logger } from '@sentry/utils';\nimport { startIdleTransaction } from '../hubextensions';\nimport { DEFAULT_IDLE_TIMEOUT } from '../idletransaction';\nimport { SpanStatus } from '../spanstatus';\nimport { extractTraceparentData, secToMs } from '../utils';\nimport { registerBackgroundTabDetection } from './backgroundtab';\nimport { MetricsInstrumentation } from './metrics';\nimport { defaultRequestInstrumentationOptions, registerRequestInstrumentation } from './request';\nimport { defaultRoutingInstrumentation } from './router';\nexport var DEFAULT_MAX_TRANSACTION_DURATION_SECONDS = 600;\n\nvar DEFAULT_BROWSER_TRACING_OPTIONS = __assign({\n idleTimeout: DEFAULT_IDLE_TIMEOUT,\n markBackgroundTransactions: true,\n maxTransactionDuration: DEFAULT_MAX_TRANSACTION_DURATION_SECONDS,\n routingInstrumentation: defaultRoutingInstrumentation,\n startTransactionOnLocationChange: true,\n startTransactionOnPageLoad: true\n}, defaultRequestInstrumentationOptions);\n/**\n * The Browser Tracing integration automatically instruments browser pageload/navigation\n * actions as transactions, and captures requests, metrics and errors as spans.\n *\n * The integration can be configured with a variety of options, and can be extended to use\n * any routing library. This integration uses {@see IdleTransaction} to create transactions.\n */\n\n\nvar BrowserTracing =\n/** @class */\nfunction () {\n function BrowserTracing(_options) {\n /**\n * @inheritDoc\n */\n this.name = BrowserTracing.id;\n this._metrics = new MetricsInstrumentation();\n this._emitOptionsWarning = false;\n var tracingOrigins = defaultRequestInstrumentationOptions.tracingOrigins; // NOTE: Logger doesn't work in constructors, as it's initialized after integrations instances\n\n if (_options && _options.tracingOrigins && Array.isArray(_options.tracingOrigins) && _options.tracingOrigins.length !== 0) {\n tracingOrigins = _options.tracingOrigins;\n } else {\n this._emitOptionsWarning = true;\n }\n\n this.options = __assign(__assign(__assign({}, DEFAULT_BROWSER_TRACING_OPTIONS), _options), {\n tracingOrigins: tracingOrigins\n });\n }\n /**\n * @inheritDoc\n */\n\n\n BrowserTracing.prototype.setupOnce = function (_, getCurrentHub) {\n var _this = this;\n\n this._getCurrentHub = getCurrentHub;\n\n if (this._emitOptionsWarning) {\n logger.warn('[Tracing] You need to define `tracingOrigins` in the options. Set an array of urls or patterns to trace.');\n logger.warn(\"[Tracing] We added a reasonable default for you: \" + defaultRequestInstrumentationOptions.tracingOrigins);\n } // eslint-disable-next-line @typescript-eslint/unbound-method\n\n\n var _a = this.options,\n routingInstrumentation = _a.routingInstrumentation,\n startTransactionOnLocationChange = _a.startTransactionOnLocationChange,\n startTransactionOnPageLoad = _a.startTransactionOnPageLoad,\n markBackgroundTransactions = _a.markBackgroundTransactions,\n traceFetch = _a.traceFetch,\n traceXHR = _a.traceXHR,\n tracingOrigins = _a.tracingOrigins,\n shouldCreateSpanForRequest = _a.shouldCreateSpanForRequest;\n routingInstrumentation(function (context) {\n return _this._createRouteTransaction(context);\n }, startTransactionOnPageLoad, startTransactionOnLocationChange);\n\n if (markBackgroundTransactions) {\n registerBackgroundTabDetection();\n }\n\n registerRequestInstrumentation({\n traceFetch: traceFetch,\n traceXHR: traceXHR,\n tracingOrigins: tracingOrigins,\n shouldCreateSpanForRequest: shouldCreateSpanForRequest\n });\n };\n /** Create routing idle transaction. */\n\n\n BrowserTracing.prototype._createRouteTransaction = function (context) {\n var _this = this;\n\n if (!this._getCurrentHub) {\n logger.warn(\"[Tracing] Did not create \" + context.op + \" transaction because _getCurrentHub is invalid.\");\n return undefined;\n } // eslint-disable-next-line @typescript-eslint/unbound-method\n\n\n var _a = this.options,\n beforeNavigate = _a.beforeNavigate,\n idleTimeout = _a.idleTimeout,\n maxTransactionDuration = _a.maxTransactionDuration;\n var parentContextFromHeader = context.op === 'pageload' ? getHeaderContext() : undefined;\n\n var expandedContext = __assign(__assign(__assign({}, context), parentContextFromHeader), {\n trimEnd: true\n });\n\n var modifiedContext = typeof beforeNavigate === 'function' ? beforeNavigate(expandedContext) : expandedContext; // For backwards compatibility reasons, beforeNavigate can return undefined to \"drop\" the transaction (prevent it\n // from being sent to Sentry).\n\n var finalContext = modifiedContext === undefined ? __assign(__assign({}, expandedContext), {\n sampled: false\n }) : modifiedContext;\n\n if (finalContext.sampled === false) {\n logger.log(\"[Tracing] Will not send \" + finalContext.op + \" transaction because of beforeNavigate.\");\n }\n\n var hub = this._getCurrentHub();\n\n var idleTransaction = startIdleTransaction(hub, finalContext, idleTimeout, true);\n logger.log(\"[Tracing] Starting \" + finalContext.op + \" transaction on scope\");\n idleTransaction.registerBeforeFinishCallback(function (transaction, endTimestamp) {\n _this._metrics.addPerformanceEntries(transaction);\n\n adjustTransactionDuration(secToMs(maxTransactionDuration), transaction, endTimestamp);\n });\n return idleTransaction;\n };\n /**\n * @inheritDoc\n */\n\n\n BrowserTracing.id = 'BrowserTracing';\n return BrowserTracing;\n}();\n\nexport { BrowserTracing };\n/**\n * Gets transaction context from a sentry-trace meta.\n *\n * @returns Transaction context data from the header or undefined if there's no header or the header is malformed\n */\n\nexport function getHeaderContext() {\n var header = getMetaContent('sentry-trace');\n\n if (header) {\n return extractTraceparentData(header);\n }\n\n return undefined;\n}\n/** Returns the value of a meta tag */\n\nexport function getMetaContent(metaName) {\n var el = document.querySelector(\"meta[name=\" + metaName + \"]\");\n return el ? el.getAttribute('content') : null;\n}\n/** Adjusts transaction value based on max transaction duration */\n\nfunction adjustTransactionDuration(maxDuration, transaction, endTimestamp) {\n var diff = endTimestamp - transaction.startTimestamp;\n var isOutdatedTransaction = endTimestamp && (diff > maxDuration || diff < 0);\n\n if (isOutdatedTransaction) {\n transaction.setStatus(SpanStatus.DeadlineExceeded);\n transaction.setTag('maxTransactionDurationExceeded', 'true');\n }\n}","import { __read, __spread } from \"tslib\";\nimport { logger } from '@sentry/utils';\n/**\n * Express integration\n *\n * Provides an request and error handler for Express framework as well as tracing capabilities\n */\n\nvar Express =\n/** @class */\nfunction () {\n /**\n * @inheritDoc\n */\n function Express(options) {\n if (options === void 0) {\n options = {};\n }\n /**\n * @inheritDoc\n */\n\n\n this.name = Express.id;\n this._router = options.router || options.app;\n this._methods = (Array.isArray(options.methods) ? options.methods : []).concat('use');\n }\n /**\n * @inheritDoc\n */\n\n\n Express.prototype.setupOnce = function () {\n if (!this._router) {\n logger.error('ExpressIntegration is missing an Express instance');\n return;\n }\n\n instrumentMiddlewares(this._router, this._methods);\n };\n /**\n * @inheritDoc\n */\n\n\n Express.id = 'Express';\n return Express;\n}();\n\nexport { Express };\n/**\n * Wraps original middleware function in a tracing call, which stores the info about the call as a span,\n * and finishes it once the middleware is done invoking.\n *\n * Express middlewares have 3 various forms, thus we have to take care of all of them:\n * // sync\n * app.use(function (req, res) { ... })\n * // async\n * app.use(function (req, res, next) { ... })\n * // error handler\n * app.use(function (err, req, res, next) { ... })\n *\n * They all internally delegate to the `router[method]` of the given application instance.\n */\n// eslint-disable-next-line @typescript-eslint/ban-types, @typescript-eslint/no-explicit-any\n\nfunction wrap(fn, method) {\n var arity = fn.length;\n\n switch (arity) {\n case 2:\n {\n return function (req, res) {\n var transaction = res.__sentry_transaction;\n\n if (transaction) {\n var span_1 = transaction.startChild({\n description: fn.name,\n op: \"middleware.\" + method\n });\n res.once('finish', function () {\n span_1.finish();\n });\n }\n\n return fn.call(this, req, res);\n };\n }\n\n case 3:\n {\n return function (req, res, next) {\n var _a;\n\n var transaction = res.__sentry_transaction;\n var span = (_a = transaction) === null || _a === void 0 ? void 0 : _a.startChild({\n description: fn.name,\n op: \"middleware.\" + method\n });\n fn.call(this, req, res, function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n var _a;\n\n (_a = span) === null || _a === void 0 ? void 0 : _a.finish();\n next.call.apply(next, __spread([this], args));\n });\n };\n }\n\n case 4:\n {\n return function (err, req, res, next) {\n var _a;\n\n var transaction = res.__sentry_transaction;\n var span = (_a = transaction) === null || _a === void 0 ? void 0 : _a.startChild({\n description: fn.name,\n op: \"middleware.\" + method\n });\n fn.call(this, err, req, res, function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n var _a;\n\n (_a = span) === null || _a === void 0 ? void 0 : _a.finish();\n next.call.apply(next, __spread([this], args));\n });\n };\n }\n\n default:\n {\n throw new Error(\"Express middleware takes 2-4 arguments. Got: \" + arity);\n }\n }\n}\n/**\n * Takes all the function arguments passed to the original `app` or `router` method, eg. `app.use` or `router.use`\n * and wraps every function, as well as array of functions with a call to our `wrap` method.\n * We have to take care of the arrays as well as iterate over all of the arguments,\n * as `app.use` can accept middlewares in few various forms.\n *\n * app.use([], )\n * app.use([], , ...)\n * app.use([], ...[])\n */\n\n\nfunction wrapMiddlewareArgs(args, method) {\n return args.map(function (arg) {\n if (typeof arg === 'function') {\n return wrap(arg, method);\n }\n\n if (Array.isArray(arg)) {\n return arg.map(function (a) {\n if (typeof a === 'function') {\n return wrap(a, method);\n }\n\n return a;\n });\n }\n\n return arg;\n });\n}\n/**\n * Patches original router to utilize our tracing functionality\n */\n\n\nfunction patchMiddleware(router, method) {\n var originalCallback = router[method];\n\n router[method] = function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n return originalCallback.call.apply(originalCallback, __spread([this], wrapMiddlewareArgs(args, method)));\n };\n\n return router;\n}\n/**\n * Patches original router methods\n */\n\n\nfunction instrumentMiddlewares(router, methods) {\n if (methods === void 0) {\n methods = [];\n }\n\n methods.forEach(function (method) {\n return patchMiddleware(router, method);\n });\n}","import { __assign } from \"tslib\";\nimport { BrowserTracing } from './browser';\nimport { addExtensionMethods } from './hubextensions';\nimport * as TracingIntegrations from './integrations';\n\nvar Integrations = __assign(__assign({}, TracingIntegrations), {\n BrowserTracing: BrowserTracing\n});\n\nexport { Integrations };\nexport { Span } from './span';\nexport { Transaction } from './transaction';\nexport { SpanStatus } from './spanstatus'; // We are patching the global object with our hub extension methods\n\naddExtensionMethods();\nexport { addExtensionMethods };\nexport { extractTraceparentData, getActiveTransaction, hasTracingEnabled, stripUrlQueryAndFragment, TRACEPARENT_REGEXP } from './utils';","import { useMemo } from 'react';\n\nvar toFnRef = function toFnRef(ref) {\n return !ref || typeof ref === 'function' ? ref : function (value) {\n ref.current = value;\n };\n};\n\nexport function mergeRefs(refA, refB) {\n var a = toFnRef(refA);\n var b = toFnRef(refB);\n return function (value) {\n if (a) a(value);\n if (b) b(value);\n };\n}\n/**\n * Create and returns a single callback ref composed from two other Refs.\n *\n * ```tsx\n * const Button = React.forwardRef((props, ref) => {\n * const [element, attachRef] = useCallbackRef();\n * const mergedRef = useMergedRefs(ref, attachRef);\n *\n * return \n * })\n * ```\n *\n * @param refA A Callback or mutable Ref\n * @param refB A Callback or mutable Ref\n * @category refs\n */\n\nfunction useMergedRefs(refA, refB) {\n return useMemo(function () {\n return mergeRefs(refA, refB);\n }, [refA, refB]);\n}\n\nexport default useMergedRefs;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport PropTypes from 'prop-types';\nimport React, { useState } from 'react';\nimport ReactDOM from 'react-dom';\nimport useCallbackRef from '@restart/hooks/useCallbackRef';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport { placements } from './popper';\nimport usePopper from './usePopper';\nimport useRootClose from './useRootClose';\nimport useWaitForDOMRef from './useWaitForDOMRef';\nimport mergeOptionsWithPopperConfig from './mergeOptionsWithPopperConfig';\n/**\n * Built on top of `Popper.js`, the overlay component is\n * great for custom tooltip overlays.\n */\n\nvar Overlay =\n/*#__PURE__*/\nReact.forwardRef(function (props, outerRef) {\n var flip = props.flip,\n offset = props.offset,\n placement = props.placement,\n _props$containerPaddi = props.containerPadding,\n containerPadding = _props$containerPaddi === void 0 ? 5 : _props$containerPaddi,\n _props$popperConfig = props.popperConfig,\n popperConfig = _props$popperConfig === void 0 ? {} : _props$popperConfig,\n Transition = props.transition;\n\n var _useCallbackRef = useCallbackRef(),\n rootElement = _useCallbackRef[0],\n attachRef = _useCallbackRef[1];\n\n var _useCallbackRef2 = useCallbackRef(),\n arrowElement = _useCallbackRef2[0],\n attachArrowRef = _useCallbackRef2[1];\n\n var mergedRef = useMergedRefs(attachRef, outerRef);\n var container = useWaitForDOMRef(props.container);\n var target = useWaitForDOMRef(props.target);\n\n var _useState = useState(!props.show),\n exited = _useState[0],\n setExited = _useState[1];\n\n var _usePopper = usePopper(target, rootElement, mergeOptionsWithPopperConfig({\n placement: placement,\n enableEvents: !!props.show,\n containerPadding: containerPadding || 5,\n flip: flip,\n offset: offset,\n arrowElement: arrowElement,\n popperConfig: popperConfig\n })),\n styles = _usePopper.styles,\n attributes = _usePopper.attributes,\n popper = _objectWithoutPropertiesLoose(_usePopper, [\"styles\", \"attributes\"]);\n\n if (props.show) {\n if (exited) setExited(false);\n } else if (!props.transition && !exited) {\n setExited(true);\n }\n\n var handleHidden = function handleHidden() {\n setExited(true);\n\n if (props.onExited) {\n props.onExited.apply(props, arguments);\n }\n }; // Don't un-render the overlay while it's transitioning out.\n\n\n var mountOverlay = props.show || Transition && !exited;\n useRootClose(rootElement, props.onHide, {\n disabled: !props.rootClose || props.rootCloseDisabled,\n clickTrigger: props.rootCloseEvent\n });\n\n if (!mountOverlay) {\n // Don't bother showing anything if we don't have to.\n return null;\n }\n\n var child = props.children(_extends({}, popper, {\n show: !!props.show,\n props: _extends({}, attributes.popper, {\n style: styles.popper,\n ref: mergedRef\n }),\n arrowProps: _extends({}, attributes.arrow, {\n style: styles.arrow,\n ref: attachArrowRef\n })\n }));\n\n if (Transition) {\n var onExit = props.onExit,\n onExiting = props.onExiting,\n onEnter = props.onEnter,\n onEntering = props.onEntering,\n onEntered = props.onEntered;\n child =\n /*#__PURE__*/\n React.createElement(Transition, {\n \"in\": props.show,\n appear: true,\n onExit: onExit,\n onExiting: onExiting,\n onExited: handleHidden,\n onEnter: onEnter,\n onEntering: onEntering,\n onEntered: onEntered\n }, child);\n }\n\n return container ?\n /*#__PURE__*/\n ReactDOM.createPortal(child, container) : null;\n});\nOverlay.displayName = 'Overlay';\nOverlay.propTypes = {\n /**\n * Set the visibility of the Overlay\n */\n show: PropTypes.bool,\n\n /** Specify where the overlay element is positioned in relation to the target element */\n placement: PropTypes.oneOf(placements),\n\n /**\n * A DOM Element, Ref to an element, or function that returns either. The `target` element is where\n * the overlay is positioned relative to.\n */\n target: PropTypes.any,\n\n /**\n * A DOM Element, Ref to an element, or function that returns either. The `container` will have the Portal children\n * appended to it.\n */\n container: PropTypes.any,\n\n /**\n * Enables the Popper.js `flip` modifier, allowing the Overlay to\n * automatically adjust it's placement in case of overlap with the viewport or toggle.\n * Refer to the [flip docs](https://popper.js.org/popper-documentation.html#modifiers..flip.enabled) for more info\n */\n flip: PropTypes.bool,\n\n /**\n * A render prop that returns an element to overlay and position. See\n * the [react-popper documentation](https://github.com/FezVrasta/react-popper#children) for more info.\n *\n * @type {Function ({\n * show: boolean,\n * placement: Placement,\n * update: () => void,\n * forceUpdate: () => void,\n * props: {\n * ref: (?HTMLElement) => void,\n * style: { [string]: string | number },\n * aria-labelledby: ?string\n * [string]: string | number,\n * },\n * arrowProps: {\n * ref: (?HTMLElement) => void,\n * style: { [string]: string | number },\n * [string]: string | number,\n * },\n * }) => React.Element}\n */\n children: PropTypes.func.isRequired,\n\n /**\n * Control how much space there is between the edge of the boundary element and overlay.\n * A convenience shortcut to setting `popperConfig.modfiers.preventOverflow.padding`\n */\n containerPadding: PropTypes.number,\n\n /**\n * A set of popper options and props passed directly to react-popper's Popper component.\n */\n popperConfig: PropTypes.object,\n\n /**\n * Specify whether the overlay should trigger `onHide` when the user clicks outside the overlay\n */\n rootClose: PropTypes.bool,\n\n /**\n * Specify event for toggling overlay\n */\n rootCloseEvent: PropTypes.oneOf(['click', 'mousedown']),\n\n /**\n * Specify disabled for disable RootCloseWrapper\n */\n rootCloseDisabled: PropTypes.bool,\n\n /**\n * A Callback fired by the Overlay when it wishes to be hidden.\n *\n * __required__ when `rootClose` is `true`.\n *\n * @type func\n */\n onHide: function onHide(props) {\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\n if (props.rootClose) {\n var _PropTypes$func;\n\n return (_PropTypes$func = PropTypes.func).isRequired.apply(_PropTypes$func, [props].concat(args));\n }\n\n return PropTypes.func.apply(PropTypes, [props].concat(args));\n },\n\n /**\n * A `react-transition-group@2.0.0` `` component\n * used to animate the overlay as it changes visibility.\n */\n // @ts-ignore\n transition: PropTypes.elementType,\n\n /**\n * Callback fired before the Overlay transitions in\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired as the Overlay begins to transition in\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the Overlay finishes transitioning in\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired right before the Overlay transitions out\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired as the Overlay begins to transition out\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the Overlay finishes transitioning out\n */\n onExited: PropTypes.func\n};\nexport default Overlay;","export default function hasClass(element, className) {\n if (element.classList) return !!className && element.classList.contains(className);\n return (\" \" + (element.className.baseVal || element.className) + \" \").indexOf(\" \" + className + \" \") !== -1;\n}","import { useCallback, useMemo, useRef } from 'react';\nimport hasClass from 'dom-helpers/hasClass';\n\nfunction getMargins(element) {\n var styles = window.getComputedStyle(element);\n var top = parseFloat(styles.marginTop) || 0;\n var right = parseFloat(styles.marginRight) || 0;\n var bottom = parseFloat(styles.marginBottom) || 0;\n var left = parseFloat(styles.marginLeft) || 0;\n return {\n top: top,\n right: right,\n bottom: bottom,\n left: left\n };\n}\n\nexport default function usePopperMarginModifiers() {\n var overlayRef = useRef(null);\n var margins = useRef(null);\n var callback = useCallback(function (overlay) {\n if (!overlay || !(hasClass(overlay, 'popover') || hasClass(overlay, 'dropdown-menu'))) return;\n margins.current = getMargins(overlay);\n overlay.style.margin = '0';\n overlayRef.current = overlay;\n }, []);\n var offset = useMemo(function () {\n return {\n name: 'offset',\n options: {\n offset: function offset(_ref) {\n var placement = _ref.placement;\n if (!margins.current) return [0, 0];\n var _margins$current = margins.current,\n top = _margins$current.top,\n left = _margins$current.left,\n bottom = _margins$current.bottom,\n right = _margins$current.right;\n\n switch (placement.split('-')[0]) {\n case 'top':\n return [0, bottom];\n\n case 'left':\n return [0, right];\n\n case 'bottom':\n return [0, top];\n\n case 'right':\n return [0, left];\n\n default:\n return [0, 0];\n }\n }\n }\n };\n }, [margins]); // Converts popover arrow margin to arrow modifier padding\n\n var popoverArrowMargins = useMemo(function () {\n return {\n name: 'popoverArrowMargins',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['arrow'],\n effect: function effect(_ref2) {\n var state = _ref2.state;\n\n if (!overlayRef.current || !state.elements.arrow || !hasClass(overlayRef.current, 'popover') || !state.modifiersData['arrow#persistent']) {\n return undefined;\n }\n\n var _getMargins = getMargins(state.elements.arrow),\n top = _getMargins.top,\n right = _getMargins.right;\n\n var padding = top || right;\n state.modifiersData['arrow#persistent'].padding = {\n top: padding,\n left: padding,\n right: padding,\n bottom: padding\n };\n state.elements.arrow.style.margin = '0';\n return function () {\n if (state.elements.arrow) state.elements.arrow.style.margin = '';\n };\n }\n };\n }, []);\n return [callback, [offset, popoverArrowMargins]];\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport React, { useRef } from 'react';\nimport classNames from 'classnames';\nimport BaseOverlay from 'react-overlays/Overlay';\nimport safeFindDOMNode from 'react-overlays/safeFindDOMNode';\nimport usePopperMarginModifiers from './usePopperMarginModifiers';\nimport Fade from './Fade';\nvar defaultProps = {\n transition: Fade,\n rootClose: false,\n show: false,\n placement: 'top'\n};\n\nfunction wrapRefs(props, arrowProps) {\n var ref = props.ref;\n var aRef = arrowProps.ref;\n\n props.ref = ref.__wrapped || (ref.__wrapped = function (r) {\n return ref(safeFindDOMNode(r));\n });\n\n arrowProps.ref = aRef.__wrapped || (aRef.__wrapped = function (r) {\n return aRef(safeFindDOMNode(r));\n });\n}\n\nfunction Overlay(_ref) {\n var overlay = _ref.children,\n transition = _ref.transition,\n _ref$popperConfig = _ref.popperConfig,\n popperConfig = _ref$popperConfig === void 0 ? {} : _ref$popperConfig,\n outerProps = _objectWithoutPropertiesLoose(_ref, [\"children\", \"transition\", \"popperConfig\"]);\n\n var popperRef = useRef({});\n\n var _usePopperMarginModif = usePopperMarginModifiers(),\n ref = _usePopperMarginModif[0],\n marginModifiers = _usePopperMarginModif[1];\n\n var actualTransition = transition === true ? Fade : transition || null;\n return (\n /*#__PURE__*/\n React.createElement(BaseOverlay, _extends({}, outerProps, {\n ref: ref,\n popperConfig: _extends({}, popperConfig, {\n modifiers: marginModifiers.concat(popperConfig.modifiers || [])\n }),\n transition: actualTransition\n }), function (_ref2) {\n var _state$modifiersData$;\n\n var overlayProps = _ref2.props,\n arrowProps = _ref2.arrowProps,\n show = _ref2.show,\n update = _ref2.update,\n _ = _ref2.forceUpdate,\n placement = _ref2.placement,\n state = _ref2.state,\n props = _objectWithoutPropertiesLoose(_ref2, [\"props\", \"arrowProps\", \"show\", \"update\", \"forceUpdate\", \"placement\", \"state\"]);\n\n wrapRefs(overlayProps, arrowProps);\n var popper = Object.assign(popperRef.current, {\n state: state,\n scheduleUpdate: update,\n placement: placement,\n outOfBoundaries: (state == null ? void 0 : (_state$modifiersData$ = state.modifiersData.hide) == null ? void 0 : _state$modifiersData$.isReferenceHidden) || false\n });\n if (typeof overlay === 'function') return overlay(_extends({}, props, {}, overlayProps, {\n placement: placement,\n show: show,\n popper: popper,\n arrowProps: arrowProps\n }));\n return React.cloneElement(overlay, _extends({}, props, {}, overlayProps, {\n placement: placement,\n arrowProps: arrowProps,\n popper: popper,\n className: classNames(overlay.props.className, !transition && show && 'show'),\n style: _extends({}, overlay.props.style, {}, overlayProps.style)\n }));\n })\n );\n}\n\nOverlay.defaultProps = defaultProps;\nexport default Overlay;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport contains from 'dom-helpers/contains';\nimport React, { cloneElement, useCallback, useRef } from 'react';\nimport useTimeout from '@restart/hooks/useTimeout';\nimport safeFindDOMNode from 'react-overlays/safeFindDOMNode';\nimport warning from 'warning';\nimport { useUncontrolledProp } from 'uncontrollable';\nimport Overlay from './Overlay';\n\nvar RefHolder =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(RefHolder, _React$Component);\n\n function RefHolder() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = RefHolder.prototype;\n\n _proto.render = function render() {\n return this.props.children;\n };\n\n return RefHolder;\n}(React.Component);\n\nfunction normalizeDelay(delay) {\n return delay && typeof delay === 'object' ? delay : {\n show: delay,\n hide: delay\n };\n} // Simple implementation of mouseEnter and mouseLeave.\n// React's built version is broken: https://github.com/facebook/react/issues/4251\n// for cases when the trigger is disabled and mouseOut/Over can cause flicker\n// moving from one child element to another.\n\n\nfunction handleMouseOverOut(handler, args, relatedNative) {\n var e = args[0];\n var target = e.currentTarget;\n var related = e.relatedTarget || e.nativeEvent[relatedNative];\n\n if ((!related || related !== target) && !contains(target, related)) {\n handler.apply(void 0, args);\n }\n}\n\nvar defaultProps = {\n defaultShow: false,\n trigger: ['hover', 'focus']\n};\n\nfunction OverlayTrigger(_ref) {\n var trigger = _ref.trigger,\n overlay = _ref.overlay,\n children = _ref.children,\n _ref$popperConfig = _ref.popperConfig,\n popperConfig = _ref$popperConfig === void 0 ? {} : _ref$popperConfig,\n propsShow = _ref.show,\n _ref$defaultShow = _ref.defaultShow,\n defaultShow = _ref$defaultShow === void 0 ? false : _ref$defaultShow,\n onToggle = _ref.onToggle,\n propsDelay = _ref.delay,\n placement = _ref.placement,\n _ref$flip = _ref.flip,\n flip = _ref$flip === void 0 ? placement && placement.indexOf('auto') !== -1 : _ref$flip,\n props = _objectWithoutPropertiesLoose(_ref, [\"trigger\", \"overlay\", \"children\", \"popperConfig\", \"show\", \"defaultShow\", \"onToggle\", \"delay\", \"placement\", \"flip\"]);\n\n var triggerNodeRef = useRef(null);\n var timeout = useTimeout();\n var hoverStateRef = useRef('');\n\n var _useUncontrolledProp = useUncontrolledProp(propsShow, defaultShow, onToggle),\n show = _useUncontrolledProp[0],\n setShow = _useUncontrolledProp[1];\n\n var delay = normalizeDelay(propsDelay);\n\n var _ref2 = typeof children !== 'function' ? React.Children.only(children).props : {},\n onFocus = _ref2.onFocus,\n onBlur = _ref2.onBlur,\n onClick = _ref2.onClick;\n\n var getTarget = useCallback(function () {\n return safeFindDOMNode(triggerNodeRef.current);\n }, []);\n var handleShow = useCallback(function () {\n timeout.clear();\n hoverStateRef.current = 'show';\n\n if (!delay.show) {\n setShow(true);\n return;\n }\n\n timeout.set(function () {\n if (hoverStateRef.current === 'show') setShow(true);\n }, delay.show);\n }, [delay.show, setShow, timeout]);\n var handleHide = useCallback(function () {\n timeout.clear();\n hoverStateRef.current = 'hide';\n\n if (!delay.hide) {\n setShow(false);\n return;\n }\n\n timeout.set(function () {\n if (hoverStateRef.current === 'hide') setShow(false);\n }, delay.hide);\n }, [delay.hide, setShow, timeout]);\n var handleFocus = useCallback(function () {\n handleShow();\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n onFocus == null ? void 0 : onFocus.apply(void 0, args);\n }, [handleShow, onFocus]);\n var handleBlur = useCallback(function () {\n handleHide();\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n onBlur == null ? void 0 : onBlur.apply(void 0, args);\n }, [handleHide, onBlur]);\n var handleClick = useCallback(function () {\n setShow(!show);\n if (onClick) onClick.apply(void 0, arguments);\n }, [onClick, setShow, show]);\n var handleMouseOver = useCallback(function () {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n handleMouseOverOut(handleShow, args, 'fromElement');\n }, [handleShow]);\n var handleMouseOut = useCallback(function () {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n handleMouseOverOut(handleHide, args, 'toElement');\n }, [handleHide]);\n var triggers = trigger == null ? [] : [].concat(trigger);\n var triggerProps = {};\n\n if (triggers.indexOf('click') !== -1) {\n triggerProps.onClick = handleClick;\n }\n\n if (triggers.indexOf('focus') !== -1) {\n triggerProps.onFocus = handleFocus;\n triggerProps.onBlur = handleBlur;\n }\n\n if (triggers.indexOf('hover') !== -1) {\n process.env.NODE_ENV !== \"production\" ? warning(triggers.length > 1, '[react-bootstrap] Specifying only the `\"hover\"` trigger limits the visibility of the overlay to just mouse users. Consider also including the `\"focus\"` trigger so that touch and keyboard only users can see the overlay as well.') : void 0;\n triggerProps.onMouseOver = handleMouseOver;\n triggerProps.onMouseOut = handleMouseOut;\n }\n\n return (\n /*#__PURE__*/\n React.createElement(React.Fragment, null, typeof children === 'function' ? children(_extends({}, triggerProps, {\n ref: triggerNodeRef\n })) :\n /*#__PURE__*/\n React.createElement(RefHolder, {\n ref: triggerNodeRef\n }, cloneElement(children, triggerProps)),\n /*#__PURE__*/\n React.createElement(Overlay, _extends({}, props, {\n show: show,\n onHide: handleHide,\n flip: flip,\n placement: placement,\n popperConfig: popperConfig,\n target: getTarget\n }), overlay))\n );\n}\n\nOverlayTrigger.defaultProps = defaultProps;\nexport default OverlayTrigger;","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","/* eslint-disable no-bitwise, no-cond-assign */\n// HTML DOM and SVG DOM may have different support levels,\n// so we need to check on context instead of a document root element.\nexport default function contains(context, node) {\n if (context.contains) return context.contains(node);\n if (context.compareDocumentPosition) return context === node || !!(context.compareDocumentPosition(node) & 16);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\n\nfunction _toPropertyKey(arg) {\n var key = _toPrimitive(arg, \"string\");\n\n return typeof key === \"symbol\" ? key : String(key);\n}\n\nfunction _toPrimitive(input, hint) {\n if (typeof input !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (typeof res !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n\n return (hint === \"string\" ? String : Number)(input);\n}\n\nimport { useCallback, useRef, useState } from 'react';\nimport * as Utils from './utils';\n\nfunction useUncontrolledProp(propValue, defaultValue, handler) {\n var wasPropRef = useRef(propValue !== undefined);\n\n var _useState = useState(defaultValue),\n stateValue = _useState[0],\n setState = _useState[1];\n\n var isProp = propValue !== undefined;\n var wasProp = wasPropRef.current;\n wasPropRef.current = isProp;\n /**\n * If a prop switches from controlled to Uncontrolled\n * reset its value to the defaultValue\n */\n\n if (!isProp && wasProp && stateValue !== defaultValue) {\n setState(defaultValue);\n }\n\n return [isProp ? propValue : stateValue, useCallback(function (value) {\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\n if (handler) handler.apply(void 0, [value].concat(args));\n setState(value);\n }, [handler])];\n}\n\nexport { useUncontrolledProp };\nexport default function useUncontrolled(props, config) {\n return Object.keys(config).reduce(function (result, fieldName) {\n var _extends2;\n\n var _ref = result,\n defaultValue = _ref[Utils.defaultKey(fieldName)],\n propsValue = _ref[fieldName],\n rest = _objectWithoutPropertiesLoose(_ref, [Utils.defaultKey(fieldName), fieldName].map(_toPropertyKey));\n\n var handlerName = config[fieldName];\n\n var _useUncontrolledProp = useUncontrolledProp(propsValue, defaultValue, props[handlerName]),\n value = _useUncontrolledProp[0],\n handler = _useUncontrolledProp[1];\n\n return _extends({}, rest, (_extends2 = {}, _extends2[fieldName] = value, _extends2[handlerName] = handler, _extends2));\n }, props);\n}","/**\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 */\nfunction componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\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 } // Binding \"this\" is important for shallow renderer support.\n\n\n this.setState(updater.bind(this));\n}\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} // React may warn about cWM/cWRP/cWU methods being deprecated.\n// Add a flag to suppress these warnings for this special case.\n\n\ncomponentWillMount.__suppressDeprecationWarning = true;\ncomponentWillReceiveProps.__suppressDeprecationWarning = true;\ncomponentWillUpdate.__suppressDeprecationWarning = true;\n\nfunction polyfill(Component) {\n var prototype = Component.prototype;\n\n if (!prototype || !prototype.isReactComponent) {\n throw new Error('Can only polyfill class components');\n }\n\n if (typeof Component.getDerivedStateFromProps !== 'function' && typeof prototype.getSnapshotBeforeUpdate !== 'function') {\n return Component;\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\n\n var foundWillMountName = null;\n var foundWillReceivePropsName = null;\n var foundWillUpdateName = null;\n\n if (typeof prototype.componentWillMount === 'function') {\n foundWillMountName = 'componentWillMount';\n } else if (typeof prototype.UNSAFE_componentWillMount === 'function') {\n foundWillMountName = 'UNSAFE_componentWillMount';\n }\n\n if (typeof prototype.componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'componentWillReceiveProps';\n } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n }\n\n if (typeof prototype.componentWillUpdate === 'function') {\n foundWillUpdateName = 'componentWillUpdate';\n } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') {\n foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n }\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 } // 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\n\n if (typeof Component.getDerivedStateFromProps === 'function') {\n prototype.componentWillMount = componentWillMount;\n prototype.componentWillReceiveProps = componentWillReceiveProps;\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\n\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\n prototype.componentWillUpdate = componentWillUpdate;\n var componentDidUpdate = prototype.componentDidUpdate;\n\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\n return Component;\n}\n\nexport { polyfill };","export { default as useUncontrolled, useUncontrolledProp } from './hook';\nexport { default as uncontrollable } from './uncontrollable';","function areInputsEqual(newInputs, lastInputs) {\n if (newInputs.length !== lastInputs.length) {\n return false;\n }\n\n for (var i = 0; i < newInputs.length; i++) {\n if (newInputs[i] !== lastInputs[i]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction memoizeOne(resultFn, isEqual) {\n if (isEqual === void 0) {\n isEqual = areInputsEqual;\n }\n\n var lastThis;\n var lastArgs = [];\n var lastResult;\n var calledOnce = false;\n\n function memoized() {\n var newArgs = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n newArgs[_i] = arguments[_i];\n }\n\n if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {\n return lastResult;\n }\n\n lastResult = resultFn.apply(this, newArgs);\n calledOnce = true;\n lastThis = this;\n lastArgs = newArgs;\n return lastResult;\n }\n\n return memoized;\n}\n\nexport default memoizeOne;","import React, { Component, PureComponent } from 'react';\nimport memoizeOne from 'memoize-one';\nimport { jsx } from '@emotion/core';\nimport { findDOMNode } from 'react-dom';\nimport { i as isTouchCapable, d as isMobileDevice, e as cleanValue, f as scrollIntoView, h as classNames, n as noop, j as isDocumentElement } from './utils-06b0d5a4.browser.esm.js';\nimport { c as clearIndicatorCSS, a as containerCSS, b as css, d as dropdownIndicatorCSS, g as groupCSS, e as groupHeadingCSS, i as indicatorsContainerCSS, f as indicatorSeparatorCSS, h as inputCSS, l as loadingIndicatorCSS, j as loadingMessageCSS, m as menuCSS, k as menuListCSS, n as menuPortalCSS, o as multiValueCSS, p as multiValueLabelCSS, q as multiValueRemoveCSS, r as noOptionsMessageCSS, s as optionCSS, t as placeholderCSS, u as css$1, v as valueContainerCSS, M as MenuPlacer, w as defaultComponents, x as exportedEqual } from './index-4322c0ed.browser.esm.js';\nimport _css from '@emotion/css';\nvar diacritics = [{\n base: 'A',\n letters: /[\\u0041\\u24B6\\uFF21\\u00C0\\u00C1\\u00C2\\u1EA6\\u1EA4\\u1EAA\\u1EA8\\u00C3\\u0100\\u0102\\u1EB0\\u1EAE\\u1EB4\\u1EB2\\u0226\\u01E0\\u00C4\\u01DE\\u1EA2\\u00C5\\u01FA\\u01CD\\u0200\\u0202\\u1EA0\\u1EAC\\u1EB6\\u1E00\\u0104\\u023A\\u2C6F]/g\n}, {\n base: 'AA',\n letters: /[\\uA732]/g\n}, {\n base: 'AE',\n letters: /[\\u00C6\\u01FC\\u01E2]/g\n}, {\n base: 'AO',\n letters: /[\\uA734]/g\n}, {\n base: 'AU',\n letters: /[\\uA736]/g\n}, {\n base: 'AV',\n letters: /[\\uA738\\uA73A]/g\n}, {\n base: 'AY',\n letters: /[\\uA73C]/g\n}, {\n base: 'B',\n letters: /[\\u0042\\u24B7\\uFF22\\u1E02\\u1E04\\u1E06\\u0243\\u0182\\u0181]/g\n}, {\n base: 'C',\n letters: /[\\u0043\\u24B8\\uFF23\\u0106\\u0108\\u010A\\u010C\\u00C7\\u1E08\\u0187\\u023B\\uA73E]/g\n}, {\n base: 'D',\n letters: /[\\u0044\\u24B9\\uFF24\\u1E0A\\u010E\\u1E0C\\u1E10\\u1E12\\u1E0E\\u0110\\u018B\\u018A\\u0189\\uA779]/g\n}, {\n base: 'DZ',\n letters: /[\\u01F1\\u01C4]/g\n}, {\n base: 'Dz',\n letters: /[\\u01F2\\u01C5]/g\n}, {\n base: 'E',\n letters: /[\\u0045\\u24BA\\uFF25\\u00C8\\u00C9\\u00CA\\u1EC0\\u1EBE\\u1EC4\\u1EC2\\u1EBC\\u0112\\u1E14\\u1E16\\u0114\\u0116\\u00CB\\u1EBA\\u011A\\u0204\\u0206\\u1EB8\\u1EC6\\u0228\\u1E1C\\u0118\\u1E18\\u1E1A\\u0190\\u018E]/g\n}, {\n base: 'F',\n letters: /[\\u0046\\u24BB\\uFF26\\u1E1E\\u0191\\uA77B]/g\n}, {\n base: 'G',\n letters: /[\\u0047\\u24BC\\uFF27\\u01F4\\u011C\\u1E20\\u011E\\u0120\\u01E6\\u0122\\u01E4\\u0193\\uA7A0\\uA77D\\uA77E]/g\n}, {\n base: 'H',\n letters: /[\\u0048\\u24BD\\uFF28\\u0124\\u1E22\\u1E26\\u021E\\u1E24\\u1E28\\u1E2A\\u0126\\u2C67\\u2C75\\uA78D]/g\n}, {\n base: 'I',\n letters: /[\\u0049\\u24BE\\uFF29\\u00CC\\u00CD\\u00CE\\u0128\\u012A\\u012C\\u0130\\u00CF\\u1E2E\\u1EC8\\u01CF\\u0208\\u020A\\u1ECA\\u012E\\u1E2C\\u0197]/g\n}, {\n base: 'J',\n letters: /[\\u004A\\u24BF\\uFF2A\\u0134\\u0248]/g\n}, {\n base: 'K',\n letters: /[\\u004B\\u24C0\\uFF2B\\u1E30\\u01E8\\u1E32\\u0136\\u1E34\\u0198\\u2C69\\uA740\\uA742\\uA744\\uA7A2]/g\n}, {\n base: 'L',\n letters: /[\\u004C\\u24C1\\uFF2C\\u013F\\u0139\\u013D\\u1E36\\u1E38\\u013B\\u1E3C\\u1E3A\\u0141\\u023D\\u2C62\\u2C60\\uA748\\uA746\\uA780]/g\n}, {\n base: 'LJ',\n letters: /[\\u01C7]/g\n}, {\n base: 'Lj',\n letters: /[\\u01C8]/g\n}, {\n base: 'M',\n letters: /[\\u004D\\u24C2\\uFF2D\\u1E3E\\u1E40\\u1E42\\u2C6E\\u019C]/g\n}, {\n base: 'N',\n letters: /[\\u004E\\u24C3\\uFF2E\\u01F8\\u0143\\u00D1\\u1E44\\u0147\\u1E46\\u0145\\u1E4A\\u1E48\\u0220\\u019D\\uA790\\uA7A4]/g\n}, {\n base: 'NJ',\n letters: /[\\u01CA]/g\n}, {\n base: 'Nj',\n letters: /[\\u01CB]/g\n}, {\n base: 'O',\n letters: /[\\u004F\\u24C4\\uFF2F\\u00D2\\u00D3\\u00D4\\u1ED2\\u1ED0\\u1ED6\\u1ED4\\u00D5\\u1E4C\\u022C\\u1E4E\\u014C\\u1E50\\u1E52\\u014E\\u022E\\u0230\\u00D6\\u022A\\u1ECE\\u0150\\u01D1\\u020C\\u020E\\u01A0\\u1EDC\\u1EDA\\u1EE0\\u1EDE\\u1EE2\\u1ECC\\u1ED8\\u01EA\\u01EC\\u00D8\\u01FE\\u0186\\u019F\\uA74A\\uA74C]/g\n}, {\n base: 'OI',\n letters: /[\\u01A2]/g\n}, {\n base: 'OO',\n letters: /[\\uA74E]/g\n}, {\n base: 'OU',\n letters: /[\\u0222]/g\n}, {\n base: 'P',\n letters: /[\\u0050\\u24C5\\uFF30\\u1E54\\u1E56\\u01A4\\u2C63\\uA750\\uA752\\uA754]/g\n}, {\n base: 'Q',\n letters: /[\\u0051\\u24C6\\uFF31\\uA756\\uA758\\u024A]/g\n}, {\n base: 'R',\n letters: /[\\u0052\\u24C7\\uFF32\\u0154\\u1E58\\u0158\\u0210\\u0212\\u1E5A\\u1E5C\\u0156\\u1E5E\\u024C\\u2C64\\uA75A\\uA7A6\\uA782]/g\n}, {\n base: 'S',\n letters: /[\\u0053\\u24C8\\uFF33\\u1E9E\\u015A\\u1E64\\u015C\\u1E60\\u0160\\u1E66\\u1E62\\u1E68\\u0218\\u015E\\u2C7E\\uA7A8\\uA784]/g\n}, {\n base: 'T',\n letters: /[\\u0054\\u24C9\\uFF34\\u1E6A\\u0164\\u1E6C\\u021A\\u0162\\u1E70\\u1E6E\\u0166\\u01AC\\u01AE\\u023E\\uA786]/g\n}, {\n base: 'TZ',\n letters: /[\\uA728]/g\n}, {\n base: 'U',\n letters: /[\\u0055\\u24CA\\uFF35\\u00D9\\u00DA\\u00DB\\u0168\\u1E78\\u016A\\u1E7A\\u016C\\u00DC\\u01DB\\u01D7\\u01D5\\u01D9\\u1EE6\\u016E\\u0170\\u01D3\\u0214\\u0216\\u01AF\\u1EEA\\u1EE8\\u1EEE\\u1EEC\\u1EF0\\u1EE4\\u1E72\\u0172\\u1E76\\u1E74\\u0244]/g\n}, {\n base: 'V',\n letters: /[\\u0056\\u24CB\\uFF36\\u1E7C\\u1E7E\\u01B2\\uA75E\\u0245]/g\n}, {\n base: 'VY',\n letters: /[\\uA760]/g\n}, {\n base: 'W',\n letters: /[\\u0057\\u24CC\\uFF37\\u1E80\\u1E82\\u0174\\u1E86\\u1E84\\u1E88\\u2C72]/g\n}, {\n base: 'X',\n letters: /[\\u0058\\u24CD\\uFF38\\u1E8A\\u1E8C]/g\n}, {\n base: 'Y',\n letters: /[\\u0059\\u24CE\\uFF39\\u1EF2\\u00DD\\u0176\\u1EF8\\u0232\\u1E8E\\u0178\\u1EF6\\u1EF4\\u01B3\\u024E\\u1EFE]/g\n}, {\n base: 'Z',\n letters: /[\\u005A\\u24CF\\uFF3A\\u0179\\u1E90\\u017B\\u017D\\u1E92\\u1E94\\u01B5\\u0224\\u2C7F\\u2C6B\\uA762]/g\n}, {\n base: 'a',\n letters: /[\\u0061\\u24D0\\uFF41\\u1E9A\\u00E0\\u00E1\\u00E2\\u1EA7\\u1EA5\\u1EAB\\u1EA9\\u00E3\\u0101\\u0103\\u1EB1\\u1EAF\\u1EB5\\u1EB3\\u0227\\u01E1\\u00E4\\u01DF\\u1EA3\\u00E5\\u01FB\\u01CE\\u0201\\u0203\\u1EA1\\u1EAD\\u1EB7\\u1E01\\u0105\\u2C65\\u0250]/g\n}, {\n base: 'aa',\n letters: /[\\uA733]/g\n}, {\n base: 'ae',\n letters: /[\\u00E6\\u01FD\\u01E3]/g\n}, {\n base: 'ao',\n letters: /[\\uA735]/g\n}, {\n base: 'au',\n letters: /[\\uA737]/g\n}, {\n base: 'av',\n letters: /[\\uA739\\uA73B]/g\n}, {\n base: 'ay',\n letters: /[\\uA73D]/g\n}, {\n base: 'b',\n letters: /[\\u0062\\u24D1\\uFF42\\u1E03\\u1E05\\u1E07\\u0180\\u0183\\u0253]/g\n}, {\n base: 'c',\n letters: /[\\u0063\\u24D2\\uFF43\\u0107\\u0109\\u010B\\u010D\\u00E7\\u1E09\\u0188\\u023C\\uA73F\\u2184]/g\n}, {\n base: 'd',\n letters: /[\\u0064\\u24D3\\uFF44\\u1E0B\\u010F\\u1E0D\\u1E11\\u1E13\\u1E0F\\u0111\\u018C\\u0256\\u0257\\uA77A]/g\n}, {\n base: 'dz',\n letters: /[\\u01F3\\u01C6]/g\n}, {\n base: 'e',\n letters: /[\\u0065\\u24D4\\uFF45\\u00E8\\u00E9\\u00EA\\u1EC1\\u1EBF\\u1EC5\\u1EC3\\u1EBD\\u0113\\u1E15\\u1E17\\u0115\\u0117\\u00EB\\u1EBB\\u011B\\u0205\\u0207\\u1EB9\\u1EC7\\u0229\\u1E1D\\u0119\\u1E19\\u1E1B\\u0247\\u025B\\u01DD]/g\n}, {\n base: 'f',\n letters: /[\\u0066\\u24D5\\uFF46\\u1E1F\\u0192\\uA77C]/g\n}, {\n base: 'g',\n letters: /[\\u0067\\u24D6\\uFF47\\u01F5\\u011D\\u1E21\\u011F\\u0121\\u01E7\\u0123\\u01E5\\u0260\\uA7A1\\u1D79\\uA77F]/g\n}, {\n base: 'h',\n letters: /[\\u0068\\u24D7\\uFF48\\u0125\\u1E23\\u1E27\\u021F\\u1E25\\u1E29\\u1E2B\\u1E96\\u0127\\u2C68\\u2C76\\u0265]/g\n}, {\n base: 'hv',\n letters: /[\\u0195]/g\n}, {\n base: 'i',\n letters: /[\\u0069\\u24D8\\uFF49\\u00EC\\u00ED\\u00EE\\u0129\\u012B\\u012D\\u00EF\\u1E2F\\u1EC9\\u01D0\\u0209\\u020B\\u1ECB\\u012F\\u1E2D\\u0268\\u0131]/g\n}, {\n base: 'j',\n letters: /[\\u006A\\u24D9\\uFF4A\\u0135\\u01F0\\u0249]/g\n}, {\n base: 'k',\n letters: /[\\u006B\\u24DA\\uFF4B\\u1E31\\u01E9\\u1E33\\u0137\\u1E35\\u0199\\u2C6A\\uA741\\uA743\\uA745\\uA7A3]/g\n}, {\n base: 'l',\n letters: /[\\u006C\\u24DB\\uFF4C\\u0140\\u013A\\u013E\\u1E37\\u1E39\\u013C\\u1E3D\\u1E3B\\u017F\\u0142\\u019A\\u026B\\u2C61\\uA749\\uA781\\uA747]/g\n}, {\n base: 'lj',\n letters: /[\\u01C9]/g\n}, {\n base: 'm',\n letters: /[\\u006D\\u24DC\\uFF4D\\u1E3F\\u1E41\\u1E43\\u0271\\u026F]/g\n}, {\n base: 'n',\n letters: /[\\u006E\\u24DD\\uFF4E\\u01F9\\u0144\\u00F1\\u1E45\\u0148\\u1E47\\u0146\\u1E4B\\u1E49\\u019E\\u0272\\u0149\\uA791\\uA7A5]/g\n}, {\n base: 'nj',\n letters: /[\\u01CC]/g\n}, {\n base: 'o',\n letters: /[\\u006F\\u24DE\\uFF4F\\u00F2\\u00F3\\u00F4\\u1ED3\\u1ED1\\u1ED7\\u1ED5\\u00F5\\u1E4D\\u022D\\u1E4F\\u014D\\u1E51\\u1E53\\u014F\\u022F\\u0231\\u00F6\\u022B\\u1ECF\\u0151\\u01D2\\u020D\\u020F\\u01A1\\u1EDD\\u1EDB\\u1EE1\\u1EDF\\u1EE3\\u1ECD\\u1ED9\\u01EB\\u01ED\\u00F8\\u01FF\\u0254\\uA74B\\uA74D\\u0275]/g\n}, {\n base: 'oi',\n letters: /[\\u01A3]/g\n}, {\n base: 'ou',\n letters: /[\\u0223]/g\n}, {\n base: 'oo',\n letters: /[\\uA74F]/g\n}, {\n base: 'p',\n letters: /[\\u0070\\u24DF\\uFF50\\u1E55\\u1E57\\u01A5\\u1D7D\\uA751\\uA753\\uA755]/g\n}, {\n base: 'q',\n letters: /[\\u0071\\u24E0\\uFF51\\u024B\\uA757\\uA759]/g\n}, {\n base: 'r',\n letters: /[\\u0072\\u24E1\\uFF52\\u0155\\u1E59\\u0159\\u0211\\u0213\\u1E5B\\u1E5D\\u0157\\u1E5F\\u024D\\u027D\\uA75B\\uA7A7\\uA783]/g\n}, {\n base: 's',\n letters: /[\\u0073\\u24E2\\uFF53\\u00DF\\u015B\\u1E65\\u015D\\u1E61\\u0161\\u1E67\\u1E63\\u1E69\\u0219\\u015F\\u023F\\uA7A9\\uA785\\u1E9B]/g\n}, {\n base: 't',\n letters: /[\\u0074\\u24E3\\uFF54\\u1E6B\\u1E97\\u0165\\u1E6D\\u021B\\u0163\\u1E71\\u1E6F\\u0167\\u01AD\\u0288\\u2C66\\uA787]/g\n}, {\n base: 'tz',\n letters: /[\\uA729]/g\n}, {\n base: 'u',\n letters: /[\\u0075\\u24E4\\uFF55\\u00F9\\u00FA\\u00FB\\u0169\\u1E79\\u016B\\u1E7B\\u016D\\u00FC\\u01DC\\u01D8\\u01D6\\u01DA\\u1EE7\\u016F\\u0171\\u01D4\\u0215\\u0217\\u01B0\\u1EEB\\u1EE9\\u1EEF\\u1EED\\u1EF1\\u1EE5\\u1E73\\u0173\\u1E77\\u1E75\\u0289]/g\n}, {\n base: 'v',\n letters: /[\\u0076\\u24E5\\uFF56\\u1E7D\\u1E7F\\u028B\\uA75F\\u028C]/g\n}, {\n base: 'vy',\n letters: /[\\uA761]/g\n}, {\n base: 'w',\n letters: /[\\u0077\\u24E6\\uFF57\\u1E81\\u1E83\\u0175\\u1E87\\u1E85\\u1E98\\u1E89\\u2C73]/g\n}, {\n base: 'x',\n letters: /[\\u0078\\u24E7\\uFF58\\u1E8B\\u1E8D]/g\n}, {\n base: 'y',\n letters: /[\\u0079\\u24E8\\uFF59\\u1EF3\\u00FD\\u0177\\u1EF9\\u0233\\u1E8F\\u00FF\\u1EF7\\u1E99\\u1EF5\\u01B4\\u024F\\u1EFF]/g\n}, {\n base: 'z',\n letters: /[\\u007A\\u24E9\\uFF5A\\u017A\\u1E91\\u017C\\u017E\\u1E93\\u1E95\\u01B6\\u0225\\u0240\\u2C6C\\uA763]/g\n}];\n\nvar stripDiacritics = function stripDiacritics(str) {\n for (var i = 0; i < diacritics.length; i++) {\n str = str.replace(diacritics[i].letters, diacritics[i].base);\n }\n\n return str;\n};\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nvar trimString = function trimString(str) {\n return str.replace(/^\\s+|\\s+$/g, '');\n};\n\nvar defaultStringify = function defaultStringify(option) {\n return option.label + \" \" + option.value;\n};\n\nvar createFilter = function createFilter(config) {\n return function (option, rawInput) {\n var _ignoreCase$ignoreAcc = _extends({\n ignoreCase: true,\n ignoreAccents: true,\n stringify: defaultStringify,\n trim: true,\n matchFrom: 'any'\n }, config),\n ignoreCase = _ignoreCase$ignoreAcc.ignoreCase,\n ignoreAccents = _ignoreCase$ignoreAcc.ignoreAccents,\n stringify = _ignoreCase$ignoreAcc.stringify,\n trim = _ignoreCase$ignoreAcc.trim,\n matchFrom = _ignoreCase$ignoreAcc.matchFrom;\n\n var input = trim ? trimString(rawInput) : rawInput;\n var candidate = trim ? trimString(stringify(option)) : stringify(option);\n\n if (ignoreCase) {\n input = input.toLowerCase();\n candidate = candidate.toLowerCase();\n }\n\n if (ignoreAccents) {\n input = stripDiacritics(input);\n candidate = stripDiacritics(candidate);\n }\n\n return matchFrom === 'start' ? candidate.substr(0, input.length) === input : candidate.indexOf(input) > -1;\n };\n};\n\nfunction _extends$1() {\n _extends$1 = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends$1.apply(this, arguments);\n}\n\nvar _ref = process.env.NODE_ENV === \"production\" ? {\n name: \"1laao21-a11yText\",\n styles: \"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;\"\n} : {\n name: \"1laao21-a11yText\",\n styles: \"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;\",\n map: \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVFNIiwiZmlsZSI6IkExMXlUZXh0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gQGZsb3dcbi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgdHlwZSBFbGVtZW50Q29uZmlnIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vY29yZSc7XG5cbi8vIEFzc2lzdGl2ZSB0ZXh0IHRvIGRlc2NyaWJlIHZpc3VhbCBlbGVtZW50cy4gSGlkZGVuIGZvciBzaWdodGVkIHVzZXJzLlxuY29uc3QgQTExeVRleHQgPSAocHJvcHM6IEVsZW1lbnRDb25maWc8J3NwYW4nPikgPT4gKFxuICAgIDxzcGFuXG4gICAgICBjc3M9e3tcbiAgICAgICAgbGFiZWw6ICdhMTF5VGV4dCcsXG4gICAgICAgIHpJbmRleDogOTk5OSxcbiAgICAgICAgYm9yZGVyOiAwLFxuICAgICAgICBjbGlwOiAncmVjdCgxcHgsIDFweCwgMXB4LCAxcHgpJyxcbiAgICAgICAgaGVpZ2h0OiAxLFxuICAgICAgICB3aWR0aDogMSxcbiAgICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICAgIG92ZXJmbG93OiAnaGlkZGVuJyxcbiAgICAgICAgcGFkZGluZzogMCxcbiAgICAgICAgd2hpdGVTcGFjZTogJ25vd3JhcCcsXG4gICAgICB9fVxuICAgICAgey4uLnByb3BzfVxuICAgIC8+XG4pO1xuXG5leHBvcnQgZGVmYXVsdCBBMTF5VGV4dDtcbiJdfQ== */\"\n};\n\nvar A11yText = function A11yText(props) {\n return jsx(\"span\", _extends$1({\n css: _ref\n }, props));\n};\n\nfunction _extends$2() {\n _extends$2 = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends$2.apply(this, arguments);\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\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\n return target;\n}\n\nfunction DummyInput(_ref) {\n var inProp = _ref.in,\n out = _ref.out,\n onExited = _ref.onExited,\n appear = _ref.appear,\n enter = _ref.enter,\n exit = _ref.exit,\n innerRef = _ref.innerRef,\n emotion = _ref.emotion,\n props = _objectWithoutPropertiesLoose(_ref, [\"in\", \"out\", \"onExited\", \"appear\", \"enter\", \"exit\", \"innerRef\", \"emotion\"]);\n\n return jsx(\"input\", _extends$2({\n ref: innerRef\n }, props, {\n css:\n /*#__PURE__*/\n _css({\n label: 'dummyInput',\n // get rid of any default styles\n background: 0,\n border: 0,\n fontSize: 'inherit',\n outline: 0,\n padding: 0,\n // important! without `width` browsers won't allow focus\n width: 1,\n // remove cursor on desktop\n color: 'transparent',\n // remove cursor on mobile whilst maintaining \"scroll into view\" behaviour\n left: -100,\n opacity: 0,\n position: 'relative',\n transform: 'scale(0)'\n }, process.env.NODE_ENV === \"production\" ? \"\" : \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBbUJNIiwiZmlsZSI6IkR1bW15SW5wdXQuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBAZmxvd1xuLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9jb3JlJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gRHVtbXlJbnB1dCh7XG4gIGluOiBpblByb3AsXG4gIG91dCxcbiAgb25FeGl0ZWQsXG4gIGFwcGVhcixcbiAgZW50ZXIsXG4gIGV4aXQsXG4gIGlubmVyUmVmLFxuICBlbW90aW9uLFxuICAuLi5wcm9wc1xufTogYW55KSB7XG4gIHJldHVybiAoXG4gICAgPGlucHV0XG4gICAgICByZWY9e2lubmVyUmVmfVxuICAgICAgey4uLnByb3BzfVxuICAgICAgY3NzPXt7XG4gICAgICAgIGxhYmVsOiAnZHVtbXlJbnB1dCcsXG4gICAgICAgIC8vIGdldCByaWQgb2YgYW55IGRlZmF1bHQgc3R5bGVzXG4gICAgICAgIGJhY2tncm91bmQ6IDAsXG4gICAgICAgIGJvcmRlcjogMCxcbiAgICAgICAgZm9udFNpemU6ICdpbmhlcml0JyxcbiAgICAgICAgb3V0bGluZTogMCxcbiAgICAgICAgcGFkZGluZzogMCxcbiAgICAgICAgLy8gaW1wb3J0YW50ISB3aXRob3V0IGB3aWR0aGAgYnJvd3NlcnMgd29uJ3QgYWxsb3cgZm9jdXNcbiAgICAgICAgd2lkdGg6IDEsXG5cbiAgICAgICAgLy8gcmVtb3ZlIGN1cnNvciBvbiBkZXNrdG9wXG4gICAgICAgIGNvbG9yOiAndHJhbnNwYXJlbnQnLFxuXG4gICAgICAgIC8vIHJlbW92ZSBjdXJzb3Igb24gbW9iaWxlIHdoaWxzdCBtYWludGFpbmluZyBcInNjcm9sbCBpbnRvIHZpZXdcIiBiZWhhdmlvdXJcbiAgICAgICAgbGVmdDogLTEwMCxcbiAgICAgICAgb3BhY2l0eTogMCxcbiAgICAgICAgcG9zaXRpb246ICdyZWxhdGl2ZScsXG4gICAgICAgIHRyYW5zZm9ybTogJ3NjYWxlKDApJyxcbiAgICAgIH19XG4gICAgLz5cbiAgKTtcbn1cbiJdfQ== */\")\n }));\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nvar NodeResolver =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(NodeResolver, _Component);\n\n function NodeResolver() {\n return _Component.apply(this, arguments) || this;\n }\n\n var _proto = NodeResolver.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.props.innerRef(findDOMNode(this));\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.props.innerRef(null);\n };\n\n _proto.render = function render() {\n return this.props.children;\n };\n\n return NodeResolver;\n}(Component);\n\nvar STYLE_KEYS = ['boxSizing', 'height', 'overflow', 'paddingRight', 'position'];\nvar LOCK_STYLES = {\n boxSizing: 'border-box',\n // account for possible declaration `width: 100%;` on body\n overflow: 'hidden',\n position: 'relative',\n height: '100%'\n};\n\nfunction preventTouchMove(e) {\n e.preventDefault();\n}\n\nfunction allowTouchMove(e) {\n e.stopPropagation();\n}\n\nfunction preventInertiaScroll() {\n var top = this.scrollTop;\n var totalScroll = this.scrollHeight;\n var currentScroll = top + this.offsetHeight;\n\n if (top === 0) {\n this.scrollTop = 1;\n } else if (currentScroll === totalScroll) {\n this.scrollTop = top - 1;\n }\n} // `ontouchstart` check works on most browsers\n// `maxTouchPoints` works on IE10/11 and Surface\n\n\nfunction isTouchDevice() {\n return 'ontouchstart' in window || navigator.maxTouchPoints;\n}\n\nfunction _inheritsLoose$1(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nvar canUseDOM = !!(window.document && window.document.createElement);\nvar activeScrollLocks = 0;\n\nvar ScrollLock =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose$1(ScrollLock, _Component);\n\n function ScrollLock() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _Component.call.apply(_Component, [this].concat(args)) || this;\n _this.originalStyles = {};\n _this.listenerOptions = {\n capture: false,\n passive: false\n };\n return _this;\n }\n\n var _proto = ScrollLock.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n var _this2 = this;\n\n if (!canUseDOM) return;\n var _this$props = this.props,\n accountForScrollbars = _this$props.accountForScrollbars,\n touchScrollTarget = _this$props.touchScrollTarget;\n var target = document.body;\n var targetStyle = target && target.style;\n\n if (accountForScrollbars) {\n // store any styles already applied to the body\n STYLE_KEYS.forEach(function (key) {\n var val = targetStyle && targetStyle[key];\n _this2.originalStyles[key] = val;\n });\n } // apply the lock styles and padding if this is the first scroll lock\n\n\n if (accountForScrollbars && activeScrollLocks < 1) {\n var currentPadding = parseInt(this.originalStyles.paddingRight, 10) || 0;\n var clientWidth = document.body ? document.body.clientWidth : 0;\n var adjustedPadding = window.innerWidth - clientWidth + currentPadding || 0;\n Object.keys(LOCK_STYLES).forEach(function (key) {\n var val = LOCK_STYLES[key];\n\n if (targetStyle) {\n targetStyle[key] = val;\n }\n });\n\n if (targetStyle) {\n targetStyle.paddingRight = adjustedPadding + \"px\";\n }\n } // account for touch devices\n\n\n if (target && isTouchDevice()) {\n // Mobile Safari ignores { overflow: hidden } declaration on the body.\n target.addEventListener('touchmove', preventTouchMove, this.listenerOptions); // Allow scroll on provided target\n\n if (touchScrollTarget) {\n touchScrollTarget.addEventListener('touchstart', preventInertiaScroll, this.listenerOptions);\n touchScrollTarget.addEventListener('touchmove', allowTouchMove, this.listenerOptions);\n }\n } // increment active scroll locks\n\n\n activeScrollLocks += 1;\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n var _this3 = this;\n\n if (!canUseDOM) return;\n var _this$props2 = this.props,\n accountForScrollbars = _this$props2.accountForScrollbars,\n touchScrollTarget = _this$props2.touchScrollTarget;\n var target = document.body;\n var targetStyle = target && target.style; // safely decrement active scroll locks\n\n activeScrollLocks = Math.max(activeScrollLocks - 1, 0); // reapply original body styles, if any\n\n if (accountForScrollbars && activeScrollLocks < 1) {\n STYLE_KEYS.forEach(function (key) {\n var val = _this3.originalStyles[key];\n\n if (targetStyle) {\n targetStyle[key] = val;\n }\n });\n } // remove touch listeners\n\n\n if (target && isTouchDevice()) {\n target.removeEventListener('touchmove', preventTouchMove, this.listenerOptions);\n\n if (touchScrollTarget) {\n touchScrollTarget.removeEventListener('touchstart', preventInertiaScroll, this.listenerOptions);\n touchScrollTarget.removeEventListener('touchmove', allowTouchMove, this.listenerOptions);\n }\n }\n };\n\n _proto.render = function render() {\n return null;\n };\n\n return ScrollLock;\n}(Component);\n\nScrollLock.defaultProps = {\n accountForScrollbars: true\n};\n\nfunction _inheritsLoose$2(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nvar _ref$1 = process.env.NODE_ENV === \"production\" ? {\n name: \"1dsbpcp\",\n styles: \"position:fixed;left:0;bottom:0;right:0;top:0;\"\n} : {\n name: \"1dsbpcp\",\n styles: \"position:fixed;left:0;bottom:0;right:0;top:0;\",\n map: \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbEJsb2NrLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTZEVSIsImZpbGUiOiJTY3JvbGxCbG9jay5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIEBmbG93XG4vKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IFB1cmVDb21wb25lbnQsIHR5cGUgRWxlbWVudCB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL2NvcmUnO1xuaW1wb3J0IE5vZGVSZXNvbHZlciBmcm9tICcuL05vZGVSZXNvbHZlcic7XG5pbXBvcnQgU2Nyb2xsTG9jayBmcm9tICcuL1Njcm9sbExvY2svaW5kZXgnO1xuXG50eXBlIFByb3BzID0ge1xuICBjaGlsZHJlbjogRWxlbWVudDwqPixcbiAgaXNFbmFibGVkOiBib29sZWFuLFxufTtcbnR5cGUgU3RhdGUgPSB7XG4gIHRvdWNoU2Nyb2xsVGFyZ2V0OiBIVE1MRWxlbWVudCB8IG51bGwsXG59O1xuXG4vLyBOT1RFOlxuLy8gV2Ugc2hvdWxkbid0IG5lZWQgdGhpcyBhZnRlciB1cGRhdGluZyB0byBSZWFjdCB2MTYuMy4wLCB3aGljaCBpbnRyb2R1Y2VzOlxuLy8gLSBjcmVhdGVSZWYoKSBodHRwczovL3JlYWN0anMub3JnL2RvY3MvcmVhY3QtYXBpLmh0bWwjcmVhY3RjcmVhdGVyZWZcbi8vIC0gZm9yd2FyZFJlZigpIGh0dHBzOi8vcmVhY3Rqcy5vcmcvZG9jcy9yZWFjdC1hcGkuaHRtbCNyZWFjdGZvcndhcmRyZWZcblxuZXhwb3J0IGRlZmF1bHQgY2xhc3MgU2Nyb2xsQmxvY2sgZXh0ZW5kcyBQdXJlQ29tcG9uZW50PFByb3BzLCBTdGF0ZT4ge1xuICBzdGF0ZSA9IHsgdG91Y2hTY3JvbGxUYXJnZXQ6IG51bGwgfTtcblxuICAvLyBtdXN0IGJlIGluIHN0YXRlIHRvIHRyaWdnZXIgYSByZS1yZW5kZXIsIG9ubHkgcnVucyBvbmNlIHBlciBpbnN0YW5jZVxuICBnZXRTY3JvbGxUYXJnZXQgPSAocmVmOiBIVE1MRWxlbWVudCkgPT4ge1xuICAgIGlmIChyZWYgPT09IHRoaXMuc3RhdGUudG91Y2hTY3JvbGxUYXJnZXQpIHJldHVybjtcbiAgICB0aGlzLnNldFN0YXRlKHsgdG91Y2hTY3JvbGxUYXJnZXQ6IHJlZiB9KTtcbiAgfTtcblxuICAvLyB0aGlzIHdpbGwgY2xvc2UgdGhlIG1lbnUgd2hlbiBhIHVzZXIgY2xpY2tzIG91dHNpZGVcbiAgYmx1clNlbGVjdElucHV0ID0gKCkgPT4ge1xuICAgIGlmIChkb2N1bWVudC5hY3RpdmVFbGVtZW50KSB7XG4gICAgICBkb2N1bWVudC5hY3RpdmVFbGVtZW50LmJsdXIoKTtcbiAgICB9XG4gIH07XG5cbiAgcmVuZGVyKCkge1xuICAgIGNvbnN0IHsgY2hpbGRyZW4sIGlzRW5hYmxlZCB9ID0gdGhpcy5wcm9wcztcbiAgICBjb25zdCB7IHRvdWNoU2Nyb2xsVGFyZ2V0IH0gPSB0aGlzLnN0YXRlO1xuXG4gICAgLy8gYmFpbCBlYXJseSBpZiBub3QgZW5hYmxlZFxuICAgIGlmICghaXNFbmFibGVkKSByZXR1cm4gY2hpbGRyZW47XG5cbiAgICAvKlxuICAgICAqIERpdlxuICAgICAqIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLVxuICAgICAqIGJsb2NrcyBzY3JvbGxpbmcgb24gbm9uLWJvZHkgZWxlbWVudHMgYmVoaW5kIHRoZSBtZW51XG5cbiAgICAgKiBOb2RlUmVzb2x2ZXJcbiAgICAgKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS1cbiAgICAgKiB3ZSBuZWVkIGEgcmVmZXJlbmNlIHRvIHRoZSBzY3JvbGxhYmxlIGVsZW1lbnQgdG8gXCJ1bmxvY2tcIiBzY3JvbGwgb25cbiAgICAgKiBtb2JpbGUgZGV2aWNlc1xuXG4gICAgICogU2Nyb2xsTG9ja1xuICAgICAqIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLVxuICAgICAqIGFjdHVhbGx5IGRvZXMgdGhlIHNjcm9sbCBsb2NraW5nXG4gICAgICovXG4gICAgcmV0dXJuIChcbiAgICAgIDxkaXY+XG4gICAgICAgIDxkaXZcbiAgICAgICAgICBvbkNsaWNrPXt0aGlzLmJsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgICA8Tm9kZVJlc29sdmVyIGlubmVyUmVmPXt0aGlzLmdldFNjcm9sbFRhcmdldH0+e2NoaWxkcmVufTwvTm9kZVJlc29sdmVyPlxuICAgICAgICB7dG91Y2hTY3JvbGxUYXJnZXQgPyAoXG4gICAgICAgICAgPFNjcm9sbExvY2sgdG91Y2hTY3JvbGxUYXJnZXQ9e3RvdWNoU2Nyb2xsVGFyZ2V0fSAvPlxuICAgICAgICApIDogbnVsbH1cbiAgICAgIDwvZGl2PlxuICAgICk7XG4gIH1cbn1cbiJdfQ== */\"\n}; // NOTE:\n// We shouldn't need this after updating to React v16.3.0, which introduces:\n// - createRef() https://reactjs.org/docs/react-api.html#reactcreateref\n// - forwardRef() https://reactjs.org/docs/react-api.html#reactforwardref\n\n\nvar ScrollBlock =\n/*#__PURE__*/\nfunction (_PureComponent) {\n _inheritsLoose$2(ScrollBlock, _PureComponent);\n\n function ScrollBlock() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _PureComponent.call.apply(_PureComponent, [this].concat(args)) || this;\n _this.state = {\n touchScrollTarget: null\n };\n\n _this.getScrollTarget = function (ref) {\n if (ref === _this.state.touchScrollTarget) return;\n\n _this.setState({\n touchScrollTarget: ref\n });\n };\n\n _this.blurSelectInput = function () {\n if (document.activeElement) {\n document.activeElement.blur();\n }\n };\n\n return _this;\n }\n\n var _proto = ScrollBlock.prototype;\n\n _proto.render = function render() {\n var _this$props = this.props,\n children = _this$props.children,\n isEnabled = _this$props.isEnabled;\n var touchScrollTarget = this.state.touchScrollTarget; // bail early if not enabled\n\n if (!isEnabled) return children;\n /*\n * Div\n * ------------------------------\n * blocks scrolling on non-body elements behind the menu\n * NodeResolver\n * ------------------------------\n * we need a reference to the scrollable element to \"unlock\" scroll on\n * mobile devices\n * ScrollLock\n * ------------------------------\n * actually does the scroll locking\n */\n\n return jsx(\"div\", null, jsx(\"div\", {\n onClick: this.blurSelectInput,\n css: _ref$1\n }), jsx(NodeResolver, {\n innerRef: this.getScrollTarget\n }, children), touchScrollTarget ? jsx(ScrollLock, {\n touchScrollTarget: touchScrollTarget\n }) : null);\n };\n\n return ScrollBlock;\n}(PureComponent);\n\nfunction _objectWithoutPropertiesLoose$1(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\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\n return target;\n}\n\nfunction _inheritsLoose$3(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nvar ScrollCaptor =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose$3(ScrollCaptor, _Component);\n\n function ScrollCaptor() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _Component.call.apply(_Component, [this].concat(args)) || this;\n _this.isBottom = false;\n _this.isTop = false;\n _this.scrollTarget = void 0;\n _this.touchStart = void 0;\n\n _this.cancelScroll = function (event) {\n event.preventDefault();\n event.stopPropagation();\n };\n\n _this.handleEventDelta = function (event, delta) {\n var _this$props = _this.props,\n onBottomArrive = _this$props.onBottomArrive,\n onBottomLeave = _this$props.onBottomLeave,\n onTopArrive = _this$props.onTopArrive,\n onTopLeave = _this$props.onTopLeave;\n var _this$scrollTarget = _this.scrollTarget,\n scrollTop = _this$scrollTarget.scrollTop,\n scrollHeight = _this$scrollTarget.scrollHeight,\n clientHeight = _this$scrollTarget.clientHeight;\n var target = _this.scrollTarget;\n var isDeltaPositive = delta > 0;\n var availableScroll = scrollHeight - clientHeight - scrollTop;\n var shouldCancelScroll = false; // reset bottom/top flags\n\n if (availableScroll > delta && _this.isBottom) {\n if (onBottomLeave) onBottomLeave(event);\n _this.isBottom = false;\n }\n\n if (isDeltaPositive && _this.isTop) {\n if (onTopLeave) onTopLeave(event);\n _this.isTop = false;\n } // bottom limit\n\n\n if (isDeltaPositive && delta > availableScroll) {\n if (onBottomArrive && !_this.isBottom) {\n onBottomArrive(event);\n }\n\n target.scrollTop = scrollHeight;\n shouldCancelScroll = true;\n _this.isBottom = true; // top limit\n } else if (!isDeltaPositive && -delta > scrollTop) {\n if (onTopArrive && !_this.isTop) {\n onTopArrive(event);\n }\n\n target.scrollTop = 0;\n shouldCancelScroll = true;\n _this.isTop = true;\n } // cancel scroll\n\n\n if (shouldCancelScroll) {\n _this.cancelScroll(event);\n }\n };\n\n _this.onWheel = function (event) {\n _this.handleEventDelta(event, event.deltaY);\n };\n\n _this.onTouchStart = function (event) {\n // set touch start so we can calculate touchmove delta\n _this.touchStart = event.changedTouches[0].clientY;\n };\n\n _this.onTouchMove = function (event) {\n var deltaY = _this.touchStart - event.changedTouches[0].clientY;\n\n _this.handleEventDelta(event, deltaY);\n };\n\n _this.getScrollTarget = function (ref) {\n _this.scrollTarget = ref;\n };\n\n return _this;\n }\n\n var _proto = ScrollCaptor.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.startListening(this.scrollTarget);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.stopListening(this.scrollTarget);\n };\n\n _proto.startListening = function startListening(el) {\n // bail early if no element is available to attach to\n if (!el) return; // all the if statements are to appease Flow 😢\n\n if (typeof el.addEventListener === 'function') {\n el.addEventListener('wheel', this.onWheel, false);\n }\n\n if (typeof el.addEventListener === 'function') {\n el.addEventListener('touchstart', this.onTouchStart, false);\n }\n\n if (typeof el.addEventListener === 'function') {\n el.addEventListener('touchmove', this.onTouchMove, false);\n }\n };\n\n _proto.stopListening = function stopListening(el) {\n // all the if statements are to appease Flow 😢\n if (typeof el.removeEventListener === 'function') {\n el.removeEventListener('wheel', this.onWheel, false);\n }\n\n if (typeof el.removeEventListener === 'function') {\n el.removeEventListener('touchstart', this.onTouchStart, false);\n }\n\n if (typeof el.removeEventListener === 'function') {\n el.removeEventListener('touchmove', this.onTouchMove, false);\n }\n };\n\n _proto.render = function render() {\n return React.createElement(NodeResolver, {\n innerRef: this.getScrollTarget\n }, this.props.children);\n };\n\n return ScrollCaptor;\n}(Component);\n\nfunction ScrollCaptorSwitch(_ref) {\n var _ref$isEnabled = _ref.isEnabled,\n isEnabled = _ref$isEnabled === void 0 ? true : _ref$isEnabled,\n props = _objectWithoutPropertiesLoose$1(_ref, [\"isEnabled\"]);\n\n return isEnabled ? React.createElement(ScrollCaptor, props) : props.children;\n}\n\nvar instructionsAriaMessage = function instructionsAriaMessage(event, context) {\n if (context === void 0) {\n context = {};\n }\n\n var _context = context,\n isSearchable = _context.isSearchable,\n isMulti = _context.isMulti,\n label = _context.label,\n isDisabled = _context.isDisabled;\n\n switch (event) {\n case 'menu':\n return \"Use Up and Down to choose options\" + (isDisabled ? '' : ', press Enter to select the currently focused option') + \", press Escape to exit the menu, press Tab to select the option and exit the menu.\";\n\n case 'input':\n return (label ? label : 'Select') + \" is focused \" + (isSearchable ? ',type to refine list' : '') + \", press Down to open the menu, \" + (isMulti ? ' press left to focus selected values' : '');\n\n case 'value':\n return 'Use left and right to toggle between focused values, press Backspace to remove the currently focused value';\n }\n};\n\nvar valueEventAriaMessage = function valueEventAriaMessage(event, context) {\n var value = context.value,\n isDisabled = context.isDisabled;\n if (!value) return;\n\n switch (event) {\n case 'deselect-option':\n case 'pop-value':\n case 'remove-value':\n return \"option \" + value + \", deselected.\";\n\n case 'select-option':\n return isDisabled ? \"option \" + value + \" is disabled. Select another option.\" : \"option \" + value + \", selected.\";\n }\n};\n\nvar valueFocusAriaMessage = function valueFocusAriaMessage(_ref) {\n var focusedValue = _ref.focusedValue,\n getOptionLabel = _ref.getOptionLabel,\n selectValue = _ref.selectValue;\n return \"value \" + getOptionLabel(focusedValue) + \" focused, \" + (selectValue.indexOf(focusedValue) + 1) + \" of \" + selectValue.length + \".\";\n};\n\nvar optionFocusAriaMessage = function optionFocusAriaMessage(_ref2) {\n var focusedOption = _ref2.focusedOption,\n getOptionLabel = _ref2.getOptionLabel,\n options = _ref2.options;\n return \"option \" + getOptionLabel(focusedOption) + \" focused\" + (focusedOption.isDisabled ? ' disabled' : '') + \", \" + (options.indexOf(focusedOption) + 1) + \" of \" + options.length + \".\";\n};\n\nvar resultsAriaMessage = function resultsAriaMessage(_ref3) {\n var inputValue = _ref3.inputValue,\n screenReaderMessage = _ref3.screenReaderMessage;\n return \"\" + screenReaderMessage + (inputValue ? ' for search term ' + inputValue : '') + \".\";\n};\n\nvar formatGroupLabel = function formatGroupLabel(group) {\n return group.label;\n};\n\nvar getOptionLabel = function getOptionLabel(option) {\n return option.label;\n};\n\nvar getOptionValue = function getOptionValue(option) {\n return option.value;\n};\n\nvar isOptionDisabled = function isOptionDisabled(option) {\n return !!option.isDisabled;\n};\n\nfunction _extends$3() {\n _extends$3 = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends$3.apply(this, arguments);\n}\n\nvar defaultStyles = {\n clearIndicator: clearIndicatorCSS,\n container: containerCSS,\n control: css,\n dropdownIndicator: dropdownIndicatorCSS,\n group: groupCSS,\n groupHeading: groupHeadingCSS,\n indicatorsContainer: indicatorsContainerCSS,\n indicatorSeparator: indicatorSeparatorCSS,\n input: inputCSS,\n loadingIndicator: loadingIndicatorCSS,\n loadingMessage: loadingMessageCSS,\n menu: menuCSS,\n menuList: menuListCSS,\n menuPortal: menuPortalCSS,\n multiValue: multiValueCSS,\n multiValueLabel: multiValueLabelCSS,\n multiValueRemove: multiValueRemoveCSS,\n noOptionsMessage: noOptionsMessageCSS,\n option: optionCSS,\n placeholder: placeholderCSS,\n singleValue: css$1,\n valueContainer: valueContainerCSS\n}; // Merge Utility\n// Allows consumers to extend a base Select with additional styles\n\nfunction mergeStyles(source, target) {\n if (target === void 0) {\n target = {};\n } // initialize with source styles\n\n\n var styles = _extends$3({}, source); // massage in target styles\n\n\n Object.keys(target).forEach(function (key) {\n if (source[key]) {\n styles[key] = function (rsCss, props) {\n return target[key](source[key](rsCss, props), props);\n };\n } else {\n styles[key] = target[key];\n }\n });\n return styles;\n}\n\nvar colors = {\n primary: '#2684FF',\n primary75: '#4C9AFF',\n primary50: '#B2D4FF',\n primary25: '#DEEBFF',\n danger: '#DE350B',\n dangerLight: '#FFBDAD',\n neutral0: 'hsl(0, 0%, 100%)',\n neutral5: 'hsl(0, 0%, 95%)',\n neutral10: 'hsl(0, 0%, 90%)',\n neutral20: 'hsl(0, 0%, 80%)',\n neutral30: 'hsl(0, 0%, 70%)',\n neutral40: 'hsl(0, 0%, 60%)',\n neutral50: 'hsl(0, 0%, 50%)',\n neutral60: 'hsl(0, 0%, 40%)',\n neutral70: 'hsl(0, 0%, 30%)',\n neutral80: 'hsl(0, 0%, 20%)',\n neutral90: 'hsl(0, 0%, 10%)'\n};\nvar borderRadius = 4; // Used to calculate consistent margin/padding on elements\n\nvar baseUnit = 4; // The minimum height of the control\n\nvar controlHeight = 38; // The amount of space between the control and menu */\n\nvar menuGutter = baseUnit * 2;\nvar spacing = {\n baseUnit: baseUnit,\n controlHeight: controlHeight,\n menuGutter: menuGutter\n};\nvar defaultTheme = {\n borderRadius: borderRadius,\n colors: colors,\n spacing: spacing\n};\n\nfunction _objectWithoutPropertiesLoose$2(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\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\n return target;\n}\n\nfunction _extends$4() {\n _extends$4 = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends$4.apply(this, arguments);\n}\n\nfunction _inheritsLoose$4(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\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\n return self;\n}\n\nvar defaultProps = {\n backspaceRemovesValue: true,\n blurInputOnSelect: isTouchCapable(),\n captureMenuScroll: !isTouchCapable(),\n closeMenuOnSelect: true,\n closeMenuOnScroll: false,\n components: {},\n controlShouldRenderValue: true,\n escapeClearsValue: false,\n filterOption: createFilter(),\n formatGroupLabel: formatGroupLabel,\n getOptionLabel: getOptionLabel,\n getOptionValue: getOptionValue,\n isDisabled: false,\n isLoading: false,\n isMulti: false,\n isRtl: false,\n isSearchable: true,\n isOptionDisabled: isOptionDisabled,\n loadingMessage: function loadingMessage() {\n return 'Loading...';\n },\n maxMenuHeight: 300,\n minMenuHeight: 140,\n menuIsOpen: false,\n menuPlacement: 'bottom',\n menuPosition: 'absolute',\n menuShouldBlockScroll: false,\n menuShouldScrollIntoView: !isMobileDevice(),\n noOptionsMessage: function noOptionsMessage() {\n return 'No options';\n },\n openMenuOnFocus: false,\n openMenuOnClick: true,\n options: [],\n pageSize: 5,\n placeholder: 'Select...',\n screenReaderStatus: function screenReaderStatus(_ref) {\n var count = _ref.count;\n return count + \" result\" + (count !== 1 ? 's' : '') + \" available\";\n },\n styles: {},\n tabIndex: '0',\n tabSelectsValue: true\n};\nvar instanceId = 1;\n\nvar Select =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose$4(Select, _Component); // Misc. Instance Properties\n // ------------------------------\n // TODO\n // Refs\n // ------------------------------\n // Lifecycle\n // ------------------------------\n\n\n function Select(_props) {\n var _this;\n\n _this = _Component.call(this, _props) || this;\n _this.state = {\n ariaLiveSelection: '',\n ariaLiveContext: '',\n focusedOption: null,\n focusedValue: null,\n inputIsHidden: false,\n isFocused: false,\n menuOptions: {\n render: [],\n focusable: []\n },\n selectValue: []\n };\n _this.blockOptionHover = false;\n _this.isComposing = false;\n _this.clearFocusValueOnUpdate = false;\n _this.commonProps = void 0;\n _this.components = void 0;\n _this.hasGroups = false;\n _this.initialTouchX = 0;\n _this.initialTouchY = 0;\n _this.inputIsHiddenAfterUpdate = void 0;\n _this.instancePrefix = '';\n _this.openAfterFocus = false;\n _this.scrollToFocusedOptionOnUpdate = false;\n _this.userIsDragging = void 0;\n _this.controlRef = null;\n\n _this.getControlRef = function (ref) {\n _this.controlRef = ref;\n };\n\n _this.focusedOptionRef = null;\n\n _this.getFocusedOptionRef = function (ref) {\n _this.focusedOptionRef = ref;\n };\n\n _this.menuListRef = null;\n\n _this.getMenuListRef = function (ref) {\n _this.menuListRef = ref;\n };\n\n _this.inputRef = null;\n\n _this.getInputRef = function (ref) {\n _this.inputRef = ref;\n };\n\n _this.cacheComponents = function (components) {\n _this.components = defaultComponents({\n components: components\n });\n };\n\n _this.focus = _this.focusInput;\n _this.blur = _this.blurInput;\n\n _this.onChange = function (newValue, actionMeta) {\n var _this$props = _this.props,\n onChange = _this$props.onChange,\n name = _this$props.name;\n onChange(newValue, _extends$4({}, actionMeta, {\n name: name\n }));\n };\n\n _this.setValue = function (newValue, action, option) {\n if (action === void 0) {\n action = 'set-value';\n }\n\n var _this$props2 = _this.props,\n closeMenuOnSelect = _this$props2.closeMenuOnSelect,\n isMulti = _this$props2.isMulti;\n\n _this.onInputChange('', {\n action: 'set-value'\n });\n\n if (closeMenuOnSelect) {\n _this.inputIsHiddenAfterUpdate = !isMulti;\n\n _this.onMenuClose();\n } // when the select value should change, we should reset focusedValue\n\n\n _this.clearFocusValueOnUpdate = true;\n\n _this.onChange(newValue, {\n action: action,\n option: option\n });\n };\n\n _this.selectOption = function (newValue) {\n var _this$props3 = _this.props,\n blurInputOnSelect = _this$props3.blurInputOnSelect,\n isMulti = _this$props3.isMulti;\n var selectValue = _this.state.selectValue;\n\n if (isMulti) {\n if (_this.isOptionSelected(newValue, selectValue)) {\n var candidate = _this.getOptionValue(newValue);\n\n _this.setValue(selectValue.filter(function (i) {\n return _this.getOptionValue(i) !== candidate;\n }), 'deselect-option', newValue);\n\n _this.announceAriaLiveSelection({\n event: 'deselect-option',\n context: {\n value: _this.getOptionLabel(newValue)\n }\n });\n } else {\n if (!_this.isOptionDisabled(newValue, selectValue)) {\n _this.setValue([].concat(selectValue, [newValue]), 'select-option', newValue);\n\n _this.announceAriaLiveSelection({\n event: 'select-option',\n context: {\n value: _this.getOptionLabel(newValue)\n }\n });\n } else {\n // announce that option is disabled\n _this.announceAriaLiveSelection({\n event: 'select-option',\n context: {\n value: _this.getOptionLabel(newValue),\n isDisabled: true\n }\n });\n }\n }\n } else {\n if (!_this.isOptionDisabled(newValue, selectValue)) {\n _this.setValue(newValue, 'select-option');\n\n _this.announceAriaLiveSelection({\n event: 'select-option',\n context: {\n value: _this.getOptionLabel(newValue)\n }\n });\n } else {\n // announce that option is disabled\n _this.announceAriaLiveSelection({\n event: 'select-option',\n context: {\n value: _this.getOptionLabel(newValue),\n isDisabled: true\n }\n });\n }\n }\n\n if (blurInputOnSelect) {\n _this.blurInput();\n }\n };\n\n _this.removeValue = function (removedValue) {\n var selectValue = _this.state.selectValue;\n\n var candidate = _this.getOptionValue(removedValue);\n\n var newValue = selectValue.filter(function (i) {\n return _this.getOptionValue(i) !== candidate;\n });\n\n _this.onChange(newValue.length ? newValue : null, {\n action: 'remove-value',\n removedValue: removedValue\n });\n\n _this.announceAriaLiveSelection({\n event: 'remove-value',\n context: {\n value: removedValue ? _this.getOptionLabel(removedValue) : ''\n }\n });\n\n _this.focusInput();\n };\n\n _this.clearValue = function () {\n var isMulti = _this.props.isMulti;\n\n _this.onChange(isMulti ? [] : null, {\n action: 'clear'\n });\n };\n\n _this.popValue = function () {\n var selectValue = _this.state.selectValue;\n var lastSelectedValue = selectValue[selectValue.length - 1];\n var newValue = selectValue.slice(0, selectValue.length - 1);\n\n _this.announceAriaLiveSelection({\n event: 'pop-value',\n context: {\n value: lastSelectedValue ? _this.getOptionLabel(lastSelectedValue) : ''\n }\n });\n\n _this.onChange(newValue.length ? newValue : null, {\n action: 'pop-value',\n removedValue: lastSelectedValue\n });\n };\n\n _this.getOptionLabel = function (data) {\n return _this.props.getOptionLabel(data);\n };\n\n _this.getOptionValue = function (data) {\n return _this.props.getOptionValue(data);\n };\n\n _this.getStyles = function (key, props) {\n var base = defaultStyles[key](props);\n base.boxSizing = 'border-box';\n var custom = _this.props.styles[key];\n return custom ? custom(base, props) : base;\n };\n\n _this.getElementId = function (element) {\n return _this.instancePrefix + \"-\" + element;\n };\n\n _this.getActiveDescendentId = function () {\n var menuIsOpen = _this.props.menuIsOpen;\n var _this$state = _this.state,\n menuOptions = _this$state.menuOptions,\n focusedOption = _this$state.focusedOption;\n if (!focusedOption || !menuIsOpen) return undefined;\n var index = menuOptions.focusable.indexOf(focusedOption);\n var option = menuOptions.render[index];\n return option && option.key;\n };\n\n _this.announceAriaLiveSelection = function (_ref2) {\n var event = _ref2.event,\n context = _ref2.context;\n\n _this.setState({\n ariaLiveSelection: valueEventAriaMessage(event, context)\n });\n };\n\n _this.announceAriaLiveContext = function (_ref3) {\n var event = _ref3.event,\n context = _ref3.context;\n\n _this.setState({\n ariaLiveContext: instructionsAriaMessage(event, _extends$4({}, context, {\n label: _this.props['aria-label']\n }))\n });\n };\n\n _this.onMenuMouseDown = function (event) {\n if (event.button !== 0) {\n return;\n }\n\n event.stopPropagation();\n event.preventDefault();\n\n _this.focusInput();\n };\n\n _this.onMenuMouseMove = function (event) {\n _this.blockOptionHover = false;\n };\n\n _this.onControlMouseDown = function (event) {\n var openMenuOnClick = _this.props.openMenuOnClick;\n\n if (!_this.state.isFocused) {\n if (openMenuOnClick) {\n _this.openAfterFocus = true;\n }\n\n _this.focusInput();\n } else if (!_this.props.menuIsOpen) {\n if (openMenuOnClick) {\n _this.openMenu('first');\n }\n } else {\n if ( // $FlowFixMe\n event.target.tagName !== 'INPUT' && event.target.tagName !== 'TEXTAREA') {\n _this.onMenuClose();\n }\n }\n\n if ( // $FlowFixMe\n event.target.tagName !== 'INPUT' && event.target.tagName !== 'TEXTAREA') {\n event.preventDefault();\n }\n };\n\n _this.onDropdownIndicatorMouseDown = function (event) {\n // ignore mouse events that weren't triggered by the primary button\n if (event && event.type === 'mousedown' && event.button !== 0) {\n return;\n }\n\n if (_this.props.isDisabled) return;\n var _this$props4 = _this.props,\n isMulti = _this$props4.isMulti,\n menuIsOpen = _this$props4.menuIsOpen;\n\n _this.focusInput();\n\n if (menuIsOpen) {\n _this.inputIsHiddenAfterUpdate = !isMulti;\n\n _this.onMenuClose();\n } else {\n _this.openMenu('first');\n }\n\n event.preventDefault();\n event.stopPropagation();\n };\n\n _this.onClearIndicatorMouseDown = function (event) {\n // ignore mouse events that weren't triggered by the primary button\n if (event && event.type === 'mousedown' && event.button !== 0) {\n return;\n }\n\n _this.clearValue();\n\n event.stopPropagation();\n _this.openAfterFocus = false;\n\n if (event.type === 'touchend') {\n _this.focusInput();\n } else {\n setTimeout(function () {\n return _this.focusInput();\n });\n }\n };\n\n _this.onScroll = function (event) {\n if (typeof _this.props.closeMenuOnScroll === 'boolean') {\n if (event.target instanceof HTMLElement && isDocumentElement(event.target)) {\n _this.props.onMenuClose();\n }\n } else if (typeof _this.props.closeMenuOnScroll === 'function') {\n if (_this.props.closeMenuOnScroll(event)) {\n _this.props.onMenuClose();\n }\n }\n };\n\n _this.onCompositionStart = function () {\n _this.isComposing = true;\n };\n\n _this.onCompositionEnd = function () {\n _this.isComposing = false;\n };\n\n _this.onTouchStart = function (_ref4) {\n var touches = _ref4.touches;\n var touch = touches.item(0);\n\n if (!touch) {\n return;\n }\n\n _this.initialTouchX = touch.clientX;\n _this.initialTouchY = touch.clientY;\n _this.userIsDragging = false;\n };\n\n _this.onTouchMove = function (_ref5) {\n var touches = _ref5.touches;\n var touch = touches.item(0);\n\n if (!touch) {\n return;\n }\n\n var deltaX = Math.abs(touch.clientX - _this.initialTouchX);\n var deltaY = Math.abs(touch.clientY - _this.initialTouchY);\n var moveThreshold = 5;\n _this.userIsDragging = deltaX > moveThreshold || deltaY > moveThreshold;\n };\n\n _this.onTouchEnd = function (event) {\n if (_this.userIsDragging) return; // close the menu if the user taps outside\n // we're checking on event.target here instead of event.currentTarget, because we want to assert information\n // on events on child elements, not the document (which we've attached this handler to).\n\n if (_this.controlRef && !_this.controlRef.contains(event.target) && _this.menuListRef && !_this.menuListRef.contains(event.target)) {\n _this.blurInput();\n } // reset move vars\n\n\n _this.initialTouchX = 0;\n _this.initialTouchY = 0;\n };\n\n _this.onControlTouchEnd = function (event) {\n if (_this.userIsDragging) return;\n\n _this.onControlMouseDown(event);\n };\n\n _this.onClearIndicatorTouchEnd = function (event) {\n if (_this.userIsDragging) return;\n\n _this.onClearIndicatorMouseDown(event);\n };\n\n _this.onDropdownIndicatorTouchEnd = function (event) {\n if (_this.userIsDragging) return;\n\n _this.onDropdownIndicatorMouseDown(event);\n };\n\n _this.handleInputChange = function (event) {\n var inputValue = event.currentTarget.value;\n _this.inputIsHiddenAfterUpdate = false;\n\n _this.onInputChange(inputValue, {\n action: 'input-change'\n });\n\n _this.onMenuOpen();\n };\n\n _this.onInputFocus = function (event) {\n var _this$props5 = _this.props,\n isSearchable = _this$props5.isSearchable,\n isMulti = _this$props5.isMulti;\n\n if (_this.props.onFocus) {\n _this.props.onFocus(event);\n }\n\n _this.inputIsHiddenAfterUpdate = false;\n\n _this.announceAriaLiveContext({\n event: 'input',\n context: {\n isSearchable: isSearchable,\n isMulti: isMulti\n }\n });\n\n _this.setState({\n isFocused: true\n });\n\n if (_this.openAfterFocus || _this.props.openMenuOnFocus) {\n _this.openMenu('first');\n }\n\n _this.openAfterFocus = false;\n };\n\n _this.onInputBlur = function (event) {\n if (_this.menuListRef && _this.menuListRef.contains(document.activeElement)) {\n _this.inputRef.focus();\n\n return;\n }\n\n if (_this.props.onBlur) {\n _this.props.onBlur(event);\n }\n\n _this.onInputChange('', {\n action: 'input-blur'\n });\n\n _this.onMenuClose();\n\n _this.setState({\n focusedValue: null,\n isFocused: false\n });\n };\n\n _this.onOptionHover = function (focusedOption) {\n if (_this.blockOptionHover || _this.state.focusedOption === focusedOption) {\n return;\n }\n\n _this.setState({\n focusedOption: focusedOption\n });\n };\n\n _this.shouldHideSelectedOptions = function () {\n var _this$props6 = _this.props,\n hideSelectedOptions = _this$props6.hideSelectedOptions,\n isMulti = _this$props6.isMulti;\n if (hideSelectedOptions === undefined) return isMulti;\n return hideSelectedOptions;\n };\n\n _this.onKeyDown = function (event) {\n var _this$props7 = _this.props,\n isMulti = _this$props7.isMulti,\n backspaceRemovesValue = _this$props7.backspaceRemovesValue,\n escapeClearsValue = _this$props7.escapeClearsValue,\n inputValue = _this$props7.inputValue,\n isClearable = _this$props7.isClearable,\n isDisabled = _this$props7.isDisabled,\n menuIsOpen = _this$props7.menuIsOpen,\n onKeyDown = _this$props7.onKeyDown,\n tabSelectsValue = _this$props7.tabSelectsValue,\n openMenuOnFocus = _this$props7.openMenuOnFocus;\n var _this$state2 = _this.state,\n focusedOption = _this$state2.focusedOption,\n focusedValue = _this$state2.focusedValue,\n selectValue = _this$state2.selectValue;\n if (isDisabled) return;\n\n if (typeof onKeyDown === 'function') {\n onKeyDown(event);\n\n if (event.defaultPrevented) {\n return;\n }\n } // Block option hover events when the user has just pressed a key\n\n\n _this.blockOptionHover = true;\n\n switch (event.key) {\n case 'ArrowLeft':\n if (!isMulti || inputValue) return;\n\n _this.focusValue('previous');\n\n break;\n\n case 'ArrowRight':\n if (!isMulti || inputValue) return;\n\n _this.focusValue('next');\n\n break;\n\n case 'Delete':\n case 'Backspace':\n if (inputValue) return;\n\n if (focusedValue) {\n _this.removeValue(focusedValue);\n } else {\n if (!backspaceRemovesValue) return;\n\n if (isMulti) {\n _this.popValue();\n } else if (isClearable) {\n _this.clearValue();\n }\n }\n\n break;\n\n case 'Tab':\n if (_this.isComposing) return;\n\n if (event.shiftKey || !menuIsOpen || !tabSelectsValue || !focusedOption || // don't capture the event if the menu opens on focus and the focused\n // option is already selected; it breaks the flow of navigation\n openMenuOnFocus && _this.isOptionSelected(focusedOption, selectValue)) {\n return;\n }\n\n _this.selectOption(focusedOption);\n\n break;\n\n case 'Enter':\n if (event.keyCode === 229) {\n // ignore the keydown event from an Input Method Editor(IME)\n // ref. https://www.w3.org/TR/uievents/#determine-keydown-keyup-keyCode\n break;\n }\n\n if (menuIsOpen) {\n if (!focusedOption) return;\n if (_this.isComposing) return;\n\n _this.selectOption(focusedOption);\n\n break;\n }\n\n return;\n\n case 'Escape':\n if (menuIsOpen) {\n _this.inputIsHiddenAfterUpdate = false;\n\n _this.onInputChange('', {\n action: 'menu-close'\n });\n\n _this.onMenuClose();\n } else if (isClearable && escapeClearsValue) {\n _this.clearValue();\n }\n\n break;\n\n case ' ':\n // space\n if (inputValue) {\n return;\n }\n\n if (!menuIsOpen) {\n _this.openMenu('first');\n\n break;\n }\n\n if (!focusedOption) return;\n\n _this.selectOption(focusedOption);\n\n break;\n\n case 'ArrowUp':\n if (menuIsOpen) {\n _this.focusOption('up');\n } else {\n _this.openMenu('last');\n }\n\n break;\n\n case 'ArrowDown':\n if (menuIsOpen) {\n _this.focusOption('down');\n } else {\n _this.openMenu('first');\n }\n\n break;\n\n case 'PageUp':\n if (!menuIsOpen) return;\n\n _this.focusOption('pageup');\n\n break;\n\n case 'PageDown':\n if (!menuIsOpen) return;\n\n _this.focusOption('pagedown');\n\n break;\n\n case 'Home':\n if (!menuIsOpen) return;\n\n _this.focusOption('first');\n\n break;\n\n case 'End':\n if (!menuIsOpen) return;\n\n _this.focusOption('last');\n\n break;\n\n default:\n return;\n }\n\n event.preventDefault();\n };\n\n _this.buildMenuOptions = function (props, selectValue) {\n var _props$inputValue = props.inputValue,\n inputValue = _props$inputValue === void 0 ? '' : _props$inputValue,\n options = props.options;\n\n var toOption = function toOption(option, id) {\n var isDisabled = _this.isOptionDisabled(option, selectValue);\n\n var isSelected = _this.isOptionSelected(option, selectValue);\n\n var label = _this.getOptionLabel(option);\n\n var value = _this.getOptionValue(option);\n\n if (_this.shouldHideSelectedOptions() && isSelected || !_this.filterOption({\n label: label,\n value: value,\n data: option\n }, inputValue)) {\n return;\n }\n\n var onHover = isDisabled ? undefined : function () {\n return _this.onOptionHover(option);\n };\n var onSelect = isDisabled ? undefined : function () {\n return _this.selectOption(option);\n };\n var optionId = _this.getElementId('option') + \"-\" + id;\n return {\n innerProps: {\n id: optionId,\n onClick: onSelect,\n onMouseMove: onHover,\n onMouseOver: onHover,\n tabIndex: -1\n },\n data: option,\n isDisabled: isDisabled,\n isSelected: isSelected,\n key: optionId,\n label: label,\n type: 'option',\n value: value\n };\n };\n\n return options.reduce(function (acc, item, itemIndex) {\n if (item.options) {\n // TODO needs a tidier implementation\n if (!_this.hasGroups) _this.hasGroups = true;\n var items = item.options;\n var children = items.map(function (child, i) {\n var option = toOption(child, itemIndex + \"-\" + i);\n if (option) acc.focusable.push(child);\n return option;\n }).filter(Boolean);\n\n if (children.length) {\n var groupId = _this.getElementId('group') + \"-\" + itemIndex;\n acc.render.push({\n type: 'group',\n key: groupId,\n data: item,\n options: children\n });\n }\n } else {\n var option = toOption(item, \"\" + itemIndex);\n\n if (option) {\n acc.render.push(option);\n acc.focusable.push(item);\n }\n }\n\n return acc;\n }, {\n render: [],\n focusable: []\n });\n };\n\n var _value = _props.value;\n _this.cacheComponents = memoizeOne(_this.cacheComponents, exportedEqual).bind(_assertThisInitialized(_assertThisInitialized(_this)));\n\n _this.cacheComponents(_props.components);\n\n _this.instancePrefix = 'react-select-' + (_this.props.instanceId || ++instanceId);\n\n var _selectValue = cleanValue(_value);\n\n _this.buildMenuOptions = memoizeOne(_this.buildMenuOptions, function (newArgs, lastArgs) {\n var _ref6 = newArgs,\n newProps = _ref6[0],\n newSelectValue = _ref6[1];\n var _ref7 = lastArgs,\n lastProps = _ref7[0],\n lastSelectValue = _ref7[1];\n return exportedEqual(newSelectValue, lastSelectValue) && exportedEqual(newProps.inputValue, lastProps.inputValue) && exportedEqual(newProps.options, lastProps.options);\n }).bind(_assertThisInitialized(_assertThisInitialized(_this)));\n\n var _menuOptions = _props.menuIsOpen ? _this.buildMenuOptions(_props, _selectValue) : {\n render: [],\n focusable: []\n };\n\n _this.state.menuOptions = _menuOptions;\n _this.state.selectValue = _selectValue;\n return _this;\n }\n\n var _proto = Select.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.startListeningComposition();\n this.startListeningToTouch();\n\n if (this.props.closeMenuOnScroll && document && document.addEventListener) {\n // Listen to all scroll events, and filter them out inside of 'onScroll'\n document.addEventListener('scroll', this.onScroll, true);\n }\n\n if (this.props.autoFocus) {\n this.focusInput();\n }\n };\n\n _proto.UNSAFE_componentWillReceiveProps = function UNSAFE_componentWillReceiveProps(nextProps) {\n var _this$props8 = this.props,\n options = _this$props8.options,\n value = _this$props8.value,\n menuIsOpen = _this$props8.menuIsOpen,\n inputValue = _this$props8.inputValue; // re-cache custom components\n\n this.cacheComponents(nextProps.components); // rebuild the menu options\n\n if (nextProps.value !== value || nextProps.options !== options || nextProps.menuIsOpen !== menuIsOpen || nextProps.inputValue !== inputValue) {\n var selectValue = cleanValue(nextProps.value);\n var menuOptions = nextProps.menuIsOpen ? this.buildMenuOptions(nextProps, selectValue) : {\n render: [],\n focusable: []\n };\n var focusedValue = this.getNextFocusedValue(selectValue);\n var focusedOption = this.getNextFocusedOption(menuOptions.focusable);\n this.setState({\n menuOptions: menuOptions,\n selectValue: selectValue,\n focusedOption: focusedOption,\n focusedValue: focusedValue\n });\n } // some updates should toggle the state of the input visibility\n\n\n if (this.inputIsHiddenAfterUpdate != null) {\n this.setState({\n inputIsHidden: this.inputIsHiddenAfterUpdate\n });\n delete this.inputIsHiddenAfterUpdate;\n }\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var _this$props9 = this.props,\n isDisabled = _this$props9.isDisabled,\n menuIsOpen = _this$props9.menuIsOpen;\n var isFocused = this.state.isFocused;\n\n if ( // ensure focus is restored correctly when the control becomes enabled\n isFocused && !isDisabled && prevProps.isDisabled || // ensure focus is on the Input when the menu opens\n isFocused && menuIsOpen && !prevProps.menuIsOpen) {\n this.focusInput();\n } // scroll the focused option into view if necessary\n\n\n if (this.menuListRef && this.focusedOptionRef && this.scrollToFocusedOptionOnUpdate) {\n scrollIntoView(this.menuListRef, this.focusedOptionRef);\n this.scrollToFocusedOptionOnUpdate = false;\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.stopListeningComposition();\n this.stopListeningToTouch();\n document.removeEventListener('scroll', this.onScroll, true);\n }; // ==============================\n // Consumer Handlers\n // ==============================\n\n\n _proto.onMenuOpen = function onMenuOpen() {\n this.props.onMenuOpen();\n };\n\n _proto.onMenuClose = function onMenuClose() {\n var _this$props10 = this.props,\n isSearchable = _this$props10.isSearchable,\n isMulti = _this$props10.isMulti;\n this.announceAriaLiveContext({\n event: 'input',\n context: {\n isSearchable: isSearchable,\n isMulti: isMulti\n }\n });\n this.onInputChange('', {\n action: 'menu-close'\n });\n this.props.onMenuClose();\n };\n\n _proto.onInputChange = function onInputChange(newValue, actionMeta) {\n this.props.onInputChange(newValue, actionMeta);\n } // ==============================\n // Methods\n // ==============================\n ;\n\n _proto.focusInput = function focusInput() {\n if (!this.inputRef) return;\n this.inputRef.focus();\n };\n\n _proto.blurInput = function blurInput() {\n if (!this.inputRef) return;\n this.inputRef.blur();\n } // aliased for consumers\n ;\n\n _proto.openMenu = function openMenu(focusOption) {\n var _this2 = this;\n\n var _this$state3 = this.state,\n selectValue = _this$state3.selectValue,\n isFocused = _this$state3.isFocused;\n var menuOptions = this.buildMenuOptions(this.props, selectValue);\n var isMulti = this.props.isMulti;\n var openAtIndex = focusOption === 'first' ? 0 : menuOptions.focusable.length - 1;\n\n if (!isMulti) {\n var selectedIndex = menuOptions.focusable.indexOf(selectValue[0]);\n\n if (selectedIndex > -1) {\n openAtIndex = selectedIndex;\n }\n } // only scroll if the menu isn't already open\n\n\n this.scrollToFocusedOptionOnUpdate = !(isFocused && this.menuListRef);\n this.inputIsHiddenAfterUpdate = false;\n this.setState({\n menuOptions: menuOptions,\n focusedValue: null,\n focusedOption: menuOptions.focusable[openAtIndex]\n }, function () {\n _this2.onMenuOpen();\n\n _this2.announceAriaLiveContext({\n event: 'menu'\n });\n });\n };\n\n _proto.focusValue = function focusValue(direction) {\n var _this$props11 = this.props,\n isMulti = _this$props11.isMulti,\n isSearchable = _this$props11.isSearchable;\n var _this$state4 = this.state,\n selectValue = _this$state4.selectValue,\n focusedValue = _this$state4.focusedValue; // Only multiselects support value focusing\n\n if (!isMulti) return;\n this.setState({\n focusedOption: null\n });\n var focusedIndex = selectValue.indexOf(focusedValue);\n\n if (!focusedValue) {\n focusedIndex = -1;\n this.announceAriaLiveContext({\n event: 'value'\n });\n }\n\n var lastIndex = selectValue.length - 1;\n var nextFocus = -1;\n if (!selectValue.length) return;\n\n switch (direction) {\n case 'previous':\n if (focusedIndex === 0) {\n // don't cycle from the start to the end\n nextFocus = 0;\n } else if (focusedIndex === -1) {\n // if nothing is focused, focus the last value first\n nextFocus = lastIndex;\n } else {\n nextFocus = focusedIndex - 1;\n }\n\n break;\n\n case 'next':\n if (focusedIndex > -1 && focusedIndex < lastIndex) {\n nextFocus = focusedIndex + 1;\n }\n\n break;\n }\n\n if (nextFocus === -1) {\n this.announceAriaLiveContext({\n event: 'input',\n context: {\n isSearchable: isSearchable,\n isMulti: isMulti\n }\n });\n }\n\n this.setState({\n inputIsHidden: nextFocus !== -1,\n focusedValue: selectValue[nextFocus]\n });\n };\n\n _proto.focusOption = function focusOption(direction) {\n if (direction === void 0) {\n direction = 'first';\n }\n\n var pageSize = this.props.pageSize;\n var _this$state5 = this.state,\n focusedOption = _this$state5.focusedOption,\n menuOptions = _this$state5.menuOptions;\n var options = menuOptions.focusable;\n if (!options.length) return;\n var nextFocus = 0; // handles 'first'\n\n var focusedIndex = options.indexOf(focusedOption);\n\n if (!focusedOption) {\n focusedIndex = -1;\n this.announceAriaLiveContext({\n event: 'menu'\n });\n }\n\n if (direction === 'up') {\n nextFocus = focusedIndex > 0 ? focusedIndex - 1 : options.length - 1;\n } else if (direction === 'down') {\n nextFocus = (focusedIndex + 1) % options.length;\n } else if (direction === 'pageup') {\n nextFocus = focusedIndex - pageSize;\n if (nextFocus < 0) nextFocus = 0;\n } else if (direction === 'pagedown') {\n nextFocus = focusedIndex + pageSize;\n if (nextFocus > options.length - 1) nextFocus = options.length - 1;\n } else if (direction === 'last') {\n nextFocus = options.length - 1;\n }\n\n this.scrollToFocusedOptionOnUpdate = true;\n this.setState({\n focusedOption: options[nextFocus],\n focusedValue: null\n });\n this.announceAriaLiveContext({\n event: 'menu',\n context: {\n isDisabled: isOptionDisabled(options[nextFocus])\n }\n });\n }; // ==============================\n // Getters\n // ==============================\n\n\n _proto.getTheme = function getTheme() {\n // Use the default theme if there are no customizations.\n if (!this.props.theme) {\n return defaultTheme;\n } // If the theme prop is a function, assume the function\n // knows how to merge the passed-in default theme with\n // its own modifications.\n\n\n if (typeof this.props.theme === 'function') {\n return this.props.theme(defaultTheme);\n } // Otherwise, if a plain theme object was passed in,\n // overlay it with the default theme.\n\n\n return _extends$4({}, defaultTheme, this.props.theme);\n };\n\n _proto.getCommonProps = function getCommonProps() {\n var clearValue = this.clearValue,\n getStyles = this.getStyles,\n setValue = this.setValue,\n selectOption = this.selectOption,\n props = this.props;\n var classNamePrefix = props.classNamePrefix,\n isMulti = props.isMulti,\n isRtl = props.isRtl,\n options = props.options;\n var selectValue = this.state.selectValue;\n var hasValue = this.hasValue();\n\n var getValue = function getValue() {\n return selectValue;\n };\n\n var cx = classNames.bind(null, classNamePrefix);\n return {\n cx: cx,\n clearValue: clearValue,\n getStyles: getStyles,\n getValue: getValue,\n hasValue: hasValue,\n isMulti: isMulti,\n isRtl: isRtl,\n options: options,\n selectOption: selectOption,\n setValue: setValue,\n selectProps: props,\n theme: this.getTheme()\n };\n };\n\n _proto.getNextFocusedValue = function getNextFocusedValue(nextSelectValue) {\n if (this.clearFocusValueOnUpdate) {\n this.clearFocusValueOnUpdate = false;\n return null;\n }\n\n var _this$state6 = this.state,\n focusedValue = _this$state6.focusedValue,\n lastSelectValue = _this$state6.selectValue;\n var lastFocusedIndex = lastSelectValue.indexOf(focusedValue);\n\n if (lastFocusedIndex > -1) {\n var nextFocusedIndex = nextSelectValue.indexOf(focusedValue);\n\n if (nextFocusedIndex > -1) {\n // the focused value is still in the selectValue, return it\n return focusedValue;\n } else if (lastFocusedIndex < nextSelectValue.length) {\n // the focusedValue is not present in the next selectValue array by\n // reference, so return the new value at the same index\n return nextSelectValue[lastFocusedIndex];\n }\n }\n\n return null;\n };\n\n _proto.getNextFocusedOption = function getNextFocusedOption(options) {\n var lastFocusedOption = this.state.focusedOption;\n return lastFocusedOption && options.indexOf(lastFocusedOption) > -1 ? lastFocusedOption : options[0];\n };\n\n _proto.hasValue = function hasValue() {\n var selectValue = this.state.selectValue;\n return selectValue.length > 0;\n };\n\n _proto.hasOptions = function hasOptions() {\n return !!this.state.menuOptions.render.length;\n };\n\n _proto.countOptions = function countOptions() {\n return this.state.menuOptions.focusable.length;\n };\n\n _proto.isClearable = function isClearable() {\n var _this$props12 = this.props,\n isClearable = _this$props12.isClearable,\n isMulti = _this$props12.isMulti; // single select, by default, IS NOT clearable\n // multi select, by default, IS clearable\n\n if (isClearable === undefined) return isMulti;\n return isClearable;\n };\n\n _proto.isOptionDisabled = function isOptionDisabled(option, selectValue) {\n return typeof this.props.isOptionDisabled === 'function' ? this.props.isOptionDisabled(option, selectValue) : false;\n };\n\n _proto.isOptionSelected = function isOptionSelected(option, selectValue) {\n var _this3 = this;\n\n if (selectValue.indexOf(option) > -1) return true;\n\n if (typeof this.props.isOptionSelected === 'function') {\n return this.props.isOptionSelected(option, selectValue);\n }\n\n var candidate = this.getOptionValue(option);\n return selectValue.some(function (i) {\n return _this3.getOptionValue(i) === candidate;\n });\n };\n\n _proto.filterOption = function filterOption(option, inputValue) {\n return this.props.filterOption ? this.props.filterOption(option, inputValue) : true;\n };\n\n _proto.formatOptionLabel = function formatOptionLabel(data, context) {\n if (typeof this.props.formatOptionLabel === 'function') {\n var inputValue = this.props.inputValue;\n var selectValue = this.state.selectValue;\n return this.props.formatOptionLabel(data, {\n context: context,\n inputValue: inputValue,\n selectValue: selectValue\n });\n } else {\n return this.getOptionLabel(data);\n }\n };\n\n _proto.formatGroupLabel = function formatGroupLabel(data) {\n return this.props.formatGroupLabel(data);\n } // ==============================\n // Mouse Handlers\n // ==============================\n ; // ==============================\n // Composition Handlers\n // ==============================\n\n\n _proto.startListeningComposition = function startListeningComposition() {\n if (document && document.addEventListener) {\n document.addEventListener('compositionstart', this.onCompositionStart, false);\n document.addEventListener('compositionend', this.onCompositionEnd, false);\n }\n };\n\n _proto.stopListeningComposition = function stopListeningComposition() {\n if (document && document.removeEventListener) {\n document.removeEventListener('compositionstart', this.onCompositionStart);\n document.removeEventListener('compositionend', this.onCompositionEnd);\n }\n }; // ==============================\n // Touch Handlers\n // ==============================\n\n\n _proto.startListeningToTouch = function startListeningToTouch() {\n if (document && document.addEventListener) {\n document.addEventListener('touchstart', this.onTouchStart, false);\n document.addEventListener('touchmove', this.onTouchMove, false);\n document.addEventListener('touchend', this.onTouchEnd, false);\n }\n };\n\n _proto.stopListeningToTouch = function stopListeningToTouch() {\n if (document && document.removeEventListener) {\n document.removeEventListener('touchstart', this.onTouchStart);\n document.removeEventListener('touchmove', this.onTouchMove);\n document.removeEventListener('touchend', this.onTouchEnd);\n }\n }; // ==============================\n // Renderers\n // ==============================\n\n\n _proto.constructAriaLiveMessage = function constructAriaLiveMessage() {\n var _this$state7 = this.state,\n ariaLiveContext = _this$state7.ariaLiveContext,\n selectValue = _this$state7.selectValue,\n focusedValue = _this$state7.focusedValue,\n focusedOption = _this$state7.focusedOption;\n var _this$props13 = this.props,\n options = _this$props13.options,\n menuIsOpen = _this$props13.menuIsOpen,\n inputValue = _this$props13.inputValue,\n screenReaderStatus = _this$props13.screenReaderStatus; // An aria live message representing the currently focused value in the select.\n\n var focusedValueMsg = focusedValue ? valueFocusAriaMessage({\n focusedValue: focusedValue,\n getOptionLabel: this.getOptionLabel,\n selectValue: selectValue\n }) : ''; // An aria live message representing the currently focused option in the select.\n\n var focusedOptionMsg = focusedOption && menuIsOpen ? optionFocusAriaMessage({\n focusedOption: focusedOption,\n getOptionLabel: this.getOptionLabel,\n options: options\n }) : ''; // An aria live message representing the set of focusable results and current searchterm/inputvalue.\n\n var resultsMsg = resultsAriaMessage({\n inputValue: inputValue,\n screenReaderMessage: screenReaderStatus({\n count: this.countOptions()\n })\n });\n return focusedValueMsg + \" \" + focusedOptionMsg + \" \" + resultsMsg + \" \" + ariaLiveContext;\n };\n\n _proto.renderInput = function renderInput() {\n var _this$props14 = this.props,\n isDisabled = _this$props14.isDisabled,\n isSearchable = _this$props14.isSearchable,\n inputId = _this$props14.inputId,\n inputValue = _this$props14.inputValue,\n tabIndex = _this$props14.tabIndex;\n var Input = this.components.Input;\n var inputIsHidden = this.state.inputIsHidden;\n var id = inputId || this.getElementId('input'); // aria attributes makes the JSX \"noisy\", separated for clarity\n\n var ariaAttributes = {\n 'aria-autocomplete': 'list',\n 'aria-label': this.props['aria-label'],\n 'aria-labelledby': this.props['aria-labelledby']\n };\n\n if (!isSearchable) {\n // use a dummy input to maintain focus/blur functionality\n return React.createElement(DummyInput, _extends$4({\n id: id,\n innerRef: this.getInputRef,\n onBlur: this.onInputBlur,\n onChange: noop,\n onFocus: this.onInputFocus,\n readOnly: true,\n disabled: isDisabled,\n tabIndex: tabIndex,\n value: \"\"\n }, ariaAttributes));\n }\n\n var _this$commonProps = this.commonProps,\n cx = _this$commonProps.cx,\n theme = _this$commonProps.theme,\n selectProps = _this$commonProps.selectProps;\n return React.createElement(Input, _extends$4({\n autoCapitalize: \"none\",\n autoComplete: \"off\",\n autoCorrect: \"off\",\n cx: cx,\n getStyles: this.getStyles,\n id: id,\n innerRef: this.getInputRef,\n isDisabled: isDisabled,\n isHidden: inputIsHidden,\n onBlur: this.onInputBlur,\n onChange: this.handleInputChange,\n onFocus: this.onInputFocus,\n selectProps: selectProps,\n spellCheck: \"false\",\n tabIndex: tabIndex,\n theme: theme,\n type: \"text\",\n value: inputValue\n }, ariaAttributes));\n };\n\n _proto.renderPlaceholderOrValue = function renderPlaceholderOrValue() {\n var _this4 = this;\n\n var _this$components = this.components,\n MultiValue = _this$components.MultiValue,\n MultiValueContainer = _this$components.MultiValueContainer,\n MultiValueLabel = _this$components.MultiValueLabel,\n MultiValueRemove = _this$components.MultiValueRemove,\n SingleValue = _this$components.SingleValue,\n Placeholder = _this$components.Placeholder;\n var commonProps = this.commonProps;\n var _this$props15 = this.props,\n controlShouldRenderValue = _this$props15.controlShouldRenderValue,\n isDisabled = _this$props15.isDisabled,\n isMulti = _this$props15.isMulti,\n inputValue = _this$props15.inputValue,\n placeholder = _this$props15.placeholder;\n var _this$state8 = this.state,\n selectValue = _this$state8.selectValue,\n focusedValue = _this$state8.focusedValue,\n isFocused = _this$state8.isFocused;\n\n if (!this.hasValue() || !controlShouldRenderValue) {\n return inputValue ? null : React.createElement(Placeholder, _extends$4({}, commonProps, {\n key: \"placeholder\",\n isDisabled: isDisabled,\n isFocused: isFocused\n }), placeholder);\n }\n\n if (isMulti) {\n var selectValues = selectValue.map(function (opt, index) {\n var isOptionFocused = opt === focusedValue;\n return React.createElement(MultiValue, _extends$4({}, commonProps, {\n components: {\n Container: MultiValueContainer,\n Label: MultiValueLabel,\n Remove: MultiValueRemove\n },\n isFocused: isOptionFocused,\n isDisabled: isDisabled,\n key: _this4.getOptionValue(opt),\n index: index,\n removeProps: {\n onClick: function onClick() {\n return _this4.removeValue(opt);\n },\n onTouchEnd: function onTouchEnd() {\n return _this4.removeValue(opt);\n },\n onMouseDown: function onMouseDown(e) {\n e.preventDefault();\n e.stopPropagation();\n }\n },\n data: opt\n }), _this4.formatOptionLabel(opt, 'value'));\n });\n return selectValues;\n }\n\n if (inputValue) {\n return null;\n }\n\n var singleValue = selectValue[0];\n return React.createElement(SingleValue, _extends$4({}, commonProps, {\n data: singleValue,\n isDisabled: isDisabled\n }), this.formatOptionLabel(singleValue, 'value'));\n };\n\n _proto.renderClearIndicator = function renderClearIndicator() {\n var ClearIndicator = this.components.ClearIndicator;\n var commonProps = this.commonProps;\n var _this$props16 = this.props,\n isDisabled = _this$props16.isDisabled,\n isLoading = _this$props16.isLoading;\n var isFocused = this.state.isFocused;\n\n if (!this.isClearable() || !ClearIndicator || isDisabled || !this.hasValue() || isLoading) {\n return null;\n }\n\n var innerProps = {\n onMouseDown: this.onClearIndicatorMouseDown,\n onTouchEnd: this.onClearIndicatorTouchEnd,\n 'aria-hidden': 'true'\n };\n return React.createElement(ClearIndicator, _extends$4({}, commonProps, {\n innerProps: innerProps,\n isFocused: isFocused\n }));\n };\n\n _proto.renderLoadingIndicator = function renderLoadingIndicator() {\n var LoadingIndicator = this.components.LoadingIndicator;\n var commonProps = this.commonProps;\n var _this$props17 = this.props,\n isDisabled = _this$props17.isDisabled,\n isLoading = _this$props17.isLoading;\n var isFocused = this.state.isFocused;\n if (!LoadingIndicator || !isLoading) return null;\n var innerProps = {\n 'aria-hidden': 'true'\n };\n return React.createElement(LoadingIndicator, _extends$4({}, commonProps, {\n innerProps: innerProps,\n isDisabled: isDisabled,\n isFocused: isFocused\n }));\n };\n\n _proto.renderIndicatorSeparator = function renderIndicatorSeparator() {\n var _this$components2 = this.components,\n DropdownIndicator = _this$components2.DropdownIndicator,\n IndicatorSeparator = _this$components2.IndicatorSeparator; // separator doesn't make sense without the dropdown indicator\n\n if (!DropdownIndicator || !IndicatorSeparator) return null;\n var commonProps = this.commonProps;\n var isDisabled = this.props.isDisabled;\n var isFocused = this.state.isFocused;\n return React.createElement(IndicatorSeparator, _extends$4({}, commonProps, {\n isDisabled: isDisabled,\n isFocused: isFocused\n }));\n };\n\n _proto.renderDropdownIndicator = function renderDropdownIndicator() {\n var DropdownIndicator = this.components.DropdownIndicator;\n if (!DropdownIndicator) return null;\n var commonProps = this.commonProps;\n var isDisabled = this.props.isDisabled;\n var isFocused = this.state.isFocused;\n var innerProps = {\n onMouseDown: this.onDropdownIndicatorMouseDown,\n onTouchEnd: this.onDropdownIndicatorTouchEnd,\n 'aria-hidden': 'true'\n };\n return React.createElement(DropdownIndicator, _extends$4({}, commonProps, {\n innerProps: innerProps,\n isDisabled: isDisabled,\n isFocused: isFocused\n }));\n };\n\n _proto.renderMenu = function renderMenu() {\n var _this5 = this;\n\n var _this$components3 = this.components,\n Group = _this$components3.Group,\n GroupHeading = _this$components3.GroupHeading,\n Menu = _this$components3.Menu,\n MenuList = _this$components3.MenuList,\n MenuPortal = _this$components3.MenuPortal,\n LoadingMessage = _this$components3.LoadingMessage,\n NoOptionsMessage = _this$components3.NoOptionsMessage,\n Option = _this$components3.Option;\n var commonProps = this.commonProps;\n var _this$state9 = this.state,\n focusedOption = _this$state9.focusedOption,\n menuOptions = _this$state9.menuOptions;\n var _this$props18 = this.props,\n captureMenuScroll = _this$props18.captureMenuScroll,\n inputValue = _this$props18.inputValue,\n isLoading = _this$props18.isLoading,\n loadingMessage = _this$props18.loadingMessage,\n minMenuHeight = _this$props18.minMenuHeight,\n maxMenuHeight = _this$props18.maxMenuHeight,\n menuIsOpen = _this$props18.menuIsOpen,\n menuPlacement = _this$props18.menuPlacement,\n menuPosition = _this$props18.menuPosition,\n menuPortalTarget = _this$props18.menuPortalTarget,\n menuShouldBlockScroll = _this$props18.menuShouldBlockScroll,\n menuShouldScrollIntoView = _this$props18.menuShouldScrollIntoView,\n noOptionsMessage = _this$props18.noOptionsMessage,\n onMenuScrollToTop = _this$props18.onMenuScrollToTop,\n onMenuScrollToBottom = _this$props18.onMenuScrollToBottom;\n if (!menuIsOpen) return null; // TODO: Internal Option Type here\n\n var render = function render(props) {\n // for performance, the menu options in state aren't changed when the\n // focused option changes so we calculate additional props based on that\n var isFocused = focusedOption === props.data;\n props.innerRef = isFocused ? _this5.getFocusedOptionRef : undefined;\n return React.createElement(Option, _extends$4({}, commonProps, props, {\n isFocused: isFocused\n }), _this5.formatOptionLabel(props.data, 'menu'));\n };\n\n var menuUI;\n\n if (this.hasOptions()) {\n menuUI = menuOptions.render.map(function (item) {\n if (item.type === 'group') {\n var type = item.type,\n group = _objectWithoutPropertiesLoose$2(item, [\"type\"]);\n\n var headingId = item.key + \"-heading\";\n return React.createElement(Group, _extends$4({}, commonProps, group, {\n Heading: GroupHeading,\n headingProps: {\n id: headingId\n },\n label: _this5.formatGroupLabel(item.data)\n }), item.options.map(function (option) {\n return render(option);\n }));\n } else if (item.type === 'option') {\n return render(item);\n }\n });\n } else if (isLoading) {\n var message = loadingMessage({\n inputValue: inputValue\n });\n if (message === null) return null;\n menuUI = React.createElement(LoadingMessage, commonProps, message);\n } else {\n var _message = noOptionsMessage({\n inputValue: inputValue\n });\n\n if (_message === null) return null;\n menuUI = React.createElement(NoOptionsMessage, commonProps, _message);\n }\n\n var menuPlacementProps = {\n minMenuHeight: minMenuHeight,\n maxMenuHeight: maxMenuHeight,\n menuPlacement: menuPlacement,\n menuPosition: menuPosition,\n menuShouldScrollIntoView: menuShouldScrollIntoView\n };\n var menuElement = React.createElement(MenuPlacer, _extends$4({}, commonProps, menuPlacementProps), function (_ref8) {\n var ref = _ref8.ref,\n _ref8$placerProps = _ref8.placerProps,\n placement = _ref8$placerProps.placement,\n maxHeight = _ref8$placerProps.maxHeight;\n return React.createElement(Menu, _extends$4({}, commonProps, menuPlacementProps, {\n innerRef: ref,\n innerProps: {\n onMouseDown: _this5.onMenuMouseDown,\n onMouseMove: _this5.onMenuMouseMove\n },\n isLoading: isLoading,\n placement: placement\n }), React.createElement(ScrollCaptorSwitch, {\n isEnabled: captureMenuScroll,\n onTopArrive: onMenuScrollToTop,\n onBottomArrive: onMenuScrollToBottom\n }, React.createElement(ScrollBlock, {\n isEnabled: menuShouldBlockScroll\n }, React.createElement(MenuList, _extends$4({}, commonProps, {\n innerRef: _this5.getMenuListRef,\n isLoading: isLoading,\n maxHeight: maxHeight\n }), menuUI))));\n }); // positioning behaviour is almost identical for portalled and fixed,\n // so we use the same component. the actual portalling logic is forked\n // within the component based on `menuPosition`\n\n return menuPortalTarget || menuPosition === 'fixed' ? React.createElement(MenuPortal, _extends$4({}, commonProps, {\n appendTo: menuPortalTarget,\n controlElement: this.controlRef,\n menuPlacement: menuPlacement,\n menuPosition: menuPosition\n }), menuElement) : menuElement;\n };\n\n _proto.renderFormField = function renderFormField() {\n var _this6 = this;\n\n var _this$props19 = this.props,\n delimiter = _this$props19.delimiter,\n isDisabled = _this$props19.isDisabled,\n isMulti = _this$props19.isMulti,\n name = _this$props19.name;\n var selectValue = this.state.selectValue;\n if (!name || isDisabled) return;\n\n if (isMulti) {\n if (delimiter) {\n var value = selectValue.map(function (opt) {\n return _this6.getOptionValue(opt);\n }).join(delimiter);\n return React.createElement(\"input\", {\n name: name,\n type: \"hidden\",\n value: value\n });\n } else {\n var input = selectValue.length > 0 ? selectValue.map(function (opt, i) {\n return React.createElement(\"input\", {\n key: \"i-\" + i,\n name: name,\n type: \"hidden\",\n value: _this6.getOptionValue(opt)\n });\n }) : React.createElement(\"input\", {\n name: name,\n type: \"hidden\"\n });\n return React.createElement(\"div\", null, input);\n }\n } else {\n var _value2 = selectValue[0] ? this.getOptionValue(selectValue[0]) : '';\n\n return React.createElement(\"input\", {\n name: name,\n type: \"hidden\",\n value: _value2\n });\n }\n };\n\n _proto.renderLiveRegion = function renderLiveRegion() {\n if (!this.state.isFocused) return null;\n return React.createElement(A11yText, {\n \"aria-live\": \"polite\"\n }, React.createElement(\"p\", {\n id: \"aria-selection-event\"\n }, \"\\xA0\", this.state.ariaLiveSelection), React.createElement(\"p\", {\n id: \"aria-context\"\n }, \"\\xA0\", this.constructAriaLiveMessage()));\n };\n\n _proto.render = function render() {\n var _this$components4 = this.components,\n Control = _this$components4.Control,\n IndicatorsContainer = _this$components4.IndicatorsContainer,\n SelectContainer = _this$components4.SelectContainer,\n ValueContainer = _this$components4.ValueContainer;\n var _this$props20 = this.props,\n className = _this$props20.className,\n id = _this$props20.id,\n isDisabled = _this$props20.isDisabled,\n menuIsOpen = _this$props20.menuIsOpen;\n var isFocused = this.state.isFocused;\n var commonProps = this.commonProps = this.getCommonProps();\n return React.createElement(SelectContainer, _extends$4({}, commonProps, {\n className: className,\n innerProps: {\n id: id,\n onKeyDown: this.onKeyDown\n },\n isDisabled: isDisabled,\n isFocused: isFocused\n }), this.renderLiveRegion(), React.createElement(Control, _extends$4({}, commonProps, {\n innerRef: this.getControlRef,\n innerProps: {\n onMouseDown: this.onControlMouseDown,\n onTouchEnd: this.onControlTouchEnd\n },\n isDisabled: isDisabled,\n isFocused: isFocused,\n menuIsOpen: menuIsOpen\n }), React.createElement(ValueContainer, _extends$4({}, commonProps, {\n isDisabled: isDisabled\n }), this.renderPlaceholderOrValue(), this.renderInput()), React.createElement(IndicatorsContainer, _extends$4({}, commonProps, {\n isDisabled: isDisabled\n }), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());\n };\n\n return Select;\n}(Component);\n\nSelect.defaultProps = defaultProps;\nexport { Select as S, defaultTheme as a, createFilter as c, defaultProps as d, mergeStyles as m };","import React, { Component } from 'react';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\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\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\n return target;\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nvar defaultProps = {\n defaultInputValue: '',\n defaultMenuIsOpen: false,\n defaultValue: null\n};\n\nvar manageState = function manageState(SelectComponent) {\n var _class, _temp;\n\n return _temp = _class =\n /*#__PURE__*/\n function (_Component) {\n _inheritsLoose(StateManager, _Component);\n\n function StateManager() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _Component.call.apply(_Component, [this].concat(args)) || this;\n _this.select = void 0;\n _this.state = {\n inputValue: _this.props.inputValue !== undefined ? _this.props.inputValue : _this.props.defaultInputValue,\n menuIsOpen: _this.props.menuIsOpen !== undefined ? _this.props.menuIsOpen : _this.props.defaultMenuIsOpen,\n value: _this.props.value !== undefined ? _this.props.value : _this.props.defaultValue\n };\n\n _this.onChange = function (value, actionMeta) {\n _this.callProp('onChange', value, actionMeta);\n\n _this.setState({\n value: value\n });\n };\n\n _this.onInputChange = function (value, actionMeta) {\n // TODO: for backwards compatibility, we allow the prop to return a new\n // value, but now inputValue is a controllable prop we probably shouldn't\n var newValue = _this.callProp('onInputChange', value, actionMeta);\n\n _this.setState({\n inputValue: newValue !== undefined ? newValue : value\n });\n };\n\n _this.onMenuOpen = function () {\n _this.callProp('onMenuOpen');\n\n _this.setState({\n menuIsOpen: true\n });\n };\n\n _this.onMenuClose = function () {\n _this.callProp('onMenuClose');\n\n _this.setState({\n menuIsOpen: false\n });\n };\n\n return _this;\n }\n\n var _proto = StateManager.prototype;\n\n _proto.focus = function focus() {\n this.select.focus();\n };\n\n _proto.blur = function blur() {\n this.select.blur();\n } // FIXME: untyped flow code, return any\n ;\n\n _proto.getProp = function getProp(key) {\n return this.props[key] !== undefined ? this.props[key] : this.state[key];\n } // FIXME: untyped flow code, return any\n ;\n\n _proto.callProp = function callProp(name) {\n if (typeof this.props[name] === 'function') {\n var _this$props;\n\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n return (_this$props = this.props)[name].apply(_this$props, args);\n }\n };\n\n _proto.render = function render() {\n var _this2 = this;\n\n var _this$props2 = this.props,\n defaultInputValue = _this$props2.defaultInputValue,\n defaultMenuIsOpen = _this$props2.defaultMenuIsOpen,\n defaultValue = _this$props2.defaultValue,\n props = _objectWithoutPropertiesLoose(_this$props2, [\"defaultInputValue\", \"defaultMenuIsOpen\", \"defaultValue\"]);\n\n return React.createElement(SelectComponent, _extends({}, props, {\n ref: function ref(_ref) {\n _this2.select = _ref;\n },\n inputValue: this.getProp('inputValue'),\n menuIsOpen: this.getProp('menuIsOpen'),\n onChange: this.onChange,\n onInputChange: this.onInputChange,\n onMenuClose: this.onMenuClose,\n onMenuOpen: this.onMenuOpen,\n value: this.getProp('value')\n }));\n };\n\n return StateManager;\n }(Component), _class.defaultProps = defaultProps, _temp;\n};\n\nexport { manageState as m };","import React, { Component } from 'react';\nimport 'memoize-one';\nimport '@emotion/core';\nimport 'react-dom';\nimport 'prop-types';\nimport { e as cleanValue } from '../../dist/utils-06b0d5a4.browser.esm.js';\nimport '../../dist/index-4322c0ed.browser.esm.js';\nimport { S as Select } from '../../dist/Select-9fdb8cd0.browser.esm.js';\nimport '@emotion/css';\nimport 'react-input-autosize';\nimport { m as manageState } from '../../dist/stateManager-04f734a2.browser.esm.js';\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nvar compareOption = function compareOption(inputValue, option) {\n if (inputValue === void 0) {\n inputValue = '';\n }\n\n var candidate = String(inputValue).toLowerCase();\n var optionValue = String(option.value).toLowerCase();\n var optionLabel = String(option.label).toLowerCase();\n return optionValue === candidate || optionLabel === candidate;\n};\n\nvar builtins = {\n formatCreateLabel: function formatCreateLabel(inputValue) {\n return \"Create \\\"\" + inputValue + \"\\\"\";\n },\n isValidNewOption: function isValidNewOption(inputValue, selectValue, selectOptions) {\n return !(!inputValue || selectValue.some(function (option) {\n return compareOption(inputValue, option);\n }) || selectOptions.some(function (option) {\n return compareOption(inputValue, option);\n }));\n },\n getNewOptionData: function getNewOptionData(inputValue, optionLabel) {\n return {\n label: optionLabel,\n value: inputValue,\n __isNew__: true\n };\n }\n};\n\nvar defaultProps = _extends({\n allowCreateWhileLoading: false,\n createOptionPosition: 'last'\n}, builtins);\n\nvar makeCreatableSelect = function makeCreatableSelect(SelectComponent) {\n var _class, _temp;\n\n return _temp = _class =\n /*#__PURE__*/\n function (_Component) {\n _inheritsLoose(Creatable, _Component);\n\n function Creatable(props) {\n var _this;\n\n _this = _Component.call(this, props) || this;\n _this.select = void 0;\n\n _this.onChange = function (newValue, actionMeta) {\n var _this$props = _this.props,\n getNewOptionData = _this$props.getNewOptionData,\n inputValue = _this$props.inputValue,\n isMulti = _this$props.isMulti,\n onChange = _this$props.onChange,\n onCreateOption = _this$props.onCreateOption,\n value = _this$props.value,\n name = _this$props.name;\n\n if (actionMeta.action !== 'select-option') {\n return onChange(newValue, actionMeta);\n }\n\n var newOption = _this.state.newOption;\n var valueArray = Array.isArray(newValue) ? newValue : [newValue];\n\n if (valueArray[valueArray.length - 1] === newOption) {\n if (onCreateOption) onCreateOption(inputValue);else {\n var newOptionData = getNewOptionData(inputValue, inputValue);\n var newActionMeta = {\n action: 'create-option',\n name: name\n };\n\n if (isMulti) {\n onChange([].concat(cleanValue(value), [newOptionData]), newActionMeta);\n } else {\n onChange(newOptionData, newActionMeta);\n }\n }\n return;\n }\n\n onChange(newValue, actionMeta);\n };\n\n var options = props.options || [];\n _this.state = {\n newOption: undefined,\n options: options\n };\n return _this;\n }\n\n var _proto = Creatable.prototype;\n\n _proto.UNSAFE_componentWillReceiveProps = function UNSAFE_componentWillReceiveProps(nextProps) {\n var allowCreateWhileLoading = nextProps.allowCreateWhileLoading,\n createOptionPosition = nextProps.createOptionPosition,\n formatCreateLabel = nextProps.formatCreateLabel,\n getNewOptionData = nextProps.getNewOptionData,\n inputValue = nextProps.inputValue,\n isLoading = nextProps.isLoading,\n isValidNewOption = nextProps.isValidNewOption,\n value = nextProps.value;\n var options = nextProps.options || [];\n var newOption = this.state.newOption;\n\n if (isValidNewOption(inputValue, cleanValue(value), options)) {\n newOption = getNewOptionData(inputValue, formatCreateLabel(inputValue));\n } else {\n newOption = undefined;\n }\n\n this.setState({\n newOption: newOption,\n options: (allowCreateWhileLoading || !isLoading) && newOption ? createOptionPosition === 'first' ? [newOption].concat(options) : [].concat(options, [newOption]) : options\n });\n };\n\n _proto.focus = function focus() {\n this.select.focus();\n };\n\n _proto.blur = function blur() {\n this.select.blur();\n };\n\n _proto.render = function render() {\n var _this2 = this;\n\n var options = this.state.options;\n return React.createElement(SelectComponent, _extends({}, this.props, {\n ref: function ref(_ref) {\n _this2.select = _ref;\n },\n options: options,\n onChange: this.onChange\n }));\n };\n\n return Creatable;\n }(Component), _class.defaultProps = defaultProps, _temp;\n}; // TODO: do this in package entrypoint\n\n\nvar SelectCreatable = makeCreatableSelect(Select);\nvar Creatable = manageState(SelectCreatable);\nexport default Creatable;\nexport { defaultProps, makeCreatableSelect };","import useUpdatedRef from './useUpdatedRef';\nimport { useEffect } from 'react';\n/**\n * Attach a callback that fires when a component unmounts\n *\n * @param fn Handler to run when the component unmounts\n * @category effects\n */\n\nexport default function useWillUnmount(fn) {\n var onUnmount = useUpdatedRef(fn);\n useEffect(function () {\n return function () {\n return onUnmount.current();\n };\n }, []);\n}","import { useRef } from 'react';\n/**\n * Returns a ref that is immediately updated with the new value\n *\n * @param value The Ref value\n * @category refs\n */\n\nexport default function useUpdatedRef(value) {\n var valueRef = useRef(value);\n valueRef.current = value;\n return valueRef;\n}","import { useCallback } from 'react';\nimport useMounted from './useMounted';\n\nfunction useSafeState(state) {\n var isMounted = useMounted();\n return [state[0], useCallback(function (nextState) {\n if (!isMounted()) return;\n return state[1](nextState);\n }, [isMounted, state[1]])];\n}\n\nexport default useSafeState;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport useSafeState from '@restart/hooks/useSafeState';\nimport { createPopper } from './popper';\n\nvar initialPopperStyles = function initialPopperStyles(position) {\n return {\n position: position,\n top: '0',\n left: '0',\n opacity: '0',\n pointerEvents: 'none'\n };\n};\n\nvar disabledApplyStylesModifier = {\n name: 'applyStyles',\n enabled: false\n}; // until docjs supports type exports...\n\nvar ariaDescribedByModifier = {\n name: 'ariaDescribedBy',\n enabled: true,\n phase: 'afterWrite',\n effect: function effect(_ref) {\n var state = _ref.state;\n return function () {\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper;\n\n if ('removeAttribute' in reference) {\n var ids = (reference.getAttribute('aria-describedby') || '').split(',').filter(function (id) {\n return id.trim() !== popper.id;\n });\n if (!ids.length) reference.removeAttribute('aria-describedby');else reference.setAttribute('aria-describedby', ids.join(','));\n }\n };\n },\n fn: function fn(_ref2) {\n var _popper$getAttribute;\n\n var state = _ref2.state;\n var _state$elements2 = state.elements,\n popper = _state$elements2.popper,\n reference = _state$elements2.reference;\n var role = (_popper$getAttribute = popper.getAttribute('role')) == null ? void 0 : _popper$getAttribute.toLowerCase();\n\n if (popper.id && role === 'tooltip' && 'setAttribute' in reference) {\n var ids = reference.getAttribute('aria-describedby');\n reference.setAttribute('aria-describedby', ids ? ids + \",\" + popper.id : popper.id);\n }\n }\n};\nvar EMPTY_MODIFIERS = [];\n/**\n * Position an element relative some reference element using Popper.js\n *\n * @param referenceElement\n * @param popperElement\n * @param {object} options\n * @param {object=} options.modifiers Popper.js modifiers\n * @param {boolean=} options.enabled toggle the popper functionality on/off\n * @param {string=} options.placement The popper element placement relative to the reference element\n * @param {string=} options.strategy the positioning strategy\n * @param {boolean=} options.eventsEnabled have Popper listen on window resize events to reposition the element\n * @param {function=} options.onCreate called when the popper is created\n * @param {function=} options.onUpdate called when the popper is updated\n *\n * @returns {UsePopperState} The popper state\n */\n\nfunction usePopper(referenceElement, popperElement, _temp) {\n var _ref3 = _temp === void 0 ? {} : _temp,\n _ref3$enabled = _ref3.enabled,\n enabled = _ref3$enabled === void 0 ? true : _ref3$enabled,\n _ref3$placement = _ref3.placement,\n placement = _ref3$placement === void 0 ? 'bottom' : _ref3$placement,\n _ref3$strategy = _ref3.strategy,\n strategy = _ref3$strategy === void 0 ? 'absolute' : _ref3$strategy,\n _ref3$modifiers = _ref3.modifiers,\n modifiers = _ref3$modifiers === void 0 ? EMPTY_MODIFIERS : _ref3$modifiers,\n config = _objectWithoutPropertiesLoose(_ref3, [\"enabled\", \"placement\", \"strategy\", \"modifiers\"]);\n\n var popperInstanceRef = useRef();\n var update = useCallback(function () {\n var _popperInstanceRef$cu;\n\n (_popperInstanceRef$cu = popperInstanceRef.current) == null ? void 0 : _popperInstanceRef$cu.update();\n }, []);\n var forceUpdate = useCallback(function () {\n var _popperInstanceRef$cu2;\n\n (_popperInstanceRef$cu2 = popperInstanceRef.current) == null ? void 0 : _popperInstanceRef$cu2.forceUpdate();\n }, []);\n\n var _useSafeState = useSafeState(useState({\n placement: placement,\n update: update,\n forceUpdate: forceUpdate,\n attributes: {},\n styles: {\n popper: initialPopperStyles(strategy),\n arrow: {}\n }\n })),\n popperState = _useSafeState[0],\n setState = _useSafeState[1];\n\n var updateModifier = useMemo(function () {\n return {\n name: 'updateStateModifier',\n enabled: true,\n phase: 'write',\n requires: ['computeStyles'],\n fn: function fn(_ref4) {\n var state = _ref4.state;\n var styles = {};\n var attributes = {};\n Object.keys(state.elements).forEach(function (element) {\n styles[element] = state.styles[element];\n attributes[element] = state.attributes[element];\n });\n setState({\n state: state,\n styles: styles,\n attributes: attributes,\n update: update,\n forceUpdate: forceUpdate,\n placement: state.placement\n });\n }\n };\n }, [update, forceUpdate, setState]);\n useEffect(function () {\n if (!popperInstanceRef.current || !enabled) return;\n popperInstanceRef.current.setOptions({\n placement: placement,\n strategy: strategy,\n modifiers: [].concat(modifiers, [updateModifier, disabledApplyStylesModifier])\n }); // intentionally NOT re-running on new modifiers\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [strategy, placement, updateModifier, enabled]);\n useEffect(function () {\n if (!enabled || referenceElement == null || popperElement == null) {\n return undefined;\n }\n\n popperInstanceRef.current = createPopper(referenceElement, popperElement, _extends({}, config, {\n placement: placement,\n strategy: strategy,\n modifiers: [].concat(modifiers, [ariaDescribedByModifier, updateModifier])\n }));\n return function () {\n if (popperInstanceRef.current != null) {\n popperInstanceRef.current.destroy();\n popperInstanceRef.current = undefined;\n setState(function (s) {\n return _extends({}, s, {\n attributes: {},\n styles: {\n popper: initialPopperStyles(strategy)\n }\n });\n });\n }\n }; // This is only run once to _create_ the popper\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [enabled, referenceElement, popperElement]);\n return popperState;\n}\n\nexport default usePopper;","import ownerDocument from 'dom-helpers/ownerDocument';\nimport safeFindDOMNode from './safeFindDOMNode';\nexport default (function (componentOrElement) {\n return ownerDocument(safeFindDOMNode(componentOrElement));\n});","import contains from 'dom-helpers/contains';\nimport listen from 'dom-helpers/listen';\nimport { useCallback, useEffect, useRef } from 'react';\nimport useEventCallback from '@restart/hooks/useEventCallback';\nimport warning from 'warning';\nimport ownerDocument from './ownerDocument';\nvar escapeKeyCode = 27;\n\nvar noop = function noop() {};\n\nfunction isLeftClickEvent(event) {\n return event.button === 0;\n}\n\nfunction isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n}\n\nvar getRefTarget = function getRefTarget(ref) {\n return ref && ('current' in ref ? ref.current : ref);\n};\n/**\n * The `useRootClose` hook registers your callback on the document\n * when rendered. Powers the `` component. This is used achieve modal\n * style behavior where your callback is triggered when the user tries to\n * interact with the rest of the document or hits the `esc` key.\n *\n * @param {Ref| HTMLElement} ref The element boundary\n * @param {function} onRootClose\n * @param {object=} options\n * @param {boolean=} options.disabled\n * @param {string=} options.clickTrigger The DOM event name (click, mousedown, etc) to attach listeners on\n */\n\n\nfunction useRootClose(ref, onRootClose, _temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n disabled = _ref.disabled,\n _ref$clickTrigger = _ref.clickTrigger,\n clickTrigger = _ref$clickTrigger === void 0 ? 'click' : _ref$clickTrigger;\n\n var preventMouseRootCloseRef = useRef(false);\n var onClose = onRootClose || noop;\n var handleMouseCapture = useCallback(function (e) {\n var currentTarget = getRefTarget(ref);\n warning(!!currentTarget, 'RootClose captured a close event but does not have a ref to compare it to. ' + 'useRootClose(), should be passed a ref that resolves to a DOM node');\n preventMouseRootCloseRef.current = !currentTarget || isModifiedEvent(e) || !isLeftClickEvent(e) || !!contains(currentTarget, e.target);\n }, [ref]);\n var handleMouse = useEventCallback(function (e) {\n if (!preventMouseRootCloseRef.current) {\n onClose(e);\n }\n });\n var handleKeyUp = useEventCallback(function (e) {\n if (e.keyCode === escapeKeyCode) {\n onClose(e);\n }\n });\n useEffect(function () {\n if (disabled || ref == null) return undefined;\n var doc = ownerDocument(getRefTarget(ref)); // Use capture for this listener so it fires before React's listener, to\n // avoid false positives in the contains() check below if the target DOM\n // element is removed in the React mouse callback.\n\n var removeMouseCaptureListener = listen(doc, clickTrigger, handleMouseCapture, true);\n var removeMouseListener = listen(doc, clickTrigger, handleMouse);\n var removeKeyupListener = listen(doc, 'keyup', handleKeyUp);\n var mobileSafariHackListeners = [];\n\n if ('ontouchstart' in doc.documentElement) {\n mobileSafariHackListeners = [].slice.call(doc.body.children).map(function (el) {\n return listen(el, 'mousemove', noop);\n });\n }\n\n return function () {\n removeMouseCaptureListener();\n removeMouseListener();\n removeKeyupListener();\n mobileSafariHackListeners.forEach(function (remove) {\n return remove();\n });\n };\n }, [ref, disabled, clickTrigger, handleMouseCapture, handleMouse, handleKeyUp]);\n}\n\nexport default useRootClose;","import { __assign, __values } from \"tslib\";\nimport { isInstanceOf, isString } from './is';\nimport { logger } from './logger';\nimport { getGlobalObject } from './misc';\nimport { fill } from './object';\nimport { getFunctionName } from './stacktrace';\nimport { supportsHistory, supportsNativeFetch } from './supports';\nvar global = getGlobalObject();\n/**\n * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.\n * - Console API\n * - Fetch API\n * - XHR API\n * - History API\n * - DOM API (click/typing)\n * - Error API\n * - UnhandledRejection API\n */\n\nvar handlers = {};\nvar instrumented = {};\n/** Instruments given API */\n\nfunction instrument(type) {\n if (instrumented[type]) {\n return;\n }\n\n instrumented[type] = true;\n\n switch (type) {\n case 'console':\n instrumentConsole();\n break;\n\n case 'dom':\n instrumentDOM();\n break;\n\n case 'xhr':\n instrumentXHR();\n break;\n\n case 'fetch':\n instrumentFetch();\n break;\n\n case 'history':\n instrumentHistory();\n break;\n\n case 'error':\n instrumentError();\n break;\n\n case 'unhandledrejection':\n instrumentUnhandledRejection();\n break;\n\n default:\n logger.warn('unknown instrumentation type:', type);\n }\n}\n/**\n * Add handler that will be called when given type of instrumentation triggers.\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\n\n\nexport function addInstrumentationHandler(handler) {\n if (!handler || typeof handler.type !== 'string' || typeof handler.callback !== 'function') {\n return;\n }\n\n handlers[handler.type] = handlers[handler.type] || [];\n handlers[handler.type].push(handler.callback);\n instrument(handler.type);\n}\n/** JSDoc */\n\nfunction triggerHandlers(type, data) {\n var e_1, _a;\n\n if (!type || !handlers[type]) {\n return;\n }\n\n try {\n for (var _b = __values(handlers[type] || []), _c = _b.next(); !_c.done; _c = _b.next()) {\n var handler = _c.value;\n\n try {\n handler(data);\n } catch (e) {\n logger.error(\"Error while triggering instrumentation handler.\\nType: \" + type + \"\\nName: \" + getFunctionName(handler) + \"\\nError: \" + e);\n }\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n}\n/** JSDoc */\n\n\nfunction instrumentConsole() {\n if (!('console' in global)) {\n return;\n }\n\n ['debug', 'info', 'warn', 'error', 'log', 'assert'].forEach(function (level) {\n if (!(level in global.console)) {\n return;\n }\n\n fill(global.console, level, function (originalConsoleLevel) {\n return function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n triggerHandlers('console', {\n args: args,\n level: level\n }); // this fails for some browsers. :(\n\n if (originalConsoleLevel) {\n Function.prototype.apply.call(originalConsoleLevel, global.console, args);\n }\n };\n });\n });\n}\n/** JSDoc */\n\n\nfunction instrumentFetch() {\n if (!supportsNativeFetch()) {\n return;\n }\n\n fill(global, 'fetch', function (originalFetch) {\n return function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n var handlerData = {\n args: args,\n fetchData: {\n method: getFetchMethod(args),\n url: getFetchUrl(args)\n },\n startTimestamp: Date.now()\n };\n triggerHandlers('fetch', __assign({}, handlerData)); // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n\n return originalFetch.apply(global, args).then(function (response) {\n triggerHandlers('fetch', __assign(__assign({}, handlerData), {\n endTimestamp: Date.now(),\n response: response\n }));\n return response;\n }, function (error) {\n triggerHandlers('fetch', __assign(__assign({}, handlerData), {\n endTimestamp: Date.now(),\n error: error\n })); // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the sentry.javascript SDK caught an error invoking your application code.\n // This is expected behavior and NOT indicative of a bug with sentry.javascript.\n\n throw error;\n });\n };\n });\n}\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n\n/** Extract `method` from fetch call arguments */\n\n\nfunction getFetchMethod(fetchArgs) {\n if (fetchArgs === void 0) {\n fetchArgs = [];\n }\n\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) {\n return String(fetchArgs[0].method).toUpperCase();\n }\n\n if (fetchArgs[1] && fetchArgs[1].method) {\n return String(fetchArgs[1].method).toUpperCase();\n }\n\n return 'GET';\n}\n/** Extract `url` from fetch call arguments */\n\n\nfunction getFetchUrl(fetchArgs) {\n if (fetchArgs === void 0) {\n fetchArgs = [];\n }\n\n if (typeof fetchArgs[0] === 'string') {\n return fetchArgs[0];\n }\n\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request)) {\n return fetchArgs[0].url;\n }\n\n return String(fetchArgs[0]);\n}\n/* eslint-enable @typescript-eslint/no-unsafe-member-access */\n\n/** JSDoc */\n\n\nfunction instrumentXHR() {\n if (!('XMLHttpRequest' in global)) {\n return;\n } // Poor man's implementation of ES6 `Map`, tracking and keeping in sync key and value separately.\n\n\n var requestKeys = [];\n var requestValues = [];\n var xhrproto = XMLHttpRequest.prototype;\n fill(xhrproto, 'open', function (originalOpen) {\n return function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n } // eslint-disable-next-line @typescript-eslint/no-this-alias\n\n\n var xhr = this;\n var url = args[1];\n xhr.__sentry_xhr__ = {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n method: isString(args[0]) ? args[0].toUpperCase() : args[0],\n url: args[1]\n }; // if Sentry key appears in URL, don't capture it as a request\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n\n if (isString(url) && xhr.__sentry_xhr__.method === 'POST' && url.match(/sentry_key/)) {\n xhr.__sentry_own_request__ = true;\n }\n\n var onreadystatechangeHandler = function onreadystatechangeHandler() {\n if (xhr.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n if (xhr.__sentry_xhr__) {\n xhr.__sentry_xhr__.status_code = xhr.status;\n }\n } catch (e) {\n /* do nothing */\n }\n\n try {\n var requestPos = requestKeys.indexOf(xhr);\n\n if (requestPos !== -1) {\n // Make sure to pop both key and value to keep it in sync.\n requestKeys.splice(requestPos);\n var args_1 = requestValues.splice(requestPos)[0];\n\n if (xhr.__sentry_xhr__ && args_1[0] !== undefined) {\n xhr.__sentry_xhr__.body = args_1[0];\n }\n }\n } catch (e) {\n /* do nothing */\n }\n\n triggerHandlers('xhr', {\n args: args,\n endTimestamp: Date.now(),\n startTimestamp: Date.now(),\n xhr: xhr\n });\n }\n };\n\n if ('onreadystatechange' in xhr && typeof xhr.onreadystatechange === 'function') {\n fill(xhr, 'onreadystatechange', function (original) {\n return function () {\n var readyStateArgs = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n readyStateArgs[_i] = arguments[_i];\n }\n\n onreadystatechangeHandler();\n return original.apply(xhr, readyStateArgs);\n };\n });\n } else {\n xhr.addEventListener('readystatechange', onreadystatechangeHandler);\n }\n\n return originalOpen.apply(xhr, args);\n };\n });\n fill(xhrproto, 'send', function (originalSend) {\n return function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n requestKeys.push(this);\n requestValues.push(args);\n triggerHandlers('xhr', {\n args: args,\n startTimestamp: Date.now(),\n xhr: this\n });\n return originalSend.apply(this, args);\n };\n });\n}\n\nvar lastHref;\n/** JSDoc */\n\nfunction instrumentHistory() {\n if (!supportsHistory()) {\n return;\n }\n\n var oldOnPopState = global.onpopstate;\n\n global.onpopstate = function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n var to = global.location.href; // keep track of the current URL state, as we always receive only the updated state\n\n var from = lastHref;\n lastHref = to;\n triggerHandlers('history', {\n from: from,\n to: to\n });\n\n if (oldOnPopState) {\n return oldOnPopState.apply(this, args);\n }\n };\n /** @hidden */\n\n\n function historyReplacementFunction(originalHistoryFunction) {\n return function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n var url = args.length > 2 ? args[2] : undefined;\n\n if (url) {\n // coerce to string (this is what pushState does)\n var from = lastHref;\n var to = String(url); // keep track of the current URL state, as we always receive only the updated state\n\n lastHref = to;\n triggerHandlers('history', {\n from: from,\n to: to\n });\n }\n\n return originalHistoryFunction.apply(this, args);\n };\n }\n\n fill(global.history, 'pushState', historyReplacementFunction);\n fill(global.history, 'replaceState', historyReplacementFunction);\n}\n/** JSDoc */\n\n\nfunction instrumentDOM() {\n if (!('document' in global)) {\n return;\n } // Capture breadcrumbs from any click that is unhandled / bubbled up all the way\n // to the document. Do this before we instrument addEventListener.\n\n\n global.document.addEventListener('click', domEventHandler('click', triggerHandlers.bind(null, 'dom')), false);\n global.document.addEventListener('keypress', keypressEventHandler(triggerHandlers.bind(null, 'dom')), false); // After hooking into document bubbled up click and keypresses events, we also hook into user handled click & keypresses.\n\n ['EventTarget', 'Node'].forEach(function (target) {\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n var proto = global[target] && global[target].prototype; // eslint-disable-next-line no-prototype-builtins\n\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n\n\n fill(proto, 'addEventListener', function (original) {\n return function (eventName, fn, options) {\n if (fn && fn.handleEvent) {\n if (eventName === 'click') {\n fill(fn, 'handleEvent', function (innerOriginal) {\n return function (event) {\n domEventHandler('click', triggerHandlers.bind(null, 'dom'))(event);\n return innerOriginal.call(this, event);\n };\n });\n }\n\n if (eventName === 'keypress') {\n fill(fn, 'handleEvent', function (innerOriginal) {\n return function (event) {\n keypressEventHandler(triggerHandlers.bind(null, 'dom'))(event);\n return innerOriginal.call(this, event);\n };\n });\n }\n } else {\n if (eventName === 'click') {\n domEventHandler('click', triggerHandlers.bind(null, 'dom'), true)(this);\n }\n\n if (eventName === 'keypress') {\n keypressEventHandler(triggerHandlers.bind(null, 'dom'))(this);\n }\n }\n\n return original.call(this, eventName, fn, options);\n };\n });\n fill(proto, 'removeEventListener', function (original) {\n return function (eventName, fn, options) {\n try {\n original.call(this, eventName, fn.__sentry_wrapped__, options);\n } catch (e) {// ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n\n return original.call(this, eventName, fn, options);\n };\n });\n });\n}\n\nvar debounceDuration = 1000;\nvar debounceTimer = 0;\nvar keypressTimeout;\nvar lastCapturedEvent;\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param name the event name (e.g. \"click\")\n * @param handler function that will be triggered\n * @param debounce decides whether it should wait till another event loop\n * @returns wrapped breadcrumb events handler\n * @hidden\n */\n\nfunction domEventHandler(name, handler, debounce) {\n if (debounce === void 0) {\n debounce = false;\n }\n\n return function (event) {\n // reset keypress timeout; e.g. triggering a 'click' after\n // a 'keypress' will reset the keypress debounce so that a new\n // set of keypresses can be recorded\n keypressTimeout = undefined; // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors). Ignore if we've\n // already captured the event.\n\n if (!event || lastCapturedEvent === event) {\n return;\n }\n\n lastCapturedEvent = event;\n\n if (debounceTimer) {\n clearTimeout(debounceTimer);\n }\n\n if (debounce) {\n debounceTimer = setTimeout(function () {\n handler({\n event: event,\n name: name\n });\n });\n } else {\n handler({\n event: event,\n name: name\n });\n }\n };\n}\n/**\n * Wraps addEventListener to capture keypress UI events\n * @param handler function that will be triggered\n * @returns wrapped keypress events handler\n * @hidden\n */\n\n\nfunction keypressEventHandler(handler) {\n // TODO: if somehow user switches keypress target before\n // debounce timeout is triggered, we will only capture\n // a single breadcrumb from the FIRST target (acceptable?)\n return function (event) {\n var target;\n\n try {\n target = event.target;\n } catch (e) {\n // just accessing event properties can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/raven-js/issues/838\n return;\n }\n\n var tagName = target && target.tagName; // only consider keypress events on actual input elements\n // this will disregard keypresses targeting body (e.g. tabbing\n // through elements, hotkeys, etc)\n\n if (!tagName || tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !target.isContentEditable) {\n return;\n } // record first keypress in a series, but ignore subsequent\n // keypresses until debounce clears\n\n\n if (!keypressTimeout) {\n domEventHandler('input', handler)(event);\n }\n\n clearTimeout(keypressTimeout);\n keypressTimeout = setTimeout(function () {\n keypressTimeout = undefined;\n }, debounceDuration);\n };\n}\n\nvar _oldOnErrorHandler = null;\n/** JSDoc */\n\nfunction instrumentError() {\n _oldOnErrorHandler = global.onerror;\n\n global.onerror = function (msg, url, line, column, error) {\n triggerHandlers('error', {\n column: column,\n error: error,\n line: line,\n msg: msg,\n url: url\n });\n\n if (_oldOnErrorHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnErrorHandler.apply(this, arguments);\n }\n\n return false;\n };\n}\n\nvar _oldOnUnhandledRejectionHandler = null;\n/** JSDoc */\n\nfunction instrumentUnhandledRejection() {\n _oldOnUnhandledRejectionHandler = global.onunhandledrejection;\n\n global.onunhandledrejection = function (e) {\n triggerHandlers('unhandledrejection', e);\n\n if (_oldOnUnhandledRejectionHandler) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n\n return true;\n };\n}","/** @license React v16.13.1\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\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'use strict';\n\nvar l = require(\"object-assign\"),\n n = \"function\" === typeof Symbol && Symbol.for,\n p = n ? Symbol.for(\"react.element\") : 60103,\n q = n ? Symbol.for(\"react.portal\") : 60106,\n r = n ? Symbol.for(\"react.fragment\") : 60107,\n t = n ? Symbol.for(\"react.strict_mode\") : 60108,\n u = n ? Symbol.for(\"react.profiler\") : 60114,\n v = n ? Symbol.for(\"react.provider\") : 60109,\n w = n ? Symbol.for(\"react.context\") : 60110,\n x = n ? Symbol.for(\"react.forward_ref\") : 60112,\n y = n ? Symbol.for(\"react.suspense\") : 60113,\n z = n ? Symbol.for(\"react.memo\") : 60115,\n A = n ? Symbol.for(\"react.lazy\") : 60116,\n B = \"function\" === typeof Symbol && Symbol.iterator;\n\nfunction C(a) {\n for (var b = \"https://reactjs.org/docs/error-decoder.html?invariant=\" + a, c = 1; c < arguments.length; c++) {\n b += \"&args[]=\" + encodeURIComponent(arguments[c]);\n }\n\n return \"Minified React error #\" + a + \"; visit \" + b + \" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\";\n}\n\nvar D = {\n isMounted: function isMounted() {\n return !1;\n },\n enqueueForceUpdate: function enqueueForceUpdate() {},\n enqueueReplaceState: function enqueueReplaceState() {},\n enqueueSetState: function enqueueSetState() {}\n},\n E = {};\n\nfunction F(a, b, c) {\n this.props = a;\n this.context = b;\n this.refs = E;\n this.updater = c || D;\n}\n\nF.prototype.isReactComponent = {};\n\nF.prototype.setState = function (a, b) {\n if (\"object\" !== typeof a && \"function\" !== typeof a && null != a) throw Error(C(85));\n this.updater.enqueueSetState(this, a, b, \"setState\");\n};\n\nF.prototype.forceUpdate = function (a) {\n this.updater.enqueueForceUpdate(this, a, \"forceUpdate\");\n};\n\nfunction G() {}\n\nG.prototype = F.prototype;\n\nfunction H(a, b, c) {\n this.props = a;\n this.context = b;\n this.refs = E;\n this.updater = c || D;\n}\n\nvar I = H.prototype = new G();\nI.constructor = H;\nl(I, F.prototype);\nI.isPureReactComponent = !0;\nvar J = {\n current: null\n},\n K = Object.prototype.hasOwnProperty,\n L = {\n key: !0,\n ref: !0,\n __self: !0,\n __source: !0\n};\n\nfunction M(a, b, c) {\n var e,\n d = {},\n g = null,\n k = null;\n if (null != b) for (e in void 0 !== b.ref && (k = b.ref), void 0 !== b.key && (g = \"\" + b.key), b) {\n K.call(b, e) && !L.hasOwnProperty(e) && (d[e] = b[e]);\n }\n var f = arguments.length - 2;\n if (1 === f) d.children = c;else if (1 < f) {\n for (var h = Array(f), m = 0; m < f; m++) {\n h[m] = arguments[m + 2];\n }\n\n d.children = h;\n }\n if (a && a.defaultProps) for (e in f = a.defaultProps, f) {\n void 0 === d[e] && (d[e] = f[e]);\n }\n return {\n $$typeof: p,\n type: a,\n key: g,\n ref: k,\n props: d,\n _owner: J.current\n };\n}\n\nfunction N(a, b) {\n return {\n $$typeof: p,\n type: a.type,\n key: b,\n ref: a.ref,\n props: a.props,\n _owner: a._owner\n };\n}\n\nfunction O(a) {\n return \"object\" === typeof a && null !== a && a.$$typeof === p;\n}\n\nfunction escape(a) {\n var b = {\n \"=\": \"=0\",\n \":\": \"=2\"\n };\n return \"$\" + (\"\" + a).replace(/[=:]/g, function (a) {\n return b[a];\n });\n}\n\nvar P = /\\/+/g,\n Q = [];\n\nfunction R(a, b, c, e) {\n if (Q.length) {\n var d = Q.pop();\n d.result = a;\n d.keyPrefix = b;\n d.func = c;\n d.context = e;\n d.count = 0;\n return d;\n }\n\n return {\n result: a,\n keyPrefix: b,\n func: c,\n context: e,\n count: 0\n };\n}\n\nfunction S(a) {\n a.result = null;\n a.keyPrefix = null;\n a.func = null;\n a.context = null;\n a.count = 0;\n 10 > Q.length && Q.push(a);\n}\n\nfunction T(a, b, c, e) {\n var d = typeof a;\n if (\"undefined\" === d || \"boolean\" === d) a = null;\n var g = !1;\n if (null === a) g = !0;else switch (d) {\n case \"string\":\n case \"number\":\n g = !0;\n break;\n\n case \"object\":\n switch (a.$$typeof) {\n case p:\n case q:\n g = !0;\n }\n\n }\n if (g) return c(e, a, \"\" === b ? \".\" + U(a, 0) : b), 1;\n g = 0;\n b = \"\" === b ? \".\" : b + \":\";\n if (Array.isArray(a)) for (var k = 0; k < a.length; k++) {\n d = a[k];\n var f = b + U(d, k);\n g += T(d, f, c, e);\n } else if (null === a || \"object\" !== typeof a ? f = null : (f = B && a[B] || a[\"@@iterator\"], f = \"function\" === typeof f ? f : null), \"function\" === typeof f) for (a = f.call(a), k = 0; !(d = a.next()).done;) {\n d = d.value, f = b + U(d, k++), g += T(d, f, c, e);\n } else if (\"object\" === d) throw c = \"\" + a, Error(C(31, \"[object Object]\" === c ? \"object with keys {\" + Object.keys(a).join(\", \") + \"}\" : c, \"\"));\n return g;\n}\n\nfunction V(a, b, c) {\n return null == a ? 0 : T(a, \"\", b, c);\n}\n\nfunction U(a, b) {\n return \"object\" === typeof a && null !== a && null != a.key ? escape(a.key) : b.toString(36);\n}\n\nfunction W(a, b) {\n a.func.call(a.context, b, a.count++);\n}\n\nfunction aa(a, b, c) {\n var e = a.result,\n d = a.keyPrefix;\n a = a.func.call(a.context, b, a.count++);\n Array.isArray(a) ? X(a, e, c, function (a) {\n return a;\n }) : null != a && (O(a) && (a = N(a, d + (!a.key || b && b.key === a.key ? \"\" : (\"\" + a.key).replace(P, \"$&/\") + \"/\") + c)), e.push(a));\n}\n\nfunction X(a, b, c, e, d) {\n var g = \"\";\n null != c && (g = (\"\" + c).replace(P, \"$&/\") + \"/\");\n b = R(b, g, e, d);\n V(a, aa, b);\n S(b);\n}\n\nvar Y = {\n current: null\n};\n\nfunction Z() {\n var a = Y.current;\n if (null === a) throw Error(C(321));\n return a;\n}\n\nvar ba = {\n ReactCurrentDispatcher: Y,\n ReactCurrentBatchConfig: {\n suspense: null\n },\n ReactCurrentOwner: J,\n IsSomeRendererActing: {\n current: !1\n },\n assign: l\n};\nexports.Children = {\n map: function map(a, b, c) {\n if (null == a) return a;\n var e = [];\n X(a, e, null, b, c);\n return e;\n },\n forEach: function forEach(a, b, c) {\n if (null == a) return a;\n b = R(null, null, b, c);\n V(a, W, b);\n S(b);\n },\n count: function count(a) {\n return V(a, function () {\n return null;\n }, null);\n },\n toArray: function toArray(a) {\n var b = [];\n X(a, b, null, function (a) {\n return a;\n });\n return b;\n },\n only: function only(a) {\n if (!O(a)) throw Error(C(143));\n return a;\n }\n};\nexports.Component = F;\nexports.Fragment = r;\nexports.Profiler = u;\nexports.PureComponent = H;\nexports.StrictMode = t;\nexports.Suspense = y;\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ba;\n\nexports.cloneElement = function (a, b, c) {\n if (null === a || void 0 === a) throw Error(C(267, a));\n var e = l({}, a.props),\n d = a.key,\n g = a.ref,\n k = a._owner;\n\n if (null != b) {\n void 0 !== b.ref && (g = b.ref, k = J.current);\n void 0 !== b.key && (d = \"\" + b.key);\n if (a.type && a.type.defaultProps) var f = a.type.defaultProps;\n\n for (h in b) {\n K.call(b, h) && !L.hasOwnProperty(h) && (e[h] = void 0 === b[h] && void 0 !== f ? f[h] : b[h]);\n }\n }\n\n var h = arguments.length - 2;\n if (1 === h) e.children = c;else if (1 < h) {\n f = Array(h);\n\n for (var m = 0; m < h; m++) {\n f[m] = arguments[m + 2];\n }\n\n e.children = f;\n }\n return {\n $$typeof: p,\n type: a.type,\n key: d,\n ref: g,\n props: e,\n _owner: k\n };\n};\n\nexports.createContext = function (a, b) {\n void 0 === b && (b = null);\n a = {\n $$typeof: w,\n _calculateChangedBits: b,\n _currentValue: a,\n _currentValue2: a,\n _threadCount: 0,\n Provider: null,\n Consumer: null\n };\n a.Provider = {\n $$typeof: v,\n _context: a\n };\n return a.Consumer = a;\n};\n\nexports.createElement = M;\n\nexports.createFactory = function (a) {\n var b = M.bind(null, a);\n b.type = a;\n return b;\n};\n\nexports.createRef = function () {\n return {\n current: null\n };\n};\n\nexports.forwardRef = function (a) {\n return {\n $$typeof: x,\n render: a\n };\n};\n\nexports.isValidElement = O;\n\nexports.lazy = function (a) {\n return {\n $$typeof: A,\n _ctor: a,\n _status: -1,\n _result: null\n };\n};\n\nexports.memo = function (a, b) {\n return {\n $$typeof: z,\n type: a,\n compare: void 0 === b ? null : b\n };\n};\n\nexports.useCallback = function (a, b) {\n return Z().useCallback(a, b);\n};\n\nexports.useContext = function (a, b) {\n return Z().useContext(a, b);\n};\n\nexports.useDebugValue = function () {};\n\nexports.useEffect = function (a, b) {\n return Z().useEffect(a, b);\n};\n\nexports.useImperativeHandle = function (a, b, c) {\n return Z().useImperativeHandle(a, b, c);\n};\n\nexports.useLayoutEffect = function (a, b) {\n return Z().useLayoutEffect(a, b);\n};\n\nexports.useMemo = function (a, b) {\n return Z().useMemo(a, b);\n};\n\nexports.useReducer = function (a, b, c) {\n return Z().useReducer(a, b, c);\n};\n\nexports.useRef = function (a) {\n return Z().useRef(a);\n};\n\nexports.useState = function (a) {\n return Z().useState(a);\n};\n\nexports.version = \"16.13.1\";","/** @license React v16.13.1\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\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\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n'use strict';\n\nvar aa = require(\"react\"),\n n = require(\"object-assign\"),\n r = require(\"scheduler\");\n\nfunction u(a) {\n for (var b = \"https://reactjs.org/docs/error-decoder.html?invariant=\" + a, c = 1; c < arguments.length; c++) {\n b += \"&args[]=\" + encodeURIComponent(arguments[c]);\n }\n\n return \"Minified React error #\" + a + \"; visit \" + b + \" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\";\n}\n\nif (!aa) throw Error(u(227));\n\nfunction ba(a, b, c, d, e, f, g, h, k) {\n var l = Array.prototype.slice.call(arguments, 3);\n\n try {\n b.apply(c, l);\n } catch (m) {\n this.onError(m);\n }\n}\n\nvar da = !1,\n ea = null,\n fa = !1,\n ha = null,\n ia = {\n onError: function onError(a) {\n da = !0;\n ea = a;\n }\n};\n\nfunction ja(a, b, c, d, e, f, g, h, k) {\n da = !1;\n ea = null;\n ba.apply(ia, arguments);\n}\n\nfunction ka(a, b, c, d, e, f, g, h, k) {\n ja.apply(this, arguments);\n\n if (da) {\n if (da) {\n var l = ea;\n da = !1;\n ea = null;\n } else throw Error(u(198));\n\n fa || (fa = !0, ha = l);\n }\n}\n\nvar la = null,\n ma = null,\n na = null;\n\nfunction oa(a, b, c) {\n var d = a.type || \"unknown-event\";\n a.currentTarget = na(c);\n ka(d, b, void 0, a);\n a.currentTarget = null;\n}\n\nvar pa = null,\n qa = {};\n\nfunction ra() {\n if (pa) for (var a in qa) {\n var b = qa[a],\n c = pa.indexOf(a);\n if (!(-1 < c)) throw Error(u(96, a));\n\n if (!sa[c]) {\n if (!b.extractEvents) throw Error(u(97, a));\n sa[c] = b;\n c = b.eventTypes;\n\n for (var d in c) {\n var e = void 0;\n var f = c[d],\n g = b,\n h = d;\n if (ta.hasOwnProperty(h)) throw Error(u(99, h));\n ta[h] = f;\n var k = f.phasedRegistrationNames;\n\n if (k) {\n for (e in k) {\n k.hasOwnProperty(e) && ua(k[e], g, h);\n }\n\n e = !0;\n } else f.registrationName ? (ua(f.registrationName, g, h), e = !0) : e = !1;\n\n if (!e) throw Error(u(98, d, a));\n }\n }\n }\n}\n\nfunction ua(a, b, c) {\n if (va[a]) throw Error(u(100, a));\n va[a] = b;\n wa[a] = b.eventTypes[c].dependencies;\n}\n\nvar sa = [],\n ta = {},\n va = {},\n wa = {};\n\nfunction xa(a) {\n var b = !1,\n c;\n\n for (c in a) {\n if (a.hasOwnProperty(c)) {\n var d = a[c];\n\n if (!qa.hasOwnProperty(c) || qa[c] !== d) {\n if (qa[c]) throw Error(u(102, c));\n qa[c] = d;\n b = !0;\n }\n }\n }\n\n b && ra();\n}\n\nvar ya = !(\"undefined\" === typeof window || \"undefined\" === typeof window.document || \"undefined\" === typeof window.document.createElement),\n za = null,\n Aa = null,\n Ba = null;\n\nfunction Ca(a) {\n if (a = ma(a)) {\n if (\"function\" !== typeof za) throw Error(u(280));\n var b = a.stateNode;\n b && (b = la(b), za(a.stateNode, a.type, b));\n }\n}\n\nfunction Da(a) {\n Aa ? Ba ? Ba.push(a) : Ba = [a] : Aa = a;\n}\n\nfunction Ea() {\n if (Aa) {\n var a = Aa,\n b = Ba;\n Ba = Aa = null;\n Ca(a);\n if (b) for (a = 0; a < b.length; a++) {\n Ca(b[a]);\n }\n }\n}\n\nfunction Fa(a, b) {\n return a(b);\n}\n\nfunction Ga(a, b, c, d, e) {\n return a(b, c, d, e);\n}\n\nfunction Ha() {}\n\nvar Ia = Fa,\n Ja = !1,\n Ka = !1;\n\nfunction La() {\n if (null !== Aa || null !== Ba) Ha(), Ea();\n}\n\nfunction Ma(a, b, c) {\n if (Ka) return a(b, c);\n Ka = !0;\n\n try {\n return Ia(a, b, c);\n } finally {\n Ka = !1, La();\n }\n}\n\nvar Na = /^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$/,\n Oa = Object.prototype.hasOwnProperty,\n Pa = {},\n Qa = {};\n\nfunction Ra(a) {\n if (Oa.call(Qa, a)) return !0;\n if (Oa.call(Pa, a)) return !1;\n if (Na.test(a)) return Qa[a] = !0;\n Pa[a] = !0;\n return !1;\n}\n\nfunction Sa(a, b, c, d) {\n if (null !== c && 0 === c.type) return !1;\n\n switch (typeof b) {\n case \"function\":\n case \"symbol\":\n return !0;\n\n case \"boolean\":\n if (d) return !1;\n if (null !== c) return !c.acceptsBooleans;\n a = a.toLowerCase().slice(0, 5);\n return \"data-\" !== a && \"aria-\" !== a;\n\n default:\n return !1;\n }\n}\n\nfunction Ta(a, b, c, d) {\n if (null === b || \"undefined\" === typeof b || Sa(a, b, c, d)) return !0;\n if (d) return !1;\n if (null !== c) switch (c.type) {\n case 3:\n return !b;\n\n case 4:\n return !1 === b;\n\n case 5:\n return isNaN(b);\n\n case 6:\n return isNaN(b) || 1 > b;\n }\n return !1;\n}\n\nfunction v(a, b, c, d, e, f) {\n this.acceptsBooleans = 2 === b || 3 === b || 4 === b;\n this.attributeName = d;\n this.attributeNamespace = e;\n this.mustUseProperty = c;\n this.propertyName = a;\n this.type = b;\n this.sanitizeURL = f;\n}\n\nvar C = {};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function (a) {\n C[a] = new v(a, 0, !1, a, null, !1);\n});\n[[\"acceptCharset\", \"accept-charset\"], [\"className\", \"class\"], [\"htmlFor\", \"for\"], [\"httpEquiv\", \"http-equiv\"]].forEach(function (a) {\n var b = a[0];\n C[b] = new v(b, 1, !1, a[1], null, !1);\n});\n[\"contentEditable\", \"draggable\", \"spellCheck\", \"value\"].forEach(function (a) {\n C[a] = new v(a, 2, !1, a.toLowerCase(), null, !1);\n});\n[\"autoReverse\", \"externalResourcesRequired\", \"focusable\", \"preserveAlpha\"].forEach(function (a) {\n C[a] = new v(a, 2, !1, a, null, !1);\n});\n\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function (a) {\n C[a] = new v(a, 3, !1, a.toLowerCase(), null, !1);\n});\n[\"checked\", \"multiple\", \"muted\", \"selected\"].forEach(function (a) {\n C[a] = new v(a, 3, !0, a, null, !1);\n});\n[\"capture\", \"download\"].forEach(function (a) {\n C[a] = new v(a, 4, !1, a, null, !1);\n});\n[\"cols\", \"rows\", \"size\", \"span\"].forEach(function (a) {\n C[a] = new v(a, 6, !1, a, null, !1);\n});\n[\"rowSpan\", \"start\"].forEach(function (a) {\n C[a] = new v(a, 5, !1, a.toLowerCase(), null, !1);\n});\nvar Ua = /[\\-:]([a-z])/g;\n\nfunction Va(a) {\n return a[1].toUpperCase();\n}\n\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function (a) {\n var b = a.replace(Ua, Va);\n C[b] = new v(b, 1, !1, a, null, !1);\n});\n\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function (a) {\n var b = a.replace(Ua, Va);\n C[b] = new v(b, 1, !1, a, \"http://www.w3.org/1999/xlink\", !1);\n});\n[\"xml:base\", \"xml:lang\", \"xml:space\"].forEach(function (a) {\n var b = a.replace(Ua, Va);\n C[b] = new v(b, 1, !1, a, \"http://www.w3.org/XML/1998/namespace\", !1);\n});\n[\"tabIndex\", \"crossOrigin\"].forEach(function (a) {\n C[a] = new v(a, 1, !1, a.toLowerCase(), null, !1);\n});\nC.xlinkHref = new v(\"xlinkHref\", 1, !1, \"xlink:href\", \"http://www.w3.org/1999/xlink\", !0);\n[\"src\", \"href\", \"action\", \"formAction\"].forEach(function (a) {\n C[a] = new v(a, 1, !1, a.toLowerCase(), null, !0);\n});\nvar Wa = aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\nWa.hasOwnProperty(\"ReactCurrentDispatcher\") || (Wa.ReactCurrentDispatcher = {\n current: null\n});\nWa.hasOwnProperty(\"ReactCurrentBatchConfig\") || (Wa.ReactCurrentBatchConfig = {\n suspense: null\n});\n\nfunction Xa(a, b, c, d) {\n var e = C.hasOwnProperty(b) ? C[b] : null;\n var f = null !== e ? 0 === e.type : d ? !1 : !(2 < b.length) || \"o\" !== b[0] && \"O\" !== b[0] || \"n\" !== b[1] && \"N\" !== b[1] ? !1 : !0;\n f || (Ta(b, c, e, d) && (c = null), d || null === e ? Ra(b) && (null === c ? a.removeAttribute(b) : a.setAttribute(b, \"\" + c)) : e.mustUseProperty ? a[e.propertyName] = null === c ? 3 === e.type ? !1 : \"\" : c : (b = e.attributeName, d = e.attributeNamespace, null === c ? a.removeAttribute(b) : (e = e.type, c = 3 === e || 4 === e && !0 === c ? \"\" : \"\" + c, d ? a.setAttributeNS(d, b, c) : a.setAttribute(b, c))));\n}\n\nvar Ya = /^(.*)[\\\\\\/]/,\n E = \"function\" === typeof Symbol && Symbol.for,\n Za = E ? Symbol.for(\"react.element\") : 60103,\n $a = E ? Symbol.for(\"react.portal\") : 60106,\n ab = E ? Symbol.for(\"react.fragment\") : 60107,\n bb = E ? Symbol.for(\"react.strict_mode\") : 60108,\n cb = E ? Symbol.for(\"react.profiler\") : 60114,\n db = E ? Symbol.for(\"react.provider\") : 60109,\n eb = E ? Symbol.for(\"react.context\") : 60110,\n fb = E ? Symbol.for(\"react.concurrent_mode\") : 60111,\n gb = E ? Symbol.for(\"react.forward_ref\") : 60112,\n hb = E ? Symbol.for(\"react.suspense\") : 60113,\n ib = E ? Symbol.for(\"react.suspense_list\") : 60120,\n jb = E ? Symbol.for(\"react.memo\") : 60115,\n kb = E ? Symbol.for(\"react.lazy\") : 60116,\n lb = E ? Symbol.for(\"react.block\") : 60121,\n mb = \"function\" === typeof Symbol && Symbol.iterator;\n\nfunction nb(a) {\n if (null === a || \"object\" !== typeof a) return null;\n a = mb && a[mb] || a[\"@@iterator\"];\n return \"function\" === typeof a ? a : null;\n}\n\nfunction ob(a) {\n if (-1 === a._status) {\n a._status = 0;\n var b = a._ctor;\n b = b();\n a._result = b;\n b.then(function (b) {\n 0 === a._status && (b = b.default, a._status = 1, a._result = b);\n }, function (b) {\n 0 === a._status && (a._status = 2, a._result = b);\n });\n }\n}\n\nfunction pb(a) {\n if (null == a) return null;\n if (\"function\" === typeof a) return a.displayName || a.name || null;\n if (\"string\" === typeof a) return a;\n\n switch (a) {\n case ab:\n return \"Fragment\";\n\n case $a:\n return \"Portal\";\n\n case cb:\n return \"Profiler\";\n\n case bb:\n return \"StrictMode\";\n\n case hb:\n return \"Suspense\";\n\n case ib:\n return \"SuspenseList\";\n }\n\n if (\"object\" === typeof a) switch (a.$$typeof) {\n case eb:\n return \"Context.Consumer\";\n\n case db:\n return \"Context.Provider\";\n\n case gb:\n var b = a.render;\n b = b.displayName || b.name || \"\";\n return a.displayName || (\"\" !== b ? \"ForwardRef(\" + b + \")\" : \"ForwardRef\");\n\n case jb:\n return pb(a.type);\n\n case lb:\n return pb(a.render);\n\n case kb:\n if (a = 1 === a._status ? a._result : null) return pb(a);\n }\n return null;\n}\n\nfunction qb(a) {\n var b = \"\";\n\n do {\n a: switch (a.tag) {\n case 3:\n case 4:\n case 6:\n case 7:\n case 10:\n case 9:\n var c = \"\";\n break a;\n\n default:\n var d = a._debugOwner,\n e = a._debugSource,\n f = pb(a.type);\n c = null;\n d && (c = pb(d.type));\n d = f;\n f = \"\";\n e ? f = \" (at \" + e.fileName.replace(Ya, \"\") + \":\" + e.lineNumber + \")\" : c && (f = \" (created by \" + c + \")\");\n c = \"\\n in \" + (d || \"Unknown\") + f;\n }\n\n b += c;\n a = a.return;\n } while (a);\n\n return b;\n}\n\nfunction rb(a) {\n switch (typeof a) {\n case \"boolean\":\n case \"number\":\n case \"object\":\n case \"string\":\n case \"undefined\":\n return a;\n\n default:\n return \"\";\n }\n}\n\nfunction sb(a) {\n var b = a.type;\n return (a = a.nodeName) && \"input\" === a.toLowerCase() && (\"checkbox\" === b || \"radio\" === b);\n}\n\nfunction tb(a) {\n var b = sb(a) ? \"checked\" : \"value\",\n c = Object.getOwnPropertyDescriptor(a.constructor.prototype, b),\n d = \"\" + a[b];\n\n if (!a.hasOwnProperty(b) && \"undefined\" !== typeof c && \"function\" === typeof c.get && \"function\" === typeof c.set) {\n var e = c.get,\n f = c.set;\n Object.defineProperty(a, b, {\n configurable: !0,\n get: function get() {\n return e.call(this);\n },\n set: function set(a) {\n d = \"\" + a;\n f.call(this, a);\n }\n });\n Object.defineProperty(a, b, {\n enumerable: c.enumerable\n });\n return {\n getValue: function getValue() {\n return d;\n },\n setValue: function setValue(a) {\n d = \"\" + a;\n },\n stopTracking: function stopTracking() {\n a._valueTracker = null;\n delete a[b];\n }\n };\n }\n}\n\nfunction xb(a) {\n a._valueTracker || (a._valueTracker = tb(a));\n}\n\nfunction yb(a) {\n if (!a) return !1;\n var b = a._valueTracker;\n if (!b) return !0;\n var c = b.getValue();\n var d = \"\";\n a && (d = sb(a) ? a.checked ? \"true\" : \"false\" : a.value);\n a = d;\n return a !== c ? (b.setValue(a), !0) : !1;\n}\n\nfunction zb(a, b) {\n var c = b.checked;\n return n({}, b, {\n defaultChecked: void 0,\n defaultValue: void 0,\n value: void 0,\n checked: null != c ? c : a._wrapperState.initialChecked\n });\n}\n\nfunction Ab(a, b) {\n var c = null == b.defaultValue ? \"\" : b.defaultValue,\n d = null != b.checked ? b.checked : b.defaultChecked;\n c = rb(null != b.value ? b.value : c);\n a._wrapperState = {\n initialChecked: d,\n initialValue: c,\n controlled: \"checkbox\" === b.type || \"radio\" === b.type ? null != b.checked : null != b.value\n };\n}\n\nfunction Bb(a, b) {\n b = b.checked;\n null != b && Xa(a, \"checked\", b, !1);\n}\n\nfunction Cb(a, b) {\n Bb(a, b);\n var c = rb(b.value),\n d = b.type;\n if (null != c) {\n if (\"number\" === d) {\n if (0 === c && \"\" === a.value || a.value != c) a.value = \"\" + c;\n } else a.value !== \"\" + c && (a.value = \"\" + c);\n } else if (\"submit\" === d || \"reset\" === d) {\n a.removeAttribute(\"value\");\n return;\n }\n b.hasOwnProperty(\"value\") ? Db(a, b.type, c) : b.hasOwnProperty(\"defaultValue\") && Db(a, b.type, rb(b.defaultValue));\n null == b.checked && null != b.defaultChecked && (a.defaultChecked = !!b.defaultChecked);\n}\n\nfunction Eb(a, b, c) {\n if (b.hasOwnProperty(\"value\") || b.hasOwnProperty(\"defaultValue\")) {\n var d = b.type;\n if (!(\"submit\" !== d && \"reset\" !== d || void 0 !== b.value && null !== b.value)) return;\n b = \"\" + a._wrapperState.initialValue;\n c || b === a.value || (a.value = b);\n a.defaultValue = b;\n }\n\n c = a.name;\n \"\" !== c && (a.name = \"\");\n a.defaultChecked = !!a._wrapperState.initialChecked;\n \"\" !== c && (a.name = c);\n}\n\nfunction Db(a, b, c) {\n if (\"number\" !== b || a.ownerDocument.activeElement !== a) null == c ? a.defaultValue = \"\" + a._wrapperState.initialValue : a.defaultValue !== \"\" + c && (a.defaultValue = \"\" + c);\n}\n\nfunction Fb(a) {\n var b = \"\";\n aa.Children.forEach(a, function (a) {\n null != a && (b += a);\n });\n return b;\n}\n\nfunction Gb(a, b) {\n a = n({\n children: void 0\n }, b);\n if (b = Fb(b.children)) a.children = b;\n return a;\n}\n\nfunction Hb(a, b, c, d) {\n a = a.options;\n\n if (b) {\n b = {};\n\n for (var e = 0; e < c.length; e++) {\n b[\"$\" + c[e]] = !0;\n }\n\n for (c = 0; c < a.length; c++) {\n e = b.hasOwnProperty(\"$\" + a[c].value), a[c].selected !== e && (a[c].selected = e), e && d && (a[c].defaultSelected = !0);\n }\n } else {\n c = \"\" + rb(c);\n b = null;\n\n for (e = 0; e < a.length; e++) {\n if (a[e].value === c) {\n a[e].selected = !0;\n d && (a[e].defaultSelected = !0);\n return;\n }\n\n null !== b || a[e].disabled || (b = a[e]);\n }\n\n null !== b && (b.selected = !0);\n }\n}\n\nfunction Ib(a, b) {\n if (null != b.dangerouslySetInnerHTML) throw Error(u(91));\n return n({}, b, {\n value: void 0,\n defaultValue: void 0,\n children: \"\" + a._wrapperState.initialValue\n });\n}\n\nfunction Jb(a, b) {\n var c = b.value;\n\n if (null == c) {\n c = b.children;\n b = b.defaultValue;\n\n if (null != c) {\n if (null != b) throw Error(u(92));\n\n if (Array.isArray(c)) {\n if (!(1 >= c.length)) throw Error(u(93));\n c = c[0];\n }\n\n b = c;\n }\n\n null == b && (b = \"\");\n c = b;\n }\n\n a._wrapperState = {\n initialValue: rb(c)\n };\n}\n\nfunction Kb(a, b) {\n var c = rb(b.value),\n d = rb(b.defaultValue);\n null != c && (c = \"\" + c, c !== a.value && (a.value = c), null == b.defaultValue && a.defaultValue !== c && (a.defaultValue = c));\n null != d && (a.defaultValue = \"\" + d);\n}\n\nfunction Lb(a) {\n var b = a.textContent;\n b === a._wrapperState.initialValue && \"\" !== b && null !== b && (a.value = b);\n}\n\nvar Mb = {\n html: \"http://www.w3.org/1999/xhtml\",\n mathml: \"http://www.w3.org/1998/Math/MathML\",\n svg: \"http://www.w3.org/2000/svg\"\n};\n\nfunction Nb(a) {\n switch (a) {\n case \"svg\":\n return \"http://www.w3.org/2000/svg\";\n\n case \"math\":\n return \"http://www.w3.org/1998/Math/MathML\";\n\n default:\n return \"http://www.w3.org/1999/xhtml\";\n }\n}\n\nfunction Ob(a, b) {\n return null == a || \"http://www.w3.org/1999/xhtml\" === a ? Nb(b) : \"http://www.w3.org/2000/svg\" === a && \"foreignObject\" === b ? \"http://www.w3.org/1999/xhtml\" : a;\n}\n\nvar Pb,\n Qb = function (a) {\n return \"undefined\" !== typeof MSApp && MSApp.execUnsafeLocalFunction ? function (b, c, d, e) {\n MSApp.execUnsafeLocalFunction(function () {\n return a(b, c, d, e);\n });\n } : a;\n}(function (a, b) {\n if (a.namespaceURI !== Mb.svg || \"innerHTML\" in a) a.innerHTML = b;else {\n Pb = Pb || document.createElement(\"div\");\n Pb.innerHTML = \"\";\n\n for (b = Pb.firstChild; a.firstChild;) {\n a.removeChild(a.firstChild);\n }\n\n for (; b.firstChild;) {\n a.appendChild(b.firstChild);\n }\n }\n});\n\nfunction Rb(a, b) {\n if (b) {\n var c = a.firstChild;\n\n if (c && c === a.lastChild && 3 === c.nodeType) {\n c.nodeValue = b;\n return;\n }\n }\n\n a.textContent = b;\n}\n\nfunction Sb(a, b) {\n var c = {};\n c[a.toLowerCase()] = b.toLowerCase();\n c[\"Webkit\" + a] = \"webkit\" + b;\n c[\"Moz\" + a] = \"moz\" + b;\n return c;\n}\n\nvar Tb = {\n animationend: Sb(\"Animation\", \"AnimationEnd\"),\n animationiteration: Sb(\"Animation\", \"AnimationIteration\"),\n animationstart: Sb(\"Animation\", \"AnimationStart\"),\n transitionend: Sb(\"Transition\", \"TransitionEnd\")\n},\n Ub = {},\n Vb = {};\nya && (Vb = document.createElement(\"div\").style, \"AnimationEvent\" in window || (delete Tb.animationend.animation, delete Tb.animationiteration.animation, delete Tb.animationstart.animation), \"TransitionEvent\" in window || delete Tb.transitionend.transition);\n\nfunction Wb(a) {\n if (Ub[a]) return Ub[a];\n if (!Tb[a]) return a;\n var b = Tb[a],\n c;\n\n for (c in b) {\n if (b.hasOwnProperty(c) && c in Vb) return Ub[a] = b[c];\n }\n\n return a;\n}\n\nvar Xb = Wb(\"animationend\"),\n Yb = Wb(\"animationiteration\"),\n Zb = Wb(\"animationstart\"),\n $b = Wb(\"transitionend\"),\n ac = \"abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting\".split(\" \"),\n bc = new (\"function\" === typeof WeakMap ? WeakMap : Map)();\n\nfunction cc(a) {\n var b = bc.get(a);\n void 0 === b && (b = new Map(), bc.set(a, b));\n return b;\n}\n\nfunction dc(a) {\n var b = a,\n c = a;\n if (a.alternate) for (; b.return;) {\n b = b.return;\n } else {\n a = b;\n\n do {\n b = a, 0 !== (b.effectTag & 1026) && (c = b.return), a = b.return;\n } while (a);\n }\n return 3 === b.tag ? c : null;\n}\n\nfunction ec(a) {\n if (13 === a.tag) {\n var b = a.memoizedState;\n null === b && (a = a.alternate, null !== a && (b = a.memoizedState));\n if (null !== b) return b.dehydrated;\n }\n\n return null;\n}\n\nfunction fc(a) {\n if (dc(a) !== a) throw Error(u(188));\n}\n\nfunction gc(a) {\n var b = a.alternate;\n\n if (!b) {\n b = dc(a);\n if (null === b) throw Error(u(188));\n return b !== a ? null : a;\n }\n\n for (var c = a, d = b;;) {\n var e = c.return;\n if (null === e) break;\n var f = e.alternate;\n\n if (null === f) {\n d = e.return;\n\n if (null !== d) {\n c = d;\n continue;\n }\n\n break;\n }\n\n if (e.child === f.child) {\n for (f = e.child; f;) {\n if (f === c) return fc(e), a;\n if (f === d) return fc(e), b;\n f = f.sibling;\n }\n\n throw Error(u(188));\n }\n\n if (c.return !== d.return) c = e, d = f;else {\n for (var g = !1, h = e.child; h;) {\n if (h === c) {\n g = !0;\n c = e;\n d = f;\n break;\n }\n\n if (h === d) {\n g = !0;\n d = e;\n c = f;\n break;\n }\n\n h = h.sibling;\n }\n\n if (!g) {\n for (h = f.child; h;) {\n if (h === c) {\n g = !0;\n c = f;\n d = e;\n break;\n }\n\n if (h === d) {\n g = !0;\n d = f;\n c = e;\n break;\n }\n\n h = h.sibling;\n }\n\n if (!g) throw Error(u(189));\n }\n }\n if (c.alternate !== d) throw Error(u(190));\n }\n\n if (3 !== c.tag) throw Error(u(188));\n return c.stateNode.current === c ? a : b;\n}\n\nfunction hc(a) {\n a = gc(a);\n if (!a) return null;\n\n for (var b = a;;) {\n if (5 === b.tag || 6 === b.tag) return b;\n if (b.child) b.child.return = b, b = b.child;else {\n if (b === a) break;\n\n for (; !b.sibling;) {\n if (!b.return || b.return === a) return null;\n b = b.return;\n }\n\n b.sibling.return = b.return;\n b = b.sibling;\n }\n }\n\n return null;\n}\n\nfunction ic(a, b) {\n if (null == b) throw Error(u(30));\n if (null == a) return b;\n\n if (Array.isArray(a)) {\n if (Array.isArray(b)) return a.push.apply(a, b), a;\n a.push(b);\n return a;\n }\n\n return Array.isArray(b) ? [a].concat(b) : [a, b];\n}\n\nfunction jc(a, b, c) {\n Array.isArray(a) ? a.forEach(b, c) : a && b.call(c, a);\n}\n\nvar kc = null;\n\nfunction lc(a) {\n if (a) {\n var b = a._dispatchListeners,\n c = a._dispatchInstances;\n if (Array.isArray(b)) for (var d = 0; d < b.length && !a.isPropagationStopped(); d++) {\n oa(a, b[d], c[d]);\n } else b && oa(a, b, c);\n a._dispatchListeners = null;\n a._dispatchInstances = null;\n a.isPersistent() || a.constructor.release(a);\n }\n}\n\nfunction mc(a) {\n null !== a && (kc = ic(kc, a));\n a = kc;\n kc = null;\n\n if (a) {\n jc(a, lc);\n if (kc) throw Error(u(95));\n if (fa) throw a = ha, fa = !1, ha = null, a;\n }\n}\n\nfunction nc(a) {\n a = a.target || a.srcElement || window;\n a.correspondingUseElement && (a = a.correspondingUseElement);\n return 3 === a.nodeType ? a.parentNode : a;\n}\n\nfunction oc(a) {\n if (!ya) return !1;\n a = \"on\" + a;\n var b = a in document;\n b || (b = document.createElement(\"div\"), b.setAttribute(a, \"return;\"), b = \"function\" === typeof b[a]);\n return b;\n}\n\nvar pc = [];\n\nfunction qc(a) {\n a.topLevelType = null;\n a.nativeEvent = null;\n a.targetInst = null;\n a.ancestors.length = 0;\n 10 > pc.length && pc.push(a);\n}\n\nfunction rc(a, b, c, d) {\n if (pc.length) {\n var e = pc.pop();\n e.topLevelType = a;\n e.eventSystemFlags = d;\n e.nativeEvent = b;\n e.targetInst = c;\n return e;\n }\n\n return {\n topLevelType: a,\n eventSystemFlags: d,\n nativeEvent: b,\n targetInst: c,\n ancestors: []\n };\n}\n\nfunction sc(a) {\n var b = a.targetInst,\n c = b;\n\n do {\n if (!c) {\n a.ancestors.push(c);\n break;\n }\n\n var d = c;\n if (3 === d.tag) d = d.stateNode.containerInfo;else {\n for (; d.return;) {\n d = d.return;\n }\n\n d = 3 !== d.tag ? null : d.stateNode.containerInfo;\n }\n if (!d) break;\n b = c.tag;\n 5 !== b && 6 !== b || a.ancestors.push(c);\n c = tc(d);\n } while (c);\n\n for (c = 0; c < a.ancestors.length; c++) {\n b = a.ancestors[c];\n var e = nc(a.nativeEvent);\n d = a.topLevelType;\n var f = a.nativeEvent,\n g = a.eventSystemFlags;\n 0 === c && (g |= 64);\n\n for (var h = null, k = 0; k < sa.length; k++) {\n var l = sa[k];\n l && (l = l.extractEvents(d, b, f, e, g)) && (h = ic(h, l));\n }\n\n mc(h);\n }\n}\n\nfunction uc(a, b, c) {\n if (!c.has(a)) {\n switch (a) {\n case \"scroll\":\n vc(b, \"scroll\", !0);\n break;\n\n case \"focus\":\n case \"blur\":\n vc(b, \"focus\", !0);\n vc(b, \"blur\", !0);\n c.set(\"blur\", null);\n c.set(\"focus\", null);\n break;\n\n case \"cancel\":\n case \"close\":\n oc(a) && vc(b, a, !0);\n break;\n\n case \"invalid\":\n case \"submit\":\n case \"reset\":\n break;\n\n default:\n -1 === ac.indexOf(a) && F(a, b);\n }\n\n c.set(a, null);\n }\n}\n\nvar wc,\n xc,\n yc,\n zc = !1,\n Ac = [],\n Bc = null,\n Cc = null,\n Dc = null,\n Ec = new Map(),\n Fc = new Map(),\n Gc = [],\n Hc = \"mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit\".split(\" \"),\n Ic = \"focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture\".split(\" \");\n\nfunction Jc(a, b) {\n var c = cc(b);\n Hc.forEach(function (a) {\n uc(a, b, c);\n });\n Ic.forEach(function (a) {\n uc(a, b, c);\n });\n}\n\nfunction Kc(a, b, c, d, e) {\n return {\n blockedOn: a,\n topLevelType: b,\n eventSystemFlags: c | 32,\n nativeEvent: e,\n container: d\n };\n}\n\nfunction Lc(a, b) {\n switch (a) {\n case \"focus\":\n case \"blur\":\n Bc = null;\n break;\n\n case \"dragenter\":\n case \"dragleave\":\n Cc = null;\n break;\n\n case \"mouseover\":\n case \"mouseout\":\n Dc = null;\n break;\n\n case \"pointerover\":\n case \"pointerout\":\n Ec.delete(b.pointerId);\n break;\n\n case \"gotpointercapture\":\n case \"lostpointercapture\":\n Fc.delete(b.pointerId);\n }\n}\n\nfunction Mc(a, b, c, d, e, f) {\n if (null === a || a.nativeEvent !== f) return a = Kc(b, c, d, e, f), null !== b && (b = Nc(b), null !== b && xc(b)), a;\n a.eventSystemFlags |= d;\n return a;\n}\n\nfunction Oc(a, b, c, d, e) {\n switch (b) {\n case \"focus\":\n return Bc = Mc(Bc, a, b, c, d, e), !0;\n\n case \"dragenter\":\n return Cc = Mc(Cc, a, b, c, d, e), !0;\n\n case \"mouseover\":\n return Dc = Mc(Dc, a, b, c, d, e), !0;\n\n case \"pointerover\":\n var f = e.pointerId;\n Ec.set(f, Mc(Ec.get(f) || null, a, b, c, d, e));\n return !0;\n\n case \"gotpointercapture\":\n return f = e.pointerId, Fc.set(f, Mc(Fc.get(f) || null, a, b, c, d, e)), !0;\n }\n\n return !1;\n}\n\nfunction Pc(a) {\n var b = tc(a.target);\n\n if (null !== b) {\n var c = dc(b);\n if (null !== c) if (b = c.tag, 13 === b) {\n if (b = ec(c), null !== b) {\n a.blockedOn = b;\n r.unstable_runWithPriority(a.priority, function () {\n yc(c);\n });\n return;\n }\n } else if (3 === b && c.stateNode.hydrate) {\n a.blockedOn = 3 === c.tag ? c.stateNode.containerInfo : null;\n return;\n }\n }\n\n a.blockedOn = null;\n}\n\nfunction Qc(a) {\n if (null !== a.blockedOn) return !1;\n var b = Rc(a.topLevelType, a.eventSystemFlags, a.container, a.nativeEvent);\n\n if (null !== b) {\n var c = Nc(b);\n null !== c && xc(c);\n a.blockedOn = b;\n return !1;\n }\n\n return !0;\n}\n\nfunction Sc(a, b, c) {\n Qc(a) && c.delete(b);\n}\n\nfunction Tc() {\n for (zc = !1; 0 < Ac.length;) {\n var a = Ac[0];\n\n if (null !== a.blockedOn) {\n a = Nc(a.blockedOn);\n null !== a && wc(a);\n break;\n }\n\n var b = Rc(a.topLevelType, a.eventSystemFlags, a.container, a.nativeEvent);\n null !== b ? a.blockedOn = b : Ac.shift();\n }\n\n null !== Bc && Qc(Bc) && (Bc = null);\n null !== Cc && Qc(Cc) && (Cc = null);\n null !== Dc && Qc(Dc) && (Dc = null);\n Ec.forEach(Sc);\n Fc.forEach(Sc);\n}\n\nfunction Uc(a, b) {\n a.blockedOn === b && (a.blockedOn = null, zc || (zc = !0, r.unstable_scheduleCallback(r.unstable_NormalPriority, Tc)));\n}\n\nfunction Vc(a) {\n function b(b) {\n return Uc(b, a);\n }\n\n if (0 < Ac.length) {\n Uc(Ac[0], a);\n\n for (var c = 1; c < Ac.length; c++) {\n var d = Ac[c];\n d.blockedOn === a && (d.blockedOn = null);\n }\n }\n\n null !== Bc && Uc(Bc, a);\n null !== Cc && Uc(Cc, a);\n null !== Dc && Uc(Dc, a);\n Ec.forEach(b);\n Fc.forEach(b);\n\n for (c = 0; c < Gc.length; c++) {\n d = Gc[c], d.blockedOn === a && (d.blockedOn = null);\n }\n\n for (; 0 < Gc.length && (c = Gc[0], null === c.blockedOn);) {\n Pc(c), null === c.blockedOn && Gc.shift();\n }\n}\n\nvar Wc = {},\n Yc = new Map(),\n Zc = new Map(),\n $c = [\"abort\", \"abort\", Xb, \"animationEnd\", Yb, \"animationIteration\", Zb, \"animationStart\", \"canplay\", \"canPlay\", \"canplaythrough\", \"canPlayThrough\", \"durationchange\", \"durationChange\", \"emptied\", \"emptied\", \"encrypted\", \"encrypted\", \"ended\", \"ended\", \"error\", \"error\", \"gotpointercapture\", \"gotPointerCapture\", \"load\", \"load\", \"loadeddata\", \"loadedData\", \"loadedmetadata\", \"loadedMetadata\", \"loadstart\", \"loadStart\", \"lostpointercapture\", \"lostPointerCapture\", \"playing\", \"playing\", \"progress\", \"progress\", \"seeking\", \"seeking\", \"stalled\", \"stalled\", \"suspend\", \"suspend\", \"timeupdate\", \"timeUpdate\", $b, \"transitionEnd\", \"waiting\", \"waiting\"];\n\nfunction ad(a, b) {\n for (var c = 0; c < a.length; c += 2) {\n var d = a[c],\n e = a[c + 1],\n f = \"on\" + (e[0].toUpperCase() + e.slice(1));\n f = {\n phasedRegistrationNames: {\n bubbled: f,\n captured: f + \"Capture\"\n },\n dependencies: [d],\n eventPriority: b\n };\n Zc.set(d, b);\n Yc.set(d, f);\n Wc[e] = f;\n }\n}\n\nad(\"blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange\".split(\" \"), 0);\nad(\"drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel\".split(\" \"), 1);\nad($c, 2);\n\nfor (var bd = \"change selectionchange textInput compositionstart compositionend compositionupdate\".split(\" \"), cd = 0; cd < bd.length; cd++) {\n Zc.set(bd[cd], 0);\n}\n\nvar dd = r.unstable_UserBlockingPriority,\n ed = r.unstable_runWithPriority,\n fd = !0;\n\nfunction F(a, b) {\n vc(b, a, !1);\n}\n\nfunction vc(a, b, c) {\n var d = Zc.get(b);\n\n switch (void 0 === d ? 2 : d) {\n case 0:\n d = gd.bind(null, b, 1, a);\n break;\n\n case 1:\n d = hd.bind(null, b, 1, a);\n break;\n\n default:\n d = id.bind(null, b, 1, a);\n }\n\n c ? a.addEventListener(b, d, !0) : a.addEventListener(b, d, !1);\n}\n\nfunction gd(a, b, c, d) {\n Ja || Ha();\n var e = id,\n f = Ja;\n Ja = !0;\n\n try {\n Ga(e, a, b, c, d);\n } finally {\n (Ja = f) || La();\n }\n}\n\nfunction hd(a, b, c, d) {\n ed(dd, id.bind(null, a, b, c, d));\n}\n\nfunction id(a, b, c, d) {\n if (fd) if (0 < Ac.length && -1 < Hc.indexOf(a)) a = Kc(null, a, b, c, d), Ac.push(a);else {\n var e = Rc(a, b, c, d);\n if (null === e) Lc(a, d);else if (-1 < Hc.indexOf(a)) a = Kc(e, a, b, c, d), Ac.push(a);else if (!Oc(e, a, b, c, d)) {\n Lc(a, d);\n a = rc(a, d, null, b);\n\n try {\n Ma(sc, a);\n } finally {\n qc(a);\n }\n }\n }\n}\n\nfunction Rc(a, b, c, d) {\n c = nc(d);\n c = tc(c);\n\n if (null !== c) {\n var e = dc(c);\n if (null === e) c = null;else {\n var f = e.tag;\n\n if (13 === f) {\n c = ec(e);\n if (null !== c) return c;\n c = null;\n } else if (3 === f) {\n if (e.stateNode.hydrate) return 3 === e.tag ? e.stateNode.containerInfo : null;\n c = null;\n } else e !== c && (c = null);\n }\n }\n\n a = rc(a, d, c, b);\n\n try {\n Ma(sc, a);\n } finally {\n qc(a);\n }\n\n return null;\n}\n\nvar jd = {\n animationIterationCount: !0,\n borderImageOutset: !0,\n borderImageSlice: !0,\n borderImageWidth: !0,\n boxFlex: !0,\n boxFlexGroup: !0,\n boxOrdinalGroup: !0,\n columnCount: !0,\n columns: !0,\n flex: !0,\n flexGrow: !0,\n flexPositive: !0,\n flexShrink: !0,\n flexNegative: !0,\n flexOrder: !0,\n gridArea: !0,\n gridRow: !0,\n gridRowEnd: !0,\n gridRowSpan: !0,\n gridRowStart: !0,\n gridColumn: !0,\n gridColumnEnd: !0,\n gridColumnSpan: !0,\n gridColumnStart: !0,\n fontWeight: !0,\n lineClamp: !0,\n lineHeight: !0,\n opacity: !0,\n order: !0,\n orphans: !0,\n tabSize: !0,\n widows: !0,\n zIndex: !0,\n zoom: !0,\n fillOpacity: !0,\n floodOpacity: !0,\n stopOpacity: !0,\n strokeDasharray: !0,\n strokeDashoffset: !0,\n strokeMiterlimit: !0,\n strokeOpacity: !0,\n strokeWidth: !0\n},\n kd = [\"Webkit\", \"ms\", \"Moz\", \"O\"];\nObject.keys(jd).forEach(function (a) {\n kd.forEach(function (b) {\n b = b + a.charAt(0).toUpperCase() + a.substring(1);\n jd[b] = jd[a];\n });\n});\n\nfunction ld(a, b, c) {\n return null == b || \"boolean\" === typeof b || \"\" === b ? \"\" : c || \"number\" !== typeof b || 0 === b || jd.hasOwnProperty(a) && jd[a] ? (\"\" + b).trim() : b + \"px\";\n}\n\nfunction md(a, b) {\n a = a.style;\n\n for (var c in b) {\n if (b.hasOwnProperty(c)) {\n var d = 0 === c.indexOf(\"--\"),\n e = ld(c, b[c], d);\n \"float\" === c && (c = \"cssFloat\");\n d ? a.setProperty(c, e) : a[c] = e;\n }\n }\n}\n\nvar nd = n({\n menuitem: !0\n}, {\n area: !0,\n base: !0,\n br: !0,\n col: !0,\n embed: !0,\n hr: !0,\n img: !0,\n input: !0,\n keygen: !0,\n link: !0,\n meta: !0,\n param: !0,\n source: !0,\n track: !0,\n wbr: !0\n});\n\nfunction od(a, b) {\n if (b) {\n if (nd[a] && (null != b.children || null != b.dangerouslySetInnerHTML)) throw Error(u(137, a, \"\"));\n\n if (null != b.dangerouslySetInnerHTML) {\n if (null != b.children) throw Error(u(60));\n if (!(\"object\" === typeof b.dangerouslySetInnerHTML && \"__html\" in b.dangerouslySetInnerHTML)) throw Error(u(61));\n }\n\n if (null != b.style && \"object\" !== typeof b.style) throw Error(u(62, \"\"));\n }\n}\n\nfunction pd(a, b) {\n if (-1 === a.indexOf(\"-\")) return \"string\" === typeof b.is;\n\n switch (a) {\n case \"annotation-xml\":\n case \"color-profile\":\n case \"font-face\":\n case \"font-face-src\":\n case \"font-face-uri\":\n case \"font-face-format\":\n case \"font-face-name\":\n case \"missing-glyph\":\n return !1;\n\n default:\n return !0;\n }\n}\n\nvar qd = Mb.html;\n\nfunction rd(a, b) {\n a = 9 === a.nodeType || 11 === a.nodeType ? a : a.ownerDocument;\n var c = cc(a);\n b = wa[b];\n\n for (var d = 0; d < b.length; d++) {\n uc(b[d], a, c);\n }\n}\n\nfunction sd() {}\n\nfunction td(a) {\n a = a || (\"undefined\" !== typeof document ? document : void 0);\n if (\"undefined\" === typeof a) return null;\n\n try {\n return a.activeElement || a.body;\n } catch (b) {\n return a.body;\n }\n}\n\nfunction ud(a) {\n for (; a && a.firstChild;) {\n a = a.firstChild;\n }\n\n return a;\n}\n\nfunction vd(a, b) {\n var c = ud(a);\n a = 0;\n\n for (var d; c;) {\n if (3 === c.nodeType) {\n d = a + c.textContent.length;\n if (a <= b && d >= b) return {\n node: c,\n offset: b - a\n };\n a = d;\n }\n\n a: {\n for (; c;) {\n if (c.nextSibling) {\n c = c.nextSibling;\n break a;\n }\n\n c = c.parentNode;\n }\n\n c = void 0;\n }\n\n c = ud(c);\n }\n}\n\nfunction wd(a, b) {\n return a && b ? a === b ? !0 : a && 3 === a.nodeType ? !1 : b && 3 === b.nodeType ? wd(a, b.parentNode) : \"contains\" in a ? a.contains(b) : a.compareDocumentPosition ? !!(a.compareDocumentPosition(b) & 16) : !1 : !1;\n}\n\nfunction xd() {\n for (var a = window, b = td(); b instanceof a.HTMLIFrameElement;) {\n try {\n var c = \"string\" === typeof b.contentWindow.location.href;\n } catch (d) {\n c = !1;\n }\n\n if (c) a = b.contentWindow;else break;\n b = td(a.document);\n }\n\n return b;\n}\n\nfunction yd(a) {\n var b = a && a.nodeName && a.nodeName.toLowerCase();\n return b && (\"input\" === b && (\"text\" === a.type || \"search\" === a.type || \"tel\" === a.type || \"url\" === a.type || \"password\" === a.type) || \"textarea\" === b || \"true\" === a.contentEditable);\n}\n\nvar zd = \"$\",\n Ad = \"/$\",\n Bd = \"$?\",\n Cd = \"$!\",\n Dd = null,\n Ed = null;\n\nfunction Fd(a, b) {\n switch (a) {\n case \"button\":\n case \"input\":\n case \"select\":\n case \"textarea\":\n return !!b.autoFocus;\n }\n\n return !1;\n}\n\nfunction Gd(a, b) {\n return \"textarea\" === a || \"option\" === a || \"noscript\" === a || \"string\" === typeof b.children || \"number\" === typeof b.children || \"object\" === typeof b.dangerouslySetInnerHTML && null !== b.dangerouslySetInnerHTML && null != b.dangerouslySetInnerHTML.__html;\n}\n\nvar Hd = \"function\" === typeof setTimeout ? setTimeout : void 0,\n Id = \"function\" === typeof clearTimeout ? clearTimeout : void 0;\n\nfunction Jd(a) {\n for (; null != a; a = a.nextSibling) {\n var b = a.nodeType;\n if (1 === b || 3 === b) break;\n }\n\n return a;\n}\n\nfunction Kd(a) {\n a = a.previousSibling;\n\n for (var b = 0; a;) {\n if (8 === a.nodeType) {\n var c = a.data;\n\n if (c === zd || c === Cd || c === Bd) {\n if (0 === b) return a;\n b--;\n } else c === Ad && b++;\n }\n\n a = a.previousSibling;\n }\n\n return null;\n}\n\nvar Ld = Math.random().toString(36).slice(2),\n Md = \"__reactInternalInstance$\" + Ld,\n Nd = \"__reactEventHandlers$\" + Ld,\n Od = \"__reactContainere$\" + Ld;\n\nfunction tc(a) {\n var b = a[Md];\n if (b) return b;\n\n for (var c = a.parentNode; c;) {\n if (b = c[Od] || c[Md]) {\n c = b.alternate;\n if (null !== b.child || null !== c && null !== c.child) for (a = Kd(a); null !== a;) {\n if (c = a[Md]) return c;\n a = Kd(a);\n }\n return b;\n }\n\n a = c;\n c = a.parentNode;\n }\n\n return null;\n}\n\nfunction Nc(a) {\n a = a[Md] || a[Od];\n return !a || 5 !== a.tag && 6 !== a.tag && 13 !== a.tag && 3 !== a.tag ? null : a;\n}\n\nfunction Pd(a) {\n if (5 === a.tag || 6 === a.tag) return a.stateNode;\n throw Error(u(33));\n}\n\nfunction Qd(a) {\n return a[Nd] || null;\n}\n\nfunction Rd(a) {\n do {\n a = a.return;\n } while (a && 5 !== a.tag);\n\n return a ? a : null;\n}\n\nfunction Sd(a, b) {\n var c = a.stateNode;\n if (!c) return null;\n var d = la(c);\n if (!d) return null;\n c = d[b];\n\n a: switch (b) {\n case \"onClick\":\n case \"onClickCapture\":\n case \"onDoubleClick\":\n case \"onDoubleClickCapture\":\n case \"onMouseDown\":\n case \"onMouseDownCapture\":\n case \"onMouseMove\":\n case \"onMouseMoveCapture\":\n case \"onMouseUp\":\n case \"onMouseUpCapture\":\n case \"onMouseEnter\":\n (d = !d.disabled) || (a = a.type, d = !(\"button\" === a || \"input\" === a || \"select\" === a || \"textarea\" === a));\n a = !d;\n break a;\n\n default:\n a = !1;\n }\n\n if (a) return null;\n if (c && \"function\" !== typeof c) throw Error(u(231, b, typeof c));\n return c;\n}\n\nfunction Td(a, b, c) {\n if (b = Sd(a, c.dispatchConfig.phasedRegistrationNames[b])) c._dispatchListeners = ic(c._dispatchListeners, b), c._dispatchInstances = ic(c._dispatchInstances, a);\n}\n\nfunction Ud(a) {\n if (a && a.dispatchConfig.phasedRegistrationNames) {\n for (var b = a._targetInst, c = []; b;) {\n c.push(b), b = Rd(b);\n }\n\n for (b = c.length; 0 < b--;) {\n Td(c[b], \"captured\", a);\n }\n\n for (b = 0; b < c.length; b++) {\n Td(c[b], \"bubbled\", a);\n }\n }\n}\n\nfunction Vd(a, b, c) {\n a && c && c.dispatchConfig.registrationName && (b = Sd(a, c.dispatchConfig.registrationName)) && (c._dispatchListeners = ic(c._dispatchListeners, b), c._dispatchInstances = ic(c._dispatchInstances, a));\n}\n\nfunction Wd(a) {\n a && a.dispatchConfig.registrationName && Vd(a._targetInst, null, a);\n}\n\nfunction Xd(a) {\n jc(a, Ud);\n}\n\nvar Yd = null,\n Zd = null,\n $d = null;\n\nfunction ae() {\n if ($d) return $d;\n var a,\n b = Zd,\n c = b.length,\n d,\n e = \"value\" in Yd ? Yd.value : Yd.textContent,\n f = e.length;\n\n for (a = 0; a < c && b[a] === e[a]; a++) {\n ;\n }\n\n var g = c - a;\n\n for (d = 1; d <= g && b[c - d] === e[f - d]; d++) {\n ;\n }\n\n return $d = e.slice(a, 1 < d ? 1 - d : void 0);\n}\n\nfunction be() {\n return !0;\n}\n\nfunction ce() {\n return !1;\n}\n\nfunction G(a, b, c, d) {\n this.dispatchConfig = a;\n this._targetInst = b;\n this.nativeEvent = c;\n a = this.constructor.Interface;\n\n for (var e in a) {\n a.hasOwnProperty(e) && ((b = a[e]) ? this[e] = b(c) : \"target\" === e ? this.target = d : this[e] = c[e]);\n }\n\n this.isDefaultPrevented = (null != c.defaultPrevented ? c.defaultPrevented : !1 === c.returnValue) ? be : ce;\n this.isPropagationStopped = ce;\n return this;\n}\n\nn(G.prototype, {\n preventDefault: function preventDefault() {\n this.defaultPrevented = !0;\n var a = this.nativeEvent;\n a && (a.preventDefault ? a.preventDefault() : \"unknown\" !== typeof a.returnValue && (a.returnValue = !1), this.isDefaultPrevented = be);\n },\n stopPropagation: function stopPropagation() {\n var a = this.nativeEvent;\n a && (a.stopPropagation ? a.stopPropagation() : \"unknown\" !== typeof a.cancelBubble && (a.cancelBubble = !0), this.isPropagationStopped = be);\n },\n persist: function persist() {\n this.isPersistent = be;\n },\n isPersistent: ce,\n destructor: function destructor() {\n var a = this.constructor.Interface,\n b;\n\n for (b in a) {\n this[b] = null;\n }\n\n this.nativeEvent = this._targetInst = this.dispatchConfig = null;\n this.isPropagationStopped = this.isDefaultPrevented = ce;\n this._dispatchInstances = this._dispatchListeners = null;\n }\n});\nG.Interface = {\n type: null,\n target: null,\n currentTarget: function currentTarget() {\n return null;\n },\n eventPhase: null,\n bubbles: null,\n cancelable: null,\n timeStamp: function timeStamp(a) {\n return a.timeStamp || Date.now();\n },\n defaultPrevented: null,\n isTrusted: null\n};\n\nG.extend = function (a) {\n function b() {}\n\n function c() {\n return d.apply(this, arguments);\n }\n\n var d = this;\n b.prototype = d.prototype;\n var e = new b();\n n(e, c.prototype);\n c.prototype = e;\n c.prototype.constructor = c;\n c.Interface = n({}, d.Interface, a);\n c.extend = d.extend;\n de(c);\n return c;\n};\n\nde(G);\n\nfunction ee(a, b, c, d) {\n if (this.eventPool.length) {\n var e = this.eventPool.pop();\n this.call(e, a, b, c, d);\n return e;\n }\n\n return new this(a, b, c, d);\n}\n\nfunction fe(a) {\n if (!(a instanceof this)) throw Error(u(279));\n a.destructor();\n 10 > this.eventPool.length && this.eventPool.push(a);\n}\n\nfunction de(a) {\n a.eventPool = [];\n a.getPooled = ee;\n a.release = fe;\n}\n\nvar ge = G.extend({\n data: null\n}),\n he = G.extend({\n data: null\n}),\n ie = [9, 13, 27, 32],\n je = ya && \"CompositionEvent\" in window,\n ke = null;\nya && \"documentMode\" in document && (ke = document.documentMode);\nvar le = ya && \"TextEvent\" in window && !ke,\n me = ya && (!je || ke && 8 < ke && 11 >= ke),\n ne = String.fromCharCode(32),\n oe = {\n beforeInput: {\n phasedRegistrationNames: {\n bubbled: \"onBeforeInput\",\n captured: \"onBeforeInputCapture\"\n },\n dependencies: [\"compositionend\", \"keypress\", \"textInput\", \"paste\"]\n },\n compositionEnd: {\n phasedRegistrationNames: {\n bubbled: \"onCompositionEnd\",\n captured: \"onCompositionEndCapture\"\n },\n dependencies: \"blur compositionend keydown keypress keyup mousedown\".split(\" \")\n },\n compositionStart: {\n phasedRegistrationNames: {\n bubbled: \"onCompositionStart\",\n captured: \"onCompositionStartCapture\"\n },\n dependencies: \"blur compositionstart keydown keypress keyup mousedown\".split(\" \")\n },\n compositionUpdate: {\n phasedRegistrationNames: {\n bubbled: \"onCompositionUpdate\",\n captured: \"onCompositionUpdateCapture\"\n },\n dependencies: \"blur compositionupdate keydown keypress keyup mousedown\".split(\" \")\n }\n},\n pe = !1;\n\nfunction qe(a, b) {\n switch (a) {\n case \"keyup\":\n return -1 !== ie.indexOf(b.keyCode);\n\n case \"keydown\":\n return 229 !== b.keyCode;\n\n case \"keypress\":\n case \"mousedown\":\n case \"blur\":\n return !0;\n\n default:\n return !1;\n }\n}\n\nfunction re(a) {\n a = a.detail;\n return \"object\" === typeof a && \"data\" in a ? a.data : null;\n}\n\nvar se = !1;\n\nfunction te(a, b) {\n switch (a) {\n case \"compositionend\":\n return re(b);\n\n case \"keypress\":\n if (32 !== b.which) return null;\n pe = !0;\n return ne;\n\n case \"textInput\":\n return a = b.data, a === ne && pe ? null : a;\n\n default:\n return null;\n }\n}\n\nfunction ue(a, b) {\n if (se) return \"compositionend\" === a || !je && qe(a, b) ? (a = ae(), $d = Zd = Yd = null, se = !1, a) : null;\n\n switch (a) {\n case \"paste\":\n return null;\n\n case \"keypress\":\n if (!(b.ctrlKey || b.altKey || b.metaKey) || b.ctrlKey && b.altKey) {\n if (b.char && 1 < b.char.length) return b.char;\n if (b.which) return String.fromCharCode(b.which);\n }\n\n return null;\n\n case \"compositionend\":\n return me && \"ko\" !== b.locale ? null : b.data;\n\n default:\n return null;\n }\n}\n\nvar ve = {\n eventTypes: oe,\n extractEvents: function extractEvents(a, b, c, d) {\n var e;\n if (je) b: {\n switch (a) {\n case \"compositionstart\":\n var f = oe.compositionStart;\n break b;\n\n case \"compositionend\":\n f = oe.compositionEnd;\n break b;\n\n case \"compositionupdate\":\n f = oe.compositionUpdate;\n break b;\n }\n\n f = void 0;\n } else se ? qe(a, c) && (f = oe.compositionEnd) : \"keydown\" === a && 229 === c.keyCode && (f = oe.compositionStart);\n f ? (me && \"ko\" !== c.locale && (se || f !== oe.compositionStart ? f === oe.compositionEnd && se && (e = ae()) : (Yd = d, Zd = \"value\" in Yd ? Yd.value : Yd.textContent, se = !0)), f = ge.getPooled(f, b, c, d), e ? f.data = e : (e = re(c), null !== e && (f.data = e)), Xd(f), e = f) : e = null;\n (a = le ? te(a, c) : ue(a, c)) ? (b = he.getPooled(oe.beforeInput, b, c, d), b.data = a, Xd(b)) : b = null;\n return null === e ? b : null === b ? e : [e, b];\n }\n},\n we = {\n color: !0,\n date: !0,\n datetime: !0,\n \"datetime-local\": !0,\n email: !0,\n month: !0,\n number: !0,\n password: !0,\n range: !0,\n search: !0,\n tel: !0,\n text: !0,\n time: !0,\n url: !0,\n week: !0\n};\n\nfunction xe(a) {\n var b = a && a.nodeName && a.nodeName.toLowerCase();\n return \"input\" === b ? !!we[a.type] : \"textarea\" === b ? !0 : !1;\n}\n\nvar ye = {\n change: {\n phasedRegistrationNames: {\n bubbled: \"onChange\",\n captured: \"onChangeCapture\"\n },\n dependencies: \"blur change click focus input keydown keyup selectionchange\".split(\" \")\n }\n};\n\nfunction ze(a, b, c) {\n a = G.getPooled(ye.change, a, b, c);\n a.type = \"change\";\n Da(c);\n Xd(a);\n return a;\n}\n\nvar Ae = null,\n Be = null;\n\nfunction Ce(a) {\n mc(a);\n}\n\nfunction De(a) {\n var b = Pd(a);\n if (yb(b)) return a;\n}\n\nfunction Ee(a, b) {\n if (\"change\" === a) return b;\n}\n\nvar Fe = !1;\nya && (Fe = oc(\"input\") && (!document.documentMode || 9 < document.documentMode));\n\nfunction Ge() {\n Ae && (Ae.detachEvent(\"onpropertychange\", He), Be = Ae = null);\n}\n\nfunction He(a) {\n if (\"value\" === a.propertyName && De(Be)) if (a = ze(Be, a, nc(a)), Ja) mc(a);else {\n Ja = !0;\n\n try {\n Fa(Ce, a);\n } finally {\n Ja = !1, La();\n }\n }\n}\n\nfunction Ie(a, b, c) {\n \"focus\" === a ? (Ge(), Ae = b, Be = c, Ae.attachEvent(\"onpropertychange\", He)) : \"blur\" === a && Ge();\n}\n\nfunction Je(a) {\n if (\"selectionchange\" === a || \"keyup\" === a || \"keydown\" === a) return De(Be);\n}\n\nfunction Ke(a, b) {\n if (\"click\" === a) return De(b);\n}\n\nfunction Le(a, b) {\n if (\"input\" === a || \"change\" === a) return De(b);\n}\n\nvar Me = {\n eventTypes: ye,\n _isInputEventSupported: Fe,\n extractEvents: function extractEvents(a, b, c, d) {\n var e = b ? Pd(b) : window,\n f = e.nodeName && e.nodeName.toLowerCase();\n if (\"select\" === f || \"input\" === f && \"file\" === e.type) var g = Ee;else if (xe(e)) {\n if (Fe) g = Le;else {\n g = Je;\n var h = Ie;\n }\n } else (f = e.nodeName) && \"input\" === f.toLowerCase() && (\"checkbox\" === e.type || \"radio\" === e.type) && (g = Ke);\n if (g && (g = g(a, b))) return ze(g, c, d);\n h && h(a, e, b);\n \"blur\" === a && (a = e._wrapperState) && a.controlled && \"number\" === e.type && Db(e, \"number\", e.value);\n }\n},\n Ne = G.extend({\n view: null,\n detail: null\n}),\n Oe = {\n Alt: \"altKey\",\n Control: \"ctrlKey\",\n Meta: \"metaKey\",\n Shift: \"shiftKey\"\n};\n\nfunction Pe(a) {\n var b = this.nativeEvent;\n return b.getModifierState ? b.getModifierState(a) : (a = Oe[a]) ? !!b[a] : !1;\n}\n\nfunction Qe() {\n return Pe;\n}\n\nvar Re = 0,\n Se = 0,\n Te = !1,\n Ue = !1,\n Ve = Ne.extend({\n screenX: null,\n screenY: null,\n clientX: null,\n clientY: null,\n pageX: null,\n pageY: null,\n ctrlKey: null,\n shiftKey: null,\n altKey: null,\n metaKey: null,\n getModifierState: Qe,\n button: null,\n buttons: null,\n relatedTarget: function relatedTarget(a) {\n return a.relatedTarget || (a.fromElement === a.srcElement ? a.toElement : a.fromElement);\n },\n movementX: function movementX(a) {\n if (\"movementX\" in a) return a.movementX;\n var b = Re;\n Re = a.screenX;\n return Te ? \"mousemove\" === a.type ? a.screenX - b : 0 : (Te = !0, 0);\n },\n movementY: function movementY(a) {\n if (\"movementY\" in a) return a.movementY;\n var b = Se;\n Se = a.screenY;\n return Ue ? \"mousemove\" === a.type ? a.screenY - b : 0 : (Ue = !0, 0);\n }\n}),\n We = Ve.extend({\n pointerId: null,\n width: null,\n height: null,\n pressure: null,\n tangentialPressure: null,\n tiltX: null,\n tiltY: null,\n twist: null,\n pointerType: null,\n isPrimary: null\n}),\n Xe = {\n mouseEnter: {\n registrationName: \"onMouseEnter\",\n dependencies: [\"mouseout\", \"mouseover\"]\n },\n mouseLeave: {\n registrationName: \"onMouseLeave\",\n dependencies: [\"mouseout\", \"mouseover\"]\n },\n pointerEnter: {\n registrationName: \"onPointerEnter\",\n dependencies: [\"pointerout\", \"pointerover\"]\n },\n pointerLeave: {\n registrationName: \"onPointerLeave\",\n dependencies: [\"pointerout\", \"pointerover\"]\n }\n},\n Ye = {\n eventTypes: Xe,\n extractEvents: function extractEvents(a, b, c, d, e) {\n var f = \"mouseover\" === a || \"pointerover\" === a,\n g = \"mouseout\" === a || \"pointerout\" === a;\n if (f && 0 === (e & 32) && (c.relatedTarget || c.fromElement) || !g && !f) return null;\n f = d.window === d ? d : (f = d.ownerDocument) ? f.defaultView || f.parentWindow : window;\n\n if (g) {\n if (g = b, b = (b = c.relatedTarget || c.toElement) ? tc(b) : null, null !== b) {\n var h = dc(b);\n if (b !== h || 5 !== b.tag && 6 !== b.tag) b = null;\n }\n } else g = null;\n\n if (g === b) return null;\n\n if (\"mouseout\" === a || \"mouseover\" === a) {\n var k = Ve;\n var l = Xe.mouseLeave;\n var m = Xe.mouseEnter;\n var p = \"mouse\";\n } else if (\"pointerout\" === a || \"pointerover\" === a) k = We, l = Xe.pointerLeave, m = Xe.pointerEnter, p = \"pointer\";\n\n a = null == g ? f : Pd(g);\n f = null == b ? f : Pd(b);\n l = k.getPooled(l, g, c, d);\n l.type = p + \"leave\";\n l.target = a;\n l.relatedTarget = f;\n c = k.getPooled(m, b, c, d);\n c.type = p + \"enter\";\n c.target = f;\n c.relatedTarget = a;\n d = g;\n p = b;\n if (d && p) a: {\n k = d;\n m = p;\n g = 0;\n\n for (a = k; a; a = Rd(a)) {\n g++;\n }\n\n a = 0;\n\n for (b = m; b; b = Rd(b)) {\n a++;\n }\n\n for (; 0 < g - a;) {\n k = Rd(k), g--;\n }\n\n for (; 0 < a - g;) {\n m = Rd(m), a--;\n }\n\n for (; g--;) {\n if (k === m || k === m.alternate) break a;\n k = Rd(k);\n m = Rd(m);\n }\n\n k = null;\n } else k = null;\n m = k;\n\n for (k = []; d && d !== m;) {\n g = d.alternate;\n if (null !== g && g === m) break;\n k.push(d);\n d = Rd(d);\n }\n\n for (d = []; p && p !== m;) {\n g = p.alternate;\n if (null !== g && g === m) break;\n d.push(p);\n p = Rd(p);\n }\n\n for (p = 0; p < k.length; p++) {\n Vd(k[p], \"bubbled\", l);\n }\n\n for (p = d.length; 0 < p--;) {\n Vd(d[p], \"captured\", c);\n }\n\n return 0 === (e & 64) ? [l] : [l, c];\n }\n};\n\nfunction Ze(a, b) {\n return a === b && (0 !== a || 1 / a === 1 / b) || a !== a && b !== b;\n}\n\nvar $e = \"function\" === typeof Object.is ? Object.is : Ze,\n af = Object.prototype.hasOwnProperty;\n\nfunction bf(a, b) {\n if ($e(a, b)) return !0;\n if (\"object\" !== typeof a || null === a || \"object\" !== typeof b || null === b) return !1;\n var c = Object.keys(a),\n d = Object.keys(b);\n if (c.length !== d.length) return !1;\n\n for (d = 0; d < c.length; d++) {\n if (!af.call(b, c[d]) || !$e(a[c[d]], b[c[d]])) return !1;\n }\n\n return !0;\n}\n\nvar cf = ya && \"documentMode\" in document && 11 >= document.documentMode,\n df = {\n select: {\n phasedRegistrationNames: {\n bubbled: \"onSelect\",\n captured: \"onSelectCapture\"\n },\n dependencies: \"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange\".split(\" \")\n }\n},\n ef = null,\n ff = null,\n gf = null,\n hf = !1;\n\nfunction jf(a, b) {\n var c = b.window === b ? b.document : 9 === b.nodeType ? b : b.ownerDocument;\n if (hf || null == ef || ef !== td(c)) return null;\n c = ef;\n \"selectionStart\" in c && yd(c) ? c = {\n start: c.selectionStart,\n end: c.selectionEnd\n } : (c = (c.ownerDocument && c.ownerDocument.defaultView || window).getSelection(), c = {\n anchorNode: c.anchorNode,\n anchorOffset: c.anchorOffset,\n focusNode: c.focusNode,\n focusOffset: c.focusOffset\n });\n return gf && bf(gf, c) ? null : (gf = c, a = G.getPooled(df.select, ff, a, b), a.type = \"select\", a.target = ef, Xd(a), a);\n}\n\nvar kf = {\n eventTypes: df,\n extractEvents: function extractEvents(a, b, c, d, e, f) {\n e = f || (d.window === d ? d.document : 9 === d.nodeType ? d : d.ownerDocument);\n\n if (!(f = !e)) {\n a: {\n e = cc(e);\n f = wa.onSelect;\n\n for (var g = 0; g < f.length; g++) {\n if (!e.has(f[g])) {\n e = !1;\n break a;\n }\n }\n\n e = !0;\n }\n\n f = !e;\n }\n\n if (f) return null;\n e = b ? Pd(b) : window;\n\n switch (a) {\n case \"focus\":\n if (xe(e) || \"true\" === e.contentEditable) ef = e, ff = b, gf = null;\n break;\n\n case \"blur\":\n gf = ff = ef = null;\n break;\n\n case \"mousedown\":\n hf = !0;\n break;\n\n case \"contextmenu\":\n case \"mouseup\":\n case \"dragend\":\n return hf = !1, jf(c, d);\n\n case \"selectionchange\":\n if (cf) break;\n\n case \"keydown\":\n case \"keyup\":\n return jf(c, d);\n }\n\n return null;\n }\n},\n lf = G.extend({\n animationName: null,\n elapsedTime: null,\n pseudoElement: null\n}),\n mf = G.extend({\n clipboardData: function clipboardData(a) {\n return \"clipboardData\" in a ? a.clipboardData : window.clipboardData;\n }\n}),\n nf = Ne.extend({\n relatedTarget: null\n});\n\nfunction of(a) {\n var b = a.keyCode;\n \"charCode\" in a ? (a = a.charCode, 0 === a && 13 === b && (a = 13)) : a = b;\n 10 === a && (a = 13);\n return 32 <= a || 13 === a ? a : 0;\n}\n\nvar pf = {\n Esc: \"Escape\",\n Spacebar: \" \",\n Left: \"ArrowLeft\",\n Up: \"ArrowUp\",\n Right: \"ArrowRight\",\n Down: \"ArrowDown\",\n Del: \"Delete\",\n Win: \"OS\",\n Menu: \"ContextMenu\",\n Apps: \"ContextMenu\",\n Scroll: \"ScrollLock\",\n MozPrintableKey: \"Unidentified\"\n},\n qf = {\n 8: \"Backspace\",\n 9: \"Tab\",\n 12: \"Clear\",\n 13: \"Enter\",\n 16: \"Shift\",\n 17: \"Control\",\n 18: \"Alt\",\n 19: \"Pause\",\n 20: \"CapsLock\",\n 27: \"Escape\",\n 32: \" \",\n 33: \"PageUp\",\n 34: \"PageDown\",\n 35: \"End\",\n 36: \"Home\",\n 37: \"ArrowLeft\",\n 38: \"ArrowUp\",\n 39: \"ArrowRight\",\n 40: \"ArrowDown\",\n 45: \"Insert\",\n 46: \"Delete\",\n 112: \"F1\",\n 113: \"F2\",\n 114: \"F3\",\n 115: \"F4\",\n 116: \"F5\",\n 117: \"F6\",\n 118: \"F7\",\n 119: \"F8\",\n 120: \"F9\",\n 121: \"F10\",\n 122: \"F11\",\n 123: \"F12\",\n 144: \"NumLock\",\n 145: \"ScrollLock\",\n 224: \"Meta\"\n},\n rf = Ne.extend({\n key: function key(a) {\n if (a.key) {\n var b = pf[a.key] || a.key;\n if (\"Unidentified\" !== b) return b;\n }\n\n return \"keypress\" === a.type ? (a = of(a), 13 === a ? \"Enter\" : String.fromCharCode(a)) : \"keydown\" === a.type || \"keyup\" === a.type ? qf[a.keyCode] || \"Unidentified\" : \"\";\n },\n location: null,\n ctrlKey: null,\n shiftKey: null,\n altKey: null,\n metaKey: null,\n repeat: null,\n locale: null,\n getModifierState: Qe,\n charCode: function charCode(a) {\n return \"keypress\" === a.type ? of(a) : 0;\n },\n keyCode: function keyCode(a) {\n return \"keydown\" === a.type || \"keyup\" === a.type ? a.keyCode : 0;\n },\n which: function which(a) {\n return \"keypress\" === a.type ? of(a) : \"keydown\" === a.type || \"keyup\" === a.type ? a.keyCode : 0;\n }\n}),\n sf = Ve.extend({\n dataTransfer: null\n}),\n tf = Ne.extend({\n touches: null,\n targetTouches: null,\n changedTouches: null,\n altKey: null,\n metaKey: null,\n ctrlKey: null,\n shiftKey: null,\n getModifierState: Qe\n}),\n uf = G.extend({\n propertyName: null,\n elapsedTime: null,\n pseudoElement: null\n}),\n vf = Ve.extend({\n deltaX: function deltaX(a) {\n return \"deltaX\" in a ? a.deltaX : \"wheelDeltaX\" in a ? -a.wheelDeltaX : 0;\n },\n deltaY: function deltaY(a) {\n return \"deltaY\" in a ? a.deltaY : \"wheelDeltaY\" in a ? -a.wheelDeltaY : \"wheelDelta\" in a ? -a.wheelDelta : 0;\n },\n deltaZ: null,\n deltaMode: null\n}),\n wf = {\n eventTypes: Wc,\n extractEvents: function extractEvents(a, b, c, d) {\n var e = Yc.get(a);\n if (!e) return null;\n\n switch (a) {\n case \"keypress\":\n if (0 === of(c)) return null;\n\n case \"keydown\":\n case \"keyup\":\n a = rf;\n break;\n\n case \"blur\":\n case \"focus\":\n a = nf;\n break;\n\n case \"click\":\n if (2 === c.button) return null;\n\n case \"auxclick\":\n case \"dblclick\":\n case \"mousedown\":\n case \"mousemove\":\n case \"mouseup\":\n case \"mouseout\":\n case \"mouseover\":\n case \"contextmenu\":\n a = Ve;\n break;\n\n case \"drag\":\n case \"dragend\":\n case \"dragenter\":\n case \"dragexit\":\n case \"dragleave\":\n case \"dragover\":\n case \"dragstart\":\n case \"drop\":\n a = sf;\n break;\n\n case \"touchcancel\":\n case \"touchend\":\n case \"touchmove\":\n case \"touchstart\":\n a = tf;\n break;\n\n case Xb:\n case Yb:\n case Zb:\n a = lf;\n break;\n\n case $b:\n a = uf;\n break;\n\n case \"scroll\":\n a = Ne;\n break;\n\n case \"wheel\":\n a = vf;\n break;\n\n case \"copy\":\n case \"cut\":\n case \"paste\":\n a = mf;\n break;\n\n case \"gotpointercapture\":\n case \"lostpointercapture\":\n case \"pointercancel\":\n case \"pointerdown\":\n case \"pointermove\":\n case \"pointerout\":\n case \"pointerover\":\n case \"pointerup\":\n a = We;\n break;\n\n default:\n a = G;\n }\n\n b = a.getPooled(e, b, c, d);\n Xd(b);\n return b;\n }\n};\nif (pa) throw Error(u(101));\npa = Array.prototype.slice.call(\"ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin\".split(\" \"));\nra();\nvar xf = Nc;\nla = Qd;\nma = xf;\nna = Pd;\nxa({\n SimpleEventPlugin: wf,\n EnterLeaveEventPlugin: Ye,\n ChangeEventPlugin: Me,\n SelectEventPlugin: kf,\n BeforeInputEventPlugin: ve\n});\nvar yf = [],\n zf = -1;\n\nfunction H(a) {\n 0 > zf || (a.current = yf[zf], yf[zf] = null, zf--);\n}\n\nfunction I(a, b) {\n zf++;\n yf[zf] = a.current;\n a.current = b;\n}\n\nvar Af = {},\n J = {\n current: Af\n},\n K = {\n current: !1\n},\n Bf = Af;\n\nfunction Cf(a, b) {\n var c = a.type.contextTypes;\n if (!c) return Af;\n var d = a.stateNode;\n if (d && d.__reactInternalMemoizedUnmaskedChildContext === b) return d.__reactInternalMemoizedMaskedChildContext;\n var e = {},\n f;\n\n for (f in c) {\n e[f] = b[f];\n }\n\n d && (a = a.stateNode, a.__reactInternalMemoizedUnmaskedChildContext = b, a.__reactInternalMemoizedMaskedChildContext = e);\n return e;\n}\n\nfunction L(a) {\n a = a.childContextTypes;\n return null !== a && void 0 !== a;\n}\n\nfunction Df() {\n H(K);\n H(J);\n}\n\nfunction Ef(a, b, c) {\n if (J.current !== Af) throw Error(u(168));\n I(J, b);\n I(K, c);\n}\n\nfunction Ff(a, b, c) {\n var d = a.stateNode;\n a = b.childContextTypes;\n if (\"function\" !== typeof d.getChildContext) return c;\n d = d.getChildContext();\n\n for (var e in d) {\n if (!(e in a)) throw Error(u(108, pb(b) || \"Unknown\", e));\n }\n\n return n({}, c, {}, d);\n}\n\nfunction Gf(a) {\n a = (a = a.stateNode) && a.__reactInternalMemoizedMergedChildContext || Af;\n Bf = J.current;\n I(J, a);\n I(K, K.current);\n return !0;\n}\n\nfunction Hf(a, b, c) {\n var d = a.stateNode;\n if (!d) throw Error(u(169));\n c ? (a = Ff(a, b, Bf), d.__reactInternalMemoizedMergedChildContext = a, H(K), H(J), I(J, a)) : H(K);\n I(K, c);\n}\n\nvar If = r.unstable_runWithPriority,\n Jf = r.unstable_scheduleCallback,\n Kf = r.unstable_cancelCallback,\n Lf = r.unstable_requestPaint,\n Mf = r.unstable_now,\n Nf = r.unstable_getCurrentPriorityLevel,\n Of = r.unstable_ImmediatePriority,\n Pf = r.unstable_UserBlockingPriority,\n Qf = r.unstable_NormalPriority,\n Rf = r.unstable_LowPriority,\n Sf = r.unstable_IdlePriority,\n Tf = {},\n Uf = r.unstable_shouldYield,\n Vf = void 0 !== Lf ? Lf : function () {},\n Wf = null,\n Xf = null,\n Yf = !1,\n Zf = Mf(),\n $f = 1E4 > Zf ? Mf : function () {\n return Mf() - Zf;\n};\n\nfunction ag() {\n switch (Nf()) {\n case Of:\n return 99;\n\n case Pf:\n return 98;\n\n case Qf:\n return 97;\n\n case Rf:\n return 96;\n\n case Sf:\n return 95;\n\n default:\n throw Error(u(332));\n }\n}\n\nfunction bg(a) {\n switch (a) {\n case 99:\n return Of;\n\n case 98:\n return Pf;\n\n case 97:\n return Qf;\n\n case 96:\n return Rf;\n\n case 95:\n return Sf;\n\n default:\n throw Error(u(332));\n }\n}\n\nfunction cg(a, b) {\n a = bg(a);\n return If(a, b);\n}\n\nfunction dg(a, b, c) {\n a = bg(a);\n return Jf(a, b, c);\n}\n\nfunction eg(a) {\n null === Wf ? (Wf = [a], Xf = Jf(Of, fg)) : Wf.push(a);\n return Tf;\n}\n\nfunction gg() {\n if (null !== Xf) {\n var a = Xf;\n Xf = null;\n Kf(a);\n }\n\n fg();\n}\n\nfunction fg() {\n if (!Yf && null !== Wf) {\n Yf = !0;\n var a = 0;\n\n try {\n var b = Wf;\n cg(99, function () {\n for (; a < b.length; a++) {\n var c = b[a];\n\n do {\n c = c(!0);\n } while (null !== c);\n }\n });\n Wf = null;\n } catch (c) {\n throw null !== Wf && (Wf = Wf.slice(a + 1)), Jf(Of, gg), c;\n } finally {\n Yf = !1;\n }\n }\n}\n\nfunction hg(a, b, c) {\n c /= 10;\n return 1073741821 - (((1073741821 - a + b / 10) / c | 0) + 1) * c;\n}\n\nfunction ig(a, b) {\n if (a && a.defaultProps) {\n b = n({}, b);\n a = a.defaultProps;\n\n for (var c in a) {\n void 0 === b[c] && (b[c] = a[c]);\n }\n }\n\n return b;\n}\n\nvar jg = {\n current: null\n},\n kg = null,\n lg = null,\n mg = null;\n\nfunction ng() {\n mg = lg = kg = null;\n}\n\nfunction og(a) {\n var b = jg.current;\n H(jg);\n a.type._context._currentValue = b;\n}\n\nfunction pg(a, b) {\n for (; null !== a;) {\n var c = a.alternate;\n if (a.childExpirationTime < b) a.childExpirationTime = b, null !== c && c.childExpirationTime < b && (c.childExpirationTime = b);else if (null !== c && c.childExpirationTime < b) c.childExpirationTime = b;else break;\n a = a.return;\n }\n}\n\nfunction qg(a, b) {\n kg = a;\n mg = lg = null;\n a = a.dependencies;\n null !== a && null !== a.firstContext && (a.expirationTime >= b && (rg = !0), a.firstContext = null);\n}\n\nfunction sg(a, b) {\n if (mg !== a && !1 !== b && 0 !== b) {\n if (\"number\" !== typeof b || 1073741823 === b) mg = a, b = 1073741823;\n b = {\n context: a,\n observedBits: b,\n next: null\n };\n\n if (null === lg) {\n if (null === kg) throw Error(u(308));\n lg = b;\n kg.dependencies = {\n expirationTime: 0,\n firstContext: b,\n responders: null\n };\n } else lg = lg.next = b;\n }\n\n return a._currentValue;\n}\n\nvar tg = !1;\n\nfunction ug(a) {\n a.updateQueue = {\n baseState: a.memoizedState,\n baseQueue: null,\n shared: {\n pending: null\n },\n effects: null\n };\n}\n\nfunction vg(a, b) {\n a = a.updateQueue;\n b.updateQueue === a && (b.updateQueue = {\n baseState: a.baseState,\n baseQueue: a.baseQueue,\n shared: a.shared,\n effects: a.effects\n });\n}\n\nfunction wg(a, b) {\n a = {\n expirationTime: a,\n suspenseConfig: b,\n tag: 0,\n payload: null,\n callback: null,\n next: null\n };\n return a.next = a;\n}\n\nfunction xg(a, b) {\n a = a.updateQueue;\n\n if (null !== a) {\n a = a.shared;\n var c = a.pending;\n null === c ? b.next = b : (b.next = c.next, c.next = b);\n a.pending = b;\n }\n}\n\nfunction yg(a, b) {\n var c = a.alternate;\n null !== c && vg(c, a);\n a = a.updateQueue;\n c = a.baseQueue;\n null === c ? (a.baseQueue = b.next = b, b.next = b) : (b.next = c.next, c.next = b);\n}\n\nfunction zg(a, b, c, d) {\n var e = a.updateQueue;\n tg = !1;\n var f = e.baseQueue,\n g = e.shared.pending;\n\n if (null !== g) {\n if (null !== f) {\n var h = f.next;\n f.next = g.next;\n g.next = h;\n }\n\n f = g;\n e.shared.pending = null;\n h = a.alternate;\n null !== h && (h = h.updateQueue, null !== h && (h.baseQueue = g));\n }\n\n if (null !== f) {\n h = f.next;\n var k = e.baseState,\n l = 0,\n m = null,\n p = null,\n x = null;\n\n if (null !== h) {\n var z = h;\n\n do {\n g = z.expirationTime;\n\n if (g < d) {\n var ca = {\n expirationTime: z.expirationTime,\n suspenseConfig: z.suspenseConfig,\n tag: z.tag,\n payload: z.payload,\n callback: z.callback,\n next: null\n };\n null === x ? (p = x = ca, m = k) : x = x.next = ca;\n g > l && (l = g);\n } else {\n null !== x && (x = x.next = {\n expirationTime: 1073741823,\n suspenseConfig: z.suspenseConfig,\n tag: z.tag,\n payload: z.payload,\n callback: z.callback,\n next: null\n });\n Ag(g, z.suspenseConfig);\n\n a: {\n var D = a,\n t = z;\n g = b;\n ca = c;\n\n switch (t.tag) {\n case 1:\n D = t.payload;\n\n if (\"function\" === typeof D) {\n k = D.call(ca, k, g);\n break a;\n }\n\n k = D;\n break a;\n\n case 3:\n D.effectTag = D.effectTag & -4097 | 64;\n\n case 0:\n D = t.payload;\n g = \"function\" === typeof D ? D.call(ca, k, g) : D;\n if (null === g || void 0 === g) break a;\n k = n({}, k, g);\n break a;\n\n case 2:\n tg = !0;\n }\n }\n\n null !== z.callback && (a.effectTag |= 32, g = e.effects, null === g ? e.effects = [z] : g.push(z));\n }\n\n z = z.next;\n if (null === z || z === h) if (g = e.shared.pending, null === g) break;else z = f.next = g.next, g.next = h, e.baseQueue = f = g, e.shared.pending = null;\n } while (1);\n }\n\n null === x ? m = k : x.next = p;\n e.baseState = m;\n e.baseQueue = x;\n Bg(l);\n a.expirationTime = l;\n a.memoizedState = k;\n }\n}\n\nfunction Cg(a, b, c) {\n a = b.effects;\n b.effects = null;\n if (null !== a) for (b = 0; b < a.length; b++) {\n var d = a[b],\n e = d.callback;\n\n if (null !== e) {\n d.callback = null;\n d = e;\n e = c;\n if (\"function\" !== typeof d) throw Error(u(191, d));\n d.call(e);\n }\n }\n}\n\nvar Dg = Wa.ReactCurrentBatchConfig,\n Eg = new aa.Component().refs;\n\nfunction Fg(a, b, c, d) {\n b = a.memoizedState;\n c = c(d, b);\n c = null === c || void 0 === c ? b : n({}, b, c);\n a.memoizedState = c;\n 0 === a.expirationTime && (a.updateQueue.baseState = c);\n}\n\nvar Jg = {\n isMounted: function isMounted(a) {\n return (a = a._reactInternalFiber) ? dc(a) === a : !1;\n },\n enqueueSetState: function enqueueSetState(a, b, c) {\n a = a._reactInternalFiber;\n var d = Gg(),\n e = Dg.suspense;\n d = Hg(d, a, e);\n e = wg(d, e);\n e.payload = b;\n void 0 !== c && null !== c && (e.callback = c);\n xg(a, e);\n Ig(a, d);\n },\n enqueueReplaceState: function enqueueReplaceState(a, b, c) {\n a = a._reactInternalFiber;\n var d = Gg(),\n e = Dg.suspense;\n d = Hg(d, a, e);\n e = wg(d, e);\n e.tag = 1;\n e.payload = b;\n void 0 !== c && null !== c && (e.callback = c);\n xg(a, e);\n Ig(a, d);\n },\n enqueueForceUpdate: function enqueueForceUpdate(a, b) {\n a = a._reactInternalFiber;\n var c = Gg(),\n d = Dg.suspense;\n c = Hg(c, a, d);\n d = wg(c, d);\n d.tag = 2;\n void 0 !== b && null !== b && (d.callback = b);\n xg(a, d);\n Ig(a, c);\n }\n};\n\nfunction Kg(a, b, c, d, e, f, g) {\n a = a.stateNode;\n return \"function\" === typeof a.shouldComponentUpdate ? a.shouldComponentUpdate(d, f, g) : b.prototype && b.prototype.isPureReactComponent ? !bf(c, d) || !bf(e, f) : !0;\n}\n\nfunction Lg(a, b, c) {\n var d = !1,\n e = Af;\n var f = b.contextType;\n \"object\" === typeof f && null !== f ? f = sg(f) : (e = L(b) ? Bf : J.current, d = b.contextTypes, f = (d = null !== d && void 0 !== d) ? Cf(a, e) : Af);\n b = new b(c, f);\n a.memoizedState = null !== b.state && void 0 !== b.state ? b.state : null;\n b.updater = Jg;\n a.stateNode = b;\n b._reactInternalFiber = a;\n d && (a = a.stateNode, a.__reactInternalMemoizedUnmaskedChildContext = e, a.__reactInternalMemoizedMaskedChildContext = f);\n return b;\n}\n\nfunction Mg(a, b, c, d) {\n a = b.state;\n \"function\" === typeof b.componentWillReceiveProps && b.componentWillReceiveProps(c, d);\n \"function\" === typeof b.UNSAFE_componentWillReceiveProps && b.UNSAFE_componentWillReceiveProps(c, d);\n b.state !== a && Jg.enqueueReplaceState(b, b.state, null);\n}\n\nfunction Ng(a, b, c, d) {\n var e = a.stateNode;\n e.props = c;\n e.state = a.memoizedState;\n e.refs = Eg;\n ug(a);\n var f = b.contextType;\n \"object\" === typeof f && null !== f ? e.context = sg(f) : (f = L(b) ? Bf : J.current, e.context = Cf(a, f));\n zg(a, c, e, d);\n e.state = a.memoizedState;\n f = b.getDerivedStateFromProps;\n \"function\" === typeof f && (Fg(a, b, f, c), e.state = a.memoizedState);\n \"function\" === typeof b.getDerivedStateFromProps || \"function\" === typeof e.getSnapshotBeforeUpdate || \"function\" !== typeof e.UNSAFE_componentWillMount && \"function\" !== typeof e.componentWillMount || (b = e.state, \"function\" === typeof e.componentWillMount && e.componentWillMount(), \"function\" === typeof e.UNSAFE_componentWillMount && e.UNSAFE_componentWillMount(), b !== e.state && Jg.enqueueReplaceState(e, e.state, null), zg(a, c, e, d), e.state = a.memoizedState);\n \"function\" === typeof e.componentDidMount && (a.effectTag |= 4);\n}\n\nvar Og = Array.isArray;\n\nfunction Pg(a, b, c) {\n a = c.ref;\n\n if (null !== a && \"function\" !== typeof a && \"object\" !== typeof a) {\n if (c._owner) {\n c = c._owner;\n\n if (c) {\n if (1 !== c.tag) throw Error(u(309));\n var d = c.stateNode;\n }\n\n if (!d) throw Error(u(147, a));\n var e = \"\" + a;\n if (null !== b && null !== b.ref && \"function\" === typeof b.ref && b.ref._stringRef === e) return b.ref;\n\n b = function b(a) {\n var b = d.refs;\n b === Eg && (b = d.refs = {});\n null === a ? delete b[e] : b[e] = a;\n };\n\n b._stringRef = e;\n return b;\n }\n\n if (\"string\" !== typeof a) throw Error(u(284));\n if (!c._owner) throw Error(u(290, a));\n }\n\n return a;\n}\n\nfunction Qg(a, b) {\n if (\"textarea\" !== a.type) throw Error(u(31, \"[object Object]\" === Object.prototype.toString.call(b) ? \"object with keys {\" + Object.keys(b).join(\", \") + \"}\" : b, \"\"));\n}\n\nfunction Rg(a) {\n function b(b, c) {\n if (a) {\n var d = b.lastEffect;\n null !== d ? (d.nextEffect = c, b.lastEffect = c) : b.firstEffect = b.lastEffect = c;\n c.nextEffect = null;\n c.effectTag = 8;\n }\n }\n\n function c(c, d) {\n if (!a) return null;\n\n for (; null !== d;) {\n b(c, d), d = d.sibling;\n }\n\n return null;\n }\n\n function d(a, b) {\n for (a = new Map(); null !== b;) {\n null !== b.key ? a.set(b.key, b) : a.set(b.index, b), b = b.sibling;\n }\n\n return a;\n }\n\n function e(a, b) {\n a = Sg(a, b);\n a.index = 0;\n a.sibling = null;\n return a;\n }\n\n function f(b, c, d) {\n b.index = d;\n if (!a) return c;\n d = b.alternate;\n if (null !== d) return d = d.index, d < c ? (b.effectTag = 2, c) : d;\n b.effectTag = 2;\n return c;\n }\n\n function g(b) {\n a && null === b.alternate && (b.effectTag = 2);\n return b;\n }\n\n function h(a, b, c, d) {\n if (null === b || 6 !== b.tag) return b = Tg(c, a.mode, d), b.return = a, b;\n b = e(b, c);\n b.return = a;\n return b;\n }\n\n function k(a, b, c, d) {\n if (null !== b && b.elementType === c.type) return d = e(b, c.props), d.ref = Pg(a, b, c), d.return = a, d;\n d = Ug(c.type, c.key, c.props, null, a.mode, d);\n d.ref = Pg(a, b, c);\n d.return = a;\n return d;\n }\n\n function l(a, b, c, d) {\n if (null === b || 4 !== b.tag || b.stateNode.containerInfo !== c.containerInfo || b.stateNode.implementation !== c.implementation) return b = Vg(c, a.mode, d), b.return = a, b;\n b = e(b, c.children || []);\n b.return = a;\n return b;\n }\n\n function m(a, b, c, d, f) {\n if (null === b || 7 !== b.tag) return b = Wg(c, a.mode, d, f), b.return = a, b;\n b = e(b, c);\n b.return = a;\n return b;\n }\n\n function p(a, b, c) {\n if (\"string\" === typeof b || \"number\" === typeof b) return b = Tg(\"\" + b, a.mode, c), b.return = a, b;\n\n if (\"object\" === typeof b && null !== b) {\n switch (b.$$typeof) {\n case Za:\n return c = Ug(b.type, b.key, b.props, null, a.mode, c), c.ref = Pg(a, null, b), c.return = a, c;\n\n case $a:\n return b = Vg(b, a.mode, c), b.return = a, b;\n }\n\n if (Og(b) || nb(b)) return b = Wg(b, a.mode, c, null), b.return = a, b;\n Qg(a, b);\n }\n\n return null;\n }\n\n function x(a, b, c, d) {\n var e = null !== b ? b.key : null;\n if (\"string\" === typeof c || \"number\" === typeof c) return null !== e ? null : h(a, b, \"\" + c, d);\n\n if (\"object\" === typeof c && null !== c) {\n switch (c.$$typeof) {\n case Za:\n return c.key === e ? c.type === ab ? m(a, b, c.props.children, d, e) : k(a, b, c, d) : null;\n\n case $a:\n return c.key === e ? l(a, b, c, d) : null;\n }\n\n if (Og(c) || nb(c)) return null !== e ? null : m(a, b, c, d, null);\n Qg(a, c);\n }\n\n return null;\n }\n\n function z(a, b, c, d, e) {\n if (\"string\" === typeof d || \"number\" === typeof d) return a = a.get(c) || null, h(b, a, \"\" + d, e);\n\n if (\"object\" === typeof d && null !== d) {\n switch (d.$$typeof) {\n case Za:\n return a = a.get(null === d.key ? c : d.key) || null, d.type === ab ? m(b, a, d.props.children, e, d.key) : k(b, a, d, e);\n\n case $a:\n return a = a.get(null === d.key ? c : d.key) || null, l(b, a, d, e);\n }\n\n if (Og(d) || nb(d)) return a = a.get(c) || null, m(b, a, d, e, null);\n Qg(b, d);\n }\n\n return null;\n }\n\n function ca(e, g, h, k) {\n for (var l = null, t = null, m = g, y = g = 0, A = null; null !== m && y < h.length; y++) {\n m.index > y ? (A = m, m = null) : A = m.sibling;\n var q = x(e, m, h[y], k);\n\n if (null === q) {\n null === m && (m = A);\n break;\n }\n\n a && m && null === q.alternate && b(e, m);\n g = f(q, g, y);\n null === t ? l = q : t.sibling = q;\n t = q;\n m = A;\n }\n\n if (y === h.length) return c(e, m), l;\n\n if (null === m) {\n for (; y < h.length; y++) {\n m = p(e, h[y], k), null !== m && (g = f(m, g, y), null === t ? l = m : t.sibling = m, t = m);\n }\n\n return l;\n }\n\n for (m = d(e, m); y < h.length; y++) {\n A = z(m, e, y, h[y], k), null !== A && (a && null !== A.alternate && m.delete(null === A.key ? y : A.key), g = f(A, g, y), null === t ? l = A : t.sibling = A, t = A);\n }\n\n a && m.forEach(function (a) {\n return b(e, a);\n });\n return l;\n }\n\n function D(e, g, h, l) {\n var k = nb(h);\n if (\"function\" !== typeof k) throw Error(u(150));\n h = k.call(h);\n if (null == h) throw Error(u(151));\n\n for (var m = k = null, t = g, y = g = 0, A = null, q = h.next(); null !== t && !q.done; y++, q = h.next()) {\n t.index > y ? (A = t, t = null) : A = t.sibling;\n var D = x(e, t, q.value, l);\n\n if (null === D) {\n null === t && (t = A);\n break;\n }\n\n a && t && null === D.alternate && b(e, t);\n g = f(D, g, y);\n null === m ? k = D : m.sibling = D;\n m = D;\n t = A;\n }\n\n if (q.done) return c(e, t), k;\n\n if (null === t) {\n for (; !q.done; y++, q = h.next()) {\n q = p(e, q.value, l), null !== q && (g = f(q, g, y), null === m ? k = q : m.sibling = q, m = q);\n }\n\n return k;\n }\n\n for (t = d(e, t); !q.done; y++, q = h.next()) {\n q = z(t, e, y, q.value, l), null !== q && (a && null !== q.alternate && t.delete(null === q.key ? y : q.key), g = f(q, g, y), null === m ? k = q : m.sibling = q, m = q);\n }\n\n a && t.forEach(function (a) {\n return b(e, a);\n });\n return k;\n }\n\n return function (a, d, f, h) {\n var k = \"object\" === typeof f && null !== f && f.type === ab && null === f.key;\n k && (f = f.props.children);\n var l = \"object\" === typeof f && null !== f;\n if (l) switch (f.$$typeof) {\n case Za:\n a: {\n l = f.key;\n\n for (k = d; null !== k;) {\n if (k.key === l) {\n switch (k.tag) {\n case 7:\n if (f.type === ab) {\n c(a, k.sibling);\n d = e(k, f.props.children);\n d.return = a;\n a = d;\n break a;\n }\n\n break;\n\n default:\n if (k.elementType === f.type) {\n c(a, k.sibling);\n d = e(k, f.props);\n d.ref = Pg(a, k, f);\n d.return = a;\n a = d;\n break a;\n }\n\n }\n\n c(a, k);\n break;\n } else b(a, k);\n\n k = k.sibling;\n }\n\n f.type === ab ? (d = Wg(f.props.children, a.mode, h, f.key), d.return = a, a = d) : (h = Ug(f.type, f.key, f.props, null, a.mode, h), h.ref = Pg(a, d, f), h.return = a, a = h);\n }\n\n return g(a);\n\n case $a:\n a: {\n for (k = f.key; null !== d;) {\n if (d.key === k) {\n if (4 === d.tag && d.stateNode.containerInfo === f.containerInfo && d.stateNode.implementation === f.implementation) {\n c(a, d.sibling);\n d = e(d, f.children || []);\n d.return = a;\n a = d;\n break a;\n } else {\n c(a, d);\n break;\n }\n } else b(a, d);\n d = d.sibling;\n }\n\n d = Vg(f, a.mode, h);\n d.return = a;\n a = d;\n }\n\n return g(a);\n }\n if (\"string\" === typeof f || \"number\" === typeof f) return f = \"\" + f, null !== d && 6 === d.tag ? (c(a, d.sibling), d = e(d, f), d.return = a, a = d) : (c(a, d), d = Tg(f, a.mode, h), d.return = a, a = d), g(a);\n if (Og(f)) return ca(a, d, f, h);\n if (nb(f)) return D(a, d, f, h);\n l && Qg(a, f);\n if (\"undefined\" === typeof f && !k) switch (a.tag) {\n case 1:\n case 0:\n throw a = a.type, Error(u(152, a.displayName || a.name || \"Component\"));\n }\n return c(a, d);\n };\n}\n\nvar Xg = Rg(!0),\n Yg = Rg(!1),\n Zg = {},\n $g = {\n current: Zg\n},\n ah = {\n current: Zg\n},\n bh = {\n current: Zg\n};\n\nfunction ch(a) {\n if (a === Zg) throw Error(u(174));\n return a;\n}\n\nfunction dh(a, b) {\n I(bh, b);\n I(ah, a);\n I($g, Zg);\n a = b.nodeType;\n\n switch (a) {\n case 9:\n case 11:\n b = (b = b.documentElement) ? b.namespaceURI : Ob(null, \"\");\n break;\n\n default:\n a = 8 === a ? b.parentNode : b, b = a.namespaceURI || null, a = a.tagName, b = Ob(b, a);\n }\n\n H($g);\n I($g, b);\n}\n\nfunction eh() {\n H($g);\n H(ah);\n H(bh);\n}\n\nfunction fh(a) {\n ch(bh.current);\n var b = ch($g.current);\n var c = Ob(b, a.type);\n b !== c && (I(ah, a), I($g, c));\n}\n\nfunction gh(a) {\n ah.current === a && (H($g), H(ah));\n}\n\nvar M = {\n current: 0\n};\n\nfunction hh(a) {\n for (var b = a; null !== b;) {\n if (13 === b.tag) {\n var c = b.memoizedState;\n if (null !== c && (c = c.dehydrated, null === c || c.data === Bd || c.data === Cd)) return b;\n } else if (19 === b.tag && void 0 !== b.memoizedProps.revealOrder) {\n if (0 !== (b.effectTag & 64)) return b;\n } else if (null !== b.child) {\n b.child.return = b;\n b = b.child;\n continue;\n }\n\n if (b === a) break;\n\n for (; null === b.sibling;) {\n if (null === b.return || b.return === a) return null;\n b = b.return;\n }\n\n b.sibling.return = b.return;\n b = b.sibling;\n }\n\n return null;\n}\n\nfunction ih(a, b) {\n return {\n responder: a,\n props: b\n };\n}\n\nvar jh = Wa.ReactCurrentDispatcher,\n kh = Wa.ReactCurrentBatchConfig,\n lh = 0,\n N = null,\n O = null,\n P = null,\n mh = !1;\n\nfunction Q() {\n throw Error(u(321));\n}\n\nfunction nh(a, b) {\n if (null === b) return !1;\n\n for (var c = 0; c < b.length && c < a.length; c++) {\n if (!$e(a[c], b[c])) return !1;\n }\n\n return !0;\n}\n\nfunction oh(a, b, c, d, e, f) {\n lh = f;\n N = b;\n b.memoizedState = null;\n b.updateQueue = null;\n b.expirationTime = 0;\n jh.current = null === a || null === a.memoizedState ? ph : qh;\n a = c(d, e);\n\n if (b.expirationTime === lh) {\n f = 0;\n\n do {\n b.expirationTime = 0;\n if (!(25 > f)) throw Error(u(301));\n f += 1;\n P = O = null;\n b.updateQueue = null;\n jh.current = rh;\n a = c(d, e);\n } while (b.expirationTime === lh);\n }\n\n jh.current = sh;\n b = null !== O && null !== O.next;\n lh = 0;\n P = O = N = null;\n mh = !1;\n if (b) throw Error(u(300));\n return a;\n}\n\nfunction th() {\n var a = {\n memoizedState: null,\n baseState: null,\n baseQueue: null,\n queue: null,\n next: null\n };\n null === P ? N.memoizedState = P = a : P = P.next = a;\n return P;\n}\n\nfunction uh() {\n if (null === O) {\n var a = N.alternate;\n a = null !== a ? a.memoizedState : null;\n } else a = O.next;\n\n var b = null === P ? N.memoizedState : P.next;\n if (null !== b) P = b, O = a;else {\n if (null === a) throw Error(u(310));\n O = a;\n a = {\n memoizedState: O.memoizedState,\n baseState: O.baseState,\n baseQueue: O.baseQueue,\n queue: O.queue,\n next: null\n };\n null === P ? N.memoizedState = P = a : P = P.next = a;\n }\n return P;\n}\n\nfunction vh(a, b) {\n return \"function\" === typeof b ? b(a) : b;\n}\n\nfunction wh(a) {\n var b = uh(),\n c = b.queue;\n if (null === c) throw Error(u(311));\n c.lastRenderedReducer = a;\n var d = O,\n e = d.baseQueue,\n f = c.pending;\n\n if (null !== f) {\n if (null !== e) {\n var g = e.next;\n e.next = f.next;\n f.next = g;\n }\n\n d.baseQueue = e = f;\n c.pending = null;\n }\n\n if (null !== e) {\n e = e.next;\n d = d.baseState;\n var h = g = f = null,\n k = e;\n\n do {\n var l = k.expirationTime;\n\n if (l < lh) {\n var m = {\n expirationTime: k.expirationTime,\n suspenseConfig: k.suspenseConfig,\n action: k.action,\n eagerReducer: k.eagerReducer,\n eagerState: k.eagerState,\n next: null\n };\n null === h ? (g = h = m, f = d) : h = h.next = m;\n l > N.expirationTime && (N.expirationTime = l, Bg(l));\n } else null !== h && (h = h.next = {\n expirationTime: 1073741823,\n suspenseConfig: k.suspenseConfig,\n action: k.action,\n eagerReducer: k.eagerReducer,\n eagerState: k.eagerState,\n next: null\n }), Ag(l, k.suspenseConfig), d = k.eagerReducer === a ? k.eagerState : a(d, k.action);\n\n k = k.next;\n } while (null !== k && k !== e);\n\n null === h ? f = d : h.next = g;\n $e(d, b.memoizedState) || (rg = !0);\n b.memoizedState = d;\n b.baseState = f;\n b.baseQueue = h;\n c.lastRenderedState = d;\n }\n\n return [b.memoizedState, c.dispatch];\n}\n\nfunction xh(a) {\n var b = uh(),\n c = b.queue;\n if (null === c) throw Error(u(311));\n c.lastRenderedReducer = a;\n var d = c.dispatch,\n e = c.pending,\n f = b.memoizedState;\n\n if (null !== e) {\n c.pending = null;\n var g = e = e.next;\n\n do {\n f = a(f, g.action), g = g.next;\n } while (g !== e);\n\n $e(f, b.memoizedState) || (rg = !0);\n b.memoizedState = f;\n null === b.baseQueue && (b.baseState = f);\n c.lastRenderedState = f;\n }\n\n return [f, d];\n}\n\nfunction yh(a) {\n var b = th();\n \"function\" === typeof a && (a = a());\n b.memoizedState = b.baseState = a;\n a = b.queue = {\n pending: null,\n dispatch: null,\n lastRenderedReducer: vh,\n lastRenderedState: a\n };\n a = a.dispatch = zh.bind(null, N, a);\n return [b.memoizedState, a];\n}\n\nfunction Ah(a, b, c, d) {\n a = {\n tag: a,\n create: b,\n destroy: c,\n deps: d,\n next: null\n };\n b = N.updateQueue;\n null === b ? (b = {\n lastEffect: null\n }, N.updateQueue = b, b.lastEffect = a.next = a) : (c = b.lastEffect, null === c ? b.lastEffect = a.next = a : (d = c.next, c.next = a, a.next = d, b.lastEffect = a));\n return a;\n}\n\nfunction Bh() {\n return uh().memoizedState;\n}\n\nfunction Ch(a, b, c, d) {\n var e = th();\n N.effectTag |= a;\n e.memoizedState = Ah(1 | b, c, void 0, void 0 === d ? null : d);\n}\n\nfunction Dh(a, b, c, d) {\n var e = uh();\n d = void 0 === d ? null : d;\n var f = void 0;\n\n if (null !== O) {\n var g = O.memoizedState;\n f = g.destroy;\n\n if (null !== d && nh(d, g.deps)) {\n Ah(b, c, f, d);\n return;\n }\n }\n\n N.effectTag |= a;\n e.memoizedState = Ah(1 | b, c, f, d);\n}\n\nfunction Eh(a, b) {\n return Ch(516, 4, a, b);\n}\n\nfunction Fh(a, b) {\n return Dh(516, 4, a, b);\n}\n\nfunction Gh(a, b) {\n return Dh(4, 2, a, b);\n}\n\nfunction Hh(a, b) {\n if (\"function\" === typeof b) return a = a(), b(a), function () {\n b(null);\n };\n if (null !== b && void 0 !== b) return a = a(), b.current = a, function () {\n b.current = null;\n };\n}\n\nfunction Ih(a, b, c) {\n c = null !== c && void 0 !== c ? c.concat([a]) : null;\n return Dh(4, 2, Hh.bind(null, b, a), c);\n}\n\nfunction Jh() {}\n\nfunction Kh(a, b) {\n th().memoizedState = [a, void 0 === b ? null : b];\n return a;\n}\n\nfunction Lh(a, b) {\n var c = uh();\n b = void 0 === b ? null : b;\n var d = c.memoizedState;\n if (null !== d && null !== b && nh(b, d[1])) return d[0];\n c.memoizedState = [a, b];\n return a;\n}\n\nfunction Mh(a, b) {\n var c = uh();\n b = void 0 === b ? null : b;\n var d = c.memoizedState;\n if (null !== d && null !== b && nh(b, d[1])) return d[0];\n a = a();\n c.memoizedState = [a, b];\n return a;\n}\n\nfunction Nh(a, b, c) {\n var d = ag();\n cg(98 > d ? 98 : d, function () {\n a(!0);\n });\n cg(97 < d ? 97 : d, function () {\n var d = kh.suspense;\n kh.suspense = void 0 === b ? null : b;\n\n try {\n a(!1), c();\n } finally {\n kh.suspense = d;\n }\n });\n}\n\nfunction zh(a, b, c) {\n var d = Gg(),\n e = Dg.suspense;\n d = Hg(d, a, e);\n e = {\n expirationTime: d,\n suspenseConfig: e,\n action: c,\n eagerReducer: null,\n eagerState: null,\n next: null\n };\n var f = b.pending;\n null === f ? e.next = e : (e.next = f.next, f.next = e);\n b.pending = e;\n f = a.alternate;\n if (a === N || null !== f && f === N) mh = !0, e.expirationTime = lh, N.expirationTime = lh;else {\n if (0 === a.expirationTime && (null === f || 0 === f.expirationTime) && (f = b.lastRenderedReducer, null !== f)) try {\n var g = b.lastRenderedState,\n h = f(g, c);\n e.eagerReducer = f;\n e.eagerState = h;\n if ($e(h, g)) return;\n } catch (k) {} finally {}\n Ig(a, d);\n }\n}\n\nvar sh = {\n readContext: sg,\n useCallback: Q,\n useContext: Q,\n useEffect: Q,\n useImperativeHandle: Q,\n useLayoutEffect: Q,\n useMemo: Q,\n useReducer: Q,\n useRef: Q,\n useState: Q,\n useDebugValue: Q,\n useResponder: Q,\n useDeferredValue: Q,\n useTransition: Q\n},\n ph = {\n readContext: sg,\n useCallback: Kh,\n useContext: sg,\n useEffect: Eh,\n useImperativeHandle: function useImperativeHandle(a, b, c) {\n c = null !== c && void 0 !== c ? c.concat([a]) : null;\n return Ch(4, 2, Hh.bind(null, b, a), c);\n },\n useLayoutEffect: function useLayoutEffect(a, b) {\n return Ch(4, 2, a, b);\n },\n useMemo: function useMemo(a, b) {\n var c = th();\n b = void 0 === b ? null : b;\n a = a();\n c.memoizedState = [a, b];\n return a;\n },\n useReducer: function useReducer(a, b, c) {\n var d = th();\n b = void 0 !== c ? c(b) : b;\n d.memoizedState = d.baseState = b;\n a = d.queue = {\n pending: null,\n dispatch: null,\n lastRenderedReducer: a,\n lastRenderedState: b\n };\n a = a.dispatch = zh.bind(null, N, a);\n return [d.memoizedState, a];\n },\n useRef: function useRef(a) {\n var b = th();\n a = {\n current: a\n };\n return b.memoizedState = a;\n },\n useState: yh,\n useDebugValue: Jh,\n useResponder: ih,\n useDeferredValue: function useDeferredValue(a, b) {\n var c = yh(a),\n d = c[0],\n e = c[1];\n Eh(function () {\n var c = kh.suspense;\n kh.suspense = void 0 === b ? null : b;\n\n try {\n e(a);\n } finally {\n kh.suspense = c;\n }\n }, [a, b]);\n return d;\n },\n useTransition: function useTransition(a) {\n var b = yh(!1),\n c = b[0];\n b = b[1];\n return [Kh(Nh.bind(null, b, a), [b, a]), c];\n }\n},\n qh = {\n readContext: sg,\n useCallback: Lh,\n useContext: sg,\n useEffect: Fh,\n useImperativeHandle: Ih,\n useLayoutEffect: Gh,\n useMemo: Mh,\n useReducer: wh,\n useRef: Bh,\n useState: function useState() {\n return wh(vh);\n },\n useDebugValue: Jh,\n useResponder: ih,\n useDeferredValue: function useDeferredValue(a, b) {\n var c = wh(vh),\n d = c[0],\n e = c[1];\n Fh(function () {\n var c = kh.suspense;\n kh.suspense = void 0 === b ? null : b;\n\n try {\n e(a);\n } finally {\n kh.suspense = c;\n }\n }, [a, b]);\n return d;\n },\n useTransition: function useTransition(a) {\n var b = wh(vh),\n c = b[0];\n b = b[1];\n return [Lh(Nh.bind(null, b, a), [b, a]), c];\n }\n},\n rh = {\n readContext: sg,\n useCallback: Lh,\n useContext: sg,\n useEffect: Fh,\n useImperativeHandle: Ih,\n useLayoutEffect: Gh,\n useMemo: Mh,\n useReducer: xh,\n useRef: Bh,\n useState: function useState() {\n return xh(vh);\n },\n useDebugValue: Jh,\n useResponder: ih,\n useDeferredValue: function useDeferredValue(a, b) {\n var c = xh(vh),\n d = c[0],\n e = c[1];\n Fh(function () {\n var c = kh.suspense;\n kh.suspense = void 0 === b ? null : b;\n\n try {\n e(a);\n } finally {\n kh.suspense = c;\n }\n }, [a, b]);\n return d;\n },\n useTransition: function useTransition(a) {\n var b = xh(vh),\n c = b[0];\n b = b[1];\n return [Lh(Nh.bind(null, b, a), [b, a]), c];\n }\n},\n Oh = null,\n Ph = null,\n Qh = !1;\n\nfunction Rh(a, b) {\n var c = Sh(5, null, null, 0);\n c.elementType = \"DELETED\";\n c.type = \"DELETED\";\n c.stateNode = b;\n c.return = a;\n c.effectTag = 8;\n null !== a.lastEffect ? (a.lastEffect.nextEffect = c, a.lastEffect = c) : a.firstEffect = a.lastEffect = c;\n}\n\nfunction Th(a, b) {\n switch (a.tag) {\n case 5:\n var c = a.type;\n b = 1 !== b.nodeType || c.toLowerCase() !== b.nodeName.toLowerCase() ? null : b;\n return null !== b ? (a.stateNode = b, !0) : !1;\n\n case 6:\n return b = \"\" === a.pendingProps || 3 !== b.nodeType ? null : b, null !== b ? (a.stateNode = b, !0) : !1;\n\n case 13:\n return !1;\n\n default:\n return !1;\n }\n}\n\nfunction Uh(a) {\n if (Qh) {\n var b = Ph;\n\n if (b) {\n var c = b;\n\n if (!Th(a, b)) {\n b = Jd(c.nextSibling);\n\n if (!b || !Th(a, b)) {\n a.effectTag = a.effectTag & -1025 | 2;\n Qh = !1;\n Oh = a;\n return;\n }\n\n Rh(Oh, c);\n }\n\n Oh = a;\n Ph = Jd(b.firstChild);\n } else a.effectTag = a.effectTag & -1025 | 2, Qh = !1, Oh = a;\n }\n}\n\nfunction Vh(a) {\n for (a = a.return; null !== a && 5 !== a.tag && 3 !== a.tag && 13 !== a.tag;) {\n a = a.return;\n }\n\n Oh = a;\n}\n\nfunction Wh(a) {\n if (a !== Oh) return !1;\n if (!Qh) return Vh(a), Qh = !0, !1;\n var b = a.type;\n if (5 !== a.tag || \"head\" !== b && \"body\" !== b && !Gd(b, a.memoizedProps)) for (b = Ph; b;) {\n Rh(a, b), b = Jd(b.nextSibling);\n }\n Vh(a);\n\n if (13 === a.tag) {\n a = a.memoizedState;\n a = null !== a ? a.dehydrated : null;\n if (!a) throw Error(u(317));\n\n a: {\n a = a.nextSibling;\n\n for (b = 0; a;) {\n if (8 === a.nodeType) {\n var c = a.data;\n\n if (c === Ad) {\n if (0 === b) {\n Ph = Jd(a.nextSibling);\n break a;\n }\n\n b--;\n } else c !== zd && c !== Cd && c !== Bd || b++;\n }\n\n a = a.nextSibling;\n }\n\n Ph = null;\n }\n } else Ph = Oh ? Jd(a.stateNode.nextSibling) : null;\n\n return !0;\n}\n\nfunction Xh() {\n Ph = Oh = null;\n Qh = !1;\n}\n\nvar Yh = Wa.ReactCurrentOwner,\n rg = !1;\n\nfunction R(a, b, c, d) {\n b.child = null === a ? Yg(b, null, c, d) : Xg(b, a.child, c, d);\n}\n\nfunction Zh(a, b, c, d, e) {\n c = c.render;\n var f = b.ref;\n qg(b, e);\n d = oh(a, b, c, d, f, e);\n if (null !== a && !rg) return b.updateQueue = a.updateQueue, b.effectTag &= -517, a.expirationTime <= e && (a.expirationTime = 0), $h(a, b, e);\n b.effectTag |= 1;\n R(a, b, d, e);\n return b.child;\n}\n\nfunction ai(a, b, c, d, e, f) {\n if (null === a) {\n var g = c.type;\n if (\"function\" === typeof g && !bi(g) && void 0 === g.defaultProps && null === c.compare && void 0 === c.defaultProps) return b.tag = 15, b.type = g, ci(a, b, g, d, e, f);\n a = Ug(c.type, null, d, null, b.mode, f);\n a.ref = b.ref;\n a.return = b;\n return b.child = a;\n }\n\n g = a.child;\n if (e < f && (e = g.memoizedProps, c = c.compare, c = null !== c ? c : bf, c(e, d) && a.ref === b.ref)) return $h(a, b, f);\n b.effectTag |= 1;\n a = Sg(g, d);\n a.ref = b.ref;\n a.return = b;\n return b.child = a;\n}\n\nfunction ci(a, b, c, d, e, f) {\n return null !== a && bf(a.memoizedProps, d) && a.ref === b.ref && (rg = !1, e < f) ? (b.expirationTime = a.expirationTime, $h(a, b, f)) : di(a, b, c, d, f);\n}\n\nfunction ei(a, b) {\n var c = b.ref;\n if (null === a && null !== c || null !== a && a.ref !== c) b.effectTag |= 128;\n}\n\nfunction di(a, b, c, d, e) {\n var f = L(c) ? Bf : J.current;\n f = Cf(b, f);\n qg(b, e);\n c = oh(a, b, c, d, f, e);\n if (null !== a && !rg) return b.updateQueue = a.updateQueue, b.effectTag &= -517, a.expirationTime <= e && (a.expirationTime = 0), $h(a, b, e);\n b.effectTag |= 1;\n R(a, b, c, e);\n return b.child;\n}\n\nfunction fi(a, b, c, d, e) {\n if (L(c)) {\n var f = !0;\n Gf(b);\n } else f = !1;\n\n qg(b, e);\n if (null === b.stateNode) null !== a && (a.alternate = null, b.alternate = null, b.effectTag |= 2), Lg(b, c, d), Ng(b, c, d, e), d = !0;else if (null === a) {\n var g = b.stateNode,\n h = b.memoizedProps;\n g.props = h;\n var k = g.context,\n l = c.contextType;\n \"object\" === typeof l && null !== l ? l = sg(l) : (l = L(c) ? Bf : J.current, l = Cf(b, l));\n var m = c.getDerivedStateFromProps,\n p = \"function\" === typeof m || \"function\" === typeof g.getSnapshotBeforeUpdate;\n p || \"function\" !== typeof g.UNSAFE_componentWillReceiveProps && \"function\" !== typeof g.componentWillReceiveProps || (h !== d || k !== l) && Mg(b, g, d, l);\n tg = !1;\n var x = b.memoizedState;\n g.state = x;\n zg(b, d, g, e);\n k = b.memoizedState;\n h !== d || x !== k || K.current || tg ? (\"function\" === typeof m && (Fg(b, c, m, d), k = b.memoizedState), (h = tg || Kg(b, c, h, d, x, k, l)) ? (p || \"function\" !== typeof g.UNSAFE_componentWillMount && \"function\" !== typeof g.componentWillMount || (\"function\" === typeof g.componentWillMount && g.componentWillMount(), \"function\" === typeof g.UNSAFE_componentWillMount && g.UNSAFE_componentWillMount()), \"function\" === typeof g.componentDidMount && (b.effectTag |= 4)) : (\"function\" === typeof g.componentDidMount && (b.effectTag |= 4), b.memoizedProps = d, b.memoizedState = k), g.props = d, g.state = k, g.context = l, d = h) : (\"function\" === typeof g.componentDidMount && (b.effectTag |= 4), d = !1);\n } else g = b.stateNode, vg(a, b), h = b.memoizedProps, g.props = b.type === b.elementType ? h : ig(b.type, h), k = g.context, l = c.contextType, \"object\" === typeof l && null !== l ? l = sg(l) : (l = L(c) ? Bf : J.current, l = Cf(b, l)), m = c.getDerivedStateFromProps, (p = \"function\" === typeof m || \"function\" === typeof g.getSnapshotBeforeUpdate) || \"function\" !== typeof g.UNSAFE_componentWillReceiveProps && \"function\" !== typeof g.componentWillReceiveProps || (h !== d || k !== l) && Mg(b, g, d, l), tg = !1, k = b.memoizedState, g.state = k, zg(b, d, g, e), x = b.memoizedState, h !== d || k !== x || K.current || tg ? (\"function\" === typeof m && (Fg(b, c, m, d), x = b.memoizedState), (m = tg || Kg(b, c, h, d, k, x, l)) ? (p || \"function\" !== typeof g.UNSAFE_componentWillUpdate && \"function\" !== typeof g.componentWillUpdate || (\"function\" === typeof g.componentWillUpdate && g.componentWillUpdate(d, x, l), \"function\" === typeof g.UNSAFE_componentWillUpdate && g.UNSAFE_componentWillUpdate(d, x, l)), \"function\" === typeof g.componentDidUpdate && (b.effectTag |= 4), \"function\" === typeof g.getSnapshotBeforeUpdate && (b.effectTag |= 256)) : (\"function\" !== typeof g.componentDidUpdate || h === a.memoizedProps && k === a.memoizedState || (b.effectTag |= 4), \"function\" !== typeof g.getSnapshotBeforeUpdate || h === a.memoizedProps && k === a.memoizedState || (b.effectTag |= 256), b.memoizedProps = d, b.memoizedState = x), g.props = d, g.state = x, g.context = l, d = m) : (\"function\" !== typeof g.componentDidUpdate || h === a.memoizedProps && k === a.memoizedState || (b.effectTag |= 4), \"function\" !== typeof g.getSnapshotBeforeUpdate || h === a.memoizedProps && k === a.memoizedState || (b.effectTag |= 256), d = !1);\n return gi(a, b, c, d, f, e);\n}\n\nfunction gi(a, b, c, d, e, f) {\n ei(a, b);\n var g = 0 !== (b.effectTag & 64);\n if (!d && !g) return e && Hf(b, c, !1), $h(a, b, f);\n d = b.stateNode;\n Yh.current = b;\n var h = g && \"function\" !== typeof c.getDerivedStateFromError ? null : d.render();\n b.effectTag |= 1;\n null !== a && g ? (b.child = Xg(b, a.child, null, f), b.child = Xg(b, null, h, f)) : R(a, b, h, f);\n b.memoizedState = d.state;\n e && Hf(b, c, !0);\n return b.child;\n}\n\nfunction hi(a) {\n var b = a.stateNode;\n b.pendingContext ? Ef(a, b.pendingContext, b.pendingContext !== b.context) : b.context && Ef(a, b.context, !1);\n dh(a, b.containerInfo);\n}\n\nvar ii = {\n dehydrated: null,\n retryTime: 0\n};\n\nfunction ji(a, b, c) {\n var d = b.mode,\n e = b.pendingProps,\n f = M.current,\n g = !1,\n h;\n (h = 0 !== (b.effectTag & 64)) || (h = 0 !== (f & 2) && (null === a || null !== a.memoizedState));\n h ? (g = !0, b.effectTag &= -65) : null !== a && null === a.memoizedState || void 0 === e.fallback || !0 === e.unstable_avoidThisFallback || (f |= 1);\n I(M, f & 1);\n\n if (null === a) {\n void 0 !== e.fallback && Uh(b);\n\n if (g) {\n g = e.fallback;\n e = Wg(null, d, 0, null);\n e.return = b;\n if (0 === (b.mode & 2)) for (a = null !== b.memoizedState ? b.child.child : b.child, e.child = a; null !== a;) {\n a.return = e, a = a.sibling;\n }\n c = Wg(g, d, c, null);\n c.return = b;\n e.sibling = c;\n b.memoizedState = ii;\n b.child = e;\n return c;\n }\n\n d = e.children;\n b.memoizedState = null;\n return b.child = Yg(b, null, d, c);\n }\n\n if (null !== a.memoizedState) {\n a = a.child;\n d = a.sibling;\n\n if (g) {\n e = e.fallback;\n c = Sg(a, a.pendingProps);\n c.return = b;\n if (0 === (b.mode & 2) && (g = null !== b.memoizedState ? b.child.child : b.child, g !== a.child)) for (c.child = g; null !== g;) {\n g.return = c, g = g.sibling;\n }\n d = Sg(d, e);\n d.return = b;\n c.sibling = d;\n c.childExpirationTime = 0;\n b.memoizedState = ii;\n b.child = c;\n return d;\n }\n\n c = Xg(b, a.child, e.children, c);\n b.memoizedState = null;\n return b.child = c;\n }\n\n a = a.child;\n\n if (g) {\n g = e.fallback;\n e = Wg(null, d, 0, null);\n e.return = b;\n e.child = a;\n null !== a && (a.return = e);\n if (0 === (b.mode & 2)) for (a = null !== b.memoizedState ? b.child.child : b.child, e.child = a; null !== a;) {\n a.return = e, a = a.sibling;\n }\n c = Wg(g, d, c, null);\n c.return = b;\n e.sibling = c;\n c.effectTag |= 2;\n e.childExpirationTime = 0;\n b.memoizedState = ii;\n b.child = e;\n return c;\n }\n\n b.memoizedState = null;\n return b.child = Xg(b, a, e.children, c);\n}\n\nfunction ki(a, b) {\n a.expirationTime < b && (a.expirationTime = b);\n var c = a.alternate;\n null !== c && c.expirationTime < b && (c.expirationTime = b);\n pg(a.return, b);\n}\n\nfunction li(a, b, c, d, e, f) {\n var g = a.memoizedState;\n null === g ? a.memoizedState = {\n isBackwards: b,\n rendering: null,\n renderingStartTime: 0,\n last: d,\n tail: c,\n tailExpiration: 0,\n tailMode: e,\n lastEffect: f\n } : (g.isBackwards = b, g.rendering = null, g.renderingStartTime = 0, g.last = d, g.tail = c, g.tailExpiration = 0, g.tailMode = e, g.lastEffect = f);\n}\n\nfunction mi(a, b, c) {\n var d = b.pendingProps,\n e = d.revealOrder,\n f = d.tail;\n R(a, b, d.children, c);\n d = M.current;\n if (0 !== (d & 2)) d = d & 1 | 2, b.effectTag |= 64;else {\n if (null !== a && 0 !== (a.effectTag & 64)) a: for (a = b.child; null !== a;) {\n if (13 === a.tag) null !== a.memoizedState && ki(a, c);else if (19 === a.tag) ki(a, c);else if (null !== a.child) {\n a.child.return = a;\n a = a.child;\n continue;\n }\n if (a === b) break a;\n\n for (; null === a.sibling;) {\n if (null === a.return || a.return === b) break a;\n a = a.return;\n }\n\n a.sibling.return = a.return;\n a = a.sibling;\n }\n d &= 1;\n }\n I(M, d);\n if (0 === (b.mode & 2)) b.memoizedState = null;else switch (e) {\n case \"forwards\":\n c = b.child;\n\n for (e = null; null !== c;) {\n a = c.alternate, null !== a && null === hh(a) && (e = c), c = c.sibling;\n }\n\n c = e;\n null === c ? (e = b.child, b.child = null) : (e = c.sibling, c.sibling = null);\n li(b, !1, e, c, f, b.lastEffect);\n break;\n\n case \"backwards\":\n c = null;\n e = b.child;\n\n for (b.child = null; null !== e;) {\n a = e.alternate;\n\n if (null !== a && null === hh(a)) {\n b.child = e;\n break;\n }\n\n a = e.sibling;\n e.sibling = c;\n c = e;\n e = a;\n }\n\n li(b, !0, c, null, f, b.lastEffect);\n break;\n\n case \"together\":\n li(b, !1, null, null, void 0, b.lastEffect);\n break;\n\n default:\n b.memoizedState = null;\n }\n return b.child;\n}\n\nfunction $h(a, b, c) {\n null !== a && (b.dependencies = a.dependencies);\n var d = b.expirationTime;\n 0 !== d && Bg(d);\n if (b.childExpirationTime < c) return null;\n if (null !== a && b.child !== a.child) throw Error(u(153));\n\n if (null !== b.child) {\n a = b.child;\n c = Sg(a, a.pendingProps);\n b.child = c;\n\n for (c.return = b; null !== a.sibling;) {\n a = a.sibling, c = c.sibling = Sg(a, a.pendingProps), c.return = b;\n }\n\n c.sibling = null;\n }\n\n return b.child;\n}\n\nvar ni, oi, pi, qi;\n\nni = function ni(a, b) {\n for (var c = b.child; null !== c;) {\n if (5 === c.tag || 6 === c.tag) a.appendChild(c.stateNode);else if (4 !== c.tag && null !== c.child) {\n c.child.return = c;\n c = c.child;\n continue;\n }\n if (c === b) break;\n\n for (; null === c.sibling;) {\n if (null === c.return || c.return === b) return;\n c = c.return;\n }\n\n c.sibling.return = c.return;\n c = c.sibling;\n }\n};\n\noi = function oi() {};\n\npi = function pi(a, b, c, d, e) {\n var f = a.memoizedProps;\n\n if (f !== d) {\n var g = b.stateNode;\n ch($g.current);\n a = null;\n\n switch (c) {\n case \"input\":\n f = zb(g, f);\n d = zb(g, d);\n a = [];\n break;\n\n case \"option\":\n f = Gb(g, f);\n d = Gb(g, d);\n a = [];\n break;\n\n case \"select\":\n f = n({}, f, {\n value: void 0\n });\n d = n({}, d, {\n value: void 0\n });\n a = [];\n break;\n\n case \"textarea\":\n f = Ib(g, f);\n d = Ib(g, d);\n a = [];\n break;\n\n default:\n \"function\" !== typeof f.onClick && \"function\" === typeof d.onClick && (g.onclick = sd);\n }\n\n od(c, d);\n var h, k;\n c = null;\n\n for (h in f) {\n if (!d.hasOwnProperty(h) && f.hasOwnProperty(h) && null != f[h]) if (\"style\" === h) for (k in g = f[h], g) {\n g.hasOwnProperty(k) && (c || (c = {}), c[k] = \"\");\n } else \"dangerouslySetInnerHTML\" !== h && \"children\" !== h && \"suppressContentEditableWarning\" !== h && \"suppressHydrationWarning\" !== h && \"autoFocus\" !== h && (va.hasOwnProperty(h) ? a || (a = []) : (a = a || []).push(h, null));\n }\n\n for (h in d) {\n var l = d[h];\n g = null != f ? f[h] : void 0;\n if (d.hasOwnProperty(h) && l !== g && (null != l || null != g)) if (\"style\" === h) {\n if (g) {\n for (k in g) {\n !g.hasOwnProperty(k) || l && l.hasOwnProperty(k) || (c || (c = {}), c[k] = \"\");\n }\n\n for (k in l) {\n l.hasOwnProperty(k) && g[k] !== l[k] && (c || (c = {}), c[k] = l[k]);\n }\n } else c || (a || (a = []), a.push(h, c)), c = l;\n } else \"dangerouslySetInnerHTML\" === h ? (l = l ? l.__html : void 0, g = g ? g.__html : void 0, null != l && g !== l && (a = a || []).push(h, l)) : \"children\" === h ? g === l || \"string\" !== typeof l && \"number\" !== typeof l || (a = a || []).push(h, \"\" + l) : \"suppressContentEditableWarning\" !== h && \"suppressHydrationWarning\" !== h && (va.hasOwnProperty(h) ? (null != l && rd(e, h), a || g === l || (a = [])) : (a = a || []).push(h, l));\n }\n\n c && (a = a || []).push(\"style\", c);\n e = a;\n if (b.updateQueue = e) b.effectTag |= 4;\n }\n};\n\nqi = function qi(a, b, c, d) {\n c !== d && (b.effectTag |= 4);\n};\n\nfunction ri(a, b) {\n switch (a.tailMode) {\n case \"hidden\":\n b = a.tail;\n\n for (var c = null; null !== b;) {\n null !== b.alternate && (c = b), b = b.sibling;\n }\n\n null === c ? a.tail = null : c.sibling = null;\n break;\n\n case \"collapsed\":\n c = a.tail;\n\n for (var d = null; null !== c;) {\n null !== c.alternate && (d = c), c = c.sibling;\n }\n\n null === d ? b || null === a.tail ? a.tail = null : a.tail.sibling = null : d.sibling = null;\n }\n}\n\nfunction si(a, b, c) {\n var d = b.pendingProps;\n\n switch (b.tag) {\n case 2:\n case 16:\n case 15:\n case 0:\n case 11:\n case 7:\n case 8:\n case 12:\n case 9:\n case 14:\n return null;\n\n case 1:\n return L(b.type) && Df(), null;\n\n case 3:\n return eh(), H(K), H(J), c = b.stateNode, c.pendingContext && (c.context = c.pendingContext, c.pendingContext = null), null !== a && null !== a.child || !Wh(b) || (b.effectTag |= 4), oi(b), null;\n\n case 5:\n gh(b);\n c = ch(bh.current);\n var e = b.type;\n if (null !== a && null != b.stateNode) pi(a, b, e, d, c), a.ref !== b.ref && (b.effectTag |= 128);else {\n if (!d) {\n if (null === b.stateNode) throw Error(u(166));\n return null;\n }\n\n a = ch($g.current);\n\n if (Wh(b)) {\n d = b.stateNode;\n e = b.type;\n var f = b.memoizedProps;\n d[Md] = b;\n d[Nd] = f;\n\n switch (e) {\n case \"iframe\":\n case \"object\":\n case \"embed\":\n F(\"load\", d);\n break;\n\n case \"video\":\n case \"audio\":\n for (a = 0; a < ac.length; a++) {\n F(ac[a], d);\n }\n\n break;\n\n case \"source\":\n F(\"error\", d);\n break;\n\n case \"img\":\n case \"image\":\n case \"link\":\n F(\"error\", d);\n F(\"load\", d);\n break;\n\n case \"form\":\n F(\"reset\", d);\n F(\"submit\", d);\n break;\n\n case \"details\":\n F(\"toggle\", d);\n break;\n\n case \"input\":\n Ab(d, f);\n F(\"invalid\", d);\n rd(c, \"onChange\");\n break;\n\n case \"select\":\n d._wrapperState = {\n wasMultiple: !!f.multiple\n };\n F(\"invalid\", d);\n rd(c, \"onChange\");\n break;\n\n case \"textarea\":\n Jb(d, f), F(\"invalid\", d), rd(c, \"onChange\");\n }\n\n od(e, f);\n a = null;\n\n for (var g in f) {\n if (f.hasOwnProperty(g)) {\n var h = f[g];\n \"children\" === g ? \"string\" === typeof h ? d.textContent !== h && (a = [\"children\", h]) : \"number\" === typeof h && d.textContent !== \"\" + h && (a = [\"children\", \"\" + h]) : va.hasOwnProperty(g) && null != h && rd(c, g);\n }\n }\n\n switch (e) {\n case \"input\":\n xb(d);\n Eb(d, f, !0);\n break;\n\n case \"textarea\":\n xb(d);\n Lb(d);\n break;\n\n case \"select\":\n case \"option\":\n break;\n\n default:\n \"function\" === typeof f.onClick && (d.onclick = sd);\n }\n\n c = a;\n b.updateQueue = c;\n null !== c && (b.effectTag |= 4);\n } else {\n g = 9 === c.nodeType ? c : c.ownerDocument;\n a === qd && (a = Nb(e));\n a === qd ? \"script\" === e ? (a = g.createElement(\"div\"), a.innerHTML = \"