/* * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). * This devtool is neither made for production nor for readable output files. * It uses "eval()" calls to create a separate source file in the browser devtools. * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) * or disable the default devtool with "devtool: false". * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else { var a = factory(); for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i]; } })(self, function() { return /******/ (function() { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ "./libs/shepherd/shepherd.js": /*!***********************************!*\ !*** ./libs/shepherd/shepherd.js ***! \***********************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Shepherd: function() { return /* reexport default from dynamic */ shepherd_js_dist_js_shepherd__WEBPACK_IMPORTED_MODULE_0___default.a; }\n/* harmony export */ });\n/* harmony import */ var shepherd_js_dist_js_shepherd__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! shepherd.js/dist/js/shepherd */ \"./node_modules/shepherd.js/dist/js/shepherd.js\");\n/* harmony import */ var shepherd_js_dist_js_shepherd__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(shepherd_js_dist_js_shepherd__WEBPACK_IMPORTED_MODULE_0__);\n\ntry {\n window.Shepherd = (shepherd_js_dist_js_shepherd__WEBPACK_IMPORTED_MODULE_0___default());\n} catch (e) {}\n\n\n//# sourceURL=webpack://Sneat/./libs/shepherd/shepherd.js?"); /***/ }), /***/ "./node_modules/shepherd.js/dist/js/shepherd.js": /*!******************************************************!*\ !*** ./node_modules/shepherd.js/dist/js/shepherd.js ***! \******************************************************/ /***/ (function(module, exports, __webpack_require__) { eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }\nfunction _possibleConstructorReturn(t, e) { if (e && (\"object\" == _typeof(e) || \"function\" == typeof e)) return e; if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\"); return _assertThisInitialized(t); }\nfunction _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); return e; }\nfunction _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\nfunction _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }\nfunction _inherits(t, e) { if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, \"prototype\", { writable: !1 }), e && _setPrototypeOf(t, e); }\nfunction _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }\nfunction _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(r) { if (Array.isArray(r)) return r; }\nfunction _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _iterableToArray(r) { if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r); }\nfunction _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction _regeneratorRuntime() { \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = \"function\" == typeof Symbol ? Symbol : {}, a = i.iterator || \"@@iterator\", c = i.asyncIterator || \"@@asyncIterator\", u = i.toStringTag || \"@@toStringTag\"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, \"\"); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, \"_invoke\", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: \"normal\", arg: t.call(e, r) }; } catch (t) { return { type: \"throw\", arg: t }; } } e.wrap = wrap; var h = \"suspendedStart\", l = \"suspendedYield\", f = \"executing\", s = \"completed\", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { [\"next\", \"throw\", \"return\"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if (\"throw\" !== c.type) { var u = c.arg, h = u.value; return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) { invoke(\"next\", t, i, a); }, function (t) { invoke(\"throw\", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke(\"throw\", t, i, a); }); } a(c.arg); } var r; o(this, \"_invoke\", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error(\"Generator is already running\"); if (o === s) { if (\"throw\" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else \"return\" === n.method && n.abrupt(\"return\", n.arg); o = f; var p = tryCatch(e, r, n); if (\"normal\" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, \"throw\" === n && e.iterator.return && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y; var i = tryCatch(o, e.iterator, r.arg); if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = \"normal\", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: \"root\" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || \"\" === e) { var r = e[a]; if (r) return r.call(e); if (\"function\" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + \" is not iterable\"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, \"constructor\", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) { var e = \"function\" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () { return this; }), define(g, \"toString\", function () { return \"[object Generator]\"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if (\"throw\" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if (\"root\" === i.tryLoc) return handle(\"end\"); if (i.tryLoc <= this.prev) { var c = n.call(i, \"catchLoc\"), u = n.call(i, \"finallyLoc\"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error(\"try statement without catch or finally\"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) { var i = o; break; } } i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if (\"throw\" === t.type) throw t.arg; return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if (\"throw\" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error(\"illegal catch attempt\"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, \"next\" === this.method && (this.arg = t), y; } }, e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }\nfunction _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n); } _next(void 0); }); }; }\nfunction _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\"); }\nfunction _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }\nfunction _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", { writable: !1 }), e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n/*! shepherd.js 11.2.0 */\n\n(function (global, factory) {\n ( false ? 0 : _typeof(exports)) === 'object' && \"object\" !== 'undefined' ? module.exports = factory() : true ? !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :\n\t\t__WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : (0);\n})(this, function () {\n 'use strict';\n\n var isMergeableObject = function isMergeableObject(value) {\n return isNonNullObject(value) && !isSpecial(value);\n };\n function isNonNullObject(value) {\n return !!value && _typeof(value) === 'object';\n }\n function isSpecial(value) {\n var stringValue = Object.prototype.toString.call(value);\n return stringValue === '[object RegExp]' || stringValue === '[object Date]' || isReactElement(value);\n }\n\n // see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\n var canUseSymbol = typeof Symbol === 'function' && Symbol.for;\n var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n function isReactElement(value) {\n return value.$$typeof === REACT_ELEMENT_TYPE;\n }\n function emptyTarget(val) {\n return Array.isArray(val) ? [] : {};\n }\n function cloneUnlessOtherwiseSpecified(value, options) {\n return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;\n }\n function defaultArrayMerge(target, source, options) {\n return target.concat(source).map(function (element) {\n return cloneUnlessOtherwiseSpecified(element, options);\n });\n }\n function getMergeFunction(key, options) {\n if (!options.customMerge) {\n return deepmerge;\n }\n var customMerge = options.customMerge(key);\n return typeof customMerge === 'function' ? customMerge : deepmerge;\n }\n function getEnumerableOwnPropertySymbols(target) {\n return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function (symbol) {\n return Object.propertyIsEnumerable.call(target, symbol);\n }) : [];\n }\n function getKeys(target) {\n return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));\n }\n function propertyIsOnObject(object, property) {\n try {\n return property in object;\n } catch (_) {\n return false;\n }\n }\n\n // Protects from prototype poisoning and unexpected merging up the prototype chain.\n function propertyIsUnsafe(target, key) {\n return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n && !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n && Object.propertyIsEnumerable.call(target, key)); // and also unsafe if they're nonenumerable.\n }\n function mergeObject(target, source, options) {\n var destination = {};\n if (options.isMergeableObject(target)) {\n getKeys(target).forEach(function (key) {\n destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n });\n }\n getKeys(source).forEach(function (key) {\n if (propertyIsUnsafe(target, key)) {\n return;\n }\n if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n destination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n } else {\n destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n }\n });\n return destination;\n }\n function deepmerge(target, source, options) {\n options = options || {};\n options.arrayMerge = options.arrayMerge || defaultArrayMerge;\n options.isMergeableObject = options.isMergeableObject || isMergeableObject;\n // cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n // implementations can use it. The caller may not replace it.\n options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n var sourceIsArray = Array.isArray(source);\n var targetIsArray = Array.isArray(target);\n var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n if (!sourceAndTargetTypesMatch) {\n return cloneUnlessOtherwiseSpecified(source, options);\n } else if (sourceIsArray) {\n return options.arrayMerge(target, source, options);\n } else {\n return mergeObject(target, source, options);\n }\n }\n deepmerge.all = function deepmergeAll(array, options) {\n if (!Array.isArray(array)) {\n throw new Error('first argument should be an array');\n }\n return array.reduce(function (prev, next) {\n return deepmerge(prev, next, options);\n }, {});\n };\n var deepmerge_1 = deepmerge;\n var cjs = deepmerge_1;\n\n /**\n * Checks if `value` is classified as an `Element`.\n * @param {*} value The param to check if it is an Element\n */\n function isElement$1(value) {\n return value instanceof Element;\n }\n\n /**\n * Checks if `value` is classified as an `HTMLElement`.\n * @param {*} value The param to check if it is an HTMLElement\n */\n function isHTMLElement$1(value) {\n return value instanceof HTMLElement;\n }\n\n /**\n * Checks if `value` is classified as a `Function` object.\n * @param {*} value The param to check if it is a function\n */\n function isFunction(value) {\n return typeof value === 'function';\n }\n\n /**\n * Checks if `value` is classified as a `String` object.\n * @param {*} value The param to check if it is a string\n */\n function isString(value) {\n return typeof value === 'string';\n }\n\n /**\n * Checks if `value` is undefined.\n * @param {*} value The param to check if it is undefined\n */\n function isUndefined(value) {\n return value === undefined;\n }\n var Evented = /*#__PURE__*/function () {\n function Evented() {\n _classCallCheck(this, Evented);\n }\n return _createClass(Evented, [{\n key: \"on\",\n value: function on(event, handler, ctx) {\n var once = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n if (isUndefined(this.bindings)) {\n this.bindings = {};\n }\n if (isUndefined(this.bindings[event])) {\n this.bindings[event] = [];\n }\n this.bindings[event].push({\n handler: handler,\n ctx: ctx,\n once: once\n });\n return this;\n }\n }, {\n key: \"once\",\n value: function once(event, handler, ctx) {\n return this.on(event, handler, ctx, true);\n }\n }, {\n key: \"off\",\n value: function off(event, handler) {\n var _this = this;\n if (isUndefined(this.bindings) || isUndefined(this.bindings[event])) {\n return this;\n }\n if (isUndefined(handler)) {\n delete this.bindings[event];\n } else {\n this.bindings[event].forEach(function (binding, index) {\n if (binding.handler === handler) {\n _this.bindings[event].splice(index, 1);\n }\n });\n }\n return this;\n }\n }, {\n key: \"trigger\",\n value: function trigger(event) {\n var _this2 = this;\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 if (!isUndefined(this.bindings) && this.bindings[event]) {\n this.bindings[event].forEach(function (binding, index) {\n var ctx = binding.ctx,\n handler = binding.handler,\n once = binding.once;\n var context = ctx || _this2;\n handler.apply(context, args);\n if (once) {\n _this2.bindings[event].splice(index, 1);\n }\n });\n }\n return this;\n }\n }]);\n }();\n /**\n * Binds all the methods on a JS Class to the `this` context of the class.\n * Adapted from https://github.com/sindresorhus/auto-bind\n * @param {object} self The `this` context of the class\n * @return {object} The `this` context of the class\n */\n function autoBind(self) {\n var keys = Object.getOwnPropertyNames(self.constructor.prototype);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var val = self[key];\n if (key !== 'constructor' && typeof val === 'function') {\n self[key] = val.bind(self);\n }\n }\n return self;\n }\n\n /**\n * Sets up the handler to determine if we should advance the tour\n * @param {string} selector\n * @param {Step} step The step instance\n * @return {Function}\n * @private\n */\n function _setupAdvanceOnHandler(selector, step) {\n return function (event) {\n if (step.isOpen()) {\n var targetIsEl = step.el && event.currentTarget === step.el;\n var targetIsSelector = !isUndefined(selector) && event.currentTarget.matches(selector);\n if (targetIsSelector || targetIsEl) {\n step.tour.next();\n }\n }\n };\n }\n\n /**\n * Bind the event handler for advanceOn\n * @param {Step} step The step instance\n */\n function bindAdvance(step) {\n // An empty selector matches the step element\n var _ref2 = step.options.advanceOn || {},\n event = _ref2.event,\n selector = _ref2.selector;\n if (event) {\n var handler = _setupAdvanceOnHandler(selector, step);\n\n // TODO: this should also bind/unbind on show/hide\n var el;\n try {\n el = document.querySelector(selector);\n } catch (e) {\n // TODO\n }\n if (!isUndefined(selector) && !el) {\n return console.error(\"No element was found for the selector supplied to advanceOn: \".concat(selector));\n } else if (el) {\n el.addEventListener(event, handler);\n step.on('destroy', function () {\n return el.removeEventListener(event, handler);\n });\n } else {\n document.body.addEventListener(event, handler, true);\n step.on('destroy', function () {\n return document.body.removeEventListener(event, handler, true);\n });\n }\n } else {\n return console.error('advanceOn was defined, but no event name was passed.');\n }\n }\n\n /**\n * Ensure class prefix ends in `-`\n * @param {string} prefix The prefix to prepend to the class names generated by nano-css\n * @return {string} The prefix ending in `-`\n */\n function normalizePrefix(prefix) {\n if (!isString(prefix) || prefix === '') {\n return '';\n }\n return prefix.charAt(prefix.length - 1) !== '-' ? \"\".concat(prefix, \"-\") : prefix;\n }\n\n /**\n * Resolves attachTo options, converting element option value to a qualified HTMLElement.\n * @param {Step} step The step instance\n * @returns {{}|{element, on}}\n * `element` is a qualified HTML Element\n * `on` is a string position value\n */\n function parseAttachTo(step) {\n var options = step.options.attachTo || {};\n var returnOpts = Object.assign({}, options);\n if (isFunction(returnOpts.element)) {\n // Bind the callback to step so that it has access to the object, to enable running additional logic\n returnOpts.element = returnOpts.element.call(step);\n }\n if (isString(returnOpts.element)) {\n // Can't override the element in user opts reference because we can't\n // guarantee that the element will exist in the future.\n try {\n returnOpts.element = document.querySelector(returnOpts.element);\n } catch (e) {\n // TODO\n }\n if (!returnOpts.element) {\n console.error(\"The element for this Shepherd step was not found \".concat(options.element));\n }\n }\n return returnOpts;\n }\n\n /**\n * Checks if the step should be centered or not. Does not trigger attachTo.element evaluation, making it a pure\n * alternative for the deprecated step.isCentered() method.\n * @param resolvedAttachToOptions\n * @returns {boolean}\n */\n function shouldCenterStep(resolvedAttachToOptions) {\n if (resolvedAttachToOptions === undefined || resolvedAttachToOptions === null) {\n return true;\n }\n return !resolvedAttachToOptions.element || !resolvedAttachToOptions.on;\n }\n\n /**\n * Create a unique id for steps, tours, modals, etc\n * @return {string}\n */\n function uuid() {\n var d = Date.now();\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c == 'x' ? r : r & 0x3 | 0x8).toString(16);\n });\n }\n function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n }\n function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n }\n var min = Math.min;\n var max = Math.max;\n var round = Math.round;\n var floor = Math.floor;\n var createCoords = function createCoords(v) {\n return {\n x: v,\n y: v\n };\n };\n var oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n };\n var oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n };\n function clamp(start, value, end) {\n return max(start, min(value, end));\n }\n function evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n }\n function getSide(placement) {\n return placement.split('-')[0];\n }\n function getAlignment(placement) {\n return placement.split('-')[1];\n }\n function getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n }\n function getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n }\n function getSideAxis(placement) {\n return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';\n }\n function getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n }\n function getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n var alignment = getAlignment(placement);\n var alignmentAxis = getAlignmentAxis(placement);\n var length = getAxisLength(alignmentAxis);\n var mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n }\n function getExpandedPlacements(placement) {\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n }\n function getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, function (alignment) {\n return oppositeAlignmentMap[alignment];\n });\n }\n function getSideList(side, isStart, rtl) {\n var lr = ['left', 'right'];\n var rl = ['right', 'left'];\n var tb = ['top', 'bottom'];\n var bt = ['bottom', 'top'];\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rl : lr;\n return isStart ? lr : rl;\n case 'left':\n case 'right':\n return isStart ? tb : bt;\n default:\n return [];\n }\n }\n function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n var alignment = getAlignment(placement);\n var list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(function (side) {\n return side + \"-\" + alignment;\n });\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n }\n function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (side) {\n return oppositeSideMap[side];\n });\n }\n function expandPaddingObject(padding) {\n return _extends({\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n }, padding);\n }\n function getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n }\n function rectToClientRect(rect) {\n return _extends({}, rect, {\n top: rect.y,\n left: rect.x,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n }\n var _excluded2 = [\"mainAxis\", \"crossAxis\", \"fallbackPlacements\", \"fallbackStrategy\", \"fallbackAxisSideDirection\", \"flipAlignment\"],\n _excluded4 = [\"mainAxis\", \"crossAxis\", \"limiter\"];\n function computeCoordsFromPlacement(_ref, placement, rtl) {\n var reference = _ref.reference,\n floating = _ref.floating;\n var sideAxis = getSideAxis(placement);\n var alignmentAxis = getAlignmentAxis(placement);\n var alignLength = getAxisLength(alignmentAxis);\n var side = getSide(placement);\n var isVertical = sideAxis === 'y';\n var commonX = reference.x + reference.width / 2 - floating.width / 2;\n var commonY = reference.y + reference.height / 2 - floating.height / 2;\n var commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n var coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n }\n\n /**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a reference element when it is given a certain positioning strategy.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\n var computePosition$1 = /*#__PURE__*/function () {\n var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(reference, floating, config) {\n var _config$placement, placement, _config$strategy, strategy, _config$middleware, middleware, platform, validMiddleware, rtl, rects, _computeCoordsFromPla, x, y, statefulPlacement, middlewareData, resetCount, i, _validMiddleware$i, name, fn, _yield$fn, nextX, nextY, data, reset, _computeCoordsFromPla2;\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _config$placement = config.placement, placement = _config$placement === void 0 ? 'bottom' : _config$placement, _config$strategy = config.strategy, strategy = _config$strategy === void 0 ? 'absolute' : _config$strategy, _config$middleware = config.middleware, middleware = _config$middleware === void 0 ? [] : _config$middleware, platform = config.platform;\n validMiddleware = middleware.filter(Boolean);\n _context.next = 4;\n return platform.isRTL == null ? void 0 : platform.isRTL(floating);\n case 4:\n rtl = _context.sent;\n _context.next = 7;\n return platform.getElementRects({\n reference: reference,\n floating: floating,\n strategy: strategy\n });\n case 7:\n rects = _context.sent;\n _computeCoordsFromPla = computeCoordsFromPlacement(rects, placement, rtl), x = _computeCoordsFromPla.x, y = _computeCoordsFromPla.y;\n statefulPlacement = placement;\n middlewareData = {};\n resetCount = 0;\n i = 0;\n case 13:\n if (!(i < validMiddleware.length)) {\n _context.next = 46;\n break;\n }\n _validMiddleware$i = validMiddleware[i], name = _validMiddleware$i.name, fn = _validMiddleware$i.fn;\n _context.next = 17;\n return fn({\n x: x,\n y: y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy: strategy,\n middlewareData: middlewareData,\n rects: rects,\n platform: platform,\n elements: {\n reference: reference,\n floating: floating\n }\n });\n case 17:\n _yield$fn = _context.sent;\n nextX = _yield$fn.x;\n nextY = _yield$fn.y;\n data = _yield$fn.data;\n reset = _yield$fn.reset;\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = _extends({}, middlewareData, _defineProperty({}, name, _extends({}, middlewareData[name], data)));\n if (!(reset && resetCount <= 50)) {\n _context.next = 43;\n break;\n }\n resetCount++;\n if (!(_typeof(reset) === 'object')) {\n _context.next = 41;\n break;\n }\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (!reset.rects) {\n _context.next = 38;\n break;\n }\n if (!(reset.rects === true)) {\n _context.next = 36;\n break;\n }\n _context.next = 33;\n return platform.getElementRects({\n reference: reference,\n floating: floating,\n strategy: strategy\n });\n case 33:\n _context.t0 = _context.sent;\n _context.next = 37;\n break;\n case 36:\n _context.t0 = reset.rects;\n case 37:\n rects = _context.t0;\n case 38:\n _computeCoordsFromPla2 = computeCoordsFromPlacement(rects, statefulPlacement, rtl);\n x = _computeCoordsFromPla2.x;\n y = _computeCoordsFromPla2.y;\n case 41:\n i = -1;\n return _context.abrupt(\"continue\", 43);\n case 43:\n i++;\n _context.next = 13;\n break;\n case 46:\n return _context.abrupt(\"return\", {\n x: x,\n y: y,\n placement: statefulPlacement,\n strategy: strategy,\n middlewareData: middlewareData\n });\n case 47:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return function computePosition$1(_x, _x2, _x3) {\n return _ref3.apply(this, arguments);\n };\n }();\n\n /**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\n function detectOverflow(_x4, _x5) {\n return _detectOverflow.apply(this, arguments);\n }\n /**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\n function _detectOverflow() {\n _detectOverflow = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(state, options) {\n var _await$platform$isEle, x, y, platform, rects, elements, strategy, _evaluate3, _evaluate3$boundary, boundary, _evaluate3$rootBounda, rootBoundary, _evaluate3$elementCon, elementContext, _evaluate3$altBoundar, altBoundary, _evaluate3$padding, padding, paddingObject, altContext, element, clippingClientRect, rect, offsetParent, offsetScale, elementClientRect;\n return _regeneratorRuntime().wrap(function _callee7$(_context7) {\n while (1) switch (_context7.prev = _context7.next) {\n case 0:\n if (options === void 0) {\n options = {};\n }\n x = state.x, y = state.y, platform = state.platform, rects = state.rects, elements = state.elements, strategy = state.strategy;\n _evaluate3 = evaluate(options, state), _evaluate3$boundary = _evaluate3.boundary, boundary = _evaluate3$boundary === void 0 ? 'clippingAncestors' : _evaluate3$boundary, _evaluate3$rootBounda = _evaluate3.rootBoundary, rootBoundary = _evaluate3$rootBounda === void 0 ? 'viewport' : _evaluate3$rootBounda, _evaluate3$elementCon = _evaluate3.elementContext, elementContext = _evaluate3$elementCon === void 0 ? 'floating' : _evaluate3$elementCon, _evaluate3$altBoundar = _evaluate3.altBoundary, altBoundary = _evaluate3$altBoundar === void 0 ? false : _evaluate3$altBoundar, _evaluate3$padding = _evaluate3.padding, padding = _evaluate3$padding === void 0 ? 0 : _evaluate3$padding;\n paddingObject = getPaddingObject(padding);\n altContext = elementContext === 'floating' ? 'reference' : 'floating';\n element = elements[altBoundary ? altContext : elementContext];\n _context7.t0 = rectToClientRect;\n _context7.t1 = platform;\n _context7.next = 10;\n return platform.isElement == null ? void 0 : platform.isElement(element);\n case 10:\n _context7.t2 = _await$platform$isEle = _context7.sent;\n if (!(_context7.t2 != null)) {\n _context7.next = 15;\n break;\n }\n _context7.t3 = _await$platform$isEle;\n _context7.next = 16;\n break;\n case 15:\n _context7.t3 = true;\n case 16:\n if (!_context7.t3) {\n _context7.next = 20;\n break;\n }\n _context7.t4 = element;\n _context7.next = 26;\n break;\n case 20:\n _context7.t5 = element.contextElement;\n if (_context7.t5) {\n _context7.next = 25;\n break;\n }\n _context7.next = 24;\n return platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating);\n case 24:\n _context7.t5 = _context7.sent;\n case 25:\n _context7.t4 = _context7.t5;\n case 26:\n _context7.t6 = _context7.t4;\n _context7.t7 = boundary;\n _context7.t8 = rootBoundary;\n _context7.t9 = strategy;\n _context7.t10 = {\n element: _context7.t6,\n boundary: _context7.t7,\n rootBoundary: _context7.t8,\n strategy: _context7.t9\n };\n _context7.next = 33;\n return _context7.t1.getClippingRect.call(_context7.t1, _context7.t10);\n case 33:\n _context7.t11 = _context7.sent;\n clippingClientRect = (0, _context7.t0)(_context7.t11);\n rect = elementContext === 'floating' ? _extends({}, rects.floating, {\n x: x,\n y: y\n }) : rects.reference;\n _context7.next = 38;\n return platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating);\n case 38:\n offsetParent = _context7.sent;\n _context7.next = 41;\n return platform.isElement == null ? void 0 : platform.isElement(offsetParent);\n case 41:\n if (!_context7.sent) {\n _context7.next = 50;\n break;\n }\n _context7.next = 44;\n return platform.getScale == null ? void 0 : platform.getScale(offsetParent);\n case 44:\n _context7.t13 = _context7.sent;\n if (_context7.t13) {\n _context7.next = 47;\n break;\n }\n _context7.t13 = {\n x: 1,\n y: 1\n };\n case 47:\n _context7.t12 = _context7.t13;\n _context7.next = 51;\n break;\n case 50:\n _context7.t12 = {\n x: 1,\n y: 1\n };\n case 51:\n offsetScale = _context7.t12;\n _context7.t14 = rectToClientRect;\n if (!platform.convertOffsetParentRelativeRectToViewportRelativeRect) {\n _context7.next = 59;\n break;\n }\n _context7.next = 56;\n return platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n rect: rect,\n offsetParent: offsetParent,\n strategy: strategy\n });\n case 56:\n _context7.t15 = _context7.sent;\n _context7.next = 60;\n break;\n case 59:\n _context7.t15 = rect;\n case 60:\n _context7.t16 = _context7.t15;\n elementClientRect = (0, _context7.t14)(_context7.t16);\n return _context7.abrupt(\"return\", {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n });\n case 63:\n case \"end\":\n return _context7.stop();\n }\n }, _callee7);\n }));\n return _detectOverflow.apply(this, arguments);\n }\n var arrow = function arrow(options) {\n return {\n name: 'arrow',\n options: options,\n fn: function fn(state) {\n return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {\n var x, y, placement, rects, platform, elements, _ref4, element, _ref4$padding, padding, paddingObject, coords, axis, length, arrowDimensions, isYAxis, minProp, maxProp, clientProp, endDiff, startDiff, arrowOffsetParent, clientSize, centerToReference, largestPossiblePadding, minPadding, maxPadding, min$1, max, center, offset, shouldAddOffset, alignmentOffset;\n return _regeneratorRuntime().wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n x = state.x, y = state.y, placement = state.placement, rects = state.rects, platform = state.platform, elements = state.elements; // Since `element` is required, we don't Partial<> the type.\n _ref4 = evaluate(options, state) || {}, element = _ref4.element, _ref4$padding = _ref4.padding, padding = _ref4$padding === void 0 ? 0 : _ref4$padding;\n if (!(element == null)) {\n _context2.next = 4;\n break;\n }\n return _context2.abrupt(\"return\", {});\n case 4:\n paddingObject = getPaddingObject(padding);\n coords = {\n x: x,\n y: y\n };\n axis = getAlignmentAxis(placement);\n length = getAxisLength(axis);\n _context2.next = 10;\n return platform.getDimensions(element);\n case 10:\n arrowDimensions = _context2.sent;\n isYAxis = axis === 'y';\n minProp = isYAxis ? 'top' : 'left';\n maxProp = isYAxis ? 'bottom' : 'right';\n clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n startDiff = coords[axis] - rects.reference[axis];\n _context2.next = 19;\n return platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element);\n case 19:\n arrowOffsetParent = _context2.sent;\n clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0; // DOM platform can return `window` as the `offsetParent`.\n _context2.t0 = !clientSize;\n if (_context2.t0) {\n _context2.next = 26;\n break;\n }\n _context2.next = 25;\n return platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent);\n case 25:\n _context2.t0 = !_context2.sent;\n case 26:\n if (!_context2.t0) {\n _context2.next = 28;\n break;\n }\n clientSize = elements.floating[clientProp] || rects.floating[length];\n case 28:\n centerToReference = endDiff / 2 - startDiff / 2; // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n minPadding = min(paddingObject[minProp], largestPossiblePadding);\n maxPadding = min(paddingObject[maxProp], largestPossiblePadding); // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n min$1 = minPadding;\n max = clientSize - arrowDimensions[length] - maxPadding;\n center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n offset = clamp(min$1, center, max); // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. This stops `shift()` from taking action, but can\n // be worked around by calling it again after the `arrow()` if desired.\n shouldAddOffset = getAlignment(placement) != null && center != offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n alignmentOffset = shouldAddOffset ? center < min$1 ? min$1 - center : max - center : 0;\n return _context2.abrupt(\"return\", _defineProperty(_defineProperty({}, axis, coords[axis] - alignmentOffset), \"data\", _defineProperty(_defineProperty({}, axis, offset), \"centerOffset\", center - offset + alignmentOffset)));\n case 39:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2);\n }))();\n }\n };\n };\n\n /**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\n var flip = function flip(options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options: options,\n fn: function fn(state) {\n return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {\n var _middlewareData$flip, placement, middlewareData, rects, initialPlacement, platform, elements, _evaluate2, _evaluate2$mainAxis, checkMainAxis, _evaluate2$crossAxis, checkCrossAxis, specifiedFallbackPlacements, _evaluate2$fallbackSt, fallbackStrategy, _evaluate2$fallbackAx, fallbackAxisSideDirection, _evaluate2$flipAlignm, flipAlignment, detectOverflowOptions, side, isBasePlacement, rtl, fallbackPlacements, placements, overflow, overflows, overflowsData, sides, _middlewareData$flip2, _overflowsData$filter, nextIndex, nextPlacement, resetPlacement, _overflowsData$map$so, _placement;\n return _regeneratorRuntime().wrap(function _callee3$(_context3) {\n while (1) switch (_context3.prev = _context3.next) {\n case 0:\n placement = state.placement, middlewareData = state.middlewareData, rects = state.rects, initialPlacement = state.initialPlacement, platform = state.platform, elements = state.elements;\n _evaluate2 = evaluate(options, state), _evaluate2$mainAxis = _evaluate2.mainAxis, checkMainAxis = _evaluate2$mainAxis === void 0 ? true : _evaluate2$mainAxis, _evaluate2$crossAxis = _evaluate2.crossAxis, checkCrossAxis = _evaluate2$crossAxis === void 0 ? true : _evaluate2$crossAxis, specifiedFallbackPlacements = _evaluate2.fallbackPlacements, _evaluate2$fallbackSt = _evaluate2.fallbackStrategy, fallbackStrategy = _evaluate2$fallbackSt === void 0 ? 'bestFit' : _evaluate2$fallbackSt, _evaluate2$fallbackAx = _evaluate2.fallbackAxisSideDirection, fallbackAxisSideDirection = _evaluate2$fallbackAx === void 0 ? 'none' : _evaluate2$fallbackAx, _evaluate2$flipAlignm = _evaluate2.flipAlignment, flipAlignment = _evaluate2$flipAlignm === void 0 ? true : _evaluate2$flipAlignm, detectOverflowOptions = _objectWithoutPropertiesLoose(_evaluate2, _excluded2);\n side = getSide(placement);\n isBasePlacement = getSide(initialPlacement) === initialPlacement;\n _context3.next = 6;\n return platform.isRTL == null ? void 0 : platform.isRTL(elements.floating);\n case 6:\n rtl = _context3.sent;\n fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') {\n fallbackPlacements.push.apply(fallbackPlacements, _toConsumableArray(getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl)));\n }\n placements = [initialPlacement].concat(_toConsumableArray(fallbackPlacements));\n _context3.next = 12;\n return detectOverflow(state, detectOverflowOptions);\n case 12:\n overflow = _context3.sent;\n overflows = [];\n overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [].concat(_toConsumableArray(overflowsData), [{\n placement: placement,\n overflows: overflows\n }]);\n\n // One or more sides is overflowing.\n if (overflows.every(function (side) {\n return side <= 0;\n })) {\n _context3.next = 35;\n break;\n }\n nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n nextPlacement = placements[nextIndex];\n if (!nextPlacement) {\n _context3.next = 23;\n break;\n }\n return _context3.abrupt(\"return\", {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n });\n case 23:\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n resetPlacement = (_overflowsData$filter = overflowsData.filter(function (d) {\n return d.overflows[0] <= 0;\n }).sort(function (a, b) {\n return a.overflows[1] - b.overflows[1];\n })[0]) == null ? void 0 : _overflowsData$filter.placement; // Otherwise fallback.\n if (resetPlacement) {\n _context3.next = 33;\n break;\n }\n _context3.t0 = fallbackStrategy;\n _context3.next = _context3.t0 === 'bestFit' ? 28 : _context3.t0 === 'initialPlacement' ? 31 : 33;\n break;\n case 28:\n _placement = (_overflowsData$map$so = overflowsData.map(function (d) {\n return [d.placement, d.overflows.filter(function (overflow) {\n return overflow > 0;\n }).reduce(function (acc, overflow) {\n return acc + overflow;\n }, 0)];\n }).sort(function (a, b) {\n return a[1] - b[1];\n })[0]) == null ? void 0 : _overflowsData$map$so[0];\n if (_placement) {\n resetPlacement = _placement;\n }\n return _context3.abrupt(\"break\", 33);\n case 31:\n resetPlacement = initialPlacement;\n return _context3.abrupt(\"break\", 33);\n case 33:\n if (!(placement !== resetPlacement)) {\n _context3.next = 35;\n break;\n }\n return _context3.abrupt(\"return\", {\n reset: {\n placement: resetPlacement\n }\n });\n case 35:\n return _context3.abrupt(\"return\", {});\n case 36:\n case \"end\":\n return _context3.stop();\n }\n }, _callee3);\n }))();\n }\n };\n };\n\n /**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\n var shift = function shift(options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options: options,\n fn: function fn(state) {\n return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {\n var x, y, placement, _evaluate4, _evaluate4$mainAxis, checkMainAxis, _evaluate4$crossAxis, checkCrossAxis, _evaluate4$limiter, limiter, detectOverflowOptions, coords, overflow, crossAxis, mainAxis, mainAxisCoord, crossAxisCoord, minSide, maxSide, _min, _max, _minSide, _maxSide, _min2, _max2, limitedCoords;\n return _regeneratorRuntime().wrap(function _callee4$(_context4) {\n while (1) switch (_context4.prev = _context4.next) {\n case 0:\n x = state.x, y = state.y, placement = state.placement;\n _evaluate4 = evaluate(options, state), _evaluate4$mainAxis = _evaluate4.mainAxis, checkMainAxis = _evaluate4$mainAxis === void 0 ? true : _evaluate4$mainAxis, _evaluate4$crossAxis = _evaluate4.crossAxis, checkCrossAxis = _evaluate4$crossAxis === void 0 ? false : _evaluate4$crossAxis, _evaluate4$limiter = _evaluate4.limiter, limiter = _evaluate4$limiter === void 0 ? {\n fn: function fn(_ref) {\n var x = _ref.x,\n y = _ref.y;\n return {\n x: x,\n y: y\n };\n }\n } : _evaluate4$limiter, detectOverflowOptions = _objectWithoutPropertiesLoose(_evaluate4, _excluded4);\n coords = {\n x: x,\n y: y\n };\n _context4.next = 5;\n return detectOverflow(state, detectOverflowOptions);\n case 5:\n overflow = _context4.sent;\n crossAxis = getSideAxis(getSide(placement));\n mainAxis = getOppositeAxis(crossAxis);\n mainAxisCoord = coords[mainAxis];\n crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n minSide = mainAxis === 'y' ? 'top' : 'left';\n maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n _min = mainAxisCoord + overflow[minSide];\n _max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(_min, mainAxisCoord, _max);\n }\n if (checkCrossAxis) {\n _minSide = crossAxis === 'y' ? 'top' : 'left';\n _maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n _min2 = crossAxisCoord + overflow[_minSide];\n _max2 = crossAxisCoord - overflow[_maxSide];\n crossAxisCoord = clamp(_min2, crossAxisCoord, _max2);\n }\n limitedCoords = limiter.fn(_extends({}, state, _defineProperty(_defineProperty({}, mainAxis, mainAxisCoord), crossAxis, crossAxisCoord)));\n return _context4.abrupt(\"return\", _extends({}, limitedCoords, {\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y\n }\n }));\n case 14:\n case \"end\":\n return _context4.stop();\n }\n }, _callee4);\n }))();\n }\n };\n };\n /**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\n var limitShift = function limitShift(options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options: options,\n fn: function fn(state) {\n var x = state.x,\n y = state.y,\n placement = state.placement,\n rects = state.rects,\n middlewareData = state.middlewareData;\n var _evaluate = evaluate(options, state),\n _evaluate$offset = _evaluate.offset,\n offset = _evaluate$offset === void 0 ? 0 : _evaluate$offset,\n _evaluate$mainAxis = _evaluate.mainAxis,\n checkMainAxis = _evaluate$mainAxis === void 0 ? true : _evaluate$mainAxis,\n _evaluate$crossAxis = _evaluate.crossAxis,\n checkCrossAxis = _evaluate$crossAxis === void 0 ? true : _evaluate$crossAxis;\n var coords = {\n x: x,\n y: y\n };\n var crossAxis = getSideAxis(placement);\n var mainAxis = getOppositeAxis(crossAxis);\n var mainAxisCoord = coords[mainAxis];\n var crossAxisCoord = coords[crossAxis];\n var rawOffset = evaluate(offset, state);\n var computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : _extends({\n mainAxis: 0,\n crossAxis: 0\n }, rawOffset);\n if (checkMainAxis) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n var limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n var limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n var _len2 = mainAxis === 'y' ? 'width' : 'height';\n var isOriginSide = ['top', 'left'].includes(getSide(placement));\n var _limitMin = rects.reference[crossAxis] - rects.floating[_len2] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n var _limitMax = rects.reference[crossAxis] + rects.reference[_len2] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < _limitMin) {\n crossAxisCoord = _limitMin;\n } else if (crossAxisCoord > _limitMax) {\n crossAxisCoord = _limitMax;\n }\n }\n return _defineProperty(_defineProperty({}, mainAxis, mainAxisCoord), crossAxis, crossAxisCoord);\n }\n };\n };\n function getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n }\n function getWindow(node) {\n var _node$ownerDocument;\n return (node == null ? void 0 : (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n }\n function getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n }\n function isNode(value) {\n return value instanceof Node || value instanceof getWindow(value).Node;\n }\n function isElement(value) {\n return value instanceof Element || value instanceof getWindow(value).Element;\n }\n function isHTMLElement(value) {\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n }\n function isShadowRoot(value) {\n // Browsers without `ShadowRoot` support.\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n }\n function isOverflowElement(element) {\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY,\n display = _getComputedStyle.display;\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);\n }\n function isTableElement(element) {\n return ['table', 'td', 'th'].includes(getNodeName(element));\n }\n function isContainingBlock(element) {\n var webkit = isWebKit();\n var css = getComputedStyle(element);\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(function (value) {\n return (css.willChange || '').includes(value);\n }) || ['paint', 'layout', 'strict', 'content'].some(function (value) {\n return (css.contain || '').includes(value);\n });\n }\n function getContainingBlock(element) {\n var currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else {\n currentNode = getParentNode(currentNode);\n }\n }\n return null;\n }\n function isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n }\n function isLastTraversableNode(node) {\n return ['html', 'body', '#document'].includes(getNodeName(node));\n }\n function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n }\n function getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.pageXOffset,\n scrollTop: element.pageYOffset\n };\n }\n function getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n var result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n }\n function getNearestOverflowAncestor(node) {\n var parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n }\n function getOverflowAncestors(node, list) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n var scrollableAncestor = getNearestOverflowAncestor(node);\n var isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n var win = getWindow(scrollableAncestor);\n if (isBody) {\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor));\n }\n function getCssDimensions(element) {\n var css = getComputedStyle(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n var width = parseFloat(css.width) || 0;\n var height = parseFloat(css.height) || 0;\n var hasOffset = isHTMLElement(element);\n var offsetWidth = hasOffset ? element.offsetWidth : width;\n var offsetHeight = hasOffset ? element.offsetHeight : height;\n var shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width: width,\n height: height,\n $: shouldFallback\n };\n }\n function unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n }\n function getScale(element) {\n var domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n var rect = domElement.getBoundingClientRect();\n var _getCssDimensions = getCssDimensions(domElement),\n width = _getCssDimensions.width,\n height = _getCssDimensions.height,\n $ = _getCssDimensions.$;\n var x = ($ ? round(rect.width) : rect.width) / width;\n var y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x: x,\n y: y\n };\n }\n var noOffsets = /*#__PURE__*/createCoords(0);\n function getVisualOffsets(element) {\n var win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n }\n function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n }\n function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n var clientRect = element.getBoundingClientRect();\n var domElement = unwrapElement(element);\n var scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n var visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n var x = (clientRect.left + visualOffsets.x) / scale.x;\n var y = (clientRect.top + visualOffsets.y) / scale.y;\n var width = clientRect.width / scale.x;\n var height = clientRect.height / scale.y;\n if (domElement) {\n var win = getWindow(domElement);\n var offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n var currentIFrame = win.frameElement;\n while (currentIFrame && offsetParent && offsetWin !== win) {\n var iframeScale = getScale(currentIFrame);\n var iframeRect = currentIFrame.getBoundingClientRect();\n var css = getComputedStyle(currentIFrame);\n var left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n var top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentIFrame = getWindow(currentIFrame).frameElement;\n }\n }\n return rectToClientRect({\n width: width,\n height: height,\n x: x,\n y: y\n });\n }\n function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n var rect = _ref.rect,\n offsetParent = _ref.offsetParent,\n strategy = _ref.strategy;\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n if (offsetParent === documentElement) {\n return rect;\n }\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var scale = createCoords(1);\n var offsets = createCoords(0);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n var offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y\n };\n }\n function getClientRects(element) {\n return Array.from(element.getClientRects());\n }\n function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;\n }\n\n // Gets the entire size of the scrollable document area, even extending outside\n // of the `` and `` rect bounds if horizontally scrollable.\n function getDocumentRect(element) {\n var html = getDocumentElement(element);\n var scroll = getNodeScroll(element);\n var body = element.ownerDocument.body;\n var width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n var height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n var x = -scroll.scrollLeft + getWindowScrollBarX(element);\n var y = -scroll.scrollTop;\n if (getComputedStyle(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n }\n function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n }\n\n // Returns the inner client rect, subtracting scrollbars if present.\n function getInnerBoundingClientRect(element, strategy) {\n var clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n var top = clientRect.top + element.clientTop;\n var left = clientRect.left + element.clientLeft;\n var scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n var width = element.clientWidth * scale.x;\n var height = element.clientHeight * scale.y;\n var x = left * scale.x;\n var y = top * scale.y;\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n }\n function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n var rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n var visualOffsets = getVisualOffsets(element);\n rect = _extends({}, clippingAncestor, {\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y\n });\n }\n return rectToClientRect(rect);\n }\n function hasFixedPositionAncestor(element, stopNode) {\n var parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n }\n\n // A \"clipping ancestor\" is an `overflow` element with the characteristic of\n // clipping (or hiding) child elements. This returns all clipping ancestors\n // of the given element up the tree.\n function getClippingElementAncestors(element, cache) {\n var cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n var result = getOverflowAncestors(element).filter(function (el) {\n return isElement(el) && getNodeName(el) !== 'body';\n });\n var currentContainingBlockComputedStyle = null;\n var elementIsFixed = getComputedStyle(element).position === 'fixed';\n var currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n var computedStyle = getComputedStyle(currentNode);\n var currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n var shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(function (ancestor) {\n return ancestor !== currentNode;\n });\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n }\n\n // Gets the maximum area that the element is visible in due to any number of\n // clipping ancestors.\n function getClippingRect(_ref) {\n var element = _ref.element,\n boundary = _ref.boundary,\n rootBoundary = _ref.rootBoundary,\n strategy = _ref.strategy;\n var elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary);\n var clippingAncestors = [].concat(_toConsumableArray(elementClippingAncestors), [rootBoundary]);\n var firstClippingAncestor = clippingAncestors[0];\n var clippingRect = clippingAncestors.reduce(function (accRect, clippingAncestor) {\n var rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n return {\n width: clippingRect.right - clippingRect.left,\n height: clippingRect.bottom - clippingRect.top,\n x: clippingRect.left,\n y: clippingRect.top\n };\n }\n function getDimensions(element) {\n return getCssDimensions(element);\n }\n function getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var isFixed = strategy === 'fixed';\n var rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = createCoords(0);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n var offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n }\n function getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n return element.offsetParent;\n }\n\n // Gets the closest ancestor positioned element. Handles some edge cases,\n // such as table ancestors and cross browser bugs.\n function getOffsetParent(element, polyfill) {\n var window = getWindow(element);\n if (!isHTMLElement(element)) {\n return window;\n }\n var offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {\n return window;\n }\n return offsetParent || getContainingBlock(element) || window;\n }\n var getElementRects = /*#__PURE__*/function () {\n var _getElementRects = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(_ref) {\n var reference, floating, strategy, getOffsetParentFn, getDimensionsFn;\n return _regeneratorRuntime().wrap(function _callee5$(_context5) {\n while (1) switch (_context5.prev = _context5.next) {\n case 0:\n reference = _ref.reference, floating = _ref.floating, strategy = _ref.strategy;\n getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n getDimensionsFn = this.getDimensions;\n _context5.t0 = getRectRelativeToOffsetParent;\n _context5.t1 = reference;\n _context5.next = 7;\n return getOffsetParentFn(floating);\n case 7:\n _context5.t2 = _context5.sent;\n _context5.t3 = strategy;\n _context5.t4 = (0, _context5.t0)(_context5.t1, _context5.t2, _context5.t3);\n _context5.t5 = _extends;\n _context5.t6 = {\n x: 0,\n y: 0\n };\n _context5.next = 14;\n return getDimensionsFn(floating);\n case 14:\n _context5.t7 = _context5.sent;\n _context5.t8 = (0, _context5.t5)(_context5.t6, _context5.t7);\n return _context5.abrupt(\"return\", {\n reference: _context5.t4,\n floating: _context5.t8\n });\n case 17:\n case \"end\":\n return _context5.stop();\n }\n }, _callee5, this);\n }));\n function getElementRects(_x6) {\n return _getElementRects.apply(this, arguments);\n }\n return getElementRects;\n }();\n function isRTL(element) {\n return getComputedStyle(element).direction === 'rtl';\n }\n var platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect: convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement: getDocumentElement,\n getClippingRect: getClippingRect,\n getOffsetParent: getOffsetParent,\n getElementRects: getElementRects,\n getClientRects: getClientRects,\n getDimensions: getDimensions,\n getScale: getScale,\n isElement: isElement,\n isRTL: isRTL\n };\n\n // https://samthor.au/2021/observing-dom/\n function observeMove(element, onMove) {\n var io = null;\n var timeoutId;\n var root = getDocumentElement(element);\n function cleanup() {\n clearTimeout(timeoutId);\n io && io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n var _element$getBoundingC = element.getBoundingClientRect(),\n left = _element$getBoundingC.left,\n top = _element$getBoundingC.top,\n width = _element$getBoundingC.width,\n height = _element$getBoundingC.height;\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n var insetTop = floor(top);\n var insetRight = floor(root.clientWidth - (left + width));\n var insetBottom = floor(root.clientHeight - (top + height));\n var insetLeft = floor(left);\n var rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n var options = {\n rootMargin: rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n var isFirstUpdate = true;\n function handleObserve(entries) {\n var ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n timeoutId = setTimeout(function () {\n refresh(false, 1e-7);\n }, 100);\n } else {\n refresh(false, ratio);\n }\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, _extends({}, options, {\n // Handle