webpackJsonp([39,80],{ /***/ 1000: /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _classCallCheck2 = __webpack_require__(9); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _possibleConstructorReturn2 = __webpack_require__(10); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(11); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(4); var _reactDom2 = _interopRequireDefault(_reactDom); var _propTypes = __webpack_require__(1); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactLifecyclesCompat = __webpack_require__(7); var _createChainedFunction = __webpack_require__(1325); var _createChainedFunction2 = _interopRequireDefault(_createChainedFunction); var _KeyCode = __webpack_require__(944); var _KeyCode2 = _interopRequireDefault(_KeyCode); var _placements = __webpack_require__(1326); var _placements2 = _interopRequireDefault(_placements); var _rcTrigger = __webpack_require__(89); var _rcTrigger2 = _interopRequireDefault(_rcTrigger); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function noop() {} function refFn(field, component) { this[field] = component; } var Picker = function (_React$Component) { (0, _inherits3['default'])(Picker, _React$Component); function Picker(props) { (0, _classCallCheck3['default'])(this, Picker); var _this = (0, _possibleConstructorReturn3['default'])(this, _React$Component.call(this, props)); _initialiseProps.call(_this); var open = void 0; if ('open' in props) { open = props.open; } else { open = props.defaultOpen; } var value = props.value || props.defaultValue; _this.saveCalendarRef = refFn.bind(_this, 'calendarInstance'); _this.state = { open: open, value: value }; return _this; } Picker.prototype.componentDidUpdate = function componentDidUpdate(_, prevState) { if (!prevState.open && this.state.open) { // setTimeout is for making sure saveCalendarRef happen before focusCalendar this.focusTimeout = setTimeout(this.focusCalendar, 0, this); } }; Picker.prototype.componentWillUnmount = function componentWillUnmount() { clearTimeout(this.focusTimeout); }; Picker.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps) { var newState = {}; var value = nextProps.value, open = nextProps.open; if ('value' in nextProps) { newState.value = value; } if (open !== undefined) { newState.open = open; } return newState; }; Picker.prototype.render = function render() { var props = this.props; var prefixCls = props.prefixCls, placement = props.placement, style = props.style, getCalendarContainer = props.getCalendarContainer, align = props.align, animation = props.animation, disabled = props.disabled, dropdownClassName = props.dropdownClassName, transitionName = props.transitionName, children = props.children; var state = this.state; return _react2['default'].createElement( _rcTrigger2['default'], { popup: this.getCalendarElement(), popupAlign: align, builtinPlacements: _placements2['default'], popupPlacement: placement, action: disabled && !state.open ? [] : ['click'], destroyPopupOnHide: true, getPopupContainer: getCalendarContainer, popupStyle: style, popupAnimation: animation, popupTransitionName: transitionName, popupVisible: state.open, onPopupVisibleChange: this.onVisibleChange, prefixCls: prefixCls, popupClassName: dropdownClassName }, _react2['default'].cloneElement(children(state, props), { onKeyDown: this.onKeyDown }) ); }; return Picker; }(_react2['default'].Component); Picker.propTypes = { animation: _propTypes2['default'].oneOfType([_propTypes2['default'].func, _propTypes2['default'].string]), disabled: _propTypes2['default'].bool, transitionName: _propTypes2['default'].string, onChange: _propTypes2['default'].func, onOpenChange: _propTypes2['default'].func, children: _propTypes2['default'].func, getCalendarContainer: _propTypes2['default'].func, calendar: _propTypes2['default'].element, style: _propTypes2['default'].object, open: _propTypes2['default'].bool, defaultOpen: _propTypes2['default'].bool, prefixCls: _propTypes2['default'].string, placement: _propTypes2['default'].any, value: _propTypes2['default'].oneOfType([_propTypes2['default'].object, _propTypes2['default'].array]), defaultValue: _propTypes2['default'].oneOfType([_propTypes2['default'].object, _propTypes2['default'].array]), align: _propTypes2['default'].object, dateRender: _propTypes2['default'].func, onBlur: _propTypes2['default'].func }; Picker.defaultProps = { prefixCls: 'rc-calendar-picker', style: {}, align: {}, placement: 'bottomLeft', defaultOpen: false, onChange: noop, onOpenChange: noop, onBlur: noop }; var _initialiseProps = function _initialiseProps() { var _this2 = this; this.onCalendarKeyDown = function (event) { if (event.keyCode === _KeyCode2['default'].ESC) { event.stopPropagation(); _this2.close(_this2.focus); } }; this.onCalendarSelect = function (value) { var cause = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var props = _this2.props; if (!('value' in props)) { _this2.setState({ value: value }); } if (cause.source === 'keyboard' || cause.source === 'dateInputSelect' || !props.calendar.props.timePicker && cause.source !== 'dateInput' || cause.source === 'todayButton') { _this2.close(_this2.focus); } props.onChange(value); }; this.onKeyDown = function (event) { if (!_this2.state.open && (event.keyCode === _KeyCode2['default'].DOWN || event.keyCode === _KeyCode2['default'].ENTER)) { _this2.open(); event.preventDefault(); } }; this.onCalendarOk = function () { _this2.close(_this2.focus); }; this.onCalendarClear = function () { _this2.close(_this2.focus); }; this.onCalendarBlur = function () { _this2.setOpen(false); }; this.onVisibleChange = function (open) { _this2.setOpen(open); }; this.getCalendarElement = function () { var props = _this2.props; var state = _this2.state; var calendarProps = props.calendar.props; var value = state.value; var defaultValue = value; var extraProps = { ref: _this2.saveCalendarRef, defaultValue: defaultValue || calendarProps.defaultValue, selectedValue: value, onKeyDown: _this2.onCalendarKeyDown, onOk: (0, _createChainedFunction2['default'])(calendarProps.onOk, _this2.onCalendarOk), onSelect: (0, _createChainedFunction2['default'])(calendarProps.onSelect, _this2.onCalendarSelect), onClear: (0, _createChainedFunction2['default'])(calendarProps.onClear, _this2.onCalendarClear), onBlur: (0, _createChainedFunction2['default'])(calendarProps.onBlur, _this2.onCalendarBlur) }; return _react2['default'].cloneElement(props.calendar, extraProps); }; this.setOpen = function (open, callback) { var onOpenChange = _this2.props.onOpenChange; if (_this2.state.open !== open) { if (!('open' in _this2.props)) { _this2.setState({ open: open }, callback); } onOpenChange(open); } }; this.open = function (callback) { _this2.setOpen(true, callback); }; this.close = function (callback) { _this2.setOpen(false, callback); }; this.focus = function () { if (!_this2.state.open) { _reactDom2['default'].findDOMNode(_this2).focus(); } }; this.focusCalendar = function () { if (_this2.state.open && !!_this2.calendarInstance) { _this2.calendarInstance.focus(); } }; }; (0, _reactLifecyclesCompat.polyfill)(Picker); exports['default'] = Picker; module.exports = exports['default']; /***/ }), /***/ 1001: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var PropTypes = _interopRequireWildcard(__webpack_require__(1)); var _rcMenu = __webpack_require__(172); var _classnames = _interopRequireDefault(__webpack_require__(3)); var _MenuContext = _interopRequireDefault(__webpack_require__(889)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 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); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var SubMenu = /*#__PURE__*/ function (_React$Component) { _inherits(SubMenu, _React$Component); function SubMenu() { var _this; _classCallCheck(this, SubMenu); _this = _possibleConstructorReturn(this, _getPrototypeOf(SubMenu).apply(this, arguments)); _this.onKeyDown = function (e) { _this.subMenu.onKeyDown(e); }; _this.saveSubMenu = function (subMenu) { _this.subMenu = subMenu; }; return _this; } _createClass(SubMenu, [{ key: "render", value: function render() { var _this2 = this; var _this$props = this.props, rootPrefixCls = _this$props.rootPrefixCls, popupClassName = _this$props.popupClassName; return React.createElement(_MenuContext["default"].Consumer, null, function (_ref) { var antdMenuTheme = _ref.antdMenuTheme; return React.createElement(_rcMenu.SubMenu, _extends({}, _this2.props, { ref: _this2.saveSubMenu, popupClassName: (0, _classnames["default"])("".concat(rootPrefixCls, "-").concat(antdMenuTheme), popupClassName) })); }); } }]); return SubMenu; }(React.Component); SubMenu.contextTypes = { antdMenuTheme: PropTypes.string }; // fix issue:https://github.com/ant-design/ant-design/issues/8666 SubMenu.isSubMenu = 1; var _default = SubMenu; exports["default"] = _default; //# sourceMappingURL=SubMenu.js.map /***/ }), /***/ 1002: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _rcMenu = __webpack_require__(172); var _MenuContext = _interopRequireDefault(__webpack_require__(889)); var _tooltip = _interopRequireDefault(__webpack_require__(168)); var _Sider = __webpack_require__(905); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 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); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var __rest = void 0 && (void 0).__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var MenuItem = /*#__PURE__*/ function (_React$Component) { _inherits(MenuItem, _React$Component); function MenuItem() { var _this; _classCallCheck(this, MenuItem); _this = _possibleConstructorReturn(this, _getPrototypeOf(MenuItem).apply(this, arguments)); _this.onKeyDown = function (e) { _this.menuItem.onKeyDown(e); }; _this.saveMenuItem = function (menuItem) { _this.menuItem = menuItem; }; _this.renderItem = function (_ref) { var siderCollapsed = _ref.siderCollapsed; var _this$props = _this.props, level = _this$props.level, children = _this$props.children, rootPrefixCls = _this$props.rootPrefixCls; var _a = _this.props, title = _a.title, rest = __rest(_a, ["title"]); return React.createElement(_MenuContext["default"].Consumer, null, function (_ref2) { var inlineCollapsed = _ref2.inlineCollapsed; var tooltipProps = { title: title || (level === 1 ? children : '') }; if (!siderCollapsed && !inlineCollapsed) { tooltipProps.title = null; // Reset `visible` to fix control mode tooltip display not correct // ref: https://github.com/ant-design/ant-design/issues/16742 tooltipProps.visible = false; } return React.createElement(_tooltip["default"], _extends({}, tooltipProps, { placement: "right", overlayClassName: "".concat(rootPrefixCls, "-inline-collapsed-tooltip") }), React.createElement(_rcMenu.Item, _extends({}, rest, { title: title, ref: _this.saveMenuItem }))); }); }; return _this; } _createClass(MenuItem, [{ key: "render", value: function render() { return React.createElement(_Sider.SiderContext.Consumer, null, this.renderItem); } }]); return MenuItem; }(React.Component); exports["default"] = MenuItem; MenuItem.isMenuItem = true; //# sourceMappingURL=MenuItem.js.map /***/ }), /***/ 1003: /***/ (function(module, exports, __webpack_require__) { "use strict"; if (true) { module.exports = __webpack_require__(1027); } else { module.exports = require('./cjs/react-is.development.js'); } /***/ }), /***/ 1004: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _reactLifecyclesCompat = __webpack_require__(7); var _rcUpload = _interopRequireDefault(__webpack_require__(1138)); var _classnames = _interopRequireDefault(__webpack_require__(3)); var _uniqBy = _interopRequireDefault(__webpack_require__(1145)); var _findIndex = _interopRequireDefault(__webpack_require__(1197)); var _UploadList = _interopRequireDefault(__webpack_require__(1198)); var _utils = __webpack_require__(1019); var _LocaleReceiver = _interopRequireDefault(__webpack_require__(71)); var _default2 = _interopRequireDefault(__webpack_require__(180)); var _configProvider = __webpack_require__(12); var _warning = _interopRequireDefault(__webpack_require__(40)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 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; } function _extends() { _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); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 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); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var Upload = /*#__PURE__*/ function (_React$Component) { _inherits(Upload, _React$Component); function Upload(props) { var _this; _classCallCheck(this, Upload); _this = _possibleConstructorReturn(this, _getPrototypeOf(Upload).call(this, props)); _this.saveUpload = function (node) { _this.upload = node; }; _this.onStart = function (file) { var fileList = _this.state.fileList; var targetItem = (0, _utils.fileToObject)(file); targetItem.status = 'uploading'; var nextFileList = fileList.concat(); var fileIndex = (0, _findIndex["default"])(nextFileList, function (_ref) { var uid = _ref.uid; return uid === targetItem.uid; }); if (fileIndex === -1) { nextFileList.push(targetItem); } else { nextFileList[fileIndex] = targetItem; } _this.onChange({ file: targetItem, fileList: nextFileList }); // fix ie progress if (!window.File || Object({"NODE_ENV":"production","PUBLIC_URL":"/react/build/."}).TEST_IE) { _this.autoUpdateProgress(0, targetItem); } }; _this.onSuccess = function (response, file, xhr) { _this.clearProgressTimer(); try { if (typeof response === 'string') { response = JSON.parse(response); } } catch (e) { /* do nothing */ } var fileList = _this.state.fileList; var targetItem = (0, _utils.getFileItem)(file, fileList); // removed if (!targetItem) { return; } targetItem.status = 'done'; targetItem.response = response; targetItem.xhr = xhr; _this.onChange({ file: _extends({}, targetItem), fileList: fileList }); }; _this.onProgress = function (e, file) { var fileList = _this.state.fileList; var targetItem = (0, _utils.getFileItem)(file, fileList); // removed if (!targetItem) { return; } targetItem.percent = e.percent; _this.onChange({ event: e, file: _extends({}, targetItem), fileList: fileList }); }; _this.onError = function (error, response, file) { _this.clearProgressTimer(); var fileList = _this.state.fileList; var targetItem = (0, _utils.getFileItem)(file, fileList); // removed if (!targetItem) { return; } targetItem.error = error; targetItem.response = response; targetItem.status = 'error'; _this.onChange({ file: _extends({}, targetItem), fileList: fileList }); }; _this.handleRemove = function (file) { var onRemove = _this.props.onRemove; var fileList = _this.state.fileList; Promise.resolve(typeof onRemove === 'function' ? onRemove(file) : onRemove).then(function (ret) { // Prevent removing file if (ret === false) { return; } var removedFileList = (0, _utils.removeFileItem)(file, fileList); if (removedFileList) { file.status = 'removed'; // eslint-disable-line if (_this.upload) { _this.upload.abort(file); } _this.onChange({ file: file, fileList: removedFileList }); } }); }; _this.onChange = function (info) { if (!('fileList' in _this.props)) { _this.setState({ fileList: info.fileList }); } var onChange = _this.props.onChange; if (onChange) { onChange(info); } }; _this.onFileDrop = function (e) { _this.setState({ dragState: e.type }); }; _this.beforeUpload = function (file, fileList) { var beforeUpload = _this.props.beforeUpload; var stateFileList = _this.state.fileList; if (!beforeUpload) { return true; } var result = beforeUpload(file, fileList); if (result === false) { _this.onChange({ file: file, fileList: (0, _uniqBy["default"])(stateFileList.concat(fileList.map(_utils.fileToObject)), function (item) { return item.uid; }) }); return false; } if (result && result.then) { return result; } return true; }; _this.renderUploadList = function (locale) { var _this$props = _this.props, showUploadList = _this$props.showUploadList, listType = _this$props.listType, onPreview = _this$props.onPreview, onDownload = _this$props.onDownload, previewFile = _this$props.previewFile, disabled = _this$props.disabled, propLocale = _this$props.locale; var showRemoveIcon = showUploadList.showRemoveIcon, showPreviewIcon = showUploadList.showPreviewIcon, showDownloadIcon = showUploadList.showDownloadIcon; var fileList = _this.state.fileList; return React.createElement(_UploadList["default"], { listType: listType, items: fileList, previewFile: previewFile, onPreview: onPreview, onDownload: onDownload, onRemove: _this.handleRemove, showRemoveIcon: !disabled && showRemoveIcon, showPreviewIcon: showPreviewIcon, showDownloadIcon: showDownloadIcon, locale: _extends(_extends({}, locale), propLocale) }); }; _this.renderUpload = function (_ref2) { var _classNames2; var getPrefixCls = _ref2.getPrefixCls; var _this$props2 = _this.props, customizePrefixCls = _this$props2.prefixCls, className = _this$props2.className, showUploadList = _this$props2.showUploadList, listType = _this$props2.listType, type = _this$props2.type, disabled = _this$props2.disabled, children = _this$props2.children, style = _this$props2.style; var _this$state = _this.state, fileList = _this$state.fileList, dragState = _this$state.dragState; var prefixCls = getPrefixCls('upload', customizePrefixCls); var rcUploadProps = _extends(_extends({ onStart: _this.onStart, onError: _this.onError, onProgress: _this.onProgress, onSuccess: _this.onSuccess }, _this.props), { prefixCls: prefixCls, beforeUpload: _this.beforeUpload }); delete rcUploadProps.className; delete rcUploadProps.style; var uploadList = showUploadList ? React.createElement(_LocaleReceiver["default"], { componentName: "Upload", defaultLocale: _default2["default"].Upload }, _this.renderUploadList) : null; if (type === 'drag') { var _classNames; var dragCls = (0, _classnames["default"])(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-drag"), true), _defineProperty(_classNames, "".concat(prefixCls, "-drag-uploading"), fileList.some(function (file) { return file.status === 'uploading'; })), _defineProperty(_classNames, "".concat(prefixCls, "-drag-hover"), dragState === 'dragover'), _defineProperty(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames), className); return React.createElement("span", null, React.createElement("div", { className: dragCls, onDrop: _this.onFileDrop, onDragOver: _this.onFileDrop, onDragLeave: _this.onFileDrop, style: style }, React.createElement(_rcUpload["default"], _extends({}, rcUploadProps, { ref: _this.saveUpload, className: "".concat(prefixCls, "-btn") }), React.createElement("div", { className: "".concat(prefixCls, "-drag-container") }, children))), uploadList); } var uploadButtonCls = (0, _classnames["default"])(prefixCls, (_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefixCls, "-select"), true), _defineProperty(_classNames2, "".concat(prefixCls, "-select-").concat(listType), true), _defineProperty(_classNames2, "".concat(prefixCls, "-disabled"), disabled), _classNames2)); // Remove id to avoid open by label when trigger is hidden // https://github.com/ant-design/ant-design/issues/14298 // https://github.com/ant-design/ant-design/issues/16478 if (!children || disabled) { delete rcUploadProps.id; } var uploadButton = React.createElement("div", { className: uploadButtonCls, style: children ? undefined : { display: 'none' } }, React.createElement(_rcUpload["default"], _extends({}, rcUploadProps, { ref: _this.saveUpload }))); if (listType === 'picture-card') { return React.createElement("span", { className: (0, _classnames["default"])(className, "".concat(prefixCls, "-picture-card-wrapper")) }, uploadList, uploadButton); } return React.createElement("span", { className: className }, uploadButton, uploadList); }; _this.state = { fileList: props.fileList || props.defaultFileList || [], dragState: 'drop' }; (0, _warning["default"])('fileList' in props || !('value' in props), 'Upload', '`value` is not validate prop, do you mean `fileList`?'); return _this; } _createClass(Upload, [{ key: "componentWillUnmount", value: function componentWillUnmount() { this.clearProgressTimer(); } }, { key: "clearProgressTimer", value: function clearProgressTimer() { clearInterval(this.progressTimer); } }, { key: "autoUpdateProgress", value: function autoUpdateProgress(_, file) { var _this2 = this; var getPercent = (0, _utils.genPercentAdd)(); var curPercent = 0; this.clearProgressTimer(); this.progressTimer = setInterval(function () { curPercent = getPercent(curPercent); _this2.onProgress({ percent: curPercent * 100 }, file); }, 200); } }, { key: "render", value: function render() { return React.createElement(_configProvider.ConfigConsumer, null, this.renderUpload); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps) { if ('fileList' in nextProps) { return { fileList: nextProps.fileList || [] }; } return null; } }]); return Upload; }(React.Component); Upload.defaultProps = { type: 'select', multiple: false, action: '', data: {}, accept: '', beforeUpload: _utils.T, showUploadList: true, listType: 'text', className: '', disabled: false, supportServerRender: true }; (0, _reactLifecyclesCompat.polyfill)(Upload); var _default = Upload; exports["default"] = _default; //# sourceMappingURL=Upload.js.map /***/ }), /***/ 1005: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = uid; var now = +new Date(); var index = 0; function uid() { return "rc-upload-" + now + "-" + ++index; } /***/ }), /***/ 1006: /***/ (function(module, exports, __webpack_require__) { var baseMatches = __webpack_require__(1146), baseMatchesProperty = __webpack_require__(1183), identity = __webpack_require__(1186), isArray = __webpack_require__(877), property = __webpack_require__(1187); /** * The base implementation of `_.iteratee`. * * @private * @param {*} [value=_.identity] The value to convert to an iteratee. * @returns {Function} Returns the iteratee. */ function baseIteratee(value) { // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. if (typeof value == 'function') { return value; } if (value == null) { return identity; } if (typeof value == 'object') { return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); } return property(value); } module.exports = baseIteratee; /***/ }), /***/ 1007: /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(886), stackClear = __webpack_require__(1148), stackDelete = __webpack_require__(1149), stackGet = __webpack_require__(1150), stackHas = __webpack_require__(1151), stackSet = __webpack_require__(1152); /** * Creates a stack cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Stack(entries) { var data = this.__data__ = new ListCache(entries); this.size = data.size; } // Add methods to `Stack`. Stack.prototype.clear = stackClear; Stack.prototype['delete'] = stackDelete; Stack.prototype.get = stackGet; Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; module.exports = Stack; /***/ }), /***/ 1008: /***/ (function(module, exports, __webpack_require__) { var baseIsEqualDeep = __webpack_require__(1153), isObjectLike = __webpack_require__(320); /** * The base implementation of `_.isEqual` which supports partial comparisons * and tracks traversed objects. * * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. * @param {boolean} bitmask The bitmask flags. * 1 - Unordered comparison * 2 - Partial comparison * @param {Function} [customizer] The function to customize comparisons. * @param {Object} [stack] Tracks traversed `value` and `other` objects. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; } if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { return value !== value && other !== other; } return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); } module.exports = baseIsEqual; /***/ }), /***/ 1009: /***/ (function(module, exports, __webpack_require__) { var SetCache = __webpack_require__(1010), arraySome = __webpack_require__(1156), cacheHas = __webpack_require__(1011); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * A specialized version of `baseIsEqualDeep` for arrays with support for * partial deep comparisons. * * @private * @param {Array} array The array to compare. * @param {Array} other The other array to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `array` and `other` objects. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } // Assume cyclic values are equal. var stacked = stack.get(array); if (stacked && stack.get(other)) { return stacked == other; } var index = -1, result = true, seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; stack.set(array, other); stack.set(other, array); // Ignore non-index properties. while (++index < arrLength) { var arrValue = array[index], othValue = other[index]; if (customizer) { var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); } if (compared !== undefined) { if (compared) { continue; } result = false; break; } // Recursively compare arrays (susceptible to call stack limits). if (seen) { if (!arraySome(other, function(othValue, othIndex) { if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { return seen.push(othIndex); } })) { result = false; break; } } else if (!( arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack) )) { result = false; break; } } stack['delete'](array); stack['delete'](other); return result; } module.exports = equalArrays; /***/ }), /***/ 1010: /***/ (function(module, exports, __webpack_require__) { var MapCache = __webpack_require__(894), setCacheAdd = __webpack_require__(1154), setCacheHas = __webpack_require__(1155); /** * * Creates an array cache object to store unique values. * * @private * @constructor * @param {Array} [values] The values to cache. */ function SetCache(values) { var index = -1, length = values == null ? 0 : values.length; this.__data__ = new MapCache; while (++index < length) { this.add(values[index]); } } // Add methods to `SetCache`. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; SetCache.prototype.has = setCacheHas; module.exports = SetCache; /***/ }), /***/ 1011: /***/ (function(module, exports) { /** * Checks if a `cache` value for `key` exists. * * @private * @param {Object} cache The cache to query. * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function cacheHas(cache, key) { return cache.has(key); } module.exports = cacheHas; /***/ }), /***/ 1012: /***/ (function(module, exports, __webpack_require__) { var arrayLikeKeys = __webpack_require__(1167), baseKeys = __webpack_require__(1173), isArrayLike = __webpack_require__(1177); /** * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keys(new Foo); * // => ['a', 'b'] (iteration order is not guaranteed) * * _.keys('hi'); * // => ['0', '1'] */ function keys(object) { return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } module.exports = keys; /***/ }), /***/ 1013: /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(167), stubFalse = __webpack_require__(1169); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; /** * Checks if `value` is a buffer. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. * @example * * _.isBuffer(new Buffer(2)); * // => true * * _.isBuffer(new Uint8Array(2)); * // => false */ var isBuffer = nativeIsBuffer || stubFalse; module.exports = isBuffer; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(322)(module))) /***/ }), /***/ 1014: /***/ (function(module, exports, __webpack_require__) { var baseIsTypedArray = __webpack_require__(1170), baseUnary = __webpack_require__(1171), nodeUtil = __webpack_require__(1172); /* Node.js helper references. */ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** * Checks if `value` is classified as a typed array. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. * @example * * _.isTypedArray(new Uint8Array); * // => true * * _.isTypedArray([]); * // => false */ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; module.exports = isTypedArray; /***/ }), /***/ 1015: /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(878), root = __webpack_require__(167); /* Built-in method references that are verified to be native. */ var Set = getNative(root, 'Set'); module.exports = Set; /***/ }), /***/ 1016: /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(170); /** * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` if suitable for strict * equality comparisons, else `false`. */ function isStrictComparable(value) { return value === value && !isObject(value); } module.exports = isStrictComparable; /***/ }), /***/ 1017: /***/ (function(module, exports) { /** * A specialized version of `matchesProperty` for source values suitable * for strict equality comparisons, i.e. `===`. * * @private * @param {string} key The key of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec function. */ function matchesStrictComparable(key, srcValue) { return function(object) { if (object == null) { return false; } return object[key] === srcValue && (srcValue !== undefined || (key in Object(object))); }; } module.exports = matchesStrictComparable; /***/ }), /***/ 1018: /***/ (function(module, exports) { /** * The base implementation of `_.findIndex` and `_.findLastIndex` without * support for iteratee shorthands. * * @private * @param {Array} array The array to inspect. * @param {Function} predicate The function invoked per iteration. * @param {number} fromIndex The index to search from. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {number} Returns the index of the matched value, else `-1`. */ function baseFindIndex(array, predicate, fromIndex, fromRight) { var length = array.length, index = fromIndex + (fromRight ? 1 : -1); while ((fromRight ? index-- : ++index < length)) { if (predicate(array[index], index, array)) { return index; } } return -1; } module.exports = baseFindIndex; /***/ }), /***/ 1019: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.T = T; exports.fileToObject = fileToObject; exports.genPercentAdd = genPercentAdd; exports.getFileItem = getFileItem; exports.removeFileItem = removeFileItem; exports.previewImage = previewImage; exports.isImageUrl = void 0; function _extends() { _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); } function T() { return true; } // Fix IE file.status problem // via coping a new Object function fileToObject(file) { return _extends(_extends({}, file), { lastModified: file.lastModified, lastModifiedDate: file.lastModifiedDate, name: file.name, size: file.size, type: file.type, uid: file.uid, percent: 0, originFileObj: file }); } /** * 生成Progress percent: 0.1 -> 0.98 * - for ie */ function genPercentAdd() { var k = 0.1; var i = 0.01; var end = 0.98; return function (s) { var start = s; if (start >= end) { return start; } start += k; k -= i; if (k < 0.001) { k = 0.001; } return start; }; } function getFileItem(file, fileList) { var matchKey = file.uid !== undefined ? 'uid' : 'name'; return fileList.filter(function (item) { return item[matchKey] === file[matchKey]; })[0]; } function removeFileItem(file, fileList) { var matchKey = file.uid !== undefined ? 'uid' : 'name'; var removed = fileList.filter(function (item) { return item[matchKey] !== file[matchKey]; }); if (removed.length === fileList.length) { return null; } return removed; } // ==================== Default Image Preview ==================== var extname = function extname() { var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; var temp = url.split('/'); var filename = temp[temp.length - 1]; var filenameWithoutSuffix = filename.split(/#|\?/)[0]; return (/\.[^./\\]*$/.exec(filenameWithoutSuffix) || [''])[0]; }; var isImageFileType = function isImageFileType(type) { return !!type && type.indexOf('image/') === 0; }; var isImageUrl = function isImageUrl(file) { if (isImageFileType(file.type)) { return true; } var url = file.thumbUrl || file.url; var extension = extname(url); if (/^data:image\//.test(url) || /(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(extension)) { return true; } if (/^data:/.test(url)) { // other file types of base64 return false; } if (extension) { // other file types which have extension return false; } return true; }; exports.isImageUrl = isImageUrl; var MEASURE_SIZE = 200; function previewImage(file) { return new Promise(function (resolve) { if (!isImageFileType(file.type)) { resolve(''); return; } var canvas = document.createElement('canvas'); canvas.width = MEASURE_SIZE; canvas.height = MEASURE_SIZE; canvas.style.cssText = "position: fixed; left: 0; top: 0; width: ".concat(MEASURE_SIZE, "px; height: ").concat(MEASURE_SIZE, "px; z-index: 9999; display: none;"); document.body.appendChild(canvas); var ctx = canvas.getContext('2d'); var img = new Image(); img.onload = function () { var width = img.width, height = img.height; var drawWidth = MEASURE_SIZE; var drawHeight = MEASURE_SIZE; var offsetX = 0; var offsetY = 0; if (width < height) { drawHeight = height * (MEASURE_SIZE / width); offsetY = -(drawHeight - drawWidth) / 2; } else { drawWidth = width * (MEASURE_SIZE / height); offsetX = -(drawWidth - drawHeight) / 2; } ctx.drawImage(img, offsetX, offsetY, drawWidth, drawHeight); var dataURL = canvas.toDataURL(); document.body.removeChild(canvas); resolve(dataURL); }; img.src = window.URL.createObjectURL(file); }); } //# sourceMappingURL=utils.js.map /***/ }), /***/ 1020: /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(334), __esModule: true }; /***/ }), /***/ 1021: /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _from = __webpack_require__(1020); var _from2 = _interopRequireDefault(_from); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return (0, _from2.default)(arr); } }; /***/ }), /***/ 1022: /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ var React = __webpack_require__(0); var factory = __webpack_require__(1023); if (typeof React === 'undefined') { throw Error( 'create-react-class could not find the React object. If you are using script tags, ' + 'make sure that React is being loaded before create-react-class.' ); } // Hack to grab NoopUpdateQueue from isomorphic React var ReactNoopUpdateQueue = new React.Component().updater; module.exports = factory( React.Component, React.isValidElement, ReactNoopUpdateQueue ); /***/ }), /***/ 1023: /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ var _assign = __webpack_require__(76); var emptyObject = __webpack_require__(1024); var _invariant = __webpack_require__(1025); if (false) { var warning = require('fbjs/lib/warning'); } var MIXINS_KEY = 'mixins'; // Helper function to allow the creation of anonymous functions which do not // have .name set to the name of the variable being assigned to. function identity(fn) { return fn; } var ReactPropTypeLocationNames; if (false) { ReactPropTypeLocationNames = { prop: 'prop', context: 'context', childContext: 'child context' }; } else { ReactPropTypeLocationNames = {}; } function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) { /** * Policies that describe methods in `ReactClassInterface`. */ var injectedMixins = []; /** * Composite components are higher-level components that compose other composite * or host components. * * To create a new type of `ReactClass`, pass a specification of * your new class to `React.createClass`. The only requirement of your class * specification is that you implement a `render` method. * * var MyComponent = React.createClass({ * render: function() { * return
Hello World
; * } * }); * * The class specification supports a specific protocol of methods that have * special meaning (e.g. `render`). See `ReactClassInterface` for * more the comprehensive protocol. Any other properties and methods in the * class specification will be available on the prototype. * * @interface ReactClassInterface * @internal */ var ReactClassInterface = { /** * An array of Mixin objects to include when defining your component. * * @type {array} * @optional */ mixins: 'DEFINE_MANY', /** * An object containing properties and methods that should be defined on * the component's constructor instead of its prototype (static methods). * * @type {object} * @optional */ statics: 'DEFINE_MANY', /** * Definition of prop types for this component. * * @type {object} * @optional */ propTypes: 'DEFINE_MANY', /** * Definition of context types for this component. * * @type {object} * @optional */ contextTypes: 'DEFINE_MANY', /** * Definition of context types this component sets for its children. * * @type {object} * @optional */ childContextTypes: 'DEFINE_MANY', // ==== Definition methods ==== /** * Invoked when the component is mounted. Values in the mapping will be set on * `this.props` if that prop is not specified (i.e. using an `in` check). * * This method is invoked before `getInitialState` and therefore cannot rely * on `this.state` or use `this.setState`. * * @return {object} * @optional */ getDefaultProps: 'DEFINE_MANY_MERGED', /** * Invoked once before the component is mounted. The return value will be used * as the initial value of `this.state`. * * getInitialState: function() { * return { * isOn: false, * fooBaz: new BazFoo() * } * } * * @return {object} * @optional */ getInitialState: 'DEFINE_MANY_MERGED', /** * @return {object} * @optional */ getChildContext: 'DEFINE_MANY_MERGED', /** * Uses props from `this.props` and state from `this.state` to render the * structure of the component. * * No guarantees are made about when or how often this method is invoked, so * it must not have side effects. * * render: function() { * var name = this.props.name; * return
Hello, {name}!
; * } * * @return {ReactComponent} * @required */ render: 'DEFINE_ONCE', // ==== Delegate methods ==== /** * Invoked when the component is initially created and about to be mounted. * This may have side effects, but any external subscriptions or data created * by this method must be cleaned up in `componentWillUnmount`. * * @optional */ componentWillMount: 'DEFINE_MANY', /** * Invoked when the component has been mounted and has a DOM representation. * However, there is no guarantee that the DOM node is in the document. * * Use this as an opportunity to operate on the DOM when the component has * been mounted (initialized and rendered) for the first time. * * @param {DOMElement} rootNode DOM element representing the component. * @optional */ componentDidMount: 'DEFINE_MANY', /** * Invoked before the component receives new props. * * Use this as an opportunity to react to a prop transition by updating the * state using `this.setState`. Current props are accessed via `this.props`. * * componentWillReceiveProps: function(nextProps, nextContext) { * this.setState({ * likesIncreasing: nextProps.likeCount > this.props.likeCount * }); * } * * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop * transition may cause a state change, but the opposite is not true. If you * need it, you are probably looking for `componentWillUpdate`. * * @param {object} nextProps * @optional */ componentWillReceiveProps: 'DEFINE_MANY', /** * Invoked while deciding if the component should be updated as a result of * receiving new props, state and/or context. * * Use this as an opportunity to `return false` when you're certain that the * transition to the new props/state/context will not require a component * update. * * shouldComponentUpdate: function(nextProps, nextState, nextContext) { * return !equal(nextProps, this.props) || * !equal(nextState, this.state) || * !equal(nextContext, this.context); * } * * @param {object} nextProps * @param {?object} nextState * @param {?object} nextContext * @return {boolean} True if the component should update. * @optional */ shouldComponentUpdate: 'DEFINE_ONCE', /** * Invoked when the component is about to update due to a transition from * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` * and `nextContext`. * * Use this as an opportunity to perform preparation before an update occurs. * * NOTE: You **cannot** use `this.setState()` in this method. * * @param {object} nextProps * @param {?object} nextState * @param {?object} nextContext * @param {ReactReconcileTransaction} transaction * @optional */ componentWillUpdate: 'DEFINE_MANY', /** * Invoked when the component's DOM representation has been updated. * * Use this as an opportunity to operate on the DOM when the component has * been updated. * * @param {object} prevProps * @param {?object} prevState * @param {?object} prevContext * @param {DOMElement} rootNode DOM element representing the component. * @optional */ componentDidUpdate: 'DEFINE_MANY', /** * Invoked when the component is about to be removed from its parent and have * its DOM representation destroyed. * * Use this as an opportunity to deallocate any external resources. * * NOTE: There is no `componentDidUnmount` since your component will have been * destroyed by that point. * * @optional */ componentWillUnmount: 'DEFINE_MANY', /** * Replacement for (deprecated) `componentWillMount`. * * @optional */ UNSAFE_componentWillMount: 'DEFINE_MANY', /** * Replacement for (deprecated) `componentWillReceiveProps`. * * @optional */ UNSAFE_componentWillReceiveProps: 'DEFINE_MANY', /** * Replacement for (deprecated) `componentWillUpdate`. * * @optional */ UNSAFE_componentWillUpdate: 'DEFINE_MANY', // ==== Advanced methods ==== /** * Updates the component's currently mounted DOM representation. * * By default, this implements React's rendering and reconciliation algorithm. * Sophisticated clients may wish to override this. * * @param {ReactReconcileTransaction} transaction * @internal * @overridable */ updateComponent: 'OVERRIDE_BASE' }; /** * Similar to ReactClassInterface but for static methods. */ var ReactClassStaticInterface = { /** * This method is invoked after a component is instantiated and when it * receives new props. Return an object to update state in response to * prop changes. Return null to indicate no change to state. * * If an object is returned, its keys will be merged into the existing state. * * @return {object || null} * @optional */ getDerivedStateFromProps: 'DEFINE_MANY_MERGED' }; /** * Mapping from class specification keys to special processing functions. * * Although these are declared like instance properties in the specification * when defining classes using `React.createClass`, they are actually static * and are accessible on the constructor instead of the prototype. Despite * being static, they must be defined outside of the "statics" key under * which all other static methods are defined. */ var RESERVED_SPEC_KEYS = { displayName: function(Constructor, displayName) { Constructor.displayName = displayName; }, mixins: function(Constructor, mixins) { if (mixins) { for (var i = 0; i < mixins.length; i++) { mixSpecIntoComponent(Constructor, mixins[i]); } } }, childContextTypes: function(Constructor, childContextTypes) { if (false) { validateTypeDef(Constructor, childContextTypes, 'childContext'); } Constructor.childContextTypes = _assign( {}, Constructor.childContextTypes, childContextTypes ); }, contextTypes: function(Constructor, contextTypes) { if (false) { validateTypeDef(Constructor, contextTypes, 'context'); } Constructor.contextTypes = _assign( {}, Constructor.contextTypes, contextTypes ); }, /** * Special case getDefaultProps which should move into statics but requires * automatic merging. */ getDefaultProps: function(Constructor, getDefaultProps) { if (Constructor.getDefaultProps) { Constructor.getDefaultProps = createMergedResultFunction( Constructor.getDefaultProps, getDefaultProps ); } else { Constructor.getDefaultProps = getDefaultProps; } }, propTypes: function(Constructor, propTypes) { if (false) { validateTypeDef(Constructor, propTypes, 'prop'); } Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); }, statics: function(Constructor, statics) { mixStaticSpecIntoComponent(Constructor, statics); }, autobind: function() {} }; function validateTypeDef(Constructor, typeDef, location) { for (var propName in typeDef) { if (typeDef.hasOwnProperty(propName)) { // use a warning instead of an _invariant so components // don't show up in prod but only in __DEV__ if (false) { warning( typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName ); } } } } function validateMethodOverride(isAlreadyDefined, name) { var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null; // Disallow overriding of base class methods unless explicitly allowed. if (ReactClassMixin.hasOwnProperty(name)) { _invariant( specPolicy === 'OVERRIDE_BASE', 'ReactClassInterface: You are attempting to override ' + '`%s` from your class specification. Ensure that your method names ' + 'do not overlap with React methods.', name ); } // Disallow defining methods more than once unless explicitly allowed. if (isAlreadyDefined) { _invariant( specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', 'ReactClassInterface: You are attempting to define ' + '`%s` on your component more than once. This conflict may be due ' + 'to a mixin.', name ); } } /** * Mixin helper which handles policy validation and reserved * specification keys when building React classes. */ function mixSpecIntoComponent(Constructor, spec) { if (!spec) { if (false) { var typeofSpec = typeof spec; var isMixinValid = typeofSpec === 'object' && spec !== null; if (process.env.NODE_ENV !== 'production') { warning( isMixinValid, "%s: You're attempting to include a mixin that is either null " + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec ); } } return; } _invariant( typeof spec !== 'function', "ReactClass: You're attempting to " + 'use a component class or function as a mixin. Instead, just use a ' + 'regular object.' ); _invariant( !isValidElement(spec), "ReactClass: You're attempting to " + 'use a component as a mixin. Instead, just use a regular object.' ); var proto = Constructor.prototype; var autoBindPairs = proto.__reactAutoBindPairs; // By handling mixins before any other properties, we ensure the same // chaining order is applied to methods with DEFINE_MANY policy, whether // mixins are listed before or after these methods in the spec. if (spec.hasOwnProperty(MIXINS_KEY)) { RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); } for (var name in spec) { if (!spec.hasOwnProperty(name)) { continue; } if (name === MIXINS_KEY) { // We have already handled mixins in a special case above. continue; } var property = spec[name]; var isAlreadyDefined = proto.hasOwnProperty(name); validateMethodOverride(isAlreadyDefined, name); if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { RESERVED_SPEC_KEYS[name](Constructor, property); } else { // Setup methods on prototype: // The following member methods should not be automatically bound: // 1. Expected ReactClass methods (in the "interface"). // 2. Overridden methods (that were mixed in). var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); var isFunction = typeof property === 'function'; var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false; if (shouldAutoBind) { autoBindPairs.push(name, property); proto[name] = property; } else { if (isAlreadyDefined) { var specPolicy = ReactClassInterface[name]; // These cases should already be caught by validateMethodOverride. _invariant( isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY'), 'ReactClass: Unexpected spec policy %s for key %s ' + 'when mixing in component specs.', specPolicy, name ); // For methods which are defined more than once, call the existing // methods before calling the new property, merging if appropriate. if (specPolicy === 'DEFINE_MANY_MERGED') { proto[name] = createMergedResultFunction(proto[name], property); } else if (specPolicy === 'DEFINE_MANY') { proto[name] = createChainedFunction(proto[name], property); } } else { proto[name] = property; if (false) { // Add verbose displayName to the function, which helps when looking // at profiling tools. if (typeof property === 'function' && spec.displayName) { proto[name].displayName = spec.displayName + '_' + name; } } } } } } } function mixStaticSpecIntoComponent(Constructor, statics) { if (!statics) { return; } for (var name in statics) { var property = statics[name]; if (!statics.hasOwnProperty(name)) { continue; } var isReserved = name in RESERVED_SPEC_KEYS; _invariant( !isReserved, 'ReactClass: You are attempting to define a reserved ' + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + 'as an instance property instead; it will still be accessible on the ' + 'constructor.', name ); var isAlreadyDefined = name in Constructor; if (isAlreadyDefined) { var specPolicy = ReactClassStaticInterface.hasOwnProperty(name) ? ReactClassStaticInterface[name] : null; _invariant( specPolicy === 'DEFINE_MANY_MERGED', 'ReactClass: You are attempting to define ' + '`%s` on your component more than once. This conflict may be ' + 'due to a mixin.', name ); Constructor[name] = createMergedResultFunction(Constructor[name], property); return; } Constructor[name] = property; } } /** * Merge two objects, but throw if both contain the same key. * * @param {object} one The first object, which is mutated. * @param {object} two The second object * @return {object} one after it has been mutated to contain everything in two. */ function mergeIntoWithNoDuplicateKeys(one, two) { _invariant( one && two && typeof one === 'object' && typeof two === 'object', 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.' ); for (var key in two) { if (two.hasOwnProperty(key)) { _invariant( one[key] === undefined, 'mergeIntoWithNoDuplicateKeys(): ' + 'Tried to merge two objects with the same key: `%s`. This conflict ' + 'may be due to a mixin; in particular, this may be caused by two ' + 'getInitialState() or getDefaultProps() methods returning objects ' + 'with clashing keys.', key ); one[key] = two[key]; } } return one; } /** * Creates a function that invokes two functions and merges their return values. * * @param {function} one Function to invoke first. * @param {function} two Function to invoke second. * @return {function} Function that invokes the two argument functions. * @private */ function createMergedResultFunction(one, two) { return function mergedResult() { var a = one.apply(this, arguments); var b = two.apply(this, arguments); if (a == null) { return b; } else if (b == null) { return a; } var c = {}; mergeIntoWithNoDuplicateKeys(c, a); mergeIntoWithNoDuplicateKeys(c, b); return c; }; } /** * Creates a function that invokes two functions and ignores their return vales. * * @param {function} one Function to invoke first. * @param {function} two Function to invoke second. * @return {function} Function that invokes the two argument functions. * @private */ function createChainedFunction(one, two) { return function chainedFunction() { one.apply(this, arguments); two.apply(this, arguments); }; } /** * Binds a method to the component. * * @param {object} component Component whose method is going to be bound. * @param {function} method Method to be bound. * @return {function} The bound method. */ function bindAutoBindMethod(component, method) { var boundMethod = method.bind(component); if (false) { boundMethod.__reactBoundContext = component; boundMethod.__reactBoundMethod = method; boundMethod.__reactBoundArguments = null; var componentName = component.constructor.displayName; var _bind = boundMethod.bind; boundMethod.bind = function(newThis) { for ( var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++ ) { args[_key - 1] = arguments[_key]; } // User is trying to bind() an autobound method; we effectively will // ignore the value of "this" that the user is trying to use, so // let's warn. if (newThis !== component && newThis !== null) { if (process.env.NODE_ENV !== 'production') { warning( false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName ); } } else if (!args.length) { if (process.env.NODE_ENV !== 'production') { warning( false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName ); } return boundMethod; } var reboundMethod = _bind.apply(boundMethod, arguments); reboundMethod.__reactBoundContext = component; reboundMethod.__reactBoundMethod = method; reboundMethod.__reactBoundArguments = args; return reboundMethod; }; } return boundMethod; } /** * Binds all auto-bound methods in a component. * * @param {object} component Component whose method is going to be bound. */ function bindAutoBindMethods(component) { var pairs = component.__reactAutoBindPairs; for (var i = 0; i < pairs.length; i += 2) { var autoBindKey = pairs[i]; var method = pairs[i + 1]; component[autoBindKey] = bindAutoBindMethod(component, method); } } var IsMountedPreMixin = { componentDidMount: function() { this.__isMounted = true; } }; var IsMountedPostMixin = { componentWillUnmount: function() { this.__isMounted = false; } }; /** * Add more to the ReactClass base class. These are all legacy features and * therefore not already part of the modern ReactComponent. */ var ReactClassMixin = { /** * TODO: This will be deprecated because state should always keep a consistent * type signature and the only use case for this, is to avoid that. */ replaceState: function(newState, callback) { this.updater.enqueueReplaceState(this, newState, callback); }, /** * Checks whether or not this composite component is mounted. * @return {boolean} True if mounted, false otherwise. * @protected * @final */ isMounted: function() { if (false) { warning( this.__didWarnIsMounted, '%s: isMounted is deprecated. Instead, make sure to clean up ' + 'subscriptions and pending requests in componentWillUnmount to ' + 'prevent memory leaks.', (this.constructor && this.constructor.displayName) || this.name || 'Component' ); this.__didWarnIsMounted = true; } return !!this.__isMounted; } }; var ReactClassComponent = function() {}; _assign( ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin ); /** * Creates a composite component class given a class specification. * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass * * @param {object} spec Class specification (which must define `render`). * @return {function} Component constructor function. * @public */ function createClass(spec) { // To keep our warnings more understandable, we'll use a little hack here to // ensure that Constructor.name !== 'Constructor'. This makes sure we don't // unnecessarily identify a class without displayName as 'Constructor'. var Constructor = identity(function(props, context, updater) { // This constructor gets overridden by mocks. The argument is used // by mocks to assert on what gets mounted. if (false) { warning( this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory' ); } // Wire up auto-binding if (this.__reactAutoBindPairs.length) { bindAutoBindMethods(this); } this.props = props; this.context = context; this.refs = emptyObject; this.updater = updater || ReactNoopUpdateQueue; this.state = null; // ReactClasses doesn't have constructors. Instead, they use the // getInitialState and componentWillMount methods for initialization. var initialState = this.getInitialState ? this.getInitialState() : null; if (false) { // We allow auto-mocks to proceed as if they're returning null. if ( initialState === undefined && this.getInitialState._isMockFunction ) { // This is probably bad practice. Consider warning here and // deprecating this convenience. initialState = null; } } _invariant( typeof initialState === 'object' && !Array.isArray(initialState), '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent' ); this.state = initialState; }); Constructor.prototype = new ReactClassComponent(); Constructor.prototype.constructor = Constructor; Constructor.prototype.__reactAutoBindPairs = []; injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); mixSpecIntoComponent(Constructor, IsMountedPreMixin); mixSpecIntoComponent(Constructor, spec); mixSpecIntoComponent(Constructor, IsMountedPostMixin); // Initialize the defaultProps property after all mixins have been merged. if (Constructor.getDefaultProps) { Constructor.defaultProps = Constructor.getDefaultProps(); } if (false) { // This is a tag to indicate that the use of these method names is ok, // since it's used with createClass. If it's not, then it's likely a // mistake so we'll warn you to use the static property, property // initializer or constructor respectively. if (Constructor.getDefaultProps) { Constructor.getDefaultProps.isReactClassApproved = {}; } if (Constructor.prototype.getInitialState) { Constructor.prototype.getInitialState.isReactClassApproved = {}; } } _invariant( Constructor.prototype.render, 'createClass(...): Class specification must implement a `render` method.' ); if (false) { warning( !Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component' ); warning( !Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component' ); warning( !Constructor.prototype.UNSAFE_componentWillRecieveProps, '%s has a method called UNSAFE_componentWillRecieveProps(). ' + 'Did you mean UNSAFE_componentWillReceiveProps()?', spec.displayName || 'A component' ); } // Reduce time spent doing lookups by setting these on the prototype. for (var methodName in ReactClassInterface) { if (!Constructor.prototype[methodName]) { Constructor.prototype[methodName] = null; } } return Constructor; } return createClass; } module.exports = factory; /***/ }), /***/ 1024: /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ var emptyObject = {}; if (false) { Object.freeze(emptyObject); } module.exports = emptyObject; /***/ }), /***/ 1025: /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ /** * Use invariant() to assert state which your program assumes to be true. * * Provide sprintf-style format (only %s is supported) and arguments * to provide information about what broke and what you were * expecting. * * The invariant message will be stripped in production, but the invariant * will remain to ensure logic does not differ in production. */ var validateFormat = function validateFormat(format) {}; if (false) { validateFormat = function validateFormat(format) { if (format === undefined) { throw new Error('invariant requires an error message argument'); } }; } function invariant(condition, format, a, b, c, d, e, f) { validateFormat(format); if (!condition) { var error; if (format === undefined) { error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; error = new Error(format.replace(/%s/g, function () { return args[argIndex++]; })); error.name = 'Invariant Violation'; } error.framesToPop = 1; // we don't care about invariant's own frame throw error; } } module.exports = invariant; /***/ }), /***/ 1026: /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright 2015, Yahoo! Inc. * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. */ var ReactIs = __webpack_require__(1003); var REACT_STATICS = { childContextTypes: true, contextType: true, contextTypes: true, defaultProps: true, displayName: true, getDefaultProps: true, getDerivedStateFromError: true, getDerivedStateFromProps: true, mixins: true, propTypes: true, type: true }; var KNOWN_STATICS = { name: true, length: true, prototype: true, caller: true, callee: true, arguments: true, arity: true }; var FORWARD_REF_STATICS = { '$$typeof': true, render: true, defaultProps: true, displayName: true, propTypes: true }; var MEMO_STATICS = { '$$typeof': true, compare: true, defaultProps: true, displayName: true, propTypes: true, type: true }; var TYPE_STATICS = {}; TYPE_STATICS[ReactIs.ForwardRef] = FORWARD_REF_STATICS; function getStatics(component) { if (ReactIs.isMemo(component)) { return MEMO_STATICS; } return TYPE_STATICS[component['$$typeof']] || REACT_STATICS; } var defineProperty = Object.defineProperty; var getOwnPropertyNames = Object.getOwnPropertyNames; var getOwnPropertySymbols = Object.getOwnPropertySymbols; var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; var getPrototypeOf = Object.getPrototypeOf; var objectPrototype = Object.prototype; function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) { if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components if (objectPrototype) { var inheritedComponent = getPrototypeOf(sourceComponent); if (inheritedComponent && inheritedComponent !== objectPrototype) { hoistNonReactStatics(targetComponent, inheritedComponent, blacklist); } } var keys = getOwnPropertyNames(sourceComponent); if (getOwnPropertySymbols) { keys = keys.concat(getOwnPropertySymbols(sourceComponent)); } var targetStatics = getStatics(targetComponent); var sourceStatics = getStatics(sourceComponent); for (var i = 0; i < keys.length; ++i) { var key = keys[i]; if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) { var descriptor = getOwnPropertyDescriptor(sourceComponent, key); try { // Avoid failures from read-only properties defineProperty(targetComponent, key, descriptor); } catch (e) {} } } return targetComponent; } return targetComponent; } module.exports = hoistNonReactStatics; /***/ }), /***/ 1027: /***/ (function(module, exports, __webpack_require__) { "use strict"; /** @license React v16.8.6 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ Object.defineProperty(exports,"__esModule",{value:!0}); var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?Symbol.for("react.memo"): 60115,r=b?Symbol.for("react.lazy"):60116;function t(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case h:return a;default:return u}}case r:case q:case d:return u}}}function v(a){return t(a)===m}exports.typeOf=t;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n; exports.Fragment=e;exports.Lazy=r;exports.Memo=q;exports.Portal=d;exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||"object"===typeof a&&null!==a&&(a.$$typeof===r||a.$$typeof===q||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n)};exports.isAsyncMode=function(a){return v(a)||t(a)===l};exports.isConcurrentMode=v;exports.isContextConsumer=function(a){return t(a)===k}; exports.isContextProvider=function(a){return t(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return t(a)===n};exports.isFragment=function(a){return t(a)===e};exports.isLazy=function(a){return t(a)===r};exports.isMemo=function(a){return t(a)===q};exports.isPortal=function(a){return t(a)===d};exports.isProfiler=function(a){return t(a)===g};exports.isStrictMode=function(a){return t(a)===f}; exports.isSuspense=function(a){return t(a)===p}; /***/ }), /***/ 1028: /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a \n ' + domainScript + '\n \n \n
\n \n ' + domainInput + '\n \n
\n \n \n '; } }, { key: 'initIframeSrc', value: function initIframeSrc() { if (this.domain) { this.getIframeNode().src = 'javascript:void((function(){\n var d = document;\n d.open();\n d.domain=\'' + this.domain + '\';\n d.write(\'\');\n d.close();\n })())'; } } }, { key: 'initIframe', value: function initIframe() { var iframeNode = this.getIframeNode(); var win = iframeNode.contentWindow; var doc = void 0; this.domain = this.domain || ''; this.initIframeSrc(); try { doc = win.document; } catch (e) { this.domain = document.domain; this.initIframeSrc(); win = iframeNode.contentWindow; doc = win.document; } doc.open('text/html', 'replace'); doc.write(this.getIframeHTML(this.domain)); doc.close(); this.getFormInputNode().onchange = this.onChange; } }, { key: 'endUpload', value: function endUpload() { if (this.state.uploading) { this.file = {}; // hack avoid batch this.state.uploading = false; this.setState({ uploading: false }); this.initIframe(); } } }, { key: 'startUpload', value: function startUpload() { if (!this.state.uploading) { this.state.uploading = true; this.setState({ uploading: true }); } } }, { key: 'updateIframeWH', value: function updateIframeWH() { var rootNode = __WEBPACK_IMPORTED_MODULE_8_react_dom___default.a.findDOMNode(this); var iframeNode = this.getIframeNode(); iframeNode.style.height = rootNode.offsetHeight + 'px'; iframeNode.style.width = rootNode.offsetWidth + 'px'; } }, { key: 'abort', value: function abort(file) { if (file) { var uid = file; if (file && file.uid) { uid = file.uid; } if (uid === this.file.uid) { this.endUpload(); } } else { this.endUpload(); } } }, { key: 'post', value: function post(file) { var _this4 = this; var formNode = this.getFormNode(); var dataSpan = this.getFormDataNode(); var data = this.props.data; var onStart = this.props.onStart; if (typeof data === 'function') { data = data(file); } var inputs = document.createDocumentFragment(); for (var key in data) { if (data.hasOwnProperty(key)) { var input = document.createElement('input'); input.setAttribute('name', key); input.value = data[key]; inputs.appendChild(input); } } dataSpan.appendChild(inputs); new Promise(function (resolve) { var action = _this4.props.action; if (typeof action === 'function') { return resolve(action(file)); } resolve(action); }).then(function (action) { formNode.setAttribute('action', action); formNode.submit(); dataSpan.innerHTML = ''; onStart(file); }); } }, { key: 'render', value: function render() { var _classNames; var _props = this.props, Tag = _props.component, disabled = _props.disabled, className = _props.className, prefixCls = _props.prefixCls, children = _props.children, style = _props.style; var iframeStyle = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({}, IFRAME_STYLE, { display: this.state.uploading || disabled ? 'none' : '' }); var cls = __WEBPACK_IMPORTED_MODULE_9_classnames___default()((_classNames = {}, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_classNames, prefixCls, true), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_classNames, prefixCls + '-disabled', disabled), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_defineProperty___default()(_classNames, className, className), _classNames)); return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement( Tag, { className: cls, style: __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({ position: 'relative', zIndex: 0 }, style) }, __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('iframe', { ref: this.saveIframe, onLoad: this.onLoad, style: iframeStyle }), children ); } }]); return IframeUploader; }(__WEBPACK_IMPORTED_MODULE_6_react__["Component"]); IframeUploader.propTypes = { component: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string, style: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object, disabled: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, prefixCls: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string, className: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string, accept: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string, onStart: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func, multiple: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, children: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.any, data: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func]), action: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func]), name: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string }; /* harmony default export */ __webpack_exports__["a"] = (IframeUploader); /***/ }), /***/ 1145: /***/ (function(module, exports, __webpack_require__) { var baseIteratee = __webpack_require__(1006), baseUniq = __webpack_require__(1189); /** * This method is like `_.uniq` except that it accepts `iteratee` which is * invoked for each element in `array` to generate the criterion by which * uniqueness is computed. The order of result values is determined by the * order they occur in the array. The iteratee is invoked with one argument: * (value). * * @static * @memberOf _ * @since 4.0.0 * @category Array * @param {Array} array The array to inspect. * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {Array} Returns the new duplicate free array. * @example * * _.uniqBy([2.1, 1.2, 2.3], Math.floor); * // => [2.1, 1.2] * * // The `_.property` iteratee shorthand. * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); * // => [{ 'x': 1 }, { 'x': 2 }] */ function uniqBy(array, iteratee) { return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : []; } module.exports = uniqBy; /***/ }), /***/ 1146: /***/ (function(module, exports, __webpack_require__) { var baseIsMatch = __webpack_require__(1147), getMatchData = __webpack_require__(1182), matchesStrictComparable = __webpack_require__(1017); /** * The base implementation of `_.matches` which doesn't clone `source`. * * @private * @param {Object} source The object of property values to match. * @returns {Function} Returns the new spec function. */ function baseMatches(source) { var matchData = getMatchData(source); if (matchData.length == 1 && matchData[0][2]) { return matchesStrictComparable(matchData[0][0], matchData[0][1]); } return function(object) { return object === source || baseIsMatch(object, source, matchData); }; } module.exports = baseMatches; /***/ }), /***/ 1147: /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__(1007), baseIsEqual = __webpack_require__(1008); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * The base implementation of `_.isMatch` without support for iteratee shorthands. * * @private * @param {Object} object The object to inspect. * @param {Object} source The object of property values to match. * @param {Array} matchData The property names, values, and compare flags to match. * @param {Function} [customizer] The function to customize comparisons. * @returns {boolean} Returns `true` if `object` is a match, else `false`. */ function baseIsMatch(object, source, matchData, customizer) { var index = matchData.length, length = index, noCustomizer = !customizer; if (object == null) { return !length; } object = Object(object); while (index--) { var data = matchData[index]; if ((noCustomizer && data[2]) ? data[1] !== object[data[0]] : !(data[0] in object) ) { return false; } } while (++index < length) { data = matchData[index]; var key = data[0], objValue = object[key], srcValue = data[1]; if (noCustomizer && data[2]) { if (objValue === undefined && !(key in object)) { return false; } } else { var stack = new Stack; if (customizer) { var result = customizer(objValue, srcValue, key, object, source, stack); } if (!(result === undefined ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result )) { return false; } } } return true; } module.exports = baseIsMatch; /***/ }), /***/ 1148: /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(886); /** * Removes all key-value entries from the stack. * * @private * @name clear * @memberOf Stack */ function stackClear() { this.__data__ = new ListCache; this.size = 0; } module.exports = stackClear; /***/ }), /***/ 1149: /***/ (function(module, exports) { /** * Removes `key` and its value from the stack. * * @private * @name delete * @memberOf Stack * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function stackDelete(key) { var data = this.__data__, result = data['delete'](key); this.size = data.size; return result; } module.exports = stackDelete; /***/ }), /***/ 1150: /***/ (function(module, exports) { /** * Gets the stack value for `key`. * * @private * @name get * @memberOf Stack * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function stackGet(key) { return this.__data__.get(key); } module.exports = stackGet; /***/ }), /***/ 1151: /***/ (function(module, exports) { /** * Checks if a stack value for `key` exists. * * @private * @name has * @memberOf Stack * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function stackHas(key) { return this.__data__.has(key); } module.exports = stackHas; /***/ }), /***/ 1152: /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(886), Map = __webpack_require__(893), MapCache = __webpack_require__(894); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; /** * Sets the stack `key` to `value`. * * @private * @name set * @memberOf Stack * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the stack cache instance. */ function stackSet(key, value) { var data = this.__data__; if (data instanceof ListCache) { var pairs = data.__data__; if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { pairs.push([key, value]); this.size = ++data.size; return this; } data = this.__data__ = new MapCache(pairs); } data.set(key, value); this.size = data.size; return this; } module.exports = stackSet; /***/ }), /***/ 1153: /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__(1007), equalArrays = __webpack_require__(1009), equalByTag = __webpack_require__(1157), equalObjects = __webpack_require__(1160), getTag = __webpack_require__(1178), isArray = __webpack_require__(877), isBuffer = __webpack_require__(1013), isTypedArray = __webpack_require__(1014); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', objectTag = '[object Object]'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * A specialized version of `baseIsEqual` for arrays and objects which performs * deep comparisons and tracks traversed objects enabling objects with circular * references to be compared. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} [stack] Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other); objTag = objTag == argsTag ? objectTag : objTag; othTag = othTag == argsTag ? objectTag : othTag; var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; if (isSameTag && isBuffer(object)) { if (!isBuffer(other)) { return false; } objIsArr = true; objIsObj = false; } if (isSameTag && !objIsObj) { stack || (stack = new Stack); return (objIsArr || isTypedArray(object)) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); } if (!(bitmask & COMPARE_PARTIAL_FLAG)) { var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; stack || (stack = new Stack); return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } } if (!isSameTag) { return false; } stack || (stack = new Stack); return equalObjects(object, other, bitmask, customizer, equalFunc, stack); } module.exports = baseIsEqualDeep; /***/ }), /***/ 1154: /***/ (function(module, exports) { /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** * Adds `value` to the array cache. * * @private * @name add * @memberOf SetCache * @alias push * @param {*} value The value to cache. * @returns {Object} Returns the cache instance. */ function setCacheAdd(value) { this.__data__.set(value, HASH_UNDEFINED); return this; } module.exports = setCacheAdd; /***/ }), /***/ 1155: /***/ (function(module, exports) { /** * Checks if `value` is in the array cache. * * @private * @name has * @memberOf SetCache * @param {*} value The value to search for. * @returns {number} Returns `true` if `value` is found, else `false`. */ function setCacheHas(value) { return this.__data__.has(value); } module.exports = setCacheHas; /***/ }), /***/ 1156: /***/ (function(module, exports) { /** * A specialized version of `_.some` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. */ function arraySome(array, predicate) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (predicate(array[index], index, array)) { return true; } } return false; } module.exports = arraySome; /***/ }), /***/ 1157: /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(178), Uint8Array = __webpack_require__(1158), eq = __webpack_require__(883), equalArrays = __webpack_require__(1009), mapToArray = __webpack_require__(1159), setToArray = __webpack_require__(925); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** `Object#toString` result references. */ var boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', mapTag = '[object Map]', numberTag = '[object Number]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]'; /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** * A specialized version of `baseIsEqualDeep` for comparing objects of * the same `toStringTag`. * * **Note:** This function only supports comparing values with tags of * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {string} tag The `toStringTag` of the objects to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { switch (tag) { case dataViewTag: if ((object.byteLength != other.byteLength) || (object.byteOffset != other.byteOffset)) { return false; } object = object.buffer; other = other.buffer; case arrayBufferTag: if ((object.byteLength != other.byteLength) || !equalFunc(new Uint8Array(object), new Uint8Array(other))) { return false; } return true; case boolTag: case dateTag: case numberTag: // Coerce booleans to `1` or `0` and dates to milliseconds. // Invalid dates are coerced to `NaN`. return eq(+object, +other); case errorTag: return object.name == other.name && object.message == other.message; case regexpTag: case stringTag: // Coerce regexes to strings and treat strings, primitives and objects, // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring // for more details. return object == (other + ''); case mapTag: var convert = mapToArray; case setTag: var isPartial = bitmask & COMPARE_PARTIAL_FLAG; convert || (convert = setToArray); if (object.size != other.size && !isPartial) { return false; } // Assume cyclic values are equal. var stacked = stack.get(object); if (stacked) { return stacked == other; } bitmask |= COMPARE_UNORDERED_FLAG; // Recursively compare objects (susceptible to call stack limits). stack.set(object, other); var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); stack['delete'](object); return result; case symbolTag: if (symbolValueOf) { return symbolValueOf.call(object) == symbolValueOf.call(other); } } return false; } module.exports = equalByTag; /***/ }), /***/ 1158: /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(167); /** Built-in value references. */ var Uint8Array = root.Uint8Array; module.exports = Uint8Array; /***/ }), /***/ 1159: /***/ (function(module, exports) { /** * Converts `map` to its key-value pairs. * * @private * @param {Object} map The map to convert. * @returns {Array} Returns the key-value pairs. */ function mapToArray(map) { var index = -1, result = Array(map.size); map.forEach(function(value, key) { result[++index] = [key, value]; }); return result; } module.exports = mapToArray; /***/ }), /***/ 1160: /***/ (function(module, exports, __webpack_require__) { var getAllKeys = __webpack_require__(1161); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * A specialized version of `baseIsEqualDeep` for objects with support for * partial deep comparisons. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; if (objLength != othLength && !isPartial) { return false; } var index = objLength; while (index--) { var key = objProps[index]; if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { return false; } } // Assume cyclic values are equal. var stacked = stack.get(object); if (stacked && stack.get(other)) { return stacked == other; } var result = true; stack.set(object, other); stack.set(other, object); var skipCtor = isPartial; while (++index < objLength) { key = objProps[index]; var objValue = object[key], othValue = other[key]; if (customizer) { var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); } // Recursively compare objects (susceptible to call stack limits). if (!(compared === undefined ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) : compared )) { result = false; break; } skipCtor || (skipCtor = key == 'constructor'); } if (result && !skipCtor) { var objCtor = object.constructor, othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. if (objCtor != othCtor && ('constructor' in object && 'constructor' in other) && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { result = false; } } stack['delete'](object); stack['delete'](other); return result; } module.exports = equalObjects; /***/ }), /***/ 1161: /***/ (function(module, exports, __webpack_require__) { var baseGetAllKeys = __webpack_require__(1162), getSymbols = __webpack_require__(1164), keys = __webpack_require__(1012); /** * Creates an array of own enumerable property names and symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names and symbols. */ function getAllKeys(object) { return baseGetAllKeys(object, keys, getSymbols); } module.exports = getAllKeys; /***/ }), /***/ 1162: /***/ (function(module, exports, __webpack_require__) { var arrayPush = __webpack_require__(1163), isArray = __webpack_require__(877); /** * The base implementation of `getAllKeys` and `getAllKeysIn` which uses * `keysFunc` and `symbolsFunc` to get the enumerable property names and * symbols of `object`. * * @private * @param {Object} object The object to query. * @param {Function} keysFunc The function to get the keys of `object`. * @param {Function} symbolsFunc The function to get the symbols of `object`. * @returns {Array} Returns the array of property names and symbols. */ function baseGetAllKeys(object, keysFunc, symbolsFunc) { var result = keysFunc(object); return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } module.exports = baseGetAllKeys; /***/ }), /***/ 1163: /***/ (function(module, exports) { /** * Appends the elements of `values` to `array`. * * @private * @param {Array} array The array to modify. * @param {Array} values The values to append. * @returns {Array} Returns `array`. */ function arrayPush(array, values) { var index = -1, length = values.length, offset = array.length; while (++index < length) { array[offset + index] = values[index]; } return array; } module.exports = arrayPush; /***/ }), /***/ 1164: /***/ (function(module, exports, __webpack_require__) { var arrayFilter = __webpack_require__(1165), stubArray = __webpack_require__(1166); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbols = !nativeGetSymbols ? stubArray : function(object) { if (object == null) { return []; } object = Object(object); return arrayFilter(nativeGetSymbols(object), function(symbol) { return propertyIsEnumerable.call(object, symbol); }); }; module.exports = getSymbols; /***/ }), /***/ 1165: /***/ (function(module, exports) { /** * A specialized version of `_.filter` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function arrayFilter(array, predicate) { var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (predicate(value, index, array)) { result[resIndex++] = value; } } return result; } module.exports = arrayFilter; /***/ }), /***/ 1166: /***/ (function(module, exports) { /** * This method returns a new empty array. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {Array} Returns the new empty array. * @example * * var arrays = _.times(2, _.stubArray); * * console.log(arrays); * // => [[], []] * * console.log(arrays[0] === arrays[1]); * // => false */ function stubArray() { return []; } module.exports = stubArray; /***/ }), /***/ 1167: /***/ (function(module, exports, __webpack_require__) { var baseTimes = __webpack_require__(1168), isArguments = __webpack_require__(910), isArray = __webpack_require__(877), isBuffer = __webpack_require__(1013), isIndex = __webpack_require__(890), isTypedArray = __webpack_require__(1014); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Creates an array of the enumerable property names of the array-like `value`. * * @private * @param {*} value The value to query. * @param {boolean} inherited Specify returning inherited property names. * @returns {Array} Returns the array of property names. */ function arrayLikeKeys(value, inherited) { var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; for (var key in value) { if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. (isBuff && (key == 'offset' || key == 'parent')) || // PhantomJS 2 has enumerable non-index properties on typed arrays. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || // Skip index properties. isIndex(key, length) ))) { result.push(key); } } return result; } module.exports = arrayLikeKeys; /***/ }), /***/ 1168: /***/ (function(module, exports) { /** * The base implementation of `_.times` without support for iteratee shorthands * or max array length checks. * * @private * @param {number} n The number of times to invoke `iteratee`. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the array of results. */ function baseTimes(n, iteratee) { var index = -1, result = Array(n); while (++index < n) { result[index] = iteratee(index); } return result; } module.exports = baseTimes; /***/ }), /***/ 1169: /***/ (function(module, exports) { /** * This method returns `false`. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {boolean} Returns `false`. * @example * * _.times(2, _.stubFalse); * // => [false, false] */ function stubFalse() { return false; } module.exports = stubFalse; /***/ }), /***/ 1170: /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(319), isLength = __webpack_require__(895), isObjectLike = __webpack_require__(320); /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** Used to identify `toStringTag` values of typed arrays. */ var typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; /** * The base implementation of `_.isTypedArray` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ function baseIsTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } module.exports = baseIsTypedArray; /***/ }), /***/ 1171: /***/ (function(module, exports) { /** * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { return func(value); }; } module.exports = baseUnary; /***/ }), /***/ 1172: /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(338); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Detect free variable `process` from Node.js. */ var freeProcess = moduleExports && freeGlobal.process; /** Used to access faster Node.js helpers. */ var nodeUtil = (function() { try { // Use `util.types` for Node.js 10+. var types = freeModule && freeModule.require && freeModule.require('util').types; if (types) { return types; } // Legacy `process.binding('util')` for Node.js < 10. return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} }()); module.exports = nodeUtil; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(322)(module))) /***/ }), /***/ 1173: /***/ (function(module, exports, __webpack_require__) { var isPrototype = __webpack_require__(1174), nativeKeys = __webpack_require__(1175); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeys(object) { if (!isPrototype(object)) { return nativeKeys(object); } var result = []; for (var key in Object(object)) { if (hasOwnProperty.call(object, key) && key != 'constructor') { result.push(key); } } return result; } module.exports = baseKeys; /***/ }), /***/ 1174: /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Checks if `value` is likely a prototype object. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ function isPrototype(value) { var Ctor = value && value.constructor, proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; return value === proto; } module.exports = isPrototype; /***/ }), /***/ 1175: /***/ (function(module, exports, __webpack_require__) { var overArg = __webpack_require__(1176); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeKeys = overArg(Object.keys, Object); module.exports = nativeKeys; /***/ }), /***/ 1176: /***/ (function(module, exports) { /** * Creates a unary function that invokes `func` with its argument transformed. * * @private * @param {Function} func The function to wrap. * @param {Function} transform The argument transform. * @returns {Function} Returns the new function. */ function overArg(func, transform) { return function(arg) { return func(transform(arg)); }; } module.exports = overArg; /***/ }), /***/ 1177: /***/ (function(module, exports, __webpack_require__) { var isFunction = __webpack_require__(908), isLength = __webpack_require__(895); /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * * _.isArrayLike([1, 2, 3]); * // => true * * _.isArrayLike(document.body.children); * // => true * * _.isArrayLike('abc'); * // => true * * _.isArrayLike(_.noop); * // => false */ function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction(value); } module.exports = isArrayLike; /***/ }), /***/ 1178: /***/ (function(module, exports, __webpack_require__) { var DataView = __webpack_require__(1179), Map = __webpack_require__(893), Promise = __webpack_require__(1180), Set = __webpack_require__(1015), WeakMap = __webpack_require__(1181), baseGetTag = __webpack_require__(319), toSource = __webpack_require__(909); /** `Object#toString` result references. */ var mapTag = '[object Map]', objectTag = '[object Object]', promiseTag = '[object Promise]', setTag = '[object Set]', weakMapTag = '[object WeakMap]'; var dataViewTag = '[object DataView]'; /** Used to detect maps, sets, and weakmaps. */ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap); /** * Gets the `toStringTag` of `value`. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || (Map && getTag(new Map) != mapTag) || (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag; case mapCtorString: return mapTag; case promiseCtorString: return promiseTag; case setCtorString: return setTag; case weakMapCtorString: return weakMapTag; } } return result; }; } module.exports = getTag; /***/ }), /***/ 1179: /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(878), root = __webpack_require__(167); /* Built-in method references that are verified to be native. */ var DataView = getNative(root, 'DataView'); module.exports = DataView; /***/ }), /***/ 1180: /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(878), root = __webpack_require__(167); /* Built-in method references that are verified to be native. */ var Promise = getNative(root, 'Promise'); module.exports = Promise; /***/ }), /***/ 1181: /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(878), root = __webpack_require__(167); /* Built-in method references that are verified to be native. */ var WeakMap = getNative(root, 'WeakMap'); module.exports = WeakMap; /***/ }), /***/ 1182: /***/ (function(module, exports, __webpack_require__) { var isStrictComparable = __webpack_require__(1016), keys = __webpack_require__(1012); /** * Gets the property names, values, and compare flags of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the match data of `object`. */ function getMatchData(object) { var result = keys(object), length = result.length; while (length--) { var key = result[length], value = object[key]; result[length] = [key, value, isStrictComparable(value)]; } return result; } module.exports = getMatchData; /***/ }), /***/ 1183: /***/ (function(module, exports, __webpack_require__) { var baseIsEqual = __webpack_require__(1008), get = __webpack_require__(923), hasIn = __webpack_require__(1184), isKey = __webpack_require__(896), isStrictComparable = __webpack_require__(1016), matchesStrictComparable = __webpack_require__(1017), toKey = __webpack_require__(882); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. * * @private * @param {string} path The path of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec function. */ function baseMatchesProperty(path, srcValue) { if (isKey(path) && isStrictComparable(srcValue)) { return matchesStrictComparable(toKey(path), srcValue); } return function(object) { var objValue = get(object, path); return (objValue === undefined && objValue === srcValue) ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); }; } module.exports = baseMatchesProperty; /***/ }), /***/ 1184: /***/ (function(module, exports, __webpack_require__) { var baseHasIn = __webpack_require__(1185), hasPath = __webpack_require__(924); /** * Checks if `path` is a direct or inherited property of `object`. * * @static * @memberOf _ * @since 4.0.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @returns {boolean} Returns `true` if `path` exists, else `false`. * @example * * var object = _.create({ 'a': _.create({ 'b': 2 }) }); * * _.hasIn(object, 'a'); * // => true * * _.hasIn(object, 'a.b'); * // => true * * _.hasIn(object, ['a', 'b']); * // => true * * _.hasIn(object, 'b'); * // => false */ function hasIn(object, path) { return object != null && hasPath(object, path, baseHasIn); } module.exports = hasIn; /***/ }), /***/ 1185: /***/ (function(module, exports) { /** * The base implementation of `_.hasIn` without support for deep paths. * * @private * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHasIn(object, key) { return object != null && key in Object(object); } module.exports = baseHasIn; /***/ }), /***/ 1186: /***/ (function(module, exports) { /** * This method returns the first argument it receives. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {*} value Any value. * @returns {*} Returns `value`. * @example * * var object = { 'a': 1 }; * * console.log(_.identity(object) === object); * // => true */ function identity(value) { return value; } module.exports = identity; /***/ }), /***/ 1187: /***/ (function(module, exports, __webpack_require__) { var baseProperty = __webpack_require__(1133), basePropertyDeep = __webpack_require__(1188), isKey = __webpack_require__(896), toKey = __webpack_require__(882); /** * Creates a function that returns the value at `path` of a given object. * * @static * @memberOf _ * @since 2.4.0 * @category Util * @param {Array|string} path The path of the property to get. * @returns {Function} Returns the new accessor function. * @example * * var objects = [ * { 'a': { 'b': 2 } }, * { 'a': { 'b': 1 } } * ]; * * _.map(objects, _.property('a.b')); * // => [2, 1] * * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); * // => [1, 2] */ function property(path) { return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); } module.exports = property; /***/ }), /***/ 1188: /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(911); /** * A specialized version of `baseProperty` which supports deep paths. * * @private * @param {Array|string} path The path of the property to get. * @returns {Function} Returns the new accessor function. */ function basePropertyDeep(path) { return function(object) { return baseGet(object, path); }; } module.exports = basePropertyDeep; /***/ }), /***/ 1189: /***/ (function(module, exports, __webpack_require__) { var SetCache = __webpack_require__(1010), arrayIncludes = __webpack_require__(1190), arrayIncludesWith = __webpack_require__(1194), cacheHas = __webpack_require__(1011), createSet = __webpack_require__(1195), setToArray = __webpack_require__(925); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; /** * The base implementation of `_.uniqBy` without support for iteratee shorthands. * * @private * @param {Array} array The array to inspect. * @param {Function} [iteratee] The iteratee invoked per element. * @param {Function} [comparator] The comparator invoked per element. * @returns {Array} Returns the new duplicate free array. */ function baseUniq(array, iteratee, comparator) { var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result; if (comparator) { isCommon = false; includes = arrayIncludesWith; } else if (length >= LARGE_ARRAY_SIZE) { var set = iteratee ? null : createSet(array); if (set) { return setToArray(set); } isCommon = false; includes = cacheHas; seen = new SetCache; } else { seen = iteratee ? [] : result; } outer: while (++index < length) { var value = array[index], computed = iteratee ? iteratee(value) : value; value = (comparator || value !== 0) ? value : 0; if (isCommon && computed === computed) { var seenIndex = seen.length; while (seenIndex--) { if (seen[seenIndex] === computed) { continue outer; } } if (iteratee) { seen.push(computed); } result.push(value); } else if (!includes(seen, computed, comparator)) { if (seen !== result) { seen.push(computed); } result.push(value); } } return result; } module.exports = baseUniq; /***/ }), /***/ 1190: /***/ (function(module, exports, __webpack_require__) { var baseIndexOf = __webpack_require__(1191); /** * A specialized version of `_.includes` for arrays without support for * specifying an index to search from. * * @private * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludes(array, value) { var length = array == null ? 0 : array.length; return !!length && baseIndexOf(array, value, 0) > -1; } module.exports = arrayIncludes; /***/ }), /***/ 1191: /***/ (function(module, exports, __webpack_require__) { var baseFindIndex = __webpack_require__(1018), baseIsNaN = __webpack_require__(1192), strictIndexOf = __webpack_require__(1193); /** * The base implementation of `_.indexOf` without `fromIndex` bounds checks. * * @private * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ function baseIndexOf(array, value, fromIndex) { return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex); } module.exports = baseIndexOf; /***/ }), /***/ 1192: /***/ (function(module, exports) { /** * The base implementation of `_.isNaN` without support for number objects. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. */ function baseIsNaN(value) { return value !== value; } module.exports = baseIsNaN; /***/ }), /***/ 1193: /***/ (function(module, exports) { /** * A specialized version of `_.indexOf` which performs strict equality * comparisons of values, i.e. `===`. * * @private * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ function strictIndexOf(array, value, fromIndex) { var index = fromIndex - 1, length = array.length; while (++index < length) { if (array[index] === value) { return index; } } return -1; } module.exports = strictIndexOf; /***/ }), /***/ 1194: /***/ (function(module, exports) { /** * This function is like `arrayIncludes` except that it accepts a comparator. * * @private * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @param {Function} comparator The comparator invoked per element. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludesWith(array, value, comparator) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (comparator(value, array[index])) { return true; } } return false; } module.exports = arrayIncludesWith; /***/ }), /***/ 1195: /***/ (function(module, exports, __webpack_require__) { var Set = __webpack_require__(1015), noop = __webpack_require__(1196), setToArray = __webpack_require__(925); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** * Creates a set object of `values`. * * @private * @param {Array} values The values to add to the set. * @returns {Object} Returns the new set. */ var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { return new Set(values); }; module.exports = createSet; /***/ }), /***/ 1196: /***/ (function(module, exports) { /** * This method returns `undefined`. * * @static * @memberOf _ * @since 2.3.0 * @category Util * @example * * _.times(2, _.noop); * // => [undefined, undefined] */ function noop() { // No operation performed. } module.exports = noop; /***/ }), /***/ 1197: /***/ (function(module, exports, __webpack_require__) { var baseFindIndex = __webpack_require__(1018), baseIteratee = __webpack_require__(1006), toInteger = __webpack_require__(1131); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * This method is like `_.find` except that it returns the index of the first * element `predicate` returns truthy for instead of the element itself. * * @static * @memberOf _ * @since 1.1.0 * @category Array * @param {Array} array The array to inspect. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param {number} [fromIndex=0] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. * @example * * var users = [ * { 'user': 'barney', 'active': false }, * { 'user': 'fred', 'active': false }, * { 'user': 'pebbles', 'active': true } * ]; * * _.findIndex(users, function(o) { return o.user == 'barney'; }); * // => 0 * * // The `_.matches` iteratee shorthand. * _.findIndex(users, { 'user': 'fred', 'active': false }); * // => 1 * * // The `_.matchesProperty` iteratee shorthand. * _.findIndex(users, ['active', false]); * // => 0 * * // The `_.property` iteratee shorthand. * _.findIndex(users, 'active'); * // => 2 */ function findIndex(array, predicate, fromIndex) { var length = array == null ? 0 : array.length; if (!length) { return -1; } var index = fromIndex == null ? 0 : toInteger(fromIndex); if (index < 0) { index = nativeMax(length + index, 0); } return baseFindIndex(array, baseIteratee(predicate, 3), index); } module.exports = findIndex; /***/ }), /***/ 1198: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _rcAnimate = _interopRequireDefault(__webpack_require__(329)); var _classnames = _interopRequireDefault(__webpack_require__(3)); var _utils = __webpack_require__(1019); var _icon = _interopRequireDefault(__webpack_require__(26)); var _tooltip = _interopRequireDefault(__webpack_require__(168)); var _progress = _interopRequireDefault(__webpack_require__(1114)); var _configProvider = __webpack_require__(12); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 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; } function _extends() { _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); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 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); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var UploadList = /*#__PURE__*/ function (_React$Component) { _inherits(UploadList, _React$Component); function UploadList() { var _this; _classCallCheck(this, UploadList); _this = _possibleConstructorReturn(this, _getPrototypeOf(UploadList).apply(this, arguments)); _this.handlePreview = function (file, e) { var onPreview = _this.props.onPreview; if (!onPreview) { return; } e.preventDefault(); return onPreview(file); }; _this.handleDownload = function (file) { var onDownload = _this.props.onDownload; if (typeof onDownload === 'function') { onDownload(file); } else if (file.url) { window.open(file.url); } }; _this.handleClose = function (file) { var onRemove = _this.props.onRemove; if (onRemove) { onRemove(file); } }; _this.renderUploadList = function (_ref) { var _classNames4; var getPrefixCls = _ref.getPrefixCls; var _this$props = _this.props, customizePrefixCls = _this$props.prefixCls, _this$props$items = _this$props.items, items = _this$props$items === void 0 ? [] : _this$props$items, listType = _this$props.listType, showPreviewIcon = _this$props.showPreviewIcon, showRemoveIcon = _this$props.showRemoveIcon, showDownloadIcon = _this$props.showDownloadIcon, locale = _this$props.locale, progressAttr = _this$props.progressAttr; var prefixCls = getPrefixCls('upload', customizePrefixCls); var list = items.map(function (file) { var _classNames, _classNames2; var progress; var icon = React.createElement(_icon["default"], { type: file.status === 'uploading' ? 'loading' : 'paper-clip' }); if (listType === 'picture' || listType === 'picture-card') { if (listType === 'picture-card' && file.status === 'uploading') { icon = React.createElement("div", { className: "".concat(prefixCls, "-list-item-uploading-text") }, locale.uploading); } else if (!file.thumbUrl && !file.url) { icon = React.createElement(_icon["default"], { className: "".concat(prefixCls, "-list-item-thumbnail"), type: "picture", theme: "twoTone" }); } else { var thumbnail = (0, _utils.isImageUrl)(file) ? React.createElement("img", { src: file.thumbUrl || file.url, alt: file.name, className: "".concat(prefixCls, "-list-item-image") }) : React.createElement(_icon["default"], { type: "file", className: "".concat(prefixCls, "-list-item-icon"), theme: "twoTone" }); icon = React.createElement("a", { className: "".concat(prefixCls, "-list-item-thumbnail"), onClick: function onClick(e) { return _this.handlePreview(file, e); }, href: file.url || file.thumbUrl, target: "_blank", rel: "noopener noreferrer" }, thumbnail); } } if (file.status === 'uploading') { // show loading icon if upload progress listener is disabled var loadingProgress = 'percent' in file ? React.createElement(_progress["default"], _extends({ type: "line" }, progressAttr, { percent: file.percent })) : null; progress = React.createElement("div", { className: "".concat(prefixCls, "-list-item-progress"), key: "progress" }, loadingProgress); } var infoUploadingClass = (0, _classnames["default"])((_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-list-item"), true), _defineProperty(_classNames, "".concat(prefixCls, "-list-item-").concat(file.status), true), _defineProperty(_classNames, "".concat(prefixCls, "-list-item-list-type-").concat(listType), true), _classNames)); var linkProps = typeof file.linkProps === 'string' ? JSON.parse(file.linkProps) : file.linkProps; var removeIcon = showRemoveIcon ? React.createElement(_icon["default"], { type: "delete", title: locale.removeFile, onClick: function onClick() { return _this.handleClose(file); } }) : null; var downloadIcon = showDownloadIcon && file.status === 'done' ? React.createElement(_icon["default"], { type: "download", title: locale.downloadFile, onClick: function onClick() { return _this.handleDownload(file); } }) : null; var downloadOrDelete = listType !== 'picture-card' && React.createElement("span", { key: "download-delete", className: "".concat(prefixCls, "-list-item-card-actions ").concat(listType === 'picture' ? 'picture' : '') }, downloadIcon && React.createElement("a", { title: locale.downloadFile }, downloadIcon), removeIcon && React.createElement("a", { title: locale.removeFile }, removeIcon)); var listItemNameClass = (0, _classnames["default"])((_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefixCls, "-list-item-name"), true), _defineProperty(_classNames2, "".concat(prefixCls, "-list-item-name-icon-count-").concat([downloadIcon, removeIcon].filter(function (x) { return x; }).length), true), _classNames2)); var preview = file.url ? [React.createElement("a", _extends({ key: "view", target: "_blank", rel: "noopener noreferrer", className: listItemNameClass, title: file.name }, linkProps, { href: file.url, onClick: function onClick(e) { return _this.handlePreview(file, e); } }), file.name), downloadOrDelete] : [React.createElement("span", { key: "view", className: listItemNameClass, onClick: function onClick(e) { return _this.handlePreview(file, e); }, title: file.name }, file.name), downloadOrDelete]; var style = { pointerEvents: 'none', opacity: 0.5 }; var previewIcon = showPreviewIcon ? React.createElement("a", { href: file.url || file.thumbUrl, target: "_blank", rel: "noopener noreferrer", style: file.url || file.thumbUrl ? undefined : style, onClick: function onClick(e) { return _this.handlePreview(file, e); }, title: locale.previewFile }, React.createElement(_icon["default"], { type: "eye-o" })) : null; var actions = listType === 'picture-card' && file.status !== 'uploading' && React.createElement("span", { className: "".concat(prefixCls, "-list-item-actions") }, previewIcon, file.status === 'done' && downloadIcon, removeIcon); var message; if (file.response && typeof file.response === 'string') { message = file.response; } else { message = file.error && file.error.statusText || locale.uploadError; } var iconAndPreview = React.createElement("span", null, icon, preview); var dom = React.createElement("div", { className: infoUploadingClass }, React.createElement("div", { className: "".concat(prefixCls, "-list-item-info") }, iconAndPreview), actions, React.createElement(_rcAnimate["default"], { transitionName: "fade", component: "" }, progress)); var listContainerNameClass = (0, _classnames["default"])(_defineProperty({}, "".concat(prefixCls, "-list-picture-card-container"), listType === 'picture-card')); return React.createElement("div", { key: file.uid, className: listContainerNameClass }, file.status === 'error' ? React.createElement(_tooltip["default"], { title: message }, dom) : React.createElement("span", null, dom)); }); var listClassNames = (0, _classnames["default"])((_classNames4 = {}, _defineProperty(_classNames4, "".concat(prefixCls, "-list"), true), _defineProperty(_classNames4, "".concat(prefixCls, "-list-").concat(listType), true), _classNames4)); var animationDirection = listType === 'picture-card' ? 'animate-inline' : 'animate'; return React.createElement(_rcAnimate["default"], { transitionName: "".concat(prefixCls, "-").concat(animationDirection), component: "div", className: listClassNames }, list); }; return _this; } _createClass(UploadList, [{ key: "componentDidUpdate", value: function componentDidUpdate() { var _this2 = this; var _this$props2 = this.props, listType = _this$props2.listType, items = _this$props2.items, previewFile = _this$props2.previewFile; if (listType !== 'picture' && listType !== 'picture-card') { return; } (items || []).forEach(function (file) { if (typeof document === 'undefined' || typeof window === 'undefined' || !window.FileReader || !window.File || !(file.originFileObj instanceof File || file.originFileObj instanceof Blob) || file.thumbUrl !== undefined) { return; } file.thumbUrl = ''; if (previewFile) { previewFile(file.originFileObj).then(function (previewDataUrl) { // Need append '' to avoid dead loop file.thumbUrl = previewDataUrl || ''; _this2.forceUpdate(); }); } }); } }, { key: "render", value: function render() { return React.createElement(_configProvider.ConfigConsumer, null, this.renderUploadList); } }]); return UploadList; }(React.Component); exports["default"] = UploadList; UploadList.defaultProps = { listType: 'text', progressAttr: { strokeWidth: 2, showInfo: false }, showRemoveIcon: true, showDownloadIcon: true, showPreviewIcon: true, previewFile: _utils.previewImage }; //# sourceMappingURL=UploadList.js.map /***/ }), /***/ 1199: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _Upload = _interopRequireDefault(__webpack_require__(1004)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 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); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } // stick class comoponent to avoid React ref warning inside Form // https://github.com/ant-design/ant-design/issues/18707 // eslint-disable-next-line react/prefer-stateless-function var Dragger = /*#__PURE__*/ function (_React$Component) { _inherits(Dragger, _React$Component); function Dragger() { _classCallCheck(this, Dragger); return _possibleConstructorReturn(this, _getPrototypeOf(Dragger).apply(this, arguments)); } _createClass(Dragger, [{ key: "render", value: function render() { var props = this.props; return React.createElement(_Upload["default"], _extends({}, props, { type: "drag", style: _extends(_extends({}, props.style), { height: props.height }) })); } }]); return Dragger; }(React.Component); exports["default"] = Dragger; //# sourceMappingURL=Dragger.js.map /***/ }), /***/ 1200: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_modal_style_css__ = __webpack_require__(32); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_modal_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_modal_style_css__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_modal__ = __webpack_require__(33); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_modal___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_modal__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_date_picker_style_css__ = __webpack_require__(1078); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_date_picker_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_date_picker_style_css__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_date_picker__ = __webpack_require__(1079); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_date_picker___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_date_picker__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_checkbox_style_css__ = __webpack_require__(317); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_checkbox_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_antd_lib_checkbox_style_css__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_checkbox__ = __webpack_require__(314); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_checkbox___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_antd_lib_checkbox__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_educoder__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_antd_lib_date_picker_locale_zh_CN__ = __webpack_require__(181); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_antd_lib_date_picker_locale_zh_CN___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_antd_lib_date_picker_locale_zh_CN__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_moment__ = __webpack_require__(86); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_moment__); var _createClass=function(){function defineProperties(target,props){for(var i=0;i range(0, 24).splice(4, 20), disabledMinutes:function disabledMinutes(){return range(1,30).concat(range(31,60));}// disabledSeconds: () => [55, 56], };}function disabledDate(current){return current&¤t<__WEBPACK_IMPORTED_MODULE_9_moment___default()().endOf('day').subtract(1,'days');}var HomeworkModal=function(_Component){_inherits(HomeworkModal,_Component);function HomeworkModal(props){_classCallCheck(this,HomeworkModal);var _this=_possibleConstructorReturn(this,(HomeworkModal.__proto__||Object.getPrototypeOf(HomeworkModal)).call(this,props));_this.componentDidUpdate=function(prevProps){// if(prevProps.visible!=this.props.visible){ // // if(this.props.course_groups!=undefined){ // let arr=this.props.course_groups.map(item => item.id); // this.shixunhomeworkedit(arr); // } // } if(prevProps.course_groups!=_this.props.course_groups){if(_this.props.course_groups!=undefined){var arr=_this.props.course_groups.map(function(item){return item.id;});_this.shixunhomeworkedit(arr);}}if(prevProps.starttimes!=_this.props.starttimes){if(_this.props.starttimes!=undefined&&_this.props.starttimes!=""){if(_this.props.starttimesend!=undefined&&_this.props.starttimesend!=""){_this.setState({endtime:_this.props.starttimesend});}else{_this.setState({endtime:__WEBPACK_IMPORTED_MODULE_9_moment___default()(__WEBPACK_IMPORTED_MODULE_9_moment___default()(Object(__WEBPACK_IMPORTED_MODULE_7_educoder__["T" /* handleDateString */])(_this.props.starttimes)).add(1,'week')).format("YYYY-MM-DD HH:mm")});}}}};_this.shixunhomeworkedit=function(list){_this.setState({group_ids:list});_this.props.getcourse_groupslist&&_this.props.getcourse_groupslist(list);};_this.onChangeTimeend=function(date,dateString){// console.log('startValue',dateString); _this.setState({endtime:date===null?"":Object(__WEBPACK_IMPORTED_MODULE_7_educoder__["T" /* handleDateString */])(dateString)});};_this.propsSaves=function(ds,endtime){if(ds.length===0&&endtime===""){_this.props.Saves();}else{if(_this.props.typs!="end"){if(endtime===""||endtime===undefined||endtime===null){_this.setState({endtimetype:true,endtimetypevalue:"截止时间不能为空"});return;}if(__WEBPACK_IMPORTED_MODULE_9_moment___default()(endtime,"YYYY-MM-DD HH:mm")<=__WEBPACK_IMPORTED_MODULE_9_moment___default()(_this.props.starttimes,"YYYY-MM-DD HH:mm")){_this.setState({endtimetype:true,endtimetypevalue:"必须晚于发布时间"});return;}}_this.props.Saves(ds,__WEBPACK_IMPORTED_MODULE_9_moment___default()(Object(__WEBPACK_IMPORTED_MODULE_7_educoder__["T" /* handleDateString */])(endtime),"YYYY-MM-DD HH:mm").format("YYYY-MM-DD HH:mm"));}};_this.state={group_ids:[],endtime:""};return _this;}_createClass(HomeworkModal,[{key:"componentDidMount",value:function componentDidMount(){if(this.props.course_groups!=undefined&&this.props.course_groups.length!=0){var arr=this.props.course_groups.map(function(item){return item.id;});this.shixunhomeworkedit(arr);}if(this.props.starttimes!=undefined&&this.props.starttimes!=""){if(this.props.starttimesend!=undefined&&this.props.starttimesend!=""){this.setState({endtime:this.props.starttimesend});}else{this.setState({endtime:__WEBPACK_IMPORTED_MODULE_9_moment___default()(__WEBPACK_IMPORTED_MODULE_9_moment___default()(Object(__WEBPACK_IMPORTED_MODULE_7_educoder__["T" /* handleDateString */])(this.props.starttimes)).add(1,'week')).format("YYYY-MM-DD HH:mm")});}}}//勾选实训 },{key:"render",value:function render(){var _this2=this;var _state=this.state,group_ids=_state.group_ids,endtime=_state.endtime;var course_groups=this.props.course_groups;// console.log(this.props.starttimes) // console.log(this.state.endtime) // console.log(this.props.starttime,this.props.endtime) // TODO course_groups为空时的处理 // let endtimelist=this.props.starttimes===undefined||this.props.starttimes===""?"":moment(handleDateString(endtime)).add(1,'months') return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("div",null,this.props.visible===true?__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("style",null,"\n body {\n\t\t\t\t\t\t\t overflow: hidden !important;\n\t\t\t\t\t\t\t}\n "):"",this.props.visible===true?__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_modal___default.a,{keyboard:false,className:"HomeworkModal",title:this.props.modalname,visible:this.props.visible,closable:false,footer:null,destroyOnClose:true},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("div",{className:"task-popup-content"},this.props.usingCheckBeforePost?__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Fragment,null,__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("p",{className:"task-popup-text-center font-16"},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("span",null,"\u53D1\u5E03\u8BBE\u7F6E\u5747\u53EF\u4FEE\u6539\uFF0C"),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("span",{className:"color-blue underline",onClick:this.props.onToPublishClick},"\u70B9\u51FB\u4FEE\u6539")),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("p",{className:"task-popup-text-center font-16 mt10"},"\u6B64\u8BBE\u7F6E\u5C06\u5BF9\u6240\u6709\u5206\u73ED\u751F\u6548")):__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Fragment,null,__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("p",{className:"task-popup-text-center font-16"},this.props.Topval,__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("span",{className:"color-blue underline"},this.props.Topvalright)),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("p",{className:"task-popup-text-center font-16 mt10"},this.props.Botvalleft===undefined?"":__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("span",{className:"colorFF6800"},"\"",this.props.Botvalleft,"\""),this.props.Botval)),this.props.starttime===undefined||this.props.starttime===""?"":__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("p",{className:"task-popup-text-center font-16 mt20"},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("span",{className:"font-14 mr20 color979797"},this.props.starttime),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("span",{className:"font-14 color979797"},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("span",{className:"mr10"},"\u622A\u6B62\u65F6\u95F4:"),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_date_picker___default.a,{dropdownClassName:"hideDisable",showTime:{format:'HH:mm'},disabledTime:disabledDateTime,disabledDate:disabledDate,showToday:false,locale:__WEBPACK_IMPORTED_MODULE_8_antd_lib_date_picker_locale_zh_CN___default.a,format:dateFormat,placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",id:"endTime",width:"210px",value:endtime===null||endtime===""?"":__WEBPACK_IMPORTED_MODULE_9_moment___default()(endtime,dateFormat),onChange:this.onChangeTimeend,className:this.state.endtimetype===true?"noticeTip":""}),this.state.endtimetype===true?__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("div",{className:"color-red fr mr90 mt5"},this.state.endtimetypevalue):"")),this.props.modaltype===undefined||this.props.modaltype===2||this.props.modaltype===4||!course_groups||course_groups.length==0||this.props.usingCheckBeforePost?"":__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("ul",{className:"upload_select_box fl clearfix mt20 mb30",style:{"overflow-y":"auto",padding:"10px 0px"},id:"search_not_members_list"// onScroll={this.contentViewScroll} },__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("style",null,"\n .HomeworkModal .ant-checkbox-wrapper {\n margin-top: 0px;\n float: left;\n }\n \t.width300{\n\t\t\t\t\t\t\t\t\t\t width:300px;\n\t\t\t\t\t\t\t\t\t\t display: inline-block;\n\t\t\t\t\t\t\t\t\t\t}\n "),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_checkbox___default.a.Group,{style:{width:'100%'},value:group_ids,onChange:this.shixunhomeworkedit},course_groups.map(function(item,key){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("div",{className:"clearfix edu-txt-center lineh-40",key:key},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("li",{style:{width:'100%',padding:"0px 10px"}},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_checkbox___default.a,{className:"task-hide edu-txt-left width300",name:"shixun_homework[]",value:item.id,key:item.id},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("span",{style:{"textAlign":"left","color":"#05101A"},className:"task-hide color-grey-name"},item.name))));}))),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("div",{className:"clearfix mt30 edu-txt-center mb10"},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("a",{className:"task-btn color-white mr30",onClick:this.props.Cancel},this.props.Cancelname),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("a",{className:"task-btn task-btn-orange",onClick:function onClick(){return _this2.propsSaves(group_ids,_this2.state.endtime);}},this.props.Savesname)))):"");}}]);return HomeworkModal;}(__WEBPACK_IMPORTED_MODULE_6_react__["Component"]);/* harmony default export */ __webpack_exports__["a"] = (HomeworkModal); /***/ }), /***/ 1204: /***/ (function(module, exports, __webpack_require__) { var assignValue = __webpack_require__(1221), baseAssignValue = __webpack_require__(994); /** * Copies properties of `source` to `object`. * * @private * @param {Object} source The object to copy properties from. * @param {Array} props The property identifiers to copy. * @param {Object} [object={}] The object to copy properties to. * @param {Function} [customizer] The function to customize copied values. * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { var isNew = !object; object || (object = {}); var index = -1, length = props.length; while (++index < length) { var key = props[index]; var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined; if (newValue === undefined) { newValue = source[key]; } if (isNew) { baseAssignValue(object, key, newValue); } else { assignValue(object, key, newValue); } } return object; } module.exports = copyObject; /***/ }), /***/ 1205: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PresetColorTypes = void 0; var _type = __webpack_require__(70); // eslint-disable-next-line import/prefer-default-export var PresetColorTypes = (0, _type.tuple)('pink', 'red', 'yellow', 'orange', 'cyan', 'green', 'blue', 'purple', 'geekblue', 'magenta', 'volcano', 'gold', 'lime'); exports.PresetColorTypes = PresetColorTypes; //# sourceMappingURL=colors.js.map /***/ }), /***/ 1206: /***/ (function(module, exports, __webpack_require__) { var isSymbol = __webpack_require__(331); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** * Converts `value` to a string key if it's not a string or symbol. * * @private * @param {*} value The value to inspect. * @returns {string|symbol} Returns the key. */ function toKey(value) { if (typeof value == 'string' || isSymbol(value)) { return value; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } module.exports = toKey; /***/ }), /***/ 1208: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(28); __webpack_require__(1392); //# sourceMappingURL=css.js.map /***/ }), /***/ 1209: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _classnames = _interopRequireDefault(__webpack_require__(3)); var _rcInputNumber = _interopRequireDefault(__webpack_require__(1394)); var _icon = _interopRequireDefault(__webpack_require__(26)); var _configProvider = __webpack_require__(12); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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); } 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; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 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); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var __rest = void 0 && (void 0).__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var InputNumber = /*#__PURE__*/ function (_React$Component) { _inherits(InputNumber, _React$Component); function InputNumber() { var _this; _classCallCheck(this, InputNumber); _this = _possibleConstructorReturn(this, _getPrototypeOf(InputNumber).apply(this, arguments)); _this.saveInputNumber = function (inputNumberRef) { _this.inputNumberRef = inputNumberRef; }; _this.renderInputNumber = function (_ref) { var _classNames; var getPrefixCls = _ref.getPrefixCls; var _a = _this.props, className = _a.className, size = _a.size, customizePrefixCls = _a.prefixCls, others = __rest(_a, ["className", "size", "prefixCls"]); var prefixCls = getPrefixCls('input-number', customizePrefixCls); var inputNumberClass = (0, _classnames["default"])((_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-lg"), size === 'large'), _defineProperty(_classNames, "".concat(prefixCls, "-sm"), size === 'small'), _classNames), className); var upIcon = React.createElement(_icon["default"], { type: "up", className: "".concat(prefixCls, "-handler-up-inner") }); var downIcon = React.createElement(_icon["default"], { type: "down", className: "".concat(prefixCls, "-handler-down-inner") }); return React.createElement(_rcInputNumber["default"], _extends({ ref: _this.saveInputNumber, className: inputNumberClass, upHandler: upIcon, downHandler: downIcon, prefixCls: prefixCls }, others)); }; return _this; } _createClass(InputNumber, [{ key: "focus", value: function focus() { this.inputNumberRef.focus(); } }, { key: "blur", value: function blur() { this.inputNumberRef.blur(); } }, { key: "render", value: function render() { return React.createElement(_configProvider.ConfigConsumer, null, this.renderInputNumber); } }]); return InputNumber; }(React.Component); exports["default"] = InputNumber; InputNumber.defaultProps = { step: 1 }; //# sourceMappingURL=index.js.map /***/ }), /***/ 1210: /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(928), stackClear = __webpack_require__(1257), stackDelete = __webpack_require__(1258), stackGet = __webpack_require__(1259), stackHas = __webpack_require__(1260), stackSet = __webpack_require__(1261); /** * Creates a stack cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Stack(entries) { var data = this.__data__ = new ListCache(entries); this.size = data.size; } // Add methods to `Stack`. Stack.prototype.clear = stackClear; Stack.prototype['delete'] = stackDelete; Stack.prototype.get = stackGet; Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; module.exports = Stack; /***/ }), /***/ 1212: /***/ (function(module, exports, __webpack_require__) { var baseMerge = __webpack_require__(1342), createAssigner = __webpack_require__(1346); /** * This method is like `_.assign` except that it recursively merges own and * inherited enumerable string keyed properties of source objects into the * destination object. Source properties that resolve to `undefined` are * skipped if a destination value exists. Array and plain object properties * are merged recursively. Other objects and value types are overridden by * assignment. Source objects are applied from left to right. Subsequent * sources overwrite property assignments of previous sources. * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 0.5.0 * @category Object * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. * @example * * var object = { * 'a': [{ 'b': 2 }, { 'd': 4 }] * }; * * var other = { * 'a': [{ 'c': 3 }, { 'e': 5 }] * }; * * _.merge(object, other); * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } */ var merge = createAssigner(function(object, source, srcIndex) { baseMerge(object, source, srcIndex); }); module.exports = merge; /***/ }), /***/ 1213: /***/ (function(module, exports, __webpack_require__) { var Uint8Array = __webpack_require__(1228); /** * Creates a clone of `arrayBuffer`. * * @private * @param {ArrayBuffer} arrayBuffer The array buffer to clone. * @returns {ArrayBuffer} Returns the cloned array buffer. */ function cloneArrayBuffer(arrayBuffer) { var result = new arrayBuffer.constructor(arrayBuffer.byteLength); new Uint8Array(result).set(new Uint8Array(arrayBuffer)); return result; } module.exports = cloneArrayBuffer; /***/ }), /***/ 1214: /***/ (function(module, exports) { /** * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { return func(value); }; } module.exports = baseUnary; /***/ }), /***/ 1215: /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(344); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Detect free variable `process` from Node.js. */ var freeProcess = moduleExports && freeGlobal.process; /** Used to access faster Node.js helpers. */ var nodeUtil = (function() { try { // Use `util.types` for Node.js 10+. var types = freeModule && freeModule.require && freeModule.require('util').types; if (types) { return types; } // Legacy `process.binding('util')` for Node.js < 10. return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} }()); module.exports = nodeUtil; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(322)(module))) /***/ }), /***/ 1216: /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__(900), isSymbol = __webpack_require__(331); /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; /** * Checks if `value` is a property name and not a property path. * * @private * @param {*} value The value to check. * @param {Object} [object] The object to query keys on. * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ function isKey(value, object) { if (isArray(value)) { return false; } var type = typeof value; if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) { return true; } return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || (object != null && value in Object(object)); } module.exports = isKey; /***/ }), /***/ 1219: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(28); __webpack_require__(1357); __webpack_require__(188); __webpack_require__(177); __webpack_require__(317); __webpack_require__(982); __webpack_require__(72); __webpack_require__(903); //# sourceMappingURL=css.js.map /***/ }), /***/ 1220: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _Table = _interopRequireDefault(__webpack_require__(1361)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _Table["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /***/ 1221: /***/ (function(module, exports, __webpack_require__) { var baseAssignValue = __webpack_require__(994), eq = __webpack_require__(927); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Assigns `value` to `key` of `object` if the existing value is not equivalent * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignValue(object, key, value) { var objValue = object[key]; if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) { baseAssignValue(object, key, value); } } module.exports = assignValue; /***/ }), /***/ 1222: /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__(900), isKey = __webpack_require__(1216), stringToPath = __webpack_require__(1286), toString = __webpack_require__(1289); /** * Casts `value` to a path array if it's not one. * * @private * @param {*} value The value to inspect. * @param {Object} [object] The object to query keys on. * @returns {Array} Returns the cast property path array. */ function castPath(value, object) { if (isArray(value)) { return value; } return isKey(value, object) ? [value] : stringToPath(toString(value)); } module.exports = castPath; /***/ }), /***/ 1224: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(28); __webpack_require__(1233); //# sourceMappingURL=css.js.map /***/ }), /***/ 1225: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _classnames = _interopRequireDefault(__webpack_require__(3)); var _omit = _interopRequireDefault(__webpack_require__(43)); var _reactLifecyclesCompat = __webpack_require__(7); var _icon = _interopRequireDefault(__webpack_require__(26)); var _CheckableTag = _interopRequireDefault(__webpack_require__(1235)); var _configProvider = __webpack_require__(12); var _colors = __webpack_require__(1205); var _warning = _interopRequireDefault(__webpack_require__(40)); var _wave = _interopRequireDefault(__webpack_require__(342)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 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; } function _extends() { _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); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 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); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var __rest = void 0 && (void 0).__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var PresetColorRegex = new RegExp("^(".concat(_colors.PresetColorTypes.join('|'), ")(-inverse)?$")); var Tag = /*#__PURE__*/ function (_React$Component) { _inherits(Tag, _React$Component); function Tag(props) { var _this; _classCallCheck(this, Tag); _this = _possibleConstructorReturn(this, _getPrototypeOf(Tag).call(this, props)); _this.state = { visible: true }; _this.handleIconClick = function (e) { e.stopPropagation(); _this.setVisible(false, e); }; _this.renderTag = function (configProps) { var _a = _this.props, children = _a.children, otherProps = __rest(_a, ["children"]); var isNeedWave = 'onClick' in otherProps || children && children.type === 'a'; var tagProps = (0, _omit["default"])(otherProps, ['onClose', 'afterClose', 'color', 'visible', 'closable', 'prefixCls']); return isNeedWave ? React.createElement(_wave["default"], null, React.createElement("span", _extends({}, tagProps, { className: _this.getTagClassName(configProps), style: _this.getTagStyle() }), children, _this.renderCloseIcon())) : React.createElement("span", _extends({}, tagProps, { className: _this.getTagClassName(configProps), style: _this.getTagStyle() }), children, _this.renderCloseIcon()); }; (0, _warning["default"])(!('afterClose' in props), 'Tag', "'afterClose' will be deprecated, please use 'onClose', we will remove this in the next version."); return _this; } _createClass(Tag, [{ key: "getTagStyle", value: function getTagStyle() { var _this$props = this.props, color = _this$props.color, style = _this$props.style; var isPresetColor = this.isPresetColor(); return _extends({ backgroundColor: color && !isPresetColor ? color : undefined }, style); } }, { key: "getTagClassName", value: function getTagClassName(_ref) { var _classNames; var getPrefixCls = _ref.getPrefixCls; var _this$props2 = this.props, customizePrefixCls = _this$props2.prefixCls, className = _this$props2.className, color = _this$props2.color; var visible = this.state.visible; var isPresetColor = this.isPresetColor(); var prefixCls = getPrefixCls('tag', customizePrefixCls); return (0, _classnames["default"])(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-").concat(color), isPresetColor), _defineProperty(_classNames, "".concat(prefixCls, "-has-color"), color && !isPresetColor), _defineProperty(_classNames, "".concat(prefixCls, "-hidden"), !visible), _classNames), className); } }, { key: "setVisible", value: function setVisible(visible, e) { var _this$props3 = this.props, onClose = _this$props3.onClose, afterClose = _this$props3.afterClose; if (onClose) { onClose(e); } if (afterClose && !onClose) { // next version remove. afterClose(); } if (e.defaultPrevented) { return; } if (!('visible' in this.props)) { this.setState({ visible: visible }); } } }, { key: "isPresetColor", value: function isPresetColor() { var color = this.props.color; if (!color) { return false; } return PresetColorRegex.test(color); } }, { key: "renderCloseIcon", value: function renderCloseIcon() { var closable = this.props.closable; return closable ? React.createElement(_icon["default"], { type: "close", onClick: this.handleIconClick }) : null; } }, { key: "render", value: function render() { return React.createElement(_configProvider.ConfigConsumer, null, this.renderTag); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps) { if ('visible' in nextProps) { return { visible: nextProps.visible }; } return null; } }]); return Tag; }(React.Component); Tag.CheckableTag = _CheckableTag["default"]; Tag.defaultProps = { closable: false }; (0, _reactLifecyclesCompat.polyfill)(Tag); var _default = Tag; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /***/ 1227: /***/ (function(module, exports) { /** Used for built-in method references. */ var funcProto = Function.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** * Converts `func` to its source code. * * @private * @param {Function} func The function to convert. * @returns {string} Returns the source code. */ function toSource(func) { if (func != null) { try { return funcToString.call(func); } catch (e) {} try { return (func + ''); } catch (e) {} } return ''; } module.exports = toSource; /***/ }), /***/ 1228: /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(174); /** Built-in value references. */ var Uint8Array = root.Uint8Array; module.exports = Uint8Array; /***/ }), /***/ 1229: /***/ (function(module, exports) { /** * Creates a unary function that invokes `func` with its argument transformed. * * @private * @param {Function} func The function to wrap. * @param {Function} transform The argument transform. * @returns {Function} Returns the new function. */ function overArg(func, transform) { return function(arg) { return func(transform(arg)); }; } module.exports = overArg; /***/ }), /***/ 1230: /***/ (function(module, exports, __webpack_require__) { var baseTimes = __webpack_require__(1283), isArguments = __webpack_require__(1089), isArray = __webpack_require__(900), isBuffer = __webpack_require__(1076), isIndex = __webpack_require__(1087), isTypedArray = __webpack_require__(1090); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Creates an array of the enumerable property names of the array-like `value`. * * @private * @param {*} value The value to query. * @param {boolean} inherited Specify returning inherited property names. * @returns {Array} Returns the array of property names. */ function arrayLikeKeys(value, inherited) { var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; for (var key in value) { if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. (isBuff && (key == 'offset' || key == 'parent')) || // PhantomJS 2 has enumerable non-index properties on typed arrays. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || // Skip index properties. isIndex(key, length) ))) { result.push(key); } } return result; } module.exports = arrayLikeKeys; /***/ }), /***/ 1231: /***/ (function(module, exports, __webpack_require__) { var castPath = __webpack_require__(1222), toKey = __webpack_require__(1206); /** * The base implementation of `_.get` without support for default values. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @returns {*} Returns the resolved value. */ function baseGet(object, path) { path = castPath(path, object); var index = 0, length = path.length; while (object != null && index < length) { object = object[toKey(path[index++])]; } return (index && index == length) ? object : undefined; } module.exports = baseGet; /***/ }), /***/ 1232: /***/ (function(module, exports) { /** * A specialized version of `_.map` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { result[index] = iteratee(array[index], index, array); } return result; } module.exports = arrayMap; /***/ }), /***/ 1233: /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a // //
  • // //
  • //
  • 分数不能为空
  • //
    // {this.props.Cancelname || '取消'} // {this.props.Savesname || '保存'} {/*
    */}{/**/} /***/ }), /***/ 1792: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_checkbox_style_css__ = __webpack_require__(317); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_checkbox_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_checkbox_style_css__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_checkbox__ = __webpack_require__(314); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_checkbox___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_checkbox__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_select_style_css__ = __webpack_require__(318); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_select_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_select_style_css__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_select__ = __webpack_require__(315); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_select___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_select__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_axios__ = __webpack_require__(15); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_axios__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__common_ModalWrapper__ = __webpack_require__(333); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_infinite_scroller__ = __webpack_require__(1250); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_infinite_scroller___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_infinite_scroller__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_educoder__ = __webpack_require__(5); var _createClass=function(){function defineProperties(target,props){for(var i=0;i12},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("label",{className:"task-hide fl",style:{"maxWidth":"208px;"}},candidate.name))),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("span",{className:"fl with25"},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_educoder__["g" /* ConditionToolTip */],{title:candidate.nickname,condition:candidate.nickname&&candidate.nickname.length>12},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("label",{className:"task-hide fl",style:{"maxWidth":"208px;"}},candidate.nickname))),__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("span",{className:"fl with45"},__WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement("label",{className:"task-hide fl",style:{"maxWidth":"208px;"}},candidate.school_name)));})))));}}]);return CheckCodeModal;}(__WEBPACK_IMPORTED_MODULE_4_react__["Component"]);/* harmony default export */ __webpack_exports__["a"] = (CheckCodeModal); /***/ }), /***/ 1963: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = LeaderIcon; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); function LeaderIcon(){var props=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var icon=null;var className=props.className,style=props.style;var _className='font-8 blueFull Actionbtn '+className;if(props.small){icon=__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:_className,style:{height:'14px','line-height':'14px',// width: '24px', transform:'scale(0.833)',padding:'0px 5px','margin-top':'-2px','margin-left':'2px','vertical-align':'middle'}},'\u7EC4\u957F');}else{icon=__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div',{className:_className,style:{height:'16px','line-height':'16px',transform:'scale(0.833)'}},'\u7EC4\u957F');}return icon;} /***/ }), /***/ 3192: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_form_style_css__ = __webpack_require__(950); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_form_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_form_style_css__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_form__ = __webpack_require__(951); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_form___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_form__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_pagination_style_css__ = __webpack_require__(903); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_pagination_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_pagination_style_css__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_pagination__ = __webpack_require__(904); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_pagination___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_pagination__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_spin_style_css__ = __webpack_require__(72); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_spin_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_antd_lib_spin_style_css__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_spin__ = __webpack_require__(73); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_spin___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_antd_lib_spin__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_antd_lib_table_style_css__ = __webpack_require__(1219); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_antd_lib_table_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_antd_lib_table_style_css__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_antd_lib_table__ = __webpack_require__(1220); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_antd_lib_table___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_antd_lib_table__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_antd_lib_tooltip_style_css__ = __webpack_require__(169); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_antd_lib_tooltip_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_antd_lib_tooltip_style_css__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_antd_lib_tooltip__ = __webpack_require__(168); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_antd_lib_tooltip___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_antd_lib_tooltip__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_antd_lib_radio_style_css__ = __webpack_require__(177); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_antd_lib_radio_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_antd_lib_radio_style_css__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_antd_lib_radio__ = __webpack_require__(175); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_antd_lib_radio___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_antd_lib_radio__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_antd_lib_input_style_css__ = __webpack_require__(68); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_antd_lib_input_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_antd_lib_input_style_css__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_antd_lib_input__ = __webpack_require__(69); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_antd_lib_input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_13_antd_lib_input__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_antd_lib_modal_style_css__ = __webpack_require__(32); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_antd_lib_modal_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_14_antd_lib_modal_style_css__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15_antd_lib_modal__ = __webpack_require__(33); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15_antd_lib_modal___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_15_antd_lib_modal__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16_antd_lib_checkbox_style_css__ = __webpack_require__(317); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16_antd_lib_checkbox_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_16_antd_lib_checkbox_style_css__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17_antd_lib_checkbox__ = __webpack_require__(314); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17_antd_lib_checkbox___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_17_antd_lib_checkbox__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_18_antd_lib_select_style_css__ = __webpack_require__(318); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_18_antd_lib_select_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_18_antd_lib_select_style_css__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_19_antd_lib_select__ = __webpack_require__(315); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_19_antd_lib_select___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_19_antd_lib_select__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_20_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_20_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_20_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_21_react_router_dom__ = __webpack_require__(50); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_22_antd_lib_date_picker_locale_zh_CN__ = __webpack_require__(181); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_22_antd_lib_date_picker_locale_zh_CN___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_22_antd_lib_date_picker_locale_zh_CN__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_23_educoder__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_24_axios__ = __webpack_require__(15); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_24_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_24_axios__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__modals_Modals__ = __webpack_require__(173); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__coursesPublic_CoursesListType__ = __webpack_require__(1077); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__coursesPublic_HomeworkModal__ = __webpack_require__(1200); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__common_button_CheckAllGroup__ = __webpack_require__(1770); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_29_moment__ = __webpack_require__(86); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_29_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_29_moment__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__coursesPublic_modal_CheckCodeModal__ = __webpack_require__(1792); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__css_Courses_css__ = __webpack_require__(326); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__css_Courses_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_31__css_Courses_css__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_32__common_WorkDetailPageHeader__ = __webpack_require__(1742); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_33__PublishRightnow__ = __webpack_require__(1680); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_34__coursesPublic_ModulationModal__ = __webpack_require__(1791); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_35__coursesPublic_AccessoryModal__ = __webpack_require__(1452); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_36__common_LeaderIcon__ = __webpack_require__(1963); var _createClass=function(){function defineProperties(target,props){for(var i=0;i=90){color='#DD1717';}else if(score>=60){color='#FF6800';}return __WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("a",{href:"javascript:;",style:{color:color,cursor:'default',minWidth:'30px',display:'inline-block',textAlign:'center'}},score==null||score==undefined||score=='--'?'--':content||score);}function getScoreTip(score,dom){return score=='--'?'未评分':score=='**'?'未公开':dom;}function buildColumns(that,student_works,studentData){var gotWorkGroup=false;var gotProjectInfo=false;if(student_works&&student_works.length){student_works.forEach(function(item){if(item.work_group){gotWorkGroup=true;}if(item.project_info&&item.project_info.name){gotProjectInfo=true;}});}else if(studentData&&studentData[0]){if(studentData[0].work_group){gotWorkGroup=true;}if(studentData[0].project_info){gotProjectInfo=true;}}var courseId=that.props.match.params.coursesId;var workId=that.props.match.params.workId;var _that$state=that.state,course_group_count=_that$state.course_group_count,homework_status=_that$state.homework_status;var isAdmin=that.props.isAdmin();var isAdminOrStudent=that.props.isAdminOrStudent();var isStudent=that.props.isStudent();var isNiPing=homework_status&&homework_status.indexOf('匿评中')!=-1;var isAppeal=homework_status&&homework_status.indexOf('申诉中')!=-1;// https://www.trustie.net/issues/21450 分组作业作品列表 学时视角,匿评阶段的列表显示信息不正确 var niPingAndIsStudent=isStudent&&(isNiPing||isAppeal);var columns=[{width:60,title:'序号',dataIndex:'id',key:'id',render:function render(text,record,index){return __WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("span",{style:{minWidth:'50px',display:'inline-block',textAlign:'center'}},record.isMine==true&&student_works&&student_works.length?'我':(that.state.page-1)*PAGE_SIZE+index+1);}},{title:'姓名',width:90,dataIndex:'user_name',key:'user_name',// width: '110px', render:function render(text,record){return __WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("div",{style:{overflow:'hidden',textOverflow:'ellipsis',whiteSpace:'nowrap',width:'74px',margin:'0 auto'},title:text&&text.length>5?text:''},record.is_leader?__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("div",{style:{display:'flex','flex-direction':'column','align-items':'center'}},__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("div",null,text),__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_36__common_LeaderIcon__["a" /* default */],null)):__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_20_react___default.a.Fragment,null,text));}}];if(!niPingAndIsStudent&&isAdminOrStudent){columns.push({width:isStudent?undefined:88,title:'学号',dataIndex:'student_id',key:'student_id',sorter:true,sortDirections:__WEBPACK_IMPORTED_MODULE_23_educoder__["_2" /* sortDirections */],render:function render(text,record){return __WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("span",null,__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("a",{href:"javascript:;",title:text&&text.length>12?text:'',style:{color:'#9A9A9A','text-overflow':'ellipsis','white-space':'nowrap','width':'98px',display:'block',overflow:'hidden',margin:'0 auto',cursor:'default'}},record.student_id));}});}// TODO 只有有分班时才显示分班列 if(course_group_count!=0&&!niPingAndIsStudent){columns.push({title:'分班',key:'group_name',dataIndex:'group_name',render:function render(text,record){return __WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("span",null,__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("a",{href:"javascript:;",style:{color:'#9A9A9A',cursor:'default'}},record.group_name));}});}if(gotWorkGroup&&!niPingAndIsStudent){columns.push({width:72,title:'分组',dataIndex:'work_group',key:'work_group',render:function render(text,record){return __WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("span",null,__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("a",{href:"javascript:void(0);",style:{color:'#4CACFF'}},record.work_group));}});}if(gotProjectInfo){columns.push({width:72,title:'关联项目',dataIndex:'project_info',key:'project_info',render:function render(project_info,record){return __WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("span",null,project_info&&project_info.name&&__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("a",{href:project_info.id==-1?'javascript:void(0)':"/projects/"+project_info.id,target:project_info.id==-1?'':"_blank",className:"overflowHidden1",style:{color:'#4CACFF',width:that.state.anonymous_comment?'80px':'130px',margin:'0 auto',display:'block'},title:project_info.name},project_info.name));}});}columns=columns.concat([{width:88,title:'提交状态',dataIndex:'work_status',key:'work_status',render:function render(status,record){var color=void 0;var text=void 0;if(status===2){color='#DD1717';text='延时提交';}else if(status===0){color='#747A7F';text='未提交';}else{color='#29BD8B';text='按时提交';}return __WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("span",null,__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("a",{href:"javascript:;",style:{color:color,cursor:'default'}},status===0?"未提交":status===1?"按时提交":status===2?"延时提交":""));}},{width:106,// isStudent ? undefined : 106 , // 匿评中 只有这几列: 序号 姓名 提交状态 更新时间 匿评评分 操作 title:'更新时间',dataIndex:'update_time',key:'update_time',sorter:true,defaultSortOrder:'descend',sortDirections:__WEBPACK_IMPORTED_MODULE_23_educoder__["_2" /* sortDirections */],render:function render(update_time,record){return __WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("span",null,__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("a",{href:"javascript:;",style:{color:'#989898',cursor:'default'}},update_time?__WEBPACK_IMPORTED_MODULE_29_moment___default()(update_time).format('YYYY-MM-DD HH:mm'):'--'));}}]);if(!niPingAndIsStudent){columns.push({width:70,title:'教师评分',key:'teacher_score',dataIndex:'teacher_score',render:function render(teacher_score,record){return __WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_antd_lib_tooltip___default.a,{title:getScoreTip(teacher_score,teacher_score)},__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("span",null,renderScore(teacher_score)));}});columns.push({width:70,title:'助教评分',key:'teaching_asistant_score',dataIndex:'teaching_asistant_score',/** * 2名助教进行了评分 平均分:85.0分 * */render:function render(teaching_asistant_score,record){return __WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("span",null,__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_antd_lib_tooltip___default.a,{placement:"bottom",title:getScoreTip(teaching_asistant_score,__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("div",null,record.ta_comment_count,"\u540D\u52A9\u6559\u8FDB\u884C\u4E86\u8BC4\u5206"),__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("div",null,that.state.ta_mode==1?'平均分':'复审分',"\uFF1A",teaching_asistant_score,"\u5206")))},renderScore(teaching_asistant_score)));}});}if(that.state.anonymous_comment){/** 开启了匿评的才显示此列,悬浮TIP示例: 3名学生进行了匿评 有效平均分:80.0分 */columns.push({width:84,// title:
    匿评
    评分
    , title:__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("div",{style:{color:'rgba(0,0,0,.85)'}},"\u533F\u8BC4\u8BC4\u5206"),key:'student_score',dataIndex:'student_score',render:function render(student_score,record){return __WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("span",null,__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_antd_lib_tooltip___default.a,{title:getScoreTip(student_score,that.state.is_evaluation?"\u4F60\u7684\u8BC4\u9605\u5206\u6570\uFF1A"+record.student_score+"\u5206":__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("div",null,record.student_comment_count&&__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("div",null,record.student_comment_count+"\u540D\u5B66\u751F\u8FDB\u884C\u4E86\u533F\u8BC4"),__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("div",null,"\u6709\u6548\u5E73\u5747\u5206\uFF1A",record.student_score,"\u5206")))},renderScore(student_score,""+student_score+(record.student_comment_count?" ("+record.student_comment_count+")":''))));}});}if(that.state.anonymous_appeal){columns.push({width:70,title:'匿评申诉',key:'appeal_all_count',dataIndex:'appeal_all_count',render:function render(appeal_all_count,record){return __WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("span",null,!!appeal_all_count&&__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_antd_lib_tooltip___default.a,{placement:"bottom",title:"\u5171\u6709"+appeal_all_count+"\u6761\u533F\u8BC4\u7533\u8BC9\uFF0C"+record.appeal_deal_count+"\u6761\u5F85\u5904\u7406"},__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("span",{style:{minWidth:'30px',display:'inline-block',textAlign:'center'}},record.appeal_deal_count+"/"+appeal_all_count)),!appeal_all_count&&__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("span",{style:{color:'#747A7F'}},"-/-"));}});}if(!niPingAndIsStudent){columns.push({width:'113px',title:'最终成绩',key:'work_score',dataIndex:'work_score',sorter:true,sortDirections:__WEBPACK_IMPORTED_MODULE_23_educoder__["_2" /* sortDirections */],render:function render(work_score,record){return __WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("span",null,__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_antd_lib_tooltip___default.a,{title:getScoreTip(work_score,__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("div",null,record.user_name+"\uFF08"+record.user_login+"\uFF09"),record.ultimate_score?__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("div",null,"\u6700\u7EC8\u8C03\u6574\u6210\u7EE9\uFF1A",record.work_score,"\u5206"):__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("div",null,record.final_score&&__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("div",null,"\u4F5C\u4E1A\u8BC4\u5206\uFF1A",record.final_score,"\u5206"),record.late_penalty>=0&&__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("div",null,"\u8FDF\u4EA4\u6263\u5206\uFF1A",record.late_penalty,"\u5206"),record.absence_penalty>=0&&__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("div",null,"\u7F3A\u8BC4\u6263\u5206\uFF1A",record.absence_penalty,"\u5206"),record.appeal_penalty>=0&&__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("div",null,"\u8FDD\u89C4\u533F\u8BC4\u6263\u5206\uFF1A",record.appeal_penalty,"\u5206"),__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("div",null,"\u6700\u7EC8\u6210\u7EE9\uFF1A",record.work_score,"\u5206"))))},renderScore(work_score)));}});}if(isAdminOrStudent||that.props.work_public==true){columns.push({width:72,title:'操作',key:'operation',dataIndex:'operation',render:function render(operation,record){return record.work_status===0&&!isAdmin?__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("span",{style:{color:'#747A7F'}},"--"):__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("div",null,isAdmin&&__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_antd_lib_tooltip___default.a,{placement:"bottom",title:__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("pre",null,"\u8C03\u6574\u5B66\u751F\u6700\u7EC8\u6210\u7EE9",__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("br",null),"\u5176\u5B83\u5386\u53F2\u8BC4\u5206\u5C06\u5168\u90E8\u5931\u6548")},__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("a",{style:{color:"#4CACFF"},onClick:function onClick(){return that.showModulationModal(record);}},"\u8C03\u5206")),__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("a",{style:{color:'#4CACFF',marginLeft:'4px'},id:"asdasdasdasd",onMouseDown:function onMouseDown(e){return that.props.toWorkDetailPage2(e,courseId,workId,record.id);},onClick:function onClick(){return that.props.toWorkDetailPage(courseId,workId,record.id);}},isAdmin?'评阅':'查看'));}});}return columns;}// update_time,最终成绩:work_score,学号:student_id // desc:倒序 , asc:顺序 var orderMap={update_time:'desc',work_score:'asc',student_id:'asc'};var PAGE_SIZE=20;// 类似页面 http://localhost:3007/courses/1309/graduation/graduation_tasks/48/76/setting var CommonWorkList=function(_Component){_inherits(CommonWorkList,_Component);function CommonWorkList(props){_classCallCheck(this,CommonWorkList);var _this=_possibleConstructorReturn(this,(CommonWorkList.__proto__||Object.getPrototypeOf(CommonWorkList)).call(this,props));_this.onTablePagination=function(page){_this.setState({page:page},function(){_this.fetchList();});};_this.onSearchValue=function(val){_this.fetchList();};_this.onSearchValueInput=function(e){_this.setState({search:e.target.value});};_this.fetchAllListener=function(){_this.fetchList();};_this.fetchData=function(){_this.fetchList();};_this.fetchList=function(){var workId=_this.props.match.params.workId;var courseId=_this.props.match.params.coursesId;var url="/homework_commons/"+workId+"/works_list.json";var params=_this._getRequestParams();__WEBPACK_IMPORTED_MODULE_24_axios___default.a.post(url,params).then(function(response){if(response.data){_this.setState(Object.assign({},response.data,{isSpin:false}));_this.props.initWorkDetailCommonState&&_this.props.initWorkDetailCommonState(Object.assign(Object.assign({},response.data),{moduleName:'作品列表'}));}}).catch(function(error){console.log(error);_this.setState({isSpin:false});});};_this.teacherCommentOptionChange=function(values,isAllChecked){_this.setState({arg_teacher_comment:isAllChecked?[]:values,page:1},function(){_this.fetchList();});};_this.statusOptionChange=function(values,isAllChecked){_this.setState({arg_work_status:isAllChecked?[]:values,page:1},function(){_this.fetchList();});};_this.courseGroupOptionChange=function(values,isAllChecked){_this.setState({arg_course_group:isAllChecked?[]:values,page:1},function(){_this.fetchList();});};_this.memberWorkChange=function(values,isAllChecked){_this.setState({arg_member_work:isAllChecked?'':values[0],page:1},function(){_this.fetchList();});};_this.funorder=function(order,b_order){_this.setState({order:order,b_order:b_order},function(){_this.fetchList();});};_this.doWhenSuccess=function(){_this.fetchList();};_this.showModulationModal=function(item){_this.modulationItem=item;_this.setState({modulationModalVisible:true});};_this.cancelModulationModel=function(){_this.setState({modulationModalVisible:false});};_this.saveModulationModal=function(value,num){var item=_this.modulationItem;var url="/student_works/"+item.id+"/adjust_score.json";__WEBPACK_IMPORTED_MODULE_24_axios___default.a.post(url,{score:num,comment:value}).then(function(response){if(response.data.status=='0'){_this.setState({modulationModalVisible:false});_this.props.showNotification('调分成功');_this.fetchList();}}).catch(function(error){console.log(error);});};_this.Cancelvisible=function(){_this.setState({visible:false});};_this.addAccessory=function(){_this.setState({visible:true});};_this.setupdate=function(){};_this.table1handleChange=function(pagination,filters,sorter){//"ascend" 升序 //"descend" 降序 if(JSON.stringify(sorter)==="{}"){//没有选择 }else{// 时间 try{if(sorter.columnKey==="update_time"){var myyslorder="";if(sorter.order==="ascend"){myyslorder="asc";}else if(sorter.order==="descend"){myyslorder="desc";}_this.funorder("update_time",myyslorder);}}catch(e){}//成绩 try{if(sorter.columnKey==="work_score"){var _myyslorder="";if(sorter.order==="ascend"){_myyslorder="asc";}else if(sorter.order==="descend"){_myyslorder="desc";}_this.funorder("work_score",_myyslorder);}}catch(e){}//学号 try{if(sorter.columnKey==="student_id"){var _myyslorder2="";if(sorter.order==="ascend"){_myyslorder2="asc";}else if(sorter.order==="descend"){_myyslorder2="desc";}_this.funorder("student_id",_myyslorder2);}}catch(e){}}};_this.publishModal=__WEBPACK_IMPORTED_MODULE_20_react___default.a.createRef();_this.endModal=__WEBPACK_IMPORTED_MODULE_20_react___default.a.createRef();_this.state={course_name:"",homework_name:"",search:'',task_status:[],teacher_comment:[],course_group_info:[],arg_work_status:[],arg_teacher_comment:[],arg_course_group:[],order:'update_time',page:1,isSpin:true,left_time:{},category:{},b_order:'desc'};return _this;}_createClass(CommonWorkList,[{key:"componentDidMount",value:function componentDidMount(){console.log("CommonWorkList 分班list 开始加载");this.fetchList();Object(__WEBPACK_IMPORTED_MODULE_23_educoder__["Z" /* on */])('commonwork_fetch_all',this.fetchAllListener);$("html").animate({scrollTop:$('html').scrollTop()-100});try{this.props.triggerRef(this);}catch(e){}}},{key:"componentWillUnmount",value:function componentWillUnmount(){Object(__WEBPACK_IMPORTED_MODULE_23_educoder__["Y" /* off */])('commonwork_fetch_all',this.fetchAllListener);}},{key:"_getRequestParams",value:function _getRequestParams(){var _state=this.state,search=_state.search,arg_work_status=_state.arg_work_status,arg_teacher_comment=_state.arg_teacher_comment,arg_course_group=_state.arg_course_group,order=_state.order,page=_state.page,arg_member_work=_state.arg_member_work,b_order=_state.b_order;return{page:page,search:search,work_status:arg_work_status,// [0] course_group:arg_course_group,teacher_comment:arg_teacher_comment.length==0?'':arg_teacher_comment[0],order:order,limit:PAGE_SIZE,b_order:b_order,group_id:arg_course_group,member_work:arg_member_work};}// --------------调分 // --------------调分 END // 补交附件 //普通作业tbale 列表塞选数据 },{key:"render",value:function render(){var _this2=this;var getFieldDecorator=this.props.form.getFieldDecorator;var dateFormat='YYYY-MM-DD HH:mm';var _state2=this.state,course_name=_state2.course_name,homework_name=_state2.homework_name,search=_state2.search,page=_state2.page,loadingstate=_state2.loadingstate,student_works=_state2.student_works,work_count=_state2.work_count,all_member_count=_state2.all_member_count,time_status=_state2.time_status,task_status=_state2.task_status,teacher_comment=_state2.teacher_comment,course_group_info=_state2.course_group_info,order=_state2.order,commit_count=_state2.commit_count,uncommit_count=_state2.uncommit_count,left_time=_state2.left_time,modulationModalVisible=_state2.modulationModalVisible,work_statuses=_state2.work_statuses,id=_state2.id,user_name=_state2.user_name,user_login=_state2.user_login,student_id=_state2.student_id,group_name=_state2.group_name,work_status=_state2.work_status,update_time=_state2.update_time,teacher_score=_state2.teacher_score,teaching_asistant_score=_state2.teaching_asistant_score,student_score=_state2.student_score,ultimate_score=_state2.ultimate_score,work_score=_state2.work_score,student_comment_count=_state2.student_comment_count,appeal_all_count=_state2.appeal_all_count,appeal_deal_count=_state2.appeal_deal_count,late_penalty=_state2.late_penalty,absence_penalty=_state2.absence_penalty,appeal_penalty=_state2.appeal_penalty,end_immediately=_state2.end_immediately,publish_immediately=_state2.publish_immediately,homework_id=_state2.homework_id,visible=_state2.visible,work_group=_state2.work_group,project_info=_state2.project_info,is_leader=_state2.is_leader;var courseId=this.props.match.params.coursesId;var category_id=this.props.match.params.category_id;var workId=this.props.match.params.workId;var radioStyle={display:'block',height:'30px',lineHeight:'30px'};var options_status=task_status.map(function(item){return{label:item.name+"("+item.count+")",value:item.id};});var options_course_group=course_group_info.map(function(item){return{label:item.group_group_name+"("+item.count+")",value:item.course_group_id};});var options_teacher_comment=teacher_comment.map(function(item){return{label:item.name+"("+item.count+")",value:item.id};});// 1:组长, 0:组员,“” 不限 var member_works=[{name:'组长',id:1},{name:'组员',id:0}];var options_member_work=member_works.map(function(item){return{label:""+item.name,value:item.id};});var isAdmin=this.props.isAdmin();var isStudent=this.props.isStudent();var isAdminOrStudent=this.props.isAdminOrStudent();var isGroup=this.props.isGroup();// work_group var StudentData=void 0;if(id===undefined){StudentData=undefined;}else{StudentData=isStudent?[{id:id,user_name:user_name,user_login:user_login,student_id:student_id,group_name:group_name,work_status:work_status,update_time:update_time,teacher_score:teacher_score,teaching_asistant_score:teaching_asistant_score,student_score:student_score,ultimate_score:ultimate_score,work_score:work_score,student_comment_count:student_comment_count,appeal_all_count:appeal_all_count,appeal_deal_count:appeal_deal_count,late_penalty:late_penalty,absence_penalty:absence_penalty,appeal_penalty:appeal_penalty,project_info:project_info,is_leader:is_leader,work_group:work_group,isMine:true}]:[];}var columns=buildColumns(this,student_works,StudentData);var params=this._getRequestParams();var exportUrl="/api/homework_commons/"+workId+"/works_list.zip?"+__WEBPACK_IMPORTED_MODULE_23_educoder__["_0" /* queryString */].stringify(params);var exportResultUrl="/api/homework_commons/"+workId+"/works_list.xlsx";var appraisetype=false;var appraiselist=this.state.homework_status;appraiselist&&appraiselist.map(function(item,key){if(item==="评阅中"){appraisetype=true;return;}});// time_status int 时间对应的状态: 0:未发布,1:提交中,2:补交中,3:匿评中,4:申诉中,5:评阅中,6:已结束 var timeMsg='提交剩余时间';if(time_status===1){}else if(time_status===2){timeMsg='补交剩余时间';}else if(time_status===3){timeMsg='匿评剩余时间';}else if(time_status===4){timeMsg='申诉剩余时间';}var hasData=this.state.homework_status&&this.state.homework_status.indexOf("未发布")==-1;// student_works && !!student_works.length && page == 1 && // console.log(StudentData) // console.log(student_works) return __WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_20_react___default.a.Fragment,null,__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_30__coursesPublic_modal_CheckCodeModal__["a" /* default */],Object.assign({ref:"checkCodeModal"},this.props)),__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_35__coursesPublic_AccessoryModal__["a" /* default */],Object.assign({},this.props,{modalname:"补交附件",visible:visible,Cancelname:"取消",Savesname:"确认",Cancel:this.Cancelvisible,categoryid:category_id,setupdate:this.setupdate,reviseAttachmentUrl:"/student_works/"+id+"/revise_attachment.json"})),__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_33__PublishRightnow__["a" /* default */],Object.assign({ref:this.publishModal,showActionButton:false},this.props,{checkBoxValues:[workId],isPublish:true,doWhenSuccess:this.doWhenSuccess})),__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_33__PublishRightnow__["a" /* default */],Object.assign({ref:this.endModal,showActionButton:false},this.props,{checkBoxValues:[workId],isPublish:false,doWhenSuccess:this.doWhenSuccess})),modulationModalVisible===true?__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_34__coursesPublic_ModulationModal__["a" /* default */],{visible:modulationModalVisible,Cancel:this.cancelModulationModel,Saves:function Saves(value,num){return _this2.saveModulationModal(value,num);}}):"",__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("style",null,"\n .ant-table-thead > tr > th, .ant-table-tbody > tr > td {\n text-align: center;\n }\n\n .worklist1 .search-new {\n margin-bottom: -30px !important;\n top: 22px;\n position: absolute;\n right: 18px;\n }\n\n .workListContent .ant-table-thead > tr > th, .workListContent .ant-table-tbody > tr > td {\n padding: 10px 1px;\n }\n "),__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("div",{style:{background:'#fff'},className:"workListContent"},isAdmin&&hasData&&__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("ul",{className:"clearfix",style:{padding:"20px 40px 10px",position:'relative',paddingLeft:'24px'}},__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_28__common_button_CheckAllGroup__["a" /* default */],{options:options_teacher_comment,label:'你的评阅:',onChange:this.teacherCommentOptionChange}),__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_28__common_button_CheckAllGroup__["a" /* default */],{options:options_status,label:'作品状态:',onChange:this.statusOptionChange}),isGroup&&__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_28__common_button_CheckAllGroup__["a" /* default */],{options:options_member_work,label:'组内角色:',onChange:this.memberWorkChange}),options_course_group.length>1&&__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_28__common_button_CheckAllGroup__["a" /* default */],{options:options_course_group,label:'分班情况:',onChange:this.courseGroupOptionChange,checkboxGroupStyle:{width:'980px'}}),__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("div",{className:"fr mr5 search-new mr8",style:{marginBottom:'1px'}},__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement(Search,{placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D\u6216\u5B66\u53F7\u641C\u7D22",id:"subject_search_input",onInput:this.onSearchValueInput,onSearch:this.onSearchValue,autoComplete:"off"}))),__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("div",{id:"graduation_work_list",style:{padding:isStudent?'10px 24px 10px 24px':'0px 24px 10px 24px'}},__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("div",{className:"clearfix"},hasData&&__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("span",{className:"fl color-grey-6 font-12"},isAdmin?!!all_member_count&&__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_20_react___default.a.Fragment,null,__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("span",{className:"color-orange-tip"},work_count||'0'),"\u4E2A\u68C0\u7D22\u7ED3\u679C\uFF08",all_member_count," \u5B66\u751F\uFF09"):(!!commit_count||!!uncommit_count)&&__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_20_react___default.a.Fragment,null,__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("span",{className:"color-orange-tip"},commit_count),"\u5DF2\u4EA4\u3000",uncommit_count,"\u672A\u4EA4\u3000",timeMsg||'',__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("span",{className:"color-orange-tip"},left_time.time))))),__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("style",null,"\n .workListContent .ant-table-thead > tr > th {\n border-bottom: none;\n }\n .studentTable .ant-table-tbody { background: '#F1F9FF' }\n .studentTable table, .stageTable table{\n font-size: 13px !important;\n }\n "),isStudent&&StudentData===undefined?"":StudentData===undefined?"":__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_table___default.a,{className:"studentTable",dataSource:StudentData,onChange:this.table1handleChange,columns:columns,pagination:false,showHeader:!student_works||student_works.length==0}),__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("div",{className:"justify break_full_word new_li edu-back-white course_table_wrap",style:{minHeight:"480px",marginBottom:'30px'}},__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("style",null,"\n .ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {\n top: 72%;}\n }\n .singleLine tr.ant-table-row {\n background: #f1f9ff;\n }\n .course_table_wrap .ant-pagination.ant-table-pagination {\n float: none;\n text-align: center;\n }\n "),isStudent&&student_works&&student_works.length==0||!isStudent&&student_works===undefined?"":JSON.stringify(student_works)==="[]"||student_works===undefined?__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_spin___default.a,{size:"large",spinning:this.state.isSpin},__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("div",{id:"forum_list",className:"forum_table"},__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement("div",{className:"mh650 edu-back-white"},__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_23_educoder__["u" /* NoneData */],null)))):__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_20_react___default.a.Fragment,null,__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_antd_lib_table___default.a,{className:"stageTable",dataSource:student_works,columns:columns,showQuickJumper:true,pagination:false,onChange:this.table1handleChange,loading:loadingstate})))),work_count>PAGE_SIZE&&__WEBPACK_IMPORTED_MODULE_20_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_pagination___default.a,{style:{textAlign:'center',marginBottom:'20px'},showQuickJumper:true,pageSize:PAGE_SIZE,onChange:this.onTablePagination,current:page,total:work_count}));}}]);return CommonWorkList;}(__WEBPACK_IMPORTED_MODULE_20_react__["Component"]);var CommonWorkListForm=__WEBPACK_IMPORTED_MODULE_1_antd_lib_form___default.a.create({name:'commonworkListForm'})(CommonWorkList);/* harmony default export */ __webpack_exports__["default"] = (CommonWorkListForm); /***/ }), /***/ 874: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; exports.convertFieldsError = convertFieldsError; exports.format = format; exports.isEmptyValue = isEmptyValue; exports.isEmptyObject = isEmptyObject; exports.asyncMap = asyncMap; exports.complementError = complementError; exports.deepMerge = deepMerge; /* eslint no-console:0 */ var formatRegExp = /%[sdj%]/g; var warning = exports.warning = function warning() {}; // don't print warning message when in production env or node runtime if (false) { exports.warning = warning = function warning(type, errors) { if (typeof console !== 'undefined' && console.warn) { if (errors.every(function (e) { return typeof e === 'string'; })) { console.warn(type, errors); } } }; } function convertFieldsError(errors) { if (!errors || !errors.length) return null; var fields = {}; errors.forEach(function (error) { var field = error.field; fields[field] = fields[field] || []; fields[field].push(error); }); return fields; } function format() { for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var i = 1; var f = args[0]; var len = args.length; if (typeof f === 'function') { return f.apply(null, args.slice(1)); } if (typeof f === 'string') { var str = String(f).replace(formatRegExp, function (x) { if (x === '%%') { return '%'; } if (i >= len) { return x; } switch (x) { case '%s': return String(args[i++]); case '%d': return Number(args[i++]); case '%j': try { return JSON.stringify(args[i++]); } catch (_) { return '[Circular]'; } break; default: return x; } }); for (var arg = args[i]; i < len; arg = args[++i]) { str += ' ' + arg; } return str; } return f; } function isNativeStringType(type) { return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern'; } function isEmptyValue(value, type) { if (value === undefined || value === null) { return true; } if (type === 'array' && Array.isArray(value) && !value.length) { return true; } if (isNativeStringType(type) && typeof value === 'string' && !value) { return true; } return false; } function isEmptyObject(obj) { return Object.keys(obj).length === 0; } function asyncParallelArray(arr, func, callback) { var results = []; var total = 0; var arrLength = arr.length; function count(errors) { results.push.apply(results, errors); total++; if (total === arrLength) { callback(results); } } arr.forEach(function (a) { func(a, count); }); } function asyncSerialArray(arr, func, callback) { var index = 0; var arrLength = arr.length; function next(errors) { if (errors && errors.length) { callback(errors); return; } var original = index; index = index + 1; if (original < arrLength) { func(arr[original], next); } else { callback([]); } } next([]); } function flattenObjArr(objArr) { var ret = []; Object.keys(objArr).forEach(function (k) { ret.push.apply(ret, objArr[k]); }); return ret; } function asyncMap(objArr, option, func, callback) { if (option.first) { var flattenArr = flattenObjArr(objArr); return asyncSerialArray(flattenArr, func, callback); } var firstFields = option.firstFields || []; if (firstFields === true) { firstFields = Object.keys(objArr); } var objArrKeys = Object.keys(objArr); var objArrLength = objArrKeys.length; var total = 0; var results = []; var pending = new Promise(function (resolve, reject) { var next = function next(errors) { results.push.apply(results, errors); total++; if (total === objArrLength) { callback(results); return results.length ? reject({ errors: results, fields: convertFieldsError(results) }) : resolve(); } }; objArrKeys.forEach(function (key) { var arr = objArr[key]; if (firstFields.indexOf(key) !== -1) { asyncSerialArray(arr, func, next); } else { asyncParallelArray(arr, func, next); } }); }); pending['catch'](function (e) { return e; }); return pending; } function complementError(rule) { return function (oe) { if (oe && oe.message) { oe.field = oe.field || rule.fullField; return oe; } return { message: typeof oe === 'function' ? oe() : oe, field: oe.field || rule.fullField }; }; } function deepMerge(target, source) { if (source) { for (var s in source) { if (source.hasOwnProperty(s)) { var value = source[s]; if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && _typeof(target[s]) === 'object') { target[s] = _extends({}, target[s], value); } else { target[s] = value; } } } } return target; } /***/ }), /***/ 875: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _required = __webpack_require__(915); var _required2 = _interopRequireDefault(_required); var _whitespace = __webpack_require__(1038); var _whitespace2 = _interopRequireDefault(_whitespace); var _type = __webpack_require__(1039); var _type2 = _interopRequireDefault(_type); var _range = __webpack_require__(1040); var _range2 = _interopRequireDefault(_range); var _enum = __webpack_require__(1041); var _enum2 = _interopRequireDefault(_enum); var _pattern = __webpack_require__(1042); var _pattern2 = _interopRequireDefault(_pattern); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } exports['default'] = { required: _required2['default'], whitespace: _whitespace2['default'], type: _type2['default'], range: _range2['default'], 'enum': _enum2['default'], pattern: _pattern2['default'] }; /***/ }), /***/ 877: /***/ (function(module, exports) { /** * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); * // => true * * _.isArray(document.body.children); * // => false * * _.isArray('abc'); * // => false * * _.isArray(_.noop); * // => false */ var isArray = Array.isArray; module.exports = isArray; /***/ }), /***/ 878: /***/ (function(module, exports, __webpack_require__) { var baseIsNative = __webpack_require__(958), getValue = __webpack_require__(961); /** * Gets the native function at `key` of `object`. * * @private * @param {Object} object The object to query. * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { var value = getValue(object, key); return baseIsNative(value) ? value : undefined; } module.exports = getNative; /***/ }), /***/ 879: /***/ (function(module, exports, __webpack_require__) { var eq = __webpack_require__(883); /** * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ function assocIndexOf(array, key) { var length = array.length; while (length--) { if (eq(array[length][0], key)) { return length; } } return -1; } module.exports = assocIndexOf; /***/ }), /***/ 880: /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(878); /* Built-in method references that are verified to be native. */ var nativeCreate = getNative(Object, 'create'); module.exports = nativeCreate; /***/ }), /***/ 881: /***/ (function(module, exports, __webpack_require__) { var isKeyable = __webpack_require__(970); /** * Gets the data for `map`. * * @private * @param {Object} map The map to query. * @param {string} key The reference key. * @returns {*} Returns the map data. */ function getMapData(map, key) { var data = map.__data__; return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } module.exports = getMapData; /***/ }), /***/ 882: /***/ (function(module, exports, __webpack_require__) { var isSymbol = __webpack_require__(321); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** * Converts `value` to a string key if it's not a string or symbol. * * @private * @param {*} value The value to inspect. * @returns {string|symbol} Returns the key. */ function toKey(value) { if (typeof value == 'string' || isSymbol(value)) { return value; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } module.exports = toKey; /***/ }), /***/ 883: /***/ (function(module, exports) { /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.eq(object, object); * // => true * * _.eq(object, other); * // => false * * _.eq('a', 'a'); * // => true * * _.eq('a', Object('a')); * // => false * * _.eq(NaN, NaN); * // => true */ function eq(value, other) { return value === other || (value !== value && other !== other); } module.exports = eq; /***/ }), /***/ 884: /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__(877), isKey = __webpack_require__(896), stringToPath = __webpack_require__(975), toString = __webpack_require__(946); /** * Casts `value` to a path array if it's not one. * * @private * @param {*} value The value to inspect. * @param {Object} [object] The object to query keys on. * @returns {Array} Returns the cast property path array. */ function castPath(value, object) { if (isArray(value)) { return value; } return isKey(value, object) ? [value] : stringToPath(toString(value)); } module.exports = castPath; /***/ }), /***/ 886: /***/ (function(module, exports, __webpack_require__) { var listCacheClear = __webpack_require__(953), listCacheDelete = __webpack_require__(954), listCacheGet = __webpack_require__(955), listCacheHas = __webpack_require__(956), listCacheSet = __webpack_require__(957); /** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function ListCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `ListCache`. ListCache.prototype.clear = listCacheClear; ListCache.prototype['delete'] = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; module.exports = ListCache; /***/ }), /***/ 888: /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _extends2 = __webpack_require__(18); var _extends3 = _interopRequireDefault(_extends2); exports.getTodayTime = getTodayTime; exports.getTitleString = getTitleString; exports.getTodayTimeStr = getTodayTimeStr; exports.getMonthName = getMonthName; exports.syncTime = syncTime; exports.getTimeConfig = getTimeConfig; exports.isTimeValidByConfig = isTimeValidByConfig; exports.isTimeValid = isTimeValid; exports.isAllowedDate = isAllowedDate; exports.formatDate = formatDate; var _moment = __webpack_require__(86); var _moment2 = _interopRequireDefault(_moment); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var defaultDisabledTime = { disabledHours: function disabledHours() { return []; }, disabledMinutes: function disabledMinutes() { return []; }, disabledSeconds: function disabledSeconds() { return []; } }; function getTodayTime(value) { var today = (0, _moment2['default'])(); today.locale(value.locale()).utcOffset(value.utcOffset()); return today; } function getTitleString(value) { return value.format('LL'); } function getTodayTimeStr(value) { var today = getTodayTime(value); return getTitleString(today); } function getMonthName(month) { var locale = month.locale(); var localeData = month.localeData(); return localeData[locale === 'zh-cn' ? 'months' : 'monthsShort'](month); } function syncTime(from, to) { if (!_moment2['default'].isMoment(from) || !_moment2['default'].isMoment(to)) return; to.hour(from.hour()); to.minute(from.minute()); to.second(from.second()); to.millisecond(from.millisecond()); } function getTimeConfig(value, disabledTime) { var disabledTimeConfig = disabledTime ? disabledTime(value) : {}; disabledTimeConfig = (0, _extends3['default'])({}, defaultDisabledTime, disabledTimeConfig); return disabledTimeConfig; } function isTimeValidByConfig(value, disabledTimeConfig) { var invalidTime = false; if (value) { var hour = value.hour(); var minutes = value.minute(); var seconds = value.second(); var disabledHours = disabledTimeConfig.disabledHours(); if (disabledHours.indexOf(hour) === -1) { var disabledMinutes = disabledTimeConfig.disabledMinutes(hour); if (disabledMinutes.indexOf(minutes) === -1) { var disabledSeconds = disabledTimeConfig.disabledSeconds(hour, minutes); invalidTime = disabledSeconds.indexOf(seconds) !== -1; } else { invalidTime = true; } } else { invalidTime = true; } } return !invalidTime; } function isTimeValid(value, disabledTime) { var disabledTimeConfig = getTimeConfig(value, disabledTime); return isTimeValidByConfig(value, disabledTimeConfig); } function isAllowedDate(value, disabledDate, disabledTime) { if (disabledDate) { if (disabledDate(value)) { return false; } } if (disabledTime) { if (!isTimeValid(value, disabledTime)) { return false; } } return true; } function formatDate(value, format) { if (!value) { return ''; } if (Array.isArray(format)) { format = format[0]; } return value.format(format); } /***/ }), /***/ 889: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _createReactContext = _interopRequireDefault(__webpack_require__(316)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var MenuContext = (0, _createReactContext["default"])({ inlineCollapsed: false }); var _default = MenuContext; exports["default"] = _default; //# sourceMappingURL=MenuContext.js.map /***/ }), /***/ 890: /***/ (function(module, exports) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; /** * Checks if `value` is a valid array-like index. * * @private * @param {*} value The value to check. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { var type = typeof value; length = length == null ? MAX_SAFE_INTEGER : length; return !!length && (type == 'number' || (type != 'symbol' && reIsUint.test(value))) && (value > -1 && value % 1 == 0 && value < length); } module.exports = isIndex; /***/ }), /***/ 891: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = __webpack_require__(18); var _extends3 = _interopRequireDefault(_extends2); exports.argumentContainer = argumentContainer; exports.identity = identity; exports.flattenArray = flattenArray; exports.treeTraverse = treeTraverse; exports.flattenFields = flattenFields; exports.normalizeValidateRules = normalizeValidateRules; exports.getValidateTriggers = getValidateTriggers; exports.getValueFromEvent = getValueFromEvent; exports.getErrorStrs = getErrorStrs; exports.getParams = getParams; exports.isEmptyObject = isEmptyObject; exports.hasRules = hasRules; exports.startsWith = startsWith; var _hoistNonReactStatics = __webpack_require__(1026); var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics); var _warning = __webpack_require__(323); var _warning2 = _interopRequireDefault(_warning); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function getDisplayName(WrappedComponent) { return WrappedComponent.displayName || WrappedComponent.name || 'WrappedComponent'; } function argumentContainer(Container, WrappedComponent) { /* eslint no-param-reassign:0 */ Container.displayName = 'Form(' + getDisplayName(WrappedComponent) + ')'; Container.WrappedComponent = WrappedComponent; return (0, _hoistNonReactStatics2['default'])(Container, WrappedComponent); } function identity(obj) { return obj; } function flattenArray(arr) { return Array.prototype.concat.apply([], arr); } function treeTraverse() { var path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; var tree = arguments[1]; var isLeafNode = arguments[2]; var errorMessage = arguments[3]; var callback = arguments[4]; if (isLeafNode(path, tree)) { callback(path, tree); } else if (tree === undefined || tree === null) { // Do nothing } else if (Array.isArray(tree)) { tree.forEach(function (subTree, index) { return treeTraverse(path + '[' + index + ']', subTree, isLeafNode, errorMessage, callback); }); } else { // It's object and not a leaf node if (typeof tree !== 'object') { (0, _warning2['default'])(false, errorMessage); return; } Object.keys(tree).forEach(function (subTreeKey) { var subTree = tree[subTreeKey]; treeTraverse('' + path + (path ? '.' : '') + subTreeKey, subTree, isLeafNode, errorMessage, callback); }); } } function flattenFields(maybeNestedFields, isLeafNode, errorMessage) { var fields = {}; treeTraverse(undefined, maybeNestedFields, isLeafNode, errorMessage, function (path, node) { fields[path] = node; }); return fields; } function normalizeValidateRules(validate, rules, validateTrigger) { var validateRules = validate.map(function (item) { var newItem = (0, _extends3['default'])({}, item, { trigger: item.trigger || [] }); if (typeof newItem.trigger === 'string') { newItem.trigger = [newItem.trigger]; } return newItem; }); if (rules) { validateRules.push({ trigger: validateTrigger ? [].concat(validateTrigger) : [], rules: rules }); } return validateRules; } function getValidateTriggers(validateRules) { return validateRules.filter(function (item) { return !!item.rules && item.rules.length; }).map(function (item) { return item.trigger; }).reduce(function (pre, curr) { return pre.concat(curr); }, []); } function getValueFromEvent(e) { // To support custom element if (!e || !e.target) { return e; } var target = e.target; return target.type === 'checkbox' ? target.checked : target.value; } function getErrorStrs(errors) { if (errors) { return errors.map(function (e) { if (e && e.message) { return e.message; } return e; }); } return errors; } function getParams(ns, opt, cb) { var names = ns; var options = opt; var callback = cb; if (cb === undefined) { if (typeof names === 'function') { callback = names; options = {}; names = undefined; } else if (Array.isArray(names)) { if (typeof options === 'function') { callback = options; options = {}; } else { options = options || {}; } } else { callback = options; options = names || {}; names = undefined; } } return { names: names, options: options, callback: callback }; } function isEmptyObject(obj) { return Object.keys(obj).length === 0; } function hasRules(validate) { if (validate) { return validate.some(function (item) { return item.rules && item.rules.length; }); } return false; } function startsWith(str, prefix) { return str.lastIndexOf(prefix, 0) === 0; } /***/ }), /***/ 892: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony default export */ __webpack_exports__["a"] = ({ ZERO: 48, NINE: 57, NUMPAD_ZERO: 96, NUMPAD_NINE: 105, BACKSPACE: 8, DELETE: 46, ENTER: 13, ARROW_UP: 38, ARROW_DOWN: 40 }); /***/ }), /***/ 893: /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(878), root = __webpack_require__(167); /* Built-in method references that are verified to be native. */ var Map = getNative(root, 'Map'); module.exports = Map; /***/ }), /***/ 894: /***/ (function(module, exports, __webpack_require__) { var mapCacheClear = __webpack_require__(962), mapCacheDelete = __webpack_require__(969), mapCacheGet = __webpack_require__(971), mapCacheHas = __webpack_require__(972), mapCacheSet = __webpack_require__(973); /** * Creates a map cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function MapCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `MapCache`. MapCache.prototype.clear = mapCacheClear; MapCache.prototype['delete'] = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; module.exports = MapCache; /***/ }), /***/ 895: /***/ (function(module, exports) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** * Checks if `value` is a valid array-like length. * * **Note:** This method is loosely based on * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); * // => true * * _.isLength(Number.MIN_VALUE); * // => false * * _.isLength(Infinity); * // => false * * _.isLength('3'); * // => false */ function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } module.exports = isLength; /***/ }), /***/ 896: /***/ (function(module, exports, __webpack_require__) { var isArray = __webpack_require__(877), isSymbol = __webpack_require__(321); /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; /** * Checks if `value` is a property name and not a property path. * * @private * @param {*} value The value to check. * @param {Object} [object] The object to query keys on. * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ function isKey(value, object) { if (isArray(value)) { return false; } var type = typeof value; if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) { return true; } return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || (object != null && value in Object(object)); } module.exports = isKey; /***/ }), /***/ 899: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["e"] = getTodayTime; /* harmony export (immutable) */ __webpack_exports__["d"] = getTitleString; /* harmony export (immutable) */ __webpack_exports__["f"] = getTodayTimeStr; /* harmony export (immutable) */ __webpack_exports__["b"] = getMonthName; /* harmony export (immutable) */ __webpack_exports__["h"] = syncTime; /* harmony export (immutable) */ __webpack_exports__["c"] = getTimeConfig; /* unused harmony export isTimeValidByConfig */ /* unused harmony export isTimeValid */ /* harmony export (immutable) */ __webpack_exports__["g"] = isAllowedDate; /* harmony export (immutable) */ __webpack_exports__["a"] = formatDate; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(18); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_moment__ = __webpack_require__(86); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_moment__); var defaultDisabledTime = { disabledHours: function disabledHours() { return []; }, disabledMinutes: function disabledMinutes() { return []; }, disabledSeconds: function disabledSeconds() { return []; } }; function getTodayTime(value) { var today = __WEBPACK_IMPORTED_MODULE_1_moment___default()(); today.locale(value.locale()).utcOffset(value.utcOffset()); return today; } function getTitleString(value) { return value.format('LL'); } function getTodayTimeStr(value) { var today = getTodayTime(value); return getTitleString(today); } function getMonthName(month) { var locale = month.locale(); var localeData = month.localeData(); return localeData[locale === 'zh-cn' ? 'months' : 'monthsShort'](month); } function syncTime(from, to) { if (!__WEBPACK_IMPORTED_MODULE_1_moment___default.a.isMoment(from) || !__WEBPACK_IMPORTED_MODULE_1_moment___default.a.isMoment(to)) return; to.hour(from.hour()); to.minute(from.minute()); to.second(from.second()); to.millisecond(from.millisecond()); } function getTimeConfig(value, disabledTime) { var disabledTimeConfig = disabledTime ? disabledTime(value) : {}; disabledTimeConfig = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, defaultDisabledTime, disabledTimeConfig); return disabledTimeConfig; } function isTimeValidByConfig(value, disabledTimeConfig) { var invalidTime = false; if (value) { var hour = value.hour(); var minutes = value.minute(); var seconds = value.second(); var disabledHours = disabledTimeConfig.disabledHours(); if (disabledHours.indexOf(hour) === -1) { var disabledMinutes = disabledTimeConfig.disabledMinutes(hour); if (disabledMinutes.indexOf(minutes) === -1) { var disabledSeconds = disabledTimeConfig.disabledSeconds(hour, minutes); invalidTime = disabledSeconds.indexOf(seconds) !== -1; } else { invalidTime = true; } } else { invalidTime = true; } } return !invalidTime; } function isTimeValid(value, disabledTime) { var disabledTimeConfig = getTimeConfig(value, disabledTime); return isTimeValidByConfig(value, disabledTimeConfig); } function isAllowedDate(value, disabledDate, disabledTime) { if (disabledDate) { if (disabledDate(value)) { return false; } } if (disabledTime) { if (!isTimeValid(value, disabledTime)) { return false; } } return true; } function formatDate(value, format) { if (!value) { return ''; } if (Array.isArray(format)) { format = format[0]; } return value.format(format); } /***/ }), /***/ 900: /***/ (function(module, exports) { /** * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); * // => true * * _.isArray(document.body.children); * // => false * * _.isArray('abc'); * // => false * * _.isArray(_.noop); * // => false */ var isArray = Array.isArray; module.exports = isArray; /***/ }), /***/ 901: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var scrollbarVerticalSize; var scrollbarHorizontalSize; // Measure scrollbar width for padding body during modal show/hide var scrollbarMeasure = { position: 'absolute', top: '-9999px', width: '50px', height: '50px' }; // This const is used for colgroup.col internal props. And should not provides to user. exports.INTERNAL_COL_DEFINE = 'RC_TABLE_INTERNAL_COL_DEFINE'; function measureScrollbar(_ref) { var _ref$direction = _ref.direction, direction = _ref$direction === void 0 ? 'vertical' : _ref$direction, prefixCls = _ref.prefixCls; if (typeof document === 'undefined' || typeof window === 'undefined') { return 0; } var isVertical = direction === 'vertical'; if (isVertical && scrollbarVerticalSize) { return scrollbarVerticalSize; } if (!isVertical && scrollbarHorizontalSize) { return scrollbarHorizontalSize; } var scrollDiv = document.createElement('div'); Object.keys(scrollbarMeasure).forEach(function (scrollProp) { scrollDiv.style[scrollProp] = scrollbarMeasure[scrollProp]; }); // apply hide scrollbar className ahead scrollDiv.className = "".concat(prefixCls, "-hide-scrollbar scroll-div-append-to-body"); // Append related overflow style if (isVertical) { scrollDiv.style.overflowY = 'scroll'; } else { scrollDiv.style.overflowX = 'scroll'; } document.body.appendChild(scrollDiv); var size = 0; if (isVertical) { size = scrollDiv.offsetWidth - scrollDiv.clientWidth; scrollbarVerticalSize = size; } else { size = scrollDiv.offsetHeight - scrollDiv.clientHeight; scrollbarHorizontalSize = size; } document.body.removeChild(scrollDiv); return size; } exports.measureScrollbar = measureScrollbar; function debounce(func, wait, immediate) { var timeout; function debounceFunc() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var context = this; // https://fb.me/react-event-pooling if (args[0] && args[0].persist) { args[0].persist(); } var later = function later() { timeout = null; if (!immediate) { func.apply(context, args); } }; var callNow = immediate && !timeout; clearTimeout(timeout); timeout = setTimeout(later, wait); if (callNow) { func.apply(context, args); } } debounceFunc.cancel = function cancel() { if (timeout) { clearTimeout(timeout); timeout = null; } }; return debounceFunc; } exports.debounce = debounce; function remove(array, item) { var index = array.indexOf(item); var front = array.slice(0, index); var last = array.slice(index + 1, array.length); return front.concat(last); } exports.remove = remove; /** * Returns only data- and aria- key/value pairs * @param {object} props */ function getDataAndAriaProps(props) { return Object.keys(props).reduce(function (memo, key) { if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-') { memo[key] = props[key]; } return memo; }, {}); } exports.getDataAndAriaProps = getDataAndAriaProps; /***/ }), /***/ 902: /***/ (function(module, exports) { /** * Helper function for iterating over a collection * * @param collection * @param fn */ function each(collection, fn) { var i = 0, length = collection.length, cont; for(i; i < length; i++) { cont = fn(collection[i], i); if(cont === false) { break; //allow early exit } } } /** * Helper function for determining whether target object is an array * * @param target the object under test * @return {Boolean} true if array, false otherwise */ function isArray(target) { return Object.prototype.toString.apply(target) === '[object Array]'; } /** * Helper function for determining whether target object is a function * * @param target the object under test * @return {Boolean} true if function, false otherwise */ function isFunction(target) { return typeof target === 'function'; } module.exports = { isFunction : isFunction, isArray : isArray, each : each }; /***/ }), /***/ 903: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(28); __webpack_require__(926); __webpack_require__(318); //# sourceMappingURL=css.js.map /***/ }), /***/ 904: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _Pagination = _interopRequireDefault(__webpack_require__(936)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _Pagination["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /***/ 905: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = exports.SiderContext = void 0; var _createReactContext = _interopRequireDefault(__webpack_require__(316)); var React = _interopRequireWildcard(__webpack_require__(0)); var _reactLifecyclesCompat = __webpack_require__(7); var _classnames = _interopRequireDefault(__webpack_require__(3)); var _omit = _interopRequireDefault(__webpack_require__(43)); var _layout = __webpack_require__(992); var _configProvider = __webpack_require__(12); var _icon = _interopRequireDefault(__webpack_require__(26)); var _isNumeric = _interopRequireDefault(__webpack_require__(996)); function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 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; } function _extends() { _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); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 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); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var __rest = void 0 && (void 0).__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; // matchMedia polyfill for // https://github.com/WickyNilliams/enquire.js/issues/82 // TODO: Will be removed in antd 4.0 because we will no longer support ie9 if (typeof window !== 'undefined') { var matchMediaPolyfill = function matchMediaPolyfill(mediaQuery) { return { media: mediaQuery, matches: false, addListener: function addListener() {}, removeListener: function removeListener() {} }; }; // ref: https://github.com/ant-design/ant-design/issues/18774 if (!window.matchMedia) window.matchMedia = matchMediaPolyfill; } var dimensionMaxMap = { xs: '479.98px', sm: '575.98px', md: '767.98px', lg: '991.98px', xl: '1199.98px', xxl: '1599.98px' }; var SiderContext = (0, _createReactContext["default"])({}); exports.SiderContext = SiderContext; var generateId = function () { var i = 0; return function () { var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; i += 1; return "".concat(prefix).concat(i); }; }(); var InternalSider = /*#__PURE__*/ function (_React$Component) { _inherits(InternalSider, _React$Component); function InternalSider(props) { var _this; _classCallCheck(this, InternalSider); _this = _possibleConstructorReturn(this, _getPrototypeOf(InternalSider).call(this, props)); _this.responsiveHandler = function (mql) { _this.setState({ below: mql.matches }); var onBreakpoint = _this.props.onBreakpoint; if (onBreakpoint) { onBreakpoint(mql.matches); } if (_this.state.collapsed !== mql.matches) { _this.setCollapsed(mql.matches, 'responsive'); } }; _this.setCollapsed = function (collapsed, type) { if (!('collapsed' in _this.props)) { _this.setState({ collapsed: collapsed }); } var onCollapse = _this.props.onCollapse; if (onCollapse) { onCollapse(collapsed, type); } }; _this.toggle = function () { var collapsed = !_this.state.collapsed; _this.setCollapsed(collapsed, 'clickTrigger'); }; _this.belowShowChange = function () { _this.setState(function (_ref) { var belowShow = _ref.belowShow; return { belowShow: !belowShow }; }); }; _this.renderSider = function (_ref2) { var _classNames; var getPrefixCls = _ref2.getPrefixCls; var _a = _this.props, customizePrefixCls = _a.prefixCls, className = _a.className, theme = _a.theme, collapsible = _a.collapsible, reverseArrow = _a.reverseArrow, trigger = _a.trigger, style = _a.style, width = _a.width, collapsedWidth = _a.collapsedWidth, zeroWidthTriggerStyle = _a.zeroWidthTriggerStyle, others = __rest(_a, ["prefixCls", "className", "theme", "collapsible", "reverseArrow", "trigger", "style", "width", "collapsedWidth", "zeroWidthTriggerStyle"]); var prefixCls = getPrefixCls('layout-sider', customizePrefixCls); var divProps = (0, _omit["default"])(others, ['collapsed', 'defaultCollapsed', 'onCollapse', 'breakpoint', 'onBreakpoint', 'siderHook', 'zeroWidthTriggerStyle']); var rawWidth = _this.state.collapsed ? collapsedWidth : width; // use "px" as fallback unit for width var siderWidth = (0, _isNumeric["default"])(rawWidth) ? "".concat(rawWidth, "px") : String(rawWidth); // special trigger when collapsedWidth == 0 var zeroWidthTrigger = parseFloat(String(collapsedWidth || 0)) === 0 ? React.createElement("span", { onClick: _this.toggle, className: "".concat(prefixCls, "-zero-width-trigger ").concat(prefixCls, "-zero-width-trigger-").concat(reverseArrow ? 'right' : 'left'), style: zeroWidthTriggerStyle }, React.createElement(_icon["default"], { type: "bars" })) : null; var iconObj = { expanded: reverseArrow ? React.createElement(_icon["default"], { type: "right" }) : React.createElement(_icon["default"], { type: "left" }), collapsed: reverseArrow ? React.createElement(_icon["default"], { type: "left" }) : React.createElement(_icon["default"], { type: "right" }) }; var status = _this.state.collapsed ? 'collapsed' : 'expanded'; var defaultTrigger = iconObj[status]; var triggerDom = trigger !== null ? zeroWidthTrigger || React.createElement("div", { className: "".concat(prefixCls, "-trigger"), onClick: _this.toggle, style: { width: siderWidth } }, trigger || defaultTrigger) : null; var divStyle = _extends(_extends({}, style), { flex: "0 0 ".concat(siderWidth), maxWidth: siderWidth, minWidth: siderWidth, width: siderWidth }); var siderCls = (0, _classnames["default"])(className, prefixCls, "".concat(prefixCls, "-").concat(theme), (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-collapsed"), !!_this.state.collapsed), _defineProperty(_classNames, "".concat(prefixCls, "-has-trigger"), collapsible && trigger !== null && !zeroWidthTrigger), _defineProperty(_classNames, "".concat(prefixCls, "-below"), !!_this.state.below), _defineProperty(_classNames, "".concat(prefixCls, "-zero-width"), parseFloat(siderWidth) === 0), _classNames)); return React.createElement("aside", _extends({ className: siderCls }, divProps, { style: divStyle }), React.createElement("div", { className: "".concat(prefixCls, "-children") }, _this.props.children), collapsible || _this.state.below && zeroWidthTrigger ? triggerDom : null); }; _this.uniqueId = generateId('ant-sider-'); var matchMedia; if (typeof window !== 'undefined') { matchMedia = window.matchMedia; } if (matchMedia && props.breakpoint && props.breakpoint in dimensionMaxMap) { _this.mql = matchMedia("(max-width: ".concat(dimensionMaxMap[props.breakpoint], ")")); } var collapsed; if ('collapsed' in props) { collapsed = props.collapsed; } else { collapsed = props.defaultCollapsed; } _this.state = { collapsed: collapsed, below: false }; return _this; } _createClass(InternalSider, [{ key: "componentDidMount", value: function componentDidMount() { if (this.mql) { this.mql.addListener(this.responsiveHandler); this.responsiveHandler(this.mql); } if (this.props.siderHook) { this.props.siderHook.addSider(this.uniqueId); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { if (this.mql) { this.mql.removeListener(this.responsiveHandler); } if (this.props.siderHook) { this.props.siderHook.removeSider(this.uniqueId); } } }, { key: "render", value: function render() { var collapsed = this.state.collapsed; var collapsedWidth = this.props.collapsedWidth; return React.createElement(SiderContext.Provider, { value: { siderCollapsed: collapsed, collapsedWidth: collapsedWidth } }, React.createElement(_configProvider.ConfigConsumer, null, this.renderSider)); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps) { if ('collapsed' in nextProps) { return { collapsed: nextProps.collapsed }; } return null; } }]); return InternalSider; }(React.Component); InternalSider.defaultProps = { collapsible: false, defaultCollapsed: false, reverseArrow: false, width: 200, collapsedWidth: 80, style: {}, theme: 'dark' }; (0, _reactLifecyclesCompat.polyfill)(InternalSider); // eslint-disable-next-line react/prefer-stateless-function var Sider = /*#__PURE__*/ function (_React$Component2) { _inherits(Sider, _React$Component2); function Sider() { _classCallCheck(this, Sider); return _possibleConstructorReturn(this, _getPrototypeOf(Sider).apply(this, arguments)); } _createClass(Sider, [{ key: "render", value: function render() { var _this2 = this; return React.createElement(_layout.LayoutContext.Consumer, null, function (context) { return React.createElement(InternalSider, _extends({}, context, _this2.props)); }); } }]); return Sider; }(React.Component); exports["default"] = Sider; //# sourceMappingURL=Sider.js.map /***/ }), /***/ 906: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _createReactContext = _interopRequireDefault(__webpack_require__(316)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var RowContext = (0, _createReactContext["default"])({}); var _default = RowContext; exports["default"] = _default; //# sourceMappingURL=RowContext.js.map /***/ }), /***/ 908: /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(319), isObject = __webpack_require__(170); /** `Object#toString` result references. */ var asyncTag = '[object AsyncFunction]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', proxyTag = '[object Proxy]'; /** * Checks if `value` is classified as a `Function` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); * // => true * * _.isFunction(/abc/); * // => false */ function isFunction(value) { if (!isObject(value)) { return false; } // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 9 which returns 'object' for typed arrays and other constructors. var tag = baseGetTag(value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } module.exports = isFunction; /***/ }), /***/ 909: /***/ (function(module, exports) { /** Used for built-in method references. */ var funcProto = Function.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** * Converts `func` to its source code. * * @private * @param {Function} func The function to convert. * @returns {string} Returns the source code. */ function toSource(func) { if (func != null) { try { return funcToString.call(func); } catch (e) {} try { return (func + ''); } catch (e) {} } return ''; } module.exports = toSource; /***/ }), /***/ 910: /***/ (function(module, exports, __webpack_require__) { var baseIsArguments = __webpack_require__(974), isObjectLike = __webpack_require__(320); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /** * Checks if `value` is likely an `arguments` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * * _.isArguments(function() { return arguments; }()); * // => true * * _.isArguments([1, 2, 3]); * // => false */ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); }; module.exports = isArguments; /***/ }), /***/ 911: /***/ (function(module, exports, __webpack_require__) { var castPath = __webpack_require__(884), toKey = __webpack_require__(882); /** * The base implementation of `_.get` without support for default values. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @returns {*} Returns the resolved value. */ function baseGet(object, path) { path = castPath(path, object); var index = 0, length = path.length; while (object != null && index < length) { object = object[toKey(path[index++])]; } return (index && index == length) ? object : undefined; } module.exports = baseGet; /***/ }), /***/ 914: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _objectWithoutProperties2 = __webpack_require__(75); var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); var _defineProperty2 = __webpack_require__(59); var _defineProperty3 = _interopRequireDefault(_defineProperty2); var _extends5 = __webpack_require__(18); var _extends6 = _interopRequireDefault(_extends5); var _toConsumableArray2 = __webpack_require__(1021); var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); var _react = __webpack_require__(0); var _react2 = _interopRequireDefault(_react); var _createReactClass = __webpack_require__(1022); var _createReactClass2 = _interopRequireDefault(_createReactClass); var _unsafeLifecyclesPolyfill = __webpack_require__(1034); var _unsafeLifecyclesPolyfill2 = _interopRequireDefault(_unsafeLifecyclesPolyfill); var _asyncValidator = __webpack_require__(1035); var _asyncValidator2 = _interopRequireDefault(_asyncValidator); var _warning = __webpack_require__(323); var _warning2 = _interopRequireDefault(_warning); var _get = __webpack_require__(923); var _get2 = _interopRequireDefault(_get); var _set = __webpack_require__(916); var _set2 = _interopRequireDefault(_set); var _eq = __webpack_require__(883); var _eq2 = _interopRequireDefault(_eq); var _createFieldsStore = __webpack_require__(1061); var _createFieldsStore2 = _interopRequireDefault(_createFieldsStore); var _utils = __webpack_require__(891); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /* eslint-disable react/prefer-es6-class */ /* eslint-disable prefer-promise-reject-errors */ var DEFAULT_TRIGGER = 'onChange'; function createBaseForm() { var option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var mixins = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; var validateMessages = option.validateMessages, onFieldsChange = option.onFieldsChange, onValuesChange = option.onValuesChange, _option$mapProps = option.mapProps, mapProps = _option$mapProps === undefined ? _utils.identity : _option$mapProps, mapPropsToFields = option.mapPropsToFields, fieldNameProp = option.fieldNameProp, fieldMetaProp = option.fieldMetaProp, fieldDataProp = option.fieldDataProp, _option$formPropName = option.formPropName, formPropName = _option$formPropName === undefined ? 'form' : _option$formPropName, formName = option.name, withRef = option.withRef; return function decorate(WrappedComponent) { var Form = (0, _createReactClass2['default'])({ displayName: 'Form', mixins: mixins, getInitialState: function getInitialState() { var _this = this; var fields = mapPropsToFields && mapPropsToFields(this.props); this.fieldsStore = (0, _createFieldsStore2['default'])(fields || {}); this.instances = {}; this.cachedBind = {}; this.clearedFieldMetaCache = {}; this.renderFields = {}; this.domFields = {}; // HACK: https://github.com/ant-design/ant-design/issues/6406 ['getFieldsValue', 'getFieldValue', 'setFieldsInitialValue', 'getFieldsError', 'getFieldError', 'isFieldValidating', 'isFieldsValidating', 'isFieldsTouched', 'isFieldTouched'].forEach(function (key) { _this[key] = function () { var _fieldsStore; if (false) { (0, _warning2['default'])(false, 'you should not use `ref` on enhanced form, please use `wrappedComponentRef`. ' + 'See: https://github.com/react-component/form#note-use-wrappedcomponentref-instead-of-withref-after-rc-form140'); } return (_fieldsStore = _this.fieldsStore)[key].apply(_fieldsStore, arguments); }; }); return { submitting: false }; }, componentDidMount: function componentDidMount() { this.cleanUpUselessFields(); }, componentWillReceiveProps: function componentWillReceiveProps(nextProps) { if (mapPropsToFields) { this.fieldsStore.updateFields(mapPropsToFields(nextProps)); } }, componentDidUpdate: function componentDidUpdate() { this.cleanUpUselessFields(); }, onCollectCommon: function onCollectCommon(name, action, args) { var fieldMeta = this.fieldsStore.getFieldMeta(name); if (fieldMeta[action]) { fieldMeta[action].apply(fieldMeta, (0, _toConsumableArray3['default'])(args)); } else if (fieldMeta.originalProps && fieldMeta.originalProps[action]) { var _fieldMeta$originalPr; (_fieldMeta$originalPr = fieldMeta.originalProps)[action].apply(_fieldMeta$originalPr, (0, _toConsumableArray3['default'])(args)); } var value = fieldMeta.getValueFromEvent ? fieldMeta.getValueFromEvent.apply(fieldMeta, (0, _toConsumableArray3['default'])(args)) : _utils.getValueFromEvent.apply(undefined, (0, _toConsumableArray3['default'])(args)); if (onValuesChange && value !== this.fieldsStore.getFieldValue(name)) { var valuesAll = this.fieldsStore.getAllValues(); var valuesAllSet = {}; valuesAll[name] = value; Object.keys(valuesAll).forEach(function (key) { return (0, _set2['default'])(valuesAllSet, key, valuesAll[key]); }); onValuesChange((0, _extends6['default'])((0, _defineProperty3['default'])({}, formPropName, this.getForm()), this.props), (0, _set2['default'])({}, name, value), valuesAllSet); } var field = this.fieldsStore.getField(name); return { name: name, field: (0, _extends6['default'])({}, field, { value: value, touched: true }), fieldMeta: fieldMeta }; }, onCollect: function onCollect(name_, action) { for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { args[_key - 2] = arguments[_key]; } var _onCollectCommon = this.onCollectCommon(name_, action, args), name = _onCollectCommon.name, field = _onCollectCommon.field, fieldMeta = _onCollectCommon.fieldMeta; var validate = fieldMeta.validate; this.fieldsStore.setFieldsAsDirty(); var newField = (0, _extends6['default'])({}, field, { dirty: (0, _utils.hasRules)(validate) }); this.setFields((0, _defineProperty3['default'])({}, name, newField)); }, onCollectValidate: function onCollectValidate(name_, action) { for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { args[_key2 - 2] = arguments[_key2]; } var _onCollectCommon2 = this.onCollectCommon(name_, action, args), field = _onCollectCommon2.field, fieldMeta = _onCollectCommon2.fieldMeta; var newField = (0, _extends6['default'])({}, field, { dirty: true }); this.fieldsStore.setFieldsAsDirty(); this.validateFieldsInternal([newField], { action: action, options: { firstFields: !!fieldMeta.validateFirst } }); }, getCacheBind: function getCacheBind(name, action, fn) { if (!this.cachedBind[name]) { this.cachedBind[name] = {}; } var cache = this.cachedBind[name]; if (!cache[action] || cache[action].oriFn !== fn) { cache[action] = { fn: fn.bind(this, name, action), oriFn: fn }; } return cache[action].fn; }, getFieldDecorator: function getFieldDecorator(name, fieldOption) { var _this2 = this; var props = this.getFieldProps(name, fieldOption); return function (fieldElem) { // We should put field in record if it is rendered _this2.renderFields[name] = true; var fieldMeta = _this2.fieldsStore.getFieldMeta(name); var originalProps = fieldElem.props; if (false) { var valuePropName = fieldMeta.valuePropName; (0, _warning2['default'])(!(valuePropName in originalProps), '`getFieldDecorator` will override `' + valuePropName + '`, ' + ('so please don\'t set `' + valuePropName + '` directly ') + 'and use `setFieldsValue` to set it.'); var defaultValuePropName = 'default' + valuePropName[0].toUpperCase() + valuePropName.slice(1); (0, _warning2['default'])(!(defaultValuePropName in originalProps), '`' + defaultValuePropName + '` is invalid ' + ('for `getFieldDecorator` will set `' + valuePropName + '`,') + ' please use `option.initialValue` instead.'); } fieldMeta.originalProps = originalProps; fieldMeta.ref = fieldElem.ref; return _react2['default'].cloneElement(fieldElem, (0, _extends6['default'])({}, props, _this2.fieldsStore.getFieldValuePropValue(fieldMeta))); }; }, getFieldProps: function getFieldProps(name) { var _this3 = this; var usersFieldOption = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; if (!name) { throw new Error('Must call `getFieldProps` with valid name string!'); } if (false) { (0, _warning2['default'])(this.fieldsStore.isValidNestedFieldName(name), 'One field name cannot be part of another, e.g. `a` and `a.b`. Check field: ' + name); (0, _warning2['default'])(!('exclusive' in usersFieldOption), '`option.exclusive` of `getFieldProps`|`getFieldDecorator` had been remove.'); } delete this.clearedFieldMetaCache[name]; var fieldOption = (0, _extends6['default'])({ name: name, trigger: DEFAULT_TRIGGER, valuePropName: 'value', validate: [] }, usersFieldOption); var rules = fieldOption.rules, trigger = fieldOption.trigger, _fieldOption$validate = fieldOption.validateTrigger, validateTrigger = _fieldOption$validate === undefined ? trigger : _fieldOption$validate, validate = fieldOption.validate; var fieldMeta = this.fieldsStore.getFieldMeta(name); if ('initialValue' in fieldOption) { fieldMeta.initialValue = fieldOption.initialValue; } var inputProps = (0, _extends6['default'])({}, this.fieldsStore.getFieldValuePropValue(fieldOption), { ref: this.getCacheBind(name, name + '__ref', this.saveRef) }); if (fieldNameProp) { inputProps[fieldNameProp] = formName ? formName + '_' + name : name; } var validateRules = (0, _utils.normalizeValidateRules)(validate, rules, validateTrigger); var validateTriggers = (0, _utils.getValidateTriggers)(validateRules); validateTriggers.forEach(function (action) { if (inputProps[action]) return; inputProps[action] = _this3.getCacheBind(name, action, _this3.onCollectValidate); }); // make sure that the value will be collect if (trigger && validateTriggers.indexOf(trigger) === -1) { inputProps[trigger] = this.getCacheBind(name, trigger, this.onCollect); } var meta = (0, _extends6['default'])({}, fieldMeta, fieldOption, { validate: validateRules }); this.fieldsStore.setFieldMeta(name, meta); if (fieldMetaProp) { inputProps[fieldMetaProp] = meta; } if (fieldDataProp) { inputProps[fieldDataProp] = this.fieldsStore.getField(name); } // This field is rendered, record it this.renderFields[name] = true; return inputProps; }, getFieldInstance: function getFieldInstance(name) { return this.instances[name]; }, getRules: function getRules(fieldMeta, action) { var actionRules = fieldMeta.validate.filter(function (item) { return !action || item.trigger.indexOf(action) >= 0; }).map(function (item) { return item.rules; }); return (0, _utils.flattenArray)(actionRules); }, setFields: function setFields(maybeNestedFields, callback) { var _this4 = this; var fields = this.fieldsStore.flattenRegisteredFields(maybeNestedFields); this.fieldsStore.setFields(fields); if (onFieldsChange) { var changedFields = Object.keys(fields).reduce(function (acc, name) { return (0, _set2['default'])(acc, name, _this4.fieldsStore.getField(name)); }, {}); onFieldsChange((0, _extends6['default'])((0, _defineProperty3['default'])({}, formPropName, this.getForm()), this.props), changedFields, this.fieldsStore.getNestedAllFields()); } this.forceUpdate(callback); }, setFieldsValue: function setFieldsValue(changedValues, callback) { var fieldsMeta = this.fieldsStore.fieldsMeta; var values = this.fieldsStore.flattenRegisteredFields(changedValues); var newFields = Object.keys(values).reduce(function (acc, name) { var isRegistered = fieldsMeta[name]; if (false) { (0, _warning2['default'])(isRegistered, 'Cannot use `setFieldsValue` until ' + 'you use `getFieldDecorator` or `getFieldProps` to register it.'); } if (isRegistered) { var value = values[name]; acc[name] = { value: value }; } return acc; }, {}); this.setFields(newFields, callback); if (onValuesChange) { var allValues = this.fieldsStore.getAllValues(); onValuesChange((0, _extends6['default'])((0, _defineProperty3['default'])({}, formPropName, this.getForm()), this.props), changedValues, allValues); } }, saveRef: function saveRef(name, _, component) { if (!component) { var _fieldMeta = this.fieldsStore.getFieldMeta(name); if (!_fieldMeta.preserve) { // after destroy, delete data this.clearedFieldMetaCache[name] = { field: this.fieldsStore.getField(name), meta: _fieldMeta }; this.clearField(name); } delete this.domFields[name]; return; } this.domFields[name] = true; this.recoverClearedField(name); var fieldMeta = this.fieldsStore.getFieldMeta(name); if (fieldMeta) { var ref = fieldMeta.ref; if (ref) { if (typeof ref === 'string') { throw new Error('can not set ref string for ' + name); } else if (typeof ref === 'function') { ref(component); } else if (Object.prototype.hasOwnProperty.call(ref, 'current')) { ref.current = component; } } } this.instances[name] = component; }, cleanUpUselessFields: function cleanUpUselessFields() { var _this5 = this; var fieldList = this.fieldsStore.getAllFieldsName(); var removedList = fieldList.filter(function (field) { var fieldMeta = _this5.fieldsStore.getFieldMeta(field); return !_this5.renderFields[field] && !_this5.domFields[field] && !fieldMeta.preserve; }); if (removedList.length) { removedList.forEach(this.clearField); } this.renderFields = {}; }, clearField: function clearField(name) { this.fieldsStore.clearField(name); delete this.instances[name]; delete this.cachedBind[name]; }, resetFields: function resetFields(ns) { var _this6 = this; var newFields = this.fieldsStore.resetFields(ns); if (Object.keys(newFields).length > 0) { this.setFields(newFields); } if (ns) { var names = Array.isArray(ns) ? ns : [ns]; names.forEach(function (name) { return delete _this6.clearedFieldMetaCache[name]; }); } else { this.clearedFieldMetaCache = {}; } }, recoverClearedField: function recoverClearedField(name) { if (this.clearedFieldMetaCache[name]) { this.fieldsStore.setFields((0, _defineProperty3['default'])({}, name, this.clearedFieldMetaCache[name].field)); this.fieldsStore.setFieldMeta(name, this.clearedFieldMetaCache[name].meta); delete this.clearedFieldMetaCache[name]; } }, validateFieldsInternal: function validateFieldsInternal(fields, _ref, callback) { var _this7 = this; var fieldNames = _ref.fieldNames, action = _ref.action, _ref$options = _ref.options, options = _ref$options === undefined ? {} : _ref$options; var allRules = {}; var allValues = {}; var allFields = {}; var alreadyErrors = {}; fields.forEach(function (field) { var name = field.name; if (options.force !== true && field.dirty === false) { if (field.errors) { (0, _set2['default'])(alreadyErrors, name, { errors: field.errors }); } return; } var fieldMeta = _this7.fieldsStore.getFieldMeta(name); var newField = (0, _extends6['default'])({}, field); newField.errors = undefined; newField.validating = true; newField.dirty = true; allRules[name] = _this7.getRules(fieldMeta, action); allValues[name] = newField.value; allFields[name] = newField; }); this.setFields(allFields); // in case normalize Object.keys(allValues).forEach(function (f) { allValues[f] = _this7.fieldsStore.getFieldValue(f); }); if (callback && (0, _utils.isEmptyObject)(allFields)) { callback((0, _utils.isEmptyObject)(alreadyErrors) ? null : alreadyErrors, this.fieldsStore.getFieldsValue(fieldNames)); return; } var validator = new _asyncValidator2['default'](allRules); if (validateMessages) { validator.messages(validateMessages); } validator.validate(allValues, options, function (errors) { var errorsGroup = (0, _extends6['default'])({}, alreadyErrors); if (errors && errors.length) { errors.forEach(function (e) { var errorFieldName = e.field; var fieldName = errorFieldName; // Handle using array validation rule. // ref: https://github.com/ant-design/ant-design/issues/14275 Object.keys(allRules).some(function (ruleFieldName) { var rules = allRules[ruleFieldName] || []; // Exist if match rule if (ruleFieldName === errorFieldName) { fieldName = ruleFieldName; return true; } // Skip if not match array type if (rules.every(function (_ref2) { var type = _ref2.type; return type !== 'array'; }) || errorFieldName.indexOf(ruleFieldName + '.') !== 0) { return false; } // Exist if match the field name var restPath = errorFieldName.slice(ruleFieldName.length + 1); if (/^\d+$/.test(restPath)) { fieldName = ruleFieldName; return true; } return false; }); var field = (0, _get2['default'])(errorsGroup, fieldName); if (typeof field !== 'object' || Array.isArray(field)) { (0, _set2['default'])(errorsGroup, fieldName, { errors: [] }); } var fieldErrors = (0, _get2['default'])(errorsGroup, fieldName.concat('.errors')); fieldErrors.push(e); }); } var expired = []; var nowAllFields = {}; Object.keys(allRules).forEach(function (name) { var fieldErrors = (0, _get2['default'])(errorsGroup, name); var nowField = _this7.fieldsStore.getField(name); // avoid concurrency problems if (!(0, _eq2['default'])(nowField.value, allValues[name])) { expired.push({ name: name }); } else { nowField.errors = fieldErrors && fieldErrors.errors; nowField.value = allValues[name]; nowField.validating = false; nowField.dirty = false; nowAllFields[name] = nowField; } }); _this7.setFields(nowAllFields); if (callback) { if (expired.length) { expired.forEach(function (_ref3) { var name = _ref3.name; var fieldErrors = [{ message: name + ' need to revalidate', field: name }]; (0, _set2['default'])(errorsGroup, name, { expired: true, errors: fieldErrors }); }); } callback((0, _utils.isEmptyObject)(errorsGroup) ? null : errorsGroup, _this7.fieldsStore.getFieldsValue(fieldNames)); } }); }, validateFields: function validateFields(ns, opt, cb) { var _this8 = this; var pending = new Promise(function (resolve, reject) { var _getParams = (0, _utils.getParams)(ns, opt, cb), names = _getParams.names, options = _getParams.options; var _getParams2 = (0, _utils.getParams)(ns, opt, cb), callback = _getParams2.callback; if (!callback || typeof callback === 'function') { var oldCb = callback; callback = function callback(errors, values) { if (oldCb) { oldCb(errors, values); } if (errors) { reject({ errors: errors, values: values }); } else { resolve(values); } }; } var fieldNames = names ? _this8.fieldsStore.getValidFieldsFullName(names) : _this8.fieldsStore.getValidFieldsName(); var fields = fieldNames.filter(function (name) { var fieldMeta = _this8.fieldsStore.getFieldMeta(name); return (0, _utils.hasRules)(fieldMeta.validate); }).map(function (name) { var field = _this8.fieldsStore.getField(name); field.value = _this8.fieldsStore.getFieldValue(name); return field; }); if (!fields.length) { callback(null, _this8.fieldsStore.getFieldsValue(fieldNames)); return; } if (!('firstFields' in options)) { options.firstFields = fieldNames.filter(function (name) { var fieldMeta = _this8.fieldsStore.getFieldMeta(name); return !!fieldMeta.validateFirst; }); } _this8.validateFieldsInternal(fields, { fieldNames: fieldNames, options: options }, callback); }); pending['catch'](function (e) { // eslint-disable-next-line no-console if (console.error && "production" !== 'production') { // eslint-disable-next-line no-console console.error(e); } return e; }); return pending; }, isSubmitting: function isSubmitting() { if (false) { (0, _warning2['default'])(false, '`isSubmitting` is deprecated. ' + "Actually, it's more convenient to handle submitting status by yourself."); } return this.state.submitting; }, submit: function submit(callback) { var _this9 = this; if (false) { (0, _warning2['default'])(false, '`submit` is deprecated. ' + "Actually, it's more convenient to handle submitting status by yourself."); } var fn = function fn() { _this9.setState({ submitting: false }); }; this.setState({ submitting: true }); callback(fn); }, render: function render() { var _props = this.props, wrappedComponentRef = _props.wrappedComponentRef, restProps = (0, _objectWithoutProperties3['default'])(_props, ['wrappedComponentRef']); // eslint-disable-line var formProps = (0, _defineProperty3['default'])({}, formPropName, this.getForm()); if (withRef) { if (false) { (0, _warning2['default'])(false, '`withRef` is deprecated, please use `wrappedComponentRef` instead. ' + 'See: https://github.com/react-component/form#note-use-wrappedcomponentref-instead-of-withref-after-rc-form140'); } formProps.ref = 'wrappedComponent'; } else if (wrappedComponentRef) { formProps.ref = wrappedComponentRef; } var props = mapProps.call(this, (0, _extends6['default'])({}, formProps, restProps)); return _react2['default'].createElement(WrappedComponent, props); } }); return (0, _utils.argumentContainer)((0, _unsafeLifecyclesPolyfill2['default'])(Form), WrappedComponent); }; } exports['default'] = createBaseForm; module.exports = exports['default']; /***/ }), /***/ 915: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _util = __webpack_require__(874); var util = _interopRequireWildcard(_util); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } /** * Rule for validating required fields. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param source The source object being validated. * @param errors An array of errors that this rule may add * validation errors to. * @param options The validation options. * @param options.messages The validation messages. */ function required(rule, value, source, errors, options, type) { if (rule.required && (!source.hasOwnProperty(rule.field) || util.isEmptyValue(value, type || rule.type))) { errors.push(util.format(options.messages.required, rule.fullField)); } } exports['default'] = required; /***/ }), /***/ 916: /***/ (function(module, exports, __webpack_require__) { var baseSet = __webpack_require__(1057); /** * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, * it's created. Arrays are created for missing index properties while objects * are created for all other missing properties. Use `_.setWith` to customize * `path` creation. * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 3.7.0 * @category Object * @param {Object} object The object to modify. * @param {Array|string} path The path of the property to set. * @param {*} value The value to set. * @returns {Object} Returns `object`. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * * _.set(object, 'a[0].b.c', 4); * console.log(object.a[0].b.c); * // => 4 * * _.set(object, ['x', '0', 'y', 'z'], 5); * console.log(object.x[0].y.z); * // => 5 */ function set(object, path, value) { return object == null ? object : baseSet(object, path, value); } module.exports = set; /***/ }), /***/ 917: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = __webpack_require__(18); var _extends3 = _interopRequireDefault(_extends2); var _classCallCheck2 = __webpack_require__(9); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); exports.isFormField = isFormField; exports["default"] = createFormField; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var Field = function Field(fields) { (0, _classCallCheck3["default"])(this, Field); (0, _extends3["default"])(this, fields); }; function isFormField(obj) { return obj instanceof Field; } function createFormField(field) { if (isFormField(field)) { return field; } return new Field(field); } /***/ }), /***/ 918: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FIELD_DATA_PROP = exports.FIELD_META_PROP = void 0; var FIELD_META_PROP = 'data-__meta'; exports.FIELD_META_PROP = FIELD_META_PROP; var FIELD_DATA_PROP = 'data-__field'; exports.FIELD_DATA_PROP = FIELD_DATA_PROP; //# sourceMappingURL=constants.js.map /***/ }), /***/ 919: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _createReactContext = _interopRequireDefault(__webpack_require__(316)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var FormContext = (0, _createReactContext["default"])({ labelAlign: 'right', vertical: false }); var _default = FormContext; exports["default"] = _default; //# sourceMappingURL=context.js.map /***/ }), /***/ 920: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validProgress = validProgress; // eslint-disable-next-line import/prefer-default-export function validProgress(progress) { if (!progress || progress < 0) { return 0; } if (progress > 100) { return 100; } return progress; } //# sourceMappingURL=utils.js.map /***/ }), /***/ 921: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _rcDropdown = _interopRequireDefault(__webpack_require__(1067)); var _classnames = _interopRequireDefault(__webpack_require__(3)); var _configProvider = __webpack_require__(12); var _warning = _interopRequireDefault(__webpack_require__(40)); var _icon = _interopRequireDefault(__webpack_require__(26)); var _type = __webpack_require__(70); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 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); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var Placements = (0, _type.tuple)('topLeft', 'topCenter', 'topRight', 'bottomLeft', 'bottomCenter', 'bottomRight'); var Dropdown = /*#__PURE__*/ function (_React$Component) { _inherits(Dropdown, _React$Component); function Dropdown() { var _this; _classCallCheck(this, Dropdown); _this = _possibleConstructorReturn(this, _getPrototypeOf(Dropdown).apply(this, arguments)); _this.renderOverlay = function (prefixCls) { // rc-dropdown already can process the function of overlay, but we have check logic here. // So we need render the element to check and pass back to rc-dropdown. var overlay = _this.props.overlay; var overlayNode; if (typeof overlay === 'function') { overlayNode = overlay(); } else { overlayNode = overlay; } overlayNode = React.Children.only(overlayNode); var overlayProps = overlayNode.props; // Warning if use other mode (0, _warning["default"])(!overlayProps.mode || overlayProps.mode === 'vertical', 'Dropdown', "mode=\"".concat(overlayProps.mode, "\" is not supported for Dropdown's Menu.")); // menu cannot be selectable in dropdown defaultly // menu should be focusable in dropdown defaultly var _overlayProps$selecta = overlayProps.selectable, selectable = _overlayProps$selecta === void 0 ? false : _overlayProps$selecta, _overlayProps$focusab = overlayProps.focusable, focusable = _overlayProps$focusab === void 0 ? true : _overlayProps$focusab; var expandIcon = React.createElement("span", { className: "".concat(prefixCls, "-menu-submenu-arrow") }, React.createElement(_icon["default"], { type: "right", className: "".concat(prefixCls, "-menu-submenu-arrow-icon") })); var fixedModeOverlay = typeof overlayNode.type === 'string' ? overlay : React.cloneElement(overlayNode, { mode: 'vertical', selectable: selectable, focusable: focusable, expandIcon: expandIcon }); return fixedModeOverlay; }; _this.renderDropDown = function (_ref) { var getContextPopupContainer = _ref.getPopupContainer, getPrefixCls = _ref.getPrefixCls; var _this$props = _this.props, customizePrefixCls = _this$props.prefixCls, children = _this$props.children, trigger = _this$props.trigger, disabled = _this$props.disabled, getPopupContainer = _this$props.getPopupContainer; var prefixCls = getPrefixCls('dropdown', customizePrefixCls); var child = React.Children.only(children); var dropdownTrigger = React.cloneElement(child, { className: (0, _classnames["default"])(child.props.className, "".concat(prefixCls, "-trigger")), disabled: disabled }); var triggerActions = disabled ? [] : trigger; var alignPoint; if (triggerActions && triggerActions.indexOf('contextMenu') !== -1) { alignPoint = true; } return React.createElement(_rcDropdown["default"], _extends({ alignPoint: alignPoint }, _this.props, { prefixCls: prefixCls, getPopupContainer: getPopupContainer || getContextPopupContainer, transitionName: _this.getTransitionName(), trigger: triggerActions, overlay: function overlay() { return _this.renderOverlay(prefixCls); } }), dropdownTrigger); }; return _this; } _createClass(Dropdown, [{ key: "getTransitionName", value: function getTransitionName() { var _this$props2 = this.props, _this$props2$placemen = _this$props2.placement, placement = _this$props2$placemen === void 0 ? '' : _this$props2$placemen, transitionName = _this$props2.transitionName; if (transitionName !== undefined) { return transitionName; } if (placement.indexOf('top') >= 0) { return 'slide-down'; } return 'slide-up'; } }, { key: "render", value: function render() { return React.createElement(_configProvider.ConfigConsumer, null, this.renderDropDown); } }]); return Dropdown; }(React.Component); exports["default"] = Dropdown; Dropdown.defaultProps = { mouseEnterDelay: 0.15, mouseLeaveDelay: 0.1, placement: 'bottomLeft' }; //# sourceMappingURL=dropdown.js.map /***/ }), /***/ 922: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _rcMenu = _interopRequireWildcard(__webpack_require__(172)); var _classnames = _interopRequireDefault(__webpack_require__(3)); var _omit = _interopRequireDefault(__webpack_require__(43)); var _reactLifecyclesCompat = __webpack_require__(7); var _SubMenu = _interopRequireDefault(__webpack_require__(1001)); var _MenuItem = _interopRequireDefault(__webpack_require__(1002)); var _configProvider = __webpack_require__(12); var _warning = _interopRequireDefault(__webpack_require__(40)); var _Sider = __webpack_require__(905); var _raf = _interopRequireDefault(__webpack_require__(182)); var _motion = _interopRequireDefault(__webpack_require__(983)); var _MenuContext = _interopRequireDefault(__webpack_require__(889)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _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); } 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; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } 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); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var InternalMenu = /*#__PURE__*/ function (_React$Component) { _inherits(InternalMenu, _React$Component); function InternalMenu(props) { var _this; _classCallCheck(this, InternalMenu); _this = _possibleConstructorReturn(this, _getPrototypeOf(InternalMenu).call(this, props)); // Restore vertical mode when menu is collapsed responsively when mounted // https://github.com/ant-design/ant-design/issues/13104 // TODO: not a perfect solution, looking a new way to avoid setting switchingModeFromInline in this situation _this.handleMouseEnter = function (e) { _this.restoreModeVerticalFromInline(); var onMouseEnter = _this.props.onMouseEnter; if (onMouseEnter) { onMouseEnter(e); } }; _this.handleTransitionEnd = function (e) { // when inlineCollapsed menu width animation finished // https://github.com/ant-design/ant-design/issues/12864 var widthCollapsed = e.propertyName === 'width' && e.target === e.currentTarget; // Fix SVGElement e.target.className.indexOf is not a function // https://github.com/ant-design/ant-design/issues/15699 var className = e.target.className; // SVGAnimatedString.animVal should be identical to SVGAnimatedString.baseVal, unless during an animation. var classNameValue = Object.prototype.toString.call(className) === '[object SVGAnimatedString]' ? className.animVal : className; // Fix for , the width transition won't trigger when menu is collapsed // https://github.com/ant-design/ant-design-pro/issues/2783 var iconScaled = e.propertyName === 'font-size' && classNameValue.indexOf('anticon') >= 0; if (widthCollapsed || iconScaled) { _this.restoreModeVerticalFromInline(); } }; _this.handleClick = function (e) { _this.handleOpenChange([]); var onClick = _this.props.onClick; if (onClick) { onClick(e); } }; _this.handleOpenChange = function (openKeys) { _this.setOpenKeys(openKeys); var onOpenChange = _this.props.onOpenChange; if (onOpenChange) { onOpenChange(openKeys); } }; _this.renderMenu = function (_ref) { var getPopupContainer = _ref.getPopupContainer, getPrefixCls = _ref.getPrefixCls; var _this$props = _this.props, customizePrefixCls = _this$props.prefixCls, className = _this$props.className, theme = _this$props.theme, collapsedWidth = _this$props.collapsedWidth; var passProps = (0, _omit["default"])(_this.props, ['collapsedWidth', 'siderCollapsed']); var menuMode = _this.getRealMenuMode(); var menuOpenMotion = _this.getOpenMotionProps(menuMode); var prefixCls = getPrefixCls('menu', customizePrefixCls); var menuClassName = (0, _classnames["default"])(className, "".concat(prefixCls, "-").concat(theme), _defineProperty({}, "".concat(prefixCls, "-inline-collapsed"), _this.getInlineCollapsed())); var menuProps = _extends({ openKeys: _this.state.openKeys, onOpenChange: _this.handleOpenChange, className: menuClassName, mode: menuMode }, menuOpenMotion); if (menuMode !== 'inline') { // closing vertical popup submenu after click it menuProps.onClick = _this.handleClick; } // https://github.com/ant-design/ant-design/issues/8587 var hideMenu = _this.getInlineCollapsed() && (collapsedWidth === 0 || collapsedWidth === '0' || collapsedWidth === '0px'); if (hideMenu) { menuProps.openKeys = []; } return React.createElement(_rcMenu["default"], _extends({ getPopupContainer: getPopupContainer }, passProps, menuProps, { prefixCls: prefixCls, onTransitionEnd: _this.handleTransitionEnd, onMouseEnter: _this.handleMouseEnter })); }; (0, _warning["default"])(!('onOpen' in props || 'onClose' in props), 'Menu', '`onOpen` and `onClose` are removed, please use `onOpenChange` instead, ' + 'see: https://u.ant.design/menu-on-open-change.'); (0, _warning["default"])(!('inlineCollapsed' in props && props.mode !== 'inline'), 'Menu', '`inlineCollapsed` should only be used when `mode` is inline.'); (0, _warning["default"])(!(props.siderCollapsed !== undefined && 'inlineCollapsed' in props), 'Menu', '`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead.'); var openKeys; if ('openKeys' in props) { openKeys = props.openKeys; } else if ('defaultOpenKeys' in props) { openKeys = props.defaultOpenKeys; } _this.state = { openKeys: openKeys || [], switchingModeFromInline: false, inlineOpenKeys: [], prevProps: props }; return _this; } _createClass(InternalMenu, [{ key: "componentWillUnmount", value: function componentWillUnmount() { _raf["default"].cancel(this.mountRafId); } }, { key: "setOpenKeys", value: function setOpenKeys(openKeys) { if (!('openKeys' in this.props)) { this.setState({ openKeys: openKeys }); } } }, { key: "getRealMenuMode", value: function getRealMenuMode() { var inlineCollapsed = this.getInlineCollapsed(); if (this.state.switchingModeFromInline && inlineCollapsed) { return 'inline'; } var mode = this.props.mode; return inlineCollapsed ? 'vertical' : mode; } }, { key: "getInlineCollapsed", value: function getInlineCollapsed() { var inlineCollapsed = this.props.inlineCollapsed; if (this.props.siderCollapsed !== undefined) { return this.props.siderCollapsed; } return inlineCollapsed; } }, { key: "getOpenMotionProps", value: function getOpenMotionProps(menuMode) { var _this$props2 = this.props, openTransitionName = _this$props2.openTransitionName, openAnimation = _this$props2.openAnimation, motion = _this$props2.motion; // Provides by user if (motion) { return { motion: motion }; } if (openAnimation) { (0, _warning["default"])(typeof openAnimation === 'string', 'Menu', '`openAnimation` do not support object. Please use `motion` instead.'); return { openAnimation: openAnimation }; } if (openTransitionName) { return { openTransitionName: openTransitionName }; } // Default logic if (menuMode === 'horizontal') { return { motion: { motionName: 'slide-up' } }; } if (menuMode === 'inline') { return { motion: _motion["default"] }; } // When mode switch from inline // submenu should hide without animation return { motion: { motionName: this.state.switchingModeFromInline ? '' : 'zoom-big' } }; } }, { key: "restoreModeVerticalFromInline", value: function restoreModeVerticalFromInline() { var switchingModeFromInline = this.state.switchingModeFromInline; if (switchingModeFromInline) { this.setState({ switchingModeFromInline: false }); } } }, { key: "render", value: function render() { return React.createElement(_MenuContext["default"].Provider, { value: { inlineCollapsed: this.getInlineCollapsed() || false, antdMenuTheme: this.props.theme } }, React.createElement(_configProvider.ConfigConsumer, null, this.renderMenu)); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps, prevState) { var prevProps = prevState.prevProps; var newState = { prevProps: nextProps }; if (prevProps.mode === 'inline' && nextProps.mode !== 'inline') { newState.switchingModeFromInline = true; } if ('openKeys' in nextProps) { newState.openKeys = nextProps.openKeys; } else { // [Legacy] Old code will return after `openKeys` changed. // Not sure the reason, we should keep this logic still. if (nextProps.inlineCollapsed && !prevProps.inlineCollapsed || nextProps.siderCollapsed && !prevProps.siderCollapsed) { newState.switchingModeFromInline = true; newState.inlineOpenKeys = prevState.openKeys; newState.openKeys = []; } if (!nextProps.inlineCollapsed && prevProps.inlineCollapsed || !nextProps.siderCollapsed && prevProps.siderCollapsed) { newState.openKeys = prevState.inlineOpenKeys; newState.inlineOpenKeys = []; } } return newState; } }]); return InternalMenu; }(React.Component); InternalMenu.defaultProps = { className: '', theme: 'light', focusable: false }; (0, _reactLifecyclesCompat.polyfill)(InternalMenu); // We should keep this as ref-able var Menu = /*#__PURE__*/ function (_React$Component2) { _inherits(Menu, _React$Component2); function Menu() { _classCallCheck(this, Menu); return _possibleConstructorReturn(this, _getPrototypeOf(Menu).apply(this, arguments)); } _createClass(Menu, [{ key: "render", value: function render() { var _this2 = this; return React.createElement(_Sider.SiderContext.Consumer, null, function (context) { return React.createElement(InternalMenu, _extends({}, _this2.props, context)); }); } }]); return Menu; }(React.Component); exports["default"] = Menu; Menu.Divider = _rcMenu.Divider; Menu.Item = _MenuItem["default"]; Menu.SubMenu = _SubMenu["default"]; Menu.ItemGroup = _rcMenu.ItemGroup; //# sourceMappingURL=index.js.map /***/ }), /***/ 923: /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(911); /** * Gets the value at `path` of `object`. If the resolved value is * `undefined`, the `defaultValue` is returned in its place. * * @static * @memberOf _ * @since 3.7.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @param {*} [defaultValue] The value returned for `undefined` resolved values. * @returns {*} Returns the resolved value. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * * _.get(object, 'a[0].b.c'); * // => 3 * * _.get(object, ['a', '0', 'b', 'c']); * // => 3 * * _.get(object, 'a.b.c', 'default'); * // => 'default' */ function get(object, path, defaultValue) { var result = object == null ? undefined : baseGet(object, path); return result === undefined ? defaultValue : result; } module.exports = get; /***/ }), /***/ 924: /***/ (function(module, exports, __webpack_require__) { var castPath = __webpack_require__(884), isArguments = __webpack_require__(910), isArray = __webpack_require__(877), isIndex = __webpack_require__(890), isLength = __webpack_require__(895), toKey = __webpack_require__(882); /** * Checks if `path` exists on `object`. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @param {Function} hasFunc The function to check properties. * @returns {boolean} Returns `true` if `path` exists, else `false`. */ function hasPath(object, path, hasFunc) { path = castPath(path, object); var index = -1, length = path.length, result = false; while (++index < length) { var key = toKey(path[index]); if (!(result = object != null && hasFunc(object, key))) { break; } object = object[key]; } if (result || ++index != length) { return result; } length = object == null ? 0 : object.length; return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); } module.exports = hasPath; /***/ }), /***/ 925: /***/ (function(module, exports) { /** * Converts `set` to an array of its values. * * @private * @param {Object} set The set to convert. * @returns {Array} Returns the values. */ function setToArray(set) { var index = -1, result = Array(set.size); set.forEach(function(value) { result[++index] = value; }); return result; } module.exports = setToArray; /***/ }), /***/ 926: /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a