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QAAS,SAAiBgL,GACxB,OAAK/H,EAAM9E,QAGX8E,EAAMM,gBAAiB,EACnBV,EAAUA,EAAU/J,OAAS,KAAOuC,KAC/BA,KAEFA,KAAK6N,iBAAgB,EAAO8B,IAN1B3P,IAOX,EACAsE,wBAAyB,SAAiClC,GACxD,IAAIwN,EAAkB,GAAG1O,OAAOkB,GAAmB4D,OAAO9H,SAQ1D,OAPA0J,EAAMC,WAAa+H,EAAgBxF,KAAI,SAAU/E,GAC/C,MAA0B,iBAAZA,EAAuBkC,EAAIjG,cAAc+D,GAAWA,CACpE,IACIuC,EAAM9E,QACRqH,IAEFyE,IACO5O,IACT,GAEFnC,OAAOyI,iBAAiBgB,EAAM,CAC5BmI,kBAAmB,CACjBlO,MAAO,WACL,OAAOqG,EAAMM,cACf,GAEF2F,gBAAiB,CACftM,MAAO,SAAeyC,EAAQuL,GAC5B,GAAI3H,EAAM5D,SAAWA,EACnB,OAAOhE,KAGT,GADA4H,EAAM5D,OAASA,EACXA,EAAQ,CACV,IAAI6L,EAAUxH,EAAUkH,EAAS,WAC7BO,EAAczH,EAAUkH,EAAS,eACrCM,SAA6CA,IAC7CzB,IACAQ,IACAkB,SAAqDA,GACvD,KAAO,CACL,IAAIC,EAAY1H,EAAUkH,EAAS,aAC/BS,EAAgB3H,EAAUkH,EAAS,iBACvCQ,SAAiDA,IACjD5F,IACAwD,IACAiB,IACAoB,SAAyDA,GAC3D,CACA,OAAOhQ,IACT,KAKJsH,EAAKhD,wBAAwB8C,GACtBE,CACT","sources":["webpack://Kristiania.Web/./node_modules/focus-trap-react/dist/focus-trap-react.js","webpack://Kristiania.Web/./node_modules/focus-trap-react/node_modules/focus-trap/dist/focus-trap.esm.js"],"sourcesContent":["\"use strict\";\n\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); }\nvar _exec$, _exec;\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 _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 _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 _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); }\nvar React = require('react');\nvar _require = require('focus-trap'),\n createFocusTrap = _require.createFocusTrap;\nvar _require2 = require('tabbable'),\n isFocusable = _require2.isFocusable;\n\n/**\n * The major version of React currently running.\n * @type {number}\n */\nvar reactVerMajor = parseInt((_exec$ = (_exec = /^(\\d+)\\./.exec(React.version)) === null || _exec === void 0 ? void 0 : _exec[1]) !== null && _exec$ !== void 0 ? _exec$ : 0, 10);\n\n/**\n * @type {import('../index.d.ts').FocusTrap}\n */\nvar FocusTrap = /*#__PURE__*/function (_React$Component) {\n function FocusTrap(props) {\n var _this;\n _classCallCheck(this, FocusTrap);\n _this = _callSuper(this, FocusTrap, [props]);\n /**\n * Gets the node for the given option, which is expected to be an option that\n * can be either a DOM node, a string that is a selector to get a node, `false`\n * (if a node is explicitly NOT given), or a function that returns any of these\n * values.\n * @param {string} optionName\n * @returns {undefined | false | HTMLElement | SVGElement} Returns\n * `undefined` if the option is not specified; `false` if the option\n * resolved to `false` (node explicitly not given); otherwise, the resolved\n * DOM node.\n * @throws {Error} If the option is set, not `false`, and is not, or does not\n * resolve to a node.\n */\n _defineProperty(_this, \"getNodeForOption\", function (optionName) {\n var _this$internalOptions;\n // use internal options first, falling back to original options\n var optionValue = (_this$internalOptions = this.internalOptions[optionName]) !== null && _this$internalOptions !== void 0 ? _this$internalOptions : this.originalOptions[optionName];\n if (typeof optionValue === 'function') {\n for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n params[_key - 1] = arguments[_key];\n }\n optionValue = optionValue.apply(void 0, params);\n }\n if (optionValue === true) {\n optionValue = undefined; // use default value\n }\n if (!optionValue) {\n if (optionValue === undefined || optionValue === false) {\n return optionValue;\n }\n // else, empty string (invalid), null (invalid), 0 (invalid)\n\n throw new Error(\"`\".concat(optionName, \"` was specified but was not a node, or did not return a node\"));\n }\n var node = optionValue; // could be HTMLElement, SVGElement, or non-empty string at this point\n\n if (typeof optionValue === 'string') {\n var _this$getDocument;\n node = (_this$getDocument = this.getDocument()) === null || _this$getDocument === void 0 ? void 0 : _this$getDocument.querySelector(optionValue); // resolve to node, or null if fails\n if (!node) {\n throw new Error(\"`\".concat(optionName, \"` as selector refers to no known node\"));\n }\n }\n return node;\n });\n _this.handleDeactivate = _this.handleDeactivate.bind(_this);\n _this.handlePostDeactivate = _this.handlePostDeactivate.bind(_this);\n _this.handleClickOutsideDeactivates = _this.handleClickOutsideDeactivates.bind(_this);\n\n // focus-trap options used internally when creating the trap\n _this.internalOptions = {\n // We need to hijack the returnFocusOnDeactivate option,\n // because React can move focus into the element before we arrived at\n // this lifecycle hook (e.g. with autoFocus inputs). So the component\n // captures the previouslyFocusedElement in componentWillMount,\n // then (optionally) returns focus to it in componentWillUnmount.\n returnFocusOnDeactivate: false,\n // the rest of these are also related to deactivation of the trap, and we\n // need to use them and control them as well\n checkCanReturnFocus: null,\n onDeactivate: _this.handleDeactivate,\n onPostDeactivate: _this.handlePostDeactivate,\n // we need to special-case this setting as well so that we can know if we should\n // NOT return focus if the trap gets auto-deactivated as the result of an\n // outside click (otherwise, we'll always think we should return focus because\n // of how we manage that flag internally here)\n clickOutsideDeactivates: _this.handleClickOutsideDeactivates\n };\n\n // original options provided by the consumer\n _this.originalOptions = {\n // because of the above `internalOptions`, we maintain our own flag for\n // this option, and default it to `true` because that's focus-trap's default\n returnFocusOnDeactivate: true,\n // because of the above `internalOptions`, we keep these separate since\n // they're part of the deactivation process which we configure (internally) to\n // be shared between focus-trap and focus-trap-react\n onDeactivate: null,\n onPostDeactivate: null,\n checkCanReturnFocus: null,\n // the user's setting, defaulted to false since focus-trap defaults this to false\n clickOutsideDeactivates: false\n };\n var focusTrapOptions = props.focusTrapOptions;\n for (var optionName in focusTrapOptions) {\n if (!Object.prototype.hasOwnProperty.call(focusTrapOptions, optionName)) {\n continue;\n }\n if (optionName === 'returnFocusOnDeactivate' || optionName === 'onDeactivate' || optionName === 'onPostDeactivate' || optionName === 'checkCanReturnFocus' || optionName === 'clickOutsideDeactivates') {\n _this.originalOptions[optionName] = focusTrapOptions[optionName];\n continue; // exclude from internalOptions\n }\n _this.internalOptions[optionName] = focusTrapOptions[optionName];\n }\n\n // if set, `{ target: Node, allowDeactivation: boolean }` where `target` is the outside\n // node that was clicked, and `allowDeactivation` is the result of the consumer's\n // option (stored in `this.originalOptions.clickOutsideDeactivates`, which may be a\n // function) whether to allow or deny auto-deactivation on click on this outside node\n _this.outsideClick = null;\n\n // elements from which to create the focus trap on mount; if a child is used\n // instead of the `containerElements` prop, we'll get the child's related\n // element when the trap renders and then is declared 'mounted'\n _this.focusTrapElements = props.containerElements || [];\n\n // now we remember what the currently focused element is, not relying on focus-trap\n _this.updatePreviousElement();\n return _this;\n }\n\n /**\n * Gets the configured document.\n * @returns {Document|undefined} Configured document, falling back to the main\n * document, if it exists. During SSR, `undefined` is returned since the\n * document doesn't exist.\n */\n _inherits(FocusTrap, _React$Component);\n return _createClass(FocusTrap, [{\n key: \"getDocument\",\n value: function getDocument() {\n // SSR: careful to check if `document` exists before accessing it as a variable\n return this.props.focusTrapOptions.document || (typeof document !== 'undefined' ? document : undefined);\n }\n }, {\n key: \"getReturnFocusNode\",\n value: function getReturnFocusNode() {\n var node = this.getNodeForOption('setReturnFocus', this.previouslyFocusedElement);\n return node ? node : node === false ? false : this.previouslyFocusedElement;\n }\n\n /** Update the previously focused element with the currently focused element. */\n }, {\n key: \"updatePreviousElement\",\n value: function updatePreviousElement() {\n var currentDocument = this.getDocument();\n if (currentDocument) {\n this.previouslyFocusedElement = currentDocument.activeElement;\n }\n }\n }, {\n key: \"deactivateTrap\",\n value: function deactivateTrap() {\n // NOTE: it's possible the focus trap has already been deactivated without our knowing it,\n // especially if the user set the `clickOutsideDeactivates: true` option on the trap,\n // and the mouse was clicked on some element outside the trap; at that point, focus-trap\n // will initiate its auto-deactivation process, which will call our own\n // handleDeactivate(), which will call into this method\n if (!this.focusTrap || !this.focusTrap.active) {\n return;\n }\n this.focusTrap.deactivate({\n // NOTE: we never let the trap return the focus since we do that ourselves\n returnFocus: false,\n // we'll call this in our own post deactivate handler so make sure the trap doesn't\n // do it prematurely\n checkCanReturnFocus: null,\n // let it call the user's original deactivate handler, if any, instead of\n // our own which calls back into this function\n onDeactivate: this.originalOptions.onDeactivate\n // NOTE: for post deactivate, don't specify anything so that it calls the\n // onPostDeactivate handler specified on `this.internalOptions`\n // which will always be our own `handlePostDeactivate()` handler, which\n // will finish things off by calling the user's provided onPostDeactivate\n // handler, if any, at the right time\n // onPostDeactivate: NOTHING\n });\n }\n }, {\n key: \"handleClickOutsideDeactivates\",\n value: function handleClickOutsideDeactivates(event) {\n // use consumer's option (or call their handler) as the permission or denial\n var allowDeactivation = typeof this.originalOptions.clickOutsideDeactivates === 'function' ? this.originalOptions.clickOutsideDeactivates.call(null, event) // call out of context\n : this.originalOptions.clickOutsideDeactivates; // boolean\n\n if (allowDeactivation) {\n // capture the outside target that was clicked so we can use it in the deactivation\n // process since the consumer allowed it to cause auto-deactivation\n this.outsideClick = {\n target: event.target,\n allowDeactivation: allowDeactivation\n };\n }\n return allowDeactivation;\n }\n }, {\n key: \"handleDeactivate\",\n value: function handleDeactivate() {\n if (this.originalOptions.onDeactivate) {\n this.originalOptions.onDeactivate.call(null); // call user's handler out of context\n }\n this.deactivateTrap();\n }\n }, {\n key: \"handlePostDeactivate\",\n value: function handlePostDeactivate() {\n var _this2 = this;\n var finishDeactivation = function finishDeactivation() {\n var returnFocusNode = _this2.getReturnFocusNode();\n var canReturnFocus = !!(\n // did the consumer allow it?\n\n _this2.originalOptions.returnFocusOnDeactivate && // can we actually focus the node?\n returnFocusNode !== null && returnFocusNode !== void 0 && returnFocusNode.focus && (\n // was there an outside click that allowed deactivation?\n !_this2.outsideClick ||\n // did the consumer allow deactivation when the outside node was clicked?\n _this2.outsideClick.allowDeactivation &&\n // is the outside node NOT focusable (implying that it did NOT receive focus\n // as a result of the click-through) -- in which case do NOT restore focus\n // to `returnFocusNode` because focus should remain on the outside node\n !isFocusable(_this2.outsideClick.target, _this2.internalOptions.tabbableOptions))\n\n // if no, the restore focus to `returnFocusNode` at this point\n );\n var _this2$internalOption = _this2.internalOptions.preventScroll,\n preventScroll = _this2$internalOption === void 0 ? false : _this2$internalOption;\n if (canReturnFocus) {\n // return focus to the element that had focus when the trap was activated\n returnFocusNode.focus({\n preventScroll: preventScroll\n });\n }\n if (_this2.originalOptions.onPostDeactivate) {\n _this2.originalOptions.onPostDeactivate.call(null); // don't call it in context of \"this\"\n }\n _this2.outsideClick = null; // reset: no longer needed\n };\n if (this.originalOptions.checkCanReturnFocus) {\n this.originalOptions.checkCanReturnFocus.call(null, this.getReturnFocusNode()) // call out of context\n .then(finishDeactivation, finishDeactivation);\n } else {\n finishDeactivation();\n }\n }\n }, {\n key: \"setupFocusTrap\",\n value: function setupFocusTrap() {\n if (this.focusTrap) {\n // trap already exists: it's possible we're in StrictMode and we're being remounted,\n // in which case, we will have deactivated the trap when we got unmounted (remember,\n // StrictMode, in development, purposely unmounts and remounts components after\n // mounting them the first time to make sure they have reusable state,\n // @see https://reactjs.org/docs/strict-mode.html#ensuring-reusable-state) so now\n // we need to restore the state of the trap according to our component state\n // NOTE: Strict mode __violates__ assumptions about the `componentWillUnmount()` API\n // which clearly states -- even for React 18 -- that, \"Once a component instance is\n // unmounted, __it will never be mounted again.__\" (emphasis ours). So when we get\n // unmounted, we assume we're gone forever and we deactivate the trap. But then\n // we get remounted and we're supposed to restore state. But if you had paused,\n // we've now deactivated (we don't know we're amount to get remounted again)\n // which means we need to reactivate and then pause. Otherwise, do nothing.\n if (this.props.active && !this.focusTrap.active) {\n this.focusTrap.activate();\n if (this.props.paused) {\n this.focusTrap.pause();\n }\n }\n } else {\n var nodesExist = this.focusTrapElements.some(Boolean);\n if (nodesExist) {\n this.focusTrap = this.props._createFocusTrap(this.focusTrapElements, this.internalOptions);\n if (this.props.active) {\n this.focusTrap.activate();\n }\n if (this.props.paused) {\n this.focusTrap.pause();\n }\n }\n }\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (this.props.active) {\n this.setupFocusTrap();\n }\n // else, wait for later activation in case the `focusTrapOptions` will be updated\n // again before the trap is activated (e.g. if waiting to know what the document\n // object will be, so the Trap must be rendered, but the consumer is waiting to\n // activate until they have obtained the document from a ref)\n // @see https://github.com/focus-trap/focus-trap-react/issues/539\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (this.focusTrap) {\n if (prevProps.containerElements !== this.props.containerElements) {\n this.focusTrap.updateContainerElements(this.props.containerElements);\n }\n var hasActivated = !prevProps.active && this.props.active;\n var hasDeactivated = prevProps.active && !this.props.active;\n var hasPaused = !prevProps.paused && this.props.paused;\n var hasUnpaused = prevProps.paused && !this.props.paused;\n if (hasActivated) {\n this.updatePreviousElement();\n this.focusTrap.activate();\n }\n if (hasDeactivated) {\n this.deactivateTrap();\n return; // un/pause does nothing on an inactive trap\n }\n if (hasPaused) {\n this.focusTrap.pause();\n }\n if (hasUnpaused) {\n this.focusTrap.unpause();\n }\n } else {\n // NOTE: if we're in `componentDidUpdate` and we don't have a trap yet,\n // it either means it shouldn't be active, or it should be but none of\n // of given `containerElements` were present in the DOM the last time\n // we tried to create the trap\n\n if (prevProps.containerElements !== this.props.containerElements) {\n this.focusTrapElements = this.props.containerElements;\n }\n\n // don't create the trap unless it should be active in case the consumer\n // is still updating `focusTrapOptions`\n // @see https://github.com/focus-trap/focus-trap-react/issues/539\n if (this.props.active) {\n this.updatePreviousElement();\n this.setupFocusTrap();\n }\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.deactivateTrap();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n var child = this.props.children ? React.Children.only(this.props.children) : undefined;\n if (child) {\n if (child.type && child.type === React.Fragment) {\n throw new Error('A focus-trap cannot use a Fragment as its child container. Try replacing it with a
element.');\n }\n var callbackRef = function callbackRef(element) {\n var containerElements = _this3.props.containerElements;\n if (child) {\n // React 19 moved the `ref` to an official prop\n if (reactVerMajor >= 19) {\n if (typeof child.props.ref === 'function') {\n child.props.ref(element);\n } else if (child.props.ref) {\n child.props.ref.current = element;\n }\n } else {\n // older versions of React had the `ref` separate from props (still works in R19\n // but results in a deprecation warning in Dev builds)\n if (typeof child.ref === 'function') {\n child.ref(element);\n } else if (child.ref) {\n child.ref.current = element;\n }\n }\n }\n _this3.focusTrapElements = containerElements ? containerElements : [element];\n };\n var childWithRef = React.cloneElement(child, {\n ref: callbackRef\n });\n return childWithRef;\n }\n return null;\n }\n }]);\n}(React.Component); // NOTE: While React 19 REMOVED support for `propTypes`, support for `defaultProps`\n// __for class components ONLY__ remains: \"Class components will continue to support\n// defaultProps since there is no ES6 alternative.\"\n// @see https://react.dev/blog/2024/04/25/react-19-upgrade-guide#removed-proptypes-and-defaultprops\nFocusTrap.defaultProps = {\n active: true,\n paused: false,\n focusTrapOptions: {},\n _createFocusTrap: createFocusTrap\n};\n\n// 🔺 DEPRECATED: default export\nmodule.exports = FocusTrap;\n\n// named export\nmodule.exports.FocusTrap = FocusTrap;","/*!\n* focus-trap 7.6.4\n* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE\n*/\nimport { tabbable, focusable, isTabbable, getTabIndex, isFocusable } from 'tabbable';\n\nfunction _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nfunction _arrayWithoutHoles(r) {\n if (Array.isArray(r)) return _arrayLikeToArray(r);\n}\nfunction _defineProperty(e, r, t) {\n return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: true,\n configurable: true,\n writable: true\n }) : e[r] = t, e;\n}\nfunction _iterableToArray(r) {\n if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);\n}\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), true).forEach(function (r) {\n _defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\nfunction _toConsumableArray(r) {\n return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();\n}\nfunction _toPrimitive(t, r) {\n if (\"object\" != typeof t || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (undefined !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != typeof i) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nfunction _toPropertyKey(t) {\n var i = _toPrimitive(t, \"string\");\n return \"symbol\" == typeof i ? i : i + \"\";\n}\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return _arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n 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) : undefined;\n }\n}\n\nvar activeFocusTraps = {\n activateTrap: function activateTrap(trapStack, trap) {\n if (trapStack.length > 0) {\n var activeTrap = trapStack[trapStack.length - 1];\n if (activeTrap !== trap) {\n activeTrap._setPausedState(true);\n }\n }\n var trapIndex = trapStack.indexOf(trap);\n if (trapIndex === -1) {\n trapStack.push(trap);\n } else {\n // move this existing trap to the front of the queue\n trapStack.splice(trapIndex, 1);\n trapStack.push(trap);\n }\n },\n deactivateTrap: function deactivateTrap(trapStack, trap) {\n var trapIndex = trapStack.indexOf(trap);\n if (trapIndex !== -1) {\n trapStack.splice(trapIndex, 1);\n }\n if (trapStack.length > 0 && !trapStack[trapStack.length - 1]._isManuallyPaused()) {\n trapStack[trapStack.length - 1]._setPausedState(false);\n }\n }\n};\nvar isSelectableInput = function isSelectableInput(node) {\n return node.tagName && node.tagName.toLowerCase() === 'input' && typeof node.select === 'function';\n};\nvar isEscapeEvent = function isEscapeEvent(e) {\n return (e === null || e === undefined ? undefined : e.key) === 'Escape' || (e === null || e === undefined ? undefined : e.key) === 'Esc' || (e === null || e === undefined ? undefined : e.keyCode) === 27;\n};\nvar isTabEvent = function isTabEvent(e) {\n return (e === null || e === undefined ? undefined : e.key) === 'Tab' || (e === null || e === undefined ? undefined : e.keyCode) === 9;\n};\n\n// checks for TAB by default\nvar isKeyForward = function isKeyForward(e) {\n return isTabEvent(e) && !e.shiftKey;\n};\n\n// checks for SHIFT+TAB by default\nvar isKeyBackward = function isKeyBackward(e) {\n return isTabEvent(e) && e.shiftKey;\n};\nvar delay = function delay(fn) {\n return setTimeout(fn, 0);\n};\n\n/**\n * Get an option's value when it could be a plain value, or a handler that provides\n * the value.\n * @param {*} value Option's value to check.\n * @param {...*} [params] Any parameters to pass to the handler, if `value` is a function.\n * @returns {*} The `value`, or the handler's returned value.\n */\nvar valueOrHandler = function valueOrHandler(value) {\n for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n params[_key - 1] = arguments[_key];\n }\n return typeof value === 'function' ? value.apply(undefined, params) : value;\n};\nvar getActualTarget = function getActualTarget(event) {\n // NOTE: If the trap is _inside_ a shadow DOM, event.target will always be the\n // shadow host. However, event.target.composedPath() will be an array of\n // nodes \"clicked\" from inner-most (the actual element inside the shadow) to\n // outer-most (the host HTML document). If we have access to composedPath(),\n // then use its first element; otherwise, fall back to event.target (and\n // this only works for an _open_ shadow DOM; otherwise,\n // composedPath()[0] === event.target always).\n return event.target.shadowRoot && typeof event.composedPath === 'function' ? event.composedPath()[0] : event.target;\n};\n\n// NOTE: this must be _outside_ `createFocusTrap()` to make sure all traps in this\n// current instance use the same stack if `userOptions.trapStack` isn't specified\nvar internalTrapStack = [];\nvar createFocusTrap = function createFocusTrap(elements, userOptions) {\n // SSR: a live trap shouldn't be created in this type of environment so this\n // should be safe code to execute if the `document` option isn't specified\n var doc = (userOptions === null || userOptions === undefined ? undefined : userOptions.document) || document;\n var trapStack = (userOptions === null || userOptions === undefined ? undefined : userOptions.trapStack) || internalTrapStack;\n var config = _objectSpread2({\n returnFocusOnDeactivate: true,\n escapeDeactivates: true,\n delayInitialFocus: true,\n isKeyForward: isKeyForward,\n isKeyBackward: isKeyBackward\n }, userOptions);\n var state = {\n // containers given to createFocusTrap()\n // @type {Array}\n containers: [],\n // list of objects identifying tabbable nodes in `containers` in the trap\n // NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap\n // is active, but the trap should never get to a state where there isn't at least one group\n // with at least one tabbable node in it (that would lead to an error condition that would\n // result in an error being thrown)\n // @type {Array<{\n // container: HTMLElement,\n // tabbableNodes: Array, // empty if none\n // focusableNodes: Array, // empty if none\n // posTabIndexesFound: boolean,\n // firstTabbableNode: HTMLElement|undefined,\n // lastTabbableNode: HTMLElement|undefined,\n // firstDomTabbableNode: HTMLElement|undefined,\n // lastDomTabbableNode: HTMLElement|undefined,\n // nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined\n // }>}\n containerGroups: [],\n // same order/length as `containers` list\n\n // references to objects in `containerGroups`, but only those that actually have\n // tabbable nodes in them\n // NOTE: same order as `containers` and `containerGroups`, but __not necessarily__\n // the same length\n tabbableGroups: [],\n nodeFocusedBeforeActivation: null,\n mostRecentlyFocusedNode: null,\n active: false,\n paused: false,\n manuallyPaused: false,\n // timer ID for when delayInitialFocus is true and initial focus in this trap\n // has been delayed during activation\n delayInitialFocusTimer: undefined,\n // the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any\n recentNavEvent: undefined\n };\n var trap; // eslint-disable-line prefer-const -- some private functions reference it, and its methods reference private functions, so we must declare here and define later\n\n /**\n * Gets a configuration option value.\n * @param {Object|undefined} configOverrideOptions If true, and option is defined in this set,\n * value will be taken from this object. Otherwise, value will be taken from base configuration.\n * @param {string} optionName Name of the option whose value is sought.\n * @param {string|undefined} [configOptionName] Name of option to use __instead of__ `optionName`\n * IIF `configOverrideOptions` is not defined. Otherwise, `optionName` is used.\n */\n var getOption = function getOption(configOverrideOptions, optionName, configOptionName) {\n return configOverrideOptions && configOverrideOptions[optionName] !== undefined ? configOverrideOptions[optionName] : config[configOptionName || optionName];\n };\n\n /**\n * Finds the index of the container that contains the element.\n * @param {HTMLElement} element\n * @param {Event} [event] If available, and `element` isn't directly found in any container,\n * the event's composed path is used to see if includes any known trap containers in the\n * case where the element is inside a Shadow DOM.\n * @returns {number} Index of the container in either `state.containers` or\n * `state.containerGroups` (the order/length of these lists are the same); -1\n * if the element isn't found.\n */\n var findContainerIndex = function findContainerIndex(element, event) {\n var composedPath = typeof (event === null || event === undefined ? undefined : event.composedPath) === 'function' ? event.composedPath() : undefined;\n // NOTE: search `containerGroups` because it's possible a group contains no tabbable\n // nodes, but still contains focusable nodes (e.g. if they all have `tabindex=-1`)\n // and we still need to find the element in there\n return state.containerGroups.findIndex(function (_ref) {\n var container = _ref.container,\n tabbableNodes = _ref.tabbableNodes;\n return container.contains(element) || (// fall back to explicit tabbable search which will take into consideration any\n // web components if the `tabbableOptions.getShadowRoot` option was used for\n // the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't\n // look inside web components even if open)\n composedPath === null || composedPath === undefined ? undefined : composedPath.includes(container)) || tabbableNodes.find(function (node) {\n return node === element;\n });\n });\n };\n\n /**\n * Gets the node for the given option, which is expected to be an option that\n * can be either a DOM node, a string that is a selector to get a node, `false`\n * (if a node is explicitly NOT given), or a function that returns any of these\n * values.\n * @param {string} optionName\n * @param {Object} options\n * @param {boolean} [options.hasFallback] True if the option could be a selector string\n * and the option allows for a fallback scenario in the case where the selector is\n * valid but does not match a node (i.e. the queried node doesn't exist in the DOM).\n * @param {Array} [options.params] Params to pass to the option if it's a function.\n * @returns {undefined | null | false | HTMLElement | SVGElement} Returns\n * `undefined` if the option is not specified; `null` if the option didn't resolve\n * to a node but `options.hasFallback=true`, `false` if the option resolved to `false`\n * (node explicitly not given); otherwise, the resolved DOM node.\n * @throws {Error} If the option is set, not `false`, and is not, or does not\n * resolve to a node, unless the option is a selector string and `options.hasFallback=true`.\n */\n var getNodeForOption = function getNodeForOption(optionName) {\n var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _ref2$hasFallback = _ref2.hasFallback,\n hasFallback = _ref2$hasFallback === undefined ? false : _ref2$hasFallback,\n _ref2$params = _ref2.params,\n params = _ref2$params === undefined ? [] : _ref2$params;\n var optionValue = config[optionName];\n if (typeof optionValue === 'function') {\n optionValue = optionValue.apply(undefined, _toConsumableArray(params));\n }\n if (optionValue === true) {\n optionValue = undefined; // use default value\n }\n if (!optionValue) {\n if (optionValue === undefined || optionValue === false) {\n return optionValue;\n }\n // else, empty string (invalid), null (invalid), 0 (invalid)\n\n throw new Error(\"`\".concat(optionName, \"` was specified but was not a node, or did not return a node\"));\n }\n var node = optionValue; // could be HTMLElement, SVGElement, or non-empty string at this point\n\n if (typeof optionValue === 'string') {\n try {\n node = doc.querySelector(optionValue); // resolve to node, or null if fails\n } catch (err) {\n throw new Error(\"`\".concat(optionName, \"` appears to be an invalid selector; error=\\\"\").concat(err.message, \"\\\"\"));\n }\n if (!node) {\n if (!hasFallback) {\n throw new Error(\"`\".concat(optionName, \"` as selector refers to no known node\"));\n }\n // else, `node` MUST be `null` because that's what `Document.querySelector()` returns\n // if the selector is valid but doesn't match anything\n }\n }\n return node;\n };\n var getInitialFocusNode = function getInitialFocusNode() {\n var node = getNodeForOption('initialFocus', {\n hasFallback: true\n });\n\n // false explicitly indicates we want no initialFocus at all\n if (node === false) {\n return false;\n }\n if (node === undefined || node && !isFocusable(node, config.tabbableOptions)) {\n // option not specified nor focusable: use fallback options\n if (findContainerIndex(doc.activeElement) >= 0) {\n node = doc.activeElement;\n } else {\n var firstTabbableGroup = state.tabbableGroups[0];\n var firstTabbableNode = firstTabbableGroup && firstTabbableGroup.firstTabbableNode;\n\n // NOTE: `fallbackFocus` option function cannot return `false` (not supported)\n node = firstTabbableNode || getNodeForOption('fallbackFocus');\n }\n } else if (node === null) {\n // option is a VALID selector string that doesn't yield a node: use the `fallbackFocus`\n // option instead of the default behavior when the option isn't specified at all\n node = getNodeForOption('fallbackFocus');\n }\n if (!node) {\n throw new Error('Your focus-trap needs to have at least one focusable element');\n }\n return node;\n };\n var updateTabbableNodes = function updateTabbableNodes() {\n state.containerGroups = state.containers.map(function (container) {\n var tabbableNodes = tabbable(container, config.tabbableOptions);\n\n // NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes\n // are a superset of tabbable nodes since nodes with negative `tabindex` attributes\n // are focusable but not tabbable\n var focusableNodes = focusable(container, config.tabbableOptions);\n var firstTabbableNode = tabbableNodes.length > 0 ? tabbableNodes[0] : undefined;\n var lastTabbableNode = tabbableNodes.length > 0 ? tabbableNodes[tabbableNodes.length - 1] : undefined;\n var firstDomTabbableNode = focusableNodes.find(function (node) {\n return isTabbable(node);\n });\n var lastDomTabbableNode = focusableNodes.slice().reverse().find(function (node) {\n return isTabbable(node);\n });\n var posTabIndexesFound = !!tabbableNodes.find(function (node) {\n return getTabIndex(node) > 0;\n });\n return {\n container: container,\n tabbableNodes: tabbableNodes,\n focusableNodes: focusableNodes,\n /** True if at least one node with positive `tabindex` was found in this container. */\n posTabIndexesFound: posTabIndexesFound,\n /** First tabbable node in container, __tabindex__ order; `undefined` if none. */\n firstTabbableNode: firstTabbableNode,\n /** Last tabbable node in container, __tabindex__ order; `undefined` if none. */\n lastTabbableNode: lastTabbableNode,\n // NOTE: DOM order is NOT NECESSARILY \"document position\" order, but figuring that out\n // would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition\n // because that API doesn't work with Shadow DOM as well as it should (@see\n // https://github.com/whatwg/dom/issues/320) and since this first/last is only needed, so far,\n // to address an edge case related to positive tabindex support, this seems like a much easier,\n // \"close enough most of the time\" alternative for positive tabindexes which should generally\n // be avoided anyway...\n /** First tabbable node in container, __DOM__ order; `undefined` if none. */\n firstDomTabbableNode: firstDomTabbableNode,\n /** Last tabbable node in container, __DOM__ order; `undefined` if none. */\n lastDomTabbableNode: lastDomTabbableNode,\n /**\n * Finds the __tabbable__ node that follows the given node in the specified direction,\n * in this container, if any.\n * @param {HTMLElement} node\n * @param {boolean} [forward] True if going in forward tab order; false if going\n * in reverse.\n * @returns {HTMLElement|undefined} The next tabbable node, if any.\n */\n nextTabbableNode: function nextTabbableNode(node) {\n var forward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var nodeIdx = tabbableNodes.indexOf(node);\n if (nodeIdx < 0) {\n // either not tabbable nor focusable, or was focused but not tabbable (negative tabindex):\n // since `node` should at least have been focusable, we assume that's the case and mimic\n // what browsers do, which is set focus to the next node in __document position order__,\n // regardless of positive tabindexes, if any -- and for reasons explained in the NOTE\n // above related to `firstDomTabbable` and `lastDomTabbable` properties, we fall back to\n // basic DOM order\n if (forward) {\n return focusableNodes.slice(focusableNodes.indexOf(node) + 1).find(function (el) {\n return isTabbable(el);\n });\n }\n return focusableNodes.slice(0, focusableNodes.indexOf(node)).reverse().find(function (el) {\n return isTabbable(el);\n });\n }\n return tabbableNodes[nodeIdx + (forward ? 1 : -1)];\n }\n };\n });\n state.tabbableGroups = state.containerGroups.filter(function (group) {\n return group.tabbableNodes.length > 0;\n });\n\n // throw if no groups have tabbable nodes and we don't have a fallback focus node either\n if (state.tabbableGroups.length <= 0 && !getNodeForOption('fallbackFocus') // returning false not supported for this option\n ) {\n throw new Error('Your focus-trap must have at least one container with at least one tabbable node in it at all times');\n }\n\n // NOTE: Positive tabindexes are only properly supported in single-container traps because\n // doing it across multiple containers where tabindexes could be all over the place\n // would require Tabbable to support multiple containers, would require additional\n // specialized Shadow DOM support, and would require Tabbable's multi-container support\n // to look at those containers in document position order rather than user-provided\n // order (as they are treated in Focus-trap, for legacy reasons). See discussion on\n // https://github.com/focus-trap/focus-trap/issues/375 for more details.\n if (state.containerGroups.find(function (g) {\n return g.posTabIndexesFound;\n }) && state.containerGroups.length > 1) {\n throw new Error(\"At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.\");\n }\n };\n\n /**\n * Gets the current activeElement. If it's a web-component and has open shadow-root\n * it will recursively search inside shadow roots for the \"true\" activeElement.\n *\n * @param {Document | ShadowRoot} el\n *\n * @returns {HTMLElement} The element that currently has the focus\n **/\n var _getActiveElement = function getActiveElement(el) {\n var activeElement = el.activeElement;\n if (!activeElement) {\n return;\n }\n if (activeElement.shadowRoot && activeElement.shadowRoot.activeElement !== null) {\n return _getActiveElement(activeElement.shadowRoot);\n }\n return activeElement;\n };\n var _tryFocus = function tryFocus(node) {\n if (node === false) {\n return;\n }\n if (node === _getActiveElement(document)) {\n return;\n }\n if (!node || !node.focus) {\n _tryFocus(getInitialFocusNode());\n return;\n }\n node.focus({\n preventScroll: !!config.preventScroll\n });\n // NOTE: focus() API does not trigger focusIn event so set MRU node manually\n state.mostRecentlyFocusedNode = node;\n if (isSelectableInput(node)) {\n node.select();\n }\n };\n var getReturnFocusNode = function getReturnFocusNode(previousActiveElement) {\n var node = getNodeForOption('setReturnFocus', {\n params: [previousActiveElement]\n });\n return node ? node : node === false ? false : previousActiveElement;\n };\n\n /**\n * Finds the next node (in either direction) where focus should move according to a\n * keyboard focus-in event.\n * @param {Object} params\n * @param {Node} [params.target] Known target __from which__ to navigate, if any.\n * @param {KeyboardEvent|FocusEvent} [params.event] Event to use if `target` isn't known (event\n * will be used to determine the `target`). Ignored if `target` is specified.\n * @param {boolean} [params.isBackward] True if focus should move backward.\n * @returns {Node|undefined} The next node, or `undefined` if a next node couldn't be\n * determined given the current state of the trap.\n */\n var findNextNavNode = function findNextNavNode(_ref3) {\n var target = _ref3.target,\n event = _ref3.event,\n _ref3$isBackward = _ref3.isBackward,\n isBackward = _ref3$isBackward === undefined ? false : _ref3$isBackward;\n target = target || getActualTarget(event);\n updateTabbableNodes();\n var destinationNode = null;\n if (state.tabbableGroups.length > 0) {\n // make sure the target is actually contained in a group\n // NOTE: the target may also be the container itself if it's focusable\n // with tabIndex='-1' and was given initial focus\n var containerIndex = findContainerIndex(target, event);\n var containerGroup = containerIndex >= 0 ? state.containerGroups[containerIndex] : undefined;\n if (containerIndex < 0) {\n // target not found in any group: quite possible focus has escaped the trap,\n // so bring it back into...\n if (isBackward) {\n // ...the last node in the last group\n destinationNode = state.tabbableGroups[state.tabbableGroups.length - 1].lastTabbableNode;\n } else {\n // ...the first node in the first group\n destinationNode = state.tabbableGroups[0].firstTabbableNode;\n }\n } else if (isBackward) {\n // REVERSE\n\n // is the target the first tabbable node in a group?\n var startOfGroupIndex = state.tabbableGroups.findIndex(function (_ref4) {\n var firstTabbableNode = _ref4.firstTabbableNode;\n return target === firstTabbableNode;\n });\n if (startOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target, false))) {\n // an exception case where the target is either the container itself, or\n // a non-tabbable node that was given focus (i.e. tabindex is negative\n // and user clicked on it or node was programmatically given focus)\n // and is not followed by any other tabbable node, in which\n // case, we should handle shift+tab as if focus were on the container's\n // first tabbable node, and go to the last tabbable node of the LAST group\n startOfGroupIndex = containerIndex;\n }\n if (startOfGroupIndex >= 0) {\n // YES: then shift+tab should go to the last tabbable node in the\n // previous group (and wrap around to the last tabbable node of\n // the LAST group if it's the first tabbable node of the FIRST group)\n var destinationGroupIndex = startOfGroupIndex === 0 ? state.tabbableGroups.length - 1 : startOfGroupIndex - 1;\n var destinationGroup = state.tabbableGroups[destinationGroupIndex];\n destinationNode = getTabIndex(target) >= 0 ? destinationGroup.lastTabbableNode : destinationGroup.lastDomTabbableNode;\n } else if (!isTabEvent(event)) {\n // user must have customized the nav keys so we have to move focus manually _within_\n // the active group: do this based on the order determined by tabbable()\n destinationNode = containerGroup.nextTabbableNode(target, false);\n }\n } else {\n // FORWARD\n\n // is the target the last tabbable node in a group?\n var lastOfGroupIndex = state.tabbableGroups.findIndex(function (_ref5) {\n var lastTabbableNode = _ref5.lastTabbableNode;\n return target === lastTabbableNode;\n });\n if (lastOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target))) {\n // an exception case where the target is the container itself, or\n // a non-tabbable node that was given focus (i.e. tabindex is negative\n // and user clicked on it or node was programmatically given focus)\n // and is not followed by any other tabbable node, in which\n // case, we should handle tab as if focus were on the container's\n // last tabbable node, and go to the first tabbable node of the FIRST group\n lastOfGroupIndex = containerIndex;\n }\n if (lastOfGroupIndex >= 0) {\n // YES: then tab should go to the first tabbable node in the next\n // group (and wrap around to the first tabbable node of the FIRST\n // group if it's the last tabbable node of the LAST group)\n var _destinationGroupIndex = lastOfGroupIndex === state.tabbableGroups.length - 1 ? 0 : lastOfGroupIndex + 1;\n var _destinationGroup = state.tabbableGroups[_destinationGroupIndex];\n destinationNode = getTabIndex(target) >= 0 ? _destinationGroup.firstTabbableNode : _destinationGroup.firstDomTabbableNode;\n } else if (!isTabEvent(event)) {\n // user must have customized the nav keys so we have to move focus manually _within_\n // the active group: do this based on the order determined by tabbable()\n destinationNode = containerGroup.nextTabbableNode(target);\n }\n }\n } else {\n // no groups available\n // NOTE: the fallbackFocus option does not support returning false to opt-out\n destinationNode = getNodeForOption('fallbackFocus');\n }\n return destinationNode;\n };\n\n // This needs to be done on mousedown and touchstart instead of click\n // so that it precedes the focus event.\n var checkPointerDown = function checkPointerDown(e) {\n var target = getActualTarget(e);\n if (findContainerIndex(target, e) >= 0) {\n // allow the click since it ocurred inside the trap\n return;\n }\n if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n // immediately deactivate the trap\n trap.deactivate({\n // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,\n // which will result in the outside click setting focus to the node\n // that was clicked (and if not focusable, to \"nothing\"); by setting\n // `returnFocus: true`, we'll attempt to re-focus the node originally-focused\n // on activation (or the configured `setReturnFocus` node), whether the\n // outside click was on a focusable node or not\n returnFocus: config.returnFocusOnDeactivate\n });\n return;\n }\n\n // This is needed for mobile devices.\n // (If we'll only let `click` events through,\n // then on mobile they will be blocked anyways if `touchstart` is blocked.)\n if (valueOrHandler(config.allowOutsideClick, e)) {\n // allow the click outside the trap to take place\n return;\n }\n\n // otherwise, prevent the click\n e.preventDefault();\n };\n\n // In case focus escapes the trap for some strange reason, pull it back in.\n // NOTE: the focusIn event is NOT cancelable, so if focus escapes, it may cause unexpected\n // scrolling if the node that got focused was out of view; there's nothing we can do to\n // prevent that from happening by the time we discover that focus escaped\n var checkFocusIn = function checkFocusIn(event) {\n var target = getActualTarget(event);\n var targetContained = findContainerIndex(target, event) >= 0;\n\n // In Firefox when you Tab out of an iframe the Document is briefly focused.\n if (targetContained || target instanceof Document) {\n if (targetContained) {\n state.mostRecentlyFocusedNode = target;\n }\n } else {\n // escaped! pull it back in to where it just left\n event.stopImmediatePropagation();\n\n // focus will escape if the MRU node had a positive tab index and user tried to nav forward;\n // it will also escape if the MRU node had a 0 tab index and user tried to nav backward\n // toward a node with a positive tab index\n var nextNode; // next node to focus, if we find one\n var navAcrossContainers = true;\n if (state.mostRecentlyFocusedNode) {\n if (getTabIndex(state.mostRecentlyFocusedNode) > 0) {\n // MRU container index must be >=0 otherwise we wouldn't have it as an MRU node...\n var mruContainerIdx = findContainerIndex(state.mostRecentlyFocusedNode);\n // there MAY not be any tabbable nodes in the container if there are at least 2 containers\n // and the MRU node is focusable but not tabbable (focus-trap requires at least 1 container\n // with at least one tabbable node in order to function, so this could be the other container\n // with nothing tabbable in it)\n var tabbableNodes = state.containerGroups[mruContainerIdx].tabbableNodes;\n if (tabbableNodes.length > 0) {\n // MRU tab index MAY not be found if the MRU node is focusable but not tabbable\n var mruTabIdx = tabbableNodes.findIndex(function (node) {\n return node === state.mostRecentlyFocusedNode;\n });\n if (mruTabIdx >= 0) {\n if (config.isKeyForward(state.recentNavEvent)) {\n if (mruTabIdx + 1 < tabbableNodes.length) {\n nextNode = tabbableNodes[mruTabIdx + 1];\n navAcrossContainers = false;\n }\n // else, don't wrap within the container as focus should move to next/previous\n // container\n } else {\n if (mruTabIdx - 1 >= 0) {\n nextNode = tabbableNodes[mruTabIdx - 1];\n navAcrossContainers = false;\n }\n // else, don't wrap within the container as focus should move to next/previous\n // container\n }\n // else, don't find in container order without considering direction too\n }\n }\n // else, no tabbable nodes in that container (which means we must have at least one other\n // container with at least one tabbable node in it, otherwise focus-trap would've thrown\n // an error the last time updateTabbableNodes() was run): find next node among all known\n // containers\n } else {\n // check to see if there's at least one tabbable node with a positive tab index inside\n // the trap because focus seems to escape when navigating backward from a tabbable node\n // with tabindex=0 when this is the case (instead of wrapping to the tabbable node with\n // the greatest positive tab index like it should)\n if (!state.containerGroups.some(function (g) {\n return g.tabbableNodes.some(function (n) {\n return getTabIndex(n) > 0;\n });\n })) {\n // no containers with tabbable nodes with positive tab indexes which means the focus\n // escaped for some other reason and we should just execute the fallback to the\n // MRU node or initial focus node, if any\n navAcrossContainers = false;\n }\n }\n } else {\n // no MRU node means we're likely in some initial condition when the trap has just\n // been activated and initial focus hasn't been given yet, in which case we should\n // fall through to trying to focus the initial focus node, which is what should\n // happen below at this point in the logic\n navAcrossContainers = false;\n }\n if (navAcrossContainers) {\n nextNode = findNextNavNode({\n // move FROM the MRU node, not event-related node (which will be the node that is\n // outside the trap causing the focus escape we're trying to fix)\n target: state.mostRecentlyFocusedNode,\n isBackward: config.isKeyBackward(state.recentNavEvent)\n });\n }\n if (nextNode) {\n _tryFocus(nextNode);\n } else {\n _tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());\n }\n }\n state.recentNavEvent = undefined; // clear\n };\n\n // Hijack key nav events on the first and last focusable nodes of the trap,\n // in order to prevent focus from escaping. If it escapes for even a\n // moment it can end up scrolling the page and causing confusion so we\n // kind of need to capture the action at the keydown phase.\n var checkKeyNav = function checkKeyNav(event) {\n var isBackward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n state.recentNavEvent = event;\n var destinationNode = findNextNavNode({\n event: event,\n isBackward: isBackward\n });\n if (destinationNode) {\n if (isTabEvent(event)) {\n // since tab natively moves focus, we wouldn't have a destination node unless we\n // were on the edge of a container and had to move to the next/previous edge, in\n // which case we want to prevent default to keep the browser from moving focus\n // to where it normally would\n event.preventDefault();\n }\n _tryFocus(destinationNode);\n }\n // else, let the browser take care of [shift+]tab and move the focus\n };\n var checkTabKey = function checkTabKey(event) {\n if (config.isKeyForward(event) || config.isKeyBackward(event)) {\n checkKeyNav(event, config.isKeyBackward(event));\n }\n };\n\n // we use a different event phase for the Escape key to allow canceling the event and checking for this in escapeDeactivates\n var checkEscapeKey = function checkEscapeKey(event) {\n if (isEscapeEvent(event) && valueOrHandler(config.escapeDeactivates, event) !== false) {\n event.preventDefault();\n trap.deactivate();\n }\n };\n var checkClick = function checkClick(e) {\n var target = getActualTarget(e);\n if (findContainerIndex(target, e) >= 0) {\n return;\n }\n if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n return;\n }\n if (valueOrHandler(config.allowOutsideClick, e)) {\n return;\n }\n e.preventDefault();\n e.stopImmediatePropagation();\n };\n\n //\n // EVENT LISTENERS\n //\n\n var addListeners = function addListeners() {\n if (!state.active) {\n return;\n }\n\n // There can be only one listening focus trap at a time\n activeFocusTraps.activateTrap(trapStack, trap);\n\n // Delay ensures that the focused element doesn't capture the event\n // that caused the focus trap activation.\n state.delayInitialFocusTimer = config.delayInitialFocus ? delay(function () {\n _tryFocus(getInitialFocusNode());\n }) : _tryFocus(getInitialFocusNode());\n doc.addEventListener('focusin', checkFocusIn, true);\n doc.addEventListener('mousedown', checkPointerDown, {\n capture: true,\n passive: false\n });\n doc.addEventListener('touchstart', checkPointerDown, {\n capture: true,\n passive: false\n });\n doc.addEventListener('click', checkClick, {\n capture: true,\n passive: false\n });\n doc.addEventListener('keydown', checkTabKey, {\n capture: true,\n passive: false\n });\n doc.addEventListener('keydown', checkEscapeKey);\n return trap;\n };\n var removeListeners = function removeListeners() {\n if (!state.active) {\n return;\n }\n doc.removeEventListener('focusin', checkFocusIn, true);\n doc.removeEventListener('mousedown', checkPointerDown, true);\n doc.removeEventListener('touchstart', checkPointerDown, true);\n doc.removeEventListener('click', checkClick, true);\n doc.removeEventListener('keydown', checkTabKey, true);\n doc.removeEventListener('keydown', checkEscapeKey);\n return trap;\n };\n\n //\n // MUTATION OBSERVER\n //\n\n var checkDomRemoval = function checkDomRemoval(mutations) {\n var isFocusedNodeRemoved = mutations.some(function (mutation) {\n var removedNodes = Array.from(mutation.removedNodes);\n return removedNodes.some(function (node) {\n return node === state.mostRecentlyFocusedNode;\n });\n });\n\n // If the currently focused is removed then browsers will move focus to the\n // element. If this happens, try to move focus back into the trap.\n if (isFocusedNodeRemoved) {\n _tryFocus(getInitialFocusNode());\n }\n };\n\n // Use MutationObserver - if supported - to detect if focused node is removed\n // from the DOM.\n var mutationObserver = typeof window !== 'undefined' && 'MutationObserver' in window ? new MutationObserver(checkDomRemoval) : undefined;\n var updateObservedNodes = function updateObservedNodes() {\n if (!mutationObserver) {\n return;\n }\n mutationObserver.disconnect();\n if (state.active && !state.paused) {\n state.containers.map(function (container) {\n mutationObserver.observe(container, {\n subtree: true,\n childList: true\n });\n });\n }\n };\n\n //\n // TRAP DEFINITION\n //\n\n trap = {\n get active() {\n return state.active;\n },\n get paused() {\n return state.paused;\n },\n activate: function activate(activateOptions) {\n if (state.active) {\n return this;\n }\n var onActivate = getOption(activateOptions, 'onActivate');\n var onPostActivate = getOption(activateOptions, 'onPostActivate');\n var checkCanFocusTrap = getOption(activateOptions, 'checkCanFocusTrap');\n if (!checkCanFocusTrap) {\n updateTabbableNodes();\n }\n state.active = true;\n state.paused = false;\n state.nodeFocusedBeforeActivation = doc.activeElement;\n onActivate === null || onActivate === undefined || onActivate();\n var finishActivation = function finishActivation() {\n if (checkCanFocusTrap) {\n updateTabbableNodes();\n }\n addListeners();\n updateObservedNodes();\n onPostActivate === null || onPostActivate === undefined || onPostActivate();\n };\n if (checkCanFocusTrap) {\n checkCanFocusTrap(state.containers.concat()).then(finishActivation, finishActivation);\n return this;\n }\n finishActivation();\n return this;\n },\n deactivate: function deactivate(deactivateOptions) {\n if (!state.active) {\n return this;\n }\n var options = _objectSpread2({\n onDeactivate: config.onDeactivate,\n onPostDeactivate: config.onPostDeactivate,\n checkCanReturnFocus: config.checkCanReturnFocus\n }, deactivateOptions);\n clearTimeout(state.delayInitialFocusTimer); // noop if undefined\n state.delayInitialFocusTimer = undefined;\n removeListeners();\n state.active = false;\n state.paused = false;\n updateObservedNodes();\n activeFocusTraps.deactivateTrap(trapStack, trap);\n var onDeactivate = getOption(options, 'onDeactivate');\n var onPostDeactivate = getOption(options, 'onPostDeactivate');\n var checkCanReturnFocus = getOption(options, 'checkCanReturnFocus');\n var returnFocus = getOption(options, 'returnFocus', 'returnFocusOnDeactivate');\n onDeactivate === null || onDeactivate === undefined || onDeactivate();\n var finishDeactivation = function finishDeactivation() {\n delay(function () {\n if (returnFocus) {\n _tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));\n }\n onPostDeactivate === null || onPostDeactivate === undefined || onPostDeactivate();\n });\n };\n if (returnFocus && checkCanReturnFocus) {\n checkCanReturnFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation)).then(finishDeactivation, finishDeactivation);\n return this;\n }\n finishDeactivation();\n return this;\n },\n pause: function pause(pauseOptions) {\n if (!state.active) {\n return this;\n }\n state.manuallyPaused = true;\n return this._setPausedState(true, pauseOptions);\n },\n unpause: function unpause(unpauseOptions) {\n if (!state.active) {\n return this;\n }\n state.manuallyPaused = false;\n if (trapStack[trapStack.length - 1] !== this) {\n return this;\n }\n return this._setPausedState(false, unpauseOptions);\n },\n updateContainerElements: function updateContainerElements(containerElements) {\n var elementsAsArray = [].concat(containerElements).filter(Boolean);\n state.containers = elementsAsArray.map(function (element) {\n return typeof element === 'string' ? doc.querySelector(element) : element;\n });\n if (state.active) {\n updateTabbableNodes();\n }\n updateObservedNodes();\n return this;\n }\n };\n Object.defineProperties(trap, {\n _isManuallyPaused: {\n value: function value() {\n return state.manuallyPaused;\n }\n },\n _setPausedState: {\n value: function value(paused, options) {\n if (state.paused === paused) {\n return this;\n }\n state.paused = paused;\n if (paused) {\n var onPause = getOption(options, 'onPause');\n var onPostPause = getOption(options, 'onPostPause');\n onPause === null || onPause === undefined || onPause();\n removeListeners();\n updateObservedNodes();\n onPostPause === null || onPostPause === undefined || onPostPause();\n } else {\n var onUnpause = getOption(options, 'onUnpause');\n var onPostUnpause = getOption(options, 'onPostUnpause');\n onUnpause === null || onUnpause === undefined || onUnpause();\n updateTabbableNodes();\n addListeners();\n updateObservedNodes();\n onPostUnpause === null || onPostUnpause === undefined || onPostUnpause();\n }\n return this;\n }\n }\n });\n\n // initialize container elements\n trap.updateContainerElements(elements);\n return trap;\n};\n\nexport { createFocusTrap };\n//# sourceMappingURL=focus-trap.esm.js.map\n"],"names":["_typeof","o","Symbol","iterator","constructor","prototype","_exec$","_exec","_defineProperties","e","r","t","length","enumerable","configurable","writable","Object","defineProperty","_toPropertyKey","key","_isNativeReflectConstruct","Boolean","valueOf","call","Reflect","construct","_getPrototypeOf","setPrototypeOf","getPrototypeOf","bind","__proto__","_setPrototypeOf","i","toPrimitive","TypeError","String","_toPrimitive","React","createFocusTrap","isFocusable","reactVerMajor","parseInt","exec","version","FocusTrap","_React$Component","props","_this","a","n","_classCallCheck","this","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","apply","_callSuper","optionName","_this$internalOptions","optionValue","internalOptions","originalOptions","_len","arguments","params","Array","_key","undefined","Error","concat","_this$getDocument","node","getDocument","querySelector","value","handleDeactivate","handlePostDeactivate","handleClickOutsideDeactivates","returnFocusOnDeactivate","checkCanReturnFocus","onDeactivate","onPostDeactivate","clickOutsideDeactivates","focusTrapOptions","hasOwnProperty","outsideClick","focusTrapElements","containerElements","updatePreviousElement","create","_inherits","document","getNodeForOption","previouslyFocusedElement","currentDocument","activeElement","focusTrap","active","deactivate","returnFocus","event","allowDeactivation","target","deactivateTrap","_this2","finishDeactivation","returnFocusNode","getReturnFocusNode","canReturnFocus","focus","tabbableOptions","_this2$internalOption","preventScroll","then","activate","paused","pause","some","_createFocusTrap","setupFocusTrap","prevProps","updateContainerElements","hasActivated","hasDeactivated","hasPaused","hasUnpaused","unpause","_this3","child","children","Children","only","type","Fragment","cloneElement","ref","element","current","Component","defaultProps","module","exports","_arrayLikeToArray","_defineProperty","ownKeys","keys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","push","_objectSpread2","forEach","getOwnPropertyDescriptors","defineProperties","isTabEvent","keyCode","isKeyForward","shiftKey","isKeyBackward","delay","fn","setTimeout","valueOrHandler","getActualTarget","shadowRoot","composedPath","internalTrapStack","elements","userOptions","trap","doc","trapStack","config","escapeDeactivates","delayInitialFocus","state","containers","containerGroups","tabbableGroups","nodeFocusedBeforeActivation","mostRecentlyFocusedNode","manuallyPaused","delayInitialFocusTimer","recentNavEvent","getOption","configOverrideOptions","configOptionName","findContainerIndex","findIndex","_ref","container","tabbableNodes","contains","includes","find","_ref2","_ref2$hasFallback","hasFallback","_ref2$params","isArray","_arrayWithoutHoles","from","_iterableToArray","toString","slice","name","test","_unsupportedIterableToArray","_nonIterableSpread","err","message","getInitialFocusNode","firstTabbableGroup","firstTabbableNode","updateTabbableNodes","map","tabbable","focusableNodes","focusable","lastTabbableNode","firstDomTabbableNode","isTabbable","lastDomTabbableNode","reverse","posTabIndexesFound","getTabIndex","nextTabbableNode","forward","nodeIdx","indexOf","el","group","g","_getActiveElement","_tryFocus","tagName","toLowerCase","select","isSelectableInput","previousActiveElement","findNextNavNode","_ref3","_ref3$isBackward","isBackward","destinationNode","containerIndex","containerGroup","startOfGroupIndex","_ref4","destinationGroupIndex","destinationGroup","lastOfGroupIndex","_ref5","_destinationGroupIndex","_destinationGroup","checkPointerDown","allowOutsideClick","preventDefault","checkFocusIn","targetContained","Document","nextNode","stopImmediatePropagation","navAcrossContainers","mruContainerIdx","mruTabIdx","checkTabKey","checkKeyNav","checkEscapeKey","checkClick","addListeners","activeTrap","_setPausedState","trapIndex","splice","activeFocusTraps","addEventListener","capture","passive","removeListeners","removeEventListener","mutationObserver","window","MutationObserver","mutations","mutation","removedNodes","updateObservedNodes","disconnect","observe","subtree","childList","activateOptions","onActivate","onPostActivate","checkCanFocusTrap","finishActivation","deactivateOptions","options","clearTimeout","_isManuallyPaused","pauseOptions","unpauseOptions","elementsAsArray","onPause","onPostPause","onUnpause","onPostUnpause"],"sourceRoot":""}