diff --git a/CHANGELOG.md b/CHANGELOG.md index 04ddb375..d50fb867 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +v3.11.1 - Fri, 25 Oct 2019 21:02:09 UTC +--------------------------------------- + +- [ee1a363](../../commit/ee1a363) chore: update webpack* versions. +- [4ac3ff4](../../commit/4ac3ff4) [added]: pass overlay and content element references to onAfterOpen fn (#741) +- [9be00a9](../../commit/9be00a9) [fixed] some untabbable elements are being returned from findTabbable (#774) +- [4dd25ac](../../commit/4dd25ac) chore: changed xvfb to a service. +- [2d4f231](../../commit/2d4f231) chore: changed xvfb to a service. + + v3.10.1 - Wed, 21 Aug 2019 20:49:53 UTC --------------------------------------- diff --git a/bower.json b/bower.json index 017a7644..c6feaa9b 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "react-modal", - "version": "3.10.1", + "version": "3.11.1", "homepage": "https://github.com/reactjs/react-modal", "authors": [ "Ryan Florence", diff --git a/dist/react-modal.js b/dist/react-modal.js index 58bdd558..0a61de2b 100644 --- a/dist/react-modal.js +++ b/dist/react-modal.js @@ -1,179 +1,4 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(require("react"), require("react-dom")); - else if(typeof define === 'function' && define.amd) - define(["react", "react-dom"], factory); - else if(typeof exports === 'object') - exports["ReactModal"] = factory(require("react"), require("react-dom")); - else - root["ReactModal"] = factory(root["React"], root["ReactDOM"]); -})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_9__) { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = "/"; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 7); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - - - -var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; - -module.exports = ReactPropTypesSecret; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.canUseDOM = undefined; - -var _exenv = __webpack_require__(20); - -var _exenv2 = _interopRequireDefault(_exenv); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var EE = _exenv2.default; - -var SafeHTMLElement = EE.canUseDOM ? window.HTMLElement : {}; - -var canUseDOM = exports.canUseDOM = EE.canUseDOM; - -exports.default = SafeHTMLElement; - -/***/ }), -/* 2 */ -/***/ (function(module, exports) { - -module.exports = __WEBPACK_EXTERNAL_MODULE_2__; - -/***/ }), -/* 3 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -if (undefined !== 'production') { - var ReactIs = __webpack_require__(4); - - // By explicitly using `prop-types` you are opting into new development behavior. - // http://fb.me/prop-types-in-prod - var throwOnDirectAccess = true; - module.exports = __webpack_require__(12)(ReactIs.isElement, throwOnDirectAccess); -} else { - // By explicitly using `prop-types` you are opting into new production behavior. - // http://fb.me/prop-types-in-prod - module.exports = __webpack_require__(15)(); -} - - -/***/ }), -/* 4 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -if (undefined === 'production') { - module.exports = __webpack_require__(10); -} else { - module.exports = __webpack_require__(11); -} - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = findTabbableDescendants; +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.ReactModal=t(require("react"),require("react-dom")):e.ReactModal=t(e.React,e.ReactDOM)}(window,(function(e,t){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=7)}([function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=void 0;var o,r=n(20);var a=((o=r)&&o.__esModule?o:{default:o}).default,i=a.canUseDOM?window.HTMLElement:{};t.canUseDOM=a.canUseDOM;t.default=i},function(t,n){t.exports=e},function(e,t,n){var o=n(4);e.exports=n(12)(o.isElement,!0)},function(e,t,n){"use strict";e.exports=n(11)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return[].slice.call(e.querySelectorAll("*"),0).filter(i)}; /*! * Adapted from jQuery UI core * @@ -185,426 +10,7 @@ exports.default = findTabbableDescendants; * * http://api.jqueryui.com/category/ui-core/ */ - -var tabbableNode = /input|select|textarea|button|object/; - -function hidesContents(element) { - var zeroSize = element.offsetWidth <= 0 && element.offsetHeight <= 0; - - // If the node is empty, this is good enough - if (zeroSize && !element.innerHTML) return true; - - // Otherwise we need to check some styles - var style = window.getComputedStyle(element); - return zeroSize ? style.getPropertyValue("overflow") !== "visible" : style.getPropertyValue("display") == "none"; -} - -function visible(element) { - var parentElement = element; - while (parentElement) { - if (parentElement === document.body) break; - if (hidesContents(parentElement)) return false; - parentElement = parentElement.parentNode; - } - return true; -} - -function focusable(element, isTabIndexNotNaN) { - var nodeName = element.nodeName.toLowerCase(); - var res = tabbableNode.test(nodeName) && !element.disabled || (nodeName === "a" ? element.href || isTabIndexNotNaN : isTabIndexNotNaN); - return res && visible(element); -} - -function tabbable(element) { - var tabIndex = element.getAttribute("tabindex"); - if (tabIndex === null) tabIndex = undefined; - var isTabIndexNaN = isNaN(tabIndex); - return (isTabIndexNaN || tabIndex >= 0) && focusable(element, !isTabIndexNaN); -} - -function findTabbableDescendants(element) { - return [].slice.call(element.querySelectorAll("*"), 0).filter(tabbable); -} -module.exports = exports["default"]; - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.assertNodeList = assertNodeList; -exports.setElement = setElement; -exports.validateElement = validateElement; -exports.hide = hide; -exports.show = show; -exports.documentNotReadyOrSSRTesting = documentNotReadyOrSSRTesting; -exports.resetForTesting = resetForTesting; - -var _warning = __webpack_require__(19); - -var _warning2 = _interopRequireDefault(_warning); - -var _safeHTMLElement = __webpack_require__(1); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var globalElement = null; - -function assertNodeList(nodeList, selector) { - if (!nodeList || !nodeList.length) { - throw new Error("react-modal: No elements were found for selector " + selector + "."); - } -} - -function setElement(element) { - var useElement = element; - if (typeof useElement === "string" && _safeHTMLElement.canUseDOM) { - var el = document.querySelectorAll(useElement); - assertNodeList(el, useElement); - useElement = "length" in el ? el[0] : el; - } - globalElement = useElement || globalElement; - return globalElement; -} - -function validateElement(appElement) { - if (!appElement && !globalElement) { - (0, _warning2.default)(false, ["react-modal: App element is not defined.", "Please use `Modal.setAppElement(el)` or set `appElement={el}`.", "This is needed so screen readers don't see main content", "when modal is opened. It is not recommended, but you can opt-out", "by setting `ariaHideApp={false}`."].join(" ")); - - return false; - } - - return true; -} - -function hide(appElement) { - if (validateElement(appElement)) { - (appElement || globalElement).setAttribute("aria-hidden", "true"); - } -} - -function show(appElement) { - if (validateElement(appElement)) { - (appElement || globalElement).removeAttribute("aria-hidden"); - } -} - -function documentNotReadyOrSSRTesting() { - globalElement = null; -} - -function resetForTesting() { - globalElement = null; -} - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _Modal = __webpack_require__(8); - -var _Modal2 = _interopRequireDefault(_Modal); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _Modal2.default; -module.exports = exports["default"]; - -/***/ }), -/* 8 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.bodyOpenClassName = exports.portalClassName = undefined; - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = function () { function 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = __webpack_require__(2); - -var _react2 = _interopRequireDefault(_react); - -var _reactDom = __webpack_require__(9); - -var _reactDom2 = _interopRequireDefault(_reactDom); - -var _propTypes = __webpack_require__(3); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _ModalPortal = __webpack_require__(16); - -var _ModalPortal2 = _interopRequireDefault(_ModalPortal); - -var _ariaAppHider = __webpack_require__(6); - -var ariaAppHider = _interopRequireWildcard(_ariaAppHider); - -var _safeHTMLElement = __webpack_require__(1); - -var _safeHTMLElement2 = _interopRequireDefault(_safeHTMLElement); - -var _reactLifecyclesCompat = __webpack_require__(22); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var portalClassName = exports.portalClassName = "ReactModalPortal"; -var bodyOpenClassName = exports.bodyOpenClassName = "ReactModal__Body--open"; - -var isReact16 = _reactDom2.default.createPortal !== undefined; - -var getCreatePortal = function getCreatePortal() { - return isReact16 ? _reactDom2.default.createPortal : _reactDom2.default.unstable_renderSubtreeIntoContainer; -}; - -function getParentElement(parentSelector) { - return parentSelector(); -} - -var Modal = function (_Component) { - _inherits(Modal, _Component); - - function Modal() { - var _ref; - - var _temp, _this, _ret; - - _classCallCheck(this, Modal); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Modal.__proto__ || Object.getPrototypeOf(Modal)).call.apply(_ref, [this].concat(args))), _this), _this.removePortal = function () { - !isReact16 && _reactDom2.default.unmountComponentAtNode(_this.node); - var parent = getParentElement(_this.props.parentSelector); - parent.removeChild(_this.node); - }, _this.portalRef = function (ref) { - _this.portal = ref; - }, _this.renderPortal = function (props) { - var createPortal = getCreatePortal(); - var portal = createPortal(_this, _react2.default.createElement(_ModalPortal2.default, _extends({ defaultStyles: Modal.defaultStyles }, props)), _this.node); - _this.portalRef(portal); - }, _temp), _possibleConstructorReturn(_this, _ret); - } - - _createClass(Modal, [{ - key: "componentDidMount", - value: function componentDidMount() { - if (!_safeHTMLElement.canUseDOM) return; - - if (!isReact16) { - this.node = document.createElement("div"); - } - this.node.className = this.props.portalClassName; - - var parent = getParentElement(this.props.parentSelector); - parent.appendChild(this.node); - - !isReact16 && this.renderPortal(this.props); - } - }, { - key: "getSnapshotBeforeUpdate", - value: function getSnapshotBeforeUpdate(prevProps) { - var prevParent = getParentElement(prevProps.parentSelector); - var nextParent = getParentElement(this.props.parentSelector); - return { prevParent: prevParent, nextParent: nextParent }; - } - }, { - key: "componentDidUpdate", - value: function componentDidUpdate(prevProps, _, snapshot) { - if (!_safeHTMLElement.canUseDOM) return; - var _props = this.props, - isOpen = _props.isOpen, - portalClassName = _props.portalClassName; - - - if (prevProps.portalClassName !== portalClassName) { - this.node.className = portalClassName; - } - - var prevParent = snapshot.prevParent, - nextParent = snapshot.nextParent; - - if (nextParent !== prevParent) { - prevParent.removeChild(this.node); - nextParent.appendChild(this.node); - } - - // Stop unnecessary renders if modal is remaining closed - if (!prevProps.isOpen && !isOpen) return; - - !isReact16 && this.renderPortal(this.props); - } - }, { - key: "componentWillUnmount", - value: function componentWillUnmount() { - if (!_safeHTMLElement.canUseDOM || !this.node || !this.portal) return; - - var state = this.portal.state; - var now = Date.now(); - var closesAt = state.isOpen && this.props.closeTimeoutMS && (state.closesAt || now + this.props.closeTimeoutMS); - - if (closesAt) { - if (!state.beforeClose) { - this.portal.closeWithTimeout(); - } - - setTimeout(this.removePortal, closesAt - now); - } else { - this.removePortal(); - } - } - }, { - key: "render", - value: function render() { - if (!_safeHTMLElement.canUseDOM || !isReact16) { - return null; - } - - if (!this.node && isReact16) { - this.node = document.createElement("div"); - } - - var createPortal = getCreatePortal(); - return createPortal(_react2.default.createElement(_ModalPortal2.default, _extends({ - ref: this.portalRef, - defaultStyles: Modal.defaultStyles - }, this.props)), this.node); - } - }], [{ - key: "setAppElement", - value: function setAppElement(element) { - ariaAppHider.setElement(element); - } - - /* eslint-disable react/no-unused-prop-types */ - - /* eslint-enable react/no-unused-prop-types */ - - }]); - - return Modal; -}(_react.Component); - -Modal.propTypes = { - isOpen: _propTypes2.default.bool.isRequired, - style: _propTypes2.default.shape({ - content: _propTypes2.default.object, - overlay: _propTypes2.default.object - }), - portalClassName: _propTypes2.default.string, - bodyOpenClassName: _propTypes2.default.string, - htmlOpenClassName: _propTypes2.default.string, - className: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.shape({ - base: _propTypes2.default.string.isRequired, - afterOpen: _propTypes2.default.string.isRequired, - beforeClose: _propTypes2.default.string.isRequired - })]), - overlayClassName: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.shape({ - base: _propTypes2.default.string.isRequired, - afterOpen: _propTypes2.default.string.isRequired, - beforeClose: _propTypes2.default.string.isRequired - })]), - appElement: _propTypes2.default.instanceOf(_safeHTMLElement2.default), - onAfterOpen: _propTypes2.default.func, - onRequestClose: _propTypes2.default.func, - closeTimeoutMS: _propTypes2.default.number, - ariaHideApp: _propTypes2.default.bool, - shouldFocusAfterRender: _propTypes2.default.bool, - shouldCloseOnOverlayClick: _propTypes2.default.bool, - shouldReturnFocusAfterClose: _propTypes2.default.bool, - parentSelector: _propTypes2.default.func, - aria: _propTypes2.default.object, - data: _propTypes2.default.object, - role: _propTypes2.default.string, - contentLabel: _propTypes2.default.string, - shouldCloseOnEsc: _propTypes2.default.bool, - overlayRef: _propTypes2.default.func, - contentRef: _propTypes2.default.func -}; -Modal.defaultProps = { - isOpen: false, - portalClassName: portalClassName, - bodyOpenClassName: bodyOpenClassName, - role: "dialog", - ariaHideApp: true, - closeTimeoutMS: 0, - shouldFocusAfterRender: true, - shouldCloseOnEsc: true, - shouldCloseOnOverlayClick: true, - shouldReturnFocusAfterClose: true, - parentSelector: function parentSelector() { - return document.body; - } -}; -Modal.defaultStyles = { - overlay: { - position: "fixed", - top: 0, - left: 0, - right: 0, - bottom: 0, - backgroundColor: "rgba(255, 255, 255, 0.75)" - }, - content: { - position: "absolute", - top: "40px", - left: "40px", - right: "40px", - bottom: "40px", - border: "1px solid #ccc", - background: "#fff", - overflow: "auto", - WebkitOverflowScrolling: "touch", - borderRadius: "4px", - outline: "none", - padding: "20px" - } -}; - - -(0, _reactLifecyclesCompat.polyfill)(Modal); - -exports.default = Modal; - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - -module.exports = __WEBPACK_EXTERNAL_MODULE_9__; - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; +var o=/input|select|textarea|button|object/;function r(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;var n=window.getComputedStyle(e);return t?"visible"!==n.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0:"none"==n.getPropertyValue("display")}function a(e,t){var n=e.nodeName.toLowerCase();return(o.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e;t&&t!==document.body;){if(r(t))return!1;t=t.parentNode}return!0}(e)}function i(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&a(e,!n)}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertNodeList=l,t.setElement=function(e){var t=e;if("string"==typeof t&&i.canUseDOM){var n=document.querySelectorAll(t);l(n,t),t="length"in n?n[0]:n}return s=t||s},t.validateElement=u,t.hide=function(e){u(e)&&(e||s).setAttribute("aria-hidden","true")},t.show=function(e){u(e)&&(e||s).removeAttribute("aria-hidden")},t.documentNotReadyOrSSRTesting=function(){s=null},t.resetForTesting=function(){s=null};var o,r=n(19),a=(o=r)&&o.__esModule?o:{default:o},i=n(1);var s=null;function l(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function u(e){return!(!e&&!s)||((0,a.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),!1)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=n(8),a=(o=r)&&o.__esModule?o:{default:o};t.default=a.default,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - var argIndex = 0; - var message = 'Warning: ' + format.replace(/%s/g, function () { - return args[argIndex++]; - }); - if (typeof console !== 'undefined') { - console.warn(message); - } - try { - // --- Welcome to debugging React --- - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch (x) {} - }; - - lowPriorityWarning = function (condition, format) { - if (format === undefined) { - throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument'); - } - if (!condition) { - for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { - args[_key2 - 2] = arguments[_key2]; - } - - printWarning.apply(undefined, [format].concat(args)); - } - }; -} - -var lowPriorityWarning$1 = lowPriorityWarning; - -function typeOf(object) { - if (typeof object === 'object' && object !== null) { - var $$typeof = object.$$typeof; - switch ($$typeof) { - case REACT_ELEMENT_TYPE: - var type = object.type; - - switch (type) { - case REACT_ASYNC_MODE_TYPE: - case REACT_CONCURRENT_MODE_TYPE: - case REACT_FRAGMENT_TYPE: - case REACT_PROFILER_TYPE: - case REACT_STRICT_MODE_TYPE: - case REACT_SUSPENSE_TYPE: - return type; - default: - var $$typeofType = type && type.$$typeof; - - switch ($$typeofType) { - case REACT_CONTEXT_TYPE: - case REACT_FORWARD_REF_TYPE: - case REACT_PROVIDER_TYPE: - return $$typeofType; - default: - return $$typeof; - } - } - case REACT_LAZY_TYPE: - case REACT_MEMO_TYPE: - case REACT_PORTAL_TYPE: - return $$typeof; - } - } - - return undefined; -} - -// AsyncMode is deprecated along with isAsyncMode -var AsyncMode = REACT_ASYNC_MODE_TYPE; -var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; -var ContextConsumer = REACT_CONTEXT_TYPE; -var ContextProvider = REACT_PROVIDER_TYPE; -var Element = REACT_ELEMENT_TYPE; -var ForwardRef = REACT_FORWARD_REF_TYPE; -var Fragment = REACT_FRAGMENT_TYPE; -var Lazy = REACT_LAZY_TYPE; -var Memo = REACT_MEMO_TYPE; -var Portal = REACT_PORTAL_TYPE; -var Profiler = REACT_PROFILER_TYPE; -var StrictMode = REACT_STRICT_MODE_TYPE; -var Suspense = REACT_SUSPENSE_TYPE; - -var hasWarnedAboutDeprecatedIsAsyncMode = false; - -// AsyncMode should be deprecated -function isAsyncMode(object) { - { - if (!hasWarnedAboutDeprecatedIsAsyncMode) { - hasWarnedAboutDeprecatedIsAsyncMode = true; - lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.'); - } - } - return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; -} -function isConcurrentMode(object) { - return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; -} -function isContextConsumer(object) { - return typeOf(object) === REACT_CONTEXT_TYPE; -} -function isContextProvider(object) { - return typeOf(object) === REACT_PROVIDER_TYPE; -} -function isElement(object) { - return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; -} -function isForwardRef(object) { - return typeOf(object) === REACT_FORWARD_REF_TYPE; -} -function isFragment(object) { - return typeOf(object) === REACT_FRAGMENT_TYPE; -} -function isLazy(object) { - return typeOf(object) === REACT_LAZY_TYPE; -} -function isMemo(object) { - return typeOf(object) === REACT_MEMO_TYPE; -} -function isPortal(object) { - return typeOf(object) === REACT_PORTAL_TYPE; -} -function isProfiler(object) { - return typeOf(object) === REACT_PROFILER_TYPE; -} -function isStrictMode(object) { - return typeOf(object) === REACT_STRICT_MODE_TYPE; -} -function isSuspense(object) { - return typeOf(object) === REACT_SUSPENSE_TYPE; -} - -exports.typeOf = typeOf; -exports.AsyncMode = AsyncMode; -exports.ConcurrentMode = ConcurrentMode; -exports.ContextConsumer = ContextConsumer; -exports.ContextProvider = ContextProvider; -exports.Element = Element; -exports.ForwardRef = ForwardRef; -exports.Fragment = Fragment; -exports.Lazy = Lazy; -exports.Memo = Memo; -exports.Portal = Portal; -exports.Profiler = Profiler; -exports.StrictMode = StrictMode; -exports.Suspense = Suspense; -exports.isValidElementType = isValidElementType; -exports.isAsyncMode = isAsyncMode; -exports.isConcurrentMode = isConcurrentMode; -exports.isContextConsumer = isContextConsumer; -exports.isContextProvider = isContextProvider; -exports.isElement = isElement; -exports.isForwardRef = isForwardRef; -exports.isFragment = isFragment; -exports.isLazy = isLazy; -exports.isMemo = isMemo; -exports.isPortal = isPortal; -exports.isProfiler = isProfiler; -exports.isStrictMode = isStrictMode; -exports.isSuspense = isSuspense; - })(); -} - - -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - - - -var ReactIs = __webpack_require__(4); -var assign = __webpack_require__(13); - -var ReactPropTypesSecret = __webpack_require__(0); -var checkPropTypes = __webpack_require__(14); - -var has = Function.call.bind(Object.prototype.hasOwnProperty); -var printWarning = function() {}; - -if (undefined !== 'production') { - printWarning = function(text) { - var message = 'Warning: ' + text; - if (typeof console !== 'undefined') { - console.error(message); - } - try { - // --- Welcome to debugging React --- - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch (x) {} - }; -} - -function emptyFunctionThatReturnsNull() { - return null; -} - -module.exports = function(isValidElement, throwOnDirectAccess) { - /* global Symbol */ - var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; - var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. - - /** - * Returns the iterator method function contained on the iterable object. - * - * Be sure to invoke the function with the iterable as context: - * - * var iteratorFn = getIteratorFn(myIterable); - * if (iteratorFn) { - * var iterator = iteratorFn.call(myIterable); - * ... - * } - * - * @param {?object} maybeIterable - * @return {?function} - */ - function getIteratorFn(maybeIterable) { - var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); - if (typeof iteratorFn === 'function') { - return iteratorFn; - } - } - - /** - * Collection of methods that allow declaration and validation of props that are - * supplied to React components. Example usage: - * - * var Props = require('ReactPropTypes'); - * var MyArticle = React.createClass({ - * propTypes: { - * // An optional string prop named "description". - * description: Props.string, - * - * // A required enum prop named "category". - * category: Props.oneOf(['News','Photos']).isRequired, - * - * // A prop named "dialog" that requires an instance of Dialog. - * dialog: Props.instanceOf(Dialog).isRequired - * }, - * render: function() { ... } - * }); - * - * A more formal specification of how these methods are used: - * - * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) - * decl := ReactPropTypes.{type}(.isRequired)? - * - * Each and every declaration produces a function with the same signature. This - * allows the creation of custom validation functions. For example: - * - * var MyLink = React.createClass({ - * propTypes: { - * // An optional string or URI prop named "href". - * href: function(props, propName, componentName) { - * var propValue = props[propName]; - * if (propValue != null && typeof propValue !== 'string' && - * !(propValue instanceof URI)) { - * return new Error( - * 'Expected a string or an URI for ' + propName + ' in ' + - * componentName - * ); - * } - * } - * }, - * render: function() {...} - * }); - * - * @internal - */ - - var ANONYMOUS = '<>'; - - // Important! - // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. - var ReactPropTypes = { - array: createPrimitiveTypeChecker('array'), - bool: createPrimitiveTypeChecker('boolean'), - func: createPrimitiveTypeChecker('function'), - number: createPrimitiveTypeChecker('number'), - object: createPrimitiveTypeChecker('object'), - string: createPrimitiveTypeChecker('string'), - symbol: createPrimitiveTypeChecker('symbol'), - - any: createAnyTypeChecker(), - arrayOf: createArrayOfTypeChecker, - element: createElementTypeChecker(), - elementType: createElementTypeTypeChecker(), - instanceOf: createInstanceTypeChecker, - node: createNodeChecker(), - objectOf: createObjectOfTypeChecker, - oneOf: createEnumTypeChecker, - oneOfType: createUnionTypeChecker, - shape: createShapeTypeChecker, - exact: createStrictShapeTypeChecker, - }; - - /** - * inlined Object.is polyfill to avoid requiring consumers ship their own - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is - */ - /*eslint-disable no-self-compare*/ - function is(x, y) { - // SameValue algorithm - if (x === y) { - // Steps 1-5, 7-10 - // Steps 6.b-6.e: +0 != -0 - return x !== 0 || 1 / x === 1 / y; - } else { - // Step 6.a: NaN == NaN - return x !== x && y !== y; - } - } - /*eslint-enable no-self-compare*/ - - /** - * We use an Error-like object for backward compatibility as people may call - * PropTypes directly and inspect their output. However, we don't use real - * Errors anymore. We don't inspect their stack anyway, and creating them - * is prohibitively expensive if they are created too often, such as what - * happens in oneOfType() for any type before the one that matched. - */ - function PropTypeError(message) { - this.message = message; - this.stack = ''; - } - // Make `instanceof Error` still work for returned errors. - PropTypeError.prototype = Error.prototype; - - function createChainableTypeChecker(validate) { - if (undefined !== 'production') { - var manualPropTypeCallCache = {}; - var manualPropTypeWarningCount = 0; - } - function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { - componentName = componentName || ANONYMOUS; - propFullName = propFullName || propName; - - if (secret !== ReactPropTypesSecret) { - if (throwOnDirectAccess) { - // New behavior only for users of `prop-types` package - var err = new Error( - 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + - 'Use `PropTypes.checkPropTypes()` to call them. ' + - 'Read more at http://fb.me/use-check-prop-types' - ); - err.name = 'Invariant Violation'; - throw err; - } else if (undefined !== 'production' && typeof console !== 'undefined') { - // Old behavior for people using React.PropTypes - var cacheKey = componentName + ':' + propName; - if ( - !manualPropTypeCallCache[cacheKey] && - // Avoid spamming the console because they are often not actionable except for lib authors - manualPropTypeWarningCount < 3 - ) { - printWarning( - 'You are manually calling a React.PropTypes validation ' + - 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + - 'and will throw in the standalone `prop-types` package. ' + - 'You may be seeing this warning due to a third-party PropTypes ' + - 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.' - ); - manualPropTypeCallCache[cacheKey] = true; - manualPropTypeWarningCount++; - } - } - } - if (props[propName] == null) { - if (isRequired) { - if (props[propName] === null) { - return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); - } - return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); - } - return null; - } else { - return validate(props, propName, componentName, location, propFullName); - } - } - - var chainedCheckType = checkType.bind(null, false); - chainedCheckType.isRequired = checkType.bind(null, true); - - return chainedCheckType; - } - - function createPrimitiveTypeChecker(expectedType) { - function validate(props, propName, componentName, location, propFullName, secret) { - var propValue = props[propName]; - var propType = getPropType(propValue); - if (propType !== expectedType) { - // `propValue` being instance of, say, date/regexp, pass the 'object' - // check, but we can offer a more precise error message here rather than - // 'of type `object`'. - var preciseType = getPreciseType(propValue); - - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); - } - return null; - } - return createChainableTypeChecker(validate); - } - - function createAnyTypeChecker() { - return createChainableTypeChecker(emptyFunctionThatReturnsNull); - } - - function createArrayOfTypeChecker(typeChecker) { - function validate(props, propName, componentName, location, propFullName) { - if (typeof typeChecker !== 'function') { - return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); - } - var propValue = props[propName]; - if (!Array.isArray(propValue)) { - var propType = getPropType(propValue); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); - } - for (var i = 0; i < propValue.length; i++) { - var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); - if (error instanceof Error) { - return error; - } - } - return null; - } - return createChainableTypeChecker(validate); - } - - function createElementTypeChecker() { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - if (!isValidElement(propValue)) { - var propType = getPropType(propValue); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); - } - return null; - } - return createChainableTypeChecker(validate); - } - - function createElementTypeTypeChecker() { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - if (!ReactIs.isValidElementType(propValue)) { - var propType = getPropType(propValue); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.')); - } - return null; - } - return createChainableTypeChecker(validate); - } - - function createInstanceTypeChecker(expectedClass) { - function validate(props, propName, componentName, location, propFullName) { - if (!(props[propName] instanceof expectedClass)) { - var expectedClassName = expectedClass.name || ANONYMOUS; - var actualClassName = getClassName(props[propName]); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); - } - return null; - } - return createChainableTypeChecker(validate); - } - - function createEnumTypeChecker(expectedValues) { - if (!Array.isArray(expectedValues)) { - if (undefined !== 'production') { - if (arguments.length > 1) { - printWarning( - 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + - 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).' - ); - } else { - printWarning('Invalid argument supplied to oneOf, expected an array.'); - } - } - return emptyFunctionThatReturnsNull; - } - - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - for (var i = 0; i < expectedValues.length; i++) { - if (is(propValue, expectedValues[i])) { - return null; - } - } - - var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { - var type = getPreciseType(value); - if (type === 'symbol') { - return String(value); - } - return value; - }); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); - } - return createChainableTypeChecker(validate); - } - - function createObjectOfTypeChecker(typeChecker) { - function validate(props, propName, componentName, location, propFullName) { - if (typeof typeChecker !== 'function') { - return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); - } - var propValue = props[propName]; - var propType = getPropType(propValue); - if (propType !== 'object') { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); - } - for (var key in propValue) { - if (has(propValue, key)) { - var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); - if (error instanceof Error) { - return error; - } - } - } - return null; - } - return createChainableTypeChecker(validate); - } - - function createUnionTypeChecker(arrayOfTypeCheckers) { - if (!Array.isArray(arrayOfTypeCheckers)) { - undefined !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0; - return emptyFunctionThatReturnsNull; - } - - for (var i = 0; i < arrayOfTypeCheckers.length; i++) { - var checker = arrayOfTypeCheckers[i]; - if (typeof checker !== 'function') { - printWarning( - 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + - 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.' - ); - return emptyFunctionThatReturnsNull; - } - } - - function validate(props, propName, componentName, location, propFullName) { - for (var i = 0; i < arrayOfTypeCheckers.length; i++) { - var checker = arrayOfTypeCheckers[i]; - if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { - return null; - } - } - - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); - } - return createChainableTypeChecker(validate); - } - - function createNodeChecker() { - function validate(props, propName, componentName, location, propFullName) { - if (!isNode(props[propName])) { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); - } - return null; - } - return createChainableTypeChecker(validate); - } - - function createShapeTypeChecker(shapeTypes) { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - var propType = getPropType(propValue); - if (propType !== 'object') { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); - } - for (var key in shapeTypes) { - var checker = shapeTypes[key]; - if (!checker) { - continue; - } - var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); - if (error) { - return error; - } - } - return null; - } - return createChainableTypeChecker(validate); - } - - function createStrictShapeTypeChecker(shapeTypes) { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - var propType = getPropType(propValue); - if (propType !== 'object') { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); - } - // We need to check all keys in case some are required but missing from - // props. - var allKeys = assign({}, props[propName], shapeTypes); - for (var key in allKeys) { - var checker = shapeTypes[key]; - if (!checker) { - return new PropTypeError( - 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + - '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + - '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ') - ); - } - var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); - if (error) { - return error; - } - } - return null; - } - - return createChainableTypeChecker(validate); - } - - function isNode(propValue) { - switch (typeof propValue) { - case 'number': - case 'string': - case 'undefined': - return true; - case 'boolean': - return !propValue; - case 'object': - if (Array.isArray(propValue)) { - return propValue.every(isNode); - } - if (propValue === null || isValidElement(propValue)) { - return true; - } - - var iteratorFn = getIteratorFn(propValue); - if (iteratorFn) { - var iterator = iteratorFn.call(propValue); - var step; - if (iteratorFn !== propValue.entries) { - while (!(step = iterator.next()).done) { - if (!isNode(step.value)) { - return false; - } - } - } else { - // Iterator will provide entry [k,v] tuples rather than values. - while (!(step = iterator.next()).done) { - var entry = step.value; - if (entry) { - if (!isNode(entry[1])) { - return false; - } - } - } - } - } else { - return false; - } - - return true; - default: - return false; - } - } - - function isSymbol(propType, propValue) { - // Native Symbol. - if (propType === 'symbol') { - return true; - } - - // falsy value can't be a Symbol - if (!propValue) { - return false; - } - - // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' - if (propValue['@@toStringTag'] === 'Symbol') { - return true; - } - - // Fallback for non-spec compliant Symbols which are polyfilled. - if (typeof Symbol === 'function' && propValue instanceof Symbol) { - return true; - } - - return false; - } - - // Equivalent of `typeof` but with special handling for array and regexp. - function getPropType(propValue) { - var propType = typeof propValue; - if (Array.isArray(propValue)) { - return 'array'; - } - if (propValue instanceof RegExp) { - // Old webkits (at least until Android 4.0) return 'function' rather than - // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ - // passes PropTypes.object. - return 'object'; - } - if (isSymbol(propType, propValue)) { - return 'symbol'; - } - return propType; - } - - // This handles more types than `getPropType`. Only used for error messages. - // See `createPrimitiveTypeChecker`. - function getPreciseType(propValue) { - if (typeof propValue === 'undefined' || propValue === null) { - return '' + propValue; - } - var propType = getPropType(propValue); - if (propType === 'object') { - if (propValue instanceof Date) { - return 'date'; - } else if (propValue instanceof RegExp) { - return 'regexp'; - } - } - return propType; - } - - // Returns a string that is postfixed to a warning about an invalid type. - // For example, "undefined" or "of type array" - function getPostfixForTypeWarning(value) { - var type = getPreciseType(value); - switch (type) { - case 'array': - case 'object': - return 'an ' + type; - case 'boolean': - case 'date': - case 'regexp': - return 'a ' + type; - default: - return type; - } - } - - // Returns class name of the object, if any. - function getClassName(propValue) { - if (!propValue.constructor || !propValue.constructor.name) { - return ANONYMOUS; - } - return propValue.constructor.name; - } - - ReactPropTypes.checkPropTypes = checkPropTypes; - ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; - ReactPropTypes.PropTypes = ReactPropTypes; - - return ReactPropTypes; -}; - - -/***/ }), -/* 13 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; + */(function(){Object.defineProperty(t,"__esModule",{value:!0});var e="function"==typeof Symbol&&Symbol.for,n=e?Symbol.for("react.element"):60103,o=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116;var m=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o2?n-2:0),r=2;r1?l("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):l("Invalid argument supplied to oneOf, expected an array."),u;return m((function(t,n,o,r,a){for(var i=t[n],s=0;s 0) { - ariaHiddenInstances -= 1; - - if (ariaHiddenInstances === 0) { - ariaAppHider.show(appElement); - } - } - - if (_this.props.shouldFocusAfterRender) { - if (_this.props.shouldReturnFocusAfterClose) { - focusManager.returnFocus(); - focusManager.teardownScopedFocus(); - } else { - focusManager.popWithoutFocus(); - } - } - - if (_this.props.onAfterClose) { - _this.props.onAfterClose(); - } - }; - - _this.open = function () { - _this.beforeOpen(); - if (_this.state.afterOpen && _this.state.beforeClose) { - clearTimeout(_this.closeTimer); - _this.setState({ beforeClose: false }); - } else { - if (_this.props.shouldFocusAfterRender) { - focusManager.setupScopedFocus(_this.node); - focusManager.markForFocusLater(); - } - - _this.setState({ isOpen: true }, function () { - _this.setState({ afterOpen: true }); - - if (_this.props.isOpen && _this.props.onAfterOpen) { - _this.props.onAfterOpen(); - } - }); - } - }; - - _this.close = function () { - if (_this.props.closeTimeoutMS > 0) { - _this.closeWithTimeout(); - } else { - _this.closeWithoutTimeout(); - } - }; - - _this.focusContent = function () { - return _this.content && !_this.contentHasFocus() && _this.content.focus(); - }; - - _this.closeWithTimeout = function () { - var closesAt = Date.now() + _this.props.closeTimeoutMS; - _this.setState({ beforeClose: true, closesAt: closesAt }, function () { - _this.closeTimer = setTimeout(_this.closeWithoutTimeout, _this.state.closesAt - Date.now()); - }); - }; - - _this.closeWithoutTimeout = function () { - _this.setState({ - beforeClose: false, - isOpen: false, - afterOpen: false, - closesAt: null - }, _this.afterClose); - }; - - _this.handleKeyDown = function (event) { - if (event.keyCode === TAB_KEY) { - (0, _scopeTab2.default)(_this.content, event); - } - - if (_this.props.shouldCloseOnEsc && event.keyCode === ESC_KEY) { - event.stopPropagation(); - _this.requestClose(event); - } - }; - - _this.handleOverlayOnClick = function (event) { - if (_this.shouldClose === null) { - _this.shouldClose = true; - } - - if (_this.shouldClose && _this.props.shouldCloseOnOverlayClick) { - if (_this.ownerHandlesClose()) { - _this.requestClose(event); - } else { - _this.focusContent(); - } - } - _this.shouldClose = null; - }; - - _this.handleContentOnMouseUp = function () { - _this.shouldClose = false; - }; - - _this.handleOverlayOnMouseDown = function (event) { - if (!_this.props.shouldCloseOnOverlayClick && event.target == _this.overlay) { - event.preventDefault(); - } - }; - - _this.handleContentOnClick = function () { - _this.shouldClose = false; - }; - - _this.handleContentOnMouseDown = function () { - _this.shouldClose = false; - }; - - _this.requestClose = function (event) { - return _this.ownerHandlesClose() && _this.props.onRequestClose(event); - }; - - _this.ownerHandlesClose = function () { - return _this.props.onRequestClose; - }; - - _this.shouldBeClosed = function () { - return !_this.state.isOpen && !_this.state.beforeClose; - }; - - _this.contentHasFocus = function () { - return document.activeElement === _this.content || _this.content.contains(document.activeElement); - }; - - _this.buildClassName = function (which, additional) { - var classNames = (typeof additional === "undefined" ? "undefined" : _typeof(additional)) === "object" ? additional : { - base: CLASS_NAMES[which], - afterOpen: CLASS_NAMES[which] + "--after-open", - beforeClose: CLASS_NAMES[which] + "--before-close" - }; - var className = classNames.base; - if (_this.state.afterOpen) { - className = className + " " + classNames.afterOpen; - } - if (_this.state.beforeClose) { - className = className + " " + classNames.beforeClose; - } - return typeof additional === "string" && additional ? className + " " + additional : className; - }; - - _this.attributesFromObject = function (prefix, items) { - return Object.keys(items).reduce(function (acc, name) { - acc[prefix + "-" + name] = items[name]; - return acc; - }, {}); - }; - - _this.state = { - afterOpen: false, - beforeClose: false - }; - - _this.shouldClose = null; - _this.moveFromContentToOverlay = null; - return _this; - } - - _createClass(ModalPortal, [{ - key: "componentDidMount", - value: function componentDidMount() { - if (this.props.isOpen) { - this.open(); - } - } - }, { - key: "componentDidUpdate", - value: function componentDidUpdate(prevProps, prevState) { - if (undefined !== "production") { - if (prevProps.bodyOpenClassName !== this.props.bodyOpenClassName) { - // eslint-disable-next-line no-console - console.warn('React-Modal: "bodyOpenClassName" prop has been modified. ' + "This may cause unexpected behavior when multiple modals are open."); - } - if (prevProps.htmlOpenClassName !== this.props.htmlOpenClassName) { - // eslint-disable-next-line no-console - console.warn('React-Modal: "htmlOpenClassName" prop has been modified. ' + "This may cause unexpected behavior when multiple modals are open."); - } - } - - if (this.props.isOpen && !prevProps.isOpen) { - this.open(); - } else if (!this.props.isOpen && prevProps.isOpen) { - this.close(); - } - - // Focus only needs to be set once when the modal is being opened - if (this.props.shouldFocusAfterRender && this.state.isOpen && !prevState.isOpen) { - this.focusContent(); - } - } - }, { - key: "componentWillUnmount", - value: function componentWillUnmount() { - if (this.state.isOpen) { - this.afterClose(); - } - clearTimeout(this.closeTimer); - } - }, { - key: "beforeOpen", - value: function beforeOpen() { - var _props = this.props, - appElement = _props.appElement, - ariaHideApp = _props.ariaHideApp, - htmlOpenClassName = _props.htmlOpenClassName, - bodyOpenClassName = _props.bodyOpenClassName; - - // Add classes. - - bodyOpenClassName && classList.add(document.body, bodyOpenClassName); - - htmlOpenClassName && classList.add(document.getElementsByTagName("html")[0], htmlOpenClassName); - - if (ariaHideApp) { - ariaHiddenInstances += 1; - ariaAppHider.hide(appElement); - } - } - - // Don't steal focus from inner elements - - }, { - key: "render", - value: function render() { - var _props2 = this.props, - id = _props2.id, - className = _props2.className, - overlayClassName = _props2.overlayClassName, - defaultStyles = _props2.defaultStyles; - - var contentStyles = className ? {} : defaultStyles.content; - var overlayStyles = overlayClassName ? {} : defaultStyles.overlay; - - return this.shouldBeClosed() ? null : _react2.default.createElement( - "div", - { - ref: this.setOverlayRef, - className: this.buildClassName("overlay", overlayClassName), - style: _extends({}, overlayStyles, this.props.style.overlay), - onClick: this.handleOverlayOnClick, - onMouseDown: this.handleOverlayOnMouseDown - }, - _react2.default.createElement( - "div", - _extends({ - id: id, - ref: this.setContentRef, - style: _extends({}, contentStyles, this.props.style.content), - className: this.buildClassName("content", className), - tabIndex: "-1", - onKeyDown: this.handleKeyDown, - onMouseDown: this.handleContentOnMouseDown, - onMouseUp: this.handleContentOnMouseUp, - onClick: this.handleContentOnClick, - role: this.props.role, - "aria-label": this.props.contentLabel - }, this.attributesFromObject("aria", this.props.aria || {}), this.attributesFromObject("data", this.props.data || {}), { - "data-testid": this.props.testId - }), - this.props.children - ) - ); - } - }]); - - return ModalPortal; -}(_react.Component); - -ModalPortal.defaultProps = { - style: { - overlay: {}, - content: {} - }, - defaultStyles: {} -}; -ModalPortal.propTypes = { - isOpen: _propTypes2.default.bool.isRequired, - defaultStyles: _propTypes2.default.shape({ - content: _propTypes2.default.object, - overlay: _propTypes2.default.object - }), - style: _propTypes2.default.shape({ - content: _propTypes2.default.object, - overlay: _propTypes2.default.object - }), - className: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]), - overlayClassName: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]), - bodyOpenClassName: _propTypes2.default.string, - htmlOpenClassName: _propTypes2.default.string, - ariaHideApp: _propTypes2.default.bool, - appElement: _propTypes2.default.instanceOf(_safeHTMLElement2.default), - onAfterOpen: _propTypes2.default.func, - onAfterClose: _propTypes2.default.func, - onRequestClose: _propTypes2.default.func, - closeTimeoutMS: _propTypes2.default.number, - shouldFocusAfterRender: _propTypes2.default.bool, - shouldCloseOnOverlayClick: _propTypes2.default.bool, - shouldReturnFocusAfterClose: _propTypes2.default.bool, - role: _propTypes2.default.string, - contentLabel: _propTypes2.default.string, - aria: _propTypes2.default.object, - data: _propTypes2.default.object, - children: _propTypes2.default.node, - shouldCloseOnEsc: _propTypes2.default.bool, - overlayRef: _propTypes2.default.func, - contentRef: _propTypes2.default.func, - id: _propTypes2.default.string, - testId: _propTypes2.default.string -}; -exports.default = ModalPortal; -module.exports = exports["default"]; - -/***/ }), -/* 17 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.handleBlur = handleBlur; -exports.handleFocus = handleFocus; -exports.markForFocusLater = markForFocusLater; -exports.returnFocus = returnFocus; -exports.popWithoutFocus = popWithoutFocus; -exports.setupScopedFocus = setupScopedFocus; -exports.teardownScopedFocus = teardownScopedFocus; - -var _tabbable = __webpack_require__(5); - -var _tabbable2 = _interopRequireDefault(_tabbable); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var focusLaterElements = []; -var modalElement = null; -var needToFocus = false; - -function handleBlur() { - needToFocus = true; -} - -function handleFocus() { - if (needToFocus) { - needToFocus = false; - if (!modalElement) { - return; - } - // need to see how jQuery shims document.on('focusin') so we don't need the - // setTimeout, firefox doesn't support focusin, if it did, we could focus - // the element outside of a setTimeout. Side-effect of this implementation - // is that the document.body gets focus, and then we focus our element right - // after, seems fine. - setTimeout(function () { - if (modalElement.contains(document.activeElement)) { - return; - } - var el = (0, _tabbable2.default)(modalElement)[0] || modalElement; - el.focus(); - }, 0); - } -} - -function markForFocusLater() { - focusLaterElements.push(document.activeElement); -} - -/* eslint-disable no-console */ -function returnFocus() { - var toFocus = null; - try { - if (focusLaterElements.length !== 0) { - toFocus = focusLaterElements.pop(); - toFocus.focus(); - } - return; - } catch (e) { - console.warn(["You tried to return focus to", toFocus, "but it is not in the DOM anymore"].join(" ")); - } -} -/* eslint-enable no-console */ - -function popWithoutFocus() { - focusLaterElements.length > 0 && focusLaterElements.pop(); -} - -function setupScopedFocus(element) { - modalElement = element; - - if (window.addEventListener) { - window.addEventListener("blur", handleBlur, false); - document.addEventListener("focus", handleFocus, true); - } else { - window.attachEvent("onBlur", handleBlur); - document.attachEvent("onFocus", handleFocus); - } -} - -function teardownScopedFocus() { - modalElement = null; - - if (window.addEventListener) { - window.removeEventListener("blur", handleBlur); - document.removeEventListener("focus", handleFocus); - } else { - window.detachEvent("onBlur", handleBlur); - document.detachEvent("onFocus", handleFocus); - } -} - -/***/ }), -/* 18 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = scopeTab; - -var _tabbable = __webpack_require__(5); - -var _tabbable2 = _interopRequireDefault(_tabbable); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function scopeTab(node, event) { - var tabbable = (0, _tabbable2.default)(node); - - if (!tabbable.length) { - // Do nothing, since there are no elements that can receive focus. - event.preventDefault(); - return; - } - - var shiftKey = event.shiftKey; - var head = tabbable[0]; - var tail = tabbable[tabbable.length - 1]; - - // proceed with default browser behavior on tab. - // Focus on last element on shift + tab. - if (node === document.activeElement) { - if (!shiftKey) return; - target = tail; - } - - var target; - if (tail === document.activeElement && !shiftKey) { - target = head; - } - - if (head === document.activeElement && shiftKey) { - target = tail; - } - - if (target) { - event.preventDefault(); - target.focus(); - return; - } - - // Safari radio issue. - // - // Safari does not move the focus to the radio button, - // so we need to force it to really walk through all elements. - // - // This is very error prone, since we are trying to guess - // if it is a safari browser from the first occurence between - // chrome or safari. - // - // The chrome user agent contains the first ocurrence - // as the 'chrome/version' and later the 'safari/version'. - var checkSafari = /(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent); - var isSafariDesktop = checkSafari != null && checkSafari[1] != "Chrome" && /\biPod\b|\biPad\b/g.exec(navigator.userAgent) == null; - - // If we are not in safari desktop, let the browser control - // the focus - if (!isSafariDesktop) return; - - var x = tabbable.indexOf(document.activeElement); - - if (x > -1) { - x += shiftKey ? -1 : 1; - } - - // If the tabbable element does not exist, - // focus head/tail based on shiftKey - if (typeof tabbable[x] === "undefined") { - event.preventDefault(); - target = shiftKey ? tail : head; - target.focus(); - return; - } - - event.preventDefault(); - - tabbable[x].focus(); -} -module.exports = exports["default"]; - -/***/ }), -/* 19 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright (c) 2014-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - - - -/** - * Similar to invariant but only logs a warning if the condition is not met. - * This can be used to log issues in development environments in critical - * paths. Removing the logging code for production environments will keep the - * same logic and follow the same code paths. - */ - -var __DEV__ = undefined !== 'production'; - -var warning = function() {}; - -if (__DEV__) { - var printWarning = function printWarning(format, args) { - var len = arguments.length; - args = new Array(len > 1 ? len - 1 : 0); - for (var key = 1; key < len; key++) { - args[key - 1] = arguments[key]; - } - var argIndex = 0; - var message = 'Warning: ' + - format.replace(/%s/g, function() { - return args[argIndex++]; - }); - if (typeof console !== 'undefined') { - console.error(message); - } - try { - // --- Welcome to debugging React --- - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch (x) {} - } - - warning = function(condition, format, args) { - var len = arguments.length; - args = new Array(len > 2 ? len - 2 : 0); - for (var key = 2; key < len; key++) { - args[key - 2] = arguments[key]; - } - if (format === undefined) { - throw new Error( - '`warning(condition, format, ...args)` requires a warning ' + - 'message argument' - ); - } - if (!condition) { - printWarning.apply(null, [format].concat(args)); - } - }; -} - -module.exports = warning; - - -/***/ }), -/* 20 */ -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_RESULT__;/*! +*/var o=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,l=i(e),u=1;u0&&0===(O-=1)&&f.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(u.returnFocus(),u.teardownScopedFocus()):u.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose()},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(u.setupScopedFocus(n.node),u.markForFocusLater()),n.setState({isOpen:!0},(function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus()},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){e.keyCode===v&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&e.keyCode===b&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:h[e],afterOpen:h[e]+"--after-open",beforeClose:h[e]+"--before-close"},a=o.base;return n.state.afterOpen&&(a=a+" "+o.afterOpen),n.state.beforeClose&&(a=a+" "+o.beforeClose),"string"==typeof t&&t?a+" "+t:a},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){e.bodyOpenClassName!==this.props.bodyOpenClassName&&console.warn('React-Modal: "bodyOpenClassName" prop has been modified. This may cause unexpected behavior when multiple modals are open.'),e.htmlOpenClassName!==this.props.htmlOpenClassName&&console.warn('React-Modal: "htmlOpenClassName" prop has been modified. This may cause unexpected behavior when multiple modals are open.'),this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName;r&&p.add(document.body,r),o&&p.add(document.getElementsByTagName("html")[0],o),n&&(O+=1,f.hide(t))}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,a=e.defaultStyles,i=n?{}:a.content,l=r?{}:a.overlay;return this.shouldBeClosed()?null:s.default.createElement("div",{ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},l,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},s.default.createElement("div",o({id:t,ref:this.setContentRef,style:o({},i,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",this.props.aria||{}),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),this.props.children))}}]),t}(i.Component);g.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},g.propTypes={isOpen:l.default.bool.isRequired,defaultStyles:l.default.shape({content:l.default.object,overlay:l.default.object}),style:l.default.shape({content:l.default.object,overlay:l.default.object}),className:l.default.oneOfType([l.default.string,l.default.object]),overlayClassName:l.default.oneOfType([l.default.string,l.default.object]),bodyOpenClassName:l.default.string,htmlOpenClassName:l.default.string,ariaHideApp:l.default.bool,appElement:l.default.instanceOf(d.default),onAfterOpen:l.default.func,onAfterClose:l.default.func,onRequestClose:l.default.func,closeTimeoutMS:l.default.number,shouldFocusAfterRender:l.default.bool,shouldCloseOnOverlayClick:l.default.bool,shouldReturnFocusAfterClose:l.default.bool,role:l.default.string,contentLabel:l.default.string,aria:l.default.object,data:l.default.object,children:l.default.node,shouldCloseOnEsc:l.default.bool,overlayRef:l.default.func,contentRef:l.default.func,id:l.default.string,testId:l.default.string},t.default=g,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleBlur=u,t.handleFocus=c,t.markForFocusLater=function(){i.push(document.activeElement)},t.returnFocus=function(){var e=null;try{return void(0!==i.length&&(e=i.pop()).focus())}catch(t){console.warn(["You tried to return focus to",e,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){i.length>0&&i.pop()},t.setupScopedFocus=function(e){s=e,window.addEventListener?(window.addEventListener("blur",u,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",u),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){s=null,window.addEventListener?(window.removeEventListener("blur",u),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",u),document.detachEvent("onFocus",c))};var o,r=n(5),a=(o=r)&&o.__esModule?o:{default:o};var i=[],s=null,l=!1;function u(){l=!0}function c(){if(l){if(l=!1,!s)return;setTimeout((function(){s.contains(document.activeElement)||((0,a.default)(s)[0]||s).focus()}),0)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,a.default)(e);if(!n.length)return void t.preventDefault();var o,r=t.shiftKey,i=n[0],s=n[n.length-1];if(e===document.activeElement){if(!r)return;o=s}s!==document.activeElement||r||(o=i);i===document.activeElement&&r&&(o=s);if(o)return t.preventDefault(),void o.focus();var l=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null==l||"Chrome"==l[1]||null!=/\biPod\b|\biPad\b/g.exec(navigator.userAgent))return;var u=n.indexOf(document.activeElement);u>-1&&(u+=r?-1:1);if(void 0===n[u])return t.preventDefault(),void(o=r?s:i).focus();t.preventDefault(),n[u].focus()};var o,r=n(5),a=(o=r)&&o.__esModule?o:{default:o};e.exports=t.default},function(e,t,n){"use strict";var o=function(){},r=function(e,t){var n=arguments.length;t=new Array(n>1?n-1:0);for(var o=1;o2?o-2:0);for(var a=2;a=0)&&a(e,!n)}function s(e){return[].slice.call(e.querySelectorAll("*"),0).filter(i)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;/*! +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.ReactModal=t(require("react"),require("react-dom")):e.ReactModal=t(e.React,e.ReactDOM)}(window,(function(e,t){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=7)}([function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=void 0;var o,r=n(20);var a=((o=r)&&o.__esModule?o:{default:o}).default,i=a.canUseDOM?window.HTMLElement:{};t.canUseDOM=a.canUseDOM;t.default=i},function(t,n){t.exports=e},function(e,t,n){var o=n(4);e.exports=n(12)(o.isElement,!0)},function(e,t,n){"use strict";e.exports=n(11)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return[].slice.call(e.querySelectorAll("*"),0).filter(i)}; +/*! * Adapted from jQuery UI core * * http://jqueryui.com @@ -9,22 +10,30 @@ * * http://api.jqueryui.com/category/ui-core/ */ -var u=/input|select|textarea|button|object/;e.exports=t.default},function(e,t,n){"use strict";function o(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function r(e){var t=e;if("string"==typeof t&&p.canUseDOM){var n=document.querySelectorAll(t);o(n,t),t="length"in n?n[0]:n}return d=t||d}function a(e){return!(!e&&!d)||((0,f.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),!1)}function i(e){a(e)&&(e||d).setAttribute("aria-hidden","true")}function s(e){a(e)&&(e||d).removeAttribute("aria-hidden")}function u(){d=null}function l(){d=null}Object.defineProperty(t,"__esModule",{value:!0}),t.assertNodeList=o,t.setElement=r,t.validateElement=a,t.hide=i,t.show=s,t.documentNotReadyOrSSRTesting=u,t.resetForTesting=l;var c=n(19),f=function(e){return e&&e.__esModule?e:{default:e}}(c),p=n(1),d=null},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(8),r=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=r.default,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return e()}Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var u=Object.assign||function(e){for(var t=1;t=0)&&a(e,!n)}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertNodeList=l,t.setElement=function(e){var t=e;if("string"==typeof t&&i.canUseDOM){var n=document.querySelectorAll(t);l(n,t),t="length"in n?n[0]:n}return s=t||s},t.validateElement=u,t.hide=function(e){u(e)&&(e||s).setAttribute("aria-hidden","true")},t.show=function(e){u(e)&&(e||s).removeAttribute("aria-hidden")},t.documentNotReadyOrSSRTesting=function(){s=null},t.resetForTesting=function(){s=null};var o,r=n(19),a=(o=r)&&o.__esModule?o:{default:o},i=n(1);var s=null;function l(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function u(e){return!(!e&&!s)||((0,a.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),!1)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=n(8),a=(o=r)&&o.__esModule?o:{default:o};t.default=a.default,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t1?t-1:0),o=1;o2?n-2:0),r=2;r1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),o)}function v(e){function t(t,n,o,r,a){if("function"!=typeof e)return new f("Property `"+a+"` of component `"+o+"` has invalid PropType notation inside objectOf.");var s=t[n],l=S(s);if("object"!==l)return new f("Invalid "+r+" `"+a+"` of type `"+l+"` supplied to `"+o+"`, expected an object.");for(var c in s)if(u(s,c)){var p=e(s,c,o,r,a+"."+c,i);if(p instanceof Error)return p}return null}return p(t)}function b(e){function t(t,n,o,r,a){for(var s=0;s1?t-1:0),o=1;o2?n-2:0),r=2;r1?l("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):l("Invalid argument supplied to oneOf, expected an array."),u;return m((function(t,n,o,r,a){for(var i=t[n],s=0;s0&&0===(M-=1)&&g.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(h.returnFocus(),h.teardownScopedFocus()):h.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose()},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(h.setupScopedFocus(n.node),h.markForFocusLater()),n.setState({isOpen:!0},function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen()}))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus()},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())})},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){e.keyCode===j&&(0,b.default)(n.content,e),n.props.shouldCloseOnEsc&&e.keyCode===P&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":l(t))?t:{base:E[e],afterOpen:E[e]+"--after-open",beforeClose:E[e]+"--before-close"},r=o.base;return n.state.afterOpen&&(r=r+" "+o.afterOpen),n.state.beforeClose&&(r=r+" "+o.beforeClose),"string"==typeof t&&t?r+" "+t:r},n.attributesFromObject=function(e,t){return Object.keys(t).reduce(function(n,o){return n[e+"-"+o]=t[o],n},{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return s(t,e),c(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){e.bodyOpenClassName!==this.props.bodyOpenClassName&&console.warn('React-Modal: "bodyOpenClassName" prop has been modified. This may cause unexpected behavior when multiple modals are open.'),e.htmlOpenClassName!==this.props.htmlOpenClassName&&console.warn('React-Modal: "htmlOpenClassName" prop has been modified. This may cause unexpected behavior when multiple modals are open.'),this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName;r&&C.add(document.body,r),o&&C.add(document.getElementsByTagName("html")[0],o),n&&(M+=1,g.hide(t))}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,o=e.overlayClassName,r=e.defaultStyles,a=n?{}:r.content,i=o?{}:r.overlay;return this.shouldBeClosed()?null:p.default.createElement("div",{ref:this.setOverlayRef,className:this.buildClassName("overlay",o),style:u({},i,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},p.default.createElement("div",u({id:t,ref:this.setContentRef,style:u({},a,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",this.props.aria||{}),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),this.props.children))}}]),t}(f.Component);x.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},x.propTypes={isOpen:y.default.bool.isRequired,defaultStyles:y.default.shape({content:y.default.object,overlay:y.default.object}),style:y.default.shape({content:y.default.object,overlay:y.default.object}),className:y.default.oneOfType([y.default.string,y.default.object]),overlayClassName:y.default.oneOfType([y.default.string,y.default.object]),bodyOpenClassName:y.default.string,htmlOpenClassName:y.default.string,ariaHideApp:y.default.bool,appElement:y.default.instanceOf(_.default),onAfterOpen:y.default.func,onAfterClose:y.default.func,onRequestClose:y.default.func,closeTimeoutMS:y.default.number,shouldFocusAfterRender:y.default.bool,shouldCloseOnOverlayClick:y.default.bool,shouldReturnFocusAfterClose:y.default.bool,role:y.default.string,contentLabel:y.default.string,aria:y.default.object,data:y.default.object,children:y.default.node,shouldCloseOnEsc:y.default.bool,overlayRef:y.default.func,contentRef:y.default.func,id:y.default.string,testId:y.default.string},t.default=x,e.exports=t.default},function(e,t,n){"use strict";function o(){y=!0}function r(){if(y){if(y=!1,!d)return;setTimeout(function(){if(!d.contains(document.activeElement)){((0,f.default)(d)[0]||d).focus()}},0)}}function a(){p.push(document.activeElement)}function i(){var e=null;try{return void(0!==p.length&&(e=p.pop(),e.focus()))}catch(t){console.warn(["You tried to return focus to",e,"but it is not in the DOM anymore"].join(" "))}}function s(){p.length>0&&p.pop()}function u(e){d=e,window.addEventListener?(window.addEventListener("blur",o,!1),document.addEventListener("focus",r,!0)):(window.attachEvent("onBlur",o),document.attachEvent("onFocus",r))}function l(){d=null,window.addEventListener?(window.removeEventListener("blur",o),document.removeEventListener("focus",r)):(window.detachEvent("onBlur",o),document.detachEvent("onFocus",r))}Object.defineProperty(t,"__esModule",{value:!0}),t.handleBlur=o,t.handleFocus=r,t.markForFocusLater=a,t.returnFocus=i,t.popWithoutFocus=s,t.setupScopedFocus=u,t.teardownScopedFocus=l;var c=n(5),f=function(e){return e&&e.__esModule?e:{default:e}}(c),p=[],d=null,y=!1},function(e,t,n){"use strict";function o(e,t){var n=(0,a.default)(e);if(!n.length)return void t.preventDefault();var o=t.shiftKey,r=n[0],i=n[n.length-1];if(e===document.activeElement){if(!o)return;s=i}var s;if(i!==document.activeElement||o||(s=r),r===document.activeElement&&o&&(s=i),s)return t.preventDefault(),void s.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var l=n.indexOf(document.activeElement);if(l>-1&&(l+=o?-1:1),void 0===n[l])return t.preventDefault(),s=o?i:r,void s.focus();t.preventDefault(),n[l].focus()}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var r=n(5),a=function(e){return e&&e.__esModule?e:{default:e}}(r);e.exports=t.default},function(e,t,n){"use strict";var o=function(){},r=function(e,t){var n=arguments.length;t=new Array(n>1?n-1:0);for(var o=1;o2?o-2:0);for(var a=2;a0&&0===(O-=1)&&f.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(u.returnFocus(),u.teardownScopedFocus()):u.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose()},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(u.setupScopedFocus(n.node),u.markForFocusLater()),n.setState({isOpen:!0},(function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus()},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){e.keyCode===v&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&e.keyCode===b&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:h[e],afterOpen:h[e]+"--after-open",beforeClose:h[e]+"--before-close"},a=o.base;return n.state.afterOpen&&(a=a+" "+o.afterOpen),n.state.beforeClose&&(a=a+" "+o.beforeClose),"string"==typeof t&&t?a+" "+t:a},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){e.bodyOpenClassName!==this.props.bodyOpenClassName&&console.warn('React-Modal: "bodyOpenClassName" prop has been modified. This may cause unexpected behavior when multiple modals are open.'),e.htmlOpenClassName!==this.props.htmlOpenClassName&&console.warn('React-Modal: "htmlOpenClassName" prop has been modified. This may cause unexpected behavior when multiple modals are open.'),this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName;r&&p.add(document.body,r),o&&p.add(document.getElementsByTagName("html")[0],o),n&&(O+=1,f.hide(t))}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,a=e.defaultStyles,i=n?{}:a.content,l=r?{}:a.overlay;return this.shouldBeClosed()?null:s.default.createElement("div",{ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},l,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},s.default.createElement("div",o({id:t,ref:this.setContentRef,style:o({},i,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",this.props.aria||{}),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),this.props.children))}}]),t}(i.Component);g.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},g.propTypes={isOpen:l.default.bool.isRequired,defaultStyles:l.default.shape({content:l.default.object,overlay:l.default.object}),style:l.default.shape({content:l.default.object,overlay:l.default.object}),className:l.default.oneOfType([l.default.string,l.default.object]),overlayClassName:l.default.oneOfType([l.default.string,l.default.object]),bodyOpenClassName:l.default.string,htmlOpenClassName:l.default.string,ariaHideApp:l.default.bool,appElement:l.default.instanceOf(d.default),onAfterOpen:l.default.func,onAfterClose:l.default.func,onRequestClose:l.default.func,closeTimeoutMS:l.default.number,shouldFocusAfterRender:l.default.bool,shouldCloseOnOverlayClick:l.default.bool,shouldReturnFocusAfterClose:l.default.bool,role:l.default.string,contentLabel:l.default.string,aria:l.default.object,data:l.default.object,children:l.default.node,shouldCloseOnEsc:l.default.bool,overlayRef:l.default.func,contentRef:l.default.func,id:l.default.string,testId:l.default.string},t.default=g,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleBlur=u,t.handleFocus=c,t.markForFocusLater=function(){i.push(document.activeElement)},t.returnFocus=function(){var e=null;try{return void(0!==i.length&&(e=i.pop()).focus())}catch(t){console.warn(["You tried to return focus to",e,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){i.length>0&&i.pop()},t.setupScopedFocus=function(e){s=e,window.addEventListener?(window.addEventListener("blur",u,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",u),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){s=null,window.addEventListener?(window.removeEventListener("blur",u),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",u),document.detachEvent("onFocus",c))};var o,r=n(5),a=(o=r)&&o.__esModule?o:{default:o};var i=[],s=null,l=!1;function u(){l=!0}function c(){if(l){if(l=!1,!s)return;setTimeout((function(){s.contains(document.activeElement)||((0,a.default)(s)[0]||s).focus()}),0)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,a.default)(e);if(!n.length)return void t.preventDefault();var o,r=t.shiftKey,i=n[0],s=n[n.length-1];if(e===document.activeElement){if(!r)return;o=s}s!==document.activeElement||r||(o=i);i===document.activeElement&&r&&(o=s);if(o)return t.preventDefault(),void o.focus();var l=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null==l||"Chrome"==l[1]||null!=/\biPod\b|\biPad\b/g.exec(navigator.userAgent))return;var u=n.indexOf(document.activeElement);u>-1&&(u+=r?-1:1);if(void 0===n[u])return t.preventDefault(),void(o=r?s:i).focus();t.preventDefault(),n[u].focus()};var o,r=n(5),a=(o=r)&&o.__esModule?o:{default:o};e.exports=t.default},function(e,t,n){"use strict";var o=function(){},r=function(e,t){var n=arguments.length;t=new Array(n>1?n-1:0);for(var o=1;o2?o-2:0);for(var a=2;a