You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Shixuns__Edit__body__Lev...

1719 lines
77 KiB

(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[225],{
/***/ "/hLF":
/*!*******************************************************************************!*\
!*** ./src/pages/Shixuns/Edit/body/Level/Challenges/RankingSetting/index.tsx ***!
\*******************************************************************************/
/*! exports provided: default */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/.umi-production/core/routes.ts (referenced with import()) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var antd_es_message_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/es/message/style */ "miYZ");
/* harmony import */ var antd_es_message__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/es/message */ "tsqr");
/* harmony import */ var antd_es_input_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! antd/es/input/style */ "5NDa");
/* harmony import */ var antd_es_input__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd/es/input */ "5rEg");
/* harmony import */ var antd_es_radio_style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd/es/radio/style */ "7Kak");
/* harmony import */ var antd_es_radio__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! antd/es/radio */ "9yH6");
/* harmony import */ var antd_es_switch_style__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! antd/es/switch/style */ "BoS7");
/* harmony import */ var antd_es_switch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! antd/es/switch */ "Sdc0");
/* harmony import */ var antd_es_modal_style__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! antd/es/modal/style */ "2qtc");
/* harmony import */ var antd_es_modal__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! antd/es/modal */ "kLXV");
/* harmony import */ var _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */ "9og8");
/* 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_11__ = __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_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties */ "PpiC");
/* harmony import */ var antd_es_form_style__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! antd/es/form/style */ "y8nQ");
/* harmony import */ var antd_es_form__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! antd/es/form */ "Vl3Y");
/* 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_15__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */ "tJVT");
/* harmony import */ var _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */ "WmNS");
/* harmony import */ var _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! react */ "cDcd");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! umi */ "Ty5D");
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! umi */ "9kvl");
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @/utils/fetch */ "ErOA");
/* harmony import */ var _components_FixedButton__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @/components/FixedButton */ "9ZNV");
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./index.less */ "lfHS");
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_22__);
/* harmony import */ var _challenge_nav__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./challenge-nav */ "fnXi");
/* harmony import */ var _components_Loading__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../components/Loading */ "nuEh");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! lodash */ "LvDl");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_25__);
/* harmony import */ var _utils_authority__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @/utils/authority */ "xKgJ");
var Es = function Es(_ref) {
var dispatch = _ref.dispatch,
practiceSetting = _ref.practiceSetting;
var _useState = Object(react__WEBPACK_IMPORTED_MODULE_17__["useState"])(null),
_useState2 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(_useState, 2),
data = _useState2[0],
setData = _useState2[1];
var _Form$useForm = antd_es_form__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"].useForm(),
_Form$useForm2 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(_Form$useForm, 1),
form = _Form$useForm2[0];
var changeData = Object(react__WEBPACK_IMPORTED_MODULE_17__["useRef"])({});
var timer = Object(react__WEBPACK_IMPORTED_MODULE_17__["useRef"])(null);
var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_17__["useState"])(false),
_useState4 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(_useState3, 2),
btnLoading = _useState4[0],
setBtnLoading = _useState4[1];
var _useState5 = Object(react__WEBPACK_IMPORTED_MODULE_17__["useState"])(true),
_useState6 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(_useState5, 2),
loading = _useState6[0],
setLoading = _useState6[1];
var params = Object(umi__WEBPACK_IMPORTED_MODULE_18__[/* useParams */ "i"])();
var id = params.id,
challengesId = params.challengesId;
Object(react__WEBPACK_IMPORTED_MODULE_17__["useEffect"])(function () {
init();
}, [id, challengesId]);
Object(react__WEBPACK_IMPORTED_MODULE_17__["useEffect"])(function () {
if (data) {
var _open_rank = data.open_rank,
_other = data.other,
rest = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"])(data, ["open_rank", "other"]);
var values = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_11__[/* 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_11__[/* default */ "a"])({}, rest), {}, {
is_rank: _open_rank !== 'CLOSE',
rank: _open_rank
});
form.setFieldsValue(values);
}
if (JSON.stringify(changeData.current) !== '{}') {
setConfirmValue();
}
}, [data]);
var init = /*#__PURE__*/function () {
var _ref2 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])( /*#__PURE__*/_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_16___default.a.mark(function _callee() {
var _yield$get, open_rank, rank_data_name, rank_name, rank_order, other, rs;
return _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_16___default.a.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
setLoading(true);
_context.next = 3;
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_20__[/* get */ "c"])("shixuns/".concat(id, "/challenges/").concat(challengesId, "/edit.json"), {
tab: 3
});
case 3:
_yield$get = _context.sent;
open_rank = _yield$get.open_rank;
rank_data_name = _yield$get.rank_data_name;
rank_name = _yield$get.rank_name;
rank_order = _yield$get.rank_order;
other = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"])(_yield$get, ["open_rank", "rank_data_name", "rank_name", "rank_order"]);
rs = {
open_rank: open_rank,
rank_data_name: rank_data_name,
rank_name: rank_name,
rank_order: rank_order
};
setData(Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_11__[/* 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_11__[/* default */ "a"])({}, rs), {}, {
other: other
}));
setLoading(false);
changeData.current = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_11__[/* 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_11__[/* default */ "a"])({}, rs), {}, {
other: other
});
case 13:
case "end":
return _context.stop();
}
}
}, _callee);
}));
return function init() {
return _ref2.apply(this, arguments);
};
}();
var _ref3 = data || {},
other = _ref3.other,
open_rank = _ref3.open_rank;
function onFinish(_x) {
return _onFinish.apply(this, arguments);
}
function _onFinish() {
_onFinish = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])( /*#__PURE__*/_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_16___default.a.mark(function _callee2(values) {
var rank, is_rank, challenge_extend, response;
return _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_16___default.a.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
setBtnLoading(true);
rank = values.rank, is_rank = values.is_rank, challenge_extend = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"])(values, ["rank", "is_rank"]);
_context2.next = 4;
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_20__[/* post */ "f"])("shixuns/".concat(id, "/challenges/").concat(challengesId, "/open_or_close_rank_list.json"), {
challenge_extend: challenge_extend,
rank: is_rank ? open_rank : 'CLOSE'
});
case 4:
response = _context2.sent;
setBtnLoading(false);
if (response.status === 0) {
antd_es_message__WEBPACK_IMPORTED_MODULE_1__[/* default */ "b"].success('保存成功');
dispatch({
type: 'practiceSetting/setSideBarTabs',
payload: {
confirmLeave: false
}
});
init();
}
case 7:
case "end":
return _context2.stop();
}
}
}, _callee2);
}));
return _onFinish.apply(this, arguments);
}
function onChangeRank(checked) {
setData(Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_11__[/* 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_11__[/* default */ "a"])({}, data), {}, {
open_rank: checked ? 'DEFAULT' : 'CLOSE'
}));
}
function onChangeRankStyle(e) {
var val = e.target.value;
setData(Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_11__[/* 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_11__[/* default */ "a"])({}, data), {}, {
open_rank: val
}));
}
var handleValuesChange = function handleValuesChange(changedValues, allValues) {
setData(Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_11__[/* 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_11__[/* default */ "a"])({}, data), changedValues));
};
var setConfirmValue = function setConfirmValue() {
clearTimeout(timer.current);
timer.current = setTimeout(updateValue, 500);
};
var updateValue = function updateValue() {
var changeKeys = ['open_rank', 'rank_name', 'rank_data_name', 'rank_order'];
var cloneData = Object(lodash__WEBPACK_IMPORTED_MODULE_25__["cloneDeep"])(data);
var formBool = changeKeys.some(function (key) {
var a = Object(lodash__WEBPACK_IMPORTED_MODULE_25__["isNumber"])(cloneData[key]) ? String(cloneData[key]) : cloneData[key];
var b = Object(lodash__WEBPACK_IMPORTED_MODULE_25__["isNumber"])(changeData.current[key]) ? String(changeData.current[key]) : changeData.current[key];
return !Object(lodash__WEBPACK_IMPORTED_MODULE_25__["isEqual"])(a, b);
});
if (formBool) {
dispatch({
type: 'practiceSetting/setSideBarTabs',
payload: {
confirmLeave: true
}
});
} else {
dispatch({
type: 'practiceSetting/setSideBarTabs',
payload: {
confirmLeave: false
}
});
}
};
var toExit = function toExit() {
var _practiceSetting$side;
var toNext = function toNext() {
umi__WEBPACK_IMPORTED_MODULE_19__[/* history */ "d"].push("/shixuns/".concat(id, "/challenges"));
dispatch({
type: 'practiceSetting/setSideBarTabs',
payload: {
confirmLeave: false
}
});
};
if (practiceSetting !== null && practiceSetting !== void 0 && (_practiceSetting$side = practiceSetting.sideBar) !== null && _practiceSetting$side !== void 0 && _practiceSetting$side.confirmLeave) {
antd_es_modal__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].confirm({
title: "离开此页提示",
content: "系统可能不会保存您所做的更改。",
okText: "离开",
cancelText: "取消",
onOk: function onOk() {
toNext();
}
});
} else {
toNext();
}
};
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement("div", {
className: "ranking-setting"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement(antd_es_form__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"], {
form: form,
className: "rank-form",
onValuesChange: handleValuesChange,
onFinish: onFinish,
layout: "vertical",
style: {
paddingLeft: 40
}
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement(_challenge_nav__WEBPACK_IMPORTED_MODULE_23__[/* default */ "a"], {
activeIndex: 3
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement("div", {
className: "rank-field-container"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement("b", null, "\u5173\u5361\u6392\u884C\u699C\uFF1A"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement("div", {
className: "rank-field"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement(antd_es_form__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"].Item, {
name: "is_rank",
valuePropName: "checked"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement(antd_es_switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], {
onChange: onChangeRank
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement("span", {
className: "tip"
}, "\u5F00\u542F\u540E\uFF0C\u672C\u5173\u5361\u5C06\u5C55\u793A\u6392\u884C\u699C"))), open_rank !== 'CLOSE' && Object(_utils_authority__WEBPACK_IMPORTED_MODULE_26__[/* isCommonSuperAdminOrOperation */ "o"])() ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_17___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement(antd_es_form__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"].Item, {
label: "\u6392\u884C\u699C\u89C4\u5219\uFF1A",
name: "rank"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement(antd_es_radio__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].Group, {
onChange: onChangeRankStyle
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement("div", {
className: "rank-field"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement(antd_es_radio__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], {
value: "DEFAULT"
}, "\u9ED8\u8BA4 ", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement("span", {
className: "tip"
}, "\uFF08\u6309\u901A\u5173\u7528\u65F6\u6392\u884C\uFF09"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement("div", {
className: "rank-field"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement(antd_es_radio__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], {
value: "CUSTOM"
}, "\u81EA\u5B9A\u4E49 ", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement("span", {
className: "tip"
}, "\uFF08\u901A\u8FC7\u7A0B\u5E8F\u81EA\u5B9A\u4E49\u6392\u884C\u89C4\u5219\uFF09"))))), open_rank === 'CUSTOM' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_17___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement("div", {
className: "rank-field-container"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement("b", null, "\u6392\u884C\u699C\u540D\u79F0\uFF1A"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement("div", {
className: "rank-field"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement(antd_es_form__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"].Item, {
name: "rank_name",
rules: [{
required: true,
message: '排行榜名称不能为空'
}]
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement(antd_es_input__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], {
style: {
width: 180
},
maxLength: 8
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement("span", {
className: "tip"
}, "\u53EF\u81EA\u5B9A\u4E49\u6392\u884C\u699C\u540D\u79F0 \uFF08\u6700\u591A8\u4E2A\u5B57\u7B26\uFF09\u3002"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement("div", {
className: "rank-field-container"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement("b", null, "\u6392\u884C\u699C\u8868\u5934\uFF1A"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement("div", {
className: "rank-field flex-container"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement("div", {
className: "flex-container rank-custom-table "
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement("b", null, "\u6392\u540D"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement("b", null, "\u59D3\u540D"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement(antd_es_form__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"].Item, {
name: "rank_data_name",
initialValue: "\u6210\u7EE9",
rules: [{
required: true,
message: '请完善排行榜表头'
}]
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement(antd_es_input__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], {
style: {
width: 180,
borderRadius: 0
},
maxLength: 8
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement("b", null, "\u901A\u5173\u65F6\u95F4")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement("span", {
className: "tip"
}, "\u53EF\u81EA\u5B9A\u4E49\u6392\u884C\u699C\u7B2C\u4E09\u5217\uFF08\u6210\u7EE9\uFF09\u7684\u8868\u5934\uFF08\u6700\u591A8\u4E2A\u5B57\u7B26\uFF09\u3002"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement(antd_es_form__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"].Item, {
name: "rank_order"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement(antd_es_radio__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].Group, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement("div", {
className: "rank-field"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement(antd_es_radio__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], {
value: "desc"
}, "\u7B2C\u4E09\u5217\u7684\u503C\u8D8A\u5927\u6392\u540D\u8D8A\u9760\u524D")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement("div", {
className: "rank-field"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement(antd_es_radio__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], {
value: "asc"
}, "\u7B2C\u4E09\u5217\u7684\u503C\u8D8A\u5C0F\u6392\u540D\u8D8A\u9760\u524D"))))) : null) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement(antd_es_form__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"].Item, {
noStyle: true
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement(_components_FixedButton__WEBPACK_IMPORTED_MODULE_21__[/* FixedButton */ "a"], {
loading: btnLoading,
okButtonProps: {
htmlType: "submit"
},
className: "customFixedButton",
onCancel: toExit // onCancel={() => init()}
}))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.createElement(_components_Loading__WEBPACK_IMPORTED_MODULE_24__[/* default */ "a"], {
loading: loading
}));
};
/* harmony default export */ __webpack_exports__["default"] = (Object(umi__WEBPACK_IMPORTED_MODULE_19__[/* connect */ "a"])(function (_ref4) {
var practiceSetting = _ref4.practiceSetting;
return {
practiceSetting: practiceSetting
};
})(Es));
/***/ }),
/***/ "6cGi":
/*!*********************************************************!*\
!*** ./node_modules/rc-util/es/hooks/useMergedState.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 useControlledState; });
/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "ODXe");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "cDcd");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
function useControlledState(defaultStateValue, option) {
var _ref = option || {},
defaultValue = _ref.defaultValue,
value = _ref.value,
onChange = _ref.onChange,
postState = _ref.postState;
var _React$useState = react__WEBPACK_IMPORTED_MODULE_1__["useState"](function () {
if (value !== undefined) {
return value;
}
if (defaultValue !== undefined) {
return typeof defaultValue === 'function' ? defaultValue() : defaultValue;
}
return typeof defaultStateValue === 'function' ? defaultStateValue() : defaultStateValue;
}),
_React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_React$useState, 2),
innerValue = _React$useState2[0],
setInnerValue = _React$useState2[1];
var mergedValue = value !== undefined ? value : innerValue;
if (postState) {
mergedValue = postState(mergedValue);
} // setState
var onChangeRef = react__WEBPACK_IMPORTED_MODULE_1__["useRef"](onChange);
onChangeRef.current = onChange;
var triggerChange = react__WEBPACK_IMPORTED_MODULE_1__["useCallback"](function (newValue) {
setInnerValue(newValue);
if (mergedValue !== newValue && onChangeRef.current) {
onChangeRef.current(newValue, mergedValue);
}
}, [mergedValue, onChangeRef]); // Effect of reset value to `undefined`
var firstRenderRef = react__WEBPACK_IMPORTED_MODULE_1__["useRef"](true);
react__WEBPACK_IMPORTED_MODULE_1__["useEffect"](function () {
if (firstRenderRef.current) {
firstRenderRef.current = false;
return;
}
if (value === undefined) {
setInnerValue(value);
}
}, [value]);
return [mergedValue, triggerChange];
}
/***/ }),
/***/ "93VE":
/*!****************************************************************************************!*\
!*** ./src/pages/Shixuns/Edit/body/Level/Challenges/RankingSetting/challenge-nav.less ***!
\****************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "9ZNV":
/*!**********************************************!*\
!*** ./src/components/FixedButton/index.tsx ***!
\**********************************************/
/*! exports provided: FixedButton */
/*! exports used: FixedButton */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return FixedButton; });
/* 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_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */ "0Owb");
/* harmony import */ var antd_es_button_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/es/button/style */ "+L6B");
/* harmony import */ var antd_es_button__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! antd/es/button */ "2/Rp");
/* 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 _index_less_modules__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index.less?modules */ "UUDw");
/* harmony import */ var _index_less_modules__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_index_less_modules__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__);
var FixedButton = function FixedButton(_ref) {
var _ref$cancelText = _ref.cancelText,
cancelText = _ref$cancelText === void 0 ? '取消' : _ref$cancelText,
_ref$okText = _ref.okText,
okText = _ref$okText === void 0 ? '确定' : _ref$okText,
_ref$loading = _ref.loading,
loading = _ref$loading === void 0 ? false : _ref$loading,
_ref$hasOkBtn = _ref.hasOkBtn,
hasOkBtn = _ref$hasOkBtn === void 0 ? true : _ref$hasOkBtn,
_ref$okButtonProps = _ref.okButtonProps,
okButtonProps = _ref$okButtonProps === void 0 ? {} : _ref$okButtonProps,
_ref$onCancel = _ref.onCancel,
onCancel = _ref$onCancel === void 0 ? function () {} : _ref$onCancel,
_ref$onOk = _ref.onOk,
onOk = _ref$onOk === void 0 ? function () {} : _ref$onOk,
_ref$className = _ref.className,
className = _ref$className === void 0 ? '' : _ref$className;
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement("div", {
className: classnames__WEBPACK_IMPORTED_MODULE_5___default()(_index_less_modules__WEBPACK_IMPORTED_MODULE_4___default.a.buttonFixed, className)
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement("div", {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_4___default.a.buttonWrap
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(antd_es_button__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], {
size: "large",
className: "".concat(_index_less_modules__WEBPACK_IMPORTED_MODULE_4___default.a.button, " mr20"),
onClick: onCancel
}, cancelText), hasOkBtn && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(antd_es_button__WEBPACK_IMPORTED_MODULE_2__[/* 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_0__[/* default */ "a"])({
size: "large",
type: "primary",
className: "".concat(_index_less_modules__WEBPACK_IMPORTED_MODULE_4___default.a.button, " mr20"),
loading: loading,
onClick: onOk
}, okButtonProps), okText)));
};
/***/ }),
/***/ "F8wB":
/*!********************************************************************************************!*\
!*** ./src/pages/Shixuns/Edit/body/Level/Challenges/components/Loading/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 = {"loading":"loading___1SIOG"};
/***/ }),
/***/ "Gytx":
/*!********************************************!*\
!*** ./node_modules/shallowequal/index.js ***!
\********************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
//
module.exports = function shallowEqual(objA, objB, compare, compareContext) {
var ret = compare ? compare.call(compareContext, objA, objB) : void 0;
if (ret !== void 0) {
return !!ret;
}
if (objA === objB) {
return true;
}
if (typeof objA !== "object" || !objA || typeof objB !== "object" || !objB) {
return false;
}
var keysA = Object.keys(objA);
var keysB = Object.keys(objB);
if (keysA.length !== keysB.length) {
return false;
}
var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);
// Test for A's keys different from B.
for (var idx = 0; idx < keysA.length; idx++) {
var key = keysA[idx];
if (!bHasOwnProperty(key)) {
return false;
}
var valueA = objA[key];
var valueB = objB[key];
ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;
if (ret === false || (ret === void 0 && valueA !== valueB)) {
return false;
}
}
return true;
};
/***/ }),
/***/ "UUDw":
/*!*******************************************************!*\
!*** ./src/components/FixedButton/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 = {"buttonFixed":"buttonFixed___2zLVJ","button":"button___-JgFH","buttonWrap":"buttonWrap___aZhhk"};
/***/ }),
/***/ "XIdC":
/*!********************************************!*\
!*** ./node_modules/rc-switch/es/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_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "ODXe");
/* 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 classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "TSYQ");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-util/es/hooks/useMergedState */ "6cGi");
/* harmony import */ var rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/KeyCode */ "4IlW");
var Switch = react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function (_ref, ref) {
var _classNames;
var _ref$prefixCls = _ref.prefixCls,
prefixCls = _ref$prefixCls === void 0 ? 'rc-switch' : _ref$prefixCls,
className = _ref.className,
checked = _ref.checked,
defaultChecked = _ref.defaultChecked,
disabled = _ref.disabled,
loadingIcon = _ref.loadingIcon,
checkedChildren = _ref.checkedChildren,
unCheckedChildren = _ref.unCheckedChildren,
onClick = _ref.onClick,
onChange = _ref.onChange,
onKeyDown = _ref.onKeyDown,
restProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_ref, ["prefixCls", "className", "checked", "defaultChecked", "disabled", "loadingIcon", "checkedChildren", "unCheckedChildren", "onClick", "onChange", "onKeyDown"]);
var _useMergedState = Object(rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(false, {
value: checked,
defaultValue: defaultChecked
}),
_useMergedState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_useMergedState, 2),
innerChecked = _useMergedState2[0],
setInnerChecked = _useMergedState2[1];
function triggerChange(newChecked, event) {
var mergedChecked = innerChecked;
if (!disabled) {
mergedChecked = newChecked;
setInnerChecked(mergedChecked);
onChange === null || onChange === void 0 ? void 0 : onChange(mergedChecked, event);
}
return mergedChecked;
}
function onInternalKeyDown(e) {
if (e.which === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].LEFT) {
triggerChange(false, e);
} else if (e.which === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].RIGHT) {
triggerChange(true, e);
}
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
}
function onInternalClick(e) {
var ret = triggerChange(!innerChecked, e); // [Legacy] trigger onClick with value
onClick === null || onClick === void 0 ? void 0 : onClick(ret, e);
}
var switchClassName = classnames__WEBPACK_IMPORTED_MODULE_4___default()(prefixCls, className, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-checked"), innerChecked), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames));
return react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("button", Object.assign({}, restProps, {
type: "button",
role: "switch",
"aria-checked": innerChecked,
disabled: disabled,
className: switchClassName,
ref: ref,
onKeyDown: onInternalKeyDown,
onClick: onInternalClick
}), loadingIcon, react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", {
className: "".concat(prefixCls, "-inner")
}, innerChecked ? checkedChildren : unCheckedChildren));
});
Switch.displayName = 'Switch';
/* harmony default export */ __webpack_exports__["a"] = (Switch);
/***/ }),
/***/ "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);
/***/ }),
/***/ "ZpRC":
/*!*************************************************************************!*\
!*** ./node_modules/scroll-into-view-if-needed/es/index.js + 1 modules ***!
\*************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// CONCATENATED MODULE: ./node_modules/compute-scroll-into-view/dist/index.module.js
function t(t){return"object"==typeof t&&null!=t&&1===t.nodeType}function e(t,e){return(!e||"hidden"!==t)&&"visible"!==t&&"clip"!==t}function n(t,n){if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){var r=getComputedStyle(t,null);return e(r.overflowY,n)||e(r.overflowX,n)||function(t){var e=function(t){if(!t.ownerDocument||!t.ownerDocument.defaultView)return null;try{return t.ownerDocument.defaultView.frameElement}catch(t){return null}}(t);return!!e&&(e.clientHeight<t.scrollHeight||e.clientWidth<t.scrollWidth)}(t)}return!1}function r(t,e,n,r,i,o,l,d){return o<t&&l>e||o>t&&l<e?0:o<=t&&d<=n||l>=e&&d>=n?o-t-r:l>e&&d<n||o<t&&d>n?l-e+i:0}/* harmony default export */ var index_module = (function(e,i){var o=window,l=i.scrollMode,d=i.block,u=i.inline,h=i.boundary,a=i.skipOverflowHiddenElements,c="function"==typeof h?h:function(t){return t!==h};if(!t(e))throw new TypeError("Invalid target");for(var f=document.scrollingElement||document.documentElement,s=[],p=e;t(p)&&c(p);){if((p=p.parentElement)===f){s.push(p);break}null!=p&&p===document.body&&n(p)&&!n(document.documentElement)||null!=p&&n(p,a)&&s.push(p)}for(var m=o.visualViewport?o.visualViewport.width:innerWidth,g=o.visualViewport?o.visualViewport.height:innerHeight,w=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,W=e.getBoundingClientRect(),b=W.height,H=W.width,y=W.top,E=W.right,M=W.bottom,V=W.left,x="start"===d||"nearest"===d?y:"end"===d?M:y+b/2,I="center"===u?V+H/2:"end"===u?E:V,C=[],T=0;T<s.length;T++){var k=s[T],B=k.getBoundingClientRect(),D=B.height,O=B.width,R=B.top,X=B.right,Y=B.bottom,L=B.left;if("if-needed"===l&&y>=0&&V>=0&&M<=g&&E<=m&&y>=R&&M<=Y&&V>=L&&E<=X)return C;var S=getComputedStyle(k),j=parseInt(S.borderLeftWidth,10),q=parseInt(S.borderTopWidth,10),z=parseInt(S.borderRightWidth,10),A=parseInt(S.borderBottomWidth,10),F=0,G=0,J="offsetWidth"in k?k.offsetWidth-k.clientWidth-j-z:0,K="offsetHeight"in k?k.offsetHeight-k.clientHeight-q-A:0;if(f===k)F="start"===d?x:"end"===d?x-g:"nearest"===d?r(v,v+g,g,q,A,v+x,v+x+b,b):x-g/2,G="start"===u?I:"center"===u?I-m/2:"end"===u?I-m:r(w,w+m,m,j,z,w+I,w+I+H,H),F=Math.max(0,F+v),G=Math.max(0,G+w);else{F="start"===d?x-R-q:"end"===d?x-Y+A+K:"nearest"===d?r(R,Y,D,q,A+K,x,x+b,b):x-(R+D/2)+K/2,G="start"===u?I-L-j:"center"===u?I-(L+O/2)+J/2:"end"===u?I-X+z+J:r(L,X,O,j,z+J,I,I+H,H);var N=k.scrollLeft,P=k.scrollTop;x+=P-(F=Math.max(0,Math.min(P+F,k.scrollHeight-D+K))),I+=N-(G=Math.max(0,Math.min(N+G,k.scrollWidth-O+J)))}C.push({el:k,top:F,left:G})}return C});
//# sourceMappingURL=index.module.js.map
// CONCATENATED MODULE: ./node_modules/scroll-into-view-if-needed/es/index.js
function isOptionsObject(options) {
return options === Object(options) && Object.keys(options).length !== 0;
}
function defaultBehavior(actions, behavior) {
if (behavior === void 0) {
behavior = 'auto';
}
var canSmoothScroll = ('scrollBehavior' in document.body.style);
actions.forEach(function (_ref) {
var el = _ref.el,
top = _ref.top,
left = _ref.left;
if (el.scroll && canSmoothScroll) {
el.scroll({
top: top,
left: left,
behavior: behavior
});
} else {
el.scrollTop = top;
el.scrollLeft = left;
}
});
}
function getOptions(options) {
if (options === false) {
return {
block: 'end',
inline: 'nearest'
};
}
if (isOptionsObject(options)) {
return options;
}
return {
block: 'start',
inline: 'nearest'
};
}
function scrollIntoView(target, options) {
var targetIsDetached = !target.ownerDocument.documentElement.contains(target);
if (isOptionsObject(options) && typeof options.behavior === 'function') {
return options.behavior(targetIsDetached ? [] : index_module(target, options));
}
if (targetIsDetached) {
return;
}
var computeOptions = getOptions(options);
return defaultBehavior(index_module(target, computeOptions), computeOptions.behavior);
}
/* harmony default export */ var es = __webpack_exports__["a"] = (scrollIntoView);
/***/ }),
/***/ "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;
}
/***/ }),
/***/ "fnXi":
/*!***************************************************************************************!*\
!*** ./src/pages/Shixuns/Edit/body/Level/Challenges/RankingSetting/challenge-nav.tsx ***!
\***************************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var antd_es_modal_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/es/modal/style */ "2qtc");
/* harmony import */ var antd_es_modal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/es/modal */ "kLXV");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "cDcd");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! umi */ "Ty5D");
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! umi */ "9kvl");
/* harmony import */ var _challenge_nav_less__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./challenge-nav.less */ "93VE");
/* harmony import */ var _challenge_nav_less__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_challenge_nav_less__WEBPACK_IMPORTED_MODULE_5__);
var ChallengeNav = function ChallengeNav(_ref) {
var activeIndex = _ref.activeIndex,
_ref$isEdit = _ref.isEdit,
isEdit = _ref$isEdit === void 0 ? true : _ref$isEdit,
dispatch = _ref.dispatch,
practiceSetting = _ref.practiceSetting;
var params = Object(umi__WEBPACK_IMPORTED_MODULE_3__[/* useParams */ "i"])();
var id = params.id,
challengesId = params.challengesId;
var navs = Object(react__WEBPACK_IMPORTED_MODULE_2__["useMemo"])(function () {
return [{
name: '本关任务',
url: "/shixuns/".concat(id, "/edit/").concat(challengesId, "/editcheckpoint")
}, {
name: '评测设置',
url: "/shixuns/".concat(id, "/edit/").concat(challengesId, "/tab=2")
}, {
name: '参考答案',
url: "/shixuns/".concat(id, "/edit/").concat(challengesId, "/tab=3")
}, {
name: '关卡排行榜',
url: "/shixuns/".concat(id, "/edit/").concat(challengesId, "/tab=4")
}];
}, [id, challengesId]);
var handleClick = function handleClick(url) {
var _practiceSetting$side;
var toNext = function toNext() {
umi__WEBPACK_IMPORTED_MODULE_4__[/* history */ "d"].push(url);
dispatch({
type: 'practiceSetting/setSideBarTabs',
payload: {
confirmLeave: false
}
});
};
if (practiceSetting !== null && practiceSetting !== void 0 && (_practiceSetting$side = practiceSetting.sideBar) !== null && _practiceSetting$side !== void 0 && _practiceSetting$side.confirmLeave) {
antd_es_modal__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].confirm({
title: "离开此页提示",
content: "系统可能不会保存您所做的更改。",
okText: "离开",
cancelText: "取消",
onOk: function onOk() {
toNext();
}
});
} else {
toNext();
}
};
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("ul", {
className: "challenge-nav"
}, isEdit ? navs.map(function (item, index) {
if (activeIndex === index) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("li", {
key: item.url
}, " ", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("a", {
className: "active"
}, item.name), " ");
} else {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("li", {
key: item.url
}, " ", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("a", {
onClick: function onClick() {
return handleClick(item.url);
}
}, item.name), " ");
}
}) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("li", {
key: navs[0].url
}, " ", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("a", {
className: "active"
}, navs[0].name), " "));
};
/* harmony default export */ __webpack_exports__["a"] = (Object(umi__WEBPACK_IMPORTED_MODULE_4__[/* connect */ "a"])(function (_ref2) {
var globalSetting = _ref2.globalSetting,
practiceSetting = _ref2.practiceSetting;
return {
globalSetting: globalSetting,
practiceSetting: practiceSetting
};
})(ChallengeNav));
/***/ }),
/***/ "lfHS":
/*!********************************************************************************!*\
!*** ./src/pages/Shixuns/Edit/body/Level/Challenges/RankingSetting/index.less ***!
\********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "nuEh":
/*!***********************************************************************************!*\
!*** ./src/pages/Shixuns/Edit/body/Level/Challenges/components/Loading/index.tsx ***!
\***********************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var antd_es_spin_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/es/spin/style */ "T2oS");
/* harmony import */ var antd_es_spin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/es/spin */ "W9HT");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "cDcd");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _index_less_modules__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./index.less?modules */ "F8wB");
/* harmony import */ var _index_less_modules__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_index_less_modules__WEBPACK_IMPORTED_MODULE_3__);
var Loading = function Loading(_ref) {
var loading = _ref.loading;
return loading ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_3___default.a.loading
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(antd_es_spin__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"], null)) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_2___default.a.Fragment, null);
};
/* harmony default export */ __webpack_exports__["a"] = (Loading);
/***/ })
}]);