(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[131,6,8,10],{ /***/ "2U/9": /*!*******************************************************!*\ !*** ./node_modules/rc-steps/es/index.js + 2 modules ***! \*******************************************************/ /*! exports provided: Step, default */ /*! exports used: default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */ /*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // UNUSED EXPORTS: Step // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js var objectSpread2 = __webpack_require__("VTBJ"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js var defineProperty = __webpack_require__("rePB"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js var objectWithoutProperties = __webpack_require__("Ff2n"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js var classCallCheck = __webpack_require__("1OyB"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js var createClass = __webpack_require__("vuIU"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js var inherits = __webpack_require__("Ji7U"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 1 modules var createSuper = __webpack_require__("LK+K"); // EXTERNAL MODULE: external "window.React" var external_window_React_ = __webpack_require__("cDcd"); var external_window_React_default = /*#__PURE__*/__webpack_require__.n(external_window_React_); // EXTERNAL MODULE: ./node_modules/rc-util/es/Children/toArray.js var toArray = __webpack_require__("Zm9Q"); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__("TSYQ"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // CONCATENATED MODULE: ./node_modules/rc-steps/es/Step.js var _excluded = ["className", "prefixCls", "style", "active", "status", "iconPrefix", "icon", "wrapperStyle", "stepNumber", "disabled", "description", "title", "subTitle", "progressDot", "stepIcon", "tailContent", "icons", "stepIndex", "onStepClick", "onClick"]; /* eslint react/prop-types: 0 */ function isString(str) { return typeof str === 'string'; } var Step_Step = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(Step, _React$Component); var _super = Object(createSuper["a" /* default */])(Step); function Step() { var _this; Object(classCallCheck["a" /* default */])(this, Step); _this = _super.apply(this, arguments); _this.onClick = function () { var _this$props = _this.props, onClick = _this$props.onClick, onStepClick = _this$props.onStepClick, stepIndex = _this$props.stepIndex; if (onClick) { onClick.apply(void 0, arguments); } onStepClick(stepIndex); }; return _this; } Object(createClass["a" /* default */])(Step, [{ key: "renderIconNode", value: function renderIconNode() { var _classNames; var _this$props2 = this.props, prefixCls = _this$props2.prefixCls, progressDot = _this$props2.progressDot, stepIcon = _this$props2.stepIcon, stepNumber = _this$props2.stepNumber, status = _this$props2.status, title = _this$props2.title, description = _this$props2.description, icon = _this$props2.icon, iconPrefix = _this$props2.iconPrefix, icons = _this$props2.icons; var iconNode; var iconClassName = classnames_default()("".concat(prefixCls, "-icon"), "".concat(iconPrefix, "icon"), (_classNames = {}, Object(defineProperty["a" /* default */])(_classNames, "".concat(iconPrefix, "icon-").concat(icon), icon && isString(icon)), Object(defineProperty["a" /* default */])(_classNames, "".concat(iconPrefix, "icon-check"), !icon && status === 'finish' && (icons && !icons.finish || !icons)), Object(defineProperty["a" /* default */])(_classNames, "".concat(iconPrefix, "icon-cross"), !icon && status === 'error' && (icons && !icons.error || !icons)), _classNames)); var iconDot = /*#__PURE__*/external_window_React_["createElement"]("span", { className: "".concat(prefixCls, "-icon-dot") }); // `progressDot` enjoy the highest priority if (progressDot) { if (typeof progressDot === 'function') { iconNode = /*#__PURE__*/external_window_React_["createElement"]("span", { className: "".concat(prefixCls, "-icon") }, progressDot(iconDot, { index: stepNumber - 1, status: status, title: title, description: description })); } else { iconNode = /*#__PURE__*/external_window_React_["createElement"]("span", { className: "".concat(prefixCls, "-icon") }, iconDot); } } else if (icon && !isString(icon)) { iconNode = /*#__PURE__*/external_window_React_["createElement"]("span", { className: "".concat(prefixCls, "-icon") }, icon); } else if (icons && icons.finish && status === 'finish') { iconNode = /*#__PURE__*/external_window_React_["createElement"]("span", { className: "".concat(prefixCls, "-icon") }, icons.finish); } else if (icons && icons.error && status === 'error') { iconNode = /*#__PURE__*/external_window_React_["createElement"]("span", { className: "".concat(prefixCls, "-icon") }, icons.error); } else if (icon || status === 'finish' || status === 'error') { iconNode = /*#__PURE__*/external_window_React_["createElement"]("span", { className: iconClassName }); } else { iconNode = /*#__PURE__*/external_window_React_["createElement"]("span", { className: "".concat(prefixCls, "-icon") }, stepNumber); } if (stepIcon) { iconNode = stepIcon({ index: stepNumber - 1, status: status, title: title, description: description, node: iconNode }); } return iconNode; } }, { key: "render", value: function render() { var _classNames2; var _this$props3 = this.props, className = _this$props3.className, prefixCls = _this$props3.prefixCls, style = _this$props3.style, active = _this$props3.active, _this$props3$status = _this$props3.status, status = _this$props3$status === void 0 ? 'wait' : _this$props3$status, iconPrefix = _this$props3.iconPrefix, icon = _this$props3.icon, wrapperStyle = _this$props3.wrapperStyle, stepNumber = _this$props3.stepNumber, disabled = _this$props3.disabled, description = _this$props3.description, title = _this$props3.title, subTitle = _this$props3.subTitle, progressDot = _this$props3.progressDot, stepIcon = _this$props3.stepIcon, tailContent = _this$props3.tailContent, icons = _this$props3.icons, stepIndex = _this$props3.stepIndex, onStepClick = _this$props3.onStepClick, onClick = _this$props3.onClick, restProps = Object(objectWithoutProperties["a" /* default */])(_this$props3, _excluded); var classString = classnames_default()("".concat(prefixCls, "-item"), "".concat(prefixCls, "-item-").concat(status), className, (_classNames2 = {}, Object(defineProperty["a" /* default */])(_classNames2, "".concat(prefixCls, "-item-custom"), icon), Object(defineProperty["a" /* default */])(_classNames2, "".concat(prefixCls, "-item-active"), active), Object(defineProperty["a" /* default */])(_classNames2, "".concat(prefixCls, "-item-disabled"), disabled === true), _classNames2)); var stepItemStyle = Object(objectSpread2["a" /* default */])({}, style); var accessibilityProps = {}; if (onStepClick && !disabled) { accessibilityProps.role = 'button'; accessibilityProps.tabIndex = 0; accessibilityProps.onClick = this.onClick; } return /*#__PURE__*/external_window_React_["createElement"]("div", Object.assign({}, restProps, { className: classString, style: stepItemStyle }), /*#__PURE__*/external_window_React_["createElement"]("div", Object.assign({ onClick: onClick }, accessibilityProps, { className: "".concat(prefixCls, "-item-container") }), /*#__PURE__*/external_window_React_["createElement"]("div", { className: "".concat(prefixCls, "-item-tail") }, tailContent), /*#__PURE__*/external_window_React_["createElement"]("div", { className: "".concat(prefixCls, "-item-icon") }, this.renderIconNode()), /*#__PURE__*/external_window_React_["createElement"]("div", { className: "".concat(prefixCls, "-item-content") }, /*#__PURE__*/external_window_React_["createElement"]("div", { className: "".concat(prefixCls, "-item-title") }, title, subTitle && /*#__PURE__*/external_window_React_["createElement"]("div", { title: typeof subTitle === 'string' ? subTitle : undefined, className: "".concat(prefixCls, "-item-subtitle") }, subTitle)), description && /*#__PURE__*/external_window_React_["createElement"]("div", { className: "".concat(prefixCls, "-item-description") }, description)))); } }]); return Step; }(external_window_React_["Component"]); // CONCATENATED MODULE: ./node_modules/rc-steps/es/Steps.js var Steps_excluded = ["prefixCls", "style", "className", "children", "direction", "type", "labelPlacement", "iconPrefix", "status", "size", "current", "progressDot", "stepIcon", "initial", "icons", "onChange"]; /* eslint react/no-did-mount-set-state: 0, react/prop-types: 0 */ var Steps_Steps = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(Steps, _React$Component); var _super = Object(createSuper["a" /* default */])(Steps); function Steps() { var _this; Object(classCallCheck["a" /* default */])(this, Steps); _this = _super.apply(this, arguments); _this.onStepClick = function (next) { var _this$props = _this.props, onChange = _this$props.onChange, current = _this$props.current; if (onChange && current !== next) { onChange(next); } }; return _this; } Object(createClass["a" /* default */])(Steps, [{ key: "render", value: function render() { var _classNames, _this2 = this; var _this$props2 = this.props, prefixCls = _this$props2.prefixCls, _this$props2$style = _this$props2.style, style = _this$props2$style === void 0 ? {} : _this$props2$style, className = _this$props2.className, children = _this$props2.children, direction = _this$props2.direction, type = _this$props2.type, labelPlacement = _this$props2.labelPlacement, iconPrefix = _this$props2.iconPrefix, status = _this$props2.status, size = _this$props2.size, current = _this$props2.current, progressDot = _this$props2.progressDot, stepIcon = _this$props2.stepIcon, initial = _this$props2.initial, icons = _this$props2.icons, onChange = _this$props2.onChange, restProps = Object(objectWithoutProperties["a" /* default */])(_this$props2, Steps_excluded); var isNav = type === 'navigation'; var adjustedLabelPlacement = progressDot ? 'vertical' : labelPlacement; var classString = classnames_default()(prefixCls, "".concat(prefixCls, "-").concat(direction), className, (_classNames = {}, Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-").concat(size), size), Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-label-").concat(adjustedLabelPlacement), direction === 'horizontal'), Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-dot"), !!progressDot), Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-navigation"), isNav), _classNames)); return /*#__PURE__*/external_window_React_default.a.createElement("div", Object.assign({ className: classString, style: style }, restProps), Object(toArray["a" /* default */])(children).map(function (child, index) { var stepNumber = initial + index; var childProps = Object(objectSpread2["a" /* default */])({ stepNumber: "".concat(stepNumber + 1), stepIndex: stepNumber, key: stepNumber, prefixCls: prefixCls, iconPrefix: iconPrefix, wrapperStyle: style, progressDot: progressDot, stepIcon: stepIcon, icons: icons, onStepClick: onChange && _this2.onStepClick }, child.props); // fix tail color if (status === 'error' && index === current - 1) { childProps.className = "".concat(prefixCls, "-next-error"); } if (!child.props.status) { if (stepNumber === current) { childProps.status = status; } else if (stepNumber < current) { childProps.status = 'finish'; } else { childProps.status = 'wait'; } } childProps.active = stepNumber === current; return /*#__PURE__*/Object(external_window_React_["cloneElement"])(child, childProps); })); } }]); return Steps; }(external_window_React_default.a.Component); Steps_Steps.Step = Step_Step; Steps_Steps.defaultProps = { type: 'default', prefixCls: 'rc-steps', iconPrefix: 'rc', direction: 'horizontal', labelPlacement: 'horizontal', initial: 0, current: 0, status: 'process', size: '', progressDot: false }; // CONCATENATED MODULE: ./node_modules/rc-steps/es/index.js /* harmony default export */ var es = __webpack_exports__["a"] = (Steps_Steps); /***/ }), /***/ "5hVI": /*!************************************************************************!*\ !*** ./src/pages/Engineering/Lists/CurseSetting/index.tsx + 2 modules ***! \************************************************************************/ /*! exports provided: default */ /*! all exports used */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Engineering/Lists/CurseSetting/index.less?modules (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/umiExports.ts */ /*! ModuleConcatenation bailout: Cannot concat with ./src/components/NoData/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/components/PreviewAll/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Engineering/util.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */ /*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */ /*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Engineering/Lists/CurseSetting/tx.png (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/checkbox/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/checkbox/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/list/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/list/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/steps/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/steps/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/table/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/table/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tabs/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tabs/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/upload/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/upload/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/lodash.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router/esm/react-router.js */ /*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__("0Owb"); // EXTERNAL MODULE: ./node_modules/antd/es/row/style/index.js var style = __webpack_require__("14J3"); // EXTERNAL MODULE: ./node_modules/antd/es/row/index.js var row = __webpack_require__("BMrR"); // EXTERNAL MODULE: ./node_modules/antd/es/col/style/index.js var col_style = __webpack_require__("jCWc"); // EXTERNAL MODULE: ./node_modules/antd/es/col/index.js var col = __webpack_require__("kPKH"); // EXTERNAL MODULE: ./node_modules/antd/es/radio/style/index.js var radio_style = __webpack_require__("7Kak"); // EXTERNAL MODULE: ./node_modules/antd/es/radio/index.js + 4 modules var es_radio = __webpack_require__("9yH6"); // EXTERNAL MODULE: ./node_modules/antd/es/tabs/style/index.js var tabs_style = __webpack_require__("Znn+"); // EXTERNAL MODULE: ./node_modules/antd/es/tabs/index.js var tabs = __webpack_require__("ZTPi"); // EXTERNAL MODULE: ./node_modules/antd/es/input-number/style/index.js var input_number_style = __webpack_require__("giR+"); // EXTERNAL MODULE: ./node_modules/antd/es/input-number/index.js var input_number = __webpack_require__("fyUT"); // EXTERNAL MODULE: ./node_modules/antd/es/input/style/index.js var input_style = __webpack_require__("5NDa"); // EXTERNAL MODULE: ./node_modules/antd/es/input/index.js + 3 modules var input = __webpack_require__("5rEg"); // EXTERNAL MODULE: ./node_modules/antd/es/tooltip/style/index.js var tooltip_style = __webpack_require__("5Dmo"); // EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 1 modules var tooltip = __webpack_require__("3S7+"); // EXTERNAL MODULE: ./node_modules/antd/es/list/style/index.js var list_style = __webpack_require__("Mwp2"); // EXTERNAL MODULE: ./node_modules/antd/es/list/index.js + 1 modules var list = __webpack_require__("VXEj"); // EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules var toConsumableArray = __webpack_require__("oBTY"); // EXTERNAL MODULE: ./node_modules/antd/es/table/style/index.js var table_style = __webpack_require__("g9YV"); // EXTERNAL MODULE: ./node_modules/antd/es/table/index.js + 14 modules var table = __webpack_require__("wCAj"); // EXTERNAL MODULE: ./node_modules/antd/es/modal/style/index.js var modal_style = __webpack_require__("2qtc"); // EXTERNAL MODULE: ./node_modules/antd/es/modal/index.js + 7 modules var modal = __webpack_require__("kLXV"); // EXTERNAL MODULE: ./node_modules/antd/es/upload/style/index.js var upload_style = __webpack_require__("DZo9"); // EXTERNAL MODULE: ./node_modules/antd/es/upload/index.js + 4 modules var upload = __webpack_require__("8z0m"); // EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js var button_style = __webpack_require__("+L6B"); // EXTERNAL MODULE: ./node_modules/antd/es/button/index.js var es_button = __webpack_require__("2/Rp"); // EXTERNAL MODULE: ./node_modules/antd/es/select/style/index.js var select_style = __webpack_require__("OaEy"); // EXTERNAL MODULE: ./node_modules/antd/es/select/index.js var es_select = __webpack_require__("2fM7"); // EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js var objectSpread2 = __webpack_require__("k1fw"); // EXTERNAL MODULE: ./node_modules/antd/es/message/style/index.js var message_style = __webpack_require__("miYZ"); // EXTERNAL MODULE: ./node_modules/antd/es/message/index.js + 1 modules var message = __webpack_require__("tsqr"); // EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js var asyncToGenerator = __webpack_require__("9og8"); // EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules var slicedToArray = __webpack_require__("tJVT"); // EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js var regenerator = __webpack_require__("WmNS"); var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator); // EXTERNAL MODULE: external "window.React" var external_window_React_ = __webpack_require__("cDcd"); var external_window_React_default = /*#__PURE__*/__webpack_require__.n(external_window_React_); // EXTERNAL MODULE: ./src/pages/Engineering/Lists/CurseSetting/index.less?modules var CurseSettingmodules = __webpack_require__("Qfqc"); var CurseSettingmodules_default = /*#__PURE__*/__webpack_require__.n(CurseSettingmodules); // EXTERNAL MODULE: ./node_modules/react-router/esm/react-router.js var react_router = __webpack_require__("Ty5D"); // EXTERNAL MODULE: ./src/.umi-production/core/umiExports.ts + 17 modules var umiExports = __webpack_require__("9kvl"); // EXTERNAL MODULE: ./src/utils/fetch.ts var fetch = __webpack_require__("ErOA"); // EXTERNAL MODULE: ./src/utils/env.ts + 1 modules var env = __webpack_require__("m3rI"); // EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.js + 1 modules var ExclamationCircleOutlined = __webpack_require__("RCxd"); // EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx var PreviewAll = __webpack_require__("p5ED"); // EXTERNAL MODULE: ./node_modules/antd/es/steps/style/index.js var steps_style = __webpack_require__("FJo9"); // EXTERNAL MODULE: ./node_modules/antd/es/steps/index.js var steps = __webpack_require__("L41K"); // EXTERNAL MODULE: ./node_modules/antd/es/checkbox/style/index.js var checkbox_style = __webpack_require__("sRBo"); // EXTERNAL MODULE: ./node_modules/antd/es/checkbox/index.js + 2 modules var es_checkbox = __webpack_require__("kaz8"); // CONCATENATED MODULE: ./src/pages/Engineering/Lists/CurseSetting/AddCourseModal.tsx function Addmodal(_ref) { var _items$contents; var isshow = _ref.isshow, setishow = _ref.setishow, modalparams = _ref.modalparams, courseId = _ref.courseId, getcourse_evaluations = _ref.getcourse_evaluations, getevaluations = _ref.getevaluations, items = _ref.items; var initParams = { page: 1, per_page: 20, total: 0, name: '' }; var _useState = Object(external_window_React_["useState"])(0), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), current = _useState2[0], setcurrent = _useState2[1]; var _useState3 = Object(external_window_React_["useState"])(initParams), _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2), params = _useState4[0], setParams = _useState4[1]; var _useState5 = Object(external_window_React_["useState"])([]), _useState6 = Object(slicedToArray["a" /* default */])(_useState5, 2), datas = _useState6[0], setdatas = _useState6[1]; var _useState7 = Object(external_window_React_["useState"])(courseId ? items === null || items === void 0 ? void 0 : (_items$contents = items.contents) === null || _items$contents === void 0 ? void 0 : _items$contents.map(function (item) { return item.course_id; }) : []), _useState8 = Object(slicedToArray["a" /* default */])(_useState7, 2), selectIds = _useState8[0], setSelectIds = _useState8[1]; var _useState9 = Object(external_window_React_["useState"])([]), _useState10 = Object(slicedToArray["a" /* default */])(_useState9, 2), howorklist = _useState10[0], sethoworklist = _useState10[1]; var _useState11 = Object(external_window_React_["useState"])([]), _useState12 = Object(slicedToArray["a" /* default */])(_useState11, 2), howorkids = _useState12[0], sethoworkids = _useState12[1]; var _useState13 = Object(external_window_React_["useState"])('1'), _useState14 = Object(slicedToArray["a" /* default */])(_useState13, 2), activitykey = _useState14[0], setactitykey = _useState14[1]; var _useState15 = Object(external_window_React_["useState"])(false), _useState16 = Object(slicedToArray["a" /* default */])(_useState15, 2), isloading = _useState16[0], setisloading = _useState16[1]; Object(external_window_React_["useEffect"])(function () { if (isshow) { var _items$contents2; setSelectIds(courseId ? items === null || items === void 0 ? void 0 : (_items$contents2 = items.contents) === null || _items$contents2 === void 0 ? void 0 : _items$contents2.map(function (item) { return item.course_id; }) : []); getcourse(params); } }, [isshow]); function getcourse(_x) { return _getcourse.apply(this, arguments); } function _getcourse() { _getcourse = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee5(parasm) { var res; return regenerator_default.a.wrap(function _callee5$(_context5) { while (1) { switch (_context5.prev = _context5.next) { case 0: _context5.next = 2; return Object(fetch["a" /* default */])("/api/ec_courses/1/course_evaluations/search_courses.json", { method: 'get', params: parasm }); case 2: res = _context5.sent; if (res !== null && res !== void 0 && res.courses) { params.total = res === null || res === void 0 ? void 0 : res.count; setParams(Object(objectSpread2["a" /* default */])({}, params)); setdatas(res === null || res === void 0 ? void 0 : res.courses); } case 4: case "end": return _context5.stop(); } } }, _callee5); })); return _getcourse.apply(this, arguments); } var handleChangePage = function handleChangePage(param, per_page, sorter) { params.page = param === null || param === void 0 ? void 0 : param.current; params.per_page = param === null || param === void 0 ? void 0 : param.pageSize; if (sorter !== null && sorter !== void 0 && sorter.order) { params.sort_by = sorter === null || sorter === void 0 ? void 0 : sorter.field; params.direction = (sorter === null || sorter === void 0 ? void 0 : sorter.order) === 'ascend' ? 'asc' : 'desc'; } else { params.sort_by = null; params.direction = null; } setParams(Object(objectSpread2["a" /* default */])({}, params)); getcourse(params); }; var rowSelection = { selectedRowKeys: selectIds, columnWidth: 40, onChange: function onChange(k) { return setSelectIds(k); }, getCheckboxProps: function getCheckboxProps(r) { return { disabled: r.is_manager }; } }; var parser = function parser(v) { var num = v; num = isNaN(num) ? '' : num; if (num[0] === '.') { num = ''; } return num; }; var titletes = function titletes() { return /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { padding: '0 40px', color: '#464F66' } }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { marginBottom: 10 } }, "\u7EC4\u5408\u8BA1\u7B97\u8BF4\u660E\uFF1A"), /*#__PURE__*/external_window_React_default.a.createElement("div", null, "1.\u5F53\u9700\u8981\u5B8C\u6210\u540C\u4E00\u77E5\u8BC6\u70B9\u5B66\u4E60/\u80FD\u529B\u8BAD\u7EC3\u7684\u5B66\u751F\u5206\u6563\u5728\u591A\u4E2A\u6559\u5B66\u8BFE\u5802\uFF0C\u6216\u8005\u5206\u6563\u5728\u4E00\u4E2A\u8BFE\u5802\u4E0B\u7684\u591A\u4E2A\u5206\u73ED\u65F6\uFF0C\u9700\u8981\u8FDB\u884C\u201C\u7EC4\u5408\u8BA1\u7B97\u201D\u8BBE\u7F6E\uFF1B"), /*#__PURE__*/external_window_React_default.a.createElement("div", null, "2.\u5C06\u9700\u8981\u7EC4\u5408\u8BA1\u7B97\u7684\u8003\u6838\u5185\u5BB9\u8F93\u5165\u76F8\u540C\u7684\u3010\u6570\u5B57\u3011\u5373\u53EF\uFF0C\u5982\uFF1A\u201C\u81EA\u5B9A\u4E49\u51FD\u6570\u201D\u548C\u201C\u51FD\u6570\u201D\u9700\u8981\u7EC4\u5408\u8BA1\u7B97\u7684\u65F6\u5019\uFF0C\u5219\u9700\u8981\u5728\u8FD9\u4E24\u4E2A\u5B9E\u8BAD\u4F5C\u4E1A\u540E\u9762\u8F93\u5165\u76F8\u540C\u7684\u6570\u5B57\uFF1B"), /*#__PURE__*/external_window_React_default.a.createElement("div", null, "3.\u7EC4\u5408\u8BA1\u7B97\u65F6\uFF0C\u4F1A\u4EE5\u8BE5\u8BA4\u8BC1\u5C4A\u522B\u4E0B\u4E13\u4E1A\u8BA4\u8BC1\u7684\u5B66\u751F\u603B\u6570\u4E3A\u57FA\u51C6\u8BA1\u7B97\u5B9E\u8BAD\u4F5C\u4E1A\u5E73\u5747\u5206\u3002")); }; var shixuntable = function shixuntable(item) { var _item$courses2, _item$courses3, _item$courses4, _item$courses5, _item$courses6; return /*#__PURE__*/external_window_React_default.a.createElement("div", null, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { display: 'flex', height: '38px', background: '#F5F5F5', alignItems: 'center', textAlign: 'center', marginTop: '20px' } }, /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 93 } }, "\u8003\u6838\u65B9\u5F0F"), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 194 } }, "\u6559\u5B66\u8BFE\u5802"), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 324 } }, /*#__PURE__*/external_window_React_default.a.createElement(es_checkbox["a" /* default */], { checked: howorkids.length === (item === null || item === void 0 ? void 0 : item.shixun_count), onChange: function onChange(e) { var _item$courses; item === null || item === void 0 ? void 0 : (_item$courses = item.courses) === null || _item$courses === void 0 ? void 0 : _item$courses.map(function (items) { var _items$shixun_models; items === null || items === void 0 ? void 0 : (_items$shixun_models = items.shixun_models) === null || _items$shixun_models === void 0 ? void 0 : _items$shixun_models.map(function (jtems) { jtems.checked = e.target.checked; }); }); sethoworklist(Object(objectSpread2["a" /* default */])({}, item)); if (e.target.checked) { var _howorklist$courses; var aa = howorklist === null || howorklist === void 0 ? void 0 : (_howorklist$courses = howorklist.courses) === null || _howorklist$courses === void 0 ? void 0 : _howorklist$courses.map(function (item) { var _item$shixun_models; return item === null || item === void 0 ? void 0 : (_item$shixun_models = item.shixun_models) === null || _item$shixun_models === void 0 ? void 0 : _item$shixun_models.map(function (jtems) { return jtems; }); }); var bb = []; aa.map(function (item) { if (item.length > 0) { item === null || item === void 0 ? void 0 : item.map(function (jtem) { // console.log('----',jtem); bb.push(jtem); }); } }); sethoworkids([].concat(bb)); } else { sethoworkids([]); } } }), " \u8003\u6838\u5185\u5BB9"), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 277 } }, "\u5206\u73ED"), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 87 } }, "\u6EE1\u5206\u503C"), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 93 } }, "\u7EC4\u5408\u8BA1\u7B97")), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { display: 'flex', alignItems: 'center', textAlign: 'center', border: '1px solid #f0f0f0', maxHeight: '552px', overflow: 'auto' } }, /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 93 } }, item.name), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 194, maxHeight: '552px' } }, item === null || item === void 0 ? void 0 : (_item$courses2 = item.courses) === null || _item$courses2 === void 0 ? void 0 : _item$courses2.map(function (items) { var _items$shixun_models2, _items$shixun_models3, _items$shixun_models4, _items$shixun_models5; return /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: (items === null || items === void 0 ? void 0 : (_items$shixun_models2 = items.shixun_models) === null || _items$shixun_models2 === void 0 ? void 0 : _items$shixun_models2.length) === 0 ? 40 : (items === null || items === void 0 ? void 0 : (_items$shixun_models3 = items.shixun_models) === null || _items$shixun_models3 === void 0 ? void 0 : _items$shixun_models3.length) * 40, lineHeight: (items === null || items === void 0 ? void 0 : (_items$shixun_models4 = items.shixun_models) === null || _items$shixun_models4 === void 0 ? void 0 : _items$shixun_models4.length) === 0 ? 40 + 'px' : (items === null || items === void 0 ? void 0 : (_items$shixun_models5 = items.shixun_models) === null || _items$shixun_models5 === void 0 ? void 0 : _items$shixun_models5.length) * 40 + 'px' } }, items.name); })), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 324, maxHeight: '552px', textAlign: 'left' } }, /*#__PURE__*/external_window_React_default.a.createElement(es_checkbox["a" /* default */].Group, { onChange: function onChange(e) { var _howorklist$courses2; var aa = howorklist === null || howorklist === void 0 ? void 0 : (_howorklist$courses2 = howorklist.courses) === null || _howorklist$courses2 === void 0 ? void 0 : _howorklist$courses2.map(function (item) { var _item$shixun_models2; return item === null || item === void 0 ? void 0 : (_item$shixun_models2 = item.shixun_models) === null || _item$shixun_models2 === void 0 ? void 0 : _item$shixun_models2.map(function (jtems) { return jtems; }); }); var bb = []; aa.map(function (item) { if (item.length > 0) { item === null || item === void 0 ? void 0 : item.map(function (jtem) { // console.log('----',jtem); bb.push(jtem); }); } }); var res = bb.filter(function (item) { return e.includes(item.id); }); sethoworkids(res); }, style: { width: '100%' }, value: howorkids === null || howorkids === void 0 ? void 0 : howorkids.map(function (item) { return item === null || item === void 0 ? void 0 : item.id; }) }, item === null || item === void 0 ? void 0 : (_item$courses3 = item.courses) === null || _item$courses3 === void 0 ? void 0 : _item$courses3.map(function (items) { var _items$shixun_models6, _items$shixun_models7; return (items === null || items === void 0 ? void 0 : (_items$shixun_models6 = items.shixun_models) === null || _items$shixun_models6 === void 0 ? void 0 : _items$shixun_models6.length) === 0 ? /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, "--") : items === null || items === void 0 ? void 0 : (_items$shixun_models7 = items.shixun_models) === null || _items$shixun_models7 === void 0 ? void 0 : _items$shixun_models7.map(function (items) { return /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, /*#__PURE__*/external_window_React_default.a.createElement(es_checkbox["a" /* default */], { onChange: function onChange(e) { items.checked = e.target.checked; sethoworklist(Object(objectSpread2["a" /* default */])({}, item)); }, value: items === null || items === void 0 ? void 0 : items.id }, items.name)); }); }))), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 277, maxHeight: '552px' } }, item === null || item === void 0 ? void 0 : (_item$courses4 = item.courses) === null || _item$courses4 === void 0 ? void 0 : _item$courses4.map(function (items) { var _items$shixun_models8, _items$shixun_models9; return (items === null || items === void 0 ? void 0 : (_items$shixun_models8 = items.shixun_models) === null || _items$shixun_models8 === void 0 ? void 0 : _items$shixun_models8.length) === 0 ? /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, "--") : items === null || items === void 0 ? void 0 : (_items$shixun_models9 = items.shixun_models) === null || _items$shixun_models9 === void 0 ? void 0 : _items$shixun_models9.map(function (items) { return /*#__PURE__*/external_window_React_default.a.createElement(tooltip["a" /* default */], { title: items.groups }, /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, items.groups)); }); })), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 87, maxHeight: '552px' } }, item === null || item === void 0 ? void 0 : (_item$courses5 = item.courses) === null || _item$courses5 === void 0 ? void 0 : _item$courses5.map(function (items) { var _items$shixun_models10, _items$shixun_models11; return (items === null || items === void 0 ? void 0 : (_items$shixun_models10 = items.shixun_models) === null || _items$shixun_models10 === void 0 ? void 0 : _items$shixun_models10.length) === 0 ? /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, "--") : items === null || items === void 0 ? void 0 : (_items$shixun_models11 = items.shixun_models) === null || _items$shixun_models11 === void 0 ? void 0 : _items$shixun_models11.map(function (items) { return /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, items.total_score); }); })), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 93, maxHeight: '552px' } }, item === null || item === void 0 ? void 0 : (_item$courses6 = item.courses) === null || _item$courses6 === void 0 ? void 0 : _item$courses6.map(function (items) { var _items$shixun_models12, _items$shixun_models13; return (items === null || items === void 0 ? void 0 : (_items$shixun_models12 = items.shixun_models) === null || _items$shixun_models12 === void 0 ? void 0 : _items$shixun_models12.length) === 0 ? /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, /*#__PURE__*/external_window_React_default.a.createElement(input_number["a" /* default */], { disabled: true })) : items === null || items === void 0 ? void 0 : (_items$shixun_models13 = items.shixun_models) === null || _items$shixun_models13 === void 0 ? void 0 : _items$shixun_models13.map(function (items) { return /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, /*#__PURE__*/external_window_React_default.a.createElement(input_number["a" /* default */], { min: 1, step: 0.1, parser: parser, value: items === null || items === void 0 ? void 0 : items.position, onChange: function onChange(e) { items.position = e; sethoworklist(Object(objectSpread2["a" /* default */])({}, item)); } })); }); })))); }; var exercisetable = function exercisetable(item) { var _item$courses8, _item$courses9, _item$courses10, _item$courses11, _item$courses12; return /*#__PURE__*/external_window_React_default.a.createElement("div", null, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { display: 'flex', height: '38px', background: '#F5F5F5', alignItems: 'center', textAlign: 'center', marginTop: '20px' } }, /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 93 } }, "\u8003\u6838\u65B9\u5F0F"), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 194 } }, "\u6559\u5B66\u8BFE\u5802"), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 324 } }, /*#__PURE__*/external_window_React_default.a.createElement(es_checkbox["a" /* default */], { checked: howorkids.length === (item === null || item === void 0 ? void 0 : item.exercise_count), onChange: function onChange(e) { var _item$courses7; item === null || item === void 0 ? void 0 : (_item$courses7 = item.courses) === null || _item$courses7 === void 0 ? void 0 : _item$courses7.map(function (items) { var _items$exercise_model; items === null || items === void 0 ? void 0 : (_items$exercise_model = items.exercise_models) === null || _items$exercise_model === void 0 ? void 0 : _items$exercise_model.map(function (jtems) { jtems.checked = e.target.checked; }); }); sethoworklist(Object(objectSpread2["a" /* default */])({}, howorklist)); if (e.target.checked) { var _howorklist$courses3; var aa = howorklist === null || howorklist === void 0 ? void 0 : (_howorklist$courses3 = howorklist.courses) === null || _howorklist$courses3 === void 0 ? void 0 : _howorklist$courses3.map(function (item) { var _item$exercise_models; return item === null || item === void 0 ? void 0 : (_item$exercise_models = item.exercise_models) === null || _item$exercise_models === void 0 ? void 0 : _item$exercise_models.map(function (jtems) { return jtems; }); }); var bb = []; aa.map(function (item) { if (item.length > 0) { item === null || item === void 0 ? void 0 : item.map(function (jtem) { // console.log('----',jtem); bb.push(jtem); }); } }); sethoworkids([].concat(bb)); } else { sethoworkids([]); } } }), " \u8003\u6838\u5185\u5BB9"), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 277 } }, "\u5206\u73ED"), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 87 } }, "\u6EE1\u5206\u503C"), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 93 } }, "\u7EC4\u5408\u8BA1\u7B97")), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { display: 'flex', alignItems: 'center', textAlign: 'center', border: '1px solid #f0f0f0', maxHeight: '552px', overflow: 'auto' } }, /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 93 } }, item.name), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 194, maxHeight: '552px' } }, item === null || item === void 0 ? void 0 : (_item$courses8 = item.courses) === null || _item$courses8 === void 0 ? void 0 : _item$courses8.map(function (items) { var _items$exercise_model2, _items$exercise_model3, _items$exercise_model4, _items$exercise_model5; return /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: (items === null || items === void 0 ? void 0 : (_items$exercise_model2 = items.exercise_models) === null || _items$exercise_model2 === void 0 ? void 0 : _items$exercise_model2.length) === 0 ? 40 : (items === null || items === void 0 ? void 0 : (_items$exercise_model3 = items.exercise_models) === null || _items$exercise_model3 === void 0 ? void 0 : _items$exercise_model3.length) * 40, lineHeight: (items === null || items === void 0 ? void 0 : (_items$exercise_model4 = items.exercise_models) === null || _items$exercise_model4 === void 0 ? void 0 : _items$exercise_model4.length) === 0 ? 40 + 'px' : (items === null || items === void 0 ? void 0 : (_items$exercise_model5 = items.exercise_models) === null || _items$exercise_model5 === void 0 ? void 0 : _items$exercise_model5.length) * 40 + 'px' } }, items.name); })), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 324, maxHeight: '552px', textAlign: 'left' } }, /*#__PURE__*/external_window_React_default.a.createElement(es_checkbox["a" /* default */].Group, { onChange: function onChange(e) { var _howorklist$courses4; var aa = howorklist === null || howorklist === void 0 ? void 0 : (_howorklist$courses4 = howorklist.courses) === null || _howorklist$courses4 === void 0 ? void 0 : _howorklist$courses4.map(function (item) { var _item$exercise_models2; return item === null || item === void 0 ? void 0 : (_item$exercise_models2 = item.exercise_models) === null || _item$exercise_models2 === void 0 ? void 0 : _item$exercise_models2.map(function (jtems) { return jtems; }); }); var bb = []; aa.map(function (item) { if (item.length > 0) { item === null || item === void 0 ? void 0 : item.map(function (jtem) { // console.log('----',jtem); bb.push(jtem); }); } }); var res = bb.filter(function (item) { return e.includes(item.id); }); sethoworkids(res); }, style: { width: '100%' }, value: howorkids === null || howorkids === void 0 ? void 0 : howorkids.map(function (item) { return item === null || item === void 0 ? void 0 : item.id; }) }, item === null || item === void 0 ? void 0 : (_item$courses9 = item.courses) === null || _item$courses9 === void 0 ? void 0 : _item$courses9.map(function (items) { var _items$exercise_model6, _items$exercise_model7; return (items === null || items === void 0 ? void 0 : (_items$exercise_model6 = items.exercise_models) === null || _items$exercise_model6 === void 0 ? void 0 : _items$exercise_model6.length) === 0 ? /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, "--") : items === null || items === void 0 ? void 0 : (_items$exercise_model7 = items.exercise_models) === null || _items$exercise_model7 === void 0 ? void 0 : _items$exercise_model7.map(function (items) { return /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, /*#__PURE__*/external_window_React_default.a.createElement(es_checkbox["a" /* default */], { onChange: function onChange(e) { items.checked = e.target.checked; sethoworklist(Object(objectSpread2["a" /* default */])({}, item)); }, value: items === null || items === void 0 ? void 0 : items.id }, items.name)); }); }))), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 277, maxHeight: '552px' } }, item === null || item === void 0 ? void 0 : (_item$courses10 = item.courses) === null || _item$courses10 === void 0 ? void 0 : _item$courses10.map(function (items) { var _items$exercise_model8, _items$exercise_model9; return (items === null || items === void 0 ? void 0 : (_items$exercise_model8 = items.exercise_models) === null || _items$exercise_model8 === void 0 ? void 0 : _items$exercise_model8.length) === 0 ? /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, "--") : items === null || items === void 0 ? void 0 : (_items$exercise_model9 = items.exercise_models) === null || _items$exercise_model9 === void 0 ? void 0 : _items$exercise_model9.map(function (items) { return /*#__PURE__*/external_window_React_default.a.createElement(tooltip["a" /* default */], { title: items.groups }, /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, items.groups)); }); })), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 87, maxHeight: '552px' } }, item === null || item === void 0 ? void 0 : (_item$courses11 = item.courses) === null || _item$courses11 === void 0 ? void 0 : _item$courses11.map(function (items) { var _items$exercise_model10, _items$exercise_model11; return (items === null || items === void 0 ? void 0 : (_items$exercise_model10 = items.exercise_models) === null || _items$exercise_model10 === void 0 ? void 0 : _items$exercise_model10.length) === 0 ? /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, "--") : items === null || items === void 0 ? void 0 : (_items$exercise_model11 = items.exercise_models) === null || _items$exercise_model11 === void 0 ? void 0 : _items$exercise_model11.map(function (items) { return /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, items.total_score); }); })), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 93, maxHeight: '552px' } }, item === null || item === void 0 ? void 0 : (_item$courses12 = item.courses) === null || _item$courses12 === void 0 ? void 0 : _item$courses12.map(function (items) { var _items$exercise_model12, _items$exercise_model13; return (items === null || items === void 0 ? void 0 : (_items$exercise_model12 = items.exercise_models) === null || _items$exercise_model12 === void 0 ? void 0 : _items$exercise_model12.length) === 0 ? /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, /*#__PURE__*/external_window_React_default.a.createElement(input_number["a" /* default */], { disabled: true })) : items === null || items === void 0 ? void 0 : (_items$exercise_model13 = items.exercise_models) === null || _items$exercise_model13 === void 0 ? void 0 : _items$exercise_model13.map(function (items) { return /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, /*#__PURE__*/external_window_React_default.a.createElement(input_number["a" /* default */], { min: 1, step: 0.1, parser: parser, value: items === null || items === void 0 ? void 0 : items.position, onChange: function onChange(e) { items.position = e; sethoworklist(Object(objectSpread2["a" /* default */])({}, item)); } })); }); })))); }; var commontable = function commontable(item) { var _item$courses14, _item$courses15, _item$courses16, _item$courses17, _item$courses18; return /*#__PURE__*/external_window_React_default.a.createElement("div", null, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { display: 'flex', height: '38px', background: '#F5F5F5', alignItems: 'center', textAlign: 'center', marginTop: '20px' } }, /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 93 } }, "\u8003\u6838\u65B9\u5F0F"), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 194 } }, "\u6559\u5B66\u8BFE\u5802"), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 324 } }, /*#__PURE__*/external_window_React_default.a.createElement(es_checkbox["a" /* default */], { checked: howorkids.length === (item === null || item === void 0 ? void 0 : item.common_count), onChange: function onChange(e) { var _item$courses13; item === null || item === void 0 ? void 0 : (_item$courses13 = item.courses) === null || _item$courses13 === void 0 ? void 0 : _item$courses13.map(function (items) { var _items$common_models; items === null || items === void 0 ? void 0 : (_items$common_models = items.common_models) === null || _items$common_models === void 0 ? void 0 : _items$common_models.map(function (jtems) { jtems.checked = e.target.checked; }); }); sethoworklist(Object(objectSpread2["a" /* default */])({}, howorklist)); if (e.target.checked) { var _howorklist$courses5; var aa = howorklist === null || howorklist === void 0 ? void 0 : (_howorklist$courses5 = howorklist.courses) === null || _howorklist$courses5 === void 0 ? void 0 : _howorklist$courses5.map(function (item) { var _item$common_models; return item === null || item === void 0 ? void 0 : (_item$common_models = item.common_models) === null || _item$common_models === void 0 ? void 0 : _item$common_models.map(function (jtems) { return jtems; }); }); var bb = []; aa.map(function (item) { if (item.length > 0) { item === null || item === void 0 ? void 0 : item.map(function (jtem) { // console.log('----',jtem); bb.push(jtem); }); } }); sethoworkids([].concat(bb)); } else { sethoworkids([]); } } }), " \u8003\u6838\u5185\u5BB9"), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 277 } }, "\u5206\u73ED"), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 87 } }, "\u6EE1\u5206\u503C"), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 93 } }, "\u7EC4\u5408\u8BA1\u7B97")), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { display: 'flex', alignItems: 'center', textAlign: 'center', border: '1px solid #f0f0f0', maxHeight: '552px', overflow: 'auto' } }, /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 93 } }, item.name), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 194, maxHeight: '552px' } }, item === null || item === void 0 ? void 0 : (_item$courses14 = item.courses) === null || _item$courses14 === void 0 ? void 0 : _item$courses14.map(function (items) { var _items$common_models2, _items$common_models3, _items$common_models4, _items$common_models5; return /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: (items === null || items === void 0 ? void 0 : (_items$common_models2 = items.common_models) === null || _items$common_models2 === void 0 ? void 0 : _items$common_models2.length) === 0 ? 40 : (items === null || items === void 0 ? void 0 : (_items$common_models3 = items.common_models) === null || _items$common_models3 === void 0 ? void 0 : _items$common_models3.length) * 40, lineHeight: (items === null || items === void 0 ? void 0 : (_items$common_models4 = items.common_models) === null || _items$common_models4 === void 0 ? void 0 : _items$common_models4.length) === 0 ? 40 + 'px' : (items === null || items === void 0 ? void 0 : (_items$common_models5 = items.common_models) === null || _items$common_models5 === void 0 ? void 0 : _items$common_models5.length) * 40 + 'px' } }, items.name); })), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 324, maxHeight: '552px', textAlign: 'left' } }, /*#__PURE__*/external_window_React_default.a.createElement(es_checkbox["a" /* default */].Group, { onChange: function onChange(e) { var _howorklist$courses6; var aa = howorklist === null || howorklist === void 0 ? void 0 : (_howorklist$courses6 = howorklist.courses) === null || _howorklist$courses6 === void 0 ? void 0 : _howorklist$courses6.map(function (item) { var _item$common_models2; return item === null || item === void 0 ? void 0 : (_item$common_models2 = item.common_models) === null || _item$common_models2 === void 0 ? void 0 : _item$common_models2.map(function (jtems) { return jtems; }); }); var bb = []; aa.map(function (item) { if (item.length > 0) { item === null || item === void 0 ? void 0 : item.map(function (jtem) { // console.log('----',jtem); bb.push(jtem); }); } }); var res = bb.filter(function (item) { return e.includes(item.id); }); sethoworkids(res); }, style: { width: '100%' }, value: howorkids === null || howorkids === void 0 ? void 0 : howorkids.map(function (item) { return item === null || item === void 0 ? void 0 : item.id; }) }, item === null || item === void 0 ? void 0 : (_item$courses15 = item.courses) === null || _item$courses15 === void 0 ? void 0 : _item$courses15.map(function (items) { var _items$common_models6, _items$common_models7; return (items === null || items === void 0 ? void 0 : (_items$common_models6 = items.common_models) === null || _items$common_models6 === void 0 ? void 0 : _items$common_models6.length) === 0 ? /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, "--") : items === null || items === void 0 ? void 0 : (_items$common_models7 = items.common_models) === null || _items$common_models7 === void 0 ? void 0 : _items$common_models7.map(function (items) { return /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, /*#__PURE__*/external_window_React_default.a.createElement(es_checkbox["a" /* default */], { onChange: function onChange(e) { items.checked = e.target.checked; sethoworklist(Object(objectSpread2["a" /* default */])({}, item)); }, value: items === null || items === void 0 ? void 0 : items.id }, items.name)); }); }))), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 277, maxHeight: '552px' } }, item === null || item === void 0 ? void 0 : (_item$courses16 = item.courses) === null || _item$courses16 === void 0 ? void 0 : _item$courses16.map(function (items) { var _items$common_models8, _items$common_models9; return (items === null || items === void 0 ? void 0 : (_items$common_models8 = items.common_models) === null || _items$common_models8 === void 0 ? void 0 : _items$common_models8.length) === 0 ? /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, "--") : items === null || items === void 0 ? void 0 : (_items$common_models9 = items.common_models) === null || _items$common_models9 === void 0 ? void 0 : _items$common_models9.map(function (items) { return /*#__PURE__*/external_window_React_default.a.createElement(tooltip["a" /* default */], { title: items.groups }, /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, items.groups)); }); })), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 87, maxHeight: '552px' } }, item === null || item === void 0 ? void 0 : (_item$courses17 = item.courses) === null || _item$courses17 === void 0 ? void 0 : _item$courses17.map(function (items) { var _items$common_models10, _items$common_models11; return (items === null || items === void 0 ? void 0 : (_items$common_models10 = items.common_models) === null || _items$common_models10 === void 0 ? void 0 : _items$common_models10.length) === 0 ? /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, "--") : items === null || items === void 0 ? void 0 : (_items$common_models11 = items.common_models) === null || _items$common_models11 === void 0 ? void 0 : _items$common_models11.map(function (items) { return /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, items.total_score); }); })), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 93, maxHeight: '552px' } }, item === null || item === void 0 ? void 0 : (_item$courses18 = item.courses) === null || _item$courses18 === void 0 ? void 0 : _item$courses18.map(function (items) { var _items$common_models12, _items$common_models13; return (items === null || items === void 0 ? void 0 : (_items$common_models12 = items.common_models) === null || _items$common_models12 === void 0 ? void 0 : _items$common_models12.length) === 0 ? /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, /*#__PURE__*/external_window_React_default.a.createElement(input_number["a" /* default */], { disabled: true })) : items === null || items === void 0 ? void 0 : (_items$common_models13 = items.common_models) === null || _items$common_models13 === void 0 ? void 0 : _items$common_models13.map(function (items) { return /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, /*#__PURE__*/external_window_React_default.a.createElement(input_number["a" /* default */], { min: 1, step: 0.1, parser: parser, value: items === null || items === void 0 ? void 0 : items.position, onChange: function onChange(e) { items.position = e; sethoworklist(Object(objectSpread2["a" /* default */])({}, item)); } })); }); })))); }; var grouptable = function grouptable(item) { var _item$courses20, _item$courses21, _item$courses22, _item$courses23, _item$courses24; return /*#__PURE__*/external_window_React_default.a.createElement("div", null, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { display: 'flex', height: '38px', background: '#F5F5F5', alignItems: 'center', textAlign: 'center', marginTop: '20px' } }, /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 93 } }, "\u8003\u6838\u65B9\u5F0F"), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 194 } }, "\u6559\u5B66\u8BFE\u5802"), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 324 } }, /*#__PURE__*/external_window_React_default.a.createElement(es_checkbox["a" /* default */], { checked: howorkids.length === (item === null || item === void 0 ? void 0 : item.group_count), onChange: function onChange(e) { var _item$courses19; item === null || item === void 0 ? void 0 : (_item$courses19 = item.courses) === null || _item$courses19 === void 0 ? void 0 : _item$courses19.map(function (items) { var _items$group_models; items === null || items === void 0 ? void 0 : (_items$group_models = items.group_models) === null || _items$group_models === void 0 ? void 0 : _items$group_models.map(function (jtems) { jtems.checked = e.target.checked; }); }); sethoworklist(Object(objectSpread2["a" /* default */])({}, howorklist)); if (e.target.checked) { var _howorklist$courses7; var aa = howorklist === null || howorklist === void 0 ? void 0 : (_howorklist$courses7 = howorklist.courses) === null || _howorklist$courses7 === void 0 ? void 0 : _howorklist$courses7.map(function (item) { var _item$group_models; return item === null || item === void 0 ? void 0 : (_item$group_models = item.group_models) === null || _item$group_models === void 0 ? void 0 : _item$group_models.map(function (jtems) { return jtems; }); }); var bb = []; aa.map(function (item) { if (item.length > 0) { item === null || item === void 0 ? void 0 : item.map(function (jtem) { // console.log('----',jtem); bb.push(jtem); }); } }); sethoworkids([].concat(bb)); } else { sethoworkids([]); } } }), " \u8003\u6838\u5185\u5BB9"), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 277 } }, "\u5206\u73ED"), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 87 } }, "\u6EE1\u5206\u503C"), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 93 } }, "\u7EC4\u5408\u8BA1\u7B97")), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { display: 'flex', alignItems: 'center', textAlign: 'center', border: '1px solid #f0f0f0', maxHeight: '552px', overflow: 'auto' } }, /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 93 } }, item.name), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 194, maxHeight: '552px' } }, item === null || item === void 0 ? void 0 : (_item$courses20 = item.courses) === null || _item$courses20 === void 0 ? void 0 : _item$courses20.map(function (items) { var _items$group_models2, _items$group_models3, _items$group_models4, _items$group_models5; return /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: (items === null || items === void 0 ? void 0 : (_items$group_models2 = items.group_models) === null || _items$group_models2 === void 0 ? void 0 : _items$group_models2.length) === 0 ? 40 : (items === null || items === void 0 ? void 0 : (_items$group_models3 = items.group_models) === null || _items$group_models3 === void 0 ? void 0 : _items$group_models3.length) * 40, lineHeight: (items === null || items === void 0 ? void 0 : (_items$group_models4 = items.group_models) === null || _items$group_models4 === void 0 ? void 0 : _items$group_models4.length) === 0 ? 40 + 'px' : (items === null || items === void 0 ? void 0 : (_items$group_models5 = items.group_models) === null || _items$group_models5 === void 0 ? void 0 : _items$group_models5.length) * 40 + 'px' } }, items.name); })), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 324, maxHeight: '552px', textAlign: 'left' } }, /*#__PURE__*/external_window_React_default.a.createElement(es_checkbox["a" /* default */].Group, { onChange: function onChange(e) { var _howorklist$courses8; var aa = howorklist === null || howorklist === void 0 ? void 0 : (_howorklist$courses8 = howorklist.courses) === null || _howorklist$courses8 === void 0 ? void 0 : _howorklist$courses8.map(function (item) { var _item$group_models2; return item === null || item === void 0 ? void 0 : (_item$group_models2 = item.group_models) === null || _item$group_models2 === void 0 ? void 0 : _item$group_models2.map(function (jtems) { return jtems; }); }); var bb = []; aa.map(function (item) { if (item.length > 0) { item === null || item === void 0 ? void 0 : item.map(function (jtem) { // console.log('----',jtem); bb.push(jtem); }); } }); var res = bb.filter(function (item) { return e.includes(item.id); }); sethoworkids(res); }, style: { width: '100%' }, value: howorkids === null || howorkids === void 0 ? void 0 : howorkids.map(function (item) { return item === null || item === void 0 ? void 0 : item.id; }) }, item === null || item === void 0 ? void 0 : (_item$courses21 = item.courses) === null || _item$courses21 === void 0 ? void 0 : _item$courses21.map(function (items) { var _items$group_models6, _items$group_models7; return (items === null || items === void 0 ? void 0 : (_items$group_models6 = items.group_models) === null || _items$group_models6 === void 0 ? void 0 : _items$group_models6.length) === 0 ? /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, "--") : items === null || items === void 0 ? void 0 : (_items$group_models7 = items.group_models) === null || _items$group_models7 === void 0 ? void 0 : _items$group_models7.map(function (items) { return /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, /*#__PURE__*/external_window_React_default.a.createElement(es_checkbox["a" /* default */], { onChange: function onChange(e) { items.checked = e.target.checked; sethoworklist(Object(objectSpread2["a" /* default */])({}, item)); }, value: items === null || items === void 0 ? void 0 : items.id }, items.name)); }); }))), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 277, maxHeight: '552px' } }, item === null || item === void 0 ? void 0 : (_item$courses22 = item.courses) === null || _item$courses22 === void 0 ? void 0 : _item$courses22.map(function (items) { var _items$group_models8, _items$group_models9; return (items === null || items === void 0 ? void 0 : (_items$group_models8 = items.group_models) === null || _items$group_models8 === void 0 ? void 0 : _items$group_models8.length) === 0 ? /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, "--") : items === null || items === void 0 ? void 0 : (_items$group_models9 = items.group_models) === null || _items$group_models9 === void 0 ? void 0 : _items$group_models9.map(function (items) { return /*#__PURE__*/external_window_React_default.a.createElement(tooltip["a" /* default */], { title: items.groups }, /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, items.groups)); }); })), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 87, maxHeight: '552px' } }, item === null || item === void 0 ? void 0 : (_item$courses23 = item.courses) === null || _item$courses23 === void 0 ? void 0 : _item$courses23.map(function (items) { var _items$group_models10, _items$group_models11; return (items === null || items === void 0 ? void 0 : (_items$group_models10 = items.group_models) === null || _items$group_models10 === void 0 ? void 0 : _items$group_models10.length) === 0 ? /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, "--") : items === null || items === void 0 ? void 0 : (_items$group_models11 = items.group_models) === null || _items$group_models11 === void 0 ? void 0 : _items$group_models11.map(function (items) { return /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, items.total_score); }); })), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 93, maxHeight: '552px' } }, item === null || item === void 0 ? void 0 : (_item$courses24 = item.courses) === null || _item$courses24 === void 0 ? void 0 : _item$courses24.map(function (items) { var _items$group_models12, _items$group_models13; return (items === null || items === void 0 ? void 0 : (_items$group_models12 = items.group_models) === null || _items$group_models12 === void 0 ? void 0 : _items$group_models12.length) === 0 ? /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, /*#__PURE__*/external_window_React_default.a.createElement(input_number["a" /* default */], { disabled: true })) : items === null || items === void 0 ? void 0 : (_items$group_models13 = items.group_models) === null || _items$group_models13 === void 0 ? void 0 : _items$group_models13.map(function (items) { return /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textwidth, style: { height: 40, lineHeight: '40px' } }, /*#__PURE__*/external_window_React_default.a.createElement(input_number["a" /* default */], { min: 1, step: 0.1, parser: parser, value: items === null || items === void 0 ? void 0 : items.position, onChange: function onChange(e) { items.position = e; sethoworklist(Object(objectSpread2["a" /* default */])({}, item)); } })); }); })))); }; return /*#__PURE__*/external_window_React_default.a.createElement(modal["a" /* default */], { title: "\u6DFB\u52A0\u8BFE\u5802\u6570\u636E", wrapClassName: CurseSettingmodules_default.a.modalWrapContainer, visible: isshow, width: current < 2 ? 740 : 1100, footer: /*#__PURE__*/external_window_React_default.a.createElement("div", null, current < 2 && /*#__PURE__*/external_window_React_default.a.createElement(es_button["a" /* default */], { type: "primary", onClick: /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee() { var _res$courses; var res, aa, bb; return regenerator_default.a.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: if (!(!selectIds || selectIds == "")) { _context.next = 3; break; } message["b" /* default */].warn("请选择课堂"); return _context.abrupt("return"); case 3: _context.next = 5; return Object(fetch["a" /* default */])("/api/ec_courses/1/course_evaluations/search_works.json", { method: 'get', params: { course_ids: selectIds, list_id: courseId || '' } }); case 5: res = _context.sent; sethoworklist(res); aa = res === null || res === void 0 ? void 0 : (_res$courses = res.courses) === null || _res$courses === void 0 ? void 0 : _res$courses.map(function (item) { var _item$shixun_models3; return item === null || item === void 0 ? void 0 : (_item$shixun_models3 = item.shixun_models) === null || _item$shixun_models3 === void 0 ? void 0 : _item$shixun_models3.map(function (jtems) { return jtems; }); }); bb = []; aa.map(function (item) { if (item.length > 0) { item === null || item === void 0 ? void 0 : item.map(function (jtem) { // console.log('----',jtem); if (jtem.checked) { bb.push(jtem); } }); } }); sethoworkids([].concat(bb)); setactitykey('1'); setcurrent(2); case 13: case "end": return _context.stop(); } } }, _callee); })) }, "\u4E0B\u4E00\u6B65"), current >= 2 && /*#__PURE__*/external_window_React_default.a.createElement("div", null, /*#__PURE__*/external_window_React_default.a.createElement(es_button["a" /* default */], { type: "primary", onClick: /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee2() { return regenerator_default.a.wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: setishow(false); setcurrent(0); case 2: case "end": return _context2.stop(); } } }, _callee2); })) }, "\u53D6\u6D88"), /*#__PURE__*/external_window_React_default.a.createElement(es_button["a" /* default */], { type: "primary", loading: isloading, onClick: /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee3() { var _howorklist$courses9, _howorklist$courses10, _howorklist$courses11, _howorklist$courses12, _shixun_works, _common_works, _group_works, _exercise_works; var aa, common_works, bb, group_works, cc, exercise_works, dd, shixun_works, res, _res; return regenerator_default.a.wrap(function _callee3$(_context3) { while (1) { switch (_context3.prev = _context3.next) { case 0: aa = howorklist === null || howorklist === void 0 ? void 0 : (_howorklist$courses9 = howorklist.courses) === null || _howorklist$courses9 === void 0 ? void 0 : _howorklist$courses9.map(function (item) { var _item$common_models3; return item === null || item === void 0 ? void 0 : (_item$common_models3 = item.common_models) === null || _item$common_models3 === void 0 ? void 0 : _item$common_models3.map(function (jtems) { return jtems; }); }); common_works = []; aa.map(function (item) { if (item.length > 0) { item === null || item === void 0 ? void 0 : item.map(function (jtem) { // console.log('----',jtem); if (jtem.checked) { common_works.push(jtem); } }); } }); bb = howorklist === null || howorklist === void 0 ? void 0 : (_howorklist$courses10 = howorklist.courses) === null || _howorklist$courses10 === void 0 ? void 0 : _howorklist$courses10.map(function (item) { var _item$group_models3; return item === null || item === void 0 ? void 0 : (_item$group_models3 = item.group_models) === null || _item$group_models3 === void 0 ? void 0 : _item$group_models3.map(function (jtems) { return jtems; }); }); group_works = []; bb.map(function (item) { if (item.length > 0) { item === null || item === void 0 ? void 0 : item.map(function (jtem) { // console.log('----',jtem); if (jtem.checked) { group_works.push(jtem); } }); } }); cc = howorklist === null || howorklist === void 0 ? void 0 : (_howorklist$courses11 = howorklist.courses) === null || _howorklist$courses11 === void 0 ? void 0 : _howorklist$courses11.map(function (item) { var _item$exercise_models3; return item === null || item === void 0 ? void 0 : (_item$exercise_models3 = item.exercise_models) === null || _item$exercise_models3 === void 0 ? void 0 : _item$exercise_models3.map(function (jtems) { return jtems; }); }); exercise_works = []; cc.map(function (item) { if (item.length > 0) { item === null || item === void 0 ? void 0 : item.map(function (jtem) { // console.log('----',jtem); if (jtem.checked) { exercise_works.push(jtem); } }); } }); dd = howorklist === null || howorklist === void 0 ? void 0 : (_howorklist$courses12 = howorklist.courses) === null || _howorklist$courses12 === void 0 ? void 0 : _howorklist$courses12.map(function (item) { var _item$shixun_models4; return item === null || item === void 0 ? void 0 : (_item$shixun_models4 = item.shixun_models) === null || _item$shixun_models4 === void 0 ? void 0 : _item$shixun_models4.map(function (jtems) { return jtems; }); }); shixun_works = []; dd.map(function (item) { if (item.length > 0) { item === null || item === void 0 ? void 0 : item.map(function (jtem) { // console.log('----',jtem); if (jtem.checked) { shixun_works.push(jtem); } }); } }); if (activitykey === '1') { shixun_works = howorkids; } else if (activitykey === '2') { common_works = howorkids; } else if (activitykey === '3') { group_works = howorkids; } else { exercise_works = howorkids; } setisloading(true); if (!(((_shixun_works = shixun_works) === null || _shixun_works === void 0 ? void 0 : _shixun_works.length) <= 0 && ((_common_works = common_works) === null || _common_works === void 0 ? void 0 : _common_works.length) <= 0 && ((_group_works = group_works) === null || _group_works === void 0 ? void 0 : _group_works.length) <= 0 && ((_exercise_works = exercise_works) === null || _exercise_works === void 0 ? void 0 : _exercise_works.length) <= 0)) { _context3.next = 18; break; } message["b" /* default */].info('请选择考核内容'); setisloading(false); return _context3.abrupt("return"); case 18: if (!courseId) { _context3.next = 25; break; } _context3.next = 21; return Object(fetch["a" /* default */])("/api/ec_courses/".concat(modalparams === null || modalparams === void 0 ? void 0 : modalparams.id, "/course_evaluations/update_online"), { method: 'put', body: { id: courseId, course_ids: selectIds, shixun_works: shixun_works, common_works: common_works, group_works: group_works, exercise_works: exercise_works } }); case 21: res = _context3.sent; if (res) { setishow(false); getcourse_evaluations(modalparams); getevaluations(modalparams); } _context3.next = 29; break; case 25: _context3.next = 27; return Object(fetch["a" /* default */])("/api/ec_courses/".concat(modalparams === null || modalparams === void 0 ? void 0 : modalparams.id, "/course_evaluations/create_online"), { method: 'post', body: { course_ids: selectIds, shixun_works: shixun_works, common_works: common_works, group_works: group_works, exercise_works: exercise_works } }); case 27: _res = _context3.sent; if (_res) { setishow(false); getcourse_evaluations(modalparams); getevaluations(modalparams); } case 29: setisloading(false); setcurrent(0); case 31: case "end": return _context3.stop(); } } }, _callee3); })) }, "\u4FDD\u5B58"))), onCancel: function onCancel() { setcurrent(0); setishow(false); } }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: "calc(100% - 184px)", margin: '0 auto' } }, /*#__PURE__*/external_window_React_default.a.createElement(steps["a" /* default */], { current: current }, /*#__PURE__*/external_window_React_default.a.createElement(steps["a" /* default */].Step, { style: { cursor: 'pointer' }, onClick: function onClick() { setcurrent(1); }, key: 1, title: '关联课堂' }), /*#__PURE__*/external_window_React_default.a.createElement(steps["a" /* default */].Step, { style: { cursor: 'pointer' }, onClick: /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee4() { var _res$courses2; var res, aa, bb; return regenerator_default.a.wrap(function _callee4$(_context4) { while (1) { switch (_context4.prev = _context4.next) { case 0: if (!(selectIds.length <= 0)) { _context4.next = 3; break; } message["b" /* default */].info("\u8BF7\u9009\u62E9\u8BFE\u5802"); return _context4.abrupt("return"); case 3: _context4.next = 5; return Object(fetch["a" /* default */])("/api/ec_courses/1/course_evaluations/search_works.json", { method: 'get', params: { course_ids: selectIds, list_id: courseId || '' } }); case 5: res = _context4.sent; sethoworklist(res); aa = res === null || res === void 0 ? void 0 : (_res$courses2 = res.courses) === null || _res$courses2 === void 0 ? void 0 : _res$courses2.map(function (item) { var _item$shixun_models5; return item === null || item === void 0 ? void 0 : (_item$shixun_models5 = item.shixun_models) === null || _item$shixun_models5 === void 0 ? void 0 : _item$shixun_models5.map(function (jtems) { return jtems; }); }); bb = []; aa.map(function (item) { if (item.length > 0) { item === null || item === void 0 ? void 0 : item.map(function (jtem) { // console.log('----',jtem); if (jtem.checked) { bb.push(jtem); } }); } }); sethoworkids([].concat(bb)); setactitykey('1'); setcurrent(2); case 13: case "end": return _context4.stop(); } } }, _callee4); })), key: 2, title: '配置考核方式与内容' }))), current < 2 && /*#__PURE__*/external_window_React_default.a.createElement("div", null, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { display: 'flex', alignItems: 'center', marginTop: 30, padding: '0 40px' } }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { flex: 1 }, className: CurseSettingmodules_default.a.title }, "\u5173\u8054\u8BFE\u5802"), /*#__PURE__*/external_window_React_default.a.createElement(input["a" /* default */].Search, { className: CurseSettingmodules_default.a.inputWrap, style: { width: '342px' }, onSearch: function onSearch(e) { params.page = 1; params.name = e; setParams(Object(objectSpread2["a" /* default */])({}, params)); getcourse(params); }, placeholder: "\u8BF7\u8F93\u5165\u8BFE\u5802\u540D\u79F0" })), /*#__PURE__*/external_window_React_default.a.createElement("div", null, /*#__PURE__*/external_window_React_default.a.createElement(table["a" /* default */], { style: { marginTop: '10px' }, dataSource: datas, rowKey: "id", scroll: { y: 300 }, rowSelection: rowSelection, onChange: handleChangePage, columns: [{ title: '课堂名称', dataIndex: 'name' }, { title: '创建者', dataIndex: 'creator_name', width: 110 }, { title: '创建时间', dataIndex: 'created_at', width: 133 }, { title: '结束时间', dataIndex: 'end_time', width: 133, render: function render(text, record, index) { return text || '- -'; } }], pagination: { pageSize: params.per_page, total: params.total, current: params.page, showQuickJumper: true, hideOnSinglePage: false, showSizeChanger: true, position: ['bottomCenter'], showTotal: function showTotal(total) { return /*#__PURE__*/external_window_React_default.a.createElement("span", { className: "mr10" }, "\u5171", /*#__PURE__*/external_window_React_default.a.createElement("span", { className: "c-orange" }, total), "\u6761\u6570\u636E"); } } }))), current === 2 && /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.addCourseTabsContainer }, /*#__PURE__*/external_window_React_default.a.createElement(tabs["a" /* default */], { defaultActiveKey: "1", activeKey: activitykey, onChange: function onChange(e) { setactitykey(e); if (e === '1') { var _howorklist$courses13; var aa = howorklist === null || howorklist === void 0 ? void 0 : (_howorklist$courses13 = howorklist.courses) === null || _howorklist$courses13 === void 0 ? void 0 : _howorklist$courses13.map(function (item) { var _item$shixun_models6; return item === null || item === void 0 ? void 0 : (_item$shixun_models6 = item.shixun_models) === null || _item$shixun_models6 === void 0 ? void 0 : _item$shixun_models6.map(function (jtems) { return jtems; }); }); var bb = []; aa.map(function (item) { if (item.length > 0) { item === null || item === void 0 ? void 0 : item.map(function (jtem) { // console.log('----',jtem); if (jtem.checked) { bb.push(jtem); } }); } }); sethoworkids([].concat(bb)); } else if (e === '2') { var _howorklist$courses14; var _aa = howorklist === null || howorklist === void 0 ? void 0 : (_howorklist$courses14 = howorklist.courses) === null || _howorklist$courses14 === void 0 ? void 0 : _howorklist$courses14.map(function (item) { var _item$common_models4; return item === null || item === void 0 ? void 0 : (_item$common_models4 = item.common_models) === null || _item$common_models4 === void 0 ? void 0 : _item$common_models4.map(function (jtems) { return jtems; }); }); var _bb = []; _aa.map(function (item) { if (item.length > 0) { item === null || item === void 0 ? void 0 : item.map(function (jtem) { // console.log('----',jtem); if (jtem.checked) { _bb.push(jtem); } }); } }); sethoworkids([].concat(_bb)); } else if (e === '3') { var _howorklist$courses15; var _aa2 = howorklist === null || howorklist === void 0 ? void 0 : (_howorklist$courses15 = howorklist.courses) === null || _howorklist$courses15 === void 0 ? void 0 : _howorklist$courses15.map(function (item) { var _item$group_models4; return item === null || item === void 0 ? void 0 : (_item$group_models4 = item.group_models) === null || _item$group_models4 === void 0 ? void 0 : _item$group_models4.map(function (jtems) { return jtems; }); }); var _bb2 = []; _aa2.map(function (item) { if (item.length > 0) { item === null || item === void 0 ? void 0 : item.map(function (jtem) { // console.log('----',jtem); if (jtem.checked) { _bb2.push(jtem); } }); } }); sethoworkids([].concat(_bb2)); } else { var _howorklist$courses16; var _aa3 = howorklist === null || howorklist === void 0 ? void 0 : (_howorklist$courses16 = howorklist.courses) === null || _howorklist$courses16 === void 0 ? void 0 : _howorklist$courses16.map(function (item) { var _item$exercise_models4; return item === null || item === void 0 ? void 0 : (_item$exercise_models4 = item.exercise_models) === null || _item$exercise_models4 === void 0 ? void 0 : _item$exercise_models4.map(function (jtems) { return jtems; }); }); var _bb3 = []; _aa3.map(function (item) { if (item.length > 0) { item === null || item === void 0 ? void 0 : item.map(function (jtem) { // console.log('----',jtem); if (jtem.checked) { _bb3.push(jtem); } }); } }); sethoworkids([].concat(_bb3)); } } }, /*#__PURE__*/external_window_React_default.a.createElement(tabs["a" /* default */].TabPane, { tab: "\u5B9E\u8BAD\u4F5C\u4E1A", key: 1 }, titletes(), shixuntable(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, howorklist), {}, { name: '实训作业' }))), /*#__PURE__*/external_window_React_default.a.createElement(tabs["a" /* default */].TabPane, { tab: "\u666E\u901A\u4F5C\u4E1A", key: 2 }, titletes(), commontable(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, howorklist), {}, { name: '普通作业' }))), /*#__PURE__*/external_window_React_default.a.createElement(tabs["a" /* default */].TabPane, { tab: "\u5206\u7EC4\u4F5C\u4E1A", key: 3 }, titletes(), grouptable(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, howorklist), {}, { name: '分组作业' }))), /*#__PURE__*/external_window_React_default.a.createElement(tabs["a" /* default */].TabPane, { tab: "\u5728\u7EBF\u8003\u8BD5", key: 4 }, titletes(), exercisetable(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, howorklist), {}, { name: '在线考试' })))))); } /* harmony default export */ var AddCourseModal = (Addmodal); // EXTERNAL MODULE: ./node_modules/lodash/lodash.js var lodash = __webpack_require__("LvDl"); // EXTERNAL MODULE: ./src/components/NoData/index.tsx var NoData = __webpack_require__("BdwD"); // CONCATENATED MODULE: ./src/pages/Engineering/Lists/CurseSetting/SettingModal.tsx function SettingModal_Addmodal(_ref) { var _khdatas$ec_course_ta, _khdatas$evaluations, _khdatas$evaluations2; var isshow = _ref.isshow, setishow = _ref.setishow, modalparams = _ref.modalparams, getcourse_evaluations = _ref.getcourse_evaluations; var initParams = { page: 1, per_page: 20, total: 0, name: '' }; var _useState = Object(external_window_React_["useState"])(0), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), current = _useState2[0], setcurrent = _useState2[1]; var _useState3 = Object(external_window_React_["useState"])(initParams), _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2), params = _useState4[0], setParams = _useState4[1]; var _useState5 = Object(external_window_React_["useState"])([]), _useState6 = Object(slicedToArray["a" /* default */])(_useState5, 2), datas = _useState6[0], setdatas = _useState6[1]; var _useState7 = Object(external_window_React_["useState"])([]), _useState8 = Object(slicedToArray["a" /* default */])(_useState7, 2), column = _useState8[0], setColumn = _useState8[1]; var _useState9 = Object(external_window_React_["useState"])([]), _useState10 = Object(slicedToArray["a" /* default */])(_useState9, 2), datalist = _useState10[0], setdatalist = _useState10[1]; var _useState11 = Object(external_window_React_["useState"])({}), _useState12 = Object(slicedToArray["a" /* default */])(_useState11, 2), khdatas = _useState12[0], setkhdatas = _useState12[1]; var _useState13 = Object(external_window_React_["useState"])(), _useState14 = Object(slicedToArray["a" /* default */])(_useState13, 2), width = _useState14[0], setwidth = _useState14[1]; var _useState15 = Object(external_window_React_["useState"])(false), _useState16 = Object(slicedToArray["a" /* default */])(_useState15, 2), isloading = _useState16[0], setisloading = _useState16[1]; var _useState17 = Object(external_window_React_["useState"])('1'), _useState18 = Object(slicedToArray["a" /* default */])(_useState17, 2), activitykey = _useState18[0], setactivitykey = _useState18[1]; var paramsRef = Object(external_window_React_["useRef"])(initParams); var _useState19 = Object(external_window_React_["useState"])(null), _useState20 = Object(slicedToArray["a" /* default */])(_useState19, 2), editId = _useState20[0], setEditId = _useState20[1]; var editIdRef = Object(external_window_React_["useRef"])(null); var editIdValue = Object(external_window_React_["useRef"])(''); var tableInitRef = Object(external_window_React_["useRef"])([]); //表格原始数据 Object(external_window_React_["useEffect"])(function () { if (isshow) { getevaluation_settings(params); setactivitykey('1'); } }, [isshow]); var handleClickNum = function handleClickNum(id) { setEditId(id); editIdRef.current = id; dealData(Object(lodash["cloneDeep"])(tableInitRef.current)); // dealData(column) // getData(params) }; var parser = function parser(v) { var num = v; num = isNaN(num) ? '' : num; if (num[0] === '.') { num = ''; } return num; }; function getevaluation_settings(_x) { return _getevaluation_settings.apply(this, arguments); } function _getevaluation_settings() { _getevaluation_settings = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee3(parasm) { var _res$ec_course_target; var res, datas; return regenerator_default.a.wrap(function _callee3$(_context3) { while (1) { switch (_context3.prev = _context3.next) { case 0: _context3.next = 2; return Object(fetch["a" /* default */])("/api/ec_courses/".concat(modalparams.id, "/evaluations/evaluation_settings.json"), { method: 'get', params: parasm }); case 2: res = _context3.sent; setdatas(res); setwidth((res === null || res === void 0 ? void 0 : (_res$ec_course_target = res.ec_course_targets) === null || _res$ec_course_target === void 0 ? void 0 : _res$ec_course_target.length) * 75 + 227 + 240 + 32); datas = res.ec_course_targets; datas.unshift({ content: '11' }); tableInitRef.current = datas; dealData(datas); case 9: case "end": return _context3.stop(); } } }, _callee3); })); return _getevaluation_settings.apply(this, arguments); } function evaluation_settings_subitems(_x2) { return _evaluation_settings_subitems.apply(this, arguments); } function _evaluation_settings_subitems() { _evaluation_settings_subitems = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee4(parasm) { var _res$ec_course_target2; var res, items; return regenerator_default.a.wrap(function _callee4$(_context4) { while (1) { switch (_context4.prev = _context4.next) { case 0: _context4.next = 2; return Object(fetch["a" /* default */])("/api/ec_courses/".concat(modalparams.id, "/evaluations/evaluation_settings_subitems.json"), { method: 'get', params: parasm }); case 2: res = _context4.sent; items = []; res.evaluations.map(function (item) { var _item$subitems3; item === null || item === void 0 ? void 0 : (_item$subitems3 = item.subitems) === null || _item$subitems3 === void 0 ? void 0 : _item$subitems3.map(function (itemslist) { items.push(itemslist); }); }); setwidth((res === null || res === void 0 ? void 0 : (_res$ec_course_target2 = res.ec_course_targets) === null || _res$ec_course_target2 === void 0 ? void 0 : _res$ec_course_target2.length) * 75 + 227 + 240 + 32); setkhdatas({}); setkhdatas(res); setdatalist(items); case 9: case "end": return _context4.stop(); } } }, _callee4); })); return _evaluation_settings_subitems.apply(this, arguments); } var handleBlur = /*#__PURE__*/function () { var _ref2 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee(type) { var _rel$split, _rel$split2, _rel$split3; var rel, url, res; return regenerator_default.a.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: setEditId(null); rel = editIdRef.current; editIdRef.current = null; url = type ? "/api/ec_courses/".concat(modalparams.id, "/evaluations/update_evaluation_settings") : "/api/ec_courses/".concat(modalparams.id, "/evaluations/update_evaluation_setting_subitem"); _context.next = 6; return Object(fetch["a" /* default */])(url, { method: "post", body: { random_number: rel === null || rel === void 0 ? void 0 : (_rel$split = rel.split('-')) === null || _rel$split === void 0 ? void 0 : _rel$split[1], ec_course_target_id: rel === null || rel === void 0 ? void 0 : (_rel$split2 = rel.split('-')) === null || _rel$split2 === void 0 ? void 0 : _rel$split2[0], weight: editIdValue.current, ec_course_evaluation_subitem_ids: type ? null : [rel === null || rel === void 0 ? void 0 : (_rel$split3 = rel.split('-')) === null || _rel$split3 === void 0 ? void 0 : _rel$split3[2]] } }); case 6: res = _context.sent; if (res.status === 0) { message["b" /* default */].success('保存成功'); if (type) { getevaluation_settings(params); getcourse_evaluations(modalparams); } else { evaluation_settings_subitems(params); getcourse_evaluations(modalparams); } } case 8: case "end": return _context.stop(); } } }, _callee); })); return function handleBlur(_x3) { return _ref2.apply(this, arguments); }; }(); var dealData = function dealData(d) { var cloneData = Object(lodash["cloneDeep"])(d); cloneData[0].title = /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.line }, /*#__PURE__*/external_window_React_default.a.createElement("span", null, "\u8BFE\u7A0B\u76EE\u6807"), /*#__PURE__*/external_window_React_default.a.createElement("span", null, "\u8003\u6838\u65B9\u5F0F")); cloneData[0].dataIndex = 'work_name'; cloneData[0].width = 180; cloneData[0].fixed = "left"; cloneData[0].render = function (v, r) { return /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.omit }, /*#__PURE__*/external_window_React_default.a.createElement("span", { title: v }, v), r.warning && /*#__PURE__*/external_window_React_default.a.createElement(tooltip["a" /* default */], { title: '该考核方式对应目标占比之和为0,可能导致计算结果不准确' }, /*#__PURE__*/external_window_React_default.a.createElement("i", { style: { color: '#FF9D18' }, className: "iconfont icon-hongsejingshi ml5" }))); }; var _render = function render(k, g, id, ei) { var _paramsRef$current, _g$relation; var realV1 = ''; var realV2 = ''; if (k) { realV1 = k.split('-')[0]; realV2 = k.split('-')[1]; } var realV = ((_paramsRef$current = paramsRef.current) === null || _paramsRef$current === void 0 ? void 0 : _paramsRef$current.tab) === '1' ? realV1 : realV2; var weights = g === null || g === void 0 ? void 0 : (_g$relation = g.relation[ei - 1]) === null || _g$relation === void 0 ? void 0 : _g$relation.weight; return /*#__PURE__*/external_window_React_default.a.createElement("span", null, editIdRef.current === "".concat(id, "-").concat(g.random_number) ? /*#__PURE__*/external_window_React_default.a.createElement(input_number["a" /* default */], { key: "".concat(id, "-").concat(g.random_number), autoFocus: true, defaultValue: weights, onBlur: function onBlur() { return handleBlur(true); }, step: 0.1, parser: parser, onChange: function onChange(e) { return editIdValue.current = e; }, style: { width: 100 } }) : /*#__PURE__*/external_window_React_default.a.createElement(external_window_React_["Fragment"], { key: "".concat(id, "-").concat(g.random_number) }, /*#__PURE__*/external_window_React_default.a.createElement("span", { className: CurseSettingmodules_default.a.tbl, onClick: function onClick() { return handleClickNum("".concat(id, "-").concat(g.random_number)); }, style: { color: realV === 'H' ? "#0152D9" : realV === "M" ? '#07C160' : realV === "L" ? '#FF9D18' : '#0152d9' } }, weights ? /*#__PURE__*/external_window_React_default.a.createElement("span", null, weights) : '输入数字'))); }; cloneData = cloneData.map(function (e, ei) { if (!ei) { return e; } return { title: /*#__PURE__*/external_window_React_default.a.createElement("span", { key: Math.random() }, /*#__PURE__*/external_window_React_default.a.createElement(tooltip["a" /* default */], { title: e.content }, /*#__PURE__*/external_window_React_default.a.createElement("span", null, '目标' + ei)), e.warning && /*#__PURE__*/external_window_React_default.a.createElement(tooltip["a" /* default */], { title: '该目标下考核方式占比之和不等于1 ,可能导致计算结果不准确!' }, /*#__PURE__*/external_window_React_default.a.createElement("i", { style: { color: '#FF9D18' }, className: "iconfont icon-hongsejingshi ml5" }))), dataIndex: 'content', width: ei === cloneData.length - 1 ? 120 : '', fixed: ei === cloneData.length - 1 ? "right" : '', render: function render(k, g) { return _render(k, g, e.id, ei); } }; }); setColumn(cloneData || []); }; return /*#__PURE__*/external_window_React_default.a.createElement(modal["a" /* default */], { title: "\u8BBE\u7F6E\u8003\u6838\u5360\u6BD4", visible: isshow, width: width > 1060 ? 1060 : width, footer: null, centered: true, onCancel: function onCancel() { setishow(false); } }, /*#__PURE__*/external_window_React_default.a.createElement(tabs["a" /* default */], { activeKey: activitykey, onChange: function onChange(e) { setactivitykey(e); if (e === '1') { getevaluation_settings(params); } else { evaluation_settings_subitems(params); } } }, /*#__PURE__*/external_window_React_default.a.createElement(tabs["a" /* default */].TabPane, { tab: "\u8BBE\u7F6E\u8003\u6838\u65B9\u5F0F\u5360\u6BD4", key: 1 }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { marginTop: '30px', color: '#464F66', fontSize: '14px' } }, /*#__PURE__*/external_window_React_default.a.createElement("p", null, "\u8BF4\u660E\uFF1A"), /*#__PURE__*/external_window_React_default.a.createElement("p", null, "\u6BCF\u4E00\u4E2A\u8BFE\u7A0B\u76EE\u6807\u4E0B\u7684\u8003\u6838\u65B9\u5F0F\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E1\u3002")), /*#__PURE__*/external_window_React_default.a.createElement(table["a" /* default */], { columns: column, bordered: true, scroll: { x: 2000 }, dataSource: datas === null || datas === void 0 ? void 0 : datas.evaluations, pagination: false })), /*#__PURE__*/external_window_React_default.a.createElement(tabs["a" /* default */].TabPane, { tab: "\u8BBE\u7F6E\u8003\u6838\u5185\u5BB9\u5360\u6BD4", key: 2 }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { marginTop: '30px', color: '#464F66', fontSize: '14px' } }, /*#__PURE__*/external_window_React_default.a.createElement("p", null, "\u8BF4\u660E\uFF1A"), /*#__PURE__*/external_window_React_default.a.createElement("p", null, "\u6BCF\u4E00\u4E2A\u8003\u6838\u65B9\u5F0F\u4E0B\u7684\u8003\u6838\u5185\u5BB9\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E1\u3002")), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { overflow: 'auto', width: '100%' } }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { display: 'flex', background: '#F5F5F5', height: '78px' } }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', borderLeft: '1px solid #E0E2EC', borderTop: '1px solid #E0E2EC', width: '240px', paddingLeft: '30px', lineHeight: '78px', flexShrink: 0 } }, "\u8003\u6838\u65B9\u5F0F"), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', borderTop: '1px solid #E0E2EC', width: '227px', lineHeight: '78px', textAlign: 'center', flexShrink: 0 } }, "\u8003\u6838\u5185\u5BB9"), khdatas === null || khdatas === void 0 ? void 0 : (_khdatas$ec_course_ta = khdatas.ec_course_targets) === null || _khdatas$ec_course_ta === void 0 ? void 0 : _khdatas$ec_course_ta.map(function (item, index) { var _khdatas$ec_course_ta2; return /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: index != (khdatas === null || khdatas === void 0 ? void 0 : (_khdatas$ec_course_ta2 = khdatas.ec_course_targets) === null || _khdatas$ec_course_ta2 === void 0 ? void 0 : _khdatas$ec_course_ta2.length) - 1 && '1px solid #E0E2EC', width: '75px', lineHeight: '78px', textAlign: 'center', flexShrink: 0, background: '#F5F5F5', borderTop: '1px solid #E0E2EC' } }, /*#__PURE__*/external_window_React_default.a.createElement(tooltip["a" /* default */], { title: item.content }, /*#__PURE__*/external_window_React_default.a.createElement("span", null, '目标' + (index + 1))), item.warning && /*#__PURE__*/external_window_React_default.a.createElement(tooltip["a" /* default */], { title: '该目标下有考核方式的考核内容占比之和不等于1 ,可能导致计算结果不准确!' }, /*#__PURE__*/external_window_React_default.a.createElement("i", { style: { color: '#FF9D18' }, className: "iconfont icon-hongsejingshi ml5" }))); })), /*#__PURE__*/external_window_React_default.a.createElement("div", null, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { maxHeight: "550px" } }, (khdatas === null || khdatas === void 0 ? void 0 : (_khdatas$evaluations = khdatas.evaluations) === null || _khdatas$evaluations === void 0 ? void 0 : _khdatas$evaluations.length) <= 0 && /*#__PURE__*/external_window_React_default.a.createElement(NoData["a" /* default */], { customText: "\u5F53\u524D\u6682\u65E0\u6570\u636E" }), khdatas === null || khdatas === void 0 ? void 0 : (_khdatas$evaluations2 = khdatas.evaluations) === null || _khdatas$evaluations2 === void 0 ? void 0 : _khdatas$evaluations2.map(function (item, index) { var _item$subitems, _khdatas$ec_course_ta3; return /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { height: '100%', display: 'flex', borderLeft: '1px solid #E0E2EC' } }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '240px', borderRight: '1px solid #E0E2EC', borderBottom: '1px solid #E0E2EC', marginTop: -1, display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0 } }, item.work_name), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { display: 'flex', flexDirection: 'column', borderRight: '1px solid #E0E2EC', width: '227px', flexShrink: 0 } }, item === null || item === void 0 ? void 0 : (_item$subitems = item.subitems) === null || _item$subitems === void 0 ? void 0 : _item$subitems.map(function (jtmes, jindex) { return /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderBottom: '1px solid #E0E2EC', paddingLeft: 8, paddingRight: 12, display: 'flex', alignItems: 'center' } }, /*#__PURE__*/external_window_React_default.a.createElement(tooltip["a" /* default */], { title: jtmes === null || jtmes === void 0 ? void 0 : jtmes.name }, /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textone, style: { height: '42px', lineHeight: '42px' } }, jtmes === null || jtmes === void 0 ? void 0 : jtmes.name)), jtmes.warning && /*#__PURE__*/external_window_React_default.a.createElement(tooltip["a" /* default */], { title: '该考核内容对应目标占比之和为0,可能导致计算结果不准确' }, /*#__PURE__*/external_window_React_default.a.createElement("i", { style: { color: '#FF9D18' }, className: "iconfont icon-hongsejingshi ml5" }))); })), khdatas === null || khdatas === void 0 ? void 0 : (_khdatas$ec_course_ta3 = khdatas.ec_course_targets) === null || _khdatas$ec_course_ta3 === void 0 ? void 0 : _khdatas$ec_course_ta3.map(function (ktem, kindex) { var _khdatas$ec_course_ta4, _item$subitems2; return /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { display: 'flex', flexDirection: 'column', borderRight: '1px solid #E0E2EC', width: kindex != (khdatas === null || khdatas === void 0 ? void 0 : (_khdatas$ec_course_ta4 = khdatas.ec_course_targets) === null || _khdatas$ec_course_ta4 === void 0 ? void 0 : _khdatas$ec_course_ta4.length) - 1 ? '75px' : '74px', flexShrink: 0 } }, item === null || item === void 0 ? void 0 : (_item$subitems2 = item.subitems) === null || _item$subitems2 === void 0 ? void 0 : _item$subitems2.map(function (jtmes, jindex) { var _jtmes$relation, _jtmes$relation$kinde, _khdatas$ec_course_ta5; return /*#__PURE__*/external_window_React_default.a.createElement(input_number["a" /* default */], { key: "".concat(kindex, "-").concat(jindex), parser: parser, step: 0.1, disabled: isloading, onBlur: /*#__PURE__*/function () { var _ref3 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee2(e) { var res; return regenerator_default.a.wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: setisloading(true); _context2.next = 3; return Object(fetch["a" /* default */])("/api/ec_courses/".concat(modalparams.id, "/evaluations/update_evaluation_setting_subitem"), { method: 'post', body: { random_number: jtmes === null || jtmes === void 0 ? void 0 : jtmes.random_number, ec_course_target_id: ktem === null || ktem === void 0 ? void 0 : ktem.id, weight: e.target.value, ec_course_evaluation_subitem_ids: jtmes === null || jtmes === void 0 ? void 0 : jtmes.ec_course_evaluation_subitem_ids } }); case 3: res = _context2.sent; setisloading(false); if (res) { evaluation_settings_subitems(params); getcourse_evaluations(modalparams); } case 6: case "end": return _context2.stop(); } } }, _callee2); })); return function (_x4) { return _ref3.apply(this, arguments); }; }(), defaultValue: jtmes === null || jtmes === void 0 ? void 0 : (_jtmes$relation = jtmes.relation) === null || _jtmes$relation === void 0 ? void 0 : (_jtmes$relation$kinde = _jtmes$relation[kindex]) === null || _jtmes$relation$kinde === void 0 ? void 0 : _jtmes$relation$kinde.weight, style: { height: 43, lineHeight: '43px', width: kindex != (khdatas === null || khdatas === void 0 ? void 0 : (_khdatas$ec_course_ta5 = khdatas.ec_course_targets) === null || _khdatas$ec_course_ta5 === void 0 ? void 0 : _khdatas$ec_course_ta5.length) - 1 ? '75px' : '74px' } }); })); })); }))))))); } /* harmony default export */ var SettingModal = (SettingModal_Addmodal); // EXTERNAL MODULE: ./src/pages/Engineering/Lists/CurseSetting/tx.png var tx = __webpack_require__("zmGA"); var tx_default = /*#__PURE__*/__webpack_require__.n(tx); // EXTERNAL MODULE: ./src/pages/Engineering/util.tsx var util = __webpack_require__("g+eg"); // CONCATENATED MODULE: ./src/pages/Engineering/Lists/CurseSetting/index.tsx var CurseSetting_Page = function Page(_ref) { var _user$userInfo2, _evaluationslist$ec_c, _formulas$ec_course_t3, _formulas$ec_course_f3; var user = _ref.user; var initParams = { page: 1, per_page: 20, total: 0, ec_major_school_id: null, ec_year_id: null, sort_by: null, direction: null, id: null }; var _useState = Object(external_window_React_["useState"])(initParams), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), params = _useState2[0], setParams = _useState2[1]; var _useState3 = Object(external_window_React_["useState"])([]), _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2), majorData = _useState4[0], setMajorData = _useState4[1]; var _useState5 = Object(external_window_React_["useState"])([]), _useState6 = Object(slicedToArray["a" /* default */])(_useState5, 2), yearData = _useState6[0], setYearData = _useState6[1]; var _useState7 = Object(external_window_React_["useState"])([]), _useState8 = Object(slicedToArray["a" /* default */])(_useState7, 2), CourseList = _useState8[0], setCourseList = _useState8[1]; var _useState9 = Object(external_window_React_["useState"])([]), _useState10 = Object(slicedToArray["a" /* default */])(_useState9, 2), teaccher = _useState10[0], setTeacher = _useState10[1]; var _useState11 = Object(external_window_React_["useState"])([]), _useState12 = Object(slicedToArray["a" /* default */])(_useState11, 2), coursestandards = _useState12[0], setcoursestandards = _useState12[1]; var _useState13 = Object(external_window_React_["useState"])(), _useState14 = Object(slicedToArray["a" /* default */])(_useState13, 2), coursetargets = _useState14[0], setcoursetargets = _useState14[1]; var _useState15 = Object(external_window_React_["useState"])(), _useState16 = Object(slicedToArray["a" /* default */])(_useState15, 2), coursetargetslist = _useState16[0], setcoursetargetslist = _useState16[1]; var _useState17 = Object(external_window_React_["useState"])([]), _useState18 = Object(slicedToArray["a" /* default */])(_useState17, 2), SelectList = _useState18[0], setSelectList = _useState18[1]; var _useState19 = Object(external_window_React_["useState"])(false), _useState20 = Object(slicedToArray["a" /* default */])(_useState19, 2), showmodal = _useState20[0], setshowmodal = _useState20[1]; var _useState21 = Object(external_window_React_["useState"])([]), _useState22 = Object(slicedToArray["a" /* default */])(_useState21, 2), Evaluations = _useState22[0], setEvaluations = _useState22[1]; var _useState23 = Object(external_window_React_["useState"])(false), _useState24 = Object(slicedToArray["a" /* default */])(_useState23, 2), addshow = _useState24[0], setaddshow = _useState24[1]; var editCourseId = Object(external_window_React_["useRef"])(); var _useState25 = Object(external_window_React_["useState"])(false), _useState26 = Object(slicedToArray["a" /* default */])(_useState25, 2), exportshow = _useState26[0], setexport = _useState26[1]; var _useState27 = Object(external_window_React_["useState"])([]), _useState28 = Object(slicedToArray["a" /* default */])(_useState27, 2), fileList = _useState28[0], setFileList = _useState28[1]; var urlParams = Object(react_router["h" /* useLocation */])(); var _useState29 = Object(external_window_React_["useState"])(false), _useState30 = Object(slicedToArray["a" /* default */])(_useState29, 2), loadings = _useState30[0], setloading = _useState30[1]; var _useState31 = Object(external_window_React_["useState"])(false), _useState32 = Object(slicedToArray["a" /* default */])(_useState31, 2), isdisabled = _useState32[0], setisdisabled = _useState32[1]; var _useState33 = Object(external_window_React_["useState"])(false), _useState34 = Object(slicedToArray["a" /* default */])(_useState33, 2), Calculation = _useState34[0], setCalculation = _useState34[1]; var _useState35 = Object(external_window_React_["useState"])({}), _useState36 = Object(slicedToArray["a" /* default */])(_useState35, 2), formulas = _useState36[0], setformulas = _useState36[1]; var _useState37 = Object(external_window_React_["useState"])([]), _useState38 = Object(slicedToArray["a" /* default */])(_useState37, 2), items = _useState38[0], setitems = _useState38[1]; var _useState39 = Object(external_window_React_["useState"])('1'), _useState40 = Object(slicedToArray["a" /* default */])(_useState39, 2), currt = _useState40[0], setcurrt = _useState40[1]; var _useState41 = Object(external_window_React_["useState"])({ name: "", filename: "", type: "", className: "", data: "", close: true, hasMask: true, style: { position: "fixed", zIndex: 9999, background: "rgba(0,0,0,.7)" }, monacoEditor: { value: "", language: "", theme: 'vs', // onChange: onCodeChange, // onSave: onSave, // forbidCopy: forbidCopy, options: { readOnly: true } } }), _useState42 = Object(slicedToArray["a" /* default */])(_useState41, 2), preview = _useState42[0], setPreview = _useState42[1]; var _useState43 = Object(external_window_React_["useState"])(false), _useState44 = Object(slicedToArray["a" /* default */])(_useState43, 2), Settingmodal = _useState44[0], setSettingmodal = _useState44[1]; var _useState45 = Object(external_window_React_["useState"])(), _useState46 = Object(slicedToArray["a" /* default */])(_useState45, 2), evaluationslist = _useState46[0], setevaluationslist = _useState46[1]; Object(external_window_React_["useEffect"])(function () { var _user$userInfo; if (user !== null && user !== void 0 && (_user$userInfo = user.userInfo) !== null && _user$userInfo !== void 0 && _user$userInfo.school_id) { getMajorData(); } }, [user === null || user === void 0 ? void 0 : (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.school_id]); var getData = /*#__PURE__*/function () { var _ref2 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee(record) { var _user$userInfo3; return regenerator_default.a.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: util["a" /* localSelect */].setItem(user === null || user === void 0 ? void 0 : (_user$userInfo3 = user.userInfo) === null || _user$userInfo3 === void 0 ? void 0 : _user$userInfo3.login, [record === null || record === void 0 ? void 0 : record.ec_major_school_id, record === null || record === void 0 ? void 0 : record.ec_year_id]); //获取老师 getTeacher(record); //获取课程标准 getCourse(record); //获取课程目标 getcourse_targets(record); //获取考核方式与数据来源 getcourse_evaluations(record); //获取课程目标达成度 getevaluations(record); //获取课程目标 graduation_subitems(record); case 7: case "end": return _context.stop(); } } }, _callee); })); return function getData(_x) { return _ref2.apply(this, arguments); }; }(); function setnull() { setTeacher([]); setcoursestandards([]); setcoursetargetslist([]); setcoursetargets([]); setEvaluations([]); setevaluationslist([]); setSelectList([]); } var graduation_subitems = /*#__PURE__*/function () { var _ref3 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee2(record) { var res; return regenerator_default.a.wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: _context2.next = 2; return Object(fetch["a" /* default */])("/api/ec_years/".concat(record.ec_year_id, "/graduation_subitems.json"), { method: 'get' }); case 2: res = _context2.sent; setSelectList((res === null || res === void 0 ? void 0 : res.graduation_subitems) || []); case 4: case "end": return _context2.stop(); } } }, _callee2); })); return function graduation_subitems(_x2) { return _ref3.apply(this, arguments); }; }(); var getTeacher = /*#__PURE__*/function () { var _ref4 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee3(record) { var res; return regenerator_default.a.wrap(function _callee3$(_context3) { while (1) { switch (_context3.prev = _context3.next) { case 0: _context3.next = 2; return Object(fetch["a" /* default */])("/api/ec_years/".concat(record.ec_year_id, "/ec_courses/get_course_teachers.json"), { method: 'get', params: record }); case 2: res = _context3.sent; setTeacher(res === null || res === void 0 ? void 0 : res.data); case 4: case "end": return _context3.stop(); } } }, _callee3); })); return function getTeacher(_x3) { return _ref4.apply(this, arguments); }; }(); var getCourse = /*#__PURE__*/function () { var _ref5 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee4(record) { var res; return regenerator_default.a.wrap(function _callee4$(_context4) { while (1) { switch (_context4.prev = _context4.next) { case 0: _context4.next = 2; return Object(fetch["a" /* default */])("/api/ec_courses/".concat(record.id, "/ec_course_standards.json"), { method: 'get', params: { ec_course_id: record === null || record === void 0 ? void 0 : record.id } }); case 2: res = _context4.sent; setcoursestandards(res === null || res === void 0 ? void 0 : res.data); case 4: case "end": return _context4.stop(); } } }, _callee4); })); return function getCourse(_x4) { return _ref5.apply(this, arguments); }; }(); var getcourse_targets = /*#__PURE__*/function () { var _ref6 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee5(record) { var res; return regenerator_default.a.wrap(function _callee5$(_context5) { while (1) { switch (_context5.prev = _context5.next) { case 0: _context5.next = 2; return Object(fetch["a" /* default */])("/api/ec_courses/".concat(record.id, "/course_targets.json"), { method: 'get', params: { ec_course_id: record === null || record === void 0 ? void 0 : record.id } }); case 2: res = _context5.sent; setcoursetargetslist(res === null || res === void 0 ? void 0 : res.course_targets); setcoursetargets(res === null || res === void 0 ? void 0 : res.course_targets); case 5: case "end": return _context5.stop(); } } }, _callee5); })); return function getcourse_targets(_x5) { return _ref6.apply(this, arguments); }; }(); var addDraggers = { onRemove: function onRemove() { setFileList([]); }, beforeUpload: function beforeUpload(file) { console.log(file); if ((file === null || file === void 0 ? void 0 : file.size) > 1024 * 1024 * 50) { message["b" /* default */].info('文件超过50M,不符合上传要求'); return false; } var filelist = []; filelist.push(file); setFileList([].concat(filelist)); return false; }, fileList: fileList, accept: '.xls,.xlsx' }; var getcourse_evaluations = /*#__PURE__*/function () { var _ref7 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee6(record) { var res; return regenerator_default.a.wrap(function _callee6$(_context6) { while (1) { switch (_context6.prev = _context6.next) { case 0: _context6.next = 2; return Object(fetch["a" /* default */])("/api/ec_courses/".concat(record === null || record === void 0 ? void 0 : record.id, "/course_evaluations.json"), { method: 'get', params: { ec_course_id: record === null || record === void 0 ? void 0 : record.id } }); case 2: res = _context6.sent; setEvaluations(res === null || res === void 0 ? void 0 : res.course_evaluation_tops); case 4: case "end": return _context6.stop(); } } }, _callee6); })); return function getcourse_evaluations(_x6) { return _ref7.apply(this, arguments); }; }(); var getevaluations = /*#__PURE__*/function () { var _ref8 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee7(record) { var res; return regenerator_default.a.wrap(function _callee7$(_context7) { while (1) { switch (_context7.prev = _context7.next) { case 0: _context7.next = 2; return Object(fetch["a" /* default */])("/api/ec_courses/".concat(record === null || record === void 0 ? void 0 : record.id, "/evaluations.json"), { method: 'get', params: { ec_course_id: record === null || record === void 0 ? void 0 : record.id } }); case 2: res = _context7.sent; setevaluationslist(res === null || res === void 0 ? void 0 : res.data); case 4: case "end": return _context7.stop(); } } }, _callee7); })); return function getevaluations(_x7) { return _ref8.apply(this, arguments); }; }(); var getMajorData = /*#__PURE__*/function () { var _ref9 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee8() { var _user$userInfo4, _res1$data, _user$userInfo5, _urlParams$query, _res1$data2, _res1$data2$, _res2$data, _urlParams$query2, _res2$data2, _res2$data2$, _urlParams$query3, _urlParams$query4, _res3$data, _res3$data$, _res3$data2; var res1, item, ec_major_school_id, res2, ec_year_id, res3, res4; return regenerator_default.a.wrap(function _callee8$(_context8) { while (1) { switch (_context8.prev = _context8.next) { case 0: _context8.next = 2; return Object(fetch["a" /* default */])("/api/schools/".concat(user === null || user === void 0 ? void 0 : (_user$userInfo4 = user.userInfo) === null || _user$userInfo4 === void 0 ? void 0 : _user$userInfo4.school_id, "/ec_majors/get_major_list.json"), { method: 'get' }); case 2: res1 = _context8.sent; if (!((res1 === null || res1 === void 0 ? void 0 : (_res1$data = res1.data) === null || _res1$data === void 0 ? void 0 : _res1$data.length) <= 0)) { _context8.next = 7; break; } setisdisabled(true); // params.ec_major_school_id=''; setParams(Object(objectSpread2["a" /* default */])({}, params)); return _context8.abrupt("return"); case 7: setMajorData((res1 === null || res1 === void 0 ? void 0 : res1.data) || []); item = util["a" /* localSelect */].getItem(user === null || user === void 0 ? void 0 : (_user$userInfo5 = user.userInfo) === null || _user$userInfo5 === void 0 ? void 0 : _user$userInfo5.login); ec_major_school_id = Number(urlParams === null || urlParams === void 0 ? void 0 : (_urlParams$query = urlParams.query) === null || _urlParams$query === void 0 ? void 0 : _urlParams$query.ec_major_school_id) || item[0] || (res1 === null || res1 === void 0 ? void 0 : (_res1$data2 = res1.data) === null || _res1$data2 === void 0 ? void 0 : (_res1$data2$ = _res1$data2[0]) === null || _res1$data2$ === void 0 ? void 0 : _res1$data2$.ec_major_school_id); _context8.next = 12; return Object(fetch["a" /* default */])("/api/ec_major_schools/".concat(ec_major_school_id, "/ec_years/get_year_list.json"), { method: 'get' }); case 12: res2 = _context8.sent; if (!((res2 === null || res2 === void 0 ? void 0 : (_res2$data = res2.data) === null || _res2$data === void 0 ? void 0 : _res2$data.length) <= 0)) { _context8.next = 18; break; } setisdisabled(true); params.ec_year_id = ''; setParams(Object(objectSpread2["a" /* default */])({}, params)); return _context8.abrupt("return"); case 18: setYearData((res2 === null || res2 === void 0 ? void 0 : res2.data) || []); ec_year_id = Number(urlParams === null || urlParams === void 0 ? void 0 : (_urlParams$query2 = urlParams.query) === null || _urlParams$query2 === void 0 ? void 0 : _urlParams$query2.ec_year_id) || item[1] || (res2 === null || res2 === void 0 ? void 0 : (_res2$data2 = res2.data) === null || _res2$data2 === void 0 ? void 0 : (_res2$data2$ = _res2$data2[0]) === null || _res2$data2$ === void 0 ? void 0 : _res2$data2$.ec_year_id); _context8.next = 22; return Object(fetch["a" /* default */])("/api/ec_years/".concat(ec_year_id, "/ec_courses/get_courses.json"), { method: 'get' }); case 22: res3 = _context8.sent; setCourseList((res3 === null || res3 === void 0 ? void 0 : res3.data) || []); _context8.next = 26; return Object(fetch["a" /* default */])("/api/ec_years/".concat(ec_year_id, "/graduation_subitems.json"), { method: 'get' }); case 26: res4 = _context8.sent; params.ec_major_school_id = ec_major_school_id; params.ec_year_id = ec_year_id; params.id = urlParams !== null && urlParams !== void 0 && (_urlParams$query3 = urlParams.query) !== null && _urlParams$query3 !== void 0 && _urlParams$query3.course ? Number(urlParams === null || urlParams === void 0 ? void 0 : (_urlParams$query4 = urlParams.query) === null || _urlParams$query4 === void 0 ? void 0 : _urlParams$query4.course) : res3 === null || res3 === void 0 ? void 0 : (_res3$data = res3.data) === null || _res3$data === void 0 ? void 0 : (_res3$data$ = _res3$data[0]) === null || _res3$data$ === void 0 ? void 0 : _res3$data$.id; if (!((res3 === null || res3 === void 0 ? void 0 : (_res3$data2 = res3.data) === null || _res3$data2 === void 0 ? void 0 : _res3$data2.length) <= 0)) { _context8.next = 35; break; } setisdisabled(true); return _context8.abrupt("return"); case 35: setisdisabled(false); case 36: setSelectList((res4 === null || res4 === void 0 ? void 0 : res4.graduation_subitems) || []); setParams(params); getData(params); console.log('ec_major_school_id', ec_major_school_id); case 40: case "end": return _context8.stop(); } } }, _callee8); })); return function getMajorData() { return _ref9.apply(this, arguments); }; }(); var getYearData = /*#__PURE__*/function () { var _ref10 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee9(id) { var _res2$data3, _res2$data4, _res2$data4$, _res2$data5, _res2$data5$; var res2; return regenerator_default.a.wrap(function _callee9$(_context9) { while (1) { switch (_context9.prev = _context9.next) { case 0: _context9.next = 2; return Object(fetch["a" /* default */])("/api/ec_major_schools/".concat(id, "/ec_years/get_year_list.json"), { method: 'get' }); case 2: res2 = _context9.sent; if (!((res2 === null || res2 === void 0 ? void 0 : (_res2$data3 = res2.data) === null || _res2$data3 === void 0 ? void 0 : _res2$data3.length) <= 0)) { _context9.next = 10; break; } setisdisabled(true); params.ec_year_id = ''; setParams(Object(objectSpread2["a" /* default */])({}, params)); return _context9.abrupt("return"); case 10: setisdisabled(false); case 11: params.ec_major_school_id = id; params.ec_year_id = res2 === null || res2 === void 0 ? void 0 : (_res2$data4 = res2.data) === null || _res2$data4 === void 0 ? void 0 : (_res2$data4$ = _res2$data4[0]) === null || _res2$data4$ === void 0 ? void 0 : _res2$data4$.ec_year_id; setYearData((res2 === null || res2 === void 0 ? void 0 : res2.data) || []); setParams(params); // getData(params); getCurses(res2 === null || res2 === void 0 ? void 0 : (_res2$data5 = res2.data) === null || _res2$data5 === void 0 ? void 0 : (_res2$data5$ = _res2$data5[0]) === null || _res2$data5$ === void 0 ? void 0 : _res2$data5$.ec_year_id); case 16: case "end": return _context9.stop(); } } }, _callee9); })); return function getYearData(_x8) { return _ref10.apply(this, arguments); }; }(); var getCurses = /*#__PURE__*/function () { var _ref11 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee10(id) { var _res2$data6, _res2$data7, _res2$data7$; var res2; return regenerator_default.a.wrap(function _callee10$(_context10) { while (1) { switch (_context10.prev = _context10.next) { case 0: _context10.next = 2; return Object(fetch["a" /* default */])("/api/ec_years/".concat(id, "/ec_courses/get_courses.json"), { method: 'get' }); case 2: res2 = _context10.sent; if (!((res2 === null || res2 === void 0 ? void 0 : (_res2$data6 = res2.data) === null || _res2$data6 === void 0 ? void 0 : _res2$data6.length) <= 0)) { _context10.next = 11; break; } setisdisabled(true); params.id = ''; setParams(Object(objectSpread2["a" /* default */])({}, params)); // getData(params); setnull(); return _context10.abrupt("return"); case 11: setisdisabled(false); case 12: params.ec_year_id = id; params.id = res2 === null || res2 === void 0 ? void 0 : (_res2$data7 = res2.data) === null || _res2$data7 === void 0 ? void 0 : (_res2$data7$ = _res2$data7[0]) === null || _res2$data7$ === void 0 ? void 0 : _res2$data7$.id; setCourseList((res2 === null || res2 === void 0 ? void 0 : res2.data) || []); setParams(params); getData(params); case 17: case "end": return _context10.stop(); } } }, _callee10); })); return function getCurses(_x9) { return _ref11.apply(this, arguments); }; }(); var get_formulas = /*#__PURE__*/function () { var _ref12 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee11(id) { var res2; return regenerator_default.a.wrap(function _callee11$(_context11) { while (1) { switch (_context11.prev = _context11.next) { case 0: _context11.next = 2; return Object(fetch["a" /* default */])("/api/ec_years/1/ec_courses/get_formulas.json", { method: 'get', params: { ec_course_id: id } }); case 2: res2 = _context11.sent; setParams(params); setformulas(res2); case 5: case "end": return _context11.stop(); } } }, _callee11); })); return function get_formulas(_x10) { return _ref12.apply(this, arguments); }; }(); var handleSelect = function handleSelect(v, type) { params.page = 1; params[type] = v; if (type === 'ec_major_school_id') { getYearData(v); return; } if (type === 'ec_year_id') { setParams(Object(objectSpread2["a" /* default */])({}, params)); // getData(params) getCurses(v); } if (type === 'id') { setParams(Object(objectSpread2["a" /* default */])({}, params)); getData(params); } }; var Draggers = { beforeUpload: function () { var _beforeUpload = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee12(file) { var formData, res; return regenerator_default.a.wrap(function _callee12$(_context12) { while (1) { switch (_context12.prev = _context12.next) { case 0: console.log(file); if (!((file === null || file === void 0 ? void 0 : file.size) > 1024 * 1024 * 50)) { _context12.next = 4; break; } message["b" /* default */].info('文件超过50M,不符合上传要求'); return _context12.abrupt("return", false); case 4: formData = new FormData(); formData.append('file', file); _context12.next = 8; return Object(fetch["a" /* default */])("/api/ec_courses/".concat(params === null || params === void 0 ? void 0 : params.id, "/ec_course_standards.json"), { method: 'post', body: formData }, true); case 8: res = _context12.sent; getCourse(params); getevaluations(params); return _context12.abrupt("return", false); case 12: case "end": return _context12.stop(); } } }, _callee12); })); function beforeUpload(_x11) { return _beforeUpload.apply(this, arguments); } return beforeUpload; }(), fileList: [] }; return /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.wrap }, /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.title }, "\u8BFE\u7A0B\u8BBE\u7F6E"), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { clear: 'both', marginTop: '40px' } }), /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.control }, /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.label }, "\u8BA4\u8BC1\u4E13\u4E1A"), /*#__PURE__*/external_window_React_default.a.createElement(es_select["a" /* default */], { style: { width: 240 }, placeholder: "\u8BF7\u9009\u62E9\u8BA4\u8BC1\u4E13\u4E1A", value: params === null || params === void 0 ? void 0 : params.ec_major_school_id, onChange: function onChange(v) { return handleSelect(v, 'ec_major_school_id'); } }, majorData === null || majorData === void 0 ? void 0 : majorData.map(function (e) { return /*#__PURE__*/external_window_React_default.a.createElement(es_select["a" /* default */].Option, { value: e.ec_major_school_id }, e.name); })), /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.label }, "\u8BA4\u8BC1\u5C4A\u522B"), /*#__PURE__*/external_window_React_default.a.createElement(es_select["a" /* default */], { disabled: isdisabled && yearData.length <= 0, style: { width: 140 }, placeholder: "\u8BF7\u9009\u62E9\u5C4A\u522B", value: params === null || params === void 0 ? void 0 : params.ec_year_id, onChange: function onChange(v) { return handleSelect(v, 'ec_year_id'); } }, yearData === null || yearData === void 0 ? void 0 : yearData.map(function (e) { return /*#__PURE__*/external_window_React_default.a.createElement(es_select["a" /* default */].Option, { value: e.ec_year_id }, e.year); })), /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.label }, "\u8BFE\u7A0B"), /*#__PURE__*/external_window_React_default.a.createElement(es_select["a" /* default */], { disabled: isdisabled, style: { width: 140 }, placeholder: "\u8BF7\u9009\u62E9\u8BFE\u7A0B", value: params === null || params === void 0 ? void 0 : params.id, onChange: function onChange(v) { return handleSelect(v, 'id'); } }, CourseList === null || CourseList === void 0 ? void 0 : CourseList.map(function (e) { return /*#__PURE__*/external_window_React_default.a.createElement(es_select["a" /* default */].Option, { value: e.id }, e.name); }))), /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.title }, "\u8BFE\u7A0B\u6559\u5E08"), /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.teachcount, style: { display: 'flex', marginTop: 20, marginBottom: 16 } }, teaccher === null || teaccher === void 0 ? void 0 : teaccher.map(function (item, index) { return /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { display: 'flex', marginLeft: index === 0 ? '20px' : '47px' } }, /*#__PURE__*/external_window_React_default.a.createElement("img", { src: tx_default.a, style: { width: '50px', height: '50px', borderRadius: '50%', zIndex: 0 } }), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { marginLeft: '8px' } }, /*#__PURE__*/external_window_React_default.a.createElement("p", { style: { marginBottom: '0px' } }, item.name), /*#__PURE__*/external_window_React_default.a.createElement("p", { style: { marginTop: '10px', height: '22px', borderRadius: '0px 12px 12px 0px', background: '#DFEAFF', marginLeft: '-30px', lineHeight: '22px', paddingLeft: 32, display: 'inline-block', paddingRight: 16, color: '#0152D9' } }, item.pro))); })), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { height: '20px', background: '#fafafa' } }), /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.title, style: { display: 'flex', justifyContent: 'space-between' } }, "\u8BFE\u7A0B\u6807\u51C6", /*#__PURE__*/external_window_React_default.a.createElement("span", null, /*#__PURE__*/external_window_React_default.a.createElement(upload["a" /* default */], Draggers, /*#__PURE__*/external_window_React_default.a.createElement(es_button["a" /* default */], { disabled: isdisabled, type: "primary", style: { marginRight: '20px' }, onClick: function onClick() {} }, /*#__PURE__*/external_window_React_default.a.createElement("i", { style: { marginRight: '8px' }, className: "iconfont icon-shangchuan3" }), " \u4E0A\u4F20\u8BFE\u7A0B\u6807\u51C6")))), /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.teachcount }, /*#__PURE__*/external_window_React_default.a.createElement(table["a" /* default */], { style: { marginTop: '20px', marginBottom: 20, padding: '0px 20px' }, dataSource: coursestandards, pagination: false, columns: [{ title: '序号', dataIndex: 'name', key: 'name', render: function render(text, record, index) { return params.per_page * (params.page - 1) + index + 1; } }, { title: '文件名称', dataIndex: 'name', width: '50%', key: 'name' }, { title: '上传时间', dataIndex: 'created_at', key: 'created_at' }, { title: '操作', dataIndex: 'id', key: 'id', render: function render(text, record, index) { return /*#__PURE__*/external_window_React_default.a.createElement("div", null, /*#__PURE__*/external_window_React_default.a.createElement("i", { onClick: function onClick() { console.log(text, record, index); var types = ['office', 'pdf', 'image', 'other', 'video', 'audio', 'download']; if (!types.includes(record.file_type)) { message["b" /* default */].info('当前类型暂不支持预览'); return; } setPreview(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, preview), {}, { type: record.file_type, data: env["a" /* default */].API_SERVER + record.url })); }, style: { marginRight: '5px', color: '#0152d9', cursor: 'pointer' }, className: "iconfont icon-chakansvg" }), /*#__PURE__*/external_window_React_default.a.createElement("i", { onClick: function onClick() { modal["a" /* default */].confirm({ title: '确认是否删除?', icon: /*#__PURE__*/external_window_React_default.a.createElement(ExclamationCircleOutlined["a" /* default */], null), // content: 'Some descriptions', okText: '确认', cancelText: '取消', onOk: function () { var _onOk = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee13() { var res; return regenerator_default.a.wrap(function _callee13$(_context13) { while (1) { switch (_context13.prev = _context13.next) { case 0: _context13.next = 2; return Object(fetch["a" /* default */])("/api/ec_courses/".concat(params === null || params === void 0 ? void 0 : params.id, "/ec_course_standards/").concat(text), { method: 'delete' }); case 2: res = _context13.sent; if (res) { message["b" /* default */].info('删除成功'); getData(params); } case 4: case "end": return _context13.stop(); } } }, _callee13); })); function onOk() { return _onOk.apply(this, arguments); } return onOk; }(), onCancel: function onCancel() {} }); }, style: { marginRight: '5px', color: '#0152d9', cursor: 'pointer' }, className: "iconfont icon-shanchu9 pl10" })); } }] })), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { height: '20px', background: '#fafafa' } }), /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.title, style: { display: 'flex', justifyContent: 'space-between' } }, "\u8BFE\u7A0B\u76EE\u6807", /*#__PURE__*/external_window_React_default.a.createElement("span", null, /*#__PURE__*/external_window_React_default.a.createElement(es_button["a" /* default */], { disabled: isdisabled, type: "primary", style: { marginRight: '20px' }, onClick: /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee14() { var aa; return regenerator_default.a.wrap(function _callee14$(_context14) { while (1) { switch (_context14.prev = _context14.next) { case 0: _context14.next = 2; return getcourse_targets(params); case 2: if ((coursetargets === null || coursetargets === void 0 ? void 0 : coursetargets.length) <= 0) { aa = { id: 0, content: '', weight: '', standard_grade: '', graduation_subitem_ids: [''] }; coursetargets.push(aa); setcoursetargets(Object(toConsumableArray["a" /* default */])(coursetargets)); } setshowmodal(true); case 4: case "end": return _context14.stop(); } } }, _callee14); })) }, /*#__PURE__*/external_window_React_default.a.createElement("i", { style: { marginRight: '8px' }, className: "iconfont icon-bianji7" }), " \u7F16\u8F91\u8BFE\u7A0B\u76EE\u6807"))), /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.teachcount }, /*#__PURE__*/external_window_React_default.a.createElement(table["a" /* default */], { style: { marginTop: '20px', marginBottom: 20, padding: '0px 20px' }, dataSource: coursetargetslist, bordered: true, pagination: false, columns: [{ title: '分项', dataIndex: 'name', key: 'name', render: function render(text, record, index) { return params.per_page * (params.page - 1) + index + 1; } }, { title: '课程目标', dataIndex: 'content', width: '40%', key: 'content' }, { title: '权重', dataIndex: 'weight', key: 'weight' }, { title: '达成分值', dataIndex: 'standard_grade', key: 'standard_grade' }, { title: '对应毕业要求指标点', dataIndex: 'graduation_subitem', key: 'graduation_subitem', render: function render(text, record, index) { return /*#__PURE__*/external_window_React_default.a.createElement("div", null, /*#__PURE__*/external_window_React_default.a.createElement(list["b" /* default */], { itemLayout: "horizontal", dataSource: text, renderItem: function renderItem(item) { return /*#__PURE__*/external_window_React_default.a.createElement(list["b" /* default */].Item, null, /*#__PURE__*/external_window_React_default.a.createElement(list["b" /* default */].Item.Meta, { style: { fontSize: 14 }, description: '指标点' + (item === null || item === void 0 ? void 0 : item.index) + ':' + (item === null || item === void 0 ? void 0 : item.content) })); } })); } }] })), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { height: '20px', background: '#fafafa' } }), /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.title, style: { display: 'flex', justifyContent: 'space-between' } }, "\u8003\u6838\u65B9\u5F0F\u4E0E\u6570\u636E\u6765\u6E90", /*#__PURE__*/external_window_React_default.a.createElement("span", null, /*#__PURE__*/external_window_React_default.a.createElement(es_button["a" /* default */], { disabled: isdisabled, type: "primary", style: { marginRight: '20px' }, onClick: function onClick() { editCourseId.current = ''; setaddshow(true); } }, /*#__PURE__*/external_window_React_default.a.createElement("i", { style: { marginRight: '8px' }, className: "iconfont icon-tianjiatimu" }), " \u6DFB\u52A0\u8BFE\u5802\u6570\u636E"), /*#__PURE__*/external_window_React_default.a.createElement(es_button["a" /* default */], { disabled: isdisabled // type="primary" , style: { marginRight: '20px' }, onClick: function onClick() { editCourseId.current = ''; setexport(true); } }, /*#__PURE__*/external_window_React_default.a.createElement("i", { style: { marginRight: '8px' }, className: "iconfont icon-piliangdaoru" }), " \u5BFC\u5165\u6570\u636E"))), /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.teachcount }, !Evaluations && /*#__PURE__*/external_window_React_default.a.createElement(NoData["a" /* default */], null), Evaluations && /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { padding: '0px 20px', marginBottom: '20px', fontSize: '14px' } }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { display: 'flex', background: '#F5F5F5', height: '58px', border: '1px solid #E0E2EC', marginTop: '20px' } }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', width: '8%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' } }, "\u6570\u636E\u6765\u6E90"), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', width: '24%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' } }, "\u6559\u5B66\u8BFE\u5802/\u6570\u636E\u6587\u4EF6"), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { height: '100%', width: '42%', display: 'flex', flexShrink: 0, borderRight: '1px solid #E0E2EC' } }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', width: '30%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' } }, "\u8003\u6838\u65B9\u5F0F"), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', width: '56%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' } }, "\u8003\u6838\u5185\u5BB9"), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '14%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' } }, "\u6EE1\u5206\u503C")), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', width: '6%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' } }, "\u72B6\u6001"), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', width: '10%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' } }, "\u540C\u6B65/\u5BFC\u5165\u65F6\u95F4"), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '10%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' } }, "\u64CD\u4F5C")), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { border: '1px solid #E0E2EC', marginTop: -1 } }, Evaluations === null || Evaluations === void 0 ? void 0 : Evaluations.map(function (item) { var _item$contents, _item$contents$, _item$contents2, _item$contents2$, _item$contents3, _item$evaluation_meth, _item$evaluation_meth2; return /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { display: 'flex', width: '100%' } }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', width: '8%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' } }, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', width: '24%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' } }, (item === null || item === void 0 ? void 0 : item.name) === '导入数据' && /*#__PURE__*/external_window_React_default.a.createElement("a", { href: env["a" /* default */].API_SERVER + "/api/ec_courses/1/course_evaluations/download?id=".concat(item === null || item === void 0 ? void 0 : (_item$contents = item.contents) === null || _item$contents === void 0 ? void 0 : (_item$contents$ = _item$contents[0]) === null || _item$contents$ === void 0 ? void 0 : _item$contents$.attachment_id) // target="_blank" }, item === null || item === void 0 ? void 0 : (_item$contents2 = item.contents) === null || _item$contents2 === void 0 ? void 0 : (_item$contents2$ = _item$contents2[0]) === null || _item$contents2$ === void 0 ? void 0 : _item$contents2$.content), (item === null || item === void 0 ? void 0 : item.name) === '关联课堂' && (item === null || item === void 0 ? void 0 : (_item$contents3 = item.contents) === null || _item$contents3 === void 0 ? void 0 : _item$contents3.map(function (item) { return /*#__PURE__*/external_window_React_default.a.createElement("a", { style: { display: 'flex' }, href: item === null || item === void 0 ? void 0 : item.first_category_url, target: "_blank" }, item === null || item === void 0 ? void 0 : item.content); }))), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { height: '100%', width: '42%', display: 'flex', flexShrink: 0, borderRight: '1px solid #E0E2EC', flexDirection: 'column' } }, (item === null || item === void 0 ? void 0 : (_item$evaluation_meth = item.evaluation_methods) === null || _item$evaluation_meth === void 0 ? void 0 : _item$evaluation_meth.length) <= 0 && /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { height: '100%', width: '42%', display: 'flex', flexShrink: 0, borderRight: '1px solid #E0E2EC' } }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', width: '30%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' } }, "--"), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', width: '56%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' } }, "--"), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '14%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' } }, "--")), item === null || item === void 0 ? void 0 : (_item$evaluation_meth2 = item.evaluation_methods) === null || _item$evaluation_meth2 === void 0 ? void 0 : _item$evaluation_meth2.map(function (items, index) { var _item$evaluation_meth3, _items$subitems, _items$evaluation_met, _items$subitems2, _items$evaluation_met2; return /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '100%', display: 'flex', flexShrink: 0 } }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', width: '30%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center', borderBottom: !(index === (item === null || item === void 0 ? void 0 : (_item$evaluation_meth3 = item.evaluation_methods) === null || _item$evaluation_meth3 === void 0 ? void 0 : _item$evaluation_meth3.length) - 1) && '1px solid #E0E2EC' } }, items === null || items === void 0 ? void 0 : items.work_name), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '56%' } }, (items === null || items === void 0 ? void 0 : (_items$subitems = items.subitems) === null || _items$subitems === void 0 ? void 0 : _items$subitems.length) <= 0 && /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', borderBottom: '1px solid #E0E2EC', marginTop: -1, display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0, flexDirection: 'column', height: 30 } }, '--'), items === null || items === void 0 ? void 0 : (_items$evaluation_met = items.evaluation_method_contents) === null || _items$evaluation_met === void 0 ? void 0 : _items$evaluation_met.map(function (jtems, jndex) { var _item$evaluation_meth4; return /*#__PURE__*/external_window_React_default.a.createElement(tooltip["a" /* default */], { title: jtems === null || jtems === void 0 ? void 0 : jtems.name }, /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textone, style: { borderRight: '1px solid #E0E2EC', borderBottom: !(index === (item === null || item === void 0 ? void 0 : (_item$evaluation_meth4 = item.evaluation_methods) === null || _item$evaluation_meth4 === void 0 ? void 0 : _item$evaluation_meth4.length) - 1 && jndex === (items === null || items === void 0 ? void 0 : items.evaluation_method_contents.length) - 1) && '1px solid #E0E2EC', marginTop: -1, lineHeight: '30px', alignItems: 'center', justifyContent: 'center', flexShrink: 0, flexDirection: 'column', height: 30, paddingLeft: '5px' } }, jtems === null || jtems === void 0 ? void 0 : jtems.name)); })), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '14%' } }, (items === null || items === void 0 ? void 0 : (_items$subitems2 = items.subitems) === null || _items$subitems2 === void 0 ? void 0 : _items$subitems2.length) <= 0 && /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderBottom: '1px solid #E0E2EC', marginTop: -1, display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0, flexDirection: 'column', height: 30 } }, '--'), items === null || items === void 0 ? void 0 : (_items$evaluation_met2 = items.evaluation_method_contents) === null || _items$evaluation_met2 === void 0 ? void 0 : _items$evaluation_met2.map(function (jtems, jndex) { var _item$evaluation_meth5; return /*#__PURE__*/external_window_React_default.a.createElement(tooltip["a" /* default */], { title: jtems === null || jtems === void 0 ? void 0 : jtems.name }, /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textone, style: { borderBottom: !(index === (item === null || item === void 0 ? void 0 : (_item$evaluation_meth5 = item.evaluation_methods) === null || _item$evaluation_meth5 === void 0 ? void 0 : _item$evaluation_meth5.length) - 1 && jndex === (items === null || items === void 0 ? void 0 : items.evaluation_method_contents.length) - 1) && '1px solid #E0E2EC', marginTop: -1, lineHeight: '30px', alignItems: 'center', justifyContent: 'center', flexShrink: 0, flexDirection: 'column', height: 30, paddingLeft: '5px' } }, jtems === null || jtems === void 0 ? void 0 : jtems.score)); }))); })), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', width: '6%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center', color: '#07C160' } }, item === null || item === void 0 ? void 0 : item.status), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', width: '10%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' } }, item === null || item === void 0 ? void 0 : item.update_at), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '10%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' } }, (item === null || item === void 0 ? void 0 : item.status) != '已导入' && /*#__PURE__*/external_window_React_default.a.createElement("i", { onClick: /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee15() { var res; return regenerator_default.a.wrap(function _callee15$(_context15) { while (1) { switch (_context15.prev = _context15.next) { case 0: _context15.next = 2; return Object(fetch["a" /* default */])("/api/ec_courses/".concat(params.id, "/course_evaluations/update_online_data.json"), { method: 'get', params: { id: item.id } }); case 2: res = _context15.sent; if (res) { message["b" /* default */].info('同步成功'); getData(params); } case 4: case "end": return _context15.stop(); } } }, _callee15); })), style: { marginRight: '15px', color: '#0152d9', cursor: 'pointer' }, className: "iconfont icon-tongbushuju" }), /*#__PURE__*/external_window_React_default.a.createElement("i", { onClick: function onClick() { modal["a" /* default */].confirm({ title: '确认是否删除?', icon: /*#__PURE__*/external_window_React_default.a.createElement(ExclamationCircleOutlined["a" /* default */], null), // content: 'Some descriptions', okText: '确认', cancelText: '取消', onOk: function () { var _onOk2 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee16() { var res; return regenerator_default.a.wrap(function _callee16$(_context16) { while (1) { switch (_context16.prev = _context16.next) { case 0: _context16.next = 2; return Object(fetch["a" /* default */])("/api/ec_courses/".concat(params.id, "/course_evaluations/deletes.json"), { method: 'delete', body: { id: item.id } }); case 2: res = _context16.sent; if (res) { message["b" /* default */].info('删除成功'); getData(params); } case 4: case "end": return _context16.stop(); } } }, _callee16); })); function onOk() { return _onOk2.apply(this, arguments); } return onOk; }(), onCancel: function onCancel() {} }); }, style: { marginRight: '15px', color: '#0152d9', cursor: 'pointer' }, className: "iconfont icon-shanchu9" }), /*#__PURE__*/external_window_React_default.a.createElement("i", { onClick: function onClick() { editCourseId.current = item.id; if ((item === null || item === void 0 ? void 0 : item.status) != '已导入') { setitems(item); setaddshow(true); } else { setexport(true); } }, style: { marginRight: '5px', color: '#0152d9', cursor: 'pointer' }, className: "iconfont icon-bianji8" }))); })))), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { height: '20px', background: '#fafafa' } }), /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.title, style: { display: 'flex', justifyContent: 'space-between' } }, "\u8BFE\u7A0B\u76EE\u6807\u8FBE\u6210\u5EA6", /*#__PURE__*/external_window_React_default.a.createElement("span", null, /*#__PURE__*/external_window_React_default.a.createElement(es_button["a" /* default */], { disabled: isdisabled // type="primary" , style: { marginRight: '20px' }, onClick: function onClick() { setSettingmodal(true); } }, /*#__PURE__*/external_window_React_default.a.createElement("i", { style: { marginRight: '8px' }, className: "iconfont icon-kechengshezhi" }), " \u8BBE\u7F6E\u8003\u6838\u5360\u6BD4"), /*#__PURE__*/external_window_React_default.a.createElement(es_button["a" /* default */], { // type="primary" disabled: isdisabled, style: { marginRight: '20px' }, onClick: function onClick() { get_formulas(params.id); setCalculation(true); } }, /*#__PURE__*/external_window_React_default.a.createElement("i", { style: { marginRight: '8px' }, className: "iconfont icon-jisuangongshi" }), " \u8BBE\u7F6E\u8BA1\u7B97\u516C\u5F0F"), /*#__PURE__*/external_window_React_default.a.createElement(es_button["a" /* default */], { type: "primary", disabled: isdisabled, style: { marginRight: '20px' }, onClick: /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee17() { var res; return regenerator_default.a.wrap(function _callee17$(_context17) { while (1) { switch (_context17.prev = _context17.next) { case 0: _context17.next = 2; return Object(fetch["a" /* default */])("/api/ec_courses/".concat(params.id, "/evaluations/evaluation_data.json"), { method: 'post' }); case 2: res = _context17.sent; if (res) { message["b" /* default */].info('计算完成'); getevaluations(params); } case 4: case "end": return _context17.stop(); } } }, _callee17); })) }, /*#__PURE__*/external_window_React_default.a.createElement("i", { style: { marginRight: '8px' }, className: "iconfont icon-jisuan" }), " \u8BA1\u7B97"))), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { padding: '0px 20px' }, className: CurseSettingmodules_default.a.teachcount }, !evaluationslist && /*#__PURE__*/external_window_React_default.a.createElement(NoData["a" /* default */], null), evaluationslist && /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { fontSize: '14px' } }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { display: 'flex', background: '#F5F5F5', height: '58px', border: '1px solid #E0E2EC', marginTop: '20px' } }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', width: '4%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' } }, "\u5206\u9879"), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', width: '15%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' } }, "\u8BFE\u7A0B\u76EE\u6807"), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', width: '3%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' } }, "\u6743\u91CD"), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', width: '9%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' } }, "\u5BF9\u5E94\u6BD5\u4E1A\u8981\u6C42\u6307\u6807\u70B9"), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { height: '100%', width: '40%', display: 'flex', flexDirection: 'column', flexShrink: 0, borderRight: '1px solid #E0E2EC' } }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '100%', display: 'flex', flexShrink: 0, height: '100%' } }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '30%', borderRight: '1px solid #E0E2EC', display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0, flexDirection: 'column' } }, '考核方式'), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '12.5%', borderRight: '1px solid #E0E2EC', display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0, flexDirection: 'column', textAlign: 'center' } }, '考核方式占比'), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '45%', height: '100%' } }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0, flexDirection: 'column', height: '100%' } }, '考核内容')), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '12.5%', height: '100%' } }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0, flexDirection: 'column', height: '100%', textAlign: 'center' } }, '考核内容占比')))), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', width: '8%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center', textAlignLast: 'center' } }, "\u8FBE\u6210\u5206\u503C\uFF08\u767E\u5206\u5236\uFF09"), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', width: '7%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center', textAlignLast: 'center' } }, "\u5B9E\u9645\u5206\u503C\uFF08\u767E\u5206\u5236\uFF09"), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', width: '6%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' } }, "\u8BC4\u4EF7\u7ED3\u679C"), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '8%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' } }, "\u8BA1\u7B97\u65F6\u95F4")), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderLeft: '1px solid #E0E2EC' } }, evaluationslist === null || evaluationslist === void 0 ? void 0 : (_evaluationslist$ec_c = evaluationslist.ec_course_target) === null || _evaluationslist$ec_c === void 0 ? void 0 : _evaluationslist$ec_c.map(function (item, index) { var _item$evaluation, _item$evaluation2, _item$evaluation3, _item$graduation_subi, _item$evaluation4, _item$evaluation5; return /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { height: '100%', display: 'flex' } }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '4%', borderRight: '1px solid #E0E2EC', borderBottom: '1px solid #E0E2EC', marginTop: -1, display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0 } }, index + 1), /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textone, style: { width: '15%', borderRight: '1px solid #E0E2EC', borderBottom: '1px solid #E0E2EC', marginTop: -1, alignItems: 'center', justifyContent: 'center', flexShrink: 0, maxHeight: (item === null || item === void 0 ? void 0 : (_item$evaluation = item.evaluation) === null || _item$evaluation === void 0 ? void 0 : _item$evaluation.length) <= 0 && 43, lineHeight: (item === null || item === void 0 ? void 0 : (_item$evaluation2 = item.evaluation) === null || _item$evaluation2 === void 0 ? void 0 : _item$evaluation2.length) <= 0 && '43px', display: (item === null || item === void 0 ? void 0 : (_item$evaluation3 = item.evaluation) === null || _item$evaluation3 === void 0 ? void 0 : _item$evaluation3.length) != 0 && 'flex', paddingLeft: 10 } }, /*#__PURE__*/external_window_React_default.a.createElement(tooltip["a" /* default */], { title: item.content }, item.content)), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '3%', borderRight: '1px solid #E0E2EC', borderBottom: '1px solid #E0E2EC', marginTop: -1, display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0 } }, item.weights), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '9%', borderRight: '1px solid #E0E2EC', borderBottom: '1px solid #E0E2EC', marginTop: -1, display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0 } }, item === null || item === void 0 ? void 0 : (_item$graduation_subi = item.graduation_subitem) === null || _item$graduation_subi === void 0 ? void 0 : _item$graduation_subi.map(function (graduation_subitemitem) { return graduation_subitemitem.name; }).toString()), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { height: '100%', width: '40%', display: 'flex', flexDirection: 'column', flexShrink: 0, borderRight: '1px solid #E0E2EC' } }, (item === null || item === void 0 ? void 0 : (_item$evaluation4 = item.evaluation) === null || _item$evaluation4 === void 0 ? void 0 : _item$evaluation4.length) <= 0 && /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '100%', display: 'flex', flexShrink: 0 } }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '30%', borderRight: '1px solid #E0E2EC', borderBottom: '1px solid #E0E2EC', marginTop: -1, display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0, flexDirection: 'column' } }, '--'), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '12.6%', borderRight: '1px solid #E0E2EC', borderBottom: '1px solid #E0E2EC', marginTop: -1, display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0, flexDirection: 'column' } }, '--'), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '45.3%' } }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', borderBottom: '1px solid #E0E2EC', marginTop: -1, display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0, flexDirection: 'column', height: 43 } }, '--')), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '12.5%' } }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderBottom: '1px solid #E0E2EC', marginTop: -1, display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0, flexDirection: 'column', height: 43 } }, '--'))), item === null || item === void 0 ? void 0 : (_item$evaluation5 = item.evaluation) === null || _item$evaluation5 === void 0 ? void 0 : _item$evaluation5.map(function (evaluationitem, evaluationindex) { var _evaluationitem$subit, _evaluationitem$subit2, _evaluationitem$subit3, _evaluationitem$subit4; return /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '100%', display: 'flex', flexShrink: 0 } }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '30%', borderRight: '1px solid #E0E2EC', borderBottom: '1px solid #E0E2EC', marginTop: -1, display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0 } }, (evaluationitem === null || evaluationitem === void 0 ? void 0 : evaluationitem.work_name) || '--'), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '12.5%', borderRight: '1px solid #E0E2EC', borderBottom: '1px solid #E0E2EC', marginTop: -1, display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0 } }, (evaluationitem === null || evaluationitem === void 0 ? void 0 : evaluationitem.weight) || '--'), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '45%' } }, (evaluationitem === null || evaluationitem === void 0 ? void 0 : (_evaluationitem$subit = evaluationitem.subitems) === null || _evaluationitem$subit === void 0 ? void 0 : _evaluationitem$subit.length) <= 0 && /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', borderBottom: '1px solid #E0E2EC', marginTop: -1, display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0, height: 43 } }, '--'), evaluationitem === null || evaluationitem === void 0 ? void 0 : (_evaluationitem$subit2 = evaluationitem.subitems) === null || _evaluationitem$subit2 === void 0 ? void 0 : _evaluationitem$subit2.map(function (subitems, subitemsindex) { return /*#__PURE__*/external_window_React_default.a.createElement(tooltip["a" /* default */], { title: subitems === null || subitems === void 0 ? void 0 : subitems.name }, /*#__PURE__*/external_window_React_default.a.createElement("div", { className: CurseSettingmodules_default.a.textone, style: { borderRight: '1px solid #E0E2EC', borderBottom: '1px solid #E0E2EC', marginTop: -1, lineHeight: '43px', alignItems: 'center', justifyContent: 'center', flexShrink: 0, flexDirection: 'column', height: 43, paddingLeft: '5px' } }, subitems === null || subitems === void 0 ? void 0 : subitems.name)); })), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '12.5%' } }, (evaluationitem === null || evaluationitem === void 0 ? void 0 : (_evaluationitem$subit3 = evaluationitem.subitems) === null || _evaluationitem$subit3 === void 0 ? void 0 : _evaluationitem$subit3.length) <= 0 && /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderBottom: '1px solid #E0E2EC', marginTop: -1, display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0, flexDirection: 'column', height: 43 } }, '--'), evaluationitem === null || evaluationitem === void 0 ? void 0 : (_evaluationitem$subit4 = evaluationitem.subitems) === null || _evaluationitem$subit4 === void 0 ? void 0 : _evaluationitem$subit4.map(function (subitems, subitemsindex) { return /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderBottom: '1px solid #E0E2EC', marginTop: -1, display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0, flexDirection: 'column', height: 43 } }, subitems === null || subitems === void 0 ? void 0 : subitems.weight); }))); })), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '8%', borderRight: '1px solid #E0E2EC', borderBottom: '1px solid #E0E2EC', marginTop: -1, display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0 } }, item === null || item === void 0 ? void 0 : item.standard_grade), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '7%', borderRight: '1px solid #E0E2EC', borderBottom: '1px solid #E0E2EC', marginTop: -1, display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0 } }, item === null || item === void 0 ? void 0 : item.actual_grade), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '6%', borderRight: '1px solid #E0E2EC', borderBottom: '1px solid #E0E2EC', marginTop: -1, display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0, color: item !== null && item !== void 0 && item.statue ? '#07C160' : '#E30000' } }, item !== null && item !== void 0 && item.status ? '达成' : '未达成'), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { width: '8%', borderRight: '1px solid #E0E2EC', borderBottom: '1px solid #E0E2EC', marginTop: -1, display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0, textAlign: 'center' } }, evaluationslist === null || evaluationslist === void 0 ? void 0 : evaluationslist.evaluation_time)); })), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { display: 'flex', height: '58px', border: '1px solid #E0E2EC', marginTop: -1 } }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', width: '4%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' } }, "\u603B\u5206"), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', width: '75%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' } }), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { borderRight: '1px solid #E0E2EC', width: '7%', textAlign: 'center', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' } }, evaluationslist === null || evaluationslist === void 0 ? void 0 : evaluationslist.total_score)))), /*#__PURE__*/external_window_React_default.a.createElement(AddCourseModal, { courseId: editCourseId.current, isshow: addshow, setishow: setaddshow, items: items, modalparams: params, getevaluations: getevaluations, getcourse_evaluations: getcourse_evaluations }), /*#__PURE__*/external_window_React_default.a.createElement(SettingModal, { isshow: Settingmodal, setishow: setSettingmodal, modalparams: params, getcourse_evaluations: getevaluations }), /*#__PURE__*/external_window_React_default.a.createElement(modal["a" /* default */], { title: "\u7F16\u8F91\u8BFE\u7A0B\u76EE\u6807", visible: showmodal, wrapClassName: CurseSettingmodules_default.a.modalWrapContainer, width: 918, okText: "\u4FDD\u5B58", onOk: /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee18() { var res; return regenerator_default.a.wrap(function _callee18$(_context18) { while (1) { switch (_context18.prev = _context18.next) { case 0: if (!((coursetargets === null || coursetargets === void 0 ? void 0 : coursetargets.filter(function (item) { var _item$graduation_subi2, _item$graduation_subi3; return !item.content || !item.weight || !item.standard_grade || (item === null || item === void 0 ? void 0 : (_item$graduation_subi2 = item.graduation_subitem_ids) === null || _item$graduation_subi2 === void 0 ? void 0 : _item$graduation_subi2.length) <= 0 || (item === null || item === void 0 ? void 0 : (_item$graduation_subi3 = item.graduation_subitem_ids) === null || _item$graduation_subi3 === void 0 ? void 0 : _item$graduation_subi3.filter(function (items) { return !items; }).length) > 0; }).length) > 0)) { _context18.next = 3; break; } message["b" /* default */].info('请填写或删除没有填入数值的数据'); return _context18.abrupt("return"); case 3: _context18.next = 5; return Object(fetch["a" /* default */])("/api/ec_courses/".concat(params === null || params === void 0 ? void 0 : params.id, "/course_targets"), { method: 'POST', body: { course_targets: coursetargets } }); case 5: res = _context18.sent; if ((res === null || res === void 0 ? void 0 : res.status) === 0) { setshowmodal(false); getcourse_targets(params); getevaluations(params); } // console.log(coursetargets?.filter((item:any)=>!item.content||!item.weight||!item.standard_grade||item?.graduation_subitem_ids?.length<=0||item?.graduation_subitem_ids?.filter((items:any)=>!items))); case 7: case "end": return _context18.stop(); } } }, _callee18); })), onCancel: function onCancel() { setshowmodal(false); getcourse_targets(params); } }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { color: '#464F66', fontSize: 14, paddingLeft: 40, paddingBottom: 12 } }, /*#__PURE__*/external_window_React_default.a.createElement("div", null, "\u8BF4\u660E\uFF1A"), /*#__PURE__*/external_window_React_default.a.createElement("div", null, "1.\u8BFE\u7A0B\u76EE\u6807\u7684\u6743\u91CD\u4E4B\u548C\u5E94\u7B49\u4E8E1\uFF1B", /*#__PURE__*/external_window_React_default.a.createElement("br", null), "2.\u53EF\u5728\u8BBE\u7F6E\u8BFE\u7A0B\u8FBE\u6210\u5EA6\u8BA1\u7B97\u516C\u5F0F\u65F6\uFF0C\u9009\u62E9\u662F\u5426\u5C06\u8BFE\u7A0B\u76EE\u6807\u7684\u6743\u91CD\u53C2\u4E0E\u5230\u8BA1\u7B97\u4E2D\u3002")), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { display: 'flex', background: '#F5F5F5', height: '38px', alignItems: 'center', padding: '0px 10px' } }, /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { flex: 1 } }, "\u5206\u9879"), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { flex: 3 } }, /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { color: '#EE0A24', marginRight: '5px' } }, "*"), "\u8BFE\u7A0B\u76EE\u6807"), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { flex: 2 } }, /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { color: '#EE0A24', marginRight: '5px' } }, "*"), "\u6743\u91CD"), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { flex: 2 } }, /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { color: '#EE0A24', marginRight: '5px' } }, "*"), "\u8FBE\u6210\u5206\u503C\uFF08\u5206\uFF09")), coursetargets === null || coursetargets === void 0 ? void 0 : coursetargets.map(function (item, index) { var _item$graduation_subi4; return /*#__PURE__*/external_window_React_default.a.createElement("div", null, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { display: 'flex', background: '#EEF2F8', height: '62px', alignItems: 'center', padding: '0px 10px' } }, /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { flex: 1 } }, index + 1), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { flex: 3, padding: '0px 10px' } }, /*#__PURE__*/external_window_React_default.a.createElement(input["a" /* default */], { onChange: function onChange(e) { item.content = e.target.value; setcoursetargets(Object(toConsumableArray["a" /* default */])(coursetargets)); }, value: item === null || item === void 0 ? void 0 : item.content })), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { flex: 2 } }, /*#__PURE__*/external_window_React_default.a.createElement(input_number["a" /* default */], { min: 0, max: 1, step: 0.1, onChange: function onChange(e) { item.weight = e; setcoursetargets(Object(toConsumableArray["a" /* default */])(coursetargets)); }, value: item === null || item === void 0 ? void 0 : item.weight })), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { flex: 2 } }, /*#__PURE__*/external_window_React_default.a.createElement(input_number["a" /* default */], { min: 0, max: 100, onChange: function onChange(e) { item.standard_grade = e; setcoursetargets(Object(toConsumableArray["a" /* default */])(coursetargets)); }, value: item === null || item === void 0 ? void 0 : item.standard_grade }), /*#__PURE__*/external_window_React_default.a.createElement(tooltip["a" /* default */], { title: '新增课程目标' }, /*#__PURE__*/external_window_React_default.a.createElement("i", { style: { color: '#0152D9', cursor: 'pointer', marginLeft: '10px' }, className: 'iconfont icon-xinzeng', onClick: /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee19() { var aa; return regenerator_default.a.wrap(function _callee19$(_context19) { while (1) { switch (_context19.prev = _context19.next) { case 0: aa = { id: 0, content: '', weight: '', standard_grade: '', graduation_subitem_ids: [''] }; coursetargets.push(aa); setcoursetargets(Object(toConsumableArray["a" /* default */])(coursetargets)); case 3: case "end": return _context19.stop(); } } }, _callee19); })) })), index !== 0 && /*#__PURE__*/external_window_React_default.a.createElement(tooltip["a" /* default */], { title: "\u5220\u9664" }, /*#__PURE__*/external_window_React_default.a.createElement("i", { onClick: /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee20() { return regenerator_default.a.wrap(function _callee20$(_context20) { while (1) { switch (_context20.prev = _context20.next) { case 0: coursetargets.splice(index, 1); setcoursetargets(Object(toConsumableArray["a" /* default */])(coursetargets)); case 2: case "end": return _context20.stop(); } } }, _callee20); })), style: { color: '#0152D9', cursor: 'pointer', marginLeft: '10px' }, className: "iconfont icon-shanchu9" })))), /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { display: 'flex', padding: '0px 10px' } }, /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { flex: 1 } }), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { flex: 3 } }, ' ', /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { color: '#EE0A24', marginRight: '5px' } }, "*"), ' ', "\u5BF9\u5E94\u6BD5\u4E1A\u8981\u6C42\u6307\u6807\u70B9", ' '), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { flex: 2 } }), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { flex: 2 } })), item === null || item === void 0 ? void 0 : (_item$graduation_subi4 = item.graduation_subitem_ids) === null || _item$graduation_subi4 === void 0 ? void 0 : _item$graduation_subi4.map(function (items, j) { return /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { display: 'flex', height: '40px', alignItems: 'center', padding: '0px 10px' } }, /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { flex: 1 } }), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { flex: 3, display: 'flex', alignItems: 'center' } }, /*#__PURE__*/external_window_React_default.a.createElement(es_select["a" /* default */], { value: items, getPopupContainer: function getPopupContainer(trigger) { return trigger.parentNode; }, onChange: function onChange(e) { item.graduation_subitem_ids[j] = e; setcoursetargets(Object(toConsumableArray["a" /* default */])(coursetargets)); }, style: { width: '320px' } }, SelectList === null || SelectList === void 0 ? void 0 : SelectList.map(function (jitems, h) { return /*#__PURE__*/external_window_React_default.a.createElement(es_select["a" /* default */].Option, { disabled: item.graduation_subitem_ids.includes(jitems === null || jitems === void 0 ? void 0 : jitems.id), value: jitems === null || jitems === void 0 ? void 0 : jitems.id, title: "\u6307\u6807\u70B9" + (jitems === null || jitems === void 0 ? void 0 : jitems.index) + "\uFF1A" + (jitems === null || jitems === void 0 ? void 0 : jitems.content) }, "\u6307\u6807\u70B9", jitems === null || jitems === void 0 ? void 0 : jitems.index, "\uFF1A", jitems === null || jitems === void 0 ? void 0 : jitems.content); })), /*#__PURE__*/external_window_React_default.a.createElement(tooltip["a" /* default */], { title: '新增指标点' }, /*#__PURE__*/external_window_React_default.a.createElement("i", { style: { color: '#0152D9', cursor: 'pointer', marginLeft: '10px' }, className: 'iconfont icon-xinzeng', onClick: /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee21() { return regenerator_default.a.wrap(function _callee21$(_context21) { while (1) { switch (_context21.prev = _context21.next) { case 0: item === null || item === void 0 ? void 0 : item.graduation_subitem_ids.push(''); setcoursetargets(Object(toConsumableArray["a" /* default */])(coursetargets)); case 2: case "end": return _context21.stop(); } } }, _callee21); })) })), j !== 0 && /*#__PURE__*/external_window_React_default.a.createElement(tooltip["a" /* default */], { title: "\u5220\u9664" }, /*#__PURE__*/external_window_React_default.a.createElement("i", { onClick: /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee22() { return regenerator_default.a.wrap(function _callee22$(_context22) { while (1) { switch (_context22.prev = _context22.next) { case 0: item.graduation_subitem_ids.splice(j, 1); setcoursetargets(Object(toConsumableArray["a" /* default */])(coursetargets)); case 2: case "end": return _context22.stop(); } } }, _callee22); })), style: { color: '#0152D9', cursor: 'pointer', marginLeft: '10px' }, className: "iconfont icon-shanchu9" }))), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { flex: 2 } }), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { flex: 1 } })); })); })), /*#__PURE__*/external_window_React_default.a.createElement(modal["a" /* default */], { title: "\u8BBE\u7F6E\u8BA1\u7B97\u516C\u5F0F", visible: Calculation, width: 918, className: CurseSettingmodules_default.a.modalWrapContainer, onCancel: function onCancel() { setCalculation(false); }, onOk: /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee23() { var _formulas$ec_course_t, _formulas$ec_course_t2, _formulas$ec_course_f, _formulas$ec_course_f2; var res; return regenerator_default.a.wrap(function _callee23$(_context23) { while (1) { switch (_context23.prev = _context23.next) { case 0: _context23.next = 2; return Object(fetch["a" /* default */])("/api/ec_years/1/ec_courses/save_formulas.json", { method: 'post', body: { ec_course_id: params.id, ec_course_target_formula_id: formulas === null || formulas === void 0 ? void 0 : (_formulas$ec_course_t = formulas.ec_course_target_formulas.filter(function (item) { return item.checked; })) === null || _formulas$ec_course_t === void 0 ? void 0 : (_formulas$ec_course_t2 = _formulas$ec_course_t[0]) === null || _formulas$ec_course_t2 === void 0 ? void 0 : _formulas$ec_course_t2.id, ec_course_formula_id: formulas === null || formulas === void 0 ? void 0 : (_formulas$ec_course_f = formulas.ec_course_formulas.filter(function (item) { return item.checked; })) === null || _formulas$ec_course_f === void 0 ? void 0 : (_formulas$ec_course_f2 = _formulas$ec_course_f[0]) === null || _formulas$ec_course_f2 === void 0 ? void 0 : _formulas$ec_course_f2.id } }); case 2: res = _context23.sent; if (res) { setCalculation(false); get_formulas(params.id); } case 4: case "end": return _context23.stop(); } } }, _callee23); })) }, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { padding: '16px 40px' } }, /*#__PURE__*/external_window_React_default.a.createElement(tabs["a" /* default */], { activeKey: currt, onChange: function onChange(e) { setcurrt(e); } }, /*#__PURE__*/external_window_React_default.a.createElement(tabs["a" /* default */].TabPane, { key: 1, tab: "\u8BFE\u7A0B\u76EE\u6807\u5B9E\u9645\u5206\u503C" }), /*#__PURE__*/external_window_React_default.a.createElement(tabs["a" /* default */].TabPane, { key: 2, tab: "\u8BFE\u7A0B\u603B\u5206" }))), currt === '1' && /*#__PURE__*/external_window_React_default.a.createElement("div", null, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { display: 'flex', height: 38, background: '#F5F5F5', lineHeight: '38px', padding: '0px 40px' } }, /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { flex: 1, marginRight: '30px' } }, "\u8BFE\u7A0B\u76EE\u6807\u5B9E\u9645\u5206\u503C\u8BA1\u7B97\u516C\u5F0F"), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 185 } }, "\u64CD\u4F5C")), formulas === null || formulas === void 0 ? void 0 : (_formulas$ec_course_t3 = formulas.ec_course_target_formulas) === null || _formulas$ec_course_t3 === void 0 ? void 0 : _formulas$ec_course_t3.map(function (item, index) { return /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { display: 'flex', padding: '20px 40px' } }, (item === null || item === void 0 ? void 0 : item.checked) && /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: '40px', borderRadius: '2px', color: '#0152D9', border: '1px solid #0152D9', display: "inline-flex", alignItems: 'center', justifyContent: 'center', marginRight: '10px', height: '22px' } }, "\u9ED8\u8BA4"), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { flex: 1, marginRight: '30px', marginLeft: !(item !== null && item !== void 0 && item.checked) && '50px' } }, /*#__PURE__*/external_window_React_default.a.createElement("p", null, item === null || item === void 0 ? void 0 : item.content), (item === null || item === void 0 ? void 0 : item.explain) && /*#__PURE__*/external_window_React_default.a.createElement("p", null, "\u8BF4\u660E\uFF1A", item === null || item === void 0 ? void 0 : item.explain)), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 185 } }, /*#__PURE__*/external_window_React_default.a.createElement(es_radio["a" /* default */], { onClick: function onClick() { formulas === null || formulas === void 0 ? void 0 : formulas.ec_course_target_formulas.map(function (items) { if (item.id === items.id) { items.checked = true; } else { items.checked = false; } }); setformulas(Object(objectSpread2["a" /* default */])({}, formulas)); }, checked: item === null || item === void 0 ? void 0 : item.checked }, ' ', "\u8BBE\u4E3A\u9ED8\u8BA4\u516C\u5F0F"))); })), currt === '2' && /*#__PURE__*/external_window_React_default.a.createElement("div", null, /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { display: 'flex', height: 38, background: '#F5F5F5', lineHeight: '38px', padding: '0px 40px' } }, /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { flex: 1 } }, "\u8BFE\u7A0B\u603B\u5206\u8BA1\u7B97\u516C\u5F0F"), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 185 } }, "\u64CD\u4F5C")), formulas === null || formulas === void 0 ? void 0 : (_formulas$ec_course_f3 = formulas.ec_course_formulas) === null || _formulas$ec_course_f3 === void 0 ? void 0 : _formulas$ec_course_f3.map(function (item, index) { return /*#__PURE__*/external_window_React_default.a.createElement("div", { style: { display: 'flex', padding: '20px 40px' } }, (item === null || item === void 0 ? void 0 : item.checked) && /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: '40px', borderRadius: '2px', color: '#0152D9', border: '1px solid #0152D9', display: "inline-flex", alignItems: 'center', justifyContent: 'center', marginRight: '10px', height: '22px' } }, "\u9ED8\u8BA4"), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { flex: 1, marginRight: '30px', marginLeft: !(item !== null && item !== void 0 && item.checked) && '50px' } }, /*#__PURE__*/external_window_React_default.a.createElement("p", null, item === null || item === void 0 ? void 0 : item.content), (item === null || item === void 0 ? void 0 : item.explain) && /*#__PURE__*/external_window_React_default.a.createElement("p", null, "\u8BF4\u660E\uFF1A", item === null || item === void 0 ? void 0 : item.explain)), /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { width: 185 } }, /*#__PURE__*/external_window_React_default.a.createElement(es_radio["a" /* default */], { onClick: function onClick() { formulas === null || formulas === void 0 ? void 0 : formulas.ec_course_formulas.map(function (items) { if (item.id === items.id) { items.checked = true; } else { items.checked = false; } }); setformulas(Object(objectSpread2["a" /* default */])({}, formulas)); }, checked: item === null || item === void 0 ? void 0 : item.checked }, ' ', "\u8BBE\u4E3A\u9ED8\u8BA4\u516C\u5F0F"))); }))), /*#__PURE__*/external_window_React_default.a.createElement(modal["a" /* default */], { title: "\u6279\u91CF\u5BFC\u5165", visible: exportshow, centered: true, onCancel: function onCancel() { setexport(false); setFileList([]); }, okButtonProps: { loading: loadings }, onOk: /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee24() { var formData, url, res; return regenerator_default.a.wrap(function _callee24$(_context24) { while (1) { switch (_context24.prev = _context24.next) { case 0: formData = new FormData(); if (!(fileList.length > 0)) { _context24.next = 5; break; } formData.append('file', fileList[0]); _context24.next = 7; break; case 5: message["b" /* default */].warn("请选择文件"); return _context24.abrupt("return"); case 7: if (params.id) { _context24.next = 10; break; } message["b" /* default */].info('请先创建课程'); return _context24.abrupt("return"); case 10: setloading(true); formData.append('ec_course_id', params.id); if (editCourseId.current) { formData.append('id', editCourseId.current); } url = editCourseId.current ? "/api/ec_courses/".concat(params.id, "/course_evaluations/update_offline.json") : "/api/ec_courses/".concat(params.id, "/course_evaluations/create_offline.json"); _context24.next = 16; return Object(fetch["a" /* default */])(url, { method: editCourseId.current ? 'put' : 'post', body: formData }, true); case 16: res = _context24.sent; setloading(false); if ((res === null || res === void 0 ? void 0 : res.status) === 0) { message["b" /* default */].info('添加成功'); setexport(false); setFileList([]); getcourse_evaluations(params); } case 19: case "end": return _context24.stop(); } } }, _callee24); })) }, /*#__PURE__*/external_window_React_default.a.createElement("p", null, "\u6B65\u9AA41\uFF1A\u4E0B\u8F7D", /*#__PURE__*/external_window_React_default.a.createElement("a", { href: env["a" /* default */].API_SERVER + "/api/ec_courses/1/course_evaluations/download_template.xlsx", download: "\u6A21\u7248.xlsx" }, "\u660E\u7EC6\u6210\u7EE9\u5BFC\u5165\u6A21\u677F"), ",\u5BFC\u5165\u7EBF\u4E0B\u6570\u636E\u5185\u5BB9\u3002", /*#__PURE__*/external_window_React_default.a.createElement("span", { style: { color: '#D95201' } }, "\u6CE8\uFF1A\u76EE\u524D\u4EC5\u652F\u6301Excel\u683C\u5F0F\u6A21\u677F")), /*#__PURE__*/external_window_React_default.a.createElement(row["a" /* default */], null, /*#__PURE__*/external_window_React_default.a.createElement(col["a" /* default */], null, "\u6B65\u9AA42\uFF1A"), /*#__PURE__*/external_window_React_default.a.createElement(col["a" /* default */], null, /*#__PURE__*/external_window_React_default.a.createElement(upload["a" /* default */], addDraggers, /*#__PURE__*/external_window_React_default.a.createElement(es_button["a" /* default */], { type: "primary" }, "\u9009\u62E9\u6587\u4EF6"))))), /*#__PURE__*/external_window_React_default.a.createElement(PreviewAll["a" /* default */], Object(esm_extends["a" /* default */])({}, preview, { onClose: function onClose() { setPreview(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, preview), {}, { type: '' })); } }))); }; /* harmony default export */ var CurseSetting = __webpack_exports__["default"] = (Object(umiExports["a" /* connect */])(function (_ref23) { var user = _ref23.user; return { user: user }; })(CurseSetting_Page)); /***/ }), /***/ "6+eU": /*!************************************************************!*\ !*** ./node_modules/rc-pagination/es/index.js + 4 modules ***! \************************************************************/ /*! exports provided: default */ /*! exports used: default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-pagination/es/locale/zh_CN.js */ /*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ es_Pagination; }); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__("wx14"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js var defineProperty = __webpack_require__("rePB"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js var objectSpread2 = __webpack_require__("VTBJ"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js var classCallCheck = __webpack_require__("1OyB"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js var createClass = __webpack_require__("vuIU"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js var inherits = __webpack_require__("Ji7U"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 1 modules var createSuper = __webpack_require__("LK+K"); // EXTERNAL MODULE: external "window.React" var external_window_React_ = __webpack_require__("cDcd"); var external_window_React_default = /*#__PURE__*/__webpack_require__.n(external_window_React_); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__("TSYQ"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // CONCATENATED MODULE: ./node_modules/rc-pagination/es/Pager.js /* eslint react/prop-types: 0 */ var Pager_Pager = function Pager(props) { var _classNames; var prefixCls = "".concat(props.rootPrefixCls, "-item"); var cls = classnames_default()(prefixCls, "".concat(prefixCls, "-").concat(props.page), (_classNames = {}, Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-active"), props.active), Object(defineProperty["a" /* default */])(_classNames, props.className, !!props.className), Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-disabled"), !props.page), _classNames)); var handleClick = function handleClick() { props.onClick(props.page); }; var handleKeyPress = function handleKeyPress(e) { props.onKeyPress(e, props.onClick, props.page); }; return /*#__PURE__*/external_window_React_default.a.createElement("li", { title: props.showTitle ? props.page : null, className: cls, onClick: handleClick, onKeyPress: handleKeyPress, tabIndex: "0" }, props.itemRender(props.page, 'page', /*#__PURE__*/external_window_React_default.a.createElement("a", { rel: "nofollow" }, props.page))); }; /* harmony default export */ var es_Pager = (Pager_Pager); // CONCATENATED MODULE: ./node_modules/rc-pagination/es/KeyCode.js /* harmony default export */ var KeyCode = ({ ZERO: 48, NINE: 57, NUMPAD_ZERO: 96, NUMPAD_NINE: 105, BACKSPACE: 8, DELETE: 46, ENTER: 13, ARROW_UP: 38, ARROW_DOWN: 40 }); // CONCATENATED MODULE: ./node_modules/rc-pagination/es/Options.js /* eslint react/prop-types: 0 */ var Options_Options = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(Options, _React$Component); var _super = Object(createSuper["a" /* default */])(Options); function Options() { var _this; Object(classCallCheck["a" /* default */])(this, Options); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _super.call.apply(_super, [this].concat(args)); _this.state = { goInputText: '' }; _this.buildOptionText = function (value) { return "".concat(value, " ").concat(_this.props.locale.items_per_page); }; _this.changeSize = function (value) { _this.props.changeSize(Number(value)); }; _this.handleChange = function (e) { _this.setState({ goInputText: e.target.value }); }; _this.handleBlur = function (e) { var _this$props = _this.props, goButton = _this$props.goButton, quickGo = _this$props.quickGo, rootPrefixCls = _this$props.rootPrefixCls; var goInputText = _this.state.goInputText; if (goButton || goInputText === '') { return; } if (e.relatedTarget && (e.relatedTarget.className.indexOf("".concat(rootPrefixCls, "-prev")) >= 0 || e.relatedTarget.className.indexOf("".concat(rootPrefixCls, "-next")) >= 0)) { return; } _this.setState({ goInputText: '' }); quickGo(_this.getValidValue()); }; _this.go = function (e) { var goInputText = _this.state.goInputText; if (goInputText === '') { return; } if (e.keyCode === KeyCode.ENTER || e.type === 'click') { _this.setState({ goInputText: '' }); _this.props.quickGo(_this.getValidValue()); } }; return _this; } Object(createClass["a" /* default */])(Options, [{ key: "getValidValue", value: function getValidValue() { var _this$state = this.state, goInputText = _this$state.goInputText, current = _this$state.current; // eslint-disable-next-line no-restricted-globals return !goInputText || isNaN(goInputText) ? current : Number(goInputText); } }, { key: "getPageSizeOptions", value: function getPageSizeOptions() { var _this$props2 = this.props, pageSize = _this$props2.pageSize, pageSizeOptions = _this$props2.pageSizeOptions; if (pageSizeOptions.some(function (option) { return option.toString() === pageSize.toString(); })) { return pageSizeOptions; } return pageSizeOptions.concat([pageSize.toString()]).sort(function (a, b) { // eslint-disable-next-line no-restricted-globals var numberA = isNaN(Number(a)) ? 0 : Number(a); // eslint-disable-next-line no-restricted-globals var numberB = isNaN(Number(b)) ? 0 : Number(b); return numberA - numberB; }); } }, { key: "render", value: function render() { var _this2 = this; var _this$props3 = this.props, pageSize = _this$props3.pageSize, locale = _this$props3.locale, rootPrefixCls = _this$props3.rootPrefixCls, changeSize = _this$props3.changeSize, quickGo = _this$props3.quickGo, goButton = _this$props3.goButton, selectComponentClass = _this$props3.selectComponentClass, buildOptionText = _this$props3.buildOptionText, selectPrefixCls = _this$props3.selectPrefixCls, disabled = _this$props3.disabled; var goInputText = this.state.goInputText; var prefixCls = "".concat(rootPrefixCls, "-options"); var Select = selectComponentClass; var changeSelect = null; var goInput = null; var gotoButton = null; if (!changeSize && !quickGo) { return null; } var pageSizeOptions = this.getPageSizeOptions(); if (changeSize && Select) { var options = pageSizeOptions.map(function (opt, i) { return /*#__PURE__*/external_window_React_default.a.createElement(Select.Option, { key: i, value: opt.toString() }, (buildOptionText || _this2.buildOptionText)(opt)); }); changeSelect = /*#__PURE__*/external_window_React_default.a.createElement(Select, { disabled: disabled, prefixCls: selectPrefixCls, showSearch: false, className: "".concat(prefixCls, "-size-changer"), optionLabelProp: "children", dropdownMatchSelectWidth: false, value: (pageSize || pageSizeOptions[0]).toString(), onChange: this.changeSize, getPopupContainer: function getPopupContainer(triggerNode) { return triggerNode.parentNode; } }, options); } if (quickGo) { if (goButton) { gotoButton = typeof goButton === 'boolean' ? /*#__PURE__*/external_window_React_default.a.createElement("button", { type: "button", onClick: this.go, onKeyUp: this.go, disabled: disabled, className: "".concat(prefixCls, "-quick-jumper-button") }, locale.jump_to_confirm) : /*#__PURE__*/external_window_React_default.a.createElement("span", { onClick: this.go, onKeyUp: this.go }, goButton); } goInput = /*#__PURE__*/external_window_React_default.a.createElement("div", { className: "".concat(prefixCls, "-quick-jumper") }, locale.jump_to, /*#__PURE__*/external_window_React_default.a.createElement("input", { disabled: disabled, type: "text", value: goInputText, onChange: this.handleChange, onKeyUp: this.go, onBlur: this.handleBlur }), locale.page, gotoButton); } return /*#__PURE__*/external_window_React_default.a.createElement("li", { className: "".concat(prefixCls) }, changeSelect, goInput); } }]); return Options; }(external_window_React_default.a.Component); Options_Options.defaultProps = { pageSizeOptions: ['10', '20', '50', '100'] }; /* harmony default export */ var es_Options = (Options_Options); // EXTERNAL MODULE: ./node_modules/rc-pagination/es/locale/zh_CN.js var zh_CN = __webpack_require__("N2Kk"); // CONCATENATED MODULE: ./node_modules/rc-pagination/es/Pagination.js /* eslint react/prop-types: 0 */ function noop() {} function isInteger(value) { return (// eslint-disable-next-line no-restricted-globals typeof value === 'number' && isFinite(value) && Math.floor(value) === value ); } function defaultItemRender(page, type, element) { return element; } function calculatePage(p, state, props) { var pageSize = typeof p === 'undefined' ? state.pageSize : p; return Math.floor((props.total - 1) / pageSize) + 1; } var Pagination_Pagination = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(Pagination, _React$Component); var _super = Object(createSuper["a" /* default */])(Pagination); function Pagination(props) { var _this; Object(classCallCheck["a" /* default */])(this, Pagination); _this = _super.call(this, props); _this.getJumpPrevPage = function () { return Math.max(1, _this.state.current - (_this.props.showLessItems ? 3 : 5)); }; _this.getJumpNextPage = function () { return Math.min(calculatePage(undefined, _this.state, _this.props), _this.state.current + (_this.props.showLessItems ? 3 : 5)); }; _this.getItemIcon = function (icon, label) { var prefixCls = _this.props.prefixCls; var iconNode = icon || /*#__PURE__*/external_window_React_default.a.createElement("button", { type: "button", "aria-label": label, className: "".concat(prefixCls, "-item-link") }); if (typeof icon === 'function') { iconNode = external_window_React_default.a.createElement(icon, Object(objectSpread2["a" /* default */])({}, _this.props)); } return iconNode; }; _this.savePaginationNode = function (node) { _this.paginationNode = node; }; _this.isValid = function (page) { return isInteger(page) && page !== _this.state.current; }; _this.shouldDisplayQuickJumper = function () { var _this$props = _this.props, showQuickJumper = _this$props.showQuickJumper, pageSize = _this$props.pageSize, total = _this$props.total; if (total <= pageSize) { return false; } return showQuickJumper; }; _this.handleKeyDown = function (e) { if (e.keyCode === KeyCode.ARROW_UP || e.keyCode === KeyCode.ARROW_DOWN) { e.preventDefault(); } }; _this.handleKeyUp = function (e) { var value = _this.getValidValue(e); var currentInputValue = _this.state.currentInputValue; if (value !== currentInputValue) { _this.setState({ currentInputValue: value }); } if (e.keyCode === KeyCode.ENTER) { _this.handleChange(value); } else if (e.keyCode === KeyCode.ARROW_UP) { _this.handleChange(value - 1); } else if (e.keyCode === KeyCode.ARROW_DOWN) { _this.handleChange(value + 1); } }; _this.changePageSize = function (size) { var current = _this.state.current; var newCurrent = calculatePage(size, _this.state, _this.props); current = current > newCurrent ? newCurrent : current; // fix the issue: // Once 'total' is 0, 'current' in 'onShowSizeChange' is 0, which is not correct. if (newCurrent === 0) { // eslint-disable-next-line prefer-destructuring current = _this.state.current; } if (typeof size === 'number') { if (!('pageSize' in _this.props)) { _this.setState({ pageSize: size }); } if (!('current' in _this.props)) { _this.setState({ current: current, currentInputValue: current }); } } _this.props.onShowSizeChange(current, size); if ('onChange' in _this.props && _this.props.onChange) { _this.props.onChange(current, size); } }; _this.handleChange = function (p) { var disabled = _this.props.disabled; var page = p; if (_this.isValid(page) && !disabled) { var currentPage = calculatePage(undefined, _this.state, _this.props); if (page > currentPage) { page = currentPage; } else if (page < 1) { page = 1; } if (!('current' in _this.props)) { _this.setState({ current: page, currentInputValue: page }); } var pageSize = _this.state.pageSize; _this.props.onChange(page, pageSize); return page; } return _this.state.current; }; _this.prev = function () { if (_this.hasPrev()) { _this.handleChange(_this.state.current - 1); } }; _this.next = function () { if (_this.hasNext()) { _this.handleChange(_this.state.current + 1); } }; _this.jumpPrev = function () { _this.handleChange(_this.getJumpPrevPage()); }; _this.jumpNext = function () { _this.handleChange(_this.getJumpNextPage()); }; _this.hasPrev = function () { return _this.state.current > 1; }; _this.hasNext = function () { return _this.state.current < calculatePage(undefined, _this.state, _this.props); }; _this.runIfEnter = function (event, callback) { if (event.key === 'Enter' || event.charCode === 13) { for (var _len = arguments.length, restParams = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { restParams[_key - 2] = arguments[_key]; } callback.apply(void 0, restParams); } }; _this.runIfEnterPrev = function (e) { _this.runIfEnter(e, _this.prev); }; _this.runIfEnterNext = function (e) { _this.runIfEnter(e, _this.next); }; _this.runIfEnterJumpPrev = function (e) { _this.runIfEnter(e, _this.jumpPrev); }; _this.runIfEnterJumpNext = function (e) { _this.runIfEnter(e, _this.jumpNext); }; _this.handleGoTO = function (e) { if (e.keyCode === KeyCode.ENTER || e.type === 'click') { _this.handleChange(_this.state.currentInputValue); } }; var hasOnChange = props.onChange !== noop; var hasCurrent = ('current' in props); if (hasCurrent && !hasOnChange) { // eslint-disable-next-line no-console console.warn('Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.'); } var _current = props.defaultCurrent; if ('current' in props) { // eslint-disable-next-line prefer-destructuring _current = props.current; } var _pageSize = props.defaultPageSize; if ('pageSize' in props) { // eslint-disable-next-line prefer-destructuring _pageSize = props.pageSize; } _current = Math.min(_current, calculatePage(_pageSize, undefined, props)); _this.state = { current: _current, currentInputValue: _current, pageSize: _pageSize }; return _this; } Object(createClass["a" /* default */])(Pagination, [{ key: "componentDidUpdate", value: function componentDidUpdate(prevProps, prevState) { // When current page change, fix focused style of prev item // A hacky solution of https://github.com/ant-design/ant-design/issues/8948 var prefixCls = this.props.prefixCls; if (prevState.current !== this.state.current && this.paginationNode) { var lastCurrentNode = this.paginationNode.querySelector(".".concat(prefixCls, "-item-").concat(prevState.current)); if (lastCurrentNode && document.activeElement === lastCurrentNode) { lastCurrentNode.blur(); } } } }, { key: "getValidValue", value: function getValidValue(e) { var inputValue = e.target.value; var allPages = calculatePage(undefined, this.state, this.props); var currentInputValue = this.state.currentInputValue; var value; if (inputValue === '') { value = inputValue; // eslint-disable-next-line no-restricted-globals } else if (isNaN(Number(inputValue))) { value = currentInputValue; } else if (inputValue >= allPages) { value = allPages; } else { value = Number(inputValue); } return value; } }, { key: "getShowSizeChanger", value: function getShowSizeChanger() { var _this$props2 = this.props, showSizeChanger = _this$props2.showSizeChanger, total = _this$props2.total, totalBoundaryShowSizeChanger = _this$props2.totalBoundaryShowSizeChanger; if (typeof showSizeChanger !== 'undefined') { return showSizeChanger; } return total > totalBoundaryShowSizeChanger; } }, { key: "renderPrev", value: function renderPrev(prevPage) { var _this$props3 = this.props, prevIcon = _this$props3.prevIcon, itemRender = _this$props3.itemRender; var prevButton = itemRender(prevPage, 'prev', this.getItemIcon(prevIcon, 'prev page')); var disabled = !this.hasPrev(); return Object(external_window_React_["isValidElement"])(prevButton) ? Object(external_window_React_["cloneElement"])(prevButton, { disabled: disabled }) : prevButton; } }, { key: "renderNext", value: function renderNext(nextPage) { var _this$props4 = this.props, nextIcon = _this$props4.nextIcon, itemRender = _this$props4.itemRender; var nextButton = itemRender(nextPage, 'next', this.getItemIcon(nextIcon, 'next page')); var disabled = !this.hasNext(); return Object(external_window_React_["isValidElement"])(nextButton) ? Object(external_window_React_["cloneElement"])(nextButton, { disabled: disabled }) : nextButton; } }, { key: "render", value: function render() { var _this2 = this; var _this$props5 = this.props, prefixCls = _this$props5.prefixCls, className = _this$props5.className, style = _this$props5.style, disabled = _this$props5.disabled, hideOnSinglePage = _this$props5.hideOnSinglePage, total = _this$props5.total, locale = _this$props5.locale, showQuickJumper = _this$props5.showQuickJumper, showLessItems = _this$props5.showLessItems, showTitle = _this$props5.showTitle, showTotal = _this$props5.showTotal, simple = _this$props5.simple, itemRender = _this$props5.itemRender, showPrevNextJumpers = _this$props5.showPrevNextJumpers, jumpPrevIcon = _this$props5.jumpPrevIcon, jumpNextIcon = _this$props5.jumpNextIcon, selectComponentClass = _this$props5.selectComponentClass, selectPrefixCls = _this$props5.selectPrefixCls, pageSizeOptions = _this$props5.pageSizeOptions; var _this$state = this.state, current = _this$state.current, pageSize = _this$state.pageSize, currentInputValue = _this$state.currentInputValue; // When hideOnSinglePage is true and there is only 1 page, hide the pager if (hideOnSinglePage === true && total <= pageSize) { return null; } var allPages = calculatePage(undefined, this.state, this.props); var pagerList = []; var jumpPrev = null; var jumpNext = null; var firstPager = null; var lastPager = null; var gotoButton = null; var goButton = showQuickJumper && showQuickJumper.goButton; var pageBufferSize = showLessItems ? 1 : 2; var prevPage = current - 1 > 0 ? current - 1 : 0; var nextPage = current + 1 < allPages ? current + 1 : allPages; var dataOrAriaAttributeProps = Object.keys(this.props).reduce(function (prev, key) { if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') { // eslint-disable-next-line no-param-reassign prev[key] = _this2.props[key]; } return prev; }, {}); if (simple) { if (goButton) { if (typeof goButton === 'boolean') { gotoButton = /*#__PURE__*/external_window_React_default.a.createElement("button", { type: "button", onClick: this.handleGoTO, onKeyUp: this.handleGoTO }, locale.jump_to_confirm); } else { gotoButton = /*#__PURE__*/external_window_React_default.a.createElement("span", { onClick: this.handleGoTO, onKeyUp: this.handleGoTO }, goButton); } gotoButton = /*#__PURE__*/external_window_React_default.a.createElement("li", { title: showTitle ? "".concat(locale.jump_to).concat(current, "/").concat(allPages) : null, className: "".concat(prefixCls, "-simple-pager") }, gotoButton); } return /*#__PURE__*/external_window_React_default.a.createElement("ul", Object(esm_extends["a" /* default */])({ className: classnames_default()(prefixCls, "".concat(prefixCls, "-simple"), Object(defineProperty["a" /* default */])({}, "".concat(prefixCls, "-disabled"), disabled), className), style: style, ref: this.savePaginationNode }, dataOrAriaAttributeProps), /*#__PURE__*/external_window_React_default.a.createElement("li", { title: showTitle ? locale.prev_page : null, onClick: this.prev, tabIndex: this.hasPrev() ? 0 : null, onKeyPress: this.runIfEnterPrev, className: classnames_default()("".concat(prefixCls, "-prev"), Object(defineProperty["a" /* default */])({}, "".concat(prefixCls, "-disabled"), !this.hasPrev())), "aria-disabled": !this.hasPrev() }, this.renderPrev(prevPage)), /*#__PURE__*/external_window_React_default.a.createElement("li", { title: showTitle ? "".concat(current, "/").concat(allPages) : null, className: "".concat(prefixCls, "-simple-pager") }, /*#__PURE__*/external_window_React_default.a.createElement("input", { type: "text", value: currentInputValue, disabled: disabled, onKeyDown: this.handleKeyDown, onKeyUp: this.handleKeyUp, onChange: this.handleKeyUp, size: "3" }), /*#__PURE__*/external_window_React_default.a.createElement("span", { className: "".concat(prefixCls, "-slash") }, "/"), allPages), /*#__PURE__*/external_window_React_default.a.createElement("li", { title: showTitle ? locale.next_page : null, onClick: this.next, tabIndex: this.hasPrev() ? 0 : null, onKeyPress: this.runIfEnterNext, className: classnames_default()("".concat(prefixCls, "-next"), Object(defineProperty["a" /* default */])({}, "".concat(prefixCls, "-disabled"), !this.hasNext())), "aria-disabled": !this.hasNext() }, this.renderNext(nextPage)), gotoButton); } if (allPages <= 3 + pageBufferSize * 2) { var pagerProps = { locale: locale, rootPrefixCls: prefixCls, onClick: this.handleChange, onKeyPress: this.runIfEnter, showTitle: showTitle, itemRender: itemRender }; if (!allPages) { pagerList.push( /*#__PURE__*/external_window_React_default.a.createElement(es_Pager, Object(esm_extends["a" /* default */])({}, pagerProps, { key: "noPager", page: allPages, className: "".concat(prefixCls, "-disabled") }))); } for (var i = 1; i <= allPages; i += 1) { var active = current === i; pagerList.push( /*#__PURE__*/external_window_React_default.a.createElement(es_Pager, Object(esm_extends["a" /* default */])({}, pagerProps, { key: i, page: i, active: active }))); } } else { var prevItemTitle = showLessItems ? locale.prev_3 : locale.prev_5; var nextItemTitle = showLessItems ? locale.next_3 : locale.next_5; if (showPrevNextJumpers) { jumpPrev = /*#__PURE__*/external_window_React_default.a.createElement("li", { title: showTitle ? prevItemTitle : null, key: "prev", onClick: this.jumpPrev, tabIndex: "0", onKeyPress: this.runIfEnterJumpPrev, className: classnames_default()("".concat(prefixCls, "-jump-prev"), Object(defineProperty["a" /* default */])({}, "".concat(prefixCls, "-jump-prev-custom-icon"), !!jumpPrevIcon)) }, itemRender(this.getJumpPrevPage(), 'jump-prev', this.getItemIcon(jumpPrevIcon, 'prev page'))); jumpNext = /*#__PURE__*/external_window_React_default.a.createElement("li", { title: showTitle ? nextItemTitle : null, key: "next", tabIndex: "0", onClick: this.jumpNext, onKeyPress: this.runIfEnterJumpNext, className: classnames_default()("".concat(prefixCls, "-jump-next"), Object(defineProperty["a" /* default */])({}, "".concat(prefixCls, "-jump-next-custom-icon"), !!jumpNextIcon)) }, itemRender(this.getJumpNextPage(), 'jump-next', this.getItemIcon(jumpNextIcon, 'next page'))); } lastPager = /*#__PURE__*/external_window_React_default.a.createElement(es_Pager, { locale: locale, last: true, rootPrefixCls: prefixCls, onClick: this.handleChange, onKeyPress: this.runIfEnter, key: allPages, page: allPages, active: false, showTitle: showTitle, itemRender: itemRender }); firstPager = /*#__PURE__*/external_window_React_default.a.createElement(es_Pager, { locale: locale, rootPrefixCls: prefixCls, onClick: this.handleChange, onKeyPress: this.runIfEnter, key: 1, page: 1, active: false, showTitle: showTitle, itemRender: itemRender }); var left = Math.max(1, current - pageBufferSize); var right = Math.min(current + pageBufferSize, allPages); if (current - 1 <= pageBufferSize) { right = 1 + pageBufferSize * 2; } if (allPages - current <= pageBufferSize) { left = allPages - pageBufferSize * 2; } for (var _i = left; _i <= right; _i += 1) { var _active = current === _i; pagerList.push( /*#__PURE__*/external_window_React_default.a.createElement(es_Pager, { locale: locale, rootPrefixCls: prefixCls, onClick: this.handleChange, onKeyPress: this.runIfEnter, key: _i, page: _i, active: _active, showTitle: showTitle, itemRender: itemRender })); } if (current - 1 >= pageBufferSize * 2 && current !== 1 + 2) { pagerList[0] = Object(external_window_React_["cloneElement"])(pagerList[0], { className: "".concat(prefixCls, "-item-after-jump-prev") }); pagerList.unshift(jumpPrev); } if (allPages - current >= pageBufferSize * 2 && current !== allPages - 2) { pagerList[pagerList.length - 1] = Object(external_window_React_["cloneElement"])(pagerList[pagerList.length - 1], { className: "".concat(prefixCls, "-item-before-jump-next") }); pagerList.push(jumpNext); } if (left !== 1) { pagerList.unshift(firstPager); } if (right !== allPages) { pagerList.push(lastPager); } } var totalText = null; if (showTotal) { totalText = /*#__PURE__*/external_window_React_default.a.createElement("li", { className: "".concat(prefixCls, "-total-text") }, showTotal(total, [total === 0 ? 0 : (current - 1) * pageSize + 1, current * pageSize > total ? total : current * pageSize])); } var prevDisabled = !this.hasPrev() || !allPages; var nextDisabled = !this.hasNext() || !allPages; return /*#__PURE__*/external_window_React_default.a.createElement("ul", Object(esm_extends["a" /* default */])({ className: classnames_default()(prefixCls, className, Object(defineProperty["a" /* default */])({}, "".concat(prefixCls, "-disabled"), disabled)), style: style, unselectable: "unselectable", ref: this.savePaginationNode }, dataOrAriaAttributeProps), totalText, /*#__PURE__*/external_window_React_default.a.createElement("li", { title: showTitle ? locale.prev_page : null, onClick: this.prev, tabIndex: prevDisabled ? null : 0, onKeyPress: this.runIfEnterPrev, className: classnames_default()("".concat(prefixCls, "-prev"), Object(defineProperty["a" /* default */])({}, "".concat(prefixCls, "-disabled"), prevDisabled)), "aria-disabled": prevDisabled }, this.renderPrev(prevPage)), pagerList, /*#__PURE__*/external_window_React_default.a.createElement("li", { title: showTitle ? locale.next_page : null, onClick: this.next, tabIndex: nextDisabled ? null : 0, onKeyPress: this.runIfEnterNext, className: classnames_default()("".concat(prefixCls, "-next"), Object(defineProperty["a" /* default */])({}, "".concat(prefixCls, "-disabled"), nextDisabled)), "aria-disabled": nextDisabled }, this.renderNext(nextPage)), /*#__PURE__*/external_window_React_default.a.createElement(es_Options, { disabled: disabled, locale: locale, rootPrefixCls: prefixCls, selectComponentClass: selectComponentClass, selectPrefixCls: selectPrefixCls, changeSize: this.getShowSizeChanger() ? this.changePageSize : null, current: current, pageSize: pageSize, pageSizeOptions: pageSizeOptions, quickGo: this.shouldDisplayQuickJumper() ? this.handleChange : null, goButton: goButton })); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(props, prevState) { var newState = {}; if ('current' in props) { newState.current = props.current; if (props.current !== prevState.current) { newState.currentInputValue = newState.current; } } if ('pageSize' in props && props.pageSize !== prevState.pageSize) { var current = prevState.current; var newCurrent = calculatePage(props.pageSize, prevState, props); current = current > newCurrent ? newCurrent : current; if (!('current' in props)) { newState.current = current; newState.currentInputValue = current; } newState.pageSize = props.pageSize; } return newState; } }]); return Pagination; }(external_window_React_default.a.Component); Pagination_Pagination.defaultProps = { defaultCurrent: 1, total: 0, defaultPageSize: 10, onChange: noop, className: '', selectPrefixCls: 'rc-select', prefixCls: 'rc-pagination', selectComponentClass: null, hideOnSinglePage: false, showPrevNextJumpers: true, showQuickJumper: false, showLessItems: false, showTitle: true, onShowSizeChange: noop, locale: zh_CN["a" /* default */], style: {}, itemRender: defaultItemRender, totalBoundaryShowSizeChanger: 50 }; /* harmony default export */ var es_Pagination = (Pagination_Pagination); // CONCATENATED MODULE: ./node_modules/rc-pagination/es/index.js /***/ }), /***/ "6RRn": /*!*******************************************!*\ !*** ./node_modules/rc-table/es/index.js ***! \*******************************************/ /*! exports provided: Summary, Column, ColumnGroup, INTERNAL_COL_DEFINE, default */ /*! exports used: INTERNAL_COL_DEFINE, Summary, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _Table__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Table */ "wCXF"); /* harmony import */ var _Footer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Footer */ "n6Qo"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _Footer__WEBPACK_IMPORTED_MODULE_1__["a"]; }); /* harmony import */ var _sugar_Column__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sugar/Column */ "IBYe"); /* harmony import */ var _sugar_ColumnGroup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./sugar/ColumnGroup */ "6eGT"); /* harmony import */ var _utils_legacyUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/legacyUtil */ "hW8S"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _utils_legacyUtil__WEBPACK_IMPORTED_MODULE_4__["a"]; }); /* harmony default export */ __webpack_exports__["c"] = (_Table__WEBPACK_IMPORTED_MODULE_0__[/* default */ "b"]); /***/ }), /***/ "6eGT": /*!*******************************************************!*\ !*** ./node_modules/rc-table/es/sugar/ColumnGroup.js ***! \*******************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* istanbul ignore next */ /** * This is a syntactic sugar for `columns` prop. * So HOC will not work on this. */ // eslint-disable-next-line @typescript-eslint/no-unused-vars function ColumnGroup(_) { return null; } /* harmony default export */ __webpack_exports__["a"] = (ColumnGroup); /***/ }), /***/ "815F": /*!***************************************************!*\ !*** ./node_modules/rc-tree/es/utils/treeUtil.js ***! \***************************************************/ /*! exports provided: getKey, warningWithoutKey, convertTreeToData, flattenTreeData, traverseDataNodes, convertDataToEntities, getTreeNodeProps, convertNodePropsToEventData */ /*! exports used: convertDataToEntities, convertNodePropsToEventData, convertTreeToData, flattenTreeData, getKey, getTreeNodeProps */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getKey; }); /* unused harmony export warningWithoutKey */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return convertTreeToData; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return flattenTreeData; }); /* unused harmony export traverseDataNodes */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return convertDataToEntities; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return getTreeNodeProps; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return convertNodePropsToEventData; }); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "KQm4"); /* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "VTBJ"); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "Ff2n"); /* harmony import */ var rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-util/es/Children/toArray */ "Zm9Q"); /* harmony import */ var rc_util_es_warning__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-util/es/warning */ "Kwbf"); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util */ "OZM5"); function getKey(key, pos) { if (key !== null && key !== undefined) { return key; } return pos; } /** * Warning if TreeNode do not provides key */ function warningWithoutKey() { var treeData = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var keys = new Map(); function dig(list) { var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; (list || []).forEach(function (treeNode) { var key = treeNode.key, children = treeNode.children; Object(rc_util_es_warning__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(key !== null && key !== undefined, "Tree node must have a certain key: [".concat(path).concat(key, "]")); var recordKey = String(key); Object(rc_util_es_warning__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(!keys.has(recordKey) || key === null || key === undefined, "Same 'key' exist in the Tree: ".concat(recordKey)); keys.set(recordKey, true); dig(children, "".concat(path).concat(recordKey, " > ")); }); } dig(treeData); } /** * Convert `children` of Tree into `treeData` structure. */ function convertTreeToData(rootNodes) { function dig(node) { var treeNodes = Object(rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(node); return treeNodes.map(function (treeNode) { // Filter invalidate node if (!Object(_util__WEBPACK_IMPORTED_MODULE_5__[/* isTreeNode */ "i"])(treeNode)) { Object(rc_util_es_warning__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(!treeNode, 'Tree/TreeNode can only accept TreeNode as children.'); return null; } var key = treeNode.key; var _treeNode$props = treeNode.props, children = _treeNode$props.children, rest = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_treeNode$props, ["children"]); var dataNode = Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ key: key }, rest); var parsedChildren = dig(children); if (parsedChildren.length) { dataNode.children = parsedChildren; } return dataNode; }).filter(function (dataNode) { return dataNode; }); } return dig(rootNodes); } /** * Flat nest tree data into flatten list. This is used for virtual list render. * @param treeNodeList Origin data node list * @param expandedKeys * need expanded keys, provides `true` means all expanded (used in `rc-tree-select`). */ function flattenTreeData() { var treeNodeList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var expandedKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; var expandedKeySet = new Set(expandedKeys === true ? [] : expandedKeys); var flattenList = []; function dig(list) { var parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; return list.map(function (treeNode, index) { var pos = Object(_util__WEBPACK_IMPORTED_MODULE_5__[/* getPosition */ "h"])(parent ? parent.pos : '0', index); var mergedKey = getKey(treeNode.key, pos); // Add FlattenDataNode into list var flattenNode = Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, treeNode), {}, { parent: parent, pos: pos, children: null, data: treeNode, isStart: [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(parent ? parent.isStart : []), [index === 0]), isEnd: [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(parent ? parent.isEnd : []), [index === list.length - 1]) }); flattenList.push(flattenNode); // Loop treeNode children if (expandedKeys === true || expandedKeySet.has(mergedKey)) { flattenNode.children = dig(treeNode.children || [], flattenNode); } else { flattenNode.children = []; } return flattenNode; }); } dig(treeNodeList); return flattenList; } /** * Traverse all the data by `treeData`. * Please not use it out of the `rc-tree` since we may refactor this code. */ function traverseDataNodes(dataNodes, callback, externalGetKey) { var syntheticGetKey; if (externalGetKey) { if (typeof externalGetKey === 'string') { syntheticGetKey = function syntheticGetKey(node) { return node[externalGetKey]; }; } else if (typeof externalGetKey === 'function') { syntheticGetKey = function syntheticGetKey(node) { return externalGetKey(node); }; } } else { syntheticGetKey = function syntheticGetKey(node, pos) { return getKey(node.key, pos); }; } function processNode(node, index, parent) { var children = node ? node.children : dataNodes; var pos = node ? Object(_util__WEBPACK_IMPORTED_MODULE_5__[/* getPosition */ "h"])(parent.pos, index) : '0'; // Process node if is not root if (node) { var key = syntheticGetKey(node, pos); var data = { node: node, index: index, pos: pos, key: key, parentPos: parent.node ? parent.pos : null, level: parent.level + 1 }; callback(data); } // Process children node if (children) { children.forEach(function (subNode, subIndex) { processNode(subNode, subIndex, { node: node, pos: pos, level: parent ? parent.level + 1 : -1 }); }); } } processNode(null); } /** * Convert `treeData` into entity records. */ function convertDataToEntities(dataNodes) { var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, initWrapper = _ref.initWrapper, processEntity = _ref.processEntity, onProcessFinished = _ref.onProcessFinished; var externalGetKey = arguments.length > 2 ? arguments[2] : undefined; var posEntities = {}; var keyEntities = {}; var wrapper = { posEntities: posEntities, keyEntities: keyEntities }; if (initWrapper) { wrapper = initWrapper(wrapper) || wrapper; } traverseDataNodes(dataNodes, function (item) { var node = item.node, index = item.index, pos = item.pos, key = item.key, parentPos = item.parentPos, level = item.level; var entity = { node: node, index: index, key: key, pos: pos, level: level }; var mergedKey = getKey(key, pos); posEntities[pos] = entity; keyEntities[mergedKey] = entity; // Fill children entity.parent = posEntities[parentPos]; if (entity.parent) { entity.parent.children = entity.parent.children || []; entity.parent.children.push(entity); } if (processEntity) { processEntity(entity, wrapper); } }, externalGetKey); if (onProcessFinished) { onProcessFinished(wrapper); } return wrapper; } /** * Get TreeNode props with Tree props. */ function getTreeNodeProps(key, _ref2) { var expandedKeys = _ref2.expandedKeys, selectedKeys = _ref2.selectedKeys, loadedKeys = _ref2.loadedKeys, loadingKeys = _ref2.loadingKeys, checkedKeys = _ref2.checkedKeys, halfCheckedKeys = _ref2.halfCheckedKeys, dragOverNodeKey = _ref2.dragOverNodeKey, dropPosition = _ref2.dropPosition, keyEntities = _ref2.keyEntities; var entity = keyEntities[key]; var treeNodeProps = { eventKey: key, expanded: expandedKeys.indexOf(key) !== -1, selected: selectedKeys.indexOf(key) !== -1, loaded: loadedKeys.indexOf(key) !== -1, loading: loadingKeys.indexOf(key) !== -1, checked: checkedKeys.indexOf(key) !== -1, halfChecked: halfCheckedKeys.indexOf(key) !== -1, pos: String(entity ? entity.pos : ''), // [Legacy] Drag props dragOver: dragOverNodeKey === key && dropPosition === 0, dragOverGapTop: dragOverNodeKey === key && dropPosition === -1, dragOverGapBottom: dragOverNodeKey === key && dropPosition === 1 }; return treeNodeProps; } function convertNodePropsToEventData(props) { var data = props.data, expanded = props.expanded, selected = props.selected, checked = props.checked, loaded = props.loaded, loading = props.loading, halfChecked = props.halfChecked, dragOver = props.dragOver, dragOverGapTop = props.dragOverGapTop, dragOverGapBottom = props.dragOverGapBottom, pos = props.pos, active = props.active; var eventData = Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, data), {}, { expanded: expanded, selected: selected, checked: checked, loaded: loaded, loading: loading, halfChecked: halfChecked, dragOver: dragOver, dragOverGapTop: dragOverGapTop, dragOverGapBottom: dragOverGapBottom, pos: pos, active: active }); if (!('props' in eventData)) { Object.defineProperty(eventData, 'props', { get: function get() { Object(rc_util_es_warning__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(false, 'Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`.'); return props; } }); } return eventData; } /***/ }), /***/ "BU3w": /*!***************************************************!*\ !*** ./node_modules/rc-util/es/Dom/dynamicCSS.js ***! \***************************************************/ /*! exports provided: injectCSS, updateCSS */ /*! exports used: updateCSS */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export injectCSS */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return updateCSS; }); /* harmony import */ var _canUseDom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./canUseDom */ "MNnm"); var MARK_KEY = "rc-util-key"; function getContainer(option) { if (option.attachTo) { return option.attachTo; } var head = document.querySelector('head'); return head || document.body; } function injectCSS(css) { var _option$csp; var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; if (!Object(_canUseDom__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])()) { return null; } var styleNode = document.createElement('style'); if ((_option$csp = option.csp) === null || _option$csp === void 0 ? void 0 : _option$csp.nonce) { var _option$csp2; styleNode.nonce = (_option$csp2 = option.csp) === null || _option$csp2 === void 0 ? void 0 : _option$csp2.nonce; } styleNode.innerHTML = css; var container = getContainer(option); var firstChild = container.firstChild; if (option.prepend && container.prepend) { // Use `prepend` first container.prepend(styleNode); } else if (option.prepend && firstChild) { // Fallback to `insertBefore` like IE not support `prepend` container.insertBefore(styleNode, firstChild); } else { container.appendChild(styleNode); } return styleNode; } var containerCache = new Map(); function updateCSS(css, key) { var option = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; var container = getContainer(option); // Get real parent if (!containerCache.has(container)) { var placeholderStyle = injectCSS('', option); var parentNode = placeholderStyle.parentNode; containerCache.set(container, parentNode); parentNode.removeChild(placeholderStyle); } var existNode = Array.from(containerCache.get(container).children).find(function (node) { return node.tagName === 'STYLE' && node[MARK_KEY] === key; }); if (existNode) { var _option$csp3, _option$csp4; if (((_option$csp3 = option.csp) === null || _option$csp3 === void 0 ? void 0 : _option$csp3.nonce) && existNode.nonce !== ((_option$csp4 = option.csp) === null || _option$csp4 === void 0 ? void 0 : _option$csp4.nonce)) { var _option$csp5; existNode.nonce = (_option$csp5 = option.csp) === null || _option$csp5 === void 0 ? void 0 : _option$csp5.nonce; } if (existNode.innerHTML !== css) { existNode.innerHTML = css; } return existNode; } var newNode = injectCSS(css, option); newNode[MARK_KEY] = key; return newNode; } /***/ }), /***/ "BdwD": /*!*****************************************!*\ !*** ./src/components/NoData/index.tsx ***! \*****************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var antd_es_button_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/es/button/style */ "+L6B"); /* harmony import */ var antd_es_button__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/es/button */ "2/Rp"); /* harmony import */ var _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */ "0Owb"); /* harmony import */ var _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "cDcd"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/assets/images/icons/nodata.png */ "FOrL"); /* harmony import */ var _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_5__); var noData = function noData(_ref) { var _ref$buttonProps = _ref.buttonProps, buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps, _ref$styles = _ref.styles, styles = _ref$styles === void 0 ? {} : _ref$styles, customText = _ref.customText, ButtonText = _ref.ButtonText, ButtonClick = _ref.ButtonClick, Buttonclass = _ref.Buttonclass, ButtonTwo = _ref.ButtonTwo; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("section", { className: "tc animated fadeIn", style: Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({}, { color: '#999', margin: '200px auto' }), styles) }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("img", { src: _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_5___default.a }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("p", { className: "mt20 font14" }, customText || '暂时还没有相关数据哦!'), ButtonText && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(antd_es_button__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"], Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({ className: Buttonclass, onClick: ButtonClick }, buttonProps), ButtonText), ButtonTwo && ButtonTwo); }; /* harmony default export */ __webpack_exports__["a"] = (noData); /***/ }), /***/ "FOrL": /*!********************************************!*\ !*** ./src/assets/images/icons/nodata.png ***! \********************************************/ /*! no static exports found */ /*! exports used: default */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__.p + "static/nodata.a6b3f948.png"; /***/ }), /***/ "GfqC": /*!********************************************************!*\ !*** ./node_modules/rc-upload/es/index.js + 6 modules ***! \********************************************************/ /*! exports provided: default */ /*! exports used: default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXTERNAL MODULE: external "window.React" var external_window_React_ = __webpack_require__("cDcd"); var external_window_React_default = /*#__PURE__*/__webpack_require__.n(external_window_React_); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__("TSYQ"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // CONCATENATED MODULE: ./node_modules/rc-upload/es/request.js function getError(option, xhr) { var msg = 'cannot ' + option.method + ' ' + option.action + ' ' + xhr.status + '\''; var err = new Error(msg); err.status = xhr.status; err.method = option.method; err.url = option.action; return err; } function getBody(xhr) { var text = xhr.responseText || xhr.response; if (!text) { return text; } try { return JSON.parse(text); } catch (e) { return text; } } // option { // onProgress: (event: { percent: number }): void, // onError: (event: Error, body?: Object): void, // onSuccess: (body: Object): void, // data: Object, // filename: String, // file: File, // withCredentials: Boolean, // action: String, // headers: Object, // } function upload(option) { // eslint-disable-next-line no-undef var xhr = new XMLHttpRequest(); if (option.onProgress && xhr.upload) { xhr.upload.onprogress = function progress(e) { if (e.total > 0) { e.percent = e.loaded / e.total * 100; } option.onProgress(e); }; } // eslint-disable-next-line no-undef var formData = new FormData(); if (option.data) { Object.keys(option.data).forEach(function (key) { var value = option.data[key]; // support key-value array data if (Array.isArray(value)) { value.forEach(function (item) { // { list: [ 11, 22 ] } // formData.append('list[]', 11); formData.append(key + '[]', item); }); return; } formData.append(key, option.data[key]); }); } // eslint-disable-next-line no-undef if (option.file instanceof Blob) { formData.append(option.filename, option.file, option.file.name); } else { formData.append(option.filename, option.file); } xhr.onerror = function error(e) { option.onError(e); }; xhr.onload = function onload() { // allow success when 2xx status // see https://github.com/react-component/upload/issues/34 if (xhr.status < 200 || xhr.status >= 300) { return option.onError(getError(option, xhr), getBody(xhr)); } return option.onSuccess(getBody(xhr), xhr); }; xhr.open(option.method, option.action, true); // Has to be after `.open()`. See https://github.com/enyo/dropzone/issues/179 if (option.withCredentials && 'withCredentials' in xhr) { xhr.withCredentials = true; } var headers = option.headers || {}; // when set headers['X-Requested-With'] = null , can close default XHR header // see https://github.com/react-component/upload/issues/33 if (headers['X-Requested-With'] !== null) { xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); } Object.keys(headers).forEach(function (h) { if (headers[h] !== null) { xhr.setRequestHeader(h, headers[h]); } }); xhr.send(formData); return { abort: function abort() { xhr.abort(); } }; } // CONCATENATED MODULE: ./node_modules/rc-upload/es/uid.js var now = +new Date(); var index = 0; function uid_uid() { return "rc-upload-" + now + "-" + ++index; } // CONCATENATED MODULE: ./node_modules/rc-upload/es/attr-accept.js function endsWith(str, suffix) { return str.indexOf(suffix, str.length - suffix.length) !== -1; } /* harmony default export */ var attr_accept = (function (file, acceptedFiles) { if (file && acceptedFiles) { var acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(','); var fileName = file.name || ''; var mimeType = file.type || ''; var baseMimeType = mimeType.replace(/\/.*$/, ''); return acceptedFilesArray.some(function (type) { var validType = type.trim(); if (validType.charAt(0) === '.') { return endsWith(fileName.toLowerCase(), validType.toLowerCase()); } else if (/\/\*$/.test(validType)) { // This is something like a image/* mime type return baseMimeType === validType.replace(/\/.*$/, ''); } return mimeType === validType; }); } return true; }); // CONCATENATED MODULE: ./node_modules/rc-upload/es/traverseFileTree.js function loopFiles(item, callback) { var dirReader = item.createReader(); var fileList = []; function sequence() { dirReader.readEntries(function (entries) { var entryList = Array.prototype.slice.apply(entries); fileList = fileList.concat(entryList); // Check if all the file has been viewed var isFinished = !entryList.length; if (isFinished) { callback(fileList); } else { sequence(); } }); } sequence(); } var traverseFileTree = function traverseFileTree(files, callback, isAccepted) { var _traverseFileTree = function _traverseFileTree(item, path) { path = path || ''; if (item.isFile) { item.file(function (file) { if (isAccepted(file)) { // https://github.com/ant-design/ant-design/issues/16426 if (item.fullPath && !file.webkitRelativePath) { Object.defineProperties(file, { webkitRelativePath: { writable: true } }); file.webkitRelativePath = item.fullPath.replace(/^\//, ''); Object.defineProperties(file, { webkitRelativePath: { writable: false } }); } callback([file]); } }); } else if (item.isDirectory) { loopFiles(item, function (entries) { entries.forEach(function (entryItem) { _traverseFileTree(entryItem, '' + path + item.name + '/'); }); }); } }; files.forEach(function (file) { _traverseFileTree(file.webkitGetAsEntry()); }); }; /* harmony default export */ var es_traverseFileTree = (traverseFileTree); // CONCATENATED MODULE: ./node_modules/rc-upload/es/AjaxUploader.js 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 _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); 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 _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint react/no-is-mounted:0,react/sort-comp:0,react/prop-types:0 */ var dataOrAriaAttributeProps = function dataOrAriaAttributeProps(props) { return Object.keys(props).reduce(function (acc, key) { if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') { acc[key] = props[key]; } return acc; }, {}); }; var AjaxUploader_AjaxUploader = function (_Component) { _inherits(AjaxUploader, _Component); function AjaxUploader() { var _ref; var _temp, _this, _ret; _classCallCheck(this, AjaxUploader); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = AjaxUploader.__proto__ || Object.getPrototypeOf(AjaxUploader)).call.apply(_ref, [this].concat(args))), _this), _this.state = { uid: uid_uid() }, _this.reqs = {}, _this.onChange = function (e) { var files = e.target.files; _this.uploadFiles(files); _this.reset(); }, _this.onClick = function (e) { var el = _this.fileInput; if (!el) { return; } var _this$props = _this.props, children = _this$props.children, onClick = _this$props.onClick; if (children && children.type === 'button') { el.parentNode.focus(); el.parentNode.querySelector('button').blur(); } el.click(); if (onClick) { onClick(e); } }, _this.onKeyDown = function (e) { if (e.key === 'Enter') { _this.onClick(); } }, _this.onFileDrop = function (e) { var multiple = _this.props.multiple; e.preventDefault(); if (e.type === 'dragover') { return; } if (_this.props.directory) { es_traverseFileTree(Array.prototype.slice.call(e.dataTransfer.items), _this.uploadFiles, function (_file) { return attr_accept(_file, _this.props.accept); }); } else { var files = Array.prototype.slice.call(e.dataTransfer.files).filter(function (file) { return attr_accept(file, _this.props.accept); }); if (multiple === false) { files = files.slice(0, 1); } _this.uploadFiles(files); } }, _this.uploadFiles = function (files) { var postFiles = Array.prototype.slice.call(files); postFiles.map(function (file) { file.uid = uid_uid(); return file; }).forEach(function (file) { _this.upload(file, postFiles); }); }, _this.saveFileInput = function (node) { _this.fileInput = node; }, _temp), _possibleConstructorReturn(_this, _ret); } _createClass(AjaxUploader, [{ key: 'componentDidMount', value: function componentDidMount() { this._isMounted = true; } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this._isMounted = false; this.abort(); } }, { key: 'upload', value: function upload(file, fileList) { var _this2 = this; var props = this.props; if (!props.beforeUpload) { // always async in case use react state to keep fileList return setTimeout(function () { return _this2.post(file); }, 0); } var before = props.beforeUpload(file, fileList); if (before && before.then) { before.then(function (processedFile) { var processedFileType = Object.prototype.toString.call(processedFile); if (processedFileType === '[object File]' || processedFileType === '[object Blob]') { return _this2.post(processedFile); } return _this2.post(file); })['catch'](function (e) { // eslint-disable-next-line no-console console.log(e); }); } else if (before !== false) { setTimeout(function () { return _this2.post(file); }, 0); } return undefined; } }, { key: 'post', value: function post(file) { var _this3 = this; if (!this._isMounted) { return; } var props = this.props; var onStart = props.onStart, onProgress = props.onProgress, _props$transformFile = props.transformFile, transformFile = _props$transformFile === undefined ? function (originFile) { return originFile; } : _props$transformFile; new Promise(function (resolve) { var action = props.action; if (typeof action === 'function') { action = action(file); } return resolve(action); }).then(function (action) { var uid = file.uid; var request = props.customRequest || upload; var transform = Promise.resolve(transformFile(file)).then(function (transformedFile) { var data = props.data; if (typeof data === 'function') { data = data(transformedFile); } return Promise.all([transformedFile, data]); })['catch'](function (e) { console.error(e); // eslint-disable-line no-console }); transform.then(function (_ref2) { var _ref3 = _slicedToArray(_ref2, 2), transformedFile = _ref3[0], data = _ref3[1]; var requestOption = { action: action, filename: props.name, data: data, file: transformedFile, headers: props.headers, withCredentials: props.withCredentials, method: props.method || 'post', onProgress: onProgress ? function (e) { onProgress(e, file); } : null, onSuccess: function onSuccess(ret, xhr) { delete _this3.reqs[uid]; props.onSuccess(ret, file, xhr); }, onError: function onError(err, ret) { delete _this3.reqs[uid]; props.onError(err, ret, file); } }; onStart(file); _this3.reqs[uid] = request(requestOption); }); }); } }, { key: 'reset', value: function reset() { this.setState({ uid: uid_uid() }); } }, { key: 'abort', value: function abort(file) { var reqs = this.reqs; if (file) { var uid = file; if (file && file.uid) { uid = file.uid; } if (reqs[uid] && reqs[uid].abort) { reqs[uid].abort(); } delete reqs[uid]; } else { Object.keys(reqs).forEach(function (uid) { if (reqs[uid] && reqs[uid].abort) { reqs[uid].abort(); } delete reqs[uid]; }); } } }, { key: 'render', value: function render() { var _classNames; var _props = this.props, Tag = _props.component, prefixCls = _props.prefixCls, className = _props.className, disabled = _props.disabled, id = _props.id, style = _props.style, multiple = _props.multiple, accept = _props.accept, children = _props.children, directory = _props.directory, openFileDialogOnClick = _props.openFileDialogOnClick, onMouseEnter = _props.onMouseEnter, onMouseLeave = _props.onMouseLeave, otherProps = _objectWithoutProperties(_props, ['component', 'prefixCls', 'className', 'disabled', 'id', 'style', 'multiple', 'accept', 'children', 'directory', 'openFileDialogOnClick', 'onMouseEnter', 'onMouseLeave']); var cls = classnames_default()((_classNames = {}, _defineProperty(_classNames, prefixCls, true), _defineProperty(_classNames, prefixCls + '-disabled', disabled), _defineProperty(_classNames, className, className), _classNames)); var events = disabled ? {} : { onClick: openFileDialogOnClick ? this.onClick : function () {}, onKeyDown: openFileDialogOnClick ? this.onKeyDown : function () {}, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onDrop: this.onFileDrop, onDragOver: this.onFileDrop, tabIndex: '0' }; return external_window_React_default.a.createElement( Tag, _extends({}, events, { className: cls, role: 'button', style: style }), external_window_React_default.a.createElement('input', _extends({}, dataOrAriaAttributeProps(otherProps), { id: id, type: 'file', ref: this.saveFileInput, onClick: function onClick(e) { return e.stopPropagation(); } // https://github.com/ant-design/ant-design/issues/19948 , key: this.state.uid, style: { display: 'none' }, accept: accept, directory: directory ? 'directory' : null, webkitdirectory: directory ? 'webkitdirectory' : null, multiple: multiple, onChange: this.onChange })), children ); } }]); return AjaxUploader; }(external_window_React_["Component"]); /* harmony default export */ var es_AjaxUploader = (AjaxUploader_AjaxUploader); // CONCATENATED MODULE: ./node_modules/rc-upload/es/Upload.js var Upload_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 Upload_createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function Upload_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function Upload_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function Upload_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint react/prop-types:0 */ function empty() {} var Upload_Upload = function (_Component) { Upload_inherits(Upload, _Component); function Upload() { var _ref; var _temp, _this, _ret; Upload_classCallCheck(this, Upload); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = Upload_possibleConstructorReturn(this, (_ref = Upload.__proto__ || Object.getPrototypeOf(Upload)).call.apply(_ref, [this].concat(args))), _this), _this.saveUploader = function (node) { _this.uploader = node; }, _temp), Upload_possibleConstructorReturn(_this, _ret); } Upload_createClass(Upload, [{ key: 'abort', value: function abort(file) { this.uploader.abort(file); } }, { key: 'render', value: function render() { return external_window_React_default.a.createElement(es_AjaxUploader, Upload_extends({}, this.props, { ref: this.saveUploader })); } }]); return Upload; }(external_window_React_["Component"]); Upload_Upload.defaultProps = { component: 'span', prefixCls: 'rc-upload', data: {}, headers: {}, name: 'file', multipart: false, onStart: empty, onError: empty, onSuccess: empty, multiple: false, beforeUpload: null, customRequest: null, withCredentials: false, openFileDialogOnClick: true }; /* harmony default export */ var es_Upload = (Upload_Upload); // CONCATENATED MODULE: ./node_modules/rc-upload/es/index.js // export this package's api /* harmony default export */ var es = __webpack_exports__["a"] = (es_Upload); /***/ }), /***/ "IBYe": /*!**************************************************!*\ !*** ./node_modules/rc-table/es/sugar/Column.js ***! \**************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* istanbul ignore next */ /** * This is a syntactic sugar for `columns` prop. * So HOC will not work on this. */ // eslint-disable-next-line @typescript-eslint/no-unused-vars function Column(_) { return null; } /* harmony default export */ __webpack_exports__["a"] = (Column); /***/ }), /***/ "LdHM": /*!********************************************************!*\ !*** ./node_modules/rc-select/es/index.js + 6 modules ***! \********************************************************/ /*! exports provided: Option, OptGroup, default */ /*! exports used: OptGroup, Option, default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/TransBtn.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/generate.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/commonUtil.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/valueUtil.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMemo.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/pickAttrs.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-virtual-list/es/index.js */ /*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ es_Option; }); __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ es_OptGroup; }); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js var classCallCheck = __webpack_require__("1OyB"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js var createClass = __webpack_require__("vuIU"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js var inherits = __webpack_require__("Ji7U"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 1 modules var createSuper = __webpack_require__("LK+K"); // EXTERNAL MODULE: external "window.React" var external_window_React_ = __webpack_require__("cDcd"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js var defineProperty = __webpack_require__("rePB"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js var objectWithoutProperties = __webpack_require__("Ff2n"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules var slicedToArray = __webpack_require__("ODXe"); // EXTERNAL MODULE: ./node_modules/rc-util/es/KeyCode.js var KeyCode = __webpack_require__("4IlW"); // EXTERNAL MODULE: ./node_modules/rc-util/es/pickAttrs.js var pickAttrs = __webpack_require__("bX4T"); // EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useMemo.js var useMemo = __webpack_require__("YrtM"); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__("TSYQ"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: ./node_modules/rc-virtual-list/es/index.js + 19 modules var es = __webpack_require__("+nKL"); // EXTERNAL MODULE: ./node_modules/rc-select/es/TransBtn.js var TransBtn = __webpack_require__("8OUc"); // CONCATENATED MODULE: ./node_modules/rc-select/es/OptionList.js /** * Using virtual list of option display. * Will fallback to dom if use customize render. */ var OptionList_OptionList = function OptionList(_ref, ref) { var prefixCls = _ref.prefixCls, id = _ref.id, flattenOptions = _ref.flattenOptions, childrenAsData = _ref.childrenAsData, values = _ref.values, searchValue = _ref.searchValue, multiple = _ref.multiple, defaultActiveFirstOption = _ref.defaultActiveFirstOption, height = _ref.height, itemHeight = _ref.itemHeight, notFoundContent = _ref.notFoundContent, open = _ref.open, menuItemSelectedIcon = _ref.menuItemSelectedIcon, virtual = _ref.virtual, onSelect = _ref.onSelect, onToggleOpen = _ref.onToggleOpen, onActiveValue = _ref.onActiveValue, onScroll = _ref.onScroll, onMouseEnter = _ref.onMouseEnter; var itemPrefixCls = "".concat(prefixCls, "-item"); var memoFlattenOptions = Object(useMemo["a" /* default */])(function () { return flattenOptions; }, [open, flattenOptions], function (prev, next) { return next[0] && prev[1] !== next[1]; }); // =========================== List =========================== var listRef = external_window_React_["useRef"](null); var onListMouseDown = function onListMouseDown(event) { event.preventDefault(); }; var scrollIntoView = function scrollIntoView(index) { if (listRef.current) { listRef.current.scrollTo({ index: index }); } }; // ========================== Active ========================== var getEnabledActiveIndex = function getEnabledActiveIndex(index) { var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; var len = memoFlattenOptions.length; for (var i = 0; i < len; i += 1) { var current = (index + i * offset + len) % len; var _memoFlattenOptions$c = memoFlattenOptions[current], group = _memoFlattenOptions$c.group, data = _memoFlattenOptions$c.data; if (!group && !data.disabled) { return current; } } return -1; }; var _React$useState = external_window_React_["useState"](function () { return getEnabledActiveIndex(0); }), _React$useState2 = Object(slicedToArray["a" /* default */])(_React$useState, 2), activeIndex = _React$useState2[0], setActiveIndex = _React$useState2[1]; var setActive = function setActive(index) { setActiveIndex(index); // Trigger active event var flattenItem = memoFlattenOptions[index]; if (!flattenItem) { onActiveValue(null, -1); return; } onActiveValue(flattenItem.data.value, index); }; // Auto active first item when list length or searchValue changed external_window_React_["useEffect"](function () { setActive(defaultActiveFirstOption !== false ? getEnabledActiveIndex(0) : -1); }, [memoFlattenOptions.length, searchValue]); // Auto scroll to item position in single mode external_window_React_["useEffect"](function () { /** * React will skip `onChange` when component update. * `setActive` function will call root accessibility state update which makes re-render. * So we need to delay to let Input component trigger onChange first. */ var timeoutId = setTimeout(function () { if (!multiple && open && values.size === 1) { var value = Array.from(values)[0]; var index = memoFlattenOptions.findIndex(function (_ref2) { var data = _ref2.data; return data.value === value; }); setActive(index); scrollIntoView(index); } }); return function () { return clearTimeout(timeoutId); }; }, [open]); // ========================== Values ========================== var onSelectValue = function onSelectValue(value) { if (value !== undefined) { onSelect(value, { selected: !values.has(value) }); } // Single mode should always close by select if (!multiple) { onToggleOpen(false); } }; // ========================= Keyboard ========================= external_window_React_["useImperativeHandle"](ref, function () { return { onKeyDown: function onKeyDown(event) { var which = event.which; switch (which) { // >>> Arrow keys case KeyCode["a" /* default */].UP: case KeyCode["a" /* default */].DOWN: { var offset = 0; if (which === KeyCode["a" /* default */].UP) { offset = -1; } else if (which === KeyCode["a" /* default */].DOWN) { offset = 1; } if (offset !== 0) { var nextActiveIndex = getEnabledActiveIndex(activeIndex + offset, offset); scrollIntoView(nextActiveIndex); setActive(nextActiveIndex); } break; } // >>> Select case KeyCode["a" /* default */].ENTER: { // value var item = memoFlattenOptions[activeIndex]; if (item && !item.data.disabled) { onSelectValue(item.data.value); } else { onSelectValue(undefined); } if (open) { event.preventDefault(); } break; } // >>> Close case KeyCode["a" /* default */].ESC: { onToggleOpen(false); } } }, onKeyUp: function onKeyUp() {}, scrollTo: function scrollTo(index) { scrollIntoView(index); } }; }); // ========================== Render ========================== if (memoFlattenOptions.length === 0) { return external_window_React_["createElement"]("div", { role: "listbox", id: "".concat(id, "_list"), className: "".concat(itemPrefixCls, "-empty"), onMouseDown: onListMouseDown }, notFoundContent); } function renderItem(index) { var item = memoFlattenOptions[index]; if (!item) return null; var itemData = item.data || {}; var value = itemData.value, label = itemData.label, children = itemData.children; var attrs = Object(pickAttrs["a" /* default */])(itemData, true); var mergedLabel = childrenAsData ? children : label; return item ? external_window_React_["createElement"]("div", Object.assign({ "aria-label": typeof mergedLabel === 'string' ? mergedLabel : null }, attrs, { key: index, role: "option", id: "".concat(id, "_list_").concat(index), "aria-selected": values.has(value) }), value) : null; } return external_window_React_["createElement"](external_window_React_["Fragment"], null, external_window_React_["createElement"]("div", { role: "listbox", id: "".concat(id, "_list"), style: { height: 0, width: 0, overflow: 'hidden' } }, renderItem(activeIndex - 1), renderItem(activeIndex), renderItem(activeIndex + 1)), external_window_React_["createElement"](es["a" /* default */], { itemKey: "key", ref: listRef, data: memoFlattenOptions, height: height, itemHeight: itemHeight, fullHeight: false, onMouseDown: onListMouseDown, onScroll: onScroll, virtual: virtual, onMouseEnter: onMouseEnter }, function (_ref3, itemIndex) { var _classNames; var group = _ref3.group, groupOption = _ref3.groupOption, data = _ref3.data; var label = data.label, key = data.key; // Group if (group) { return external_window_React_["createElement"]("div", { className: classnames_default()(itemPrefixCls, "".concat(itemPrefixCls, "-group")) }, label !== undefined ? label : key); } var disabled = data.disabled, value = data.value, title = data.title, children = data.children, style = data.style, className = data.className, otherProps = Object(objectWithoutProperties["a" /* default */])(data, ["disabled", "value", "title", "children", "style", "className"]); // Option var selected = values.has(value); var optionPrefixCls = "".concat(itemPrefixCls, "-option"); var optionClassName = classnames_default()(itemPrefixCls, optionPrefixCls, className, (_classNames = {}, Object(defineProperty["a" /* default */])(_classNames, "".concat(optionPrefixCls, "-grouped"), groupOption), Object(defineProperty["a" /* default */])(_classNames, "".concat(optionPrefixCls, "-active"), activeIndex === itemIndex && !disabled), Object(defineProperty["a" /* default */])(_classNames, "".concat(optionPrefixCls, "-disabled"), disabled), Object(defineProperty["a" /* default */])(_classNames, "".concat(optionPrefixCls, "-selected"), selected), _classNames)); var mergedLabel = childrenAsData ? children : label; var iconVisible = !menuItemSelectedIcon || typeof menuItemSelectedIcon === 'function' || selected; return external_window_React_["createElement"]("div", Object.assign({}, otherProps, { "aria-selected": selected, className: optionClassName, title: title, onMouseMove: function onMouseMove() { if (activeIndex === itemIndex || disabled) { return; } setActive(itemIndex); }, onClick: function onClick() { if (!disabled) { onSelectValue(value); } }, style: style }), external_window_React_["createElement"]("div", { className: "".concat(optionPrefixCls, "-content") }, mergedLabel || value), external_window_React_["isValidElement"](menuItemSelectedIcon) || selected, iconVisible && external_window_React_["createElement"](TransBtn["a" /* default */], { className: "".concat(itemPrefixCls, "-option-state"), customizeIcon: menuItemSelectedIcon, customizeIconProps: { isSelected: selected } }, selected ? '✓' : null)); })); }; var RefOptionList = external_window_React_["forwardRef"](OptionList_OptionList); RefOptionList.displayName = 'OptionList'; /* harmony default export */ var es_OptionList = (RefOptionList); // CONCATENATED MODULE: ./node_modules/rc-select/es/Option.js /** This is a placeholder, not real render in dom */ var Option = function Option() { return null; }; Option.isSelectOption = true; /* harmony default export */ var es_Option = (Option); // CONCATENATED MODULE: ./node_modules/rc-select/es/OptGroup.js /** This is a placeholder, not real render in dom */ var OptGroup = function OptGroup() { return null; }; OptGroup.isSelectOptGroup = true; /* harmony default export */ var es_OptGroup = (OptGroup); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js var objectSpread2 = __webpack_require__("VTBJ"); // EXTERNAL MODULE: ./node_modules/rc-util/es/Children/toArray.js var toArray = __webpack_require__("Zm9Q"); // CONCATENATED MODULE: ./node_modules/rc-select/es/utils/legacyUtil.js function convertNodeToOption(node) { var key = node.key, _node$props = node.props, children = _node$props.children, value = _node$props.value, restProps = Object(objectWithoutProperties["a" /* default */])(_node$props, ["children", "value"]); return Object(objectSpread2["a" /* default */])({ key: key, value: value !== undefined ? value : key, children: children }, restProps); } function convertChildrenToData(nodes) { var optionOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; return Object(toArray["a" /* default */])(nodes).map(function (node, index) { if (!external_window_React_["isValidElement"](node) || !node.type) { return null; } var isSelectOptGroup = node.type.isSelectOptGroup, key = node.key, _node$props2 = node.props, children = _node$props2.children, restProps = Object(objectWithoutProperties["a" /* default */])(_node$props2, ["children"]); if (optionOnly || !isSelectOptGroup) { return convertNodeToOption(node); } return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({ key: "__RC_SELECT_GRP__".concat(key === null ? index : key, "__"), label: key }, restProps), {}, { options: convertChildrenToData(children) }); }).filter(function (data) { return data; }); } // EXTERNAL MODULE: ./node_modules/rc-select/es/utils/valueUtil.js var valueUtil = __webpack_require__("2Qr1"); // EXTERNAL MODULE: ./node_modules/rc-select/es/generate.js + 11 modules var generate = __webpack_require__("qNPg"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js var esm_typeof = __webpack_require__("U8pU"); // EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js var warning = __webpack_require__("Kwbf"); // EXTERNAL MODULE: ./node_modules/rc-select/es/utils/commonUtil.js var commonUtil = __webpack_require__("WKfj"); // CONCATENATED MODULE: ./node_modules/rc-select/es/utils/warningPropsUtil.js function warningProps(props) { var mode = props.mode, options = props.options, children = props.children, backfill = props.backfill, allowClear = props.allowClear, placeholder = props.placeholder, getInputElement = props.getInputElement, showSearch = props.showSearch, onSearch = props.onSearch, defaultOpen = props.defaultOpen, autoFocus = props.autoFocus, labelInValue = props.labelInValue, value = props.value, inputValue = props.inputValue, optionLabelProp = props.optionLabelProp; var multiple = mode === 'multiple' || mode === 'tags'; var mergedShowSearch = showSearch !== undefined ? showSearch : multiple || mode === 'combobox'; var mergedOptions = options || convertChildrenToData(children); // `tags` should not set option as disabled Object(warning["a" /* default */])(mode !== 'tags' || mergedOptions.every(function (opt) { return !opt.disabled; }), 'Please avoid setting option to disabled in tags mode since user can always type text as tag.'); // `combobox` & `tags` should option be `string` type if (mode === 'tags' || mode === 'combobox') { var hasNumberValue = mergedOptions.some(function (item) { if (item.options) { return item.options.some(function (opt) { return typeof ('value' in opt ? opt.value : opt.key) === 'number'; }); } return typeof ('value' in item ? item.value : item.key) === 'number'; }); Object(warning["a" /* default */])(!hasNumberValue, '`value` of Option should not use number type when `mode` is `tags` or `combobox`.'); } // `combobox` should not use `optionLabelProp` Object(warning["a" /* default */])(mode !== 'combobox' || !optionLabelProp, '`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly.'); // Only `combobox` support `backfill` Object(warning["a" /* default */])(mode === 'combobox' || !backfill, '`backfill` only works with `combobox` mode.'); // Only `combobox` support `getInputElement` Object(warning["a" /* default */])(mode === 'combobox' || !getInputElement, '`getInputElement` only work with `combobox` mode.'); // Customize `getInputElement` should not use `allowClear` & `placeholder` Object(warning["b" /* noteOnce */])(mode !== 'combobox' || !getInputElement || !allowClear || !placeholder, 'Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`.'); // `onSearch` should use in `combobox` or `showSearch` if (onSearch && !mergedShowSearch && mode !== 'combobox' && mode !== 'tags') { Object(warning["a" /* default */])(false, '`onSearch` should work with `showSearch` instead of use alone.'); } Object(warning["b" /* noteOnce */])(!defaultOpen || autoFocus, '`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed.'); if (value !== undefined && value !== null) { var values = Object(commonUtil["d" /* toArray */])(value); Object(warning["a" /* default */])(!labelInValue || values.every(function (val) { return Object(esm_typeof["a" /* default */])(val) === 'object' && ('key' in val || 'value' in val); }), '`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`'); Object(warning["a" /* default */])(!multiple || Array.isArray(value), '`value` should be array when `mode` is `multiple` or `tags`'); } // Syntactic sugar should use correct children type if (children) { var invalidateChildType = null; Object(toArray["a" /* default */])(children).some(function (node) { if (!external_window_React_["isValidElement"](node) || !node.type) { return false; } var type = node.type; if (type.isSelectOption) { return false; } if (type.isSelectOptGroup) { var allChildrenValid = Object(toArray["a" /* default */])(node.props.children).every(function (subNode) { if (!external_window_React_["isValidElement"](subNode) || !node.type || subNode.type.isSelectOption) { return true; } invalidateChildType = subNode.type; return false; }); if (allChildrenValid) { return false; } return true; } invalidateChildType = type; return true; }); if (invalidateChildType) { Object(warning["a" /* default */])(false, "`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(invalidateChildType.displayName || invalidateChildType.name || invalidateChildType, "`.")); } Object(warning["a" /* default */])(inputValue === undefined, '`inputValue` is deprecated, please use `searchValue` instead.'); } } /* harmony default export */ var warningPropsUtil = (warningProps); // CONCATENATED MODULE: ./node_modules/rc-select/es/Select.js /** * To match accessibility requirement, we always provide an input in the component. * Other element will not set `tabIndex` to avoid `onBlur` sequence problem. * For focused select, we set `aria-live="polite"` to update the accessibility content. * * ref: * - keyboard: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/listbox_role#Keyboard_interactions * * New api: * - listHeight * - listItemHeight * - component * * Remove deprecated api: * - multiple * - tags * - combobox * - firstActiveValue * - dropdownMenuStyle * - openClassName (Not list in api) * * Update: * - `backfill` only support `combobox` mode * - `combobox` mode not support `labelInValue` since it's meaningless * - `getInputElement` only support `combobox` mode * - `onChange` return OptionData instead of ReactNode * - `filterOption` `onChange` `onSelect` accept OptionData instead of ReactNode * - `combobox` mode trigger `onChange` will get `undefined` if no `value` match in Option * - `combobox` mode not support `optionLabelProp` */ var RefSelect = Object(generate["a" /* default */])({ prefixCls: 'rc-select', components: { optionList: es_OptionList }, convertChildrenToData: convertChildrenToData, flattenOptions: valueUtil["d" /* flattenOptions */], getLabeledValue: valueUtil["e" /* getLabeledValue */], filterOptions: valueUtil["b" /* filterOptions */], isValueDisabled: valueUtil["g" /* isValueDisabled */], findValueOption: valueUtil["c" /* findValueOption */], warningProps: warningPropsUtil, fillOptionsWithMissingValue: valueUtil["a" /* fillOptionsWithMissingValue */] }); /** * Typescript not support generic with function component, * we have to wrap an class component to handle this. */ var Select_Select = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(Select, _React$Component); var _super = Object(createSuper["a" /* default */])(Select); function Select() { var _this; Object(classCallCheck["a" /* default */])(this, Select); _this = _super.apply(this, arguments); _this.selectRef = external_window_React_["createRef"](); _this.focus = function () { _this.selectRef.current.focus(); }; _this.blur = function () { _this.selectRef.current.blur(); }; return _this; } Object(createClass["a" /* default */])(Select, [{ key: "render", value: function render() { return external_window_React_["createElement"](RefSelect, Object.assign({ ref: this.selectRef }, this.props)); } }]); return Select; }(external_window_React_["Component"]); Select_Select.Option = es_Option; Select_Select.OptGroup = es_OptGroup; /* harmony default export */ var es_Select = (Select_Select); // CONCATENATED MODULE: ./node_modules/rc-select/es/index.js /* harmony default export */ var rc_select_es = __webpack_exports__["c"] = (es_Select); /***/ }), /***/ "NvD2": /*!******************************************************!*\ !*** ./node_modules/rc-tree/es/utils/conductUtil.js ***! \******************************************************/ /*! exports provided: isCheckDisabled, conductCheck */ /*! exports used: conductCheck */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export isCheckDisabled */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return conductCheck; }); /* harmony import */ var rc_util_es_warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-util/es/warning */ "Kwbf"); function removeFromCheckedKeys(halfCheckedKeys, checkedKeys) { var filteredKeys = new Set(); halfCheckedKeys.forEach(function (key) { if (!checkedKeys.has(key)) { filteredKeys.add(key); } }); return filteredKeys; } function isCheckDisabled(node) { var _ref = node || {}, disabled = _ref.disabled, disableCheckbox = _ref.disableCheckbox, checkable = _ref.checkable; return !!(disabled || disableCheckbox) || checkable === false; } // Fill miss keys function fillConductCheck(keys, levelEntities, maxLevel, syntheticGetCheckDisabled) { var checkedKeys = new Set(keys); var halfCheckedKeys = new Set(); // Add checked keys top to bottom for (var level = 0; level <= maxLevel; level += 1) { var entities = levelEntities.get(level) || new Set(); entities.forEach(function (entity) { var key = entity.key, node = entity.node, _entity$children = entity.children, children = _entity$children === void 0 ? [] : _entity$children; if (checkedKeys.has(key) && !syntheticGetCheckDisabled(node)) { children.filter(function (childEntity) { return !syntheticGetCheckDisabled(childEntity.node); }).forEach(function (childEntity) { checkedKeys.add(childEntity.key); }); } }); } // Add checked keys from bottom to top var visitedKeys = new Set(); for (var _level = maxLevel; _level >= 0; _level -= 1) { var _entities = levelEntities.get(_level) || new Set(); _entities.forEach(function (entity) { var parent = entity.parent, node = entity.node; // Skip if no need to check if (syntheticGetCheckDisabled(node) || !entity.parent || visitedKeys.has(entity.parent.key)) { return; } // Skip if parent is disabled if (syntheticGetCheckDisabled(entity.parent.node)) { visitedKeys.add(parent.key); return; } var allChecked = true; var partialChecked = false; (parent.children || []).filter(function (childEntity) { return !syntheticGetCheckDisabled(childEntity.node); }).forEach(function (_ref2) { var key = _ref2.key; var checked = checkedKeys.has(key); if (allChecked && !checked) { allChecked = false; } if (!partialChecked && (checked || halfCheckedKeys.has(key))) { partialChecked = true; } }); if (allChecked) { checkedKeys.add(parent.key); } if (partialChecked) { halfCheckedKeys.add(parent.key); } visitedKeys.add(parent.key); }); } return { checkedKeys: Array.from(checkedKeys), halfCheckedKeys: Array.from(removeFromCheckedKeys(halfCheckedKeys, checkedKeys)) }; } // Remove useless key function cleanConductCheck(keys, halfKeys, levelEntities, maxLevel, syntheticGetCheckDisabled) { var checkedKeys = new Set(keys); var halfCheckedKeys = new Set(halfKeys); // Remove checked keys from top to bottom for (var level = 0; level <= maxLevel; level += 1) { var entities = levelEntities.get(level) || new Set(); entities.forEach(function (entity) { var key = entity.key, node = entity.node, _entity$children2 = entity.children, children = _entity$children2 === void 0 ? [] : _entity$children2; if (!checkedKeys.has(key) && !halfCheckedKeys.has(key) && !syntheticGetCheckDisabled(node)) { children.filter(function (childEntity) { return !syntheticGetCheckDisabled(childEntity.node); }).forEach(function (childEntity) { checkedKeys.delete(childEntity.key); }); } }); } // Remove checked keys form bottom to top halfCheckedKeys = new Set(); var visitedKeys = new Set(); for (var _level2 = maxLevel; _level2 >= 0; _level2 -= 1) { var _entities2 = levelEntities.get(_level2) || new Set(); _entities2.forEach(function (entity) { var parent = entity.parent, node = entity.node; // Skip if no need to check if (syntheticGetCheckDisabled(node) || !entity.parent || visitedKeys.has(entity.parent.key)) { return; } // Skip if parent is disabled if (syntheticGetCheckDisabled(entity.parent.node)) { visitedKeys.add(parent.key); return; } var allChecked = true; var partialChecked = false; (parent.children || []).filter(function (childEntity) { return !syntheticGetCheckDisabled(childEntity.node); }).forEach(function (_ref3) { var key = _ref3.key; var checked = checkedKeys.has(key); if (allChecked && !checked) { allChecked = false; } if (!partialChecked && (checked || halfCheckedKeys.has(key))) { partialChecked = true; } }); if (!allChecked) { checkedKeys.delete(parent.key); } if (partialChecked) { halfCheckedKeys.add(parent.key); } visitedKeys.add(parent.key); }); } return { checkedKeys: Array.from(checkedKeys), halfCheckedKeys: Array.from(removeFromCheckedKeys(halfCheckedKeys, checkedKeys)) }; } /** * Conduct with keys. * @param keyList current key list * @param keyEntities key - dataEntity map * @param mode `fill` to fill missing key, `clean` to remove useless key */ function conductCheck(keyList, checked, keyEntities, getCheckDisabled) { var warningMissKeys = []; var syntheticGetCheckDisabled; if (getCheckDisabled) { syntheticGetCheckDisabled = getCheckDisabled; } else { syntheticGetCheckDisabled = isCheckDisabled; } // We only handle exist keys var keys = new Set(keyList.filter(function (key) { var hasEntity = !!keyEntities[key]; if (!hasEntity) { warningMissKeys.push(key); } return hasEntity; })); var levelEntities = new Map(); var maxLevel = 0; // Convert entities by level for calculation Object.keys(keyEntities).forEach(function (key) { var entity = keyEntities[key]; var level = entity.level; var levelSet = levelEntities.get(level); if (!levelSet) { levelSet = new Set(); levelEntities.set(level, levelSet); } levelSet.add(entity); maxLevel = Math.max(maxLevel, level); }); Object(rc_util_es_warning__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(!warningMissKeys.length, "Tree missing follow keys: ".concat(warningMissKeys.slice(0, 100).map(function (key) { return "'".concat(key, "'"); }).join(', '))); var result; if (checked === true) { result = fillConductCheck(keys, levelEntities, maxLevel, syntheticGetCheckDisabled); } else { result = cleanConductCheck(keys, checked.halfCheckedKeys, levelEntities, maxLevel, syntheticGetCheckDisabled); } return result; } /***/ }), /***/ "OZM5": /*!*****************************************!*\ !*** ./node_modules/rc-tree/es/util.js ***! \*****************************************/ /*! exports provided: arrDel, arrAdd, posToArr, getPosition, isTreeNode, getDragNodesKeys, calcDropPosition, calcSelectedKeys, convertDataToTree, parseCheckedKeys, conductExpandParent, getDataAndAria */ /*! exports used: arrAdd, arrDel, calcDropPosition, calcSelectedKeys, conductExpandParent, getDataAndAria, getDragNodesKeys, getPosition, isTreeNode, parseCheckedKeys, posToArr */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return arrDel; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return arrAdd; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return posToArr; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getPosition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return isTreeNode; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return getDragNodesKeys; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return calcDropPosition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return calcSelectedKeys; }); /* unused harmony export convertDataToTree */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return parseCheckedKeys; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return conductExpandParent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return getDataAndAria; }); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "KQm4"); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "U8pU"); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "Ff2n"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "cDcd"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var rc_util_es_warning__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-util/es/warning */ "Kwbf"); /* harmony import */ var _TreeNode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./TreeNode */ "WaYH"); /** * Legacy code. Should avoid to use if you are new to import these code. */ var DRAG_SIDE_RANGE = 0.25; var DRAG_MIN_GAP = 2; function arrDel(list, value) { var clone = list.slice(); var index = clone.indexOf(value); if (index >= 0) { clone.splice(index, 1); } return clone; } function arrAdd(list, value) { var clone = list.slice(); if (clone.indexOf(value) === -1) { clone.push(value); } return clone; } function posToArr(pos) { return pos.split('-'); } function getPosition(level, index) { return "".concat(level, "-").concat(index); } function isTreeNode(node) { return node && node.type && node.type.isTreeNode; } function getDragNodesKeys(dragNodeKey, keyEntities) { var dragNodesKeys = [dragNodeKey]; var entity = keyEntities[dragNodeKey]; function dig() { var list = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; list.forEach(function (_ref) { var key = _ref.key, children = _ref.children; dragNodesKeys.push(key); dig(children); }); } dig(entity.children); return dragNodesKeys; } // Only used when drag, not affect SSR. function calcDropPosition(event, treeNode) { var clientY = event.clientY; var _treeNode$selectHandl = treeNode.selectHandle.getBoundingClientRect(), top = _treeNode$selectHandl.top, bottom = _treeNode$selectHandl.bottom, height = _treeNode$selectHandl.height; var des = Math.max(height * DRAG_SIDE_RANGE, DRAG_MIN_GAP); if (clientY <= top + des) { return -1; } if (clientY >= bottom - des) { return 1; } return 0; } /** * Return selectedKeys according with multiple prop * @param selectedKeys * @param props * @returns [string] */ function calcSelectedKeys(selectedKeys, props) { if (!selectedKeys) return undefined; var multiple = props.multiple; if (multiple) { return selectedKeys.slice(); } if (selectedKeys.length) { return [selectedKeys[0]]; } return selectedKeys; } var internalProcessProps = function internalProcessProps(props) { return props; }; function convertDataToTree(treeData, processor) { if (!treeData) return []; var _ref2 = processor || {}, _ref2$processProps = _ref2.processProps, processProps = _ref2$processProps === void 0 ? internalProcessProps : _ref2$processProps; var list = Array.isArray(treeData) ? treeData : [treeData]; return list.map(function (_ref3) { var children = _ref3.children, props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_ref3, ["children"]); var childrenNodes = convertDataToTree(children, processor); return react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(_TreeNode__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], Object.assign({}, processProps(props)), childrenNodes); }); } /** * Parse `checkedKeys` to { checkedKeys, halfCheckedKeys } style */ function parseCheckedKeys(keys) { if (!keys) { return null; } // Convert keys to object format var keyProps; if (Array.isArray(keys)) { // [Legacy] Follow the api doc keyProps = { checkedKeys: keys, halfCheckedKeys: undefined }; } else if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(keys) === 'object') { keyProps = { checkedKeys: keys.checked || undefined, halfCheckedKeys: keys.halfChecked || undefined }; } else { Object(rc_util_es_warning__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(false, '`checkedKeys` is not an array or an object'); return null; } return keyProps; } /** * If user use `autoExpandParent` we should get the list of parent node * @param keyList * @param keyEntities */ function conductExpandParent(keyList, keyEntities) { var expandedKeys = new Set(); function conductUp(key) { if (expandedKeys.has(key)) return; var entity = keyEntities[key]; if (!entity) return; expandedKeys.add(key); var parent = entity.parent, node = entity.node; if (node.disabled) return; if (parent) { conductUp(parent.key); } } (keyList || []).forEach(function (key) { conductUp(key); }); return Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(expandedKeys); } /** * Returns only the data- and aria- key/value pairs */ function getDataAndAria(props) { var omitProps = {}; Object.keys(props).forEach(function (key) { if (key.startsWith('data-') || key.startsWith('aria-')) { omitProps[key] = props[key]; } }); return omitProps; } /***/ }), /***/ "Qfqc": /*!*********************************************************************!*\ !*** ./src/pages/Engineering/Lists/CurseSetting/index.less?modules ***! \*********************************************************************/ /*! no static exports found */ /*! exports used: default */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin module.exports = {"flex_box_center":"flex_box_center___15S-q","flex_space_between":"flex_space_between___23kwU","flex_box_vertical_center":"flex_box_vertical_center___2l8VY","flex_box_center_end":"flex_box_center_end___VYSS9","flex_box_column":"flex_box_column___3s3TT","wrap":"wrap___2KYjo","title":"title___2f4-2","standardTableWrap":"standardTableWrap___3LLAr","targetTableWrap":"targetTableWrap___cvI3A","waysTableWrap":"waysTableWrap___2j0v-","green":"green___2L8AY","box":"box___22ae3","padding":"padding___2PpV_","control":"control___1HoTk","label":"label___2GboG","customTable":"customTable___3ah1R","tagWrap":"tagWrap___pnb_0","tag":"tag____fSY6","line":"line___3sZe3","textwidth":"textwidth___3QXnN","modalWrapContainer":"modalWrapContainer___o_fOQ","inputWrap":"inputWrap___AsC3W","addCourseTabsContainer":"addCourseTabsContainer___3oEeV","textone":"textone___2YzXy"}; /***/ }), /***/ "SA+Z": /*!********************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/toArray.js ***! \********************************************************/ /*! no static exports found */ /*! exports used: default */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "wTVA"); var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ "EbDI"); var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "ZhPi"); var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "wkBT"); function _toArray(arr) { return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest(); } module.exports = _toArray, module.exports.__esModule = true, module.exports["default"] = module.exports; /***/ }), /***/ "WaYH": /*!*********************************************************!*\ !*** ./node_modules/rc-tree/es/TreeNode.js + 1 modules ***! \*********************************************************/ /*! exports provided: InternalTreeNode, default */ /*! exports used: default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/contextTypes.js because of ./node_modules/rc-tree/es/Tree.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/util.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/utils/treeUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */ /*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // UNUSED EXPORTS: InternalTreeNode // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js var defineProperty = __webpack_require__("rePB"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js var objectWithoutProperties = __webpack_require__("Ff2n"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js var objectSpread2 = __webpack_require__("VTBJ"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js var classCallCheck = __webpack_require__("1OyB"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js var createClass = __webpack_require__("vuIU"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js var assertThisInitialized = __webpack_require__("JX7q"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js var inherits = __webpack_require__("Ji7U"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 1 modules var createSuper = __webpack_require__("LK+K"); // EXTERNAL MODULE: external "window.React" var external_window_React_ = __webpack_require__("cDcd"); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__("TSYQ"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: ./node_modules/rc-tree/es/contextTypes.js var contextTypes = __webpack_require__("sboe"); // EXTERNAL MODULE: ./node_modules/rc-tree/es/util.js var util = __webpack_require__("OZM5"); // CONCATENATED MODULE: ./node_modules/rc-tree/es/Indent.js var Indent_Indent = function Indent(_ref) { var prefixCls = _ref.prefixCls, level = _ref.level, isStart = _ref.isStart, isEnd = _ref.isEnd; if (!level) { return null; } var baseClassName = "".concat(prefixCls, "-indent-unit"); var list = []; for (var i = 0; i < level; i += 1) { var _classNames; list.push(external_window_React_["createElement"]("span", { key: i, className: classnames_default()(baseClassName, (_classNames = {}, Object(defineProperty["a" /* default */])(_classNames, "".concat(baseClassName, "-start"), isStart[i + 1]), Object(defineProperty["a" /* default */])(_classNames, "".concat(baseClassName, "-end"), isEnd[i + 1]), Object(defineProperty["a" /* default */])(_classNames, "".concat(baseClassName, "-end-first-level"), !i && isEnd[0]), _classNames)) })); } return external_window_React_["createElement"]("span", { "aria-hidden": "true", className: "".concat(prefixCls, "-indent") }, list); }; /* harmony default export */ var es_Indent = (Indent_Indent); // EXTERNAL MODULE: ./node_modules/rc-tree/es/utils/treeUtil.js var treeUtil = __webpack_require__("815F"); // CONCATENATED MODULE: ./node_modules/rc-tree/es/TreeNode.js // @ts-ignore var ICON_OPEN = 'open'; var ICON_CLOSE = 'close'; var defaultTitle = '---'; var TreeNode_InternalTreeNode = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(InternalTreeNode, _React$Component); var _super = Object(createSuper["a" /* default */])(InternalTreeNode); function InternalTreeNode() { var _this; Object(classCallCheck["a" /* default */])(this, InternalTreeNode); _this = _super.apply(this, arguments); _this.state = { dragNodeHighlight: false }; _this.onSelectorClick = function (e) { // Click trigger before select/check operation var onNodeClick = _this.props.context.onNodeClick; onNodeClick(e, Object(treeUtil["b" /* convertNodePropsToEventData */])(_this.props)); if (_this.isSelectable()) { _this.onSelect(e); } else { _this.onCheck(e); } }; _this.onSelectorDoubleClick = function (e) { var onNodeDoubleClick = _this.props.context.onNodeDoubleClick; onNodeDoubleClick(e, Object(treeUtil["b" /* convertNodePropsToEventData */])(_this.props)); }; _this.onSelect = function (e) { if (_this.isDisabled()) return; var onNodeSelect = _this.props.context.onNodeSelect; e.preventDefault(); onNodeSelect(e, Object(treeUtil["b" /* convertNodePropsToEventData */])(_this.props)); }; _this.onCheck = function (e) { if (_this.isDisabled()) return; var _this$props = _this.props, disableCheckbox = _this$props.disableCheckbox, checked = _this$props.checked; var onNodeCheck = _this.props.context.onNodeCheck; if (!_this.isCheckable() || disableCheckbox) return; e.preventDefault(); var targetChecked = !checked; onNodeCheck(e, Object(treeUtil["b" /* convertNodePropsToEventData */])(_this.props), targetChecked); }; _this.onMouseEnter = function (e) { var onNodeMouseEnter = _this.props.context.onNodeMouseEnter; onNodeMouseEnter(e, Object(treeUtil["b" /* convertNodePropsToEventData */])(_this.props)); }; _this.onMouseLeave = function (e) { var onNodeMouseLeave = _this.props.context.onNodeMouseLeave; onNodeMouseLeave(e, Object(treeUtil["b" /* convertNodePropsToEventData */])(_this.props)); }; _this.onContextMenu = function (e) { var onNodeContextMenu = _this.props.context.onNodeContextMenu; onNodeContextMenu(e, Object(treeUtil["b" /* convertNodePropsToEventData */])(_this.props)); }; _this.onDragStart = function (e) { var onNodeDragStart = _this.props.context.onNodeDragStart; e.stopPropagation(); _this.setState({ dragNodeHighlight: true }); onNodeDragStart(e, Object(assertThisInitialized["a" /* default */])(_this)); try { // ie throw error // firefox-need-it e.dataTransfer.setData('text/plain', ''); } catch (error) {// empty } }; _this.onDragEnter = function (e) { var onNodeDragEnter = _this.props.context.onNodeDragEnter; e.preventDefault(); e.stopPropagation(); onNodeDragEnter(e, Object(assertThisInitialized["a" /* default */])(_this)); }; _this.onDragOver = function (e) { var onNodeDragOver = _this.props.context.onNodeDragOver; e.preventDefault(); e.stopPropagation(); onNodeDragOver(e, Object(assertThisInitialized["a" /* default */])(_this)); }; _this.onDragLeave = function (e) { var onNodeDragLeave = _this.props.context.onNodeDragLeave; e.stopPropagation(); onNodeDragLeave(e, Object(assertThisInitialized["a" /* default */])(_this)); }; _this.onDragEnd = function (e) { var onNodeDragEnd = _this.props.context.onNodeDragEnd; e.stopPropagation(); _this.setState({ dragNodeHighlight: false }); onNodeDragEnd(e, Object(assertThisInitialized["a" /* default */])(_this)); }; _this.onDrop = function (e) { var onNodeDrop = _this.props.context.onNodeDrop; e.preventDefault(); e.stopPropagation(); _this.setState({ dragNodeHighlight: false }); onNodeDrop(e, Object(assertThisInitialized["a" /* default */])(_this)); }; // Disabled item still can be switch _this.onExpand = function (e) { var onNodeExpand = _this.props.context.onNodeExpand; onNodeExpand(e, Object(treeUtil["b" /* convertNodePropsToEventData */])(_this.props)); }; // Drag usage _this.setSelectHandle = function (node) { _this.selectHandle = node; }; _this.getNodeState = function () { var expanded = _this.props.expanded; if (_this.isLeaf()) { return null; } return expanded ? ICON_OPEN : ICON_CLOSE; }; _this.hasChildren = function () { var eventKey = _this.props.eventKey; var keyEntities = _this.props.context.keyEntities; var _ref = keyEntities[eventKey] || {}, children = _ref.children; return !!(children || []).length; }; _this.isLeaf = function () { var _this$props2 = _this.props, isLeaf = _this$props2.isLeaf, loaded = _this$props2.loaded; var loadData = _this.props.context.loadData; var hasChildren = _this.hasChildren(); if (isLeaf === false) { return false; } return isLeaf || !loadData && !hasChildren || loadData && loaded && !hasChildren; }; _this.isDisabled = function () { var disabled = _this.props.disabled; var treeDisabled = _this.props.context.disabled; return !!(treeDisabled || disabled); }; _this.isCheckable = function () { var checkable = _this.props.checkable; var treeCheckable = _this.props.context.checkable; // Return false if tree or treeNode is not checkable if (!treeCheckable || checkable === false) return false; return treeCheckable; }; // Load data to avoid default expanded tree without data _this.syncLoadData = function (props) { var expanded = props.expanded, loading = props.loading, loaded = props.loaded; var _this$props$context = _this.props.context, loadData = _this$props$context.loadData, onNodeLoad = _this$props$context.onNodeLoad; if (loading) return; // read from state to avoid loadData at same time if (loadData && expanded && !_this.isLeaf()) { // We needn't reload data when has children in sync logic // It's only needed in node expanded if (!_this.hasChildren() && !loaded) { onNodeLoad(Object(treeUtil["b" /* convertNodePropsToEventData */])(_this.props)); } } }; // Switcher _this.renderSwitcher = function () { var _this$props3 = _this.props, expanded = _this$props3.expanded, switcherIconFromProps = _this$props3.switcherIcon; var _this$props$context2 = _this.props.context, prefixCls = _this$props$context2.prefixCls, switcherIconFromCtx = _this$props$context2.switcherIcon; var switcherIcon = switcherIconFromProps || switcherIconFromCtx; if (_this.isLeaf()) { return external_window_React_["createElement"]("span", { className: classnames_default()("".concat(prefixCls, "-switcher"), "".concat(prefixCls, "-switcher-noop")) }, typeof switcherIcon === 'function' ? switcherIcon(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, _this.props), {}, { isLeaf: true })) : switcherIcon); } var switcherCls = classnames_default()("".concat(prefixCls, "-switcher"), "".concat(prefixCls, "-switcher_").concat(expanded ? ICON_OPEN : ICON_CLOSE)); return external_window_React_["createElement"]("span", { onClick: _this.onExpand, className: switcherCls }, typeof switcherIcon === 'function' ? switcherIcon(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, _this.props), {}, { isLeaf: false })) : switcherIcon); }; // Checkbox _this.renderCheckbox = function () { var _this$props4 = _this.props, checked = _this$props4.checked, halfChecked = _this$props4.halfChecked, disableCheckbox = _this$props4.disableCheckbox; var prefixCls = _this.props.context.prefixCls; var disabled = _this.isDisabled(); var checkable = _this.isCheckable(); if (!checkable) return null; // [Legacy] Custom element should be separate with `checkable` in future var $custom = typeof checkable !== 'boolean' ? checkable : null; return external_window_React_["createElement"]("span", { className: classnames_default()("".concat(prefixCls, "-checkbox"), checked && "".concat(prefixCls, "-checkbox-checked"), !checked && halfChecked && "".concat(prefixCls, "-checkbox-indeterminate"), (disabled || disableCheckbox) && "".concat(prefixCls, "-checkbox-disabled")), onClick: _this.onCheck }, $custom); }; _this.renderIcon = function () { var loading = _this.props.loading; var prefixCls = _this.props.context.prefixCls; return external_window_React_["createElement"]("span", { className: classnames_default()("".concat(prefixCls, "-iconEle"), "".concat(prefixCls, "-icon__").concat(_this.getNodeState() || 'docu'), loading && "".concat(prefixCls, "-icon_loading")) }); }; // Icon + Title _this.renderSelector = function () { var dragNodeHighlight = _this.state.dragNodeHighlight; var _this$props5 = _this.props, title = _this$props5.title, selected = _this$props5.selected, icon = _this$props5.icon, loading = _this$props5.loading, data = _this$props5.data; var _this$props$context3 = _this.props.context, prefixCls = _this$props$context3.prefixCls, showIcon = _this$props$context3.showIcon, treeIcon = _this$props$context3.icon, draggable = _this$props$context3.draggable, loadData = _this$props$context3.loadData, titleRender = _this$props$context3.titleRender; var disabled = _this.isDisabled(); var wrapClass = "".concat(prefixCls, "-node-content-wrapper"); // Icon - Still show loading icon when loading without showIcon var $icon; if (showIcon) { var currentIcon = icon || treeIcon; $icon = currentIcon ? external_window_React_["createElement"]("span", { className: classnames_default()("".concat(prefixCls, "-iconEle"), "".concat(prefixCls, "-icon__customize")) }, typeof currentIcon === 'function' ? currentIcon(_this.props) : currentIcon) : _this.renderIcon(); } else if (loadData && loading) { $icon = _this.renderIcon(); } // Title var titleNode; if (typeof title === 'function') { titleNode = title(data); } else if (titleRender) { titleNode = titleRender(data); } else { titleNode = title; } var $title = external_window_React_["createElement"]("span", { className: "".concat(prefixCls, "-title") }, titleNode); return external_window_React_["createElement"]("span", { ref: _this.setSelectHandle, title: typeof title === 'string' ? title : '', className: classnames_default()("".concat(wrapClass), "".concat(wrapClass, "-").concat(_this.getNodeState() || 'normal'), !disabled && (selected || dragNodeHighlight) && "".concat(prefixCls, "-node-selected"), !disabled && draggable && 'draggable'), draggable: !disabled && draggable || undefined, "aria-grabbed": !disabled && draggable || undefined, onMouseEnter: _this.onMouseEnter, onMouseLeave: _this.onMouseLeave, onContextMenu: _this.onContextMenu, onClick: _this.onSelectorClick, onDoubleClick: _this.onSelectorDoubleClick, onDragStart: draggable ? _this.onDragStart : undefined }, $icon, $title); }; return _this; } // Isomorphic needn't load data in server side Object(createClass["a" /* default */])(InternalTreeNode, [{ key: "componentDidMount", value: function componentDidMount() { this.syncLoadData(this.props); } }, { key: "componentDidUpdate", value: function componentDidUpdate() { this.syncLoadData(this.props); } }, { key: "isSelectable", value: function isSelectable() { var selectable = this.props.selectable; var treeSelectable = this.props.context.selectable; // Ignore when selectable is undefined or null if (typeof selectable === 'boolean') { return selectable; } return treeSelectable; } }, { key: "render", value: function render() { var _classNames; var _this$props6 = this.props, eventKey = _this$props6.eventKey, className = _this$props6.className, style = _this$props6.style, dragOver = _this$props6.dragOver, dragOverGapTop = _this$props6.dragOverGapTop, dragOverGapBottom = _this$props6.dragOverGapBottom, isLeaf = _this$props6.isLeaf, isStart = _this$props6.isStart, isEnd = _this$props6.isEnd, expanded = _this$props6.expanded, selected = _this$props6.selected, checked = _this$props6.checked, halfChecked = _this$props6.halfChecked, loading = _this$props6.loading, domRef = _this$props6.domRef, active = _this$props6.active, onMouseMove = _this$props6.onMouseMove, otherProps = Object(objectWithoutProperties["a" /* default */])(_this$props6, ["eventKey", "className", "style", "dragOver", "dragOverGapTop", "dragOverGapBottom", "isLeaf", "isStart", "isEnd", "expanded", "selected", "checked", "halfChecked", "loading", "domRef", "active", "onMouseMove"]); var _this$props$context4 = this.props.context, prefixCls = _this$props$context4.prefixCls, filterTreeNode = _this$props$context4.filterTreeNode, draggable = _this$props$context4.draggable, keyEntities = _this$props$context4.keyEntities; var disabled = this.isDisabled(); var dataOrAriaAttributeProps = Object(util["f" /* getDataAndAria */])(otherProps); var _ref2 = keyEntities[eventKey] || {}, level = _ref2.level; var isEndNode = isEnd[isEnd.length - 1]; return external_window_React_["createElement"]("div", Object.assign({ ref: domRef, className: classnames_default()(className, "".concat(prefixCls, "-treenode"), (_classNames = {}, Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-treenode-disabled"), disabled), Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-treenode-switcher-").concat(expanded ? 'open' : 'close'), !isLeaf), Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-treenode-checkbox-checked"), checked), Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-treenode-checkbox-indeterminate"), halfChecked), Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-treenode-selected"), selected), Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-treenode-loading"), loading), Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-treenode-active"), active), Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-treenode-leaf-last"), isEndNode), Object(defineProperty["a" /* default */])(_classNames, 'drag-over', !disabled && dragOver), Object(defineProperty["a" /* default */])(_classNames, 'drag-over-gap-top', !disabled && dragOverGapTop), Object(defineProperty["a" /* default */])(_classNames, 'drag-over-gap-bottom', !disabled && dragOverGapBottom), Object(defineProperty["a" /* default */])(_classNames, 'filter-node', filterTreeNode && filterTreeNode(Object(treeUtil["b" /* convertNodePropsToEventData */])(this.props))), _classNames)), style: style, onDragEnter: draggable ? this.onDragEnter : undefined, onDragOver: draggable ? this.onDragOver : undefined, onDragLeave: draggable ? this.onDragLeave : undefined, onDrop: draggable ? this.onDrop : undefined, onDragEnd: draggable ? this.onDragEnd : undefined, onMouseMove: onMouseMove }, dataOrAriaAttributeProps), external_window_React_["createElement"](es_Indent, { prefixCls: prefixCls, level: level, isStart: isStart, isEnd: isEnd }), this.renderSwitcher(), this.renderCheckbox(), this.renderSelector()); } }]); return InternalTreeNode; }(external_window_React_["Component"]); var TreeNode_ContextTreeNode = function ContextTreeNode(props) { return external_window_React_["createElement"](contextTypes["a" /* TreeContext */].Consumer, null, function (context) { return external_window_React_["createElement"](TreeNode_InternalTreeNode, Object.assign({}, props, { context: context })); }); }; TreeNode_ContextTreeNode.displayName = 'TreeNode'; TreeNode_ContextTreeNode.defaultProps = { title: defaultTitle }; TreeNode_ContextTreeNode.isTreeNode = 1; /* harmony default export */ var TreeNode = __webpack_exports__["a"] = (TreeNode_ContextTreeNode); /***/ }), /***/ "Y1PL": /*!**********************************************************!*\ !*** ./node_modules/rc-textarea/es/index.js + 7 modules ***! \**********************************************************/ /*! exports provided: ResizableTextArea, default */ /*! all exports used */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/findDOMNode.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/omit.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, "ResizableTextArea", function() { return /* reexport */ es_ResizableTextArea; }); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__("wx14"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js var classCallCheck = __webpack_require__("1OyB"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js var createClass = __webpack_require__("vuIU"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js var inherits = __webpack_require__("Ji7U"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 1 modules var createSuper = __webpack_require__("LK+K"); // EXTERNAL MODULE: external "window.React" var external_window_React_ = __webpack_require__("cDcd"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js var objectSpread2 = __webpack_require__("VTBJ"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js var defineProperty = __webpack_require__("rePB"); // EXTERNAL MODULE: ./node_modules/rc-util/es/Children/toArray.js var toArray = __webpack_require__("Zm9Q"); // EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js var warning = __webpack_require__("Kwbf"); // EXTERNAL MODULE: ./node_modules/rc-util/es/ref.js var ref = __webpack_require__("c+Xe"); // EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/findDOMNode.js var findDOMNode = __webpack_require__("m+aA"); // EXTERNAL MODULE: ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js var ResizeObserver_es = __webpack_require__("bdgK"); // CONCATENATED MODULE: ./node_modules/rc-textarea/node_modules/rc-resize-observer/es/utils/observerUtil.js // =============================== Const =============================== var elementListeners = new Map(); function observerUtil_onResize(entities) { entities.forEach(function (entity) { var _elementListeners$get; var target = entity.target; (_elementListeners$get = elementListeners.get(target)) === null || _elementListeners$get === void 0 ? void 0 : _elementListeners$get.forEach(function (listener) { return listener(target); }); }); } // Note: ResizeObserver polyfill not support option to measure border-box resize var resizeObserver = new ResizeObserver_es["default"](observerUtil_onResize); // Dev env only var _el = false ? undefined : null; // eslint-disable-line var _rs = false ? undefined : null; // eslint-disable-line // ============================== Observe ============================== function observe(element, callback) { if (!elementListeners.has(element)) { elementListeners.set(element, new Set()); resizeObserver.observe(element); } elementListeners.get(element).add(callback); } function unobserve(element, callback) { if (elementListeners.has(element)) { elementListeners.get(element).delete(callback); if (!elementListeners.get(element).size) { resizeObserver.unobserve(element); elementListeners.delete(element); } } } // CONCATENATED MODULE: ./node_modules/rc-textarea/node_modules/rc-resize-observer/es/SingleObserver/DomWrapper.js /** * Fallback to findDOMNode if origin ref do not provide any dom element */ var DomWrapper_DomWrapper = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(DomWrapper, _React$Component); var _super = Object(createSuper["a" /* default */])(DomWrapper); function DomWrapper() { Object(classCallCheck["a" /* default */])(this, DomWrapper); return _super.apply(this, arguments); } Object(createClass["a" /* default */])(DomWrapper, [{ key: "render", value: function render() { return this.props.children; } }]); return DomWrapper; }(external_window_React_["Component"]); // CONCATENATED MODULE: ./node_modules/rc-textarea/node_modules/rc-resize-observer/es/Collection.js var CollectionContext = /*#__PURE__*/external_window_React_["createContext"](null); /** * Collect all the resize event from children ResizeObserver */ function Collection(_ref) { var children = _ref.children, onBatchResize = _ref.onBatchResize; var resizeIdRef = external_window_React_["useRef"](0); var resizeInfosRef = external_window_React_["useRef"]([]); var onCollectionResize = external_window_React_["useContext"](CollectionContext); var onResize = external_window_React_["useCallback"](function (size, element, data) { resizeIdRef.current += 1; var currentId = resizeIdRef.current; resizeInfosRef.current.push({ size: size, element: element, data: data }); Promise.resolve().then(function () { if (currentId === resizeIdRef.current) { onBatchResize === null || onBatchResize === void 0 ? void 0 : onBatchResize(resizeInfosRef.current); resizeInfosRef.current = []; } }); // Continue bubbling if parent exist onCollectionResize === null || onCollectionResize === void 0 ? void 0 : onCollectionResize(size, element, data); }, [onBatchResize, onCollectionResize]); return /*#__PURE__*/external_window_React_["createElement"](CollectionContext.Provider, { value: onResize }, children); } // CONCATENATED MODULE: ./node_modules/rc-textarea/node_modules/rc-resize-observer/es/SingleObserver/index.js function SingleObserver(props) { var children = props.children, disabled = props.disabled; var elementRef = external_window_React_["useRef"](null); var wrapperRef = external_window_React_["useRef"](null); var onCollectionResize = external_window_React_["useContext"](CollectionContext); // ============================= Size ============================= var sizeRef = external_window_React_["useRef"]({ width: -1, height: -1, offsetWidth: -1, offsetHeight: -1 }); // ============================= Ref ============================== var canRef = /*#__PURE__*/external_window_React_["isValidElement"](children) && Object(ref["c" /* supportRef */])(children); var originRef = canRef ? children.ref : null; var mergedRef = external_window_React_["useMemo"](function () { return Object(ref["a" /* composeRef */])(originRef, elementRef); }, [originRef, elementRef]); // =========================== Observe ============================ var propsRef = external_window_React_["useRef"](props); propsRef.current = props; // Handler var onInternalResize = external_window_React_["useCallback"](function (target) { var _propsRef$current = propsRef.current, onResize = _propsRef$current.onResize, data = _propsRef$current.data; var _target$getBoundingCl = target.getBoundingClientRect(), width = _target$getBoundingCl.width, height = _target$getBoundingCl.height; var offsetWidth = target.offsetWidth, offsetHeight = target.offsetHeight; /** * Resize observer trigger when content size changed. * In most case we just care about element size, * let's use `boundary` instead of `contentRect` here to avoid shaking. */ var fixedWidth = Math.floor(width); var fixedHeight = Math.floor(height); if (sizeRef.current.width !== fixedWidth || sizeRef.current.height !== fixedHeight || sizeRef.current.offsetWidth !== offsetWidth || sizeRef.current.offsetHeight !== offsetHeight) { var size = { width: fixedWidth, height: fixedHeight, offsetWidth: offsetWidth, offsetHeight: offsetHeight }; sizeRef.current = size; // IE is strange, right? var mergedOffsetWidth = offsetWidth === Math.round(width) ? width : offsetWidth; var mergedOffsetHeight = offsetHeight === Math.round(height) ? height : offsetHeight; var sizeInfo = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, size), {}, { offsetWidth: mergedOffsetWidth, offsetHeight: mergedOffsetHeight }); // Let collection know what happened onCollectionResize === null || onCollectionResize === void 0 ? void 0 : onCollectionResize(sizeInfo, target, data); if (onResize) { // defer the callback but not defer to next frame Promise.resolve().then(function () { onResize(sizeInfo, target); }); } } }, []); // Dynamic observe external_window_React_["useEffect"](function () { var currentElement = Object(findDOMNode["a" /* default */])(elementRef.current) || Object(findDOMNode["a" /* default */])(wrapperRef.current); if (currentElement && !disabled) { observe(currentElement, onInternalResize); } return function () { return unobserve(currentElement, onInternalResize); }; }, [elementRef.current, disabled]); // ============================ Render ============================ return /*#__PURE__*/external_window_React_["createElement"](DomWrapper_DomWrapper, { ref: wrapperRef }, canRef ? /*#__PURE__*/external_window_React_["cloneElement"](children, { ref: mergedRef }) : children); } // CONCATENATED MODULE: ./node_modules/rc-textarea/node_modules/rc-resize-observer/es/index.js var INTERNAL_PREFIX_KEY = 'rc-observer-key'; function ResizeObserver(props) { var children = props.children; var childNodes = Object(toArray["a" /* default */])(children); if (false) {} return childNodes.map(function (child, index) { var key = (child === null || child === void 0 ? void 0 : child.key) || "".concat(INTERNAL_PREFIX_KEY, "-").concat(index); return /*#__PURE__*/external_window_React_["createElement"](SingleObserver, Object(esm_extends["a" /* default */])({}, props, { key: key }), child); }); } ResizeObserver.Collection = Collection; /* harmony default export */ var es = (ResizeObserver); // EXTERNAL MODULE: ./node_modules/rc-util/es/omit.js var omit = __webpack_require__("bT9E"); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__("TSYQ"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // CONCATENATED MODULE: ./node_modules/rc-textarea/es/calculateNodeHeight.js // Thanks to https://github.com/andreypopp/react-textarea-autosize/ /** * calculateNodeHeight(uiTextNode, useCache = false) */ var HIDDEN_TEXTAREA_STYLE = "\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n"; var SIZING_STYLE = ['letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'font-variant', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-left', 'padding-right', 'border-width', 'box-sizing', 'word-break']; var computedStyleCache = {}; var hiddenTextarea; function calculateNodeStyling(node) { var useCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var nodeRef = node.getAttribute('id') || node.getAttribute('data-reactid') || node.getAttribute('name'); if (useCache && computedStyleCache[nodeRef]) { return computedStyleCache[nodeRef]; } var style = window.getComputedStyle(node); var boxSizing = style.getPropertyValue('box-sizing') || style.getPropertyValue('-moz-box-sizing') || style.getPropertyValue('-webkit-box-sizing'); var paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top')); var borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width')); var sizingStyle = SIZING_STYLE.map(function (name) { return "".concat(name, ":").concat(style.getPropertyValue(name)); }).join(';'); var nodeInfo = { sizingStyle: sizingStyle, paddingSize: paddingSize, borderSize: borderSize, boxSizing: boxSizing }; if (useCache && nodeRef) { computedStyleCache[nodeRef] = nodeInfo; } return nodeInfo; } function calculateNodeHeight(uiTextNode) { var useCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var minRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; var maxRows = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; if (!hiddenTextarea) { hiddenTextarea = document.createElement('textarea'); hiddenTextarea.setAttribute('tab-index', '-1'); hiddenTextarea.setAttribute('aria-hidden', 'true'); document.body.appendChild(hiddenTextarea); } // Fix wrap="off" issue // https://github.com/ant-design/ant-design/issues/6577 if (uiTextNode.getAttribute('wrap')) { hiddenTextarea.setAttribute('wrap', uiTextNode.getAttribute('wrap')); } else { hiddenTextarea.removeAttribute('wrap'); } // Copy all CSS properties that have an impact on the height of the content in // the textbox var _calculateNodeStyling = calculateNodeStyling(uiTextNode, useCache), paddingSize = _calculateNodeStyling.paddingSize, borderSize = _calculateNodeStyling.borderSize, boxSizing = _calculateNodeStyling.boxSizing, sizingStyle = _calculateNodeStyling.sizingStyle; // Need to have the overflow attribute to hide the scrollbar otherwise // text-lines will not calculated properly as the shadow will technically be // narrower for content hiddenTextarea.setAttribute('style', "".concat(sizingStyle, ";").concat(HIDDEN_TEXTAREA_STYLE)); hiddenTextarea.value = uiTextNode.value || uiTextNode.placeholder || ''; var minHeight = Number.MIN_SAFE_INTEGER; var maxHeight = Number.MAX_SAFE_INTEGER; var height = hiddenTextarea.scrollHeight; var overflowY; if (boxSizing === 'border-box') { // border-box: add border, since height = content + padding + border height += borderSize; } else if (boxSizing === 'content-box') { // remove padding, since height = content height -= paddingSize; } if (minRows !== null || maxRows !== null) { // measure height of a textarea with a single row hiddenTextarea.value = ' '; var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize; if (minRows !== null) { minHeight = singleRowHeight * minRows; if (boxSizing === 'border-box') { minHeight = minHeight + paddingSize + borderSize; } height = Math.max(minHeight, height); } if (maxRows !== null) { maxHeight = singleRowHeight * maxRows; if (boxSizing === 'border-box') { maxHeight = maxHeight + paddingSize + borderSize; } overflowY = height > maxHeight ? '' : 'hidden'; height = Math.min(maxHeight, height); } } return { height: height, minHeight: minHeight, maxHeight: maxHeight, overflowY: overflowY, resize: 'none' }; } // EXTERNAL MODULE: ./node_modules/shallowequal/index.js var shallowequal = __webpack_require__("Gytx"); var shallowequal_default = /*#__PURE__*/__webpack_require__.n(shallowequal); // CONCATENATED MODULE: ./node_modules/rc-textarea/es/ResizableTextArea.js // eslint-disable-next-line @typescript-eslint/naming-convention var RESIZE_STATUS; (function (RESIZE_STATUS) { RESIZE_STATUS[RESIZE_STATUS["NONE"] = 0] = "NONE"; RESIZE_STATUS[RESIZE_STATUS["RESIZING"] = 1] = "RESIZING"; RESIZE_STATUS[RESIZE_STATUS["RESIZED"] = 2] = "RESIZED"; })(RESIZE_STATUS || (RESIZE_STATUS = {})); var ResizableTextArea_ResizableTextArea = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(ResizableTextArea, _React$Component); var _super = Object(createSuper["a" /* default */])(ResizableTextArea); function ResizableTextArea(props) { var _this; Object(classCallCheck["a" /* default */])(this, ResizableTextArea); _this = _super.call(this, props); _this.nextFrameActionId = void 0; _this.resizeFrameId = void 0; _this.textArea = void 0; _this.saveTextArea = function (textArea) { _this.textArea = textArea; }; _this.handleResize = function (size) { var resizeStatus = _this.state.resizeStatus; var _this$props = _this.props, autoSize = _this$props.autoSize, onResize = _this$props.onResize; if (resizeStatus !== RESIZE_STATUS.NONE) { return; } if (typeof onResize === 'function') { onResize(size); } if (autoSize) { _this.resizeOnNextFrame(); } }; _this.resizeOnNextFrame = function () { cancelAnimationFrame(_this.nextFrameActionId); _this.nextFrameActionId = requestAnimationFrame(_this.resizeTextarea); }; _this.resizeTextarea = function () { var autoSize = _this.props.autoSize; if (!autoSize || !_this.textArea) { return; } var minRows = autoSize.minRows, maxRows = autoSize.maxRows; var textareaStyles = calculateNodeHeight(_this.textArea, false, minRows, maxRows); _this.setState({ textareaStyles: textareaStyles, resizeStatus: RESIZE_STATUS.RESIZING }, function () { cancelAnimationFrame(_this.resizeFrameId); _this.resizeFrameId = requestAnimationFrame(function () { _this.setState({ resizeStatus: RESIZE_STATUS.RESIZED }, function () { _this.resizeFrameId = requestAnimationFrame(function () { _this.setState({ resizeStatus: RESIZE_STATUS.NONE }); _this.fixFirefoxAutoScroll(); }); }); }); }); }; _this.renderTextArea = function () { var _this$props2 = _this.props, _this$props2$prefixCl = _this$props2.prefixCls, prefixCls = _this$props2$prefixCl === void 0 ? 'rc-textarea' : _this$props2$prefixCl, autoSize = _this$props2.autoSize, onResize = _this$props2.onResize, className = _this$props2.className, disabled = _this$props2.disabled; var _this$state = _this.state, textareaStyles = _this$state.textareaStyles, resizeStatus = _this$state.resizeStatus; var otherProps = Object(omit["a" /* default */])(_this.props, ['prefixCls', 'onPressEnter', 'autoSize', 'defaultValue', 'onResize']); var cls = classnames_default()(prefixCls, className, Object(defineProperty["a" /* default */])({}, "".concat(prefixCls, "-disabled"), disabled)); // Fix https://github.com/ant-design/ant-design/issues/6776 // Make sure it could be reset when using form.getFieldDecorator if ('value' in otherProps) { otherProps.value = otherProps.value || ''; } var style = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, _this.props.style), textareaStyles), resizeStatus === RESIZE_STATUS.RESIZING ? // React will warning when mix `overflow` & `overflowY`. // We need to define this separately. { overflowX: 'hidden', overflowY: 'hidden' } : null); return /*#__PURE__*/external_window_React_["createElement"](es, { onResize: _this.handleResize, disabled: !(autoSize || onResize) }, /*#__PURE__*/external_window_React_["createElement"]("textarea", Object(esm_extends["a" /* default */])({}, otherProps, { className: cls, style: style, ref: _this.saveTextArea }))); }; _this.state = { textareaStyles: {}, resizeStatus: RESIZE_STATUS.NONE }; return _this; } Object(createClass["a" /* default */])(ResizableTextArea, [{ key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { // Re-render with the new content or new autoSize property then recalculate the height as required. if (prevProps.value !== this.props.value || !shallowequal_default()(prevProps.autoSize, this.props.autoSize)) { this.resizeTextarea(); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { cancelAnimationFrame(this.nextFrameActionId); cancelAnimationFrame(this.resizeFrameId); } // https://github.com/ant-design/ant-design/issues/21870 }, { key: "fixFirefoxAutoScroll", value: function fixFirefoxAutoScroll() { try { if (document.activeElement === this.textArea) { var currentStart = this.textArea.selectionStart; var currentEnd = this.textArea.selectionEnd; this.textArea.setSelectionRange(currentStart, currentEnd); } } catch (e) {// Fix error in Chrome: // Failed to read the 'selectionStart' property from 'HTMLInputElement' // http://stackoverflow.com/q/21177489/3040605 } } }, { key: "render", value: function render() { return this.renderTextArea(); } }]); return ResizableTextArea; }(external_window_React_["Component"]); /* harmony default export */ var es_ResizableTextArea = (ResizableTextArea_ResizableTextArea); // CONCATENATED MODULE: ./node_modules/rc-textarea/es/index.js var es_TextArea = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(TextArea, _React$Component); var _super = Object(createSuper["a" /* default */])(TextArea); function TextArea(props) { var _this; Object(classCallCheck["a" /* default */])(this, TextArea); _this = _super.call(this, props); _this.resizableTextArea = void 0; _this.focus = function () { _this.resizableTextArea.textArea.focus(); }; _this.saveTextArea = function (resizableTextArea) { _this.resizableTextArea = resizableTextArea; }; _this.handleChange = function (e) { var onChange = _this.props.onChange; _this.setValue(e.target.value, function () { _this.resizableTextArea.resizeTextarea(); }); if (onChange) { onChange(e); } }; _this.handleKeyDown = function (e) { var _this$props = _this.props, onPressEnter = _this$props.onPressEnter, onKeyDown = _this$props.onKeyDown; if (e.keyCode === 13 && onPressEnter) { onPressEnter(e); } if (onKeyDown) { onKeyDown(e); } }; var value = typeof props.value === 'undefined' || props.value === null ? props.defaultValue : props.value; _this.state = { value: value }; return _this; } Object(createClass["a" /* default */])(TextArea, [{ key: "setValue", value: function setValue(value, callback) { if (!('value' in this.props)) { this.setState({ value: value }, callback); } } }, { key: "blur", value: function blur() { this.resizableTextArea.textArea.blur(); } }, { key: "render", value: function render() { return /*#__PURE__*/external_window_React_["createElement"](es_ResizableTextArea, Object(esm_extends["a" /* default */])({}, this.props, { value: this.state.value, onKeyDown: this.handleKeyDown, onChange: this.handleChange, ref: this.saveTextArea })); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps) { if ('value' in nextProps) { return { value: nextProps.value }; } return null; } }]); return TextArea; }(external_window_React_["Component"]); /* harmony default export */ var rc_textarea_es = __webpack_exports__["default"] = (es_TextArea); /***/ }), /***/ "ZW9T": /*!************************************************************!*\ !*** ./src/components/monaco-editor/index.jsx + 1 modules ***! \************************************************************/ /*! exports provided: getLanguageByMirrorName, default, DiffEditor */ /*! exports used: DiffEditor, default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */ /*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ DiffEditor; }); // UNUSED EXPORTS: getLanguageByMirrorName // EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js var objectSpread2 = __webpack_require__("k1fw"); // EXTERNAL MODULE: ./node_modules/antd/es/message/style/index.js var message_style = __webpack_require__("miYZ"); // EXTERNAL MODULE: ./node_modules/antd/es/message/index.js + 1 modules var message = __webpack_require__("tsqr"); // EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js var createForOfIteratorHelper = __webpack_require__("rAM+"); // EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules var slicedToArray = __webpack_require__("tJVT"); // EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules var objectWithoutProperties = __webpack_require__("PpiC"); // EXTERNAL MODULE: external "window.React" var external_window_React_ = __webpack_require__("cDcd"); var external_window_React_default = /*#__PURE__*/__webpack_require__.n(external_window_React_); // EXTERNAL MODULE: ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js var ResizeObserver_es = __webpack_require__("bdgK"); // CONCATENATED MODULE: ./src/components/monaco-editor/monaco-suggest-config.tsx function getSuggestions(monaco, model, position, keywords, snippts) { var word = model.getWordUntilPosition(position); var range = { startLineNumber: position.lineNumber, endLineNumber: position.lineNumber, startColumn: word.startColumn, endColumn: word.endColumn }; var rs = keywords.map(function (item) { return { label: item, kind: monaco.languages.CompletionItemKind.Keyword, insertText: item, insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet, range: range }; }); snippts.map(function (item) { rs.push(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, item), {}, { range: range })); }); return rs; } /* harmony default export */ var monaco_suggest_config = (function (monaco) { var ifelse = { label: 'ifelse', kind: monaco.languages.CompletionItemKind.Method, insertText: ['if (${1:condition}) {', '\t$0', '} else {', '\t', '}'].join('\n'), insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet }; var cKeywords = ['auto', 'break', 'case', 'char', 'const', 'continue', 'default', 'do', 'double', 'else', 'enum', 'extern', 'float', 'for', 'goto', 'if', 'int', 'long', 'register', 'return', 'short', 'signed', 'sizeof', 'static', 'struct', 'switch', 'typedef', 'union', 'unsigned', 'void', 'volatile', 'while', 'inline', 'restrict', '_Bool', '_Complex', '_Imaginary', '_Alignas', '_Alignof', '_Atomic', '_Static_assert', '_Noreturn', '_Thread_local', '_Generic']; monaco.languages.registerCompletionItemProvider('cpp', { provideCompletionItems: function provideCompletionItems(model, position) { var suggestions = getSuggestions(monaco, model, position, cKeywords, [ifelse]); return { suggestions: suggestions }; } }); var pythonkeywords = ['False', 'None', 'True', 'and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield']; monaco.languages.registerCompletionItemProvider('python', { provideCompletionItems: function provideCompletionItems(model, position) { var snippets = [{ label: 'print', kind: monaco.languages.CompletionItemKind.Snippet, insertText: ['print($0)'].join('\n'), insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet }]; var suggestions = getSuggestions(monaco, model, position, pythonkeywords, snippets); return { suggestions: suggestions }; } }); var javaKeywords = ['abstract', 'assert', 'boolean', 'break', 'byte', 'case', 'catch', 'char', 'class', 'const', 'continue', 'default', 'do', 'double', 'else', 'enum', 'extends', 'final', 'finally', 'float', 'for', 'goto', 'if', 'implements', 'import', 'instance of', 'int', 'interface', 'long', 'native', 'new', 'package', 'private', 'protected', 'public', 'return', 'strictfp', 'short', 'static', 'super', 'switch', 'synchronized', 'this', 'throw', 'throws', 'transient', 'try', 'void', 'volatile', 'while']; monaco.languages.registerCompletionItemProvider('java', { provideCompletionItems: function provideCompletionItems(model, position) { var snippets = [ifelse, { label: 'main', kind: monaco.languages.CompletionItemKind.Snippet, insertText: ['public static void main(String[] args) {', '\t$0', '}'].join('\n'), insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet }, { label: 'System.out.print', kind: monaco.languages.CompletionItemKind.Snippet, insertText: ['System.out.print($0)'].join('\n'), insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet }]; var suggestions = getSuggestions(monaco, model, position, javaKeywords, snippets); return { suggestions: suggestions }; } }); }); var tipTxt = '该任务关卡设置了禁止复制粘贴,请手动输入代码。'; // EXTERNAL MODULE: ./node_modules/lodash/lodash.js var lodash = __webpack_require__("LvDl"); // CONCATENATED MODULE: ./src/components/monaco-editor/index.jsx function processSize(size) { return !/^\d+$/.test(size) ? size : "".concat(size, "px"); } function noop() {} var __prevent_trigger_change_event = false; var DICT = { 'Python3.6': 'python', 'Python2.7': 'python', Dynamips: 'cpp', Java: 'java', Web: 'php', Html: 'html', Hive: 'sql', Hadoop: 'java', SDL: 'cpp', PHP: 'php', Matlab: 'python', Git: 'python', Python: 'python', 'C/C++': 'cpp', 'C++': 'cpp', C: 'cpp', Ruby: 'ruby', Shell: 'shell', JavaScript: 'javascript', Perl6: 'perl', Kotlin: 'kotlin', Elixir: 'elixir', Android: 'java', JavaWeb: 'java', Go: 'go', Spark: 'sql', MachineLearning: 'python', Verilog: 'xml', 'Verilog/VNC': 'xml', Docker: 'dockerfile', 'C#': 'csharp', SQLite3: 'sql', Oracle: 'sql', Vhdl: 'vhdl', R: 'r', Swift: 'swift', SQLServer: 'mysql', MySQL: 'mysql', Mongo: 'sql', PostgreSql: 'pgsql', Hbase: 'powershell', Sqoop: 'sql', Nasm: 'cpp', Kafka: 'java', Flink: 'java', Sml: 'javascript', OpenGL: 'cpp', Perl5: 'perl', Orange: 'python' }; function getLanguageByMirrorName() { var mirror_name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var lang = mirror_name; if (Array.isArray(mirror_name)) { for (var i = 0; i < mirror_name.length; i++) { var languageVal = DICT[mirror_name[i]]; if (languageVal) { return languageVal; } } return lang[0]; } return DICT[lang] || lang; } //onCodeChange 必须是幂等的,因为只会注册一次,如果有变化,会响应旧的,产生脏数据 var monaco_editor_monaco = null; /* harmony default export */ var monaco_editor = __webpack_exports__["b"] = (function (_ref) { var _ref$width = _ref.width, width = _ref$width === void 0 ? '100%' : _ref$width, _ref$height = _ref.height, height = _ref$height === void 0 ? '100%' : _ref$height, value = _ref.value, _ref$language = _ref.language, language = _ref$language === void 0 ? 'javascript' : _ref$language, _ref$style = _ref.style, style = _ref$style === void 0 ? {} : _ref$style, _ref$options = _ref.options, options = _ref$options === void 0 ? {} : _ref$options, _ref$overrideServices = _ref.overrideServices, overrideServices = _ref$overrideServices === void 0 ? {} : _ref$overrideServices, _ref$theme = _ref.theme, theme = _ref$theme === void 0 ? 'vs-dark' : _ref$theme, onEditBlur = _ref.onEditBlur, onSave = _ref.onSave, _ref$autoHeight = _ref.autoHeight, autoHeight = _ref$autoHeight === void 0 ? false : _ref$autoHeight, _ref$forbidCopy = _ref.forbidCopy, forbidCopy = _ref$forbidCopy === void 0 ? false : _ref$forbidCopy, _ref$onChange = _ref.onChange, onChange = _ref$onChange === void 0 ? noop : _ref$onChange, _ref$editorDidMount = _ref.editorDidMount, editorDidMount = _ref$editorDidMount === void 0 ? noop : _ref$editorDidMount, _ref$onFocus = _ref.onFocus, onFocus = _ref$onFocus === void 0 ? noop : _ref$onFocus, _ref$filename = _ref.filename, filename = _ref$filename === void 0 ? 'educoder.txt' : _ref$filename, props = Object(objectWithoutProperties["a" /* default */])(_ref, ["width", "height", "value", "language", "style", "options", "overrideServices", "theme", "onEditBlur", "onSave", "autoHeight", "forbidCopy", "onChange", "editorDidMount", "onFocus", "filename"]); var editorEl = Object(external_window_React_["useRef"])(); var editor = Object(external_window_React_["useRef"])({}); var timeRef = Object(external_window_React_["useRef"])(); var inputLock = Object(external_window_React_["useRef"])(false); var inputLockTime = Object(external_window_React_["useRef"])(); var _useState = Object(external_window_React_["useState"])(false), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), init = _useState2[0], setInit = _useState2[1]; function onLayout() { var ro; if (editorEl.current) { ro = new ResizeObserver_es["default"](function (entries) { var _iterator = Object(createForOfIteratorHelper["a" /* default */])(entries), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var entry = _step.value; if (entry.target.offsetHeight > 0 || entry.target.offsetWidth > 0) { editor.current.instance.layout(); } } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } }); ro.observe(editorEl.current); } return ro; } function tipWarn() { message["b" /* default */].warn(decodeURIComponent(tipTxt)); } var setCodeValue = function setCodeValue() { var instance = editor.current.instance; if (value != null && instance && init) { var model = instance.getModel(); if (model && value !== model.getValue()) { __prevent_trigger_change_event = true; model.setValue(value); instance.layout(); __prevent_trigger_change_event = false; } } }; Object(external_window_React_["useEffect"])(function () { if (timeRef.current) clearTimeout(timeRef.current); timeRef.current = setTimeout(function () { setCodeValue(); }, 500); }, [value, init, editor.current]); function onPaste() { var instance = editor.current.instance; if (instance) { var selection = instance.getSelection(); var pastePos = editor.current.pastePos || {}; var range = new monaco_editor_monaco.Range(pastePos.startLineNumber || selection.endLineNumber, pastePos.startColumn || selection.endColumn, pastePos.endLineNumber || selection.endLineNumber, pastePos.endColumn || selection.endColumn); setTimeout(function () { instance.executeEdits('', [{ range: range, text: '' }]); }, 300); } } function onSaveHandler(e) { if ((window.navigator.platform.match('Mac') ? e.metaKey : e.ctrlKey) && e.keyCode == 83) { e.preventDefault(); onSave(); } } var autoCalcHeight = function autoCalcHeight() { if (autoHeight && editor.current.instance) { var _height = editor.current.instance.getContentHeight(); setFixedHeight(_height < height ? height : _height); } else { setFixedHeight(height); } }; function fakeClick(obj) { var ev = document.createEvent('MouseEvents'); ev.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); obj.dispatchEvent(ev); } function exportRaw(name, data) { var urlObject = window.URL || window.webkitURL || window; var export_blob = new Blob([data]); var save_link = document.createElementNS('http://www.w3.org/1999/xhtml', 'a'); save_link.href = urlObject.createObjectURL(export_blob); save_link.download = name; fakeClick(save_link); } Object(external_window_React_["useEffect"])(function () { autoCalcHeight(); }, [autoCalcHeight]); Object(external_window_React_["useEffect"])(function () { if (editorEl.current && !init) { undefined; undefined; __webpack_require__.e(/*! import() | monaco-editor */ 27).then(__webpack_require__.t.bind(null, /*! monaco-editor/esm/vs/editor/editor.api.js */ "M/lh", 7)).then(function (mod) { try { monaco_editor_monaco = mod; editor.current.instance = monaco_editor_monaco.editor.create(editorEl.current, { value: value, language: getLanguageByMirrorName(language), theme: theme, requireConfig: { 'vs/nls': { availableLanguages: { '*': 'zh-cn' } } }, wordWrap: true }, overrideServices); var instance = editor.current.instance; editorDidMount(instance, monaco_editor_monaco); setTimeout(function () { autoCalcHeight(); editor.current.instance.addAction({ id: 'd123123', label: 'Download File', contextMenuGroupId: '9_cutcopypaste', run: function run() { exportRaw(filename || 'educoder.txt', instance.getValue()); } }); }, 500); editor.current.subscription = instance.onDidChangeModelContent(function (event) { if (!inputLock.current) { autoCalcHeight(); onChange(instance.getValue(), event); } else { clearTimeout(inputLockTime.current); } inputLockTime.current = setTimeout(function () { inputLock.current = false; }, 500); }); if (!window.Monaco) monaco_suggest_config(monaco_editor_monaco); if (forbidCopy) { instance.addCommand(monaco_editor_monaco.KeyMod.CtrlCmd | monaco_editor_monaco.KeyMod.Shift | monaco_editor_monaco.KeyCode.KEY_V, function () { tipWarn(); return null; }); instance.addCommand(monaco_editor_monaco.KeyMod.CtrlCmd | monaco_editor_monaco.KeyCode.KEY_C, function () { tipWarn(); return null; }); } window.Monaco = monaco_editor_monaco; if (onEditBlur) { instance.onDidBlurEditorWidget(function () { onEditBlur(instance.getValue()); }); } if (onFocus) { instance.onDidFocusEditorText(function () { onFocus(instance.getValue()); }); } if (forbidCopy) { instance.addCommand(monaco_editor_monaco.KeyMod.CtrlCmd | monaco_editor_monaco.KeyCode.KEY_V, function () { tipWarn(); return null; }); instance.onDidPaste(function (pos) { editor.current.pastePos = pos; }); try { window.addEventListener('paste', onPaste); } catch (e) {} } var ro = onLayout(); setInit(true); return function () { var el = editor.current.instance; el.dispose(); var model = el.getModel(); if (model) { model.dispose(); } if (editor.current.subscription) { editor.current.subscription.dispose(); } if (forbidCopy) { window.removeEventListener('paste', onPaste); } ro.unobserve(editorEl.current); }; } catch (e) {// ; } }); } }, []); Object(external_window_React_["useEffect"])(function () { var instance = editor.current.instance; if (instance && init) { document.addEventListener('keydown', onSaveHandler, false); return function () { document.removeEventListener('keydown', onSaveHandler); }; } }, [onSave, init]); Object(external_window_React_["useEffect"])(function () { var instance = editor.current.instance; if (instance && init) { var lang = getLanguageByMirrorName(language); monaco_editor_monaco.editor.setModelLanguage(instance.getModel(), lang); console.log('language:', language, instance.getModel(), lang); } }, [language, init]); Object(external_window_React_["useEffect"])(function () { var instance = editor.current.instance; if (instance && init) { monaco_editor_monaco.editor.setTheme(theme); } }, [theme, init]); Object(external_window_React_["useEffect"])(function () { var instance = editor.current.instance; if (instance && init) { instance.updateOptions(Object(objectSpread2["a" /* default */])({}, options)); setTimeout(function () { instance.getModel().updateOptions(Object(objectSpread2["a" /* default */])({}, options)); }, 200); } }, [JSON.stringify(options), init]); Object(external_window_React_["useEffect"])(function () { var instance = editor.current.instance; if (instance && init) { instance.layout(); } }, [width, height, init]); // const fixedWidth = processSize(width); // const fixedHeight = processSize(height); var _useState3 = Object(external_window_React_["useState"])(processSize(width)), _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2), fixedWidth = _useState4[0], setFixedWidth = _useState4[1]; var _useState5 = Object(external_window_React_["useState"])(processSize(height)), _useState6 = Object(slicedToArray["a" /* default */])(_useState5, 2), fixedHeight = _useState6[0], setFixedHeight = _useState6[1]; var mergeStyle = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, style), {}, { width: fixedWidth, height: fixedHeight }); return /*#__PURE__*/external_window_React_default.a.createElement("div", { className: "my-monaco-editor", ref: editorEl, style: mergeStyle }); }); function DiffEditor(_ref2) { var _ref2$width = _ref2.width, width = _ref2$width === void 0 ? '100%' : _ref2$width, _ref2$height = _ref2.height, height = _ref2$height === void 0 ? '100%' : _ref2$height, original = _ref2.original, modified = _ref2.modified, language = _ref2.language, _ref2$options = _ref2.options, options = _ref2$options === void 0 ? {} : _ref2$options; var editorEl = Object(external_window_React_["useRef"])(); var _useState7 = Object(external_window_React_["useState"])(null), _useState8 = Object(slicedToArray["a" /* default */])(_useState7, 2), instance = _useState8[0], setInstance = _useState8[1]; function onLayout(instance) { var ro; if (editorEl.current) { ro = new ResizeObserver_es["default"](function (entries) { var _iterator2 = Object(createForOfIteratorHelper["a" /* default */])(entries), _step2; try { for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { var entry = _step2.value; if (entry.target.offsetHeight > 0 || entry.target.offsetWidth > 0) { instance.layout(); } } } catch (err) { _iterator2.e(err); } finally { _iterator2.f(); } }); ro.observe(editorEl.current); } return ro; } Object(external_window_React_["useEffect"])(function () { if (editorEl.current) { __webpack_require__.e(/*! import() | monaco-editor */ 27).then(__webpack_require__.t.bind(null, /*! monaco-editor/esm/vs/editor/editor.api.js */ "M/lh", 7)).then(function (mod) { monaco_editor_monaco = mod; var instance = monaco_editor_monaco.editor.createDiffEditor(editorEl.current, Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({ enableSplitViewResizing: false, scrollBeyondLastLine: false, roundedSelection: false, renderIndicators: false, useShadows: false, horizontal: 'hidden', lineNumbers: 'off', ignoreTrimWhitespace: false, followsCaret: true, // resets the navigator state when the user selects something in the editor ignoreCharChanges: true, // jump from line to line, minimap: { enabled: false }, readOnly: true }, options), {}, { wordWrap: true })); setInstance(instance); var ro = onLayout(instance); return function () { instance.dispose(); var model = instance.getModel(); if (model) { model.dispose(); } ro.unobserve(editorEl.current); }; }); } }, []); Object(external_window_React_["useEffect"])(function () { if (instance) { instance.setModel({ original: monaco_editor_monaco.editor.createModel(original, language), modified: monaco_editor_monaco.editor.createModel(modified, language) }); } }, [original, modified, language, instance]); var fixedWidth = processSize(width); var fixedHeight = processSize(height); var style = { width: fixedWidth, height: fixedHeight }; return /*#__PURE__*/external_window_React_default.a.createElement("div", { className: "my-diff-editor", ref: editorEl, style: style }); } /***/ }), /***/ "Zss7": /*!**********************************************!*\ !*** ./node_modules/tinycolor2/tinycolor.js ***! \**********************************************/ /*! no static exports found */ /*! exports used: default */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;// TinyColor v1.4.2 // https://github.com/bgrins/TinyColor // Brian Grinstead, MIT License (function(Math) { var trimLeft = /^\s+/, trimRight = /\s+$/, tinyCounter = 0, mathRound = Math.round, mathMin = Math.min, mathMax = Math.max, mathRandom = Math.random; function tinycolor (color, opts) { color = (color) ? color : ''; opts = opts || { }; // If input is already a tinycolor, return itself if (color instanceof tinycolor) { return color; } // If we are called as a function, call using new instead if (!(this instanceof tinycolor)) { return new tinycolor(color, opts); } var rgb = inputToRGB(color); this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, this._a = rgb.a, this._roundA = mathRound(100*this._a) / 100, this._format = opts.format || rgb.format; this._gradientType = opts.gradientType; // Don't let the range of [0,255] come back in [0,1]. // Potentially lose a little bit of precision here, but will fix issues where // .5 gets interpreted as half of the total, instead of half of 1 // If it was supposed to be 128, this was already taken care of by `inputToRgb` if (this._r < 1) { this._r = mathRound(this._r); } if (this._g < 1) { this._g = mathRound(this._g); } if (this._b < 1) { this._b = mathRound(this._b); } this._ok = rgb.ok; this._tc_id = tinyCounter++; } tinycolor.prototype = { isDark: function() { return this.getBrightness() < 128; }, isLight: function() { return !this.isDark(); }, isValid: function() { return this._ok; }, getOriginalInput: function() { return this._originalInput; }, getFormat: function() { return this._format; }, getAlpha: function() { return this._a; }, getBrightness: function() { //http://www.w3.org/TR/AERT#color-contrast var rgb = this.toRgb(); return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000; }, getLuminance: function() { //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef var rgb = this.toRgb(); var RsRGB, GsRGB, BsRGB, R, G, B; RsRGB = rgb.r/255; GsRGB = rgb.g/255; BsRGB = rgb.b/255; if (RsRGB <= 0.03928) {R = RsRGB / 12.92;} else {R = Math.pow(((RsRGB + 0.055) / 1.055), 2.4);} if (GsRGB <= 0.03928) {G = GsRGB / 12.92;} else {G = Math.pow(((GsRGB + 0.055) / 1.055), 2.4);} if (BsRGB <= 0.03928) {B = BsRGB / 12.92;} else {B = Math.pow(((BsRGB + 0.055) / 1.055), 2.4);} return (0.2126 * R) + (0.7152 * G) + (0.0722 * B); }, setAlpha: function(value) { this._a = boundAlpha(value); this._roundA = mathRound(100*this._a) / 100; return this; }, toHsv: function() { var hsv = rgbToHsv(this._r, this._g, this._b); return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a }; }, toHsvString: function() { var hsv = rgbToHsv(this._r, this._g, this._b); var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100); return (this._a == 1) ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, "+ this._roundA + ")"; }, toHsl: function() { var hsl = rgbToHsl(this._r, this._g, this._b); return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a }; }, toHslString: function() { var hsl = rgbToHsl(this._r, this._g, this._b); var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100); return (this._a == 1) ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, "+ this._roundA + ")"; }, toHex: function(allow3Char) { return rgbToHex(this._r, this._g, this._b, allow3Char); }, toHexString: function(allow3Char) { return '#' + this.toHex(allow3Char); }, toHex8: function(allow4Char) { return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char); }, toHex8String: function(allow4Char) { return '#' + this.toHex8(allow4Char); }, toRgb: function() { return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a }; }, toRgbString: function() { return (this._a == 1) ? "rgb(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ")" : "rgba(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ", " + this._roundA + ")"; }, toPercentageRgb: function() { return { r: mathRound(bound01(this._r, 255) * 100) + "%", g: mathRound(bound01(this._g, 255) * 100) + "%", b: mathRound(bound01(this._b, 255) * 100) + "%", a: this._a }; }, toPercentageRgbString: function() { return (this._a == 1) ? "rgb(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%)" : "rgba(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")"; }, toName: function() { if (this._a === 0) { return "transparent"; } if (this._a < 1) { return false; } return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false; }, toFilter: function(secondColor) { var hex8String = '#' + rgbaToArgbHex(this._r, this._g, this._b, this._a); var secondHex8String = hex8String; var gradientType = this._gradientType ? "GradientType = 1, " : ""; if (secondColor) { var s = tinycolor(secondColor); secondHex8String = '#' + rgbaToArgbHex(s._r, s._g, s._b, s._a); } return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr="+hex8String+",endColorstr="+secondHex8String+")"; }, toString: function(format) { var formatSet = !!format; format = format || this._format; var formattedString = false; var hasAlpha = this._a < 1 && this._a >= 0; var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name"); if (needsAlphaFormat) { // Special case for "transparent", all other non-alpha formats // will return rgba when there is transparency. if (format === "name" && this._a === 0) { return this.toName(); } return this.toRgbString(); } if (format === "rgb") { formattedString = this.toRgbString(); } if (format === "prgb") { formattedString = this.toPercentageRgbString(); } if (format === "hex" || format === "hex6") { formattedString = this.toHexString(); } if (format === "hex3") { formattedString = this.toHexString(true); } if (format === "hex4") { formattedString = this.toHex8String(true); } if (format === "hex8") { formattedString = this.toHex8String(); } if (format === "name") { formattedString = this.toName(); } if (format === "hsl") { formattedString = this.toHslString(); } if (format === "hsv") { formattedString = this.toHsvString(); } return formattedString || this.toHexString(); }, clone: function() { return tinycolor(this.toString()); }, _applyModification: function(fn, args) { var color = fn.apply(null, [this].concat([].slice.call(args))); this._r = color._r; this._g = color._g; this._b = color._b; this.setAlpha(color._a); return this; }, lighten: function() { return this._applyModification(lighten, arguments); }, brighten: function() { return this._applyModification(brighten, arguments); }, darken: function() { return this._applyModification(darken, arguments); }, desaturate: function() { return this._applyModification(desaturate, arguments); }, saturate: function() { return this._applyModification(saturate, arguments); }, greyscale: function() { return this._applyModification(greyscale, arguments); }, spin: function() { return this._applyModification(spin, arguments); }, _applyCombination: function(fn, args) { return fn.apply(null, [this].concat([].slice.call(args))); }, analogous: function() { return this._applyCombination(analogous, arguments); }, complement: function() { return this._applyCombination(complement, arguments); }, monochromatic: function() { return this._applyCombination(monochromatic, arguments); }, splitcomplement: function() { return this._applyCombination(splitcomplement, arguments); }, triad: function() { return this._applyCombination(triad, arguments); }, tetrad: function() { return this._applyCombination(tetrad, arguments); } }; // If input is an object, force 1 into "1.0" to handle ratios properly // String input requires "1.0" as input, so 1 will be treated as 1 tinycolor.fromRatio = function(color, opts) { if (typeof color == "object") { var newColor = {}; for (var i in color) { if (color.hasOwnProperty(i)) { if (i === "a") { newColor[i] = color[i]; } else { newColor[i] = convertToPercentage(color[i]); } } } color = newColor; } return tinycolor(color, opts); }; // Given a string or object, convert that input to RGB // Possible string inputs: // // "red" // "#f00" or "f00" // "#ff0000" or "ff0000" // "#ff000000" or "ff000000" // "rgb 255 0 0" or "rgb (255, 0, 0)" // "rgb 1.0 0 0" or "rgb (1, 0, 0)" // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1" // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1" // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%" // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1" // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%" // function inputToRGB(color) { var rgb = { r: 0, g: 0, b: 0 }; var a = 1; var s = null; var v = null; var l = null; var ok = false; var format = false; if (typeof color == "string") { color = stringInputToObject(color); } if (typeof color == "object") { if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) { rgb = rgbToRgb(color.r, color.g, color.b); ok = true; format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb"; } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) { s = convertToPercentage(color.s); v = convertToPercentage(color.v); rgb = hsvToRgb(color.h, s, v); ok = true; format = "hsv"; } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) { s = convertToPercentage(color.s); l = convertToPercentage(color.l); rgb = hslToRgb(color.h, s, l); ok = true; format = "hsl"; } if (color.hasOwnProperty("a")) { a = color.a; } } a = boundAlpha(a); return { ok: ok, format: color.format || format, r: mathMin(255, mathMax(rgb.r, 0)), g: mathMin(255, mathMax(rgb.g, 0)), b: mathMin(255, mathMax(rgb.b, 0)), a: a }; } // Conversion Functions // -------------------- // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from: // // `rgbToRgb` // Handle bounds / percentage checking to conform to CSS color spec // // *Assumes:* r, g, b in [0, 255] or [0, 1] // *Returns:* { r, g, b } in [0, 255] function rgbToRgb(r, g, b){ return { r: bound01(r, 255) * 255, g: bound01(g, 255) * 255, b: bound01(b, 255) * 255 }; } // `rgbToHsl` // Converts an RGB color value to HSL. // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1] // *Returns:* { h, s, l } in [0,1] function rgbToHsl(r, g, b) { r = bound01(r, 255); g = bound01(g, 255); b = bound01(b, 255); var max = mathMax(r, g, b), min = mathMin(r, g, b); var h, s, l = (max + min) / 2; if(max == min) { h = s = 0; // achromatic } else { var d = max - min; s = l > 0.5 ? d / (2 - max - min) : d / (max + min); switch(max) { case r: h = (g - b) / d + (g < b ? 6 : 0); break; case g: h = (b - r) / d + 2; break; case b: h = (r - g) / d + 4; break; } h /= 6; } return { h: h, s: s, l: l }; } // `hslToRgb` // Converts an HSL color value to RGB. // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100] // *Returns:* { r, g, b } in the set [0, 255] function hslToRgb(h, s, l) { var r, g, b; h = bound01(h, 360); s = bound01(s, 100); l = bound01(l, 100); function hue2rgb(p, q, t) { if(t < 0) t += 1; if(t > 1) t -= 1; if(t < 1/6) return p + (q - p) * 6 * t; if(t < 1/2) return q; if(t < 2/3) return p + (q - p) * (2/3 - t) * 6; return p; } if(s === 0) { r = g = b = l; // achromatic } else { var q = l < 0.5 ? l * (1 + s) : l + s - l * s; var p = 2 * l - q; r = hue2rgb(p, q, h + 1/3); g = hue2rgb(p, q, h); b = hue2rgb(p, q, h - 1/3); } return { r: r * 255, g: g * 255, b: b * 255 }; } // `rgbToHsv` // Converts an RGB color value to HSV // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1] // *Returns:* { h, s, v } in [0,1] function rgbToHsv(r, g, b) { r = bound01(r, 255); g = bound01(g, 255); b = bound01(b, 255); var max = mathMax(r, g, b), min = mathMin(r, g, b); var h, s, v = max; var d = max - min; s = max === 0 ? 0 : d / max; if(max == min) { h = 0; // achromatic } else { switch(max) { case r: h = (g - b) / d + (g < b ? 6 : 0); break; case g: h = (b - r) / d + 2; break; case b: h = (r - g) / d + 4; break; } h /= 6; } return { h: h, s: s, v: v }; } // `hsvToRgb` // Converts an HSV color value to RGB. // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100] // *Returns:* { r, g, b } in the set [0, 255] function hsvToRgb(h, s, v) { h = bound01(h, 360) * 6; s = bound01(s, 100); v = bound01(v, 100); var i = Math.floor(h), f = h - i, p = v * (1 - s), q = v * (1 - f * s), t = v * (1 - (1 - f) * s), mod = i % 6, r = [v, q, p, p, t, v][mod], g = [t, v, v, q, p, p][mod], b = [p, p, t, v, v, q][mod]; return { r: r * 255, g: g * 255, b: b * 255 }; } // `rgbToHex` // Converts an RGB color to hex // Assumes r, g, and b are contained in the set [0, 255] // Returns a 3 or 6 character hex function rgbToHex(r, g, b, allow3Char) { var hex = [ pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)) ]; // Return a 3 character hex if possible if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) { return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0); } return hex.join(""); } // `rgbaToHex` // Converts an RGBA color plus alpha transparency to hex // Assumes r, g, b are contained in the set [0, 255] and // a in [0, 1]. Returns a 4 or 8 character rgba hex function rgbaToHex(r, g, b, a, allow4Char) { var hex = [ pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)), pad2(convertDecimalToHex(a)) ]; // Return a 4 character hex if possible if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) { return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0); } return hex.join(""); } // `rgbaToArgbHex` // Converts an RGBA color to an ARGB Hex8 string // Rarely used, but required for "toFilter()" function rgbaToArgbHex(r, g, b, a) { var hex = [ pad2(convertDecimalToHex(a)), pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)) ]; return hex.join(""); } // `equals` // Can be called with any tinycolor input tinycolor.equals = function (color1, color2) { if (!color1 || !color2) { return false; } return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString(); }; tinycolor.random = function() { return tinycolor.fromRatio({ r: mathRandom(), g: mathRandom(), b: mathRandom() }); }; // Modification Functions // ---------------------- // Thanks to less.js for some of the basics here // function desaturate(color, amount) { amount = (amount === 0) ? 0 : (amount || 10); var hsl = tinycolor(color).toHsl(); hsl.s -= amount / 100; hsl.s = clamp01(hsl.s); return tinycolor(hsl); } function saturate(color, amount) { amount = (amount === 0) ? 0 : (amount || 10); var hsl = tinycolor(color).toHsl(); hsl.s += amount / 100; hsl.s = clamp01(hsl.s); return tinycolor(hsl); } function greyscale(color) { return tinycolor(color).desaturate(100); } function lighten (color, amount) { amount = (amount === 0) ? 0 : (amount || 10); var hsl = tinycolor(color).toHsl(); hsl.l += amount / 100; hsl.l = clamp01(hsl.l); return tinycolor(hsl); } function brighten(color, amount) { amount = (amount === 0) ? 0 : (amount || 10); var rgb = tinycolor(color).toRgb(); rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100)))); rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100)))); rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100)))); return tinycolor(rgb); } function darken (color, amount) { amount = (amount === 0) ? 0 : (amount || 10); var hsl = tinycolor(color).toHsl(); hsl.l -= amount / 100; hsl.l = clamp01(hsl.l); return tinycolor(hsl); } // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue. // Values outside of this range will be wrapped into this range. function spin(color, amount) { var hsl = tinycolor(color).toHsl(); var hue = (hsl.h + amount) % 360; hsl.h = hue < 0 ? 360 + hue : hue; return tinycolor(hsl); } // Combination Functions // --------------------- // Thanks to jQuery xColor for some of the ideas behind these // function complement(color) { var hsl = tinycolor(color).toHsl(); hsl.h = (hsl.h + 180) % 360; return tinycolor(hsl); } function triad(color) { var hsl = tinycolor(color).toHsl(); var h = hsl.h; return [ tinycolor(color), tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }), tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l }) ]; } function tetrad(color) { var hsl = tinycolor(color).toHsl(); var h = hsl.h; return [ tinycolor(color), tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }), tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }), tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l }) ]; } function splitcomplement(color) { var hsl = tinycolor(color).toHsl(); var h = hsl.h; return [ tinycolor(color), tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}), tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l}) ]; } function analogous(color, results, slices) { results = results || 6; slices = slices || 30; var hsl = tinycolor(color).toHsl(); var part = 360 / slices; var ret = [tinycolor(color)]; for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) { hsl.h = (hsl.h + part) % 360; ret.push(tinycolor(hsl)); } return ret; } function monochromatic(color, results) { results = results || 6; var hsv = tinycolor(color).toHsv(); var h = hsv.h, s = hsv.s, v = hsv.v; var ret = []; var modification = 1 / results; while (results--) { ret.push(tinycolor({ h: h, s: s, v: v})); v = (v + modification) % 1; } return ret; } // Utility Functions // --------------------- tinycolor.mix = function(color1, color2, amount) { amount = (amount === 0) ? 0 : (amount || 50); var rgb1 = tinycolor(color1).toRgb(); var rgb2 = tinycolor(color2).toRgb(); var p = amount / 100; var rgba = { r: ((rgb2.r - rgb1.r) * p) + rgb1.r, g: ((rgb2.g - rgb1.g) * p) + rgb1.g, b: ((rgb2.b - rgb1.b) * p) + rgb1.b, a: ((rgb2.a - rgb1.a) * p) + rgb1.a }; return tinycolor(rgba); }; // Readability Functions // --------------------- // false // tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false tinycolor.isReadable = function(color1, color2, wcag2) { var readability = tinycolor.readability(color1, color2); var wcag2Parms, out; out = false; wcag2Parms = validateWCAG2Parms(wcag2); switch (wcag2Parms.level + wcag2Parms.size) { case "AAsmall": case "AAAlarge": out = readability >= 4.5; break; case "AAlarge": out = readability >= 3; break; case "AAAsmall": out = readability >= 7; break; } return out; }; // `mostReadable` // Given a base color and a list of possible foreground or background // colors for that base, returns the most readable color. // Optionally returns Black or White if the most readable color is unreadable. // *Example* // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255" // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff" // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3" // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff" tinycolor.mostReadable = function(baseColor, colorList, args) { var bestColor = null; var bestScore = 0; var readability; var includeFallbackColors, level, size ; args = args || {}; includeFallbackColors = args.includeFallbackColors ; level = args.level; size = args.size; for (var i= 0; i < colorList.length ; i++) { readability = tinycolor.readability(baseColor, colorList[i]); if (readability > bestScore) { bestScore = readability; bestColor = tinycolor(colorList[i]); } } if (tinycolor.isReadable(baseColor, bestColor, {"level":level,"size":size}) || !includeFallbackColors) { return bestColor; } else { args.includeFallbackColors=false; return tinycolor.mostReadable(baseColor,["#fff", "#000"],args); } }; // Big List of Colors // ------------------ // var names = tinycolor.names = { aliceblue: "f0f8ff", antiquewhite: "faebd7", aqua: "0ff", aquamarine: "7fffd4", azure: "f0ffff", beige: "f5f5dc", bisque: "ffe4c4", black: "000", blanchedalmond: "ffebcd", blue: "00f", blueviolet: "8a2be2", brown: "a52a2a", burlywood: "deb887", burntsienna: "ea7e5d", cadetblue: "5f9ea0", chartreuse: "7fff00", chocolate: "d2691e", coral: "ff7f50", cornflowerblue: "6495ed", cornsilk: "fff8dc", crimson: "dc143c", cyan: "0ff", darkblue: "00008b", darkcyan: "008b8b", darkgoldenrod: "b8860b", darkgray: "a9a9a9", darkgreen: "006400", darkgrey: "a9a9a9", darkkhaki: "bdb76b", darkmagenta: "8b008b", darkolivegreen: "556b2f", darkorange: "ff8c00", darkorchid: "9932cc", darkred: "8b0000", darksalmon: "e9967a", darkseagreen: "8fbc8f", darkslateblue: "483d8b", darkslategray: "2f4f4f", darkslategrey: "2f4f4f", darkturquoise: "00ced1", darkviolet: "9400d3", deeppink: "ff1493", deepskyblue: "00bfff", dimgray: "696969", dimgrey: "696969", dodgerblue: "1e90ff", firebrick: "b22222", floralwhite: "fffaf0", forestgreen: "228b22", fuchsia: "f0f", gainsboro: "dcdcdc", ghostwhite: "f8f8ff", gold: "ffd700", goldenrod: "daa520", gray: "808080", green: "008000", greenyellow: "adff2f", grey: "808080", honeydew: "f0fff0", hotpink: "ff69b4", indianred: "cd5c5c", indigo: "4b0082", ivory: "fffff0", khaki: "f0e68c", lavender: "e6e6fa", lavenderblush: "fff0f5", lawngreen: "7cfc00", lemonchiffon: "fffacd", lightblue: "add8e6", lightcoral: "f08080", lightcyan: "e0ffff", lightgoldenrodyellow: "fafad2", lightgray: "d3d3d3", lightgreen: "90ee90", lightgrey: "d3d3d3", lightpink: "ffb6c1", lightsalmon: "ffa07a", lightseagreen: "20b2aa", lightskyblue: "87cefa", lightslategray: "789", lightslategrey: "789", lightsteelblue: "b0c4de", lightyellow: "ffffe0", lime: "0f0", limegreen: "32cd32", linen: "faf0e6", magenta: "f0f", maroon: "800000", mediumaquamarine: "66cdaa", mediumblue: "0000cd", mediumorchid: "ba55d3", mediumpurple: "9370db", mediumseagreen: "3cb371", mediumslateblue: "7b68ee", mediumspringgreen: "00fa9a", mediumturquoise: "48d1cc", mediumvioletred: "c71585", midnightblue: "191970", mintcream: "f5fffa", mistyrose: "ffe4e1", moccasin: "ffe4b5", navajowhite: "ffdead", navy: "000080", oldlace: "fdf5e6", olive: "808000", olivedrab: "6b8e23", orange: "ffa500", orangered: "ff4500", orchid: "da70d6", palegoldenrod: "eee8aa", palegreen: "98fb98", paleturquoise: "afeeee", palevioletred: "db7093", papayawhip: "ffefd5", peachpuff: "ffdab9", peru: "cd853f", pink: "ffc0cb", plum: "dda0dd", powderblue: "b0e0e6", purple: "800080", rebeccapurple: "663399", red: "f00", rosybrown: "bc8f8f", royalblue: "4169e1", saddlebrown: "8b4513", salmon: "fa8072", sandybrown: "f4a460", seagreen: "2e8b57", seashell: "fff5ee", sienna: "a0522d", silver: "c0c0c0", skyblue: "87ceeb", slateblue: "6a5acd", slategray: "708090", slategrey: "708090", snow: "fffafa", springgreen: "00ff7f", steelblue: "4682b4", tan: "d2b48c", teal: "008080", thistle: "d8bfd8", tomato: "ff6347", turquoise: "40e0d0", violet: "ee82ee", wheat: "f5deb3", white: "fff", whitesmoke: "f5f5f5", yellow: "ff0", yellowgreen: "9acd32" }; // Make it easy to access colors via `hexNames[hex]` var hexNames = tinycolor.hexNames = flip(names); // Utilities // --------- // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }` function flip(o) { var flipped = { }; for (var i in o) { if (o.hasOwnProperty(i)) { flipped[o[i]] = i; } } return flipped; } // Return a valid alpha value [0,1] with all invalid values being set to 1 function boundAlpha(a) { a = parseFloat(a); if (isNaN(a) || a < 0 || a > 1) { a = 1; } return a; } // Take input from [0, n] and return it as [0, 1] function bound01(n, max) { if (isOnePointZero(n)) { n = "100%"; } var processPercent = isPercentage(n); n = mathMin(max, mathMax(0, parseFloat(n))); // Automatically convert percentage into number if (processPercent) { n = parseInt(n * max, 10) / 100; } // Handle floating point rounding errors if ((Math.abs(n - max) < 0.000001)) { return 1; } // Convert into [0, 1] range if it isn't already return (n % max) / parseFloat(max); } // Force a number between 0 and 1 function clamp01(val) { return mathMin(1, mathMax(0, val)); } // Parse a base-16 hex value into a base-10 integer function parseIntFromHex(val) { return parseInt(val, 16); } // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1 // function isOnePointZero(n) { return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1; } // Check to see if string passed in is a percentage function isPercentage(n) { return typeof n === "string" && n.indexOf('%') != -1; } // Force a hex value to have 2 characters function pad2(c) { return c.length == 1 ? '0' + c : '' + c; } // Replace a decimal with it's percentage value function convertToPercentage(n) { if (n <= 1) { n = (n * 100) + "%"; } return n; } // Converts a decimal to a hex value function convertDecimalToHex(d) { return Math.round(parseFloat(d) * 255).toString(16); } // Converts a hex value to a decimal function convertHexToDecimal(h) { return (parseIntFromHex(h) / 255); } var matchers = (function() { // var CSS_INTEGER = "[-\\+]?\\d+%?"; // var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?"; // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome. var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")"; // Actual matching. // Parentheses and commas are optional, but not required. // Whitespace can take the place of commas or opening paren var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; return { CSS_UNIT: new RegExp(CSS_UNIT), rgb: new RegExp("rgb" + PERMISSIVE_MATCH3), rgba: new RegExp("rgba" + PERMISSIVE_MATCH4), hsl: new RegExp("hsl" + PERMISSIVE_MATCH3), hsla: new RegExp("hsla" + PERMISSIVE_MATCH4), hsv: new RegExp("hsv" + PERMISSIVE_MATCH3), hsva: new RegExp("hsva" + PERMISSIVE_MATCH4), hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ }; })(); // `isValidCSSUnit` // Take in a single string / number and check to see if it looks like a CSS unit // (see `matchers` above for definition). function isValidCSSUnit(color) { return !!matchers.CSS_UNIT.exec(color); } // `stringInputToObject` // Permissive string parsing. Take in a number of formats, and output an object // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}` function stringInputToObject(color) { color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase(); var named = false; if (names[color]) { color = names[color]; named = true; } else if (color == 'transparent') { return { r: 0, g: 0, b: 0, a: 0, format: "name" }; } // Try to match string input using regular expressions. // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360] // Just return an object and let the conversion functions handle that. // This way the result will be the same whether the tinycolor is initialized with string or object. var match; if ((match = matchers.rgb.exec(color))) { return { r: match[1], g: match[2], b: match[3] }; } if ((match = matchers.rgba.exec(color))) { return { r: match[1], g: match[2], b: match[3], a: match[4] }; } if ((match = matchers.hsl.exec(color))) { return { h: match[1], s: match[2], l: match[3] }; } if ((match = matchers.hsla.exec(color))) { return { h: match[1], s: match[2], l: match[3], a: match[4] }; } if ((match = matchers.hsv.exec(color))) { return { h: match[1], s: match[2], v: match[3] }; } if ((match = matchers.hsva.exec(color))) { return { h: match[1], s: match[2], v: match[3], a: match[4] }; } if ((match = matchers.hex8.exec(color))) { return { r: parseIntFromHex(match[1]), g: parseIntFromHex(match[2]), b: parseIntFromHex(match[3]), a: convertHexToDecimal(match[4]), format: named ? "name" : "hex8" }; } if ((match = matchers.hex6.exec(color))) { return { r: parseIntFromHex(match[1]), g: parseIntFromHex(match[2]), b: parseIntFromHex(match[3]), format: named ? "name" : "hex" }; } if ((match = matchers.hex4.exec(color))) { return { r: parseIntFromHex(match[1] + '' + match[1]), g: parseIntFromHex(match[2] + '' + match[2]), b: parseIntFromHex(match[3] + '' + match[3]), a: convertHexToDecimal(match[4] + '' + match[4]), format: named ? "name" : "hex8" }; } if ((match = matchers.hex3.exec(color))) { return { r: parseIntFromHex(match[1] + '' + match[1]), g: parseIntFromHex(match[2] + '' + match[2]), b: parseIntFromHex(match[3] + '' + match[3]), format: named ? "name" : "hex" }; } return false; } function validateWCAG2Parms(parms) { // return valid WCAG2 parms for isReadable. // If input parms are invalid, return {"level":"AA", "size":"small"} var level, size; parms = parms || {"level":"AA", "size":"small"}; level = (parms.level || "AA").toUpperCase(); size = (parms.size || "small").toLowerCase(); if (level !== "AA" && level !== "AAA") { level = "AA"; } if (size !== "small" && size !== "large") { size = "small"; } return {"level":level, "size":size}; } // Node: Export function if ( true && module.exports) { module.exports = tinycolor; } // AMD/requirejs: Define the module else if (true) { !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {return tinycolor;}).call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } // Browser: Expose to window else {} })(Math); /***/ }), /***/ "bT9E": /*!*****************************************!*\ !*** ./node_modules/rc-util/es/omit.js ***! \*****************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return omit; }); /* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "VTBJ"); function omit(obj, fields) { var clone = Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, obj); if (Array.isArray(fields)) { fields.forEach(function (key) { delete clone[key]; }); } return clone; } /***/ }), /***/ "biw7": /*!**********************************************************!*\ !*** ./node_modules/rc-table/es/context/TableContext.js ***! \**********************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "cDcd"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); var TableContext = react__WEBPACK_IMPORTED_MODULE_0__["createContext"](null); /* harmony default export */ __webpack_exports__["a"] = (TableContext); /***/ }), /***/ "dmUQ": /*!**************************************************************!*\ !*** ./node_modules/rc-input-number/es/index.js + 1 modules ***! \**************************************************************/ /*! exports provided: default */ /*! exports used: default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ /*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js var objectWithoutProperties = __webpack_require__("Ff2n"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js var defineProperty = __webpack_require__("rePB"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js var classCallCheck = __webpack_require__("1OyB"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js var createClass = __webpack_require__("vuIU"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js var inherits = __webpack_require__("Ji7U"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js var possibleConstructorReturn = __webpack_require__("md7G"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js var getPrototypeOf = __webpack_require__("foSv"); // EXTERNAL MODULE: external "window.React" var external_window_React_ = __webpack_require__("cDcd"); var external_window_React_default = /*#__PURE__*/__webpack_require__.n(external_window_React_); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__("TSYQ"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: ./node_modules/rc-util/es/KeyCode.js var KeyCode = __webpack_require__("4IlW"); // CONCATENATED MODULE: ./node_modules/rc-input-number/es/InputNumber.js function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } /* eslint-disable react/prop-types */ function noop() {} function preventDefault(e) { e.preventDefault(); } var defaultParser = function defaultParser(input) { return input.replace(/[^\w.-]+/g, ''); }; /** * When click and hold on a button - the speed of auto changin the value. */ var SPEED = 200; /** * When click and hold on a button - the delay before auto changin the value. */ var DELAY = 600; /** * Max Safe Integer -- on IE this is not available, so manually set the number in that case. * The reason this is used, instead of Infinity is because numbers above the MSI are unstable */ var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || Math.pow(2, 53) - 1; var isValidProps = function isValidProps(value) { return value !== undefined && value !== null; }; var isEqual = function isEqual(oldValue, newValue) { return newValue === oldValue || typeof newValue === 'number' && typeof oldValue === 'number' && isNaN(newValue) && isNaN(oldValue); }; var InputNumber_InputNumber = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(InputNumber, _React$Component); var _super = _createSuper(InputNumber); function InputNumber(props) { var _this; Object(classCallCheck["a" /* default */])(this, InputNumber); _this = _super.call(this, props); _this.onKeyDown = function (e) { var _this$props = _this.props, onKeyDown = _this$props.onKeyDown, onPressEnter = _this$props.onPressEnter; if (e.keyCode === KeyCode["a" /* default */].UP) { var ratio = _this.getRatio(e); _this.up(e, ratio, null); _this.stop(); } else if (e.keyCode === KeyCode["a" /* default */].DOWN) { var _ratio = _this.getRatio(e); _this.down(e, _ratio, null); _this.stop(); } else if (e.keyCode === KeyCode["a" /* default */].ENTER && onPressEnter) { onPressEnter(e); } // Trigger user key down _this.recordCursorPosition(); _this.lastKeyCode = e.keyCode; if (onKeyDown) { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } onKeyDown.apply(void 0, [e].concat(args)); } }; _this.onKeyUp = function (e) { var onKeyUp = _this.props.onKeyUp; _this.stop(); _this.recordCursorPosition(); // Trigger user key up if (onKeyUp) { for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { args[_key2 - 1] = arguments[_key2]; } onKeyUp.apply(void 0, [e].concat(args)); } }; _this.onChange = function (e) { var onChange = _this.props.onChange; if (_this.state.focused) { _this.inputting = true; } _this.rawInput = _this.props.parser(_this.getValueFromEvent(e)); _this.setState({ inputValue: _this.rawInput }); onChange(_this.toNumber(_this.rawInput)); // valid number or invalid string }; _this.onMouseUp = function () { var onMouseUp = _this.props.onMouseUp; _this.recordCursorPosition(); if (onMouseUp) { onMouseUp.apply(void 0, arguments); } }; _this.onFocus = function () { var _this$props2; _this.setState({ focused: true }); (_this$props2 = _this.props).onFocus.apply(_this$props2, arguments); }; _this.onBlur = function () { var onBlur = _this.props.onBlur; _this.inputting = false; _this.setState({ focused: false }); var value = _this.getCurrentValidValue(_this.state.inputValue); var newValue = _this.setValue(value, noop); if (onBlur) { var originValue = _this.input.value; var displayValue = _this.getInputDisplayValue({ focus: false, value: newValue }); _this.input.value = displayValue ? Number(displayValue) : displayValue; onBlur.apply(void 0, arguments); _this.input.value = originValue; } }; _this.getRatio = function (e) { var ratio = 1; if (e.metaKey || e.ctrlKey) { ratio = 0.1; } else if (e.shiftKey) { ratio = 10; } return ratio; }; _this.getFullNum = function (num) { if (isNaN(num)) { return num; } if (!/e/i.test(String(num))) { return num; } return Number(num).toFixed(18).replace(/\.?0+$/, ''); }; _this.getPrecision = function (value) { if (isValidProps(_this.props.precision)) { return _this.props.precision; } var valueString = String(value); if (valueString.indexOf('e-') >= 0) { return parseInt(valueString.slice(valueString.indexOf('e-') + 2), 10); } var precision = 0; if (valueString.indexOf('.') >= 0) { precision = valueString.length - valueString.indexOf('.') - 1; } return precision; }; _this.getInputDisplayValue = function (state) { var _ref = state || _this.state, focused = _ref.focused, inputValue = _ref.inputValue, value = _ref.value; var inputDisplayValue; if (focused) { inputDisplayValue = inputValue; } else { inputDisplayValue = _this.toPrecisionAsStep(value); } if (inputDisplayValue === undefined || inputDisplayValue === null) { inputDisplayValue = ''; } var inputDisplayValueFormat = _this.formatWrapper(inputDisplayValue); if (isValidProps(_this.props.decimalSeparator)) { inputDisplayValueFormat = inputDisplayValueFormat.toString().replace('.', _this.props.decimalSeparator); } return inputDisplayValueFormat; }; _this.recordCursorPosition = function () { // Record position try { _this.cursorStart = _this.input.selectionStart; _this.cursorEnd = _this.input.selectionEnd; _this.currentValue = _this.input.value; _this.cursorBefore = _this.input.value.substring(0, _this.cursorStart); _this.cursorAfter = _this.input.value.substring(_this.cursorEnd); } catch (e) {// Fix error in Chrome: // Failed to read the 'selectionStart' property from 'HTMLInputElement' // http://stackoverflow.com/q/21177489/3040605 } }; _this.restoreByAfter = function (str) { if (str === undefined) return false; var fullStr = _this.input.value; var index = fullStr.lastIndexOf(str); if (index === -1) return false; var prevCursorPos = _this.cursorBefore.length; if (_this.lastKeyCode === KeyCode["a" /* default */].DELETE && _this.cursorBefore.charAt(prevCursorPos - 1) === str[0]) { _this.fixCaret(prevCursorPos, prevCursorPos); return true; } if (index + str.length === fullStr.length) { _this.fixCaret(index, index); return true; } return false; }; _this.partRestoreByAfter = function (str) { if (str === undefined) return false; // For loop from full str to the str with last char to map. e.g. 123 // -> 123 // -> 23 // -> 3 return Array.prototype.some.call(str, function (_, start) { var partStr = str.substring(start); return _this.restoreByAfter(partStr); }); }; // '1.' '1x' 'xx' '' => are not complete numbers _this.isNotCompleteNumber = function (num) { return isNaN(num) || num === '' || num === null || num && num.toString().indexOf('.') === num.toString().length - 1; }; _this.stop = function () { if (_this.autoStepTimer) { clearTimeout(_this.autoStepTimer); } }; _this.down = function (e, ratio, recursive) { _this.pressingUpOrDown = true; _this.step('down', e, ratio, recursive); }; _this.up = function (e, ratio, recursive) { _this.pressingUpOrDown = true; _this.step('up', e, ratio, recursive); }; _this.saveInput = function (node) { _this.input = node; }; var value = props.value; if (value === undefined) { value = props.defaultValue; } _this.state = { focused: props.autoFocus }; var validValue = _this.getValidValue(_this.toNumber(value)); _this.state = _objectSpread(_objectSpread({}, _this.state), {}, { inputValue: _this.toPrecisionAsStep(validValue), value: validValue }); return _this; } Object(createClass["a" /* default */])(InputNumber, [{ key: "componentDidMount", value: function componentDidMount() { this.componentDidUpdate(null); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { var _this$props3 = this.props, value = _this$props3.value, onChange = _this$props3.onChange, max = _this$props3.max, min = _this$props3.min; var focused = this.state.focused; // Don't trigger in componentDidMount if (prevProps) { if (!isEqual(prevProps.value, value) || !isEqual(prevProps.max, max) || !isEqual(prevProps.min, min)) { var validValue = focused ? value : this.getValidValue(value); var nextInputValue; if (this.pressingUpOrDown) { nextInputValue = validValue; } else if (this.inputting) { nextInputValue = this.rawInput; } else { nextInputValue = this.toPrecisionAsStep(validValue); } this.setState({ // eslint-disable-line value: validValue, inputValue: nextInputValue }); } // Trigger onChange when max or min change // https://github.com/ant-design/ant-design/issues/11574 var nextValue = 'value' in this.props ? value : this.state.value; // ref: null < 20 === true // https://github.com/ant-design/ant-design/issues/14277 if ('max' in this.props && prevProps.max !== max && typeof nextValue === 'number' && nextValue > max && onChange) { onChange(max); } if ('min' in this.props && prevProps.min !== min && typeof nextValue === 'number' && nextValue < min && onChange) { onChange(min); } } // Restore cursor try { // Firefox set the input cursor after it get focused. // This caused that if an input didn't init with the selection, // set will cause cursor not correct when first focus. // Safari will focus input if set selection. We need skip this. if (this.cursorStart !== undefined && this.state.focused) { // In most cases, the string after cursor is stable. // We can move the cursor before it if ( // If not match full str, try to match part of str !this.partRestoreByAfter(this.cursorAfter) && this.state.value !== this.props.value) { // If not match any of then, let's just keep the position // TODO: Logic should not reach here, need check if happens var pos = this.cursorStart + 1; // If not have last string, just position to the end if (!this.cursorAfter) { pos = this.input.value.length; } else if (this.lastKeyCode === KeyCode["a" /* default */].BACKSPACE) { pos = this.cursorStart - 1; } else if (this.lastKeyCode === KeyCode["a" /* default */].DELETE) { pos = this.cursorStart; } this.fixCaret(pos, pos); } else if (this.currentValue === this.input.value) { // Handle some special key code switch (this.lastKeyCode) { case KeyCode["a" /* default */].BACKSPACE: this.fixCaret(this.cursorStart - 1, this.cursorStart - 1); break; case KeyCode["a" /* default */].DELETE: this.fixCaret(this.cursorStart + 1, this.cursorStart + 1); break; default: // Do nothing } } } } catch (e) {// Do nothing } // Reset last key this.lastKeyCode = null; // pressingUpOrDown is true means that someone just click up or down button if (!this.pressingUpOrDown) { return; } if (this.props.focusOnUpDown && this.state.focused) { if (document.activeElement !== this.input) { this.focus(); } } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.stop(); } }, { key: "getCurrentValidValue", value: function getCurrentValidValue(value) { var val = value; if (val === '') { val = ''; } else if (!this.isNotCompleteNumber(parseFloat(val))) { val = this.getValidValue(val); } else { val = this.state.value; } return this.toNumber(val); } }, { key: "getValueFromEvent", value: function getValueFromEvent(e) { // optimize for chinese input expierence // https://github.com/ant-design/ant-design/issues/8196 var value = e.target.value.trim().replace(/。/g, '.'); if (isValidProps(this.props.decimalSeparator)) { value = value.replace(this.props.decimalSeparator, '.'); } return value; } }, { key: "getValidValue", value: function getValidValue(value) { var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.props.min; var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.props.max; var val = parseFloat(value); // https://github.com/ant-design/ant-design/issues/7358 if (isNaN(val)) { return value; } if (val < min) { val = min; } if (val > max) { val = max; } return val; } }, { key: "setValue", value: function setValue(v, callback) { // trigger onChange var precision = this.props.precision; var newValue = this.isNotCompleteNumber(parseFloat(v)) ? null : parseFloat(v); var _this$state$value = this.state.value, value = _this$state$value === void 0 ? null : _this$state$value; var _this$state$inputValu = this.state.inputValue, inputValue = _this$state$inputValu === void 0 ? null : _this$state$inputValu; // https://github.com/ant-design/ant-design/issues/7363 // https://github.com/ant-design/ant-design/issues/16622 var newValueInString = typeof newValue === 'number' ? newValue.toFixed(precision) : "".concat(newValue); var changed = newValue !== value || newValueInString !== "".concat(inputValue); if (!('value' in this.props)) { this.setState({ value: newValue, inputValue: this.toPrecisionAsStep(v) }, callback); } else { // always set input value same as value inputValue = this.toPrecisionAsStep(this.state.value); this.setState({ inputValue: inputValue }, callback); } if (changed) { this.props.onChange(newValue); } return newValue; } // step={1.0} value={1.51} // press + // then value should be 2.51, rather than 2.5 // if this.props.precision is undefined // https://github.com/react-component/input-number/issues/39 }, { key: "getMaxPrecision", value: function getMaxPrecision(currentValue) { var ratio = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; var _this$props4 = this.props, precision = _this$props4.precision, step = _this$props4.step; if (isValidProps(precision)) { return precision; } var ratioPrecision = this.getPrecision(ratio); var stepPrecision = this.getPrecision(step); var currentValuePrecision = this.getPrecision(currentValue); if (!currentValue) { return ratioPrecision + stepPrecision; } return Math.max(currentValuePrecision, ratioPrecision + stepPrecision); } }, { key: "getPrecisionFactor", value: function getPrecisionFactor(currentValue) { var ratio = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; var precision = this.getMaxPrecision(currentValue, ratio); return Math.pow(10, precision); } }, { key: "focus", value: function focus() { this.input.focus(); this.recordCursorPosition(); } }, { key: "blur", value: function blur() { this.input.blur(); } }, { key: "select", value: function select() { this.input.select(); } }, { key: "formatWrapper", value: function formatWrapper(num) { // http://2ality.com/2012/03/signedzero.html // https://github.com/ant-design/ant-design/issues/9439 if (this.props.formatter) { return this.props.formatter(num); } return num; } }, { key: "toPrecisionAsStep", value: function toPrecisionAsStep(num) { if (this.isNotCompleteNumber(num) || num === '') { return num; } var precision = Math.abs(this.getMaxPrecision(num)); if (!isNaN(precision)) { return Number(num).toFixed(precision); } return num.toString(); } }, { key: "toNumber", value: function toNumber(num) { var precision = this.props.precision; var focused = this.state.focused; // num.length > 16 => This is to prevent input of large numbers var numberIsTooLarge = num && num.length > 16 && focused; if (this.isNotCompleteNumber(num) || numberIsTooLarge) { return num; } if (isValidProps(precision)) { return Math.round(num * Math.pow(10, precision)) / Math.pow(10, precision); } return Number(num); } }, { key: "upStep", value: function upStep(val, rat) { var step = this.props.step; var precisionFactor = this.getPrecisionFactor(val, rat); var precision = Math.abs(this.getMaxPrecision(val, rat)); var result = ((precisionFactor * val + precisionFactor * step * rat) / precisionFactor).toFixed(precision); return this.toNumber(result); } }, { key: "downStep", value: function downStep(val, rat) { var step = this.props.step; var precisionFactor = this.getPrecisionFactor(val, rat); var precision = Math.abs(this.getMaxPrecision(val, rat)); var result = ((precisionFactor * val - precisionFactor * step * rat) / precisionFactor).toFixed(precision); return this.toNumber(result); } }, { key: "step", value: function step(type, e) { var _this2 = this; var ratio = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; var recursive = arguments.length > 3 ? arguments[3] : undefined; this.stop(); if (e) { e.persist(); e.preventDefault(); } var props = this.props; if (props.disabled) { return; } var value = this.getCurrentValidValue(this.state.inputValue) || 0; if (this.isNotCompleteNumber(value)) { return; } var val = this["".concat(type, "Step")](value, ratio); var outOfRange = val > props.max || val < props.min; if (val > props.max) { val = props.max; } else if (val < props.min) { val = props.min; } this.setValue(val, null); this.setState({ focused: true }, function () { _this2.pressingUpOrDown = false; }); if (outOfRange) { return; } this.autoStepTimer = setTimeout(function () { _this2[type](e, ratio, true); }, recursive ? SPEED : DELAY); } }, { key: "fixCaret", value: function fixCaret(start, end) { if (start === undefined || end === undefined || !this.input || !this.input.value) { return; } try { var currentStart = this.input.selectionStart; var currentEnd = this.input.selectionEnd; if (start !== currentStart || end !== currentEnd) { this.input.setSelectionRange(start, end); } } catch (e) {// Fix error in Chrome: // Failed to read the 'selectionStart' property from 'HTMLInputElement' // http://stackoverflow.com/q/21177489/3040605 } } }, { key: "render", value: function render() { var _classNames; var _this$props5 = this.props, prefixCls = _this$props5.prefixCls, disabled = _this$props5.disabled, readOnly = _this$props5.readOnly, useTouch = _this$props5.useTouch, autoComplete = _this$props5.autoComplete, upHandler = _this$props5.upHandler, downHandler = _this$props5.downHandler, className = _this$props5.className, max = _this$props5.max, min = _this$props5.min, style = _this$props5.style, title = _this$props5.title, onMouseEnter = _this$props5.onMouseEnter, onMouseLeave = _this$props5.onMouseLeave, onMouseOver = _this$props5.onMouseOver, onMouseOut = _this$props5.onMouseOut, required = _this$props5.required, onClick = _this$props5.onClick, tabIndex = _this$props5.tabIndex, type = _this$props5.type, placeholder = _this$props5.placeholder, id = _this$props5.id, inputMode = _this$props5.inputMode, pattern = _this$props5.pattern, step = _this$props5.step, maxLength = _this$props5.maxLength, autoFocus = _this$props5.autoFocus, name = _this$props5.name, onPaste = _this$props5.onPaste, onInput = _this$props5.onInput, rest = Object(objectWithoutProperties["a" /* default */])(_this$props5, ["prefixCls", "disabled", "readOnly", "useTouch", "autoComplete", "upHandler", "downHandler", "className", "max", "min", "style", "title", "onMouseEnter", "onMouseLeave", "onMouseOver", "onMouseOut", "required", "onClick", "tabIndex", "type", "placeholder", "id", "inputMode", "pattern", "step", "maxLength", "autoFocus", "name", "onPaste", "onInput"]); var _this$state = this.state, value = _this$state.value, focused = _this$state.focused; var classes = classnames_default()(prefixCls, (_classNames = {}, Object(defineProperty["a" /* default */])(_classNames, className, !!className), Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-disabled"), disabled), Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-focused"), focused), _classNames)); var dataOrAriaAttributeProps = {}; Object.keys(rest).forEach(function (key) { if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') { dataOrAriaAttributeProps[key] = rest[key]; } }); var editable = !readOnly && !disabled; // focus state, show input value // unfocus state, show valid value var inputDisplayValue = this.getInputDisplayValue(null); var upDisabled = (value || value === 0) && (isNaN(value) || Number(value) >= max); var downDisabled = (value || value === 0) && (isNaN(value) || Number(value) <= min); var isUpDisabled = upDisabled || disabled || readOnly; var isDownDisabled = downDisabled || disabled || readOnly; var upClassName = classnames_default()("".concat(prefixCls, "-handler"), "".concat(prefixCls, "-handler-up"), Object(defineProperty["a" /* default */])({}, "".concat(prefixCls, "-handler-up-disabled"), isUpDisabled)); var downClassName = classnames_default()("".concat(prefixCls, "-handler"), "".concat(prefixCls, "-handler-down"), Object(defineProperty["a" /* default */])({}, "".concat(prefixCls, "-handler-down-disabled"), isDownDisabled)); var upEvents = useTouch ? { onTouchStart: isUpDisabled ? noop : this.up, onTouchEnd: this.stop } : { onMouseDown: isUpDisabled ? noop : this.up, onMouseUp: this.stop, onMouseLeave: this.stop }; var downEvents = useTouch ? { onTouchStart: isDownDisabled ? noop : this.down, onTouchEnd: this.stop } : { onMouseDown: isDownDisabled ? noop : this.down, onMouseUp: this.stop, onMouseLeave: this.stop }; return external_window_React_default.a.createElement("div", { className: classes, style: style, title: title, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onMouseOver: onMouseOver, onMouseOut: onMouseOut, onFocus: function onFocus() { return null; }, onBlur: function onBlur() { return null; } }, external_window_React_default.a.createElement("div", { className: "".concat(prefixCls, "-handler-wrap") }, external_window_React_default.a.createElement("span", Object.assign({ unselectable: "on" }, upEvents, { role: "button", "aria-label": "Increase Value", "aria-disabled": isUpDisabled, className: upClassName }), upHandler || external_window_React_default.a.createElement("span", { unselectable: "on", className: "".concat(prefixCls, "-handler-up-inner"), onClick: preventDefault })), external_window_React_default.a.createElement("span", Object.assign({ unselectable: "on" }, downEvents, { role: "button", "aria-label": "Decrease Value", "aria-disabled": isDownDisabled, className: downClassName }), downHandler || external_window_React_default.a.createElement("span", { unselectable: "on", className: "".concat(prefixCls, "-handler-down-inner"), onClick: preventDefault }))), external_window_React_default.a.createElement("div", { className: "".concat(prefixCls, "-input-wrap") }, external_window_React_default.a.createElement("input", Object.assign({ role: "spinbutton", "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": value, required: required, type: type, placeholder: placeholder, onPaste: onPaste, onClick: onClick, onMouseUp: this.onMouseUp, className: "".concat(prefixCls, "-input"), tabIndex: tabIndex, autoComplete: autoComplete, onFocus: this.onFocus, onBlur: this.onBlur, onKeyDown: editable ? this.onKeyDown : noop, onKeyUp: editable ? this.onKeyUp : noop, autoFocus: autoFocus, maxLength: maxLength, readOnly: readOnly, disabled: disabled, max: max, min: min, step: step, name: name, title: title, id: id, onChange: this.onChange, ref: this.saveInput, value: this.getFullNum(inputDisplayValue), pattern: pattern, inputMode: inputMode, onInput: onInput }, dataOrAriaAttributeProps)))); } }]); return InputNumber; }(external_window_React_default.a.Component); InputNumber_InputNumber.defaultProps = { focusOnUpDown: true, useTouch: false, prefixCls: 'rc-input-number', max: MAX_SAFE_INTEGER, min: -MAX_SAFE_INTEGER, step: 1, style: {}, onChange: noop, onKeyDown: noop, onPressEnter: noop, onFocus: noop, onBlur: noop, parser: defaultParser, required: false, autoComplete: 'off' }; /* harmony default export */ var es_InputNumber = (InputNumber_InputNumber); // CONCATENATED MODULE: ./node_modules/rc-input-number/es/index.js /* harmony default export */ var es = __webpack_exports__["a"] = (es_InputNumber); /***/ }), /***/ "fyJ8": /*!************************************************!*\ !*** ./node_modules/rc-table/es/Cell/index.js ***! \************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "rePB"); /* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "VTBJ"); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "Ff2n"); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "U8pU"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "cDcd"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ "TSYQ"); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var rc_util_es_ref__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/ref */ "c+Xe"); /* harmony import */ var _utils_valueUtil__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/valueUtil */ "sR1s"); function isRenderCell(data) { return data && Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(data) === 'object' && !Array.isArray(data) && !react__WEBPACK_IMPORTED_MODULE_4__["isValidElement"](data); } function isRefComponent(component) { // String tag component also support ref if (typeof component === 'string') { return true; } return Object(rc_util_es_ref__WEBPACK_IMPORTED_MODULE_6__[/* supportRef */ "c"])(component); } function Cell(_ref, ref) { var _classNames; var prefixCls = _ref.prefixCls, className = _ref.className, record = _ref.record, index = _ref.index, dataIndex = _ref.dataIndex, render = _ref.render, children = _ref.children, _ref$component = _ref.component, Component = _ref$component === void 0 ? 'td' : _ref$component, colSpan = _ref.colSpan, rowSpan = _ref.rowSpan, fixLeft = _ref.fixLeft, fixRight = _ref.fixRight, firstFixLeft = _ref.firstFixLeft, lastFixLeft = _ref.lastFixLeft, firstFixRight = _ref.firstFixRight, lastFixRight = _ref.lastFixRight, appendNode = _ref.appendNode, _ref$additionalProps = _ref.additionalProps, additionalProps = _ref$additionalProps === void 0 ? {} : _ref$additionalProps, ellipsis = _ref.ellipsis, align = _ref.align, rowType = _ref.rowType, isSticky = _ref.isSticky; var cellPrefixCls = "".concat(prefixCls, "-cell"); // ==================== Child Node ==================== var cellProps; var childNode; if (children) { childNode = children; } else { var value = Object(_utils_valueUtil__WEBPACK_IMPORTED_MODULE_7__[/* getPathValue */ "b"])(record, dataIndex); // Customize render node childNode = value; if (render) { var renderData = render(value, record, index); if (isRenderCell(renderData)) { childNode = renderData.children; cellProps = renderData.props; } else { childNode = renderData; } } } // Not crash if final `childNode` is not validate ReactNode if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(childNode) === 'object' && !Array.isArray(childNode) && !react__WEBPACK_IMPORTED_MODULE_4__["isValidElement"](childNode)) { childNode = null; } if (ellipsis && (lastFixLeft || firstFixRight)) { childNode = react__WEBPACK_IMPORTED_MODULE_4__["createElement"]("span", { className: "".concat(cellPrefixCls, "-content") }, childNode); } var _ref2 = cellProps || {}, cellColSpan = _ref2.colSpan, cellRowSpan = _ref2.rowSpan, cellStyle = _ref2.style, cellClassName = _ref2.className, restCellProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_ref2, ["colSpan", "rowSpan", "style", "className"]); var mergedColSpan = cellColSpan !== undefined ? cellColSpan : colSpan; var mergedRowSpan = cellRowSpan !== undefined ? cellRowSpan : rowSpan; if (mergedColSpan === 0 || mergedRowSpan === 0) { return null; } // ====================== Fixed ======================= var fixedStyle = {}; var isFixLeft = typeof fixLeft === 'number'; var isFixRight = typeof fixRight === 'number'; if (isFixLeft) { fixedStyle.position = 'sticky'; fixedStyle.left = fixLeft; } if (isFixRight) { fixedStyle.position = 'sticky'; fixedStyle.right = fixRight; } // ====================== Align ======================= var alignStyle = {}; if (align) { alignStyle.textAlign = align; } // ====================== Render ====================== var title; var ellipsisConfig = ellipsis === true ? { showTitle: true } : ellipsis; if (ellipsisConfig && (ellipsisConfig.showTitle || rowType === 'header')) { if (typeof childNode === 'string' || typeof childNode === 'number') { title = childNode.toString(); } else if (react__WEBPACK_IMPORTED_MODULE_4__["isValidElement"](childNode) && typeof childNode.props.children === 'string') { title = childNode.props.children; } } var componentProps = Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ title: title }, restCellProps), additionalProps), {}, { colSpan: mergedColSpan && mergedColSpan !== 1 ? mergedColSpan : null, rowSpan: mergedRowSpan && mergedRowSpan !== 1 ? mergedRowSpan : null, className: classnames__WEBPACK_IMPORTED_MODULE_5___default()(cellPrefixCls, className, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(cellPrefixCls, "-fix-left"), isFixLeft), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(cellPrefixCls, "-fix-left-first"), firstFixLeft), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(cellPrefixCls, "-fix-left-last"), lastFixLeft), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(cellPrefixCls, "-fix-right"), isFixRight), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(cellPrefixCls, "-fix-right-first"), firstFixRight), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(cellPrefixCls, "-fix-right-last"), lastFixRight), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(cellPrefixCls, "-ellipsis"), ellipsis), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(cellPrefixCls, "-with-append"), appendNode), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(cellPrefixCls, "-fix-sticky"), (isFixLeft || isFixRight) && isSticky), _classNames), additionalProps.className, cellClassName), style: Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, additionalProps.style), alignStyle), fixedStyle), cellStyle), ref: isRefComponent(Component) ? ref : null }); return react__WEBPACK_IMPORTED_MODULE_4__["createElement"](Component, Object.assign({}, componentProps), appendNode, childNode); } var RefCell = react__WEBPACK_IMPORTED_MODULE_4__["forwardRef"](Cell); RefCell.displayName = 'Cell'; var MemoCell = react__WEBPACK_IMPORTED_MODULE_4__["memo"](RefCell, function (prev, next) { if (next.shouldCellUpdate) { return !next.shouldCellUpdate(next.record, prev.record); } return false; }); /* harmony default export */ __webpack_exports__["a"] = (MemoCell); /***/ }), /***/ "h78n": /*!**********************************************************!*\ !*** ./node_modules/rc-progress/es/index.js + 3 modules ***! \**********************************************************/ /*! exports provided: Line, Circle, default */ /*! exports used: Circle */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ es_Circle; }); // UNUSED EXPORTS: Line // EXTERNAL MODULE: external "window.React" var external_window_React_ = __webpack_require__("cDcd"); var external_window_React_default = /*#__PURE__*/__webpack_require__.n(external_window_React_); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__("TSYQ"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // CONCATENATED MODULE: ./node_modules/rc-progress/es/common.js var defaultProps = { className: '', percent: 0, prefixCls: 'rc-progress', strokeColor: '#2db7f5', strokeLinecap: 'round', strokeWidth: 1, style: {}, trailColor: '#D9D9D9', trailWidth: 1 }; var common_useTransitionDuration = function useTransitionDuration(percentList) { var paths = percentList.map(function () { return Object(external_window_React_["useRef"])(); }); var prevTimeStamp = Object(external_window_React_["useRef"])(); Object(external_window_React_["useEffect"])(function () { var now = Date.now(); var updated = false; Object.keys(paths).forEach(function (key) { var path = paths[key].current; if (!path) { return; } updated = true; var pathStyle = path.style; pathStyle.transitionDuration = '.3s, .3s, .3s, .06s'; if (prevTimeStamp.current && now - prevTimeStamp.current < 100) { pathStyle.transitionDuration = '0s, 0s'; } }); if (updated) { prevTimeStamp.current = Date.now(); } }); return [paths]; }; // CONCATENATED MODULE: ./node_modules/rc-progress/es/Line.js 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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } /* eslint react/prop-types: 0 */ var Line_Line = function Line(_ref) { var className = _ref.className, percent = _ref.percent, prefixCls = _ref.prefixCls, strokeColor = _ref.strokeColor, strokeLinecap = _ref.strokeLinecap, strokeWidth = _ref.strokeWidth, style = _ref.style, trailColor = _ref.trailColor, trailWidth = _ref.trailWidth, transition = _ref.transition, restProps = _objectWithoutProperties(_ref, ["className", "percent", "prefixCls", "strokeColor", "strokeLinecap", "strokeWidth", "style", "trailColor", "trailWidth", "transition"]); delete restProps.gapPosition; var percentList = Array.isArray(percent) ? percent : [percent]; var strokeColorList = Array.isArray(strokeColor) ? strokeColor : [strokeColor]; var _useTransitionDuratio = common_useTransitionDuration(percentList), _useTransitionDuratio2 = _slicedToArray(_useTransitionDuratio, 1), paths = _useTransitionDuratio2[0]; var center = strokeWidth / 2; var right = 100 - strokeWidth / 2; var pathString = "M ".concat(strokeLinecap === 'round' ? center : 0, ",").concat(center, "\n L ").concat(strokeLinecap === 'round' ? right : 100, ",").concat(center); var viewBoxString = "0 0 100 ".concat(strokeWidth); var stackPtg = 0; return /*#__PURE__*/external_window_React_default.a.createElement("svg", _extends({ className: classnames_default()("".concat(prefixCls, "-line"), className), viewBox: viewBoxString, preserveAspectRatio: "none", style: style }, restProps), /*#__PURE__*/external_window_React_default.a.createElement("path", { className: "".concat(prefixCls, "-line-trail"), d: pathString, strokeLinecap: strokeLinecap, stroke: trailColor, strokeWidth: trailWidth || strokeWidth, fillOpacity: "0" }), percentList.map(function (ptg, index) { var pathStyle = { strokeDasharray: "".concat(ptg, "px, 100px"), strokeDashoffset: "-".concat(stackPtg, "px"), transition: transition || 'stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear' }; var color = strokeColorList[index] || strokeColorList[strokeColorList.length - 1]; stackPtg += ptg; return /*#__PURE__*/external_window_React_default.a.createElement("path", { key: index, className: "".concat(prefixCls, "-line-path"), d: pathString, strokeLinecap: strokeLinecap, stroke: color, strokeWidth: strokeWidth, fillOpacity: "0", ref: paths[index], style: pathStyle }); })); }; Line_Line.defaultProps = defaultProps; /* harmony default export */ var es_Line = (Line_Line); // CONCATENATED MODULE: ./node_modules/rc-progress/es/Circle.js function Circle_extends() { Circle_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 Circle_extends.apply(this, arguments); } function Circle_slicedToArray(arr, i) { return Circle_arrayWithHoles(arr) || Circle_iterableToArrayLimit(arr, i) || Circle_unsupportedIterableToArray(arr, i) || Circle_nonIterableRest(); } function Circle_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function Circle_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return Circle_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Circle_arrayLikeToArray(o, minLen); } function Circle_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function Circle_iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function Circle_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function Circle_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = Circle_objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function Circle_objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } /* eslint react/prop-types: 0 */ var gradientSeed = 0; function stripPercentToNumber(percent) { return +percent.replace('%', ''); } function toArray(symArray) { return Array.isArray(symArray) ? symArray : [symArray]; } function getPathStyles(offset, percent, strokeColor, strokeWidth) { var gapDegree = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0; var gapPosition = arguments.length > 5 ? arguments[5] : undefined; var radius = 50 - strokeWidth / 2; var beginPositionX = 0; var beginPositionY = -radius; var endPositionX = 0; var endPositionY = -2 * radius; switch (gapPosition) { case 'left': beginPositionX = -radius; beginPositionY = 0; endPositionX = 2 * radius; endPositionY = 0; break; case 'right': beginPositionX = radius; beginPositionY = 0; endPositionX = -2 * radius; endPositionY = 0; break; case 'bottom': beginPositionY = radius; endPositionY = 2 * radius; break; default: } var pathString = "M 50,50 m ".concat(beginPositionX, ",").concat(beginPositionY, "\n a ").concat(radius, ",").concat(radius, " 0 1 1 ").concat(endPositionX, ",").concat(-endPositionY, "\n a ").concat(radius, ",").concat(radius, " 0 1 1 ").concat(-endPositionX, ",").concat(endPositionY); var len = Math.PI * 2 * radius; var pathStyle = { stroke: strokeColor, strokeDasharray: "".concat(percent / 100 * (len - gapDegree), "px ").concat(len, "px"), strokeDashoffset: "-".concat(gapDegree / 2 + offset / 100 * (len - gapDegree), "px"), transition: 'stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s' // eslint-disable-line }; return { pathString: pathString, pathStyle: pathStyle }; } var Circle_Circle = function Circle(_ref) { var prefixCls = _ref.prefixCls, strokeWidth = _ref.strokeWidth, trailWidth = _ref.trailWidth, gapDegree = _ref.gapDegree, gapPosition = _ref.gapPosition, trailColor = _ref.trailColor, strokeLinecap = _ref.strokeLinecap, style = _ref.style, className = _ref.className, strokeColor = _ref.strokeColor, percent = _ref.percent, restProps = Circle_objectWithoutProperties(_ref, ["prefixCls", "strokeWidth", "trailWidth", "gapDegree", "gapPosition", "trailColor", "strokeLinecap", "style", "className", "strokeColor", "percent"]); var gradientId = Object(external_window_React_["useMemo"])(function () { gradientSeed += 1; return gradientSeed; }, []); var _getPathStyles = getPathStyles(0, 100, trailColor, strokeWidth, gapDegree, gapPosition), pathString = _getPathStyles.pathString, pathStyle = _getPathStyles.pathStyle; var percentList = toArray(percent); var strokeColorList = toArray(strokeColor); var gradient = strokeColorList.find(function (color) { return Object.prototype.toString.call(color) === '[object Object]'; }); var _useTransitionDuratio = common_useTransitionDuration(percentList), _useTransitionDuratio2 = Circle_slicedToArray(_useTransitionDuratio, 1), paths = _useTransitionDuratio2[0]; var getStokeList = function getStokeList() { var stackPtg = 0; return percentList.map(function (ptg, index) { var color = strokeColorList[index] || strokeColorList[strokeColorList.length - 1]; var stroke = Object.prototype.toString.call(color) === '[object Object]' ? "url(#".concat(prefixCls, "-gradient-").concat(gradientId, ")") : ''; var pathStyles = getPathStyles(stackPtg, ptg, color, strokeWidth, gapDegree, gapPosition); stackPtg += ptg; return /*#__PURE__*/external_window_React_default.a.createElement("path", { key: index, className: "".concat(prefixCls, "-circle-path"), d: pathStyles.pathString, stroke: stroke, strokeLinecap: strokeLinecap, strokeWidth: strokeWidth, opacity: ptg === 0 ? 0 : 1, fillOpacity: "0", style: pathStyles.pathStyle, ref: paths[index] }); }); }; return /*#__PURE__*/external_window_React_default.a.createElement("svg", Circle_extends({ className: classnames_default()("".concat(prefixCls, "-circle"), className), viewBox: "0 0 100 100", style: style }, restProps), gradient && /*#__PURE__*/external_window_React_default.a.createElement("defs", null, /*#__PURE__*/external_window_React_default.a.createElement("linearGradient", { id: "".concat(prefixCls, "-gradient-").concat(gradientId), x1: "100%", y1: "0%", x2: "0%", y2: "0%" }, Object.keys(gradient).sort(function (a, b) { return stripPercentToNumber(a) - stripPercentToNumber(b); }).map(function (key, index) { return /*#__PURE__*/external_window_React_default.a.createElement("stop", { key: index, offset: key, stopColor: gradient[key] }); }))), /*#__PURE__*/external_window_React_default.a.createElement("path", { className: "".concat(prefixCls, "-circle-trail"), d: pathString, stroke: trailColor, strokeLinecap: strokeLinecap, strokeWidth: trailWidth || strokeWidth, fillOpacity: "0", style: pathStyle }), getStokeList().reverse()); }; Circle_Circle.defaultProps = defaultProps; /* harmony default export */ var es_Circle = (Circle_Circle); // CONCATENATED MODULE: ./node_modules/rc-progress/es/index.js /* harmony default export */ var es = ({ Line: es_Line, Circle: es_Circle }); /***/ }), /***/ "hW8S": /*!******************************************************!*\ !*** ./node_modules/rc-table/es/utils/legacyUtil.js ***! \******************************************************/ /*! exports provided: INTERNAL_COL_DEFINE, getExpandableProps, getDataAndAriaProps */ /*! exports used: INTERNAL_COL_DEFINE, getDataAndAriaProps, getExpandableProps */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return INTERNAL_COL_DEFINE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getExpandableProps; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getDataAndAriaProps; }); /* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "VTBJ"); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "Ff2n"); /* harmony import */ var rc_util_es_warning__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rc-util/es/warning */ "Kwbf"); var INTERNAL_COL_DEFINE = 'RC_TABLE_INTERNAL_COL_DEFINE'; function getExpandableProps(props) { var expandable = props.expandable, legacyExpandableConfig = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(props, ["expandable"]); if ('expandable' in props) { return Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, legacyExpandableConfig), expandable); } if (false) {} return legacyExpandableConfig; } /** * Returns only data- and aria- key/value pairs * @param {object} props */ function getDataAndAriaProps(props) { /* eslint-disable no-param-reassign */ 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; }, {}); /* eslint-enable */ } /***/ }), /***/ "k3GJ": /*!*******************************************************!*\ !*** ./node_modules/rc-tabs/es/index.js + 50 modules ***! \*******************************************************/ /*! exports provided: TabPane, default */ /*! exports used: TabPane, default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/mini-store/esm/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-align/es/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-dropdown/es/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/canUseDom.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/contains.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/findDOMNode.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Portal.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/createChainedFunction.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMergedState.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/omit.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/raf.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with external "window.ReactDOM" (<- Module is not an ECMAScript module) */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ TabPane; }); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js var defineProperty = __webpack_require__("rePB"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules var slicedToArray = __webpack_require__("ODXe"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js var objectWithoutProperties = __webpack_require__("Ff2n"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js var objectSpread2 = __webpack_require__("VTBJ"); // EXTERNAL MODULE: external "window.React" var external_window_React_ = __webpack_require__("cDcd"); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__("TSYQ"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: ./node_modules/rc-util/es/Children/toArray.js var toArray = __webpack_require__("Zm9Q"); // EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useMergedState.js var useMergedState = __webpack_require__("6cGi"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules var toConsumableArray = __webpack_require__("KQm4"); // EXTERNAL MODULE: ./node_modules/raf/index.js var raf = __webpack_require__("xEkU"); var raf_default = /*#__PURE__*/__webpack_require__.n(raf); // EXTERNAL MODULE: ./node_modules/rc-resize-observer/es/index.js var es = __webpack_require__("t23M"); // CONCATENATED MODULE: ./node_modules/rc-tabs/es/hooks/useRaf.js function useRaf(callback) { var rafRef = Object(external_window_React_["useRef"])(); var removedRef = Object(external_window_React_["useRef"])(false); function trigger() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } if (!removedRef.current) { raf_default.a.cancel(rafRef.current); rafRef.current = raf_default()(function () { callback.apply(void 0, args); }); } } Object(external_window_React_["useEffect"])(function () { return function () { removedRef.current = true; raf_default.a.cancel(rafRef.current); }; }, []); return trigger; } function useRafState(defaultState) { var batchRef = Object(external_window_React_["useRef"])([]); var _useState = Object(external_window_React_["useState"])({}), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), forceUpdate = _useState2[1]; var state = Object(external_window_React_["useRef"])(typeof defaultState === 'function' ? defaultState() : defaultState); var flushUpdate = useRaf(function () { var current = state.current; batchRef.current.forEach(function (callback) { current = callback(current); }); batchRef.current = []; state.current = current; forceUpdate({}); }); function updater(callback) { batchRef.current.push(callback); flushUpdate(); } return [state.current, updater]; } // EXTERNAL MODULE: ./node_modules/rc-util/es/KeyCode.js var KeyCode = __webpack_require__("4IlW"); // CONCATENATED MODULE: ./node_modules/rc-tabs/es/TabNavList/TabNode.js function TabNode(_ref, ref) { var _classNames; var prefixCls = _ref.prefixCls, id = _ref.id, active = _ref.active, rtl = _ref.rtl, _ref$tab = _ref.tab, key = _ref$tab.key, tab = _ref$tab.tab, disabled = _ref$tab.disabled, closeIcon = _ref$tab.closeIcon, tabBarGutter = _ref.tabBarGutter, tabPosition = _ref.tabPosition, closable = _ref.closable, renderWrapper = _ref.renderWrapper, removeAriaLabel = _ref.removeAriaLabel, editable = _ref.editable, onClick = _ref.onClick, onRemove = _ref.onRemove, onFocus = _ref.onFocus; var tabPrefix = "".concat(prefixCls, "-tab"); external_window_React_["useEffect"](function () { return onRemove; }, []); var nodeStyle = {}; if (tabPosition === 'top' || tabPosition === 'bottom') { nodeStyle[rtl ? 'marginLeft' : 'marginRight'] = tabBarGutter; } else { nodeStyle.marginBottom = tabBarGutter; } var removable = editable && closable !== false && !disabled; function onInternalClick(e) { if (disabled) return; onClick(e); } function onRemoveTab(event) { event.preventDefault(); event.stopPropagation(); editable.onEdit('remove', { key: key, event: event }); } var node = external_window_React_["createElement"]("div", { key: key, ref: ref, className: classnames_default()(tabPrefix, (_classNames = {}, Object(defineProperty["a" /* default */])(_classNames, "".concat(tabPrefix, "-with-remove"), removable), Object(defineProperty["a" /* default */])(_classNames, "".concat(tabPrefix, "-active"), active), Object(defineProperty["a" /* default */])(_classNames, "".concat(tabPrefix, "-disabled"), disabled), _classNames)), style: nodeStyle, onClick: onInternalClick }, external_window_React_["createElement"]("div", { role: "tab", "aria-selected": active, id: id && "".concat(id, "-tab-").concat(key), className: "".concat(tabPrefix, "-btn"), "aria-controls": id && "".concat(id, "-panel-").concat(key), "aria-disabled": disabled, tabIndex: disabled ? null : 0, onClick: function onClick(e) { e.stopPropagation(); onInternalClick(e); }, onKeyDown: function onKeyDown(e) { if ([KeyCode["a" /* default */].SPACE, KeyCode["a" /* default */].ENTER].includes(e.which)) { e.preventDefault(); onInternalClick(e); } }, onFocus: onFocus }, tab), removable && external_window_React_["createElement"]("button", { type: "button", "aria-label": removeAriaLabel || 'remove', tabIndex: 0, className: "".concat(tabPrefix, "-remove"), onClick: function onClick(e) { e.stopPropagation(); onRemoveTab(e); } }, closeIcon || editable.removeIcon || '×')); if (renderWrapper) { node = renderWrapper(node); } return node; } /* harmony default export */ var TabNavList_TabNode = (external_window_React_["forwardRef"](TabNode)); // CONCATENATED MODULE: ./node_modules/rc-tabs/es/hooks/useOffsets.js var DEFAULT_SIZE = { width: 0, height: 0, left: 0, top: 0 }; function useOffsets(tabs, tabSizes, holderScrollWidth) { return Object(external_window_React_["useMemo"])(function () { var _tabs$; var map = new Map(); var lastOffset = tabSizes.get((_tabs$ = tabs[0]) === null || _tabs$ === void 0 ? void 0 : _tabs$.key) || DEFAULT_SIZE; var rightOffset = lastOffset.left + lastOffset.width; for (var i = 0; i < tabs.length; i += 1) { var key = tabs[i].key; var data = tabSizes.get(key); // Reuse last one when not exist yet if (!data) { var _tabs; data = tabSizes.get((_tabs = tabs[i - 1]) === null || _tabs === void 0 ? void 0 : _tabs.key) || DEFAULT_SIZE; } var entity = map.get(key) || Object(objectSpread2["a" /* default */])({}, data); // Right entity.right = rightOffset - entity.left - entity.width; // Update entity map.set(key, entity); } return map; }, [tabs.map(function (tab) { return tab.key; }).join('_'), tabSizes, holderScrollWidth]); } // CONCATENATED MODULE: ./node_modules/rc-tabs/es/hooks/useVisibleRange.js var useVisibleRange_DEFAULT_SIZE = { width: 0, height: 0, left: 0, top: 0, right: 0 }; function useVisibleRange(tabOffsets, containerSize, tabContentNodeSize, addNodeSize, _ref) { var tabs = _ref.tabs, tabPosition = _ref.tabPosition, rtl = _ref.rtl; var unit; var position; var transformSize; if (['top', 'bottom'].includes(tabPosition)) { unit = 'width'; position = rtl ? 'right' : 'left'; transformSize = Math.abs(containerSize.left); } else { unit = 'height'; position = 'top'; transformSize = -containerSize.top; } var basicSize = containerSize[unit]; var tabContentSize = tabContentNodeSize[unit]; var addSize = addNodeSize[unit]; var mergedBasicSize = basicSize; if (tabContentSize + addSize > basicSize) { mergedBasicSize = basicSize - addSize; } return Object(external_window_React_["useMemo"])(function () { if (!tabs.length) { return [0, 0]; } var len = tabs.length; var endIndex = len; for (var i = 0; i < len; i += 1) { var offset = tabOffsets.get(tabs[i].key) || useVisibleRange_DEFAULT_SIZE; if (offset[position] + offset[unit] > transformSize + mergedBasicSize) { endIndex = i - 1; break; } } var startIndex = 0; for (var _i = len - 1; _i >= 0; _i -= 1) { var _offset = tabOffsets.get(tabs[_i].key) || useVisibleRange_DEFAULT_SIZE; if (_offset[position] < transformSize) { startIndex = _i + 1; break; } } return [startIndex, endIndex]; }, [tabOffsets, transformSize, mergedBasicSize, tabPosition, tabs.map(function (tab) { return tab.key; }).join('_'), rtl]); } // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__("wx14"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js var classCallCheck = __webpack_require__("1OyB"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js var createClass = __webpack_require__("vuIU"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js var assertThisInitialized = __webpack_require__("JX7q"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js var inherits = __webpack_require__("Ji7U"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 1 modules var createSuper = __webpack_require__("LK+K"); // EXTERNAL MODULE: ./node_modules/mini-store/esm/index.js + 3 modules var esm = __webpack_require__("I8Z2"); // EXTERNAL MODULE: ./node_modules/rc-util/es/omit.js var omit = __webpack_require__("bT9E"); // EXTERNAL MODULE: ./node_modules/rc-util/es/createChainedFunction.js var createChainedFunction = __webpack_require__("2GS6"); // EXTERNAL MODULE: ./node_modules/shallowequal/index.js var shallowequal = __webpack_require__("Gytx"); var shallowequal_default = /*#__PURE__*/__webpack_require__.n(shallowequal); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js var esm_typeof = __webpack_require__("U8pU"); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-menu/es/utils/isMobile.js // MIT License from https://github.com/kaimallea/isMobile var applePhone = /iPhone/i; var appleIpod = /iPod/i; var appleTablet = /iPad/i; var androidPhone = /\bAndroid(?:.+)Mobile\b/i; // Match 'Android' AND 'Mobile' var androidTablet = /Android/i; var amazonPhone = /\bAndroid(?:.+)SD4930UR\b/i; var amazonTablet = /\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i; var windowsPhone = /Windows Phone/i; var windowsTablet = /\bWindows(?:.+)ARM\b/i; // Match 'Windows' AND 'ARM' var otherBlackberry = /BlackBerry/i; var otherBlackberry10 = /BB10/i; var otherOpera = /Opera Mini/i; var otherChrome = /\b(CriOS|Chrome)(?:.+)Mobile/i; var otherFirefox = /Mobile(?:.+)Firefox\b/i; // Match 'Mobile' AND 'Firefox' function match(regex, userAgent) { return regex.test(userAgent); } function isMobile(userAgent) { var ua = userAgent || (typeof navigator !== 'undefined' ? navigator.userAgent : ''); // Facebook mobile app's integrated browser adds a bunch of strings that // match everything. Strip it out if it exists. var tmp = (ua || '').split('[FBAN'); if (typeof tmp[1] !== 'undefined') { var _tmp = tmp; var _tmp2 = Object(slicedToArray["a" /* default */])(_tmp, 1); ua = _tmp2[0]; } // Twitter mobile app's integrated browser on iPad adds a "Twitter for // iPhone" string. Same probably happens on other tablet platforms. // This will confuse detection so strip it out if it exists. tmp = ua.split('Twitter'); if (typeof tmp[1] !== 'undefined') { var _tmp3 = tmp; var _tmp4 = Object(slicedToArray["a" /* default */])(_tmp3, 1); ua = _tmp4[0]; } var result = { apple: { phone: match(applePhone, ua) && !match(windowsPhone, ua), ipod: match(appleIpod, ua), tablet: !match(applePhone, ua) && match(appleTablet, ua) && !match(windowsPhone, ua), device: (match(applePhone, ua) || match(appleIpod, ua) || match(appleTablet, ua)) && !match(windowsPhone, ua) }, amazon: { phone: match(amazonPhone, ua), tablet: !match(amazonPhone, ua) && match(amazonTablet, ua), device: match(amazonPhone, ua) || match(amazonTablet, ua) }, android: { phone: !match(windowsPhone, ua) && match(amazonPhone, ua) || !match(windowsPhone, ua) && match(androidPhone, ua), tablet: !match(windowsPhone, ua) && !match(amazonPhone, ua) && !match(androidPhone, ua) && (match(amazonTablet, ua) || match(androidTablet, ua)), device: !match(windowsPhone, ua) && (match(amazonPhone, ua) || match(amazonTablet, ua) || match(androidPhone, ua) || match(androidTablet, ua)) || match(/\bokhttp\b/i, ua) }, windows: { phone: match(windowsPhone, ua), tablet: match(windowsTablet, ua), device: match(windowsPhone, ua) || match(windowsTablet, ua) }, other: { blackberry: match(otherBlackberry, ua), blackberry10: match(otherBlackberry10, ua), opera: match(otherOpera, ua), firefox: match(otherFirefox, ua), chrome: match(otherChrome, ua), device: match(otherBlackberry, ua) || match(otherBlackberry10, ua) || match(otherOpera, ua) || match(otherFirefox, ua) || match(otherChrome, ua) }, // Additional any: null, phone: null, tablet: null }; result.any = result.apple.device || result.android.device || result.windows.device || result.other.device; // excludes 'other' devices and ipods, targeting touchscreen phones result.phone = result.apple.phone || result.android.phone || result.windows.phone; result.tablet = result.apple.tablet || result.android.tablet || result.windows.tablet; return result; } var defaultResult = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, isMobile()), {}, { isMobile: isMobile }); /* harmony default export */ var utils_isMobile = (defaultResult); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-menu/es/util.js function noop() {} function getKeyFromChildrenIndex(child, menuEventKey, index) { var prefix = menuEventKey || ''; return child.key || "".concat(prefix, "item_").concat(index); } function getMenuIdFromSubMenuEventKey(eventKey) { return "".concat(eventKey, "-menu-"); } function loopMenuItem(children, cb) { var index = -1; external_window_React_["Children"].forEach(children, function (c) { index += 1; if (c && c.type && c.type.isMenuItemGroup) { external_window_React_["Children"].forEach(c.props.children, function (c2) { index += 1; cb(c2, index); }); } else { cb(c, index); } }); } function loopMenuItemRecursively(children, keys, ret) { /* istanbul ignore if */ if (!children || ret.find) { return; } external_window_React_["Children"].forEach(children, function (c) { if (c) { var construct = c.type; if (!construct || !(construct.isSubMenu || construct.isMenuItem || construct.isMenuItemGroup)) { return; } if (keys.indexOf(c.key) !== -1) { // eslint-disable-next-line no-param-reassign ret.find = true; } else if (c.props.children) { loopMenuItemRecursively(c.props.children, keys, ret); } } }); } var menuAllProps = ['defaultSelectedKeys', 'selectedKeys', 'defaultOpenKeys', 'openKeys', 'mode', 'getPopupContainer', 'onSelect', 'onDeselect', 'onDestroy', 'openTransitionName', 'openAnimation', 'subMenuOpenDelay', 'subMenuCloseDelay', 'forceSubMenuRender', 'triggerSubMenuAction', 'level', 'selectable', 'multiple', 'onOpenChange', 'visible', 'focusable', 'defaultActiveFirst', 'prefixCls', 'inlineIndent', 'parentMenu', 'title', 'rootPrefixCls', 'eventKey', 'active', 'onItemHover', 'onTitleMouseEnter', 'onTitleMouseLeave', 'onTitleClick', 'popupAlign', 'popupOffset', 'isOpen', 'renderMenuItem', 'manualRef', 'subMenuKey', 'disabled', 'index', 'isSelected', 'store', 'activeKey', 'builtinPlacements', 'overflowedIndicator', 'motion', // the following keys found need to be removed from test regression 'attribute', 'value', 'popupClassName', 'inlineCollapsed', 'menu', 'theme', 'itemIcon', 'expandIcon']; // ref: https://github.com/ant-design/ant-design/issues/14007 // ref: https://bugs.chromium.org/p/chromium/issues/detail?id=360889 // getBoundingClientRect return the full precision value, which is // not the same behavior as on chrome. Set the precision to 6 to // unify their behavior var getWidth = function getWidth(elem) { var includeMargin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var width = elem && typeof elem.getBoundingClientRect === 'function' && elem.getBoundingClientRect().width; if (width) { if (includeMargin) { var _getComputedStyle = getComputedStyle(elem), marginLeft = _getComputedStyle.marginLeft, marginRight = _getComputedStyle.marginRight; width += +marginLeft.replace('px', '') + +marginRight.replace('px', ''); } width = +width.toFixed(6); } return width || 0; }; var util_setStyle = function setStyle(elem, styleProperty, value) { if (elem && Object(esm_typeof["a" /* default */])(elem.style) === 'object') { // eslint-disable-next-line no-param-reassign elem.style[styleProperty] = value; } }; var util_isMobileDevice = function isMobileDevice() { return utils_isMobile.any; }; // EXTERNAL MODULE: ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js var ResizeObserver_es = __webpack_require__("bdgK"); // EXTERNAL MODULE: external "window.ReactDOM" var external_window_ReactDOM_ = __webpack_require__("faye"); var external_window_ReactDOM_default = /*#__PURE__*/__webpack_require__.n(external_window_ReactDOM_); // EXTERNAL MODULE: ./node_modules/rc-util/es/raf.js var es_raf = __webpack_require__("wgJM"); // EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/contains.js var contains = __webpack_require__("l4aY"); // EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/findDOMNode.js var findDOMNode = __webpack_require__("m+aA"); // EXTERNAL MODULE: ./node_modules/rc-util/es/ref.js var es_ref = __webpack_require__("c+Xe"); // EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/addEventListener.js var addEventListener = __webpack_require__("zT1h"); // EXTERNAL MODULE: ./node_modules/rc-util/es/Portal.js var Portal = __webpack_require__("QC+M"); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-trigger/es/utils/alignUtil.js function isPointsEq(a1, a2, isAlignPoint) { if (isAlignPoint) { return a1[0] === a2[0]; } return a1[0] === a2[0] && a1[1] === a2[1]; } function getAlignFromPlacement(builtinPlacements, placementStr, align) { var baseAlign = builtinPlacements[placementStr] || {}; return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, baseAlign), align); } function getAlignPopupClassName(builtinPlacements, prefixCls, align, isAlignPoint) { var points = align.points; var placements = Object.keys(builtinPlacements); for (var i = 0; i < placements.length; i += 1) { var placement = placements[i]; if (isPointsEq(builtinPlacements[placement].points, points, isAlignPoint)) { return "".concat(prefixCls, "-placement-").concat(placement); } } return ''; } // CONCATENATED MODULE: ./node_modules/rc-util/es/isMobile.js /* harmony default export */ var es_isMobile = (function () { if (typeof navigator === 'undefined' || typeof window === 'undefined') { return false; } var agent = navigator.userAgent || navigator.vendor || window.opera; if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(agent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(agent === null || agent === void 0 ? void 0 : agent.substr(0, 4))) { return true; } return false; }); // EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/canUseDom.js var canUseDom = __webpack_require__("MNnm"); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-motion/es/util/motion.js // ================= Transition ================= // Event wrapper. Copy from react source code function makePrefixMap(styleProp, eventName) { var prefixes = {}; prefixes[styleProp.toLowerCase()] = eventName.toLowerCase(); prefixes["Webkit".concat(styleProp)] = "webkit".concat(eventName); prefixes["Moz".concat(styleProp)] = "moz".concat(eventName); prefixes["ms".concat(styleProp)] = "MS".concat(eventName); prefixes["O".concat(styleProp)] = "o".concat(eventName.toLowerCase()); return prefixes; } function getVendorPrefixes(domSupport, win) { var prefixes = { animationend: makePrefixMap('Animation', 'AnimationEnd'), transitionend: makePrefixMap('Transition', 'TransitionEnd') }; if (domSupport) { if (!('AnimationEvent' in win)) { delete prefixes.animationend.animation; } if (!('TransitionEvent' in win)) { delete prefixes.transitionend.transition; } } return prefixes; } var vendorPrefixes = getVendorPrefixes(Object(canUseDom["a" /* default */])(), typeof window !== 'undefined' ? window : {}); var motion_style = {}; if (Object(canUseDom["a" /* default */])()) { var _document$createEleme = document.createElement('div'); motion_style = _document$createEleme.style; } var prefixedEventNames = {}; function getVendorPrefixedEventName(eventName) { if (prefixedEventNames[eventName]) { return prefixedEventNames[eventName]; } var prefixMap = vendorPrefixes[eventName]; if (prefixMap) { var stylePropList = Object.keys(prefixMap); var len = stylePropList.length; for (var i = 0; i < len; i += 1) { var styleProp = stylePropList[i]; if (Object.prototype.hasOwnProperty.call(prefixMap, styleProp) && styleProp in motion_style) { prefixedEventNames[eventName] = prefixMap[styleProp]; return prefixedEventNames[eventName]; } } } return ''; } var internalAnimationEndName = getVendorPrefixedEventName('animationend'); var internalTransitionEndName = getVendorPrefixedEventName('transitionend'); var supportTransition = !!(internalAnimationEndName && internalTransitionEndName); var animationEndName = internalAnimationEndName || 'animationend'; var transitionEndName = internalTransitionEndName || 'transitionend'; function getTransitionName(transitionName, transitionType) { if (!transitionName) return null; if (Object(esm_typeof["a" /* default */])(transitionName) === 'object') { var type = transitionType.replace(/-\w/g, function (match) { return match[1].toUpperCase(); }); return transitionName[type]; } return "".concat(transitionName, "-").concat(transitionType); } // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-motion/es/interface.js var STATUS_NONE = 'none'; var STATUS_APPEAR = 'appear'; var STATUS_ENTER = 'enter'; var STATUS_LEAVE = 'leave'; var STEP_NONE = 'none'; var STEP_PREPARE = 'prepare'; var STEP_START = 'start'; var STEP_ACTIVE = 'active'; var STEP_ACTIVATED = 'end'; // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-motion/es/hooks/useState.js function useMountStatus(defaultValue) { var destroyRef = Object(external_window_React_["useRef"])(false); var _useState = Object(external_window_React_["useState"])(defaultValue), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), val = _useState2[0], setVal = _useState2[1]; function setValue(next) { if (!destroyRef.current) { setVal(next); } } Object(external_window_React_["useEffect"])(function () { return function () { destroyRef.current = true; }; }, []); return [val, setValue]; } // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-motion/es/hooks/useIsomorphicLayoutEffect.js // It's safe to use `useLayoutEffect` but the warning is annoying var useIsomorphicLayoutEffect = Object(canUseDom["a" /* default */])() ? external_window_React_["useLayoutEffect"] : external_window_React_["useEffect"]; /* harmony default export */ var hooks_useIsomorphicLayoutEffect = (useIsomorphicLayoutEffect); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-motion/es/hooks/useNextFrame.js /* harmony default export */ var useNextFrame = (function () { var nextFrameRef = external_window_React_["useRef"](null); function cancelNextFrame() { es_raf["a" /* default */].cancel(nextFrameRef.current); } function nextFrame(callback) { var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2; cancelNextFrame(); var nextFrameId = Object(es_raf["a" /* default */])(function () { if (delay <= 1) { callback({ isCanceled: function isCanceled() { return nextFrameId !== nextFrameRef.current; } }); } else { nextFrame(callback, delay - 1); } }); nextFrameRef.current = nextFrameId; } external_window_React_["useEffect"](function () { return function () { cancelNextFrame(); }; }, []); return [nextFrame, cancelNextFrame]; }); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-motion/es/hooks/useStepQueue.js var STEP_QUEUE = [STEP_PREPARE, STEP_START, STEP_ACTIVE, STEP_ACTIVATED]; /** Skip current step */ var SkipStep = false; /** Current step should be update in */ var DoStep = true; function useStepQueue_isActive(step) { return step === STEP_ACTIVE || step === STEP_ACTIVATED; } /* harmony default export */ var useStepQueue = (function (status, callback) { var _React$useState = external_window_React_["useState"](STEP_NONE), _React$useState2 = Object(slicedToArray["a" /* default */])(_React$useState, 2), step = _React$useState2[0], setStep = _React$useState2[1]; var _useNextFrame = useNextFrame(), _useNextFrame2 = Object(slicedToArray["a" /* default */])(_useNextFrame, 2), nextFrame = _useNextFrame2[0], cancelNextFrame = _useNextFrame2[1]; function startQueue() { setStep(STEP_PREPARE); } hooks_useIsomorphicLayoutEffect(function () { if (step !== STEP_NONE && step !== STEP_ACTIVATED) { var index = STEP_QUEUE.indexOf(step); var nextStep = STEP_QUEUE[index + 1]; var result = callback(step); if (result === SkipStep) { // Skip when no needed setStep(nextStep); } else { // Do as frame for step update nextFrame(function (info) { function doNext() { // Skip since current queue is ood if (info.isCanceled()) return; setStep(nextStep); } if (result === true) { doNext(); } else { // Only promise should be async Promise.resolve(result).then(doNext); } }); } } }, [status, step]); external_window_React_["useEffect"](function () { return function () { cancelNextFrame(); }; }, []); return [startQueue, step]; }); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-motion/es/hooks/useDomMotionEvents.js /* harmony default export */ var useDomMotionEvents = (function (callback) { var cacheElementRef = Object(external_window_React_["useRef"])(); // Cache callback var callbackRef = Object(external_window_React_["useRef"])(callback); callbackRef.current = callback; // Internal motion event handler var onInternalMotionEnd = external_window_React_["useCallback"](function (event) { callbackRef.current(event); }, []); // Remove events function removeMotionEvents(element) { if (element) { element.removeEventListener(transitionEndName, onInternalMotionEnd); element.removeEventListener(animationEndName, onInternalMotionEnd); } } // Patch events function patchMotionEvents(element) { if (cacheElementRef.current && cacheElementRef.current !== element) { removeMotionEvents(cacheElementRef.current); } if (element && element !== cacheElementRef.current) { element.addEventListener(transitionEndName, onInternalMotionEnd); element.addEventListener(animationEndName, onInternalMotionEnd); // Save as cache in case dom removed trigger by `motionDeadline` cacheElementRef.current = element; } } // Clean up when removed external_window_React_["useEffect"](function () { return function () { removeMotionEvents(cacheElementRef.current); }; }, []); return [patchMotionEvents, removeMotionEvents]; }); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-motion/es/hooks/useStatus.js function useStatus(supportMotion, visible, getElement, _ref) { var _ref$motionEnter = _ref.motionEnter, motionEnter = _ref$motionEnter === void 0 ? true : _ref$motionEnter, _ref$motionAppear = _ref.motionAppear, motionAppear = _ref$motionAppear === void 0 ? true : _ref$motionAppear, _ref$motionLeave = _ref.motionLeave, motionLeave = _ref$motionLeave === void 0 ? true : _ref$motionLeave, motionDeadline = _ref.motionDeadline, motionLeaveImmediately = _ref.motionLeaveImmediately, onAppearPrepare = _ref.onAppearPrepare, onEnterPrepare = _ref.onEnterPrepare, onLeavePrepare = _ref.onLeavePrepare, onAppearStart = _ref.onAppearStart, onEnterStart = _ref.onEnterStart, onLeaveStart = _ref.onLeaveStart, onAppearActive = _ref.onAppearActive, onEnterActive = _ref.onEnterActive, onLeaveActive = _ref.onLeaveActive, onAppearEnd = _ref.onAppearEnd, onEnterEnd = _ref.onEnterEnd, onLeaveEnd = _ref.onLeaveEnd, onVisibleChanged = _ref.onVisibleChanged; // Used for outer render usage to avoid `visible: false & status: none` to render nothing var _useState = useMountStatus(), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), asyncVisible = _useState2[0], setAsyncVisible = _useState2[1]; var _useState3 = useMountStatus(STATUS_NONE), _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2), status = _useState4[0], setStatus = _useState4[1]; var _useState5 = useMountStatus(null), _useState6 = Object(slicedToArray["a" /* default */])(_useState5, 2), style = _useState6[0], setStyle = _useState6[1]; var mountedRef = Object(external_window_React_["useRef"])(false); var deadlineRef = Object(external_window_React_["useRef"])(null); var destroyedRef = Object(external_window_React_["useRef"])(false); // =========================== Dom Node =========================== var cacheElementRef = Object(external_window_React_["useRef"])(null); function getDomElement() { var element = getElement(); return element || cacheElementRef.current; } // ========================== Motion End ========================== var activeRef = Object(external_window_React_["useRef"])(false); function onInternalMotionEnd(event) { var element = getDomElement(); if (event && !event.deadline && event.target !== element) { // event exists // not initiated by deadline // transitionEnd not fired by inner elements return; } var canEnd; if (status === STATUS_APPEAR && activeRef.current) { canEnd = onAppearEnd === null || onAppearEnd === void 0 ? void 0 : onAppearEnd(element, event); } else if (status === STATUS_ENTER && activeRef.current) { canEnd = onEnterEnd === null || onEnterEnd === void 0 ? void 0 : onEnterEnd(element, event); } else if (status === STATUS_LEAVE && activeRef.current) { canEnd = onLeaveEnd === null || onLeaveEnd === void 0 ? void 0 : onLeaveEnd(element, event); } // Only update status when `canEnd` and not destroyed if (canEnd !== false && !destroyedRef.current) { setStatus(STATUS_NONE); setStyle(null); } } var _useDomMotionEvents = useDomMotionEvents(onInternalMotionEnd), _useDomMotionEvents2 = Object(slicedToArray["a" /* default */])(_useDomMotionEvents, 1), patchMotionEvents = _useDomMotionEvents2[0]; // ============================= Step ============================= var eventHandlers = external_window_React_["useMemo"](function () { var _ref2, _ref3, _ref4; switch (status) { case 'appear': return _ref2 = {}, Object(defineProperty["a" /* default */])(_ref2, STEP_PREPARE, onAppearPrepare), Object(defineProperty["a" /* default */])(_ref2, STEP_START, onAppearStart), Object(defineProperty["a" /* default */])(_ref2, STEP_ACTIVE, onAppearActive), _ref2; case 'enter': return _ref3 = {}, Object(defineProperty["a" /* default */])(_ref3, STEP_PREPARE, onEnterPrepare), Object(defineProperty["a" /* default */])(_ref3, STEP_START, onEnterStart), Object(defineProperty["a" /* default */])(_ref3, STEP_ACTIVE, onEnterActive), _ref3; case 'leave': return _ref4 = {}, Object(defineProperty["a" /* default */])(_ref4, STEP_PREPARE, onLeavePrepare), Object(defineProperty["a" /* default */])(_ref4, STEP_START, onLeaveStart), Object(defineProperty["a" /* default */])(_ref4, STEP_ACTIVE, onLeaveActive), _ref4; default: return {}; } }, [status]); var _useStepQueue = useStepQueue(status, function (newStep) { // Only prepare step can be skip if (newStep === STEP_PREPARE) { var onPrepare = eventHandlers[STEP_PREPARE]; if (!onPrepare) { return SkipStep; } return onPrepare(getDomElement()); } // Rest step is sync update // Rest step is sync update if (step in eventHandlers) { var _eventHandlers$step; setStyle(((_eventHandlers$step = eventHandlers[step]) === null || _eventHandlers$step === void 0 ? void 0 : _eventHandlers$step.call(eventHandlers, getDomElement(), null)) || null); } if (step === STEP_ACTIVE) { // Patch events when motion needed patchMotionEvents(getDomElement()); if (motionDeadline > 0) { clearTimeout(deadlineRef.current); deadlineRef.current = setTimeout(function () { onInternalMotionEnd({ deadline: true }); }, motionDeadline); } } return DoStep; }), _useStepQueue2 = Object(slicedToArray["a" /* default */])(_useStepQueue, 2), startStep = _useStepQueue2[0], step = _useStepQueue2[1]; var active = useStepQueue_isActive(step); activeRef.current = active; // ============================ Status ============================ // Update with new status hooks_useIsomorphicLayoutEffect(function () { setAsyncVisible(visible); var isMounted = mountedRef.current; mountedRef.current = true; if (!supportMotion) { return; } var nextStatus; // Appear if (!isMounted && visible && motionAppear) { nextStatus = STATUS_APPEAR; } // Enter if (isMounted && visible && motionEnter) { nextStatus = STATUS_ENTER; } // Leave if (isMounted && !visible && motionLeave || !isMounted && motionLeaveImmediately && !visible && motionLeave) { nextStatus = STATUS_LEAVE; } // Update to next status if (nextStatus) { setStatus(nextStatus); startStep(); } }, [visible]); // ============================ Effect ============================ // Reset when motion changed Object(external_window_React_["useEffect"])(function () { if ( // Cancel appear status === STATUS_APPEAR && !motionAppear || // Cancel enter status === STATUS_ENTER && !motionEnter || // Cancel leave status === STATUS_LEAVE && !motionLeave) { setStatus(STATUS_NONE); } }, [motionAppear, motionEnter, motionLeave]); Object(external_window_React_["useEffect"])(function () { return function () { clearTimeout(deadlineRef.current); destroyedRef.current = true; }; }, []); // Trigger `onVisibleChanged` Object(external_window_React_["useEffect"])(function () { if (asyncVisible !== undefined && status === STATUS_NONE) { onVisibleChanged === null || onVisibleChanged === void 0 ? void 0 : onVisibleChanged(asyncVisible); } }, [asyncVisible, status]); // ============================ Styles ============================ var mergedStyle = style; if (eventHandlers[STEP_PREPARE] && step === STEP_START) { mergedStyle = Object(objectSpread2["a" /* default */])({ transition: 'none' }, mergedStyle); } return [status, step, mergedStyle, asyncVisible !== null && asyncVisible !== void 0 ? asyncVisible : visible]; } // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-motion/es/DomWrapper.js var DomWrapper_DomWrapper = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(DomWrapper, _React$Component); var _super = Object(createSuper["a" /* default */])(DomWrapper); function DomWrapper() { Object(classCallCheck["a" /* default */])(this, DomWrapper); return _super.apply(this, arguments); } Object(createClass["a" /* default */])(DomWrapper, [{ key: "render", value: function render() { return this.props.children; } }]); return DomWrapper; }(external_window_React_["Component"]); /* harmony default export */ var es_DomWrapper = (DomWrapper_DomWrapper); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-motion/es/CSSMotion.js /* eslint-disable react/default-props-match-prop-types, react/no-multi-comp, react/prop-types */ /** * `transitionSupport` is used for none transition test case. * Default we use browser transition event support check. */ function genCSSMotion(config) { var transitionSupport = config; if (Object(esm_typeof["a" /* default */])(config) === 'object') { transitionSupport = config.transitionSupport; } function isSupportTransition(props) { return !!(props.motionName && transitionSupport); } var CSSMotion = /*#__PURE__*/external_window_React_["forwardRef"](function (props, ref) { var _props$visible = props.visible, visible = _props$visible === void 0 ? true : _props$visible, _props$removeOnLeave = props.removeOnLeave, removeOnLeave = _props$removeOnLeave === void 0 ? true : _props$removeOnLeave, forceRender = props.forceRender, children = props.children, motionName = props.motionName, leavedClassName = props.leavedClassName, eventProps = props.eventProps; var supportMotion = isSupportTransition(props); // Ref to the react node, it may be a HTMLElement var nodeRef = Object(external_window_React_["useRef"])(); // Ref to the dom wrapper in case ref can not pass to HTMLElement var wrapperNodeRef = Object(external_window_React_["useRef"])(); function getDomElement() { try { return Object(findDOMNode["a" /* default */])(nodeRef.current || wrapperNodeRef.current); } catch (e) { // Only happen when `motionDeadline` trigger but element removed. return null; } } var _useStatus = useStatus(supportMotion, visible, getDomElement, props), _useStatus2 = Object(slicedToArray["a" /* default */])(_useStatus, 4), status = _useStatus2[0], statusStep = _useStatus2[1], statusStyle = _useStatus2[2], mergedVisible = _useStatus2[3]; // Record whether content has rended // Will return null for un-rendered even when `removeOnLeave={false}` var renderedRef = external_window_React_["useRef"](mergedVisible); if (mergedVisible) { renderedRef.current = true; } // ====================== Refs ====================== var originRef = Object(external_window_React_["useRef"])(ref); originRef.current = ref; var setNodeRef = external_window_React_["useCallback"](function (node) { nodeRef.current = node; Object(es_ref["b" /* fillRef */])(originRef.current, node); }, []); // ===================== Render ===================== var motionChildren; var mergedProps = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, eventProps), {}, { visible: visible }); if (!children) { // No children motionChildren = null; } else if (status === STATUS_NONE || !isSupportTransition(props)) { // Stable children if (mergedVisible) { motionChildren = children(Object(objectSpread2["a" /* default */])({}, mergedProps), setNodeRef); } else if (!removeOnLeave && renderedRef.current) { motionChildren = children(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, mergedProps), {}, { className: leavedClassName }), setNodeRef); } else if (forceRender) { motionChildren = children(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, mergedProps), {}, { style: { display: 'none' } }), setNodeRef); } else { motionChildren = null; } } else { var _classNames; // In motion var statusSuffix; if (statusStep === STEP_PREPARE) { statusSuffix = 'prepare'; } else if (useStepQueue_isActive(statusStep)) { statusSuffix = 'active'; } else if (statusStep === STEP_START) { statusSuffix = 'start'; } motionChildren = children(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, mergedProps), {}, { className: classnames_default()(getTransitionName(motionName, status), (_classNames = {}, Object(defineProperty["a" /* default */])(_classNames, getTransitionName(motionName, "".concat(status, "-").concat(statusSuffix)), statusSuffix), Object(defineProperty["a" /* default */])(_classNames, motionName, typeof motionName === 'string'), _classNames)), style: statusStyle }), setNodeRef); } return /*#__PURE__*/external_window_React_["createElement"](es_DomWrapper, { ref: wrapperNodeRef }, motionChildren); }); CSSMotion.displayName = 'CSSMotion'; return CSSMotion; } /* harmony default export */ var es_CSSMotion = (genCSSMotion(supportTransition)); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-motion/es/util/diff.js var STATUS_ADD = 'add'; var STATUS_KEEP = 'keep'; var STATUS_REMOVE = 'remove'; var STATUS_REMOVED = 'removed'; function wrapKeyToObject(key) { var keyObj; if (key && Object(esm_typeof["a" /* default */])(key) === 'object' && 'key' in key) { keyObj = key; } else { keyObj = { key: key }; } return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, keyObj), {}, { key: String(keyObj.key) }); } function parseKeys() { var keys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; return keys.map(wrapKeyToObject); } function diffKeys() { var prevKeys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var currentKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; var list = []; var currentIndex = 0; var currentLen = currentKeys.length; var prevKeyObjects = parseKeys(prevKeys); var currentKeyObjects = parseKeys(currentKeys); // Check prev keys to insert or keep prevKeyObjects.forEach(function (keyObj) { var hit = false; for (var i = currentIndex; i < currentLen; i += 1) { var currentKeyObj = currentKeyObjects[i]; if (currentKeyObj.key === keyObj.key) { // New added keys should add before current key if (currentIndex < i) { list = list.concat(currentKeyObjects.slice(currentIndex, i).map(function (obj) { return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, obj), {}, { status: STATUS_ADD }); })); currentIndex = i; } list.push(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, currentKeyObj), {}, { status: STATUS_KEEP })); currentIndex += 1; hit = true; break; } } // If not hit, it means key is removed if (!hit) { list.push(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, keyObj), {}, { status: STATUS_REMOVE })); } }); // Add rest to the list if (currentIndex < currentLen) { list = list.concat(currentKeyObjects.slice(currentIndex).map(function (obj) { return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, obj), {}, { status: STATUS_ADD }); })); } /** * Merge same key when it remove and add again: * [1 - add, 2 - keep, 1 - remove] -> [1 - keep, 2 - keep] */ var keys = {}; list.forEach(function (_ref) { var key = _ref.key; keys[key] = (keys[key] || 0) + 1; }); var duplicatedKeys = Object.keys(keys).filter(function (key) { return keys[key] > 1; }); duplicatedKeys.forEach(function (matchKey) { // Remove `STATUS_REMOVE` node. list = list.filter(function (_ref2) { var key = _ref2.key, status = _ref2.status; return key !== matchKey || status !== STATUS_REMOVE; }); // Update `STATUS_ADD` to `STATUS_KEEP` list.forEach(function (node) { if (node.key === matchKey) { // eslint-disable-next-line no-param-reassign node.status = STATUS_KEEP; } }); }); return list; } // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-motion/es/CSSMotionList.js /* eslint react/prop-types: 0 */ var MOTION_PROP_NAMES = ['eventProps', 'visible', 'children', 'motionName', 'motionAppear', 'motionEnter', 'motionLeave', 'motionLeaveImmediately', 'motionDeadline', 'removeOnLeave', 'leavedClassName', 'onAppearStart', 'onAppearActive', 'onAppearEnd', 'onEnterStart', 'onEnterActive', 'onEnterEnd', 'onLeaveStart', 'onLeaveActive', 'onLeaveEnd']; /** * Generate a CSSMotionList component with config * @param transitionSupport No need since CSSMotionList no longer depends on transition support * @param CSSMotion CSSMotion component */ function genCSSMotionList(transitionSupport) { var CSSMotion = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : es_CSSMotion; var CSSMotionList = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(CSSMotionList, _React$Component); var _super = Object(createSuper["a" /* default */])(CSSMotionList); function CSSMotionList() { var _this; Object(classCallCheck["a" /* default */])(this, CSSMotionList); _this = _super.apply(this, arguments); _this.state = { keyEntities: [] }; _this.removeKey = function (removeKey) { _this.setState(function (_ref) { var keyEntities = _ref.keyEntities; return { keyEntities: keyEntities.map(function (entity) { if (entity.key !== removeKey) return entity; return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, entity), {}, { status: STATUS_REMOVED }); }) }; }); }; return _this; } Object(createClass["a" /* default */])(CSSMotionList, [{ key: "render", value: function render() { var _this2 = this; var keyEntities = this.state.keyEntities; var _this$props = this.props, component = _this$props.component, children = _this$props.children, _onVisibleChanged = _this$props.onVisibleChanged, restProps = Object(objectWithoutProperties["a" /* default */])(_this$props, ["component", "children", "onVisibleChanged"]); var Component = component || external_window_React_["Fragment"]; var motionProps = {}; MOTION_PROP_NAMES.forEach(function (prop) { motionProps[prop] = restProps[prop]; delete restProps[prop]; }); delete restProps.keys; return /*#__PURE__*/external_window_React_["createElement"](Component, restProps, keyEntities.map(function (_ref2) { var status = _ref2.status, eventProps = Object(objectWithoutProperties["a" /* default */])(_ref2, ["status"]); var visible = status === STATUS_ADD || status === STATUS_KEEP; return /*#__PURE__*/external_window_React_["createElement"](CSSMotion, Object(esm_extends["a" /* default */])({}, motionProps, { key: eventProps.key, visible: visible, eventProps: eventProps, onVisibleChanged: function onVisibleChanged(changedVisible) { _onVisibleChanged === null || _onVisibleChanged === void 0 ? void 0 : _onVisibleChanged(changedVisible, { key: eventProps.key }); if (!changedVisible) { _this2.removeKey(eventProps.key); } } }), children); })); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(_ref3, _ref4) { var keys = _ref3.keys; var keyEntities = _ref4.keyEntities; var parsedKeyObjects = parseKeys(keys); var mixedKeyEntities = diffKeys(keyEntities, parsedKeyObjects); return { keyEntities: mixedKeyEntities.filter(function (entity) { var prevEntity = keyEntities.find(function (_ref5) { var key = _ref5.key; return entity.key === key; }); // Remove if already mark as removed if (prevEntity && prevEntity.status === STATUS_REMOVED && entity.status === STATUS_REMOVE) { return false; } return true; }) }; } }]); return CSSMotionList; }(external_window_React_["Component"]); CSSMotionList.defaultProps = { component: 'div' }; return CSSMotionList; } /* harmony default export */ var es_CSSMotionList = (genCSSMotionList(supportTransition)); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-motion/es/index.js /* harmony default export */ var rc_motion_es = (es_CSSMotion); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-trigger/es/utils/legacyUtil.js function getMotion(_ref) { var prefixCls = _ref.prefixCls, motion = _ref.motion, animation = _ref.animation, transitionName = _ref.transitionName; if (motion) { return motion; } if (animation) { return { motionName: "".concat(prefixCls, "-").concat(animation) }; } if (transitionName) { return { motionName: transitionName }; } return null; } // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-trigger/es/Popup/Mask.js function Mask(props) { var prefixCls = props.prefixCls, visible = props.visible, zIndex = props.zIndex, mask = props.mask, maskMotion = props.maskMotion, maskAnimation = props.maskAnimation, maskTransitionName = props.maskTransitionName; if (!mask) { return null; } var motion = {}; if (maskMotion || maskTransitionName || maskAnimation) { motion = Object(objectSpread2["a" /* default */])({ motionAppear: true }, getMotion({ motion: maskMotion, prefixCls: prefixCls, transitionName: maskTransitionName, animation: maskAnimation })); } return /*#__PURE__*/external_window_React_["createElement"](rc_motion_es, Object(esm_extends["a" /* default */])({}, motion, { visible: visible, removeOnLeave: true }), function (_ref) { var className = _ref.className; return /*#__PURE__*/external_window_React_["createElement"]("div", { style: { zIndex: zIndex }, className: classnames_default()("".concat(prefixCls, "-mask"), className) }); }); } // EXTERNAL MODULE: ./node_modules/rc-align/es/index.js + 5 modules var rc_align_es = __webpack_require__("9mu1"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/regenerator/index.js var regenerator = __webpack_require__("o0o1"); var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js var asyncToGenerator = __webpack_require__("HaE+"); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-trigger/es/Popup/useVisibleStatus.js var StatusQueue = ['measure', 'align', null, 'motion']; /* harmony default export */ var useVisibleStatus = (function (visible, doMeasure) { var _useState = Object(external_window_React_["useState"])(null), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), status = _useState2[0], setInternalStatus = _useState2[1]; var rafRef = Object(external_window_React_["useRef"])(); var destroyRef = Object(external_window_React_["useRef"])(false); function setStatus(nextStatus) { if (!destroyRef.current) { setInternalStatus(nextStatus); } } function cancelRaf() { es_raf["a" /* default */].cancel(rafRef.current); } function goNextStatus(callback) { cancelRaf(); rafRef.current = Object(es_raf["a" /* default */])(function () { // Only align should be manually trigger setStatus(function (prev) { switch (status) { case 'align': return 'motion'; case 'motion': return 'stable'; default: } return prev; }); callback === null || callback === void 0 ? void 0 : callback(); }); } // Init status Object(external_window_React_["useEffect"])(function () { setStatus('measure'); }, [visible]); // Go next status Object(external_window_React_["useEffect"])(function () { switch (status) { case 'measure': doMeasure(); break; default: } if (status) { rafRef.current = Object(es_raf["a" /* default */])( /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee() { var index, nextStatus; return regenerator_default.a.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: index = StatusQueue.indexOf(status); nextStatus = StatusQueue[index + 1]; if (nextStatus && index !== -1) { setStatus(nextStatus); } case 3: case "end": return _context.stop(); } } }, _callee); }))); } }, [status]); Object(external_window_React_["useEffect"])(function () { return function () { destroyRef.current = true; cancelRaf(); }; }, []); return [status, goNextStatus]; }); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-trigger/es/Popup/useStretchStyle.js /* harmony default export */ var useStretchStyle = (function (stretch) { var _React$useState = external_window_React_["useState"]({ width: 0, height: 0 }), _React$useState2 = Object(slicedToArray["a" /* default */])(_React$useState, 2), targetSize = _React$useState2[0], setTargetSize = _React$useState2[1]; function measureStretch(element) { setTargetSize({ width: element.offsetWidth, height: element.offsetHeight }); } // Merge stretch style var style = external_window_React_["useMemo"](function () { var sizeStyle = {}; if (stretch) { var width = targetSize.width, height = targetSize.height; // Stretch with target if (stretch.indexOf('height') !== -1 && height) { sizeStyle.height = height; } else if (stretch.indexOf('minHeight') !== -1 && height) { sizeStyle.minHeight = height; } if (stretch.indexOf('width') !== -1 && width) { sizeStyle.width = width; } else if (stretch.indexOf('minWidth') !== -1 && width) { sizeStyle.minWidth = width; } } return sizeStyle; }, [stretch, targetSize]); return [style, measureStretch]; }); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-trigger/es/Popup/PopupInner.js var PopupInner = /*#__PURE__*/external_window_React_["forwardRef"](function (props, ref) { var visible = props.visible, prefixCls = props.prefixCls, className = props.className, style = props.style, children = props.children, zIndex = props.zIndex, stretch = props.stretch, destroyPopupOnHide = props.destroyPopupOnHide, forceRender = props.forceRender, align = props.align, point = props.point, getRootDomNode = props.getRootDomNode, getClassNameFromAlign = props.getClassNameFromAlign, onAlign = props.onAlign, onMouseEnter = props.onMouseEnter, onMouseLeave = props.onMouseLeave, onMouseDown = props.onMouseDown, onTouchStart = props.onTouchStart; var alignRef = Object(external_window_React_["useRef"])(); var elementRef = Object(external_window_React_["useRef"])(); var _useState = Object(external_window_React_["useState"])(), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), alignedClassName = _useState2[0], setAlignedClassName = _useState2[1]; // ======================= Measure ======================== var _useStretchStyle = useStretchStyle(stretch), _useStretchStyle2 = Object(slicedToArray["a" /* default */])(_useStretchStyle, 2), stretchStyle = _useStretchStyle2[0], measureStretchStyle = _useStretchStyle2[1]; function doMeasure() { if (stretch) { measureStretchStyle(getRootDomNode()); } } // ======================== Status ======================== var _useVisibleStatus = useVisibleStatus(visible, doMeasure), _useVisibleStatus2 = Object(slicedToArray["a" /* default */])(_useVisibleStatus, 2), status = _useVisibleStatus2[0], goNextStatus = _useVisibleStatus2[1]; // ======================== Aligns ======================== var prepareResolveRef = Object(external_window_React_["useRef"])(); // `target` on `rc-align` can accept as a function to get the bind element or a point. // ref: https://www.npmjs.com/package/rc-align function getAlignTarget() { if (point) { return point; } return getRootDomNode; } function forceAlign() { var _alignRef$current; (_alignRef$current = alignRef.current) === null || _alignRef$current === void 0 ? void 0 : _alignRef$current.forceAlign(); } function onInternalAlign(popupDomNode, matchAlign) { var nextAlignedClassName = getClassNameFromAlign(matchAlign); if (alignedClassName !== nextAlignedClassName) { setAlignedClassName(nextAlignedClassName); } if (status === 'align') { // Repeat until not more align needed if (alignedClassName !== nextAlignedClassName) { Promise.resolve().then(function () { forceAlign(); }); } else { goNextStatus(function () { var _prepareResolveRef$cu; (_prepareResolveRef$cu = prepareResolveRef.current) === null || _prepareResolveRef$cu === void 0 ? void 0 : _prepareResolveRef$cu.call(prepareResolveRef); }); } onAlign === null || onAlign === void 0 ? void 0 : onAlign(popupDomNode, matchAlign); } } // ======================== Motion ======================== var motion = Object(objectSpread2["a" /* default */])({}, getMotion(props)); ['onAppearEnd', 'onEnterEnd', 'onLeaveEnd'].forEach(function (eventName) { var originHandler = motion[eventName]; motion[eventName] = function (element, event) { goNextStatus(); return originHandler === null || originHandler === void 0 ? void 0 : originHandler(element, event); }; }); function onShowPrepare() { return new Promise(function (resolve) { prepareResolveRef.current = resolve; }); } // Go to stable directly when motion not provided external_window_React_["useEffect"](function () { if (!motion.motionName && status === 'motion') { goNextStatus(); } }, [motion.motionName, status]); // ========================= Refs ========================= external_window_React_["useImperativeHandle"](ref, function () { return { forceAlign: forceAlign, getElement: function getElement() { return elementRef.current; } }; }); // ======================== Render ======================== var mergedStyle = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, stretchStyle), {}, { zIndex: zIndex, opacity: status === 'motion' || status === 'stable' || !visible ? undefined : 0, pointerEvents: status === 'stable' ? undefined : 'none' }, style); // Align status var alignDisabled = true; if ((align === null || align === void 0 ? void 0 : align.points) && (status === 'align' || status === 'stable')) { alignDisabled = false; } var childNode = children; // Wrapper when multiple children if (external_window_React_["Children"].count(children) > 1) { childNode = /*#__PURE__*/external_window_React_["createElement"]("div", { className: "".concat(prefixCls, "-content") }, children); } return /*#__PURE__*/external_window_React_["createElement"](rc_motion_es, Object(esm_extends["a" /* default */])({ visible: visible, ref: elementRef, leavedClassName: "".concat(prefixCls, "-hidden") }, motion, { onAppearPrepare: onShowPrepare, onEnterPrepare: onShowPrepare, removeOnLeave: destroyPopupOnHide, forceRender: forceRender }), function (_ref, motionRef) { var motionClassName = _ref.className, motionStyle = _ref.style; var mergedClassName = classnames_default()(prefixCls, className, alignedClassName, motionClassName); return /*#__PURE__*/external_window_React_["createElement"](rc_align_es["a" /* default */], { target: getAlignTarget(), key: "popup", ref: alignRef, monitorWindowResize: true, disabled: alignDisabled, align: align, onAlign: onInternalAlign }, /*#__PURE__*/external_window_React_["createElement"]("div", { ref: motionRef, className: mergedClassName, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onMouseDownCapture: onMouseDown, onTouchStartCapture: onTouchStart, style: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, motionStyle), mergedStyle) }, childNode)); }); }); PopupInner.displayName = 'PopupInner'; /* harmony default export */ var Popup_PopupInner = (PopupInner); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-trigger/es/Popup/MobilePopupInner.js var MobilePopupInner = /*#__PURE__*/external_window_React_["forwardRef"](function (props, ref) { var prefixCls = props.prefixCls, visible = props.visible, zIndex = props.zIndex, children = props.children, _props$mobile = props.mobile; _props$mobile = _props$mobile === void 0 ? {} : _props$mobile; var popupClassName = _props$mobile.popupClassName, popupStyle = _props$mobile.popupStyle, _props$mobile$popupMo = _props$mobile.popupMotion, popupMotion = _props$mobile$popupMo === void 0 ? {} : _props$mobile$popupMo, popupRender = _props$mobile.popupRender; var elementRef = external_window_React_["useRef"](); // ========================= Refs ========================= external_window_React_["useImperativeHandle"](ref, function () { return { forceAlign: function forceAlign() {}, getElement: function getElement() { return elementRef.current; } }; }); // ======================== Render ======================== var mergedStyle = Object(objectSpread2["a" /* default */])({ zIndex: zIndex }, popupStyle); var childNode = children; // Wrapper when multiple children if (external_window_React_["Children"].count(children) > 1) { childNode = /*#__PURE__*/external_window_React_["createElement"]("div", { className: "".concat(prefixCls, "-content") }, children); } // Mobile support additional render if (popupRender) { childNode = popupRender(childNode); } return /*#__PURE__*/external_window_React_["createElement"](rc_motion_es, Object(esm_extends["a" /* default */])({ visible: visible, ref: elementRef, removeOnLeave: true }, popupMotion), function (_ref, motionRef) { var motionClassName = _ref.className, motionStyle = _ref.style; var mergedClassName = classnames_default()(prefixCls, popupClassName, motionClassName); return /*#__PURE__*/external_window_React_["createElement"]("div", { ref: motionRef, className: mergedClassName, style: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, motionStyle), mergedStyle) }, childNode); }); }); MobilePopupInner.displayName = 'MobilePopupInner'; /* harmony default export */ var Popup_MobilePopupInner = (MobilePopupInner); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-trigger/es/Popup/index.js var _excluded = ["visible", "mobile"]; var Popup = /*#__PURE__*/external_window_React_["forwardRef"](function (_ref, ref) { var visible = _ref.visible, mobile = _ref.mobile, props = Object(objectWithoutProperties["a" /* default */])(_ref, _excluded); var _useState = Object(external_window_React_["useState"])(visible), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), innerVisible = _useState2[0], serInnerVisible = _useState2[1]; var _useState3 = Object(external_window_React_["useState"])(false), _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2), inMobile = _useState4[0], setInMobile = _useState4[1]; var cloneProps = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, props), {}, { visible: innerVisible }); // We check mobile in visible changed here. // And this also delay set `innerVisible` to avoid popup component render flash Object(external_window_React_["useEffect"])(function () { serInnerVisible(visible); if (visible && mobile) { setInMobile(es_isMobile()); } }, [visible, mobile]); var popupNode = inMobile ? /*#__PURE__*/external_window_React_["createElement"](Popup_MobilePopupInner, Object(esm_extends["a" /* default */])({}, cloneProps, { mobile: mobile, ref: ref })) : /*#__PURE__*/external_window_React_["createElement"](Popup_PopupInner, Object(esm_extends["a" /* default */])({}, cloneProps, { ref: ref })); // We can use fragment directly but this may failed some selector usage. Keep as origin logic return /*#__PURE__*/external_window_React_["createElement"]("div", null, /*#__PURE__*/external_window_React_["createElement"](Mask, cloneProps), popupNode); }); Popup.displayName = 'Popup'; /* harmony default export */ var es_Popup = (Popup); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-trigger/es/context.js var TriggerContext = /*#__PURE__*/external_window_React_["createContext"](null); /* harmony default export */ var context = (TriggerContext); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-trigger/es/index.js function es_noop() {} function returnEmptyString() { return ''; } function returnDocument(element) { if (element) { return element.ownerDocument; } return window.document; } var ALL_HANDLERS = ['onClick', 'onMouseDown', 'onTouchStart', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur', 'onContextMenu']; /** * Internal usage. Do not use in your code since this will be removed. */ function generateTrigger(PortalComponent) { var Trigger = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(Trigger, _React$Component); var _super = Object(createSuper["a" /* default */])(Trigger); function Trigger(props) { var _this; Object(classCallCheck["a" /* default */])(this, Trigger); _this = _super.call(this, props); _this.popupRef = /*#__PURE__*/external_window_React_["createRef"](); _this.triggerRef = /*#__PURE__*/external_window_React_["createRef"](); _this.attachId = void 0; _this.clickOutsideHandler = void 0; _this.touchOutsideHandler = void 0; _this.contextMenuOutsideHandler1 = void 0; _this.contextMenuOutsideHandler2 = void 0; _this.mouseDownTimeout = void 0; _this.focusTime = void 0; _this.preClickTime = void 0; _this.preTouchTime = void 0; _this.delayTimer = void 0; _this.hasPopupMouseDown = void 0; _this.onMouseEnter = function (e) { var mouseEnterDelay = _this.props.mouseEnterDelay; _this.fireEvents('onMouseEnter', e); _this.delaySetPopupVisible(true, mouseEnterDelay, mouseEnterDelay ? null : e); }; _this.onMouseMove = function (e) { _this.fireEvents('onMouseMove', e); _this.setPoint(e); }; _this.onMouseLeave = function (e) { _this.fireEvents('onMouseLeave', e); _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay); }; _this.onPopupMouseEnter = function () { _this.clearDelayTimer(); }; _this.onPopupMouseLeave = function (e) { var _this$popupRef$curren; // https://github.com/react-component/trigger/pull/13 // react bug? if (e.relatedTarget && !e.relatedTarget.setTimeout && Object(contains["a" /* default */])((_this$popupRef$curren = _this.popupRef.current) === null || _this$popupRef$curren === void 0 ? void 0 : _this$popupRef$curren.getElement(), e.relatedTarget)) { return; } _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay); }; _this.onFocus = function (e) { _this.fireEvents('onFocus', e); // incase focusin and focusout _this.clearDelayTimer(); if (_this.isFocusToShow()) { _this.focusTime = Date.now(); _this.delaySetPopupVisible(true, _this.props.focusDelay); } }; _this.onMouseDown = function (e) { _this.fireEvents('onMouseDown', e); _this.preClickTime = Date.now(); }; _this.onTouchStart = function (e) { _this.fireEvents('onTouchStart', e); _this.preTouchTime = Date.now(); }; _this.onBlur = function (e) { _this.fireEvents('onBlur', e); _this.clearDelayTimer(); if (_this.isBlurToHide()) { _this.delaySetPopupVisible(false, _this.props.blurDelay); } }; _this.onContextMenu = function (e) { e.preventDefault(); _this.fireEvents('onContextMenu', e); _this.setPopupVisible(true, e); }; _this.onContextMenuClose = function () { if (_this.isContextMenuToShow()) { _this.close(); } }; _this.onClick = function (event) { _this.fireEvents('onClick', event); // focus will trigger click if (_this.focusTime) { var preTime; if (_this.preClickTime && _this.preTouchTime) { preTime = Math.min(_this.preClickTime, _this.preTouchTime); } else if (_this.preClickTime) { preTime = _this.preClickTime; } else if (_this.preTouchTime) { preTime = _this.preTouchTime; } if (Math.abs(preTime - _this.focusTime) < 20) { return; } _this.focusTime = 0; } _this.preClickTime = 0; _this.preTouchTime = 0; // Only prevent default when all the action is click. // https://github.com/ant-design/ant-design/issues/17043 // https://github.com/ant-design/ant-design/issues/17291 if (_this.isClickToShow() && (_this.isClickToHide() || _this.isBlurToHide()) && event && event.preventDefault) { event.preventDefault(); } var nextVisible = !_this.state.popupVisible; if (_this.isClickToHide() && !nextVisible || nextVisible && _this.isClickToShow()) { _this.setPopupVisible(!_this.state.popupVisible, event); } }; _this.onPopupMouseDown = function () { _this.hasPopupMouseDown = true; clearTimeout(_this.mouseDownTimeout); _this.mouseDownTimeout = window.setTimeout(function () { _this.hasPopupMouseDown = false; }, 0); if (_this.context) { var _this$context; (_this$context = _this.context).onPopupMouseDown.apply(_this$context, arguments); } }; _this.onDocumentClick = function (event) { if (_this.props.mask && !_this.props.maskClosable) { return; } var target = event.target; var root = _this.getRootDomNode(); var popupNode = _this.getPopupDomNode(); if ( // mousedown on the target should also close popup when action is contextMenu. // https://github.com/ant-design/ant-design/issues/29853 (!Object(contains["a" /* default */])(root, target) || _this.isContextMenuOnly()) && !Object(contains["a" /* default */])(popupNode, target) && !_this.hasPopupMouseDown) { _this.close(); } }; _this.getRootDomNode = function () { var getTriggerDOMNode = _this.props.getTriggerDOMNode; if (getTriggerDOMNode) { return getTriggerDOMNode(_this.triggerRef.current); } try { var domNode = Object(findDOMNode["a" /* default */])(_this.triggerRef.current); if (domNode) { return domNode; } } catch (err) {// Do nothing } return external_window_ReactDOM_default.a.findDOMNode(Object(assertThisInitialized["a" /* default */])(_this)); }; _this.getPopupClassNameFromAlign = function (align) { var className = []; var _this$props = _this.props, popupPlacement = _this$props.popupPlacement, builtinPlacements = _this$props.builtinPlacements, prefixCls = _this$props.prefixCls, alignPoint = _this$props.alignPoint, getPopupClassNameFromAlign = _this$props.getPopupClassNameFromAlign; if (popupPlacement && builtinPlacements) { className.push(getAlignPopupClassName(builtinPlacements, prefixCls, align, alignPoint)); } if (getPopupClassNameFromAlign) { className.push(getPopupClassNameFromAlign(align)); } return className.join(' '); }; _this.getComponent = function () { var _this$props2 = _this.props, prefixCls = _this$props2.prefixCls, destroyPopupOnHide = _this$props2.destroyPopupOnHide, popupClassName = _this$props2.popupClassName, onPopupAlign = _this$props2.onPopupAlign, popupMotion = _this$props2.popupMotion, popupAnimation = _this$props2.popupAnimation, popupTransitionName = _this$props2.popupTransitionName, popupStyle = _this$props2.popupStyle, mask = _this$props2.mask, maskAnimation = _this$props2.maskAnimation, maskTransitionName = _this$props2.maskTransitionName, maskMotion = _this$props2.maskMotion, zIndex = _this$props2.zIndex, popup = _this$props2.popup, stretch = _this$props2.stretch, alignPoint = _this$props2.alignPoint, mobile = _this$props2.mobile, forceRender = _this$props2.forceRender; var _this$state = _this.state, popupVisible = _this$state.popupVisible, point = _this$state.point; var align = _this.getPopupAlign(); var mouseProps = {}; if (_this.isMouseEnterToShow()) { mouseProps.onMouseEnter = _this.onPopupMouseEnter; } if (_this.isMouseLeaveToHide()) { mouseProps.onMouseLeave = _this.onPopupMouseLeave; } mouseProps.onMouseDown = _this.onPopupMouseDown; mouseProps.onTouchStart = _this.onPopupMouseDown; return /*#__PURE__*/external_window_React_["createElement"](es_Popup, Object(esm_extends["a" /* default */])({ prefixCls: prefixCls, destroyPopupOnHide: destroyPopupOnHide, visible: popupVisible, point: alignPoint && point, className: popupClassName, align: align, onAlign: onPopupAlign, animation: popupAnimation, getClassNameFromAlign: _this.getPopupClassNameFromAlign }, mouseProps, { stretch: stretch, getRootDomNode: _this.getRootDomNode, style: popupStyle, mask: mask, zIndex: zIndex, transitionName: popupTransitionName, maskAnimation: maskAnimation, maskTransitionName: maskTransitionName, maskMotion: maskMotion, ref: _this.popupRef, motion: popupMotion, mobile: mobile, forceRender: forceRender }), typeof popup === 'function' ? popup() : popup); }; _this.attachParent = function (popupContainer) { es_raf["a" /* default */].cancel(_this.attachId); var _this$props3 = _this.props, getPopupContainer = _this$props3.getPopupContainer, getDocument = _this$props3.getDocument; var domNode = _this.getRootDomNode(); var mountNode; if (!getPopupContainer) { mountNode = getDocument(_this.getRootDomNode()).body; } else if (domNode || getPopupContainer.length === 0) { // Compatible for legacy getPopupContainer with domNode argument. // If no need `domNode` argument, will call directly. // https://codesandbox.io/s/eloquent-mclean-ss93m?file=/src/App.js mountNode = getPopupContainer(domNode); } if (mountNode) { mountNode.appendChild(popupContainer); } else { // Retry after frame render in case parent not ready _this.attachId = Object(es_raf["a" /* default */])(function () { _this.attachParent(popupContainer); }); } }; _this.getContainer = function () { var getDocument = _this.props.getDocument; var popupContainer = getDocument(_this.getRootDomNode()).createElement('div'); // Make sure default popup container will never cause scrollbar appearing // https://github.com/react-component/trigger/issues/41 popupContainer.style.position = 'absolute'; popupContainer.style.top = '0'; popupContainer.style.left = '0'; popupContainer.style.width = '100%'; _this.attachParent(popupContainer); return popupContainer; }; _this.setPoint = function (point) { var alignPoint = _this.props.alignPoint; if (!alignPoint || !point) return; _this.setState({ point: { pageX: point.pageX, pageY: point.pageY } }); }; _this.handlePortalUpdate = function () { if (_this.state.prevPopupVisible !== _this.state.popupVisible) { _this.props.afterPopupVisibleChange(_this.state.popupVisible); } }; _this.triggerContextValue = { onPopupMouseDown: _this.onPopupMouseDown }; var _popupVisible; if ('popupVisible' in props) { _popupVisible = !!props.popupVisible; } else { _popupVisible = !!props.defaultPopupVisible; } _this.state = { prevPopupVisible: _popupVisible, popupVisible: _popupVisible }; ALL_HANDLERS.forEach(function (h) { _this["fire".concat(h)] = function (e) { _this.fireEvents(h, e); }; }); return _this; } Object(createClass["a" /* default */])(Trigger, [{ key: "componentDidMount", value: function componentDidMount() { this.componentDidUpdate(); } }, { key: "componentDidUpdate", value: function componentDidUpdate() { var props = this.props; var state = this.state; // We must listen to `mousedown` or `touchstart`, edge case: // https://github.com/ant-design/ant-design/issues/5804 // https://github.com/react-component/calendar/issues/250 // https://github.com/react-component/trigger/issues/50 if (state.popupVisible) { var currentDocument; if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextMenuToShow())) { currentDocument = props.getDocument(this.getRootDomNode()); this.clickOutsideHandler = Object(addEventListener["a" /* default */])(currentDocument, 'mousedown', this.onDocumentClick); } // always hide on mobile if (!this.touchOutsideHandler) { currentDocument = currentDocument || props.getDocument(this.getRootDomNode()); this.touchOutsideHandler = Object(addEventListener["a" /* default */])(currentDocument, 'touchstart', this.onDocumentClick); } // close popup when trigger type contains 'onContextMenu' and document is scrolling. if (!this.contextMenuOutsideHandler1 && this.isContextMenuToShow()) { currentDocument = currentDocument || props.getDocument(this.getRootDomNode()); this.contextMenuOutsideHandler1 = Object(addEventListener["a" /* default */])(currentDocument, 'scroll', this.onContextMenuClose); } // close popup when trigger type contains 'onContextMenu' and window is blur. if (!this.contextMenuOutsideHandler2 && this.isContextMenuToShow()) { this.contextMenuOutsideHandler2 = Object(addEventListener["a" /* default */])(window, 'blur', this.onContextMenuClose); } return; } this.clearOutsideHandler(); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.clearDelayTimer(); this.clearOutsideHandler(); clearTimeout(this.mouseDownTimeout); es_raf["a" /* default */].cancel(this.attachId); } }, { key: "getPopupDomNode", value: function getPopupDomNode() { var _this$popupRef$curren2; // for test return ((_this$popupRef$curren2 = this.popupRef.current) === null || _this$popupRef$curren2 === void 0 ? void 0 : _this$popupRef$curren2.getElement()) || null; } }, { key: "getPopupAlign", value: function getPopupAlign() { var props = this.props; var popupPlacement = props.popupPlacement, popupAlign = props.popupAlign, builtinPlacements = props.builtinPlacements; if (popupPlacement && builtinPlacements) { return getAlignFromPlacement(builtinPlacements, popupPlacement, popupAlign); } return popupAlign; } }, { key: "setPopupVisible", value: /** * @param popupVisible Show or not the popup element * @param event SyntheticEvent, used for `pointAlign` */ function setPopupVisible(popupVisible, event) { var alignPoint = this.props.alignPoint; var prevPopupVisible = this.state.popupVisible; this.clearDelayTimer(); if (prevPopupVisible !== popupVisible) { if (!('popupVisible' in this.props)) { this.setState({ popupVisible: popupVisible, prevPopupVisible: prevPopupVisible }); } this.props.onPopupVisibleChange(popupVisible); } // Always record the point position since mouseEnterDelay will delay the show if (alignPoint && event && popupVisible) { this.setPoint(event); } } }, { key: "delaySetPopupVisible", value: function delaySetPopupVisible(visible, delayS, event) { var _this2 = this; var delay = delayS * 1000; this.clearDelayTimer(); if (delay) { var point = event ? { pageX: event.pageX, pageY: event.pageY } : null; this.delayTimer = window.setTimeout(function () { _this2.setPopupVisible(visible, point); _this2.clearDelayTimer(); }, delay); } else { this.setPopupVisible(visible, event); } } }, { key: "clearDelayTimer", value: function clearDelayTimer() { if (this.delayTimer) { clearTimeout(this.delayTimer); this.delayTimer = null; } } }, { key: "clearOutsideHandler", value: function clearOutsideHandler() { if (this.clickOutsideHandler) { this.clickOutsideHandler.remove(); this.clickOutsideHandler = null; } if (this.contextMenuOutsideHandler1) { this.contextMenuOutsideHandler1.remove(); this.contextMenuOutsideHandler1 = null; } if (this.contextMenuOutsideHandler2) { this.contextMenuOutsideHandler2.remove(); this.contextMenuOutsideHandler2 = null; } if (this.touchOutsideHandler) { this.touchOutsideHandler.remove(); this.touchOutsideHandler = null; } } }, { key: "createTwoChains", value: function createTwoChains(event) { var childPros = this.props.children.props; var props = this.props; if (childPros[event] && props[event]) { return this["fire".concat(event)]; } return childPros[event] || props[event]; } }, { key: "isClickToShow", value: function isClickToShow() { var _this$props4 = this.props, action = _this$props4.action, showAction = _this$props4.showAction; return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1; } }, { key: "isContextMenuOnly", value: function isContextMenuOnly() { var action = this.props.action; return action === 'contextMenu' || action.length === 1 && action[0] === 'contextMenu'; } }, { key: "isContextMenuToShow", value: function isContextMenuToShow() { var _this$props5 = this.props, action = _this$props5.action, showAction = _this$props5.showAction; return action.indexOf('contextMenu') !== -1 || showAction.indexOf('contextMenu') !== -1; } }, { key: "isClickToHide", value: function isClickToHide() { var _this$props6 = this.props, action = _this$props6.action, hideAction = _this$props6.hideAction; return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1; } }, { key: "isMouseEnterToShow", value: function isMouseEnterToShow() { var _this$props7 = this.props, action = _this$props7.action, showAction = _this$props7.showAction; return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1; } }, { key: "isMouseLeaveToHide", value: function isMouseLeaveToHide() { var _this$props8 = this.props, action = _this$props8.action, hideAction = _this$props8.hideAction; return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1; } }, { key: "isFocusToShow", value: function isFocusToShow() { var _this$props9 = this.props, action = _this$props9.action, showAction = _this$props9.showAction; return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1; } }, { key: "isBlurToHide", value: function isBlurToHide() { var _this$props10 = this.props, action = _this$props10.action, hideAction = _this$props10.hideAction; return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1; } }, { key: "forcePopupAlign", value: function forcePopupAlign() { if (this.state.popupVisible) { var _this$popupRef$curren3; (_this$popupRef$curren3 = this.popupRef.current) === null || _this$popupRef$curren3 === void 0 ? void 0 : _this$popupRef$curren3.forceAlign(); } } }, { key: "fireEvents", value: function fireEvents(type, e) { var childCallback = this.props.children.props[type]; if (childCallback) { childCallback(e); } var callback = this.props[type]; if (callback) { callback(e); } } }, { key: "close", value: function close() { this.setPopupVisible(false); } }, { key: "render", value: function render() { var popupVisible = this.state.popupVisible; var _this$props11 = this.props, children = _this$props11.children, forceRender = _this$props11.forceRender, alignPoint = _this$props11.alignPoint, className = _this$props11.className, autoDestroy = _this$props11.autoDestroy; var child = external_window_React_["Children"].only(children); var newChildProps = { key: 'trigger' }; // ============================== Visible Handlers ============================== // >>> ContextMenu if (this.isContextMenuToShow()) { newChildProps.onContextMenu = this.onContextMenu; } else { newChildProps.onContextMenu = this.createTwoChains('onContextMenu'); } // >>> Click if (this.isClickToHide() || this.isClickToShow()) { newChildProps.onClick = this.onClick; newChildProps.onMouseDown = this.onMouseDown; newChildProps.onTouchStart = this.onTouchStart; } else { newChildProps.onClick = this.createTwoChains('onClick'); newChildProps.onMouseDown = this.createTwoChains('onMouseDown'); newChildProps.onTouchStart = this.createTwoChains('onTouchStart'); } // >>> Hover(enter) if (this.isMouseEnterToShow()) { newChildProps.onMouseEnter = this.onMouseEnter; // Point align if (alignPoint) { newChildProps.onMouseMove = this.onMouseMove; } } else { newChildProps.onMouseEnter = this.createTwoChains('onMouseEnter'); } // >>> Hover(leave) if (this.isMouseLeaveToHide()) { newChildProps.onMouseLeave = this.onMouseLeave; } else { newChildProps.onMouseLeave = this.createTwoChains('onMouseLeave'); } // >>> Focus if (this.isFocusToShow() || this.isBlurToHide()) { newChildProps.onFocus = this.onFocus; newChildProps.onBlur = this.onBlur; } else { newChildProps.onFocus = this.createTwoChains('onFocus'); newChildProps.onBlur = this.createTwoChains('onBlur'); } // =================================== Render =================================== var childrenClassName = classnames_default()(child && child.props && child.props.className, className); if (childrenClassName) { newChildProps.className = childrenClassName; } var cloneProps = Object(objectSpread2["a" /* default */])({}, newChildProps); if (Object(es_ref["c" /* supportRef */])(child)) { cloneProps.ref = Object(es_ref["a" /* composeRef */])(this.triggerRef, child.ref); } var trigger = /*#__PURE__*/external_window_React_["cloneElement"](child, cloneProps); var portal; // prevent unmounting after it's rendered if (popupVisible || this.popupRef.current || forceRender) { portal = /*#__PURE__*/external_window_React_["createElement"](PortalComponent, { key: "portal", getContainer: this.getContainer, didUpdate: this.handlePortalUpdate }, this.getComponent()); } if (!popupVisible && autoDestroy) { portal = null; } return /*#__PURE__*/external_window_React_["createElement"](context.Provider, { value: this.triggerContextValue }, trigger, portal); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(_ref, prevState) { var popupVisible = _ref.popupVisible; var newState = {}; if (popupVisible !== undefined && prevState.popupVisible !== popupVisible) { newState.popupVisible = popupVisible; newState.prevPopupVisible = prevState.popupVisible; } return newState; } }]); return Trigger; }(external_window_React_["Component"]); Trigger.contextType = context; Trigger.defaultProps = { prefixCls: 'rc-trigger-popup', getPopupClassNameFromAlign: returnEmptyString, getDocument: returnDocument, onPopupVisibleChange: es_noop, afterPopupVisibleChange: es_noop, onPopupAlign: es_noop, popupClassName: '', mouseEnterDelay: 0, mouseLeaveDelay: 0.1, focusDelay: 0, blurDelay: 0.15, popupStyle: {}, destroyPopupOnHide: false, popupAlign: {}, defaultPopupVisible: false, mask: false, maskClosable: true, action: [], showAction: [], hideAction: [], autoDestroy: false }; return Trigger; } /* harmony default export */ var rc_trigger_es = (generateTrigger(Portal["a" /* default */])); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-menu/es/placements.js var autoAdjustOverflow = { adjustX: 1, adjustY: 1 }; var placements = { topLeft: { points: ['bl', 'tl'], overflow: autoAdjustOverflow, offset: [0, -7] }, bottomLeft: { points: ['tl', 'bl'], overflow: autoAdjustOverflow, offset: [0, 7] }, leftTop: { points: ['tr', 'tl'], overflow: autoAdjustOverflow, offset: [-4, 0] }, rightTop: { points: ['tl', 'tr'], overflow: autoAdjustOverflow, offset: [4, 0] } }; var placementsRtl = { topLeft: { points: ['bl', 'tl'], overflow: autoAdjustOverflow, offset: [0, -7] }, bottomLeft: { points: ['tl', 'bl'], overflow: autoAdjustOverflow, offset: [0, 7] }, rightTop: { points: ['tr', 'tl'], overflow: autoAdjustOverflow, offset: [-4, 0] }, leftTop: { points: ['tl', 'tr'], overflow: autoAdjustOverflow, offset: [4, 0] } }; /* harmony default export */ var es_placements = (placements); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-menu/es/SubMenu.js var guid = 0; var popupPlacementMap = { horizontal: 'bottomLeft', vertical: 'rightTop', 'vertical-left': 'rightTop', 'vertical-right': 'leftTop' }; var SubMenu_updateDefaultActiveFirst = function updateDefaultActiveFirst(store, eventKey, defaultActiveFirst) { var menuId = getMenuIdFromSubMenuEventKey(eventKey); var state = store.getState(); store.setState({ defaultActiveFirst: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state.defaultActiveFirst), {}, Object(defineProperty["a" /* default */])({}, menuId, defaultActiveFirst)) }); }; var SubMenu_SubMenu = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(SubMenu, _React$Component); var _super = Object(createSuper["a" /* default */])(SubMenu); function SubMenu(props) { var _this; Object(classCallCheck["a" /* default */])(this, SubMenu); _this = _super.call(this, props); _this.onDestroy = function (key) { _this.props.onDestroy(key); }; /** * note: * This legacy code that `onKeyDown` is called by parent instead of dom self. * which need return code to check if this event is handled */ _this.onKeyDown = function (e) { var keyCode = e.keyCode; var menu = _this.menuInstance; var store = _this.props.store; var visible = _this.getVisible(); if (keyCode === KeyCode["a" /* default */].ENTER) { _this.onTitleClick(e); SubMenu_updateDefaultActiveFirst(store, _this.props.eventKey, true); return true; } if (keyCode === KeyCode["a" /* default */].RIGHT) { if (visible) { menu.onKeyDown(e); } else { _this.triggerOpenChange(true); // need to update current menu's defaultActiveFirst value SubMenu_updateDefaultActiveFirst(store, _this.props.eventKey, true); } return true; } if (keyCode === KeyCode["a" /* default */].LEFT) { var handled; if (visible) { handled = menu.onKeyDown(e); } else { return undefined; } if (!handled) { _this.triggerOpenChange(false); handled = true; } return handled; } if (visible && (keyCode === KeyCode["a" /* default */].UP || keyCode === KeyCode["a" /* default */].DOWN)) { return menu.onKeyDown(e); } return undefined; }; _this.onOpenChange = function (e) { _this.props.onOpenChange(e); }; _this.onPopupVisibleChange = function (visible) { _this.triggerOpenChange(visible, visible ? 'mouseenter' : 'mouseleave'); }; _this.onMouseEnter = function (e) { var _this$props = _this.props, key = _this$props.eventKey, onMouseEnter = _this$props.onMouseEnter, store = _this$props.store; SubMenu_updateDefaultActiveFirst(store, _this.props.eventKey, false); onMouseEnter({ key: key, domEvent: e }); }; _this.onMouseLeave = function (e) { var _this$props2 = _this.props, parentMenu = _this$props2.parentMenu, eventKey = _this$props2.eventKey, onMouseLeave = _this$props2.onMouseLeave; parentMenu.subMenuInstance = Object(assertThisInitialized["a" /* default */])(_this); onMouseLeave({ key: eventKey, domEvent: e }); }; _this.onTitleMouseEnter = function (domEvent) { var _this$props3 = _this.props, key = _this$props3.eventKey, onItemHover = _this$props3.onItemHover, onTitleMouseEnter = _this$props3.onTitleMouseEnter; onItemHover({ key: key, hover: true }); onTitleMouseEnter({ key: key, domEvent: domEvent }); }; _this.onTitleMouseLeave = function (e) { var _this$props4 = _this.props, parentMenu = _this$props4.parentMenu, eventKey = _this$props4.eventKey, onItemHover = _this$props4.onItemHover, onTitleMouseLeave = _this$props4.onTitleMouseLeave; parentMenu.subMenuInstance = Object(assertThisInitialized["a" /* default */])(_this); onItemHover({ key: eventKey, hover: false }); onTitleMouseLeave({ key: eventKey, domEvent: e }); }; _this.onTitleClick = function (e) { var _assertThisInitialize = Object(assertThisInitialized["a" /* default */])(_this), props = _assertThisInitialize.props; props.onTitleClick({ key: props.eventKey, domEvent: e }); if (props.triggerSubMenuAction === 'hover') { return; } _this.triggerOpenChange(!_this.getVisible(), 'click'); SubMenu_updateDefaultActiveFirst(props.store, _this.props.eventKey, false); }; _this.onSubMenuClick = function (info) { // in the case of overflowed submenu // onClick is not copied over if (typeof _this.props.onClick === 'function') { _this.props.onClick(_this.addKeyPath(info)); } }; _this.onSelect = function (info) { _this.props.onSelect(info); }; _this.onDeselect = function (info) { _this.props.onDeselect(info); }; _this.getPrefixCls = function () { return "".concat(_this.props.rootPrefixCls, "-submenu"); }; _this.getActiveClassName = function () { return "".concat(_this.getPrefixCls(), "-active"); }; _this.getDisabledClassName = function () { return "".concat(_this.getPrefixCls(), "-disabled"); }; _this.getSelectedClassName = function () { return "".concat(_this.getPrefixCls(), "-selected"); }; _this.getOpenClassName = function () { return "".concat(_this.props.rootPrefixCls, "-submenu-open"); }; _this.getVisible = function () { return _this.state.isOpen; }; _this.getMode = function () { return _this.state.mode; }; _this.saveMenuInstance = function (c) { // children menu instance _this.menuInstance = c; }; _this.addKeyPath = function (info) { return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, info), {}, { keyPath: (info.keyPath || []).concat(_this.props.eventKey) }); }; _this.triggerOpenChange = function (open, type) { var key = _this.props.eventKey; var openChange = function openChange() { _this.onOpenChange({ key: key, item: Object(assertThisInitialized["a" /* default */])(_this), trigger: type, open: open }); }; if (type === 'mouseenter') { // make sure mouseenter happen after other menu item's mouseleave _this.mouseenterTimeout = setTimeout(function () { openChange(); }, 0); } else { openChange(); } }; _this.isChildrenSelected = function () { var ret = { find: false }; loopMenuItemRecursively(_this.props.children, _this.props.selectedKeys, ret); return ret.find; }; _this.isInlineMode = function () { return _this.getMode() === 'inline'; }; _this.adjustWidth = function () { /* istanbul ignore if */ if (!_this.subMenuTitle || !_this.menuInstance) { return; } var popupMenu = external_window_ReactDOM_["findDOMNode"](_this.menuInstance); if (popupMenu.offsetWidth >= _this.subMenuTitle.offsetWidth) { return; } /* istanbul ignore next */ popupMenu.style.minWidth = "".concat(_this.subMenuTitle.offsetWidth, "px"); }; _this.saveSubMenuTitle = function (subMenuTitle) { _this.subMenuTitle = subMenuTitle; }; _this.getBaseProps = function () { var _assertThisInitialize2 = Object(assertThisInitialized["a" /* default */])(_this), props = _assertThisInitialize2.props; var mergedMode = _this.getMode(); return { mode: mergedMode === 'horizontal' ? 'vertical' : mergedMode, visible: _this.getVisible(), level: props.level + 1, inlineIndent: props.inlineIndent, focusable: false, onClick: _this.onSubMenuClick, onSelect: _this.onSelect, onDeselect: _this.onDeselect, onDestroy: _this.onDestroy, selectedKeys: props.selectedKeys, eventKey: "".concat(props.eventKey, "-menu-"), openKeys: props.openKeys, motion: props.motion, onOpenChange: _this.onOpenChange, subMenuOpenDelay: props.subMenuOpenDelay, parentMenu: Object(assertThisInitialized["a" /* default */])(_this), subMenuCloseDelay: props.subMenuCloseDelay, forceSubMenuRender: props.forceSubMenuRender, triggerSubMenuAction: props.triggerSubMenuAction, builtinPlacements: props.builtinPlacements, defaultActiveFirst: props.store.getState().defaultActiveFirst[getMenuIdFromSubMenuEventKey(props.eventKey)], multiple: props.multiple, prefixCls: props.rootPrefixCls, id: _this.internalMenuId, manualRef: _this.saveMenuInstance, itemIcon: props.itemIcon, expandIcon: props.expandIcon, direction: props.direction }; }; _this.getMotion = function (mode, visible) { var _assertThisInitialize3 = Object(assertThisInitialized["a" /* default */])(_this), haveRendered = _assertThisInitialize3.haveRendered; var _this$props5 = _this.props, motion = _this$props5.motion, rootPrefixCls = _this$props5.rootPrefixCls; // don't show transition on first rendering (no animation for opened menu) // show appear transition if it's not visible (not sure why) // show appear transition if it's not inline mode var mergedMotion = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, motion), {}, { leavedClassName: "".concat(rootPrefixCls, "-hidden"), removeOnLeave: false, motionAppear: haveRendered || !visible || mode !== 'inline' }); return mergedMotion; }; var store = props.store, eventKey = props.eventKey; var _store$getState = store.getState(), defaultActiveFirst = _store$getState.defaultActiveFirst; _this.isRootMenu = false; var value = false; if (defaultActiveFirst) { value = defaultActiveFirst[eventKey]; } SubMenu_updateDefaultActiveFirst(store, eventKey, value); _this.state = { mode: props.mode, isOpen: props.isOpen }; return _this; } Object(createClass["a" /* default */])(SubMenu, [{ key: "componentDidMount", value: function componentDidMount() { this.componentDidUpdate(); } }, { key: "componentDidUpdate", value: function componentDidUpdate() { var _this2 = this; var _this$props6 = this.props, mode = _this$props6.mode, parentMenu = _this$props6.parentMenu, manualRef = _this$props6.manualRef, isOpen = _this$props6.isOpen; var updateState = function updateState() { _this2.setState({ mode: mode, isOpen: isOpen }); }; // Delay sync when mode changed in case openKeys change not sync var isOpenChanged = isOpen !== this.state.isOpen; var isModeChanged = mode !== this.state.mode; if (isModeChanged || isOpenChanged) { es_raf["a" /* default */].cancel(this.updateStateRaf); if (isModeChanged) { this.updateStateRaf = Object(es_raf["a" /* default */])(updateState); } else { updateState(); } } // invoke customized ref to expose component to mixin if (manualRef) { manualRef(this); } if (mode !== 'horizontal' || !(parentMenu === null || parentMenu === void 0 ? void 0 : parentMenu.isRootMenu) || !isOpen) { return; } this.minWidthTimeout = setTimeout(function () { return _this2.adjustWidth(); }, 0); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { var _this$props7 = this.props, onDestroy = _this$props7.onDestroy, eventKey = _this$props7.eventKey; if (onDestroy) { onDestroy(eventKey); } /* istanbul ignore if */ if (this.minWidthTimeout) { clearTimeout(this.minWidthTimeout); } /* istanbul ignore if */ if (this.mouseenterTimeout) { clearTimeout(this.mouseenterTimeout); } es_raf["a" /* default */].cancel(this.updateStateRaf); } }, { key: "renderPopupMenu", value: function renderPopupMenu(className, style) { var baseProps = this.getBaseProps(); /** * zombiej: Why SubPopupMenu here? * Seems whatever popup or inline mode both will render SubPopupMenu. * It's controlled by Trigger for popup or not. */ return /*#__PURE__*/external_window_React_["createElement"](es_SubPopupMenu, Object(esm_extends["a" /* default */])({}, baseProps, { id: this.internalMenuId, className: className, style: style }), this.props.children); } }, { key: "renderChildren", value: function renderChildren() { var _this3 = this; var baseProps = this.getBaseProps(); var mode = baseProps.mode, visible = baseProps.visible, forceSubMenuRender = baseProps.forceSubMenuRender, direction = baseProps.direction; // [Legacy] getMotion must be called before `haveRendered` var mergedMotion = this.getMotion(mode, visible); this.haveRendered = true; this.haveOpened = this.haveOpened || visible || forceSubMenuRender; // never rendered not planning to, don't render if (!this.haveOpened) { return /*#__PURE__*/external_window_React_["createElement"]("div", null); } var sharedClassName = classnames_default()("".concat(baseProps.prefixCls, "-sub"), Object(defineProperty["a" /* default */])({}, "".concat(baseProps.prefixCls, "-rtl"), direction === 'rtl')); if (!this.isInlineMode()) { return this.renderPopupMenu(sharedClassName); } return /*#__PURE__*/external_window_React_["createElement"](rc_motion_es, Object(esm_extends["a" /* default */])({ visible: baseProps.visible, forceRender: forceSubMenuRender }, mergedMotion), function (_ref) { var className = _ref.className, style = _ref.style; var mergedClassName = classnames_default()(sharedClassName, className); return _this3.renderPopupMenu(mergedClassName, style); }); } }, { key: "render", value: function render() { var _classNames2, _props$parentMenu, _classNames3; var props = Object(objectSpread2["a" /* default */])({}, this.props); var visible = this.getVisible(); var prefixCls = this.getPrefixCls(); var inline = this.isInlineMode(); var mergedMode = this.getMode(); var className = classnames_default()(prefixCls, "".concat(prefixCls, "-").concat(mergedMode), (_classNames2 = {}, Object(defineProperty["a" /* default */])(_classNames2, props.className, !!props.className), Object(defineProperty["a" /* default */])(_classNames2, this.getOpenClassName(), visible), Object(defineProperty["a" /* default */])(_classNames2, this.getActiveClassName(), props.active || visible && !inline), Object(defineProperty["a" /* default */])(_classNames2, this.getDisabledClassName(), props.disabled), Object(defineProperty["a" /* default */])(_classNames2, this.getSelectedClassName(), this.isChildrenSelected()), _classNames2)); if (!this.internalMenuId) { if (props.eventKey) { this.internalMenuId = "".concat(props.eventKey, "$Menu"); } else { guid += 1; this.internalMenuId = "$__$".concat(guid, "$Menu"); } } var mouseEvents = {}; var titleClickEvents = {}; var titleMouseEvents = {}; if (!props.disabled) { mouseEvents = { onMouseLeave: this.onMouseLeave, onMouseEnter: this.onMouseEnter }; // only works in title, not outer li titleClickEvents = { onClick: this.onTitleClick }; titleMouseEvents = { onMouseEnter: this.onTitleMouseEnter, onMouseLeave: this.onTitleMouseLeave }; } var style = {}; var direction = props.direction; var isRTL = direction === 'rtl'; if (inline) { if (isRTL) { style.paddingRight = props.inlineIndent * props.level; } else { style.paddingLeft = props.inlineIndent * props.level; } } var ariaOwns = {}; // only set aria-owns when menu is open // otherwise it would be an invalid aria-owns value // since corresponding node cannot be found if (this.getVisible()) { ariaOwns = { 'aria-owns': this.internalMenuId }; } // expand custom icon should NOT be displayed in menu with horizontal mode. var icon = null; if (mergedMode !== 'horizontal') { icon = this.props.expandIcon; // ReactNode if (typeof this.props.expandIcon === 'function') { icon = /*#__PURE__*/external_window_React_["createElement"](this.props.expandIcon, Object(objectSpread2["a" /* default */])({}, this.props)); } } var title = /*#__PURE__*/external_window_React_["createElement"]("div", Object(esm_extends["a" /* default */])({ ref: this.saveSubMenuTitle, style: style, className: "".concat(prefixCls, "-title"), role: "button" }, titleMouseEvents, titleClickEvents, { "aria-expanded": visible }, ariaOwns, { "aria-haspopup": "true", title: typeof props.title === 'string' ? props.title : undefined }), props.title, icon || /*#__PURE__*/external_window_React_["createElement"]("i", { className: "".concat(prefixCls, "-arrow") })); var children = this.renderChildren(); var getPopupContainer = ((_props$parentMenu = props.parentMenu) === null || _props$parentMenu === void 0 ? void 0 : _props$parentMenu.isRootMenu) ? props.parentMenu.props.getPopupContainer : function (triggerNode) { return triggerNode.parentNode; }; var popupPlacement = popupPlacementMap[mergedMode]; var popupAlign = props.popupOffset ? { offset: props.popupOffset } : {}; var popupClassName = classnames_default()((_classNames3 = {}, Object(defineProperty["a" /* default */])(_classNames3, props.popupClassName, props.popupClassName && !inline), Object(defineProperty["a" /* default */])(_classNames3, "".concat(prefixCls, "-rtl"), isRTL), _classNames3)); var disabled = props.disabled, triggerSubMenuAction = props.triggerSubMenuAction, subMenuOpenDelay = props.subMenuOpenDelay, forceSubMenuRender = props.forceSubMenuRender, subMenuCloseDelay = props.subMenuCloseDelay, builtinPlacements = props.builtinPlacements; menuAllProps.forEach(function (key) { return delete props[key]; }); // Set onClick to null, to ignore propagated onClick event delete props.onClick; var placement = isRTL ? Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, placementsRtl), builtinPlacements) : Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, placements), builtinPlacements); delete props.direction; // [Legacy] It's a fast fix, // but we should check if we can refactor this to make code more easy to understand var baseProps = this.getBaseProps(); var mergedMotion = inline ? null : this.getMotion(baseProps.mode, baseProps.visible); return /*#__PURE__*/external_window_React_["createElement"]("li", Object(esm_extends["a" /* default */])({}, props, mouseEvents, { className: className, role: "menuitem" }), /*#__PURE__*/external_window_React_["createElement"](rc_trigger_es, { prefixCls: prefixCls, popupClassName: classnames_default()("".concat(prefixCls, "-popup"), popupClassName), getPopupContainer: getPopupContainer, builtinPlacements: placement, popupPlacement: popupPlacement, popupVisible: inline ? false : visible, popupAlign: popupAlign, popup: inline ? null : children, action: disabled || inline ? [] : [triggerSubMenuAction], mouseEnterDelay: subMenuOpenDelay, mouseLeaveDelay: subMenuCloseDelay, onPopupVisibleChange: this.onPopupVisibleChange, forceRender: forceSubMenuRender, popupMotion: mergedMotion }, title), inline ? children : null); } }]); return SubMenu; }(external_window_React_["Component"]); SubMenu_SubMenu.defaultProps = { onMouseEnter: noop, onMouseLeave: noop, onTitleMouseEnter: noop, onTitleMouseLeave: noop, onTitleClick: noop, manualRef: noop, mode: 'vertical', title: '' }; var connected = Object(esm["b" /* connect */])(function (_ref2, _ref3) { var openKeys = _ref2.openKeys, activeKey = _ref2.activeKey, selectedKeys = _ref2.selectedKeys; var eventKey = _ref3.eventKey, subMenuKey = _ref3.subMenuKey; return { isOpen: openKeys.indexOf(eventKey) > -1, active: activeKey[subMenuKey] === eventKey, selectedKeys: selectedKeys }; })(SubMenu_SubMenu); connected.isSubMenu = true; /* harmony default export */ var es_SubMenu = (connected); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-menu/es/DOMWrap.js var MENUITEM_OVERFLOWED_CLASSNAME = 'menuitem-overflowed'; var FLOAT_PRECISION_ADJUST = 0.5; var DOMWrap_DOMWrap = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(DOMWrap, _React$Component); var _super = Object(createSuper["a" /* default */])(DOMWrap); function DOMWrap() { var _this; Object(classCallCheck["a" /* default */])(this, DOMWrap); _this = _super.apply(this, arguments); _this.resizeObserver = null; _this.mutationObserver = null; // original scroll size of the list _this.originalTotalWidth = 0; // copy of overflowed items _this.overflowedItems = []; // cache item of the original items (so we can track the size and order) _this.menuItemSizes = []; _this.cancelFrameId = null; _this.state = { lastVisibleIndex: undefined }; _this.childRef = /*#__PURE__*/external_window_React_["createRef"](); // get all valid menuItem nodes _this.getMenuItemNodes = function () { var prefixCls = _this.props.prefixCls; var ul = _this.childRef.current; if (!ul) { return []; } // filter out all overflowed indicator placeholder return [].slice.call(ul.children).filter(function (node) { return node.className.split(' ').indexOf("".concat(prefixCls, "-overflowed-submenu")) < 0; }); }; _this.getOverflowedSubMenuItem = function (keyPrefix, overflowedItems, renderPlaceholder) { var _this$props = _this.props, overflowedIndicator = _this$props.overflowedIndicator, level = _this$props.level, mode = _this$props.mode, prefixCls = _this$props.prefixCls, theme = _this$props.theme; if (level !== 1 || mode !== 'horizontal') { return null; } // put all the overflowed item inside a submenu // with a title of overflow indicator ('...') var copy = _this.props.children[0]; var _copy$props = copy.props, throwAway = _copy$props.children, title = _copy$props.title, propStyle = _copy$props.style, rest = Object(objectWithoutProperties["a" /* default */])(_copy$props, ["children", "title", "style"]); var style = Object(objectSpread2["a" /* default */])({}, propStyle); var key = "".concat(keyPrefix, "-overflowed-indicator"); var eventKey = "".concat(keyPrefix, "-overflowed-indicator"); if (overflowedItems.length === 0 && renderPlaceholder !== true) { style = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, style), {}, { display: 'none' }); } else if (renderPlaceholder) { style = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, style), {}, { visibility: 'hidden', // prevent from taking normal dom space position: 'absolute' }); key = "".concat(key, "-placeholder"); eventKey = "".concat(eventKey, "-placeholder"); } var popupClassName = theme ? "".concat(prefixCls, "-").concat(theme) : ''; var props = {}; menuAllProps.forEach(function (k) { if (rest[k] !== undefined) { props[k] = rest[k]; } }); return /*#__PURE__*/external_window_React_["createElement"](es_SubMenu, Object(esm_extends["a" /* default */])({ title: overflowedIndicator, className: "".concat(prefixCls, "-overflowed-submenu"), popupClassName: popupClassName }, props, { key: key, eventKey: eventKey, disabled: false, style: style }), overflowedItems); }; // memorize rendered menuSize _this.setChildrenWidthAndResize = function () { if (_this.props.mode !== 'horizontal') { return; } var ul = _this.childRef.current; if (!ul) { return; } var ulChildrenNodes = ul.children; if (!ulChildrenNodes || ulChildrenNodes.length === 0) { return; } var lastOverflowedIndicatorPlaceholder = ul.children[ulChildrenNodes.length - 1]; // need last overflowed indicator for calculating length; util_setStyle(lastOverflowedIndicatorPlaceholder, 'display', 'inline-block'); var menuItemNodes = _this.getMenuItemNodes(); // reset display attribute for all hidden elements caused by overflow to calculate updated width // and then reset to original state after width calculation var overflowedItems = menuItemNodes.filter(function (c) { return c.className.split(' ').indexOf(MENUITEM_OVERFLOWED_CLASSNAME) >= 0; }); overflowedItems.forEach(function (c) { util_setStyle(c, 'display', 'inline-block'); }); _this.menuItemSizes = menuItemNodes.map(function (c) { return getWidth(c, true); }); overflowedItems.forEach(function (c) { util_setStyle(c, 'display', 'none'); }); _this.overflowedIndicatorWidth = getWidth(ul.children[ul.children.length - 1], true); _this.originalTotalWidth = _this.menuItemSizes.reduce(function (acc, cur) { return acc + cur; }, 0); _this.handleResize(); // prevent the overflowed indicator from taking space; util_setStyle(lastOverflowedIndicatorPlaceholder, 'display', 'none'); }; _this.handleResize = function () { if (_this.props.mode !== 'horizontal') { return; } var ul = _this.childRef.current; if (!ul) { return; } var width = getWidth(ul); _this.overflowedItems = []; var currentSumWidth = 0; // index for last visible child in horizontal mode var lastVisibleIndex; // float number comparison could be problematic // e.g. 0.1 + 0.2 > 0.3 =====> true // thus using FLOAT_PRECISION_ADJUST as buffer to help the situation if (_this.originalTotalWidth > width + FLOAT_PRECISION_ADJUST) { lastVisibleIndex = -1; _this.menuItemSizes.forEach(function (liWidth) { currentSumWidth += liWidth; if (currentSumWidth + _this.overflowedIndicatorWidth <= width) { lastVisibleIndex += 1; } }); } _this.setState({ lastVisibleIndex: lastVisibleIndex }); }; return _this; } Object(createClass["a" /* default */])(DOMWrap, [{ key: "componentDidMount", value: function componentDidMount() { var _this2 = this; this.setChildrenWidthAndResize(); if (this.props.level === 1 && this.props.mode === 'horizontal') { var menuUl = this.childRef.current; if (!menuUl) { return; } this.resizeObserver = new ResizeObserver_es["default"](function (entries) { entries.forEach(function () { var cancelFrameId = _this2.cancelFrameId; cancelAnimationFrame(cancelFrameId); _this2.cancelFrameId = requestAnimationFrame(_this2.setChildrenWidthAndResize); }); }); [].slice.call(menuUl.children).concat(menuUl).forEach(function (el) { _this2.resizeObserver.observe(el); }); if (typeof MutationObserver !== 'undefined') { this.mutationObserver = new MutationObserver(function () { _this2.resizeObserver.disconnect(); [].slice.call(menuUl.children).concat(menuUl).forEach(function (el) { _this2.resizeObserver.observe(el); }); _this2.setChildrenWidthAndResize(); }); this.mutationObserver.observe(menuUl, { attributes: false, childList: true, subTree: false }); } } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { if (this.resizeObserver) { this.resizeObserver.disconnect(); } if (this.mutationObserver) { this.mutationObserver.disconnect(); } cancelAnimationFrame(this.cancelFrameId); } }, { key: "renderChildren", value: function renderChildren(children) { var _this3 = this; // need to take care of overflowed items in horizontal mode var lastVisibleIndex = this.state.lastVisibleIndex; return (children || []).reduce(function (acc, childNode, index) { var item = childNode; if (_this3.props.mode === 'horizontal') { var overflowed = _this3.getOverflowedSubMenuItem(childNode.props.eventKey, []); if (lastVisibleIndex !== undefined && _this3.props.className.indexOf("".concat(_this3.props.prefixCls, "-root")) !== -1) { if (index > lastVisibleIndex) { item = /*#__PURE__*/external_window_React_["cloneElement"](childNode, // 这里修改 eventKey 是为了防止隐藏状态下还会触发 openkeys 事件 { style: { display: 'none' }, eventKey: "".concat(childNode.props.eventKey, "-hidden"), /** * Legacy code. Here `className` never used: * https://github.com/react-component/menu/commit/4cd6b49fce9d116726f4ea00dda85325d6f26500#diff-e2fa48f75c2dd2318295cde428556a76R240 */ className: "".concat(MENUITEM_OVERFLOWED_CLASSNAME) }); } if (index === lastVisibleIndex + 1) { _this3.overflowedItems = children.slice(lastVisibleIndex + 1).map(function (c) { return /*#__PURE__*/external_window_React_["cloneElement"](c, // children[index].key will become '.$key' in clone by default, // we have to overwrite with the correct key explicitly { key: c.props.eventKey, mode: 'vertical-left' }); }); overflowed = _this3.getOverflowedSubMenuItem(childNode.props.eventKey, _this3.overflowedItems); } } var ret = [].concat(Object(toConsumableArray["a" /* default */])(acc), [overflowed, item]); if (index === children.length - 1) { // need a placeholder for calculating overflowed indicator width ret.push(_this3.getOverflowedSubMenuItem(childNode.props.eventKey, [], true)); } return ret; } return [].concat(Object(toConsumableArray["a" /* default */])(acc), [item]); }, []); } }, { key: "render", value: function render() { var _this$props2 = this.props, visible = _this$props2.visible, prefixCls = _this$props2.prefixCls, overflowedIndicator = _this$props2.overflowedIndicator, mode = _this$props2.mode, level = _this$props2.level, tag = _this$props2.tag, children = _this$props2.children, theme = _this$props2.theme, rest = Object(objectWithoutProperties["a" /* default */])(_this$props2, ["visible", "prefixCls", "overflowedIndicator", "mode", "level", "tag", "children", "theme"]); var Tag = tag; return /*#__PURE__*/external_window_React_["createElement"](Tag, Object(esm_extends["a" /* default */])({ ref: this.childRef }, rest), this.renderChildren(children)); } }]); return DOMWrap; }(external_window_React_["Component"]); DOMWrap_DOMWrap.defaultProps = { tag: 'div', className: '' }; /* harmony default export */ var es_DOMWrap = (DOMWrap_DOMWrap); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-menu/es/SubPopupMenu.js function allDisabled(arr) { if (!arr.length) { return true; } return arr.every(function (c) { return !!c.props.disabled; }); } function updateActiveKey(store, menuId, activeKey) { var state = store.getState(); store.setState({ activeKey: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state.activeKey), {}, Object(defineProperty["a" /* default */])({}, menuId, activeKey)) }); } function getEventKey(props) { // when eventKey not available ,it's menu and return menu id '0-menu-' return props.eventKey || '0-menu-'; } function getActiveKey(props, originalActiveKey) { var activeKey = originalActiveKey; var children = props.children, eventKey = props.eventKey; if (activeKey) { var found; loopMenuItem(children, function (c, i) { if (c && c.props && !c.props.disabled && activeKey === getKeyFromChildrenIndex(c, eventKey, i)) { found = true; } }); if (found) { return activeKey; } } activeKey = null; if (props.defaultActiveFirst) { loopMenuItem(children, function (c, i) { if (!activeKey && c && !c.props.disabled) { activeKey = getKeyFromChildrenIndex(c, eventKey, i); } }); return activeKey; } return activeKey; } function saveRef(c) { if (!c) { return; } /* eslint-disable @typescript-eslint/no-invalid-this */ var index = this.instanceArray.indexOf(c); if (index !== -1) { // update component if it's already inside instanceArray this.instanceArray[index] = c; } else { // add component if it's not in instanceArray yet; this.instanceArray.push(c); } /* eslint-enable @typescript-eslint/no-invalid-this */ } var SubPopupMenu_SubPopupMenu = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(SubPopupMenu, _React$Component); var _super = Object(createSuper["a" /* default */])(SubPopupMenu); function SubPopupMenu(props) { var _this; Object(classCallCheck["a" /* default */])(this, SubPopupMenu); _this = _super.call(this, props); /** * all keyboard events callbacks run from here at first * * note: * This legacy code that `onKeyDown` is called by parent instead of dom self. * which need return code to check if this event is handled */ _this.onKeyDown = function (e, callback) { var keyCode = e.keyCode; var handled; _this.getFlatInstanceArray().forEach(function (obj) { if (obj && obj.props.active && obj.onKeyDown) { handled = obj.onKeyDown(e); } }); if (handled) { return 1; } var activeItem = null; if (keyCode === KeyCode["a" /* default */].UP || keyCode === KeyCode["a" /* default */].DOWN) { activeItem = _this.step(keyCode === KeyCode["a" /* default */].UP ? -1 : 1); } if (activeItem) { e.preventDefault(); updateActiveKey(_this.props.store, getEventKey(_this.props), activeItem.props.eventKey); if (typeof callback === 'function') { callback(activeItem); } return 1; } return undefined; }; _this.onItemHover = function (e) { var key = e.key, hover = e.hover; updateActiveKey(_this.props.store, getEventKey(_this.props), hover ? key : null); }; _this.onDeselect = function (selectInfo) { _this.props.onDeselect(selectInfo); }; _this.onSelect = function (selectInfo) { _this.props.onSelect(selectInfo); }; _this.onClick = function (e) { _this.props.onClick(e); }; _this.onOpenChange = function (e) { _this.props.onOpenChange(e); }; _this.onDestroy = function (key) { /* istanbul ignore next */ _this.props.onDestroy(key); }; _this.getFlatInstanceArray = function () { return _this.instanceArray; }; _this.step = function (direction) { var children = _this.getFlatInstanceArray(); var activeKey = _this.props.store.getState().activeKey[getEventKey(_this.props)]; var len = children.length; if (!len) { return null; } if (direction < 0) { children = children.concat().reverse(); } // find current activeIndex var activeIndex = -1; children.every(function (c, ci) { if (c && c.props.eventKey === activeKey) { activeIndex = ci; return false; } return true; }); if (!_this.props.defaultActiveFirst && activeIndex !== -1 && allDisabled(children.slice(activeIndex, len - 1))) { return undefined; } var start = (activeIndex + 1) % len; var i = start; do { var child = children[i]; if (!child || child.props.disabled) { i = (i + 1) % len; } else { return child; } } while (i !== start); return null; }; _this.renderCommonMenuItem = function (child, i, extraProps) { var state = _this.props.store.getState(); var _assertThisInitialize = Object(assertThisInitialized["a" /* default */])(_this), props = _assertThisInitialize.props; var key = getKeyFromChildrenIndex(child, props.eventKey, i); var childProps = child.props; // https://github.com/ant-design/ant-design/issues/11517#issuecomment-477403055 if (!childProps || typeof child.type === 'string') { return child; } var isActive = key === state.activeKey; var newChildProps = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({ mode: childProps.mode || props.mode, level: props.level, inlineIndent: props.inlineIndent, renderMenuItem: _this.renderMenuItem, rootPrefixCls: props.prefixCls, index: i, parentMenu: props.parentMenu, // customized ref function, need to be invoked manually in child's componentDidMount manualRef: childProps.disabled ? undefined : Object(createChainedFunction["a" /* default */])(child.ref, saveRef.bind(Object(assertThisInitialized["a" /* default */])(_this))), eventKey: key, active: !childProps.disabled && isActive, multiple: props.multiple, onClick: function onClick(e) { (childProps.onClick || noop)(e); _this.onClick(e); }, onItemHover: _this.onItemHover, motion: props.motion, subMenuOpenDelay: props.subMenuOpenDelay, subMenuCloseDelay: props.subMenuCloseDelay, forceSubMenuRender: props.forceSubMenuRender, onOpenChange: _this.onOpenChange, onDeselect: _this.onDeselect, onSelect: _this.onSelect, builtinPlacements: props.builtinPlacements, itemIcon: childProps.itemIcon || _this.props.itemIcon, expandIcon: childProps.expandIcon || _this.props.expandIcon }, extraProps), {}, { direction: props.direction }); // ref: https://github.com/ant-design/ant-design/issues/13943 if (props.mode === 'inline' || util_isMobileDevice()) { newChildProps.triggerSubMenuAction = 'click'; } return /*#__PURE__*/external_window_React_["cloneElement"](child, Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, newChildProps), {}, { key: key || i })); }; _this.renderMenuItem = function (c, i, subMenuKey) { /* istanbul ignore if */ if (!c) { return null; } var state = _this.props.store.getState(); var extraProps = { openKeys: state.openKeys, selectedKeys: state.selectedKeys, triggerSubMenuAction: _this.props.triggerSubMenuAction, subMenuKey: subMenuKey }; return _this.renderCommonMenuItem(c, i, extraProps); }; props.store.setState({ activeKey: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, props.store.getState().activeKey), {}, Object(defineProperty["a" /* default */])({}, props.eventKey, getActiveKey(props, props.activeKey))) }); _this.instanceArray = []; return _this; } Object(createClass["a" /* default */])(SubPopupMenu, [{ key: "componentDidMount", value: function componentDidMount() { // invoke customized ref to expose component to mixin if (this.props.manualRef) { this.props.manualRef(this); } } }, { key: "shouldComponentUpdate", value: function shouldComponentUpdate(nextProps) { return this.props.visible || nextProps.visible || this.props.className !== nextProps.className || !shallowequal_default()(this.props.style, nextProps.style); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { var props = this.props; var originalActiveKey = 'activeKey' in props ? props.activeKey : props.store.getState().activeKey[getEventKey(props)]; var activeKey = getActiveKey(props, originalActiveKey); if (activeKey !== originalActiveKey) { updateActiveKey(props.store, getEventKey(props), activeKey); } else if ('activeKey' in prevProps) { // If prev activeKey is not same as current activeKey, // we should set it. var prevActiveKey = getActiveKey(prevProps, prevProps.activeKey); if (activeKey !== prevActiveKey) { updateActiveKey(props.store, getEventKey(props), activeKey); } } } }, { key: "render", value: function render() { var _this2 = this; var props = Object(esm_extends["a" /* default */])({}, this.props); this.instanceArray = []; var className = classnames_default()(props.prefixCls, props.className, "".concat(props.prefixCls, "-").concat(props.mode)); var domProps = { className: className, // role could be 'select' and by default set to menu role: props.role || 'menu' }; if (props.id) { domProps.id = props.id; } if (props.focusable) { domProps.tabIndex = 0; domProps.onKeyDown = this.onKeyDown; } var prefixCls = props.prefixCls, eventKey = props.eventKey, visible = props.visible, level = props.level, mode = props.mode, overflowedIndicator = props.overflowedIndicator, theme = props.theme; menuAllProps.forEach(function (key) { return delete props[key]; }); // Otherwise, the propagated click event will trigger another onClick delete props.onClick; return /*#__PURE__*/external_window_React_["createElement"](es_DOMWrap, Object(esm_extends["a" /* default */])({}, props, { prefixCls: prefixCls, mode: mode, tag: "ul", level: level, theme: theme, visible: visible, overflowedIndicator: overflowedIndicator }, domProps), Object(toArray["a" /* default */])(props.children).map(function (c, i) { return _this2.renderMenuItem(c, i, eventKey || '0-menu-'); })); } }]); return SubPopupMenu; }(external_window_React_["Component"]); SubPopupMenu_SubPopupMenu.defaultProps = { prefixCls: 'rc-menu', className: '', mode: 'vertical', level: 1, inlineIndent: 24, visible: true, focusable: true, style: {}, manualRef: noop }; var SubPopupMenu_connected = Object(esm["b" /* connect */])()(SubPopupMenu_SubPopupMenu); /* harmony default export */ var es_SubPopupMenu = (SubPopupMenu_connected); // EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js var warning = __webpack_require__("Kwbf"); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-menu/es/utils/legacyUtil.js function legacyUtil_getMotion(_ref, _ref2, menuMode) { var prefixCls = _ref.prefixCls, motion = _ref.motion, _ref$defaultMotions = _ref.defaultMotions, defaultMotions = _ref$defaultMotions === void 0 ? {} : _ref$defaultMotions, openAnimation = _ref.openAnimation, openTransitionName = _ref.openTransitionName; var switchingModeFromInline = _ref2.switchingModeFromInline; if (motion) { return motion; } if (Object(esm_typeof["a" /* default */])(openAnimation) === 'object' && openAnimation) { Object(warning["a" /* default */])(false, 'Object type of `openAnimation` is removed. Please use `motion` instead.'); } else if (typeof openAnimation === 'string') { return { motionName: "".concat(prefixCls, "-open-").concat(openAnimation) }; } if (openTransitionName) { return { motionName: openTransitionName }; } // Default logic var defaultMotion = defaultMotions[menuMode]; if (defaultMotion) { return defaultMotion; } // When mode switch from inline // submenu should hide without animation return switchingModeFromInline ? null : defaultMotions.other; } // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-menu/es/Menu.js var Menu_Menu = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(Menu, _React$Component); var _super = Object(createSuper["a" /* default */])(Menu); function Menu(props) { var _this; Object(classCallCheck["a" /* default */])(this, Menu); _this = _super.call(this, props); _this.onSelect = function (selectInfo) { var _assertThisInitialize = Object(assertThisInitialized["a" /* default */])(_this), props = _assertThisInitialize.props; if (props.selectable) { // root menu var _this$store$getState = _this.store.getState(), _selectedKeys = _this$store$getState.selectedKeys; var selectedKey = selectInfo.key; if (props.multiple) { _selectedKeys = _selectedKeys.concat([selectedKey]); } else { _selectedKeys = [selectedKey]; } if (!('selectedKeys' in props)) { _this.store.setState({ selectedKeys: _selectedKeys }); } props.onSelect(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, selectInfo), {}, { selectedKeys: _selectedKeys })); } }; _this.onClick = function (e) { var mode = _this.getRealMenuMode(); var _assertThisInitialize2 = Object(assertThisInitialized["a" /* default */])(_this), store = _assertThisInitialize2.store, onOpenChange = _assertThisInitialize2.props.onOpenChange; if (mode !== 'inline' && !('openKeys' in _this.props)) { // closing vertical popup submenu after click it store.setState({ openKeys: [] }); onOpenChange([]); } _this.props.onClick(e); }; // onKeyDown needs to be exposed as a instance method // e.g., in rc-select, we need to navigate menu item while // current active item is rc-select input box rather than the menu itself _this.onKeyDown = function (e, callback) { _this.innerMenu.getWrappedInstance().onKeyDown(e, callback); }; _this.onOpenChange = function (event) { var _assertThisInitialize3 = Object(assertThisInitialized["a" /* default */])(_this), props = _assertThisInitialize3.props; var openKeys = _this.store.getState().openKeys.concat(); var changed = false; var processSingle = function processSingle(e) { var oneChanged = false; if (e.open) { oneChanged = openKeys.indexOf(e.key) === -1; if (oneChanged) { openKeys.push(e.key); } } else { var index = openKeys.indexOf(e.key); oneChanged = index !== -1; if (oneChanged) { openKeys.splice(index, 1); } } changed = changed || oneChanged; }; if (Array.isArray(event)) { // batch change call event.forEach(processSingle); } else { processSingle(event); } if (changed) { if (!('openKeys' in _this.props)) { _this.store.setState({ openKeys: openKeys }); } props.onOpenChange(openKeys); } }; _this.onDeselect = function (selectInfo) { var _assertThisInitialize4 = Object(assertThisInitialized["a" /* default */])(_this), props = _assertThisInitialize4.props; if (props.selectable) { var _selectedKeys2 = _this.store.getState().selectedKeys.concat(); var selectedKey = selectInfo.key; var index = _selectedKeys2.indexOf(selectedKey); if (index !== -1) { _selectedKeys2.splice(index, 1); } if (!('selectedKeys' in props)) { _this.store.setState({ selectedKeys: _selectedKeys2 }); } props.onDeselect(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, selectInfo), {}, { selectedKeys: _selectedKeys2 })); } }; // 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.onMouseEnter = function (e) { _this.restoreModeVerticalFromInline(); var onMouseEnter = _this.props.onMouseEnter; if (onMouseEnter) { onMouseEnter(e); } }; _this.onTransitionEnd = 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.setInnerMenu = function (node) { _this.innerMenu = node; }; _this.isRootMenu = true; var selectedKeys = props.defaultSelectedKeys; var openKeys = props.defaultOpenKeys; if ('selectedKeys' in props) { selectedKeys = props.selectedKeys || []; } if ('openKeys' in props) { openKeys = props.openKeys || []; } _this.store = Object(esm["c" /* create */])({ selectedKeys: selectedKeys, openKeys: openKeys, activeKey: { '0-menu-': getActiveKey(props, props.activeKey) } }); _this.state = { switchingModeFromInline: false, prevProps: props, inlineOpenKeys: [], store: _this.store }; return _this; } Object(createClass["a" /* default */])(Menu, [{ key: "componentDidMount", value: function componentDidMount() { this.updateMiniStore(); this.updateMenuDisplay(); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { var _this$props = this.props, siderCollapsed = _this$props.siderCollapsed, inlineCollapsed = _this$props.inlineCollapsed, onOpenChange = _this$props.onOpenChange; if (!prevProps.inlineCollapsed && inlineCollapsed || !prevProps.siderCollapsed && siderCollapsed) { onOpenChange([]); } this.updateMiniStore(); this.updateMenuDisplay(); } }, { key: "updateMenuDisplay", value: function updateMenuDisplay() { var collapsedWidth = this.props.collapsedWidth, store = this.store, prevOpenKeys = this.prevOpenKeys; // https://github.com/ant-design/ant-design/issues/8587 var hideMenu = this.getInlineCollapsed() && (collapsedWidth === 0 || collapsedWidth === '0' || collapsedWidth === '0px'); if (hideMenu) { this.prevOpenKeys = store.getState().openKeys.concat(); this.store.setState({ openKeys: [] }); } else if (prevOpenKeys) { this.store.setState({ openKeys: prevOpenKeys }); this.prevOpenKeys = null; } } }, { key: "getRealMenuMode", value: function getRealMenuMode() { var mode = this.props.mode; var switchingModeFromInline = this.state.switchingModeFromInline; var inlineCollapsed = this.getInlineCollapsed(); if (switchingModeFromInline && inlineCollapsed) { return 'inline'; } return inlineCollapsed ? 'vertical' : mode; } }, { key: "getInlineCollapsed", value: function getInlineCollapsed() { var _this$props2 = this.props, inlineCollapsed = _this$props2.inlineCollapsed, siderCollapsed = _this$props2.siderCollapsed; if (siderCollapsed !== undefined) { return siderCollapsed; } return inlineCollapsed; } }, { key: "restoreModeVerticalFromInline", value: function restoreModeVerticalFromInline() { var switchingModeFromInline = this.state.switchingModeFromInline; if (switchingModeFromInline) { this.setState({ switchingModeFromInline: false }); } } }, { key: "updateMiniStore", value: function updateMiniStore() { if ('selectedKeys' in this.props) { this.store.setState({ selectedKeys: this.props.selectedKeys || [] }); } if ('openKeys' in this.props) { this.store.setState({ openKeys: this.props.openKeys || [] }); } } }, { key: "render", value: function render() { var props = Object(objectSpread2["a" /* default */])({}, Object(omit["a" /* default */])(this.props, ['collapsedWidth', 'siderCollapsed', 'defaultMotions'])); var mode = this.getRealMenuMode(); props.className += " ".concat(props.prefixCls, "-root"); if (props.direction === 'rtl') { props.className += " ".concat(props.prefixCls, "-rtl"); } props = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, props), {}, { mode: mode, onClick: this.onClick, onOpenChange: this.onOpenChange, onDeselect: this.onDeselect, onSelect: this.onSelect, onMouseEnter: this.onMouseEnter, onTransitionEnd: this.onTransitionEnd, parentMenu: this, motion: legacyUtil_getMotion(this.props, this.state, mode) }); delete props.openAnimation; delete props.openTransitionName; return /*#__PURE__*/external_window_React_["createElement"](esm["a" /* Provider */], { store: this.store }, /*#__PURE__*/external_window_React_["createElement"](es_SubPopupMenu, Object(esm_extends["a" /* default */])({}, props, { ref: this.setInnerMenu }), this.props.children)); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps, prevState) { var prevProps = prevState.prevProps, store = prevState.store; var prevStoreState = store.getState(); var newStoreState = {}; var newState = { prevProps: nextProps }; if (prevProps.mode === 'inline' && nextProps.mode !== 'inline') { newState.switchingModeFromInline = true; } if ('openKeys' in nextProps) { newStoreState.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 = prevStoreState.openKeys; newStoreState.openKeys = []; } if (!nextProps.inlineCollapsed && prevProps.inlineCollapsed || !nextProps.siderCollapsed && prevProps.siderCollapsed) { newStoreState.openKeys = prevState.inlineOpenKeys; newState.inlineOpenKeys = []; } } if (Object.keys(newStoreState).length) { store.setState(newStoreState); } return newState; } }]); return Menu; }(external_window_React_["Component"]); Menu_Menu.defaultProps = { selectable: true, onClick: noop, onSelect: noop, onOpenChange: noop, onDeselect: noop, defaultSelectedKeys: [], defaultOpenKeys: [], subMenuOpenDelay: 0.1, subMenuCloseDelay: 0.1, triggerSubMenuAction: 'hover', prefixCls: 'rc-menu', className: '', mode: 'vertical', style: {}, builtinPlacements: {}, overflowedIndicator: /*#__PURE__*/external_window_React_["createElement"]("span", null, "\xB7\xB7\xB7") }; /* harmony default export */ var es_Menu = (Menu_Menu); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-menu/es/MenuItem.js var MenuItem_MenuItem = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(MenuItem, _React$Component); var _super = Object(createSuper["a" /* default */])(MenuItem); function MenuItem() { var _this; Object(classCallCheck["a" /* default */])(this, MenuItem); _this = _super.apply(this, arguments); _this.onKeyDown = function (e) { var keyCode = e.keyCode; if (keyCode === KeyCode["a" /* default */].ENTER) { _this.onClick(e); return true; } return undefined; }; _this.onMouseLeave = function (e) { var _this$props = _this.props, eventKey = _this$props.eventKey, onItemHover = _this$props.onItemHover, onMouseLeave = _this$props.onMouseLeave; onItemHover({ key: eventKey, hover: false }); onMouseLeave({ key: eventKey, domEvent: e }); }; _this.onMouseEnter = function (e) { var _this$props2 = _this.props, eventKey = _this$props2.eventKey, onItemHover = _this$props2.onItemHover, onMouseEnter = _this$props2.onMouseEnter; onItemHover({ key: eventKey, hover: true }); onMouseEnter({ key: eventKey, domEvent: e }); }; _this.onClick = function (e) { var _this$props3 = _this.props, eventKey = _this$props3.eventKey, multiple = _this$props3.multiple, onClick = _this$props3.onClick, onSelect = _this$props3.onSelect, onDeselect = _this$props3.onDeselect, isSelected = _this$props3.isSelected; var info = { key: eventKey, keyPath: [eventKey], item: Object(assertThisInitialized["a" /* default */])(_this), domEvent: e }; onClick(info); if (multiple) { if (isSelected) { onDeselect(info); } else { onSelect(info); } } else if (!isSelected) { onSelect(info); } }; _this.saveNode = function (node) { _this.node = node; }; return _this; } Object(createClass["a" /* default */])(MenuItem, [{ key: "componentDidMount", value: function componentDidMount() { // invoke customized ref to expose component to mixin this.callRef(); } }, { key: "componentDidUpdate", value: function componentDidUpdate() { this.callRef(); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { var props = this.props; if (props.onDestroy) { props.onDestroy(props.eventKey); } } }, { key: "getPrefixCls", value: function getPrefixCls() { return "".concat(this.props.rootPrefixCls, "-item"); } }, { key: "getActiveClassName", value: function getActiveClassName() { return "".concat(this.getPrefixCls(), "-active"); } }, { key: "getSelectedClassName", value: function getSelectedClassName() { return "".concat(this.getPrefixCls(), "-selected"); } }, { key: "getDisabledClassName", value: function getDisabledClassName() { return "".concat(this.getPrefixCls(), "-disabled"); } }, { key: "callRef", value: function callRef() { if (this.props.manualRef) { this.props.manualRef(this); } } }, { key: "render", value: function render() { var _classNames; var props = Object(objectSpread2["a" /* default */])({}, this.props); var className = classnames_default()(this.getPrefixCls(), props.className, (_classNames = {}, Object(defineProperty["a" /* default */])(_classNames, this.getActiveClassName(), !props.disabled && props.active), Object(defineProperty["a" /* default */])(_classNames, this.getSelectedClassName(), props.isSelected), Object(defineProperty["a" /* default */])(_classNames, this.getDisabledClassName(), props.disabled), _classNames)); var attrs = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, props.attribute), {}, { title: typeof props.title === 'string' ? props.title : undefined, className: className, // set to menuitem by default role: props.role || 'menuitem', 'aria-disabled': props.disabled }); if (props.role === 'option') { // overwrite to option attrs = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, attrs), {}, { role: 'option', 'aria-selected': props.isSelected }); } else if (props.role === null || props.role === 'none') { // sometimes we want to specify role inside
  • element //
  • Link
  • would be a good example // in this case the role on
  • should be "none" to // remove the implied listitem role. // https://www.w3.org/TR/wai-aria-practices-1.1/examples/menubar/menubar-1/menubar-1.html attrs.role = 'none'; } // In case that onClick/onMouseLeave/onMouseEnter is passed down from owner var mouseEvent = { onClick: props.disabled ? null : this.onClick, onMouseLeave: props.disabled ? null : this.onMouseLeave, onMouseEnter: props.disabled ? null : this.onMouseEnter }; var style = Object(objectSpread2["a" /* default */])({}, props.style); if (props.mode === 'inline') { if (props.direction === 'rtl') { style.paddingRight = props.inlineIndent * props.level; } else { style.paddingLeft = props.inlineIndent * props.level; } } menuAllProps.forEach(function (key) { return delete props[key]; }); delete props.direction; var icon = this.props.itemIcon; if (typeof this.props.itemIcon === 'function') { // TODO: This is a bug which should fixed after TS refactor icon = /*#__PURE__*/external_window_React_["createElement"](this.props.itemIcon, this.props); } return /*#__PURE__*/external_window_React_["createElement"]("li", Object(esm_extends["a" /* default */])({}, Object(omit["a" /* default */])(props, ['onClick', 'onMouseEnter', 'onMouseLeave', 'onSelect']), attrs, mouseEvent, { style: style, ref: this.saveNode }), props.children, icon); } }]); return MenuItem; }(external_window_React_["Component"]); MenuItem_MenuItem.isMenuItem = true; MenuItem_MenuItem.defaultProps = { onSelect: noop, onMouseEnter: noop, onMouseLeave: noop, manualRef: noop }; var MenuItem_connected = Object(esm["b" /* connect */])(function (_ref, _ref2) { var activeKey = _ref.activeKey, selectedKeys = _ref.selectedKeys; var eventKey = _ref2.eventKey, subMenuKey = _ref2.subMenuKey; return { active: activeKey[subMenuKey] === eventKey, // selectedKeys should be array in any circumstance // when it is not, we have fallback logic for https://github.com/ant-design/ant-design/issues/29430 isSelected: Array.isArray(selectedKeys) ? selectedKeys.indexOf(eventKey) !== -1 : selectedKeys === eventKey }; })(MenuItem_MenuItem); /* harmony default export */ var es_MenuItem = (MenuItem_connected); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-menu/es/MenuItemGroup.js var MenuItemGroup_MenuItemGroup = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(MenuItemGroup, _React$Component); var _super = Object(createSuper["a" /* default */])(MenuItemGroup); function MenuItemGroup() { var _this; Object(classCallCheck["a" /* default */])(this, MenuItemGroup); _this = _super.apply(this, arguments); _this.renderInnerMenuItem = function (item) { var _this$props = _this.props, renderMenuItem = _this$props.renderMenuItem, index = _this$props.index; return renderMenuItem(item, index, _this.props.subMenuKey); }; return _this; } Object(createClass["a" /* default */])(MenuItemGroup, [{ key: "render", value: function render() { var props = Object(esm_extends["a" /* default */])({}, this.props); var _props$className = props.className, className = _props$className === void 0 ? '' : _props$className, rootPrefixCls = props.rootPrefixCls; var titleClassName = "".concat(rootPrefixCls, "-item-group-title"); var listClassName = "".concat(rootPrefixCls, "-item-group-list"); var title = props.title, children = props.children; menuAllProps.forEach(function (key) { return delete props[key]; }); delete props.direction; return /*#__PURE__*/external_window_React_["createElement"]("li", Object(esm_extends["a" /* default */])({}, props, { onClick: function onClick(e) { return e.stopPropagation(); }, className: "".concat(className, " ").concat(rootPrefixCls, "-item-group") }), /*#__PURE__*/external_window_React_["createElement"]("div", { className: titleClassName, title: typeof title === 'string' ? title : undefined }, title), /*#__PURE__*/external_window_React_["createElement"]("ul", { className: listClassName }, external_window_React_["Children"].map(children, this.renderInnerMenuItem))); } }]); return MenuItemGroup; }(external_window_React_["Component"]); MenuItemGroup_MenuItemGroup.isMenuItemGroup = true; MenuItemGroup_MenuItemGroup.defaultProps = { disabled: true }; /* harmony default export */ var es_MenuItemGroup = (MenuItemGroup_MenuItemGroup); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-menu/es/Divider.js var Divider_Divider = function Divider(_ref) { var className = _ref.className, rootPrefixCls = _ref.rootPrefixCls, style = _ref.style; return /*#__PURE__*/external_window_React_["createElement"]("li", { className: "".concat(className, " ").concat(rootPrefixCls, "-item-divider"), style: style }); }; Divider_Divider.defaultProps = { // To fix keyboard UX. disabled: true, className: '', style: {} }; /* harmony default export */ var es_Divider = (Divider_Divider); // CONCATENATED MODULE: ./node_modules/rc-tabs/node_modules/rc-menu/es/index.js /* harmony default export */ var rc_menu_es = (es_Menu); // EXTERNAL MODULE: ./node_modules/rc-dropdown/es/index.js + 2 modules var rc_dropdown_es = __webpack_require__("eDIo"); // CONCATENATED MODULE: ./node_modules/rc-tabs/es/TabNavList/AddButton.js function AddButton(_ref, ref) { var prefixCls = _ref.prefixCls, editable = _ref.editable, locale = _ref.locale, style = _ref.style; if (!editable || editable.showAdd === false) { return null; } return external_window_React_["createElement"]("button", { ref: ref, type: "button", className: "".concat(prefixCls, "-nav-add"), style: style, "aria-label": (locale === null || locale === void 0 ? void 0 : locale.addAriaLabel) || 'Add tab', onClick: function onClick(event) { editable.onEdit('add', { event: event }); } }, editable.addIcon || '+'); } /* harmony default export */ var TabNavList_AddButton = (external_window_React_["forwardRef"](AddButton)); // CONCATENATED MODULE: ./node_modules/rc-tabs/es/TabNavList/OperationNode.js function OperationNode(_ref, ref) { var prefixCls = _ref.prefixCls, id = _ref.id, tabs = _ref.tabs, locale = _ref.locale, mobile = _ref.mobile, _ref$moreIcon = _ref.moreIcon, moreIcon = _ref$moreIcon === void 0 ? 'More' : _ref$moreIcon, moreTransitionName = _ref.moreTransitionName, style = _ref.style, className = _ref.className, editable = _ref.editable, tabBarGutter = _ref.tabBarGutter, rtl = _ref.rtl, onTabClick = _ref.onTabClick; // ======================== Dropdown ======================== var _useState = Object(external_window_React_["useState"])(false), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), open = _useState2[0], setOpen = _useState2[1]; var _useState3 = Object(external_window_React_["useState"])(null), _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2), selectedKey = _useState4[0], setSelectedKey = _useState4[1]; var popupId = "".concat(id, "-more-popup"); var dropdownPrefix = "".concat(prefixCls, "-dropdown"); var selectedItemId = selectedKey !== null ? "".concat(popupId, "-").concat(selectedKey) : null; var dropdownAriaLabel = locale === null || locale === void 0 ? void 0 : locale.dropdownAriaLabel; var menu = external_window_React_["createElement"](rc_menu_es, { onClick: function onClick(_ref2) { var key = _ref2.key, domEvent = _ref2.domEvent; onTabClick(key, domEvent); setOpen(false); }, id: popupId, tabIndex: -1, role: "listbox", "aria-activedescendant": selectedItemId, selectedKeys: [selectedKey], "aria-label": dropdownAriaLabel !== undefined ? dropdownAriaLabel : 'expanded dropdown' }, tabs.map(function (tab) { return external_window_React_["createElement"](es_MenuItem, { key: tab.key, id: "".concat(popupId, "-").concat(tab.key), role: "option", "aria-controls": id && "".concat(id, "-panel-").concat(tab.key), disabled: tab.disabled }, tab.tab); })); function selectOffset(offset) { var enabledTabs = tabs.filter(function (tab) { return !tab.disabled; }); var selectedIndex = enabledTabs.findIndex(function (tab) { return tab.key === selectedKey; }) || 0; var len = enabledTabs.length; for (var i = 0; i < len; i += 1) { selectedIndex = (selectedIndex + offset + len) % len; var tab = enabledTabs[selectedIndex]; if (!tab.disabled) { setSelectedKey(tab.key); return; } } } function onKeyDown(e) { var which = e.which; if (!open) { if ([KeyCode["a" /* default */].DOWN, KeyCode["a" /* default */].SPACE, KeyCode["a" /* default */].ENTER].includes(which)) { setOpen(true); e.preventDefault(); } return; } switch (which) { case KeyCode["a" /* default */].UP: selectOffset(-1); e.preventDefault(); break; case KeyCode["a" /* default */].DOWN: selectOffset(1); e.preventDefault(); break; case KeyCode["a" /* default */].ESC: setOpen(false); break; case KeyCode["a" /* default */].SPACE: case KeyCode["a" /* default */].ENTER: if (selectedKey !== null) onTabClick(selectedKey, e); break; } } // ========================= Effect ========================= Object(external_window_React_["useEffect"])(function () { // We use query element here to avoid React strict warning var ele = document.getElementById(selectedItemId); if (ele && ele.scrollIntoView) { ele.scrollIntoView(false); } }, [selectedKey]); Object(external_window_React_["useEffect"])(function () { if (!open) { setSelectedKey(null); } }, [open]); // ========================= Render ========================= var moreStyle = Object(defineProperty["a" /* default */])({}, rtl ? 'marginLeft' : 'marginRight', tabBarGutter); if (!tabs.length) { moreStyle.visibility = 'hidden'; moreStyle.order = 1; } var overlayClassName = classnames_default()(Object(defineProperty["a" /* default */])({}, "".concat(dropdownPrefix, "-rtl"), rtl)); var moreNode = mobile ? null : external_window_React_["createElement"](rc_dropdown_es["a" /* default */], { prefixCls: dropdownPrefix, overlay: menu, trigger: ['hover'], visible: open, transitionName: moreTransitionName, onVisibleChange: setOpen, overlayClassName: overlayClassName, mouseEnterDelay: 0.1, mouseLeaveDelay: 0.1 }, external_window_React_["createElement"]("button", { type: "button", className: "".concat(prefixCls, "-nav-more"), style: moreStyle, tabIndex: -1, "aria-hidden": "true", "aria-haspopup": "listbox", "aria-controls": popupId, id: "".concat(id, "-more"), "aria-expanded": open, onKeyDown: onKeyDown }, moreIcon)); return external_window_React_["createElement"]("div", { className: classnames_default()("".concat(prefixCls, "-nav-operations"), className), style: style, ref: ref }, moreNode, external_window_React_["createElement"](TabNavList_AddButton, { prefixCls: prefixCls, locale: locale, editable: editable })); } /* harmony default export */ var TabNavList_OperationNode = (external_window_React_["forwardRef"](OperationNode)); // CONCATENATED MODULE: ./node_modules/rc-tabs/es/TabContext.js /* harmony default export */ var TabContext = (Object(external_window_React_["createContext"])(null)); // CONCATENATED MODULE: ./node_modules/rc-tabs/es/hooks/useTouchMove.js var MIN_SWIPE_DISTANCE = 0.1; var STOP_SWIPE_DISTANCE = 0.01; var REFRESH_INTERVAL = 20; var SPEED_OFF_MULTIPLE = Math.pow(0.995, REFRESH_INTERVAL); // ========================= Check if is a mobile ========================= function useTouchMove_isMobile() { var agent = navigator.userAgent || navigator.vendor || window.opera; if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(agent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(agent.substr(0, 4))) { return true; } return false; } // ================================= Hook ================================= function useTouchMove(ref, onOffset) { var _useState = Object(external_window_React_["useState"])(), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), touchPosition = _useState2[0], setTouchPosition = _useState2[1]; var _useState3 = Object(external_window_React_["useState"])(0), _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2), lastTimestamp = _useState4[0], setLastTimestamp = _useState4[1]; var _useState5 = Object(external_window_React_["useState"])(0), _useState6 = Object(slicedToArray["a" /* default */])(_useState5, 2), lastTimeDiff = _useState6[0], setLastTimeDiff = _useState6[1]; var _useState7 = Object(external_window_React_["useState"])(), _useState8 = Object(slicedToArray["a" /* default */])(_useState7, 2), lastOffset = _useState8[0], setLastOffset = _useState8[1]; var motionRef = Object(external_window_React_["useRef"])(); // ========================= Events ========================= // >>> Touch events function onTouchStart(e) { var _e$touches$ = e.touches[0], screenX = _e$touches$.screenX, screenY = _e$touches$.screenY; setTouchPosition({ x: screenX, y: screenY }); window.clearInterval(motionRef.current); } function onTouchMove(e) { if (!touchPosition) return; e.preventDefault(); var _e$touches$2 = e.touches[0], screenX = _e$touches$2.screenX, screenY = _e$touches$2.screenY; setTouchPosition({ x: screenX, y: screenY }); var offsetX = screenX - touchPosition.x; var offsetY = screenY - touchPosition.y; onOffset(offsetX, offsetY); var now = Date.now(); setLastTimestamp(now); setLastTimeDiff(now - lastTimestamp); setLastOffset({ x: offsetX, y: offsetY }); } function onTouchEnd() { if (!touchPosition) return; setTouchPosition(null); setLastOffset(null); // Swipe if needed if (lastOffset) { var distanceX = lastOffset.x / lastTimeDiff; var distanceY = lastOffset.y / lastTimeDiff; var absX = Math.abs(distanceX); var absY = Math.abs(distanceY); // Skip swipe if low distance if (Math.max(absX, absY) < MIN_SWIPE_DISTANCE) return; var currentX = distanceX; var currentY = distanceY; motionRef.current = window.setInterval(function () { if (Math.abs(currentX) < STOP_SWIPE_DISTANCE && Math.abs(currentY) < STOP_SWIPE_DISTANCE) { window.clearInterval(motionRef.current); return; } currentX *= SPEED_OFF_MULTIPLE; currentY *= SPEED_OFF_MULTIPLE; onOffset(currentX * REFRESH_INTERVAL, currentY * REFRESH_INTERVAL); }, REFRESH_INTERVAL); } } // >>> Wheel event var lastWheelTimestampRef = Object(external_window_React_["useRef"])(0); var lastWheelPreventRef = Object(external_window_React_["useRef"])(false); var lastWheelDirectionRef = Object(external_window_React_["useRef"])(); function onWheel(e) { var deltaX = e.deltaX, deltaY = e.deltaY; // Convert both to x & y since wheel only happened on PC var mixed = 0; var absX = Math.abs(deltaX); var absY = Math.abs(deltaY); if (absX === absY) { mixed = lastWheelDirectionRef.current === 'x' ? deltaX : deltaY; } else if (absX > absY) { mixed = deltaX; lastWheelDirectionRef.current = 'x'; } else { mixed = deltaY; lastWheelDirectionRef.current = 'y'; } // Optimize mac touch scroll var now = Date.now(); if (now - lastWheelTimestampRef.current > 100) { lastWheelPreventRef.current = false; } if (onOffset(-mixed, -mixed) || lastWheelPreventRef.current) { e.preventDefault(); lastWheelPreventRef.current = true; } lastWheelTimestampRef.current = now; } // ========================= Effect ========================= var touchEventsRef = Object(external_window_React_["useRef"])(null); touchEventsRef.current = { onTouchStart: onTouchStart, onTouchMove: onTouchMove, onTouchEnd: onTouchEnd, onWheel: onWheel }; external_window_React_["useEffect"](function () { function onProxyTouchStart(e) { touchEventsRef.current.onTouchStart(e); } function onProxyTouchMove(e) { touchEventsRef.current.onTouchMove(e); } function onProxyTouchEnd(e) { touchEventsRef.current.onTouchEnd(e); } function onProxyWheel(e) { touchEventsRef.current.onWheel(e); } document.addEventListener('touchmove', onProxyTouchMove, { passive: false }); document.addEventListener('touchend', onProxyTouchEnd, { passive: false }); // No need to clean up since element removed ref.current.addEventListener('touchstart', onProxyTouchStart, { passive: false }); ref.current.addEventListener('wheel', onProxyWheel); return function () { document.removeEventListener('touchmove', onProxyTouchMove); document.removeEventListener('touchend', onProxyTouchEnd); }; }, []); } // CONCATENATED MODULE: ./node_modules/rc-tabs/es/hooks/useRefs.js function useRefs() { var cacheRefs = Object(external_window_React_["useRef"])(new Map()); function getRef(key) { if (!cacheRefs.current.has(key)) { cacheRefs.current.set(key, external_window_React_["createRef"]()); } return cacheRefs.current.get(key); } function removeRef(key) { cacheRefs.current.delete(key); } return [getRef, removeRef]; } // CONCATENATED MODULE: ./node_modules/rc-tabs/es/hooks/useSyncState.js function useSyncState(defaultState, onChange) { var stateRef = external_window_React_["useRef"](defaultState); var _React$useState = external_window_React_["useState"]({}), _React$useState2 = Object(slicedToArray["a" /* default */])(_React$useState, 2), forceUpdate = _React$useState2[1]; function setState(updater) { var newValue = typeof updater === 'function' ? updater(stateRef.current) : updater; if (newValue !== stateRef.current) { onChange(newValue, stateRef.current); } stateRef.current = newValue; forceUpdate({}); } return [stateRef.current, setState]; } // CONCATENATED MODULE: ./node_modules/rc-tabs/es/TabNavList/index.js var TabNavList_ExtraContent = function ExtraContent(_ref) { var position = _ref.position, prefixCls = _ref.prefixCls, extra = _ref.extra; if (!extra) return null; var content; var assertExtra = extra; if (position === 'right') { content = assertExtra.right || !assertExtra.left && assertExtra || null; } if (position === 'left') { content = assertExtra.left || null; } return content ? external_window_React_["createElement"]("div", { className: "".concat(prefixCls, "-extra-content") }, content) : null; }; function TabNavList(props, ref) { var _classNames; var _React$useContext = external_window_React_["useContext"](TabContext), prefixCls = _React$useContext.prefixCls, tabs = _React$useContext.tabs; var className = props.className, style = props.style, id = props.id, animated = props.animated, activeKey = props.activeKey, rtl = props.rtl, extra = props.extra, editable = props.editable, locale = props.locale, tabPosition = props.tabPosition, tabBarGutter = props.tabBarGutter, children = props.children, onTabClick = props.onTabClick, onTabScroll = props.onTabScroll; var tabsWrapperRef = Object(external_window_React_["useRef"])(); var tabListRef = Object(external_window_React_["useRef"])(); var operationsRef = Object(external_window_React_["useRef"])(); var innerAddButtonRef = Object(external_window_React_["useRef"])(); var _useRefs = useRefs(), _useRefs2 = Object(slicedToArray["a" /* default */])(_useRefs, 2), getBtnRef = _useRefs2[0], removeBtnRef = _useRefs2[1]; var tabPositionTopOrBottom = tabPosition === 'top' || tabPosition === 'bottom'; var _useSyncState = useSyncState(0, function (next, prev) { if (tabPositionTopOrBottom && onTabScroll) { onTabScroll({ direction: next > prev ? 'left' : 'right' }); } }), _useSyncState2 = Object(slicedToArray["a" /* default */])(_useSyncState, 2), transformLeft = _useSyncState2[0], setTransformLeft = _useSyncState2[1]; var _useSyncState3 = useSyncState(0, function (next, prev) { if (!tabPositionTopOrBottom && onTabScroll) { onTabScroll({ direction: next > prev ? 'top' : 'bottom' }); } }), _useSyncState4 = Object(slicedToArray["a" /* default */])(_useSyncState3, 2), transformTop = _useSyncState4[0], setTransformTop = _useSyncState4[1]; var _useState = Object(external_window_React_["useState"])(0), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), wrapperScrollWidth = _useState2[0], setWrapperScrollWidth = _useState2[1]; var _useState3 = Object(external_window_React_["useState"])(0), _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2), wrapperScrollHeight = _useState4[0], setWrapperScrollHeight = _useState4[1]; var _useState5 = Object(external_window_React_["useState"])(0), _useState6 = Object(slicedToArray["a" /* default */])(_useState5, 2), wrapperContentWidth = _useState6[0], setWrapperContentWidth = _useState6[1]; var _useState7 = Object(external_window_React_["useState"])(0), _useState8 = Object(slicedToArray["a" /* default */])(_useState7, 2), wrapperContentHeight = _useState8[0], setWrapperContentHeight = _useState8[1]; var _useState9 = Object(external_window_React_["useState"])(null), _useState10 = Object(slicedToArray["a" /* default */])(_useState9, 2), wrapperWidth = _useState10[0], setWrapperWidth = _useState10[1]; var _useState11 = Object(external_window_React_["useState"])(null), _useState12 = Object(slicedToArray["a" /* default */])(_useState11, 2), wrapperHeight = _useState12[0], setWrapperHeight = _useState12[1]; var _useState13 = Object(external_window_React_["useState"])(0), _useState14 = Object(slicedToArray["a" /* default */])(_useState13, 2), addWidth = _useState14[0], setAddWidth = _useState14[1]; var _useState15 = Object(external_window_React_["useState"])(0), _useState16 = Object(slicedToArray["a" /* default */])(_useState15, 2), addHeight = _useState16[0], setAddHeight = _useState16[1]; var _useRafState = useRafState(new Map()), _useRafState2 = Object(slicedToArray["a" /* default */])(_useRafState, 2), tabSizes = _useRafState2[0], setTabSizes = _useRafState2[1]; var tabOffsets = useOffsets(tabs, tabSizes, wrapperScrollWidth); // ========================== Util ========================= var operationsHiddenClassName = "".concat(prefixCls, "-nav-operations-hidden"); var transformMin = 0; var transformMax = 0; if (!tabPositionTopOrBottom) { transformMin = Math.min(0, wrapperHeight - wrapperScrollHeight); transformMax = 0; } else if (rtl) { transformMin = 0; transformMax = Math.max(0, wrapperScrollWidth - wrapperWidth); } else { transformMin = Math.min(0, wrapperWidth - wrapperScrollWidth); transformMax = 0; } function alignInRange(value) { if (value < transformMin) { return [transformMin, false]; } if (value > transformMax) { return [transformMax, false]; } return [value, true]; } // ========================= Mobile ======================== var touchMovingRef = Object(external_window_React_["useRef"])(); var _useState17 = Object(external_window_React_["useState"])(), _useState18 = Object(slicedToArray["a" /* default */])(_useState17, 2), lockAnimation = _useState18[0], setLockAnimation = _useState18[1]; function doLockAnimation() { setLockAnimation(Date.now()); } function clearTouchMoving() { window.clearTimeout(touchMovingRef.current); } useTouchMove(tabsWrapperRef, function (offsetX, offsetY) { var preventDefault = false; function doMove(setState, offset) { setState(function (value) { var _alignInRange = alignInRange(value + offset), _alignInRange2 = Object(slicedToArray["a" /* default */])(_alignInRange, 2), newValue = _alignInRange2[0], needPrevent = _alignInRange2[1]; preventDefault = needPrevent; return newValue; }); } if (tabPositionTopOrBottom) { // Skip scroll if place is enough if (wrapperWidth >= wrapperScrollWidth) { return preventDefault; } doMove(setTransformLeft, offsetX); } else { if (wrapperHeight >= wrapperScrollHeight) { return preventDefault; } doMove(setTransformTop, offsetY); } clearTouchMoving(); doLockAnimation(); return preventDefault; }); Object(external_window_React_["useEffect"])(function () { clearTouchMoving(); if (lockAnimation) { touchMovingRef.current = window.setTimeout(function () { setLockAnimation(0); }, 100); } return clearTouchMoving; }, [lockAnimation]); // ========================= Scroll ======================== function scrollToTab() { var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : activeKey; var tabOffset = tabOffsets.get(key); if (!tabOffset) return; if (tabPositionTopOrBottom) { // ============ Align with top & bottom ============ var newTransform = transformLeft; // RTL if (rtl) { if (tabOffset.right < transformLeft) { newTransform = tabOffset.right; } else if (tabOffset.right + tabOffset.width > transformLeft + wrapperWidth) { newTransform = tabOffset.right + tabOffset.width - wrapperWidth; } } // LTR else if (tabOffset.left < -transformLeft) { newTransform = -tabOffset.left; } else if (tabOffset.left + tabOffset.width > -transformLeft + wrapperWidth) { newTransform = -(tabOffset.left + tabOffset.width - wrapperWidth); } setTransformTop(0); setTransformLeft(alignInRange(newTransform)[0]); } else { // ============ Align with left & right ============ var _newTransform = transformTop; if (tabOffset.top < -transformTop) { _newTransform = -tabOffset.top; } else if (tabOffset.top + tabOffset.height > -transformTop + wrapperHeight) { _newTransform = -(tabOffset.top + tabOffset.height - wrapperHeight); } setTransformLeft(0); setTransformTop(alignInRange(_newTransform)[0]); } } // ========================== Tab ========================== // Render tab node & collect tab offset var _useVisibleRange = useVisibleRange(tabOffsets, { width: wrapperWidth, height: wrapperHeight, left: transformLeft, top: transformTop }, { width: wrapperContentWidth, height: wrapperContentHeight }, { width: addWidth, height: addHeight }, Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, props), {}, { tabs: tabs })), _useVisibleRange2 = Object(slicedToArray["a" /* default */])(_useVisibleRange, 2), visibleStart = _useVisibleRange2[0], visibleEnd = _useVisibleRange2[1]; var tabNodes = tabs.map(function (tab) { var key = tab.key; return external_window_React_["createElement"](TabNavList_TabNode, { id: id, prefixCls: prefixCls, key: key, rtl: rtl, tab: tab, closable: tab.closable, editable: editable, active: key === activeKey, tabPosition: tabPosition, tabBarGutter: tabBarGutter, renderWrapper: children, removeAriaLabel: locale === null || locale === void 0 ? void 0 : locale.removeAriaLabel, ref: getBtnRef(key), onClick: function onClick(e) { onTabClick(key, e); }, onRemove: function onRemove() { removeBtnRef(key); }, onFocus: function onFocus() { scrollToTab(key); doLockAnimation(); // Focus element will make scrollLeft change which we should reset back if (!rtl) { tabsWrapperRef.current.scrollLeft = 0; } tabsWrapperRef.current.scrollTop = 0; } }); }); var onListHolderResize = useRaf(function () { var _tabsWrapperRef$curre, _tabsWrapperRef$curre2, _innerAddButtonRef$cu, _innerAddButtonRef$cu2, _operationsRef$curren, _operationsRef$curren2, _tabListRef$current, _tabListRef$current2, _operationsRef$curren3; // Update wrapper records var offsetWidth = ((_tabsWrapperRef$curre = tabsWrapperRef.current) === null || _tabsWrapperRef$curre === void 0 ? void 0 : _tabsWrapperRef$curre.offsetWidth) || 0; var offsetHeight = ((_tabsWrapperRef$curre2 = tabsWrapperRef.current) === null || _tabsWrapperRef$curre2 === void 0 ? void 0 : _tabsWrapperRef$curre2.offsetHeight) || 0; var newAddWidth = ((_innerAddButtonRef$cu = innerAddButtonRef.current) === null || _innerAddButtonRef$cu === void 0 ? void 0 : _innerAddButtonRef$cu.offsetWidth) || 0; var newAddHeight = ((_innerAddButtonRef$cu2 = innerAddButtonRef.current) === null || _innerAddButtonRef$cu2 === void 0 ? void 0 : _innerAddButtonRef$cu2.offsetHeight) || 0; var newOperationWidth = ((_operationsRef$curren = operationsRef.current) === null || _operationsRef$curren === void 0 ? void 0 : _operationsRef$curren.offsetWidth) || 0; var newOperationHeight = ((_operationsRef$curren2 = operationsRef.current) === null || _operationsRef$curren2 === void 0 ? void 0 : _operationsRef$curren2.offsetHeight) || 0; setWrapperWidth(offsetWidth); setWrapperHeight(offsetHeight); setAddWidth(newAddWidth); setAddHeight(newAddHeight); var newWrapperScrollWidth = (((_tabListRef$current = tabListRef.current) === null || _tabListRef$current === void 0 ? void 0 : _tabListRef$current.offsetWidth) || 0) - newAddWidth; var newWrapperScrollHeight = (((_tabListRef$current2 = tabListRef.current) === null || _tabListRef$current2 === void 0 ? void 0 : _tabListRef$current2.offsetHeight) || 0) - newAddHeight; setWrapperScrollWidth(newWrapperScrollWidth); setWrapperScrollHeight(newWrapperScrollHeight); var isOperationHidden = (_operationsRef$curren3 = operationsRef.current) === null || _operationsRef$curren3 === void 0 ? void 0 : _operationsRef$curren3.className.includes(operationsHiddenClassName); setWrapperContentWidth(newWrapperScrollWidth - (isOperationHidden ? 0 : newOperationWidth)); setWrapperContentHeight(newWrapperScrollHeight - (isOperationHidden ? 0 : newOperationHeight)); // Update buttons records setTabSizes(function () { var newSizes = new Map(); tabs.forEach(function (_ref2) { var key = _ref2.key; var btnNode = getBtnRef(key).current; if (btnNode) { newSizes.set(key, { width: btnNode.offsetWidth, height: btnNode.offsetHeight, left: btnNode.offsetLeft, top: btnNode.offsetTop }); } }); return newSizes; }); }); // ======================== Dropdown ======================= var startHiddenTabs = tabs.slice(0, visibleStart); var endHiddenTabs = tabs.slice(visibleEnd + 1); var hiddenTabs = [].concat(Object(toConsumableArray["a" /* default */])(startHiddenTabs), Object(toConsumableArray["a" /* default */])(endHiddenTabs)); // =================== Link & Operations =================== var _useState19 = Object(external_window_React_["useState"])(), _useState20 = Object(slicedToArray["a" /* default */])(_useState19, 2), inkStyle = _useState20[0], setInkStyle = _useState20[1]; var activeTabOffset = tabOffsets.get(activeKey); // Delay set ink style to avoid remove tab blink var inkBarRafRef = Object(external_window_React_["useRef"])(); function cleanInkBarRaf() { raf_default.a.cancel(inkBarRafRef.current); } Object(external_window_React_["useEffect"])(function () { var newInkStyle = {}; if (activeTabOffset) { if (tabPositionTopOrBottom) { if (rtl) { newInkStyle.right = activeTabOffset.right; } else { newInkStyle.left = activeTabOffset.left; } newInkStyle.width = activeTabOffset.width; } else { newInkStyle.top = activeTabOffset.top; newInkStyle.height = activeTabOffset.height; } } cleanInkBarRaf(); inkBarRafRef.current = raf_default()(function () { setInkStyle(newInkStyle); }); return cleanInkBarRaf; }, [activeTabOffset, tabPositionTopOrBottom, rtl]); // ========================= Effect ======================== Object(external_window_React_["useEffect"])(function () { scrollToTab(); }, [activeKey, activeTabOffset, tabOffsets, tabPositionTopOrBottom]); // Should recalculate when rtl changed Object(external_window_React_["useEffect"])(function () { onListHolderResize(); }, [rtl, tabBarGutter, activeKey, tabs.map(function (tab) { return tab.key; }).join('_')]); // ========================= Render ======================== var hasDropdown = !!hiddenTabs.length; var wrapPrefix = "".concat(prefixCls, "-nav-wrap"); var pingLeft; var pingRight; var pingTop; var pingBottom; if (tabPositionTopOrBottom) { if (rtl) { pingRight = transformLeft > 0; pingLeft = transformLeft + wrapperWidth < wrapperScrollWidth; } else { pingLeft = transformLeft < 0; pingRight = -transformLeft + wrapperWidth < wrapperScrollWidth; } } else { pingTop = transformTop < 0; pingBottom = -transformTop + wrapperHeight < wrapperScrollHeight; } /* eslint-disable jsx-a11y/interactive-supports-focus */ return external_window_React_["createElement"]("div", { ref: ref, role: "tablist", className: classnames_default()("".concat(prefixCls, "-nav"), className), style: style, onKeyDown: function onKeyDown() { // No need animation when use keyboard doLockAnimation(); } }, external_window_React_["createElement"](TabNavList_ExtraContent, { position: "left", extra: extra, prefixCls: prefixCls }), external_window_React_["createElement"](es["a" /* default */], { onResize: onListHolderResize }, external_window_React_["createElement"]("div", { className: classnames_default()(wrapPrefix, (_classNames = {}, Object(defineProperty["a" /* default */])(_classNames, "".concat(wrapPrefix, "-ping-left"), pingLeft), Object(defineProperty["a" /* default */])(_classNames, "".concat(wrapPrefix, "-ping-right"), pingRight), Object(defineProperty["a" /* default */])(_classNames, "".concat(wrapPrefix, "-ping-top"), pingTop), Object(defineProperty["a" /* default */])(_classNames, "".concat(wrapPrefix, "-ping-bottom"), pingBottom), _classNames)), ref: tabsWrapperRef }, external_window_React_["createElement"](es["a" /* default */], { onResize: onListHolderResize }, external_window_React_["createElement"]("div", { ref: tabListRef, className: "".concat(prefixCls, "-nav-list"), style: { transform: "translate(".concat(transformLeft, "px, ").concat(transformTop, "px)"), transition: lockAnimation ? 'none' : undefined } }, tabNodes, external_window_React_["createElement"](TabNavList_AddButton, { ref: innerAddButtonRef, prefixCls: prefixCls, locale: locale, editable: editable, style: { visibility: hasDropdown ? 'hidden' : null } }), external_window_React_["createElement"]("div", { className: classnames_default()("".concat(prefixCls, "-ink-bar"), Object(defineProperty["a" /* default */])({}, "".concat(prefixCls, "-ink-bar-animated"), animated.inkBar)), style: inkStyle }))))), external_window_React_["createElement"](TabNavList_OperationNode, Object.assign({}, props, { ref: operationsRef, prefixCls: prefixCls, tabs: hiddenTabs, className: !hasDropdown && operationsHiddenClassName })), external_window_React_["createElement"](TabNavList_ExtraContent, { position: "right", extra: extra, prefixCls: prefixCls })); /* eslint-enable */ } /* harmony default export */ var es_TabNavList = (external_window_React_["forwardRef"](TabNavList)); // CONCATENATED MODULE: ./node_modules/rc-tabs/es/TabPanelList/index.js function TabPanelList(_ref) { var id = _ref.id, activeKey = _ref.activeKey, animated = _ref.animated, tabPosition = _ref.tabPosition, rtl = _ref.rtl, destroyInactiveTabPane = _ref.destroyInactiveTabPane; var _React$useContext = external_window_React_["useContext"](TabContext), prefixCls = _React$useContext.prefixCls, tabs = _React$useContext.tabs; var tabPaneAnimated = animated.tabPane; var activeIndex = tabs.findIndex(function (tab) { return tab.key === activeKey; }); return external_window_React_["createElement"]("div", { className: classnames_default()("".concat(prefixCls, "-content-holder")) }, external_window_React_["createElement"]("div", { className: classnames_default()("".concat(prefixCls, "-content"), "".concat(prefixCls, "-content-").concat(tabPosition), Object(defineProperty["a" /* default */])({}, "".concat(prefixCls, "-content-animated"), tabPaneAnimated)), style: activeIndex && tabPaneAnimated ? Object(defineProperty["a" /* default */])({}, rtl ? 'marginRight' : 'marginLeft', "-".concat(activeIndex, "00%")) : null }, tabs.map(function (tab) { return external_window_React_["cloneElement"](tab.node, { key: tab.key, prefixCls: prefixCls, tabKey: tab.key, id: id, animated: tabPaneAnimated, active: tab.key === activeKey, destroyInactiveTabPane: destroyInactiveTabPane }); }))); } // CONCATENATED MODULE: ./node_modules/rc-tabs/es/TabPanelList/TabPane.js function TabPane(_ref) { var prefixCls = _ref.prefixCls, forceRender = _ref.forceRender, className = _ref.className, style = _ref.style, id = _ref.id, active = _ref.active, animated = _ref.animated, destroyInactiveTabPane = _ref.destroyInactiveTabPane, tabKey = _ref.tabKey, children = _ref.children; var _React$useState = external_window_React_["useState"](forceRender), _React$useState2 = Object(slicedToArray["a" /* default */])(_React$useState, 2), visited = _React$useState2[0], setVisited = _React$useState2[1]; external_window_React_["useEffect"](function () { if (active) { setVisited(true); } else if (destroyInactiveTabPane) { setVisited(false); } }, [active, destroyInactiveTabPane]); var mergedStyle = {}; if (!active) { if (animated) { mergedStyle.visibility = 'hidden'; mergedStyle.height = 0; mergedStyle.overflowY = 'hidden'; } else { mergedStyle.display = 'none'; } } return external_window_React_["createElement"]("div", { id: id && "".concat(id, "-panel-").concat(tabKey), role: "tabpanel", tabIndex: active ? 0 : -1, "aria-labelledby": id && "".concat(id, "-tab-").concat(tabKey), "aria-hidden": !active, style: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, mergedStyle), style), className: classnames_default()("".concat(prefixCls, "-tabpane"), active && "".concat(prefixCls, "-tabpane-active"), className) }, (active || visited || forceRender) && children); } // CONCATENATED MODULE: ./node_modules/rc-tabs/es/Tabs.js // Accessibility https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Tab_Role /** * Should added antd: * - type * * Removed: * - onNextClick * - onPrevClick * - keyboard */ // Used for accessibility var uuid = 0; function parseTabList(children) { return Object(toArray["a" /* default */])(children).map(function (node) { if (external_window_React_["isValidElement"](node)) { var key = node.key !== undefined ? String(node.key) : undefined; return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({ key: key }, node.props), {}, { node: node }); } return null; }).filter(function (tab) { return tab; }); } function Tabs(_ref, ref) { var _classNames; var id = _ref.id, _ref$prefixCls = _ref.prefixCls, prefixCls = _ref$prefixCls === void 0 ? 'rc-tabs' : _ref$prefixCls, className = _ref.className, children = _ref.children, direction = _ref.direction, activeKey = _ref.activeKey, defaultActiveKey = _ref.defaultActiveKey, editable = _ref.editable, animated = _ref.animated, _ref$tabPosition = _ref.tabPosition, tabPosition = _ref$tabPosition === void 0 ? 'top' : _ref$tabPosition, tabBarGutter = _ref.tabBarGutter, tabBarStyle = _ref.tabBarStyle, tabBarExtraContent = _ref.tabBarExtraContent, locale = _ref.locale, moreIcon = _ref.moreIcon, moreTransitionName = _ref.moreTransitionName, destroyInactiveTabPane = _ref.destroyInactiveTabPane, renderTabBar = _ref.renderTabBar, onChange = _ref.onChange, onTabClick = _ref.onTabClick, onTabScroll = _ref.onTabScroll, restProps = Object(objectWithoutProperties["a" /* default */])(_ref, ["id", "prefixCls", "className", "children", "direction", "activeKey", "defaultActiveKey", "editable", "animated", "tabPosition", "tabBarGutter", "tabBarStyle", "tabBarExtraContent", "locale", "moreIcon", "moreTransitionName", "destroyInactiveTabPane", "renderTabBar", "onChange", "onTabClick", "onTabScroll"]); var tabs = parseTabList(children); var rtl = direction === 'rtl'; var mergedAnimated; if (animated === false) { mergedAnimated = { inkBar: false, tabPane: false }; } else { mergedAnimated = Object(objectSpread2["a" /* default */])({ inkBar: true, tabPane: false }, animated !== true ? animated : null); } // ======================== Mobile ======================== var _useState = Object(external_window_React_["useState"])(false), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), mobile = _useState2[0], setMobile = _useState2[1]; Object(external_window_React_["useEffect"])(function () { // Only update on the client side setMobile(useTouchMove_isMobile()); }, []); // ====================== Active Key ====================== var _useMergedState = Object(useMergedState["a" /* default */])(function () { var _tabs$; return (_tabs$ = tabs[0]) === null || _tabs$ === void 0 ? void 0 : _tabs$.key; }, { value: activeKey, defaultValue: defaultActiveKey }), _useMergedState2 = Object(slicedToArray["a" /* default */])(_useMergedState, 2), mergedActiveKey = _useMergedState2[0], setMergedActiveKey = _useMergedState2[1]; var _useState3 = Object(external_window_React_["useState"])(function () { return tabs.findIndex(function (tab) { return tab.key === mergedActiveKey; }); }), _useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2), activeIndex = _useState4[0], setActiveIndex = _useState4[1]; // Reset active key if not exist anymore Object(external_window_React_["useEffect"])(function () { var newActiveIndex = tabs.findIndex(function (tab) { return tab.key === mergedActiveKey; }); if (newActiveIndex === -1) { var _tabs$newActiveIndex; newActiveIndex = Math.max(0, Math.min(activeIndex, tabs.length - 1)); setMergedActiveKey((_tabs$newActiveIndex = tabs[newActiveIndex]) === null || _tabs$newActiveIndex === void 0 ? void 0 : _tabs$newActiveIndex.key); } setActiveIndex(newActiveIndex); }, [tabs.map(function (tab) { return tab.key; }).join('_'), mergedActiveKey, activeIndex]); // ===================== Accessibility ==================== var _useMergedState3 = Object(useMergedState["a" /* default */])(null, { value: id }), _useMergedState4 = Object(slicedToArray["a" /* default */])(_useMergedState3, 2), mergedId = _useMergedState4[0], setMergedId = _useMergedState4[1]; var mergedTabPosition = tabPosition; if (mobile && !['left', 'right'].includes(tabPosition)) { mergedTabPosition = 'top'; } // Async generate id to avoid ssr mapping failed Object(external_window_React_["useEffect"])(function () { if (!id) { setMergedId("rc-tabs-".concat( false ? undefined : uuid)); uuid += 1; } }, []); // ======================== Events ======================== function onInternalTabClick(key, e) { onTabClick === null || onTabClick === void 0 ? void 0 : onTabClick(key, e); setMergedActiveKey(key); onChange === null || onChange === void 0 ? void 0 : onChange(key); } // ======================== Render ======================== var sharedProps = { id: mergedId, activeKey: mergedActiveKey, animated: mergedAnimated, tabPosition: mergedTabPosition, rtl: rtl, mobile: mobile }; var tabNavBar; var tabNavBarProps = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, sharedProps), {}, { editable: editable, locale: locale, moreIcon: moreIcon, moreTransitionName: moreTransitionName, tabBarGutter: tabBarGutter, onTabClick: onInternalTabClick, onTabScroll: onTabScroll, extra: tabBarExtraContent, style: tabBarStyle, panes: children }); if (renderTabBar) { tabNavBar = renderTabBar(tabNavBarProps, es_TabNavList); } else { tabNavBar = external_window_React_["createElement"](es_TabNavList, Object.assign({}, tabNavBarProps)); } return external_window_React_["createElement"](TabContext.Provider, { value: { tabs: tabs, prefixCls: prefixCls } }, external_window_React_["createElement"]("div", Object.assign({ ref: ref, id: id, className: classnames_default()(prefixCls, "".concat(prefixCls, "-").concat(mergedTabPosition), (_classNames = {}, Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-mobile"), mobile), Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-editable"), editable), Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-rtl"), rtl), _classNames), className) }, restProps), tabNavBar, external_window_React_["createElement"](TabPanelList, Object.assign({ destroyInactiveTabPane: destroyInactiveTabPane }, sharedProps, { animated: mergedAnimated })))); } var ForwardTabs = external_window_React_["forwardRef"](Tabs); ForwardTabs.TabPane = TabPane; /* harmony default export */ var es_Tabs = (ForwardTabs); // CONCATENATED MODULE: ./node_modules/rc-tabs/es/index.js /* harmony default export */ var rc_tabs_es = __webpack_exports__["b"] = (es_Tabs); /***/ }), /***/ "n6Qo": /*!**************************************************************!*\ !*** ./node_modules/rc-table/es/Footer/index.js + 2 modules ***! \**************************************************************/ /*! exports provided: default, FooterComponents */ /*! exports used: FooterComponents, default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ /*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ FooterComponents; }); // EXTERNAL MODULE: external "window.React" var external_window_React_ = __webpack_require__("cDcd"); // EXTERNAL MODULE: ./node_modules/rc-table/es/context/TableContext.js var TableContext = __webpack_require__("biw7"); // EXTERNAL MODULE: ./node_modules/rc-table/es/Cell/index.js var Cell = __webpack_require__("fyJ8"); // CONCATENATED MODULE: ./node_modules/rc-table/es/Footer/Cell.js function SummaryCell(_ref) { var className = _ref.className, index = _ref.index, children = _ref.children, colSpan = _ref.colSpan, rowSpan = _ref.rowSpan; var _React$useContext = external_window_React_["useContext"](TableContext["a" /* default */]), prefixCls = _React$useContext.prefixCls, fixedInfoList = _React$useContext.fixedInfoList; var fixedInfo = fixedInfoList[index]; return external_window_React_["createElement"](Cell["a" /* default */], Object.assign({ className: className, index: index, component: "td", prefixCls: prefixCls, record: null, dataIndex: null, render: function render() { return { children: children, props: { colSpan: colSpan, rowSpan: rowSpan } }; } }, fixedInfo)); } // CONCATENATED MODULE: ./node_modules/rc-table/es/Footer/Row.js function FooterRow(props) { return external_window_React_["createElement"]("tr", Object.assign({}, props)); } // CONCATENATED MODULE: ./node_modules/rc-table/es/Footer/index.js function Footer(_ref) { var children = _ref.children; var _React$useContext = external_window_React_["useContext"](TableContext["a" /* default */]), prefixCls = _React$useContext.prefixCls; return external_window_React_["createElement"]("tfoot", { className: "".concat(prefixCls, "-summary") }, children); } /* harmony default export */ var es_Footer = __webpack_exports__["b"] = (Footer); var FooterComponents = { Cell: SummaryCell, Row: FooterRow }; /***/ }), /***/ "p5ED": /*!*********************************************!*\ !*** ./src/components/PreviewAll/index.tsx ***! \*********************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var antd_es_button_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/es/button/style */ "+L6B"); /* harmony import */ var antd_es_button__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/es/button */ "2/Rp"); /* harmony import */ var antd_es_tooltip_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! antd/es/tooltip/style */ "5Dmo"); /* harmony import */ var antd_es_tooltip__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd/es/tooltip */ "3S7+"); /* harmony import */ var _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw"); /* harmony import */ var _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */ "tJVT"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ "cDcd"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _index_less_modules__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./index.less?modules */ "vHTk"); /* harmony import */ var _index_less_modules__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_index_less_modules__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _ant_design_icons__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ant-design/icons */ "yEEn"); /* harmony import */ var _components_monaco_editor__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/components/monaco-editor */ "ZW9T"); /* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/utils/util */ "1vsH"); /* harmony default export */ __webpack_exports__["a"] = (function (_ref) { var name = _ref.name, data = _ref.data, theme = _ref.theme, type = _ref.type, filename = _ref.filename, monacoEditor = _ref.monacoEditor, className = _ref.className, style = _ref.style, close = _ref.close, onClose = _ref.onClose, hasMask = _ref.hasMask; var _useState = Object(react__WEBPACK_IMPORTED_MODULE_6__["useState"])('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'), _useState2 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(_useState, 2), src = _useState2[0], setSrc = _useState2[1]; var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_6__["useState"])(""), _useState4 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(_useState3, 2), token = _useState4[0], setToken = _useState4[1]; var closeRef = Object(react__WEBPACK_IMPORTED_MODULE_6__["useRef"])(); if (filename) monacoEditor.filename = filename; Object(react__WEBPACK_IMPORTED_MODULE_6__["useEffect"])(function () { var _document$cookie, _document$cookie$repl; var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 ? void 0 : (_document$cookie$repl = _document$cookie.replace(/\s/g, "")) === null || _document$cookie$repl === void 0 ? void 0 : _document$cookie$repl.split(";"); cookies === null || cookies === void 0 ? void 0 : cookies.map(function (item) { var i = item.split("="); if (i[0] === '_educoder_session') { setToken(i[1]); } }); }, []); var handleClick = function handleClick() { if (data.startsWith("http")) { handleDown(); return; } Object(_utils_util__WEBPACK_IMPORTED_MODULE_10__[/* downloadFile */ "x"])(filename || 'educoder', data, filename); }; var handleDown = function handleDown() { Object(_utils_util__WEBPACK_IMPORTED_MODULE_10__[/* downLoadLink */ "v"])('', data); }; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("div", { style: Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])({}, style || {}), className: "".concat(hasMask && _index_less_modules__WEBPACK_IMPORTED_MODULE_7___default.a.bgBlack, " ").concat(!!type ? _index_less_modules__WEBPACK_IMPORTED_MODULE_7___default.a.wrp : "hide") }, close && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("div", { className: _index_less_modules__WEBPACK_IMPORTED_MODULE_7___default.a.close, ref: closeRef }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement(antd_es_tooltip__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], { title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6", getPopupContainer: function getPopupContainer() { return closeRef.current; } }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("span", { onClick: handleDown }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("i", { className: "icon-quxiaozhiding" }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement(antd_es_tooltip__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], { title: "\u5173\u95ED", getPopupContainer: function getPopupContainer() { return closeRef.current; } }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("span", { className: "", onClick: onClose }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("i", { className: "icon-guanbi1" })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("div", { className: "".concat(_index_less_modules__WEBPACK_IMPORTED_MODULE_7___default.a[className], " ").concat(className, " ").concat(_index_less_modules__WEBPACK_IMPORTED_MODULE_7___default.a.monaco, " ").concat(type === "txt" ? "show" : "hide") }, type === "txt" && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement(_components_monaco_editor__WEBPACK_IMPORTED_MODULE_9__[/* default */ "b"], monacoEditor)), type === "audio" && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("audio", { src: "".concat((data === null || data === void 0 ? void 0 : data.indexOf("http://")) > -1 || (data === null || data === void 0 ? void 0 : data.indexOf("https://")) > -1 ? "" : "data:audio/mp3;base64,").concat(data), autoPlay: true }), type === "video" && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_6___default.a.Fragment, null, (data === null || data === void 0 ? void 0 : data.indexOf("http")) > -1 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("video", { controls: true, src: "".concat(data), autoPlay: true }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("video", { controls: true, src: "data:video/mp4;base64,".concat(data), autoPlay: true })), type === 'office' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("iframe", { src: "https://view.officeapps.live.com/op/embed.aspx?src=".concat(data, "?").concat(encodeURIComponent("disposition=office&token=".concat(token))) }), type === 'pdf' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("embed", { className: _index_less_modules__WEBPACK_IMPORTED_MODULE_7___default.a.embed, src: data }), type === "image" && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("img", { src: "".concat((data === null || data === void 0 ? void 0 : data.indexOf("http://")) > -1 || (data === null || data === void 0 ? void 0 : data.indexOf("https://")) > -1 ? "" : "data:image/png;base64,").concat(data) }), type === "other" && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement(antd_es_button__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"], { type: "primary", size: "large", onClick: handleClick }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement(_ant_design_icons__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], null), "\u70B9\u51FB\u4E0B\u8F7D")), type === "download" && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement(antd_es_button__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"], { type: "primary", size: "large", onClick: handleClick }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement(_ant_design_icons__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], null), "\u70B9\u51FB\u4E0B\u8F7D")); }); /***/ }), /***/ "rAM+": /*!*******************************************************************************************************************!*\ !*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js ***! \*******************************************************************************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createForOfIteratorHelper; }); /* harmony import */ var _babel_runtime_helpers_esm_unsupportedIterableToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/unsupportedIterableToArray */ "Qw5x"); function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = Object(_babel_runtime_helpers_esm_unsupportedIterableToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } /***/ }), /***/ "sR1s": /*!*****************************************************!*\ !*** ./node_modules/rc-table/es/utils/valueUtil.js ***! \*****************************************************/ /*! exports provided: getPathValue, getColumnsKey, mergeObject, validateValue */ /*! exports used: getColumnsKey, getPathValue, mergeObject, validateValue */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getPathValue; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getColumnsKey; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return mergeObject; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return validateValue; }); /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "U8pU"); var INTERNAL_KEY_PREFIX = 'RC_TABLE_KEY'; function toArray(arr) { if (arr === undefined || arr === null) { return []; } return Array.isArray(arr) ? arr : [arr]; } function getPathValue(record, path) { // Skip if path is empty if (!path && typeof path !== 'number') { return record; } var pathList = toArray(path); var current = record; for (var i = 0; i < pathList.length; i += 1) { if (!current) { return null; } var prop = pathList[i]; current = current[prop]; } return current; } function getColumnsKey(columns) { var columnKeys = []; var keys = {}; columns.forEach(function (column) { var _ref = column || {}, key = _ref.key, dataIndex = _ref.dataIndex; var mergedKey = key || toArray(dataIndex).join('-') || INTERNAL_KEY_PREFIX; while (keys[mergedKey]) { mergedKey = "".concat(mergedKey, "_next"); } keys[mergedKey] = true; columnKeys.push(mergedKey); }); return columnKeys; } function mergeObject() { var merged = {}; /* eslint-disable no-param-reassign */ function fillProps(obj, clone) { if (clone) { Object.keys(clone).forEach(function (key) { var value = clone[key]; if (value && Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(value) === 'object') { obj[key] = obj[key] || {}; fillProps(obj[key], value); } else { obj[key] = value; } }); } } /* eslint-enable */ for (var _len = arguments.length, objects = new Array(_len), _key = 0; _key < _len; _key++) { objects[_key] = arguments[_key]; } objects.forEach(function (clone) { fillProps(merged, clone); }); return merged; } function validateValue(val) { return val !== null && val !== undefined; } /***/ }), /***/ "sboe": /*!*************************************************!*\ !*** ./node_modules/rc-tree/es/contextTypes.js ***! \*************************************************/ /*! exports provided: TreeContext */ /*! exports used: TreeContext */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return TreeContext; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "cDcd"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /** * Webpack has bug for import loop, which is not the same behavior as ES module. * When util.js imports the TreeNode for tree generate will cause treeContextTypes be empty. */ var TreeContext = react__WEBPACK_IMPORTED_MODULE_0__["createContext"](null); /***/ }), /***/ "t23M": /*!*****************************************************!*\ !*** ./node_modules/rc-resize-observer/es/index.js ***! \*****************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "VTBJ"); /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "1OyB"); /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "vuIU"); /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "Ji7U"); /* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ "LK+K"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "cDcd"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var rc_util_es_Dom_findDOMNode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/Dom/findDOMNode */ "m+aA"); /* harmony import */ var rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rc-util/es/Children/toArray */ "Zm9Q"); /* harmony import */ var rc_util_es_warning__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rc-util/es/warning */ "Kwbf"); /* harmony import */ var rc_util_es_ref__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rc-util/es/ref */ "c+Xe"); /* harmony import */ var resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! resize-observer-polyfill */ "bdgK"); var INTERNAL_PREFIX_KEY = 'rc-observer-key'; // Still need to be compatible with React 15, we use class component here var ReactResizeObserver = /*#__PURE__*/function (_React$Component) { Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(ReactResizeObserver, _React$Component); var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(ReactResizeObserver); function ReactResizeObserver() { var _this; Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(this, ReactResizeObserver); _this = _super.apply(this, arguments); _this.resizeObserver = null; _this.childNode = null; _this.currentElement = null; _this.state = { width: 0, height: 0, offsetHeight: 0, offsetWidth: 0 }; _this.onResize = function (entries) { var onResize = _this.props.onResize; var target = entries[0].target; var _target$getBoundingCl = target.getBoundingClientRect(), width = _target$getBoundingCl.width, height = _target$getBoundingCl.height; var offsetWidth = target.offsetWidth, offsetHeight = target.offsetHeight; /** * Resize observer trigger when content size changed. * In most case we just care about element size, * let's use `boundary` instead of `contentRect` here to avoid shaking. */ var fixedWidth = Math.floor(width); var fixedHeight = Math.floor(height); if (_this.state.width !== fixedWidth || _this.state.height !== fixedHeight || _this.state.offsetWidth !== offsetWidth || _this.state.offsetHeight !== offsetHeight) { var size = { width: fixedWidth, height: fixedHeight, offsetWidth: offsetWidth, offsetHeight: offsetHeight }; _this.setState(size); if (onResize) { // defer the callback but not defer to next frame Promise.resolve().then(function () { onResize(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, size), {}, { offsetWidth: offsetWidth, offsetHeight: offsetHeight })); }); } } }; _this.setChildNode = function (node) { _this.childNode = node; }; return _this; } Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(ReactResizeObserver, [{ key: "componentDidMount", value: function componentDidMount() { this.onComponentUpdated(); } }, { key: "componentDidUpdate", value: function componentDidUpdate() { this.onComponentUpdated(); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.destroyObserver(); } }, { key: "onComponentUpdated", value: function onComponentUpdated() { var disabled = this.props.disabled; // Unregister if disabled if (disabled) { this.destroyObserver(); return; } // Unregister if element changed var element = Object(rc_util_es_Dom_findDOMNode__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(this.childNode || this); var elementChanged = element !== this.currentElement; if (elementChanged) { this.destroyObserver(); this.currentElement = element; } if (!this.resizeObserver && element) { this.resizeObserver = new resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_10__["default"](this.onResize); this.resizeObserver.observe(element); } } }, { key: "destroyObserver", value: function destroyObserver() { if (this.resizeObserver) { this.resizeObserver.disconnect(); this.resizeObserver = null; } } }, { key: "render", value: function render() { var children = this.props.children; var childNodes = Object(rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(children); if (childNodes.length > 1) { Object(rc_util_es_warning__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(false, 'Find more than one child node with `children` in ResizeObserver. Will only observe first one.'); } else if (childNodes.length === 0) { Object(rc_util_es_warning__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(false, '`children` of ResizeObserver is empty. Nothing is in observe.'); return null; } var childNode = childNodes[0]; if (react__WEBPACK_IMPORTED_MODULE_5__["isValidElement"](childNode) && Object(rc_util_es_ref__WEBPACK_IMPORTED_MODULE_9__[/* supportRef */ "c"])(childNode)) { var ref = childNode.ref; childNodes[0] = react__WEBPACK_IMPORTED_MODULE_5__["cloneElement"](childNode, { ref: Object(rc_util_es_ref__WEBPACK_IMPORTED_MODULE_9__[/* composeRef */ "a"])(ref, this.setChildNode) }); } return childNodes.length === 1 ? childNodes[0] : childNodes.map(function (node, index) { if (!react__WEBPACK_IMPORTED_MODULE_5__["isValidElement"](node) || 'key' in node && node.key !== null) { return node; } return react__WEBPACK_IMPORTED_MODULE_5__["cloneElement"](node, { key: "".concat(INTERNAL_PREFIX_KEY, "-").concat(index) }); }); } }]); return ReactResizeObserver; }(react__WEBPACK_IMPORTED_MODULE_5__["Component"]); ReactResizeObserver.displayName = 'ResizeObserver'; /* harmony default export */ __webpack_exports__["a"] = (ReactResizeObserver); /***/ }), /***/ "vHTk": /*!******************************************************!*\ !*** ./src/components/PreviewAll/index.less?modules ***! \******************************************************/ /*! no static exports found */ /*! exports used: default */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin module.exports = {"wrp":"wrp___z2l1F","bgBlack":"bgBlack___3ezfX","monaco":"monaco___1ypjT","darkBlue":"darkBlue___2ViJc","close":"close___3q-z4","embed":"embed___3dQqc"}; /***/ }), /***/ "wCXF": /*!********************************************************!*\ !*** ./node_modules/rc-table/es/Table.js + 17 modules ***! \********************************************************/ /*! exports provided: INTERNAL_HOOKS, default */ /*! exports used: INTERNAL_HOOKS, default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/Table.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/Table.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/Table.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/Table.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/Table.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/Table.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/Table.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ INTERNAL_HOOKS; }); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js var defineProperty = __webpack_require__("rePB"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js var objectSpread2 = __webpack_require__("VTBJ"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules var toConsumableArray = __webpack_require__("KQm4"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js var esm_typeof = __webpack_require__("U8pU"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules var slicedToArray = __webpack_require__("ODXe"); // EXTERNAL MODULE: external "window.React" var external_window_React_ = __webpack_require__("cDcd"); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__("TSYQ"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: ./node_modules/shallowequal/index.js var shallowequal = __webpack_require__("Gytx"); var shallowequal_default = /*#__PURE__*/__webpack_require__.n(shallowequal); // EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js var warning = __webpack_require__("Kwbf"); // EXTERNAL MODULE: ./node_modules/rc-resize-observer/es/index.js var es = __webpack_require__("t23M"); // EXTERNAL MODULE: ./node_modules/rc-util/es/getScrollBarSize.js var getScrollBarSize = __webpack_require__("qx4F"); // EXTERNAL MODULE: ./node_modules/rc-table/es/sugar/ColumnGroup.js var ColumnGroup = __webpack_require__("6eGT"); // EXTERNAL MODULE: ./node_modules/rc-table/es/sugar/Column.js var Column = __webpack_require__("IBYe"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js var objectWithoutProperties = __webpack_require__("Ff2n"); // EXTERNAL MODULE: ./node_modules/rc-util/es/ref.js var es_ref = __webpack_require__("c+Xe"); // EXTERNAL MODULE: ./node_modules/rc-table/es/Cell/index.js var Cell = __webpack_require__("fyJ8"); // EXTERNAL MODULE: ./node_modules/rc-table/es/context/TableContext.js var TableContext = __webpack_require__("biw7"); // CONCATENATED MODULE: ./node_modules/rc-table/es/utils/fixUtil.js function getCellFixedInfo(colStart, colEnd, columns, stickyOffsets, direction) { var startColumn = columns[colStart] || {}; var endColumn = columns[colEnd] || {}; var fixLeft; var fixRight; if (startColumn.fixed === 'left') { fixLeft = stickyOffsets.left[colStart]; } else if (endColumn.fixed === 'right') { fixRight = stickyOffsets.right[colEnd]; } var lastFixLeft = false; var firstFixRight = false; var lastFixRight = false; var firstFixLeft = false; var nextColumn = columns[colEnd + 1]; var prevColumn = columns[colStart - 1]; if (direction === 'rtl') { if (fixLeft !== undefined) { var prevFixLeft = prevColumn && prevColumn.fixed === 'left'; firstFixLeft = !prevFixLeft; } else if (fixRight !== undefined) { var nextFixRight = nextColumn && nextColumn.fixed === 'right'; lastFixRight = !nextFixRight; } } else if (fixLeft !== undefined) { var nextFixLeft = nextColumn && nextColumn.fixed === 'left'; lastFixLeft = !nextFixLeft; } else if (fixRight !== undefined) { var prevFixRight = prevColumn && prevColumn.fixed === 'right'; firstFixRight = !prevFixRight; } return { fixLeft: fixLeft, fixRight: fixRight, lastFixLeft: lastFixLeft, firstFixRight: firstFixRight, lastFixRight: lastFixRight, firstFixLeft: firstFixLeft, isSticky: stickyOffsets.isSticky }; } // EXTERNAL MODULE: ./node_modules/rc-table/es/utils/valueUtil.js var valueUtil = __webpack_require__("sR1s"); // CONCATENATED MODULE: ./node_modules/rc-table/es/Header/HeaderRow.js function HeaderRow(_ref) { var cells = _ref.cells, stickyOffsets = _ref.stickyOffsets, flattenColumns = _ref.flattenColumns, RowComponent = _ref.rowComponent, CellComponent = _ref.cellComponent, onHeaderRow = _ref.onHeaderRow, index = _ref.index; var _React$useContext = external_window_React_["useContext"](TableContext["a" /* default */]), prefixCls = _React$useContext.prefixCls, direction = _React$useContext.direction; var rowProps; if (onHeaderRow) { rowProps = onHeaderRow(cells.map(function (cell) { return cell.column; }), index); } var columnsKey = Object(valueUtil["a" /* getColumnsKey */])(cells.map(function (cell) { return cell.column; })); return external_window_React_["createElement"](RowComponent, Object.assign({}, rowProps), cells.map(function (cell, cellIndex) { var column = cell.column; var fixedInfo = getCellFixedInfo(cell.colStart, cell.colEnd, flattenColumns, stickyOffsets, direction); var additionalProps; if (column && column.onHeaderCell) { additionalProps = cell.column.onHeaderCell(column); } return external_window_React_["createElement"](Cell["a" /* default */], Object.assign({}, cell, { ellipsis: column.ellipsis, align: column.align, component: CellComponent, prefixCls: prefixCls, key: columnsKey[cellIndex] }, fixedInfo, { additionalProps: additionalProps, rowType: "header" })); })); } HeaderRow.displayName = 'HeaderRow'; /* harmony default export */ var Header_HeaderRow = (HeaderRow); // CONCATENATED MODULE: ./node_modules/rc-table/es/Header/Header.js function parseHeaderRows(rootColumns) { var rows = []; function fillRowCells(columns, colIndex) { var rowIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; // Init rows rows[rowIndex] = rows[rowIndex] || []; var currentColIndex = colIndex; var colSpans = columns.filter(Boolean).map(function (column) { var cell = { key: column.key, className: column.className || '', children: column.title, column: column, colStart: currentColIndex }; var colSpan = 1; var subColumns = column.children; if (subColumns && subColumns.length > 0) { colSpan = fillRowCells(subColumns, currentColIndex, rowIndex + 1).reduce(function (total, count) { return total + count; }, 0); cell.hasSubColumns = true; } if ('colSpan' in column) { colSpan = column.colSpan; } if ('rowSpan' in column) { cell.rowSpan = column.rowSpan; } cell.colSpan = colSpan; cell.colEnd = cell.colStart + colSpan - 1; rows[rowIndex].push(cell); currentColIndex += colSpan; return colSpan; }); return colSpans; } // Generate `rows` cell data fillRowCells(rootColumns, 0); // Handle `rowSpan` var rowCount = rows.length; var _loop = function _loop(rowIndex) { rows[rowIndex].forEach(function (cell) { if (!('rowSpan' in cell) && !cell.hasSubColumns) { // eslint-disable-next-line no-param-reassign cell.rowSpan = rowCount - rowIndex; } }); }; for (var rowIndex = 0; rowIndex < rowCount; rowIndex += 1) { _loop(rowIndex); } return rows; } function Header(_ref) { var stickyOffsets = _ref.stickyOffsets, columns = _ref.columns, flattenColumns = _ref.flattenColumns, onHeaderRow = _ref.onHeaderRow; var _React$useContext = external_window_React_["useContext"](TableContext["a" /* default */]), prefixCls = _React$useContext.prefixCls, getComponent = _React$useContext.getComponent; var rows = external_window_React_["useMemo"](function () { return parseHeaderRows(columns); }, [columns]); var WrapperComponent = getComponent(['header', 'wrapper'], 'thead'); var trComponent = getComponent(['header', 'row'], 'tr'); var thComponent = getComponent(['header', 'cell'], 'th'); return external_window_React_["createElement"](WrapperComponent, { className: "".concat(prefixCls, "-thead") }, rows.map(function (row, rowIndex) { var rowNode = external_window_React_["createElement"](Header_HeaderRow, { key: rowIndex, flattenColumns: flattenColumns, cells: row, stickyOffsets: stickyOffsets, rowComponent: trComponent, cellComponent: thComponent, onHeaderRow: onHeaderRow, index: rowIndex }); return rowNode; })); } /* harmony default export */ var Header_Header = (Header); // EXTERNAL MODULE: ./node_modules/rc-table/es/utils/legacyUtil.js var legacyUtil = __webpack_require__("hW8S"); // CONCATENATED MODULE: ./node_modules/rc-table/es/ColGroup.js function ColGroup(_ref) { var colWidths = _ref.colWidths, columns = _ref.columns, columCount = _ref.columCount; var cols = []; var len = columCount || columns.length; // Only insert col with width & additional props // Skip if rest col do not have any useful info var mustInsert = false; for (var i = len - 1; i >= 0; i -= 1) { var width = colWidths[i]; var column = columns && columns[i]; var additionalProps = column && column[legacyUtil["a" /* INTERNAL_COL_DEFINE */]]; if (width || additionalProps || mustInsert) { cols.unshift(external_window_React_["createElement"]("col", Object.assign({ key: i, style: { width: width, minWidth: width } }, additionalProps))); mustInsert = true; } } return external_window_React_["createElement"]("colgroup", null, cols); } /* harmony default export */ var es_ColGroup = (ColGroup); // CONCATENATED MODULE: ./node_modules/rc-table/es/Header/FixedHeader.js function useColumnWidth(colWidths, columCount) { return Object(external_window_React_["useMemo"])(function () { var cloneColumns = []; for (var i = 0; i < columCount; i += 1) { var val = colWidths[i]; if (val !== undefined) { cloneColumns[i] = val; } else { return null; } } return cloneColumns; }, [colWidths.join('_'), columCount]); } var FixedHeader = external_window_React_["forwardRef"](function (_ref, ref) { var noData = _ref.noData, columns = _ref.columns, flattenColumns = _ref.flattenColumns, colWidths = _ref.colWidths, columCount = _ref.columCount, stickyOffsets = _ref.stickyOffsets, direction = _ref.direction, fixHeader = _ref.fixHeader, offsetHeader = _ref.offsetHeader, stickyClassName = _ref.stickyClassName, onScroll = _ref.onScroll, props = Object(objectWithoutProperties["a" /* default */])(_ref, ["noData", "columns", "flattenColumns", "colWidths", "columCount", "stickyOffsets", "direction", "fixHeader", "offsetHeader", "stickyClassName", "onScroll"]); var _React$useContext = external_window_React_["useContext"](TableContext["a" /* default */]), prefixCls = _React$useContext.prefixCls, scrollbarSize = _React$useContext.scrollbarSize, isSticky = _React$useContext.isSticky; var combinationScrollBarSize = isSticky && !fixHeader ? 0 : scrollbarSize; // Pass wheel to scroll event var scrollRef = external_window_React_["useRef"](null); var setScrollRef = external_window_React_["useCallback"](function (element) { Object(es_ref["b" /* fillRef */])(ref, element); Object(es_ref["b" /* fillRef */])(scrollRef, element); }, []); external_window_React_["useEffect"](function () { var _scrollRef$current; function onWheel(e) { var currentTarget = e.currentTarget, deltaX = e.deltaX; if (deltaX) { onScroll({ currentTarget: currentTarget, scrollLeft: currentTarget.scrollLeft + deltaX }); e.preventDefault(); } } (_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 ? void 0 : _scrollRef$current.addEventListener('wheel', onWheel); return function () { var _scrollRef$current2; (_scrollRef$current2 = scrollRef.current) === null || _scrollRef$current2 === void 0 ? void 0 : _scrollRef$current2.removeEventListener('wheel', onWheel); }; }, []); // Add scrollbar column var lastColumn = flattenColumns[flattenColumns.length - 1]; var ScrollBarColumn = { fixed: lastColumn ? lastColumn.fixed : null, onHeaderCell: function onHeaderCell() { return { className: "".concat(prefixCls, "-cell-scrollbar") }; } }; var columnsWithScrollbar = Object(external_window_React_["useMemo"])(function () { return combinationScrollBarSize ? [].concat(Object(toConsumableArray["a" /* default */])(columns), [ScrollBarColumn]) : columns; }, [combinationScrollBarSize, columns]); var flattenColumnsWithScrollbar = Object(external_window_React_["useMemo"])(function () { return combinationScrollBarSize ? [].concat(Object(toConsumableArray["a" /* default */])(flattenColumns), [ScrollBarColumn]) : flattenColumns; }, [combinationScrollBarSize, flattenColumns]); // Calculate the sticky offsets var headerStickyOffsets = Object(external_window_React_["useMemo"])(function () { var right = stickyOffsets.right, left = stickyOffsets.left; return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, stickyOffsets), {}, { left: direction === 'rtl' ? [].concat(Object(toConsumableArray["a" /* default */])(left.map(function (width) { return width + combinationScrollBarSize; })), [0]) : left, right: direction === 'rtl' ? right : [].concat(Object(toConsumableArray["a" /* default */])(right.map(function (width) { return width + combinationScrollBarSize; })), [0]), isSticky: isSticky }); }, [combinationScrollBarSize, stickyOffsets, isSticky]); var mergedColumnWidth = useColumnWidth(colWidths, columCount); return external_window_React_["createElement"]("div", { style: Object(objectSpread2["a" /* default */])({ overflow: 'hidden' }, isSticky ? { top: offsetHeader } : {}), ref: setScrollRef, className: classnames_default()("".concat(prefixCls, "-header"), Object(defineProperty["a" /* default */])({}, stickyClassName, !!stickyClassName)) }, external_window_React_["createElement"]("table", { style: { tableLayout: 'fixed', visibility: noData || mergedColumnWidth ? null : 'hidden' } }, external_window_React_["createElement"](es_ColGroup, { colWidths: mergedColumnWidth ? [].concat(Object(toConsumableArray["a" /* default */])(mergedColumnWidth), [combinationScrollBarSize]) : [], columCount: columCount + 1, columns: flattenColumnsWithScrollbar }), external_window_React_["createElement"](Header_Header, Object.assign({}, props, { stickyOffsets: headerStickyOffsets, columns: columnsWithScrollbar, flattenColumns: flattenColumnsWithScrollbar })))); }); FixedHeader.displayName = 'FixedHeader'; /* harmony default export */ var Header_FixedHeader = (FixedHeader); // CONCATENATED MODULE: ./node_modules/rc-table/es/context/BodyContext.js var BodyContext = external_window_React_["createContext"](null); /* harmony default export */ var context_BodyContext = (BodyContext); // CONCATENATED MODULE: ./node_modules/rc-table/es/Body/ExpandedRow.js function ExpandedRow(_ref) { var prefixCls = _ref.prefixCls, children = _ref.children, Component = _ref.component, cellComponent = _ref.cellComponent, fixHeader = _ref.fixHeader, fixColumn = _ref.fixColumn, horizonScroll = _ref.horizonScroll, className = _ref.className, expanded = _ref.expanded, componentWidth = _ref.componentWidth, colSpan = _ref.colSpan; var _React$useContext = external_window_React_["useContext"](TableContext["a" /* default */]), scrollbarSize = _React$useContext.scrollbarSize; // Cache render node return external_window_React_["useMemo"](function () { var contentNode = children; if (fixColumn) { contentNode = external_window_React_["createElement"]("div", { style: { width: componentWidth - (fixHeader ? scrollbarSize : 0), position: 'sticky', left: 0, overflow: 'hidden' }, className: "".concat(prefixCls, "-expanded-row-fixed") }, contentNode); } return external_window_React_["createElement"](Component, { className: className, style: { display: expanded ? null : 'none' } }, external_window_React_["createElement"](Cell["a" /* default */], { component: cellComponent, prefixCls: prefixCls, colSpan: colSpan }, contentNode)); }, [children, Component, fixHeader, horizonScroll, className, expanded, componentWidth, colSpan, scrollbarSize]); } /* harmony default export */ var Body_ExpandedRow = (ExpandedRow); // CONCATENATED MODULE: ./node_modules/rc-table/es/Body/BodyRow.js function BodyRow(props) { var className = props.className, style = props.style, record = props.record, index = props.index, rowKey = props.rowKey, getRowKey = props.getRowKey, rowExpandable = props.rowExpandable, expandedKeys = props.expandedKeys, onRow = props.onRow, _props$indent = props.indent, indent = _props$indent === void 0 ? 0 : _props$indent, RowComponent = props.rowComponent, cellComponent = props.cellComponent, childrenColumnName = props.childrenColumnName; var _React$useContext = external_window_React_["useContext"](TableContext["a" /* default */]), prefixCls = _React$useContext.prefixCls, fixedInfoList = _React$useContext.fixedInfoList; var _React$useContext2 = external_window_React_["useContext"](context_BodyContext), fixHeader = _React$useContext2.fixHeader, fixColumn = _React$useContext2.fixColumn, horizonScroll = _React$useContext2.horizonScroll, componentWidth = _React$useContext2.componentWidth, flattenColumns = _React$useContext2.flattenColumns, expandableType = _React$useContext2.expandableType, expandRowByClick = _React$useContext2.expandRowByClick, onTriggerExpand = _React$useContext2.onTriggerExpand, rowClassName = _React$useContext2.rowClassName, expandedRowClassName = _React$useContext2.expandedRowClassName, indentSize = _React$useContext2.indentSize, expandIcon = _React$useContext2.expandIcon, expandedRowRender = _React$useContext2.expandedRowRender, expandIconColumnIndex = _React$useContext2.expandIconColumnIndex; var _React$useState = external_window_React_["useState"](false), _React$useState2 = Object(slicedToArray["a" /* default */])(_React$useState, 2), expandRended = _React$useState2[0], setExpandRended = _React$useState2[1]; var expanded = expandedKeys && expandedKeys.has(props.recordKey); external_window_React_["useEffect"](function () { if (expanded) { setExpandRended(true); } }, [expanded]); var rowSupportExpand = expandableType === 'row' && (!rowExpandable || rowExpandable(record)); // Only when row is not expandable and `children` exist in record var nestExpandable = expandableType === 'nest'; var hasNestChildren = childrenColumnName && record && record[childrenColumnName]; var mergedExpandable = rowSupportExpand || nestExpandable; // =========================== onRow =========================== var additionalProps; if (onRow) { additionalProps = onRow(record, index); } var onClick = function onClick(event) { if (expandRowByClick && mergedExpandable) { onTriggerExpand(record, event); } if (additionalProps && additionalProps.onClick) { var _additionalProps; for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } (_additionalProps = additionalProps).onClick.apply(_additionalProps, [event].concat(args)); } }; // ======================== Base tr row ======================== var computeRowClassName; if (typeof rowClassName === 'string') { computeRowClassName = rowClassName; } else if (typeof rowClassName === 'function') { computeRowClassName = rowClassName(record, index, indent); } var columnsKey = Object(valueUtil["a" /* getColumnsKey */])(flattenColumns); var baseRowNode = external_window_React_["createElement"](RowComponent, Object.assign({}, additionalProps, { "data-row-key": rowKey, className: classnames_default()(className, "".concat(prefixCls, "-row"), "".concat(prefixCls, "-row-level-").concat(indent), computeRowClassName, additionalProps && additionalProps.className), style: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, style), additionalProps ? additionalProps.style : null), onClick: onClick }), flattenColumns.map(function (column, colIndex) { var render = column.render, dataIndex = column.dataIndex, columnClassName = column.className; var key = columnsKey[colIndex]; var fixedInfo = fixedInfoList[colIndex]; // ============= Used for nest expandable ============= var appendCellNode; if (colIndex === (expandIconColumnIndex || 0) && nestExpandable) { appendCellNode = external_window_React_["createElement"](external_window_React_["Fragment"], null, external_window_React_["createElement"]("span", { style: { paddingLeft: "".concat(indentSize * indent, "px") }, className: "".concat(prefixCls, "-row-indent indent-level-").concat(indent) }), expandIcon({ prefixCls: prefixCls, expanded: expanded, expandable: hasNestChildren, record: record, onExpand: onTriggerExpand })); } var additionalCellProps; if (column.onCell) { additionalCellProps = column.onCell(record, index); } return external_window_React_["createElement"](Cell["a" /* default */], Object.assign({ className: columnClassName, ellipsis: column.ellipsis, align: column.align, component: cellComponent, prefixCls: prefixCls, key: key, record: record, index: index, dataIndex: dataIndex, render: render, shouldCellUpdate: column.shouldCellUpdate }, fixedInfo, { appendNode: appendCellNode, additionalProps: additionalCellProps })); })); // ======================== Expand Row ========================= var expandRowNode; if (rowSupportExpand && (expandRended || expanded)) { var expandContent = expandedRowRender(record, index, indent + 1, expanded); var computedExpandedRowClassName = expandedRowClassName && expandedRowClassName(record, index, indent); expandRowNode = external_window_React_["createElement"](Body_ExpandedRow, { expanded: expanded, className: classnames_default()("".concat(prefixCls, "-expanded-row"), "".concat(prefixCls, "-expanded-row-level-").concat(indent + 1), computedExpandedRowClassName), prefixCls: prefixCls, fixHeader: fixHeader, fixColumn: fixColumn, horizonScroll: horizonScroll, component: RowComponent, componentWidth: componentWidth, cellComponent: cellComponent, colSpan: flattenColumns.length }, expandContent); } // ========================= Nest Row ========================== var nestRowNode; if (hasNestChildren && expanded) { nestRowNode = (record[childrenColumnName] || []).map(function (subRecord, subIndex) { var subKey = getRowKey(subRecord, subIndex); return external_window_React_["createElement"](BodyRow, Object.assign({}, props, { key: subKey, rowKey: subKey, record: subRecord, recordKey: subKey, index: subIndex, indent: indent + 1 })); }); } return external_window_React_["createElement"](external_window_React_["Fragment"], null, baseRowNode, expandRowNode, nestRowNode); } BodyRow.displayName = 'BodyRow'; /* harmony default export */ var Body_BodyRow = (BodyRow); // CONCATENATED MODULE: ./node_modules/rc-table/es/context/ResizeContext.js var ResizeContext = external_window_React_["createContext"](null); /* harmony default export */ var context_ResizeContext = (ResizeContext); // CONCATENATED MODULE: ./node_modules/rc-table/es/Body/MeasureCell.js function MeasureCell(_ref) { var columnKey = _ref.columnKey, onColumnResize = _ref.onColumnResize; var cellRef = external_window_React_["useRef"](); external_window_React_["useEffect"](function () { if (cellRef.current) { onColumnResize(columnKey, cellRef.current.offsetWidth); } }, []); return external_window_React_["createElement"](es["a" /* default */], { onResize: function onResize(_ref2) { var offsetWidth = _ref2.offsetWidth; onColumnResize(columnKey, offsetWidth); } }, external_window_React_["createElement"]("td", { ref: cellRef, style: { padding: 0, border: 0, height: 0 } }, external_window_React_["createElement"]("div", { style: { height: 0, overflow: 'hidden' } }, "\xA0"))); } // CONCATENATED MODULE: ./node_modules/rc-table/es/Body/index.js function Body(_ref) { var data = _ref.data, getRowKey = _ref.getRowKey, measureColumnWidth = _ref.measureColumnWidth, expandedKeys = _ref.expandedKeys, onRow = _ref.onRow, rowExpandable = _ref.rowExpandable, emptyNode = _ref.emptyNode, childrenColumnName = _ref.childrenColumnName; var _React$useContext = external_window_React_["useContext"](context_ResizeContext), onColumnResize = _React$useContext.onColumnResize; var _React$useContext2 = external_window_React_["useContext"](TableContext["a" /* default */]), prefixCls = _React$useContext2.prefixCls, getComponent = _React$useContext2.getComponent; var _React$useContext3 = external_window_React_["useContext"](context_BodyContext), fixHeader = _React$useContext3.fixHeader, horizonScroll = _React$useContext3.horizonScroll, flattenColumns = _React$useContext3.flattenColumns, componentWidth = _React$useContext3.componentWidth; return external_window_React_["useMemo"](function () { var WrapperComponent = getComponent(['body', 'wrapper'], 'tbody'); var trComponent = getComponent(['body', 'row'], 'tr'); var tdComponent = getComponent(['body', 'cell'], 'td'); var rows; if (data.length) { rows = data.map(function (record, index) { var key = getRowKey(record, index); return external_window_React_["createElement"](Body_BodyRow, { key: key, rowKey: key, record: record, recordKey: key, index: index, rowComponent: trComponent, cellComponent: tdComponent, expandedKeys: expandedKeys, onRow: onRow, getRowKey: getRowKey, rowExpandable: rowExpandable, childrenColumnName: childrenColumnName }); }); } else { rows = external_window_React_["createElement"](Body_ExpandedRow, { expanded: true, className: "".concat(prefixCls, "-placeholder"), prefixCls: prefixCls, fixHeader: fixHeader, fixColumn: horizonScroll, horizonScroll: horizonScroll, component: trComponent, componentWidth: componentWidth, cellComponent: tdComponent, colSpan: flattenColumns.length }, emptyNode); } var columnsKey = Object(valueUtil["a" /* getColumnsKey */])(flattenColumns); return external_window_React_["createElement"](WrapperComponent, { className: "".concat(prefixCls, "-tbody") }, measureColumnWidth && external_window_React_["createElement"]("tr", { "aria-hidden": "true", className: "".concat(prefixCls, "-measure-row"), style: { height: 0 } }, columnsKey.map(function (columnKey) { return external_window_React_["createElement"](MeasureCell, { key: columnKey, columnKey: columnKey, onColumnResize: onColumnResize }); })), rows); }, [data, prefixCls, onRow, measureColumnWidth, expandedKeys, getRowKey, getComponent, componentWidth, emptyNode, flattenColumns]); } var MemoBody = external_window_React_["memo"](Body); MemoBody.displayName = 'Body'; /* harmony default export */ var es_Body = (MemoBody); // EXTERNAL MODULE: ./node_modules/rc-table/es/hooks/useColumns.js var useColumns = __webpack_require__("wRmb"); // EXTERNAL MODULE: ./node_modules/raf/index.js var raf = __webpack_require__("xEkU"); var raf_default = /*#__PURE__*/__webpack_require__.n(raf); // CONCATENATED MODULE: ./node_modules/rc-table/es/hooks/useFrame.js function useFrameState(defaultState) { var stateRef = Object(external_window_React_["useRef"])(defaultState); var _useState = Object(external_window_React_["useState"])({}), _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2), forceUpdate = _useState2[1]; var timeoutRef = Object(external_window_React_["useRef"])(null); var updateBatchRef = Object(external_window_React_["useRef"])([]); function setFrameState(updater) { if (timeoutRef.current === null) { updateBatchRef.current = []; timeoutRef.current = raf_default()(function () { updateBatchRef.current.forEach(function (batchUpdater) { stateRef.current = batchUpdater(stateRef.current); }); timeoutRef.current = null; forceUpdate({}); }); } updateBatchRef.current.push(updater); } Object(external_window_React_["useEffect"])(function () { return function () { raf_default.a.cancel(timeoutRef.current); }; }, []); return [stateRef.current, setFrameState]; } /** Lock frame, when frame pass reset the lock. */ function useTimeoutLock(defaultState) { var frameRef = Object(external_window_React_["useRef"])(defaultState); var timeoutRef = Object(external_window_React_["useRef"])(null); function cleanUp() { window.clearTimeout(timeoutRef.current); } function setState(newState) { frameRef.current = newState; cleanUp(); timeoutRef.current = window.setTimeout(function () { frameRef.current = null; timeoutRef.current = null; }, 100); } function getState() { return frameRef.current; } Object(external_window_React_["useEffect"])(function () { return cleanUp; }, []); return [setState, getState]; } // CONCATENATED MODULE: ./node_modules/rc-table/es/hooks/useStickyOffsets.js /** * Get sticky column offset width */ function useStickyOffsets(colWidths, columCount, direction) { var stickyOffsets = Object(external_window_React_["useMemo"])(function () { var leftOffsets = []; var rightOffsets = []; var left = 0; var right = 0; for (var start = 0; start < columCount; start += 1) { if (direction === 'rtl') { // Left offset rightOffsets[start] = right; right += colWidths[start] || 0; // Right offset var end = columCount - start - 1; leftOffsets[end] = left; left += colWidths[end] || 0; } else { // Left offset leftOffsets[start] = left; left += colWidths[start] || 0; // Right offset var _end = columCount - start - 1; rightOffsets[_end] = right; right += colWidths[_end] || 0; } } return { left: leftOffsets, right: rightOffsets }; }, [colWidths, columCount, direction]); return stickyOffsets; } /* harmony default export */ var hooks_useStickyOffsets = (useStickyOffsets); // CONCATENATED MODULE: ./node_modules/rc-table/es/Panel/index.js function Panel(_ref) { var className = _ref.className, children = _ref.children; return external_window_React_["createElement"]("div", { className: className }, children); } /* harmony default export */ var es_Panel = (Panel); // EXTERNAL MODULE: ./node_modules/rc-table/es/Footer/index.js + 2 modules var Footer = __webpack_require__("n6Qo"); // CONCATENATED MODULE: ./node_modules/rc-table/es/utils/expandUtil.js function renderExpandIcon(_ref) { var _classNames; var prefixCls = _ref.prefixCls, record = _ref.record, onExpand = _ref.onExpand, expanded = _ref.expanded, expandable = _ref.expandable; var expandClassName = "".concat(prefixCls, "-row-expand-icon"); if (!expandable) { return external_window_React_["createElement"]("span", { className: classnames_default()(expandClassName, "".concat(prefixCls, "-row-spaced")) }); } var onClick = function onClick(event) { onExpand(record, event); event.stopPropagation(); }; return external_window_React_["createElement"]("span", { className: classnames_default()(expandClassName, (_classNames = {}, Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-row-expanded"), expanded), Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-row-collapsed"), !expanded), _classNames)), onClick: onClick }); } function findAllChildrenKeys(data, getRowKey, childrenColumnName) { var keys = []; function dig(list) { (list || []).forEach(function (item, index) { keys.push(getRowKey(item, index)); dig(item[childrenColumnName]); }); } dig(data); return keys; } // EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/addEventListener.js var addEventListener = __webpack_require__("zT1h"); // EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/css.js var css = __webpack_require__("y0+3"); // CONCATENATED MODULE: ./node_modules/rc-table/es/stickyScrollBar.js var stickyScrollBar_StickyScrollBar = function StickyScrollBar(_ref, ref) { var _scrollBodyRef$curren, _scrollBodyRef$curren2; var scrollBodyRef = _ref.scrollBodyRef, onScroll = _ref.onScroll, offsetScroll = _ref.offsetScroll; var _React$useContext = external_window_React_["useContext"](TableContext["a" /* default */]), prefixCls = _React$useContext.prefixCls; var bodyScrollWidth = ((_scrollBodyRef$curren = scrollBodyRef.current) === null || _scrollBodyRef$curren === void 0 ? void 0 : _scrollBodyRef$curren.scrollWidth) || 0; var bodyWidth = ((_scrollBodyRef$curren2 = scrollBodyRef.current) === null || _scrollBodyRef$curren2 === void 0 ? void 0 : _scrollBodyRef$curren2.clientWidth) || 0; var scrollBarWidth = bodyScrollWidth && bodyWidth * (bodyWidth / bodyScrollWidth); var scrollBarRef = external_window_React_["useRef"](); var _useFrameState = useFrameState({ scrollLeft: 0, isHiddenScrollBar: false }), _useFrameState2 = Object(slicedToArray["a" /* default */])(_useFrameState, 2), frameState = _useFrameState2[0], setFrameState = _useFrameState2[1]; var refState = external_window_React_["useRef"]({ delta: 0, x: 0 }); var _React$useState = external_window_React_["useState"](false), _React$useState2 = Object(slicedToArray["a" /* default */])(_React$useState, 2), isActive = _React$useState2[0], setActive = _React$useState2[1]; var onMouseUp = function onMouseUp() { setActive(false); }; var onMouseDown = function onMouseDown(event) { event.persist(); refState.current.delta = event.pageX - frameState.scrollLeft; refState.current.x = 0; setActive(true); event.preventDefault(); }; var onMouseMove = function onMouseMove(event) { var _window; // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons var _ref2 = event || ((_window = window) === null || _window === void 0 ? void 0 : _window.event), buttons = _ref2.buttons; if (!isActive || buttons === 0) { // If out body mouse up, we can set isActive false when mouse move if (isActive) { setActive(false); } return; } var left = refState.current.x + event.pageX - refState.current.x - refState.current.delta; if (left <= 0) { left = 0; } if (left + scrollBarWidth >= bodyWidth) { left = bodyWidth - scrollBarWidth; } onScroll({ scrollLeft: left / bodyWidth * (bodyScrollWidth + 2) }); refState.current.x = event.pageX; }; var onContainerScroll = function onContainerScroll() { var tableOffsetTop = Object(css["b" /* getOffset */])(scrollBodyRef.current).top; var tableBottomOffset = tableOffsetTop + scrollBodyRef.current.offsetHeight; var currentClientOffset = document.documentElement.scrollTop + window.innerHeight; if (tableBottomOffset - Object(getScrollBarSize["a" /* default */])() <= currentClientOffset || tableOffsetTop >= currentClientOffset - offsetScroll) { setFrameState(function (state) { return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), {}, { isHiddenScrollBar: true }); }); } else { setFrameState(function (state) { return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), {}, { isHiddenScrollBar: false }); }); } }; var setScrollLeft = function setScrollLeft(left) { setFrameState(function (state) { return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), {}, { scrollLeft: left / bodyScrollWidth * bodyWidth || 0 }); }); }; external_window_React_["useImperativeHandle"](ref, function () { return { setScrollLeft: setScrollLeft }; }); external_window_React_["useEffect"](function () { var onMouseUpListener = Object(addEventListener["a" /* default */])(document.body, 'mouseup', onMouseUp, false); var onMouseMoveListener = Object(addEventListener["a" /* default */])(document.body, 'mousemove', onMouseMove, false); onContainerScroll(); return function () { onMouseUpListener.remove(); onMouseMoveListener.remove(); }; }, [scrollBarWidth, isActive]); external_window_React_["useEffect"](function () { var onScrollListener = Object(addEventListener["a" /* default */])(window, 'scroll', onContainerScroll, false); var onResizeListener = Object(addEventListener["a" /* default */])(window, 'resize', onContainerScroll, false); return function () { onScrollListener.remove(); onResizeListener.remove(); }; }, []); external_window_React_["useEffect"](function () { if (!frameState.isHiddenScrollBar) { setFrameState(function (state) { var _scrollBodyRef$curren3, _scrollBodyRef$curren4; return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), {}, { scrollLeft: scrollBodyRef.current.scrollLeft / ((_scrollBodyRef$curren3 = scrollBodyRef.current) === null || _scrollBodyRef$curren3 === void 0 ? void 0 : _scrollBodyRef$curren3.scrollWidth) * ((_scrollBodyRef$curren4 = scrollBodyRef.current) === null || _scrollBodyRef$curren4 === void 0 ? void 0 : _scrollBodyRef$curren4.clientWidth) }); }); } }, [frameState.isHiddenScrollBar]); if (bodyScrollWidth <= bodyWidth || !scrollBarWidth || frameState.isHiddenScrollBar) { return null; } return external_window_React_["createElement"]("div", { style: { height: Object(getScrollBarSize["a" /* default */])(), width: bodyWidth, bottom: offsetScroll }, className: "".concat(prefixCls, "-sticky-scroll") }, external_window_React_["createElement"]("div", { onMouseDown: onMouseDown, ref: scrollBarRef, className: classnames_default()("".concat(prefixCls, "-sticky-scroll-bar"), Object(defineProperty["a" /* default */])({}, "".concat(prefixCls, "-sticky-scroll-bar-active"), isActive)), style: { width: "".concat(scrollBarWidth, "px"), transform: "translate3d(".concat(frameState.scrollLeft, "px, 0, 0)") } })); }; /* harmony default export */ var stickyScrollBar = (external_window_React_["forwardRef"](stickyScrollBar_StickyScrollBar)); // CONCATENATED MODULE: ./node_modules/rc-table/es/hooks/useSticky.js /** Sticky header hooks */ function useSticky(sticky, prefixCls) { return external_window_React_["useMemo"](function () { var isSticky = !!sticky; return { isSticky: isSticky, stickyClassName: isSticky ? "".concat(prefixCls, "-sticky-header") : '', offsetHeader: Object(esm_typeof["a" /* default */])(sticky) === 'object' ? sticky.offsetHeader || 0 : 0, offsetScroll: Object(esm_typeof["a" /* default */])(sticky) === 'object' ? sticky.offsetScroll || 0 : 0 }; }, [sticky, prefixCls]); } // CONCATENATED MODULE: ./node_modules/rc-table/es/Table.js /** * Feature: * - fixed not need to set width * - support `rowExpandable` to config row expand logic * - add `summary` to support `() => ReactNode` * * Update: * - `dataIndex` is `array[]` now * - `expandable` wrap all the expand related props * * Removed: * - expandIconAsCell * - useFixedHeader * - rowRef * - columns[number].onCellClick * - onRowClick * - onRowDoubleClick * - onRowMouseEnter * - onRowMouseLeave * - getBodyWrapper * - bodyStyle * * Deprecated: * - All expanded props, move into expandable */ // Used for conditions cache var EMPTY_DATA = []; // Used for customize scroll var EMPTY_SCROLL_TARGET = {}; var INTERNAL_HOOKS = 'rc-table-internal-hook'; var MemoTableContent = external_window_React_["memo"](function (_ref) { var children = _ref.children; return children; }, function (prev, next) { if (!shallowequal_default()(prev.props, next.props)) { return false; } // No additional render when pinged status change. // This is not a bug. return prev.pingLeft !== next.pingLeft || prev.pingRight !== next.pingRight; }); function Table(props) { var _classNames; var prefixCls = props.prefixCls, className = props.className, rowClassName = props.rowClassName, style = props.style, data = props.data, rowKey = props.rowKey, scroll = props.scroll, tableLayout = props.tableLayout, direction = props.direction, title = props.title, footer = props.footer, summary = props.summary, id = props.id, showHeader = props.showHeader, components = props.components, emptyText = props.emptyText, onRow = props.onRow, onHeaderRow = props.onHeaderRow, internalHooks = props.internalHooks, transformColumns = props.transformColumns, internalRefs = props.internalRefs, sticky = props.sticky; var mergedData = data || EMPTY_DATA; var hasData = !!mergedData.length; // ===================== Effects ====================== var _React$useState = external_window_React_["useState"](0), _React$useState2 = Object(slicedToArray["a" /* default */])(_React$useState, 2), scrollbarSize = _React$useState2[0], setScrollbarSize = _React$useState2[1]; external_window_React_["useEffect"](function () { setScrollbarSize(Object(getScrollBarSize["a" /* default */])()); }); // ===================== Warning ====================== if (false) {} // ==================== Customize ===================== var mergedComponents = external_window_React_["useMemo"](function () { return Object(valueUtil["c" /* mergeObject */])(components, {}); }, [components]); var getComponent = external_window_React_["useCallback"](function (path, defaultComponent) { return Object(valueUtil["b" /* getPathValue */])(mergedComponents, path) || defaultComponent; }, [mergedComponents]); var getRowKey = external_window_React_["useMemo"](function () { if (typeof rowKey === 'function') { return rowKey; } return function (record) { var key = record && record[rowKey]; if (false) {} return key; }; }, [rowKey]); // ====================== Expand ====================== var expandableConfig = Object(legacyUtil["c" /* getExpandableProps */])(props); var expandIcon = expandableConfig.expandIcon, expandedRowKeys = expandableConfig.expandedRowKeys, defaultExpandedRowKeys = expandableConfig.defaultExpandedRowKeys, defaultExpandAllRows = expandableConfig.defaultExpandAllRows, expandedRowRender = expandableConfig.expandedRowRender, onExpand = expandableConfig.onExpand, onExpandedRowsChange = expandableConfig.onExpandedRowsChange, expandRowByClick = expandableConfig.expandRowByClick, rowExpandable = expandableConfig.rowExpandable, expandIconColumnIndex = expandableConfig.expandIconColumnIndex, expandedRowClassName = expandableConfig.expandedRowClassName, childrenColumnName = expandableConfig.childrenColumnName, indentSize = expandableConfig.indentSize; var mergedExpandIcon = expandIcon || renderExpandIcon; var mergedChildrenColumnName = childrenColumnName || 'children'; var expandableType = external_window_React_["useMemo"](function () { if (expandedRowRender) { return 'row'; } /* eslint-disable no-underscore-dangle */ /** * Fix https://github.com/ant-design/ant-design/issues/21154 * This is a workaround to not to break current behavior. * We can remove follow code after final release. * * To other developer: * Do not use `__PARENT_RENDER_ICON__` in prod since we will remove this when refactor */ if (props.expandable && internalHooks === INTERNAL_HOOKS && props.expandable.__PARENT_RENDER_ICON__ || mergedData.some(function (record) { return record && Object(esm_typeof["a" /* default */])(record) === 'object' && record[mergedChildrenColumnName]; })) { return 'nest'; } /* eslint-enable */ return false; }, [!!expandedRowRender, mergedData]); var _React$useState3 = external_window_React_["useState"](function () { if (defaultExpandedRowKeys) { return defaultExpandedRowKeys; } if (defaultExpandAllRows) { return findAllChildrenKeys(mergedData, getRowKey, mergedChildrenColumnName); } return []; }), _React$useState4 = Object(slicedToArray["a" /* default */])(_React$useState3, 2), innerExpandedKeys = _React$useState4[0], setInnerExpandedKeys = _React$useState4[1]; var mergedExpandedKeys = external_window_React_["useMemo"](function () { return new Set(expandedRowKeys || innerExpandedKeys || []); }, [expandedRowKeys, innerExpandedKeys]); var onTriggerExpand = external_window_React_["useCallback"](function (record) { var key = getRowKey(record, mergedData.indexOf(record)); var newExpandedKeys; var hasKey = mergedExpandedKeys.has(key); if (hasKey) { mergedExpandedKeys.delete(key); newExpandedKeys = Object(toConsumableArray["a" /* default */])(mergedExpandedKeys); } else { newExpandedKeys = [].concat(Object(toConsumableArray["a" /* default */])(mergedExpandedKeys), [key]); } setInnerExpandedKeys(newExpandedKeys); if (onExpand) { onExpand(!hasKey, record); } if (onExpandedRowsChange) { onExpandedRowsChange(newExpandedKeys); } }, [getRowKey, mergedExpandedKeys, mergedData, onExpand, onExpandedRowsChange]); // ====================== Column ====================== var _React$useState5 = external_window_React_["useState"](0), _React$useState6 = Object(slicedToArray["a" /* default */])(_React$useState5, 2), componentWidth = _React$useState6[0], setComponentWidth = _React$useState6[1]; var _useColumns = Object(useColumns["b" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, props), expandableConfig), {}, { expandable: !!expandedRowRender, expandedKeys: mergedExpandedKeys, getRowKey: getRowKey, // https://github.com/ant-design/ant-design/issues/23894 onTriggerExpand: onTriggerExpand, expandIcon: mergedExpandIcon, expandIconColumnIndex: expandIconColumnIndex, direction: direction }), internalHooks === INTERNAL_HOOKS ? transformColumns : null), _useColumns2 = Object(slicedToArray["a" /* default */])(_useColumns, 2), columns = _useColumns2[0], flattenColumns = _useColumns2[1]; var columnContext = external_window_React_["useMemo"](function () { return { columns: columns, flattenColumns: flattenColumns }; }, [columns, flattenColumns]); // ====================== Scroll ====================== var fullTableRef = external_window_React_["useRef"](); var scrollHeaderRef = external_window_React_["useRef"](); var scrollBodyRef = external_window_React_["useRef"](); var _React$useState7 = external_window_React_["useState"](false), _React$useState8 = Object(slicedToArray["a" /* default */])(_React$useState7, 2), pingedLeft = _React$useState8[0], setPingedLeft = _React$useState8[1]; var _React$useState9 = external_window_React_["useState"](false), _React$useState10 = Object(slicedToArray["a" /* default */])(_React$useState9, 2), pingedRight = _React$useState10[0], setPingedRight = _React$useState10[1]; var _useFrameState = useFrameState(new Map()), _useFrameState2 = Object(slicedToArray["a" /* default */])(_useFrameState, 2), colsWidths = _useFrameState2[0], updateColsWidths = _useFrameState2[1]; // Convert map to number width var colsKeys = Object(valueUtil["a" /* getColumnsKey */])(flattenColumns); var pureColWidths = colsKeys.map(function (columnKey) { return colsWidths.get(columnKey); }); var colWidths = external_window_React_["useMemo"](function () { return pureColWidths; }, [pureColWidths.join('_')]); var stickyOffsets = hooks_useStickyOffsets(colWidths, flattenColumns.length, direction); var fixHeader = scroll && Object(valueUtil["d" /* validateValue */])(scroll.y); var horizonScroll = scroll && Object(valueUtil["d" /* validateValue */])(scroll.x); var fixColumn = horizonScroll && flattenColumns.some(function (_ref2) { var fixed = _ref2.fixed; return fixed; }); // Sticky var stickyRef = external_window_React_["useRef"](); var _useSticky = useSticky(sticky, prefixCls), isSticky = _useSticky.isSticky, offsetHeader = _useSticky.offsetHeader, offsetScroll = _useSticky.offsetScroll, stickyClassName = _useSticky.stickyClassName; var scrollXStyle; var scrollYStyle; var scrollTableStyle; if (fixHeader) { scrollYStyle = { overflowY: 'scroll', maxHeight: scroll.y }; } if (horizonScroll) { scrollXStyle = { overflowX: 'auto' }; // When no vertical scrollbar, should hide it // https://github.com/ant-design/ant-design/pull/20705 // https://github.com/ant-design/ant-design/issues/21879 if (!fixHeader) { scrollYStyle = { overflowY: 'hidden' }; } scrollTableStyle = { width: scroll.x === true ? 'auto' : scroll.x, minWidth: '100%' }; } var onColumnResize = external_window_React_["useCallback"](function (columnKey, width) { updateColsWidths(function (widths) { var newWidths = new Map(widths); newWidths.set(columnKey, width); return newWidths; }); }, []); var _useTimeoutLock = useTimeoutLock(null), _useTimeoutLock2 = Object(slicedToArray["a" /* default */])(_useTimeoutLock, 2), setScrollTarget = _useTimeoutLock2[0], getScrollTarget = _useTimeoutLock2[1]; function forceScroll(scrollLeft, target) { if (!target) { return; } if (typeof target === 'function') { target(scrollLeft); } else if (target.scrollLeft !== scrollLeft) { // eslint-disable-next-line no-param-reassign target.scrollLeft = scrollLeft; } } var onScroll = function onScroll(_ref3) { var currentTarget = _ref3.currentTarget, scrollLeft = _ref3.scrollLeft; var mergedScrollLeft = typeof scrollLeft === 'number' ? scrollLeft : currentTarget.scrollLeft; var compareTarget = currentTarget || EMPTY_SCROLL_TARGET; if (!getScrollTarget() || getScrollTarget() === compareTarget) { var _stickyRef$current; setScrollTarget(compareTarget); forceScroll(mergedScrollLeft, scrollHeaderRef.current); forceScroll(mergedScrollLeft, scrollBodyRef.current); forceScroll(mergedScrollLeft, (_stickyRef$current = stickyRef.current) === null || _stickyRef$current === void 0 ? void 0 : _stickyRef$current.setScrollLeft); } if (currentTarget) { var scrollWidth = currentTarget.scrollWidth, clientWidth = currentTarget.clientWidth; setPingedLeft(mergedScrollLeft > 0); setPingedRight(mergedScrollLeft < scrollWidth - clientWidth); } }; var triggerOnScroll = function triggerOnScroll() { if (scrollBodyRef.current) { onScroll({ currentTarget: scrollBodyRef.current }); } }; var onFullTableResize = function onFullTableResize(_ref4) { var width = _ref4.width; triggerOnScroll(); setComponentWidth(fullTableRef.current ? fullTableRef.current.offsetWidth : width); }; // Sync scroll bar when init or `horizonScroll` changed external_window_React_["useEffect"](function () { return triggerOnScroll; }, []); external_window_React_["useEffect"](function () { if (horizonScroll) { triggerOnScroll(); } }, [horizonScroll]); // ================== INTERNAL HOOKS ================== external_window_React_["useEffect"](function () { if (internalHooks === INTERNAL_HOOKS && internalRefs) { internalRefs.body.current = scrollBodyRef.current; } }); // ====================== Render ====================== var TableComponent = getComponent(['table'], 'table'); // Table layout var mergedTableLayout = external_window_React_["useMemo"](function () { if (tableLayout) { return tableLayout; } // https://github.com/ant-design/ant-design/issues/25227 // When scroll.x is max-content, no need to fix table layout // it's width should stretch out to fit content if (fixColumn) { return scroll.x === 'max-content' ? 'auto' : 'fixed'; } if (fixHeader || flattenColumns.some(function (_ref5) { var ellipsis = _ref5.ellipsis; return ellipsis; })) { return 'fixed'; } return 'auto'; }, [fixHeader, fixColumn, flattenColumns, tableLayout]); var groupTableNode; // Header props var headerProps = { colWidths: colWidths, columCount: flattenColumns.length, stickyOffsets: stickyOffsets, onHeaderRow: onHeaderRow, fixHeader: fixHeader }; // Empty var emptyNode = external_window_React_["useMemo"](function () { if (hasData) { return null; } if (typeof emptyText === 'function') { return emptyText(); } return emptyText; }, [hasData, emptyText]); // Body var bodyTable = external_window_React_["createElement"](es_Body, { data: mergedData, measureColumnWidth: fixHeader || horizonScroll || isSticky, expandedKeys: mergedExpandedKeys, rowExpandable: rowExpandable, getRowKey: getRowKey, onRow: onRow, emptyNode: emptyNode, childrenColumnName: mergedChildrenColumnName }); var bodyColGroup = external_window_React_["createElement"](es_ColGroup, { colWidths: flattenColumns.map(function (_ref6) { var width = _ref6.width; return width; }), columns: flattenColumns }); var footerTable = summary && external_window_React_["createElement"](Footer["b" /* default */], null, summary(mergedData)); var customizeScrollBody = getComponent(['body']); if (false) {} if (fixHeader || isSticky) { var bodyContent; if (typeof customizeScrollBody === 'function') { bodyContent = customizeScrollBody(mergedData, { scrollbarSize: scrollbarSize, ref: scrollBodyRef, onScroll: onScroll }); headerProps.colWidths = flattenColumns.map(function (_ref7, index) { var width = _ref7.width; var colWidth = index === columns.length - 1 ? width - scrollbarSize : width; if (typeof colWidth === 'number' && !Number.isNaN(colWidth)) { return colWidth; } Object(warning["a" /* default */])(false, 'When use `components.body` with render props. Each column should have a fixed value.'); return 0; }); } else { bodyContent = external_window_React_["createElement"]("div", { style: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, scrollXStyle), scrollYStyle), onScroll: onScroll, ref: scrollBodyRef, className: classnames_default()("".concat(prefixCls, "-body")) }, external_window_React_["createElement"](TableComponent, { style: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, scrollTableStyle), {}, { tableLayout: mergedTableLayout }) }, bodyColGroup, bodyTable, footerTable), isSticky && external_window_React_["createElement"](stickyScrollBar, { ref: stickyRef, offsetScroll: offsetScroll, scrollBodyRef: scrollBodyRef, onScroll: onScroll })); } groupTableNode = external_window_React_["createElement"](external_window_React_["Fragment"], null, showHeader !== false && external_window_React_["createElement"](Header_FixedHeader, Object.assign({ noData: !mergedData.length }, headerProps, columnContext, { direction: direction, // Fixed Props offsetHeader: offsetHeader, stickyClassName: stickyClassName, ref: scrollHeaderRef, onScroll: onScroll })), bodyContent); } else { groupTableNode = external_window_React_["createElement"]("div", { style: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, scrollXStyle), scrollYStyle), className: classnames_default()("".concat(prefixCls, "-content")), onScroll: onScroll, ref: scrollBodyRef }, external_window_React_["createElement"](TableComponent, { style: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, scrollTableStyle), {}, { tableLayout: mergedTableLayout }) }, bodyColGroup, showHeader !== false && external_window_React_["createElement"](Header_Header, Object.assign({}, headerProps, columnContext)), bodyTable, footerTable)); } var ariaProps = Object(legacyUtil["b" /* getDataAndAriaProps */])(props); var fullTable = external_window_React_["createElement"]("div", Object.assign({ className: classnames_default()(prefixCls, className, (_classNames = {}, Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-ping-left"), pingedLeft), Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-ping-right"), pingedRight), Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-layout-fixed"), tableLayout === 'fixed'), Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-fixed-header"), fixHeader), Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-fixed-column"), fixColumn), Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-scroll-horizontal"), horizonScroll), Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-has-fix-left"), flattenColumns[0] && flattenColumns[0].fixed), Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-has-fix-right"), flattenColumns[flattenColumns.length - 1] && flattenColumns[flattenColumns.length - 1].fixed === 'right'), _classNames)), style: style, id: id, ref: fullTableRef }, ariaProps), external_window_React_["createElement"](MemoTableContent, { pingLeft: pingedLeft, pingRight: pingedRight, props: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, props), {}, { stickyOffsets: stickyOffsets, mergedExpandedKeys: mergedExpandedKeys }) }, title && external_window_React_["createElement"](es_Panel, { className: "".concat(prefixCls, "-title") }, title(mergedData)), external_window_React_["createElement"]("div", { className: "".concat(prefixCls, "-container") }, groupTableNode), footer && external_window_React_["createElement"](es_Panel, { className: "".concat(prefixCls, "-footer") }, footer(mergedData)))); if (horizonScroll) { fullTable = external_window_React_["createElement"](es["a" /* default */], { onResize: onFullTableResize }, fullTable); } var TableContextValue = external_window_React_["useMemo"](function () { return { prefixCls: prefixCls, getComponent: getComponent, scrollbarSize: scrollbarSize, direction: direction, fixedInfoList: flattenColumns.map(function (_, colIndex) { return getCellFixedInfo(colIndex, colIndex, flattenColumns, stickyOffsets, direction); }), isSticky: isSticky }; }, [prefixCls, getComponent, scrollbarSize, direction, flattenColumns, stickyOffsets, direction, isSticky]); var BodyContextValue = external_window_React_["useMemo"](function () { return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, columnContext), {}, { tableLayout: mergedTableLayout, rowClassName: rowClassName, expandedRowClassName: expandedRowClassName, componentWidth: componentWidth, fixHeader: fixHeader, fixColumn: fixColumn, horizonScroll: horizonScroll, expandIcon: mergedExpandIcon, expandableType: expandableType, expandRowByClick: expandRowByClick, expandedRowRender: expandedRowRender, onTriggerExpand: onTriggerExpand, expandIconColumnIndex: expandIconColumnIndex, indentSize: indentSize }); }, [columnContext, mergedTableLayout, rowClassName, expandedRowClassName, componentWidth, fixHeader, fixColumn, horizonScroll, mergedExpandIcon, expandableType, expandRowByClick, expandedRowRender, onTriggerExpand, expandIconColumnIndex, indentSize]); var ResizeContextValue = external_window_React_["useMemo"](function () { return { onColumnResize: onColumnResize }; }, [onColumnResize]); return external_window_React_["createElement"](TableContext["a" /* default */].Provider, { value: TableContextValue }, external_window_React_["createElement"](context_BodyContext.Provider, { value: BodyContextValue }, external_window_React_["createElement"](context_ResizeContext.Provider, { value: ResizeContextValue }, fullTable))); } Table.Column = Column["a" /* default */]; Table.ColumnGroup = ColumnGroup["a" /* default */]; Table.Summary = Footer["a" /* FooterComponents */]; Table.defaultProps = { rowKey: 'key', prefixCls: 'rc-table', emptyText: function emptyText() { return 'No Data'; } }; /* harmony default export */ var es_Table = __webpack_exports__["b"] = (Table); /***/ }), /***/ "wRmb": /*!******************************************************!*\ !*** ./node_modules/rc-table/es/hooks/useColumns.js ***! \******************************************************/ /*! exports provided: convertChildrenToColumns, default */ /*! exports used: convertChildrenToColumns, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return convertChildrenToColumns; }); /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "rePB"); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "KQm4"); /* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "VTBJ"); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "Ff2n"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "cDcd"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var rc_util_es_warning__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-util/es/warning */ "Kwbf"); /* harmony import */ var rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/Children/toArray */ "Zm9Q"); /* harmony import */ var _utils_legacyUtil__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/legacyUtil */ "hW8S"); function convertChildrenToColumns(children) { return Object(rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(children).filter(function (node) { return react__WEBPACK_IMPORTED_MODULE_4__["isValidElement"](node); }).map(function (_ref) { var key = _ref.key, props = _ref.props; var nodeChildren = props.children, restProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(props, ["children"]); var column = Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({ key: key }, restProps); if (nodeChildren) { column.children = convertChildrenToColumns(nodeChildren); } return column; }); } function flatColumns(columns) { return columns.reduce(function (list, column) { var fixed = column.fixed; // Convert `fixed='true'` to `fixed='left'` instead var parsedFixed = fixed === true ? 'left' : fixed; var subColumns = column.children; if (subColumns && subColumns.length > 0) { return [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(list), Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(flatColumns(subColumns).map(function (subColum) { return Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({ fixed: parsedFixed }, subColum); }))); } return [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(list), [Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, column), {}, { fixed: parsedFixed })]); }, []); } function warningFixed(flattenColumns) { var allFixLeft = true; for (var i = 0; i < flattenColumns.length; i += 1) { var col = flattenColumns[i]; if (allFixLeft && col.fixed !== 'left') { allFixLeft = false; } else if (!allFixLeft && col.fixed === 'left') { Object(rc_util_es_warning__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(false, "Index ".concat(i - 1, " of `columns` missing `fixed='left'` prop.")); break; } } var allFixRight = true; for (var _i = flattenColumns.length - 1; _i >= 0; _i -= 1) { var _col = flattenColumns[_i]; if (allFixRight && _col.fixed !== 'right') { allFixRight = false; } else if (!allFixRight && _col.fixed === 'right') { Object(rc_util_es_warning__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(false, "Index ".concat(_i + 1, " of `columns` missing `fixed='right'` prop.")); break; } } } function revertForRtl(columns) { return columns.map(function (column) { var fixed = column.fixed, restProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(column, ["fixed"]); // Convert `fixed='left'` to `fixed='right'` instead var parsedFixed = fixed; if (fixed === 'left') { parsedFixed = 'right'; } else if (fixed === 'right') { parsedFixed = 'left'; } return Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({ fixed: parsedFixed }, restProps); }); } /** * Parse `columns` & `children` into `columns`. */ function useColumns(_ref2, transformColumns) { var prefixCls = _ref2.prefixCls, columns = _ref2.columns, children = _ref2.children, expandable = _ref2.expandable, expandedKeys = _ref2.expandedKeys, getRowKey = _ref2.getRowKey, onTriggerExpand = _ref2.onTriggerExpand, expandIcon = _ref2.expandIcon, rowExpandable = _ref2.rowExpandable, expandIconColumnIndex = _ref2.expandIconColumnIndex, direction = _ref2.direction, expandRowByClick = _ref2.expandRowByClick; var baseColumns = react__WEBPACK_IMPORTED_MODULE_4__["useMemo"](function () { return columns || convertChildrenToColumns(children); }, [columns, children]); // Add expand column var withExpandColumns = react__WEBPACK_IMPORTED_MODULE_4__["useMemo"](function () { if (expandable) { var _expandColumn; var expandColIndex = expandIconColumnIndex || 0; var prevColumn = baseColumns[expandColIndex]; var expandColumn = (_expandColumn = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_expandColumn, _utils_legacyUtil__WEBPACK_IMPORTED_MODULE_7__[/* INTERNAL_COL_DEFINE */ "a"], { className: "".concat(prefixCls, "-expand-icon-col") }), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_expandColumn, "title", ''), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_expandColumn, "fixed", prevColumn ? prevColumn.fixed : null), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_expandColumn, "className", "".concat(prefixCls, "-row-expand-icon-cell")), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_expandColumn, "render", function render(_, record, index) { var rowKey = getRowKey(record, index); var expanded = expandedKeys.has(rowKey); var recordExpandable = rowExpandable ? rowExpandable(record) : true; var icon = expandIcon({ prefixCls: prefixCls, expanded: expanded, expandable: recordExpandable, record: record, onExpand: onTriggerExpand }); if (expandRowByClick) { return react__WEBPACK_IMPORTED_MODULE_4__["createElement"]("span", { onClick: function onClick(e) { return e.stopPropagation(); } }, icon); } return icon; }), _expandColumn); // Insert expand column in the target position var cloneColumns = baseColumns.slice(); if (expandColIndex >= 0) { cloneColumns.splice(expandColIndex, 0, expandColumn); } return cloneColumns; } return baseColumns; }, [expandable, baseColumns, getRowKey, expandedKeys, expandIcon, direction]); var mergedColumns = react__WEBPACK_IMPORTED_MODULE_4__["useMemo"](function () { var finalColumns = withExpandColumns; if (transformColumns) { finalColumns = transformColumns(finalColumns); } // Always provides at least one column for table display if (!finalColumns.length) { finalColumns = [{ render: function render() { return null; } }]; } return finalColumns; }, [transformColumns, withExpandColumns, direction]); var flattenColumns = react__WEBPACK_IMPORTED_MODULE_4__["useMemo"](function () { if (direction === 'rtl') { return revertForRtl(flatColumns(mergedColumns)); } return flatColumns(mergedColumns); }, [mergedColumns, direction]); // Only check out of production since it's waste for each render if (false) {} return [mergedColumns, flattenColumns]; } /* harmony default export */ __webpack_exports__["b"] = (useColumns); /***/ }), /***/ "y0+3": /*!********************************************!*\ !*** ./node_modules/rc-util/es/Dom/css.js ***! \********************************************/ /*! exports provided: get, set, getOuterWidth, getOuterHeight, getDocSize, getClientSize, getScroll, getOffset */ /*! exports used: getClientSize, getOffset */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export get */ /* unused harmony export set */ /* unused harmony export getOuterWidth */ /* unused harmony export getOuterHeight */ /* unused harmony export getDocSize */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getClientSize; }); /* unused harmony export getScroll */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getOffset; }); /* eslint-disable no-nested-ternary */ var PIXEL_PATTERN = /margin|padding|width|height|max|min|offset/; var removePixel = { left: true, top: true }; var floatMap = { cssFloat: 1, styleFloat: 1, float: 1 }; function getComputedStyle(node) { return node.nodeType === 1 ? node.ownerDocument.defaultView.getComputedStyle(node, null) : {}; } function getStyleValue(node, type, value) { type = type.toLowerCase(); if (value === 'auto') { if (type === 'height') { return node.offsetHeight; } if (type === 'width') { return node.offsetWidth; } } if (!(type in removePixel)) { removePixel[type] = PIXEL_PATTERN.test(type); } return removePixel[type] ? parseFloat(value) || 0 : value; } function get(node, name) { var length = arguments.length; var style = getComputedStyle(node); name = floatMap[name] ? 'cssFloat' in node.style ? 'cssFloat' : 'styleFloat' : name; return length === 1 ? style : getStyleValue(node, name, style[name] || node.style[name]); } function set(node, name, value) { var length = arguments.length; name = floatMap[name] ? 'cssFloat' in node.style ? 'cssFloat' : 'styleFloat' : name; if (length === 3) { if (typeof value === 'number' && PIXEL_PATTERN.test(name)) { value = "".concat(value, "px"); } node.style[name] = value; // Number return value; } for (var x in name) { if (name.hasOwnProperty(x)) { set(node, x, name[x]); } } return getComputedStyle(node); } function getOuterWidth(el) { if (el === document.body) { return document.documentElement.clientWidth; } return el.offsetWidth; } function getOuterHeight(el) { if (el === document.body) { return window.innerHeight || document.documentElement.clientHeight; } return el.offsetHeight; } function getDocSize() { var width = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth); var height = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight); return { width: width, height: height }; } function getClientSize() { var width = document.documentElement.clientWidth; var height = window.innerHeight || document.documentElement.clientHeight; return { width: width, height: height }; } function getScroll() { return { scrollLeft: Math.max(document.documentElement.scrollLeft, document.body.scrollLeft), scrollTop: Math.max(document.documentElement.scrollTop, document.body.scrollTop) }; } function getOffset(node) { var box = node.getBoundingClientRect(); var docElem = document.documentElement; // < ie8 不支持 win.pageXOffset, 则使用 docElem.scrollLeft return { left: box.left + (window.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || document.body.clientLeft || 0), top: box.top + (window.pageYOffset || docElem.scrollTop) - (docElem.clientTop || document.body.clientTop || 0) }; } /***/ }), /***/ "zmGA": /*!*********************************************************!*\ !*** ./src/pages/Engineering/Lists/CurseSetting/tx.png ***! \*********************************************************/ /*! no static exports found */ /*! exports used: default */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAAAXNSR0IArs4c6QAAEhlJREFUeF7tnXlw3dV1xz/3/d6q1ZJtvFtYliyBWYxlsIxtFpewhrhAITDBBMeQUgY6De0QhqRJSyctYTqEQJrpTEloTTPQLAUKYUkdkwAG7HrBNsYWkmXZlm0t1r6/936/27nvSUJ66++993u/pzjcfzSj373nnHu+727nnnOuYIqXA8dl6cgwVVJQJSVVQlAFzJJQKKBQyvBf1Q0JfULQF/oLfUCrlNQJQZ2Q1Hm81C1dIDqncpfFVBNu9zE5VwZZh846BFdKydlWyigETUjeRmOrcLJ1+UJx0kr6mdKaEoDsbZRVQYO7JNyCDI0A+4oaPfArp4PNF5aLOvsYx+aUM0AONsvpg8PcISUbgEtyrYhR/juE4Pk8Ly+cM1905EIm2wHZ2yznB4Z5GLgHiS8XnU7KUzAEPOvy8sSF80Vz0voWVrANkJ3H5GL8PCJkaGpyW9iHrJES4JeCzbh5fMVCcThrjCYQzjogh9pl4UA3j0nBg0g0OzplOQ+BLiTP5E/jO9Uzhdq9Za1kFZDdDfJ2A55EMidrPbCRsICTQvDXyyvEi9limxVAdjfKMmnwEyn5k2wJnku6QvBb4WDT8nJx1Go5LAdkT71cbwiek5ISq4WdSvSEoMsh2XhRpXjFSrksA2SnlC7RwPclfMNKAac6LQE/kBV8c4UQAStktQSQ/Y1y1oiO+qWstEKoP0Aa2z0a688vF62Zyp4xIPuOynK/n98AizMV5g+8/WG3m6svKBONmfQjI0D2HJHLdJ03kMzORIgzpq2gRdO47qJF4qN0+5Q2ILsa5Vqp8xpQlC7zM7Rdr9D4Yk25eDed/qUFSGhkBPn952DEVXmv5uTydEZKyoCE1owA2z6fppL8/gUtbherU11TUgJkdDe17fMF3PRkdNijsTqV3ZdpQNQ5gwbUvPjHurU1jUJExe1UsNbsOcU0ILvq5Q8k/FW6Uv0xt1OHx5pK8ZAZHZgCRJlDdHjZDMHP68TWgAZ/asbMkhSQUUPhnjPdNpXtH5KyfQkHFyUzSCYFZFeD3HKmWm2zDUIkfWUlrqkQVyXimxCQ0H2G5AW7BY/Hr8AxSLHsxBvoxqkP4tKH0Qw/4CDg9BJ0+PA78xlwltLNNAKGc6qIPi6HQ3BHovuUuICom77+Hupyfbnk1QLMdrRTLHrQNAGOsMgCgQz6kYER8PuRI4NIKScBMOQqpcc7nzZmImXSycAe8ASnCoqpinfzGFfKXO+qXA6dub5uprsHlOqTK0vXMfp7kIO9yOBkS3hAy6PVV00Hpcnp2FBDwFM1lSLmNUVMQEYdEtToyMkd+FmePub5unAIE0BEKVCGgDG6O0Aak74Oe6bT5DmPEcNlg9oTsBDouKmK5TgRG5AG+W9I7rFbaiXMwvwOZrj7M2atRonR2YIcGZ5Ey9A8NOUtp0/mZ8wjIwKCZ1dUiHujFv7Ifyi/qeAQh+121dGEpKKgjQLnZAVm0mlpGMjOFoyhgQgyghNFF3HayN0UplyMnD4WR/p9RY2QnQ3yaSQPZqKIdNpWFrZR5FT+aRYXaaC3NSP9I1GgNBVdQo8R8tPOTRE8s6JC/OVE5pMAUe6dA8Mct9ujcH5eF7M8vdlTih4g2HocdH3y9CVcNBTWMmR4ssc7EWXBUL6XBRPdVicBsqtBPiAlz9gpXal7gEX5p7POUg4PoLdHO7oHnIUc8l2CkaNtsRA8WFMhfjSmgEhAdkjJxVnXzigDtYs6r+gkLkfQFpYKEAVMZGktPJcWOdcWGWIw2bGiUoxb0McBUSEBAZ1Ddko129vDPF+3fSz9IwRbj0XxMxwuDuavIShzssvHpVE9FgoxDsiuBvk9KXnULu04hcF5xSfQxOSzQrb566dPIqN2XdBZUMlxyrLNPiZ9IfjHmgrxLfVxHJCdDfKQncEyMz39LMyzPwRDmVj0thPRo0Rz87HvMjM2AetBE9StqBDV44CoMDJjhGgprWc9TjFr29xkMkuJ3tKEDEavW0eKauk1CpJRyMp3h4d5KrwuNEJ2Nco7pc7zWeEUg6gDybKS4+ZsVFkQyug+jdHXFUW5M38xx8WiLHBMTlJobKgpF/8ZBqRe/lTCxuTNrKlR7BqmoiBjr8u0hZEjQ6HDYmQJOgs54M2Ny4CA52oqxdfCgDTIJintW9FytX6MAyANgicaIcJcr5bUvQW5iaBQ0cE1FWKRUHHgQ8PYurrO8fUw12vjdjfGWAq2HIWAutyaXD4pvJJAjra/Pi/Txe56ucqA99Me/yk2VNvc6sJTeDV7DoPxxDM62zAGeqI+D3tmcESrxu/wptizzKs74FKxq0HeLSXPZU4uOQU1Py4pbLXUopuca+waRm8HRk90UgfhcjOiO6n3XUxQ2HtvIgQbxc56+U/AI+l2LJV2Mzz9lKmzh5q7RW6vVNUuS+22oormAj1Au6uMk57KVLpnRd3H1Qj5bym5yQpqyWio0VEYuu9QN4E5BmSgBzVtRRXhCN00BoWHA/lrk3XJ0u9C8JIC5H0pWWUp5TjEzi8+gdsmQ2Ky/siBHvRYgExouK9gHRJHMlKWfReCD8TOBrkPyfmWUU1A6JyiU+Rp/qkxZfV2YfTEN/srd4J9BVfaoZbPeAj2qxFyxOqMO/F6sSCvi7OyeRGVgvqMrnaM/vhb736thMO+mhQoZl5VnUXUoq5+JtMzJ5ecgrLwnhu6/5h8c5e8pfU19I5TyMF4zhQiBEa/Ns16xokpdohd9XLETocGtYYsLmgPT105LMGTjVFXukocKRwc85xHt/Ms26VTjg+2AzLWyxL3IAt8nTkZLcrjUT81OQlDUPPR6yil1b0Iv7D/UKj0EgLEzikr8ienQCnPb7f9l6jWDrWGjBW/ls8h36rc3IVM7n2HrYt6LM1XF7aQ74x00ckiRqH7kGMhv+Cxcrywhk6Z+0wg4UXdxm1vLDXnOf1UFbSk6TaaOnBqIVcL+ljp987hsHNp6oSy0WJ027tNSi7NBn2zNO1yBVIncL21OewxD/hdRXzqXYEu7Tv8JdKJELxvq+kkkTDK032ON9r6ahZUM/WMzlaMgbBDni481BfW5t7xeoLgIdOJncbFZEpTLkHKNSgbRZnax2xXAYePpoIaBo3c7KYS9C9kXLTN/G5G0aWeAcp8HZauKXJIrRstIZPNkHs6RzwX5OwSKsmUtdH2CyozoKhDY1l+hyWHx9AWV5nZpaAjfzEnHAunTjRVhDJCF1S5uMI1A0qhDxYWDeDVu0FP/XZRufkY3W0hpzg5fQEtrnLa+u29cDLTz4l1Qle46h92OzkkEjTPA/NngAJkvIwMgH8QAsNRUVGRtKShI/vCIIqSOYjimeAKrxUDw3CsHQZtPPaYBWXcySEEiM1uQLGEVLGc86bDzOJEl4kyDIqKITR0kMHwX3Vn4dA+M+t7C8EZOzWwuqxs6YJTneFrsqlSJrsB2ewoF6mEkoLwqHDbGMWsRklTKwzl1sY5ropJjnK5cCVVkhgGLJkHxTkK91OjRU1hLd3gzPHZcJIrqVKO3c7W+4/B3qPwt7dCaQbutJn6S7y0XfLKdp3b1ziZmavceJHO1qMLuy3hCP4gvPMJHBt1zVteDpvSdBY82AwvboN7r4L5aVyxDfrh7qcD9A4aaA4HX7rEyYpy+50vYoYj2BGw09EHWw9AX0Rs50M3wuIU02juboR/fxt0A3xuuO8aqEiRxgvvSf5j6+RF5NwFTm6u1fDZuEOOGbATmrbq5fZsveXR1B4eGcEY8TkLZsA3bzLvGPTeQfivbWBM2Ca5nOGRdv5Cc/um3iH46g8DDPmjBZqW5+DLa1wsnGGOVoa1Yoe0jU5bWQn63NUYXi8Sla9cBpeaeFvnzT3w6s7YlBwOuPMyWGnCv+2nWyU/fy/RFsvBjRc7qa3M7hSWMOjT6rBoNZ28cxCOxPBHi1RpUR589zbwJpgqfvkBvP1xYmCVQ+TNK2FdAsemjn7Y+HQAf6zhGkF+1RIX1y93oMC2vCQLix7dbVmSOEAt3v+7H1pTcHK/6gK4KU54xoefwvMqMa3J8o0b468pP37T4H92mE/VXjXXyZfXaHisPiclSxyg+mpFag112Hr9I+iJjkBOqE6nBt/+M2JuP4cD8N0Xod9E5o3ZJfDtW2Kf+NWZY9OPAujqEJRCmV3s4KtXulAj2YpiOrXG6ChJO/mMshe98RGoRTOdcn4Z3Hd17Ja/OwC/MBE48edXwwVxAmr/+RWDLXvNj46JkhT5wqDMtsJdy2zymRAg4feiUk7PpMBQIyNyW5sqMA9eD9XzolupNemxX8DpBFk41PZZbaNjlaPtcN+/BpARaZtSkc+tOdhwhYvyWam0iqibanom1TzVBGbqkPX67vRHxkSR55bCozfHnnJ2HobntsZXxt+sh0VxfNz+5U344JBOR58elX0uFfU6HQ7uXueKyycZrZQTmCmCqaT4GwnA63ugK8U1I5Hgt62Gy8+NXePxl+B4DD/pC8+Gr38hdpvDLfDkq+FvQR3aumOfQZIpc+y7U3PwtXUuymaabTFaL90Uf6q5mSSYajel1gx1Crey5Hvh724DdT8SWX74a/g0xoOpq6rC55BYRYGhQJlYegYyGy0uh4NNX3CxIAWzTdpJMMcET5QmNhCEN/dCe5YyK12xFG6NcFBS69OjP5t8Sh+TVYH3/Q3jeTLHdX/gOPz4zdhA+QOSlu4gARNnklgUfG4H91/rMmUgzThNbGiUhF9ci0qkrKysb+2Fk9Hx95YNFM0Bj97CpF3Nuwfhxffis7j/Wli6YPL3eFPcWC21A25RU9hIalvhsfYzCh3cd60rof3LskTKimmsVOPvHoL6zxwALQMhktA58+GB6z7771OvJeZbuwQ2XP5Z/T1H4Nkt5sRr6w7SN5ReqETFbCd3XaGhfkSximWpxsenrnr55NgLbB8fhx0N5jppRa2/uAbOWxjewX0rznQ1cdp6/E5CilGj+B9+mZq1oLUrSP9weqBcWuXihppoRCxPxq86O/ZcRUc/K1/dFb7ts6ucVRw+wW87FLbyJitj01aq5hZFVxmQT54OMBxIr4O3r/FEWpyz81yFElY96PLKbrad7LT/Rbaba2H/UXPT5Mol8JW18Pc/T2/3FwhKjrcHkGm4Qbg0Bw9c72JGOLdm9h50GftVbtkny1/byfv+IJmcVZP9yKO+e90wouJFTbRUF1Y31ICyDqdbOvt0uvpT9wdT/GYVa9x/jbMlLy/LTx6Nde7Xe+Syt3bz+6A+dV9oU1vgTPyv1OVXU6s/rRN9gUfrfeBG5+VXLk39+by0b19e3i7Xbv2Y16YyKOmOjrF27T1BegdTW+Cn5Wm9917t/OJVF9r4bN74SNkhl721nzeC+pn5sORIQNJ82rzjVmmB1vL1a53XpTMyxnSa9giZuKa8sZvfDPntX+gzHQFm2qtpS594eR+n0ZwSx+FN17quXrskh0+vjsn24X4567X9vNLZf+a94GbmXLLsbOf2m9Zq62unwuPEY6Coc8qWl3niWPuZ9ZJbz4DB6d7YF1oOIbhhhfup2ut42OyzeMlGZcZTViSDn70j129v4Llg8Mx44D7eOlLo07ruusy58Uu1U/SB+4nAbPtElm3Zx09ae0nTJzHZ78i+78oicaR1cvzCyiXu316zUmxaXS6SODelLqflI2SiCJvflrfvaeLJkQBzUhdt6rQ40urHMCQzi7RTt65yPrS+VryYLemyCogS+tAhWfi7Jh77+AQPGnpunlDKVHltPbq+ukp75rpVfCfeY16Z8rBs22tWkG375eIPDvNIUzt3GZLY0TRmidlUz6Xhr57H5gsW8/jqSnHYDrZZHyGRnfiwXs7f18jDh05xz7CfiYFrdvTXFA+3i6HquTy7rJwnaitFdMZlU1TSq2Q7IGNibm+W0480cccnzdx1ute+N0viqUkpYm4p/1c5m81lZ/PCyvnC1lzGtk9ZiX4vb++T1cc62dB8mltauqlS/ld2FBXXOLOIuvkz+VXVXDavqRZ1dvBNxCNnIySeUCq87mgL65rbWdfSzbqeQcpMWC5M6VE5TJfkc3ROCVvnlbJ1QRFbl1eLGP4rpshlpdKUAySylyqOvr2Lqq4BqroHqeoZomrEz2x/kILhIIX+IIUjAULXQR4nfU4XfV6NPreTfp+HlmIfddPyqCvJp25mCXVLF4jo7MlZUW16RP8ff48Qd2Sa15cAAAAASUVORK5CYII=" /***/ }) }]);