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ACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA;;AAEA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA,CAAC,mBAAmB;;;AAGpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA","sources":["webpack://admin/./node_modules/focus-trap-react/dist/focus-trap-react.js"],"sourcesContent":["\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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; } 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 { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\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; // 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); // 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\n _this.tailoredFocusTrapOptions = {\n returnFocusOnDeactivate: false\n }; // because of the above, we maintain our own flag for this option, and\n // default it to `true` because that's focus-trap's default\n\n _this.returnFocusOnDeactivate = true;\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') {\n _this.returnFocusOnDeactivate = !!focusTrapOptions[optionName];\n continue;\n }\n\n _this.tailoredFocusTrapOptions[optionName] = focusTrapOptions[optionName];\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\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 /** Update the previously focused element with the currently focused element. */\n\n\n _createClass(FocusTrap, [{\n key: \"updatePreviousElement\",\n value: function updatePreviousElement() {\n if (typeof document !== 'undefined') {\n this.previouslyFocusedElement = document.activeElement;\n }\n }\n /** Returns focus to the element that had focus when the trap was activated. */\n\n }, {\n key: \"returnFocus\",\n value: function returnFocus() {\n if (this.previouslyFocusedElement && this.previouslyFocusedElement.focus) {\n this.previouslyFocusedElement.focus();\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.tailoredFocusTrapOptions);\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 this.setupFocusTrap();\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 if (prevProps.active && !this.props.active) {\n // NOTE: we never let the trap return the focus since we do that ourselves\n this.focusTrap.deactivate({\n returnFocus: false\n });\n\n if (this.returnFocusOnDeactivate) {\n this.returnFocus();\n }\n\n return; // un/pause does nothing on an inactive trap\n }\n\n if (!prevProps.active && this.props.active) {\n this.updatePreviousElement();\n this.focusTrap.activate();\n }\n\n if (prevProps.paused && !this.props.paused) {\n this.focusTrap.unpause();\n } else if (!prevProps.paused && this.props.paused) {\n this.focusTrap.pause();\n }\n } else if (prevProps.containerElements !== this.props.containerElements) {\n this.focusTrapElements = this.props.containerElements;\n this.setupFocusTrap();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.focusTrap) {\n // NOTE: we never let the trap return the focus since we do that ourselves\n this.focusTrap.deactivate({\n returnFocus: false\n });\n }\n\n if (this.returnFocusOnDeactivate) {\n this.returnFocus();\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = 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