diff --git a/44381.async.js b/44381.async.js deleted file mode 100644 index cd4bcb49dd..0000000000 --- a/44381.async.js +++ /dev/null @@ -1,1344 +0,0 @@ -"use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[44381],{ - -/***/ 60274: -/*!******************************************!*\ - !*** ./src/pages/tasks/service/index.js ***! - \******************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ JW: function() { return /* binding */ setUnity3dStatus; }, -/* harmony export */ Jd: function() { return /* binding */ rebootEsc; }, -/* harmony export */ Kl: function() { return /* binding */ addVncTime; }, -/* harmony export */ L5: function() { return /* binding */ saveTaskStar; }, -/* harmony export */ MH: function() { return /* binding */ getChooseUnlockAnswer; }, -/* harmony export */ MI: function() { return /* binding */ addMyRepositoryFile; }, -/* harmony export */ Qo: function() { return /* binding */ getCodeGameStatus; }, -/* harmony export */ SO: function() { return /* binding */ fetchPathsTaskList; }, -/* harmony export */ Tf: function() { return /* binding */ resetGitCode; }, -/* harmony export */ XO: function() { return /* binding */ fetchTaskInfo; }, -/* harmony export */ Xy: function() { return /* binding */ codeGameBuild; }, -/* harmony export */ Y0: function() { return /* binding */ plusOrCancelPraise; }, -/* harmony export */ Ye: function() { return /* binding */ setStartPermanent; }, -/* harmony export */ Yv: function() { return /* binding */ stopLogOutput; }, -/* harmony export */ ZH: function() { return /* binding */ commitFiles; }, -/* harmony export */ am: function() { return /* binding */ resetEnvironment; }, -/* harmony export */ bD: function() { return /* binding */ deleteMyGitFile; }, -/* harmony export */ fA: function() { return /* binding */ closeWindowsVnc; }, -/* harmony export */ fY: function() { return /* binding */ getRemainingTime; }, -/* harmony export */ g6: function() { return /* binding */ fetchTaskList; }, -/* harmony export */ g7: function() { return /* binding */ moveMyGitFile; }, -/* harmony export */ gT: function() { return /* binding */ fetchPictures; }, -/* harmony export */ gn: function() { return /* binding */ pullFiles; }, -/* harmony export */ h$: function() { return /* binding */ logOutput; }, -/* harmony export */ hG: function() { return /* binding */ resetPassedCode; }, -/* harmony export */ i8: function() { return /* binding */ getRanking; }, -/* harmony export */ j3: function() { return /* binding */ getUnlockAnswer; }, -/* harmony export */ lH: function() { return /* binding */ getAnswerInfo; }, -/* harmony export */ li: function() { return /* binding */ fetchCode; }, -/* harmony export */ n4: function() { return /* binding */ updateCode; }, -/* harmony export */ pU: function() { return /* binding */ fetchRepos; }, -/* harmony export */ qK: function() { return /* binding */ restoreCode; }, -/* harmony export */ sA: function() { return /* binding */ startInit; }, -/* harmony export */ sP: function() { return /* binding */ getChooseAnswerInfo; }, -/* harmony export */ t$: function() { return /* binding */ unlockTestCase; }, -/* harmony export */ zl: function() { return /* binding */ evalateChooseGame; } -/* harmony export */ }); -/* unused harmony exports getNoticeDetail, closeSSh, getMyFileContent */ -/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js */ 10574); -/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js */ 39343); -/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js */ 26801); -/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/utils/fetch */ 4781); -/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/utils/util */ 87885); - - - - - - -//判断是否来自教学课堂助教查看实训 -var urlParamsAll = (0,_utils_util__WEBPACK_IMPORTED_MODULE_4__/* .getJsonFromUrl */ .oP)(); -var urlParams = {}; -if (urlParamsAll !== null && urlParamsAll !== void 0 && urlParamsAll.homework_common_id) { - urlParams.homework_common_id = urlParamsAll === null || urlParamsAll === void 0 ? void 0 : urlParamsAll.homework_common_id; -} -if (urlParamsAll !== null && urlParamsAll !== void 0 && urlParamsAll.exercisesId) { - urlParams.exercise_id = urlParamsAll === null || urlParamsAll === void 0 ? void 0 : urlParamsAll.exercisesId; -} -function fetchTaskInfo(id) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, ".json"), urlParams); -} -function fetchTaskList(id) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("myshixuns/".concat(id, "/challenges.json")); -} -function fetchPathsTaskList(id, params) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("myshixuns/".concat(id, "/subject_challenges.json"), params); -} -function saveTaskStar(id, shixunId, star) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/star.json"), { - shixun_id: shixunId, - star: star - }); -} -function fetchCode(id, params) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/rep_content.json"), _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params), urlParams)); -} -function updateCode(id, params) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .post */ .v_)("myshixuns/".concat(id, "/update_file.json"), params); -} -function restoreCode(id, params) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/reset_original_code.json"), _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params), urlParams)); -} -function resetGitCode(id, params) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .post */ .v_)("myshixuns/".concat(id, "/reset_repository.json"), params); -} -function resetPassedCode(id, params) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/reset_passed_code.json"), _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params), urlParams)); -} -function codeGameBuild(id, params) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .post */ .v_)("tasks/".concat(id, "/game_build.json"), _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params), urlParams)); -} -function getCodeGameStatus(id, params) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/game_status.json"), _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params), urlParams)); -} -function evalateChooseGame(id, params) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .post */ .v_)("tasks/".concat(id, "/choose_build.json"), _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params), urlParams)); -} - -//获取环境剩余时间 -function getRemainingTime(id) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("myshixuns/".concat(id, "/get_remaining_time.json")); -} -function fetchPictures(id) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/picture_display.json"), urlParams); -} -function getNoticeDetail(id, params) { - return get("courses/".concat(id, "/inform_detail.json"), params); -} -function plusOrCancelPraise(id) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .post */ .v_)("tasks/".concat(id, "/plus_or_cancel_praise.json")); -} -function fetchRepos(id) { - var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .post */ .v_)("myshixuns/".concat(id, "/repository.json"), params); -} - -//添加新方法 -function startInit(id, params) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("myshixuns/".concat(id, "/start.json"), params || {}); -} -function closeSSh(id) { - return get("myshixuns/".concat(id, "/reset_pod.json")); -} -function resetEnvironment(id, params) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("myshixuns/".concat(id, "/reset_pod.json"), params); -} - -// 重启云主机 -function rebootEsc(id, params) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/tasks/".concat(id, "/reboot_esc.json"), { - method: 'post', - body: params - }); -} -function unlockTestCase(id) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/check_test_sets.json")); -} -function getAnswerInfo(id) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/get_answer_info.json")); -} -function getChooseAnswerInfo(id) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/get_choose_answer.json")); -} -function getChooseUnlockAnswer(id) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/unlock_choose_answer.json")); -} -function getUnlockAnswer(id, aid) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/unlock_answer.json"), { - answer_id: aid - }); -} -function setUnity3dStatus(id, result, data) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .post */ .v_)("tasks/".concat(id, "/set_games_status.json"), { - result: result, - data: data - }); -} - -//保留唯一一个方法 -function addVncTime(id, params) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("myshixuns/".concat(id, "/active_pod.json"), params); -} -function getRanking(id, params) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/rank_list.json"), params); -} -function closeWindowsVnc(id, tpi_id) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .post */ .v_)("tasks/".concat(id, "/close_windows_vnc.json"), { - tpi_id: tpi_id - }); -} -function commitFiles(id, params) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/commit_files.json"), params); -} -function pullFiles(id, params) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/pull_files.json"), params); -} -function logOutput(id, params) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .post */ .v_)("tasks/".concat(id, "/log_output"), params); -} -function stopLogOutput(id, params) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/stop_log_output.json"), params); -} - -// myshixuns start -function addMyRepositoryFile(_x) { - return _addMyRepositoryFile.apply(this, arguments); -} -function _addMyRepositoryFile() { - _addMyRepositoryFile = _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee(params) { - return _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - return _context.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/myshixuns/".concat(params.id, "/add_file.json"), { - method: 'post', - body: params - })); - case 1: - case "end": - return _context.stop(); - } - }, _callee); - })); - return _addMyRepositoryFile.apply(this, arguments); -} -function deleteMyGitFile(_x2) { - return _deleteMyGitFile.apply(this, arguments); -} -function _deleteMyGitFile() { - _deleteMyGitFile = _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee2(params) { - return _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - return _context2.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/myshixuns/".concat(params.id, "/delete_git_file.json"), { - method: 'Delete', - body: params - })); - case 1: - case "end": - return _context2.stop(); - } - }, _callee2); - })); - return _deleteMyGitFile.apply(this, arguments); -} -function moveMyGitFile(_x3) { - return _moveMyGitFile.apply(this, arguments); -} -function _moveMyGitFile() { - _moveMyGitFile = _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee3(params) { - return _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - return _context3.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/myshixuns/".concat(params.id, "/mv_file.json"), { - method: 'post', - body: params - })); - case 1: - case "end": - return _context3.stop(); - } - }, _callee3); - })); - return _moveMyGitFile.apply(this, arguments); -} -function getMyFileContent(_x4) { - return _getMyFileContent.apply(this, arguments); -} -function _getMyFileContent() { - _getMyFileContent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) { - return _regeneratorRuntime().wrap(function _callee4$(_context4) { - while (1) switch (_context4.prev = _context4.next) { - case 0: - return _context4.abrupt("return", Fetch("/api/tasks/".concat(params.id, "/rep_content.json"), { - method: 'get', - params: params - })); - case 1: - case "end": - return _context4.stop(); - } - }, _callee4); - })); - return _getMyFileContent.apply(this, arguments); -} -function setStartPermanent(id, params) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/shixuns/".concat(id, "/set_start_permanent.json"), { - method: 'put', - body: params - }); -} - -/***/ }), - -/***/ 34220: -/*!**********************************************************!*\ - !*** ./src/components/vnc-setting/index.tsx + 1 modules ***! - \**********************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - Z: function() { return /* binding */ vnc_setting; } -}); - -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js -var regeneratorRuntime = __webpack_require__(10574); -var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime); -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js -var asyncToGenerator = __webpack_require__(39343); -var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator); -// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js -var _react_17_0_2_react = __webpack_require__(59301); -// EXTERNAL MODULE: ./src/components/tpi-code-setting/index.less -var tpi_code_setting = __webpack_require__(55339); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules -var modal = __webpack_require__(43418); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules -var message = __webpack_require__(8591); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules -var input = __webpack_require__(1056); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js -var row = __webpack_require__(95237); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/col/index.js -var col = __webpack_require__(43604); -// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/PoweroffOutlined.js + 1 modules -var PoweroffOutlined = __webpack_require__(22321); -// EXTERNAL MODULE: ./node_modules/_react-copy-to-clipboard@5.0.2@react-copy-to-clipboard/lib/index.js -var lib = __webpack_require__(56102); -// EXTERNAL MODULE: ./src/.umi-production/exports.ts -var _umi_production_exports = __webpack_require__(43788); -// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 3 modules -var MultiUpload = __webpack_require__(81882); -// EXTERNAL MODULE: ./src/utils/env.ts -var env = __webpack_require__(30996); -// EXTERNAL MODULE: ./src/utils/fetch.ts -var fetch = __webpack_require__(4781); -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js -var slicedToArray = __webpack_require__(11006); -var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray); -// EXTERNAL MODULE: ./src/utils/util.tsx -var util = __webpack_require__(87885); -// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js -var jsx_runtime = __webpack_require__(37712); -;// CONCATENATED MODULE: ./src/components/vnc-setting/record.tsx - - - - - - - -var ScreenRecord = /*#__PURE__*/(0,_react_17_0_2_react.forwardRef)(function (_ref, ref) { - var time = _ref.time; - console.log("ScreenRecord:", ref); - var previewRef = (0,_react_17_0_2_react.useRef)(); - var _useState = (0,_react_17_0_2_react.useState)(), - _useState2 = slicedToArray_default()(_useState, 2), - recorder = _useState2[0], - setRecorder = _useState2[1]; - var recorderRef = (0,_react_17_0_2_react.useRef)(); - var recordingTimeMS = 2000; - var recordingArr = []; - (0,_react_17_0_2_react.useImperativeHandle)(ref, function () { - return { - startScreenRecord: startScreenRecord, - downloadFile: downloadFile - }; - }); - function startRecording(_x, _x2) { - return _startRecording.apply(this, arguments); - } - function _startRecording() { - _startRecording = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(stream, lengthInMS) { - var data, re; - return regeneratorRuntime_default()().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - data = []; - _context.next = 3; - return new MediaRecorder(stream); - case 3: - re = _context.sent; - re.ondataavailable = function (event) { - data.push(event.data); - }; - re.start(); - recorderRef.current = re; - window.recorderRefs = re; - re.addEventListener('stop', function (event) { - var videoUrl = URL.createObjectURL(data[0], { - type: 'video/mp4' - }); - (0,util/* downLoadLink */.Nd)("xxx.webm", videoUrl); - }); - case 9: - case "end": - return _context.stop(); - } - }, _callee); - })); - return _startRecording.apply(this, arguments); - } - function downloadFile() { - if (!window.recorderRefs) { - message/* default */.ZP.warning("您还没有开启视频录制,请先去录制视频吧!"); - return; - } - var tracks = previewRef.current.srcObject.getTracks(); - tracks.forEach(function (track) { - track.stop(); - }); - window.recorderRefs.addEventListener('dataavailable', function (event) { - var videoUrl = URL.createObjectURL(event.data, { - type: 'video/mp4' - }); - (0,util/* downLoadLink */.Nd)("屏幕录制视频.webm", videoUrl); - }); - } - ; - function startScreenRecord() { - navigator.mediaDevices.getDisplayMedia({ - video: true, - audio: true - }).then(function (stream) { - previewRef.current.srcObject = stream; - // downloadButton.href = stream; - recordingArr.push(stream); - previewRef.current.captureStream = previewRef.current.captureStream || previewRef.current.mozCaptureStream; - return new Promise(function (resolve) { - return previewRef.current.onplaying = resolve; - }); - }).then(function () { - return startRecording(previewRef.current.captureStream(), recordingTimeMS); - }).then(function (recordedChunks) {})["catch"](function (error) { - if (error.name === "NotFoundError") { - message/* default */.ZP.warning("找不到摄像头或麦克风。无法录制."); - } else if (error.name === "UnknownError") { - message/* default */.ZP.warning('录制失败'); - } - }); - } - - // stop(previewRef.current.srcObject); - - return /*#__PURE__*/(0,jsx_runtime.jsx)("div", { - style: { - position: "absolute", - top: "0", - zIndex: -1 - }, - children: /*#__PURE__*/(0,jsx_runtime.jsx)("video", { - onPause: function onPause() {}, - width: "60", - height: "120", - autoPlay: true, - muted: true, - ref: previewRef - }) - }); -}); -/* harmony default export */ var record = (ScreenRecord); -// EXTERNAL MODULE: ./node_modules/_lodash@4.17.21@lodash/lodash.js -var lodash = __webpack_require__(89392); -// EXTERNAL MODULE: ./src/pages/Shixuns/Edit/body/Environment/MarkdownModal/index.tsx + 1 modules -var MarkdownModal = __webpack_require__(35184); -// EXTERNAL MODULE: ./src/components/ui-customization/reset.less?modules -var resetmodules = __webpack_require__(42175); -;// CONCATENATED MODULE: ./src/components/vnc-setting/index.tsx - - - - - - - - - - - - - - - - - - - -var difficultyDesc = { - 1: '简单', - 2: '中等', - 3: '困难' -}; -/* harmony default export */ var vnc_setting = (function (_ref) { - var className = _ref.className, - git_url = _ref.git_url, - difficulty = _ref.difficulty, - task_pass = _ref.task_pass, - test_set_permission = _ref.test_set_permission, - onVncAction = _ref.onVncAction, - windows_vnc = _ref.windows_vnc, - linux_vnc = _ref.linux_vnc, - vnc_url = _ref.vnc_url, - unity_3d_routes = _ref.unity_3d_routes, - index_tab = _ref.index_tab, - shixun_environment_id = _ref.shixun_environment_id, - tab_type = _ref.tab_type, - reboot_cloud = _ref.reboot_cloud, - cloud_type = _ref.cloud_type, - resData = _ref.resData, - instance_startup_type = _ref.instance_startup_type, - mirror_description_multi = _ref.mirror_description_multi, - is_jupyter_notebook = _ref.is_jupyter_notebook, - is_jupyter_lab = _ref.is_jupyter_lab, - jupyterData = _ref.jupyterData, - is_jupyter = _ref.is_jupyter, - onHideToolBar = _ref.onHideToolBar, - monitoring_url = _ref.monitoring_url, - port = _ref.port; - var params = (0,_umi_production_exports.useParams)(); - var recordRef = (0,_react_17_0_2_react.useRef)(); - - //params.taskId 普通实训 params.identifier jupyter实训 - - var uploadWorkspace = windows_vnc ? "C:\/Windows\/AppReadiness\/userfiles" : "/data/workspace/userfiles"; - var downloadWorkspace = windows_vnc ? "C:\/Windows\/AppReadiness\/downloadfiles" : "/data/workspace/downloadfiles"; - var isLoadData = !(0,lodash.isEmpty)(resData) || !(0,lodash.isEmpty)(jupyterData); - var mirror_description = jupyterData ? { - name: jupyterData === null || jupyterData === void 0 ? void 0 : jupyterData.main_mirror_name, - description: jupyterData === null || jupyterData === void 0 ? void 0 : jupyterData.main_mirror_description - } : mirror_description_multi === null || mirror_description_multi === void 0 ? void 0 : mirror_description_multi.find(function (e) { - return e.shixun_environment_id === shixun_environment_id; - }); - var uploadFile = function uploadFile() { - onHideToolBar(); - modal/* default */.Z.info({ - title: "文件上传", - icon: null, - okText: "关闭", - width: 600, - centered: true, - content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", { - className: "pt10", - children: /*#__PURE__*/(0,jsx_runtime.jsx)(MultiUpload/* default */.Z, { - isDragger: true, - maxSize: 20, - additionalText: "\u9ED8\u8BA4\u5B58\u653E\u76EE\u5F55\u8DEF\u5F84\u4E3A\"".concat(uploadWorkspace, "\""), - action: "".concat(env/* default */.Z.API_SERVER, "/api/tasks/").concat(params.taskId || params.identifier, "/upload_file?debug=admin&shixun_environment_id=").concat(shixun_environment_id || null, "&tab_type=").concat(tab_type || null, "&is_jupyter=").concat(is_jupyter || false), - onChange: function onChange(fileList) { - if (fileList.every(function (item) { - var _item$response; - return ((_item$response = item.response) === null || _item$response === void 0 ? void 0 : _item$response.status) === 0; - })) { - modal/* default */.Z.destroyAll(); - message/* default */.ZP.info("文件上传成功"); - } - console.log("fileList:", fileList); - } - }) - }) - }); - }; - var downloadFile = function downloadFile() { - onHideToolBar(); - modal/* default */.Z.confirm({ - title: "下载代码", - centered: true, - width: 600, - content: "\u4EE3\u7801\u4E0B\u8F7D\u529F\u80FD\uFF1A\u5C06\u201C".concat(downloadWorkspace, "\u201D\u76EE\u5F55\u8FDB\u884C\u6253\u5305\u5E76\u4E0B\u8F7D"), - onOk: function () { - var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() { - return regeneratorRuntime_default()().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return (0,fetch/* default */.ZP)("/api/tasks/".concat(params.taskId || params.identifier, "/download_file?debug=admin"), { - method: 'post', - body: { - autoDownload: true, - shixun_environment_id: shixun_environment_id || null, - tab_type: tab_type || null, - is_jupyter: is_jupyter || false - }, - headers: { - responseType: 'arraybuffer', - Accept: 'application/vnd.ms-excel;charset=utf-8' - } - }); - case 2: - return _context.abrupt("return", true); - case 3: - case "end": - return _context.stop(); - } - }, _callee); - })); - function onOk() { - return _onOk.apply(this, arguments); - } - return onOk; - }() - }); - }; - var onStartRecord = function onStartRecord() { - var _recordRef$current, _recordRef$current$st; - // onHideToolBar(); - (_recordRef$current = recordRef.current) === null || _recordRef$current === void 0 || (_recordRef$current$st = _recordRef$current.startScreenRecord) === null || _recordRef$current$st === void 0 || _recordRef$current$st.call(_recordRef$current); - }; - var serverPreview = /*#__PURE__*/function () { - var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() { - var value, domId; - return regeneratorRuntime_default()().wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - onHideToolBar(); - value = ''; - domId = String(Math.random()); - modal/* default */.Z.confirm({ - icon: null, - className: resetmodules/* default */.Z.CustomTipsModalCss, - okButtonProps: { - type: 'primary' - }, - centered: true, - width: 460, - okText: '预览', - cancelText: '取消', - title: '服务预览', - content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { - style: { - height: 95 - }, - children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", { - className: "mb5 c-grey-333 font14 mb10", - children: "\u670D\u52A1\u9884\u89C8\u5C06\u4E3A\u5B9E\u9A8C\u73AF\u5883\u5185\u90E8\u670D\u52A1\u6620\u5C04\u5230\u4E34\u65F6\u57DF\u540D\uFF0C\u4EC5\u4F9B\u9884\u89C8\u6D4B\u8BD5\u4F7F\u7528\u3002\u8BF7\u586B\u5199\u5185\u90E8\u670D\u52A1\u7AEF\u53E3\uFF0C\u5E76\u786E\u8BA4\u670D\u52A1\u6B63\u5E38\u542F\u52A8\u3002" - }), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { - children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", { - className: "c-grey-999 font14 mr10", - children: "\u7AEF\u53E3\u53F7" - }), /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, { - defaultValue: value, - onChange: function onChange(e) { - var dom = document.getElementById(domId); - dom.style.display = 'none'; - value = e.target.value; - }, - maxLength: 5, - style: { - width: 326 - } - })] - }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", { - style: { - display: 'none', - marginTop: 4, - marginLeft: 52 - }, - id: domId, - className: "c-red" - })] - }), - onOk: function () { - var _onOk2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() { - var _res$data; - var dom, res, _res$data2; - return regeneratorRuntime_default()().wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - dom = document.getElementById(domId); - if (value) { - _context2.next = 5; - break; - } - dom.style.display = 'block'; - dom.innerText = '端口号不能为空'; - return _context2.abrupt("return", Promise.reject()); - case 5: - if (!value.includes(" ")) { - _context2.next = 9; - break; - } - dom.style.display = 'block'; - dom.innerText = '端口号不能有空格'; - return _context2.abrupt("return", Promise.reject()); - case 9: - if (!(value && (value.includes('.') || isNaN(Number(value)) || Number(value) > 65535 || Number(value) <= 0 || value.length > 1 && value[0] === "0"))) { - _context2.next = 13; - break; - } - dom.style.display = 'block'; - dom.innerText = '请输入正确的端口号'; - return _context2.abrupt("return", Promise.reject()); - case 13: - _context2.next = 15; - return (0,fetch/* default */.ZP)("/api/tasks/".concat(params.taskId || params.identifier, "/port_proxy"), { - method: "post", - body: { - port: Number(value), - shixun_environment_id: shixun_environment_id || null, - tab_type: tab_type || null, - is_jupyter: is_jupyter || false - } - }); - case 15: - res = _context2.sent; - _context2.next = 18; - return new Promise(function (resolve, reject) { - setTimeout(function () { - resolve(''); - }, 1000); - }); - case 18: - if (res !== null && res !== void 0 && (_res$data = res.data) !== null && _res$data !== void 0 && _res$data.url) { - (0,util/* openNewWindow */.xg)(res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.url); - } - case 19: - case "end": - return _context2.stop(); - } - }, _callee2); - })); - function onOk() { - return _onOk2.apply(this, arguments); - } - return onOk; - }() - }); - case 4: - case "end": - return _context3.stop(); - } - }, _callee3); - })); - return function serverPreview() { - return _ref2.apply(this, arguments); - }; - }(); - var getSSH = function getSSH() { - onHideToolBar(); - modal/* default */.Z.info({ - title: 'SSH直连', - width: 600, - centered: true, - content: /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { - children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, { - children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { - flex: "50px", - children: "\u8D26\u53F7" - }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { - children: resData === null || resData === void 0 ? void 0 : resData.username - })] - }), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, { - children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { - flex: "50px", - children: "\u5730\u5740" - }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { - children: resData === null || resData === void 0 ? void 0 : resData.ssh_address - })] - }), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, { - children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { - flex: "50px", - children: "\u7AEF\u53E3" - }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { - children: resData === null || resData === void 0 ? void 0 : resData.port - })] - }), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, { - children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { - flex: "50px", - children: "\u5BC6\u7801" - }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { - children: resData === null || resData === void 0 ? void 0 : resData.password - })] - })] - }) - }); - }; - var getRDP = function getRDP() { - onHideToolBar(); - modal/* default */.Z.info({ - title: 'RDP直连', - icon: null, - className: resetmodules/* default */.Z.CustomTipsModalCss, - okButtonProps: { - type: 'primary' - }, - okText: '我知道啦', - width: 600, - centered: true, - content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { - children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, { - children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { - className: "c-grey-999", - flex: "50px", - children: "\u8D26\u53F7" - }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { - className: "c-grey-333", - children: resData === null || resData === void 0 ? void 0 : resData.username - })] - }), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, { - className: "mt10", - children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { - className: "c-grey-999", - flex: "50px", - children: "\u5730\u5740" - }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { - className: "c-grey-333", - children: resData === null || resData === void 0 ? void 0 : resData.host - })] - }), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, { - className: "mt10", - children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { - className: "c-grey-999", - flex: "50px", - children: "\u7AEF\u53E3" - }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { - className: "c-grey-333", - children: resData === null || resData === void 0 ? void 0 : resData.port - })] - }), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, { - className: "mt10", - children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { - className: "c-grey-999", - flex: "50px", - children: "\u5BC6\u7801" - }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { - className: "c-grey-333", - children: resData === null || resData === void 0 ? void 0 : resData.password - })] - }), /*#__PURE__*/(0,jsx_runtime.jsx)("a", { - style: { - textDecoration: 'underline', - display: 'inline-block' - }, - href: "https://www.educoder.net/forums/36696", - target: "_blank", - className: "mt10 font14 current c-light-primary", - children: "\u64CD\u4F5C\u8BF4\u660E" - })] - }) - }); - }; - return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { - className: "tpi-code-setting ".concat(className), - children: [/*#__PURE__*/(0,jsx_runtime.jsx)("h3", { - children: "\u529F\u80FD" - }), /*#__PURE__*/(0,jsx_runtime.jsxs)("section", { - children: [(unity_3d_routes || is_jupyter_notebook || is_jupyter_lab) && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { - title: "\u5168\u5C4F", - className: "file-item action", - onClick: function onClick() { - onVncAction('full-screen'); - }, - children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { - className: "iconfont icon-quanping" - }), "\u5F00\u542F / \u9000\u51FA\u5168\u5C4F"] - }), (tab_type === 2 || tab_type === 3 || tab_type === 4 || is_jupyter_notebook || is_jupyter_lab) && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { - onClick: function onClick() { - return onVncAction('reset-task'); - }, - className: "file-item action", - title: "\u91CD\u7F6E\u73AF\u5883", - children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { - className: "iconfont icon-zhongzhishixun1" - }), "\u91CD\u7F6E\u73AF\u5883"] - }), (tab_type === 2 || tab_type === 3 || tab_type === 5 || is_jupyter_lab) && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { - onClick: function onClick() { - return onVncAction('reset-git-code'); - }, - className: "file-item action", - title: "\u91CD\u7F6E\u4EE3\u7801\u4ED3\u5E93", - children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { - className: "iconfont icon-zhongzhishixun" - }), "\u91CD\u7F6E\u4EE3\u7801\u4ED3\u5E93"] - }), (tab_type === 3 || tab_type === 4 || is_jupyter_notebook || is_jupyter_lab) && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { - onClick: function onClick() { - return uploadFile(); - }, - className: "file-item action", - title: "\u4E0A\u4F20\u6587\u4EF6", - children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { - className: "iconfont icon-shangchuanwenjian" - }), "\u4E0A\u4F20\u6587\u4EF6"] - }), (tab_type === 3 || tab_type === 4 || is_jupyter_notebook || is_jupyter_lab) && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { - onClick: function onClick() { - return downloadFile(); - }, - className: "file-item action", - title: "\u4E0B\u8F7D\u6587\u4EF6", - children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { - className: "iconfont icon-xiazai3" - }), "\u4E0B\u8F7D\u6587\u4EF6"] - }), (tab_type === 3 || tab_type === 5) && location.protocol === 'https:' && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { - onClick: function onClick() { - return onStartRecord(); - }, - className: "file-item action", - title: "\u5C4F\u5E55\u5F55\u5236", - children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { - className: "iconfont icon-jiaruketang1" - }), "\u5C4F\u5E55\u5F55\u5236"] - }), reboot_cloud && isLoadData && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { - onClick: function onClick() { - return onVncAction('restart-reboot'); - }, - className: "file-item action", - title: "\u91CD\u542F\u4E91\u4E3B\u673A", - children: [/*#__PURE__*/(0,jsx_runtime.jsx)(PoweroffOutlined/* default */.Z, { - style: { - marginRight: 21, - color: "#FFF" - }, - className: "c-white font16" - }), "\u91CD\u542F\u4E91\u4E3B\u673A "] - }), (tab_type === 3 || tab_type === 5 || is_jupyter_notebook || is_jupyter_lab) && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { - onClick: function onClick() { - return onVncAction('reset-code'); - }, - className: "file-item action", - title: "\u6062\u590D\u521D\u59CB\u4EE3\u7801", - children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { - className: "iconfont icon-zhongzhi font20", - style: { - marginRight: 19 - } - }), "\u6062\u590D\u521D\u59CB\u4EE3\u7801"] - }), git_url && /*#__PURE__*/(0,jsx_runtime.jsx)(lib.CopyToClipboard, { - text: git_url, - onCopy: function onCopy() { - return message/* default */.ZP.success('复制成功'); - }, - children: /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { - title: "\u590D\u5236\u7248\u672C\u5E93\u5730\u5740", - className: "file-item action", - children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { - className: "iconfont icon-fuzhibanbenkudizhi1" - }), "\u590D\u5236\u7248\u672C\u5E93\u5730\u5740"] - }) - }), tab_type === 3 && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { - className: "file-item action", - onClick: function onClick() { - onVncAction('show-clipboard-box'); - }, - children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { - className: "iconfont icon-fuzhiniantie" - }), "\u590D\u5236\u7C98\u8D34"] - }), tab_type === 4 && isLoadData && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { - className: "file-item action", - onClick: getSSH, - children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { - className: "iconfont icon-congshulianjie" - }), "SSH\u76F4\u8FDE"] - }), instance_startup_type === 2 && isLoadData && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { - className: "file-item action", - onClick: getRDP, - children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { - className: "iconfont icon-RDPzhilian" - }), "RDP\u76F4\u8FDE"] - })] - }), !!tab_type && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { - children: [/*#__PURE__*/(0,jsx_runtime.jsx)("h3", { - children: "\u5173\u5361\u914D\u7F6E\u4FE1\u606F" - }), /*#__PURE__*/(0,jsx_runtime.jsxs)("section", { - children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("a", { - className: "file-item", - title: task_pass ? '允许学员跳关挑战' : '不允许学员跳关挑战', - children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", { - children: "\u8DF3\u5173" - }), /*#__PURE__*/(0,jsx_runtime.jsx)("span", { - children: task_pass ? '允许' : '不允许' - })] - }), /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { - className: "file-item", - title: test_set_permission ? '允许学员通过金币解锁查看测试集内容' : '不允许学员通过金币解锁查看测试集内容', - children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", { - children: "\u6D4B\u8BD5\u96C6\u89E3\u9501" - }), /*#__PURE__*/(0,jsx_runtime.jsx)("span", { - children: test_set_permission ? '允许' : '不允许' - })] - })] - })] - }), /*#__PURE__*/(0,jsx_runtime.jsx)("h3", { - children: "\u5B9E\u8BAD\u57FA\u672C\u4FE1\u606F" - }), /*#__PURE__*/(0,jsx_runtime.jsxs)("section", { - children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", { - className: "file-item", - children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", { - children: "\u5B9E\u8BAD\u96BE\u6613\u5EA6" - }), /*#__PURE__*/(0,jsx_runtime.jsx)("span", { - children: (jupyterData === null || jupyterData === void 0 ? void 0 : jupyterData.difficulty) || difficultyDesc[difficulty] - })] - }), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { - className: "file-item", - style: { - alignItems: 'flex-start' - }, - children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", { - children: "\u5B9E\u9A8C\u73AF\u5883" - }), unity_3d_routes ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", { - className: "multi_ellipsis1", - children: "\u6682\u65E0" - }) : mirror_description && /*#__PURE__*/(0,jsx_runtime.jsx)(MarkdownModal/* default */.Z, { - value: [mirror_description], - title: "\u5B9E\u9A8C\u73AF\u5883\u8BF4\u660E", - children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { - title: mirror_description === null || mirror_description === void 0 ? void 0 : mirror_description.name, - className: "multi_ellipsis1 current", - children: mirror_description === null || mirror_description === void 0 ? void 0 : mirror_description.name - }) - })] - })] - }), /*#__PURE__*/(0,jsx_runtime.jsx)(record, { - ref: recordRef - })] - }); -}); - -/***/ }), - -/***/ 35184: -/*!*************************************************************************************!*\ - !*** ./src/pages/Shixuns/Edit/body/Environment/MarkdownModal/index.tsx + 1 modules ***! - \*************************************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - Z: function() { return /* binding */ Environment_MarkdownModal; } -}); - -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js -var slicedToArray = __webpack_require__(11006); -var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray); -// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js -var _react_17_0_2_react = __webpack_require__(59301); -;// CONCATENATED MODULE: ./src/pages/Shixuns/Edit/body/Environment/MarkdownModal/index.less?modules -// extracted by mini-css-extract-plugin -/* harmony default export */ var MarkdownModalmodules = ({"mirrorModal":"mirrorModal___Pi3tF","right":"right___Hot5f","title":"title___jjMKh","content":"content___BmOkD","des":"des___oGTUM","modal":"modal___yy3VB"}); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules -var modal = __webpack_require__(43418); -// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 1 modules -var RenderHtml = __webpack_require__(32666); -// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js -var jsx_runtime = __webpack_require__(37712); -;// CONCATENATED MODULE: ./src/pages/Shixuns/Edit/body/Environment/MarkdownModal/index.tsx - - - - - - - - -var MarkdownModal = function MarkdownModal(_ref) { - var title = _ref.title, - children = _ref.children, - value = _ref.value; - var _useState = (0,_react_17_0_2_react.useState)(false), - _useState2 = slicedToArray_default()(_useState, 2), - visible = _useState2[0], - setVisible = _useState2[1]; - return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { - children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", { - onClick: function onClick() { - return setVisible(true); - }, - children: children - }), /*#__PURE__*/(0,jsx_runtime.jsxs)(modal/* default */.Z, { - title: title, - open: visible, - width: 1000, - destroyOnClose: true, - centered: true, - onCancel: function onCancel() { - return setVisible(false); - }, - className: MarkdownModalmodules.modal, - footer: null, - children: [typeof value === 'string' && /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, { - value: value || '' - }), Object.prototype.toString.call(value) === '[object Array]' && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, { - children: value === null || value === void 0 ? void 0 : value.map(function (e, i) { - return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { - children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", { - children: e.name || e.type_name - }), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, { - value: e.description || '' - })] - }, i); - }) - })] - })] - }); -}; -/* harmony default export */ var Environment_MarkdownModal = (MarkdownModal); - -/***/ }), - -/***/ 32751: -/*!*********************************************************************!*\ - !*** ./src/pages/tasks/choose-repository/test-cast-list/failer.svg ***! - \*********************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -/* unused harmony export ReactComponent */ -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301); -function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(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 = it.call(o); }, 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; } } }; } -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; } -var __defProp = Object.defineProperty; -var __getOwnPropSymbols = Object.getOwnPropertySymbols; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __propIsEnum = Object.prototype.propertyIsEnumerable; -var __defNormalProp = function __defNormalProp(obj, key, value) { - return key in obj ? __defProp(obj, key, { - enumerable: true, - configurable: true, - writable: true, - value: value - }) : obj[key] = value; -}; -var __spreadValues = function __spreadValues(a, b) { - for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]); - if (__getOwnPropSymbols) { - var _iterator = _createForOfIteratorHelper(__getOwnPropSymbols(b)), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var prop = _step.value; - if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]); - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - } - return a; -}; - -var SvgFailer = function SvgFailer(props) { - return /* @__PURE__ */React.createElement("svg", __spreadValues({ - width: 36, - height: 36, - xmlns: "http://www.w3.org/2000/svg" - }, props), /* @__PURE__ */React.createElement("title", null, "\u7F16\u7EC4\u5907\u4EFD"), /* @__PURE__ */React.createElement("g", { - fill: "none", - fillRule: "evenodd" - }, /* @__PURE__ */React.createElement("circle", { - fill: "#D55", - cx: 18, - cy: 18, - r: 18 - }), /* @__PURE__ */React.createElement("path", { - d: "M18 6a2.818 2.818 0 0 1 2.813 2.994l-.688 11.01a2.129 2.129 0 0 1-4.25 0l-.688-11.01A2.818 2.818 0 0 1 18 6Z", - fill: "#172740" - }), /* @__PURE__ */React.createElement("circle", { - fill: "#172740", - cx: 18, - cy: 26.5, - r: 2.5 - }))); -}; - -/* harmony default export */ __webpack_exports__.Z = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzYiIGhlaWdodD0iMzYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGZpbGw9IiNENTUiIGN4PSIxOCIgY3k9IjE4IiByPSIxOCIvPjxwYXRoIGQ9Ik0xOCA2YTIuODE4IDIuODE4IDAgMCAxIDIuODEzIDIuOTk0bC0uNjg4IDExLjAxYTIuMTI5IDIuMTI5IDAgMCAxLTQuMjUgMGwtLjY4OC0xMS4wMUEyLjgxOCAyLjgxOCAwIDAgMSAxOCA2WiIgZmlsbD0iIzE3Mjc0MCIvPjxjaXJjbGUgZmlsbD0iIzE3Mjc0MCIgY3g9IjE4IiBjeT0iMjYuNSIgcj0iMi41Ii8+PC9nPjwvc3ZnPg=="); - -/***/ }), - -/***/ 78570: -/*!*******************************************************************!*\ - !*** ./src/pages/tasks/choose-repository/test-cast-list/mark.svg ***! - \*******************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -/* unused harmony export ReactComponent */ -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301); -function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(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 = it.call(o); }, 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; } } }; } -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; } -var __defProp = Object.defineProperty; -var __getOwnPropSymbols = Object.getOwnPropertySymbols; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __propIsEnum = Object.prototype.propertyIsEnumerable; -var __defNormalProp = function __defNormalProp(obj, key, value) { - return key in obj ? __defProp(obj, key, { - enumerable: true, - configurable: true, - writable: true, - value: value - }) : obj[key] = value; -}; -var __spreadValues = function __spreadValues(a, b) { - for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]); - if (__getOwnPropSymbols) { - var _iterator = _createForOfIteratorHelper(__getOwnPropSymbols(b)), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var prop = _step.value; - if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]); - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - } - return a; -}; - -var SvgMark = function SvgMark(props) { - return /* @__PURE__ */React.createElement("svg", __spreadValues({ - width: 31, - height: 30, - xmlns: "http://www.w3.org/2000/svg" - }, props), /* @__PURE__ */React.createElement("title", null, "\u7F16\u7EC4 7"), /* @__PURE__ */React.createElement("g", { - transform: "translate(2 1)", - fill: "none", - fillRule: "evenodd" - }, /* @__PURE__ */React.createElement("circle", { - stroke: "#D55", - strokeWidth: 2, - cx: 14, - cy: 14, - r: 14 - }), /* @__PURE__ */React.createElement("path", { - d: "M14 5a2 2 0 0 1 2 2v8a2 2 0 1 1-4 0V7a2 2 0 0 1 2-2Z", - fill: "#D55" - }), /* @__PURE__ */React.createElement("circle", { - fill: "#D55", - cx: 14, - cy: 21, - r: 2 - }))); -}; - -/* harmony default export */ __webpack_exports__.Z = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzEiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMiAxKSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIHN0cm9rZT0iI0Q1NSIgc3Ryb2tlLXdpZHRoPSIyIiBjeD0iMTQiIGN5PSIxNCIgcj0iMTQiLz48cGF0aCBkPSJNMTQgNWEyIDIgMCAwIDEgMiAydjhhMiAyIDAgMSAxLTQgMFY3YTIgMiAwIDAgMSAyLTJaIiBmaWxsPSIjRDU1Ii8+PGNpcmNsZSBmaWxsPSIjRDU1IiBjeD0iMTQiIGN5PSIyMSIgcj0iMiIvPjwvZz48L3N2Zz4="); - -/***/ }), - -/***/ 29864: -/*!**********************************************************************!*\ - !*** ./src/pages/tasks/choose-repository/test-cast-list/success.svg ***! - \**********************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -/* unused harmony export ReactComponent */ -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301); -function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(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 = it.call(o); }, 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; } } }; } -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; } -var __defProp = Object.defineProperty; -var __getOwnPropSymbols = Object.getOwnPropertySymbols; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __propIsEnum = Object.prototype.propertyIsEnumerable; -var __defNormalProp = function __defNormalProp(obj, key, value) { - return key in obj ? __defProp(obj, key, { - enumerable: true, - configurable: true, - writable: true, - value: value - }) : obj[key] = value; -}; -var __spreadValues = function __spreadValues(a, b) { - for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]); - if (__getOwnPropSymbols) { - var _iterator = _createForOfIteratorHelper(__getOwnPropSymbols(b)), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var prop = _step.value; - if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]); - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - } - return a; -}; - -var SvgSuccess = function SvgSuccess(props) { - return /* @__PURE__ */React.createElement("svg", __spreadValues({ - width: 36, - height: 36, - xmlns: "http://www.w3.org/2000/svg" - }, props), /* @__PURE__ */React.createElement("title", null, "\u7F16\u7EC4"), /* @__PURE__ */React.createElement("g", { - fill: "none", - fillRule: "evenodd" - }, /* @__PURE__ */React.createElement("circle", { - fill: "#19CB70", - cx: 18, - cy: 18, - r: 18 - }), /* @__PURE__ */React.createElement("path", { - stroke: "#172740", - strokeWidth: 4, - strokeLinecap: "round", - strokeLinejoin: "round", - d: "M10 18.85 15.274 24 26 14" - }))); -}; - -/* harmony default export */ __webpack_exports__.Z = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzYiIGhlaWdodD0iMzYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGZpbGw9IiMxOUNCNzAiIGN4PSIxOCIgY3k9IjE4IiByPSIxOCIvPjxwYXRoIHN0cm9rZT0iIzE3Mjc0MCIgc3Ryb2tlLXdpZHRoPSI0IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGQ9Ik0xMCAxOC44NSAxNS4yNzQgMjQgMjYgMTQiLz48L2c+PC9zdmc+"); - -/***/ }), - -/***/ 42175: -/*!************************************************************!*\ - !*** ./src/components/ui-customization/reset.less?modules ***! - \************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__) { - -// extracted by mini-css-extract-plugin -/* harmony default export */ __webpack_exports__.Z = ({"flex_box_center":"flex_box_center___vG4eV","flex_space_between":"flex_space_between___qVVxe","flex_box_vertical_center":"flex_box_vertical_center___P8Z8s","flex_box_center_end":"flex_box_center_end___VMme3","flex_box_column":"flex_box_column___VMHwm","dropdownmenus":"dropdownmenus___oVzoj","popupClassNames":"popupClassNames___OcZq7","selectdown":"selectdown___mmcA8"}); - -/***/ }), - -/***/ 55339: -/*!****************************************************!*\ - !*** ./src/components/tpi-code-setting/index.less ***! - \****************************************************/ -/***/ (function() { - -// extracted by mini-css-extract-plugin - - -/***/ }), - -/***/ 21978: -/*!********************************************!*\ - !*** ./src/pages/tasks/resize-enlarge.png ***! - \********************************************/ -/***/ (function(module) { - -module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAACgCAYAAAB+HS7YAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjczMUZFNjhCMDE3NzExRUJCOEU5RDg5RTZBOTI5QTU3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjczMUZFNjhDMDE3NzExRUJCOEU5RDg5RTZBOTI5QTU3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NzMxRkU2ODkwMTc3MTFFQkI4RTlEODlFNkE5MjlBNTciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NzMxRkU2OEEwMTc3MTFFQkI4RTlEODlFNkE5MjlBNTciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7zBaLcAAACAElEQVR42uzdzyvDcRzH8ffsZiVc/IjbkOTuShN/gXIgYi5y2AlpFBL/AAdLiXBgBwfUxplmyU2tRK4sTey0+H6+RbKD7Gtfb/V817t963t59Nnn9f58+7aap6LO/yq6KmN13OoJq1MehcD3erS6rUT0VrnVC5qBpgLagWXagQIQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAABUCD6Lbkr5L2W2uv9bS3LR4vd6iAb/9BaaBfa7K+oa8+0exEwmOheT5+UXnV9zd2SEHeztSU12ldw+2tjRLbH/X/lQbktqaansluwLtelPs85XKZmRFggN9eseMSbVJ9+Js2HHCizoHRwb7ZWN12V5VtYPaacJdOUmcJNy1o67QhLt6FheScNcfFkyqmxr9eoGHsWMZD8/qBCYvLmV4NCS5XE4f8PrmVnoHRySbzeoLyf1DWnr6huxPdWPGrJhZObOC6ga12Wtmz5m9p/Kom5yZt1Or8mFhbWNLIuubOh+3fjrrXAUWMutcAxY661wBOpl1RQc6nXVFBf7GrHMEPEskP65PE+d5901anc46R68+/rp4/QYQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAP8dMKMdGNcMNH9eMaUR+GR11Oo2q6/eBBgA/5+hicfO9/sAAAAASUVORK5CYII="; - -/***/ }), - -/***/ 52787: -/*!******************************************!*\ - !*** ./src/pages/tasks/resize-small.png ***! - \******************************************/ -/***/ (function(module) { - -module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAACgCAYAAAB+HS7YAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjc0MDQ0OTA3MDE3NzExRUJCNjY1QzBDMDY3NUI5QTQ3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjc0MDQ0OTA4MDE3NzExRUJCNjY1QzBDMDY3NUI5QTQ3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NzQwNDQ5MDUwMTc3MTFFQkI2NjVDMEMwNjc1QjlBNDciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NzQwNDQ5MDYwMTc3MTFFQkI2NjVDMEMwNjc1QjlBNDciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4CEd39AAACAklEQVR42uzYvyuFURjA8Yf7TpSw+BHbvSTZrXTFX6AMRLiLySSE8ismg8FAIsKAwcCA/eqSbEqJrEgMd7pxzi3iUgbn8KTvU0/37b7Lp/Oe5+k5JygoC4uJiMkpk1GTeaIoApOVJuMm80VhZJuc1Ip7BUZFcWRr23NfAQUgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQL8FWAoFJLpseFP/+9ur8v9zUU67fN3kVVQFn52jcvNzZH52RlpaqiXwvLIh3cW9j4y32dG4BpXUlwkG0vzUlNdpe8TW9T+zqYznFNgY7ROdrc2pLSkWF+RdLe3yurCXHrvuY7gp5U6MTIgsY42b20mcFGpPiPQUKlO96CPSnUG9FWpToA+K9UJsLIinK5atcNC39Co7O0f6gWmUinp6umVk9MzveNWMpmUlo6YXF5d650Hb+/upbm1M/2rdmC1K2hX0q6o2ona7kW7J+3eVDvy26ruHxnXfSZZWF6VxZU13Ycmnz3SCdBnj3Q28vvqkU4PTT56pPODu+se6eVmwWWP9Hb1YavaVndmxBPHb89HiZO/ufpQWyQAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECPD/AB+1Aw+0AwdNPmgGnpusNblt8kkb8EWAAQAq85VNhqprywAAAABJRU5ErkJggg=="; - -/***/ }) - -}]); \ No newline at end of file diff --git a/57331.async.js b/57331.async.js new file mode 100644 index 0000000000..473089ddd9 --- /dev/null +++ b/57331.async.js @@ -0,0 +1,2986 @@ +"use strict"; +(self["webpackChunk"] = self["webpackChunk"] || []).push([[57331,81882],{ + +/***/ 60274: +/*!******************************************!*\ + !*** ./src/pages/tasks/service/index.js ***! + \******************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ JW: function() { return /* binding */ setUnity3dStatus; }, +/* harmony export */ Jd: function() { return /* binding */ rebootEsc; }, +/* harmony export */ Kl: function() { return /* binding */ addVncTime; }, +/* harmony export */ L5: function() { return /* binding */ saveTaskStar; }, +/* harmony export */ MH: function() { return /* binding */ getChooseUnlockAnswer; }, +/* harmony export */ MI: function() { return /* binding */ addMyRepositoryFile; }, +/* harmony export */ Qo: function() { return /* binding */ getCodeGameStatus; }, +/* harmony export */ SO: function() { return /* binding */ fetchPathsTaskList; }, +/* harmony export */ Tf: function() { return /* binding */ resetGitCode; }, +/* harmony export */ XO: function() { return /* binding */ fetchTaskInfo; }, +/* harmony export */ Xy: function() { return /* binding */ codeGameBuild; }, +/* harmony export */ Y0: function() { return /* binding */ plusOrCancelPraise; }, +/* harmony export */ Ye: function() { return /* binding */ setStartPermanent; }, +/* harmony export */ Yv: function() { return /* binding */ stopLogOutput; }, +/* harmony export */ ZH: function() { return /* binding */ commitFiles; }, +/* harmony export */ am: function() { return /* binding */ resetEnvironment; }, +/* harmony export */ bD: function() { return /* binding */ deleteMyGitFile; }, +/* harmony export */ fA: function() { return /* binding */ closeWindowsVnc; }, +/* harmony export */ fY: function() { return /* binding */ getRemainingTime; }, +/* harmony export */ g6: function() { return /* binding */ fetchTaskList; }, +/* harmony export */ g7: function() { return /* binding */ moveMyGitFile; }, +/* harmony export */ gT: function() { return /* binding */ fetchPictures; }, +/* harmony export */ gn: function() { return /* binding */ pullFiles; }, +/* harmony export */ h$: function() { return /* binding */ logOutput; }, +/* harmony export */ hG: function() { return /* binding */ resetPassedCode; }, +/* harmony export */ i8: function() { return /* binding */ getRanking; }, +/* harmony export */ j3: function() { return /* binding */ getUnlockAnswer; }, +/* harmony export */ lH: function() { return /* binding */ getAnswerInfo; }, +/* harmony export */ li: function() { return /* binding */ fetchCode; }, +/* harmony export */ n4: function() { return /* binding */ updateCode; }, +/* harmony export */ pU: function() { return /* binding */ fetchRepos; }, +/* harmony export */ qK: function() { return /* binding */ restoreCode; }, +/* harmony export */ sA: function() { return /* binding */ startInit; }, +/* harmony export */ sP: function() { return /* binding */ getChooseAnswerInfo; }, +/* harmony export */ t$: function() { return /* binding */ unlockTestCase; }, +/* harmony export */ zl: function() { return /* binding */ evalateChooseGame; } +/* harmony export */ }); +/* unused harmony exports getNoticeDetail, closeSSh, getMyFileContent */ +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js */ 10574); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js */ 39343); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js */ 26801); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/utils/fetch */ 4781); +/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/utils/util */ 87885); + + + + + + +//判断是否来自教学课堂助教查看实训 +var urlParamsAll = (0,_utils_util__WEBPACK_IMPORTED_MODULE_4__/* .getJsonFromUrl */ .oP)(); +var urlParams = {}; +if (urlParamsAll !== null && urlParamsAll !== void 0 && urlParamsAll.homework_common_id) { + urlParams.homework_common_id = urlParamsAll === null || urlParamsAll === void 0 ? void 0 : urlParamsAll.homework_common_id; +} +if (urlParamsAll !== null && urlParamsAll !== void 0 && urlParamsAll.exercisesId) { + urlParams.exercise_id = urlParamsAll === null || urlParamsAll === void 0 ? void 0 : urlParamsAll.exercisesId; +} +function fetchTaskInfo(id) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, ".json"), urlParams); +} +function fetchTaskList(id) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("myshixuns/".concat(id, "/challenges.json")); +} +function fetchPathsTaskList(id, params) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("myshixuns/".concat(id, "/subject_challenges.json"), params); +} +function saveTaskStar(id, shixunId, star) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/star.json"), { + shixun_id: shixunId, + star: star + }); +} +function fetchCode(id, params) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/rep_content.json"), _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params), urlParams)); +} +function updateCode(id, params) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .post */ .v_)("myshixuns/".concat(id, "/update_file.json"), params); +} +function restoreCode(id, params) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/reset_original_code.json"), _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params), urlParams)); +} +function resetGitCode(id, params) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .post */ .v_)("myshixuns/".concat(id, "/reset_repository.json"), params); +} +function resetPassedCode(id, params) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/reset_passed_code.json"), _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params), urlParams)); +} +function codeGameBuild(id, params) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .post */ .v_)("tasks/".concat(id, "/game_build.json"), _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params), urlParams)); +} +function getCodeGameStatus(id, params) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/game_status.json"), _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params), urlParams)); +} +function evalateChooseGame(id, params) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .post */ .v_)("tasks/".concat(id, "/choose_build.json"), _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params), urlParams)); +} + +//获取环境剩余时间 +function getRemainingTime(id) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("myshixuns/".concat(id, "/get_remaining_time.json")); +} +function fetchPictures(id) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/picture_display.json"), urlParams); +} +function getNoticeDetail(id, params) { + return get("courses/".concat(id, "/inform_detail.json"), params); +} +function plusOrCancelPraise(id) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .post */ .v_)("tasks/".concat(id, "/plus_or_cancel_praise.json")); +} +function fetchRepos(id) { + var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .post */ .v_)("myshixuns/".concat(id, "/repository.json"), params); +} + +//添加新方法 +function startInit(id, params) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("myshixuns/".concat(id, "/start.json"), params || {}); +} +function closeSSh(id) { + return get("myshixuns/".concat(id, "/reset_pod.json")); +} +function resetEnvironment(id, params) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("myshixuns/".concat(id, "/reset_pod.json"), params); +} + +// 重启云主机 +function rebootEsc(id, params) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/tasks/".concat(id, "/reboot_esc.json"), { + method: 'post', + body: params + }); +} +function unlockTestCase(id) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/check_test_sets.json")); +} +function getAnswerInfo(id) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/get_answer_info.json")); +} +function getChooseAnswerInfo(id) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/get_choose_answer.json")); +} +function getChooseUnlockAnswer(id) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/unlock_choose_answer.json")); +} +function getUnlockAnswer(id, aid) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/unlock_answer.json"), { + answer_id: aid + }); +} +function setUnity3dStatus(id, result, data) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .post */ .v_)("tasks/".concat(id, "/set_games_status.json"), { + result: result, + data: data + }); +} + +//保留唯一一个方法 +function addVncTime(id, params) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("myshixuns/".concat(id, "/active_pod.json"), params); +} +function getRanking(id, params) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/rank_list.json"), params); +} +function closeWindowsVnc(id, tpi_id) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .post */ .v_)("tasks/".concat(id, "/close_windows_vnc.json"), { + tpi_id: tpi_id + }); +} +function commitFiles(id, params) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/commit_files.json"), params); +} +function pullFiles(id, params) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/pull_files.json"), params); +} +function logOutput(id, params) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .post */ .v_)("tasks/".concat(id, "/log_output"), params); +} +function stopLogOutput(id, params) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, "/stop_log_output.json"), params); +} + +// myshixuns start +function addMyRepositoryFile(_x) { + return _addMyRepositoryFile.apply(this, arguments); +} +function _addMyRepositoryFile() { + _addMyRepositoryFile = _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee(params) { + return _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/myshixuns/".concat(params.id, "/add_file.json"), { + method: 'post', + body: params + })); + case 1: + case "end": + return _context.stop(); + } + }, _callee); + })); + return _addMyRepositoryFile.apply(this, arguments); +} +function deleteMyGitFile(_x2) { + return _deleteMyGitFile.apply(this, arguments); +} +function _deleteMyGitFile() { + _deleteMyGitFile = _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee2(params) { + return _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/myshixuns/".concat(params.id, "/delete_git_file.json"), { + method: 'Delete', + body: params + })); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + return _deleteMyGitFile.apply(this, arguments); +} +function moveMyGitFile(_x3) { + return _moveMyGitFile.apply(this, arguments); +} +function _moveMyGitFile() { + _moveMyGitFile = _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee3(params) { + return _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + return _context3.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/myshixuns/".concat(params.id, "/mv_file.json"), { + method: 'post', + body: params + })); + case 1: + case "end": + return _context3.stop(); + } + }, _callee3); + })); + return _moveMyGitFile.apply(this, arguments); +} +function getMyFileContent(_x4) { + return _getMyFileContent.apply(this, arguments); +} +function _getMyFileContent() { + _getMyFileContent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) { + return _regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + return _context4.abrupt("return", Fetch("/api/tasks/".concat(params.id, "/rep_content.json"), { + method: 'get', + params: params + })); + case 1: + case "end": + return _context4.stop(); + } + }, _callee4); + })); + return _getMyFileContent.apply(this, arguments); +} +function setStartPermanent(id, params) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/shixuns/".concat(id, "/set_start_permanent.json"), { + method: 'put', + body: params + }); +} + +/***/ }), + +/***/ 81882: +/*!**********************************************************!*\ + !*** ./src/components/MultiUpload/index.tsx + 3 modules ***! + \**********************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + z: function() { return /* binding */ coverToFileList; }, + Z: function() { return /* binding */ MultiUpload; } +}); + +// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js +var regeneratorRuntime = __webpack_require__(10574); +var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime); +// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js +var asyncToGenerator = __webpack_require__(39343); +var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator); +// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js +var objectSpread2 = __webpack_require__(26801); +var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2); +// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/toConsumableArray.js +var toConsumableArray = __webpack_require__(93923); +var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray); +// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js +var slicedToArray = __webpack_require__(11006); +var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray); +// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js +var _react_17_0_2_react = __webpack_require__(59301); +// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/upload/index.js + 24 modules +var upload = __webpack_require__(6557); +// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules +var es_message = __webpack_require__(8591); +// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules +var modal = __webpack_require__(43418); +// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js +var es_button = __webpack_require__(3113); +// EXTERNAL MODULE: ./src/utils/env.ts +var env = __webpack_require__(30996); +// EXTERNAL MODULE: ./src/pages/MoopCases/FormPanel/service.ts +var service = __webpack_require__(48988); +// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js +var jsx_runtime = __webpack_require__(37712); +;// CONCATENATED MODULE: ./src/components/SingleUpload/index.tsx + + + + + + + + + + +var uploadNameSizeSeperator = ' '; +function bytesToSize(bytes) { + var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']; + if (bytes == 0) return '0 Byte'; + var i = parseInt('' + Math.floor(Math.log(bytes) / Math.log(1024)), 10); + return (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i]; +} +/* harmony default export */ var SingleUpload = (function (_ref) { + var _ref$value = _ref.value, + value = _ref$value === void 0 ? [] : _ref$value, + action = _ref.action, + _onChange = _ref.onChange, + className = _ref.className, + _ref$maxSize = _ref.maxSize, + maxSize = _ref$maxSize === void 0 ? 150 : _ref$maxSize, + _ref$title = _ref.title, + title = _ref$title === void 0 ? '文件上传' : _ref$title, + _ref$accept = _ref.accept, + accept = _ref$accept === void 0 ? null : _ref$accept; + var uploadProps = { + multiple: false, + fileList: value, + accept: accept, + withCredentials: true, + beforeUpload: function beforeUpload(file) { + var fileSize = file.size / 1024 / 1024; + if (!(fileSize < maxSize)) { + message.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(maxSize, "MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20")); + return Promise.reject(); + } + return true; + }, + action: "".concat(ENV.API_SERVER, "/api/attachments.json"), + // ?debug=student&randomcode=undefined&client_key=6d57f8c3dd186c5ada392546ace9620a + onChange: function onChange(info) { + var _info$file; + var fileList = _toConsumableArray(info.fileList); + fileList = fileList.map(function (file) { + if (file.name.indexOf(uploadNameSizeSeperator) === -1) { + file.name = "".concat(file.name).concat(uploadNameSizeSeperator).concat(bytesToSize(file.size)); + } + return _objectSpread({}, file); + }); + if (info.file.status === 'done' && ((_info$file = info.file) === null || _info$file === void 0 || (_info$file = _info$file.response) === null || _info$file === void 0 ? void 0 : _info$file.status) === -1) { + var _info$file2; + message.error((_info$file2 = info.file) === null || _info$file2 === void 0 || (_info$file2 = _info$file2.response) === null || _info$file2 === void 0 ? void 0 : _info$file2.message); + _onChange([]); + return; + } + _onChange(fileList); + }, + onRemove: function () { + var _onRemove = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) { + var fileSize, id, rs; + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + fileSize = file.size / 1024 / 1024; + if (!(file.status === 'uploading')) { + _context.next = 3; + break; + } + return _context.abrupt("return", true); + case 3: + if (fileSize < maxSize) { + _context.next = 7; + break; + } + return _context.abrupt("return", true); + case 7: + id = file.response ? file.response.id : file.uid; + if (!id) { + _context.next = 15; + break; + } + _context.next = 11; + return removeAttachment(file.response ? file.response.id : file.id); + case 11: + rs = _context.sent; + return _context.abrupt("return", rs); + case 15: + return _context.abrupt("return", true); + case 16: + case "end": + return _context.stop(); + } + }, _callee); + })); + function onRemove(_x) { + return _onRemove.apply(this, arguments); + } + return onRemove; + }() + }; + function onCancel(e) { + e.preventDefault(); + e.stopPropagation(); + } + return /*#__PURE__*/_jsx("div", { + className: "single-upload ".concat(className ? className : ''), + children: /*#__PURE__*/_jsxs(Upload, _objectSpread(_objectSpread({}, uploadProps), {}, { + children: [/*#__PURE__*/_jsx(Button, { + type: "primary", + title: value.length > 0 ? '每次只能上传一个资源, 删除下面资源可重新上传 ' : '', + disabled: value.length > 0, + ghost: true, + children: title + }), /*#__PURE__*/_jsxs("span", { + onClick: onCancel, + style: { + marginLeft: 10 + }, + children: ["(\u5355\u4E2A\u6587\u4EF6\u6700\u5927", maxSize, "M)", ' '] + })] + })) + }); +}); +// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/InboxOutlined.js + 1 modules +var InboxOutlined = __webpack_require__(60936); +// EXTERNAL MODULE: ./node_modules/_lodash@4.17.21@lodash/lodash.js +var lodash = __webpack_require__(89392); +;// CONCATENATED MODULE: ./src/components/MultiUpload/index.less +// extracted by mini-css-extract-plugin + +;// CONCATENATED MODULE: ./src/assets/images/uploadImg.svg +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(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 = it.call(o); }, 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; } } }; } +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; } +var __defProp = Object.defineProperty; +var __getOwnPropSymbols = Object.getOwnPropertySymbols; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __propIsEnum = Object.prototype.propertyIsEnumerable; +var __defNormalProp = function __defNormalProp(obj, key, value) { + return key in obj ? __defProp(obj, key, { + enumerable: true, + configurable: true, + writable: true, + value: value + }) : obj[key] = value; +}; +var __spreadValues = function __spreadValues(a, b) { + for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]); + if (__getOwnPropSymbols) { + var _iterator = _createForOfIteratorHelper(__getOwnPropSymbols(b)), + _step; + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var prop = _step.value; + if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + } + return a; +}; + +var SvgUploadImg = function SvgUploadImg(props) { + return /* @__PURE__ */React.createElement("svg", __spreadValues({ + width: 14, + height: 14, + xmlns: "http://www.w3.org/2000/svg" + }, props), /* @__PURE__ */React.createElement("title", null, "\u5F62\u72B6"), /* @__PURE__ */React.createElement("path", { + d: "M10.354 3.5h-2.77v8.167H6.416V3.5H3.646L7 0l3.354 3.5ZM14 7h-1.167v5.833H1.167V7H0v7h14V7Z", + fill: "#3061D0", + fillRule: "nonzero" + })); +}; + +/* harmony default export */ var uploadImg = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwLjM1NCAzLjVoLTIuNzd2OC4xNjdINi40MTZWMy41SDMuNjQ2TDcgMGwzLjM1NCAzLjVaTTE0IDdoLTEuMTY3djUuODMzSDEuMTY3VjdIMHY3aDE0VjdaIiBmaWxsPSIjMzA2MUQwIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4="); +;// CONCATENATED MODULE: ./src/components/MultiUpload/index.tsx + + + + + + + + + + + + + + + + +var Dragger = upload/* default */.Z.Dragger; +function coverToFileList(data) { + var rs = []; + if (data && data.length > 0) { + rs = data.map(function (item) { + return { + uid: item.id, + id: item.id, + name: item.title + uploadNameSizeSeperator + item.filesize, + url: item.url, + filesize: item.filesize, + status: 'done', + response: { + id: item.id + } + }; + }); + } + return rs; +} +/* harmony default export */ var MultiUpload = (function (_ref) { + var value = _ref.value, + _onChange = _ref.onChange, + action = _ref.action, + data = _ref.data, + className = _ref.className, + _ref$maxSize = _ref.maxSize, + maxSize = _ref$maxSize === void 0 ? 150 : _ref$maxSize, + _ref$title = _ref.title, + title = _ref$title === void 0 ? '上传附件' : _ref$title, + _ref$showRemoveModal = _ref.showRemoveModal, + showRemoveModal = _ref$showRemoveModal === void 0 ? false : _ref$showRemoveModal, + _ref$accept = _ref.accept, + accept = _ref$accept === void 0 ? '' : _ref$accept, + additionalText = _ref.additionalText, + isDragger = _ref.isDragger, + _ref$number = _ref.number, + number = _ref$number === void 0 ? 1000 : _ref$number, + _ref$aloneClear = _ref.aloneClear, + aloneClear = _ref$aloneClear === void 0 ? false : _ref$aloneClear; + var _useState = (0,_react_17_0_2_react.useState)(false), + _useState2 = slicedToArray_default()(_useState, 2), + disabled = _useState2[0], + setDisabled = _useState2[1]; + var _useState3 = (0,_react_17_0_2_react.useState)(value || []), + _useState4 = slicedToArray_default()(_useState3, 2), + fileList = _useState4[0], + setFileList = _useState4[1]; + var _useState5 = (0,_react_17_0_2_react.useState)(1), + _useState6 = slicedToArray_default()(_useState5, 2), + nums = _useState6[0], + setnums = _useState6[1]; + (0,_react_17_0_2_react.useEffect)(function () { + if (value) { + if (nums === 1) { + setFileList(toConsumableArray_default()(value)); + } + setnums(2); + if (number === (value === null || value === void 0 ? void 0 : value.length)) { + setDisabled(true); + } + } + }, [value]); + var clearLastFile = function clearLastFile() { + setTimeout(function () { + fileList.pop(); + setFileList(toConsumableArray_default()(fileList)); + }, 500); + }; + var uploadProps = { + multiple: true, + disabled: disabled, + accept: accept, + withCredentials: true, + fileList: fileList, + // fileList: fileList?.length ? fileList : value, + beforeUpload: function beforeUpload(file, fileArr) { + var fileSize = file.size / 1024 / 1024; + if (fileList.concat(fileArr).length > number) { + fileList.pop(); + setFileList(toConsumableArray_default()(fileList)); + es_message/* default */.ZP.error("\u6700\u591A\u53EA\u80FD\u4E0A\u4F20".concat(number, "\u4E2A\u6587\u4EF6")); + if (aloneClear) { + return Promise.reject(); + } + clearLastFile(); + return false; + } + if (!(fileSize < maxSize)) { + es_message/* default */.ZP.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(maxSize, "MB).")); + if (aloneClear) { + return Promise.reject(); + } + clearLastFile(); + return false; + } + return true; + }, + data: data, + action: action || "".concat(env/* default */.Z.API_SERVER, "/api/attachments.json"), + // ?debug=student&randomcode=undefined&client_key=6d57f8c3dd186c5ada392546ace9620a + onChange: function onChange(info) { + var _info$file; + if (info.file.status === "removed") { + fileList = info.fileList; + } else { + fileList = (0,lodash.uniqBy)([].concat(toConsumableArray_default()(info.fileList), toConsumableArray_default()(fileList)), 'uid'); + } + if (info.file.status === 'done' && ((_info$file = info.file) === null || _info$file === void 0 || (_info$file = _info$file.response) === null || _info$file === void 0 ? void 0 : _info$file.status) === -1) { + var _info$file2; + es_message/* default */.ZP.error((_info$file2 = info.file) === null || _info$file2 === void 0 || (_info$file2 = _info$file2.response) === null || _info$file2 === void 0 ? void 0 : _info$file2.message); + return; + } + if (fileList.length >= number) setDisabled(true);else setDisabled(false); + setFileList(toConsumableArray_default()(fileList)); + fileList = fileList.map(function (file) { + var _file$response; + if (file !== null && file !== void 0 && (_file$response = file.response) !== null && _file$response !== void 0 && _file$response.id) { + var _file$response2; + file.url = "/api/attachments/".concat(file === null || file === void 0 || (_file$response2 = file.response) === null || _file$response2 === void 0 ? void 0 : _file$response2.id); + } + if (file.name.indexOf(uploadNameSizeSeperator) === -1) { + file.name = "".concat(file.name).concat(uploadNameSizeSeperator).concat(bytesToSize(file.size)); + } + return objectSpread2_default()({}, file); + }); + console.log('info:', info, fileList); + _onChange(fileList); + }, + onRemove: function () { + var _onRemove = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(file) { + var remove; + return regeneratorRuntime_default()().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + remove = /*#__PURE__*/function () { + var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() { + var id, rs; + return regeneratorRuntime_default()().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + id = file.response ? file.response.id : file.id; + if (!id) { + _context.next = 8; + break; + } + _context.next = 4; + return (0,service/* removeAttachment */.JZ)(file.response ? file.response.id : file.uid); + case 4: + rs = _context.sent; + return _context.abrupt("return", Promise.resolve(rs)); + case 8: + return _context.abrupt("return", true); + case 9: + case "end": + return _context.stop(); + } + }, _callee); + })); + return function remove() { + return _ref2.apply(this, arguments); + }; + }(); + if (!showRemoveModal) { + _context3.next = 5; + break; + } + return _context3.abrupt("return", new Promise(function (resolve, reject) { + modal/* default */.Z.confirm({ + centered: true, + width: 530, + okText: '确定', + cancelText: '取消', + title: '提示', + content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", { + className: "tc font16", + children: "\u662F\u5426\u786E\u8BA4\u5220\u9664?" + }), + onOk: function () { + var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() { + var res; + return regeneratorRuntime_default()().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return remove(); + case 2: + res = _context2.sent; + es_message/* default */.ZP.success('删除成功'); + resolve(true); + case 5: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + function onOk() { + return _onOk.apply(this, arguments); + } + return onOk; + }(), + onCancel: function onCancel() { + return resolve(false); + } + }); + })); + case 5: + _context3.next = 7; + return remove(); + case 7: + return _context3.abrupt("return", _context3.sent); + case 8: + case "end": + return _context3.stop(); + } + }, _callee3); + })); + function onRemove(_x) { + return _onRemove.apply(this, arguments); + } + return onRemove; + }() + }; + function onCancel(e) { + e.preventDefault(); + e.stopPropagation(); + } + return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + className: "multi-upload ".concat(className ? className : ''), + children: [isDragger && /*#__PURE__*/(0,jsx_runtime.jsxs)(Dragger, objectSpread2_default()(objectSpread2_default()({}, uploadProps), {}, { + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", { + className: "ant-upload-drag-icon", + children: /*#__PURE__*/(0,jsx_runtime.jsx)(InboxOutlined/* default */.Z, {}) + }), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", { + className: "ant-upload-text", + children: ["\u70B9\u51FB\u4E0A\u4F20\u56FE\u6807\uFF0C\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u4EF6\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u6B64", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "(\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\u4E3A", maxSize, "MB)", ' '] + }), additionalText] + })), !isDragger && /*#__PURE__*/(0,jsx_runtime.jsxs)(upload/* default */.Z, objectSpread2_default()(objectSpread2_default()({}, uploadProps), {}, { + children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, { + disabled: disabled, + className: "upload_button", + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", { + className: "aBtn_img", + src: uploadImg + }), title] + }), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", { + onClick: onCancel, + className: "upload_text", + children: ["(\u5355\u4E2A\u6587\u4EF6\u6700\u5927", maxSize, "MB)", ' '] + })] + }))] + }); +}); + +/***/ }), + +/***/ 1498: +/*!*********************************************************!*\ + !*** ./src/components/PreviewAll/index.tsx + 1 modules ***! + \*********************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + Z: function() { return /* binding */ PreviewAll; } +}); + +// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js +var objectSpread2 = __webpack_require__(26801); +var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2); +// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js +var regeneratorRuntime = __webpack_require__(10574); +var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime); +// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js +var asyncToGenerator = __webpack_require__(39343); +var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator); +// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js +var slicedToArray = __webpack_require__(11006); +var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray); +// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js +var _react_17_0_2_react = __webpack_require__(59301); +;// CONCATENATED MODULE: ./src/components/PreviewAll/index.less?modules +// extracted by mini-css-extract-plugin +/* harmony default export */ var PreviewAllmodules = ({"wrp":"wrp___dq7YK","bgBlack":"bgBlack___ARIUV","monaco":"monaco___VnZC3","darkBlue":"darkBlue___UprA9","close":"close___LKoWu","embed":"embed___hvpEJ"}); +// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js +var es_button = __webpack_require__(3113); +// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules +var ArrowDownOutlined = __webpack_require__(98915); +// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules +var monaco_editor = __webpack_require__(82791); +// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules +var tooltip = __webpack_require__(6848); +// EXTERNAL MODULE: ./src/utils/util.tsx +var util = __webpack_require__(87885); +// EXTERNAL MODULE: ./src/service/exercise.ts +var exercise = __webpack_require__(65398); +// EXTERNAL MODULE: ./src/components/NoData/index.tsx +var NoData = __webpack_require__(31917); +// EXTERNAL MODULE: ./src/utils/env.ts +var env = __webpack_require__(30996); +// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js +var jsx_runtime = __webpack_require__(37712); +;// CONCATENATED MODULE: ./src/components/PreviewAll/index.tsx + + + + + + + + + + + + + + + + + +/* harmony default export */ var PreviewAll = (function (_ref) { + var _data, _data2, _data3, _data4, _data5, _data6, _data7; + var _ref$editOffice = _ref.editOffice, + editOffice = _ref$editOffice === void 0 ? 'view' : _ref$editOffice, + 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, + disabledDownload = _ref.disabledDownload, + onImgDimensions = _ref.onImgDimensions, + showNodata = _ref.showNodata; + var _useState = (0,_react_17_0_2_react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'), + _useState2 = slicedToArray_default()(_useState, 2), + src = _useState2[0], + setSrc = _useState2[1]; + var _useState3 = (0,_react_17_0_2_react.useState)(""), + _useState4 = slicedToArray_default()(_useState3, 2), + token = _useState4[0], + setToken = _useState4[1]; + var _useState5 = (0,_react_17_0_2_react.useState)(), + _useState6 = slicedToArray_default()(_useState5, 2), + officeData = _useState6[0], + setOfficeData = _useState6[1]; + var officePath = window.ENV === "build" ? "/react/build" : ""; + var apiServer = location.host.startsWith("localhost") ? env/* default */.Z.PROXY_SERVER : env/* default */.Z.API_SERVER; + // let size; + console.log("disabledDownload---", disabledDownload); + var unit = 1024 * 1024; + var maxSize = 10 * unit; + var closeRef = (0,_react_17_0_2_react.useRef)(); + if ((_data = data) !== null && _data !== void 0 && _data.startsWith("/api") && type !== "txt") { + data = env/* default */.Z.API_SERVER + data; + } + // if (type === "office") { + // size = parseUrl(data).filesize + // if (size > maxSize) { + // type = "other" + // } + // } + if (filename) monacoEditor.filename = filename; + (0,_react_17_0_2_react.useEffect)(function () { + var _document$cookie; + var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 || (_document$cookie = _document$cookie.replace(/\s/g, "")) === null || _document$cookie === void 0 ? void 0 : _document$cookie.split(";"); + cookies === null || cookies === void 0 || cookies.map(function (item) { + var i = item.split("="); + if (i[0] === '_educoder_session') { + setToken(i[1]); + } + }); + }, []); + (0,_react_17_0_2_react.useEffect)(function () { + if (type === "office") getData(); + }, [type, data]); + var getData = /*#__PURE__*/function () { + var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() { + var _url, _id, res; + return regeneratorRuntime_default()().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + console.log("data:", data); + _url = data; + if (!data.startsWith("http")) { + _url = location.origin + _url; + } + _id = new URL(_url).pathname.split("/").pop(); + _context.next = 6; + return (0,exercise/* setEcsAttachment */.gJ)({ + attachment_id: _id + }); + case 6: + res = _context.sent; + setOfficeData(res); + case 8: + case "end": + return _context.stop(); + } + }, _callee); + })); + return function getData() { + return _ref2.apply(this, arguments); + }; + }(); + var handleClick = function handleClick() { + if (data.startsWith("http") || data.startsWith('blob:')) { + handleDown(); + return; + } + (0,util/* downloadFile */.Sv)(filename || 'educoder', data, filename); + }; + var handleDown = function handleDown() { + (0,util/* downLoadLink */.Nd)(filename || 'educoder', decodeURIComponent(data)); + }; + console.log(data, 'data'); + return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + style: objectSpread2_default()({}, style || {}), + className: "".concat(hasMask && PreviewAllmodules.bgBlack, " ").concat(!!type ? PreviewAllmodules.wrp : "hide"), + children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + className: PreviewAllmodules.close, + ref: closeRef, + children: [!!onImgDimensions && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, { + title: "\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8", + getPopupContainer: function getPopupContainer() { + return closeRef.current; + }, + children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + onClick: function onClick() { + onClose(); + onImgDimensions(); + }, + children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", { + className: "icon-yulanpizhu" + }) + }) + }), !disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, { + title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6", + getPopupContainer: function getPopupContainer() { + return closeRef.current; + }, + children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + onClick: handleDown, + children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", { + className: "icon-quxiaozhiding" + }) + }) + }), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, { + title: "\u5173\u95ED", + getPopupContainer: function getPopupContainer() { + return closeRef.current; + }, + children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "", + onClick: onClose, + children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", { + className: "icon-guanbi1" + }) + }) + })] + }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", { + className: "".concat(PreviewAllmodules[className], " ").concat(className, " ").concat(PreviewAllmodules.monaco, " ").concat(type === "txt" ? "show" : "hide"), + children: type === "txt" && /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, objectSpread2_default()({}, monacoEditor)) + }), type === "audio" && /*#__PURE__*/(0,jsx_runtime.jsx)("audio", { + src: ((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.indexOf("http")) > -1 || (_data3 = data) !== null && _data3 !== void 0 && _data3.startsWith("/api") ? data : "data:image/png;base64,".concat(data), + autoPlay: true + }), type === "video" && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, { + children: ((_data4 = data) === null || _data4 === void 0 ? void 0 : _data4.indexOf("http")) > -1 || (_data5 = data) !== null && _data5 !== void 0 && _data5.startsWith("/api") ? /*#__PURE__*/(0,jsx_runtime.jsx)("video", { + controls: true, + src: "".concat(data), + autoPlay: true + }) : /*#__PURE__*/(0,jsx_runtime.jsx)("video", { + controls: true, + src: "data:video/mp4;base64,".concat(data), + autoPlay: true + }) + }), type === 'office' && officeData && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", { + src: "".concat(officePath, "/office.html?key=").concat(officeData.key, "&url=").concat(apiServer + officeData.url, "&callbackUrl=").concat(apiServer + officeData.callbackUrl, "&fileType=").concat(officeData.fileType, "&title=").concat(officeData.title, "&model=").concat(editOffice, "&officeServer=").concat(env/* default */.Z.ONLYOFFICE, "&disabledDownload=").concat(!!disabledDownload) + }), type === 'html' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", { + src: data + '&disposition=inline' + }), type === 'pdf' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", { + src: "".concat(officePath, "/js/pdfview/index.html?url=").concat(data, "&disabledDownload=").concat(!!disabledDownload) + }) // + , type === "image" && /*#__PURE__*/(0,jsx_runtime.jsx)("img", { + src: ((_data6 = data) === null || _data6 === void 0 ? void 0 : _data6.indexOf("http")) > -1 || (_data7 = data) !== null && _data7 !== void 0 && _data7.startsWith("/api") ? data : "data:image/png;base64,".concat(data) + }), (type === "other" || type === "download") && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, { + children: showNodata ? /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, { + customText: "\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B", + ButtonTwo: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, { + icon: /*#__PURE__*/(0,jsx_runtime.jsx)("i", { + className: "iconfont icon-xiazai4 font14" + }), + type: "primary", + size: 'middle', + onClick: handleClick, + children: "\u4E0B\u8F7D" + }) + }) : /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, { + type: "primary", + size: 'middle', + onClick: handleClick, + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"] + }) + })] + }); +}); + +/***/ }), + +/***/ 32666: +/*!*********************************************************!*\ + !*** ./src/components/RenderHtml/index.tsx + 1 modules ***! + \*********************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + Z: function() { return /* binding */ RenderHtml; } +}); + +// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js +var objectSpread2 = __webpack_require__(26801); +var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2); +// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/toConsumableArray.js +var toConsumableArray = __webpack_require__(93923); +var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray); +// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/createForOfIteratorHelper.js +var createForOfIteratorHelper = __webpack_require__(98190); +var createForOfIteratorHelper_default = /*#__PURE__*/__webpack_require__.n(createForOfIteratorHelper); +// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js +var slicedToArray = __webpack_require__(11006); +var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray); +// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js +var _react_17_0_2_react = __webpack_require__(59301); +// EXTERNAL MODULE: ./node_modules/_katex@0.11.1@katex/dist/katex.min.css +var katex_min = __webpack_require__(88633); +// EXTERNAL MODULE: ./node_modules/_marked@2.0.7@marked/lib/marked.js +var marked = __webpack_require__(32834); +var marked_default = /*#__PURE__*/__webpack_require__.n(marked); +// EXTERNAL MODULE: ./node_modules/_marked@2.0.7@marked/src/helpers.js +var helpers = __webpack_require__(11690); +;// CONCATENATED MODULE: ./src/utils/marked.ts + + + +function indentCodeCompensation(raw, text) { + var matchIndentToCode = raw.match(/^(\s+)(?:```)/); + if (matchIndentToCode === null) { + return text; + } + var indentToCode = matchIndentToCode[1]; + return text.split('\n').map(function (node) { + var matchIndentInNode = node.match(/^\s+/); + if (matchIndentInNode === null) { + return node; + } + var _matchIndentInNode = slicedToArray_default()(matchIndentInNode, 1), + indentInNode = _matchIndentInNode[0]; + if (indentInNode.length >= indentToCode.length) { + return node.slice(indentToCode.length); + } + return node; + }).join('\n'); +} +//兼容之前的 ##标题式写法 +var toc = []; +var ctx = ["
' + (escaped ? code : (0,helpers.escape)(code, true)) + '';
+ }
+ if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
+ return "".concat(code, "
"); + } else { + return "").concat(escaped ? code : (0,helpers.escape)(code, true), "\n");
+ }
+};
+renderer.heading = function (text, level, raw) {
+ var anchor = this.options.headerPrefix + raw.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g, '-');
+ toc.push({
+ anchor: anchor,
+ level: level,
+ text: text
+ });
+ return ']*>/g;
+function _unescape(str) {
+ var div = document.createElement('div');
+ div.innerHTML = str;
+ return div.childNodes.length === 0 ? '' : div.childNodes[0].nodeValue;
+}
+/* harmony default export */ var RenderHtml = (function (_ref) {
+ var _ref$value = _ref.value,
+ value = _ref$value === void 0 ? '' : _ref$value,
+ className = _ref.className,
+ showTextOnly = _ref.showTextOnly,
+ showLines = _ref.showLines,
+ _ref$style = _ref.style,
+ style = _ref$style === void 0 ? {} : _ref$style,
+ _ref$stylesPrev = _ref.stylesPrev,
+ stylesPrev = _ref$stylesPrev === void 0 ? {} : _ref$stylesPrev,
+ highlightKeywords = _ref.highlightKeywords,
+ showProgramFill = _ref.showProgramFill,
+ isProgramFill = _ref.isProgramFill,
+ _ref$disabledFill = _ref.disabledFill,
+ disabledFill = _ref$disabledFill === void 0 ? false : _ref$disabledFill,
+ programFillValue = _ref.programFillValue,
+ _ref$onFillChange = _ref.onFillChange,
+ onFillChange = _ref$onFillChange === void 0 ? function (value) {} : _ref$onFillChange,
+ _ref$onFillBlur = _ref.onFillBlur,
+ onFillBlur = _ref$onFillBlur === void 0 ? function () {} : _ref$onFillBlur;
+ var str = String(value);
+ var _useState = (0,_react_17_0_2_react.useState)(""),
+ _useState2 = slicedToArray_default()(_useState, 2),
+ data = _useState2[0],
+ setData = _useState2[1];
+ var _useState3 = (0,_react_17_0_2_react.useState)("office"),
+ _useState4 = slicedToArray_default()(_useState3, 2),
+ type = _useState4[0],
+ setType = _useState4[1];
+ var _useState5 = (0,_react_17_0_2_react.useState)([]),
+ _useState6 = slicedToArray_default()(_useState5, 2),
+ projectValue = _useState6[0],
+ setProjectValue = _useState6[1];
+ var classNamesRef = (0,_react_17_0_2_react.useRef)("a" + (0,v4/* default */.Z)());
+ var formObj = {};
+ var createInput = function createInput(a, num) {
+ // const wrap = document.createElement("span")
+ // wrap.className =
+ var input = document.createElement(a === ADD_SINGLE ? "input" : "textarea");
+ input.style.width = "100%";
+ input.style.height = a === ADD_SINGLE ? "40px" : "151px";
+ input.rows = 5;
+ input.spellcheck = false;
+ input.name = "edu-program-fill";
+ input.placeholder = "请输入";
+ input.dataset.id = num;
+ var key = Object.keys(formObj).length;
+ formObj[key] = input;
+ return "").concat(input.outerHTML, "");
+ };
+ var formatMD = function formatMD(rs) {
+ return rs.replace(/([\s\S]+?)<\/style>/gim, function (_, css) {
+ var _css = css.replace(/(\n|\r)/g, "").split("}");
+ var arr = [];
+ _css.map(function (item) {
+ if (item != '') {
+ arr.push(".".concat(classNamesRef.current, " ").concat(item));
+ }
+ });
+ return "");
+ });
+ };
+ var html = (0,_react_17_0_2_react.useMemo)(function () {
+ try {
+ var reg = /\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g;
+ var reg2 = /\"\/api\/attachments\/|\"\/attachments\/download\//g;
+ var reg3 = /\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;
+ str = str.replace(reg, "(" + env/* default */.Z.API_SERVER + "/api/attachments/").replace(reg2, '"' + env/* default */.Z.API_SERVER + "/api/attachments/").replace(reg3, '"' + env/* default */.Z.API_SERVER + "/files/uploads/").replaceAll("http://video.educoder", "https://video.educoder").replaceAll("http://www.educoder.net/api", "https://data.educoder.net/api").replaceAll("https://www.educoder.net/api", "https://data.educoder.net/api").replace(/\r\n/g, "\n");
+ // str = str.replace(new RegExp("(?".concat(formatMD(str || ""), " ");
+ }
+ var rs = utils_marked(str);
+ rs = formatMD(rs);
+ var math_expressions = getMathExpressions();
+ if (str.match(/\[TOC\]/)) {
+ rs = rs.replace('[TOC]
', getTocContent()); + cleanToc(); + } + rs = rs.replace(/(__special_katext_id_\d+__)/g, function (_match, capture) { + var _math_expressions$cap = math_expressions[capture], + type = _math_expressions$cap.type, + expression = _math_expressions$cap.expression; + return (0,katex.renderToString)(_unescape(expression) || '', { + displayMode: type === 'block', + throwOnError: false, + output: 'html' + }); + }); + rs = rs.replace(/▁/g, '▁▁▁'); + resetMathExpressions(); + // return dompurify.sanitize(rs) + var dom = document.createElement('div'); + dom.innerHTML = rs; + if (highlightKeywords) { + var escapedKeywords = highlightKeywords.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); + findKeyword(dom, escapedKeywords); + return dom.innerHTML; + } + if (showTextOnly) { + return dom.innerText; + } + setTimeout(function () { + return onLoad(); + }, 500); + console.log("dom.innerHTML:", dom.innerHTML); + return dom.innerHTML; + }, [str, highlightKeywords]); + (0,_react_17_0_2_react.useEffect)(function () { + if (el.current) { + var inputs = el.current.querySelectorAll(["input", "textarea"]); + inputs.forEach(function (input) { + input.oninput = onInput; + input.onblur = onBlur; + }); + } + }, [projectValue]); + (0,_react_17_0_2_react.useEffect)(function () { + if (!!(programFillValue !== null && programFillValue !== void 0 && programFillValue.length)) { + var scoreDom = el.current.querySelectorAll(".edu-program-fill-score"); + var dom = el.current.querySelectorAll('[name="edu-program-fill"]'); + var _iterator = createForOfIteratorHelper_default()(dom.entries()), + _step; + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var _programFillValue$k; + var _step$value = slicedToArray_default()(_step.value, 2), + k = _step$value[0], + i = _step$value[1]; + i.value = (_programFillValue$k = programFillValue[k]) === null || _programFillValue$k === void 0 ? void 0 : _programFillValue$k.value; + if (programFillValue[k].type === "warning") { + i.className = "program-fill-warning"; + } else if (programFillValue[k].type === "success") { + i.className = "program-fill-success"; + } else { + i.className = ""; + } + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + var _iterator2 = createForOfIteratorHelper_default()(scoreDom.entries()), + _step2; + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + var _programFillValue$_k, _programFillValue$_k2; + var _step2$value = slicedToArray_default()(_step2.value, 2), + _k = _step2$value[0], + _i = _step2$value[1]; + _i.innerHTML = (_programFillValue$_k = programFillValue[_k]) !== null && _programFillValue$_k !== void 0 && _programFillValue$_k.score ? "".concat((_programFillValue$_k2 = programFillValue[_k]) === null || _programFillValue$_k2 === void 0 ? void 0 : _programFillValue$_k2.score, "\u5206") : ""; + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + setProjectValue(programFillValue); + } + }, [programFillValue]); + var onInput = function onInput(e) { + projectValue[e.target.dataset.id] = projectValue[e.target.dataset.id] || {}; + projectValue[e.target.dataset.id]["value"] = e.target.value; + setProjectValue(toConsumableArray_default()(projectValue)); + onFillChange(projectValue, e.target.dataset.id); + }; + var onBlur = function onBlur(e) { + projectValue[e.target.dataset.id] = projectValue[e.target.dataset.id] || {}; + projectValue[e.target.dataset.id]["value"] = e.target.value; + setProjectValue(toConsumableArray_default()(projectValue)); + onFillBlur(projectValue, e.target.dataset.id); + }; + function findKeyword(node, keyword) { + return node.childNodes.forEach(function (childNode) { + if (childNode.childNodes.length > 0) { + findKeyword(childNode, keyword); + } else if (childNode.nodeName !== "IMG") { + if (childNode.innerHTML) { + var _childNode$innerHTML; + childNode.innerHTML = (_childNode$innerHTML = childNode.innerHTML) === null || _childNode$innerHTML === void 0 ? void 0 : _childNode$innerHTML.replace(new RegExp(keyword, "gi"), '$&'); + } else { + var dom = document.createElement("span"); + dom.innerHTML = childNode.textContent.replace(new RegExp(keyword, "gi"), '$&'); + childNode.replaceWith(dom); + } + } + }); + + // return dom.childNodes.forEach((node:any) => { + // console.log("nodeLen:",node.childNodes.length) + // if(node.childNodes.length > 0){ + // debugger + // // findKeyword(dom.childNodes,keyword) + // }else{ + // if(node.nodeName !== "#text"){ + // node.innerHTML = node.innerHTML.replaceAll(keyword,`${keyword}`) + // console.log("node:",node,dom,node.nodeName,node.innerHTML,node.childNodes.length) + // debugger + // } + // } + + // return node + // }); + } + + var el = (0,_react_17_0_2_react.useRef)(); + lines['WebkitLineClamp'] = showLines; + if (showLines) { + style = objectSpread2_default()(objectSpread2_default()({}, style), lines); + } + function onAncherHandler(e) { + var target = e.target; + if (target.tagName.toUpperCase() === 'A') { + var ancher = target.getAttribute('href'); + if (ancher.indexOf("office") > -1) { + e.preventDefault(); + setData(ancher); + setType("office"); + } else if (ancher.indexOf("application/pdf") > -1) { + e.preventDefault(); + setData(ancher); + setType("pdf"); + } else if (ancher.indexOf("text/html") > -1) { + e.preventDefault(); + setData(ancher); + setType("html"); + } else if (ancher.startsWith('#')) { + e.preventDefault(); + var viewEl = document.getElementById(ancher.replace('#', '')); + if (viewEl) { + viewEl.scrollIntoView(true); + } + } + } + } + var onLoad = function onLoad() { + var _el$current; + var videoElement = (_el$current = el.current) === null || _el$current === void 0 ? void 0 : _el$current.querySelectorAll('video'); + videoElement === null || videoElement === void 0 || videoElement.forEach(function (item) { + item.oncontextmenu = function () { + return false; + }; + if (item.src.indexOf('.m3u8') > -1) { + if (item.canPlayType('application/vnd.apple.mpegurl')) {} else if (dist_hls/* default */.Z.isSupported()) { + var hls = new dist_hls/* default */.Z(); + hls.loadSource(item.src); + hls.attachMedia(item); + } + } + }); + }; + (0,_react_17_0_2_react.useEffect)(function () { + if (el.current && html) { + if (html.match(preRegex)) { + window.PR.prettyPrint(); + } + } + if (el.current) { + el.current.addEventListener('click', onAncherHandler); + return function () { + var _el$current2; + (_el$current2 = el.current) === null || _el$current2 === void 0 || _el$current2.removeEventListener('click', onAncherHandler); + resetMathExpressions(); + cleanToc(); + }; + } + }, [html, el.current, onAncherHandler]); + return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { + children: [showTextOnly && /*#__PURE__*/(0,jsx_runtime.jsx)("div", { + ref: el, + children: html + }), !showTextOnly && /*#__PURE__*/(0,jsx_runtime.jsx)("div", { + ref: el, + style: objectSpread2_default()({}, style), + className: "".concat(className ? className : '', " ").concat(disabledFill ? "disabled-fill" : "", " markdown-body ").concat(classNamesRef.current), + dangerouslySetInnerHTML: { + __html: html + } + }), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, { + close: true, + data: data, + type: !!(data !== null && data !== void 0 && data.length) ? type : "", + style: objectSpread2_default()({}, stylesPrev), + onClose: function onClose() { + return setData(""); + } + })] + }); +}); + +/***/ }), + +/***/ 34220: +/*!**********************************************************!*\ + !*** ./src/components/vnc-setting/index.tsx + 1 modules ***! + \**********************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + Z: function() { return /* binding */ vnc_setting; } +}); + +// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js +var regeneratorRuntime = __webpack_require__(10574); +var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime); +// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js +var asyncToGenerator = __webpack_require__(39343); +var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator); +// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js +var _react_17_0_2_react = __webpack_require__(59301); +// EXTERNAL MODULE: ./src/components/tpi-code-setting/index.less +var tpi_code_setting = __webpack_require__(55339); +// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules +var modal = __webpack_require__(43418); +// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules +var message = __webpack_require__(8591); +// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules +var input = __webpack_require__(1056); +// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js +var row = __webpack_require__(95237); +// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/col/index.js +var col = __webpack_require__(43604); +// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/PoweroffOutlined.js + 1 modules +var PoweroffOutlined = __webpack_require__(22321); +// EXTERNAL MODULE: ./node_modules/_react-copy-to-clipboard@5.0.2@react-copy-to-clipboard/lib/index.js +var lib = __webpack_require__(56102); +// EXTERNAL MODULE: ./src/.umi-production/exports.ts +var _umi_production_exports = __webpack_require__(43788); +// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 3 modules +var MultiUpload = __webpack_require__(81882); +// EXTERNAL MODULE: ./src/utils/env.ts +var env = __webpack_require__(30996); +// EXTERNAL MODULE: ./src/utils/fetch.ts +var fetch = __webpack_require__(4781); +// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js +var slicedToArray = __webpack_require__(11006); +var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray); +// EXTERNAL MODULE: ./src/utils/util.tsx +var util = __webpack_require__(87885); +// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js +var jsx_runtime = __webpack_require__(37712); +;// CONCATENATED MODULE: ./src/components/vnc-setting/record.tsx + + + + + + + +var ScreenRecord = /*#__PURE__*/(0,_react_17_0_2_react.forwardRef)(function (_ref, ref) { + var time = _ref.time; + console.log("ScreenRecord:", ref); + var previewRef = (0,_react_17_0_2_react.useRef)(); + var _useState = (0,_react_17_0_2_react.useState)(), + _useState2 = slicedToArray_default()(_useState, 2), + recorder = _useState2[0], + setRecorder = _useState2[1]; + var recorderRef = (0,_react_17_0_2_react.useRef)(); + var recordingTimeMS = 2000; + var recordingArr = []; + (0,_react_17_0_2_react.useImperativeHandle)(ref, function () { + return { + startScreenRecord: startScreenRecord, + downloadFile: downloadFile + }; + }); + function startRecording(_x, _x2) { + return _startRecording.apply(this, arguments); + } + function _startRecording() { + _startRecording = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(stream, lengthInMS) { + var data, re; + return regeneratorRuntime_default()().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + data = []; + _context.next = 3; + return new MediaRecorder(stream); + case 3: + re = _context.sent; + re.ondataavailable = function (event) { + data.push(event.data); + }; + re.start(); + recorderRef.current = re; + window.recorderRefs = re; + re.addEventListener('stop', function (event) { + var videoUrl = URL.createObjectURL(data[0], { + type: 'video/mp4' + }); + (0,util/* downLoadLink */.Nd)("xxx.webm", videoUrl); + }); + case 9: + case "end": + return _context.stop(); + } + }, _callee); + })); + return _startRecording.apply(this, arguments); + } + function downloadFile() { + if (!window.recorderRefs) { + message/* default */.ZP.warning("您还没有开启视频录制,请先去录制视频吧!"); + return; + } + var tracks = previewRef.current.srcObject.getTracks(); + tracks.forEach(function (track) { + track.stop(); + }); + window.recorderRefs.addEventListener('dataavailable', function (event) { + var videoUrl = URL.createObjectURL(event.data, { + type: 'video/mp4' + }); + (0,util/* downLoadLink */.Nd)("屏幕录制视频.webm", videoUrl); + }); + } + ; + function startScreenRecord() { + navigator.mediaDevices.getDisplayMedia({ + video: true, + audio: true + }).then(function (stream) { + previewRef.current.srcObject = stream; + // downloadButton.href = stream; + recordingArr.push(stream); + previewRef.current.captureStream = previewRef.current.captureStream || previewRef.current.mozCaptureStream; + return new Promise(function (resolve) { + return previewRef.current.onplaying = resolve; + }); + }).then(function () { + return startRecording(previewRef.current.captureStream(), recordingTimeMS); + }).then(function (recordedChunks) {})["catch"](function (error) { + if (error.name === "NotFoundError") { + message/* default */.ZP.warning("找不到摄像头或麦克风。无法录制."); + } else if (error.name === "UnknownError") { + message/* default */.ZP.warning('录制失败'); + } + }); + } + + // stop(previewRef.current.srcObject); + + return /*#__PURE__*/(0,jsx_runtime.jsx)("div", { + style: { + position: "absolute", + top: "0", + zIndex: -1 + }, + children: /*#__PURE__*/(0,jsx_runtime.jsx)("video", { + onPause: function onPause() {}, + width: "60", + height: "120", + autoPlay: true, + muted: true, + ref: previewRef + }) + }); +}); +/* harmony default export */ var record = (ScreenRecord); +// EXTERNAL MODULE: ./node_modules/_lodash@4.17.21@lodash/lodash.js +var lodash = __webpack_require__(89392); +// EXTERNAL MODULE: ./src/pages/Shixuns/Edit/body/Environment/MarkdownModal/index.tsx + 1 modules +var MarkdownModal = __webpack_require__(35184); +// EXTERNAL MODULE: ./src/components/ui-customization/reset.less?modules +var resetmodules = __webpack_require__(42175); +;// CONCATENATED MODULE: ./src/components/vnc-setting/index.tsx + + + + + + + + + + + + + + + + + + + +var difficultyDesc = { + 1: '简单', + 2: '中等', + 3: '困难' +}; +/* harmony default export */ var vnc_setting = (function (_ref) { + var className = _ref.className, + git_url = _ref.git_url, + difficulty = _ref.difficulty, + task_pass = _ref.task_pass, + test_set_permission = _ref.test_set_permission, + onVncAction = _ref.onVncAction, + windows_vnc = _ref.windows_vnc, + linux_vnc = _ref.linux_vnc, + vnc_url = _ref.vnc_url, + unity_3d_routes = _ref.unity_3d_routes, + index_tab = _ref.index_tab, + shixun_environment_id = _ref.shixun_environment_id, + tab_type = _ref.tab_type, + reboot_cloud = _ref.reboot_cloud, + cloud_type = _ref.cloud_type, + resData = _ref.resData, + instance_startup_type = _ref.instance_startup_type, + mirror_description_multi = _ref.mirror_description_multi, + is_jupyter_notebook = _ref.is_jupyter_notebook, + is_jupyter_lab = _ref.is_jupyter_lab, + jupyterData = _ref.jupyterData, + is_jupyter = _ref.is_jupyter, + onHideToolBar = _ref.onHideToolBar, + monitoring_url = _ref.monitoring_url, + port = _ref.port; + var params = (0,_umi_production_exports.useParams)(); + var recordRef = (0,_react_17_0_2_react.useRef)(); + + //params.taskId 普通实训 params.identifier jupyter实训 + + var uploadWorkspace = windows_vnc ? "C:\/Windows\/AppReadiness\/userfiles" : "/data/workspace/userfiles"; + var downloadWorkspace = windows_vnc ? "C:\/Windows\/AppReadiness\/downloadfiles" : "/data/workspace/downloadfiles"; + var isLoadData = !(0,lodash.isEmpty)(resData) || !(0,lodash.isEmpty)(jupyterData); + var mirror_description = jupyterData ? { + name: jupyterData === null || jupyterData === void 0 ? void 0 : jupyterData.main_mirror_name, + description: jupyterData === null || jupyterData === void 0 ? void 0 : jupyterData.main_mirror_description + } : mirror_description_multi === null || mirror_description_multi === void 0 ? void 0 : mirror_description_multi.find(function (e) { + return e.shixun_environment_id === shixun_environment_id; + }); + var uploadFile = function uploadFile() { + onHideToolBar(); + modal/* default */.Z.info({ + title: "文件上传", + icon: null, + okText: "关闭", + width: 600, + centered: true, + content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", { + className: "pt10", + children: /*#__PURE__*/(0,jsx_runtime.jsx)(MultiUpload/* default */.Z, { + isDragger: true, + maxSize: 20, + additionalText: "\u9ED8\u8BA4\u5B58\u653E\u76EE\u5F55\u8DEF\u5F84\u4E3A\"".concat(uploadWorkspace, "\""), + action: "".concat(env/* default */.Z.API_SERVER, "/api/tasks/").concat(params.taskId || params.identifier, "/upload_file?debug=admin&shixun_environment_id=").concat(shixun_environment_id || null, "&tab_type=").concat(tab_type || null, "&is_jupyter=").concat(is_jupyter || false), + onChange: function onChange(fileList) { + if (fileList.every(function (item) { + var _item$response; + return ((_item$response = item.response) === null || _item$response === void 0 ? void 0 : _item$response.status) === 0; + })) { + modal/* default */.Z.destroyAll(); + message/* default */.ZP.info("文件上传成功"); + } + console.log("fileList:", fileList); + } + }) + }) + }); + }; + var downloadFile = function downloadFile() { + onHideToolBar(); + modal/* default */.Z.confirm({ + title: "下载代码", + centered: true, + width: 600, + content: "\u4EE3\u7801\u4E0B\u8F7D\u529F\u80FD\uFF1A\u5C06\u201C".concat(downloadWorkspace, "\u201D\u76EE\u5F55\u8FDB\u884C\u6253\u5305\u5E76\u4E0B\u8F7D"), + onOk: function () { + var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() { + return regeneratorRuntime_default()().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return (0,fetch/* default */.ZP)("/api/tasks/".concat(params.taskId || params.identifier, "/download_file?debug=admin"), { + method: 'post', + body: { + autoDownload: true, + shixun_environment_id: shixun_environment_id || null, + tab_type: tab_type || null, + is_jupyter: is_jupyter || false + }, + headers: { + responseType: 'arraybuffer', + Accept: 'application/vnd.ms-excel;charset=utf-8' + } + }); + case 2: + return _context.abrupt("return", true); + case 3: + case "end": + return _context.stop(); + } + }, _callee); + })); + function onOk() { + return _onOk.apply(this, arguments); + } + return onOk; + }() + }); + }; + var onStartRecord = function onStartRecord() { + var _recordRef$current, _recordRef$current$st; + // onHideToolBar(); + (_recordRef$current = recordRef.current) === null || _recordRef$current === void 0 || (_recordRef$current$st = _recordRef$current.startScreenRecord) === null || _recordRef$current$st === void 0 || _recordRef$current$st.call(_recordRef$current); + }; + var serverPreview = /*#__PURE__*/function () { + var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() { + var value, domId; + return regeneratorRuntime_default()().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + onHideToolBar(); + value = ''; + domId = String(Math.random()); + modal/* default */.Z.confirm({ + icon: null, + className: resetmodules/* default */.Z.CustomTipsModalCss, + okButtonProps: { + type: 'primary' + }, + centered: true, + width: 460, + okText: '预览', + cancelText: '取消', + title: '服务预览', + content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + style: { + height: 95 + }, + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", { + className: "mb5 c-grey-333 font14 mb10", + children: "\u670D\u52A1\u9884\u89C8\u5C06\u4E3A\u5B9E\u9A8C\u73AF\u5883\u5185\u90E8\u670D\u52A1\u6620\u5C04\u5230\u4E34\u65F6\u57DF\u540D\uFF0C\u4EC5\u4F9B\u9884\u89C8\u6D4B\u8BD5\u4F7F\u7528\u3002\u8BF7\u586B\u5199\u5185\u90E8\u670D\u52A1\u7AEF\u53E3\uFF0C\u5E76\u786E\u8BA4\u670D\u52A1\u6B63\u5E38\u542F\u52A8\u3002" + }), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "c-grey-999 font14 mr10", + children: "\u7AEF\u53E3\u53F7" + }), /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, { + defaultValue: value, + onChange: function onChange(e) { + var dom = document.getElementById(domId); + dom.style.display = 'none'; + value = e.target.value; + }, + maxLength: 5, + style: { + width: 326 + } + })] + }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", { + style: { + display: 'none', + marginTop: 4, + marginLeft: 52 + }, + id: domId, + className: "c-red" + })] + }), + onOk: function () { + var _onOk2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() { + var _res$data; + var dom, res, _res$data2; + return regeneratorRuntime_default()().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + dom = document.getElementById(domId); + if (value) { + _context2.next = 5; + break; + } + dom.style.display = 'block'; + dom.innerText = '端口号不能为空'; + return _context2.abrupt("return", Promise.reject()); + case 5: + if (!value.includes(" ")) { + _context2.next = 9; + break; + } + dom.style.display = 'block'; + dom.innerText = '端口号不能有空格'; + return _context2.abrupt("return", Promise.reject()); + case 9: + if (!(value && (value.includes('.') || isNaN(Number(value)) || Number(value) > 65535 || Number(value) <= 0 || value.length > 1 && value[0] === "0"))) { + _context2.next = 13; + break; + } + dom.style.display = 'block'; + dom.innerText = '请输入正确的端口号'; + return _context2.abrupt("return", Promise.reject()); + case 13: + _context2.next = 15; + return (0,fetch/* default */.ZP)("/api/tasks/".concat(params.taskId || params.identifier, "/port_proxy"), { + method: "post", + body: { + port: Number(value), + shixun_environment_id: shixun_environment_id || null, + tab_type: tab_type || null, + is_jupyter: is_jupyter || false + } + }); + case 15: + res = _context2.sent; + _context2.next = 18; + return new Promise(function (resolve, reject) { + setTimeout(function () { + resolve(''); + }, 1000); + }); + case 18: + if (res !== null && res !== void 0 && (_res$data = res.data) !== null && _res$data !== void 0 && _res$data.url) { + (0,util/* openNewWindow */.xg)(res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.url); + } + case 19: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + function onOk() { + return _onOk2.apply(this, arguments); + } + return onOk; + }() + }); + case 4: + case "end": + return _context3.stop(); + } + }, _callee3); + })); + return function serverPreview() { + return _ref2.apply(this, arguments); + }; + }(); + var getSSH = function getSSH() { + onHideToolBar(); + modal/* default */.Z.info({ + title: 'SSH直连', + width: 600, + centered: true, + content: /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { + children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, { + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { + flex: "50px", + children: "\u8D26\u53F7" + }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { + children: resData === null || resData === void 0 ? void 0 : resData.username + })] + }), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, { + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { + flex: "50px", + children: "\u5730\u5740" + }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { + children: resData === null || resData === void 0 ? void 0 : resData.ssh_address + })] + }), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, { + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { + flex: "50px", + children: "\u7AEF\u53E3" + }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { + children: resData === null || resData === void 0 ? void 0 : resData.port + })] + }), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, { + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { + flex: "50px", + children: "\u5BC6\u7801" + }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { + children: resData === null || resData === void 0 ? void 0 : resData.password + })] + })] + }) + }); + }; + var getRDP = function getRDP() { + onHideToolBar(); + modal/* default */.Z.info({ + title: 'RDP直连', + icon: null, + className: resetmodules/* default */.Z.CustomTipsModalCss, + okButtonProps: { + type: 'primary' + }, + okText: '我知道啦', + width: 600, + centered: true, + content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, { + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { + className: "c-grey-999", + flex: "50px", + children: "\u8D26\u53F7" + }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { + className: "c-grey-333", + children: resData === null || resData === void 0 ? void 0 : resData.username + })] + }), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, { + className: "mt10", + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { + className: "c-grey-999", + flex: "50px", + children: "\u5730\u5740" + }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { + className: "c-grey-333", + children: resData === null || resData === void 0 ? void 0 : resData.host + })] + }), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, { + className: "mt10", + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { + className: "c-grey-999", + flex: "50px", + children: "\u7AEF\u53E3" + }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { + className: "c-grey-333", + children: resData === null || resData === void 0 ? void 0 : resData.port + })] + }), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, { + className: "mt10", + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { + className: "c-grey-999", + flex: "50px", + children: "\u5BC6\u7801" + }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { + className: "c-grey-333", + children: resData === null || resData === void 0 ? void 0 : resData.password + })] + }), /*#__PURE__*/(0,jsx_runtime.jsx)("a", { + style: { + textDecoration: 'underline', + display: 'inline-block' + }, + href: "https://www.educoder.net/forums/36696", + target: "_blank", + className: "mt10 font14 current c-light-primary", + children: "\u64CD\u4F5C\u8BF4\u660E" + })] + }) + }); + }; + return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + className: "tpi-code-setting ".concat(className), + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("h3", { + children: "\u529F\u80FD" + }), /*#__PURE__*/(0,jsx_runtime.jsxs)("section", { + children: [(unity_3d_routes || is_jupyter_notebook || is_jupyter_lab) && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { + title: "\u5168\u5C4F", + className: "file-item action", + onClick: function onClick() { + onVncAction('full-screen'); + }, + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { + className: "iconfont icon-quanping" + }), "\u5F00\u542F / \u9000\u51FA\u5168\u5C4F"] + }), (tab_type === 2 || tab_type === 3 || tab_type === 4 || is_jupyter_notebook || is_jupyter_lab) && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { + onClick: function onClick() { + return onVncAction('reset-task'); + }, + className: "file-item action", + title: "\u91CD\u7F6E\u73AF\u5883", + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { + className: "iconfont icon-zhongzhishixun1" + }), "\u91CD\u7F6E\u73AF\u5883"] + }), (tab_type === 2 || tab_type === 3 || tab_type === 5 || is_jupyter_lab) && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { + onClick: function onClick() { + return onVncAction('reset-git-code'); + }, + className: "file-item action", + title: "\u91CD\u7F6E\u4EE3\u7801\u4ED3\u5E93", + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { + className: "iconfont icon-zhongzhishixun" + }), "\u91CD\u7F6E\u4EE3\u7801\u4ED3\u5E93"] + }), (tab_type === 3 || tab_type === 4 || is_jupyter_notebook || is_jupyter_lab) && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { + onClick: function onClick() { + return uploadFile(); + }, + className: "file-item action", + title: "\u4E0A\u4F20\u6587\u4EF6", + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { + className: "iconfont icon-shangchuanwenjian" + }), "\u4E0A\u4F20\u6587\u4EF6"] + }), (tab_type === 3 || tab_type === 4 || is_jupyter_notebook || is_jupyter_lab) && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { + onClick: function onClick() { + return downloadFile(); + }, + className: "file-item action", + title: "\u4E0B\u8F7D\u6587\u4EF6", + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { + className: "iconfont icon-xiazai3" + }), "\u4E0B\u8F7D\u6587\u4EF6"] + }), (tab_type === 3 || tab_type === 5) && location.protocol === 'https:' && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { + onClick: function onClick() { + return onStartRecord(); + }, + className: "file-item action", + title: "\u5C4F\u5E55\u5F55\u5236", + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { + className: "iconfont icon-jiaruketang1" + }), "\u5C4F\u5E55\u5F55\u5236"] + }), reboot_cloud && isLoadData && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { + onClick: function onClick() { + return onVncAction('restart-reboot'); + }, + className: "file-item action", + title: "\u91CD\u542F\u4E91\u4E3B\u673A", + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(PoweroffOutlined/* default */.Z, { + style: { + marginRight: 21, + color: "#FFF" + }, + className: "c-white font16" + }), "\u91CD\u542F\u4E91\u4E3B\u673A "] + }), (tab_type === 3 || tab_type === 5 || is_jupyter_notebook || is_jupyter_lab) && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { + onClick: function onClick() { + return onVncAction('reset-code'); + }, + className: "file-item action", + title: "\u6062\u590D\u521D\u59CB\u4EE3\u7801", + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { + className: "iconfont icon-zhongzhi font20", + style: { + marginRight: 19 + } + }), "\u6062\u590D\u521D\u59CB\u4EE3\u7801"] + }), git_url && /*#__PURE__*/(0,jsx_runtime.jsx)(lib.CopyToClipboard, { + text: git_url, + onCopy: function onCopy() { + return message/* default */.ZP.success('复制成功'); + }, + children: /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { + title: "\u590D\u5236\u7248\u672C\u5E93\u5730\u5740", + className: "file-item action", + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { + className: "iconfont icon-fuzhibanbenkudizhi1" + }), "\u590D\u5236\u7248\u672C\u5E93\u5730\u5740"] + }) + }), tab_type === 3 && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { + className: "file-item action", + onClick: function onClick() { + onVncAction('show-clipboard-box'); + }, + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { + className: "iconfont icon-fuzhiniantie" + }), "\u590D\u5236\u7C98\u8D34"] + }), tab_type === 4 && isLoadData && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { + className: "file-item action", + onClick: getSSH, + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { + className: "iconfont icon-congshulianjie" + }), "SSH\u76F4\u8FDE"] + }), instance_startup_type === 2 && isLoadData && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { + className: "file-item action", + onClick: getRDP, + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { + className: "iconfont icon-RDPzhilian" + }), "RDP\u76F4\u8FDE"] + })] + }), !!tab_type && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("h3", { + children: "\u5173\u5361\u914D\u7F6E\u4FE1\u606F" + }), /*#__PURE__*/(0,jsx_runtime.jsxs)("section", { + children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("a", { + className: "file-item", + title: task_pass ? '允许学员跳关挑战' : '不允许学员跳关挑战', + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", { + children: "\u8DF3\u5173" + }), /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + children: task_pass ? '允许' : '不允许' + })] + }), /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { + className: "file-item", + title: test_set_permission ? '允许学员通过金币解锁查看测试集内容' : '不允许学员通过金币解锁查看测试集内容', + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", { + children: "\u6D4B\u8BD5\u96C6\u89E3\u9501" + }), /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + children: test_set_permission ? '允许' : '不允许' + })] + })] + })] + }), /*#__PURE__*/(0,jsx_runtime.jsx)("h3", { + children: "\u5B9E\u8BAD\u57FA\u672C\u4FE1\u606F" + }), /*#__PURE__*/(0,jsx_runtime.jsxs)("section", { + children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + className: "file-item", + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", { + children: "\u5B9E\u8BAD\u96BE\u6613\u5EA6" + }), /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + children: (jupyterData === null || jupyterData === void 0 ? void 0 : jupyterData.difficulty) || difficultyDesc[difficulty] + })] + }), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + className: "file-item", + style: { + alignItems: 'flex-start' + }, + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", { + children: "\u5B9E\u9A8C\u73AF\u5883" + }), unity_3d_routes ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "multi_ellipsis1", + children: "\u6682\u65E0" + }) : mirror_description && /*#__PURE__*/(0,jsx_runtime.jsx)(MarkdownModal/* default */.Z, { + value: [mirror_description], + title: "\u5B9E\u9A8C\u73AF\u5883\u8BF4\u660E", + children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + title: mirror_description === null || mirror_description === void 0 ? void 0 : mirror_description.name, + className: "multi_ellipsis1 current", + children: mirror_description === null || mirror_description === void 0 ? void 0 : mirror_description.name + }) + })] + })] + }), /*#__PURE__*/(0,jsx_runtime.jsx)(record, { + ref: recordRef + })] + }); +}); + +/***/ }), + +/***/ 96042: +/*!*******************************************************************!*\ + !*** ./src/pages/Classrooms/Lists/Exercise/components/Unlock.tsx ***! + \*******************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/typeof.js */ 5773); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_typeof_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_typeof_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js */ 10574); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js */ 39343); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js */ 11006); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ 59301); +/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! antd */ 31797); +/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! antd */ 78241); +/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! antd */ 43418); +/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! antd */ 72315); +/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! antd */ 1056); +/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! antd */ 95237); +/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! antd */ 43604); +/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! antd */ 3113); +/* harmony import */ var _service_exercise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/service/exercise */ 65398); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! moment */ 9498); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! umi */ 43788); +/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/utils/util */ 87885); +/* harmony import */ var _components_Exercise_ip__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/components/Exercise/ip */ 24073); +/* harmony import */ var _utils_authority__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/utils/authority */ 71633); +/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react/jsx-runtime */ 37712); + + + + + + + + + + + + + + + +var Countdown = antd__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z.Countdown; +var Unlock = function Unlock(_ref) { + var _actionTabs$exerciseP9, _actionTabs$exerciseP10, _actionTabs$exerciseP11, _actionTabs$exerciseP12; + var exercise = _ref.exercise, + successCb = _ref.successCb, + dispatch = _ref.dispatch; + var params = (0,umi__WEBPACK_IMPORTED_MODULE_7__.useParams)(); + var _Form$useForm = antd__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z.useForm(), + _Form$useForm2 = _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_Form$useForm, 1), + form = _Form$useForm2[0]; + var _useState = (0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(false), + _useState2 = _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useState, 2), + isLoading = _useState2[0], + setIsLoading = _useState2[1]; + var localIpRef = (0,react__WEBPACK_IMPORTED_MODULE_4__.useRef)(); + var actionTabs = exercise.actionTabs; + (0,react__WEBPACK_IMPORTED_MODULE_4__.useEffect)(function () { + if (exercise.actionTabs.key === 'student-unlock') { + // if (actionTabs?.exerciseParams?.ip_limit !== 'no' || actionTabs?.exerciseParams?.ip_bind) + // getLocalIp(); + setIsLoading(false); + form.resetFields(); + } + }, [exercise.actionTabs.key]); + var getLocalIp = function getLocalIp() { + return new Promise( /*#__PURE__*/function () { + var _ref2 = _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee(resolve) { + var _actionTabs$exerciseP, _actionTabs$exerciseP2; + return _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return (0,_components_Exercise_ip__WEBPACK_IMPORTED_MODULE_9__/* .findLocalIp */ .y)({ + ip_limit: actionTabs === null || actionTabs === void 0 || (_actionTabs$exerciseP = actionTabs.exerciseParams) === null || _actionTabs$exerciseP === void 0 ? void 0 : _actionTabs$exerciseP.ip_limit, + ip_bind: actionTabs === null || actionTabs === void 0 || (_actionTabs$exerciseP2 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP2 === void 0 ? void 0 : _actionTabs$exerciseP2.ip_bind + }); + case 2: + localIpRef.current = _context.sent; + return _context.abrupt("return", resolve()); + case 4: + case "end": + return _context.stop(); + } + }, _callee); + })); + return function (_x) { + return _ref2.apply(this, arguments); + }; + }()); + }; + var handleOk = /*#__PURE__*/function () { + var _ref3 = _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee2() { + var _actionTabs$exerciseP3, _actionTabs$exerciseP4, _actionTabs$exerciseP5, _actionTabs$exerciseP6; + var formValue, unlockRes, _userInfo, _actionTabs$exerciseP7, _actionTabs$exerciseP8, delayedParams, v; + return _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return form.validateFields(); + case 2: + formValue = form.getFieldsValue(); + setIsLoading(true); + if (!((actionTabs === null || actionTabs === void 0 || (_actionTabs$exerciseP3 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP3 === void 0 ? void 0 : _actionTabs$exerciseP3.ip_limit) !== 'no' || actionTabs !== null && actionTabs !== void 0 && (_actionTabs$exerciseP4 = actionTabs.exerciseParams) !== null && _actionTabs$exerciseP4 !== void 0 && _actionTabs$exerciseP4.ip_bind)) { + _context2.next = 7; + break; + } + _context2.next = 7; + return getLocalIp(); + case 7: + _context2.next = 9; + return (0,_service_exercise__WEBPACK_IMPORTED_MODULE_5__/* .unlockUser */ .ZD)(actionTabs === null || actionTabs === void 0 || (_actionTabs$exerciseP5 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP5 === void 0 ? void 0 : _actionTabs$exerciseP5.id, { + exercise_user_id: actionTabs === null || actionTabs === void 0 || (_actionTabs$exerciseP6 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP6 === void 0 ? void 0 : _actionTabs$exerciseP6.exercise_user_id, + unlock_key: formValue.unlock_key, + ip: localIpRef.current + }); + case 9: + unlockRes = _context2.sent; + if (!(unlockRes.status === 0)) { + _context2.next = 22; + break; + } + if (!successCb) { + _context2.next = 15; + break; + } + dispatch({ + type: 'exercise/setActionTabs', + payload: {} + }); + successCb(); + return _context2.abrupt("return"); + case 15: + if (!formValue.time) { + _context2.next = 19; + break; + } + delayedParams = { + time: moment__WEBPACK_IMPORTED_MODULE_6___default()(formValue.time).format("YYYY-MM-DD HH:mm"), + exercise_user_id: actionTabs === null || actionTabs === void 0 || (_actionTabs$exerciseP7 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP7 === void 0 ? void 0 : _actionTabs$exerciseP7.exercise_user_id, + id: actionTabs === null || actionTabs === void 0 || (_actionTabs$exerciseP8 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP8 === void 0 ? void 0 : _actionTabs$exerciseP8.id + }; + _context2.next = 19; + return (0,_service_exercise__WEBPACK_IMPORTED_MODULE_5__/* .delayedTime */ .qz)(delayedParams); + case 19: + v = actionTabs === null || actionTabs === void 0 ? void 0 : actionTabs.exerciseParams; + (0,_utils_util__WEBPACK_IMPORTED_MODULE_8__/* .startExercise */ .nr)({ + inner_ip: v.inner_ip, + public_ip: v.public_ip, + open_camera: v.open_camera, + ip_limit: v.ip_limit, + ip_bind: v.ip_bind, + exercise_tips: v.exercise_tips, + exerciseId: v.id, + screen_open: v.screen_open, + screen_num: v.screen_num, + screen_sec: v.screen_sec, + coursesId: params.coursesId, + login: (_userInfo = (0,_utils_authority__WEBPACK_IMPORTED_MODULE_10__/* .userInfo */ .eY)()) === null || _userInfo === void 0 ? void 0 : _userInfo.login, + history: history, + identity_verify: v.identity_verify, + open_phone_video_recording: v.open_phone_video_recording, + current_status: v.current_status + }); + dispatch({ + type: 'exercise/setActionTabs', + payload: {} + }); + case 22: + setIsLoading(false); + case 23: + case "end": + return _context2.stop(); + } + }, _callee2); + })); + return function handleOk() { + return _ref3.apply(this, arguments); + }; + }(); + var columns = [{ + title: 'IP地址', + dataIndex: 'ip', + key: 'ip', + render: function render(text) { + return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("span", { + className: text.indexOf("异常") > -1 ? 'c-red' : 'c-green', + children: text + }); + } + }, { + title: '浏览器', + dataIndex: 'browser', + key: 'browser', + render: function render(text) { + return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("span", { + className: text.indexOf("异常") > -1 ? 'c-red' : 'c-green', + children: text + }); + } + }, { + title: '上次登录时间', + dataIndex: 'last_login_time', + key: 'last_login_time' + }]; + var hasError5 = (actionTabs === null || actionTabs === void 0 || (_actionTabs$exerciseP9 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP9 === void 0 ? void 0 : _actionTabs$exerciseP9.errorMessage) && _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_typeof_js__WEBPACK_IMPORTED_MODULE_0___default()(actionTabs === null || actionTabs === void 0 || (_actionTabs$exerciseP10 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP10 === void 0 ? void 0 : _actionTabs$exerciseP10.errorMessage) === "object"; + return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.Fragment, { + children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z, { + width: 514, + centered: true, + closable: !!(actionTabs !== null && actionTabs !== void 0 && (_actionTabs$exerciseP11 = actionTabs.exerciseParams) !== null && _actionTabs$exerciseP11 !== void 0 && _actionTabs$exerciseP11.unlockClose), + maskClosable: false, + keyboard: false, + maskStyle: { + background: "#000" + }, + title: '提示', + open: exercise.actionTabs.key === 'student-unlock', + footer: null, + onCancel: function onCancel() { + dispatch({ + type: 'exercise/setActionTabs', + payload: {} + }); + }, + children: [hasError5 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("div", { + style: { + marginBottom: 16 + }, + children: "\u8BE5\u8D26\u53F7\u5DF2\u7ECF\u5B58\u5728\u5F02\u5E38\u60C5\u51B5\uFF0C\u82E5\u975E\u672C\u4EBA\u64CD\u4F5C\uFF0C\u8BF7\u8054\u7CFB\u76D1\u8003\u8001\u5E08\u8BF4\u660E\u60C5\u51B5\u3002 " + }), !hasError5 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("div", { + style: { + marginBottom: 16 + }, + children: "\u7CFB\u7EDF\u68C0\u6D4B\u5230\u60A8\u5728\u8003\u8BD5\u65F6\u4E2D\u9014\u9000\u51FA\uFF0C\u73B0\u5DF2\u5C06\u8003\u8BD5\u9501\u5B9A\u3002\u5982\u9700\u7EE7\u7EED\u8FDB\u884C\u8003\u8BD5\uFF0C \u8BF7\u5C3D\u5FEB\u8054\u7CFB\u8BFE\u5802\u8001\u5E08\u8FDB\u884C\u89E3\u9501\uFF01" + }), hasError5 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .Z, { + className: "mb20", + pagination: { + hideOnSinglePage: true + }, + dataSource: [(actionTabs === null || actionTabs === void 0 || (_actionTabs$exerciseP12 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP12 === void 0 ? void 0 : _actionTabs$exerciseP12.errorMessage) || {}], + columns: columns + }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("div", { + className: "", + children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, { + form: form, + layout: "vertical", + autoComplete: "off", + children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z.Item, { + label: "\u8003\u8BD5\u89E3\u9501\u7801", + name: "unlock_key", + rules: [{ + required: true, + message: '请输入考试解锁码' + }], + children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_16__/* ["default"] */ .Z.Password, { + autoComplete: "off", + placeholder: "\u8BF7\u8F93\u5165\u8003\u8BD5\u89E3\u9501\u7801", + visibilityToggle: false + }) + }) + }) + }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_17__/* ["default"] */ .Z, { + justify: "space-between", + align: "middle", + children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_18__/* ["default"] */ .Z, {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_18__/* ["default"] */ .Z, { + children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_19__/* ["default"] */ .ZP, { + loading: isLoading, + onClick: handleOk, + children: "\u8FDB\u5165\u8003\u8BD5" + }) + })] + })] + }) + }); +}; +/* harmony default export */ __webpack_exports__.Z = ((0,umi__WEBPACK_IMPORTED_MODULE_7__.connect)(function (_ref4) { + var exercise = _ref4.exercise; + return { + exercise: exercise + }; +})(Unlock)); + +/***/ }), + +/***/ 48988: +/*!**************************************************!*\ + !*** ./src/pages/MoopCases/FormPanel/service.ts ***! + \**************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ $J: function() { return /* binding */ getMoopCase; }, +/* harmony export */ JZ: function() { return /* binding */ removeAttachment; }, +/* harmony export */ bN: function() { return /* binding */ updateMoopCase; }, +/* harmony export */ jP: function() { return /* binding */ addMoopCase; }, +/* harmony export */ rO: function() { return /* binding */ getLibraryTags; } +/* harmony export */ }); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js */ 10574); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js */ 39343); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/utils/fetch */ 4781); + + + +function getMoopCase(id) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_2__/* .get */ .U2)("libraries/".concat(id, ".json")); +} +function getLibraryTags() { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_2__/* .get */ .U2)('library_tags.json'); +} +function removeAttachment(_x) { + return _removeAttachment.apply(this, arguments); +} +function _removeAttachment() { + _removeAttachment = _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee(id) { + var response; + return _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_2__/* .del */ .IV)("attachments/".concat(id, ".json")); + case 2: + response = _context.sent; + return _context.abrupt("return", response.status === 0); + case 4: + case "end": + return _context.stop(); + } + }, _callee); + })); + return _removeAttachment.apply(this, arguments); +} +function addMoopCase(params) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_2__/* .post */ .v_)("libraries.json", params); +} +function updateMoopCase(id, params) { + return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_2__/* .put */ .gz)("libraries/".concat(id, ".json"), params); +} + +/***/ }), + +/***/ 35184: +/*!*************************************************************************************!*\ + !*** ./src/pages/Shixuns/Edit/body/Environment/MarkdownModal/index.tsx + 1 modules ***! + \*************************************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + Z: function() { return /* binding */ Environment_MarkdownModal; } +}); + +// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js +var slicedToArray = __webpack_require__(11006); +var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray); +// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js +var _react_17_0_2_react = __webpack_require__(59301); +;// CONCATENATED MODULE: ./src/pages/Shixuns/Edit/body/Environment/MarkdownModal/index.less?modules +// extracted by mini-css-extract-plugin +/* harmony default export */ var MarkdownModalmodules = ({"mirrorModal":"mirrorModal___Pi3tF","right":"right___Hot5f","title":"title___jjMKh","content":"content___BmOkD","des":"des___oGTUM","modal":"modal___yy3VB"}); +// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules +var modal = __webpack_require__(43418); +// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 1 modules +var RenderHtml = __webpack_require__(32666); +// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js +var jsx_runtime = __webpack_require__(37712); +;// CONCATENATED MODULE: ./src/pages/Shixuns/Edit/body/Environment/MarkdownModal/index.tsx + + + + + + + + +var MarkdownModal = function MarkdownModal(_ref) { + var title = _ref.title, + children = _ref.children, + value = _ref.value; + var _useState = (0,_react_17_0_2_react.useState)(false), + _useState2 = slicedToArray_default()(_useState, 2), + visible = _useState2[0], + setVisible = _useState2[1]; + return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", { + onClick: function onClick() { + return setVisible(true); + }, + children: children + }), /*#__PURE__*/(0,jsx_runtime.jsxs)(modal/* default */.Z, { + title: title, + open: visible, + width: 1000, + destroyOnClose: true, + centered: true, + onCancel: function onCancel() { + return setVisible(false); + }, + className: MarkdownModalmodules.modal, + footer: null, + children: [typeof value === 'string' && /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, { + value: value || '' + }), Object.prototype.toString.call(value) === '[object Array]' && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, { + children: value === null || value === void 0 ? void 0 : value.map(function (e, i) { + return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", { + children: e.name || e.type_name + }), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, { + value: e.description || '' + })] + }, i); + }) + })] + })] + }); +}; +/* harmony default export */ var Environment_MarkdownModal = (MarkdownModal); + +/***/ }), + +/***/ 32751: +/*!*********************************************************************!*\ + !*** ./src/pages/tasks/choose-repository/test-cast-list/failer.svg ***! + \*********************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* unused harmony export ReactComponent */ +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301); +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(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 = it.call(o); }, 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; } } }; } +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; } +var __defProp = Object.defineProperty; +var __getOwnPropSymbols = Object.getOwnPropertySymbols; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __propIsEnum = Object.prototype.propertyIsEnumerable; +var __defNormalProp = function __defNormalProp(obj, key, value) { + return key in obj ? __defProp(obj, key, { + enumerable: true, + configurable: true, + writable: true, + value: value + }) : obj[key] = value; +}; +var __spreadValues = function __spreadValues(a, b) { + for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]); + if (__getOwnPropSymbols) { + var _iterator = _createForOfIteratorHelper(__getOwnPropSymbols(b)), + _step; + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var prop = _step.value; + if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + } + return a; +}; + +var SvgFailer = function SvgFailer(props) { + return /* @__PURE__ */React.createElement("svg", __spreadValues({ + width: 36, + height: 36, + xmlns: "http://www.w3.org/2000/svg" + }, props), /* @__PURE__ */React.createElement("title", null, "\u7F16\u7EC4\u5907\u4EFD"), /* @__PURE__ */React.createElement("g", { + fill: "none", + fillRule: "evenodd" + }, /* @__PURE__ */React.createElement("circle", { + fill: "#D55", + cx: 18, + cy: 18, + r: 18 + }), /* @__PURE__ */React.createElement("path", { + d: "M18 6a2.818 2.818 0 0 1 2.813 2.994l-.688 11.01a2.129 2.129 0 0 1-4.25 0l-.688-11.01A2.818 2.818 0 0 1 18 6Z", + fill: "#172740" + }), /* @__PURE__ */React.createElement("circle", { + fill: "#172740", + cx: 18, + cy: 26.5, + r: 2.5 + }))); +}; + +/* harmony default export */ __webpack_exports__.Z = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzYiIGhlaWdodD0iMzYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGZpbGw9IiNENTUiIGN4PSIxOCIgY3k9IjE4IiByPSIxOCIvPjxwYXRoIGQ9Ik0xOCA2YTIuODE4IDIuODE4IDAgMCAxIDIuODEzIDIuOTk0bC0uNjg4IDExLjAxYTIuMTI5IDIuMTI5IDAgMCAxLTQuMjUgMGwtLjY4OC0xMS4wMUEyLjgxOCAyLjgxOCAwIDAgMSAxOCA2WiIgZmlsbD0iIzE3Mjc0MCIvPjxjaXJjbGUgZmlsbD0iIzE3Mjc0MCIgY3g9IjE4IiBjeT0iMjYuNSIgcj0iMi41Ii8+PC9nPjwvc3ZnPg=="); + +/***/ }), + +/***/ 78570: +/*!*******************************************************************!*\ + !*** ./src/pages/tasks/choose-repository/test-cast-list/mark.svg ***! + \*******************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* unused harmony export ReactComponent */ +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301); +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(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 = it.call(o); }, 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; } } }; } +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; } +var __defProp = Object.defineProperty; +var __getOwnPropSymbols = Object.getOwnPropertySymbols; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __propIsEnum = Object.prototype.propertyIsEnumerable; +var __defNormalProp = function __defNormalProp(obj, key, value) { + return key in obj ? __defProp(obj, key, { + enumerable: true, + configurable: true, + writable: true, + value: value + }) : obj[key] = value; +}; +var __spreadValues = function __spreadValues(a, b) { + for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]); + if (__getOwnPropSymbols) { + var _iterator = _createForOfIteratorHelper(__getOwnPropSymbols(b)), + _step; + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var prop = _step.value; + if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + } + return a; +}; + +var SvgMark = function SvgMark(props) { + return /* @__PURE__ */React.createElement("svg", __spreadValues({ + width: 31, + height: 30, + xmlns: "http://www.w3.org/2000/svg" + }, props), /* @__PURE__ */React.createElement("title", null, "\u7F16\u7EC4 7"), /* @__PURE__ */React.createElement("g", { + transform: "translate(2 1)", + fill: "none", + fillRule: "evenodd" + }, /* @__PURE__ */React.createElement("circle", { + stroke: "#D55", + strokeWidth: 2, + cx: 14, + cy: 14, + r: 14 + }), /* @__PURE__ */React.createElement("path", { + d: "M14 5a2 2 0 0 1 2 2v8a2 2 0 1 1-4 0V7a2 2 0 0 1 2-2Z", + fill: "#D55" + }), /* @__PURE__ */React.createElement("circle", { + fill: "#D55", + cx: 14, + cy: 21, + r: 2 + }))); +}; + +/* harmony default export */ __webpack_exports__.Z = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzEiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMiAxKSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIHN0cm9rZT0iI0Q1NSIgc3Ryb2tlLXdpZHRoPSIyIiBjeD0iMTQiIGN5PSIxNCIgcj0iMTQiLz48cGF0aCBkPSJNMTQgNWEyIDIgMCAwIDEgMiAydjhhMiAyIDAgMSAxLTQgMFY3YTIgMiAwIDAgMSAyLTJaIiBmaWxsPSIjRDU1Ii8+PGNpcmNsZSBmaWxsPSIjRDU1IiBjeD0iMTQiIGN5PSIyMSIgcj0iMiIvPjwvZz48L3N2Zz4="); + +/***/ }), + +/***/ 29864: +/*!**********************************************************************!*\ + !*** ./src/pages/tasks/choose-repository/test-cast-list/success.svg ***! + \**********************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* unused harmony export ReactComponent */ +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301); +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(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 = it.call(o); }, 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; } } }; } +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; } +var __defProp = Object.defineProperty; +var __getOwnPropSymbols = Object.getOwnPropertySymbols; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __propIsEnum = Object.prototype.propertyIsEnumerable; +var __defNormalProp = function __defNormalProp(obj, key, value) { + return key in obj ? __defProp(obj, key, { + enumerable: true, + configurable: true, + writable: true, + value: value + }) : obj[key] = value; +}; +var __spreadValues = function __spreadValues(a, b) { + for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]); + if (__getOwnPropSymbols) { + var _iterator = _createForOfIteratorHelper(__getOwnPropSymbols(b)), + _step; + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var prop = _step.value; + if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + } + return a; +}; + +var SvgSuccess = function SvgSuccess(props) { + return /* @__PURE__ */React.createElement("svg", __spreadValues({ + width: 36, + height: 36, + xmlns: "http://www.w3.org/2000/svg" + }, props), /* @__PURE__ */React.createElement("title", null, "\u7F16\u7EC4"), /* @__PURE__ */React.createElement("g", { + fill: "none", + fillRule: "evenodd" + }, /* @__PURE__ */React.createElement("circle", { + fill: "#19CB70", + cx: 18, + cy: 18, + r: 18 + }), /* @__PURE__ */React.createElement("path", { + stroke: "#172740", + strokeWidth: 4, + strokeLinecap: "round", + strokeLinejoin: "round", + d: "M10 18.85 15.274 24 26 14" + }))); +}; + +/* harmony default export */ __webpack_exports__.Z = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzYiIGhlaWdodD0iMzYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGZpbGw9IiMxOUNCNzAiIGN4PSIxOCIgY3k9IjE4IiByPSIxOCIvPjxwYXRoIHN0cm9rZT0iIzE3Mjc0MCIgc3Ryb2tlLXdpZHRoPSI0IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGQ9Ik0xMCAxOC44NSAxNS4yNzQgMjQgMjYgMTQiLz48L2c+PC9zdmc+"); + +/***/ }), + +/***/ 42175: +/*!************************************************************!*\ + !*** ./src/components/ui-customization/reset.less?modules ***! + \************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__) { + +// extracted by mini-css-extract-plugin +/* harmony default export */ __webpack_exports__.Z = ({"flex_box_center":"flex_box_center___vG4eV","flex_space_between":"flex_space_between___qVVxe","flex_box_vertical_center":"flex_box_vertical_center___P8Z8s","flex_box_center_end":"flex_box_center_end___VMme3","flex_box_column":"flex_box_column___VMHwm","dropdownmenus":"dropdownmenus___oVzoj","popupClassNames":"popupClassNames___OcZq7","selectdown":"selectdown___mmcA8"}); + +/***/ }), + +/***/ 55339: +/*!****************************************************!*\ + !*** ./src/components/tpi-code-setting/index.less ***! + \****************************************************/ +/***/ (function() { + +// extracted by mini-css-extract-plugin + + +/***/ }), + +/***/ 21978: +/*!********************************************!*\ + !*** ./src/pages/tasks/resize-enlarge.png ***! + \********************************************/ +/***/ (function(module) { + +module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAACgCAYAAAB+HS7YAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjczMUZFNjhCMDE3NzExRUJCOEU5RDg5RTZBOTI5QTU3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjczMUZFNjhDMDE3NzExRUJCOEU5RDg5RTZBOTI5QTU3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NzMxRkU2ODkwMTc3MTFFQkI4RTlEODlFNkE5MjlBNTciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NzMxRkU2OEEwMTc3MTFFQkI4RTlEODlFNkE5MjlBNTciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7zBaLcAAACAElEQVR42uzdzyvDcRzH8ffsZiVc/IjbkOTuShN/gXIgYi5y2AlpFBL/AAdLiXBgBwfUxplmyU2tRK4sTey0+H6+RbKD7Gtfb/V817t963t59Nnn9f58+7aap6LO/yq6KmN13OoJq1MehcD3erS6rUT0VrnVC5qBpgLagWXagQIQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAABUCD6Lbkr5L2W2uv9bS3LR4vd6iAb/9BaaBfa7K+oa8+0exEwmOheT5+UXnV9zd2SEHeztSU12ldw+2tjRLbH/X/lQbktqaansluwLtelPs85XKZmRFggN9eseMSbVJ9+Js2HHCizoHRwb7ZWN12V5VtYPaacJdOUmcJNy1o67QhLt6FheScNcfFkyqmxr9eoGHsWMZD8/qBCYvLmV4NCS5XE4f8PrmVnoHRySbzeoLyf1DWnr6huxPdWPGrJhZObOC6ga12Wtmz5m9p/Kom5yZt1Or8mFhbWNLIuubOh+3fjrrXAUWMutcAxY661wBOpl1RQc6nXVFBf7GrHMEPEskP65PE+d5901anc46R68+/rp4/QYQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAP8dMKMdGNcMNH9eMaUR+GR11Oo2q6/eBBgA/5+hicfO9/sAAAAASUVORK5CYII="; + +/***/ }), + +/***/ 52787: +/*!******************************************!*\ + !*** ./src/pages/tasks/resize-small.png ***! + \******************************************/ +/***/ (function(module) { + +module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAACgCAYAAAB+HS7YAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjc0MDQ0OTA3MDE3NzExRUJCNjY1QzBDMDY3NUI5QTQ3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjc0MDQ0OTA4MDE3NzExRUJCNjY1QzBDMDY3NUI5QTQ3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NzQwNDQ5MDUwMTc3MTFFQkI2NjVDMEMwNjc1QjlBNDciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NzQwNDQ5MDYwMTc3MTFFQkI2NjVDMEMwNjc1QjlBNDciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4CEd39AAACAklEQVR42uzYvyuFURjA8Yf7TpSw+BHbvSTZrXTFX6AMRLiLySSE8ismg8FAIsKAwcCA/eqSbEqJrEgMd7pxzi3iUgbn8KTvU0/37b7Lp/Oe5+k5JygoC4uJiMkpk1GTeaIoApOVJuMm80VhZJuc1Ip7BUZFcWRr23NfAQUgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQL8FWAoFJLpseFP/+9ur8v9zUU67fN3kVVQFn52jcvNzZH52RlpaqiXwvLIh3cW9j4y32dG4BpXUlwkG0vzUlNdpe8TW9T+zqYznFNgY7ROdrc2pLSkWF+RdLe3yurCXHrvuY7gp5U6MTIgsY42b20mcFGpPiPQUKlO96CPSnUG9FWpToA+K9UJsLIinK5atcNC39Co7O0f6gWmUinp6umVk9MzveNWMpmUlo6YXF5d650Hb+/upbm1M/2rdmC1K2hX0q6o2ona7kW7J+3eVDvy26ruHxnXfSZZWF6VxZU13Ycmnz3SCdBnj3Q28vvqkU4PTT56pPODu+se6eVmwWWP9Hb1YavaVndmxBPHb89HiZO/ufpQWyQAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECPD/AB+1Aw+0AwdNPmgGnpusNblt8kkb8EWAAQAq85VNhqprywAAAABJRU5ErkJggg=="; + +/***/ }) + +}]); \ No newline at end of file diff --git a/68719.async.js b/68719.async.js deleted file mode 100644 index 3ab3c11251..0000000000 --- a/68719.async.js +++ /dev/null @@ -1,1558 +0,0 @@ -(self["webpackChunk"] = self["webpackChunk"] || []).push([[68719],{ - -/***/ 75769: -/*!*******************************************************************************************************!*\ - !*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/CheckOutlined.js + 1 modules ***! - \*******************************************************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - Z: function() { return /* binding */ icons_CheckOutlined; } -}); - -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/esm/extends.js -var esm_extends = __webpack_require__(26508); -// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js -var _react_17_0_2_react = __webpack_require__(59301); -;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/CheckOutlined.js -// This icon file is generated automatically. -var CheckOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" } }] }, "name": "check", "theme": "outlined" }; -/* harmony default export */ var asn_CheckOutlined = (CheckOutlined); - -// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules -var AntdIcon = __webpack_require__(91851); -;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/CheckOutlined.js - -// GENERATE BY ./scripts/generate.ts -// DON NOT EDIT IT MANUALLY - - - - -var CheckOutlined_CheckOutlined = function CheckOutlined(props, ref) { - return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { - ref: ref, - icon: asn_CheckOutlined - })); -}; -if (false) {} -/* harmony default export */ var icons_CheckOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(CheckOutlined_CheckOutlined)); - -/***/ }), - -/***/ 15997: -/*!*****************************************************************************************************!*\ - !*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/EyeOutlined.js + 1 modules ***! - \*****************************************************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - Z: function() { return /* binding */ icons_EyeOutlined; } -}); - -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/esm/extends.js -var esm_extends = __webpack_require__(26508); -// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js -var _react_17_0_2_react = __webpack_require__(59301); -;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/EyeOutlined.js -// This icon file is generated automatically. -var EyeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, "name": "eye", "theme": "outlined" }; -/* harmony default export */ var asn_EyeOutlined = (EyeOutlined); - -// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules -var AntdIcon = __webpack_require__(91851); -;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/EyeOutlined.js - -// GENERATE BY ./scripts/generate.ts -// DON NOT EDIT IT MANUALLY - - - - -var EyeOutlined_EyeOutlined = function EyeOutlined(props, ref) { - return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { - ref: ref, - icon: asn_EyeOutlined - })); -}; -if (false) {} -/* harmony default export */ var icons_EyeOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(EyeOutlined_EyeOutlined)); - -/***/ }), - -/***/ 88011: -/*!**********************************************************************************************************!*\ - !*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/FileTextOutlined.js + 1 modules ***! - \**********************************************************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - Z: function() { return /* binding */ icons_FileTextOutlined; } -}); - -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/esm/extends.js -var esm_extends = __webpack_require__(26508); -// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js -var _react_17_0_2_react = __webpack_require__(59301); -;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/FileTextOutlined.js -// This icon file is generated automatically. -var FileTextOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z" } }] }, "name": "file-text", "theme": "outlined" }; -/* harmony default export */ var asn_FileTextOutlined = (FileTextOutlined); - -// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules -var AntdIcon = __webpack_require__(91851); -;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/FileTextOutlined.js - -// GENERATE BY ./scripts/generate.ts -// DON NOT EDIT IT MANUALLY - - - - -var FileTextOutlined_FileTextOutlined = function FileTextOutlined(props, ref) { - return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { - ref: ref, - icon: asn_FileTextOutlined - })); -}; -if (false) {} -/* harmony default export */ var icons_FileTextOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(FileTextOutlined_FileTextOutlined)); - -/***/ }), - -/***/ 46820: -/*!********************************************************************************************************!*\ - !*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/SearchOutlined.js + 1 modules ***! - \********************************************************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - Z: function() { return /* binding */ icons_SearchOutlined; } -}); - -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/esm/extends.js -var esm_extends = __webpack_require__(26508); -// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js -var _react_17_0_2_react = __webpack_require__(59301); -;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/SearchOutlined.js -// This icon file is generated automatically. -var SearchOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z" } }] }, "name": "search", "theme": "outlined" }; -/* harmony default export */ var asn_SearchOutlined = (SearchOutlined); - -// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules -var AntdIcon = __webpack_require__(91851); -;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/SearchOutlined.js - -// GENERATE BY ./scripts/generate.ts -// DON NOT EDIT IT MANUALLY - - - - -var SearchOutlined_SearchOutlined = function SearchOutlined(props, ref) { - return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { - ref: ref, - icon: asn_SearchOutlined - })); -}; -if (false) {} -/* harmony default export */ var icons_SearchOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(SearchOutlined_SearchOutlined)); - -/***/ }), - -/***/ 56762: -/*!************************************************************************!*\ - !*** ./node_modules/_antd@5.9.0@antd/es/_util/hooks/useForceUpdate.js ***! - \************************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ Z: function() { return /* binding */ useForceUpdate; } -/* harmony export */ }); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301); - -function useForceUpdate() { - const [, forceUpdate] = react__WEBPACK_IMPORTED_MODULE_0__.useReducer(x => x + 1, 0); - return forceUpdate; -} - -/***/ }), - -/***/ 24905: -/*!************************************************************************!*\ - !*** ./node_modules/_antd@5.9.0@antd/es/checkbox/index.js + 3 modules ***! - \************************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - Z: function() { return /* binding */ es_checkbox; } -}); - -// EXTERNAL MODULE: ./node_modules/_classnames@2.3.2@classnames/index.js -var _classnames_2_3_2_classnames = __webpack_require__(12124); -var _classnames_2_3_2_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_3_2_classnames); -// EXTERNAL MODULE: ./node_modules/_rc-checkbox@3.1.0@rc-checkbox/es/index.js -var es = __webpack_require__(5630); -// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js -var _react_17_0_2_react = __webpack_require__(59301); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js -var config_provider_context = __webpack_require__(36355); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/DisabledContext.js -var DisabledContext = __webpack_require__(1684); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/context.js -var context = __webpack_require__(32441); -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/checkbox/GroupContext.js - -const GroupContext = /*#__PURE__*/_react_17_0_2_react.createContext(null); -/* harmony default export */ var checkbox_GroupContext = (GroupContext); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/checkbox/style/index.js -var checkbox_style = __webpack_require__(98447); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/wave/index.js + 4 modules -var wave = __webpack_require__(14088); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/wave/interface.js -var wave_interface = __webpack_require__(4572); -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/checkbox/Checkbox.js -"use client"; - -var __rest = undefined && undefined.__rest || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; - } - return t; -}; - - - - - - - - - - - -const InternalCheckbox = (props, ref) => { - var _a; - const { - prefixCls: customizePrefixCls, - className, - rootClassName, - children, - indeterminate = false, - style, - onMouseEnter, - onMouseLeave, - skipGroup = false, - disabled - } = props, - restProps = __rest(props, ["prefixCls", "className", "rootClassName", "children", "indeterminate", "style", "onMouseEnter", "onMouseLeave", "skipGroup", "disabled"]); - const { - getPrefixCls, - direction, - checkbox - } = _react_17_0_2_react.useContext(config_provider_context/* ConfigContext */.E_); - const checkboxGroup = _react_17_0_2_react.useContext(checkbox_GroupContext); - const { - isFormItemInput - } = _react_17_0_2_react.useContext(context/* FormItemInputContext */.aM); - const contextDisabled = _react_17_0_2_react.useContext(DisabledContext/* default */.Z); - const mergedDisabled = (_a = (checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.disabled) || disabled) !== null && _a !== void 0 ? _a : contextDisabled; - const prevValue = _react_17_0_2_react.useRef(restProps.value); - _react_17_0_2_react.useEffect(() => { - checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.registerValue(restProps.value); - false ? 0 : void 0; - }, []); - _react_17_0_2_react.useEffect(() => { - if (skipGroup) { - return; - } - if (restProps.value !== prevValue.current) { - checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.cancelValue(prevValue.current); - checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.registerValue(restProps.value); - prevValue.current = restProps.value; - } - return () => checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.cancelValue(restProps.value); - }, [restProps.value]); - const prefixCls = getPrefixCls('checkbox', customizePrefixCls); - const [wrapSSR, hashId] = (0,checkbox_style/* default */.ZP)(prefixCls); - const checkboxProps = Object.assign({}, restProps); - if (checkboxGroup && !skipGroup) { - checkboxProps.onChange = function () { - if (restProps.onChange) { - restProps.onChange.apply(restProps, arguments); - } - if (checkboxGroup.toggleOption) { - checkboxGroup.toggleOption({ - label: children, - value: restProps.value - }); - } - }; - checkboxProps.name = checkboxGroup.name; - checkboxProps.checked = checkboxGroup.value.includes(restProps.value); - } - const classString = _classnames_2_3_2_classnames_default()(`${prefixCls}-wrapper`, { - [`${prefixCls}-rtl`]: direction === 'rtl', - [`${prefixCls}-wrapper-checked`]: checkboxProps.checked, - [`${prefixCls}-wrapper-disabled`]: mergedDisabled, - [`${prefixCls}-wrapper-in-form-item`]: isFormItemInput - }, checkbox === null || checkbox === void 0 ? void 0 : checkbox.className, className, rootClassName, hashId); - const checkboxClass = _classnames_2_3_2_classnames_default()({ - [`${prefixCls}-indeterminate`]: indeterminate - }, wave_interface/* TARGET_CLS */.A, hashId); - const ariaChecked = indeterminate ? 'mixed' : undefined; - return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement(wave/* default */.Z, { - component: "Checkbox", - disabled: mergedDisabled - }, /*#__PURE__*/_react_17_0_2_react.createElement("label", { - className: classString, - style: Object.assign(Object.assign({}, checkbox === null || checkbox === void 0 ? void 0 : checkbox.style), style), - onMouseEnter: onMouseEnter, - onMouseLeave: onMouseLeave - }, /*#__PURE__*/_react_17_0_2_react.createElement(es/* default */.Z, Object.assign({ - "aria-checked": ariaChecked - }, checkboxProps, { - prefixCls: prefixCls, - className: checkboxClass, - disabled: mergedDisabled, - ref: ref - })), children !== undefined && /*#__PURE__*/_react_17_0_2_react.createElement("span", null, children)))); -}; -const Checkbox = /*#__PURE__*/_react_17_0_2_react.forwardRef(InternalCheckbox); -if (false) {} -/* harmony default export */ var checkbox_Checkbox = (Checkbox); -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules -var toConsumableArray = __webpack_require__(42371); -// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/omit.js -var omit = __webpack_require__(99468); -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/checkbox/Group.js -"use client"; - - -var Group_rest = undefined && undefined.__rest || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; - } - return t; -}; - - - - - - - -const InternalGroup = (props, ref) => { - const { - defaultValue, - children, - options = [], - prefixCls: customizePrefixCls, - className, - rootClassName, - style, - onChange - } = props, - restProps = Group_rest(props, ["defaultValue", "children", "options", "prefixCls", "className", "rootClassName", "style", "onChange"]); - const { - getPrefixCls, - direction - } = _react_17_0_2_react.useContext(config_provider_context/* ConfigContext */.E_); - const [value, setValue] = _react_17_0_2_react.useState(restProps.value || defaultValue || []); - const [registeredValues, setRegisteredValues] = _react_17_0_2_react.useState([]); - _react_17_0_2_react.useEffect(() => { - if ('value' in restProps) { - setValue(restProps.value || []); - } - }, [restProps.value]); - const memoOptions = _react_17_0_2_react.useMemo(() => options.map(option => { - if (typeof option === 'string' || typeof option === 'number') { - return { - label: option, - value: option - }; - } - return option; - }), [options]); - const cancelValue = val => { - setRegisteredValues(prevValues => prevValues.filter(v => v !== val)); - }; - const registerValue = val => { - setRegisteredValues(prevValues => [].concat((0,toConsumableArray/* default */.Z)(prevValues), [val])); - }; - const toggleOption = option => { - const optionIndex = value.indexOf(option.value); - const newValue = (0,toConsumableArray/* default */.Z)(value); - if (optionIndex === -1) { - newValue.push(option.value); - } else { - newValue.splice(optionIndex, 1); - } - if (!('value' in restProps)) { - setValue(newValue); - } - onChange === null || onChange === void 0 ? void 0 : onChange(newValue.filter(val => registeredValues.includes(val)).sort((a, b) => { - const indexA = memoOptions.findIndex(opt => opt.value === a); - const indexB = memoOptions.findIndex(opt => opt.value === b); - return indexA - indexB; - })); - }; - const prefixCls = getPrefixCls('checkbox', customizePrefixCls); - const groupPrefixCls = `${prefixCls}-group`; - const [wrapSSR, hashId] = (0,checkbox_style/* default */.ZP)(prefixCls); - const domProps = (0,omit/* default */.Z)(restProps, ['value', 'disabled']); - const childrenNode = options.length ? memoOptions.map(option => /*#__PURE__*/_react_17_0_2_react.createElement(checkbox_Checkbox, { - prefixCls: prefixCls, - key: option.value.toString(), - disabled: 'disabled' in option ? option.disabled : restProps.disabled, - value: option.value, - checked: value.includes(option.value), - onChange: option.onChange, - className: `${groupPrefixCls}-item`, - style: option.style, - title: option.title - }, option.label)) : children; - // eslint-disable-next-line react/jsx-no-constructed-context-values - const context = { - toggleOption, - value, - disabled: restProps.disabled, - name: restProps.name, - // https://github.com/ant-design/ant-design/issues/16376 - registerValue, - cancelValue - }; - const classString = _classnames_2_3_2_classnames_default()(groupPrefixCls, { - [`${groupPrefixCls}-rtl`]: direction === 'rtl' - }, className, rootClassName, hashId); - return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({ - className: classString, - style: style - }, domProps, { - ref: ref - }), /*#__PURE__*/_react_17_0_2_react.createElement(checkbox_GroupContext.Provider, { - value: context - }, childrenNode))); -}; - -const CheckboxGroup = /*#__PURE__*/_react_17_0_2_react.forwardRef(InternalGroup); -/* harmony default export */ var Group = (/*#__PURE__*/_react_17_0_2_react.memo(CheckboxGroup)); -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/checkbox/index.js -"use client"; - - - -const es_checkbox_Checkbox = checkbox_Checkbox; -es_checkbox_Checkbox.Group = Group; -es_checkbox_Checkbox.__ANT_CHECKBOX = true; -if (false) {} -/* harmony default export */ var es_checkbox = (es_checkbox_Checkbox); - -/***/ }), - -/***/ 98447: -/*!******************************************************************!*\ - !*** ./node_modules/_antd@5.9.0@antd/es/checkbox/style/index.js ***! - \******************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ C2: function() { return /* binding */ getStyle; } -/* harmony export */ }); -/* unused harmony export genCheckboxStyle */ -/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style */ 17313); -/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/internal */ 37613); -/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ 83116); - - -// ============================== Styles ============================== -const genCheckboxStyle = token => { - const { - checkboxCls - } = token; - const wrapperCls = `${checkboxCls}-wrapper`; - return [ - // ===================== Basic ===================== - { - // Group - [`${checkboxCls}-group`]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__/* .resetComponent */ .Wf)(token)), { - display: 'inline-flex', - flexWrap: 'wrap', - columnGap: token.marginXS, - // Group > Grid - [`> ${token.antCls}-row`]: { - flex: 1 - } - }), - // Wrapper - [wrapperCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__/* .resetComponent */ .Wf)(token)), { - display: 'inline-flex', - alignItems: 'baseline', - cursor: 'pointer', - // Fix checkbox & radio in flex align #30260 - '&:after': { - display: 'inline-block', - width: 0, - overflow: 'hidden', - content: "'\\a0'" - }, - // Checkbox near checkbox - [`& + ${wrapperCls}`]: { - marginInlineStart: 0 - }, - [`&${wrapperCls}-in-form-item`]: { - 'input[type="checkbox"]': { - width: 14, - height: 14 // FIXME: magic - } - } - }), - - // Wrapper > Checkbox - [checkboxCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__/* .resetComponent */ .Wf)(token)), { - position: 'relative', - whiteSpace: 'nowrap', - lineHeight: 1, - cursor: 'pointer', - borderRadius: token.borderRadiusSM, - // To make alignment right when `controlHeight` is changed - // Ref: https://github.com/ant-design/ant-design/issues/41564 - alignSelf: 'center', - // Wrapper > Checkbox > input - [`${checkboxCls}-input`]: { - position: 'absolute', - // Since baseline align will get additional space offset, - // we need to move input to top to make it align with text. - // Ref: https://github.com/ant-design/ant-design/issues/38926#issuecomment-1486137799 - inset: 0, - zIndex: 1, - cursor: 'pointer', - opacity: 0, - margin: 0, - [`&:focus-visible + ${checkboxCls}-inner`]: Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_0__/* .genFocusOutline */ .oN)(token)) - }, - // Wrapper > Checkbox > inner - [`${checkboxCls}-inner`]: { - boxSizing: 'border-box', - position: 'relative', - top: 0, - insetInlineStart: 0, - display: 'block', - width: token.checkboxSize, - height: token.checkboxSize, - direction: 'ltr', - backgroundColor: token.colorBgContainer, - border: `${token.lineWidth}px ${token.lineType} ${token.colorBorder}`, - borderRadius: token.borderRadiusSM, - borderCollapse: 'separate', - transition: `all ${token.motionDurationSlow}`, - '&:after': { - boxSizing: 'border-box', - position: 'absolute', - top: '50%', - insetInlineStart: '21.5%', - display: 'table', - width: token.checkboxSize / 14 * 5, - height: token.checkboxSize / 14 * 8, - border: `${token.lineWidthBold}px solid ${token.colorWhite}`, - borderTop: 0, - borderInlineStart: 0, - transform: 'rotate(45deg) scale(0) translate(-50%,-50%)', - opacity: 0, - content: '""', - transition: `all ${token.motionDurationFast} ${token.motionEaseInBack}, opacity ${token.motionDurationFast}` - } - }, - // Wrapper > Checkbox + Text - '& + span': { - paddingInlineStart: token.paddingXS, - paddingInlineEnd: token.paddingXS - } - }) - }, - // ===================== Hover ===================== - { - // Wrapper & Wrapper > Checkbox - [` - ${wrapperCls}:not(${wrapperCls}-disabled), - ${checkboxCls}:not(${checkboxCls}-disabled) - `]: { - [`&:hover ${checkboxCls}-inner`]: { - borderColor: token.colorPrimary - } - }, - [`${wrapperCls}:not(${wrapperCls}-disabled)`]: { - [`&:hover ${checkboxCls}-checked:not(${checkboxCls}-disabled) ${checkboxCls}-inner`]: { - backgroundColor: token.colorPrimaryHover, - borderColor: 'transparent' - }, - [`&:hover ${checkboxCls}-checked:not(${checkboxCls}-disabled):after`]: { - borderColor: token.colorPrimaryHover - } - } - }, - // ==================== Checked ==================== - { - // Wrapper > Checkbox - [`${checkboxCls}-checked`]: { - [`${checkboxCls}-inner`]: { - backgroundColor: token.colorPrimary, - borderColor: token.colorPrimary, - '&:after': { - opacity: 1, - transform: 'rotate(45deg) scale(1) translate(-50%,-50%)', - transition: `all ${token.motionDurationMid} ${token.motionEaseOutBack} ${token.motionDurationFast}` - } - } - }, - [` - ${wrapperCls}-checked:not(${wrapperCls}-disabled), - ${checkboxCls}-checked:not(${checkboxCls}-disabled) - `]: { - [`&:hover ${checkboxCls}-inner`]: { - backgroundColor: token.colorPrimaryHover, - borderColor: 'transparent' - } - } - }, - // ================= Indeterminate ================= - { - [checkboxCls]: { - '&-indeterminate': { - // Wrapper > Checkbox > inner - [`${checkboxCls}-inner`]: { - backgroundColor: token.colorBgContainer, - borderColor: token.colorBorder, - '&:after': { - top: '50%', - insetInlineStart: '50%', - width: token.fontSizeLG / 2, - height: token.fontSizeLG / 2, - backgroundColor: token.colorPrimary, - border: 0, - transform: 'translate(-50%, -50%) scale(1)', - opacity: 1, - content: '""' - } - } - } - } - }, - // ==================== Disable ==================== - { - // Wrapper - [`${wrapperCls}-disabled`]: { - cursor: 'not-allowed' - }, - // Wrapper > Checkbox - [`${checkboxCls}-disabled`]: { - // Wrapper > Checkbox > input - [`&, ${checkboxCls}-input`]: { - cursor: 'not-allowed', - // Disabled for native input to enable Tooltip event handler - // ref: https://github.com/ant-design/ant-design/issues/39822#issuecomment-1365075901 - pointerEvents: 'none' - }, - // Wrapper > Checkbox > inner - [`${checkboxCls}-inner`]: { - background: token.colorBgContainerDisabled, - borderColor: token.colorBorder, - '&:after': { - borderColor: token.colorTextDisabled - } - }, - '&:after': { - display: 'none' - }, - '& + span': { - color: token.colorTextDisabled - }, - [`&${checkboxCls}-indeterminate ${checkboxCls}-inner::after`]: { - background: token.colorTextDisabled - } - } - }]; -}; -// ============================== Export ============================== -function getStyle(prefixCls, token) { - const checkboxToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_1__/* .merge */ .TS)(token, { - checkboxCls: `.${prefixCls}`, - checkboxSize: token.controlInteractiveSize - }); - return [genCheckboxStyle(checkboxToken)]; -} -/* harmony default export */ __webpack_exports__.ZP = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)('Checkbox', (token, _ref) => { - let { - prefixCls - } = _ref; - return [getStyle(prefixCls, token)]; -})); - -/***/ }), - -/***/ 1056: -/*!*********************************************************************!*\ - !*** ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules ***! - \*********************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - Z: function() { return /* binding */ input; } -}); - -// EXTERNAL MODULE: ./node_modules/_classnames@2.3.2@classnames/index.js -var _classnames_2_3_2_classnames = __webpack_require__(12124); -var _classnames_2_3_2_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_3_2_classnames); -// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js -var _react_17_0_2_react = __webpack_require__(59301); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js -var context = __webpack_require__(36355); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/context.js -var form_context = __webpack_require__(32441); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/style/index.js -var style = __webpack_require__(9937); -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/input/Group.js -"use client"; - - - - - - - - -const Group = props => { - const { - getPrefixCls, - direction - } = (0,_react_17_0_2_react.useContext)(context/* ConfigContext */.E_); - const { - prefixCls: customizePrefixCls, - className - } = props; - const prefixCls = getPrefixCls('input-group', customizePrefixCls); - const inputPrefixCls = getPrefixCls('input'); - const [wrapSSR, hashId] = (0,style/* default */.ZP)(inputPrefixCls); - const cls = _classnames_2_3_2_classnames_default()(prefixCls, { - [`${prefixCls}-lg`]: props.size === 'large', - [`${prefixCls}-sm`]: props.size === 'small', - [`${prefixCls}-compact`]: props.compact, - [`${prefixCls}-rtl`]: direction === 'rtl' - }, hashId, className); - const formItemContext = (0,_react_17_0_2_react.useContext)(form_context/* FormItemInputContext */.aM); - const groupFormItemContext = (0,_react_17_0_2_react.useMemo)(() => Object.assign(Object.assign({}, formItemContext), { - isFormItemInput: false - }), [formItemContext]); - if (false) {} - return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("span", { - className: cls, - style: props.style, - onMouseEnter: props.onMouseEnter, - onMouseLeave: props.onMouseLeave, - onFocus: props.onFocus, - onBlur: props.onBlur - }, /*#__PURE__*/_react_17_0_2_react.createElement(form_context/* FormItemInputContext */.aM.Provider, { - value: groupFormItemContext - }, props.children))); -}; -/* harmony default export */ var input_Group = (Group); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/Input.js + 1 modules -var Input = __webpack_require__(9432); -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/esm/extends.js -var esm_extends = __webpack_require__(26508); -;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/EyeInvisibleOutlined.js -// This icon file is generated automatically. -var EyeInvisibleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" } }, { "tag": "path", "attrs": { "d": "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" } }] }, "name": "eye-invisible", "theme": "outlined" }; -/* harmony default export */ var asn_EyeInvisibleOutlined = (EyeInvisibleOutlined); - -// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules -var AntdIcon = __webpack_require__(91851); -;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/EyeInvisibleOutlined.js - -// GENERATE BY ./scripts/generate.ts -// DON NOT EDIT IT MANUALLY - - - - -var EyeInvisibleOutlined_EyeInvisibleOutlined = function EyeInvisibleOutlined(props, ref) { - return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { - ref: ref, - icon: asn_EyeInvisibleOutlined - })); -}; -if (false) {} -/* harmony default export */ var icons_EyeInvisibleOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(EyeInvisibleOutlined_EyeInvisibleOutlined)); -// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/EyeOutlined.js + 1 modules -var EyeOutlined = __webpack_require__(15997); -// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/omit.js -var omit = __webpack_require__(99468); -// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.1@rc-util/es/ref.js -var es_ref = __webpack_require__(88831); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/hooks/useRemovePasswordTimeout.js -var useRemovePasswordTimeout = __webpack_require__(59412); -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/input/Password.js -"use client"; - -var __rest = undefined && undefined.__rest || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; - } - return t; -}; - - - - - - - - - - -const defaultIconRender = visible => visible ? /*#__PURE__*/_react_17_0_2_react.createElement(EyeOutlined/* default */.Z, null) : /*#__PURE__*/_react_17_0_2_react.createElement(icons_EyeInvisibleOutlined, null); -const ActionMap = { - click: 'onClick', - hover: 'onMouseOver' -}; -const Password = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => { - const { - visibilityToggle = true - } = props; - const visibilityControlled = typeof visibilityToggle === 'object' && visibilityToggle.visible !== undefined; - const [visible, setVisible] = (0,_react_17_0_2_react.useState)(() => visibilityControlled ? visibilityToggle.visible : false); - const inputRef = (0,_react_17_0_2_react.useRef)(null); - _react_17_0_2_react.useEffect(() => { - if (visibilityControlled) { - setVisible(visibilityToggle.visible); - } - }, [visibilityControlled, visibilityToggle]); - // Remove Password value - const removePasswordTimeout = (0,useRemovePasswordTimeout/* default */.Z)(inputRef); - const onVisibleChange = () => { - const { - disabled - } = props; - if (disabled) { - return; - } - if (visible) { - removePasswordTimeout(); - } - setVisible(prevState => { - var _a; - const newState = !prevState; - if (typeof visibilityToggle === 'object') { - (_a = visibilityToggle.onVisibleChange) === null || _a === void 0 ? void 0 : _a.call(visibilityToggle, newState); - } - return newState; - }); - }; - const getIcon = prefixCls => { - const { - action = 'click', - iconRender = defaultIconRender - } = props; - const iconTrigger = ActionMap[action] || ''; - const icon = iconRender(visible); - const iconProps = { - [iconTrigger]: onVisibleChange, - className: `${prefixCls}-icon`, - key: 'passwordIcon', - onMouseDown: e => { - // Prevent focused state lost - // https://github.com/ant-design/ant-design/issues/15173 - e.preventDefault(); - }, - onMouseUp: e => { - // Prevent caret position change - // https://github.com/ant-design/ant-design/issues/23524 - e.preventDefault(); - } - }; - return /*#__PURE__*/_react_17_0_2_react.cloneElement( /*#__PURE__*/_react_17_0_2_react.isValidElement(icon) ? icon : /*#__PURE__*/_react_17_0_2_react.createElement("span", null, icon), iconProps); - }; - const { - className, - prefixCls: customizePrefixCls, - inputPrefixCls: customizeInputPrefixCls, - size - } = props, - restProps = __rest(props, ["className", "prefixCls", "inputPrefixCls", "size"]); - const { - getPrefixCls - } = _react_17_0_2_react.useContext(context/* ConfigContext */.E_); - const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls); - const prefixCls = getPrefixCls('input-password', customizePrefixCls); - const suffixIcon = visibilityToggle && getIcon(prefixCls); - const inputClassName = _classnames_2_3_2_classnames_default()(prefixCls, className, { - [`${prefixCls}-${size}`]: !!size - }); - const omittedProps = Object.assign(Object.assign({}, (0,omit/* default */.Z)(restProps, ['suffix', 'iconRender', 'visibilityToggle'])), { - type: visible ? 'text' : 'password', - className: inputClassName, - prefixCls: inputPrefixCls, - suffix: suffixIcon - }); - if (size) { - omittedProps.size = size; - } - return /*#__PURE__*/_react_17_0_2_react.createElement(Input/* default */.Z, Object.assign({ - ref: (0,es_ref/* composeRef */.sQ)(ref, inputRef) - }, omittedProps)); -}); -if (false) {} -/* harmony default export */ var input_Password = (Password); -// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/SearchOutlined.js + 1 modules -var SearchOutlined = __webpack_require__(46820); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/reactNode.js -var reactNode = __webpack_require__(92343); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js -var es_button = __webpack_require__(3113); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/hooks/useSize.js -var useSize = __webpack_require__(19716); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/space/Compact.js -var Compact = __webpack_require__(33234); -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/input/Search.js -"use client"; - -var Search_rest = undefined && undefined.__rest || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; - } - return t; -}; - - - - - - - - - - -const Search = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => { - const { - prefixCls: customizePrefixCls, - inputPrefixCls: customizeInputPrefixCls, - className, - size: customizeSize, - suffix, - enterButton = false, - addonAfter, - loading, - disabled, - onSearch: customOnSearch, - onChange: customOnChange, - onCompositionStart, - onCompositionEnd - } = props, - restProps = Search_rest(props, ["prefixCls", "inputPrefixCls", "className", "size", "suffix", "enterButton", "addonAfter", "loading", "disabled", "onSearch", "onChange", "onCompositionStart", "onCompositionEnd"]); - const { - getPrefixCls, - direction - } = _react_17_0_2_react.useContext(context/* ConfigContext */.E_); - const composedRef = _react_17_0_2_react.useRef(false); - const prefixCls = getPrefixCls('input-search', customizePrefixCls); - const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls); - const { - compactSize - } = (0,Compact/* useCompactItemContext */.ri)(prefixCls, direction); - const size = (0,useSize/* default */.Z)(ctx => { - var _a; - return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx; - }); - const inputRef = _react_17_0_2_react.useRef(null); - const onChange = e => { - if (e && e.target && e.type === 'click' && customOnSearch) { - customOnSearch(e.target.value, e, { - source: 'clear' - }); - } - if (customOnChange) { - customOnChange(e); - } - }; - const onMouseDown = e => { - var _a; - if (document.activeElement === ((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input)) { - e.preventDefault(); - } - }; - const onSearch = e => { - var _a, _b; - if (customOnSearch) { - customOnSearch((_b = (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input) === null || _b === void 0 ? void 0 : _b.value, e, { - source: 'input' - }); - } - }; - const onPressEnter = e => { - if (composedRef.current || loading) { - return; - } - onSearch(e); - }; - const searchIcon = typeof enterButton === 'boolean' ? /*#__PURE__*/_react_17_0_2_react.createElement(SearchOutlined/* default */.Z, null) : null; - const btnClassName = `${prefixCls}-button`; - let button; - const enterButtonAsElement = enterButton || {}; - const isAntdButton = enterButtonAsElement.type && enterButtonAsElement.type.__ANT_BUTTON === true; - if (isAntdButton || enterButtonAsElement.type === 'button') { - button = (0,reactNode/* cloneElement */.Tm)(enterButtonAsElement, Object.assign({ - onMouseDown, - onClick: e => { - var _a, _b; - (_b = (_a = enterButtonAsElement === null || enterButtonAsElement === void 0 ? void 0 : enterButtonAsElement.props) === null || _a === void 0 ? void 0 : _a.onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e); - onSearch(e); - }, - key: 'enterButton' - }, isAntdButton ? { - className: btnClassName, - size - } : {})); - } else { - button = /*#__PURE__*/_react_17_0_2_react.createElement(es_button/* default */.ZP, { - className: btnClassName, - type: enterButton ? 'primary' : undefined, - size: size, - disabled: disabled, - key: "enterButton", - onMouseDown: onMouseDown, - onClick: onSearch, - loading: loading, - icon: searchIcon - }, enterButton); - } - if (addonAfter) { - button = [button, (0,reactNode/* cloneElement */.Tm)(addonAfter, { - key: 'addonAfter' - })]; - } - const cls = _classnames_2_3_2_classnames_default()(prefixCls, { - [`${prefixCls}-rtl`]: direction === 'rtl', - [`${prefixCls}-${size}`]: !!size, - [`${prefixCls}-with-button`]: !!enterButton - }, className); - const handleOnCompositionStart = e => { - composedRef.current = true; - onCompositionStart === null || onCompositionStart === void 0 ? void 0 : onCompositionStart(e); - }; - const handleOnCompositionEnd = e => { - composedRef.current = false; - onCompositionEnd === null || onCompositionEnd === void 0 ? void 0 : onCompositionEnd(e); - }; - return /*#__PURE__*/_react_17_0_2_react.createElement(Input/* default */.Z, Object.assign({ - ref: (0,es_ref/* composeRef */.sQ)(inputRef, ref), - onPressEnter: onPressEnter - }, restProps, { - size: size, - onCompositionStart: handleOnCompositionStart, - onCompositionEnd: handleOnCompositionEnd, - prefixCls: inputPrefixCls, - addonAfter: button, - suffix: suffix, - onChange: onChange, - className: cls, - disabled: disabled - })); -}); -if (false) {} -/* harmony default export */ var input_Search = (Search); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/TextArea.js -var TextArea = __webpack_require__(1643); -;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js -"use client"; - - - - - - -const input_Input = Input/* default */.Z; -if (false) {} -input_Input.Group = input_Group; -input_Input.Search = input_Search; -input_Input.TextArea = TextArea/* default */.Z; -input_Input.Password = input_Password; -/* harmony default export */ var input = (input_Input); - -/***/ }), - -/***/ 8378: -/*!*******************************************************************!*\ - !*** ./node_modules/_antd@5.9.0@antd/es/style/motion/collapse.js ***! - \*******************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__) { - -"use strict"; -const genCollapseMotion = token => ({ - [token.componentCls]: { - // For common/openAnimation - [`${token.antCls}-motion-collapse-legacy`]: { - overflow: 'hidden', - '&-active': { - transition: `height ${token.motionDurationMid} ${token.motionEaseInOut}, - opacity ${token.motionDurationMid} ${token.motionEaseInOut} !important` - } - }, - [`${token.antCls}-motion-collapse`]: { - overflow: 'hidden', - transition: `height ${token.motionDurationMid} ${token.motionEaseInOut}, - opacity ${token.motionDurationMid} ${token.motionEaseInOut} !important` - } - } -}); -/* harmony default export */ __webpack_exports__.Z = (genCollapseMotion); - -/***/ }), - -/***/ 5630: -/*!*****************************************************************!*\ - !*** ./node_modules/_rc-checkbox@3.1.0@rc-checkbox/es/index.js ***! - \*****************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* unused harmony export Checkbox */ -/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 26508); -/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ 74710); -/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ 80268); -/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ 39718); -/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ 26779); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ 12124); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-util/es/hooks/useMergedState */ 84381); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 59301); - - - - - -var _excluded = ["prefixCls", "className", "style", "checked", "disabled", "defaultChecked", "type", "title", "onChange"]; - - - - -var Checkbox = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_2__.forwardRef)(function (props, ref) { - var _classNames; - var _props$prefixCls = props.prefixCls, - prefixCls = _props$prefixCls === void 0 ? 'rc-checkbox' : _props$prefixCls, - className = props.className, - style = props.style, - checked = props.checked, - disabled = props.disabled, - _props$defaultChecked = props.defaultChecked, - defaultChecked = _props$defaultChecked === void 0 ? false : _props$defaultChecked, - _props$type = props.type, - type = _props$type === void 0 ? 'checkbox' : _props$type, - title = props.title, - onChange = props.onChange, - inputProps = (0,_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(props, _excluded); - var inputRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null); - var _useMergedState = (0,rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(defaultChecked, { - value: checked - }), - _useMergedState2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)(_useMergedState, 2), - rawValue = _useMergedState2[0], - setRawValue = _useMergedState2[1]; - (0,react__WEBPACK_IMPORTED_MODULE_2__.useImperativeHandle)(ref, function () { - return { - focus: function focus() { - var _inputRef$current; - (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus(); - }, - blur: function blur() { - var _inputRef$current2; - (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.blur(); - }, - input: inputRef.current - }; - }); - var classString = classnames__WEBPACK_IMPORTED_MODULE_0___default()(prefixCls, className, (_classNames = {}, (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-checked"), rawValue), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames)); - var handleChange = function handleChange(e) { - if (disabled) { - return; - } - if (!('checked' in props)) { - setRawValue(e.target.checked); - } - onChange === null || onChange === void 0 ? void 0 : onChange({ - target: (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)({}, props), {}, { - type: type, - checked: e.target.checked - }), - stopPropagation: function stopPropagation() { - e.stopPropagation(); - }, - preventDefault: function preventDefault() { - e.preventDefault(); - }, - nativeEvent: e.nativeEvent - }); - }; - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement("span", { - className: classString, - title: title, - style: style - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement("input", (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z)({}, inputProps, { - className: "".concat(prefixCls, "-input"), - ref: inputRef, - onChange: handleChange, - disabled: disabled, - checked: !!rawValue, - type: type - })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement("span", { - className: "".concat(prefixCls, "-inner") - })); -}); -/* harmony default export */ __webpack_exports__.Z = (Checkbox); - -/***/ }), - -/***/ 51581: -/*!****************************************************************************************************!*\ - !*** ./node_modules/_react-infinite-scroller@1.2.4@react-infinite-scroller/dist/InfiniteScroll.js ***! - \****************************************************************************************************/ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = __webpack_require__(/*! react */ 59301); - -var _react2 = _interopRequireDefault(_react); - -var _propTypes = __webpack_require__(/*! prop-types */ 12708); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: 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; } - -var InfiniteScroll = function (_Component) { - _inherits(InfiniteScroll, _Component); - - function InfiniteScroll(props) { - _classCallCheck(this, InfiniteScroll); - - var _this = _possibleConstructorReturn(this, (InfiniteScroll.__proto__ || Object.getPrototypeOf(InfiniteScroll)).call(this, props)); - - _this.scrollListener = _this.scrollListener.bind(_this); - _this.eventListenerOptions = _this.eventListenerOptions.bind(_this); - _this.mousewheelListener = _this.mousewheelListener.bind(_this); - return _this; - } - - _createClass(InfiniteScroll, [{ - key: 'componentDidMount', - value: function componentDidMount() { - this.pageLoaded = this.props.pageStart; - this.options = this.eventListenerOptions(); - this.attachScrollListener(); - } - }, { - key: 'componentDidUpdate', - value: function componentDidUpdate() { - if (this.props.isReverse && this.loadMore) { - var parentElement = this.getParentElement(this.scrollComponent); - parentElement.scrollTop = parentElement.scrollHeight - this.beforeScrollHeight + this.beforeScrollTop; - this.loadMore = false; - } - this.attachScrollListener(); - } - }, { - key: 'componentWillUnmount', - value: function componentWillUnmount() { - this.detachScrollListener(); - this.detachMousewheelListener(); - } - }, { - key: 'isPassiveSupported', - value: function isPassiveSupported() { - var passive = false; - - var testOptions = { - get passive() { - passive = true; - } - }; - - try { - document.addEventListener('test', null, testOptions); - document.removeEventListener('test', null, testOptions); - } catch (e) { - // ignore - } - return passive; - } - }, { - key: 'eventListenerOptions', - value: function eventListenerOptions() { - var options = this.props.useCapture; - - if (this.isPassiveSupported()) { - options = { - useCapture: this.props.useCapture, - passive: true - }; - } - return options; - } - - // Set a defaut loader for all your `InfiniteScroll` components - - }, { - key: 'setDefaultLoader', - value: function setDefaultLoader(loader) { - this.defaultLoader = loader; - } - }, { - key: 'detachMousewheelListener', - value: function detachMousewheelListener() { - var scrollEl = window; - if (this.props.useWindow === false) { - scrollEl = this.scrollComponent.parentNode; - } - - scrollEl.removeEventListener('mousewheel', this.mousewheelListener, this.options ? this.options : this.props.useCapture); - } - }, { - key: 'detachScrollListener', - value: function detachScrollListener() { - var scrollEl = window; - if (this.props.useWindow === false) { - scrollEl = this.getParentElement(this.scrollComponent); - } - - scrollEl.removeEventListener('scroll', this.scrollListener, this.options ? this.options : this.props.useCapture); - scrollEl.removeEventListener('resize', this.scrollListener, this.options ? this.options : this.props.useCapture); - } - }, { - key: 'getParentElement', - value: function getParentElement(el) { - var scrollParent = this.props.getScrollParent && this.props.getScrollParent(); - if (scrollParent != null) { - return scrollParent; - } - return el && el.parentNode; - } - }, { - key: 'filterProps', - value: function filterProps(props) { - return props; - } - }, { - key: 'attachScrollListener', - value: function attachScrollListener() { - var parentElement = this.getParentElement(this.scrollComponent); - - if (!this.props.hasMore || !parentElement) { - return; - } - - var scrollEl = window; - if (this.props.useWindow === false) { - scrollEl = parentElement; - } - - scrollEl.addEventListener('mousewheel', this.mousewheelListener, this.options ? this.options : this.props.useCapture); - scrollEl.addEventListener('scroll', this.scrollListener, this.options ? this.options : this.props.useCapture); - scrollEl.addEventListener('resize', this.scrollListener, this.options ? this.options : this.props.useCapture); - - if (this.props.initialLoad) { - this.scrollListener(); - } - } - }, { - key: 'mousewheelListener', - value: function mousewheelListener(e) { - // Prevents Chrome hangups - // See: https://stackoverflow.com/questions/47524205/random-high-content-download-time-in-chrome/47684257#47684257 - if (e.deltaY === 1 && !this.isPassiveSupported()) { - e.preventDefault(); - } - } - }, { - key: 'scrollListener', - value: function scrollListener() { - var el = this.scrollComponent; - var scrollEl = window; - var parentNode = this.getParentElement(el); - - var offset = void 0; - if (this.props.useWindow) { - var doc = document.documentElement || document.body.parentNode || document.body; - var scrollTop = scrollEl.pageYOffset !== undefined ? scrollEl.pageYOffset : doc.scrollTop; - if (this.props.isReverse) { - offset = scrollTop; - } else { - offset = this.calculateOffset(el, scrollTop); - } - } else if (this.props.isReverse) { - offset = parentNode.scrollTop; - } else { - offset = el.scrollHeight - parentNode.scrollTop - parentNode.clientHeight; - } - - // Here we make sure the element is visible as well as checking the offset - if (offset < Number(this.props.threshold) && el && el.offsetParent !== null) { - this.detachScrollListener(); - this.beforeScrollHeight = parentNode.scrollHeight; - this.beforeScrollTop = parentNode.scrollTop; - // Call loadMore after detachScrollListener to allow for non-async loadMore functions - if (typeof this.props.loadMore === 'function') { - this.props.loadMore(this.pageLoaded += 1); - this.loadMore = true; - } - } - } - }, { - key: 'calculateOffset', - value: function calculateOffset(el, scrollTop) { - if (!el) { - return 0; - } - - return this.calculateTopPosition(el) + (el.offsetHeight - scrollTop - window.innerHeight); - } - }, { - key: 'calculateTopPosition', - value: function calculateTopPosition(el) { - if (!el) { - return 0; - } - return el.offsetTop + this.calculateTopPosition(el.offsetParent); - } - }, { - key: 'render', - value: function render() { - var _this2 = this; - - var renderProps = this.filterProps(this.props); - - var children = renderProps.children, - element = renderProps.element, - hasMore = renderProps.hasMore, - initialLoad = renderProps.initialLoad, - isReverse = renderProps.isReverse, - loader = renderProps.loader, - loadMore = renderProps.loadMore, - pageStart = renderProps.pageStart, - ref = renderProps.ref, - threshold = renderProps.threshold, - useCapture = renderProps.useCapture, - useWindow = renderProps.useWindow, - getScrollParent = renderProps.getScrollParent, - props = _objectWithoutProperties(renderProps, ['children', 'element', 'hasMore', 'initialLoad', 'isReverse', 'loader', 'loadMore', 'pageStart', 'ref', 'threshold', 'useCapture', 'useWindow', 'getScrollParent']); - - props.ref = function (node) { - _this2.scrollComponent = node; - if (ref) { - ref(node); - } - }; - - var childrenArray = [children]; - if (hasMore) { - if (loader) { - isReverse ? childrenArray.unshift(loader) : childrenArray.push(loader); - } else if (this.defaultLoader) { - isReverse ? childrenArray.unshift(this.defaultLoader) : childrenArray.push(this.defaultLoader); - } - } - return _react2.default.createElement(element, props, childrenArray); - } - }]); - - return InfiniteScroll; -}(_react.Component); - -InfiniteScroll.propTypes = { - children: _propTypes2.default.node.isRequired, - element: _propTypes2.default.node, - hasMore: _propTypes2.default.bool, - initialLoad: _propTypes2.default.bool, - isReverse: _propTypes2.default.bool, - loader: _propTypes2.default.node, - loadMore: _propTypes2.default.func.isRequired, - pageStart: _propTypes2.default.number, - ref: _propTypes2.default.func, - getScrollParent: _propTypes2.default.func, - threshold: _propTypes2.default.number, - useCapture: _propTypes2.default.bool, - useWindow: _propTypes2.default.bool -}; -InfiniteScroll.defaultProps = { - element: 'div', - hasMore: false, - initialLoad: true, - pageStart: 0, - ref: null, - threshold: 250, - useWindow: true, - isReverse: false, - useCapture: false, - loader: null, - getScrollParent: null -}; -exports["default"] = InfiniteScroll; -module.exports = exports['default']; - - -/***/ }), - -/***/ 26724: -/*!**************************************************************************************!*\ - !*** ./node_modules/_react-infinite-scroller@1.2.4@react-infinite-scroller/index.js ***! - \**************************************************************************************/ -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -module.exports = __webpack_require__(/*! ./dist/InfiniteScroll */ 51581) - - -/***/ }) - -}]); \ No newline at end of file diff --git a/js/public.js b/js/public.js index 398cdf987b..a9940a40ab 100644 --- a/js/public.js +++ b/js/public.js @@ -1,28 +1,28 @@ document.body.parentNode.id = "educoder"; -var iframe = document.createElement('iframe'); -if ( - document.domain === 'www.tokcoder.com' || - document.domain === 'tokcoder.com' -) { - iframe.src = 'https://www.educoder.net/autologin.html?t=' + Date.now(); -} else { - iframe.src = 'https://www.tokcoder.com/autologin.html?t=' + Date.now(); -} -iframe.sandbox = - 'allow-scripts allow-same-origin allow-top-navigation allow-forms allow-popups allow-pointer-lock allow-popups-to-escape-sandbox allow-presentation allow-top-navigation-by-user-activation'; -iframe.allow = 'geolocation document-domain'; -iframe.style.position = 'absolute'; -iframe.style.top = '-1000px'; -iframe.style.opacity = 0; -iframe.style.visibility = 'hidden'; -iframe.style.zIndex = -1; -document.body.appendChild(iframe); -iframe.onload = function() { - iframe.contentWindow.postMessage( - { type: 'cookie', data: document.cookie }, - '*', - ); -}; +// var iframe = document.createElement('iframe'); +// if ( +// document.domain === 'www.tokcoder.com' || +// document.domain === 'tokcoder.com' +// ) { +// iframe.src = 'https://www.educoder.net/autologin.html?t=' + Date.now(); +// } else { +// iframe.src = 'https://www.tokcoder.com/autologin.html?t=' + Date.now(); +// } +// iframe.sandbox = +// 'allow-scripts allow-same-origin allow-top-navigation allow-forms allow-popups allow-pointer-lock allow-popups-to-escape-sandbox allow-presentation allow-top-navigation-by-user-activation'; +// iframe.allow = 'geolocation document-domain'; +// iframe.style.position = 'absolute'; +// iframe.style.top = '-1000px'; +// iframe.style.opacity = 0; +// iframe.style.visibility = 'hidden'; +// iframe.style.zIndex = -1; +// document.body.appendChild(iframe); +// iframe.onload = function() { +// iframe.contentWindow.postMessage( +// { type: 'cookie', data: document.cookie }, +// '*', +// ); +// }; window.gtag = new Function; diff --git a/p__Classrooms__Lists__Exercise__Answer__index.async.js b/p__Classrooms__Lists__Exercise__Answer__index.async.js index a983bd9367..7db16d4e6e 100644 --- a/p__Classrooms__Lists__Exercise__Answer__index.async.js +++ b/p__Classrooms__Lists__Exercise__Answer__index.async.js @@ -4371,7 +4371,9 @@ var Shixun = function Shixun(_ref) { var _item$shixun_details3; var shixunItem = item === null || item === void 0 ? void 0 : item.shixun_details[i].stage_list[j]; shixun.push(objectSpread2_default()(objectSpread2_default()({}, shixunItem), { - operation: item === null || item === void 0 || (_item$shixun_details3 = item.shixun_details) === null || _item$shixun_details3 === void 0 || (_item$shixun_details3 = _item$shixun_details3[i]) === null || _item$shixun_details3 === void 0 || (_item$shixun_details3 = _item$shixun_details3.shixun_detail) === null || _item$shixun_details3 === void 0 || (_item$shixun_details3 = _item$shixun_details3[0]) === null || _item$shixun_details3 === void 0 ? void 0 : _item$shixun_details3.game_identifier + operation: item === null || item === void 0 || (_item$shixun_details3 = item.shixun_details) === null || _item$shixun_details3 === void 0 || (_item$shixun_details3 = _item$shixun_details3[i]) === null || _item$shixun_details3 === void 0 || (_item$shixun_details3 = _item$shixun_details3.shixun_detail) === null || _item$shixun_details3 === void 0 || (_item$shixun_details3 = _item$shixun_details3[0]) === null || _item$shixun_details3 === void 0 ? void 0 : _item$shixun_details3.game_identifier, + is_jupyter: item === null || item === void 0 ? void 0 : item.is_jupyter, + is_jupyter_lab: item === null || item === void 0 ? void 0 : item.is_jupyter_lab })); } if (item !== null && item !== void 0 && (_item$shixun_details4 = item.shixun_details) !== null && _item$shixun_details4 !== void 0 && (_item$shixun_details4 = _item$shixun_details4[i]) !== null && _item$shixun_details4 !== void 0 && _item$shixun_details4.shixun_detail) { @@ -4492,7 +4494,7 @@ var Shixun = function Shixun(_ref) { key: "operation", align: 'center', render: function render(value, data, index) { - return value ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_anchor/* default */.Z, { + return value && !data.is_jupyter && !data.is_jupyter_lab ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_anchor/* default */.Z, { affix: false, className: "mt10", children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_anchor/* default */.Z.Link, { @@ -6282,19 +6284,23 @@ var Answer = function Answer(_ref) { while (1) switch (_context12.prev = _context12.next) { case 0: _context12.next = 2; - return (0,shixuns/* execShixun */.Ir)({ + return (item.is_jupyter || item.is_jupyter_lab ? shixuns/* execJupyter */.BK : shixuns/* execShixun */.Ir)({ id: item.shixun_identifier }); case 2: res = _context12.sent; - if (res !== null && res !== void 0 && res.game_identifier) { - setIframeUrl("/tasks/".concat(res.game_identifier, "?type=exercises&exercisesId=").concat(params.categoryId, "&coursesId=").concat(params.coursesId, "&login=").concat(params.login, "&questionId=").concat(item.question_id, "&isFullScreen=").concat((0,fullscreen/* IsFull */.vp)()).concat(iframeUrlSuffix.current || "")); + if (res !== null && res !== void 0 && res.game_identifier || res !== null && res !== void 0 && res.identifier) { + if (item.is_jupyter_lab || item.is_jupyter) { + setIframeUrl("/tasks/".concat(res.identifier, "/jupyter?type=exercises&exercisesId=").concat(params.categoryId, "&coursesId=").concat(params.coursesId, "&login=").concat(params.login, "&questionId=").concat(item.question_id, "&isFullScreen=").concat((0,fullscreen/* IsFull */.vp)()).concat(iframeUrlSuffix.current || "")); + } else { + setIframeUrl("/tasks/".concat(res.game_identifier, "?type=exercises&exercisesId=").concat(params.categoryId, "&coursesId=").concat(params.coursesId, "&login=").concat(params.login, "&questionId=").concat(item.question_id, "&isFullScreen=").concat((0,fullscreen/* IsFull */.vp)()).concat(iframeUrlSuffix.current || "")); + } setIframeBlock("block"); } if ((res === null || res === void 0 ? void 0 : res.status) === -3) { (0,util/* bindPhone */.eF)(); } else if ((res === null || res === void 0 ? void 0 : res.status) === 2) { - handleResetGame(res === null || res === void 0 ? void 0 : res.message, item.question_id); + handleResetGame(res === null || res === void 0 ? void 0 : res.message, item.question_id, item.is_jupyter_lab, item.is_jupyter); } else if ((res === null || res === void 0 ? void 0 : res.status) === 3) { handleInBeta(res === null || res === void 0 ? void 0 : res.message); } @@ -6308,7 +6314,7 @@ var Answer = function Answer(_ref) { return _ref11.apply(this, arguments); }; }(); - var handleResetGame = function handleResetGame(url, question_id) { + var handleResetGame = function handleResetGame(url, question_id, is_jupyter_lab, is_jupyter) { var _url; url = (_url = url) !== null && _url !== void 0 && _url.includes('.json') ? url : "".concat(url, ".json"); es_modal/* default */.Z.confirm({ @@ -6351,13 +6357,15 @@ var Answer = function Answer(_ref) { } goShixun({ shixun_identifier: execRes === null || execRes === void 0 ? void 0 : execRes.game_identifier, - question_id: question_id + question_id: question_id, + is_jupyter_lab: is_jupyter_lab, + is_jupyter: is_jupyter }); // openNewWindow(`/tasks/${execRes.game_identifier}`); return _context13.abrupt("return"); case 12: if ((execRes === null || execRes === void 0 ? void 0 : execRes.status) === 2) { - handleResetGame(execRes === null || execRes === void 0 ? void 0 : execRes.message, question_id); + handleResetGame(execRes === null || execRes === void 0 ? void 0 : execRes.message, question_id, is_jupyter_lab, is_jupyter); } else if ((execRes === null || execRes === void 0 ? void 0 : execRes.status) === 3) { handleInBeta(execRes === null || execRes === void 0 ? void 0 : execRes.message); } diff --git a/p__Classrooms__Lists__Exercise__ImitateAnswer__index.async.js b/p__Classrooms__Lists__Exercise__ImitateAnswer__index.async.js index 8db1e7ec07..a4bca31ad3 100644 --- a/p__Classrooms__Lists__Exercise__ImitateAnswer__index.async.js +++ b/p__Classrooms__Lists__Exercise__ImitateAnswer__index.async.js @@ -3432,7 +3432,10 @@ var Shixun = function Shixun(_ref) { key: "operation", align: 'center', render: function render(value, data, index) { - return value ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_anchor/* default */.Z, { + return item.is_jupyter_lab || item.is_jupyter ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "c-grey-999", + children: "--" + }) : value ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_anchor/* default */.Z, { affix: false, className: "mt10", children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_anchor/* default */.Z.Link, { @@ -4223,19 +4226,23 @@ var Answer = function Answer(_ref) { while (1) switch (_context4.prev = _context4.next) { case 0: _context4.next = 2; - return (0,shixuns/* execShixun */.Ir)({ + return (item.is_jupyter || item.is_jupyter_lab ? shixuns/* execJupyter */.BK : shixuns/* execShixun */.Ir)({ id: item.shixun_identifier }); case 2: res = _context4.sent; - if (res !== null && res !== void 0 && res.game_identifier) { - setIframeUrl("/tasks/".concat(res.game_identifier, "?type=exercises&exercisesId=").concat(params.categoryId, "&coursesId=").concat(params.coursesId, "&login=").concat(params.login, "&questionId=").concat(item.question_id)); + if (res !== null && res !== void 0 && res.game_identifier || res !== null && res !== void 0 && res.identifier) { + if (item.is_jupyter_lab || item.is_jupyter) { + setIframeUrl("/tasks/".concat(res.identifier, "/jupyter?type=exercises&exercisesId=").concat(params.categoryId, "&coursesId=coursesId&login=").concat(params.login, "&questionId=").concat(item.question_id)); + } else { + setIframeUrl("/tasks/".concat(res.game_identifier, "?type=exercises&exercisesId=").concat(params.categoryId, "&coursesId=").concat(params.coursesId, "&login=").concat(params.login, "&questionId=").concat(item.question_id)); + } setIframeBlock("block"); } if ((res === null || res === void 0 ? void 0 : res.status) === -3) { (0,util/* bindPhone */.eF)(); } else if ((res === null || res === void 0 ? void 0 : res.status) === 2) { - handleResetGame(res === null || res === void 0 ? void 0 : res.message, item.question_id); + handleResetGame(res === null || res === void 0 ? void 0 : res.message, item.question_id, item.is_jupyter_lab, item.is_jupyter); } else if ((res === null || res === void 0 ? void 0 : res.status) === 3) { handleInBeta(res === null || res === void 0 ? void 0 : res.message); } @@ -4249,7 +4256,7 @@ var Answer = function Answer(_ref) { return _ref4.apply(this, arguments); }; }(); - var handleResetGame = function handleResetGame(url, question_id) { + var handleResetGame = function handleResetGame(url, question_id, is_jupyter_lab, is_jupyter) { var _url; url = (_url = url) !== null && _url !== void 0 && _url.includes('.json') ? url : "".concat(url, ".json"); es_modal/* default */.Z.confirm({ @@ -4292,12 +4299,14 @@ var Answer = function Answer(_ref) { } goShixun({ shixun_identifier: execRes === null || execRes === void 0 ? void 0 : execRes.game_identifier, - question_id: question_id + question_id: question_id, + is_jupyter_lab: is_jupyter_lab, + is_jupyter: is_jupyter }); return _context5.abrupt("return"); case 12: if ((execRes === null || execRes === void 0 ? void 0 : execRes.status) === 2) { - handleResetGame(execRes === null || execRes === void 0 ? void 0 : execRes.message, question_id); + handleResetGame(execRes === null || execRes === void 0 ? void 0 : execRes.message, question_id, is_jupyter_lab, is_jupyter); } else if ((execRes === null || execRes === void 0 ? void 0 : execRes.status) === 3) { handleInBeta(execRes === null || execRes === void 0 ? void 0 : execRes.message); } diff --git a/p__Classrooms__Lists__Exercise__Review__index.async.js b/p__Classrooms__Lists__Exercise__Review__index.async.js index 32ebfb8826..d392204766 100644 --- a/p__Classrooms__Lists__Exercise__Review__index.async.js +++ b/p__Classrooms__Lists__Exercise__Review__index.async.js @@ -1719,7 +1719,9 @@ var Shixun = function Shixun(_ref) { var shixunItem = item === null || item === void 0 ? void 0 : item.shixun_details[i].stage_list[j]; shixun.push(objectSpread2_default()(objectSpread2_default()({}, shixunItem), { operation: item === null || item === void 0 || (_item$shixun_details3 = item.shixun_details) === null || _item$shixun_details3 === void 0 || (_item$shixun_details3 = _item$shixun_details3[i]) === null || _item$shixun_details3 === void 0 || (_item$shixun_details3 = _item$shixun_details3.shixun_detail) === null || _item$shixun_details3 === void 0 || (_item$shixun_details3 = _item$shixun_details3[0]) === null || _item$shixun_details3 === void 0 ? void 0 : _item$shixun_details3.game_identifier, - shixun_challenge_id: item === null || item === void 0 || (_item$shixun_details$ = item.shixun_details[i]) === null || _item$shixun_details$ === void 0 ? void 0 : _item$shixun_details$.shixun_challenge_id + shixun_challenge_id: item === null || item === void 0 || (_item$shixun_details$ = item.shixun_details[i]) === null || _item$shixun_details$ === void 0 ? void 0 : _item$shixun_details$.shixun_challenge_id, + is_jupyter: item === null || item === void 0 ? void 0 : item.is_jupyter, + is_jupyter_lab: item === null || item === void 0 ? void 0 : item.is_jupyter_lab })); } if (item !== null && item !== void 0 && (_item$shixun_details4 = item.shixun_details) !== null && _item$shixun_details4 !== void 0 && (_item$shixun_details4 = _item$shixun_details4[i]) !== null && _item$shixun_details4 !== void 0 && _item$shixun_details4.shixun_detail) { @@ -1747,7 +1749,7 @@ var Shixun = function Shixun(_ref) { render: function render(name, record) { return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, { title: name, - children: !!record.operation ? /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, { + children: !!record.operation && !record.is_jupyter && !record.is_jupyter_lab ? /*#__PURE__*/(0,jsx_runtime.jsxs)(_umi_production_exports.Link, { target: "_blank", style: { maxWidth: "400px" @@ -2056,7 +2058,7 @@ var Shixun = function Shixun(_ref) { children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", { className: "font16 mr15", children: [" \u7B2C", chanllenge.position, "\u5173"] - }), chanllenge.game_identifier ? /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, { + }), chanllenge.game_identifier && !(item !== null && item !== void 0 && item.is_jupyter_lab) && !(item !== null && item !== void 0 && item.is_jupyter) ? /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, { target: "_blank", className: "current c-light-primary font16", to: "/tasks/".concat(coursesId, "/").concat(exerciseId, "/").concat(chanllenge.game_identifier, "/exercise"), diff --git a/p__tasks__Jupyter__index.async.js b/p__tasks__Jupyter__index.async.js index ae1ab72a83..0e665d0b57 100644 --- a/p__tasks__Jupyter__index.async.js +++ b/p__tasks__Jupyter__index.async.js @@ -1,12 +1,70 @@ -"use strict"; (self["webpackChunk"] = self["webpackChunk"] || []).push([[20700],{ +/***/ 31917: +/*!*****************************************!*\ + !*** ./src/components/NoData/index.tsx ***! + \*****************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js */ 26801); +/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301); +/* harmony import */ var _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/assets/images/icons/nodata.png */ 4977); +/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd */ 3113); +/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ 37712); + + + + + + +var noData = function noData(_ref) { + var img = _ref.img, + _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, + imgStyles = _ref.imgStyles, + _ref$loading = _ref.loading, + loading = _ref$loading === void 0 ? false : _ref$loading; + return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("section", { + className: "tc animated fadeIn", + style: _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, { + color: '#999', + margin: '100px auto', + visibility: loading ? 'hidden' : 'visible' + }), styles), + children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("img", { + src: img || _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__, + style: _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, imgStyles) + }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", { + className: "mt20 font14", + children: customText || '暂时还没有相关数据哦!' + }), ButtonText && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .ZP, _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({ + className: Buttonclass, + onClick: ButtonClick + }, buttonProps), {}, { + children: ButtonText + })), ButtonTwo && ButtonTwo] + }); +}; +/* harmony default export */ __webpack_exports__.Z = (noData); + +/***/ }), + /***/ 89953: /*!**********************************!*\ !*** ./src/components/modal.tsx ***! \**********************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { +"use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: function() { return /* binding */ Dialog; } /* harmony export */ }); @@ -56,12 +114,13 @@ var Dialog = /*#__PURE__*/function (_React$Component) { /***/ }), -/***/ 85989: +/***/ 7575: /*!********************************************************!*\ - !*** ./src/pages/tasks/Jupyter/index.tsx + 13 modules ***! + !*** ./src/pages/tasks/Jupyter/index.tsx + 15 modules ***! \********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { +"use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); @@ -73,6 +132,9 @@ __webpack_require__.d(__webpack_exports__, { // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js var objectSpread2 = __webpack_require__(26801); var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2); +// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/typeof.js +var helpers_typeof = __webpack_require__(5773); +var typeof_default = /*#__PURE__*/__webpack_require__.n(helpers_typeof); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js var regeneratorRuntime = __webpack_require__(10574); var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime); @@ -105,6 +167,8 @@ var es_button = __webpack_require__(3113); var es_checkbox = __webpack_require__(24905); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/drawer/index.js + 9 modules var drawer = __webpack_require__(43428); +// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/Exercise/components/Unlock.tsx +var Unlock = __webpack_require__(96042); // EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/PoweroffOutlined.js + 1 modules var PoweroffOutlined = __webpack_require__(22321); ;// CONCATENATED MODULE: ./src/pages/tasks/Jupyter/index.less?modules @@ -252,8 +316,31 @@ var DataSet = function DataSet(_ref2) { var service = __webpack_require__(60274); // EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/CloseOutlined.js + 1 modules var CloseOutlined = __webpack_require__(99174); -// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/FileTextOutlined.js + 1 modules -var FileTextOutlined = __webpack_require__(88011); +// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/esm/extends.js +var esm_extends = __webpack_require__(26508); +;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/FileTextOutlined.js +// This icon file is generated automatically. +var FileTextOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z" } }] }, "name": "file-text", "theme": "outlined" }; +/* harmony default export */ var asn_FileTextOutlined = (FileTextOutlined); + +// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules +var AntdIcon = __webpack_require__(91851); +;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/FileTextOutlined.js + +// GENERATE BY ./scripts/generate.ts +// DON NOT EDIT IT MANUALLY + + + + +var FileTextOutlined_FileTextOutlined = function FileTextOutlined(props, ref) { + return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { + ref: ref, + icon: asn_FileTextOutlined + })); +}; +if (false) {} +/* harmony default export */ var icons_FileTextOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(FileTextOutlined_FileTextOutlined)); // EXTERNAL MODULE: ./node_modules/_react-infinite-scroller@1.2.4@react-infinite-scroller/index.js var _react_infinite_scroller_1_2_4_react_infinite_scroller = __webpack_require__(26724); var _react_infinite_scroller_1_2_4_react_infinite_scroller_default = /*#__PURE__*/__webpack_require__.n(_react_infinite_scroller_1_2_4_react_infinite_scroller); @@ -401,7 +488,7 @@ var DataSet_DataSet = function DataSet(_ref) { children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", { className: DataSetmodules.itemText, title: item.title, - children: [/*#__PURE__*/(0,jsx_runtime.jsx)(FileTextOutlined/* default */.Z, { + children: [/*#__PURE__*/(0,jsx_runtime.jsx)(icons_FileTextOutlined, { style: { color: '#28b887', fontSize: 25 @@ -966,6 +1053,7 @@ var exercise = __webpack_require__(65398); + var _excluded = ["globalSetting", "loading", "dispatch"]; @@ -993,6 +1081,7 @@ var _excluded = ["globalSetting", "loading", "dispatch"]; + var Countdown = statistic/* default */.Z.Countdown; @@ -1059,6 +1148,7 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { _useState18 = slicedToArray_default()(_useState17, 2), url = _useState18[0], setUrl = _useState18[1]; + var urlRef = (0,_react_17_0_2_react.useRef)(); var port = (0,_react_17_0_2_react.useRef)(); var _useState19 = (0,_react_17_0_2_react.useState)(Status.Success), _useState20 = slicedToArray_default()(_useState19, 2), @@ -1100,6 +1190,7 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { _useState34 = slicedToArray_default()(_useState33, 2), checkboxData = _useState34[0], setcheckboxData = _useState34[1]; + var exerciseDataRef = (0,_react_17_0_2_react.useRef)(); var countRef = (0,_react_17_0_2_react.useRef)(checkboxData); countRef.current = checkboxData; console.log("---------jupyterDat11111a", jupyterData); @@ -1108,6 +1199,9 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { type: 'globalSetting/headerFooterToggle', payload: false }); + if (searchParams.get("exercisesId") && searchParams.get("coursesId") !== 'coursesId') { + getExerciseData(); + } return function () { dispatch({ type: 'globalSetting/headerFooterToggle', @@ -1142,6 +1236,30 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { updateCode(); } }, [jupyterData]); + var getExerciseData = /*#__PURE__*/function () { + var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() { + var res; + return regeneratorRuntime_default()().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return (0,exercise/* getExerciseStartAnswer */._B)({ + categoryId: searchParams.get("exercisesId"), + login: searchParams.get("login") + }); + case 2: + res = _context.sent; + exerciseDataRef.current = res; + case 4: + case "end": + return _context.stop(); + } + }, _callee); + })); + return function getExerciseData() { + return _ref2.apply(this, arguments); + }; + }(); var updateCode = function updateCode() { tipReset({ title: '更新通知', @@ -1151,14 +1269,14 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { }); }; var submitWork = /*#__PURE__*/function () { - var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() { + var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() { var iframe; - return regeneratorRuntime_default()().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { + return regeneratorRuntime_default()().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { case 0: iframe = document.getElementById('taskJupyterIframe'); iframe.contentWindow.postMessage('saveCode', '*'); - _context.next = 4; + _context2.next = 4; return (0,fetch/* default */.ZP)("/api/homework_commons/".concat(searchParams.get("homework_common_id"), "/student_works.json"), { method: 'post', body: { @@ -1167,12 +1285,12 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { }); case 4: case "end": - return _context.stop(); + return _context2.stop(); } - }, _callee); + }, _callee2); })); return function submitWork() { - return _ref2.apply(this, arguments); + return _ref3.apply(this, arguments); }; }(); var handleJupyterMessage = function handleJupyterMessage(e) { @@ -1189,45 +1307,77 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { }; var handleSaveWithTPI = /*#__PURE__*/function () { - var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() { - var res; - return regeneratorRuntime_default()().wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { + var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() { + var _urlRef$current; + var res, _exerciseDataRef$curr, _exerciseDataRef$curr2; + return regeneratorRuntime_default()().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { case 0: - _context2.next = 2; + _context3.next = 2; return (0,task/* saveWithTPI */.zE)({ identifier: params.identifier, jupyter_port: port.current, - token: token.current + token: token.current, + jupyter_domain: (_urlRef$current = urlRef.current) === null || _urlRef$current === void 0 || (_urlRef$current = _urlRef$current[0]) === null || _urlRef$current === void 0 ? void 0 : _urlRef$current.domain, + exercise_id: searchParams.get("exercisesId") //试卷id }); case 2: - res = _context2.sent; - if (res.status === 0) { - if (clickEvaluating.current) { - // 点击评测的时候执行 - getGame(res === null || res === void 0 ? void 0 : res.data); - } else { - message/* default */.ZP.success('保存成功!'); - } + res = _context3.sent; + if (!(res.status === 0)) { + _context3.next = 7; + break; } - case 4: + if (clickEvaluating.current) { + // 点击评测的时候执行 + getGame(res === null || res === void 0 ? void 0 : res.data); + } else { + message/* default */.ZP.success('保存成功!'); + } + _context3.next = 10; + break; + case 7: + if (!(res.status === -5 && typeof_default()(res === null || res === void 0 ? void 0 : res.message) === "object")) { + _context3.next = 10; + break; + } + (0,_umi_production_exports.getDvaApp)()._store.dispatch({ + type: 'exercise/setActionTabs', + payload: { + key: 'student-unlock', + exerciseParams: objectSpread2_default()(objectSpread2_default()({}, ((_exerciseDataRef$curr = exerciseDataRef.current) === null || _exerciseDataRef$curr === void 0 ? void 0 : _exerciseDataRef$curr.exercise) || {}), {}, { + errorMessage: res === null || res === void 0 ? void 0 : res.message, + exercise_user_id: (_exerciseDataRef$curr2 = exerciseDataRef.current) === null || _exerciseDataRef$curr2 === void 0 || (_exerciseDataRef$curr2 = _exerciseDataRef$curr2.exercise) === null || _exerciseDataRef$curr2 === void 0 ? void 0 : _exerciseDataRef$curr2.exercise_user_id, + id: searchParams.get("exercisesId") + }) + } + }); + return _context3.abrupt("return"); + case 10: case "end": - return _context2.stop(); + return _context3.stop(); } - }, _callee2); + }, _callee3); })); return function handleSaveWithTPI() { - return _ref3.apply(this, arguments); + return _ref4.apply(this, arguments); }; }(); var getGame = /*#__PURE__*/function () { - var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(re) { + var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5(re) { var _saveJupyterData$curr, _saveJupyterData$curr2; var _params, rs, count, time_out, finalTime, fnc; - return regeneratorRuntime_default()().wrap(function _callee4$(_context4) { - while (1) switch (_context4.prev = _context4.next) { + return regeneratorRuntime_default()().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { case 0: _params = { + extras: { + exercise_id: searchParams.get("exercisesId"), + //试卷id + question_id: searchParams.get("questionId"), + // 题目id + challenge_id: jupyterData === null || jupyterData === void 0 ? void 0 : jupyterData.challenge_id // 关卡id + }, + sec_key: re === null || re === void 0 ? void 0 : re.sec_key, resubmit: re === null || re === void 0 ? void 0 : re.resubmit, first: 1, @@ -1238,31 +1388,38 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { homework_common_id: searchParams.get("homework_common_id") }; } - _context4.next = 4; + _context5.next = 4; return (0,service/* codeGameBuild */.Xy)((_saveJupyterData$curr = saveJupyterData.current) === null || _saveJupyterData$curr === void 0 ? void 0 : _saveJupyterData$curr.game_identifier, _params); case 4: - rs = _context4.sent; + rs = _context5.sent; if (!(rs.status === -1)) { - _context4.next = 11; + _context5.next = 14; + break; + } + if (!(searchParams.get("type") === 'exercises')) { + _context5.next = 9; break; } + window.parent.location.href = "/classrooms/".concat(searchParams.get("coursesId"), "/exercise/").concat(searchParams.get("exercisesId"), "/detail"); + return _context5.abrupt("return"); + case 9: setBtnLoading(false); setBtnTime(10); clickEvaluating.current = false; jupyterMessageFlag.current = true; - return _context4.abrupt("return"); - case 11: + return _context5.abrupt("return"); + case 14: count = 1; time_out = false; finalTime = ((_saveJupyterData$curr2 = saveJupyterData.current) === null || _saveJupyterData$curr2 === void 0 ? void 0 : _saveJupyterData$curr2.exec_time) + 11; fnc = /*#__PURE__*/function () { - var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() { + var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() { var _saveJupyterData$curr3, _saveJupyterData$curr4, _saveJupyterData$curr5; var source; - return regeneratorRuntime_default()().wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { + return regeneratorRuntime_default()().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { case 0: - _context3.next = 2; + _context4.next = 2; return (0,service/* getCodeGameStatus */.Qo)((_saveJupyterData$curr3 = saveJupyterData.current) === null || _saveJupyterData$curr3 === void 0 ? void 0 : _saveJupyterData$curr3.game_identifier, { resubmit: re === null || re === void 0 ? void 0 : re.resubmit, time_out: time_out, @@ -1271,7 +1428,7 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { challenge_id: (_saveJupyterData$curr5 = saveJupyterData.current) === null || _saveJupyterData$curr5 === void 0 ? void 0 : _saveJupyterData$curr5.challenge_id }); case 2: - source = _context3.sent; + source = _context4.sent; if ((source === null || source === void 0 ? void 0 : source.running_code_status) === null || (source === null || source === void 0 ? void 0 : source.running_code_status) === 1 || (source === null || source === void 0 ? void 0 : source.running_code_status) === 2) { count = count + 1; if (count > finalTime) { @@ -1300,38 +1457,38 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { } case 4: case "end": - return _context3.stop(); + return _context4.stop(); } - }, _callee3); + }, _callee4); })); return function fnc() { - return _ref5.apply(this, arguments); + return _ref6.apply(this, arguments); }; }(); fnc(); - case 16: + case 19: case "end": - return _context4.stop(); + return _context5.stop(); } - }, _callee4); + }, _callee5); })); return function getGame(_x) { - return _ref4.apply(this, arguments); + return _ref5.apply(this, arguments); }; }(); var handleGetJupyterData = /*#__PURE__*/function () { - var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() { + var _ref7 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() { var res; - return regeneratorRuntime_default()().wrap(function _callee5$(_context5) { - while (1) switch (_context5.prev = _context5.next) { + return regeneratorRuntime_default()().wrap(function _callee6$(_context6) { + while (1) switch (_context6.prev = _context6.next) { case 0: - _context5.next = 2; + _context6.next = 2; return (0,task/* getJupyterData */.dU)({ identifier: params.identifier, homework_id: searchParams.get("homework_common_id") }); case 2: - res = _context5.sent; + res = _context6.sent; if (res) { setJupyterData(res); saveJupyterData.current = objectSpread2_default()({}, res); @@ -1345,72 +1502,73 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { } case 4: case "end": - return _context5.stop(); + return _context6.stop(); } - }, _callee5); + }, _callee6); })); return function handleGetJupyterData() { - return _ref6.apply(this, arguments); + return _ref7.apply(this, arguments); }; }(); var handleGetJupyterTPIUrl = /*#__PURE__*/function () { - var _ref7 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() { + var _ref8 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() { var _res$data; var res, _res$data2, _res$data3, _parseUrl, _res$data4, _res$data5, _res$data6, _res$data7, _res$data8, _res$data9; - return regeneratorRuntime_default()().wrap(function _callee6$(_context6) { - while (1) switch (_context6.prev = _context6.next) { + return regeneratorRuntime_default()().wrap(function _callee7$(_context7) { + while (1) switch (_context7.prev = _context7.next) { case 0: - _context6.next = 2; + _context7.next = 2; return (0,task/* getInfoWithTPI */.rV)({ identifier: params.identifier, homework_common_id: searchParams.get("homework_common_id") || '' }); case 2: - res = _context6.sent; + res = _context7.sent; setSpinning(false); if (!(res !== null && res !== void 0 && (_res$data = res.data) !== null && _res$data !== void 0 && (_res$data = _res$data.data_list) !== null && _res$data !== void 0 && _res$data.length)) { - _context6.next = 7; + _context7.next = 7; break; } mediator/* default */.Z.publish('pod-restrict-data', { identifier: res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.identifier, data_list: res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.data_list }); - return _context6.abrupt("return"); + return _context7.abrupt("return"); case 7: if (!(res !== null && res !== void 0 && res.data)) { - _context6.next = 18; + _context7.next = 19; break; } setUrl(res.data); + urlRef.current = res.data; token.current = (_parseUrl = (0,util/* parseUrl */.en)(res === null || res === void 0 || (_res$data4 = res.data) === null || _res$data4 === void 0 || (_res$data4 = _res$data4[0]) === null || _res$data4 === void 0 ? void 0 : _res$data4["link_url"])) === null || _parseUrl === void 0 ? void 0 : _parseUrl.token; port.current = res === null || res === void 0 || (_res$data5 = res.data) === null || _res$data5 === void 0 || (_res$data5 = _res$data5[0]) === null || _res$data5 === void 0 ? void 0 : _res$data5["port"]; if (!(((_res$data6 = res.data) === null || _res$data6 === void 0 ? void 0 : _res$data6.length) > 1)) { - _context6.next = 13; + _context7.next = 14; break; } - return _context6.abrupt("return"); - case 13: + return _context7.abrupt("return"); + case 14: setUrlSign(false); setStatus(Status.Success); setTime(Date.now() + (res === null || res === void 0 || (_res$data7 = res.data) === null || _res$data7 === void 0 || (_res$data7 = _res$data7[0]) === null || _res$data7 === void 0 ? void 0 : _res$data7.remaining_time)); setEndTime((res === null || res === void 0 || (_res$data8 = res.data) === null || _res$data8 === void 0 || (_res$data8 = _res$data8[0]) === null || _res$data8 === void 0 ? void 0 : _res$data8.remaining_time) - 300 * 1000 <= 0 ? Date.now() + 1000 : Date.now() + ((res === null || res === void 0 || (_res$data9 = res.data) === null || _res$data9 === void 0 || (_res$data9 = _res$data9[0]) === null || _res$data9 === void 0 ? void 0 : _res$data9.remaining_time) - 300 * 1000)); - return _context6.abrupt("return"); - case 18: + return _context7.abrupt("return"); + case 19: if (res.status === -1) { setStatus(Status.LoadFail); setUrlSign(false); } else { setStatus(Status.ReLoad); } - case 19: + case 20: case "end": - return _context6.stop(); + return _context7.stop(); } - }, _callee6); + }, _callee7); })); return function handleGetJupyterTPIUrl() { - return _ref7.apply(this, arguments); + return _ref8.apply(this, arguments); }; }(); var handleUrlClick = function handleUrlClick(num) { @@ -1420,29 +1578,29 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { setStatus(Status.Success); }; var handleGetTPITimeInfo = /*#__PURE__*/function () { - var _ref8 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() { + var _ref9 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8() { var res; - return regeneratorRuntime_default()().wrap(function _callee7$(_context7) { - while (1) switch (_context7.prev = _context7.next) { + return regeneratorRuntime_default()().wrap(function _callee8$(_context8) { + while (1) switch (_context8.prev = _context8.next) { case 0: - _context7.next = 2; + _context8.next = 2; return (0,task/* getTimeInfoWithTPI */.x4)({ identifier: params.identifier }); case 2: - res = _context7.sent; + res = _context8.sent; if (!((res === null || res === void 0 ? void 0 : res.status) !== 0)) { - _context7.next = 5; + _context8.next = 5; break; } - return _context7.abrupt("return"); + return _context8.abrupt("return"); case 5: if (res !== null && res !== void 0 && res.useSeconds) { - _context7.next = 8; + _context8.next = 8; break; } handleResetEnvModal(); - return _context7.abrupt("return"); + return _context8.abrupt("return"); case 8: if (res !== null && res !== void 0 && res.remainingSeconds) { setTime(Date.now() + res.remainingSeconds * 1000); @@ -1450,12 +1608,12 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { } case 9: case "end": - return _context7.stop(); + return _context8.stop(); } - }, _callee7); + }, _callee8); })); return function handleGetTPITimeInfo() { - return _ref8.apply(this, arguments); + return _ref9.apply(this, arguments); }; }(); var handleResetEnvModal = function handleResetEnvModal() { @@ -1477,22 +1635,22 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { }); }; var handleResetEnv = /*#__PURE__*/function () { - var _ref9 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8() { + var _ref10 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9() { var res; - return regeneratorRuntime_default()().wrap(function _callee8$(_context8) { - while (1) switch (_context8.prev = _context8.next) { + return regeneratorRuntime_default()().wrap(function _callee9$(_context9) { + while (1) switch (_context9.prev = _context9.next) { case 0: - _context8.next = 2; + _context9.next = 2; return (0,task/* resetWithTPI */.m_)({ identifier: jupyterData === null || jupyterData === void 0 ? void 0 : jupyterData.myshixun_identifier }); case 2: - res = _context8.sent; + res = _context9.sent; if (!((res === null || res === void 0 ? void 0 : res.status) !== 0)) { - _context8.next = 5; + _context9.next = 5; break; } - return _context8.abrupt("return"); + return _context9.abrupt("return"); case 5: message/* default */.ZP.success('重置成功!'); setSpinning(false); @@ -1501,12 +1659,12 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { }, 300); case 8: case "end": - return _context8.stop(); + return _context9.stop(); } - }, _callee8); + }, _callee9); })); return function handleResetEnv() { - return _ref9.apply(this, arguments); + return _ref10.apply(this, arguments); }; }(); var handleEndTimeFinish = function handleEndTimeFinish() { @@ -1527,28 +1685,28 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { okText: '立即延长', cancelText: '不需要', onOk: function () { - var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9() { + var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee10() { var res; - return regeneratorRuntime_default()().wrap(function _callee9$(_context9) { - while (1) switch (_context9.prev = _context9.next) { + return regeneratorRuntime_default()().wrap(function _callee10$(_context10) { + while (1) switch (_context10.prev = _context10.next) { case 0: - _context9.next = 2; + _context10.next = 2; return (0,task/* activeWithTPI */.rB)(jupyterData === null || jupyterData === void 0 ? void 0 : jupyterData.myshixun_identifier); case 2: - res = _context9.sent; + res = _context10.sent; if (!(res.status === 0)) { - _context9.next = 7; + _context10.next = 7; break; } - _context9.next = 6; + _context10.next = 6; return handleGetJupyterTPIUrl(); case 6: message/* default */.ZP.success('延长成功!'); case 7: case "end": - return _context9.stop(); + return _context10.stop(); } - }, _callee9); + }, _callee10); })); function onOk() { return _onOk.apply(this, arguments); @@ -1619,22 +1777,22 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { okText: '确定', cancelText: '取消', onOk: function () { - var _onOk2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee10() { + var _onOk2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee11() { var res; - return regeneratorRuntime_default()().wrap(function _callee10$(_context10) { - while (1) switch (_context10.prev = _context10.next) { + return regeneratorRuntime_default()().wrap(function _callee11$(_context11) { + while (1) switch (_context11.prev = _context11.next) { case 0: - _context10.next = 2; + _context11.next = 2; return (0,task/* syncCode */.fi)({ identifier: params.identifier }); case 2: - res = _context10.sent; + res = _context11.sent; if (!(res.status !== 0)) { - _context10.next = 5; + _context11.next = 5; break; } - return _context10.abrupt("return"); + return _context11.abrupt("return"); case 5: message/* default */.ZP.success('操作成功'); setSpinning(false); @@ -1643,9 +1801,9 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { }, 300); case 8: case "end": - return _context10.stop(); + return _context11.stop(); } - }, _callee10); + }, _callee11); })); function onOk() { return _onOk2.apply(this, arguments); @@ -1698,12 +1856,12 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { answerData = _useState36[0], setAnswerData = _useState36[1]; var getAnswerData = /*#__PURE__*/function () { - var _ref10 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee11(identifier) { + var _ref11 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee12(identifier) { var res; - return regeneratorRuntime_default()().wrap(function _callee11$(_context11) { - while (1) switch (_context11.prev = _context11.next) { + return regeneratorRuntime_default()().wrap(function _callee12$(_context12) { + while (1) switch (_context12.prev = _context12.next) { case 0: - _context11.next = 2; + _context12.next = 2; return (0,fetch/* default */.ZP)("/api/shixuns/".concat(identifier, "/get_standard_answer.json"), { method: 'get', params: { @@ -1711,18 +1869,18 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { } }); case 2: - res = _context11.sent; + res = _context12.sent; if (res.status === 0) { setAnswerData(res); } case 4: case "end": - return _context11.stop(); + return _context12.stop(); } - }, _callee11); + }, _callee12); })); return function getAnswerData(_x2) { - return _ref10.apply(this, arguments); + return _ref11.apply(this, arguments); }; }(); (0,_react_17_0_2_react.useEffect)(function () { @@ -1756,6 +1914,13 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { } } } + var backExercise = function backExercise(type) { + if (document.activeElement.tagName !== "IFRAME") { + window.parent.postMessage('backExercise', '*'); + // if (!lockExitFullRef.current) exitFull(); + } + }; + var fullChange = function fullChange(e) { if ((0,fullscreen/* IsFull */.vp)()) { setShowTool(false); @@ -1777,17 +1942,17 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { return _onResetGitCode.apply(this, arguments); } function _onResetGitCode() { - _onResetGitCode = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee12() { + _onResetGitCode = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee13() { var response; - return regeneratorRuntime_default()().wrap(function _callee12$(_context12) { - while (1) switch (_context12.prev = _context12.next) { + return regeneratorRuntime_default()().wrap(function _callee13$(_context13) { + while (1) switch (_context13.prev = _context13.next) { case 0: - _context12.next = 2; + _context13.next = 2; return (0,service/* resetGitCode */.Tf)(jupyterData === null || jupyterData === void 0 ? void 0 : jupyterData.myshixun_identifier, {}); case 2: - response = _context12.sent; + response = _context13.sent; if (!((response === null || response === void 0 ? void 0 : response.status) === -5)) { - _context12.next = 6; + _context13.next = 6; break; } modal/* default */.Z.info({ @@ -1803,14 +1968,14 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { }), "\uFF09\u4E2D\u88AB\u4F7F\u7528\uFF0C\u7528\u6237\u8BD5\u5377\u5DF2\u4EA4\u5377\uFF0C\u7981\u6B62\u518D\u4F5C\u7B54\uFF01"] }) }); - return _context12.abrupt("return"); + return _context13.abrupt("return"); case 6: - return _context12.abrupt("return", response); + return _context13.abrupt("return", response); case 7: case "end": - return _context12.stop(); + return _context13.stop(); } - }, _callee12); + }, _callee13); })); return _onResetGitCode.apply(this, arguments); } @@ -1832,7 +1997,8 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { jupyterData: jupyterData, onVncAction: onVncAction, onHideToolBar: onHideToolBar, - port: url === null || url === void 0 || (_url$ = url[0]) === null || _url$ === void 0 ? void 0 : _url$.port + port: url === null || url === void 0 || (_url$ = url[0]) === null || _url$ === void 0 ? void 0 : _url$.port, + token: token.current }; return /*#__PURE__*/(0,jsx_runtime.jsxs)(spin/* default */.Z, { spinning: spinning, @@ -1936,6 +2102,16 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { } }); } + dispatch({ + type: 'user/getUserInfo', + payload: { + objective_id: jupyterData.identifier, + objective_type: 'shixun' + } + }); + if (searchParams.get("type") === 'exercises') { + backExercise('back'); + } _umi_production_exports.history.push("/shixuns/".concat(jupyterData.identifier, "/challenges")); }, onCancel: function onCancel() { @@ -2157,12 +2333,14 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { onClose: onHideToolBar, children: /*#__PURE__*/(0,jsx_runtime.jsx)(vnc_setting/* default */.Z, objectSpread2_default()({}, vncSettingOption)) }) + }), /*#__PURE__*/(0,jsx_runtime.jsx)(Unlock/* default */.Z, { + successCb: handleSaveWithTPI })] }); }; -/* harmony default export */ var Jupyter = ((0,_umi_production_exports.connect)(function (_ref11) { - var loading = _ref11.loading, - globalSetting = _ref11.globalSetting; +/* harmony default export */ var Jupyter = ((0,_umi_production_exports.connect)(function (_ref12) { + var loading = _ref12.loading, + globalSetting = _ref12.globalSetting; return { globalSetting: globalSetting, loading: loading @@ -2177,6 +2355,7 @@ var TaskJupyterPage = function TaskJupyterPage(_ref) { \*****************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { +"use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Jd: function() { return /* binding */ rebootEsc; }, /* harmony export */ a$: function() { return /* binding */ getDataSets; }, @@ -2414,6 +2593,7 @@ function _getLatexFileTree() { \*********************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { +"use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ BU: function() { return /* binding */ exitFull; }, /* harmony export */ Dj: function() { return /* binding */ requestFullScreen; }, @@ -2510,6 +2690,322 @@ function IsFull() { // } // }); +/***/ }), + +/***/ 51581: +/*!****************************************************************************************************!*\ + !*** ./node_modules/_react-infinite-scroller@1.2.4@react-infinite-scroller/dist/InfiniteScroll.js ***! + \****************************************************************************************************/ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _react = __webpack_require__(/*! react */ 59301); + +var _react2 = _interopRequireDefault(_react); + +var _propTypes = __webpack_require__(/*! prop-types */ 12708); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: 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; } + +var InfiniteScroll = function (_Component) { + _inherits(InfiniteScroll, _Component); + + function InfiniteScroll(props) { + _classCallCheck(this, InfiniteScroll); + + var _this = _possibleConstructorReturn(this, (InfiniteScroll.__proto__ || Object.getPrototypeOf(InfiniteScroll)).call(this, props)); + + _this.scrollListener = _this.scrollListener.bind(_this); + _this.eventListenerOptions = _this.eventListenerOptions.bind(_this); + _this.mousewheelListener = _this.mousewheelListener.bind(_this); + return _this; + } + + _createClass(InfiniteScroll, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.pageLoaded = this.props.pageStart; + this.options = this.eventListenerOptions(); + this.attachScrollListener(); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + if (this.props.isReverse && this.loadMore) { + var parentElement = this.getParentElement(this.scrollComponent); + parentElement.scrollTop = parentElement.scrollHeight - this.beforeScrollHeight + this.beforeScrollTop; + this.loadMore = false; + } + this.attachScrollListener(); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + this.detachScrollListener(); + this.detachMousewheelListener(); + } + }, { + key: 'isPassiveSupported', + value: function isPassiveSupported() { + var passive = false; + + var testOptions = { + get passive() { + passive = true; + } + }; + + try { + document.addEventListener('test', null, testOptions); + document.removeEventListener('test', null, testOptions); + } catch (e) { + // ignore + } + return passive; + } + }, { + key: 'eventListenerOptions', + value: function eventListenerOptions() { + var options = this.props.useCapture; + + if (this.isPassiveSupported()) { + options = { + useCapture: this.props.useCapture, + passive: true + }; + } + return options; + } + + // Set a defaut loader for all your `InfiniteScroll` components + + }, { + key: 'setDefaultLoader', + value: function setDefaultLoader(loader) { + this.defaultLoader = loader; + } + }, { + key: 'detachMousewheelListener', + value: function detachMousewheelListener() { + var scrollEl = window; + if (this.props.useWindow === false) { + scrollEl = this.scrollComponent.parentNode; + } + + scrollEl.removeEventListener('mousewheel', this.mousewheelListener, this.options ? this.options : this.props.useCapture); + } + }, { + key: 'detachScrollListener', + value: function detachScrollListener() { + var scrollEl = window; + if (this.props.useWindow === false) { + scrollEl = this.getParentElement(this.scrollComponent); + } + + scrollEl.removeEventListener('scroll', this.scrollListener, this.options ? this.options : this.props.useCapture); + scrollEl.removeEventListener('resize', this.scrollListener, this.options ? this.options : this.props.useCapture); + } + }, { + key: 'getParentElement', + value: function getParentElement(el) { + var scrollParent = this.props.getScrollParent && this.props.getScrollParent(); + if (scrollParent != null) { + return scrollParent; + } + return el && el.parentNode; + } + }, { + key: 'filterProps', + value: function filterProps(props) { + return props; + } + }, { + key: 'attachScrollListener', + value: function attachScrollListener() { + var parentElement = this.getParentElement(this.scrollComponent); + + if (!this.props.hasMore || !parentElement) { + return; + } + + var scrollEl = window; + if (this.props.useWindow === false) { + scrollEl = parentElement; + } + + scrollEl.addEventListener('mousewheel', this.mousewheelListener, this.options ? this.options : this.props.useCapture); + scrollEl.addEventListener('scroll', this.scrollListener, this.options ? this.options : this.props.useCapture); + scrollEl.addEventListener('resize', this.scrollListener, this.options ? this.options : this.props.useCapture); + + if (this.props.initialLoad) { + this.scrollListener(); + } + } + }, { + key: 'mousewheelListener', + value: function mousewheelListener(e) { + // Prevents Chrome hangups + // See: https://stackoverflow.com/questions/47524205/random-high-content-download-time-in-chrome/47684257#47684257 + if (e.deltaY === 1 && !this.isPassiveSupported()) { + e.preventDefault(); + } + } + }, { + key: 'scrollListener', + value: function scrollListener() { + var el = this.scrollComponent; + var scrollEl = window; + var parentNode = this.getParentElement(el); + + var offset = void 0; + if (this.props.useWindow) { + var doc = document.documentElement || document.body.parentNode || document.body; + var scrollTop = scrollEl.pageYOffset !== undefined ? scrollEl.pageYOffset : doc.scrollTop; + if (this.props.isReverse) { + offset = scrollTop; + } else { + offset = this.calculateOffset(el, scrollTop); + } + } else if (this.props.isReverse) { + offset = parentNode.scrollTop; + } else { + offset = el.scrollHeight - parentNode.scrollTop - parentNode.clientHeight; + } + + // Here we make sure the element is visible as well as checking the offset + if (offset < Number(this.props.threshold) && el && el.offsetParent !== null) { + this.detachScrollListener(); + this.beforeScrollHeight = parentNode.scrollHeight; + this.beforeScrollTop = parentNode.scrollTop; + // Call loadMore after detachScrollListener to allow for non-async loadMore functions + if (typeof this.props.loadMore === 'function') { + this.props.loadMore(this.pageLoaded += 1); + this.loadMore = true; + } + } + } + }, { + key: 'calculateOffset', + value: function calculateOffset(el, scrollTop) { + if (!el) { + return 0; + } + + return this.calculateTopPosition(el) + (el.offsetHeight - scrollTop - window.innerHeight); + } + }, { + key: 'calculateTopPosition', + value: function calculateTopPosition(el) { + if (!el) { + return 0; + } + return el.offsetTop + this.calculateTopPosition(el.offsetParent); + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + + var renderProps = this.filterProps(this.props); + + var children = renderProps.children, + element = renderProps.element, + hasMore = renderProps.hasMore, + initialLoad = renderProps.initialLoad, + isReverse = renderProps.isReverse, + loader = renderProps.loader, + loadMore = renderProps.loadMore, + pageStart = renderProps.pageStart, + ref = renderProps.ref, + threshold = renderProps.threshold, + useCapture = renderProps.useCapture, + useWindow = renderProps.useWindow, + getScrollParent = renderProps.getScrollParent, + props = _objectWithoutProperties(renderProps, ['children', 'element', 'hasMore', 'initialLoad', 'isReverse', 'loader', 'loadMore', 'pageStart', 'ref', 'threshold', 'useCapture', 'useWindow', 'getScrollParent']); + + props.ref = function (node) { + _this2.scrollComponent = node; + if (ref) { + ref(node); + } + }; + + var childrenArray = [children]; + if (hasMore) { + if (loader) { + isReverse ? childrenArray.unshift(loader) : childrenArray.push(loader); + } else if (this.defaultLoader) { + isReverse ? childrenArray.unshift(this.defaultLoader) : childrenArray.push(this.defaultLoader); + } + } + return _react2.default.createElement(element, props, childrenArray); + } + }]); + + return InfiniteScroll; +}(_react.Component); + +InfiniteScroll.propTypes = { + children: _propTypes2.default.node.isRequired, + element: _propTypes2.default.node, + hasMore: _propTypes2.default.bool, + initialLoad: _propTypes2.default.bool, + isReverse: _propTypes2.default.bool, + loader: _propTypes2.default.node, + loadMore: _propTypes2.default.func.isRequired, + pageStart: _propTypes2.default.number, + ref: _propTypes2.default.func, + getScrollParent: _propTypes2.default.func, + threshold: _propTypes2.default.number, + useCapture: _propTypes2.default.bool, + useWindow: _propTypes2.default.bool +}; +InfiniteScroll.defaultProps = { + element: 'div', + hasMore: false, + initialLoad: true, + pageStart: 0, + ref: null, + threshold: 250, + useWindow: true, + isReverse: false, + useCapture: false, + loader: null, + getScrollParent: null +}; +exports["default"] = InfiniteScroll; +module.exports = exports['default']; + + +/***/ }), + +/***/ 26724: +/*!**************************************************************************************!*\ + !*** ./node_modules/_react-infinite-scroller@1.2.4@react-infinite-scroller/index.js ***! + \**************************************************************************************/ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +module.exports = __webpack_require__(/*! ./dist/InfiniteScroll */ 51581) + + /***/ }) }]); \ No newline at end of file diff --git a/p__tasks__index.async.js b/p__tasks__index.async.js index b201d6e125..1b58c80b55 100644 --- a/p__tasks__index.async.js +++ b/p__tasks__index.async.js @@ -1,4 +1,4 @@ -(self["webpackChunk"] = self["webpackChunk"] || []).push([[93665,81882],{ +(self["webpackChunk"] = self["webpackChunk"] || []).push([[93665],{ /***/ 5757: /*!*************************************!*\ @@ -335,1303 +335,6 @@ var useDisableAction = function useDisableAction(disable) { /***/ }), -/***/ 81882: -/*!**********************************************************!*\ - !*** ./src/components/MultiUpload/index.tsx + 3 modules ***! - \**********************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - z: function() { return /* binding */ coverToFileList; }, - Z: function() { return /* binding */ MultiUpload; } -}); - -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js -var regeneratorRuntime = __webpack_require__(10574); -var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime); -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js -var asyncToGenerator = __webpack_require__(39343); -var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator); -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js -var objectSpread2 = __webpack_require__(26801); -var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2); -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/toConsumableArray.js -var toConsumableArray = __webpack_require__(93923); -var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray); -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js -var slicedToArray = __webpack_require__(11006); -var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray); -// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js -var _react_17_0_2_react = __webpack_require__(59301); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/upload/index.js + 24 modules -var upload = __webpack_require__(6557); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules -var es_message = __webpack_require__(8591); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules -var modal = __webpack_require__(43418); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js -var es_button = __webpack_require__(3113); -// EXTERNAL MODULE: ./src/utils/env.ts -var env = __webpack_require__(30996); -// EXTERNAL MODULE: ./src/pages/MoopCases/FormPanel/service.ts -var service = __webpack_require__(48988); -// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js -var jsx_runtime = __webpack_require__(37712); -;// CONCATENATED MODULE: ./src/components/SingleUpload/index.tsx - - - - - - - - - - -var uploadNameSizeSeperator = ' '; -function bytesToSize(bytes) { - var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']; - if (bytes == 0) return '0 Byte'; - var i = parseInt('' + Math.floor(Math.log(bytes) / Math.log(1024)), 10); - return (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i]; -} -/* harmony default export */ var SingleUpload = (function (_ref) { - var _ref$value = _ref.value, - value = _ref$value === void 0 ? [] : _ref$value, - action = _ref.action, - _onChange = _ref.onChange, - className = _ref.className, - _ref$maxSize = _ref.maxSize, - maxSize = _ref$maxSize === void 0 ? 150 : _ref$maxSize, - _ref$title = _ref.title, - title = _ref$title === void 0 ? '文件上传' : _ref$title, - _ref$accept = _ref.accept, - accept = _ref$accept === void 0 ? null : _ref$accept; - var uploadProps = { - multiple: false, - fileList: value, - accept: accept, - withCredentials: true, - beforeUpload: function beforeUpload(file) { - var fileSize = file.size / 1024 / 1024; - if (!(fileSize < maxSize)) { - message.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(maxSize, "MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20")); - return Promise.reject(); - } - return true; - }, - action: "".concat(ENV.API_SERVER, "/api/attachments.json"), - // ?debug=student&randomcode=undefined&client_key=6d57f8c3dd186c5ada392546ace9620a - onChange: function onChange(info) { - var _info$file; - var fileList = _toConsumableArray(info.fileList); - fileList = fileList.map(function (file) { - if (file.name.indexOf(uploadNameSizeSeperator) === -1) { - file.name = "".concat(file.name).concat(uploadNameSizeSeperator).concat(bytesToSize(file.size)); - } - return _objectSpread({}, file); - }); - if (info.file.status === 'done' && ((_info$file = info.file) === null || _info$file === void 0 || (_info$file = _info$file.response) === null || _info$file === void 0 ? void 0 : _info$file.status) === -1) { - var _info$file2; - message.error((_info$file2 = info.file) === null || _info$file2 === void 0 || (_info$file2 = _info$file2.response) === null || _info$file2 === void 0 ? void 0 : _info$file2.message); - _onChange([]); - return; - } - _onChange(fileList); - }, - onRemove: function () { - var _onRemove = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) { - var fileSize, id, rs; - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - fileSize = file.size / 1024 / 1024; - if (!(file.status === 'uploading')) { - _context.next = 3; - break; - } - return _context.abrupt("return", true); - case 3: - if (fileSize < maxSize) { - _context.next = 7; - break; - } - return _context.abrupt("return", true); - case 7: - id = file.response ? file.response.id : file.uid; - if (!id) { - _context.next = 15; - break; - } - _context.next = 11; - return removeAttachment(file.response ? file.response.id : file.id); - case 11: - rs = _context.sent; - return _context.abrupt("return", rs); - case 15: - return _context.abrupt("return", true); - case 16: - case "end": - return _context.stop(); - } - }, _callee); - })); - function onRemove(_x) { - return _onRemove.apply(this, arguments); - } - return onRemove; - }() - }; - function onCancel(e) { - e.preventDefault(); - e.stopPropagation(); - } - return /*#__PURE__*/_jsx("div", { - className: "single-upload ".concat(className ? className : ''), - children: /*#__PURE__*/_jsxs(Upload, _objectSpread(_objectSpread({}, uploadProps), {}, { - children: [/*#__PURE__*/_jsx(Button, { - type: "primary", - title: value.length > 0 ? '每次只能上传一个资源, 删除下面资源可重新上传 ' : '', - disabled: value.length > 0, - ghost: true, - children: title - }), /*#__PURE__*/_jsxs("span", { - onClick: onCancel, - style: { - marginLeft: 10 - }, - children: ["(\u5355\u4E2A\u6587\u4EF6\u6700\u5927", maxSize, "M)", ' '] - })] - })) - }); -}); -// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/InboxOutlined.js + 1 modules -var InboxOutlined = __webpack_require__(60936); -// EXTERNAL MODULE: ./node_modules/_lodash@4.17.21@lodash/lodash.js -var lodash = __webpack_require__(89392); -;// CONCATENATED MODULE: ./src/components/MultiUpload/index.less -// extracted by mini-css-extract-plugin - -;// CONCATENATED MODULE: ./src/assets/images/uploadImg.svg -function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(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 = it.call(o); }, 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; } } }; } -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; } -var __defProp = Object.defineProperty; -var __getOwnPropSymbols = Object.getOwnPropertySymbols; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __propIsEnum = Object.prototype.propertyIsEnumerable; -var __defNormalProp = function __defNormalProp(obj, key, value) { - return key in obj ? __defProp(obj, key, { - enumerable: true, - configurable: true, - writable: true, - value: value - }) : obj[key] = value; -}; -var __spreadValues = function __spreadValues(a, b) { - for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]); - if (__getOwnPropSymbols) { - var _iterator = _createForOfIteratorHelper(__getOwnPropSymbols(b)), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var prop = _step.value; - if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]); - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - } - return a; -}; - -var SvgUploadImg = function SvgUploadImg(props) { - return /* @__PURE__ */React.createElement("svg", __spreadValues({ - width: 14, - height: 14, - xmlns: "http://www.w3.org/2000/svg" - }, props), /* @__PURE__ */React.createElement("title", null, "\u5F62\u72B6"), /* @__PURE__ */React.createElement("path", { - d: "M10.354 3.5h-2.77v8.167H6.416V3.5H3.646L7 0l3.354 3.5ZM14 7h-1.167v5.833H1.167V7H0v7h14V7Z", - fill: "#3061D0", - fillRule: "nonzero" - })); -}; - -/* harmony default export */ var uploadImg = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwLjM1NCAzLjVoLTIuNzd2OC4xNjdINi40MTZWMy41SDMuNjQ2TDcgMGwzLjM1NCAzLjVaTTE0IDdoLTEuMTY3djUuODMzSDEuMTY3VjdIMHY3aDE0VjdaIiBmaWxsPSIjMzA2MUQwIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4="); -;// CONCATENATED MODULE: ./src/components/MultiUpload/index.tsx - - - - - - - - - - - - - - - - -var Dragger = upload/* default */.Z.Dragger; -function coverToFileList(data) { - var rs = []; - if (data && data.length > 0) { - rs = data.map(function (item) { - return { - uid: item.id, - id: item.id, - name: item.title + uploadNameSizeSeperator + item.filesize, - url: item.url, - filesize: item.filesize, - status: 'done', - response: { - id: item.id - } - }; - }); - } - return rs; -} -/* harmony default export */ var MultiUpload = (function (_ref) { - var value = _ref.value, - _onChange = _ref.onChange, - action = _ref.action, - data = _ref.data, - className = _ref.className, - _ref$maxSize = _ref.maxSize, - maxSize = _ref$maxSize === void 0 ? 150 : _ref$maxSize, - _ref$title = _ref.title, - title = _ref$title === void 0 ? '上传附件' : _ref$title, - _ref$showRemoveModal = _ref.showRemoveModal, - showRemoveModal = _ref$showRemoveModal === void 0 ? false : _ref$showRemoveModal, - _ref$accept = _ref.accept, - accept = _ref$accept === void 0 ? '' : _ref$accept, - additionalText = _ref.additionalText, - isDragger = _ref.isDragger, - _ref$number = _ref.number, - number = _ref$number === void 0 ? 1000 : _ref$number, - _ref$aloneClear = _ref.aloneClear, - aloneClear = _ref$aloneClear === void 0 ? false : _ref$aloneClear; - var _useState = (0,_react_17_0_2_react.useState)(false), - _useState2 = slicedToArray_default()(_useState, 2), - disabled = _useState2[0], - setDisabled = _useState2[1]; - var _useState3 = (0,_react_17_0_2_react.useState)(value || []), - _useState4 = slicedToArray_default()(_useState3, 2), - fileList = _useState4[0], - setFileList = _useState4[1]; - var _useState5 = (0,_react_17_0_2_react.useState)(1), - _useState6 = slicedToArray_default()(_useState5, 2), - nums = _useState6[0], - setnums = _useState6[1]; - (0,_react_17_0_2_react.useEffect)(function () { - if (value) { - if (nums === 1) { - setFileList(toConsumableArray_default()(value)); - } - setnums(2); - if (number === (value === null || value === void 0 ? void 0 : value.length)) { - setDisabled(true); - } - } - }, [value]); - var clearLastFile = function clearLastFile() { - setTimeout(function () { - fileList.pop(); - setFileList(toConsumableArray_default()(fileList)); - }, 500); - }; - var uploadProps = { - multiple: true, - disabled: disabled, - accept: accept, - withCredentials: true, - fileList: fileList, - // fileList: fileList?.length ? fileList : value, - beforeUpload: function beforeUpload(file, fileArr) { - var fileSize = file.size / 1024 / 1024; - if (fileList.concat(fileArr).length > number) { - fileList.pop(); - setFileList(toConsumableArray_default()(fileList)); - es_message/* default */.ZP.error("\u6700\u591A\u53EA\u80FD\u4E0A\u4F20".concat(number, "\u4E2A\u6587\u4EF6")); - if (aloneClear) { - return Promise.reject(); - } - clearLastFile(); - return false; - } - if (!(fileSize < maxSize)) { - es_message/* default */.ZP.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(maxSize, "MB).")); - if (aloneClear) { - return Promise.reject(); - } - clearLastFile(); - return false; - } - return true; - }, - data: data, - action: action || "".concat(env/* default */.Z.API_SERVER, "/api/attachments.json"), - // ?debug=student&randomcode=undefined&client_key=6d57f8c3dd186c5ada392546ace9620a - onChange: function onChange(info) { - var _info$file; - if (info.file.status === "removed") { - fileList = info.fileList; - } else { - fileList = (0,lodash.uniqBy)([].concat(toConsumableArray_default()(info.fileList), toConsumableArray_default()(fileList)), 'uid'); - } - if (info.file.status === 'done' && ((_info$file = info.file) === null || _info$file === void 0 || (_info$file = _info$file.response) === null || _info$file === void 0 ? void 0 : _info$file.status) === -1) { - var _info$file2; - es_message/* default */.ZP.error((_info$file2 = info.file) === null || _info$file2 === void 0 || (_info$file2 = _info$file2.response) === null || _info$file2 === void 0 ? void 0 : _info$file2.message); - return; - } - if (fileList.length >= number) setDisabled(true);else setDisabled(false); - setFileList(toConsumableArray_default()(fileList)); - fileList = fileList.map(function (file) { - var _file$response; - if (file !== null && file !== void 0 && (_file$response = file.response) !== null && _file$response !== void 0 && _file$response.id) { - var _file$response2; - file.url = "/api/attachments/".concat(file === null || file === void 0 || (_file$response2 = file.response) === null || _file$response2 === void 0 ? void 0 : _file$response2.id); - } - if (file.name.indexOf(uploadNameSizeSeperator) === -1) { - file.name = "".concat(file.name).concat(uploadNameSizeSeperator).concat(bytesToSize(file.size)); - } - return objectSpread2_default()({}, file); - }); - console.log('info:', info, fileList); - _onChange(fileList); - }, - onRemove: function () { - var _onRemove = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(file) { - var remove; - return regeneratorRuntime_default()().wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - remove = /*#__PURE__*/function () { - var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() { - var id, rs; - return regeneratorRuntime_default()().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - id = file.response ? file.response.id : file.id; - if (!id) { - _context.next = 8; - break; - } - _context.next = 4; - return (0,service/* removeAttachment */.JZ)(file.response ? file.response.id : file.uid); - case 4: - rs = _context.sent; - return _context.abrupt("return", Promise.resolve(rs)); - case 8: - return _context.abrupt("return", true); - case 9: - case "end": - return _context.stop(); - } - }, _callee); - })); - return function remove() { - return _ref2.apply(this, arguments); - }; - }(); - if (!showRemoveModal) { - _context3.next = 5; - break; - } - return _context3.abrupt("return", new Promise(function (resolve, reject) { - modal/* default */.Z.confirm({ - centered: true, - width: 530, - okText: '确定', - cancelText: '取消', - title: '提示', - content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", { - className: "tc font16", - children: "\u662F\u5426\u786E\u8BA4\u5220\u9664?" - }), - onOk: function () { - var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() { - var res; - return regeneratorRuntime_default()().wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - _context2.next = 2; - return remove(); - case 2: - res = _context2.sent; - es_message/* default */.ZP.success('删除成功'); - resolve(true); - case 5: - case "end": - return _context2.stop(); - } - }, _callee2); - })); - function onOk() { - return _onOk.apply(this, arguments); - } - return onOk; - }(), - onCancel: function onCancel() { - return resolve(false); - } - }); - })); - case 5: - _context3.next = 7; - return remove(); - case 7: - return _context3.abrupt("return", _context3.sent); - case 8: - case "end": - return _context3.stop(); - } - }, _callee3); - })); - function onRemove(_x) { - return _onRemove.apply(this, arguments); - } - return onRemove; - }() - }; - function onCancel(e) { - e.preventDefault(); - e.stopPropagation(); - } - return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { - className: "multi-upload ".concat(className ? className : ''), - children: [isDragger && /*#__PURE__*/(0,jsx_runtime.jsxs)(Dragger, objectSpread2_default()(objectSpread2_default()({}, uploadProps), {}, { - children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", { - className: "ant-upload-drag-icon", - children: /*#__PURE__*/(0,jsx_runtime.jsx)(InboxOutlined/* default */.Z, {}) - }), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", { - className: "ant-upload-text", - children: ["\u70B9\u51FB\u4E0A\u4F20\u56FE\u6807\uFF0C\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u4EF6\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u6B64", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "(\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\u4E3A", maxSize, "MB)", ' '] - }), additionalText] - })), !isDragger && /*#__PURE__*/(0,jsx_runtime.jsxs)(upload/* default */.Z, objectSpread2_default()(objectSpread2_default()({}, uploadProps), {}, { - children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, { - disabled: disabled, - className: "upload_button", - children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", { - className: "aBtn_img", - src: uploadImg - }), title] - }), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", { - onClick: onCancel, - className: "upload_text", - children: ["(\u5355\u4E2A\u6587\u4EF6\u6700\u5927", maxSize, "MB)", ' '] - })] - }))] - }); -}); - -/***/ }), - -/***/ 1498: -/*!*********************************************************!*\ - !*** ./src/components/PreviewAll/index.tsx + 1 modules ***! - \*********************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - Z: function() { return /* binding */ PreviewAll; } -}); - -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js -var objectSpread2 = __webpack_require__(26801); -var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2); -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js -var regeneratorRuntime = __webpack_require__(10574); -var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime); -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js -var asyncToGenerator = __webpack_require__(39343); -var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator); -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js -var slicedToArray = __webpack_require__(11006); -var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray); -// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js -var _react_17_0_2_react = __webpack_require__(59301); -;// CONCATENATED MODULE: ./src/components/PreviewAll/index.less?modules -// extracted by mini-css-extract-plugin -/* harmony default export */ var PreviewAllmodules = ({"wrp":"wrp___dq7YK","bgBlack":"bgBlack___ARIUV","monaco":"monaco___VnZC3","darkBlue":"darkBlue___UprA9","close":"close___LKoWu","embed":"embed___hvpEJ"}); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js -var es_button = __webpack_require__(3113); -// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules -var ArrowDownOutlined = __webpack_require__(98915); -// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules -var monaco_editor = __webpack_require__(82791); -// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules -var tooltip = __webpack_require__(6848); -// EXTERNAL MODULE: ./src/utils/util.tsx -var util = __webpack_require__(87885); -// EXTERNAL MODULE: ./src/service/exercise.ts -var exercise = __webpack_require__(65398); -// EXTERNAL MODULE: ./src/components/NoData/index.tsx -var NoData = __webpack_require__(31917); -// EXTERNAL MODULE: ./src/utils/env.ts -var env = __webpack_require__(30996); -// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js -var jsx_runtime = __webpack_require__(37712); -;// CONCATENATED MODULE: ./src/components/PreviewAll/index.tsx - - - - - - - - - - - - - - - - - -/* harmony default export */ var PreviewAll = (function (_ref) { - var _data, _data2, _data3, _data4, _data5, _data6, _data7; - var _ref$editOffice = _ref.editOffice, - editOffice = _ref$editOffice === void 0 ? 'view' : _ref$editOffice, - 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, - disabledDownload = _ref.disabledDownload, - onImgDimensions = _ref.onImgDimensions, - showNodata = _ref.showNodata; - var _useState = (0,_react_17_0_2_react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'), - _useState2 = slicedToArray_default()(_useState, 2), - src = _useState2[0], - setSrc = _useState2[1]; - var _useState3 = (0,_react_17_0_2_react.useState)(""), - _useState4 = slicedToArray_default()(_useState3, 2), - token = _useState4[0], - setToken = _useState4[1]; - var _useState5 = (0,_react_17_0_2_react.useState)(), - _useState6 = slicedToArray_default()(_useState5, 2), - officeData = _useState6[0], - setOfficeData = _useState6[1]; - var officePath = window.ENV === "build" ? "/react/build" : ""; - var apiServer = location.host.startsWith("localhost") ? env/* default */.Z.PROXY_SERVER : env/* default */.Z.API_SERVER; - // let size; - console.log("disabledDownload---", disabledDownload); - var unit = 1024 * 1024; - var maxSize = 10 * unit; - var closeRef = (0,_react_17_0_2_react.useRef)(); - if ((_data = data) !== null && _data !== void 0 && _data.startsWith("/api") && type !== "txt") { - data = env/* default */.Z.API_SERVER + data; - } - // if (type === "office") { - // size = parseUrl(data).filesize - // if (size > maxSize) { - // type = "other" - // } - // } - if (filename) monacoEditor.filename = filename; - (0,_react_17_0_2_react.useEffect)(function () { - var _document$cookie; - var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 || (_document$cookie = _document$cookie.replace(/\s/g, "")) === null || _document$cookie === void 0 ? void 0 : _document$cookie.split(";"); - cookies === null || cookies === void 0 || cookies.map(function (item) { - var i = item.split("="); - if (i[0] === '_educoder_session') { - setToken(i[1]); - } - }); - }, []); - (0,_react_17_0_2_react.useEffect)(function () { - if (type === "office") getData(); - }, [type, data]); - var getData = /*#__PURE__*/function () { - var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() { - var _url, _id, res; - return regeneratorRuntime_default()().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - console.log("data:", data); - _url = data; - if (!data.startsWith("http")) { - _url = location.origin + _url; - } - _id = new URL(_url).pathname.split("/").pop(); - _context.next = 6; - return (0,exercise/* setEcsAttachment */.gJ)({ - attachment_id: _id - }); - case 6: - res = _context.sent; - setOfficeData(res); - case 8: - case "end": - return _context.stop(); - } - }, _callee); - })); - return function getData() { - return _ref2.apply(this, arguments); - }; - }(); - var handleClick = function handleClick() { - if (data.startsWith("http") || data.startsWith('blob:')) { - handleDown(); - return; - } - (0,util/* downloadFile */.Sv)(filename || 'educoder', data, filename); - }; - var handleDown = function handleDown() { - (0,util/* downLoadLink */.Nd)(filename || 'educoder', decodeURIComponent(data)); - }; - console.log(data, 'data'); - return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { - style: objectSpread2_default()({}, style || {}), - className: "".concat(hasMask && PreviewAllmodules.bgBlack, " ").concat(!!type ? PreviewAllmodules.wrp : "hide"), - children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { - className: PreviewAllmodules.close, - ref: closeRef, - children: [!!onImgDimensions && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, { - title: "\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8", - getPopupContainer: function getPopupContainer() { - return closeRef.current; - }, - children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { - onClick: function onClick() { - onClose(); - onImgDimensions(); - }, - children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", { - className: "icon-yulanpizhu" - }) - }) - }), !disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, { - title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6", - getPopupContainer: function getPopupContainer() { - return closeRef.current; - }, - children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { - onClick: handleDown, - children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", { - className: "icon-quxiaozhiding" - }) - }) - }), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, { - title: "\u5173\u95ED", - getPopupContainer: function getPopupContainer() { - return closeRef.current; - }, - children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { - className: "", - onClick: onClose, - children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", { - className: "icon-guanbi1" - }) - }) - })] - }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", { - className: "".concat(PreviewAllmodules[className], " ").concat(className, " ").concat(PreviewAllmodules.monaco, " ").concat(type === "txt" ? "show" : "hide"), - children: type === "txt" && /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, objectSpread2_default()({}, monacoEditor)) - }), type === "audio" && /*#__PURE__*/(0,jsx_runtime.jsx)("audio", { - src: ((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.indexOf("http")) > -1 || (_data3 = data) !== null && _data3 !== void 0 && _data3.startsWith("/api") ? data : "data:image/png;base64,".concat(data), - autoPlay: true - }), type === "video" && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, { - children: ((_data4 = data) === null || _data4 === void 0 ? void 0 : _data4.indexOf("http")) > -1 || (_data5 = data) !== null && _data5 !== void 0 && _data5.startsWith("/api") ? /*#__PURE__*/(0,jsx_runtime.jsx)("video", { - controls: true, - src: "".concat(data), - autoPlay: true - }) : /*#__PURE__*/(0,jsx_runtime.jsx)("video", { - controls: true, - src: "data:video/mp4;base64,".concat(data), - autoPlay: true - }) - }), type === 'office' && officeData && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", { - src: "".concat(officePath, "/office.html?key=").concat(officeData.key, "&url=").concat(apiServer + officeData.url, "&callbackUrl=").concat(apiServer + officeData.callbackUrl, "&fileType=").concat(officeData.fileType, "&title=").concat(officeData.title, "&model=").concat(editOffice, "&officeServer=").concat(env/* default */.Z.ONLYOFFICE, "&disabledDownload=").concat(!!disabledDownload) - }), type === 'html' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", { - src: data + '&disposition=inline' - }), type === 'pdf' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", { - src: "".concat(officePath, "/js/pdfview/index.html?url=").concat(data, "&disabledDownload=").concat(!!disabledDownload) - }) // - , type === "image" && /*#__PURE__*/(0,jsx_runtime.jsx)("img", { - src: ((_data6 = data) === null || _data6 === void 0 ? void 0 : _data6.indexOf("http")) > -1 || (_data7 = data) !== null && _data7 !== void 0 && _data7.startsWith("/api") ? data : "data:image/png;base64,".concat(data) - }), (type === "other" || type === "download") && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, { - children: showNodata ? /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, { - customText: "\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B", - ButtonTwo: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, { - icon: /*#__PURE__*/(0,jsx_runtime.jsx)("i", { - className: "iconfont icon-xiazai4 font14" - }), - type: "primary", - size: 'middle', - onClick: handleClick, - children: "\u4E0B\u8F7D" - }) - }) : /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, { - type: "primary", - size: 'middle', - onClick: handleClick, - children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"] - }) - })] - }); -}); - -/***/ }), - -/***/ 32666: -/*!*********************************************************!*\ - !*** ./src/components/RenderHtml/index.tsx + 1 modules ***! - \*********************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -"use strict"; - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - Z: function() { return /* binding */ RenderHtml; } -}); - -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js -var objectSpread2 = __webpack_require__(26801); -var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2); -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/toConsumableArray.js -var toConsumableArray = __webpack_require__(93923); -var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray); -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/createForOfIteratorHelper.js -var createForOfIteratorHelper = __webpack_require__(98190); -var createForOfIteratorHelper_default = /*#__PURE__*/__webpack_require__.n(createForOfIteratorHelper); -// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js -var slicedToArray = __webpack_require__(11006); -var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray); -// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js -var _react_17_0_2_react = __webpack_require__(59301); -// EXTERNAL MODULE: ./node_modules/_katex@0.11.1@katex/dist/katex.min.css -var katex_min = __webpack_require__(88633); -// EXTERNAL MODULE: ./node_modules/_marked@2.0.7@marked/lib/marked.js -var marked = __webpack_require__(32834); -var marked_default = /*#__PURE__*/__webpack_require__.n(marked); -// EXTERNAL MODULE: ./node_modules/_marked@2.0.7@marked/src/helpers.js -var helpers = __webpack_require__(11690); -;// CONCATENATED MODULE: ./src/utils/marked.ts - - - -function indentCodeCompensation(raw, text) { - var matchIndentToCode = raw.match(/^(\s+)(?:```)/); - if (matchIndentToCode === null) { - return text; - } - var indentToCode = matchIndentToCode[1]; - return text.split('\n').map(function (node) { - var matchIndentInNode = node.match(/^\s+/); - if (matchIndentInNode === null) { - return node; - } - var _matchIndentInNode = slicedToArray_default()(matchIndentInNode, 1), - indentInNode = _matchIndentInNode[0]; - if (indentInNode.length >= indentToCode.length) { - return node.slice(indentToCode.length); - } - return node; - }).join('\n'); -} -//兼容之前的 ##标题式写法 -var toc = []; -var ctx = ["' + (escaped ? code : (0,helpers.escape)(code, true)) + '';
- }
- if (['latex', 'katex', 'math'].indexOf(lang) >= 0) {
- return "".concat(code, "
"); - } else { - return "").concat(escaped ? code : (0,helpers.escape)(code, true), "\n");
- }
-};
-renderer.heading = function (text, level, raw) {
- var anchor = this.options.headerPrefix + raw.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g, '-');
- toc.push({
- anchor: anchor,
- level: level,
- text: text
- });
- return ']*>/g;
-function _unescape(str) {
- var div = document.createElement('div');
- div.innerHTML = str;
- return div.childNodes.length === 0 ? '' : div.childNodes[0].nodeValue;
-}
-/* harmony default export */ var RenderHtml = (function (_ref) {
- var _ref$value = _ref.value,
- value = _ref$value === void 0 ? '' : _ref$value,
- className = _ref.className,
- showTextOnly = _ref.showTextOnly,
- showLines = _ref.showLines,
- _ref$style = _ref.style,
- style = _ref$style === void 0 ? {} : _ref$style,
- _ref$stylesPrev = _ref.stylesPrev,
- stylesPrev = _ref$stylesPrev === void 0 ? {} : _ref$stylesPrev,
- highlightKeywords = _ref.highlightKeywords,
- showProgramFill = _ref.showProgramFill,
- isProgramFill = _ref.isProgramFill,
- _ref$disabledFill = _ref.disabledFill,
- disabledFill = _ref$disabledFill === void 0 ? false : _ref$disabledFill,
- programFillValue = _ref.programFillValue,
- _ref$onFillChange = _ref.onFillChange,
- onFillChange = _ref$onFillChange === void 0 ? function (value) {} : _ref$onFillChange,
- _ref$onFillBlur = _ref.onFillBlur,
- onFillBlur = _ref$onFillBlur === void 0 ? function () {} : _ref$onFillBlur;
- var str = String(value);
- var _useState = (0,_react_17_0_2_react.useState)(""),
- _useState2 = slicedToArray_default()(_useState, 2),
- data = _useState2[0],
- setData = _useState2[1];
- var _useState3 = (0,_react_17_0_2_react.useState)("office"),
- _useState4 = slicedToArray_default()(_useState3, 2),
- type = _useState4[0],
- setType = _useState4[1];
- var _useState5 = (0,_react_17_0_2_react.useState)([]),
- _useState6 = slicedToArray_default()(_useState5, 2),
- projectValue = _useState6[0],
- setProjectValue = _useState6[1];
- var classNamesRef = (0,_react_17_0_2_react.useRef)("a" + (0,v4/* default */.Z)());
- var formObj = {};
- var createInput = function createInput(a, num) {
- // const wrap = document.createElement("span")
- // wrap.className =
- var input = document.createElement(a === ADD_SINGLE ? "input" : "textarea");
- input.style.width = "100%";
- input.style.height = a === ADD_SINGLE ? "40px" : "151px";
- input.rows = 5;
- input.spellcheck = false;
- input.name = "edu-program-fill";
- input.placeholder = "请输入";
- input.dataset.id = num;
- var key = Object.keys(formObj).length;
- formObj[key] = input;
- return "").concat(input.outerHTML, "");
- };
- var formatMD = function formatMD(rs) {
- return rs.replace(/([\s\S]+?)<\/style>/gim, function (_, css) {
- var _css = css.replace(/(\n|\r)/g, "").split("}");
- var arr = [];
- _css.map(function (item) {
- if (item != '') {
- arr.push(".".concat(classNamesRef.current, " ").concat(item));
- }
- });
- return "");
- });
- };
- var html = (0,_react_17_0_2_react.useMemo)(function () {
- try {
- var reg = /\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g;
- var reg2 = /\"\/api\/attachments\/|\"\/attachments\/download\//g;
- var reg3 = /\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;
- str = str.replace(reg, "(" + env/* default */.Z.API_SERVER + "/api/attachments/").replace(reg2, '"' + env/* default */.Z.API_SERVER + "/api/attachments/").replace(reg3, '"' + env/* default */.Z.API_SERVER + "/files/uploads/").replaceAll("http://video.educoder", "https://video.educoder").replaceAll("http://www.educoder.net/api", "https://data.educoder.net/api").replaceAll("https://www.educoder.net/api", "https://data.educoder.net/api").replace(/\r\n/g, "\n");
- // str = str.replace(new RegExp("(?".concat(formatMD(str || ""), " ");
- }
- var rs = utils_marked(str);
- rs = formatMD(rs);
- var math_expressions = getMathExpressions();
- if (str.match(/\[TOC\]/)) {
- rs = rs.replace('[TOC]
', getTocContent()); - cleanToc(); - } - rs = rs.replace(/(__special_katext_id_\d+__)/g, function (_match, capture) { - var _math_expressions$cap = math_expressions[capture], - type = _math_expressions$cap.type, - expression = _math_expressions$cap.expression; - return (0,katex.renderToString)(_unescape(expression) || '', { - displayMode: type === 'block', - throwOnError: false, - output: 'html' - }); - }); - rs = rs.replace(/▁/g, '▁▁▁'); - resetMathExpressions(); - // return dompurify.sanitize(rs) - var dom = document.createElement('div'); - dom.innerHTML = rs; - if (highlightKeywords) { - var escapedKeywords = highlightKeywords.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); - findKeyword(dom, escapedKeywords); - return dom.innerHTML; - } - if (showTextOnly) { - return dom.innerText; - } - setTimeout(function () { - return onLoad(); - }, 500); - console.log("dom.innerHTML:", dom.innerHTML); - return dom.innerHTML; - }, [str, highlightKeywords]); - (0,_react_17_0_2_react.useEffect)(function () { - if (el.current) { - var inputs = el.current.querySelectorAll(["input", "textarea"]); - inputs.forEach(function (input) { - input.oninput = onInput; - input.onblur = onBlur; - }); - } - }, [projectValue]); - (0,_react_17_0_2_react.useEffect)(function () { - if (!!(programFillValue !== null && programFillValue !== void 0 && programFillValue.length)) { - var scoreDom = el.current.querySelectorAll(".edu-program-fill-score"); - var dom = el.current.querySelectorAll('[name="edu-program-fill"]'); - var _iterator = createForOfIteratorHelper_default()(dom.entries()), - _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var _programFillValue$k; - var _step$value = slicedToArray_default()(_step.value, 2), - k = _step$value[0], - i = _step$value[1]; - i.value = (_programFillValue$k = programFillValue[k]) === null || _programFillValue$k === void 0 ? void 0 : _programFillValue$k.value; - if (programFillValue[k].type === "warning") { - i.className = "program-fill-warning"; - } else if (programFillValue[k].type === "success") { - i.className = "program-fill-success"; - } else { - i.className = ""; - } - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - var _iterator2 = createForOfIteratorHelper_default()(scoreDom.entries()), - _step2; - try { - for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { - var _programFillValue$_k, _programFillValue$_k2; - var _step2$value = slicedToArray_default()(_step2.value, 2), - _k = _step2$value[0], - _i = _step2$value[1]; - _i.innerHTML = (_programFillValue$_k = programFillValue[_k]) !== null && _programFillValue$_k !== void 0 && _programFillValue$_k.score ? "".concat((_programFillValue$_k2 = programFillValue[_k]) === null || _programFillValue$_k2 === void 0 ? void 0 : _programFillValue$_k2.score, "\u5206") : ""; - } - } catch (err) { - _iterator2.e(err); - } finally { - _iterator2.f(); - } - setProjectValue(programFillValue); - } - }, [programFillValue]); - var onInput = function onInput(e) { - projectValue[e.target.dataset.id] = projectValue[e.target.dataset.id] || {}; - projectValue[e.target.dataset.id]["value"] = e.target.value; - setProjectValue(toConsumableArray_default()(projectValue)); - onFillChange(projectValue, e.target.dataset.id); - }; - var onBlur = function onBlur(e) { - projectValue[e.target.dataset.id] = projectValue[e.target.dataset.id] || {}; - projectValue[e.target.dataset.id]["value"] = e.target.value; - setProjectValue(toConsumableArray_default()(projectValue)); - onFillBlur(projectValue, e.target.dataset.id); - }; - function findKeyword(node, keyword) { - return node.childNodes.forEach(function (childNode) { - if (childNode.childNodes.length > 0) { - findKeyword(childNode, keyword); - } else if (childNode.nodeName !== "IMG") { - if (childNode.innerHTML) { - var _childNode$innerHTML; - childNode.innerHTML = (_childNode$innerHTML = childNode.innerHTML) === null || _childNode$innerHTML === void 0 ? void 0 : _childNode$innerHTML.replace(new RegExp(keyword, "gi"), '$&'); - } else { - var dom = document.createElement("span"); - dom.innerHTML = childNode.textContent.replace(new RegExp(keyword, "gi"), '$&'); - childNode.replaceWith(dom); - } - } - }); - - // return dom.childNodes.forEach((node:any) => { - // console.log("nodeLen:",node.childNodes.length) - // if(node.childNodes.length > 0){ - // debugger - // // findKeyword(dom.childNodes,keyword) - // }else{ - // if(node.nodeName !== "#text"){ - // node.innerHTML = node.innerHTML.replaceAll(keyword,`${keyword}`) - // console.log("node:",node,dom,node.nodeName,node.innerHTML,node.childNodes.length) - // debugger - // } - // } - - // return node - // }); - } - - var el = (0,_react_17_0_2_react.useRef)(); - lines['WebkitLineClamp'] = showLines; - if (showLines) { - style = objectSpread2_default()(objectSpread2_default()({}, style), lines); - } - function onAncherHandler(e) { - var target = e.target; - if (target.tagName.toUpperCase() === 'A') { - var ancher = target.getAttribute('href'); - if (ancher.indexOf("office") > -1) { - e.preventDefault(); - setData(ancher); - setType("office"); - } else if (ancher.indexOf("application/pdf") > -1) { - e.preventDefault(); - setData(ancher); - setType("pdf"); - } else if (ancher.indexOf("text/html") > -1) { - e.preventDefault(); - setData(ancher); - setType("html"); - } else if (ancher.startsWith('#')) { - e.preventDefault(); - var viewEl = document.getElementById(ancher.replace('#', '')); - if (viewEl) { - viewEl.scrollIntoView(true); - } - } - } - } - var onLoad = function onLoad() { - var _el$current; - var videoElement = (_el$current = el.current) === null || _el$current === void 0 ? void 0 : _el$current.querySelectorAll('video'); - videoElement === null || videoElement === void 0 || videoElement.forEach(function (item) { - item.oncontextmenu = function () { - return false; - }; - if (item.src.indexOf('.m3u8') > -1) { - if (item.canPlayType('application/vnd.apple.mpegurl')) {} else if (dist_hls/* default */.Z.isSupported()) { - var hls = new dist_hls/* default */.Z(); - hls.loadSource(item.src); - hls.attachMedia(item); - } - } - }); - }; - (0,_react_17_0_2_react.useEffect)(function () { - if (el.current && html) { - if (html.match(preRegex)) { - window.PR.prettyPrint(); - } - } - if (el.current) { - el.current.addEventListener('click', onAncherHandler); - return function () { - var _el$current2; - (_el$current2 = el.current) === null || _el$current2 === void 0 || _el$current2.removeEventListener('click', onAncherHandler); - resetMathExpressions(); - cleanToc(); - }; - } - }, [html, el.current, onAncherHandler]); - return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { - children: [showTextOnly && /*#__PURE__*/(0,jsx_runtime.jsx)("div", { - ref: el, - children: html - }), !showTextOnly && /*#__PURE__*/(0,jsx_runtime.jsx)("div", { - ref: el, - style: objectSpread2_default()({}, style), - className: "".concat(className ? className : '', " ").concat(disabledFill ? "disabled-fill" : "", " markdown-body ").concat(classNamesRef.current), - dangerouslySetInnerHTML: { - __html: html - } - }), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, { - close: true, - data: data, - type: !!(data !== null && data !== void 0 && data.length) ? type : "", - style: objectSpread2_default()({}, stylesPrev), - onClose: function onClose() { - return setData(""); - } - })] - }); -}); - -/***/ }), - /***/ 25238: /*!************************************************************!*\ !*** ./src/components/image-preview/index.tsx + 1 modules ***! @@ -3590,297 +2293,6 @@ var Option = antd__WEBPACK_IMPORTED_MODULE_3__["default"].Option; /***/ }), -/***/ 96042: -/*!*******************************************************************!*\ - !*** ./src/pages/Classrooms/Lists/Exercise/components/Unlock.tsx ***! - \*******************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/typeof.js */ 5773); -/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_typeof_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_typeof_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js */ 10574); -/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js */ 39343); -/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js */ 11006); -/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ 59301); -/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! antd */ 31797); -/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! antd */ 78241); -/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! antd */ 43418); -/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! antd */ 72315); -/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! antd */ 1056); -/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! antd */ 95237); -/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! antd */ 43604); -/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! antd */ 3113); -/* harmony import */ var _service_exercise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/service/exercise */ 65398); -/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! moment */ 9498); -/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_6__); -/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! umi */ 43788); -/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/utils/util */ 87885); -/* harmony import */ var _components_Exercise_ip__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/components/Exercise/ip */ 24073); -/* harmony import */ var _utils_authority__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/utils/authority */ 71633); -/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react/jsx-runtime */ 37712); - - - - - - - - - - - - - - - -var Countdown = antd__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z.Countdown; -var Unlock = function Unlock(_ref) { - var _actionTabs$exerciseP9, _actionTabs$exerciseP10, _actionTabs$exerciseP11, _actionTabs$exerciseP12; - var exercise = _ref.exercise, - successCb = _ref.successCb, - dispatch = _ref.dispatch; - var params = (0,umi__WEBPACK_IMPORTED_MODULE_7__.useParams)(); - var _Form$useForm = antd__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z.useForm(), - _Form$useForm2 = _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_Form$useForm, 1), - form = _Form$useForm2[0]; - var _useState = (0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(false), - _useState2 = _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useState, 2), - isLoading = _useState2[0], - setIsLoading = _useState2[1]; - var localIpRef = (0,react__WEBPACK_IMPORTED_MODULE_4__.useRef)(); - var actionTabs = exercise.actionTabs; - (0,react__WEBPACK_IMPORTED_MODULE_4__.useEffect)(function () { - if (exercise.actionTabs.key === 'student-unlock') { - // if (actionTabs?.exerciseParams?.ip_limit !== 'no' || actionTabs?.exerciseParams?.ip_bind) - // getLocalIp(); - setIsLoading(false); - form.resetFields(); - } - }, [exercise.actionTabs.key]); - var getLocalIp = function getLocalIp() { - return new Promise( /*#__PURE__*/function () { - var _ref2 = _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee(resolve) { - var _actionTabs$exerciseP, _actionTabs$exerciseP2; - return _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return (0,_components_Exercise_ip__WEBPACK_IMPORTED_MODULE_9__/* .findLocalIp */ .y)({ - ip_limit: actionTabs === null || actionTabs === void 0 || (_actionTabs$exerciseP = actionTabs.exerciseParams) === null || _actionTabs$exerciseP === void 0 ? void 0 : _actionTabs$exerciseP.ip_limit, - ip_bind: actionTabs === null || actionTabs === void 0 || (_actionTabs$exerciseP2 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP2 === void 0 ? void 0 : _actionTabs$exerciseP2.ip_bind - }); - case 2: - localIpRef.current = _context.sent; - return _context.abrupt("return", resolve()); - case 4: - case "end": - return _context.stop(); - } - }, _callee); - })); - return function (_x) { - return _ref2.apply(this, arguments); - }; - }()); - }; - var handleOk = /*#__PURE__*/function () { - var _ref3 = _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee2() { - var _actionTabs$exerciseP3, _actionTabs$exerciseP4, _actionTabs$exerciseP5, _actionTabs$exerciseP6; - var formValue, unlockRes, _userInfo, _actionTabs$exerciseP7, _actionTabs$exerciseP8, delayedParams, v; - return _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - _context2.next = 2; - return form.validateFields(); - case 2: - formValue = form.getFieldsValue(); - setIsLoading(true); - if (!((actionTabs === null || actionTabs === void 0 || (_actionTabs$exerciseP3 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP3 === void 0 ? void 0 : _actionTabs$exerciseP3.ip_limit) !== 'no' || actionTabs !== null && actionTabs !== void 0 && (_actionTabs$exerciseP4 = actionTabs.exerciseParams) !== null && _actionTabs$exerciseP4 !== void 0 && _actionTabs$exerciseP4.ip_bind)) { - _context2.next = 7; - break; - } - _context2.next = 7; - return getLocalIp(); - case 7: - _context2.next = 9; - return (0,_service_exercise__WEBPACK_IMPORTED_MODULE_5__/* .unlockUser */ .ZD)(actionTabs === null || actionTabs === void 0 || (_actionTabs$exerciseP5 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP5 === void 0 ? void 0 : _actionTabs$exerciseP5.id, { - exercise_user_id: actionTabs === null || actionTabs === void 0 || (_actionTabs$exerciseP6 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP6 === void 0 ? void 0 : _actionTabs$exerciseP6.exercise_user_id, - unlock_key: formValue.unlock_key, - ip: localIpRef.current - }); - case 9: - unlockRes = _context2.sent; - if (!(unlockRes.status === 0)) { - _context2.next = 22; - break; - } - if (!successCb) { - _context2.next = 15; - break; - } - dispatch({ - type: 'exercise/setActionTabs', - payload: {} - }); - successCb(); - return _context2.abrupt("return"); - case 15: - if (!formValue.time) { - _context2.next = 19; - break; - } - delayedParams = { - time: moment__WEBPACK_IMPORTED_MODULE_6___default()(formValue.time).format("YYYY-MM-DD HH:mm"), - exercise_user_id: actionTabs === null || actionTabs === void 0 || (_actionTabs$exerciseP7 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP7 === void 0 ? void 0 : _actionTabs$exerciseP7.exercise_user_id, - id: actionTabs === null || actionTabs === void 0 || (_actionTabs$exerciseP8 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP8 === void 0 ? void 0 : _actionTabs$exerciseP8.id - }; - _context2.next = 19; - return (0,_service_exercise__WEBPACK_IMPORTED_MODULE_5__/* .delayedTime */ .qz)(delayedParams); - case 19: - v = actionTabs === null || actionTabs === void 0 ? void 0 : actionTabs.exerciseParams; - (0,_utils_util__WEBPACK_IMPORTED_MODULE_8__/* .startExercise */ .nr)({ - inner_ip: v.inner_ip, - public_ip: v.public_ip, - open_camera: v.open_camera, - ip_limit: v.ip_limit, - ip_bind: v.ip_bind, - exercise_tips: v.exercise_tips, - exerciseId: v.id, - screen_open: v.screen_open, - screen_num: v.screen_num, - screen_sec: v.screen_sec, - coursesId: params.coursesId, - login: (_userInfo = (0,_utils_authority__WEBPACK_IMPORTED_MODULE_10__/* .userInfo */ .eY)()) === null || _userInfo === void 0 ? void 0 : _userInfo.login, - history: history, - identity_verify: v.identity_verify, - open_phone_video_recording: v.open_phone_video_recording, - current_status: v.current_status - }); - dispatch({ - type: 'exercise/setActionTabs', - payload: {} - }); - case 22: - setIsLoading(false); - case 23: - case "end": - return _context2.stop(); - } - }, _callee2); - })); - return function handleOk() { - return _ref3.apply(this, arguments); - }; - }(); - var columns = [{ - title: 'IP地址', - dataIndex: 'ip', - key: 'ip', - render: function render(text) { - return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("span", { - className: text.indexOf("异常") > -1 ? 'c-red' : 'c-green', - children: text - }); - } - }, { - title: '浏览器', - dataIndex: 'browser', - key: 'browser', - render: function render(text) { - return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("span", { - className: text.indexOf("异常") > -1 ? 'c-red' : 'c-green', - children: text - }); - } - }, { - title: '上次登录时间', - dataIndex: 'last_login_time', - key: 'last_login_time' - }]; - var hasError5 = (actionTabs === null || actionTabs === void 0 || (_actionTabs$exerciseP9 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP9 === void 0 ? void 0 : _actionTabs$exerciseP9.errorMessage) && _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_typeof_js__WEBPACK_IMPORTED_MODULE_0___default()(actionTabs === null || actionTabs === void 0 || (_actionTabs$exerciseP10 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP10 === void 0 ? void 0 : _actionTabs$exerciseP10.errorMessage) === "object"; - return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.Fragment, { - children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z, { - width: 514, - centered: true, - closable: !!(actionTabs !== null && actionTabs !== void 0 && (_actionTabs$exerciseP11 = actionTabs.exerciseParams) !== null && _actionTabs$exerciseP11 !== void 0 && _actionTabs$exerciseP11.unlockClose), - maskClosable: false, - keyboard: false, - maskStyle: { - background: "#000" - }, - title: '提示', - open: exercise.actionTabs.key === 'student-unlock', - footer: null, - onCancel: function onCancel() { - dispatch({ - type: 'exercise/setActionTabs', - payload: {} - }); - }, - children: [hasError5 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("div", { - style: { - marginBottom: 16 - }, - children: "\u8BE5\u8D26\u53F7\u5DF2\u7ECF\u5B58\u5728\u5F02\u5E38\u60C5\u51B5\uFF0C\u82E5\u975E\u672C\u4EBA\u64CD\u4F5C\uFF0C\u8BF7\u8054\u7CFB\u76D1\u8003\u8001\u5E08\u8BF4\u660E\u60C5\u51B5\u3002 " - }), !hasError5 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("div", { - style: { - marginBottom: 16 - }, - children: "\u7CFB\u7EDF\u68C0\u6D4B\u5230\u60A8\u5728\u8003\u8BD5\u65F6\u4E2D\u9014\u9000\u51FA\uFF0C\u73B0\u5DF2\u5C06\u8003\u8BD5\u9501\u5B9A\u3002\u5982\u9700\u7EE7\u7EED\u8FDB\u884C\u8003\u8BD5\uFF0C \u8BF7\u5C3D\u5FEB\u8054\u7CFB\u8BFE\u5802\u8001\u5E08\u8FDB\u884C\u89E3\u9501\uFF01" - }), hasError5 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .Z, { - className: "mb20", - pagination: { - hideOnSinglePage: true - }, - dataSource: [(actionTabs === null || actionTabs === void 0 || (_actionTabs$exerciseP12 = actionTabs.exerciseParams) === null || _actionTabs$exerciseP12 === void 0 ? void 0 : _actionTabs$exerciseP12.errorMessage) || {}], - columns: columns - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("div", { - className: "", - children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, { - form: form, - layout: "vertical", - autoComplete: "off", - children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z.Item, { - label: "\u8003\u8BD5\u89E3\u9501\u7801", - name: "unlock_key", - rules: [{ - required: true, - message: '请输入考试解锁码' - }], - children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_16__/* ["default"] */ .Z.Password, { - autoComplete: "off", - placeholder: "\u8BF7\u8F93\u5165\u8003\u8BD5\u89E3\u9501\u7801", - visibilityToggle: false - }) - }) - }) - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_17__/* ["default"] */ .Z, { - justify: "space-between", - align: "middle", - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_18__/* ["default"] */ .Z, {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_18__/* ["default"] */ .Z, { - children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_19__/* ["default"] */ .ZP, { - loading: isLoading, - onClick: handleOk, - children: "\u8FDB\u5165\u8003\u8BD5" - }) - })] - })] - }) - }); -}; -/* harmony default export */ __webpack_exports__.Z = ((0,umi__WEBPACK_IMPORTED_MODULE_7__.connect)(function (_ref4) { - var exercise = _ref4.exercise; - return { - exercise: exercise - }; -})(Unlock)); - -/***/ }), - /***/ 8352: /*!***********************************************!*\ !*** ./src/pages/Demo/index.tsx + 15 modules ***! @@ -6881,65 +5293,6 @@ var Warehouse = function Warehouse(_ref) { /***/ }), -/***/ 48988: -/*!**************************************************!*\ - !*** ./src/pages/MoopCases/FormPanel/service.ts ***! - \**************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ $J: function() { return /* binding */ getMoopCase; }, -/* harmony export */ JZ: function() { return /* binding */ removeAttachment; }, -/* harmony export */ bN: function() { return /* binding */ updateMoopCase; }, -/* harmony export */ jP: function() { return /* binding */ addMoopCase; }, -/* harmony export */ rO: function() { return /* binding */ getLibraryTags; } -/* harmony export */ }); -/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js */ 10574); -/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js */ 39343); -/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/utils/fetch */ 4781); - - - -function getMoopCase(id) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_2__/* .get */ .U2)("libraries/".concat(id, ".json")); -} -function getLibraryTags() { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_2__/* .get */ .U2)('library_tags.json'); -} -function removeAttachment(_x) { - return _removeAttachment.apply(this, arguments); -} -function _removeAttachment() { - _removeAttachment = _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee(id) { - var response; - return _root_workspace_ppte5yg23_local_v9_test3_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_2__/* .del */ .IV)("attachments/".concat(id, ".json")); - case 2: - response = _context.sent; - return _context.abrupt("return", response.status === 0); - case 4: - case "end": - return _context.stop(); - } - }, _callee); - })); - return _removeAttachment.apply(this, arguments); -} -function addMoopCase(params) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_2__/* .post */ .v_)("libraries.json", params); -} -function updateMoopCase(id, params) { - return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_2__/* .put */ .gz)("libraries/".concat(id, ".json"), params); -} - -/***/ }), - /***/ 99497: /*!**************************************************************************************************!*\ !*** ./src/pages/Shixuns/Detail/Repository/components/SelectFilePathModal/index.tsx + 1 modules ***! diff --git a/umi.js b/umi.js index 5ac08b91a0..038280eb42 100644 --- a/umi.js +++ b/umi.js @@ -130034,19 +130034,19 @@ function _getRoutes() { return __webpack_require__.e(/*! import() */ 97539).then(__webpack_require__.bind(__webpack_require__, /*! ./EmptyRoute */ 97539)); }), '287': /*#__PURE__*/_react_17_0_2_react.lazy(function () { - return Promise.all(/*! import() | p__tasks__index */[__webpack_require__.e(28647), __webpack_require__.e(84728), __webpack_require__.e(6848), __webpack_require__.e(46573), __webpack_require__.e(1643), __webpack_require__.e(50812), __webpack_require__.e(96232), __webpack_require__.e(24665), __webpack_require__.e(28485), __webpack_require__.e(88652), __webpack_require__.e(20834), __webpack_require__.e(91857), __webpack_require__.e(5112), __webpack_require__.e(78241), __webpack_require__.e(41867), __webpack_require__.e(78782), __webpack_require__.e(89868), __webpack_require__.e(27695), __webpack_require__.e(59981), __webpack_require__.e(36775), __webpack_require__.e(11561), __webpack_require__.e(72315), __webpack_require__.e(96411), __webpack_require__.e(85731), __webpack_require__.e(93948), __webpack_require__.e(6557), __webpack_require__.e(23255), __webpack_require__.e(2360), __webpack_require__.e(99313), __webpack_require__.e(56156), __webpack_require__.e(75149), __webpack_require__.e(21560), __webpack_require__.e(12911), __webpack_require__.e(98694), __webpack_require__.e(15192), __webpack_require__.e(19025), __webpack_require__.e(82791), __webpack_require__.e(55351), __webpack_require__.e(43750), __webpack_require__.e(53114), __webpack_require__.e(18524), __webpack_require__.e(6592), __webpack_require__.e(44381), __webpack_require__.e(93665)]).then(__webpack_require__.bind(__webpack_require__, /*! @/pages/tasks/index.jsx */ 70904)); + return Promise.all(/*! import() | p__tasks__index */[__webpack_require__.e(28647), __webpack_require__.e(84728), __webpack_require__.e(6848), __webpack_require__.e(46573), __webpack_require__.e(1643), __webpack_require__.e(50812), __webpack_require__.e(96232), __webpack_require__.e(24665), __webpack_require__.e(28485), __webpack_require__.e(88652), __webpack_require__.e(20834), __webpack_require__.e(91857), __webpack_require__.e(5112), __webpack_require__.e(78241), __webpack_require__.e(41867), __webpack_require__.e(78782), __webpack_require__.e(89868), __webpack_require__.e(27695), __webpack_require__.e(59981), __webpack_require__.e(36775), __webpack_require__.e(11561), __webpack_require__.e(72315), __webpack_require__.e(96411), __webpack_require__.e(85731), __webpack_require__.e(93948), __webpack_require__.e(6557), __webpack_require__.e(23255), __webpack_require__.e(2360), __webpack_require__.e(99313), __webpack_require__.e(56156), __webpack_require__.e(75149), __webpack_require__.e(21560), __webpack_require__.e(12911), __webpack_require__.e(98694), __webpack_require__.e(15192), __webpack_require__.e(19025), __webpack_require__.e(82791), __webpack_require__.e(55351), __webpack_require__.e(43750), __webpack_require__.e(53114), __webpack_require__.e(18524), __webpack_require__.e(6592), __webpack_require__.e(57331), __webpack_require__.e(93665)]).then(__webpack_require__.bind(__webpack_require__, /*! @/pages/tasks/index.jsx */ 70904)); }), '288': /*#__PURE__*/_react_17_0_2_react.lazy(function () { - return Promise.all(/*! import() | p__tasks__Jupyter__index */[__webpack_require__.e(28647), __webpack_require__.e(84728), __webpack_require__.e(6848), __webpack_require__.e(46573), __webpack_require__.e(1643), __webpack_require__.e(89868), __webpack_require__.e(59981), __webpack_require__.e(36775), __webpack_require__.e(96411), __webpack_require__.e(93948), __webpack_require__.e(6557), __webpack_require__.e(43428), __webpack_require__.e(15192), __webpack_require__.e(68719), __webpack_require__.e(4977), __webpack_require__.e(82791), __webpack_require__.e(32666), __webpack_require__.e(55351), __webpack_require__.e(53114), __webpack_require__.e(18524), __webpack_require__.e(81882), __webpack_require__.e(44381), __webpack_require__.e(20700)]).then(__webpack_require__.bind(__webpack_require__, /*! @/pages/tasks/Jupyter/index.tsx */ 85989)); + return Promise.all(/*! import() | p__tasks__Jupyter__index */[__webpack_require__.e(28647), __webpack_require__.e(84728), __webpack_require__.e(6848), __webpack_require__.e(46573), __webpack_require__.e(1643), __webpack_require__.e(50812), __webpack_require__.e(96232), __webpack_require__.e(24665), __webpack_require__.e(28485), __webpack_require__.e(88652), __webpack_require__.e(20834), __webpack_require__.e(91857), __webpack_require__.e(5112), __webpack_require__.e(78241), __webpack_require__.e(41867), __webpack_require__.e(78782), __webpack_require__.e(89868), __webpack_require__.e(27695), __webpack_require__.e(59981), __webpack_require__.e(36775), __webpack_require__.e(11561), __webpack_require__.e(72315), __webpack_require__.e(96411), __webpack_require__.e(93948), __webpack_require__.e(6557), __webpack_require__.e(43428), __webpack_require__.e(15192), __webpack_require__.e(4977), __webpack_require__.e(82791), __webpack_require__.e(55351), __webpack_require__.e(53114), __webpack_require__.e(18524), __webpack_require__.e(57331), __webpack_require__.e(20700)]).then(__webpack_require__.bind(__webpack_require__, /*! @/pages/tasks/Jupyter/index.tsx */ 7575)); }), '289': /*#__PURE__*/_react_17_0_2_react.lazy(function () { - return Promise.all(/*! import() | p__tasks__index */[__webpack_require__.e(28647), __webpack_require__.e(84728), __webpack_require__.e(6848), __webpack_require__.e(46573), __webpack_require__.e(1643), __webpack_require__.e(50812), __webpack_require__.e(96232), __webpack_require__.e(24665), __webpack_require__.e(28485), __webpack_require__.e(88652), __webpack_require__.e(20834), __webpack_require__.e(91857), __webpack_require__.e(5112), __webpack_require__.e(78241), __webpack_require__.e(41867), __webpack_require__.e(78782), __webpack_require__.e(89868), __webpack_require__.e(27695), __webpack_require__.e(59981), __webpack_require__.e(36775), __webpack_require__.e(11561), __webpack_require__.e(72315), __webpack_require__.e(96411), __webpack_require__.e(85731), __webpack_require__.e(93948), __webpack_require__.e(6557), __webpack_require__.e(23255), __webpack_require__.e(2360), __webpack_require__.e(99313), __webpack_require__.e(56156), __webpack_require__.e(75149), __webpack_require__.e(21560), __webpack_require__.e(12911), __webpack_require__.e(98694), __webpack_require__.e(15192), __webpack_require__.e(19025), __webpack_require__.e(82791), __webpack_require__.e(55351), __webpack_require__.e(43750), __webpack_require__.e(53114), __webpack_require__.e(18524), __webpack_require__.e(6592), __webpack_require__.e(44381), __webpack_require__.e(93665)]).then(__webpack_require__.bind(__webpack_require__, /*! @/pages/tasks/index.jsx */ 70904)); + return Promise.all(/*! import() | p__tasks__index */[__webpack_require__.e(28647), __webpack_require__.e(84728), __webpack_require__.e(6848), __webpack_require__.e(46573), __webpack_require__.e(1643), __webpack_require__.e(50812), __webpack_require__.e(96232), __webpack_require__.e(24665), __webpack_require__.e(28485), __webpack_require__.e(88652), __webpack_require__.e(20834), __webpack_require__.e(91857), __webpack_require__.e(5112), __webpack_require__.e(78241), __webpack_require__.e(41867), __webpack_require__.e(78782), __webpack_require__.e(89868), __webpack_require__.e(27695), __webpack_require__.e(59981), __webpack_require__.e(36775), __webpack_require__.e(11561), __webpack_require__.e(72315), __webpack_require__.e(96411), __webpack_require__.e(85731), __webpack_require__.e(93948), __webpack_require__.e(6557), __webpack_require__.e(23255), __webpack_require__.e(2360), __webpack_require__.e(99313), __webpack_require__.e(56156), __webpack_require__.e(75149), __webpack_require__.e(21560), __webpack_require__.e(12911), __webpack_require__.e(98694), __webpack_require__.e(15192), __webpack_require__.e(19025), __webpack_require__.e(82791), __webpack_require__.e(55351), __webpack_require__.e(43750), __webpack_require__.e(53114), __webpack_require__.e(18524), __webpack_require__.e(6592), __webpack_require__.e(57331), __webpack_require__.e(93665)]).then(__webpack_require__.bind(__webpack_require__, /*! @/pages/tasks/index.jsx */ 70904)); }), '290': /*#__PURE__*/_react_17_0_2_react.lazy(function () { - return Promise.all(/*! import() | p__tasks__Jupyter__index */[__webpack_require__.e(28647), __webpack_require__.e(84728), __webpack_require__.e(6848), __webpack_require__.e(46573), __webpack_require__.e(1643), __webpack_require__.e(89868), __webpack_require__.e(59981), __webpack_require__.e(36775), __webpack_require__.e(96411), __webpack_require__.e(93948), __webpack_require__.e(6557), __webpack_require__.e(43428), __webpack_require__.e(15192), __webpack_require__.e(68719), __webpack_require__.e(4977), __webpack_require__.e(82791), __webpack_require__.e(32666), __webpack_require__.e(55351), __webpack_require__.e(53114), __webpack_require__.e(18524), __webpack_require__.e(81882), __webpack_require__.e(44381), __webpack_require__.e(20700)]).then(__webpack_require__.bind(__webpack_require__, /*! @/pages/tasks/Jupyter/index.tsx */ 85989)); + return Promise.all(/*! import() | p__tasks__Jupyter__index */[__webpack_require__.e(28647), __webpack_require__.e(84728), __webpack_require__.e(6848), __webpack_require__.e(46573), __webpack_require__.e(1643), __webpack_require__.e(50812), __webpack_require__.e(96232), __webpack_require__.e(24665), __webpack_require__.e(28485), __webpack_require__.e(88652), __webpack_require__.e(20834), __webpack_require__.e(91857), __webpack_require__.e(5112), __webpack_require__.e(78241), __webpack_require__.e(41867), __webpack_require__.e(78782), __webpack_require__.e(89868), __webpack_require__.e(27695), __webpack_require__.e(59981), __webpack_require__.e(36775), __webpack_require__.e(11561), __webpack_require__.e(72315), __webpack_require__.e(96411), __webpack_require__.e(93948), __webpack_require__.e(6557), __webpack_require__.e(43428), __webpack_require__.e(15192), __webpack_require__.e(4977), __webpack_require__.e(82791), __webpack_require__.e(55351), __webpack_require__.e(53114), __webpack_require__.e(18524), __webpack_require__.e(57331), __webpack_require__.e(20700)]).then(__webpack_require__.bind(__webpack_require__, /*! @/pages/tasks/Jupyter/index.tsx */ 7575)); }), '291': /*#__PURE__*/_react_17_0_2_react.lazy(function () { - return Promise.all(/*! import() | p__tasks__index */[__webpack_require__.e(28647), __webpack_require__.e(84728), __webpack_require__.e(6848), __webpack_require__.e(46573), __webpack_require__.e(1643), __webpack_require__.e(50812), __webpack_require__.e(96232), __webpack_require__.e(24665), __webpack_require__.e(28485), __webpack_require__.e(88652), __webpack_require__.e(20834), __webpack_require__.e(91857), __webpack_require__.e(5112), __webpack_require__.e(78241), __webpack_require__.e(41867), __webpack_require__.e(78782), __webpack_require__.e(89868), __webpack_require__.e(27695), __webpack_require__.e(59981), __webpack_require__.e(36775), __webpack_require__.e(11561), __webpack_require__.e(72315), __webpack_require__.e(96411), __webpack_require__.e(85731), __webpack_require__.e(93948), __webpack_require__.e(6557), __webpack_require__.e(23255), __webpack_require__.e(2360), __webpack_require__.e(99313), __webpack_require__.e(56156), __webpack_require__.e(75149), __webpack_require__.e(21560), __webpack_require__.e(12911), __webpack_require__.e(98694), __webpack_require__.e(15192), __webpack_require__.e(19025), __webpack_require__.e(82791), __webpack_require__.e(55351), __webpack_require__.e(43750), __webpack_require__.e(53114), __webpack_require__.e(18524), __webpack_require__.e(6592), __webpack_require__.e(44381), __webpack_require__.e(93665)]).then(__webpack_require__.bind(__webpack_require__, /*! @/pages/tasks/index.jsx */ 70904)); + return Promise.all(/*! import() | p__tasks__index */[__webpack_require__.e(28647), __webpack_require__.e(84728), __webpack_require__.e(6848), __webpack_require__.e(46573), __webpack_require__.e(1643), __webpack_require__.e(50812), __webpack_require__.e(96232), __webpack_require__.e(24665), __webpack_require__.e(28485), __webpack_require__.e(88652), __webpack_require__.e(20834), __webpack_require__.e(91857), __webpack_require__.e(5112), __webpack_require__.e(78241), __webpack_require__.e(41867), __webpack_require__.e(78782), __webpack_require__.e(89868), __webpack_require__.e(27695), __webpack_require__.e(59981), __webpack_require__.e(36775), __webpack_require__.e(11561), __webpack_require__.e(72315), __webpack_require__.e(96411), __webpack_require__.e(85731), __webpack_require__.e(93948), __webpack_require__.e(6557), __webpack_require__.e(23255), __webpack_require__.e(2360), __webpack_require__.e(99313), __webpack_require__.e(56156), __webpack_require__.e(75149), __webpack_require__.e(21560), __webpack_require__.e(12911), __webpack_require__.e(98694), __webpack_require__.e(15192), __webpack_require__.e(19025), __webpack_require__.e(82791), __webpack_require__.e(55351), __webpack_require__.e(43750), __webpack_require__.e(53114), __webpack_require__.e(18524), __webpack_require__.e(6592), __webpack_require__.e(57331), __webpack_require__.e(93665)]).then(__webpack_require__.bind(__webpack_require__, /*! @/pages/tasks/index.jsx */ 70904)); }), '292': /*#__PURE__*/_react_17_0_2_react.lazy(function () { return __webpack_require__.e(/*! import() */ 97539).then(__webpack_require__.bind(__webpack_require__, /*! ./EmptyRoute */ 97539));