/******/ (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, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // 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 = "./src/index.tsx"); /******/ }) /************************************************************************/ /******/ ({ /***/ "./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js": /*!******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***! \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } module.exports = _arrayWithoutHoles; /***/ }), /***/ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js": /*!**********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } module.exports = _assertThisInitialized; /***/ }), /***/ "./node_modules/@babel/runtime/helpers/classCallCheck.js": /*!***************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***! \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } module.exports = _classCallCheck; /***/ }), /***/ "./node_modules/@babel/runtime/helpers/createClass.js": /*!************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/createClass.js ***! \************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } module.exports = _createClass; /***/ }), /***/ "./node_modules/@babel/runtime/helpers/defineProperty.js": /*!***************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***! \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } module.exports = _defineProperty; /***/ }), /***/ "./node_modules/@babel/runtime/helpers/extends.js": /*!********************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/extends.js ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { function _extends() { module.exports = _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; }; return _extends.apply(this, arguments); } module.exports = _extends; /***/ }), /***/ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js": /*!***************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { function _getPrototypeOf(o) { module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } module.exports = _getPrototypeOf; /***/ }), /***/ "./node_modules/@babel/runtime/helpers/inherits.js": /*!*********************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/inherits.js ***! \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf */ "./node_modules/@babel/runtime/helpers/setPrototypeOf.js"); function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) setPrototypeOf(subClass, superClass); } module.exports = _inherits; /***/ }), /***/ "./node_modules/@babel/runtime/helpers/inheritsLoose.js": /*!**************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/inheritsLoose.js ***! \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } module.exports = _inheritsLoose; /***/ }), /***/ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js": /*!**********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } module.exports = _interopRequireDefault; /***/ }), /***/ "./node_modules/@babel/runtime/helpers/interopRequireWildcard.js": /*!***********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/interopRequireWildcard.js ***! \***********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { 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)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } module.exports = _interopRequireWildcard; /***/ }), /***/ "./node_modules/@babel/runtime/helpers/iterableToArray.js": /*!****************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***! \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } module.exports = _iterableToArray; /***/ }), /***/ "./node_modules/@babel/runtime/helpers/nonIterableSpread.js": /*!******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***! \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } module.exports = _nonIterableSpread; /***/ }), /***/ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js": /*!************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js ***! \************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var objectWithoutPropertiesLoose = __webpack_require__(/*! ./objectWithoutPropertiesLoose */ "./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js"); function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } module.exports = _objectWithoutProperties; /***/ }), /***/ "./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js": /*!*****************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js ***! \*****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } module.exports = _objectWithoutPropertiesLoose; /***/ }), /***/ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": /*!**************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var _typeof = __webpack_require__(/*! ../helpers/typeof */ "./node_modules/@babel/runtime/helpers/typeof.js"); var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized */ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js"); function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return assertThisInitialized(self); } module.exports = _possibleConstructorReturn; /***/ }), /***/ "./node_modules/@babel/runtime/helpers/setPrototypeOf.js": /*!***************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { function _setPrototypeOf(o, p) { module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } module.exports = _setPrototypeOf; /***/ }), /***/ "./node_modules/@babel/runtime/helpers/toConsumableArray.js": /*!******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***! \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles */ "./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"); var iterableToArray = __webpack_require__(/*! ./iterableToArray */ "./node_modules/@babel/runtime/helpers/iterableToArray.js"); var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread */ "./node_modules/@babel/runtime/helpers/nonIterableSpread.js"); function _toConsumableArray(arr) { return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread(); } module.exports = _toConsumableArray; /***/ }), /***/ "./node_modules/@babel/runtime/helpers/typeof.js": /*!*******************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/typeof.js ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } function _typeof(obj) { if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") { module.exports = _typeof = function _typeof(obj) { return _typeof2(obj); }; } else { module.exports = _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); }; } return _typeof(obj); } module.exports = _typeof; /***/ }), /***/ "./node_modules/@material-ui/core/AppBar/AppBar.js": /*!*********************************************************!*\ !*** ./node_modules/@material-ui/core/AppBar/AppBar.js ***! \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.styles = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js")); var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js")); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js")); var _withStyles = _interopRequireDefault(__webpack_require__(/*! ../styles/withStyles */ "./node_modules/@material-ui/core/styles/withStyles.js")); var _helpers = __webpack_require__(/*! ../utils/helpers */ "./node_modules/@material-ui/core/utils/helpers.js"); var _Paper = _interopRequireDefault(__webpack_require__(/*! ../Paper */ "./node_modules/@material-ui/core/Paper/index.js")); // @inheritedComponent Paper var styles = function styles(theme) { var backgroundColorDefault = theme.palette.type === 'light' ? theme.palette.grey[100] : theme.palette.grey[900]; return { /* Styles applied to the root element. */ root: { display: 'flex', flexDirection: 'column', width: '100%', boxSizing: 'border-box', // Prevent padding issue with the Modal and fixed positioned AppBar. zIndex: theme.zIndex.appBar, flexShrink: 0 }, /* Styles applied to the root element if `position="fixed"`. */ positionFixed: { position: 'fixed', top: 0, left: 'auto', right: 0 }, /* Styles applied to the root element if `position="absolute"`. */ positionAbsolute: { position: 'absolute', top: 0, left: 'auto', right: 0 }, /* Styles applied to the root element if `position="sticky"`. */ positionSticky: { position: 'sticky', top: 0, left: 'auto', right: 0 }, /* Styles applied to the root element if `position="static"`. */ positionStatic: { position: 'static' }, /* Styles applied to the root element if `position="relative"`. */ positionRelative: { position: 'relative' }, /* Styles applied to the root element if `color="default"`. */ colorDefault: { backgroundColor: backgroundColorDefault, color: theme.palette.getContrastText(backgroundColorDefault) }, /* Styles applied to the root element if `color="primary"`. */ colorPrimary: { backgroundColor: theme.palette.primary.main, color: theme.palette.primary.contrastText }, /* Styles applied to the root element if `color="secondary"`. */ colorSecondary: { backgroundColor: theme.palette.secondary.main, color: theme.palette.secondary.contrastText } }; }; exports.styles = styles; function AppBar(props) { var _classNames; var children = props.children, classes = props.classes, classNameProp = props.className, color = props.color, position = props.position, other = (0, _objectWithoutProperties2.default)(props, ["children", "classes", "className", "color", "position"]); var className = (0, _classnames.default)(classes.root, classes["position".concat((0, _helpers.capitalize)(position))], (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes["color".concat((0, _helpers.capitalize)(color))], color !== 'inherit'), (0, _defineProperty2.default)(_classNames, 'mui-fixed', position === 'fixed'), _classNames), classNameProp); return _react.default.createElement(_Paper.default, (0, _extends2.default)({ square: true, component: "header", elevation: 4, className: className }, other), children); } true ? AppBar.propTypes = { /** * The content of the component. */ children: _propTypes.default.node.isRequired, /** * Override or extend the styles applied to the component. * See [CSS API](#css-api) below for more details. */ classes: _propTypes.default.object.isRequired, /** * @ignore */ className: _propTypes.default.string, /** * The color of the component. It supports those theme colors that make sense for this component. */ color: _propTypes.default.oneOf(['inherit', 'primary', 'secondary', 'default']), /** * The positioning type. The behavior of the different options is described * [in the MDN web docs](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Positioning). * Note: `sticky` is not universally supported and will fall back to `static` when unavailable. */ position: _propTypes.default.oneOf(['fixed', 'absolute', 'sticky', 'static', 'relative']) } : undefined; AppBar.defaultProps = { color: 'primary', position: 'fixed' }; var _default = (0, _withStyles.default)(styles, { name: 'MuiAppBar' })(AppBar); exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/AppBar/index.js": /*!********************************************************!*\ !*** ./node_modules/@material-ui/core/AppBar/index.js ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function get() { return _AppBar.default; } }); var _AppBar = _interopRequireDefault(__webpack_require__(/*! ./AppBar */ "./node_modules/@material-ui/core/AppBar/AppBar.js")); /***/ }), /***/ "./node_modules/@material-ui/core/Backdrop/Backdrop.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/Backdrop/Backdrop.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.styles = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js")); var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js")); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js")); var _withStyles = _interopRequireDefault(__webpack_require__(/*! ../styles/withStyles */ "./node_modules/@material-ui/core/styles/withStyles.js")); var _Fade = _interopRequireDefault(__webpack_require__(/*! ../Fade */ "./node_modules/@material-ui/core/Fade/index.js")); var styles = { /* Styles applied to the root element. */ root: { zIndex: -1, position: 'fixed', right: 0, bottom: 0, top: 0, left: 0, backgroundColor: 'rgba(0, 0, 0, 0.5)', // Remove grey highlight WebkitTapHighlightColor: 'transparent', // Disable scroll capabilities. touchAction: 'none' }, /* Styles applied to the root element if `invisible={true}`. */ invisible: { backgroundColor: 'transparent' } }; exports.styles = styles; function Backdrop(props) { var classes = props.classes, className = props.className, invisible = props.invisible, open = props.open, transitionDuration = props.transitionDuration, other = (0, _objectWithoutProperties2.default)(props, ["classes", "className", "invisible", "open", "transitionDuration"]); return _react.default.createElement(_Fade.default, (0, _extends2.default)({ in: open, timeout: transitionDuration }, other), _react.default.createElement("div", { className: (0, _classnames.default)(classes.root, (0, _defineProperty2.default)({}, classes.invisible, invisible), className), "aria-hidden": "true" })); } true ? Backdrop.propTypes = { /** * Override or extend the styles applied to the component. * See [CSS API](#css-api) below for more details. */ classes: _propTypes.default.object.isRequired, /** * @ignore */ className: _propTypes.default.string, /** * If `true`, the backdrop is invisible. * It can be used when rendering a popover or a custom select component. */ invisible: _propTypes.default.bool, /** * If `true`, the backdrop is open. */ open: _propTypes.default.bool.isRequired, /** * The duration for the transition, in milliseconds. * You may specify a single timeout for all transitions, or individually with an object. */ transitionDuration: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({ enter: _propTypes.default.number, exit: _propTypes.default.number })]) } : undefined; Backdrop.defaultProps = { invisible: false }; var _default = (0, _withStyles.default)(styles, { name: 'MuiBackdrop' })(Backdrop); exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/Backdrop/index.js": /*!**********************************************************!*\ !*** ./node_modules/@material-ui/core/Backdrop/index.js ***! \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function get() { return _Backdrop.default; } }); var _Backdrop = _interopRequireDefault(__webpack_require__(/*! ./Backdrop */ "./node_modules/@material-ui/core/Backdrop/Backdrop.js")); /***/ }), /***/ "./node_modules/@material-ui/core/Button/Button.js": /*!*********************************************************!*\ !*** ./node_modules/@material-ui/core/Button/Button.js ***! \*********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.styles = void 0; var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js")); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js")); var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js")); var _utils = __webpack_require__(/*! @material-ui/utils */ "./node_modules/@material-ui/utils/index.es.js"); var _withStyles = _interopRequireDefault(__webpack_require__(/*! ../styles/withStyles */ "./node_modules/@material-ui/core/styles/withStyles.js")); var _colorManipulator = __webpack_require__(/*! ../styles/colorManipulator */ "./node_modules/@material-ui/core/styles/colorManipulator.js"); var _ButtonBase = _interopRequireDefault(__webpack_require__(/*! ../ButtonBase */ "./node_modules/@material-ui/core/ButtonBase/index.js")); var _helpers = __webpack_require__(/*! ../utils/helpers */ "./node_modules/@material-ui/core/utils/helpers.js"); // @inheritedComponent ButtonBase var styles = function styles(theme) { return { /* Styles applied to the root element. */ root: (0, _extends2.default)({ lineHeight: 1.75 }, theme.typography.button, { boxSizing: 'border-box', minWidth: 64, padding: '6px 16px', borderRadius: theme.shape.borderRadius, color: theme.palette.text.primary, transition: theme.transitions.create(['background-color', 'box-shadow', 'border'], { duration: theme.transitions.duration.short }), '&:hover': { textDecoration: 'none', backgroundColor: (0, _colorManipulator.fade)(theme.palette.text.primary, theme.palette.action.hoverOpacity), // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: 'transparent' }, '&$disabled': { backgroundColor: 'transparent' } }, '&$disabled': { color: theme.palette.action.disabled } }), /* Styles applied to the span element that wraps the children. */ label: { width: '100%', // assure the correct width for iOS Safari display: 'inherit', alignItems: 'inherit', justifyContent: 'inherit' }, /* Styles applied to the root element if `variant="text"`. */ text: { padding: '6px 8px' }, /* Styles applied to the root element if `variant="text"` and `color="primary"`. */ textPrimary: { color: theme.palette.primary.main, '&:hover': { backgroundColor: (0, _colorManipulator.fade)(theme.palette.primary.main, theme.palette.action.hoverOpacity), // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: 'transparent' } } }, /* Styles applied to the root element if `variant="text"` and `color="secondary"`. */ textSecondary: { color: theme.palette.secondary.main, '&:hover': { backgroundColor: (0, _colorManipulator.fade)(theme.palette.secondary.main, theme.palette.action.hoverOpacity), // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: 'transparent' } } }, /* Styles applied to the root element for backwards compatibility with legacy variant naming. */ flat: {}, /* Styles applied to the root element for backwards compatibility with legacy variant naming. */ flatPrimary: {}, /* Styles applied to the root element for backwards compatibility with legacy variant naming. */ flatSecondary: {}, /* Styles applied to the root element if `variant="outlined"`. */ outlined: { padding: '5px 16px', border: "1px solid ".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'), '&$disabled': { border: "1px solid ".concat(theme.palette.action.disabled) } }, /* Styles applied to the root element if `variant="outlined"` and `color="primary"`. */ outlinedPrimary: { color: theme.palette.primary.main, border: "1px solid ".concat((0, _colorManipulator.fade)(theme.palette.primary.main, 0.5)), '&:hover': { border: "1px solid ".concat(theme.palette.primary.main), backgroundColor: (0, _colorManipulator.fade)(theme.palette.primary.main, theme.palette.action.hoverOpacity), // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: 'transparent' } } }, /* Styles applied to the root element if `variant="outlined"` and `color="secondary"`. */ outlinedSecondary: { color: theme.palette.secondary.main, border: "1px solid ".concat((0, _colorManipulator.fade)(theme.palette.secondary.main, 0.5)), '&:hover': { border: "1px solid ".concat(theme.palette.secondary.main), backgroundColor: (0, _colorManipulator.fade)(theme.palette.secondary.main, theme.palette.action.hoverOpacity), // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: 'transparent' } }, '&$disabled': { border: "1px solid ".concat(theme.palette.action.disabled) } }, /* Styles applied to the root element if `variant="[contained | fab]"`. */ contained: { color: theme.palette.getContrastText(theme.palette.grey[300]), backgroundColor: theme.palette.grey[300], boxShadow: theme.shadows[2], '&$focusVisible': { boxShadow: theme.shadows[6] }, '&:active': { boxShadow: theme.shadows[8] }, '&$disabled': { color: theme.palette.action.disabled, boxShadow: theme.shadows[0], backgroundColor: theme.palette.action.disabledBackground }, '&:hover': { backgroundColor: theme.palette.grey.A100, // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: theme.palette.grey[300] }, '&$disabled': { backgroundColor: theme.palette.action.disabledBackground } } }, /* Styles applied to the root element if `variant="[contained | fab]"` and `color="primary"`. */ containedPrimary: { color: theme.palette.primary.contrastText, backgroundColor: theme.palette.primary.main, '&:hover': { backgroundColor: theme.palette.primary.dark, // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: theme.palette.primary.main } } }, /* Styles applied to the root element if `variant="[contained | fab]"` and `color="secondary"`. */ containedSecondary: { color: theme.palette.secondary.contrastText, backgroundColor: theme.palette.secondary.main, '&:hover': { backgroundColor: theme.palette.secondary.dark, // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: theme.palette.secondary.main } } }, /* Styles applied to the root element for backwards compatibility with legacy variant naming. */ raised: {}, // legacy /* Styles applied to the root element for backwards compatibility with legacy variant naming. */ raisedPrimary: {}, // legacy /* Styles applied to the root element for backwards compatibility with legacy variant naming. */ raisedSecondary: {}, // legacy /* Styles applied to the root element if `variant="[fab | extendedFab]"`. */ fab: { borderRadius: '50%', padding: 0, minWidth: 0, width: 56, height: 56, boxShadow: theme.shadows[6], '&:active': { boxShadow: theme.shadows[12] } }, /* Styles applied to the root element if `variant="extendedFab"`. */ extendedFab: { borderRadius: 48 / 2, padding: '0 16px', width: 'auto', minWidth: 48, height: 48 }, /* Styles applied to the ButtonBase root element if the button is keyboard focused. */ focusVisible: {}, /* Styles applied to the root element if `disabled={true}`. */ disabled: {}, /* Styles applied to the root element if `color="inherit"`. */ colorInherit: { color: 'inherit', borderColor: 'currentColor' }, /* Styles applied to the root element if `mini={true}` & `variant="[fab | extendedFab]"`. */ mini: { width: 40, height: 40 }, /* Styles applied to the root element if `size="small"`. */ sizeSmall: { padding: '4px 8px', minWidth: 64, fontSize: theme.typography.pxToRem(13) }, /* Styles applied to the root element if `size="large"`. */ sizeLarge: { padding: '8px 24px', fontSize: theme.typography.pxToRem(15) }, /* Styles applied to the root element if `fullWidth={true}`. */ fullWidth: { width: '100%' } }; }; exports.styles = styles; function Button(props) { var _classNames; var children = props.children, classes = props.classes, classNameProp = props.className, color = props.color, disabled = props.disabled, disableFocusRipple = props.disableFocusRipple, focusVisibleClassName = props.focusVisibleClassName, fullWidth = props.fullWidth, mini = props.mini, size = props.size, variant = props.variant, other = (0, _objectWithoutProperties2.default)(props, ["children", "classes", "className", "color", "disabled", "disableFocusRipple", "focusVisibleClassName", "fullWidth", "mini", "size", "variant"]); var fab = variant === 'fab' || variant === 'extendedFab'; var contained = variant === 'contained' || variant === 'raised'; var text = variant === 'text' || variant === 'flat'; var className = (0, _classnames.default)(classes.root, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.fab, fab), (0, _defineProperty2.default)(_classNames, classes.mini, fab && mini), (0, _defineProperty2.default)(_classNames, classes.extendedFab, variant === 'extendedFab'), (0, _defineProperty2.default)(_classNames, classes.text, text), (0, _defineProperty2.default)(_classNames, classes.textPrimary, text && color === 'primary'), (0, _defineProperty2.default)(_classNames, classes.textSecondary, text && color === 'secondary'), (0, _defineProperty2.default)(_classNames, classes.flat, text), (0, _defineProperty2.default)(_classNames, classes.flatPrimary, text && color === 'primary'), (0, _defineProperty2.default)(_classNames, classes.flatSecondary, text && color === 'secondary'), (0, _defineProperty2.default)(_classNames, classes.contained, contained || fab), (0, _defineProperty2.default)(_classNames, classes.containedPrimary, (contained || fab) && color === 'primary'), (0, _defineProperty2.default)(_classNames, classes.containedSecondary, (contained || fab) && color === 'secondary'), (0, _defineProperty2.default)(_classNames, classes.raised, contained || fab), (0, _defineProperty2.default)(_classNames, classes.raisedPrimary, (contained || fab) && color === 'primary'), (0, _defineProperty2.default)(_classNames, classes.raisedSecondary, (contained || fab) && color === 'secondary'), (0, _defineProperty2.default)(_classNames, classes.outlined, variant === 'outlined'), (0, _defineProperty2.default)(_classNames, classes.outlinedPrimary, variant === 'outlined' && color === 'primary'), (0, _defineProperty2.default)(_classNames, classes.outlinedSecondary, variant === 'outlined' && color === 'secondary'), (0, _defineProperty2.default)(_classNames, classes["size".concat((0, _helpers.capitalize)(size))], size !== 'medium'), (0, _defineProperty2.default)(_classNames, classes.disabled, disabled), (0, _defineProperty2.default)(_classNames, classes.fullWidth, fullWidth), (0, _defineProperty2.default)(_classNames, classes.colorInherit, color === 'inherit'), _classNames), classNameProp); return _react.default.createElement(_ButtonBase.default, (0, _extends2.default)({ className: className, disabled: disabled, focusRipple: !disableFocusRipple, focusVisibleClassName: (0, _classnames.default)(classes.focusVisible, focusVisibleClassName) }, other), _react.default.createElement("span", { className: classes.label }, children)); } true ? Button.propTypes = { /** * The content of the button. */ children: _propTypes.default.node.isRequired, /** * Override or extend the styles applied to the component. * See [CSS API](#css-api) below for more details. */ classes: _propTypes.default.object.isRequired, /** * @ignore */ className: _propTypes.default.string, /** * The color of the component. It supports those theme colors that make sense for this component. */ color: _propTypes.default.oneOf(['default', 'inherit', 'primary', 'secondary']), /** * The component used for the root node. * Either a string to use a DOM element or a component. */ component: _utils.componentPropType, /** * If `true`, the button will be disabled. */ disabled: _propTypes.default.bool, /** * If `true`, the keyboard focus ripple will be disabled. * `disableRipple` must also be true. */ disableFocusRipple: _propTypes.default.bool, /** * If `true`, the ripple effect will be disabled. */ disableRipple: _propTypes.default.bool, /** * @ignore */ focusVisibleClassName: _propTypes.default.string, /** * If `true`, the button will take up the full width of its container. */ fullWidth: _propTypes.default.bool, /** * The URL to link to when the button is clicked. * If defined, an `a` element will be used as the root node. */ href: _propTypes.default.string, /** * If `true`, and `variant` is `'fab'`, will use mini floating action button styling. */ mini: _propTypes.default.bool, /** * The size of the button. * `small` is equivalent to the dense button styling. */ size: _propTypes.default.oneOf(['small', 'medium', 'large']), /** * @ignore */ type: _propTypes.default.string, /** * The variant to use. * __WARNING__: `flat` and `raised` are deprecated. * Instead use `text` and `contained` respectively. * `fab` and `extendedFab` are deprecated. * Instead use `` and `` */ variant: (0, _utils.chainPropTypes)(_propTypes.default.oneOf(['text', 'outlined', 'contained', 'fab', 'extendedFab', 'flat', 'raised']), function (props) { if (props.variant === 'flat') { return new Error('Material-UI: the `flat` variant will be removed in the next major release. ' + '`text` is equivalent and should be used instead.'); } if (props.variant === 'raised') { return new Error('Material-UI: the `raised` variant will be removed in the next major release. ' + '`contained` is equivalent and should be used instead.'); } if (props.variant === 'fab') { return new Error('Material-UI: the `fab` variant will be removed in the next major release. ' + 'The `` component is equivalent and should be used instead.'); } if (props.variant === 'extendedFab') { return new Error('Material-UI: the `fab` variant will be removed in the next major release. ' + 'The `` component with `variant="extended"` is equivalent ' + 'and should be used instead.'); } return null; }) } : undefined; Button.defaultProps = { color: 'default', component: 'button', disabled: false, disableFocusRipple: false, fullWidth: false, mini: false, size: 'medium', type: 'button', variant: 'text' }; var _default = (0, _withStyles.default)(styles, { name: 'MuiButton' })(Button); exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/Button/index.js": /*!********************************************************!*\ !*** ./node_modules/@material-ui/core/Button/index.js ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function get() { return _Button.default; } }); var _Button = _interopRequireDefault(__webpack_require__(/*! ./Button */ "./node_modules/@material-ui/core/Button/Button.js")); /***/ }), /***/ "./node_modules/@material-ui/core/ButtonBase/ButtonBase.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/ButtonBase/ButtonBase.js ***! \*****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.styles = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js")); var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js")); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js")); var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); var _getPrototypeOf3 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js")); var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js")); var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _reactDom = _interopRequireDefault(__webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js")); var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js")); var _utils = __webpack_require__(/*! @material-ui/utils */ "./node_modules/@material-ui/utils/index.es.js"); var _ownerWindow = _interopRequireDefault(__webpack_require__(/*! ../utils/ownerWindow */ "./node_modules/@material-ui/core/utils/ownerWindow.js")); var _withStyles = _interopRequireDefault(__webpack_require__(/*! ../styles/withStyles */ "./node_modules/@material-ui/core/styles/withStyles.js")); var _NoSsr = _interopRequireDefault(__webpack_require__(/*! ../NoSsr */ "./node_modules/@material-ui/core/NoSsr/index.js")); var _focusVisible = __webpack_require__(/*! ./focusVisible */ "./node_modules/@material-ui/core/ButtonBase/focusVisible.js"); var _TouchRipple = _interopRequireDefault(__webpack_require__(/*! ./TouchRipple */ "./node_modules/@material-ui/core/ButtonBase/TouchRipple.js")); var _createRippleHandler = _interopRequireDefault(__webpack_require__(/*! ./createRippleHandler */ "./node_modules/@material-ui/core/ButtonBase/createRippleHandler.js")); var styles = { /* Styles applied to the root element. */ root: { display: 'inline-flex', alignItems: 'center', justifyContent: 'center', position: 'relative', // Remove grey highlight WebkitTapHighlightColor: 'transparent', backgroundColor: 'transparent', // Reset default value // We disable the focus ring for mouse, touch and keyboard users. outline: 'none', border: 0, margin: 0, // Remove the margin in Safari borderRadius: 0, padding: 0, // Remove the padding in Firefox cursor: 'pointer', userSelect: 'none', verticalAlign: 'middle', '-moz-appearance': 'none', // Reset '-webkit-appearance': 'none', // Reset textDecoration: 'none', // So we take precedent over the style of a native element. color: 'inherit', '&::-moz-focus-inner': { borderStyle: 'none' // Remove Firefox dotted outline. }, '&$disabled': { pointerEvents: 'none', // Disable link interactions cursor: 'default' } }, /* Styles applied to the root element if `disabled={true}`. */ disabled: {}, /* Styles applied to the root element if keyboard focused. */ focusVisible: {} }; /* istanbul ignore if */ exports.styles = styles; if ( true && !_react.default.createContext) { throw new Error('Material-UI: react@16.3.0 or greater is required.'); } /** * `ButtonBase` contains as few styles as possible. * It aims to be a simple building block for creating a button. * It contains a load of style reset and some focus/ripple logic. */ var ButtonBase = /*#__PURE__*/ function (_React$Component) { (0, _inherits2.default)(ButtonBase, _React$Component); function ButtonBase() { var _getPrototypeOf2; var _this; (0, _classCallCheck2.default)(this, ButtonBase); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = (0, _possibleConstructorReturn2.default)(this, (_getPrototypeOf2 = (0, _getPrototypeOf3.default)(ButtonBase)).call.apply(_getPrototypeOf2, [this].concat(args))); _this.state = {}; _this.keyDown = false; _this.focusVisibleCheckTime = 50; _this.focusVisibleMaxCheckTimes = 5; _this.handleMouseDown = (0, _createRippleHandler.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), 'MouseDown', 'start', function () { clearTimeout(_this.focusVisibleTimeout); if (_this.state.focusVisible) { _this.setState({ focusVisible: false }); } }); _this.handleMouseUp = (0, _createRippleHandler.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), 'MouseUp', 'stop'); _this.handleMouseLeave = (0, _createRippleHandler.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), 'MouseLeave', 'stop', function (event) { if (_this.state.focusVisible) { event.preventDefault(); } }); _this.handleTouchStart = (0, _createRippleHandler.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), 'TouchStart', 'start'); _this.handleTouchEnd = (0, _createRippleHandler.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), 'TouchEnd', 'stop'); _this.handleTouchMove = (0, _createRippleHandler.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), 'TouchMove', 'stop'); _this.handleContextMenu = (0, _createRippleHandler.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), 'ContextMenu', 'stop'); _this.handleBlur = (0, _createRippleHandler.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), 'Blur', 'stop', function () { clearTimeout(_this.focusVisibleTimeout); if (_this.state.focusVisible) { _this.setState({ focusVisible: false }); } }); _this.onRippleRef = function (node) { _this.ripple = node; }; _this.onFocusVisibleHandler = function (event) { _this.keyDown = false; _this.setState({ focusVisible: true }); if (_this.props.onFocusVisible) { _this.props.onFocusVisible(event); } }; _this.handleKeyDown = function (event) { var _this$props = _this.props, component = _this$props.component, focusRipple = _this$props.focusRipple, onKeyDown = _this$props.onKeyDown, onClick = _this$props.onClick; // Check if key is already down to avoid repeats being counted as multiple activations if (focusRipple && !_this.keyDown && _this.state.focusVisible && _this.ripple && event.key === ' ') { _this.keyDown = true; event.persist(); _this.ripple.stop(event, function () { _this.ripple.start(event); }); } if (onKeyDown) { onKeyDown(event); } // Keyboard accessibility for non interactive elements if (event.target === event.currentTarget && component && component !== 'button' && (event.key === ' ' || event.key === 'Enter') && !(_this.button.tagName === 'A' && _this.button.href)) { event.preventDefault(); if (onClick) { onClick(event); } } }; _this.handleKeyUp = function (event) { if (_this.props.focusRipple && event.key === ' ' && _this.ripple && _this.state.focusVisible) { _this.keyDown = false; event.persist(); _this.ripple.stop(event, function () { _this.ripple.pulsate(event); }); } if (_this.props.onKeyUp) { _this.props.onKeyUp(event); } }; _this.handleFocus = function (event) { if (_this.props.disabled) { return; } // Fix for https://github.com/facebook/react/issues/7769 if (!_this.button) { _this.button = event.currentTarget; } event.persist(); (0, _focusVisible.detectFocusVisible)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), _this.button, function () { _this.onFocusVisibleHandler(event); }); if (_this.props.onFocus) { _this.props.onFocus(event); } }; return _this; } (0, _createClass2.default)(ButtonBase, [{ key: "componentDidMount", value: function componentDidMount() { var _this2 = this; this.button = _reactDom.default.findDOMNode(this); (0, _focusVisible.listenForFocusKeys)((0, _ownerWindow.default)(this.button)); if (this.props.action) { this.props.action({ focusVisible: function focusVisible() { _this2.setState({ focusVisible: true }); _this2.button.focus(); } }); } } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps, prevState) { if (this.props.focusRipple && !this.props.disableRipple && !prevState.focusVisible && this.state.focusVisible) { this.ripple.pulsate(); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { clearTimeout(this.focusVisibleTimeout); } }, { key: "render", value: function render() { var _classNames; var _this$props2 = this.props, action = _this$props2.action, buttonRef = _this$props2.buttonRef, centerRipple = _this$props2.centerRipple, children = _this$props2.children, classes = _this$props2.classes, classNameProp = _this$props2.className, component = _this$props2.component, disabled = _this$props2.disabled, disableRipple = _this$props2.disableRipple, disableTouchRipple = _this$props2.disableTouchRipple, focusRipple = _this$props2.focusRipple, focusVisibleClassName = _this$props2.focusVisibleClassName, onBlur = _this$props2.onBlur, onFocus = _this$props2.onFocus, onFocusVisible = _this$props2.onFocusVisible, onKeyDown = _this$props2.onKeyDown, onKeyUp = _this$props2.onKeyUp, onMouseDown = _this$props2.onMouseDown, onMouseLeave = _this$props2.onMouseLeave, onMouseUp = _this$props2.onMouseUp, onTouchEnd = _this$props2.onTouchEnd, onTouchMove = _this$props2.onTouchMove, onTouchStart = _this$props2.onTouchStart, tabIndex = _this$props2.tabIndex, TouchRippleProps = _this$props2.TouchRippleProps, type = _this$props2.type, other = (0, _objectWithoutProperties2.default)(_this$props2, ["action", "buttonRef", "centerRipple", "children", "classes", "className", "component", "disabled", "disableRipple", "disableTouchRipple", "focusRipple", "focusVisibleClassName", "onBlur", "onFocus", "onFocusVisible", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseLeave", "onMouseUp", "onTouchEnd", "onTouchMove", "onTouchStart", "tabIndex", "TouchRippleProps", "type"]); var className = (0, _classnames.default)(classes.root, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.disabled, disabled), (0, _defineProperty2.default)(_classNames, classes.focusVisible, this.state.focusVisible), (0, _defineProperty2.default)(_classNames, focusVisibleClassName, this.state.focusVisible), _classNames), classNameProp); var ComponentProp = component; if (ComponentProp === 'button' && other.href) { ComponentProp = 'a'; } var buttonProps = {}; if (ComponentProp === 'button') { buttonProps.type = type || 'button'; buttonProps.disabled = disabled; } else { buttonProps.role = 'button'; } return _react.default.createElement(ComponentProp, (0, _extends2.default)({ className: className, onBlur: this.handleBlur, onFocus: this.handleFocus, onKeyDown: this.handleKeyDown, onKeyUp: this.handleKeyUp, onMouseDown: this.handleMouseDown, onMouseLeave: this.handleMouseLeave, onMouseUp: this.handleMouseUp, onTouchEnd: this.handleTouchEnd, onTouchMove: this.handleTouchMove, onTouchStart: this.handleTouchStart, onContextMenu: this.handleContextMenu, ref: buttonRef, tabIndex: disabled ? '-1' : tabIndex }, buttonProps, other), children, !disableRipple && !disabled ? _react.default.createElement(_NoSsr.default, null, _react.default.createElement(_TouchRipple.default, (0, _extends2.default)({ innerRef: this.onRippleRef, center: centerRipple }, TouchRippleProps))) : null); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps, prevState) { if (typeof prevState.focusVisible === 'undefined') { return { focusVisible: false, lastDisabled: nextProps.disabled }; } // The blur won't fire when the disabled state is set on a focused input. // We need to book keep the focused state manually. if (!prevState.prevState && nextProps.disabled && prevState.focusVisible) { return { focusVisible: false, lastDisabled: nextProps.disabled }; } return { lastDisabled: nextProps.disabled }; } }]); return ButtonBase; }(_react.default.Component); true ? ButtonBase.propTypes = { /** * Callback fired when the component mounts. * This is useful when you want to trigger an action programmatically. * It currently only supports `focusVisible()` action. * * @param {object} actions This object contains all possible actions * that can be triggered programmatically. */ action: _propTypes.default.func, /** * Use that property to pass a ref callback to the native button component. */ buttonRef: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]), /** * If `true`, the ripples will be centered. * They won't start at the cursor interaction position. */ centerRipple: _propTypes.default.bool, /** * The content of the component. */ children: _propTypes.default.node, /** * Override or extend the styles applied to the component. * See [CSS API](#css-api) below for more details. */ classes: _propTypes.default.object.isRequired, /** * @ignore */ className: _propTypes.default.string, /** * The component used for the root node. * Either a string to use a DOM element or a component. */ component: _utils.componentPropType, /** * If `true`, the base button will be disabled. */ disabled: _propTypes.default.bool, /** * If `true`, the ripple effect will be disabled. */ disableRipple: _propTypes.default.bool, /** * If `true`, the touch ripple effect will be disabled. */ disableTouchRipple: _propTypes.default.bool, /** * If `true`, the base button will have a keyboard focus ripple. * `disableRipple` must also be `false`. */ focusRipple: _propTypes.default.bool, /** * This property can help a person know which element has the keyboard focus. * The class name will be applied when the element gain the focus through a keyboard interaction. * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo). * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/master/explainer.md). * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components * if needed. */ focusVisibleClassName: _propTypes.default.string, /** * @ignore */ onBlur: _propTypes.default.func, /** * @ignore */ onClick: _propTypes.default.func, /** * @ignore */ onFocus: _propTypes.default.func, /** * Callback fired when the component is focused with a keyboard. * We trigger a `onFocus` callback too. */ onFocusVisible: _propTypes.default.func, /** * @ignore */ onKeyDown: _propTypes.default.func, /** * @ignore */ onKeyUp: _propTypes.default.func, /** * @ignore */ onMouseDown: _propTypes.default.func, /** * @ignore */ onMouseLeave: _propTypes.default.func, /** * @ignore */ onMouseUp: _propTypes.default.func, /** * @ignore */ onTouchEnd: _propTypes.default.func, /** * @ignore */ onTouchMove: _propTypes.default.func, /** * @ignore */ onTouchStart: _propTypes.default.func, /** * @ignore */ role: _propTypes.default.string, /** * @ignore */ tabIndex: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]), /** * Properties applied to the `TouchRipple` element. */ TouchRippleProps: _propTypes.default.object, /** * Used to control the button's purpose. * This property passes the value to the `type` attribute of the native button component. * Valid property values include `button`, `submit`, and `reset`. */ type: _propTypes.default.string } : undefined; ButtonBase.defaultProps = { centerRipple: false, component: 'button', disableRipple: false, disableTouchRipple: false, focusRipple: false, tabIndex: '0', type: 'button' }; var _default = (0, _withStyles.default)(styles, { name: 'MuiButtonBase' })(ButtonBase); exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/ButtonBase/Ripple.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/ButtonBase/Ripple.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js")); var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js")); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js")); var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); var _getPrototypeOf3 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js")); var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js")); var _Transition = _interopRequireDefault(__webpack_require__(/*! react-transition-group/Transition */ "./node_modules/react-transition-group/Transition.js")); /** * @ignore - internal component. */ var Ripple = /*#__PURE__*/ function (_React$Component) { (0, _inherits2.default)(Ripple, _React$Component); function Ripple() { var _getPrototypeOf2; var _this; (0, _classCallCheck2.default)(this, Ripple); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = (0, _possibleConstructorReturn2.default)(this, (_getPrototypeOf2 = (0, _getPrototypeOf3.default)(Ripple)).call.apply(_getPrototypeOf2, [this].concat(args))); _this.state = { visible: false, leaving: false }; _this.handleEnter = function () { _this.setState({ visible: true }); }; _this.handleExit = function () { _this.setState({ leaving: true }); }; return _this; } (0, _createClass2.default)(Ripple, [{ key: "render", value: function render() { var _classNames, _classNames2; var _this$props = this.props, classes = _this$props.classes, classNameProp = _this$props.className, pulsate = _this$props.pulsate, rippleX = _this$props.rippleX, rippleY = _this$props.rippleY, rippleSize = _this$props.rippleSize, other = (0, _objectWithoutProperties2.default)(_this$props, ["classes", "className", "pulsate", "rippleX", "rippleY", "rippleSize"]); var _this$state = this.state, visible = _this$state.visible, leaving = _this$state.leaving; var rippleClassName = (0, _classnames.default)(classes.ripple, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.rippleVisible, visible), (0, _defineProperty2.default)(_classNames, classes.ripplePulsate, pulsate), _classNames), classNameProp); var rippleStyles = { width: rippleSize, height: rippleSize, top: -(rippleSize / 2) + rippleY, left: -(rippleSize / 2) + rippleX }; var childClassName = (0, _classnames.default)(classes.child, (_classNames2 = {}, (0, _defineProperty2.default)(_classNames2, classes.childLeaving, leaving), (0, _defineProperty2.default)(_classNames2, classes.childPulsate, pulsate), _classNames2)); return _react.default.createElement(_Transition.default, (0, _extends2.default)({ onEnter: this.handleEnter, onExit: this.handleExit }, other), _react.default.createElement("span", { className: rippleClassName, style: rippleStyles }, _react.default.createElement("span", { className: childClassName }))); } }]); return Ripple; }(_react.default.Component); true ? Ripple.propTypes = { /** * Override or extend the styles applied to the component. * See [CSS API](#css-api) below for more details. */ classes: _propTypes.default.object.isRequired, /** * @ignore */ className: _propTypes.default.string, /** * If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element. */ pulsate: _propTypes.default.bool, /** * Diameter of the ripple. */ rippleSize: _propTypes.default.number, /** * Horizontal position of the ripple center. */ rippleX: _propTypes.default.number, /** * Vertical position of the ripple center. */ rippleY: _propTypes.default.number } : undefined; Ripple.defaultProps = { pulsate: false }; var _default = Ripple; exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/ButtonBase/TouchRipple.js": /*!******************************************************************!*\ !*** ./node_modules/@material-ui/core/ButtonBase/TouchRipple.js ***! \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.styles = exports.DELAY_RIPPLE = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js")); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js")); var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/toConsumableArray.js")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js")); var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); var _getPrototypeOf3 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js")); var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js")); var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _reactDom = _interopRequireDefault(__webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js")); var _TransitionGroup = _interopRequireDefault(__webpack_require__(/*! react-transition-group/TransitionGroup */ "./node_modules/react-transition-group/TransitionGroup.js")); var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js")); var _withStyles = _interopRequireDefault(__webpack_require__(/*! ../styles/withStyles */ "./node_modules/@material-ui/core/styles/withStyles.js")); var _Ripple = _interopRequireDefault(__webpack_require__(/*! ./Ripple */ "./node_modules/@material-ui/core/ButtonBase/Ripple.js")); var DURATION = 550; var DELAY_RIPPLE = 80; exports.DELAY_RIPPLE = DELAY_RIPPLE; var styles = function styles(theme) { return { /* Styles applied to the root element. */ root: { display: 'block', position: 'absolute', overflow: 'hidden', borderRadius: 'inherit', width: '100%', height: '100%', left: 0, top: 0, pointerEvents: 'none', zIndex: 0 }, /* Styles applied to the internal `Ripple` components `ripple` class. */ ripple: { width: 50, height: 50, left: 0, top: 0, opacity: 0, position: 'absolute' }, /* Styles applied to the internal `Ripple` components `rippleVisible` class. */ rippleVisible: { opacity: 0.3, transform: 'scale(1)', animation: "mui-ripple-enter ".concat(DURATION, "ms ").concat(theme.transitions.easing.easeInOut), // Backward compatible logic between JSS v9 and v10. // To remove with the release of Material-UI v4 animationName: '$mui-ripple-enter' }, /* Styles applied to the internal `Ripple` components `ripplePulsate` class. */ ripplePulsate: { animationDuration: "".concat(theme.transitions.duration.shorter, "ms") }, /* Styles applied to the internal `Ripple` components `child` class. */ child: { opacity: 1, display: 'block', width: '100%', height: '100%', borderRadius: '50%', backgroundColor: 'currentColor' }, /* Styles applied to the internal `Ripple` components `childLeaving` class. */ childLeaving: { opacity: 0, animation: "mui-ripple-exit ".concat(DURATION, "ms ").concat(theme.transitions.easing.easeInOut), // Backward compatible logic between JSS v9 and v10. // To remove with the release of Material-UI v4 animationName: '$mui-ripple-exit' }, /* Styles applied to the internal `Ripple` components `childPulsate` class. */ childPulsate: { position: 'absolute', left: 0, top: 0, animation: "mui-ripple-pulsate 2500ms ".concat(theme.transitions.easing.easeInOut, " 200ms infinite"), // Backward compatible logic between JSS v9 and v10. // To remove with the release of Material-UI v4 animationName: '$mui-ripple-pulsate' }, '@keyframes mui-ripple-enter': { '0%': { transform: 'scale(0)', opacity: 0.1 }, '100%': { transform: 'scale(1)', opacity: 0.3 } }, '@keyframes mui-ripple-exit': { '0%': { opacity: 1 }, '100%': { opacity: 0 } }, '@keyframes mui-ripple-pulsate': { '0%': { transform: 'scale(1)' }, '50%': { transform: 'scale(0.92)' }, '100%': { transform: 'scale(1)' } } }; }; exports.styles = styles; var TouchRipple = /*#__PURE__*/ function (_React$PureComponent) { (0, _inherits2.default)(TouchRipple, _React$PureComponent); function TouchRipple() { var _getPrototypeOf2; var _this; (0, _classCallCheck2.default)(this, TouchRipple); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = (0, _possibleConstructorReturn2.default)(this, (_getPrototypeOf2 = (0, _getPrototypeOf3.default)(TouchRipple)).call.apply(_getPrototypeOf2, [this].concat(args))); _this.state = { nextKey: 0, ripples: [] }; _this.pulsate = function () { _this.start({}, { pulsate: true }); }; _this.start = function () { var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var cb = arguments.length > 2 ? arguments[2] : undefined; var _options$pulsate = options.pulsate, pulsate = _options$pulsate === void 0 ? false : _options$pulsate, _options$center = options.center, center = _options$center === void 0 ? _this.props.center || options.pulsate : _options$center, _options$fakeElement = options.fakeElement, fakeElement = _options$fakeElement === void 0 ? false : _options$fakeElement; if (event.type === 'mousedown' && _this.ignoringMouseDown) { _this.ignoringMouseDown = false; return; } if (event.type === 'touchstart') { _this.ignoringMouseDown = true; } var element = fakeElement ? null : _reactDom.default.findDOMNode((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this))); var rect = element ? element.getBoundingClientRect() : { width: 0, height: 0, left: 0, top: 0 }; // Get the size of the ripple var rippleX; var rippleY; var rippleSize; if (center || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) { rippleX = Math.round(rect.width / 2); rippleY = Math.round(rect.height / 2); } else { var clientX = event.clientX ? event.clientX : event.touches[0].clientX; var clientY = event.clientY ? event.clientY : event.touches[0].clientY; rippleX = Math.round(clientX - rect.left); rippleY = Math.round(clientY - rect.top); } if (center) { rippleSize = Math.sqrt((2 * Math.pow(rect.width, 2) + Math.pow(rect.height, 2)) / 3); // For some reason the animation is broken on Mobile Chrome if the size if even. if (rippleSize % 2 === 0) { rippleSize += 1; } } else { var sizeX = Math.max(Math.abs((element ? element.clientWidth : 0) - rippleX), rippleX) * 2 + 2; var sizeY = Math.max(Math.abs((element ? element.clientHeight : 0) - rippleY), rippleY) * 2 + 2; rippleSize = Math.sqrt(Math.pow(sizeX, 2) + Math.pow(sizeY, 2)); } // Touche devices if (event.touches) { // Prepare the ripple effect. _this.startTimerCommit = function () { _this.startCommit({ pulsate: pulsate, rippleX: rippleX, rippleY: rippleY, rippleSize: rippleSize, cb: cb }); }; // Delay the execution of the ripple effect. _this.startTimer = setTimeout(function () { if (_this.startTimerCommit) { _this.startTimerCommit(); _this.startTimerCommit = null; } }, DELAY_RIPPLE); // We have to make a tradeoff with this value. } else { _this.startCommit({ pulsate: pulsate, rippleX: rippleX, rippleY: rippleY, rippleSize: rippleSize, cb: cb }); } }; _this.startCommit = function (params) { var pulsate = params.pulsate, rippleX = params.rippleX, rippleY = params.rippleY, rippleSize = params.rippleSize, cb = params.cb; _this.setState(function (state) { return { nextKey: state.nextKey + 1, ripples: [].concat((0, _toConsumableArray2.default)(state.ripples), [_react.default.createElement(_Ripple.default, { key: state.nextKey, classes: _this.props.classes, timeout: { exit: DURATION, enter: DURATION }, pulsate: pulsate, rippleX: rippleX, rippleY: rippleY, rippleSize: rippleSize })]) }; }, cb); }; _this.stop = function (event, cb) { clearTimeout(_this.startTimer); var ripples = _this.state.ripples; // The touch interaction occurs too quickly. // We still want to show ripple effect. if (event.type === 'touchend' && _this.startTimerCommit) { event.persist(); _this.startTimerCommit(); _this.startTimerCommit = null; _this.startTimer = setTimeout(function () { _this.stop(event, cb); }); return; } _this.startTimerCommit = null; if (ripples && ripples.length) { _this.setState({ ripples: ripples.slice(1) }, cb); } }; return _this; } (0, _createClass2.default)(TouchRipple, [{ key: "componentWillUnmount", value: function componentWillUnmount() { clearTimeout(this.startTimer); } }, { key: "render", value: function render() { var _this$props = this.props, center = _this$props.center, classes = _this$props.classes, className = _this$props.className, other = (0, _objectWithoutProperties2.default)(_this$props, ["center", "classes", "className"]); return _react.default.createElement(_TransitionGroup.default, (0, _extends2.default)({ component: "span", enter: true, exit: true, className: (0, _classnames.default)(classes.root, className) }, other), this.state.ripples); } }]); return TouchRipple; }(_react.default.PureComponent); true ? TouchRipple.propTypes = { /** * If `true`, the ripple starts at the center of the component * rather than at the point of interaction. */ center: _propTypes.default.bool, /** * Override or extend the styles applied to the component. * See [CSS API](#css-api) below for more details. */ classes: _propTypes.default.object.isRequired, /** * @ignore */ className: _propTypes.default.string } : undefined; TouchRipple.defaultProps = { center: false }; var _default = (0, _withStyles.default)(styles, { flip: false, name: 'MuiTouchRipple' })(TouchRipple); exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/ButtonBase/createRippleHandler.js": /*!**************************************************************************!*\ !*** ./node_modules/@material-ui/core/ButtonBase/createRippleHandler.js ***! \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; /* eslint-disable import/no-mutable-exports */ var createRippleHandler = function createRippleHandler(instance, eventName, action, cb) { return function (event) { if (cb) { cb.call(instance, event); } var ignore = false; // Ignore events that have been `event.preventDefault()` marked. if (event.defaultPrevented) { ignore = true; } if (instance.props.disableTouchRipple && eventName !== 'Blur') { ignore = true; } if (!ignore && instance.ripple) { instance.ripple[action](event); } if (typeof instance.props["on".concat(eventName)] === 'function') { instance.props["on".concat(eventName)](event); } return true; }; }; /* istanbul ignore if */ if (typeof window === 'undefined') { createRippleHandler = function createRippleHandler() { return function () {}; }; } var _default = createRippleHandler; exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/ButtonBase/focusVisible.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/ButtonBase/focusVisible.js ***! \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.detectFocusVisible = detectFocusVisible; exports.listenForFocusKeys = listenForFocusKeys; var _warning = _interopRequireDefault(__webpack_require__(/*! warning */ "./node_modules/warning/warning.js")); var _ownerDocument = _interopRequireDefault(__webpack_require__(/*! ../utils/ownerDocument */ "./node_modules/@material-ui/core/utils/ownerDocument.js")); var internal = { focusKeyPressed: false, keyUpEventTimeout: -1 }; function findActiveElement(doc) { var activeElement = doc.activeElement; while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement) { activeElement = activeElement.shadowRoot.activeElement; } return activeElement; } function detectFocusVisible(instance, element, callback) { var attempt = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1; true ? (0, _warning.default)(instance.focusVisibleCheckTime, 'Material-UI: missing instance.focusVisibleCheckTime.') : undefined; true ? (0, _warning.default)(instance.focusVisibleMaxCheckTimes, 'Material-UI: missing instance.focusVisibleMaxCheckTimes.') : undefined; instance.focusVisibleTimeout = setTimeout(function () { var doc = (0, _ownerDocument.default)(element); var activeElement = findActiveElement(doc); if (internal.focusKeyPressed && (activeElement === element || element.contains(activeElement))) { callback(); } else if (attempt < instance.focusVisibleMaxCheckTimes) { detectFocusVisible(instance, element, callback, attempt + 1); } }, instance.focusVisibleCheckTime); } var FOCUS_KEYS = [9, // 'Tab', 13, // 'Enter', 27, // 'Escape', 32, // ' ', 37, // 'ArrowLeft', 38, // 'ArrowUp', 39, // 'ArrowRight', 40]; function isFocusKey(event) { // Use event.keyCode to support IE 11 return FOCUS_KEYS.indexOf(event.keyCode) > -1; } var handleKeyUpEvent = function handleKeyUpEvent(event) { if (isFocusKey(event)) { internal.focusKeyPressed = true; // Let's consider that the user is using a keyboard during a window frame of 500ms. clearTimeout(internal.keyUpEventTimeout); internal.keyUpEventTimeout = setTimeout(function () { internal.focusKeyPressed = false; }, 500); } }; function listenForFocusKeys(win) { // The event listener will only be added once per window. // Duplicate event listeners will be ignored by addEventListener. // Also, this logic is client side only, we don't need a teardown. win.addEventListener('keyup', handleKeyUpEvent); } /***/ }), /***/ "./node_modules/@material-ui/core/ButtonBase/index.js": /*!************************************************************!*\ !*** ./node_modules/@material-ui/core/ButtonBase/index.js ***! \************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function get() { return _ButtonBase.default; } }); var _ButtonBase = _interopRequireDefault(__webpack_require__(/*! ./ButtonBase */ "./node_modules/@material-ui/core/ButtonBase/ButtonBase.js")); /***/ }), /***/ "./node_modules/@material-ui/core/CssBaseline/CssBaseline.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/CssBaseline/CssBaseline.js ***! \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js")); var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js")); var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _styles = __webpack_require__(/*! ../styles */ "./node_modules/@material-ui/core/styles/index.js"); var _utils = __webpack_require__(/*! @material-ui/utils */ "./node_modules/@material-ui/utils/index.es.js"); /* eslint-disable react/no-unused-prop-types */ var styles = function styles(theme) { return { '@global': { html: { WebkitFontSmoothing: 'antialiased', // Antialiasing. MozOsxFontSmoothing: 'grayscale', // Antialiasing. // Change from `box-sizing: content-box` so that `width` // is not affected by `padding` or `border`. boxSizing: 'border-box' }, '*, *::before, *::after': { boxSizing: 'inherit' }, body: { margin: 0, // Remove the margin in all browsers. backgroundColor: theme.palette.background.default, '@media print': { // Save printer ink. backgroundColor: theme.palette.common.white } } } }; }; /** * Kickstart an elegant, consistent, and simple baseline to build upon. */ var CssBaseline = /*#__PURE__*/ function (_React$Component) { (0, _inherits2.default)(CssBaseline, _React$Component); function CssBaseline() { (0, _classCallCheck2.default)(this, CssBaseline); return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(CssBaseline).apply(this, arguments)); } (0, _createClass2.default)(CssBaseline, [{ key: "render", value: function render() { return this.props.children; } }]); return CssBaseline; }(_react.default.Component); true ? CssBaseline.propTypes = { /** * You can wrap a node. */ children: _propTypes.default.node, /** * @ignore */ classes: _propTypes.default.object.isRequired } : undefined; if (true) { true ? CssBaseline.propTypes = (0, _utils.exactProp)(CssBaseline.propTypes) : undefined; } CssBaseline.defaultProps = { children: null }; var _default = (0, _styles.withStyles)(styles, { name: 'MuiCssBaseline' })(CssBaseline); exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/CssBaseline/index.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/CssBaseline/index.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function get() { return _CssBaseline.default; } }); var _CssBaseline = _interopRequireDefault(__webpack_require__(/*! ./CssBaseline */ "./node_modules/@material-ui/core/CssBaseline/CssBaseline.js")); /***/ }), /***/ "./node_modules/@material-ui/core/Fade/Fade.js": /*!*****************************************************!*\ !*** ./node_modules/@material-ui/core/Fade/Fade.js ***! \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js")); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js")); var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); var _getPrototypeOf3 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js")); var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _Transition = _interopRequireDefault(__webpack_require__(/*! react-transition-group/Transition */ "./node_modules/react-transition-group/Transition.js")); var _transitions = __webpack_require__(/*! ../styles/transitions */ "./node_modules/@material-ui/core/styles/transitions.js"); var _withTheme = _interopRequireDefault(__webpack_require__(/*! ../styles/withTheme */ "./node_modules/@material-ui/core/styles/withTheme.js")); var _utils = __webpack_require__(/*! ../transitions/utils */ "./node_modules/@material-ui/core/transitions/utils.js"); // @inheritedComponent Transition var styles = { entering: { opacity: 1 }, entered: { opacity: 1 } }; /** * The Fade transition is used by the [Modal](/utils/modal/) component. * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally. */ var Fade = /*#__PURE__*/ function (_React$Component) { (0, _inherits2.default)(Fade, _React$Component); function Fade() { var _getPrototypeOf2; var _this; (0, _classCallCheck2.default)(this, Fade); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = (0, _possibleConstructorReturn2.default)(this, (_getPrototypeOf2 = (0, _getPrototypeOf3.default)(Fade)).call.apply(_getPrototypeOf2, [this].concat(args))); _this.handleEnter = function (node) { var theme = _this.props.theme; (0, _utils.reflow)(node); // So the animation always start from the start. var transitionProps = (0, _utils.getTransitionProps)(_this.props, { mode: 'enter' }); node.style.webkitTransition = theme.transitions.create('opacity', transitionProps); node.style.transition = theme.transitions.create('opacity', transitionProps); if (_this.props.onEnter) { _this.props.onEnter(node); } }; _this.handleExit = function (node) { var theme = _this.props.theme; var transitionProps = (0, _utils.getTransitionProps)(_this.props, { mode: 'exit' }); node.style.webkitTransition = theme.transitions.create('opacity', transitionProps); node.style.transition = theme.transitions.create('opacity', transitionProps); if (_this.props.onExit) { _this.props.onExit(node); } }; return _this; } (0, _createClass2.default)(Fade, [{ key: "render", value: function render() { var _this$props = this.props, children = _this$props.children, onEnter = _this$props.onEnter, onExit = _this$props.onExit, styleProp = _this$props.style, theme = _this$props.theme, other = (0, _objectWithoutProperties2.default)(_this$props, ["children", "onEnter", "onExit", "style", "theme"]); var style = (0, _extends2.default)({}, styleProp, _react.default.isValidElement(children) ? children.props.style : {}); return _react.default.createElement(_Transition.default, (0, _extends2.default)({ appear: true, onEnter: this.handleEnter, onExit: this.handleExit }, other), function (state, childProps) { return _react.default.cloneElement(children, (0, _extends2.default)({ style: (0, _extends2.default)({ opacity: 0 }, styles[state], style) }, childProps)); }); } }]); return Fade; }(_react.default.Component); true ? Fade.propTypes = { /** * A single child content element. */ children: _propTypes.default.oneOfType([_propTypes.default.element, _propTypes.default.func]), /** * If `true`, the component will transition in. */ in: _propTypes.default.bool, /** * @ignore */ onEnter: _propTypes.default.func, /** * @ignore */ onExit: _propTypes.default.func, /** * @ignore */ style: _propTypes.default.object, /** * @ignore */ theme: _propTypes.default.object.isRequired, /** * The duration for the transition, in milliseconds. * You may specify a single timeout for all transitions, or individually with an object. */ timeout: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({ enter: _propTypes.default.number, exit: _propTypes.default.number })]) } : undefined; Fade.defaultProps = { timeout: { enter: _transitions.duration.enteringScreen, exit: _transitions.duration.leavingScreen } }; var _default = (0, _withTheme.default)()(Fade); exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/Fade/index.js": /*!******************************************************!*\ !*** ./node_modules/@material-ui/core/Fade/index.js ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function get() { return _Fade.default; } }); var _Fade = _interopRequireDefault(__webpack_require__(/*! ./Fade */ "./node_modules/@material-ui/core/Fade/Fade.js")); /***/ }), /***/ "./node_modules/@material-ui/core/FilledInput/FilledInput.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/FilledInput/FilledInput.js ***! \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.styles = void 0; var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js")); var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js")); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js")); var _utils = __webpack_require__(/*! @material-ui/utils */ "./node_modules/@material-ui/utils/index.es.js"); var _InputBase = _interopRequireDefault(__webpack_require__(/*! ../InputBase */ "./node_modules/@material-ui/core/InputBase/index.js")); var _withStyles = _interopRequireDefault(__webpack_require__(/*! ../styles/withStyles */ "./node_modules/@material-ui/core/styles/withStyles.js")); // @inheritedComponent InputBase var styles = function styles(theme) { var light = theme.palette.type === 'light'; var bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)'; var backgroundColor = light ? 'rgba(0, 0, 0, 0.09)' : 'rgba(255, 255, 255, 0.09)'; return { /* Styles applied to the root element. */ root: { position: 'relative', backgroundColor: backgroundColor, borderTopLeftRadius: theme.shape.borderRadius, borderTopRightRadius: theme.shape.borderRadius, transition: theme.transitions.create('background-color', { duration: theme.transitions.duration.shorter, easing: theme.transitions.easing.easeOut }), '&:hover': { backgroundColor: light ? 'rgba(0, 0, 0, 0.13)' : 'rgba(255, 255, 255, 0.13)', // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: backgroundColor } }, '&$focused': { backgroundColor: light ? 'rgba(0, 0, 0, 0.09)' : 'rgba(255, 255, 255, 0.09)' }, '&$disabled': { backgroundColor: light ? 'rgba(0, 0, 0, 0.12)' : 'rgba(255, 255, 255, 0.12)' } }, /* Styles applied to the root element if `disableUnderline={false}`. */ underline: { '&:after': { borderBottom: "2px solid ".concat(theme.palette.primary[light ? 'dark' : 'light']), left: 0, bottom: 0, // Doing the other way around crash on IE 11 "''" https://github.com/cssinjs/jss/issues/242 content: '""', position: 'absolute', right: 0, transform: 'scaleX(0)', transition: theme.transitions.create('transform', { duration: theme.transitions.duration.shorter, easing: theme.transitions.easing.easeOut }), pointerEvents: 'none' // Transparent to the hover style. }, '&$focused:after': { transform: 'scaleX(1)' }, '&$error:after': { borderBottomColor: theme.palette.error.main, transform: 'scaleX(1)' // error is always underlined in red }, '&:before': { borderBottom: "1px solid ".concat(bottomLineColor), left: 0, bottom: 0, // Doing the other way around crash on IE 11 "''" https://github.com/cssinjs/jss/issues/242 content: '"\\00a0"', position: 'absolute', right: 0, transition: theme.transitions.create('border-bottom-color', { duration: theme.transitions.duration.shorter }), pointerEvents: 'none' // Transparent to the hover style. }, '&:hover:not($disabled):not($focused):not($error):before': { borderBottom: "1px solid ".concat(theme.palette.text.primary) }, '&$disabled:before': { borderBottom: "1px dotted ".concat(bottomLineColor) } }, /* Styles applied to the root element if the component is focused. */ focused: {}, /* Styles applied to the root element if `disabled={true}`. */ disabled: {}, /* Styles applied to the root element if `startAdornment` is provided. */ adornedStart: { paddingLeft: 12 }, /* Styles applied to the root element if `endAdornment` is provided. */ adornedEnd: { paddingRight: 12 }, /* Styles applied to the root element if `error={true}`. */ error: {}, /* Styles applied to the root element if `multiline={true}`. */ multiline: { padding: '27px 12px 10px', boxSizing: 'border-box' // Prevent padding issue with fullWidth. }, /* Styles applied to the `input` element. */ input: { padding: '27px 12px 10px' }, /* Styles applied to the `input` element if `margin="dense"`. */ inputMarginDense: { paddingTop: 24, paddingBottom: 6 }, /* Styles applied to the `input` element if `multiline={true}`. */ inputMultiline: { padding: 0 }, /* Styles applied to the `input` element if `startAdornment` is provided. */ inputAdornedStart: { paddingLeft: 0 }, /* Styles applied to the `input` element if `endAdornment` is provided. */ inputAdornedEnd: { paddingRight: 0 } }; }; exports.styles = styles; function FilledInput(props) { var disableUnderline = props.disableUnderline, classes = props.classes, other = (0, _objectWithoutProperties2.default)(props, ["disableUnderline", "classes"]); return _react.default.createElement(_InputBase.default, (0, _extends2.default)({ classes: (0, _extends2.default)({}, classes, { root: (0, _classnames.default)(classes.root, (0, _defineProperty2.default)({}, classes.underline, !disableUnderline)), underline: null }) }, other)); } true ? FilledInput.propTypes = { /** * This property helps users to fill forms faster, especially on mobile devices. * The name can be confusing, as it's more like an autofill. * You can learn more about it here: * https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill */ autoComplete: _propTypes.default.string, /** * If `true`, the input will be focused during the first mount. */ autoFocus: _propTypes.default.bool, /** * Override or extend the styles applied to the component. * See [CSS API](#css-api) below for more details. */ classes: _propTypes.default.object.isRequired, /** * The CSS class name of the wrapper element. */ className: _propTypes.default.string, /** * The default input value, useful when not controlling the component. */ defaultValue: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool, _propTypes.default.object, _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool, _propTypes.default.object]))]), /** * If `true`, the input will be disabled. */ disabled: _propTypes.default.bool, /** * If `true`, the input will not have an underline. */ disableUnderline: _propTypes.default.bool, /** * End `InputAdornment` for this component. */ endAdornment: _propTypes.default.node, /** * If `true`, the input will indicate an error. This is normally obtained via context from * FormControl. */ error: _propTypes.default.bool, /** * If `true`, the input will take up the full width of its container. */ fullWidth: _propTypes.default.bool, /** * The id of the `input` element. */ id: _propTypes.default.string, /** * The component used for the native input. * Either a string to use a DOM element or a component. */ inputComponent: _utils.componentPropType, /** * Attributes applied to the `input` element. */ inputProps: _propTypes.default.object, /** * Use that property to pass a ref callback to the native input component. */ inputRef: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]), /** * If `dense`, will adjust vertical spacing. This is normally obtained via context from * FormControl. */ margin: _propTypes.default.oneOf(['dense', 'none']), /** * If `true`, a textarea element will be rendered. */ multiline: _propTypes.default.bool, /** * Name attribute of the `input` element. */ name: _propTypes.default.string, /** * Callback fired when the value is changed. * * @param {object} event The event source of the callback. * You can pull out the new value by accessing `event.target.value`. */ onChange: _propTypes.default.func, /** * The short hint displayed in the input before the user enters a value. */ placeholder: _propTypes.default.string, /** * It prevents the user from changing the value of the field * (not from interacting with the field). */ readOnly: _propTypes.default.bool, /** * If `true`, the input will be required. */ required: _propTypes.default.bool, /** * Number of rows to display when multiline option is set to true. */ rows: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]), /** * Maximum number of rows to display when multiline option is set to true. */ rowsMax: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]), /** * Start `InputAdornment` for this component. */ startAdornment: _propTypes.default.node, /** * Type of the input element. It should be a valid HTML5 input type. */ type: _propTypes.default.string, /** * The input value, required for a controlled component. */ value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool, _propTypes.default.object, _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool, _propTypes.default.object]))]) } : undefined; _InputBase.default.defaultProps = { fullWidth: false, inputComponent: 'input', multiline: false, type: 'text' }; FilledInput.muiName = 'Input'; var _default = (0, _withStyles.default)(styles, { name: 'MuiFilledInput' })(FilledInput); exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/FilledInput/index.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/FilledInput/index.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function get() { return _FilledInput.default; } }); var _FilledInput = _interopRequireDefault(__webpack_require__(/*! ./FilledInput */ "./node_modules/@material-ui/core/FilledInput/FilledInput.js")); /***/ }), /***/ "./node_modules/@material-ui/core/FormControl/FormControl.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/FormControl/FormControl.js ***! \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.styles = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js")); var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js")); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js")); var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js")); var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js")); var _utils = __webpack_require__(/*! @material-ui/utils */ "./node_modules/@material-ui/utils/index.es.js"); var _utils2 = __webpack_require__(/*! ../InputBase/utils */ "./node_modules/@material-ui/core/InputBase/utils.js"); var _withStyles = _interopRequireDefault(__webpack_require__(/*! ../styles/withStyles */ "./node_modules/@material-ui/core/styles/withStyles.js")); var _helpers = __webpack_require__(/*! ../utils/helpers */ "./node_modules/@material-ui/core/utils/helpers.js"); var _reactHelpers = __webpack_require__(/*! ../utils/reactHelpers */ "./node_modules/@material-ui/core/utils/reactHelpers.js"); var _FormControlContext = _interopRequireDefault(__webpack_require__(/*! ./FormControlContext */ "./node_modules/@material-ui/core/FormControl/FormControlContext.js")); var styles = { /* Styles applied to the root element. */ root: { display: 'inline-flex', flexDirection: 'column', position: 'relative', // Reset fieldset default style. minWidth: 0, padding: 0, margin: 0, border: 0, verticalAlign: 'top' // Fix alignment issue on Safari. }, /* Styles applied to the root element if `margin="normal"`. */ marginNormal: { marginTop: 16, marginBottom: 8 }, /* Styles applied to the root element if `margin="dense"`. */ marginDense: { marginTop: 8, marginBottom: 4 }, /* Styles applied to the root element if `fullWidth={true}`. */ fullWidth: { width: '100%' } }; /** * Provides context such as filled/focused/error/required for form inputs. * Relying on the context provides high flexibility and ensures that the state always stays * consistent across the children of the `FormControl`. * This context is used by the following components: * - FormLabel * - FormHelperText * - Input * - InputLabel * * ⚠️ Only one input can be used within a FormControl. */ exports.styles = styles; var FormControl = /*#__PURE__*/ function (_React$Component) { (0, _inherits2.default)(FormControl, _React$Component); (0, _createClass2.default)(FormControl, null, [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(props, state) { if (props.disabled && state.focused) { return { focused: false }; } return null; } }]); function FormControl(props) { var _this; (0, _classCallCheck2.default)(this, FormControl); _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(FormControl).call(this)); _this.handleFocus = function () { _this.setState(function (state) { return !state.focused ? { focused: true } : null; }); }; _this.handleBlur = function () { _this.setState(function (state) { return state.focused ? { focused: false } : null; }); }; _this.handleDirty = function () { if (!_this.state.filled) { _this.setState({ filled: true }); } }; _this.handleClean = function () { if (_this.state.filled) { _this.setState({ filled: false }); } }; _this.state = { adornedStart: false, filled: false, focused: false }; // We need to iterate through the children and find the Input in order // to fully support server-side rendering. var children = props.children; if (children) { _react.default.Children.forEach(children, function (child) { if (!(0, _reactHelpers.isMuiElement)(child, ['Input', 'Select'])) { return; } if ((0, _utils2.isFilled)(child.props, true)) { _this.state.filled = true; } var input = (0, _reactHelpers.isMuiElement)(child, ['Select']) ? child.props.input : child; if (input && (0, _utils2.isAdornedStart)(input.props)) { _this.state.adornedStart = true; } }); } return _this; } (0, _createClass2.default)(FormControl, [{ key: "render", value: function render() { var _classNames; var _this$props = this.props, classes = _this$props.classes, className = _this$props.className, Component = _this$props.component, disabled = _this$props.disabled, error = _this$props.error, fullWidth = _this$props.fullWidth, margin = _this$props.margin, required = _this$props.required, variant = _this$props.variant, other = (0, _objectWithoutProperties2.default)(_this$props, ["classes", "className", "component", "disabled", "error", "fullWidth", "margin", "required", "variant"]); var _this$state = this.state, adornedStart = _this$state.adornedStart, filled = _this$state.filled, focused = _this$state.focused; var childContext = { adornedStart: adornedStart, disabled: disabled, error: error, filled: filled, focused: focused, margin: margin, onBlur: this.handleBlur, onEmpty: this.handleClean, onFilled: this.handleDirty, onFocus: this.handleFocus, required: required, variant: variant }; return _react.default.createElement(_FormControlContext.default.Provider, { value: childContext }, _react.default.createElement(Component, (0, _extends2.default)({ className: (0, _classnames.default)(classes.root, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes["margin".concat((0, _helpers.capitalize)(margin))], margin !== 'none'), (0, _defineProperty2.default)(_classNames, classes.fullWidth, fullWidth), _classNames), className) }, other))); } }]); return FormControl; }(_react.default.Component); true ? FormControl.propTypes = { /** * The contents of the form control. */ children: _propTypes.default.node, /** * Override or extend the styles applied to the component. * See [CSS API](#css-api) below for more details. */ classes: _propTypes.default.object.isRequired, /** * @ignore */ className: _propTypes.default.string, /** * The component used for the root node. * Either a string to use a DOM element or a component. */ component: _utils.componentPropType, /** * If `true`, the label, input and helper text should be displayed in a disabled state. */ disabled: _propTypes.default.bool, /** * If `true`, the label should be displayed in an error state. */ error: _propTypes.default.bool, /** * If `true`, the component will take up the full width of its container. */ fullWidth: _propTypes.default.bool, /** * If `dense` or `normal`, will adjust vertical spacing of this and contained components. */ margin: _propTypes.default.oneOf(['none', 'dense', 'normal']), /** * If `true`, the label will indicate that the input is required. */ required: _propTypes.default.bool, /** * The variant to use. */ variant: _propTypes.default.oneOf(['standard', 'outlined', 'filled']) } : undefined; FormControl.defaultProps = { component: 'div', disabled: false, error: false, fullWidth: false, margin: 'none', required: false, variant: 'standard' }; var _default = (0, _withStyles.default)(styles, { name: 'MuiFormControl' })(FormControl); exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/FormControl/FormControlContext.js": /*!**************************************************************************!*\ !*** ./node_modules/@material-ui/core/FormControl/FormControlContext.js ***! \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); /** * @ignore - internal component. */ var FormControlContext = _react.default.createContext(); var _default = FormControlContext; exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/FormControl/formControlState.js": /*!************************************************************************!*\ !*** ./node_modules/@material-ui/core/FormControl/formControlState.js ***! \************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = formControlState; function formControlState(_ref) { var props = _ref.props, states = _ref.states, muiFormControl = _ref.muiFormControl; return states.reduce(function (acc, state) { acc[state] = props[state]; if (muiFormControl) { if (typeof props[state] === 'undefined') { acc[state] = muiFormControl[state]; } } return acc; }, {}); } /***/ }), /***/ "./node_modules/@material-ui/core/FormControl/index.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/FormControl/index.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function get() { return _FormControl.default; } }); var _FormControl = _interopRequireDefault(__webpack_require__(/*! ./FormControl */ "./node_modules/@material-ui/core/FormControl/FormControl.js")); /***/ }), /***/ "./node_modules/@material-ui/core/FormControl/withFormControlContext.js": /*!******************************************************************************!*\ !*** ./node_modules/@material-ui/core/FormControl/withFormControlContext.js ***! \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = withFormControlContext; var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _hoistNonReactStatics = _interopRequireDefault(__webpack_require__(/*! hoist-non-react-statics */ "./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js")); var _FormControlContext = _interopRequireDefault(__webpack_require__(/*! ./FormControlContext */ "./node_modules/@material-ui/core/FormControl/FormControlContext.js")); var _utils = __webpack_require__(/*! @material-ui/utils */ "./node_modules/@material-ui/utils/index.es.js"); function withFormControlContext(Component) { var EnhancedComponent = function EnhancedComponent(props) { return _react.default.createElement(_FormControlContext.default.Consumer, null, function (context) { return _react.default.createElement(Component, (0, _extends2.default)({ muiFormControl: context }, props)); }); }; if (true) { EnhancedComponent.displayName = "WithFormControlContext(".concat((0, _utils.getDisplayName)(Component), ")"); } (0, _hoistNonReactStatics.default)(EnhancedComponent, Component); return EnhancedComponent; } /***/ }), /***/ "./node_modules/@material-ui/core/FormHelperText/FormHelperText.js": /*!*************************************************************************!*\ !*** ./node_modules/@material-ui/core/FormHelperText/FormHelperText.js ***! \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.styles = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js")); var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js")); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js")); var _utils = __webpack_require__(/*! @material-ui/utils */ "./node_modules/@material-ui/utils/index.es.js"); var _formControlState = _interopRequireDefault(__webpack_require__(/*! ../FormControl/formControlState */ "./node_modules/@material-ui/core/FormControl/formControlState.js")); var _withFormControlContext = _interopRequireDefault(__webpack_require__(/*! ../FormControl/withFormControlContext */ "./node_modules/@material-ui/core/FormControl/withFormControlContext.js")); var _withStyles = _interopRequireDefault(__webpack_require__(/*! ../styles/withStyles */ "./node_modules/@material-ui/core/styles/withStyles.js")); var styles = function styles(theme) { return { /* Styles applied to the root element. */ root: { color: theme.palette.text.secondary, fontFamily: theme.typography.fontFamily, fontSize: theme.typography.pxToRem(12), textAlign: 'left', marginTop: 8, lineHeight: '1em', minHeight: '1em', margin: 0, '&$disabled': { color: theme.palette.text.disabled }, '&$error': { color: theme.palette.error.main } }, /* Styles applied to the root element if `error={true}`. */ error: {}, /* Styles applied to the root element if `disabled={true}`. */ disabled: {}, /* Styles applied to the root element if `margin="dense"`. */ marginDense: { marginTop: 4 }, /* Styles applied to the root element if `variant="filled"` or `variant="outlined"`. */ contained: { margin: '8px 12px 0' }, /* Styles applied to the root element if `focused={true}`. */ focused: {}, /* Styles applied to the root element if `filled={true}`. */ filled: {}, /* Styles applied to the root element if `required={true}`. */ required: {} }; }; exports.styles = styles; function FormHelperText(props) { var _classNames; var classes = props.classes, classNameProp = props.className, Component = props.component, disabled = props.disabled, error = props.error, filled = props.filled, focused = props.focused, margin = props.margin, muiFormControl = props.muiFormControl, required = props.required, variant = props.variant, other = (0, _objectWithoutProperties2.default)(props, ["classes", "className", "component", "disabled", "error", "filled", "focused", "margin", "muiFormControl", "required", "variant"]); var fcs = (0, _formControlState.default)({ props: props, muiFormControl: muiFormControl, states: ['variant', 'margin', 'disabled', 'error', 'filled', 'focused', 'required'] }); return _react.default.createElement(Component, (0, _extends2.default)({ className: (0, _classnames.default)(classes.root, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.contained, fcs.variant === 'filled' || fcs.variant === 'outlined'), (0, _defineProperty2.default)(_classNames, classes.marginDense, fcs.margin === 'dense'), (0, _defineProperty2.default)(_classNames, classes.disabled, fcs.disabled), (0, _defineProperty2.default)(_classNames, classes.error, fcs.error), (0, _defineProperty2.default)(_classNames, classes.filled, fcs.filled), (0, _defineProperty2.default)(_classNames, classes.focused, fcs.focused), (0, _defineProperty2.default)(_classNames, classes.required, fcs.required), _classNames), classNameProp) }, other)); } true ? FormHelperText.propTypes = { /** * The content of the component. */ children: _propTypes.default.node, /** * Override or extend the styles applied to the component. * See [CSS API](#css-api) below for more details. */ classes: _propTypes.default.object.isRequired, /** * @ignore */ className: _propTypes.default.string, /** * The component used for the root node. * Either a string to use a DOM element or a component. */ component: _utils.componentPropType, /** * If `true`, the helper text should be displayed in a disabled state. */ disabled: _propTypes.default.bool, /** * If `true`, helper text should be displayed in an error state. */ error: _propTypes.default.bool, /** * If `true`, the helper text should use filled classes key. */ filled: _propTypes.default.bool, /** * If `true`, the helper text should use focused classes key. */ focused: _propTypes.default.bool, /** * If `dense`, will adjust vertical spacing. This is normally obtained via context from * FormControl. */ margin: _propTypes.default.oneOf(['dense']), /** * @ignore */ muiFormControl: _propTypes.default.object, /** * If `true`, the helper text should use required classes key. */ required: _propTypes.default.bool, /** * The variant to use. */ variant: _propTypes.default.oneOf(['standard', 'outlined', 'filled']) } : undefined; FormHelperText.defaultProps = { component: 'p' }; var _default = (0, _withStyles.default)(styles, { name: 'MuiFormHelperText' })((0, _withFormControlContext.default)(FormHelperText)); exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/FormHelperText/index.js": /*!****************************************************************!*\ !*** ./node_modules/@material-ui/core/FormHelperText/index.js ***! \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function get() { return _FormHelperText.default; } }); var _FormHelperText = _interopRequireDefault(__webpack_require__(/*! ./FormHelperText */ "./node_modules/@material-ui/core/FormHelperText/FormHelperText.js")); /***/ }), /***/ "./node_modules/@material-ui/core/FormLabel/FormLabel.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/core/FormLabel/FormLabel.js ***! \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.styles = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js")); var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js")); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js")); var _utils = __webpack_require__(/*! @material-ui/utils */ "./node_modules/@material-ui/utils/index.es.js"); var _formControlState = _interopRequireDefault(__webpack_require__(/*! ../FormControl/formControlState */ "./node_modules/@material-ui/core/FormControl/formControlState.js")); var _withFormControlContext = _interopRequireDefault(__webpack_require__(/*! ../FormControl/withFormControlContext */ "./node_modules/@material-ui/core/FormControl/withFormControlContext.js")); var _withStyles = _interopRequireDefault(__webpack_require__(/*! ../styles/withStyles */ "./node_modules/@material-ui/core/styles/withStyles.js")); var styles = function styles(theme) { return { /* Styles applied to the root element. */ root: { fontFamily: theme.typography.fontFamily, color: theme.palette.text.secondary, fontSize: theme.typography.pxToRem(16), lineHeight: 1, padding: 0, '&$focused': { color: theme.palette.primary[theme.palette.type === 'light' ? 'dark' : 'light'] }, '&$disabled': { color: theme.palette.text.disabled }, '&$error': { color: theme.palette.error.main } }, /* Styles applied to the root element if `focused={true}`. */ focused: {}, /* Styles applied to the root element if `disabled={true}`. */ disabled: {}, /* Styles applied to the root element if `error={true}`. */ error: {}, /* Styles applied to the root element if `filled={true}`. */ filled: {}, /* Styles applied to the root element if `required={true}`. */ required: {}, asterisk: { '&$error': { color: theme.palette.error.main } } }; }; exports.styles = styles; function FormLabel(props) { var _classNames; var children = props.children, classes = props.classes, classNameProp = props.className, Component = props.component, disabled = props.disabled, error = props.error, filled = props.filled, focused = props.focused, muiFormControl = props.muiFormControl, required = props.required, other = (0, _objectWithoutProperties2.default)(props, ["children", "classes", "className", "component", "disabled", "error", "filled", "focused", "muiFormControl", "required"]); var fcs = (0, _formControlState.default)({ props: props, muiFormControl: muiFormControl, states: ['required', 'focused', 'disabled', 'error', 'filled'] }); return _react.default.createElement(Component, (0, _extends2.default)({ className: (0, _classnames.default)(classes.root, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.disabled, fcs.disabled), (0, _defineProperty2.default)(_classNames, classes.error, fcs.error), (0, _defineProperty2.default)(_classNames, classes.filled, fcs.filled), (0, _defineProperty2.default)(_classNames, classes.focused, fcs.focused), (0, _defineProperty2.default)(_classNames, classes.required, fcs.required), _classNames), classNameProp) }, other), children, fcs.required && _react.default.createElement("span", { className: (0, _classnames.default)(classes.asterisk, (0, _defineProperty2.default)({}, classes.error, fcs.error)) }, "\u2009*")); } true ? FormLabel.propTypes = { /** * The content of the component. */ children: _propTypes.default.node, /** * Override or extend the styles applied to the component. * See [CSS API](#css-api) below for more details. */ classes: _propTypes.default.object.isRequired, /** * @ignore */ className: _propTypes.default.string, /** * The component used for the root node. * Either a string to use a DOM element or a component. */ component: _utils.componentPropType, /** * If `true`, the label should be displayed in a disabled state. */ disabled: _propTypes.default.bool, /** * If `true`, the label should be displayed in an error state. */ error: _propTypes.default.bool, /** * If `true`, the label should use filled classes key. */ filled: _propTypes.default.bool, /** * If `true`, the input of this label is focused (used by `FormGroup` components). */ focused: _propTypes.default.bool, /** * @ignore */ muiFormControl: _propTypes.default.object, /** * If `true`, the label will indicate that the input is required. */ required: _propTypes.default.bool } : undefined; FormLabel.defaultProps = { component: 'label' }; var _default = (0, _withStyles.default)(styles, { name: 'MuiFormLabel' })((0, _withFormControlContext.default)(FormLabel)); exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/FormLabel/index.js": /*!***********************************************************!*\ !*** ./node_modules/@material-ui/core/FormLabel/index.js ***! \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function get() { return _FormLabel.default; } }); var _FormLabel = _interopRequireDefault(__webpack_require__(/*! ./FormLabel */ "./node_modules/@material-ui/core/FormLabel/FormLabel.js")); /***/ }), /***/ "./node_modules/@material-ui/core/Grid/Grid.js": /*!*****************************************************!*\ !*** ./node_modules/@material-ui/core/Grid/Grid.js ***! \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.styles = void 0; var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js")); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js")); var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js")); var _utils = __webpack_require__(/*! @material-ui/utils */ "./node_modules/@material-ui/utils/index.es.js"); var _withStyles = _interopRequireDefault(__webpack_require__(/*! ../styles/withStyles */ "./node_modules/@material-ui/core/styles/withStyles.js")); var _createBreakpoints = __webpack_require__(/*! ../styles/createBreakpoints */ "./node_modules/@material-ui/core/styles/createBreakpoints.js"); var _requirePropFactory = _interopRequireDefault(__webpack_require__(/*! ../utils/requirePropFactory */ "./node_modules/@material-ui/core/utils/requirePropFactory.js")); // A grid component using the following libs as inspiration. // // For the implementation: // - http://v4-alpha.getbootstrap.com/layout/flexbox-grid/ // - https://github.com/kristoferjoseph/flexboxgrid/blob/master/src/css/flexboxgrid.css // - https://github.com/roylee0704/react-flexbox-grid // - https://material.angularjs.org/latest/layout/introduction // // Follow this flexbox Guide to better understand the underlying model: // - https://css-tricks.com/snippets/css/a-guide-to-flexbox/ var GUTTERS = [0, 8, 16, 24, 32, 40]; var GRID_SIZES = ['auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; function generateGrid(globalStyles, theme, breakpoint) { var styles = {}; GRID_SIZES.forEach(function (size) { var key = "grid-".concat(breakpoint, "-").concat(size); if (size === true) { // For the auto layouting styles[key] = { flexBasis: 0, flexGrow: 1, maxWidth: '100%' }; return; } if (size === 'auto') { styles[key] = { flexBasis: 'auto', flexGrow: 0, maxWidth: 'none' }; return; } // Keep 7 significant numbers. var width = "".concat(Math.round(size / 12 * 10e7) / 10e5, "%"); // Close to the bootstrap implementation: // https://github.com/twbs/bootstrap/blob/8fccaa2439e97ec72a4b7dc42ccc1f649790adb0/scss/mixins/_grid.scss#L41 styles[key] = { flexBasis: width, flexGrow: 0, maxWidth: width }; }); // No need for a media query for the first size. if (breakpoint === 'xs') { (0, _extends2.default)(globalStyles, styles); } else { globalStyles[theme.breakpoints.up(breakpoint)] = styles; } } function generateGutter(theme, breakpoint) { var styles = {}; GUTTERS.forEach(function (spacing, index) { if (index === 0) { // Skip the default style. return; } styles["spacing-".concat(breakpoint, "-").concat(spacing)] = { margin: -spacing / 2, width: "calc(100% + ".concat(spacing, "px)"), '& > $item': { padding: spacing / 2 } }; }); return styles; } // Default CSS values // flex: '0 1 auto', // flexDirection: 'row', // alignItems: 'flex-start', // flexWrap: 'nowrap', // justifyContent: 'flex-start', var styles = function styles(theme) { return (0, _extends2.default)({ /* Styles applied to the root element if `container={true}`. */ container: { boxSizing: 'border-box', display: 'flex', flexWrap: 'wrap', width: '100%' }, /* Styles applied to the root element if `item={true}`. */ item: { boxSizing: 'border-box', margin: '0' // For instance, it's useful when used with a `figure` element. }, /* Styles applied to the root element if `zeroMinWidth={true}`. */ zeroMinWidth: { minWidth: 0 }, /* Styles applied to the root element if `direction="column"`. */ 'direction-xs-column': { flexDirection: 'column' }, /* Styles applied to the root element if `direction="column-reverse"`. */ 'direction-xs-column-reverse': { flexDirection: 'column-reverse' }, /* Styles applied to the root element if `direction="rwo-reverse"`. */ 'direction-xs-row-reverse': { flexDirection: 'row-reverse' }, /* Styles applied to the root element if `wrap="nowrap"`. */ 'wrap-xs-nowrap': { flexWrap: 'nowrap' }, /* Styles applied to the root element if `wrap="reverse"`. */ 'wrap-xs-wrap-reverse': { flexWrap: 'wrap-reverse' }, /* Styles applied to the root element if `alignItems="center"`. */ 'align-items-xs-center': { alignItems: 'center' }, /* Styles applied to the root element if `alignItems="flex-start"`. */ 'align-items-xs-flex-start': { alignItems: 'flex-start' }, /* Styles applied to the root element if `alignItems="flex-end"`. */ 'align-items-xs-flex-end': { alignItems: 'flex-end' }, /* Styles applied to the root element if `alignItems="baseline"`. */ 'align-items-xs-baseline': { alignItems: 'baseline' }, /* Styles applied to the root element if `alignContent="center"`. */ 'align-content-xs-center': { alignContent: 'center' }, /* Styles applied to the root element if `alignContent="flex-start"`. */ 'align-content-xs-flex-start': { alignContent: 'flex-start' }, /* Styles applied to the root element if `alignContent="flex-end"`. */ 'align-content-xs-flex-end': { alignContent: 'flex-end' }, /* Styles applied to the root element if `alignContent="space-between"`. */ 'align-content-xs-space-between': { alignContent: 'space-between' }, /* Styles applied to the root element if `alignContent="space-around"`. */ 'align-content-xs-space-around': { alignContent: 'space-around' }, /* Styles applied to the root element if `justify="center"`. */ 'justify-xs-center': { justifyContent: 'center' }, /* Styles applied to the root element if `justify="flex-end"`. */ 'justify-xs-flex-end': { justifyContent: 'flex-end' }, /* Styles applied to the root element if `justify="space-between"`. */ 'justify-xs-space-between': { justifyContent: 'space-between' }, /* Styles applied to the root element if `justify="space-around"`. */ 'justify-xs-space-around': { justifyContent: 'space-around' }, /* Styles applied to the root element if `justify="space-evenly"`. */ 'justify-xs-space-evenly': { justifyContent: 'space-evenly' } }, generateGutter(theme, 'xs'), _createBreakpoints.keys.reduce(function (accumulator, key) { // Use side effect over immutability for better performance. generateGrid(accumulator, theme, key); return accumulator; }, {})); }; exports.styles = styles; function Grid(props) { var _classNames; var alignContent = props.alignContent, alignItems = props.alignItems, classes = props.classes, classNameProp = props.className, Component = props.component, container = props.container, direction = props.direction, item = props.item, justify = props.justify, lg = props.lg, md = props.md, sm = props.sm, spacing = props.spacing, wrap = props.wrap, xl = props.xl, xs = props.xs, zeroMinWidth = props.zeroMinWidth, other = (0, _objectWithoutProperties2.default)(props, ["alignContent", "alignItems", "classes", "className", "component", "container", "direction", "item", "justify", "lg", "md", "sm", "spacing", "wrap", "xl", "xs", "zeroMinWidth"]); var className = (0, _classnames.default)((_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.container, container), (0, _defineProperty2.default)(_classNames, classes.item, item), (0, _defineProperty2.default)(_classNames, classes.zeroMinWidth, zeroMinWidth), (0, _defineProperty2.default)(_classNames, classes["spacing-xs-".concat(String(spacing))], container && spacing !== 0), (0, _defineProperty2.default)(_classNames, classes["direction-xs-".concat(String(direction))], direction !== Grid.defaultProps.direction), (0, _defineProperty2.default)(_classNames, classes["wrap-xs-".concat(String(wrap))], wrap !== Grid.defaultProps.wrap), (0, _defineProperty2.default)(_classNames, classes["align-items-xs-".concat(String(alignItems))], alignItems !== Grid.defaultProps.alignItems), (0, _defineProperty2.default)(_classNames, classes["align-content-xs-".concat(String(alignContent))], alignContent !== Grid.defaultProps.alignContent), (0, _defineProperty2.default)(_classNames, classes["justify-xs-".concat(String(justify))], justify !== Grid.defaultProps.justify), (0, _defineProperty2.default)(_classNames, classes["grid-xs-".concat(String(xs))], xs !== false), (0, _defineProperty2.default)(_classNames, classes["grid-sm-".concat(String(sm))], sm !== false), (0, _defineProperty2.default)(_classNames, classes["grid-md-".concat(String(md))], md !== false), (0, _defineProperty2.default)(_classNames, classes["grid-lg-".concat(String(lg))], lg !== false), (0, _defineProperty2.default)(_classNames, classes["grid-xl-".concat(String(xl))], xl !== false), _classNames), classNameProp); return _react.default.createElement(Component, (0, _extends2.default)({ className: className }, other)); } true ? Grid.propTypes = { /** * Defines the `align-content` style property. * It's applied for all screen sizes. */ alignContent: _propTypes.default.oneOf(['stretch', 'center', 'flex-start', 'flex-end', 'space-between', 'space-around']), /** * Defines the `align-items` style property. * It's applied for all screen sizes. */ alignItems: _propTypes.default.oneOf(['flex-start', 'center', 'flex-end', 'stretch', 'baseline']), /** * The content of the component. */ children: _propTypes.default.node, /** * Override or extend the styles applied to the component. * See [CSS API](#css-api) below for more details. */ classes: _propTypes.default.object.isRequired, /** * @ignore */ className: _propTypes.default.string, /** * The component used for the root node. * Either a string to use a DOM element or a component. */ component: _utils.componentPropType, /** * If `true`, the component will have the flex *container* behavior. * You should be wrapping *items* with a *container*. */ container: _propTypes.default.bool, /** * Defines the `flex-direction` style property. * It is applied for all screen sizes. */ direction: _propTypes.default.oneOf(['row', 'row-reverse', 'column', 'column-reverse']), /** * If `true`, the component will have the flex *item* behavior. * You should be wrapping *items* with a *container*. */ item: _propTypes.default.bool, /** * Defines the `justify-content` style property. * It is applied for all screen sizes. */ justify: _propTypes.default.oneOf(['flex-start', 'center', 'flex-end', 'space-between', 'space-around', 'space-evenly']), /** * Defines the number of grids the component is going to use. * It's applied for the `lg` breakpoint and wider screens if not overridden. */ lg: _propTypes.default.oneOf([false, 'auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), /** * Defines the number of grids the component is going to use. * It's applied for the `md` breakpoint and wider screens if not overridden. */ md: _propTypes.default.oneOf([false, 'auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), /** * Defines the number of grids the component is going to use. * It's applied for the `sm` breakpoint and wider screens if not overridden. */ sm: _propTypes.default.oneOf([false, 'auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), /** * Defines the space between the type `item` component. * It can only be used on a type `container` component. */ spacing: _propTypes.default.oneOf(GUTTERS), /** * Defines the `flex-wrap` style property. * It's applied for all screen sizes. */ wrap: _propTypes.default.oneOf(['nowrap', 'wrap', 'wrap-reverse']), /** * Defines the number of grids the component is going to use. * It's applied for the `xl` breakpoint and wider screens. */ xl: _propTypes.default.oneOf([false, 'auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), /** * Defines the number of grids the component is going to use. * It's applied for all the screen sizes with the lowest priority. */ xs: _propTypes.default.oneOf([false, 'auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), /** * If `true`, it sets `min-width: 0` on the item. * Refer to the limitations section of the documentation to better understand the use case. */ zeroMinWidth: _propTypes.default.bool } : undefined; Grid.defaultProps = { alignContent: 'stretch', alignItems: 'stretch', component: 'div', container: false, direction: 'row', item: false, justify: 'flex-start', lg: false, md: false, sm: false, spacing: 0, wrap: 'wrap', xl: false, xs: false, zeroMinWidth: false }; var StyledGrid = (0, _withStyles.default)(styles, { name: 'MuiGrid' })(Grid); if (true) { var requireProp = (0, _requirePropFactory.default)('Grid'); StyledGrid.propTypes = (0, _extends2.default)({}, StyledGrid.propTypes, { alignContent: requireProp('container'), alignItems: requireProp('container'), direction: requireProp('container'), justify: requireProp('container'), lg: requireProp('item'), md: requireProp('item'), sm: requireProp('item'), spacing: requireProp('container'), wrap: requireProp('container'), xs: requireProp('item'), zeroMinWidth: requireProp('zeroMinWidth') }); } var _default = StyledGrid; exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/Grid/index.js": /*!******************************************************!*\ !*** ./node_modules/@material-ui/core/Grid/index.js ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function get() { return _Grid.default; } }); var _Grid = _interopRequireDefault(__webpack_require__(/*! ./Grid */ "./node_modules/@material-ui/core/Grid/Grid.js")); /***/ }), /***/ "./node_modules/@material-ui/core/Grow/Grow.js": /*!*****************************************************!*\ !*** ./node_modules/@material-ui/core/Grow/Grow.js ***! \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js")); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js")); var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); var _getPrototypeOf3 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js")); var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _Transition = _interopRequireDefault(__webpack_require__(/*! react-transition-group/Transition */ "./node_modules/react-transition-group/Transition.js")); var _withTheme = _interopRequireDefault(__webpack_require__(/*! ../styles/withTheme */ "./node_modules/@material-ui/core/styles/withTheme.js")); var _utils = __webpack_require__(/*! ../transitions/utils */ "./node_modules/@material-ui/core/transitions/utils.js"); // @inheritedComponent Transition function getScale(value) { return "scale(".concat(value, ", ").concat(Math.pow(value, 2), ")"); } var styles = { entering: { opacity: 1, transform: getScale(1) }, entered: { opacity: 1, // Use translateZ to scrolling issue on Chrome. transform: "".concat(getScale(1), " translateZ(0)") } }; /** * The Grow transition is used by the [Tooltip](/demos/tooltips/) and * [Popover](/utils/popover/) components. * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally. */ var Grow = /*#__PURE__*/ function (_React$Component) { (0, _inherits2.default)(Grow, _React$Component); function Grow() { var _getPrototypeOf2; var _this; (0, _classCallCheck2.default)(this, Grow); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = (0, _possibleConstructorReturn2.default)(this, (_getPrototypeOf2 = (0, _getPrototypeOf3.default)(Grow)).call.apply(_getPrototypeOf2, [this].concat(args))); _this.handleEnter = function (node) { var _this$props = _this.props, theme = _this$props.theme, timeout = _this$props.timeout; (0, _utils.reflow)(node); // So the animation always start from the start. var _getTransitionProps = (0, _utils.getTransitionProps)(_this.props, { mode: 'enter' }), transitionDuration = _getTransitionProps.duration, delay = _getTransitionProps.delay; var duration = 0; if (timeout === 'auto') { duration = theme.transitions.getAutoHeightDuration(node.clientHeight); _this.autoTimeout = duration; } else { duration = transitionDuration; } node.style.transition = [theme.transitions.create('opacity', { duration: duration, delay: delay }), theme.transitions.create('transform', { duration: duration * 0.666, delay: delay })].join(','); if (_this.props.onEnter) { _this.props.onEnter(node); } }; _this.handleExit = function (node) { var _this$props2 = _this.props, theme = _this$props2.theme, timeout = _this$props2.timeout; var duration = 0; var _getTransitionProps2 = (0, _utils.getTransitionProps)(_this.props, { mode: 'exit' }), transitionDuration = _getTransitionProps2.duration, delay = _getTransitionProps2.delay; if (timeout === 'auto') { duration = theme.transitions.getAutoHeightDuration(node.clientHeight); _this.autoTimeout = duration; } else { duration = transitionDuration; } node.style.transition = [theme.transitions.create('opacity', { duration: duration, delay: delay }), theme.transitions.create('transform', { duration: duration * 0.666, delay: delay || duration * 0.333 })].join(','); node.style.opacity = '0'; node.style.transform = getScale(0.75); if (_this.props.onExit) { _this.props.onExit(node); } }; _this.addEndListener = function (_, next) { if (_this.props.timeout === 'auto') { _this.timer = setTimeout(next, _this.autoTimeout || 0); } }; return _this; } (0, _createClass2.default)(Grow, [{ key: "componentWillUnmount", value: function componentWillUnmount() { clearTimeout(this.timer); } }, { key: "render", value: function render() { var _this$props3 = this.props, children = _this$props3.children, onEnter = _this$props3.onEnter, onExit = _this$props3.onExit, styleProp = _this$props3.style, theme = _this$props3.theme, timeout = _this$props3.timeout, other = (0, _objectWithoutProperties2.default)(_this$props3, ["children", "onEnter", "onExit", "style", "theme", "timeout"]); var style = (0, _extends2.default)({}, styleProp, _react.default.isValidElement(children) ? children.props.style : {}); return _react.default.createElement(_Transition.default, (0, _extends2.default)({ appear: true, onEnter: this.handleEnter, onExit: this.handleExit, addEndListener: this.addEndListener, timeout: timeout === 'auto' ? null : timeout }, other), function (state, childProps) { return _react.default.cloneElement(children, (0, _extends2.default)({ style: (0, _extends2.default)({ opacity: 0, transform: getScale(0.75) }, styles[state], style) }, childProps)); }); } }]); return Grow; }(_react.default.Component); true ? Grow.propTypes = { /** * A single child content element. */ children: _propTypes.default.oneOfType([_propTypes.default.element, _propTypes.default.func]), /** * If `true`, show the component; triggers the enter or exit animation. */ in: _propTypes.default.bool, /** * @ignore */ onEnter: _propTypes.default.func, /** * @ignore */ onExit: _propTypes.default.func, /** * @ignore */ style: _propTypes.default.object, /** * @ignore */ theme: _propTypes.default.object.isRequired, /** * The duration for the transition, in milliseconds. * You may specify a single timeout for all transitions, or individually with an object. * * Set to 'auto' to automatically calculate transition time based on height. */ timeout: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({ enter: _propTypes.default.number, exit: _propTypes.default.number }), _propTypes.default.oneOf(['auto'])]) } : undefined; Grow.defaultProps = { timeout: 'auto' }; Grow.muiSupportAuto = true; var _default = (0, _withTheme.default)()(Grow); exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/Grow/index.js": /*!******************************************************!*\ !*** ./node_modules/@material-ui/core/Grow/index.js ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function get() { return _Grow.default; } }); var _Grow = _interopRequireDefault(__webpack_require__(/*! ./Grow */ "./node_modules/@material-ui/core/Grow/Grow.js")); /***/ }), /***/ "./node_modules/@material-ui/core/Input/Input.js": /*!*******************************************************!*\ !*** ./node_modules/@material-ui/core/Input/Input.js ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.styles = void 0; var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js")); var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js")); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js")); var _utils = __webpack_require__(/*! @material-ui/utils */ "./node_modules/@material-ui/utils/index.es.js"); var _InputBase = _interopRequireDefault(__webpack_require__(/*! ../InputBase */ "./node_modules/@material-ui/core/InputBase/index.js")); var _withStyles = _interopRequireDefault(__webpack_require__(/*! ../styles/withStyles */ "./node_modules/@material-ui/core/styles/withStyles.js")); // @inheritedComponent InputBase var styles = function styles(theme) { var light = theme.palette.type === 'light'; var bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)'; return { /* Styles applied to the root element. */ root: { position: 'relative' }, /* Styles applied to the root element if the component is a descendant of `FormControl`. */ formControl: { 'label + &': { marginTop: 16 } }, /* Styles applied to the root element if the component is focused. */ focused: {}, /* Styles applied to the root element if `disabled={true}`. */ disabled: {}, /* Styles applied to the root element if `disableUnderline={false}`. */ underline: { '&:after': { borderBottom: "2px solid ".concat(theme.palette.primary[light ? 'dark' : 'light']), left: 0, bottom: 0, // Doing the other way around crash on IE 11 "''" https://github.com/cssinjs/jss/issues/242 content: '""', position: 'absolute', right: 0, transform: 'scaleX(0)', transition: theme.transitions.create('transform', { duration: theme.transitions.duration.shorter, easing: theme.transitions.easing.easeOut }), pointerEvents: 'none' // Transparent to the hover style. }, '&$focused:after': { transform: 'scaleX(1)' }, '&$error:after': { borderBottomColor: theme.palette.error.main, transform: 'scaleX(1)' // error is always underlined in red }, '&:before': { borderBottom: "1px solid ".concat(bottomLineColor), left: 0, bottom: 0, // Doing the other way around crash on IE 11 "''" https://github.com/cssinjs/jss/issues/242 content: '"\\00a0"', position: 'absolute', right: 0, transition: theme.transitions.create('border-bottom-color', { duration: theme.transitions.duration.shorter }), pointerEvents: 'none' // Transparent to the hover style. }, '&:hover:not($disabled):not($focused):not($error):before': { borderBottom: "2px solid ".concat(theme.palette.text.primary), // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { borderBottom: "1px solid ".concat(bottomLineColor) } }, '&$disabled:before': { borderBottomStyle: 'dotted' } }, /* Styles applied to the root element if `error={true}`. */ error: {}, /* Styles applied to the root element if `multiline={true}`. */ multiline: {}, /* Styles applied to the root element if `fullWidth={true}`. */ fullWidth: {}, /* Styles applied to the `input` element. */ input: {}, /* Styles applied to the `input` element if `margin="dense"`. */ inputMarginDense: {}, /* Styles applied to the `input` element if `multiline={true}`. */ inputMultiline: {}, /* Styles applied to the `input` element if `type` is not "text"`. */ inputType: {}, /* Styles applied to the `input` element if `type="search"`. */ inputTypeSearch: {} }; }; exports.styles = styles; function Input(props) { var disableUnderline = props.disableUnderline, classes = props.classes, other = (0, _objectWithoutProperties2.default)(props, ["disableUnderline", "classes"]); return _react.default.createElement(_InputBase.default, (0, _extends2.default)({ classes: (0, _extends2.default)({}, classes, { root: (0, _classnames.default)(classes.root, (0, _defineProperty2.default)({}, classes.underline, !disableUnderline)), underline: null }) }, other)); } true ? Input.propTypes = { /** * This property helps users to fill forms faster, especially on mobile devices. * The name can be confusing, as it's more like an autofill. * You can learn more about it here: * https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill */ autoComplete: _propTypes.default.string, /** * If `true`, the input will be focused during the first mount. */ autoFocus: _propTypes.default.bool, /** * Override or extend the styles applied to the component. * See [CSS API](#css-api) below for more details. */ classes: _propTypes.default.object.isRequired, /** * The CSS class name of the wrapper element. */ className: _propTypes.default.string, /** * The default input value, useful when not controlling the component. */ defaultValue: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool, _propTypes.default.object, _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool, _propTypes.default.object]))]), /** * If `true`, the input will be disabled. */ disabled: _propTypes.default.bool, /** * If `true`, the input will not have an underline. */ disableUnderline: _propTypes.default.bool, /** * End `InputAdornment` for this component. */ endAdornment: _propTypes.default.node, /** * If `true`, the input will indicate an error. This is normally obtained via context from * FormControl. */ error: _propTypes.default.bool, /** * If `true`, the input will take up the full width of its container. */ fullWidth: _propTypes.default.bool, /** * The id of the `input` element. */ id: _propTypes.default.string, /** * The component used for the native input. * Either a string to use a DOM element or a component. */ inputComponent: _utils.componentPropType, /** * Attributes applied to the `input` element. */ inputProps: _propTypes.default.object, /** * Use that property to pass a ref callback to the native input component. */ inputRef: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]), /** * If `dense`, will adjust vertical spacing. This is normally obtained via context from * FormControl. */ margin: _propTypes.default.oneOf(['dense', 'none']), /** * If `true`, a textarea element will be rendered. */ multiline: _propTypes.default.bool, /** * Name attribute of the `input` element. */ name: _propTypes.default.string, /** * Callback fired when the value is changed. * * @param {object} event The event source of the callback. * You can pull out the new value by accessing `event.target.value`. */ onChange: _propTypes.default.func, /** * The short hint displayed in the input before the user enters a value. */ placeholder: _propTypes.default.string, /** * It prevents the user from changing the value of the field * (not from interacting with the field). */ readOnly: _propTypes.default.bool, /** * If `true`, the input will be required. */ required: _propTypes.default.bool, /** * Number of rows to display when multiline option is set to true. */ rows: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]), /** * Maximum number of rows to display when multiline option is set to true. */ rowsMax: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]), /** * Start `InputAdornment` for this component. */ startAdornment: _propTypes.default.node, /** * Type of the input element. It should be a valid HTML5 input type. */ type: _propTypes.default.string, /** * The input value, required for a controlled component. */ value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool, _propTypes.default.object, _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool, _propTypes.default.object]))]) } : undefined; _InputBase.default.defaultProps = { fullWidth: false, inputComponent: 'input', multiline: false, type: 'text' }; Input.muiName = 'Input'; var _default = (0, _withStyles.default)(styles, { name: 'MuiInput' })(Input); exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/Input/index.js": /*!*******************************************************!*\ !*** ./node_modules/@material-ui/core/Input/index.js ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function get() { return _Input.default; } }); var _Input = _interopRequireDefault(__webpack_require__(/*! ./Input */ "./node_modules/@material-ui/core/Input/Input.js")); /***/ }), /***/ "./node_modules/@material-ui/core/InputBase/InputBase.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/core/InputBase/InputBase.js ***! \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.styles = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js")); var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js")); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js")); var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js")); var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _warning = _interopRequireDefault(__webpack_require__(/*! warning */ "./node_modules/warning/warning.js")); var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js")); var _utils = __webpack_require__(/*! @material-ui/utils */ "./node_modules/@material-ui/utils/index.es.js"); var _formControlState = _interopRequireDefault(__webpack_require__(/*! ../FormControl/formControlState */ "./node_modules/@material-ui/core/FormControl/formControlState.js")); var _FormControlContext = _interopRequireDefault(__webpack_require__(/*! ../FormControl/FormControlContext */ "./node_modules/@material-ui/core/FormControl/FormControlContext.js")); var _withFormControlContext = _interopRequireDefault(__webpack_require__(/*! ../FormControl/withFormControlContext */ "./node_modules/@material-ui/core/FormControl/withFormControlContext.js")); var _withStyles = _interopRequireDefault(__webpack_require__(/*! ../styles/withStyles */ "./node_modules/@material-ui/core/styles/withStyles.js")); var _reactHelpers = __webpack_require__(/*! ../utils/reactHelpers */ "./node_modules/@material-ui/core/utils/reactHelpers.js"); var _Textarea = _interopRequireDefault(__webpack_require__(/*! ./Textarea */ "./node_modules/@material-ui/core/InputBase/Textarea.js")); var _utils2 = __webpack_require__(/*! ./utils */ "./node_modules/@material-ui/core/InputBase/utils.js"); /* eslint-disable jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */ var styles = function styles(theme) { var light = theme.palette.type === 'light'; var placeholder = { color: 'currentColor', opacity: light ? 0.42 : 0.5, transition: theme.transitions.create('opacity', { duration: theme.transitions.duration.shorter }) }; var placeholderHidden = { opacity: 0 }; var placeholderVisible = { opacity: light ? 0.42 : 0.5 }; return { /* Styles applied to the root element. */ root: { // Mimics the default input display property used by browsers for an input. fontFamily: theme.typography.fontFamily, color: theme.palette.text.primary, fontSize: theme.typography.pxToRem(16), lineHeight: '1.1875em', // Reset (19px), match the native input line-height cursor: 'text', display: 'inline-flex', alignItems: 'center', '&$disabled': { color: theme.palette.text.disabled, cursor: 'default' } }, /* Styles applied to the root element if the component is a descendant of `FormControl`. */ formControl: {}, /* Styles applied to the root element if the component is focused. */ focused: {}, /* Styles applied to the root element if `disabled={true}`. */ disabled: {}, /* Styles applied to the root element if `startAdornment` is provided. */ adornedStart: {}, /* Styles applied to the root element if `endAdornment` is provided. */ adornedEnd: {}, /* Styles applied to the root element if `error={true}`. */ error: {}, /* Styles applied to the `input` element if `margin="dense"`. */ marginDense: {}, /* Styles applied to the root element if `multiline={true}`. */ multiline: { padding: "".concat(8 - 2, "px 0 ").concat(8 - 1, "px") }, /* Styles applied to the root element if `fullWidth={true}`. */ fullWidth: { width: '100%' }, /* Styles applied to the `input` element. */ input: { font: 'inherit', color: 'currentColor', padding: "".concat(8 - 2, "px 0 ").concat(8 - 1, "px"), border: 0, boxSizing: 'content-box', background: 'none', margin: 0, // Reset for Safari // Remove grey highlight WebkitTapHighlightColor: 'transparent', display: 'block', // Make the flex item shrink with Firefox minWidth: 0, width: '100%', // Fix IE 11 width issue '&::-webkit-input-placeholder': placeholder, '&::-moz-placeholder': placeholder, // Firefox 19+ '&:-ms-input-placeholder': placeholder, // IE 11 '&::-ms-input-placeholder': placeholder, // Edge '&:focus': { outline: 0 }, // Reset Firefox invalid required input style '&:invalid': { boxShadow: 'none' }, '&::-webkit-search-decoration': { // Remove the padding when type=search. '-webkit-appearance': 'none' }, // Show and hide the placeholder logic 'label[data-shrink=false] + $formControl &': { '&::-webkit-input-placeholder': placeholderHidden, '&::-moz-placeholder': placeholderHidden, // Firefox 19+ '&:-ms-input-placeholder': placeholderHidden, // IE 11 '&::-ms-input-placeholder': placeholderHidden, // Edge '&:focus::-webkit-input-placeholder': placeholderVisible, '&:focus::-moz-placeholder': placeholderVisible, // Firefox 19+ '&:focus:-ms-input-placeholder': placeholderVisible, // IE 11 '&:focus::-ms-input-placeholder': placeholderVisible // Edge }, '&$disabled': { opacity: 1 // Reset iOS opacity } }, /* Styles applied to the `input` element if `margin="dense"`. */ inputMarginDense: { paddingTop: 4 - 1 }, /* Styles applied to the `input` element if `multiline={true}`. */ inputMultiline: { resize: 'none', padding: 0 }, /* Styles applied to the `input` element if `type` is not "text"`. */ inputType: { // type="date" or type="time", etc. have specific styles we need to reset. height: '1.1875em' // Reset (19px), match the native input line-height }, /* Styles applied to the `input` element if `type="search"`. */ inputTypeSearch: { // Improve type search style. '-moz-appearance': 'textfield', '-webkit-appearance': 'textfield' }, /* Styles applied to the `input` element if `startAdornment` is provided. */ inputAdornedStart: {}, /* Styles applied to the `input` element if `endAdornment` is provided. */ inputAdornedEnd: {} }; }; /** * `InputBase` contains as few styles as possible. * It aims to be a simple building block for creating an input. * It contains a load of style reset and some state logic. */ exports.styles = styles; var InputBase = /*#__PURE__*/ function (_React$Component) { (0, _inherits2.default)(InputBase, _React$Component); (0, _createClass2.default)(InputBase, null, [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(props, state) { // The blur won't fire when the disabled state is set on a focused input. // We need to book keep the focused state manually. if (props.disabled && state.focused) { return { focused: false }; } return null; } }]); function InputBase(props) { var _this; (0, _classCallCheck2.default)(this, InputBase); _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(InputBase).call(this, props)); _this.state = { focused: false }; _this.handleFocus = function (event) { var muiFormControl = _this.props.muiFormControl; // Fix a bug with IE 11 where the focus/blur events are triggered // while the input is disabled. if ((0, _formControlState.default)({ props: _this.props, muiFormControl: muiFormControl, states: ['disabled'] }).disabled) { event.stopPropagation(); return; } _this.setState({ focused: true }); if (_this.props.onFocus) { _this.props.onFocus(event); } if (muiFormControl && muiFormControl.onFocus) { muiFormControl.onFocus(event); } }; _this.handleBlur = function (event) { _this.setState({ focused: false }); if (_this.props.onBlur) { _this.props.onBlur(event); } var muiFormControl = _this.props.muiFormControl; if (muiFormControl && muiFormControl.onBlur) { muiFormControl.onBlur(event); } }; _this.handleChange = function () { if (!_this.isControlled) { _this.checkDirty(_this.inputRef); } // Perform in the willUpdate if (_this.props.onChange) { var _this$props; (_this$props = _this.props).onChange.apply(_this$props, arguments); } }; _this.handleRefInput = function (ref) { _this.inputRef = ref; true ? (0, _warning.default)(!ref || ref instanceof HTMLInputElement || ref.focus, ['Material-UI: you have provided a `inputComponent` to the input component', 'that does not correctly handle the `inputRef` property.', 'Make sure the `inputRef` property is called with a HTMLInputElement.'].join('\n')) : undefined; var refProp; if (_this.props.inputRef) { refProp = _this.props.inputRef; } else if (_this.props.inputProps && _this.props.inputProps.ref) { refProp = _this.props.inputProps.ref; } (0, _reactHelpers.setRef)(refProp, ref); }; _this.handleClick = function (event) { if (_this.inputRef && event.currentTarget === event.target) { _this.inputRef.focus(); } if (_this.props.onClick) { _this.props.onClick(event); } }; _this.isControlled = props.value != null; if (_this.isControlled) { _this.checkDirty(props); } return _this; } (0, _createClass2.default)(InputBase, [{ key: "componentDidMount", value: function componentDidMount() { if (!this.isControlled) { this.checkDirty(this.inputRef); } } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { // Book keep the focused state. if (!prevProps.disabled && this.props.disabled) { var muiFormControl = this.props.muiFormControl; if (muiFormControl && muiFormControl.onBlur) { muiFormControl.onBlur(); } } if (this.isControlled) { this.checkDirty(this.props); } // else performed in the onChange } }, { key: "checkDirty", value: function checkDirty(obj) { var muiFormControl = this.props.muiFormControl; if ((0, _utils2.isFilled)(obj)) { if (muiFormControl && muiFormControl.onFilled) { muiFormControl.onFilled(); } if (this.props.onFilled) { this.props.onFilled(); } return; } if (muiFormControl && muiFormControl.onEmpty) { muiFormControl.onEmpty(); } if (this.props.onEmpty) { this.props.onEmpty(); } } }, { key: "render", value: function render() { var _classNames, _classNames2; var _this$props2 = this.props, autoComplete = _this$props2.autoComplete, autoFocus = _this$props2.autoFocus, classes = _this$props2.classes, classNameProp = _this$props2.className, defaultValue = _this$props2.defaultValue, disabled = _this$props2.disabled, endAdornment = _this$props2.endAdornment, error = _this$props2.error, fullWidth = _this$props2.fullWidth, id = _this$props2.id, inputComponent = _this$props2.inputComponent, _this$props2$inputPro = _this$props2.inputProps; _this$props2$inputPro = _this$props2$inputPro === void 0 ? {} : _this$props2$inputPro; var inputPropsClassName = _this$props2$inputPro.className, inputPropsProp = (0, _objectWithoutProperties2.default)(_this$props2$inputPro, ["className"]), inputRef = _this$props2.inputRef, margin = _this$props2.margin, muiFormControl = _this$props2.muiFormControl, multiline = _this$props2.multiline, name = _this$props2.name, onBlur = _this$props2.onBlur, onChange = _this$props2.onChange, onClick = _this$props2.onClick, onEmpty = _this$props2.onEmpty, onFilled = _this$props2.onFilled, onFocus = _this$props2.onFocus, onKeyDown = _this$props2.onKeyDown, onKeyUp = _this$props2.onKeyUp, placeholder = _this$props2.placeholder, readOnly = _this$props2.readOnly, renderPrefix = _this$props2.renderPrefix, rows = _this$props2.rows, rowsMax = _this$props2.rowsMax, startAdornment = _this$props2.startAdornment, type = _this$props2.type, value = _this$props2.value, other = (0, _objectWithoutProperties2.default)(_this$props2, ["autoComplete", "autoFocus", "classes", "className", "defaultValue", "disabled", "endAdornment", "error", "fullWidth", "id", "inputComponent", "inputProps", "inputRef", "margin", "muiFormControl", "multiline", "name", "onBlur", "onChange", "onClick", "onEmpty", "onFilled", "onFocus", "onKeyDown", "onKeyUp", "placeholder", "readOnly", "renderPrefix", "rows", "rowsMax", "startAdornment", "type", "value"]); var ariaDescribedby = other['aria-describedby']; delete other['aria-describedby']; var fcs = (0, _formControlState.default)({ props: this.props, muiFormControl: muiFormControl, states: ['disabled', 'error', 'margin', 'required', 'filled'] }); var focused = muiFormControl ? muiFormControl.focused : this.state.focused; var className = (0, _classnames.default)(classes.root, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.disabled, fcs.disabled), (0, _defineProperty2.default)(_classNames, classes.error, fcs.error), (0, _defineProperty2.default)(_classNames, classes.fullWidth, fullWidth), (0, _defineProperty2.default)(_classNames, classes.focused, focused), (0, _defineProperty2.default)(_classNames, classes.formControl, muiFormControl), (0, _defineProperty2.default)(_classNames, classes.marginDense, fcs.margin === 'dense'), (0, _defineProperty2.default)(_classNames, classes.multiline, multiline), (0, _defineProperty2.default)(_classNames, classes.adornedStart, startAdornment), (0, _defineProperty2.default)(_classNames, classes.adornedEnd, endAdornment), _classNames), classNameProp); var inputClassName = (0, _classnames.default)(classes.input, (_classNames2 = {}, (0, _defineProperty2.default)(_classNames2, classes.disabled, fcs.disabled), (0, _defineProperty2.default)(_classNames2, classes.inputType, type !== 'text'), (0, _defineProperty2.default)(_classNames2, classes.inputTypeSearch, type === 'search'), (0, _defineProperty2.default)(_classNames2, classes.inputMultiline, multiline), (0, _defineProperty2.default)(_classNames2, classes.inputMarginDense, fcs.margin === 'dense'), (0, _defineProperty2.default)(_classNames2, classes.inputAdornedStart, startAdornment), (0, _defineProperty2.default)(_classNames2, classes.inputAdornedEnd, endAdornment), _classNames2), inputPropsClassName); var InputComponent = inputComponent; var inputProps = (0, _extends2.default)({}, inputPropsProp, { ref: this.handleRefInput }); if (typeof InputComponent !== 'string') { inputProps = (0, _extends2.default)({ // Rename ref to inputRef as we don't know the // provided `inputComponent` structure. inputRef: this.handleRefInput, type: type }, inputProps, { ref: null }); } else if (multiline) { if (rows && !rowsMax) { InputComponent = 'textarea'; } else { inputProps = (0, _extends2.default)({ rowsMax: rowsMax, textareaRef: this.handleRefInput }, inputProps, { ref: null }); InputComponent = _Textarea.default; } } else { inputProps = (0, _extends2.default)({ type: type }, inputProps); } return _react.default.createElement("div", (0, _extends2.default)({ className: className, onClick: this.handleClick }, other), renderPrefix ? renderPrefix((0, _extends2.default)({}, fcs, { startAdornment: startAdornment, focused: focused })) : null, startAdornment, _react.default.createElement(_FormControlContext.default.Provider, { value: null }, _react.default.createElement(InputComponent, (0, _extends2.default)({ "aria-invalid": fcs.error, "aria-describedby": ariaDescribedby, autoComplete: autoComplete, autoFocus: autoFocus, className: inputClassName, defaultValue: defaultValue, disabled: fcs.disabled, id: id, name: name, onBlur: this.handleBlur, onChange: this.handleChange, onFocus: this.handleFocus, onKeyDown: onKeyDown, onKeyUp: onKeyUp, placeholder: placeholder, readOnly: readOnly, required: fcs.required, rows: rows, value: value }, inputProps))), endAdornment); } }]); return InputBase; }(_react.default.Component); true ? InputBase.propTypes = { /** * This property helps users to fill forms faster, especially on mobile devices. * The name can be confusing, as it's more like an autofill. * You can learn more about it here: * https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill */ autoComplete: _propTypes.default.string, /** * If `true`, the input will be focused during the first mount. */ autoFocus: _propTypes.default.bool, /** * Override or extend the styles applied to the component. * See [CSS API](#css-api) below for more details. */ classes: _propTypes.default.object.isRequired, /** * The CSS class name of the wrapper element. */ className: _propTypes.default.string, /** * The default input value, useful when not controlling the component. */ defaultValue: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool, _propTypes.default.object, _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool, _propTypes.default.object]))]), /** * If `true`, the input will be disabled. */ disabled: _propTypes.default.bool, /** * End `InputAdornment` for this component. */ endAdornment: _propTypes.default.node, /** * If `true`, the input will indicate an error. This is normally obtained via context from * FormControl. */ error: _propTypes.default.bool, /** * If `true`, the input will take up the full width of its container. */ fullWidth: _propTypes.default.bool, /** * The id of the `input` element. */ id: _propTypes.default.string, /** * The component used for the native input. * Either a string to use a DOM element or a component. */ inputComponent: _utils.componentPropType, /** * Attributes applied to the `input` element. */ inputProps: _propTypes.default.object, /** * Use that property to pass a ref callback to the native input component. */ inputRef: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]), /** * If `dense`, will adjust vertical spacing. This is normally obtained via context from * FormControl. */ margin: _propTypes.default.oneOf(['dense', 'none']), /** * @ignore */ muiFormControl: _propTypes.default.object, /** * If `true`, a textarea element will be rendered. */ multiline: _propTypes.default.bool, /** * Name attribute of the `input` element. */ name: _propTypes.default.string, /** * @ignore */ onBlur: _propTypes.default.func, /** * Callback fired when the value is changed. * * @param {object} event The event source of the callback. * You can pull out the new value by accessing `event.target.value`. */ onChange: _propTypes.default.func, /** * @ignore */ onClick: _propTypes.default.func, /** * @ignore */ onEmpty: _propTypes.default.func, /** * @ignore */ onFilled: _propTypes.default.func, /** * @ignore */ onFocus: _propTypes.default.func, /** * @ignore */ onKeyDown: _propTypes.default.func, /** * @ignore */ onKeyUp: _propTypes.default.func, /** * The short hint displayed in the input before the user enters a value. */ placeholder: _propTypes.default.string, /** * It prevents the user from changing the value of the field * (not from interacting with the field). */ readOnly: _propTypes.default.bool, /** * @ignore */ renderPrefix: _propTypes.default.func, /** * If `true`, the input will be required. */ required: _propTypes.default.bool, /** * Number of rows to display when multiline option is set to true. */ rows: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]), /** * Maximum number of rows to display when multiline option is set to true. */ rowsMax: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]), /** * Start `InputAdornment` for this component. */ startAdornment: _propTypes.default.node, /** * Type of the input element. It should be a valid HTML5 input type. */ type: _propTypes.default.string, /** * The input value, required for a controlled component. */ value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool, _propTypes.default.object, _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool, _propTypes.default.object]))]) } : undefined; InputBase.defaultProps = { fullWidth: false, inputComponent: 'input', multiline: false, type: 'text' }; var _default = (0, _withStyles.default)(styles, { name: 'MuiInputBase' })((0, _withFormControlContext.default)(InputBase)); exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/InputBase/Textarea.js": /*!**************************************************************!*\ !*** ./node_modules/@material-ui/core/InputBase/Textarea.js ***! \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.styles = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js")); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js")); var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js")); var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js")); var _debounce = _interopRequireDefault(__webpack_require__(/*! debounce */ "./node_modules/debounce/index.js")); var _reactEventListener = _interopRequireDefault(__webpack_require__(/*! react-event-listener */ "./node_modules/react-event-listener/dist/react-event-listener.cjs.js")); var _withStyles = _interopRequireDefault(__webpack_require__(/*! ../styles/withStyles */ "./node_modules/@material-ui/core/styles/withStyles.js")); var _reactHelpers = __webpack_require__(/*! ../utils/reactHelpers */ "./node_modules/@material-ui/core/utils/reactHelpers.js"); // < 1kb payload overhead when lodash/debounce is > 3kb. var ROWS_HEIGHT = 19; var styles = { /* Styles applied to the root element. */ root: { position: 'relative', // because the shadow has position: 'absolute', width: '100%' }, textarea: { width: '100%', height: '100%', resize: 'none', font: 'inherit', padding: 0, cursor: 'inherit', boxSizing: 'border-box', lineHeight: 'inherit', border: 'none', outline: 'none', background: 'transparent' }, shadow: { // Overflow also needed to here to remove the extra row // added to textareas in Firefox. overflow: 'hidden', // Visibility needed to hide the extra text area on iPads visibility: 'hidden', position: 'absolute', height: 'auto', whiteSpace: 'pre-wrap' } }; /** * @ignore - internal component. */ exports.styles = styles; var Textarea = /*#__PURE__*/ function (_React$Component) { (0, _inherits2.default)(Textarea, _React$Component); function Textarea(props) { var _this; (0, _classCallCheck2.default)(this, Textarea); _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(Textarea).call(this)); _this.handleRefInput = function (ref) { _this.inputRef = ref; (0, _reactHelpers.setRef)(_this.props.textareaRef, ref); }; _this.handleRefSinglelineShadow = function (ref) { _this.singlelineShadowRef = ref; }; _this.handleRefShadow = function (ref) { _this.shadowRef = ref; }; _this.handleChange = function (event) { _this.value = event.target.value; if (!_this.isControlled) { // The component is not controlled, we need to update the shallow value. _this.shadowRef.value = _this.value; _this.syncHeightWithShadow(); } if (_this.props.onChange) { _this.props.onChange(event); } }; _this.isControlled = props.value != null; // expects the components it renders to respond to 'value' // so that it can check whether they are filled. _this.value = props.value || props.defaultValue || ''; _this.state = { height: Number(props.rows) * ROWS_HEIGHT }; if (typeof window !== 'undefined') { _this.handleResize = (0, _debounce.default)(function () { _this.syncHeightWithShadow(); }, 166); // Corresponds to 10 frames at 60 Hz. } return _this; } (0, _createClass2.default)(Textarea, [{ key: "componentDidMount", value: function componentDidMount() { this.syncHeightWithShadow(); } }, { key: "componentDidUpdate", value: function componentDidUpdate() { this.syncHeightWithShadow(); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.handleResize.clear(); } }, { key: "syncHeightWithShadow", value: function syncHeightWithShadow() { var props = this.props; // Guarding for **broken** shallow rendering method that call componentDidMount // but doesn't handle refs correctly. // To remove once the shallow rendering has been fixed. if (!this.shadowRef) { return; } if (this.isControlled) { // The component is controlled, we need to update the shallow value. this.shadowRef.value = props.value == null ? '' : String(props.value); } var lineHeight = this.singlelineShadowRef.scrollHeight; // The Textarea might not be visible (p.ex: display: none). // In this case, the layout values read from the DOM will be 0. lineHeight = lineHeight === 0 ? ROWS_HEIGHT : lineHeight; var newHeight = this.shadowRef.scrollHeight; // Guarding for jsdom, where scrollHeight isn't present. // See https://github.com/tmpvar/jsdom/issues/1013 if (newHeight === undefined) { return; } if (Number(props.rowsMax) >= Number(props.rows)) { newHeight = Math.min(Number(props.rowsMax) * lineHeight, newHeight); } newHeight = Math.max(newHeight, lineHeight); // Need a large enough different to update the height. // This prevents infinite rendering loop. if (Math.abs(this.state.height - newHeight) > 1) { this.setState({ height: newHeight }); } } }, { key: "render", value: function render() { var _this$props = this.props, classes = _this$props.classes, className = _this$props.className, defaultValue = _this$props.defaultValue, onChange = _this$props.onChange, rows = _this$props.rows, rowsMax = _this$props.rowsMax, style = _this$props.style, textareaRef = _this$props.textareaRef, value = _this$props.value, other = (0, _objectWithoutProperties2.default)(_this$props, ["classes", "className", "defaultValue", "onChange", "rows", "rowsMax", "style", "textareaRef", "value"]); return _react.default.createElement("div", { className: classes.root }, _react.default.createElement(_reactEventListener.default, { target: "window", onResize: this.handleResize }), _react.default.createElement("textarea", { "aria-hidden": "true", className: (0, _classnames.default)(classes.textarea, classes.shadow), readOnly: true, ref: this.handleRefSinglelineShadow, rows: "1", tabIndex: -1, value: "" }), _react.default.createElement("textarea", { "aria-hidden": "true", className: (0, _classnames.default)(classes.textarea, classes.shadow), defaultValue: defaultValue, readOnly: true, ref: this.handleRefShadow, rows: rows, tabIndex: -1, value: value }), _react.default.createElement("textarea", (0, _extends2.default)({ rows: rows, className: (0, _classnames.default)(classes.textarea, className), defaultValue: defaultValue, value: value, onChange: this.handleChange, ref: this.handleRefInput, style: (0, _extends2.default)({ height: this.state.height }, style) }, other))); } }]); return Textarea; }(_react.default.Component); true ? Textarea.propTypes = { /** * Override or extend the styles applied to the component. * See [CSS API](#css-api) below for more details. */ classes: _propTypes.default.object.isRequired, /** * @ignore */ className: _propTypes.default.string, /** * @ignore */ defaultValue: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]), /** * @ignore */ disabled: _propTypes.default.bool, /** * @ignore */ onChange: _propTypes.default.func, /** * Number of rows to display when multiline option is set to true. */ rows: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]), /** * Maximum number of rows to display when multiline option is set to true. */ rowsMax: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]), /** * @ignore */ style: _propTypes.default.object, /** * Use that property to pass a ref callback to the native textarea element. */ textareaRef: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]), /** * @ignore */ value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]) } : undefined; Textarea.defaultProps = { rows: 1 }; var _default = (0, _withStyles.default)(styles, { name: 'MuiPrivateTextarea' })(Textarea); exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/InputBase/index.js": /*!***********************************************************!*\ !*** ./node_modules/@material-ui/core/InputBase/index.js ***! \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function get() { return _InputBase.default; } }); var _InputBase = _interopRequireDefault(__webpack_require__(/*! ./InputBase */ "./node_modules/@material-ui/core/InputBase/InputBase.js")); /***/ }), /***/ "./node_modules/@material-ui/core/InputBase/utils.js": /*!***********************************************************!*\ !*** ./node_modules/@material-ui/core/InputBase/utils.js ***! \***********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.hasValue = hasValue; exports.isFilled = isFilled; exports.isAdornedStart = isAdornedStart; // Supports determination of isControlled(). // Controlled input accepts its current value as a prop. // // @see https://facebook.github.io/react/docs/forms.html#controlled-components // @param value // @returns {boolean} true if string (including '') or number (including zero) function hasValue(value) { return value != null && !(Array.isArray(value) && value.length === 0); } // Determine if field is empty or filled. // Response determines if label is presented above field or as placeholder. // // @param obj // @param SSR // @returns {boolean} False when not present or empty string. // True when any number or string with length. function isFilled(obj) { var SSR = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; return obj && (hasValue(obj.value) && obj.value !== '' || SSR && hasValue(obj.defaultValue) && obj.defaultValue !== ''); } // Determine if an Input is adorned on start. // It's corresponding to the left with LTR. // // @param obj // @returns {boolean} False when no adornments. // True when adorned at the start. function isAdornedStart(obj) { return obj.startAdornment; } /***/ }), /***/ "./node_modules/@material-ui/core/InputLabel/InputLabel.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/InputLabel/InputLabel.js ***! \*****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.styles = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js")); var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js")); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js")); var _formControlState = _interopRequireDefault(__webpack_require__(/*! ../FormControl/formControlState */ "./node_modules/@material-ui/core/FormControl/formControlState.js")); var _withFormControlContext = _interopRequireDefault(__webpack_require__(/*! ../FormControl/withFormControlContext */ "./node_modules/@material-ui/core/FormControl/withFormControlContext.js")); var _withStyles = _interopRequireDefault(__webpack_require__(/*! ../styles/withStyles */ "./node_modules/@material-ui/core/styles/withStyles.js")); var _FormLabel = _interopRequireDefault(__webpack_require__(/*! ../FormLabel */ "./node_modules/@material-ui/core/FormLabel/index.js")); // @inheritedComponent FormLabel var styles = function styles(theme) { return { /* Styles applied to the root element. */ root: { transformOrigin: 'top left' }, /* Styles applied to the root element if `focused={true}`. */ focused: {}, /* Styles applied to the root element if `disabled={true}`. */ disabled: {}, /* Styles applied to the root element if `error={true}`. */ error: {}, /* Styles applied to the root element if `required={true}`. */ required: {}, /* Styles applied to the root element if the component is a descendant of `FormControl`. */ formControl: { position: 'absolute', left: 0, top: 0, // slight alteration to spec spacing to match visual spec result transform: 'translate(0, 24px) scale(1)' }, /* Styles applied to the root element if `margin="dense"`. */ marginDense: { // Compensation for the `Input.inputDense` style. transform: 'translate(0, 21px) scale(1)' }, /* Styles applied to the `input` element if `shrink={true}`. */ shrink: { transform: 'translate(0, 1.5px) scale(0.75)', transformOrigin: 'top left' }, /* Styles applied to the `input` element if `disableAnimation={false}`. */ animated: { transition: theme.transitions.create(['color', 'transform'], { duration: theme.transitions.duration.shorter, easing: theme.transitions.easing.easeOut }) }, /* Styles applied to the root element if `variant="filled"`. */ filled: { // Chrome's autofill feature gives the input field a yellow background. // Since the input field is behind the label in the HTML tree, // the input field is drawn last and hides the label with an opaque background color. // zIndex: 1 will raise the label above opaque background-colors of input. zIndex: 1, pointerEvents: 'none', transform: 'translate(12px, 20px) scale(1)', '&$marginDense': { transform: 'translate(12px, 17px) scale(1)' }, '&$shrink': { transform: 'translate(12px, 10px) scale(0.75)', '&$marginDense': { transform: 'translate(12px, 7px) scale(0.75)' } } }, /* Styles applied to the root element if `variant="outlined"`. */ outlined: { // see comment above on filled.zIndex zIndex: 1, pointerEvents: 'none', transform: 'translate(14px, 20px) scale(1)', '&$marginDense': { transform: 'translate(14px, 17px) scale(1)' }, '&$shrink': { transform: 'translate(14px, -6px) scale(0.75)' } } }; }; exports.styles = styles; function InputLabel(props) { var _classNames; var children = props.children, classes = props.classes, classNameProp = props.className, disableAnimation = props.disableAnimation, FormLabelClasses = props.FormLabelClasses, margin = props.margin, muiFormControl = props.muiFormControl, shrinkProp = props.shrink, variant = props.variant, other = (0, _objectWithoutProperties2.default)(props, ["children", "classes", "className", "disableAnimation", "FormLabelClasses", "margin", "muiFormControl", "shrink", "variant"]); var shrink = shrinkProp; if (typeof shrink === 'undefined' && muiFormControl) { shrink = muiFormControl.filled || muiFormControl.focused || muiFormControl.adornedStart; } var fcs = (0, _formControlState.default)({ props: props, muiFormControl: muiFormControl, states: ['margin', 'variant'] }); var className = (0, _classnames.default)(classes.root, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.formControl, muiFormControl), (0, _defineProperty2.default)(_classNames, classes.animated, !disableAnimation), (0, _defineProperty2.default)(_classNames, classes.shrink, shrink), (0, _defineProperty2.default)(_classNames, classes.marginDense, fcs.margin === 'dense'), (0, _defineProperty2.default)(_classNames, classes.filled, fcs.variant === 'filled'), (0, _defineProperty2.default)(_classNames, classes.outlined, fcs.variant === 'outlined'), _classNames), classNameProp); return _react.default.createElement(_FormLabel.default, (0, _extends2.default)({ "data-shrink": shrink, className: className, classes: (0, _extends2.default)({ focused: classes.focused, disabled: classes.disabled, error: classes.error, required: classes.required }, FormLabelClasses) }, other), children); } true ? InputLabel.propTypes = { /** * The contents of the `InputLabel`. */ children: _propTypes.default.node, /** * Override or extend the styles applied to the component. * See [CSS API](#css-api) below for more details. */ classes: _propTypes.default.object.isRequired, /** * @ignore */ className: _propTypes.default.string, /** * If `true`, the transition animation is disabled. */ disableAnimation: _propTypes.default.bool, /** * If `true`, apply disabled class. */ disabled: _propTypes.default.bool, /** * If `true`, the label will be displayed in an error state. */ error: _propTypes.default.bool, /** * If `true`, the input of this label is focused. */ focused: _propTypes.default.bool, /** * `classes` property applied to the [`FormLabel`](/api/form-label/) element. */ FormLabelClasses: _propTypes.default.object, /** * If `dense`, will adjust vertical spacing. This is normally obtained via context from * FormControl. */ margin: _propTypes.default.oneOf(['dense']), /** * @ignore */ muiFormControl: _propTypes.default.object, /** * if `true`, the label will indicate that the input is required. */ required: _propTypes.default.bool, /** * If `true`, the label is shrunk. */ shrink: _propTypes.default.bool, /** * The variant to use. */ variant: _propTypes.default.oneOf(['standard', 'outlined', 'filled']) } : undefined; InputLabel.defaultProps = { disableAnimation: false }; var _default = (0, _withStyles.default)(styles, { name: 'MuiInputLabel' })((0, _withFormControlContext.default)(InputLabel)); exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/InputLabel/index.js": /*!************************************************************!*\ !*** ./node_modules/@material-ui/core/InputLabel/index.js ***! \************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function get() { return _InputLabel.default; } }); var _InputLabel = _interopRequireDefault(__webpack_require__(/*! ./InputLabel */ "./node_modules/@material-ui/core/InputLabel/InputLabel.js")); /***/ }), /***/ "./node_modules/@material-ui/core/List/List.js": /*!*****************************************************!*\ !*** ./node_modules/@material-ui/core/List/List.js ***! \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.styles = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js")); var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js")); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js")); var _utils = __webpack_require__(/*! @material-ui/utils */ "./node_modules/@material-ui/utils/index.es.js"); var _withStyles = _interopRequireDefault(__webpack_require__(/*! ../styles/withStyles */ "./node_modules/@material-ui/core/styles/withStyles.js")); var _ListContext = _interopRequireDefault(__webpack_require__(/*! ./ListContext */ "./node_modules/@material-ui/core/List/ListContext.js")); var styles = { /* Styles applied to the root element. */ root: { listStyle: 'none', margin: 0, padding: 0, position: 'relative' }, /* Styles applied to the root element if `disablePadding={false}`. */ padding: { paddingTop: 8, paddingBottom: 8 }, /* Styles applied to the root element if `dense={true}` & `disablePadding={false}`. */ dense: { paddingTop: 4, paddingBottom: 4 }, /* Styles applied to the root element if a `subheader` is provided. */ subheader: { paddingTop: 0 } }; exports.styles = styles; function List(props) { var _classNames; var children = props.children, classes = props.classes, className = props.className, Component = props.component, dense = props.dense, disablePadding = props.disablePadding, subheader = props.subheader, other = (0, _objectWithoutProperties2.default)(props, ["children", "classes", "className", "component", "dense", "disablePadding", "subheader"]); return _react.default.createElement(Component, (0, _extends2.default)({ className: (0, _classnames.default)(classes.root, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.dense, dense && !disablePadding), (0, _defineProperty2.default)(_classNames, classes.padding, !disablePadding), (0, _defineProperty2.default)(_classNames, classes.subheader, subheader), _classNames), className) }, other), _react.default.createElement(_ListContext.default.Provider, { value: { dense: dense } }, subheader, children)); } true ? List.propTypes = { /** * The content of the component. */ children: _propTypes.default.node, /** * Override or extend the styles applied to the component. * See [CSS API](#css-api) below for more details. */ classes: _propTypes.default.object.isRequired, /** * @ignore */ className: _propTypes.default.string, /** * The component used for the root node. * Either a string to use a DOM element or a component. */ component: _utils.componentPropType, /** * If `true`, compact vertical padding designed for keyboard and mouse input will be used for * the list and list items. The property is available to descendant components as the * `dense` context. */ dense: _propTypes.default.bool, /** * If `true`, vertical padding will be removed from the list. */ disablePadding: _propTypes.default.bool, /** * The content of the subheader, normally `ListSubheader`. */ subheader: _propTypes.default.node } : undefined; List.defaultProps = { component: 'ul', dense: false, disablePadding: false }; var _default = (0, _withStyles.default)(styles, { name: 'MuiList' })(List); exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/List/ListContext.js": /*!************************************************************!*\ !*** ./node_modules/@material-ui/core/List/ListContext.js ***! \************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); /** * @ignore - internal component. */ var ListContext = _react.default.createContext({}); var _default = ListContext; exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/List/index.js": /*!******************************************************!*\ !*** ./node_modules/@material-ui/core/List/index.js ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function get() { return _List.default; } }); var _List = _interopRequireDefault(__webpack_require__(/*! ./List */ "./node_modules/@material-ui/core/List/List.js")); /***/ }), /***/ "./node_modules/@material-ui/core/ListItem/ListItem.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/ListItem/ListItem.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.styles = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js")); var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js")); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js")); var _utils = __webpack_require__(/*! @material-ui/utils */ "./node_modules/@material-ui/utils/index.es.js"); var _withStyles = _interopRequireDefault(__webpack_require__(/*! ../styles/withStyles */ "./node_modules/@material-ui/core/styles/withStyles.js")); var _ButtonBase = _interopRequireDefault(__webpack_require__(/*! ../ButtonBase */ "./node_modules/@material-ui/core/ButtonBase/index.js")); var _reactHelpers = __webpack_require__(/*! ../utils/reactHelpers */ "./node_modules/@material-ui/core/utils/reactHelpers.js"); var _MergeListContext = _interopRequireDefault(__webpack_require__(/*! ./MergeListContext */ "./node_modules/@material-ui/core/ListItem/MergeListContext.js")); var styles = function styles(theme) { return { /* Styles applied to the (normally root) `component` element. May be wrapped by a `container`. */ root: { display: 'flex', justifyContent: 'flex-start', alignItems: 'center', position: 'relative', textDecoration: 'none', width: '100%', boxSizing: 'border-box', textAlign: 'left', paddingTop: 11, // To use 10px in v4 paddingBottom: 11, // To use 10px in v4 '&$selected, &$selected:hover, &$selected:focus': { backgroundColor: theme.palette.action.selected } }, /* Styles applied to the `container` element if `children` includes `ListItemSecondaryAction`. */ container: { position: 'relative' }, // To remove in v4 /* Styles applied to the `component`'s `focusVisibleClassName` property if `button={true}`. */ focusVisible: {}, /* Legacy styles applied to the root element. Use `root` instead. */ default: {}, /* Styles applied to the `component` element if `dense={true}` or `children` includes `Avatar`. */ dense: { paddingTop: 8, paddingBottom: 8 }, /* Styles applied to the `component` element if `alignItems="flex-start"`. */ alignItemsFlexStart: { alignItems: 'flex-start' }, /* Styles applied to the inner `component` element if `disabled={true}`. */ disabled: { opacity: 0.5 }, /* Styles applied to the inner `component` element if `divider={true}`. */ divider: { borderBottom: "1px solid ".concat(theme.palette.divider), backgroundClip: 'padding-box' }, /* Styles applied to the inner `component` element if `disableGutters={false}`. */ gutters: { paddingLeft: 16, paddingRight: 16 }, /* Styles applied to the inner `component` element if `button={true}`. */ button: { transition: theme.transitions.create('background-color', { duration: theme.transitions.duration.shortest }), '&:hover': { textDecoration: 'none', backgroundColor: theme.palette.action.hover, // Reset on touch devices, it doesn't add specificity '@media (hover: none)': { backgroundColor: 'transparent' } }, '&:focus': { backgroundColor: theme.palette.action.hover } }, /* Styles applied to the `component` element if `children` includes `ListItemSecondaryAction`. */ secondaryAction: { // Add some space to avoid collision as `ListItemSecondaryAction` // is absolutely positioned. paddingRight: 32 }, /* Styles applied to the root element if `selected={true}`. */ selected: {} }; }; /** * Uses an additional container component if `ListItemSecondaryAction` is the last child. */ exports.styles = styles; function ListItem(props) { var alignItems = props.alignItems, button = props.button, childrenProp = props.children, classes = props.classes, classNameProp = props.className, componentProp = props.component, ContainerComponent = props.ContainerComponent, _props$ContainerProps = props.ContainerProps; _props$ContainerProps = _props$ContainerProps === void 0 ? {} : _props$ContainerProps; var ContainerClassName = _props$ContainerProps.className, ContainerProps = (0, _objectWithoutProperties2.default)(_props$ContainerProps, ["className"]), denseProp = props.dense, disabled = props.disabled, disableGutters = props.disableGutters, divider = props.divider, focusVisibleClassName = props.focusVisibleClassName, selected = props.selected, other = (0, _objectWithoutProperties2.default)(props, ["alignItems", "button", "children", "classes", "className", "component", "ContainerComponent", "ContainerProps", "dense", "disabled", "disableGutters", "divider", "focusVisibleClassName", "selected"]); return _react.default.createElement(_MergeListContext.default, { dense: denseProp, alignItems: alignItems }, function (_ref) { var _classNames; var dense = _ref.dense; var children = _react.default.Children.toArray(childrenProp); var hasAvatar = children.some(function (value) { return (0, _reactHelpers.isMuiElement)(value, ['ListItemAvatar']); }); var hasSecondaryAction = children.length && (0, _reactHelpers.isMuiElement)(children[children.length - 1], ['ListItemSecondaryAction']); var className = (0, _classnames.default)(classes.root, classes.default, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.dense, dense || hasAvatar), (0, _defineProperty2.default)(_classNames, classes.gutters, !disableGutters), (0, _defineProperty2.default)(_classNames, classes.divider, divider), (0, _defineProperty2.default)(_classNames, classes.disabled, disabled), (0, _defineProperty2.default)(_classNames, classes.button, button), (0, _defineProperty2.default)(_classNames, classes.alignItemsFlexStart, alignItems === 'flex-start'), (0, _defineProperty2.default)(_classNames, classes.secondaryAction, hasSecondaryAction), (0, _defineProperty2.default)(_classNames, classes.selected, selected), _classNames), classNameProp); var componentProps = (0, _extends2.default)({ className: className, disabled: disabled }, other); var Component = componentProp || 'li'; if (button) { componentProps.component = componentProp || 'div'; componentProps.focusVisibleClassName = (0, _classnames.default)(classes.focusVisible, focusVisibleClassName); Component = _ButtonBase.default; } if (hasSecondaryAction) { // Use div by default. Component = !componentProps.component && !componentProp ? 'div' : Component; // Avoid nesting of li > li. if (ContainerComponent === 'li') { if (Component === 'li') { Component = 'div'; } else if (componentProps.component === 'li') { componentProps.component = 'div'; } } return _react.default.createElement(ContainerComponent, (0, _extends2.default)({ className: (0, _classnames.default)(classes.container, ContainerClassName) }, ContainerProps), _react.default.createElement(Component, componentProps, children), children.pop()); } return _react.default.createElement(Component, componentProps, children); }); } true ? ListItem.propTypes = { /** * Defines the `align-items` style property. */ alignItems: _propTypes.default.oneOf(['flex-start', 'center']), /** * If `true`, the list item will be a button (using `ButtonBase`). */ button: _propTypes.default.bool, /** * The content of the component. If a `ListItemSecondaryAction` is used it must * be the last child. */ children: (0, _utils.chainPropTypes)(_propTypes.default.node, function (props) { var children = _react.default.Children.toArray(props.children); // React.Children.toArray(props.children).findLastIndex(isListItemSecondaryAction) var secondaryActionIndex = -1; for (var i = children.length - 1; i >= 0; i -= 1) { var child = children[i]; if ((0, _reactHelpers.isMuiElement)(child, ['ListItemSecondaryAction'])) { secondaryActionIndex = i; break; } } // is ListItemSecondaryAction the last child of ListItem if (secondaryActionIndex !== -1 && secondaryActionIndex !== children.length - 1) { return new Error('Material-UI: you used an element after ListItemSecondaryAction. ' + 'For ListItem to detect that it has a secondary action ' + "you must pass it has the last children to ListItem.".concat( false ? undefined : '')); } return null; }), /** * Override or extend the styles applied to the component. * See [CSS API](#css-api) below for more details. */ classes: _propTypes.default.object.isRequired, /** * @ignore */ className: _propTypes.default.string, /** * The component used for the root node. * Either a string to use a DOM element or a component. * By default, it's a `li` when `button` is `false` and a `div` when `button` is `true`. */ component: _utils.componentPropType, /** * The container component used when a `ListItemSecondaryAction` is the last child. */ ContainerComponent: _utils.componentPropType, /** * Properties applied to the container component if used. */ ContainerProps: _propTypes.default.object, /** * If `true`, compact vertical padding designed for keyboard and mouse input will be used. */ dense: _propTypes.default.bool, /** * If `true`, the list item will be disabled. */ disabled: _propTypes.default.bool, /** * If `true`, the left and right padding is removed. */ disableGutters: _propTypes.default.bool, /** * If `true`, a 1px light border is added to the bottom of the list item. */ divider: _propTypes.default.bool, /** * @ignore */ focusVisibleClassName: _propTypes.default.string, /** * Use to apply selected styling. */ selected: _propTypes.default.bool } : undefined; ListItem.defaultProps = { alignItems: 'center', button: false, ContainerComponent: 'li', dense: false, disabled: false, disableGutters: false, divider: false, selected: false }; var _default = (0, _withStyles.default)(styles, { name: 'MuiListItem' })(ListItem); exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/ListItem/MergeListContext.js": /*!*********************************************************************!*\ !*** ./node_modules/@material-ui/core/ListItem/MergeListContext.js ***! \*********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _ListContext = _interopRequireDefault(__webpack_require__(/*! ../List/ListContext */ "./node_modules/@material-ui/core/List/ListContext.js")); /** * @ignore - internal component. * * Consumes a context and passes that context merged with its props. */ function MergeListContext(props) { var alignItems = props.alignItems, children = props.children, dense = props.dense; return _react.default.createElement(_ListContext.default.Consumer, null, function (context) { var childContext = { dense: dense || context.dense || false, alignItems: alignItems }; return _react.default.createElement(_ListContext.default.Provider, { value: childContext }, children(childContext)); }); } true ? MergeListContext.propTypes = { alignItems: _propTypes.default.oneOf(['flex-start', 'center']).isRequired, children: _propTypes.default.func.isRequired, dense: _propTypes.default.bool.isRequired } : undefined; var _default = MergeListContext; exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/ListItem/index.js": /*!**********************************************************!*\ !*** ./node_modules/@material-ui/core/ListItem/index.js ***! \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function get() { return _ListItem.default; } }); var _ListItem = _interopRequireDefault(__webpack_require__(/*! ./ListItem */ "./node_modules/@material-ui/core/ListItem/ListItem.js")); /***/ }), /***/ "./node_modules/@material-ui/core/Menu/Menu.js": /*!*****************************************************!*\ !*** ./node_modules/@material-ui/core/Menu/Menu.js ***! \*****************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.styles = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js")); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js")); var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); var _getPrototypeOf3 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js")); var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _reactDom = _interopRequireDefault(__webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js")); var _scrollbarSize = _interopRequireDefault(__webpack_require__(/*! dom-helpers/util/scrollbarSize */ "./node_modules/dom-helpers/util/scrollbarSize.js")); var _withStyles = _interopRequireDefault(__webpack_require__(/*! ../styles/withStyles */ "./node_modules/@material-ui/core/styles/withStyles.js")); var _Popover = _interopRequireDefault(__webpack_require__(/*! ../Popover */ "./node_modules/@material-ui/core/Popover/index.js")); var _MenuList = _interopRequireDefault(__webpack_require__(/*! ../MenuList */ "./node_modules/@material-ui/core/MenuList/index.js")); // @inheritedComponent Popover var RTL_ORIGIN = { vertical: 'top', horizontal: 'right' }; var LTR_ORIGIN = { vertical: 'top', horizontal: 'left' }; var styles = { /* Styles applied to the `Paper` component. */ paper: { // specZ: The maximum height of a simple menu should be one or more rows less than the view // height. This ensures a tapable area outside of the simple menu with which to dismiss // the menu. maxHeight: 'calc(100% - 96px)', // Add iOS momentum scrolling. WebkitOverflowScrolling: 'touch' } }; exports.styles = styles; var Menu = /*#__PURE__*/ function (_React$Component) { (0, _inherits2.default)(Menu, _React$Component); function Menu() { var _getPrototypeOf2; var _this; (0, _classCallCheck2.default)(this, Menu); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = (0, _possibleConstructorReturn2.default)(this, (_getPrototypeOf2 = (0, _getPrototypeOf3.default)(Menu)).call.apply(_getPrototypeOf2, [this].concat(args))); _this.getContentAnchorEl = function () { if (_this.menuListRef.selectedItemRef) { return _reactDom.default.findDOMNode(_this.menuListRef.selectedItemRef); } return _reactDom.default.findDOMNode(_this.menuListRef).firstChild; }; _this.focus = function () { if (_this.menuListRef && _this.menuListRef.selectedItemRef) { _reactDom.default.findDOMNode(_this.menuListRef.selectedItemRef).focus(); return; } var menuList = _reactDom.default.findDOMNode(_this.menuListRef); if (menuList && menuList.firstChild) { menuList.firstChild.focus(); } }; _this.handleMenuListRef = function (ref) { _this.menuListRef = ref; }; _this.handleEntering = function (element) { var _this$props = _this.props, disableAutoFocusItem = _this$props.disableAutoFocusItem, theme = _this$props.theme; var menuList = _reactDom.default.findDOMNode(_this.menuListRef); // Focus so the scroll computation of the Popover works as expected. if (disableAutoFocusItem !== true) { _this.focus(); } // Let's ignore that piece of logic if users are already overriding the width // of the menu. if (menuList && element.clientHeight < menuList.clientHeight && !menuList.style.width) { var size = "".concat((0, _scrollbarSize.default)(), "px"); menuList.style[theme.direction === 'rtl' ? 'paddingLeft' : 'paddingRight'] = size; menuList.style.width = "calc(100% + ".concat(size, ")"); } if (_this.props.onEntering) { _this.props.onEntering(element); } }; _this.handleListKeyDown = function (event) { if (event.key === 'Tab') { event.preventDefault(); if (_this.props.onClose) { _this.props.onClose(event, 'tabKeyDown'); } } }; return _this; } (0, _createClass2.default)(Menu, [{ key: "componentDidMount", value: function componentDidMount() { if (this.props.open && this.props.disableAutoFocusItem !== true) { this.focus(); } } }, { key: "render", value: function render() { var _this$props2 = this.props, children = _this$props2.children, classes = _this$props2.classes, disableAutoFocusItem = _this$props2.disableAutoFocusItem, MenuListProps = _this$props2.MenuListProps, onEntering = _this$props2.onEntering, _this$props2$PaperPro = _this$props2.PaperProps, PaperProps = _this$props2$PaperPro === void 0 ? {} : _this$props2$PaperPro, PopoverClasses = _this$props2.PopoverClasses, theme = _this$props2.theme, other = (0, _objectWithoutProperties2.default)(_this$props2, ["children", "classes", "disableAutoFocusItem", "MenuListProps", "onEntering", "PaperProps", "PopoverClasses", "theme"]); return _react.default.createElement(_Popover.default, (0, _extends2.default)({ getContentAnchorEl: this.getContentAnchorEl, classes: PopoverClasses, onEntering: this.handleEntering, anchorOrigin: theme.direction === 'rtl' ? RTL_ORIGIN : LTR_ORIGIN, transformOrigin: theme.direction === 'rtl' ? RTL_ORIGIN : LTR_ORIGIN, PaperProps: (0, _extends2.default)({}, PaperProps, { classes: (0, _extends2.default)({}, PaperProps.classes, { root: classes.paper }) }) }, other), _react.default.createElement(_MenuList.default, (0, _extends2.default)({ onKeyDown: this.handleListKeyDown }, MenuListProps, { ref: this.handleMenuListRef }), children)); } }]); return Menu; }(_react.default.Component); true ? Menu.propTypes = { /** * The DOM element used to set the position of the menu. */ anchorEl: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.func]), /** * Menu contents, normally `MenuItem`s. */ children: _propTypes.default.node, /** * Override or extend the styles applied to the component. * See [CSS API](#css-api) below for more details. */ classes: _propTypes.default.object.isRequired, /** * If `true`, the selected / first menu item will not be auto focused. */ disableAutoFocusItem: _propTypes.default.bool, /** * Properties applied to the [`MenuList`](/api/menu-list/) element. */ MenuListProps: _propTypes.default.object, /** * Callback fired when the component requests to be closed. * * @param {object} event The event source of the callback * @param {string} reason Can be:`"escapeKeyDown"`, `"backdropClick"`, `"tabKeyDown"` */ onClose: _propTypes.default.func, /** * Callback fired before the Menu enters. */ onEnter: _propTypes.default.func, /** * Callback fired when the Menu has entered. */ onEntered: _propTypes.default.func, /** * Callback fired when the Menu is entering. */ onEntering: _propTypes.default.func, /** * Callback fired before the Menu exits. */ onExit: _propTypes.default.func, /** * Callback fired when the Menu has exited. */ onExited: _propTypes.default.func, /** * Callback fired when the Menu is exiting. */ onExiting: _propTypes.default.func, /** * If `true`, the menu is visible. */ open: _propTypes.default.bool.isRequired, /** * @ignore */ PaperProps: _propTypes.default.object, /** * `classes` property applied to the [`Popover`](/api/popover/) element. */ PopoverClasses: _propTypes.default.object, /** * @ignore */ theme: _propTypes.default.object.isRequired, /** * The length of the transition in `ms`, or 'auto' */ transitionDuration: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({ enter: _propTypes.default.number, exit: _propTypes.default.number }), _propTypes.default.oneOf(['auto'])]) } : undefined; Menu.defaultProps = { disableAutoFocusItem: false, transitionDuration: 'auto' }; var _default = (0, _withStyles.default)(styles, { name: 'MuiMenu', withTheme: true })(Menu); exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/MenuList/MenuList.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/MenuList/MenuList.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js")); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js")); var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); var _getPrototypeOf3 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js")); var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _reactDom = _interopRequireDefault(__webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js")); var _warning = _interopRequireDefault(__webpack_require__(/*! warning */ "./node_modules/warning/warning.js")); var _ownerDocument = _interopRequireDefault(__webpack_require__(/*! ../utils/ownerDocument */ "./node_modules/@material-ui/core/utils/ownerDocument.js")); var _List = _interopRequireDefault(__webpack_require__(/*! ../List */ "./node_modules/@material-ui/core/List/index.js")); // @inheritedComponent List var MenuList = /*#__PURE__*/ function (_React$Component) { (0, _inherits2.default)(MenuList, _React$Component); function MenuList() { var _getPrototypeOf2; var _this; (0, _classCallCheck2.default)(this, MenuList); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = (0, _possibleConstructorReturn2.default)(this, (_getPrototypeOf2 = (0, _getPrototypeOf3.default)(MenuList)).call.apply(_getPrototypeOf2, [this].concat(args))); _this.state = { currentTabIndex: null }; _this.handleBlur = function (event) { _this.blurTimer = setTimeout(function () { if (_this.listRef) { var list = _this.listRef; var currentFocus = (0, _ownerDocument.default)(list).activeElement; if (!list.contains(currentFocus)) { _this.resetTabIndex(); } } }, 30); if (_this.props.onBlur) { _this.props.onBlur(event); } }; _this.handleKeyDown = function (event) { var list = _this.listRef; var key = event.key; var currentFocus = (0, _ownerDocument.default)(list).activeElement; if ((key === 'ArrowUp' || key === 'ArrowDown') && (!currentFocus || currentFocus && !list.contains(currentFocus))) { if (_this.selectedItemRef) { _this.selectedItemRef.focus(); } else { list.firstChild.focus(); } } else if (key === 'ArrowDown') { event.preventDefault(); if (currentFocus.nextElementSibling) { currentFocus.nextElementSibling.focus(); } else if (!_this.props.disableListWrap) { list.firstChild.focus(); } } else if (key === 'ArrowUp') { event.preventDefault(); if (currentFocus.previousElementSibling) { currentFocus.previousElementSibling.focus(); } else if (!_this.props.disableListWrap) { list.lastChild.focus(); } } else if (key === 'Home') { event.preventDefault(); list.firstChild.focus(); } else if (key === 'End') { event.preventDefault(); list.lastChild.focus(); } if (_this.props.onKeyDown) { _this.props.onKeyDown(event); } }; _this.handleItemFocus = function (event) { var list = _this.listRef; if (list) { for (var i = 0; i < list.children.length; i += 1) { if (list.children[i] === event.currentTarget) { _this.setTabIndex(i); break; } } } }; return _this; } (0, _createClass2.default)(MenuList, [{ key: "componentDidMount", value: function componentDidMount() { this.resetTabIndex(); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { clearTimeout(this.blurTimer); } }, { key: "setTabIndex", value: function setTabIndex(index) { this.setState({ currentTabIndex: index }); } }, { key: "focus", value: function focus() { var currentTabIndex = this.state.currentTabIndex; var list = this.listRef; if (!list || !list.children || !list.firstChild) { return; } if (currentTabIndex && currentTabIndex >= 0) { list.children[currentTabIndex].focus(); } else { list.firstChild.focus(); } } }, { key: "resetTabIndex", value: function resetTabIndex() { var list = this.listRef; var currentFocus = (0, _ownerDocument.default)(list).activeElement; var items = []; for (var i = 0; i < list.children.length; i += 1) { items.push(list.children[i]); } var currentFocusIndex = items.indexOf(currentFocus); if (currentFocusIndex !== -1) { return this.setTabIndex(currentFocusIndex); } if (this.selectedItemRef) { return this.setTabIndex(items.indexOf(this.selectedItemRef)); } return this.setTabIndex(0); } }, { key: "render", value: function render() { var _this2 = this; var _this$props = this.props, children = _this$props.children, className = _this$props.className, onBlur = _this$props.onBlur, onKeyDown = _this$props.onKeyDown, disableListWrap = _this$props.disableListWrap, other = (0, _objectWithoutProperties2.default)(_this$props, ["children", "className", "onBlur", "onKeyDown", "disableListWrap"]); return _react.default.createElement(_List.default, (0, _extends2.default)({ role: "menu", ref: function ref(_ref) { _this2.listRef = _reactDom.default.findDOMNode(_ref); }, className: className, onKeyDown: this.handleKeyDown, onBlur: this.handleBlur }, other), _react.default.Children.map(children, function (child, index) { if (!_react.default.isValidElement(child)) { return null; } true ? (0, _warning.default)(child.type !== _react.default.Fragment, ["Material-UI: the MenuList component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n')) : undefined; return _react.default.cloneElement(child, { tabIndex: index === _this2.state.currentTabIndex ? 0 : -1, ref: child.props.selected ? function (ref) { _this2.selectedItemRef = _reactDom.default.findDOMNode(ref); } : undefined, onFocus: _this2.handleItemFocus }); })); } }]); return MenuList; }(_react.default.Component); true ? MenuList.propTypes = { /** * MenuList contents, normally `MenuItem`s. */ children: _propTypes.default.node, /** * @ignore */ className: _propTypes.default.string, /** * If `true`, the menu items will not wrap focus. */ disableListWrap: _propTypes.default.bool, /** * @ignore */ onBlur: _propTypes.default.func, /** * @ignore */ onKeyDown: _propTypes.default.func } : undefined; MenuList.defaultProps = { disableListWrap: false }; var _default = MenuList; exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/MenuList/index.js": /*!**********************************************************!*\ !*** ./node_modules/@material-ui/core/MenuList/index.js ***! \**********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function get() { return _MenuList.default; } }); var _MenuList = _interopRequireDefault(__webpack_require__(/*! ./MenuList */ "./node_modules/@material-ui/core/MenuList/MenuList.js")); /***/ }), /***/ "./node_modules/@material-ui/core/Modal/Modal.js": /*!*******************************************************!*\ !*** ./node_modules/@material-ui/core/Modal/Modal.js ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.styles = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js")); var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js")); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js")); var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js")); var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js")); var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js")); var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _reactDom = _interopRequireDefault(__webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "./node_modules/classnames/index.js")); var _warning = _interopRequireDefault(__webpack_require__(/*! warning */ "./node_modules/warning/warning.js")); var _utils = __webpack_require__(/*! @material-ui/utils */ "./node_modules/@material-ui/utils/index.es.js"); var _ownerDocument = _interopRequireDefault(__webpack_require__(/*! ../utils/ownerDocument */ "./node_modules/@material-ui/core/utils/ownerDocument.js")); var _RootRef = _interopRequireDefault(__webpack_require__(/*! ../RootRef */ "./node_modules/@material-ui/core/RootRef/index.js")); var _Portal = _interopRequireDefault(__webpack_require__(/*! ../Portal */ "./node_modules/@material-ui/core/Portal/index.js")); var _helpers = __webpack_require__(/*! ../utils/helpers */ "./node_modules/@material-ui/core/utils/helpers.js"); var _withStyles = _interopRequireDefault(__webpack_require__(/*! ../styles/withStyles */ "./node_modules/@material-ui/core/styles/withStyles.js")); var _ModalManager = _interopRequireDefault(__webpack_require__(/*! ./ModalManager */ "./node_modules/@material-ui/core/Modal/ModalManager.js")); var _Backdrop = _interopRequireDefault(__webpack_require__(/*! ../Backdrop */ "./node_modules/@material-ui/core/Backdrop/index.js")); var _manageAriaHidden = __webpack_require__(/*! ./manageAriaHidden */ "./node_modules/@material-ui/core/Modal/manageAriaHidden.js"); function getContainer(container, defaultContainer) { container = typeof container === 'function' ? container() : container; return _reactDom.default.findDOMNode(container) || defaultContainer; } function getHasTransition(props) { return props.children ? props.children.props.hasOwnProperty('in') : false; } var styles = function styles(theme) { return { /* Styles applied to the root element. */ root: { position: 'fixed', zIndex: theme.zIndex.modal, right: 0, bottom: 0, top: 0, left: 0 }, /* Styles applied to the root element if the `Modal` has exited. */ hidden: { visibility: 'hidden' } }; }; /* istanbul ignore if */ exports.styles = styles; if ( true && !_react.default.createContext) { throw new Error('Material-UI: react@16.3.0 or greater is required.'); } /** * Modal is a lower-level construct that is leveraged by the following components: * * - [Dialog](/api/dialog/) * - [Drawer](/api/drawer/) * - [Menu](/api/menu/) * - [Popover](/api/popover/) * * If you are creating a modal dialog, you probably want to use the [Dialog](/api/dialog/) component * rather than directly using Modal. * * This component shares many concepts with [react-overlays](https://react-bootstrap.github.io/react-overlays/#modals). */ var Modal = /*#__PURE__*/ function (_React$Component) { (0, _inherits2.default)(Modal, _React$Component); function Modal(props) { var _this; (0, _classCallCheck2.default)(this, Modal); _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(Modal).call(this)); _this.mounted = false; _this.handleOpen = function () { var doc = (0, _ownerDocument.default)(_this.mountNode); var container = getContainer(_this.props.container, doc.body); _this.props.manager.add((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), container); doc.addEventListener('focus', _this.enforceFocus, true); if (_this.dialogRef) { _this.handleOpened(); } }; _this.handleRendered = function () { if (_this.props.onRendered) { _this.props.onRendered(); } if (_this.props.open) { _this.handleOpened(); } else { (0, _manageAriaHidden.ariaHidden)(_this.modalRef, true); } }; _this.handleOpened = function () { _this.autoFocus(); _this.props.manager.mount((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this))); // Fix a bug on Chrome where the scroll isn't initially 0. _this.modalRef.scrollTop = 0; }; _this.handleClose = function (reason) { var hasTransition = getHasTransition(_this.props); /* If the component does not have a transition or is unmounting remove the Modal otherwise let the transition handle removing the style, this prevents elements moving around when the Modal is closed. */ if (!(hasTransition && _this.props.closeAfterTransition) || reason === 'unmount') { _this.props.manager.remove((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this))); } var doc = (0, _ownerDocument.default)(_this.mountNode); doc.removeEventListener('focus', _this.enforceFocus, true); _this.restoreLastFocus(); }; _this.handleExited = function () { if (_this.props.closeAfterTransition) { _this.props.manager.remove((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this))); } _this.setState({ exited: true }); }; _this.handleBackdropClick = function (event) { if (event.target !== event.currentTarget) { return; } if (_this.props.onBackdropClick) { _this.props.onBackdropClick(event); } if (!_this.props.disableBackdropClick && _this.props.onClose) { _this.props.onClose(event, 'backdropClick'); } }; _this.handleKeyDown = function (event) { // event.defaultPrevented: // // Ignore events that have been `event.preventDefault()` marked. // preventDefault() is meant to stop default behaviours like // clicking a checkbox to check it, hitting a button to submit a form, // and hitting left arrow to move the cursor in a text input etc. // Only special HTML elements have these default bahaviours. // // To remove in v4. if (event.key !== 'Escape' || !_this.isTopModal() || event.defaultPrevented) { return; } // Swallow the event, in case someone is listening for the escape key on the body. event.stopPropagation(); if (_this.props.onEscapeKeyDown) { _this.props.onEscapeKeyDown(event); } if (!_this.props.disableEscapeKeyDown && _this.props.onClose) { _this.props.onClose(event, 'escapeKeyDown'); } }; _this.enforceFocus = function () { // The Modal might not already be mounted. if (!_this.isTopModal() || _this.props.disableEnforceFocus || !_this.mounted || !_this.dialogRef) { return; } var currentActiveElement = (0, _ownerDocument.default)(_this.mountNode).activeElement; if (!_this.dialogRef.contains(currentActiveElement)) { _this.dialogRef.focus(); } }; _this.handlePortalRef = function (ref) { _this.mountNode = ref ? ref.getMountNode() : ref; }; _this.handleModalRef = function (ref) { _this.modalRef = ref; }; _this.onRootRef = function (ref) { _this.dialogRef = ref; }; _this.state = { exited: !props.open }; return _this; } (0, _createClass2.default)(Modal, [{ key: "componentDidMount", value: function componentDidMount() { this.mounted = true; if (this.props.open) { this.handleOpen(); } } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { if (prevProps.open && !this.props.open) { this.handleClose(); } else if (!prevProps.open && this.props.open) { this.lastFocus = (0, _ownerDocument.default)(this.mountNode).activeElement; this.handleOpen(); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.mounted = false; if (this.props.open || getHasTransition(this.props) && !this.state.exited) { this.handleClose('unmount'); } } }, { key: "autoFocus", value: function autoFocus() { // We might render an empty child. if (this.props.disableAutoFocus || !this.dialogRef) { return; } var currentActiveElement = (0, _ownerDocument.default)(this.mountNode).activeElement; if (!this.dialogRef.contains(currentActiveElement)) { if (!this.dialogRef.hasAttribute('tabIndex')) { true ? (0, _warning.default)(false, ['Material-UI: the modal content node does not accept focus.', 'For the benefit of assistive technologies, ' + 'the tabIndex of the node is being set to "-1".'].join('\n')) : undefined; this.dialogRef.setAttribute('tabIndex', -1); } this.lastFocus = currentActiveElement; this.dialogRef.focus(); } } }, { key: "restoreLastFocus", value: function restoreLastFocus() { if (this.props.disableRestoreFocus || !this.lastFocus) { return; } // Not all elements in IE 11 have a focus method. // Because IE 11 market share is low, we accept the restore focus being broken // and we silent the issue. if (this.lastFocus.focus) { this.lastFocus.focus(); } this.lastFocus = null; } }, { key: "isTopModal", value: function isTopModal() { return this.props.manager.isTopModal(this); } }, { key: "render", value: function render() { var _this$props = this.props, BackdropComponent = _this$props.BackdropComponent, BackdropProps = _this$props.BackdropProps, children = _this$props.children, classes = _this$props.classes, className = _this$props.className, closeAfterTransition = _this$props.closeAfterTransition, container = _this$props.container, disableAutoFocus = _this$props.disableAutoFocus, disableBackdropClick = _this$props.disableBackdropClick, disableEnforceFocus = _this$props.disableEnforceFocus, disableEscapeKeyDown = _this$props.disableEscapeKeyDown, disablePortal = _this$props.disablePortal, disableRestoreFocus = _this$props.disableRestoreFocus, hideBackdrop = _this$props.hideBackdrop, keepMounted = _this$props.keepMounted, manager = _this$props.manager, onBackdropClick = _this$props.onBackdropClick, onClose = _this$props.onClose, onEscapeKeyDown = _this$props.onEscapeKeyDown, onRendered = _this$props.onRendered, open = _this$props.open, other = (0, _objectWithoutProperties2.default)(_this$props, ["BackdropComponent", "BackdropProps", "children", "classes", "className", "closeAfterTransition", "container", "disableAutoFocus", "disableBackdropClick", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "hideBackdrop", "keepMounted", "manager", "onBackdropClick", "onClose", "onEscapeKeyDown", "onRendered", "open"]); var exited = this.state.exited; var hasTransition = getHasTransition(this.props); if (!keepMounted && !open && (!hasTransition || exited)) { return null; } var childProps = {}; // It's a Transition like component if (hasTransition) { childProps.onExited = (0, _helpers.createChainedFunction)(this.handleExited, children.props.onExited); } if (children.props.role === undefined) { childProps.role = children.props.role || 'document'; } if (children.props.tabIndex === undefined) { childProps.tabIndex = children.props.tabIndex || '-1'; } return _react.default.createElement(_Portal.default, { ref: this.handlePortalRef, container: container, disablePortal: disablePortal, onRendered: this.handleRendered }, _react.default.createElement("div", (0, _extends2.default)({ ref: this.handleModalRef, onKeyDown: this.handleKeyDown, role: "presentation", className: (0, _classnames.default)(classes.root, className, (0, _defineProperty2.default)({}, classes.hidden, exited)) }, other), hideBackdrop ? null : _react.default.createElement(BackdropComponent, (0, _extends2.default)({ open: open, onClick: this.handleBackdropClick }, BackdropProps)), _react.default.createElement(_RootRef.default, { rootRef: this.onRootRef }, _react.default.cloneElement(children, childProps)))); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps) { if (nextProps.open) { return { exited: false }; } if (!getHasTransition(nextProps)) { // Otherwise let handleExited take care of marking exited. return { exited: true }; } return null; } }]); return Modal; }(_react.default.Component); true ? Modal.propTypes = { /** * A backdrop component. This property enables custom backdrop rendering. */ BackdropComponent: _utils.componentPropType, /** * Properties applied to the [`Backdrop`](/api/backdrop/) element. */ BackdropProps: _propTypes.default.object, /** * A single child content element. */ children: _propTypes.default.element, /** * Override or extend the styles applied to the component. * See [CSS API](#css-api) below for more details. */ classes: _propTypes.default.object.isRequired, /** * @ignore */ className: _propTypes.default.string, /** * When set to true the Modal waits until a nested Transition is completed before closing. */ closeAfterTransition: _propTypes.default.bool, /** * A node, component instance, or function that returns either. * The `container` will have the portal children appended to it. */ container: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.func]), /** * If `true`, the modal will not automatically shift focus to itself when it opens, and * replace it to the last focused element when it closes. * This also works correctly with any modal children that have the `disableAutoFocus` prop. * * Generally this should never be set to `true` as it makes the modal less * accessible to assistive technologies, like screen readers. */ disableAutoFocus: _propTypes.default.bool, /** * If `true`, clicking the backdrop will not fire any callback. */ disableBackdropClick: _propTypes.default.bool, /** * If `true`, the modal will not prevent focus from leaving the modal while open. * * Generally this should never be set to `true` as it makes the modal less * accessible to assistive technologies, like screen readers. */ disableEnforceFocus: _propTypes.default.bool, /** * If `true`, hitting escape will not fire any callback. */ disableEscapeKeyDown: _propTypes.default.bool, /** * Disable the portal behavior. * The children stay within it's parent DOM hierarchy. */ disablePortal: _propTypes.default.bool, /** * If `true`, the modal will not restore focus to previously focused element once * modal is hidden. */ disableRestoreFocus: _propTypes.default.bool, /** * If `true`, the backdrop is not rendered. */ hideBackdrop: _propTypes.default.bool, /** * Always keep the children in the DOM. * This property can be useful in SEO situation or * when you want to maximize the responsiveness of the Modal. */ keepMounted: _propTypes.default.bool, /** * @ignore * * A modal manager used to track and manage the state of open * Modals. This enables customizing how modals interact within a container. */ manager: _propTypes.default.object, /** * Callback fired when the backdrop is clicked. */ onBackdropClick: _propTypes.default.func, /** * Callback fired when the component requests to be closed. * The `reason` parameter can optionally be used to control the response to `onClose`. * * @param {object} event The event source of the callback * @param {string} reason Can be:`"escapeKeyDown"`, `"backdropClick"` */ onClose: _propTypes.default.func, /** * Callback fired when the escape key is pressed, * `disableEscapeKeyDown` is false and the modal is in focus. */ onEscapeKeyDown: _propTypes.default.func, /** * Callback fired once the children has been mounted into the `container`. * It signals that the `open={true}` property took effect. */ onRendered: _propTypes.default.func, /** * If `true`, the modal is open. */ open: _propTypes.default.bool.isRequired } : undefined; Modal.defaultProps = { BackdropComponent: _Backdrop.default, closeAfterTransition: false, disableAutoFocus: false, disableBackdropClick: false, disableEnforceFocus: false, disableEscapeKeyDown: false, disablePortal: false, disableRestoreFocus: false, hideBackdrop: false, keepMounted: false, // Modals don't open on the server so this won't conflict with concurrent requests. manager: new _ModalManager.default() }; var _default = (0, _withStyles.default)(styles, { flip: false, name: 'MuiModal' })(Modal); exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/Modal/ModalManager.js": /*!**************************************************************!*\ !*** ./node_modules/@material-ui/core/Modal/ModalManager.js ***! \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js")); var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js")); var _style = _interopRequireDefault(__webpack_require__(/*! dom-helpers/style */ "./node_modules/dom-helpers/style/index.js")); var _scrollbarSize = _interopRequireDefault(__webpack_require__(/*! dom-helpers/util/scrollbarSize */ "./node_modules/dom-helpers/util/scrollbarSize.js")); var _ownerDocument = _interopRequireDefault(__webpack_require__(/*! ../utils/ownerDocument */ "./node_modules/@material-ui/core/utils/ownerDocument.js")); var _isOverflowing = _interopRequireDefault(__webpack_require__(/*! ./isOverflowing */ "./node_modules/@material-ui/core/Modal/isOverflowing.js")); var _manageAriaHidden = __webpack_require__(/*! ./manageAriaHidden */ "./node_modules/@material-ui/core/Modal/manageAriaHidden.js"); function findIndexOf(data, callback) { var idx = -1; data.some(function (item, index) { if (callback(item)) { idx = index; return true; } return false; }); return idx; } function getPaddingRight(node) { return parseInt((0, _style.default)(node, 'paddingRight') || 0, 10); } function setContainerStyle(data) { // We are only interested in the actual `style` here because we will override it. data.style = { overflow: data.container.style.overflow, paddingRight: data.container.style.paddingRight }; var style = { overflow: 'hidden' }; if (data.overflowing) { var scrollbarSize = (0, _scrollbarSize.default)(); // Use computed style, here to get the real padding to add our scrollbar width. style.paddingRight = "".concat(getPaddingRight(data.container) + scrollbarSize, "px"); // .mui-fixed is a global helper. var fixedNodes = (0, _ownerDocument.default)(data.container).querySelectorAll('.mui-fixed'); for (var i = 0; i < fixedNodes.length; i += 1) { var paddingRight = getPaddingRight(fixedNodes[i]); data.prevPaddings.push(paddingRight); fixedNodes[i].style.paddingRight = "".concat(paddingRight + scrollbarSize, "px"); } } Object.keys(style).forEach(function (key) { data.container.style[key] = style[key]; }); } function removeContainerStyle(data) { // The modal might be closed before it had the chance to be mounted in the DOM. if (data.style) { Object.keys(data.style).forEach(function (key) { data.container.style[key] = data.style[key]; }); } var fixedNodes = (0, _ownerDocument.default)(data.container).querySelectorAll('.mui-fixed'); for (var i = 0; i < fixedNodes.length; i += 1) { fixedNodes[i].style.paddingRight = "".concat(data.prevPaddings[i], "px"); } } /** * @ignore - do not document. * * Proper state management for containers and the modals in those containers. * Simplified, but inspired by react-overlay's ModalManager class. * Used by the Modal to ensure proper styling of containers. */ var ModalManager = /*#__PURE__*/ function () { function ModalManager() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; (0, _classCallCheck2.default)(this, ModalManager); var _options$hideSiblingN = options.hideSiblingNodes, hideSiblingNodes = _options$hideSiblingN === void 0 ? true : _options$hideSiblingN, _options$handleContai = options.handleContainerOverflow, handleContainerOverflow = _options$handleContai === void 0 ? true : _options$handleContai; this.hideSiblingNodes = hideSiblingNodes; this.handleContainerOverflow = handleContainerOverflow; // this.modals[modalIdx] = modal this.modals = []; // this.data[containerIdx] = { // modals: [], // container, // overflowing, // prevPaddings, // } this.data = []; } (0, _createClass2.default)(ModalManager, [{ key: "add", value: function add(modal, container) { var modalIdx = this.modals.indexOf(modal); if (modalIdx !== -1) { return modalIdx; } modalIdx = this.modals.length; this.modals.push(modal); // If the modal we are adding is already in the DOM. if (modal.modalRef) { (0, _manageAriaHidden.ariaHidden)(modal.modalRef, false); } if (this.hideSiblingNodes) { (0, _manageAriaHidden.ariaHiddenSiblings)(container, modal.mountNode, modal.modalRef, true); } var containerIdx = findIndexOf(this.data, function (item) { return item.container === container; }); if (containerIdx !== -1) { this.data[containerIdx].modals.push(modal); return modalIdx; } var data = { modals: [modal], container: container, overflowing: (0, _isOverflowing.default)(container), prevPaddings: [] }; this.data.push(data); return modalIdx; } }, { key: "mount", value: function mount(modal) { var containerIdx = findIndexOf(this.data, function (item) { return item.modals.indexOf(modal) !== -1; }); var data = this.data[containerIdx]; if (!data.style && this.handleContainerOverflow) { setContainerStyle(data); } } }, { key: "remove", value: function remove(modal) { var modalIdx = this.modals.indexOf(modal); if (modalIdx === -1) { return modalIdx; } var containerIdx = findIndexOf(this.data, function (item) { return item.modals.indexOf(modal) !== -1; }); var data = this.data[containerIdx]; data.modals.splice(data.modals.indexOf(modal), 1); this.modals.splice(modalIdx, 1); // If that was the last modal in a container, clean up the container. if (data.modals.length === 0) { if (this.handleContainerOverflow) { removeContainerStyle(data); } // In case the modal wasn't in the DOM yet. if (modal.modalRef) { (0, _manageAriaHidden.ariaHidden)(modal.modalRef, true); } if (this.hideSiblingNodes) { (0, _manageAriaHidden.ariaHiddenSiblings)(data.container, modal.mountNode, modal.modalRef, false); } this.data.splice(containerIdx, 1); } else if (this.hideSiblingNodes) { // Otherwise make sure the next top modal is visible to a screen reader. var nextTop = data.modals[data.modals.length - 1]; // as soon as a modal is adding its modalRef is undefined. it can't set // aria-hidden because the dom element doesn't exist either // when modal was unmounted before modalRef gets null if (nextTop.modalRef) { (0, _manageAriaHidden.ariaHidden)(nextTop.modalRef, false); } } return modalIdx; } }, { key: "isTopModal", value: function isTopModal(modal) { return !!this.modals.length && this.modals[this.modals.length - 1] === modal; } }]); return ModalManager; }(); var _default = ModalManager; exports.default = _default; /***/ }), /***/ "./node_modules/@material-ui/core/Modal/index.js": /*!*******************************************************!*\ !*** ./node_modules/@material-ui/core/Modal/index.js ***! \*******************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function get() { return _Modal.default; } }); Object.defineProperty(exports, "ModalManager", { enumerable: true, get: function get() { return _ModalManager.default; } }); var _Modal = _interopRequireDefault(__webpack_require__(/*! ./Modal */ "./node_modules/@material-ui/core/Modal/Modal.js")); var _ModalManager = _interopRequireDefault(__webpack_require__(/*! ./ModalManager */ "./node_modules/@material-ui/core/Modal/ModalManager.js")); /***/ }), /***/ "./node_modules/@material-ui/core/Modal/isOverflowing.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/core/Modal/isOverflowing.js ***! \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.isBody = isBody; exports.default = isOverflowing; var _isWindow = _interopRequireDefault(__webpack_require__(/*! dom-helpers/query/isWindow */ "./node_modules/dom-helpers/query/isWindow.js")); var _ownerDocument = _interopRequireDefault(__webpack_require__(/*! ../utils/ownerDocument */ "./node_modules/@material-ui/core/utils/ownerDocument.js")); var _ownerWindow = _interopRequireDefault(__webpack_require__(/*! ../utils/ownerWindow */ "./node_modules/@material-ui/core/utils/ownerWindow.js")); function isBody(node) { return node && node.tagName.toLowerCase() === 'body'; } // Do we have a vertical scroll bar? function isOverflowing(container) { var doc = (0, _ownerDocument.default)(container); var win = (0, _ownerWindow.default)(doc); /* istanbul ignore next */ if (!(0, _isWindow.default)(doc) && !isBody(container)) { return container.scrollHeight > container.clientHeight; } // Takes in account potential non zero margin on the body. var style = win.getComputedStyle(doc.body); var marginLeft = parseInt(style.getPropertyValue('margin-left'), 10); var marginRight = parseInt(style.getPropertyValue('margin-right'), 10); return marginLeft + doc.body.clientWidth + marginRight < win.innerWidth; } /***/ }), /***/ "./node_modules/@material-ui/core/Modal/manageAriaHidden.js": /*!******************************************************************!*\ !*** ./node_modules/@material-ui/core/Modal/manageAriaHidden.js ***! \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ariaHidden = ariaHidden; exports.ariaHiddenSiblings = ariaHiddenSiblings; var BLACKLIST = ['template', 'script', 'style']; function isHideable(node) { return node.nodeType === 1 && BLACKLIST.indexOf(node.tagName.toLowerCase()) === -1; } function siblings(container, mount, currentNode, callback) { var blacklist = [mount, currentNode]; [].forEach.call(container.children, function (node) { if (blacklist.indexOf(node) === -1 && isHideable(node)) { callback(node); } }); } function ariaHidden(node, show) { if (show) { node.setAttribute('aria-hidden', 'true'); } else { node.removeAttribute('aria-hidden'); } } function ariaHiddenSiblings(container, mountNode, currentNode, show) { siblings(container, mountNode, currentNode, function (node) { return ariaHidden(node, show); }); } /***/ }), /***/ "./node_modules/@material-ui/core/NativeSelect/NativeSelect.js": /*!*********************************************************************!*\ !*** ./node_modules/@material-ui/core/NativeSelect/NativeSelect.js ***! \*********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.styles = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js")); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js")); var _react = _interopRequireDefault(__webpack_require__(/*! react */ "./node_modules/react/index.js")); var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js")); var _utils = __webpack_require__(/*! @material-ui/utils */ "./node_modules/@material-ui/utils/index.es.js"); var _NativeSelectInput = _interopRequireDefault(__webpack_require__(/*! ./NativeSelectInput */ "./node_modules/@material-ui/core/NativeSelect/NativeSelectInput.js")); var _withStyles = _interopRequireDefault(__webpack_require__(/*! ../styles/withStyles */ "./node_modules/@material-ui/core/styles/withStyles.js")); var _formControlState = _interopRequireDefault(__webpack_require__(/*! ../FormControl/formControlState */ "./node_modules/@material-ui/core/FormControl/formControlState.js")); var _withFormControlContext = _interopRequireDefault(__webpack_require__(/*! ../FormControl/withFormControlContext */ "./node_modules/@material-ui/core/FormControl/withFormControlContext.js")); var _ArrowDropDown = _interopRequireDefault(__webpack_require__(/*! ../internal/svg-icons/ArrowDropDown */ "./node_modules/@material-ui/core/internal/svg-icons/ArrowDropDown.js")); var _Input = _interopRequireDefault(__webpack_require__(/*! ../Input */ "./node_modules/@material-ui/core/Input/index.js")); // @inheritedComponent Input var styles = function styles(theme) { return { /* Styles applied to the `Input` component `root` class. */ root: { position: 'relative', width: '100%' }, /* Styles applied to the `Input` component `select` class. */ select: { '-moz-appearance': 'none', // Reset '-webkit-appearance': 'none', // Reset // When interacting quickly, the text can end up selected. // Native select can't be selected either. userSelect: 'none', paddingRight: 32, borderRadius: 0, // Reset height: '1.1875em', // Reset (19px), match the native input line-height width: 'calc(100% - 32px)', minWidth: 16, // So it doesn't collapse. cursor: 'pointer', '&:focus': { // Show that it's not an text input backgroundColor: theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.05)' : 'rgba(255, 255, 255, 0.05)', borderRadius: 0 // Reset Chrome style }, // Remove IE 11 arrow '&::-ms-expand': { display: 'none' }, '&$disabled': { cursor: 'default' }, '&[multiple]': { height: 'auto' }, '&:not([multiple]) option, &:not([multiple]) optgroup': { backgroundColor: theme.palette.background.paper } }, /* Styles applied to the `Input` component if `variant="filled"`. */ filled: { width: 'calc(100% - 44px)' }, /* Styles applied to the `Input` component if `variant="outlined"`. */ outlined: { width: 'calc(100% - 46px)', borderRadius: theme.shape.borderRadius }, /* Styles applied to the `Input` component `selectMenu` class. */ selectMenu: { width: 'auto', // Fix Safari textOverflow height: 'auto', // Reset textOverflow: 'ellipsis', whiteSpace: 'nowrap', overflow: 'hidden', minHeight: '1.1875em' // Reset (19px), match the native input line-height }, /* Styles applied to the `Input` component `disabled` class. */ disabled: {}, /* Styles applied to the `Input` component `icon` class. */ icon: { // We use a position absolute over a flexbox in order to forward the pointer events // to the input. position: 'absolute', right: 0, top: 'calc(50% - 12px)', // Center vertically color: theme.palette.action.active, 'pointer-events': 'none' // Don't block pointer events on the select under the icon. } }; }; /** * An alternative to ` host component that allows setting these optional * props: `checked`, `value`, `defaultChecked`, and `defaultValue`. * * If `checked` or `value` are not supplied (or null/undefined), user actions * that affect the checked state or value will trigger updates to the element. * * If they are supplied (and not null/undefined), the rendered element will not * trigger updates to the element. Instead, the props must change in order for * the rendered element to be updated. * * The rendered element will be initialized as unchecked (or `defaultChecked`) * with an empty value (or `defaultValue`). * * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html */ function getHostProps(element, props) { var node = element; var checked = props.checked; var hostProps = _assign({}, props, { defaultChecked: undefined, defaultValue: undefined, value: undefined, checked: checked != null ? checked : node._wrapperState.initialChecked }); return hostProps; } function initWrapperState(element, props) { { ReactControlledValuePropTypes.checkPropTypes('input', props); if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) { warning$1(false, '%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type); didWarnCheckedDefaultChecked = true; } if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) { warning$1(false, '%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type); didWarnValueDefaultValue = true; } } var node = element; var defaultValue = props.defaultValue == null ? '' : props.defaultValue; node._wrapperState = { initialChecked: props.checked != null ? props.checked : props.defaultChecked, initialValue: getToStringValue(props.value != null ? props.value : defaultValue), controlled: isControlled(props) }; } function updateChecked(element, props) { var node = element; var checked = props.checked; if (checked != null) { setValueForProperty(node, 'checked', checked, false); } } function updateWrapper(element, props) { var node = element; { var _controlled = isControlled(props); if (!node._wrapperState.controlled && _controlled && !didWarnUncontrolledToControlled) { warning$1(false, 'A component is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type); didWarnUncontrolledToControlled = true; } if (node._wrapperState.controlled && !_controlled && !didWarnControlledToUncontrolled) { warning$1(false, 'A component is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type); didWarnControlledToUncontrolled = true; } } updateChecked(element, props); var value = getToStringValue(props.value); var type = props.type; if (value != null) { if (type === 'number') { if (value === 0 && node.value === '' || // We explicitly want to coerce to number here if possible. // eslint-disable-next-line node.value != value) { node.value = toString(value); } } else if (node.value !== toString(value)) { node.value = toString(value); } } else if (type === 'submit' || type === 'reset') { // Submit/reset inputs need the attribute removed completely to avoid // blank-text buttons. node.removeAttribute('value'); return; } if (disableInputAttributeSyncing) { // When not syncing the value attribute, React only assigns a new value // whenever the defaultValue React prop has changed. When not present, // React does nothing if (props.hasOwnProperty('defaultValue')) { setDefaultValue(node, props.type, getToStringValue(props.defaultValue)); } } else { // When syncing the value attribute, the value comes from a cascade of // properties: // 1. The value React property // 2. The defaultValue React property // 3. Otherwise there should be no change if (props.hasOwnProperty('value')) { setDefaultValue(node, props.type, value); } else if (props.hasOwnProperty('defaultValue')) { setDefaultValue(node, props.type, getToStringValue(props.defaultValue)); } } if (disableInputAttributeSyncing) { // When not syncing the checked attribute, the attribute is directly // controllable from the defaultValue React property. It needs to be // updated as new props come in. if (props.defaultChecked == null) { node.removeAttribute('checked'); } else { node.defaultChecked = !!props.defaultChecked; } } else { // When syncing the checked attribute, it only changes when it needs // to be removed, such as transitioning from a checkbox into a text input if (props.checked == null && props.defaultChecked != null) { node.defaultChecked = !!props.defaultChecked; } } } function postMountWrapper(element, props, isHydrating) { var node = element; // Do not assign value if it is already set. This prevents user text input // from being lost during SSR hydration. if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) { var type = props.type; var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the // default value provided by the browser. See: #12872 if (isButton && (props.value === undefined || props.value === null)) { return; } var _initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input // from being lost during SSR hydration. if (!isHydrating) { if (disableInputAttributeSyncing) { var value = getToStringValue(props.value); // When not syncing the value attribute, the value property points // directly to the React prop. Only assign it if it exists. if (value != null) { // Always assign on buttons so that it is possible to assign an // empty string to clear button text. // // Otherwise, do not re-assign the value property if is empty. This // potentially avoids a DOM write and prevents Firefox (~60.0.1) from // prematurely marking required inputs as invalid. Equality is compared // to the current value in case the browser provided value is not an // empty string. if (isButton || value !== node.value) { node.value = toString(value); } } } else { // When syncing the value attribute, the value property should use // the wrapperState._initialValue property. This uses: // // 1. The value React property when present // 2. The defaultValue React property when present // 3. An empty string if (_initialValue !== node.value) { node.value = _initialValue; } } } if (disableInputAttributeSyncing) { // When not syncing the value attribute, assign the value attribute // directly from the defaultValue React property (when present) var defaultValue = getToStringValue(props.defaultValue); if (defaultValue != null) { node.defaultValue = toString(defaultValue); } } else { // Otherwise, the value attribute is synchronized to the property, // so we assign defaultValue to the same thing as the value property // assignment step above. node.defaultValue = _initialValue; } } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug // this is needed to work around a chrome bug where setting defaultChecked // will sometimes influence the value of checked (even after detachment). // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416 // We need to temporarily unset name to avoid disrupting radio button groups. var name = node.name; if (name !== '') { node.name = ''; } if (disableInputAttributeSyncing) { // When not syncing the checked attribute, the checked property // never gets assigned. It must be manually set. We don't want // to do this when hydrating so that existing user input isn't // modified if (!isHydrating) { updateChecked(element, props); } // Only assign the checked attribute if it is defined. This saves // a DOM write when controlling the checked attribute isn't needed // (text inputs, submit/reset) if (props.hasOwnProperty('defaultChecked')) { node.defaultChecked = !node.defaultChecked; node.defaultChecked = !!props.defaultChecked; } } else { // When syncing the checked attribute, both the checked property and // attribute are assigned at the same time using defaultChecked. This uses: // // 1. The checked React property when present // 2. The defaultChecked React property when present // 3. Otherwise, false node.defaultChecked = !node.defaultChecked; node.defaultChecked = !!node._wrapperState.initialChecked; } if (name !== '') { node.name = name; } } function restoreControlledState(element, props) { var node = element; updateWrapper(node, props); updateNamedCousins(node, props); } function updateNamedCousins(rootNode, props) { var name = props.name; if (props.type === 'radio' && name != null) { var queryRoot = rootNode; while (queryRoot.parentNode) { queryRoot = queryRoot.parentNode; } // If `rootNode.form` was non-null, then we could try `form.elements`, // but that sometimes behaves strangely in IE8. We could also try using // `form.getElementsByName`, but that will only return direct children // and won't include inputs that use the HTML5 `form=` attribute. Since // the input might not even be in a form. It might not even be in the // document. Let's just use the local `querySelectorAll` to ensure we don't // miss anything. var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]'); for (var i = 0; i < group.length; i++) { var otherNode = group[i]; if (otherNode === rootNode || otherNode.form !== rootNode.form) { continue; } // This will throw if radio buttons rendered by different copies of React // and the same name are rendered into the same form (same as #1939). // That's probably okay; we don't support it just as we don't support // mixing React radio buttons with non-React ones. var otherProps = getFiberCurrentPropsFromNode$1(otherNode); !otherProps ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : void 0; // We need update the tracked value on the named cousin since the value // was changed but the input saw no event or value set updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that // was previously checked to update will cause it to be come re-checked // as appropriate. updateWrapper(otherNode, otherProps); } } } // In Chrome, assigning defaultValue to certain input types triggers input validation. // For number inputs, the display value loses trailing decimal points. For email inputs, // Chrome raises "The specified value is not a valid email address". // // Here we check to see if the defaultValue has actually changed, avoiding these problems // when the user is inputting text // // https://github.com/facebook/react/issues/7253 function setDefaultValue(node, type, value) { if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js type !== 'number' || node.ownerDocument.activeElement !== node) { if (value == null) { node.defaultValue = toString(node._wrapperState.initialValue); } else if (node.defaultValue !== toString(value)) { node.defaultValue = toString(value); } } } var eventTypes$1 = { change: { phasedRegistrationNames: { bubbled: 'onChange', captured: 'onChangeCapture' }, dependencies: [TOP_BLUR, TOP_CHANGE, TOP_CLICK, TOP_FOCUS, TOP_INPUT, TOP_KEY_DOWN, TOP_KEY_UP, TOP_SELECTION_CHANGE] } }; function createAndAccumulateChangeEvent(inst, nativeEvent, target) { var event = SyntheticEvent.getPooled(eventTypes$1.change, inst, nativeEvent, target); event.type = 'change'; // Flag this event loop as needing state restore. enqueueStateRestore(target); accumulateTwoPhaseDispatches(event); return event; } /** * For IE shims */ var activeElement = null; var activeElementInst = null; /** * SECTION: handle `change` event */ function shouldUseChangeEvent(elem) { var nodeName = elem.nodeName && elem.nodeName.toLowerCase(); return nodeName === 'select' || nodeName === 'input' && elem.type === 'file'; } function manualDispatchChangeEvent(nativeEvent) { var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent)); // If change and propertychange bubbled, we'd just bind to it like all the // other events and have it go through ReactBrowserEventEmitter. Since it // doesn't, we manually listen for the events and so we have to enqueue and // process the abstract event manually. // // Batching is necessary here in order to ensure that all event handlers run // before the next rerender (including event handlers attached to ancestor // elements instead of directly on the input). Without this, controlled // components don't work properly in conjunction with event bubbling because // the component is rerendered and the value reverted before all the event // handlers can run. See https://github.com/facebook/react/issues/708. batchedUpdates(runEventInBatch, event); } function runEventInBatch(event) { runEventsInBatch(event); } function getInstIfValueChanged(targetInst) { var targetNode = getNodeFromInstance$1(targetInst); if (updateValueIfChanged(targetNode)) { return targetInst; } } function getTargetInstForChangeEvent(topLevelType, targetInst) { if (topLevelType === TOP_CHANGE) { return targetInst; } } /** * SECTION: handle `input` event */ var isInputEventSupported = false; if (canUseDOM) { // IE9 claims to support the input event but fails to trigger it when // deleting text, so we ignore its input events. isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9); } /** * (For IE <=9) Starts tracking propertychange events on the passed-in element * and override the value property so that we can distinguish user events from * value changes in JS. */ function startWatchingForValueChange(target, targetInst) { activeElement = target; activeElementInst = targetInst; activeElement.attachEvent('onpropertychange', handlePropertyChange); } /** * (For IE <=9) Removes the event listeners from the currently-tracked element, * if any exists. */ function stopWatchingForValueChange() { if (!activeElement) { return; } activeElement.detachEvent('onpropertychange', handlePropertyChange); activeElement = null; activeElementInst = null; } /** * (For IE <=9) Handles a propertychange event, sending a `change` event if * the value of the active element has changed. */ function handlePropertyChange(nativeEvent) { if (nativeEvent.propertyName !== 'value') { return; } if (getInstIfValueChanged(activeElementInst)) { manualDispatchChangeEvent(nativeEvent); } } function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) { if (topLevelType === TOP_FOCUS) { // In IE9, propertychange fires for most input events but is buggy and // doesn't fire when text is deleted, but conveniently, selectionchange // appears to fire in all of the remaining cases so we catch those and // forward the event if the value has changed // In either case, we don't want to call the event handler if the value // is changed from JS so we redefine a setter for `.value` that updates // our activeElementValue variable, allowing us to ignore those changes // // stopWatching() should be a noop here but we call it just in case we // missed a blur event somehow. stopWatchingForValueChange(); startWatchingForValueChange(target, targetInst); } else if (topLevelType === TOP_BLUR) { stopWatchingForValueChange(); } } // For IE8 and IE9. function getTargetInstForInputEventPolyfill(topLevelType, targetInst) { if (topLevelType === TOP_SELECTION_CHANGE || topLevelType === TOP_KEY_UP || topLevelType === TOP_KEY_DOWN) { // On the selectionchange event, the target is just document which isn't // helpful for us so just check activeElement instead. // // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire // propertychange on the first input event after setting `value` from a // script and fires only keydown, keypress, keyup. Catching keyup usually // gets it and catching keydown lets us fire an event for the first // keystroke if user does a key repeat (it'll be a little delayed: right // before the second keystroke). Other input methods (e.g., paste) seem to // fire selectionchange normally. return getInstIfValueChanged(activeElementInst); } } /** * SECTION: handle `click` event */ function shouldUseClickEvent(elem) { // Use the `click` event to detect changes to checkbox and radio inputs. // This approach works across all browsers, whereas `change` does not fire // until `blur` in IE8. var nodeName = elem.nodeName; return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio'); } function getTargetInstForClickEvent(topLevelType, targetInst) { if (topLevelType === TOP_CLICK) { return getInstIfValueChanged(targetInst); } } function getTargetInstForInputOrChangeEvent(topLevelType, targetInst) { if (topLevelType === TOP_INPUT || topLevelType === TOP_CHANGE) { return getInstIfValueChanged(targetInst); } } function handleControlledInputBlur(node) { var state = node._wrapperState; if (!state || !state.controlled || node.type !== 'number') { return; } if (!disableInputAttributeSyncing) { // If controlled, assign the value attribute to the current value on blur setDefaultValue(node, 'number', node.value); } } /** * This plugin creates an `onChange` event that normalizes change events * across form elements. This event fires at a time when it's possible to * change the element's value without seeing a flicker. * * Supported elements are: * - input (see `isTextInputElement`) * - textarea * - select */ var ChangeEventPlugin = { eventTypes: eventTypes$1, _isInputEventSupported: isInputEventSupported, extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window; var getTargetInstFunc = void 0, handleEventFunc = void 0; if (shouldUseChangeEvent(targetNode)) { getTargetInstFunc = getTargetInstForChangeEvent; } else if (isTextInputElement(targetNode)) { if (isInputEventSupported) { getTargetInstFunc = getTargetInstForInputOrChangeEvent; } else { getTargetInstFunc = getTargetInstForInputEventPolyfill; handleEventFunc = handleEventsForInputEventPolyfill; } } else if (shouldUseClickEvent(targetNode)) { getTargetInstFunc = getTargetInstForClickEvent; } if (getTargetInstFunc) { var inst = getTargetInstFunc(topLevelType, targetInst); if (inst) { var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget); return event; } } if (handleEventFunc) { handleEventFunc(topLevelType, targetNode, targetInst); } // When blurring, set the value attribute for number inputs if (topLevelType === TOP_BLUR) { handleControlledInputBlur(targetNode); } } }; /** * Module that is injectable into `EventPluginHub`, that specifies a * deterministic ordering of `EventPlugin`s. A convenient way to reason about * plugins, without having to package every one of them. This is better than * having plugins be ordered in the same order that they are injected because * that ordering would be influenced by the packaging order. * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that * preventing default on events is convenient in `SimpleEventPlugin` handlers. */ var DOMEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin']; var SyntheticUIEvent = SyntheticEvent.extend({ view: null, detail: null }); var modifierKeyToProp = { Alt: 'altKey', Control: 'ctrlKey', Meta: 'metaKey', Shift: 'shiftKey' }; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support // getModifierState. If getModifierState is not supported, we map it to a set of // modifier keys exposed by the event. In this case, Lock-keys are not supported. /** * Translation from modifier key to the associated property in the event. * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers */ function modifierStateGetter(keyArg) { var syntheticEvent = this; var nativeEvent = syntheticEvent.nativeEvent; if (nativeEvent.getModifierState) { return nativeEvent.getModifierState(keyArg); } var keyProp = modifierKeyToProp[keyArg]; return keyProp ? !!nativeEvent[keyProp] : false; } function getEventModifierState(nativeEvent) { return modifierStateGetter; } var previousScreenX = 0; var previousScreenY = 0; // Use flags to signal movementX/Y has already been set var isMovementXSet = false; var isMovementYSet = false; /** * @interface MouseEvent * @see http://www.w3.org/TR/DOM-Level-3-Events/ */ var SyntheticMouseEvent = SyntheticUIEvent.extend({ screenX: null, screenY: null, clientX: null, clientY: null, pageX: null, pageY: null, ctrlKey: null, shiftKey: null, altKey: null, metaKey: null, getModifierState: getEventModifierState, button: null, buttons: null, relatedTarget: function (event) { return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement); }, movementX: function (event) { if ('movementX' in event) { return event.movementX; } var screenX = previousScreenX; previousScreenX = event.screenX; if (!isMovementXSet) { isMovementXSet = true; return 0; } return event.type === 'mousemove' ? event.screenX - screenX : 0; }, movementY: function (event) { if ('movementY' in event) { return event.movementY; } var screenY = previousScreenY; previousScreenY = event.screenY; if (!isMovementYSet) { isMovementYSet = true; return 0; } return event.type === 'mousemove' ? event.screenY - screenY : 0; } }); /** * @interface PointerEvent * @see http://www.w3.org/TR/pointerevents/ */ var SyntheticPointerEvent = SyntheticMouseEvent.extend({ pointerId: null, width: null, height: null, pressure: null, tangentialPressure: null, tiltX: null, tiltY: null, twist: null, pointerType: null, isPrimary: null }); var eventTypes$2 = { mouseEnter: { registrationName: 'onMouseEnter', dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER] }, mouseLeave: { registrationName: 'onMouseLeave', dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER] }, pointerEnter: { registrationName: 'onPointerEnter', dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER] }, pointerLeave: { registrationName: 'onPointerLeave', dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER] } }; var EnterLeaveEventPlugin = { eventTypes: eventTypes$2, /** * For almost every interaction we care about, there will be both a top-level * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that * we do not extract duplicate events. However, moving the mouse into the * browser from outside will not fire a `mouseout` event. In this case, we use * the `mouseover` top-level event. */ extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { var isOverEvent = topLevelType === TOP_MOUSE_OVER || topLevelType === TOP_POINTER_OVER; var isOutEvent = topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_POINTER_OUT; if (isOverEvent && (nativeEvent.relatedTarget || nativeEvent.fromElement)) { return null; } if (!isOutEvent && !isOverEvent) { // Must not be a mouse or pointer in or out - ignoring. return null; } var win = void 0; if (nativeEventTarget.window === nativeEventTarget) { // `nativeEventTarget` is probably a window object. win = nativeEventTarget; } else { // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. var doc = nativeEventTarget.ownerDocument; if (doc) { win = doc.defaultView || doc.parentWindow; } else { win = window; } } var from = void 0; var to = void 0; if (isOutEvent) { from = targetInst; var related = nativeEvent.relatedTarget || nativeEvent.toElement; to = related ? getClosestInstanceFromNode(related) : null; } else { // Moving to a node from outside the window. from = null; to = targetInst; } if (from === to) { // Nothing pertains to our managed components. return null; } var eventInterface = void 0, leaveEventType = void 0, enterEventType = void 0, eventTypePrefix = void 0; if (topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_MOUSE_OVER) { eventInterface = SyntheticMouseEvent; leaveEventType = eventTypes$2.mouseLeave; enterEventType = eventTypes$2.mouseEnter; eventTypePrefix = 'mouse'; } else if (topLevelType === TOP_POINTER_OUT || topLevelType === TOP_POINTER_OVER) { eventInterface = SyntheticPointerEvent; leaveEventType = eventTypes$2.pointerLeave; enterEventType = eventTypes$2.pointerEnter; eventTypePrefix = 'pointer'; } var fromNode = from == null ? win : getNodeFromInstance$1(from); var toNode = to == null ? win : getNodeFromInstance$1(to); var leave = eventInterface.getPooled(leaveEventType, from, nativeEvent, nativeEventTarget); leave.type = eventTypePrefix + 'leave'; leave.target = fromNode; leave.relatedTarget = toNode; var enter = eventInterface.getPooled(enterEventType, to, nativeEvent, nativeEventTarget); enter.type = eventTypePrefix + 'enter'; enter.target = toNode; enter.relatedTarget = fromNode; accumulateEnterLeaveDispatches(leave, enter, from, to); return [leave, enter]; } }; /** * 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 */ function is(x, y) { return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare ; } var hasOwnProperty$1 = Object.prototype.hasOwnProperty; /** * Performs equality by iterating through keys on an object and returning false * when any key has values which are not strictly equal between the arguments. * Returns true when the values of all keys are strictly equal. */ function shallowEqual(objA, objB) { if (is(objA, objB)) { return true; } if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { return false; } var keysA = Object.keys(objA); var keysB = Object.keys(objB); if (keysA.length !== keysB.length) { return false; } // Test for A's keys different from B. for (var i = 0; i < keysA.length; i++) { if (!hasOwnProperty$1.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { return false; } } return true; } /** * `ReactInstanceMap` maintains a mapping from a public facing stateful * instance (key) and the internal representation (value). This allows public * methods to accept the user facing instance as an argument and map them back * to internal methods. * * Note that this module is currently shared and assumed to be stateless. * If this becomes an actual Map, that will break. */ /** * This API should be called `delete` but we'd have to make sure to always * transform these to strings for IE support. When this transform is fully * supported we can rename it. */ function get(key) { return key._reactInternalFiber; } function has(key) { return key._reactInternalFiber !== undefined; } function set(key, value) { key._reactInternalFiber = value; } // Don't change these two values. They're used by React Dev Tools. var NoEffect = /* */0; var PerformedWork = /* */1; // You can change the rest (and add more). var Placement = /* */2; var Update = /* */4; var PlacementAndUpdate = /* */6; var Deletion = /* */8; var ContentReset = /* */16; var Callback = /* */32; var DidCapture = /* */64; var Ref = /* */128; var Snapshot = /* */256; var Passive = /* */512; // Passive & Update & Callback & Ref & Snapshot var LifecycleEffectMask = /* */932; // Union of all host effects var HostEffectMask = /* */1023; var Incomplete = /* */1024; var ShouldCapture = /* */2048; var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; var MOUNTING = 1; var MOUNTED = 2; var UNMOUNTED = 3; function isFiberMountedImpl(fiber) { var node = fiber; if (!fiber.alternate) { // If there is no alternate, this might be a new tree that isn't inserted // yet. If it is, then it will have a pending insertion effect on it. if ((node.effectTag & Placement) !== NoEffect) { return MOUNTING; } while (node.return) { node = node.return; if ((node.effectTag & Placement) !== NoEffect) { return MOUNTING; } } } else { while (node.return) { node = node.return; } } if (node.tag === HostRoot) { // TODO: Check if this was a nested HostRoot when used with // renderContainerIntoSubtree. return MOUNTED; } // If we didn't hit the root, that means that we're in an disconnected tree // that has been unmounted. return UNMOUNTED; } function isFiberMounted(fiber) { return isFiberMountedImpl(fiber) === MOUNTED; } function isMounted(component) { { var owner = ReactCurrentOwner$1.current; if (owner !== null && owner.tag === ClassComponent) { var ownerFiber = owner; var instance = ownerFiber.stateNode; !instance._warnedAboutRefsInRender ? warningWithoutStack$1(false, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber.type) || 'A component') : void 0; instance._warnedAboutRefsInRender = true; } } var fiber = get(component); if (!fiber) { return false; } return isFiberMountedImpl(fiber) === MOUNTED; } function assertIsMounted(fiber) { !(isFiberMountedImpl(fiber) === MOUNTED) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0; } function findCurrentFiberUsingSlowPath(fiber) { var alternate = fiber.alternate; if (!alternate) { // If there is no alternate, then we only need to check if it is mounted. var state = isFiberMountedImpl(fiber); !(state !== UNMOUNTED) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0; if (state === MOUNTING) { return null; } return fiber; } // If we have two possible branches, we'll walk backwards up to the root // to see what path the root points to. On the way we may hit one of the // special cases and we'll deal with them. var a = fiber; var b = alternate; while (true) { var parentA = a.return; var parentB = parentA ? parentA.alternate : null; if (!parentA || !parentB) { // We're at the root. break; } // If both copies of the parent fiber point to the same child, we can // assume that the child is current. This happens when we bailout on low // priority: the bailed out fiber's child reuses the current child. if (parentA.child === parentB.child) { var child = parentA.child; while (child) { if (child === a) { // We've determined that A is the current branch. assertIsMounted(parentA); return fiber; } if (child === b) { // We've determined that B is the current branch. assertIsMounted(parentA); return alternate; } child = child.sibling; } // We should never have an alternate for any mounting node. So the only // way this could possibly happen is if this was unmounted, if at all. invariant(false, 'Unable to find node on an unmounted component.'); } if (a.return !== b.return) { // The return pointer of A and the return pointer of B point to different // fibers. We assume that return pointers never criss-cross, so A must // belong to the child set of A.return, and B must belong to the child // set of B.return. a = parentA; b = parentB; } else { // The return pointers point to the same fiber. We'll have to use the // default, slow path: scan the child sets of each parent alternate to see // which child belongs to which set. // // Search parent A's child set var didFindChild = false; var _child = parentA.child; while (_child) { if (_child === a) { didFindChild = true; a = parentA; b = parentB; break; } if (_child === b) { didFindChild = true; b = parentA; a = parentB; break; } _child = _child.sibling; } if (!didFindChild) { // Search parent B's child set _child = parentB.child; while (_child) { if (_child === a) { didFindChild = true; a = parentB; b = parentA; break; } if (_child === b) { didFindChild = true; b = parentB; a = parentA; break; } _child = _child.sibling; } !didFindChild ? invariant(false, 'Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.') : void 0; } } !(a.alternate === b) ? invariant(false, 'Return fibers should always be each others\' alternates. This error is likely caused by a bug in React. Please file an issue.') : void 0; } // If the root is not a host container, we're in a disconnected tree. I.e. // unmounted. !(a.tag === HostRoot) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0; if (a.stateNode.current === a) { // We've determined that A is the current branch. return fiber; } // Otherwise B has to be current branch. return alternate; } function findCurrentHostFiber(parent) { var currentParent = findCurrentFiberUsingSlowPath(parent); if (!currentParent) { return null; } // Next we'll drill down this component to find the first HostComponent/Text. var node = currentParent; while (true) { if (node.tag === HostComponent || node.tag === HostText) { return node; } else if (node.child) { node.child.return = node; node = node.child; continue; } if (node === currentParent) { return null; } while (!node.sibling) { if (!node.return || node.return === currentParent) { return null; } node = node.return; } node.sibling.return = node.return; node = node.sibling; } // Flow needs the return null here, but ESLint complains about it. // eslint-disable-next-line no-unreachable return null; } function findCurrentHostFiberWithNoPortals(parent) { var currentParent = findCurrentFiberUsingSlowPath(parent); if (!currentParent) { return null; } // Next we'll drill down this component to find the first HostComponent/Text. var node = currentParent; while (true) { if (node.tag === HostComponent || node.tag === HostText) { return node; } else if (node.child && node.tag !== HostPortal) { node.child.return = node; node = node.child; continue; } if (node === currentParent) { return null; } while (!node.sibling) { if (!node.return || node.return === currentParent) { return null; } node = node.return; } node.sibling.return = node.return; node = node.sibling; } // Flow needs the return null here, but ESLint complains about it. // eslint-disable-next-line no-unreachable return null; } function addEventBubbleListener(element, eventType, listener) { element.addEventListener(eventType, listener, false); } function addEventCaptureListener(element, eventType, listener) { element.addEventListener(eventType, listener, true); } /** * @interface Event * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent */ var SyntheticAnimationEvent = SyntheticEvent.extend({ animationName: null, elapsedTime: null, pseudoElement: null }); /** * @interface Event * @see http://www.w3.org/TR/clipboard-apis/ */ var SyntheticClipboardEvent = SyntheticEvent.extend({ clipboardData: function (event) { return 'clipboardData' in event ? event.clipboardData : window.clipboardData; } }); /** * @interface FocusEvent * @see http://www.w3.org/TR/DOM-Level-3-Events/ */ var SyntheticFocusEvent = SyntheticUIEvent.extend({ relatedTarget: null }); /** * `charCode` represents the actual "character code" and is safe to use with * `String.fromCharCode`. As such, only keys that correspond to printable * characters produce a valid `charCode`, the only exception to this is Enter. * The Tab-key is considered non-printable and does not have a `charCode`, * presumably because it does not produce a tab-character in browsers. * * @param {object} nativeEvent Native browser event. * @return {number} Normalized `charCode` property. */ function getEventCharCode(nativeEvent) { var charCode = void 0; var keyCode = nativeEvent.keyCode; if ('charCode' in nativeEvent) { charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`. if (charCode === 0 && keyCode === 13) { charCode = 13; } } else { // IE8 does not implement `charCode`, but `keyCode` has the correct value. charCode = keyCode; } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux) // report Enter as charCode 10 when ctrl is pressed. if (charCode === 10) { charCode = 13; } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them. // Must not discard the (non-)printable Enter-key. if (charCode >= 32 || charCode === 13) { return charCode; } return 0; } /** * Normalization of deprecated HTML5 `key` values * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names */ var normalizeKey = { Esc: 'Escape', Spacebar: ' ', Left: 'ArrowLeft', Up: 'ArrowUp', Right: 'ArrowRight', Down: 'ArrowDown', Del: 'Delete', Win: 'OS', Menu: 'ContextMenu', Apps: 'ContextMenu', Scroll: 'ScrollLock', MozPrintableKey: 'Unidentified' }; /** * Translation from legacy `keyCode` to HTML5 `key` * Only special keys supported, all others depend on keyboard layout or browser * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names */ var translateToKey = { '8': 'Backspace', '9': 'Tab', '12': 'Clear', '13': 'Enter', '16': 'Shift', '17': 'Control', '18': 'Alt', '19': 'Pause', '20': 'CapsLock', '27': 'Escape', '32': ' ', '33': 'PageUp', '34': 'PageDown', '35': 'End', '36': 'Home', '37': 'ArrowLeft', '38': 'ArrowUp', '39': 'ArrowRight', '40': 'ArrowDown', '45': 'Insert', '46': 'Delete', '112': 'F1', '113': 'F2', '114': 'F3', '115': 'F4', '116': 'F5', '117': 'F6', '118': 'F7', '119': 'F8', '120': 'F9', '121': 'F10', '122': 'F11', '123': 'F12', '144': 'NumLock', '145': 'ScrollLock', '224': 'Meta' }; /** * @param {object} nativeEvent Native browser event. * @return {string} Normalized `key` property. */ function getEventKey(nativeEvent) { if (nativeEvent.key) { // Normalize inconsistent values reported by browsers due to // implementations of a working draft specification. // FireFox implements `key` but returns `MozPrintableKey` for all // printable characters (normalized to `Unidentified`), ignore it. var key = normalizeKey[nativeEvent.key] || nativeEvent.key; if (key !== 'Unidentified') { return key; } } // Browser does not implement `key`, polyfill as much of it as we can. if (nativeEvent.type === 'keypress') { var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can // thus be captured by `keypress`, no other non-printable key should. return charCode === 13 ? 'Enter' : String.fromCharCode(charCode); } if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') { // While user keyboard layout determines the actual meaning of each // `keyCode` value, almost all function keys have a universal value. return translateToKey[nativeEvent.keyCode] || 'Unidentified'; } return ''; } /** * @interface KeyboardEvent * @see http://www.w3.org/TR/DOM-Level-3-Events/ */ var SyntheticKeyboardEvent = SyntheticUIEvent.extend({ key: getEventKey, location: null, ctrlKey: null, shiftKey: null, altKey: null, metaKey: null, repeat: null, locale: null, getModifierState: getEventModifierState, // Legacy Interface charCode: function (event) { // `charCode` is the result of a KeyPress event and represents the value of // the actual printable character. // KeyPress is deprecated, but its replacement is not yet final and not // implemented in any major browser. Only KeyPress has charCode. if (event.type === 'keypress') { return getEventCharCode(event); } return 0; }, keyCode: function (event) { // `keyCode` is the result of a KeyDown/Up event and represents the value of // physical keyboard key. // The actual meaning of the value depends on the users' keyboard layout // which cannot be detected. Assuming that it is a US keyboard layout // provides a surprisingly accurate mapping for US and European users. // Due to this, it is left to the user to implement at this time. if (event.type === 'keydown' || event.type === 'keyup') { return event.keyCode; } return 0; }, which: function (event) { // `which` is an alias for either `keyCode` or `charCode` depending on the // type of the event. if (event.type === 'keypress') { return getEventCharCode(event); } if (event.type === 'keydown' || event.type === 'keyup') { return event.keyCode; } return 0; } }); /** * @interface DragEvent * @see http://www.w3.org/TR/DOM-Level-3-Events/ */ var SyntheticDragEvent = SyntheticMouseEvent.extend({ dataTransfer: null }); /** * @interface TouchEvent * @see http://www.w3.org/TR/touch-events/ */ var SyntheticTouchEvent = SyntheticUIEvent.extend({ touches: null, targetTouches: null, changedTouches: null, altKey: null, metaKey: null, ctrlKey: null, shiftKey: null, getModifierState: getEventModifierState }); /** * @interface Event * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events- * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent */ var SyntheticTransitionEvent = SyntheticEvent.extend({ propertyName: null, elapsedTime: null, pseudoElement: null }); /** * @interface WheelEvent * @see http://www.w3.org/TR/DOM-Level-3-Events/ */ var SyntheticWheelEvent = SyntheticMouseEvent.extend({ deltaX: function (event) { return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive). 'wheelDeltaX' in event ? -event.wheelDeltaX : 0; }, deltaY: function (event) { return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive). 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive). 'wheelDelta' in event ? -event.wheelDelta : 0; }, deltaZ: null, // Browsers without "deltaMode" is reporting in raw wheel delta where one // notch on the scroll is always +/- 120, roughly equivalent to pixels. // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size. deltaMode: null }); /** * Turns * ['abort', ...] * into * eventTypes = { * 'abort': { * phasedRegistrationNames: { * bubbled: 'onAbort', * captured: 'onAbortCapture', * }, * dependencies: [TOP_ABORT], * }, * ... * }; * topLevelEventsToDispatchConfig = new Map([ * [TOP_ABORT, { sameConfig }], * ]); */ var interactiveEventTypeNames = [[TOP_BLUR, 'blur'], [TOP_CANCEL, 'cancel'], [TOP_CLICK, 'click'], [TOP_CLOSE, 'close'], [TOP_CONTEXT_MENU, 'contextMenu'], [TOP_COPY, 'copy'], [TOP_CUT, 'cut'], [TOP_AUX_CLICK, 'auxClick'], [TOP_DOUBLE_CLICK, 'doubleClick'], [TOP_DRAG_END, 'dragEnd'], [TOP_DRAG_START, 'dragStart'], [TOP_DROP, 'drop'], [TOP_FOCUS, 'focus'], [TOP_INPUT, 'input'], [TOP_INVALID, 'invalid'], [TOP_KEY_DOWN, 'keyDown'], [TOP_KEY_PRESS, 'keyPress'], [TOP_KEY_UP, 'keyUp'], [TOP_MOUSE_DOWN, 'mouseDown'], [TOP_MOUSE_UP, 'mouseUp'], [TOP_PASTE, 'paste'], [TOP_PAUSE, 'pause'], [TOP_PLAY, 'play'], [TOP_POINTER_CANCEL, 'pointerCancel'], [TOP_POINTER_DOWN, 'pointerDown'], [TOP_POINTER_UP, 'pointerUp'], [TOP_RATE_CHANGE, 'rateChange'], [TOP_RESET, 'reset'], [TOP_SEEKED, 'seeked'], [TOP_SUBMIT, 'submit'], [TOP_TOUCH_CANCEL, 'touchCancel'], [TOP_TOUCH_END, 'touchEnd'], [TOP_TOUCH_START, 'touchStart'], [TOP_VOLUME_CHANGE, 'volumeChange']]; var nonInteractiveEventTypeNames = [[TOP_ABORT, 'abort'], [TOP_ANIMATION_END, 'animationEnd'], [TOP_ANIMATION_ITERATION, 'animationIteration'], [TOP_ANIMATION_START, 'animationStart'], [TOP_CAN_PLAY, 'canPlay'], [TOP_CAN_PLAY_THROUGH, 'canPlayThrough'], [TOP_DRAG, 'drag'], [TOP_DRAG_ENTER, 'dragEnter'], [TOP_DRAG_EXIT, 'dragExit'], [TOP_DRAG_LEAVE, 'dragLeave'], [TOP_DRAG_OVER, 'dragOver'], [TOP_DURATION_CHANGE, 'durationChange'], [TOP_EMPTIED, 'emptied'], [TOP_ENCRYPTED, 'encrypted'], [TOP_ENDED, 'ended'], [TOP_ERROR, 'error'], [TOP_GOT_POINTER_CAPTURE, 'gotPointerCapture'], [TOP_LOAD, 'load'], [TOP_LOADED_DATA, 'loadedData'], [TOP_LOADED_METADATA, 'loadedMetadata'], [TOP_LOAD_START, 'loadStart'], [TOP_LOST_POINTER_CAPTURE, 'lostPointerCapture'], [TOP_MOUSE_MOVE, 'mouseMove'], [TOP_MOUSE_OUT, 'mouseOut'], [TOP_MOUSE_OVER, 'mouseOver'], [TOP_PLAYING, 'playing'], [TOP_POINTER_MOVE, 'pointerMove'], [TOP_POINTER_OUT, 'pointerOut'], [TOP_POINTER_OVER, 'pointerOver'], [TOP_PROGRESS, 'progress'], [TOP_SCROLL, 'scroll'], [TOP_SEEKING, 'seeking'], [TOP_STALLED, 'stalled'], [TOP_SUSPEND, 'suspend'], [TOP_TIME_UPDATE, 'timeUpdate'], [TOP_TOGGLE, 'toggle'], [TOP_TOUCH_MOVE, 'touchMove'], [TOP_TRANSITION_END, 'transitionEnd'], [TOP_WAITING, 'waiting'], [TOP_WHEEL, 'wheel']]; var eventTypes$4 = {}; var topLevelEventsToDispatchConfig = {}; function addEventTypeNameToConfig(_ref, isInteractive) { var topEvent = _ref[0], event = _ref[1]; var capitalizedEvent = event[0].toUpperCase() + event.slice(1); var onEvent = 'on' + capitalizedEvent; var type = { phasedRegistrationNames: { bubbled: onEvent, captured: onEvent + 'Capture' }, dependencies: [topEvent], isInteractive: isInteractive }; eventTypes$4[event] = type; topLevelEventsToDispatchConfig[topEvent] = type; } interactiveEventTypeNames.forEach(function (eventTuple) { addEventTypeNameToConfig(eventTuple, true); }); nonInteractiveEventTypeNames.forEach(function (eventTuple) { addEventTypeNameToConfig(eventTuple, false); }); // Only used in DEV for exhaustiveness validation. var knownHTMLTopLevelTypes = [TOP_ABORT, TOP_CANCEL, TOP_CAN_PLAY, TOP_CAN_PLAY_THROUGH, TOP_CLOSE, TOP_DURATION_CHANGE, TOP_EMPTIED, TOP_ENCRYPTED, TOP_ENDED, TOP_ERROR, TOP_INPUT, TOP_INVALID, TOP_LOAD, TOP_LOADED_DATA, TOP_LOADED_METADATA, TOP_LOAD_START, TOP_PAUSE, TOP_PLAY, TOP_PLAYING, TOP_PROGRESS, TOP_RATE_CHANGE, TOP_RESET, TOP_SEEKED, TOP_SEEKING, TOP_STALLED, TOP_SUBMIT, TOP_SUSPEND, TOP_TIME_UPDATE, TOP_TOGGLE, TOP_VOLUME_CHANGE, TOP_WAITING]; var SimpleEventPlugin = { eventTypes: eventTypes$4, isInteractiveTopLevelEventType: function (topLevelType) { var config = topLevelEventsToDispatchConfig[topLevelType]; return config !== undefined && config.isInteractive === true; }, extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType]; if (!dispatchConfig) { return null; } var EventConstructor = void 0; switch (topLevelType) { case TOP_KEY_PRESS: // Firefox creates a keypress event for function keys too. This removes // the unwanted keypress events. Enter is however both printable and // non-printable. One would expect Tab to be as well (but it isn't). if (getEventCharCode(nativeEvent) === 0) { return null; } /* falls through */ case TOP_KEY_DOWN: case TOP_KEY_UP: EventConstructor = SyntheticKeyboardEvent; break; case TOP_BLUR: case TOP_FOCUS: EventConstructor = SyntheticFocusEvent; break; case TOP_CLICK: // Firefox creates a click event on right mouse clicks. This removes the // unwanted click events. if (nativeEvent.button === 2) { return null; } /* falls through */ case TOP_AUX_CLICK: case TOP_DOUBLE_CLICK: case TOP_MOUSE_DOWN: case TOP_MOUSE_MOVE: case TOP_MOUSE_UP: // TODO: Disabled elements should not respond to mouse events /* falls through */ case TOP_MOUSE_OUT: case TOP_MOUSE_OVER: case TOP_CONTEXT_MENU: EventConstructor = SyntheticMouseEvent; break; case TOP_DRAG: case TOP_DRAG_END: case TOP_DRAG_ENTER: case TOP_DRAG_EXIT: case TOP_DRAG_LEAVE: case TOP_DRAG_OVER: case TOP_DRAG_START: case TOP_DROP: EventConstructor = SyntheticDragEvent; break; case TOP_TOUCH_CANCEL: case TOP_TOUCH_END: case TOP_TOUCH_MOVE: case TOP_TOUCH_START: EventConstructor = SyntheticTouchEvent; break; case TOP_ANIMATION_END: case TOP_ANIMATION_ITERATION: case TOP_ANIMATION_START: EventConstructor = SyntheticAnimationEvent; break; case TOP_TRANSITION_END: EventConstructor = SyntheticTransitionEvent; break; case TOP_SCROLL: EventConstructor = SyntheticUIEvent; break; case TOP_WHEEL: EventConstructor = SyntheticWheelEvent; break; case TOP_COPY: case TOP_CUT: case TOP_PASTE: EventConstructor = SyntheticClipboardEvent; break; case TOP_GOT_POINTER_CAPTURE: case TOP_LOST_POINTER_CAPTURE: case TOP_POINTER_CANCEL: case TOP_POINTER_DOWN: case TOP_POINTER_MOVE: case TOP_POINTER_OUT: case TOP_POINTER_OVER: case TOP_POINTER_UP: EventConstructor = SyntheticPointerEvent; break; default: { if (knownHTMLTopLevelTypes.indexOf(topLevelType) === -1) { warningWithoutStack$1(false, 'SimpleEventPlugin: Unhandled event type, `%s`. This warning ' + 'is likely caused by a bug in React. Please file an issue.', topLevelType); } } // HTML Events // @see http://www.w3.org/TR/html5/index.html#events-0 EventConstructor = SyntheticEvent; break; } var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget); accumulateTwoPhaseDispatches(event); return event; } }; var isInteractiveTopLevelEventType = SimpleEventPlugin.isInteractiveTopLevelEventType; var CALLBACK_BOOKKEEPING_POOL_SIZE = 10; var callbackBookkeepingPool = []; /** * Find the deepest React component completely containing the root of the * passed-in instance (for use when entire React trees are nested within each * other). If React trees are not nested, returns null. */ function findRootContainerNode(inst) { // TODO: It may be a good idea to cache this to prevent unnecessary DOM // traversal, but caching is difficult to do correctly without using a // mutation observer to listen for all DOM changes. while (inst.return) { inst = inst.return; } if (inst.tag !== HostRoot) { // This can happen if we're in a detached tree. return null; } return inst.stateNode.containerInfo; } // Used to store ancestor hierarchy in top level callback function getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst) { if (callbackBookkeepingPool.length) { var instance = callbackBookkeepingPool.pop(); instance.topLevelType = topLevelType; instance.nativeEvent = nativeEvent; instance.targetInst = targetInst; return instance; } return { topLevelType: topLevelType, nativeEvent: nativeEvent, targetInst: targetInst, ancestors: [] }; } function releaseTopLevelCallbackBookKeeping(instance) { instance.topLevelType = null; instance.nativeEvent = null; instance.targetInst = null; instance.ancestors.length = 0; if (callbackBookkeepingPool.length < CALLBACK_BOOKKEEPING_POOL_SIZE) { callbackBookkeepingPool.push(instance); } } function handleTopLevel(bookKeeping) { var targetInst = bookKeeping.targetInst; // Loop through the hierarchy, in case there's any nested components. // It's important that we build the array of ancestors before calling any // event handlers, because event handlers can modify the DOM, leading to // inconsistencies with ReactMount's node cache. See #1105. var ancestor = targetInst; do { if (!ancestor) { bookKeeping.ancestors.push(ancestor); break; } var root = findRootContainerNode(ancestor); if (!root) { break; } bookKeeping.ancestors.push(ancestor); ancestor = getClosestInstanceFromNode(root); } while (ancestor); for (var i = 0; i < bookKeeping.ancestors.length; i++) { targetInst = bookKeeping.ancestors[i]; runExtractedEventsInBatch(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent)); } } // TODO: can we stop exporting these? var _enabled = true; function setEnabled(enabled) { _enabled = !!enabled; } function isEnabled() { return _enabled; } /** * Traps top-level events by using event bubbling. * * @param {number} topLevelType Number from `TopLevelEventTypes`. * @param {object} element Element on which to attach listener. * @return {?object} An object with a remove function which will forcefully * remove the listener. * @internal */ function trapBubbledEvent(topLevelType, element) { if (!element) { return null; } var dispatch = isInteractiveTopLevelEventType(topLevelType) ? dispatchInteractiveEvent : dispatchEvent; addEventBubbleListener(element, getRawEventName(topLevelType), // Check if interactive and wrap in interactiveUpdates dispatch.bind(null, topLevelType)); } /** * Traps a top-level event by using event capturing. * * @param {number} topLevelType Number from `TopLevelEventTypes`. * @param {object} element Element on which to attach listener. * @return {?object} An object with a remove function which will forcefully * remove the listener. * @internal */ function trapCapturedEvent(topLevelType, element) { if (!element) { return null; } var dispatch = isInteractiveTopLevelEventType(topLevelType) ? dispatchInteractiveEvent : dispatchEvent; addEventCaptureListener(element, getRawEventName(topLevelType), // Check if interactive and wrap in interactiveUpdates dispatch.bind(null, topLevelType)); } function dispatchInteractiveEvent(topLevelType, nativeEvent) { interactiveUpdates(dispatchEvent, topLevelType, nativeEvent); } function dispatchEvent(topLevelType, nativeEvent) { if (!_enabled) { return; } var nativeEventTarget = getEventTarget(nativeEvent); var targetInst = getClosestInstanceFromNode(nativeEventTarget); if (targetInst !== null && typeof targetInst.tag === 'number' && !isFiberMounted(targetInst)) { // If we get an event (ex: img onload) before committing that // component's mount, ignore it for now (that is, treat it as if it was an // event on a non-React tree). We might also consider queueing events and // dispatching them after the mount. targetInst = null; } var bookKeeping = getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst); try { // Event queue being processed in the same cycle allows // `preventDefault`. batchedUpdates(handleTopLevel, bookKeeping); } finally { releaseTopLevelCallbackBookKeeping(bookKeeping); } } /** * Summary of `ReactBrowserEventEmitter` event handling: * * - Top-level delegation is used to trap most native browser events. This * may only occur in the main thread and is the responsibility of * ReactDOMEventListener, which is injected and can therefore support * pluggable event sources. This is the only work that occurs in the main * thread. * * - We normalize and de-duplicate events to account for browser quirks. This * may be done in the worker thread. * * - Forward these native events (with the associated top-level type used to * trap it) to `EventPluginHub`, which in turn will ask plugins if they want * to extract any synthetic events. * * - The `EventPluginHub` will then process each event by annotating them with * "dispatches", a sequence of listeners and IDs that care about that event. * * - The `EventPluginHub` then dispatches the events. * * Overview of React and the event system: * * +------------+ . * | DOM | . * +------------+ . * | . * v . * +------------+ . * | ReactEvent | . * | Listener | . * +------------+ . +-----------+ * | . +--------+|SimpleEvent| * | . | |Plugin | * +-----|------+ . v +-----------+ * | | | . +--------------+ +------------+ * | +-----------.--->|EventPluginHub| | Event | * | | . | | +-----------+ | Propagators| * | ReactEvent | . | | |TapEvent | |------------| * | Emitter | . | |<---+|Plugin | |other plugin| * | | . | | +-----------+ | utilities | * | +-----------.--->| | +------------+ * | | | . +--------------+ * +-----|------+ . ^ +-----------+ * | . | |Enter/Leave| * + . +-------+|Plugin | * +-------------+ . +-----------+ * | application | . * |-------------| . * | | . * | | . * +-------------+ . * . * React Core . General Purpose Event Plugin System */ var alreadyListeningTo = {}; var reactTopListenersCounter = 0; /** * To ensure no conflicts with other potential React instances on the page */ var topListenersIDKey = '_reactListenersID' + ('' + Math.random()).slice(2); function getListeningForDocument(mountAt) { // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty` // directly. if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) { mountAt[topListenersIDKey] = reactTopListenersCounter++; alreadyListeningTo[mountAt[topListenersIDKey]] = {}; } return alreadyListeningTo[mountAt[topListenersIDKey]]; } /** * We listen for bubbled touch events on the document object. * * Firefox v8.01 (and possibly others) exhibited strange behavior when * mounting `onmousemove` events at some node that was not the document * element. The symptoms were that if your mouse is not moving over something * contained within that mount point (for example on the background) the * top-level listeners for `onmousemove` won't be called. However, if you * register the `mousemove` on the document object, then it will of course * catch all `mousemove`s. This along with iOS quirks, justifies restricting * top-level listeners to the document object only, at least for these * movement types of events and possibly all events. * * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html * * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but * they bubble to document. * * @param {string} registrationName Name of listener (e.g. `onClick`). * @param {object} mountAt Container where to mount the listener */ function listenTo(registrationName, mountAt) { var isListening = getListeningForDocument(mountAt); var dependencies = registrationNameDependencies[registrationName]; for (var i = 0; i < dependencies.length; i++) { var dependency = dependencies[i]; if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) { switch (dependency) { case TOP_SCROLL: trapCapturedEvent(TOP_SCROLL, mountAt); break; case TOP_FOCUS: case TOP_BLUR: trapCapturedEvent(TOP_FOCUS, mountAt); trapCapturedEvent(TOP_BLUR, mountAt); // We set the flag for a single dependency later in this function, // but this ensures we mark both as attached rather than just one. isListening[TOP_BLUR] = true; isListening[TOP_FOCUS] = true; break; case TOP_CANCEL: case TOP_CLOSE: if (isEventSupported(getRawEventName(dependency))) { trapCapturedEvent(dependency, mountAt); } break; case TOP_INVALID: case TOP_SUBMIT: case TOP_RESET: // We listen to them on the target DOM elements. // Some of them bubble so we don't want them to fire twice. break; default: // By default, listen on the top level to all non-media events. // Media events don't bubble so adding the listener wouldn't do anything. var isMediaEvent = mediaEventTypes.indexOf(dependency) !== -1; if (!isMediaEvent) { trapBubbledEvent(dependency, mountAt); } break; } isListening[dependency] = true; } } } function isListeningToAllDependencies(registrationName, mountAt) { var isListening = getListeningForDocument(mountAt); var dependencies = registrationNameDependencies[registrationName]; for (var i = 0; i < dependencies.length; i++) { var dependency = dependencies[i]; if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) { return false; } } return true; } function getActiveElement(doc) { doc = doc || (typeof document !== 'undefined' ? document : undefined); if (typeof doc === 'undefined') { return null; } try { return doc.activeElement || doc.body; } catch (e) { return doc.body; } } /** * Given any node return the first leaf node without children. * * @param {DOMElement|DOMTextNode} node * @return {DOMElement|DOMTextNode} */ function getLeafNode(node) { while (node && node.firstChild) { node = node.firstChild; } return node; } /** * Get the next sibling within a container. This will walk up the * DOM if a node's siblings have been exhausted. * * @param {DOMElement|DOMTextNode} node * @return {?DOMElement|DOMTextNode} */ function getSiblingNode(node) { while (node) { if (node.nextSibling) { return node.nextSibling; } node = node.parentNode; } } /** * Get object describing the nodes which contain characters at offset. * * @param {DOMElement|DOMTextNode} root * @param {number} offset * @return {?object} */ function getNodeForCharacterOffset(root, offset) { var node = getLeafNode(root); var nodeStart = 0; var nodeEnd = 0; while (node) { if (node.nodeType === TEXT_NODE) { nodeEnd = nodeStart + node.textContent.length; if (nodeStart <= offset && nodeEnd >= offset) { return { node: node, offset: offset - nodeStart }; } nodeStart = nodeEnd; } node = getLeafNode(getSiblingNode(node)); } } /** * @param {DOMElement} outerNode * @return {?object} */ function getOffsets(outerNode) { var ownerDocument = outerNode.ownerDocument; var win = ownerDocument && ownerDocument.defaultView || window; var selection = win.getSelection && win.getSelection(); if (!selection || selection.rangeCount === 0) { return null; } var anchorNode = selection.anchorNode, anchorOffset = selection.anchorOffset, focusNode = selection.focusNode, focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the // up/down buttons on an . Anonymous divs do not seem to // expose properties, triggering a "Permission denied error" if any of its // properties are accessed. The only seemingly possible way to avoid erroring // is to access a property that typically works for non-anonymous divs and // catch any error that may otherwise arise. See // https://bugzilla.mozilla.org/show_bug.cgi?id=208427 try { /* eslint-disable no-unused-expressions */ anchorNode.nodeType; focusNode.nodeType; /* eslint-enable no-unused-expressions */ } catch (e) { return null; } return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset); } /** * Returns {start, end} where `start` is the character/codepoint index of * (anchorNode, anchorOffset) within the textContent of `outerNode`, and * `end` is the index of (focusNode, focusOffset). * * Returns null if you pass in garbage input but we should probably just crash. * * Exported only for testing. */ function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) { var length = 0; var start = -1; var end = -1; var indexWithinAnchor = 0; var indexWithinFocus = 0; var node = outerNode; var parentNode = null; outer: while (true) { var next = null; while (true) { if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) { start = length + anchorOffset; } if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) { end = length + focusOffset; } if (node.nodeType === TEXT_NODE) { length += node.nodeValue.length; } if ((next = node.firstChild) === null) { break; } // Moving from `node` to its first child `next`. parentNode = node; node = next; } while (true) { if (node === outerNode) { // If `outerNode` has children, this is always the second time visiting // it. If it has no children, this is still the first loop, and the only // valid selection is anchorNode and focusNode both equal to this node // and both offsets 0, in which case we will have handled above. break outer; } if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) { start = length; } if (parentNode === focusNode && ++indexWithinFocus === focusOffset) { end = length; } if ((next = node.nextSibling) !== null) { break; } node = parentNode; parentNode = node.parentNode; } // Moving from `node` to its next sibling `next`. node = next; } if (start === -1 || end === -1) { // This should never happen. (Would happen if the anchor/focus nodes aren't // actually inside the passed-in node.) return null; } return { start: start, end: end }; } /** * In modern non-IE browsers, we can support both forward and backward * selections. * * Note: IE10+ supports the Selection object, but it does not support * the `extend` method, which means that even in modern IE, it's not possible * to programmatically create a backward selection. Thus, for all IE * versions, we use the old IE API to create our selections. * * @param {DOMElement|DOMTextNode} node * @param {object} offsets */ function setOffsets(node, offsets) { var doc = node.ownerDocument || document; var win = doc && doc.defaultView || window; // Edge fails with "Object expected" in some scenarios. // (For instance: TinyMCE editor used in a list component that supports pasting to add more, // fails when pasting 100+ items) if (!win.getSelection) { return; } var selection = win.getSelection(); var length = node.textContent.length; var start = Math.min(offsets.start, length); var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method. // Flip backward selections, so we can set with a single range. if (!selection.extend && start > end) { var temp = end; end = start; start = temp; } var startMarker = getNodeForCharacterOffset(node, start); var endMarker = getNodeForCharacterOffset(node, end); if (startMarker && endMarker) { if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) { return; } var range = doc.createRange(); range.setStart(startMarker.node, startMarker.offset); selection.removeAllRanges(); if (start > end) { selection.addRange(range); selection.extend(endMarker.node, endMarker.offset); } else { range.setEnd(endMarker.node, endMarker.offset); selection.addRange(range); } } } function isTextNode(node) { return node && node.nodeType === TEXT_NODE; } function containsNode(outerNode, innerNode) { if (!outerNode || !innerNode) { return false; } else if (outerNode === innerNode) { return true; } else if (isTextNode(outerNode)) { return false; } else if (isTextNode(innerNode)) { return containsNode(outerNode, innerNode.parentNode); } else if ('contains' in outerNode) { return outerNode.contains(innerNode); } else if (outerNode.compareDocumentPosition) { return !!(outerNode.compareDocumentPosition(innerNode) & 16); } else { return false; } } function isInDocument(node) { return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node); } function getActiveElementDeep() { var win = window; var element = getActiveElement(); while (element instanceof win.HTMLIFrameElement) { // Accessing the contentDocument of a HTMLIframeElement can cause the browser // to throw, e.g. if it has a cross-origin src attribute try { win = element.contentDocument.defaultView; } catch (e) { return element; } element = getActiveElement(win.document); } return element; } /** * @ReactInputSelection: React input selection module. Based on Selection.js, * but modified to be suitable for react and has a couple of bug fixes (doesn't * assume buttons have range selections allowed). * Input selection module for React. */ /** * @hasSelectionCapabilities: we get the element types that support selection * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart` * and `selectionEnd` rows. */ function hasSelectionCapabilities(elem) { var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true'); } function getSelectionInformation() { var focusedElem = getActiveElementDeep(); return { focusedElem: focusedElem, selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection$1(focusedElem) : null }; } /** * @restoreSelection: If any selection information was potentially lost, * restore it. This is useful when performing operations that could remove dom * nodes and place them back in, resulting in focus being lost. */ function restoreSelection(priorSelectionInformation) { var curFocusedElem = getActiveElementDeep(); var priorFocusedElem = priorSelectionInformation.focusedElem; var priorSelectionRange = priorSelectionInformation.selectionRange; if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) { if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) { setSelection(priorFocusedElem, priorSelectionRange); } // Focusing a node can change the scroll position, which is undesirable var ancestors = []; var ancestor = priorFocusedElem; while (ancestor = ancestor.parentNode) { if (ancestor.nodeType === ELEMENT_NODE) { ancestors.push({ element: ancestor, left: ancestor.scrollLeft, top: ancestor.scrollTop }); } } if (typeof priorFocusedElem.focus === 'function') { priorFocusedElem.focus(); } for (var i = 0; i < ancestors.length; i++) { var info = ancestors[i]; info.element.scrollLeft = info.left; info.element.scrollTop = info.top; } } } /** * @getSelection: Gets the selection bounds of a focused textarea, input or * contentEditable node. * -@input: Look up selection bounds of this input * -@return {start: selectionStart, end: selectionEnd} */ function getSelection$1(input) { var selection = void 0; if ('selectionStart' in input) { // Modern browser with input or textarea. selection = { start: input.selectionStart, end: input.selectionEnd }; } else { // Content editable or old IE textarea. selection = getOffsets(input); } return selection || { start: 0, end: 0 }; } /** * @setSelection: Sets the selection bounds of a textarea or input and focuses * the input. * -@input Set selection bounds of this input or textarea * -@offsets Object of same form that is returned from get* */ function setSelection(input, offsets) { var start = offsets.start, end = offsets.end; if (end === undefined) { end = start; } if ('selectionStart' in input) { input.selectionStart = start; input.selectionEnd = Math.min(end, input.value.length); } else { setOffsets(input, offsets); } } var skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11; var eventTypes$3 = { select: { phasedRegistrationNames: { bubbled: 'onSelect', captured: 'onSelectCapture' }, dependencies: [TOP_BLUR, TOP_CONTEXT_MENU, TOP_DRAG_END, TOP_FOCUS, TOP_KEY_DOWN, TOP_KEY_UP, TOP_MOUSE_DOWN, TOP_MOUSE_UP, TOP_SELECTION_CHANGE] } }; var activeElement$1 = null; var activeElementInst$1 = null; var lastSelection = null; var mouseDown = false; /** * Get an object which is a unique representation of the current selection. * * The return value will not be consistent across nodes or browsers, but * two identical selections on the same node will return identical objects. * * @param {DOMElement} node * @return {object} */ function getSelection(node) { if ('selectionStart' in node && hasSelectionCapabilities(node)) { return { start: node.selectionStart, end: node.selectionEnd }; } else { var win = node.ownerDocument && node.ownerDocument.defaultView || window; var selection = win.getSelection(); return { anchorNode: selection.anchorNode, anchorOffset: selection.anchorOffset, focusNode: selection.focusNode, focusOffset: selection.focusOffset }; } } /** * Get document associated with the event target. * * @param {object} nativeEventTarget * @return {Document} */ function getEventTargetDocument(eventTarget) { return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument; } /** * Poll selection to see whether it's changed. * * @param {object} nativeEvent * @param {object} nativeEventTarget * @return {?SyntheticEvent} */ function constructSelectEvent(nativeEvent, nativeEventTarget) { // Ensure we have the right element, and that the user is not dragging a // selection (this matches native `select` event behavior). In HTML5, select // fires only on input and textarea thus if there's no focused element we // won't dispatch. var doc = getEventTargetDocument(nativeEventTarget); if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) { return null; } // Only fire when selection has actually changed. var currentSelection = getSelection(activeElement$1); if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) { lastSelection = currentSelection; var syntheticEvent = SyntheticEvent.getPooled(eventTypes$3.select, activeElementInst$1, nativeEvent, nativeEventTarget); syntheticEvent.type = 'select'; syntheticEvent.target = activeElement$1; accumulateTwoPhaseDispatches(syntheticEvent); return syntheticEvent; } return null; } /** * This plugin creates an `onSelect` event that normalizes select events * across form elements. * * Supported elements are: * - input (see `isTextInputElement`) * - textarea * - contentEditable * * This differs from native browser implementations in the following ways: * - Fires on contentEditable fields as well as inputs. * - Fires for collapsed selection. * - Fires after user input. */ var SelectEventPlugin = { eventTypes: eventTypes$3, extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { var doc = getEventTargetDocument(nativeEventTarget); // Track whether all listeners exists for this plugin. If none exist, we do // not extract events. See #3639. if (!doc || !isListeningToAllDependencies('onSelect', doc)) { return null; } var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window; switch (topLevelType) { // Track the input node that has focus. case TOP_FOCUS: if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') { activeElement$1 = targetNode; activeElementInst$1 = targetInst; lastSelection = null; } break; case TOP_BLUR: activeElement$1 = null; activeElementInst$1 = null; lastSelection = null; break; // Don't fire the event while the user is dragging. This matches the // semantics of the native select event. case TOP_MOUSE_DOWN: mouseDown = true; break; case TOP_CONTEXT_MENU: case TOP_MOUSE_UP: case TOP_DRAG_END: mouseDown = false; return constructSelectEvent(nativeEvent, nativeEventTarget); // Chrome and IE fire non-standard event when selection is changed (and // sometimes when it hasn't). IE's event fires out of order with respect // to key and input events on deletion, so we discard it. // // Firefox doesn't support selectionchange, so check selection status // after each key entry. The selection changes after keydown and before // keyup, but we check on keydown as well in the case of holding down a // key, when multiple keydown events are fired but only one keyup is. // This is also our approach for IE handling, for the reason above. case TOP_SELECTION_CHANGE: if (skipSelectionChangeEvent) { break; } // falls through case TOP_KEY_DOWN: case TOP_KEY_UP: return constructSelectEvent(nativeEvent, nativeEventTarget); } return null; } }; /** * Inject modules for resolving DOM hierarchy and plugin ordering. */ injection.injectEventPluginOrder(DOMEventPluginOrder); setComponentTree(getFiberCurrentPropsFromNode$1, getInstanceFromNode$1, getNodeFromInstance$1); /** * Some important event plugins included by default (without having to require * them). */ injection.injectEventPluginsByName({ SimpleEventPlugin: SimpleEventPlugin, EnterLeaveEventPlugin: EnterLeaveEventPlugin, ChangeEventPlugin: ChangeEventPlugin, SelectEventPlugin: SelectEventPlugin, BeforeInputEventPlugin: BeforeInputEventPlugin }); var didWarnSelectedSetOnOption = false; var didWarnInvalidChild = false; function flattenChildren(children) { var content = ''; // Flatten children. We'll warn if they are invalid // during validateProps() which runs for hydration too. // Note that this would throw on non-element objects. // Elements are stringified (which is normally irrelevant // but matters for ). React.Children.forEach(children, function (child) { if (child == null) { return; } content += child; // Note: we don't warn about invalid children here. // Instead, this is done separately below so that // it happens during the hydration codepath too. }); return content; } /** * Implements an