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B8C,EAAM2M,GAG3C,GAFAA,EAAUA,GAAW,CAAC,GAEjB3M,EACH,MAAM,IAAIH,MAAM,oBAGlB,OAAuD,IAAnD6O,EAAQpQ,KAAK0B,EAAMmU,IAIhB/C,EAAgCzE,EAAS3M,EAClD,oCCzdA,IAJA,WAEA","sources":["webpack:///./node_modules/focus-trap-react/dist/focus-trap-react.js","webpack:///./node_modules/focus-trap/dist/focus-trap.esm.js","webpack:///./node_modules/prop-types/factoryWithThrowingShims.js","webpack:///./node_modules/prop-types/index.js","webpack:///./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///./node_modules/tabbable/dist/index.esm.js","webpack:///./node_modules/lodash-es/noop.js"],"sourcesContent":["\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar React = require('react');\n\nvar ReactDOM = require('react-dom');\n\nvar PropTypes = require('prop-types');\n\nvar _require = require('focus-trap'),\n createFocusTrap = _require.createFocusTrap;\n\nvar _require2 = require('tabbable'),\n isFocusable = _require2.isFocusable; // TODO: These issues are related to older React features which we'll likely need\n// to fix in order to move the code forward to the next major version of React.\n// @see https://github.com/davidtheclark/focus-trap-react/issues/77\n\n/* eslint-disable react/no-find-dom-node */\n\n\nvar FocusTrap = /*#__PURE__*/function (_React$Component) {\n _inherits(FocusTrap, _React$Component);\n\n var _super = _createSuper(FocusTrap);\n\n function FocusTrap(props) {\n var _this;\n\n _classCallCheck(this, FocusTrap);\n\n _this = _super.call(this, props);\n\n _defineProperty(_assertThisInitialized(_this), \"getNodeForOption\", function (optionName) {\n var _this$internalOptions;\n\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\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\n optionValue = optionValue.apply(void 0, params);\n }\n\n if (optionValue === true) {\n optionValue = undefined; // use default value\n }\n\n if (!optionValue) {\n if (optionValue === undefined || optionValue === false) {\n return optionValue;\n } // else, empty string (invalid), null (invalid), 0 (invalid)\n\n\n throw new Error(\"`\".concat(optionName, \"` was specified but was not a node, or did not return a node\"));\n }\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\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\n if (!node) {\n throw new Error(\"`\".concat(optionName, \"` as selector refers to no known node\"));\n }\n }\n\n return node;\n });\n\n _this.handleDeactivate = _this.handleDeactivate.bind(_assertThisInitialized(_this));\n _this.handlePostDeactivate = _this.handlePostDeactivate.bind(_assertThisInitialized(_this));\n _this.handleClickOutsideDeactivates = _this.handleClickOutsideDeactivates.bind(_assertThisInitialized(_this)); // focus-trap options used internally when creating the trap\n\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 }; // original options provided by the consumer\n\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\n for (var optionName in focusTrapOptions) {\n if (!Object.prototype.hasOwnProperty.call(focusTrapOptions, optionName)) {\n continue;\n }\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\n _this.internalOptions[optionName] = focusTrapOptions[optionName];\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\n\n _this.outsideClick = null; // 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\n _this.focusTrapElements = props.containerElements || []; // now we remember what the currently focused element is, not relying on focus-trap\n\n _this.updatePreviousElement();\n\n return _this;\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\n\n _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 * 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\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 /** Update the previously focused element with the currently focused element. */\n\n }, {\n key: \"updatePreviousElement\",\n value: function updatePreviousElement() {\n var currentDocument = this.getDocument();\n\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\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 // 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 }, {\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\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\n this.deactivateTrap();\n }\n }, {\n key: \"handlePostDeactivate\",\n value: function handlePostDeactivate() {\n var _this2 = this;\n\n var finishDeactivation = function finishDeactivation() {\n var returnFocusNode = _this2.getReturnFocusNode();\n\n var canReturnFocus = !!( // did the consumer allow it?\n _this2.originalOptions.returnFocusOnDeactivate && // can we actually focus the node?\n returnFocusNode !== null && returnFocusNode !== void 0 && returnFocusNode.focus && ( // was there an outside click that allowed deactivation?\n !_this2.outsideClick || // did the consumer allow deactivation when the outside node was clicked?\n _this2.outsideClick.allowDeactivation && // 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)) // 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\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\n if (_this2.originalOptions.onPostDeactivate) {\n _this2.originalOptions.onPostDeactivate.call(null); // don't call it in context of \"this\"\n\n }\n\n _this2.outsideClick = null; // reset: no longer needed\n };\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 var focusTrapElementDOMNodes = this.focusTrapElements.map( // NOTE: `findDOMNode()` does not support CSS selectors; it'll just return\n // a new text node with the text wrapped in it instead of treating the\n // string as a selector and resolving it to a node in the DOM\n ReactDOM.findDOMNode);\n var nodesExist = focusTrapElementDOMNodes.some(Boolean);\n\n if (nodesExist) {\n // eslint-disable-next-line react/prop-types -- _createFocusTrap is an internal prop\n this.focusTrap = this.props._createFocusTrap(focusTrapElementDOMNodes, this.internalOptions);\n\n if (this.props.active) {\n this.focusTrap.activate();\n }\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 } // 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 }, {\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\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\n if (hasActivated) {\n this.updatePreviousElement();\n this.focusTrap.activate();\n }\n\n if (hasDeactivated) {\n this.deactivateTrap();\n return; // un/pause does nothing on an inactive trap\n }\n\n if (hasPaused) {\n this.focusTrap.pause();\n }\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 if (prevProps.containerElements !== this.props.containerElements) {\n this.focusTrapElements = this.props.containerElements;\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\n\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\n var child = this.props.children ? React.Children.only(this.props.children) : undefined;\n\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\n var composedRefCallback = function composedRefCallback(element) {\n var containerElements = _this3.props.containerElements;\n\n if (child) {\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\n var childWithRef = React.cloneElement(child, {\n ref: composedRefCallback\n });\n return childWithRef;\n }\n\n return null;\n }\n }]);\n\n return FocusTrap;\n}(React.Component); // support server-side rendering where `Element` will not be defined\n\n\nvar ElementType = typeof Element === 'undefined' ? Function : Element;\nFocusTrap.propTypes = {\n active: PropTypes.bool,\n paused: PropTypes.bool,\n focusTrapOptions: PropTypes.shape({\n document: PropTypes.object,\n onActivate: PropTypes.func,\n onPostActivate: PropTypes.func,\n checkCanFocusTrap: PropTypes.func,\n onDeactivate: PropTypes.func,\n onPostDeactivate: PropTypes.func,\n checkCanReturnFocus: PropTypes.func,\n initialFocus: PropTypes.oneOfType([PropTypes.instanceOf(ElementType), PropTypes.string, PropTypes.bool, PropTypes.func]),\n fallbackFocus: PropTypes.oneOfType([PropTypes.instanceOf(ElementType), PropTypes.string, // NOTE: does not support `false` as value (or return value from function)\n PropTypes.func]),\n escapeDeactivates: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),\n clickOutsideDeactivates: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),\n returnFocusOnDeactivate: PropTypes.bool,\n setReturnFocus: PropTypes.oneOfType([PropTypes.instanceOf(ElementType), PropTypes.string, PropTypes.bool, PropTypes.func]),\n allowOutsideClick: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),\n preventScroll: PropTypes.bool,\n tabbableOptions: PropTypes.shape({\n displayCheck: PropTypes.oneOf(['full', 'non-zero-area', 'none']),\n getShadowRoot: PropTypes.oneOfType([PropTypes.bool, PropTypes.func])\n })\n }),\n containerElements: PropTypes.arrayOf(PropTypes.instanceOf(ElementType)),\n children: PropTypes.oneOfType([PropTypes.element, // React element\n PropTypes.instanceOf(ElementType) // DOM element\n ]) // NOTE: _createFocusTrap is internal, for testing purposes only, so we don't\n // specify it here. It's expected to be set to the function returned from\n // require('focus-trap'), or one with a compatible interface.\n\n};\nFocusTrap.defaultProps = {\n active: true,\n paused: false,\n focusTrapOptions: {},\n _createFocusTrap: createFocusTrap\n};\nmodule.exports = FocusTrap;","/*!\n* focus-trap 6.9.4\n* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE\n*/\nimport { tabbable, focusable, isTabbable, isFocusable } from 'tabbable';\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nvar activeFocusTraps = function () {\n var trapQueue = [];\n return {\n activateTrap: function activateTrap(trap) {\n if (trapQueue.length > 0) {\n var activeTrap = trapQueue[trapQueue.length - 1];\n\n if (activeTrap !== trap) {\n activeTrap.pause();\n }\n }\n\n var trapIndex = trapQueue.indexOf(trap);\n\n if (trapIndex === -1) {\n trapQueue.push(trap);\n } else {\n // move this existing trap to the front of the queue\n trapQueue.splice(trapIndex, 1);\n trapQueue.push(trap);\n }\n },\n deactivateTrap: function deactivateTrap(trap) {\n var trapIndex = trapQueue.indexOf(trap);\n\n if (trapIndex !== -1) {\n trapQueue.splice(trapIndex, 1);\n }\n\n if (trapQueue.length > 0) {\n trapQueue[trapQueue.length - 1].unpause();\n }\n }\n };\n}();\n\nvar isSelectableInput = function isSelectableInput(node) {\n return node.tagName && node.tagName.toLowerCase() === 'input' && typeof node.select === 'function';\n};\n\nvar isEscapeEvent = function isEscapeEvent(e) {\n return e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27;\n};\n\nvar isTabEvent = function isTabEvent(e) {\n return e.key === 'Tab' || e.keyCode === 9;\n};\n\nvar delay = function delay(fn) {\n return setTimeout(fn, 0);\n}; // Array.find/findIndex() are not supported on IE; this replicates enough\n// of Array.findIndex() for our needs\n\n\nvar findIndex = function findIndex(arr, fn) {\n var idx = -1;\n arr.every(function (value, i) {\n if (fn(value)) {\n idx = i;\n return false; // break\n }\n\n return true; // next\n });\n return idx;\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 */\n\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\n return typeof value === 'function' ? value.apply(void 0, params) : value;\n};\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\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 === void 0 ? void 0 : userOptions.document) || document;\n\n var config = _objectSpread2({\n returnFocusOnDeactivate: true,\n escapeDeactivates: true,\n delayInitialFocus: true\n }, userOptions);\n\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 // firstTabbableNode: HTMLElement|null,\n // lastTabbableNode: HTMLElement|null,\n // nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined\n // }>}\n containerGroups: [],\n // same order/length as `containers` list\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 // timer ID for when delayInitialFocus is true and initial focus in this trap\n // has been delayed during activation\n delayInitialFocusTimer: 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\n var getOption = function getOption(configOverrideOptions, optionName, configOptionName) {\n return configOverrideOptions && configOverrideOptions[optionName] !== undefined ? configOverrideOptions[optionName] : config[configOptionName || optionName];\n };\n /**\n * Finds the index of the container that contains the element.\n * @param {HTMLElement} element\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\n\n var findContainerIndex = function findContainerIndex(element) {\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 tabbableNodes.find(function (node) {\n return node === element;\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 * @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\n\n var getNodeForOption = function getNodeForOption(optionName) {\n var optionValue = config[optionName];\n\n if (typeof optionValue === 'function') {\n for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n params[_key2 - 1] = arguments[_key2];\n }\n\n optionValue = optionValue.apply(void 0, params);\n }\n\n if (optionValue === true) {\n optionValue = undefined; // use default value\n }\n\n if (!optionValue) {\n if (optionValue === undefined || optionValue === false) {\n return optionValue;\n } // else, empty string (invalid), null (invalid), 0 (invalid)\n\n\n throw new Error(\"`\".concat(optionName, \"` was specified but was not a node, or did not return a node\"));\n }\n\n var node = optionValue; // could be HTMLElement, SVGElement, or non-empty string at this point\n\n if (typeof optionValue === 'string') {\n node = doc.querySelector(optionValue); // resolve to node, or null if fails\n\n if (!node) {\n throw new Error(\"`\".concat(optionName, \"` as selector refers to no known node\"));\n }\n }\n\n return node;\n };\n\n var getInitialFocusNode = function getInitialFocusNode() {\n var node = getNodeForOption('initialFocus'); // false explicitly indicates we want no initialFocus at all\n\n if (node === false) {\n return false;\n }\n\n if (node === undefined) {\n // option not specified: 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; // NOTE: `fallbackFocus` option function cannot return `false` (not supported)\n\n node = firstTabbableNode || getNodeForOption('fallbackFocus');\n }\n }\n\n if (!node) {\n throw new Error('Your focus-trap needs to have at least one focusable element');\n }\n\n return node;\n };\n\n var updateTabbableNodes = function updateTabbableNodes() {\n state.containerGroups = state.containers.map(function (container) {\n var tabbableNodes = tabbable(container, config.tabbableOptions); // NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes\n // are a superset of tabbable nodes\n\n var focusableNodes = focusable(container, config.tabbableOptions);\n return {\n container: container,\n tabbableNodes: tabbableNodes,\n focusableNodes: focusableNodes,\n firstTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[0] : null,\n lastTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[tabbableNodes.length - 1] : null,\n\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 // NOTE: If tabindex is positive (in order to manipulate the tab order separate\n // from the DOM order), this __will not work__ because the list of focusableNodes,\n // while it contains tabbable nodes, does not sort its nodes in any order other\n // than DOM order, because it can't: Where would you place focusable (but not\n // tabbable) nodes in that order? They have no order, because they aren't tabbale...\n // Support for positive tabindex is already broken and hard to manage (possibly\n // not supportable, TBD), so this isn't going to make things worse than they\n // already are, and at least makes things better for the majority of cases where\n // tabindex is either 0/unset or negative.\n // FYI, positive tabindex issue: https://github.com/focus-trap/focus-trap/issues/375\n var nodeIdx = focusableNodes.findIndex(function (n) {\n return n === node;\n });\n\n if (nodeIdx < 0) {\n return undefined;\n }\n\n if (forward) {\n return focusableNodes.slice(nodeIdx + 1).find(function (n) {\n return isTabbable(n, config.tabbableOptions);\n });\n }\n\n return focusableNodes.slice(0, nodeIdx).reverse().find(function (n) {\n return isTabbable(n, config.tabbableOptions);\n });\n }\n };\n });\n state.tabbableGroups = state.containerGroups.filter(function (group) {\n return group.tabbableNodes.length > 0;\n }); // throw if no groups have tabbable nodes and we don't have a fallback focus node either\n\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\n var tryFocus = function tryFocus(node) {\n if (node === false) {\n return;\n }\n\n if (node === doc.activeElement) {\n return;\n }\n\n if (!node || !node.focus) {\n tryFocus(getInitialFocusNode());\n return;\n }\n\n node.focus({\n preventScroll: !!config.preventScroll\n });\n state.mostRecentlyFocusedNode = node;\n\n if (isSelectableInput(node)) {\n node.select();\n }\n };\n\n var getReturnFocusNode = function getReturnFocusNode(previousActiveElement) {\n var node = getNodeForOption('setReturnFocus', previousActiveElement);\n return node ? node : node === false ? false : previousActiveElement;\n }; // This needs to be done on mousedown and touchstart instead of click\n // so that it precedes the focus event.\n\n\n var checkPointerDown = function checkPointerDown(e) {\n var target = getActualTarget(e);\n\n if (findContainerIndex(target) >= 0) {\n // allow the click since it ocurred inside the trap\n return;\n }\n\n if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n // immediately deactivate the trap\n trap.deactivate({\n // if, on deactivation, we should return focus to the node originally-focused\n // when the trap was activated (or the configured `setReturnFocus` node),\n // then assume it's also OK to return focus to the outside node that was\n // just clicked, causing deactivation, as long as that node is focusable;\n // if it isn't focusable, then return focus to the original node focused\n // on activation (or the configured `setReturnFocus` node)\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, whether it's focusable or not; by setting\n // `returnFocus: true`, we'll attempt to re-focus the node originally-focused\n // on activation (or the configured `setReturnFocus` node)\n returnFocus: config.returnFocusOnDeactivate && !isFocusable(target, config.tabbableOptions)\n });\n return;\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\n\n if (valueOrHandler(config.allowOutsideClick, e)) {\n // allow the click outside the trap to take place\n return;\n } // otherwise, prevent the click\n\n\n e.preventDefault();\n }; // In case focus escapes the trap for some strange reason, pull it back in.\n\n\n var checkFocusIn = function checkFocusIn(e) {\n var target = getActualTarget(e);\n var targetContained = findContainerIndex(target) >= 0; // In Firefox when you Tab out of an iframe the Document is briefly focused.\n\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 e.stopImmediatePropagation();\n tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());\n }\n }; // Hijack Tab 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\n\n var checkTab = function checkTab(e) {\n var target = getActualTarget(e);\n updateTabbableNodes();\n var destinationNode = null;\n\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);\n var containerGroup = containerIndex >= 0 ? state.containerGroups[containerIndex] : undefined;\n\n if (containerIndex < 0) {\n // target not found in any group: quite possible focus has escaped the trap,\n // so bring it back in to...\n if (e.shiftKey) {\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 (e.shiftKey) {\n // REVERSE\n // is the target the first tabbable node in a group?\n var startOfGroupIndex = findIndex(state.tabbableGroups, function (_ref2) {\n var firstTabbableNode = _ref2.firstTabbableNode;\n return target === firstTabbableNode;\n });\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\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 = destinationGroup.lastTabbableNode;\n }\n } else {\n // FORWARD\n // is the target the last tabbable node in a group?\n var lastOfGroupIndex = findIndex(state.tabbableGroups, function (_ref3) {\n var lastTabbableNode = _ref3.lastTabbableNode;\n return target === lastTabbableNode;\n });\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\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\n var _destinationGroup = state.tabbableGroups[_destinationGroupIndex];\n destinationNode = _destinationGroup.firstTabbableNode;\n }\n }\n } else {\n // NOTE: the fallbackFocus option does not support returning false to opt-out\n destinationNode = getNodeForOption('fallbackFocus');\n }\n\n if (destinationNode) {\n e.preventDefault();\n tryFocus(destinationNode);\n } // else, let the browser take care of [shift+]tab and move the focus\n\n };\n\n var checkKey = function checkKey(e) {\n if (isEscapeEvent(e) && valueOrHandler(config.escapeDeactivates, e) !== false) {\n e.preventDefault();\n trap.deactivate();\n return;\n }\n\n if (isTabEvent(e)) {\n checkTab(e);\n return;\n }\n };\n\n var checkClick = function checkClick(e) {\n var target = getActualTarget(e);\n\n if (findContainerIndex(target) >= 0) {\n return;\n }\n\n if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n return;\n }\n\n if (valueOrHandler(config.allowOutsideClick, e)) {\n return;\n }\n\n e.preventDefault();\n e.stopImmediatePropagation();\n }; //\n // EVENT LISTENERS\n //\n\n\n var addListeners = function addListeners() {\n if (!state.active) {\n return;\n } // There can be only one listening focus trap at a time\n\n\n activeFocusTraps.activateTrap(trap); // Delay ensures that the focused element doesn't capture the event\n // that caused the focus trap activation.\n\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', checkKey, {\n capture: true,\n passive: false\n });\n return trap;\n };\n\n var removeListeners = function removeListeners() {\n if (!state.active) {\n return;\n }\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', checkKey, true);\n return trap;\n }; //\n // TRAP DEFINITION\n //\n\n\n trap = {\n get active() {\n return state.active;\n },\n\n get paused() {\n return state.paused;\n },\n\n activate: function activate(activateOptions) {\n if (state.active) {\n return this;\n }\n\n var onActivate = getOption(activateOptions, 'onActivate');\n var onPostActivate = getOption(activateOptions, 'onPostActivate');\n var checkCanFocusTrap = getOption(activateOptions, 'checkCanFocusTrap');\n\n if (!checkCanFocusTrap) {\n updateTabbableNodes();\n }\n\n state.active = true;\n state.paused = false;\n state.nodeFocusedBeforeActivation = doc.activeElement;\n\n if (onActivate) {\n onActivate();\n }\n\n var finishActivation = function finishActivation() {\n if (checkCanFocusTrap) {\n updateTabbableNodes();\n }\n\n addListeners();\n\n if (onPostActivate) {\n onPostActivate();\n }\n };\n\n if (checkCanFocusTrap) {\n checkCanFocusTrap(state.containers.concat()).then(finishActivation, finishActivation);\n return this;\n }\n\n finishActivation();\n return this;\n },\n deactivate: function deactivate(deactivateOptions) {\n if (!state.active) {\n return this;\n }\n\n var options = _objectSpread2({\n onDeactivate: config.onDeactivate,\n onPostDeactivate: config.onPostDeactivate,\n checkCanReturnFocus: config.checkCanReturnFocus\n }, deactivateOptions);\n\n clearTimeout(state.delayInitialFocusTimer); // noop if undefined\n\n state.delayInitialFocusTimer = undefined;\n removeListeners();\n state.active = false;\n state.paused = false;\n activeFocusTraps.deactivateTrap(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\n if (onDeactivate) {\n onDeactivate();\n }\n\n var finishDeactivation = function finishDeactivation() {\n delay(function () {\n if (returnFocus) {\n tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));\n }\n\n if (onPostDeactivate) {\n onPostDeactivate();\n }\n });\n };\n\n if (returnFocus && checkCanReturnFocus) {\n checkCanReturnFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation)).then(finishDeactivation, finishDeactivation);\n return this;\n }\n\n finishDeactivation();\n return this;\n },\n pause: function pause() {\n if (state.paused || !state.active) {\n return this;\n }\n\n state.paused = true;\n removeListeners();\n return this;\n },\n unpause: function unpause() {\n if (!state.paused || !state.active) {\n return this;\n }\n\n state.paused = false;\n updateTabbableNodes();\n addListeners();\n return this;\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\n if (state.active) {\n updateTabbableNodes();\n }\n\n return this;\n }\n }; // initialize container elements\n\n trap.updateContainerElements(elements);\n return trap;\n};\n\nexport { createFocusTrap };\n//# sourceMappingURL=focus-trap.esm.js.map\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/*!\n* tabbable 5.3.3\n* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n*/\nvar candidateSelectors = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]:not(slot)', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable=\"false\"])', 'details>summary:first-of-type', 'details'];\nvar candidateSelector = /* #__PURE__ */candidateSelectors.join(',');\nvar NoElement = typeof Element === 'undefined';\nvar matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {\n return element.getRootNode();\n} : function (element) {\n return element.ownerDocument;\n};\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\n\nvar getCandidates = function getCandidates(el, includeContainer, filter) {\n var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n\n candidates = candidates.filter(filter);\n return candidates;\n};\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidatesScope\n * @property {Element} scope contains inner candidates\n * @property {Element[]} candidates\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n * if a function, implies shadow support is enabled and either returns the shadow root of an element\n * or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidatesScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.}\n */\n\n\nvar getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {\n var candidates = [];\n var elementsToCheck = Array.from(elements);\n\n while (elementsToCheck.length) {\n var element = elementsToCheck.shift();\n\n if (element.tagName === 'SLOT') {\n // add shadow dom slot scope (slot itself cannot be focusable)\n var assigned = element.assignedElements();\n var content = assigned.length ? assigned : element.children;\n var nestedCandidates = getCandidatesIteratively(content, true, options);\n\n if (options.flatten) {\n candidates.push.apply(candidates, nestedCandidates);\n } else {\n candidates.push({\n scope: element,\n candidates: nestedCandidates\n });\n }\n } else {\n // check candidate element\n var validCandidate = matches.call(element, candidateSelector);\n\n if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {\n candidates.push(element);\n } // iterate over shadow content if possible\n\n\n var shadowRoot = element.shadowRoot || // check for an undisclosed shadow\n typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);\n var validShadowRoot = !options.shadowRootFilter || options.shadowRootFilter(element);\n\n if (shadowRoot && validShadowRoot) {\n // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n // shadow exists, so look at light dom children as fallback BUT create a scope for any\n // child candidates found because they're likely slotted elements (elements that are\n // children of the web component element (which has the shadow), in the light dom, but\n // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n // _after_ we return from this recursive call\n var _nestedCandidates = getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);\n\n if (options.flatten) {\n candidates.push.apply(candidates, _nestedCandidates);\n } else {\n candidates.push({\n scope: element,\n candidates: _nestedCandidates\n });\n }\n } else {\n // there's not shadow so just dig into the element's (light dom) children\n // __without__ giving the element special scope treatment\n elementsToCheck.unshift.apply(elementsToCheck, element.children);\n }\n }\n }\n\n return candidates;\n};\n\nvar getTabindex = function getTabindex(node, isScope) {\n if (node.tabIndex < 0) {\n // in Chrome,
,