(self["webpackChunk"] = self["webpackChunk"] || []).push([[14058,15569,12312,54747,73168,18080,38177,47256,85081,53555,64802,34668,54512,52312,21105],{ /***/ 98915: /*!***********************************************************************************************************!*\ !*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules ***! \***********************************************************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { Z: function() { return /* binding */ icons_ArrowDownOutlined; } }); // 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/ArrowDownOutlined.js // This icon file is generated automatically. var ArrowDownOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z" } }] }, "name": "arrow-down", "theme": "outlined" }; /* harmony default export */ var asn_ArrowDownOutlined = (ArrowDownOutlined); // 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/ArrowDownOutlined.js // GENERATE BY ./scripts/generate.ts // DON NOT EDIT IT MANUALLY var ArrowDownOutlined_ArrowDownOutlined = function ArrowDownOutlined(props, ref) { return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { ref: ref, icon: asn_ArrowDownOutlined })); }; if (false) {} /* harmony default export */ var icons_ArrowDownOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(ArrowDownOutlined_ArrowDownOutlined)); /***/ }), /***/ 80045: /*!*******************************************************************************************************************!*\ !*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ExclamationCircleOutlined.js + 1 modules ***! \*******************************************************************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { Z: function() { return /* binding */ icons_ExclamationCircleOutlined; } }); // 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/ExclamationCircleOutlined.js // This icon file is generated automatically. var ExclamationCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z" } }] }, "name": "exclamation-circle", "theme": "outlined" }; /* harmony default export */ var asn_ExclamationCircleOutlined = (ExclamationCircleOutlined); // 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/ExclamationCircleOutlined.js // GENERATE BY ./scripts/generate.ts // DON NOT EDIT IT MANUALLY var ExclamationCircleOutlined_ExclamationCircleOutlined = function ExclamationCircleOutlined(props, ref) { return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { ref: ref, icon: asn_ExclamationCircleOutlined })); }; if (false) {} /* harmony default export */ var icons_ExclamationCircleOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(ExclamationCircleOutlined_ExclamationCircleOutlined)); /***/ }), /***/ 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)); /***/ }), /***/ 80354: /*!************************************************************************************************************!*\ !*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/FolderOpenOutlined.js + 1 modules ***! \************************************************************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { Z: function() { return /* binding */ icons_FolderOpenOutlined; } }); // 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/FolderOpenOutlined.js // This icon file is generated automatically. var FolderOpenOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z" } }] }, "name": "folder-open", "theme": "outlined" }; /* harmony default export */ var asn_FolderOpenOutlined = (FolderOpenOutlined); // 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/FolderOpenOutlined.js // GENERATE BY ./scripts/generate.ts // DON NOT EDIT IT MANUALLY var FolderOpenOutlined_FolderOpenOutlined = function FolderOpenOutlined(props, ref) { return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { ref: ref, icon: asn_FolderOpenOutlined })); }; if (false) {} /* harmony default export */ var icons_FolderOpenOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(FolderOpenOutlined_FolderOpenOutlined)); /***/ }), /***/ 60274: /*!******************************************!*\ !*** ./src/pages/tasks/service/index.js ***! \******************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; /* 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_SJ5m_develop_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_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_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_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_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_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_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; } console.log(urlParamsAll, urlParams, 'urlParamsAll'); function fetchTaskInfo(id, params) { return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* .get */ .U2)("tasks/".concat(id, ".json"), _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, params), 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_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_SJ5m_develop_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_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_SJ5m_develop_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_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_SJ5m_develop_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_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_SJ5m_develop_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_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_SJ5m_develop_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_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_SJ5m_develop_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_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_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_SJ5m_develop_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_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_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_SJ5m_develop_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_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_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_SJ5m_develop_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 }); } /***/ }), /***/ 31917: /*!*****************************************!*\ !*** ./src/components/NoData/index.tsx ***! \*****************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_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_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_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_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_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_SJ5m_develop_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_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_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); /***/ }), /***/ 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 + 4 modules var monaco_editor = __webpack_require__(3878); // 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 + 1 modules var env = __webpack_require__(26078); // 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; 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; 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; } var getFileExtension = function getFileExtension(url) { var filename = url.substring(url.lastIndexOf('/') + 1); var extension = filename.split('.').pop(); return extension; }; 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") { if (data.indexOf("bigfilescdn.") > -1) { setOfficeData({ url: data, fileType: getFileExtension(data), model: data.indexOf("model=edit") ? "edit" : "view" }); } else { 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; res.url = apiServer + res.url; setOfficeData(res); case 9: 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)); }; 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)(jsx_runtime.Fragment, { children: /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, objectSpread2_default()({}, monacoEditor)) }) }), type === "audio" && /*#__PURE__*/(0,jsx_runtime.jsx)("audio", { src: "".concat(((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.indexOf("http://")) > -1 || ((_data3 = data) === null || _data3 === void 0 ? void 0 : _data3.indexOf("https://")) > -1 ? "" : "data:audio/mp3;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 ? /*#__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(btoa(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: "".concat(((_data5 = data) === null || _data5 === void 0 ? void 0 : _data5.indexOf("http://")) > -1 || ((_data6 = data) === null || _data6 === void 0 ? void 0 : _data6.indexOf("https://")) > -1 ? "" : "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"] }) })] }); }); /***/ }), /***/ 9746: /*!*************************************************************!*\ !*** ./src/components/markdown-editor/code-block/index.tsx ***! \*************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ h: function() { return /* binding */ MyCodeMirror; } /* harmony export */ }); /* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_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_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js */ 11006); /* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 59301); /* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! antd */ 57809); /* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! antd */ 78241); /* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! antd */ 3113); /* harmony import */ var codemirror__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! codemirror */ 89780); /* harmony import */ var codemirror__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(codemirror__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var codemirror_lib_codemirror_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! codemirror/lib/codemirror.css */ 89835); /* harmony import */ var codemirror_theme_blackboard_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! codemirror/theme/blackboard.css */ 49744); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react/jsx-runtime */ 37712); var Option = antd__WEBPACK_IMPORTED_MODULE_7__["default"].Option; //https://github.com/codemirror/CodeMirror/issues/4838 var formItemLayout = { labelCol: { span: 4 }, wrapperCol: { span: 20 } }; var LanguageDesc = { asp: ['ASP', 'vbscript'], actionscript: ['ActionScript(3.0)/Flash/Flex', 'clike'], bash: ['Bash/Bat', 'shell'], css: ['CSS', 'css'], c: ['C', 'clike'], cpp: ['C++', 'clike'], csharp: ['C#', 'clike'], coffeescript: ['CoffeeScript', 'coffeescript'], d: ['D', 'd'], dart: ['Dart', 'dart'], delphi: ['Delphi/Pascal', 'pascal'], erlang: ['Erlang', 'erlang'], go: ['Golang', 'go'], groovy: ['Groovy', 'groovy'], html: ['HTML', 'text/html'], java: ['Java', 'clike'], json: ['JSON', 'text/json'], javascript: ['Javascript', 'javascript'], lua: ['Lua', 'lua'], less: ['LESS', 'css'], markdown: ['Markdown', 'gfm'], 'objective-c': ['Objective-C', 'clike'], php: ['PHP', 'php'], perl: ['Perl', 'perl'], python: ['Python', 'python'], r: ['R', 'r'], rst: ['reStructedText', 'rst'], ruby: ['Ruby', 'ruby'], sql: ['SQL', 'sql'], sass: ['SASS/SCSS', 'sass'], shell: ['Shell', 'shell'], scala: ['Scala', 'clike'], swift: ['Swift', 'clike'], vb: ['VB/VBScript', 'vb'], xml: ['XML', 'text/xml'], yaml: ['YAML', 'yaml'] }; /* harmony default export */ __webpack_exports__.Z = (function (_ref) { var callback = _ref.callback, onCancel = _ref.onCancel; var _useState = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)('python'), _useState2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1___default()(_useState, 2), mode = _useState2[0], setMode = _useState2[1]; function onSetMode(value) { setMode(LanguageDesc[value][1]); } function onSubmit(values) { callback(values); } return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, formItemLayout), {}, { className: "code-block-panel", initialValues: { language: 'python', content: '' }, onFinish: onSubmit, children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(antd__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z.Item, { label: "\u4EE3\u7801\u8BED\u8A00", name: "language", children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(antd__WEBPACK_IMPORTED_MODULE_7__["default"], { getPopupContainer: function getPopupContainer(trigger) { return trigger.parentNode; }, onChange: onSetMode, children: Object.keys(LanguageDesc).map(function (item) { return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(Option, { value: item, children: LanguageDesc[item][0] }, item); }) }) }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(antd__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z.Item, { label: "\u4EE3\u7801\u5185\u5BB9", name: "content", rules: [{ required: true, message: '请输入代码内容' }], children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(MyCodeMirror, { mode: mode }) }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)("div", { className: "flex-container flex-end", children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(antd__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP, { type: "primary", htmlType: "submit", style: { marginRight: 10 }, children: "\u786E\u5B9A" }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(antd__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP, { type: "ghost", onClick: onCancel, children: "\u53D6\u6D88" })] })] })); }); function MyCodeMirror(_ref2) { var value = _ref2.value, onChange = _ref2.onChange, mode = _ref2.mode, _ref2$options = _ref2.options, options = _ref2$options === void 0 ? {} : _ref2$options; var el = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(); var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(), _useState4 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1___default()(_useState3, 2), cm = _useState4[0], setCm = _useState4[1]; (0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () { if (cm) { var onChangeHandler = function onChangeHandler(cm) { var content = cm.getValue(); onChange && onChange(content); }; cm.on('change', onChangeHandler); return function () { cm.off('change', onChangeHandler); }; } }, [cm, onChange]); (0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () { if (cm) { cm.setOption('mode', mode); } }, [cm, mode]); (0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () { if (cm) { if (value !== cm.getValue() || value === '') { setTimeout(function () { cm.setValue(value || ''); }, 300); } } }, [cm, value]); (0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () { if (el.current && !cm) { var instance = codemirror__WEBPACK_IMPORTED_MODULE_3___default().fromTextArea(el.current, _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({ mode: mode, lineNumbers: true, lineWrapping: true, autoCloseBrackets: true, tabSize: 4, autofocus: true, autoCloseTags: true, matchBrackets: true, styleActiveLine: true }, options)); setCm(instance); } }, [el.current, cm]); return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("div", { className: "my-codemirror-container", children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("textarea", { ref: el }) }); } /***/ }), /***/ 8352: /*!***********************************************!*\ !*** ./src/pages/Demo/index.tsx + 15 modules ***! \***********************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": function() { return /* binding */ Demo; } }); // 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/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: ./src/utils/fullscreen.ts var fullscreen = __webpack_require__(57616); // EXTERNAL MODULE: ./src/utils/fetch.ts var fetch = __webpack_require__(4781); // EXTERNAL MODULE: ./src/utils/util.tsx var util = __webpack_require__(87885); ;// CONCATENATED MODULE: ./src/pages/Demo/index.less?modules // extracted by mini-css-extract-plugin /* harmony default export */ var Demomodules = ({"flex_box_center":"flex_box_center___Ev3CJ","flex_space_between":"flex_space_between____62qx","flex_box_vertical_center":"flex_box_vertical_center___uaibF","flex_box_center_end":"flex_box_center_end___IccdO","flex_box_column":"flex_box_column___rYhKw","wrap":"wrap___d2dw2","full":"full___aj305"}); // 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/slicedToArray.js var slicedToArray = __webpack_require__(11006); var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectWithoutProperties.js var objectWithoutProperties = __webpack_require__(27161); var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties); ;// CONCATENATED MODULE: ./src/pages/Demo/Warehouse/index.less?modules // extracted by mini-css-extract-plugin /* harmony default export */ var Warehousemodules = ({"flex_box_center":"flex_box_center___UTKCA","flex_space_between":"flex_space_between___vtxee","flex_box_vertical_center":"flex_box_vertical_center___uUC4R","flex_box_center_end":"flex_box_center_end___LS055","flex_box_column":"flex_box_column___hjR5l","menu":"menu___FPo7c","warehouse":"warehouse___QWVPT","header":"header___wP5Hx","title":"title___T5yXM","content":"content___w0dAS","left":"left___xZRzx","close":"close___KBRyH","right":"right___v5JXP","loading":"loading___SunBf","empty":"empty___dvPGr","tabs":"tabs___zD__Z","line":"line___VNd7N","footer":"footer___Yx5nS","commit":"commit___Ui8A5","blueLight":"blueLight___ETo3e","filePathWrp":"filePathWrp___qeMMR","filePath":"filePath___tc_hQ","bottom0":"bottom0___tgeX3"}); // EXTERNAL MODULE: ./src/.umi-production/exports.ts + 8 modules var _umi_production_exports = __webpack_require__(7181); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tabs/index.js + 24 modules var tabs = __webpack_require__(99313); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules var tooltip = __webpack_require__(6848); // 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/menu/index.js + 11 modules var es_menu = __webpack_require__(20834); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/spin/index.js + 1 modules var spin = __webpack_require__(71418); // 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/modal/index.js + 16 modules var modal = __webpack_require__(43418); // 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: ./src/pages/tasks/service/index.js var service = __webpack_require__(60274); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tree/index.js + 8 modules var tree = __webpack_require__(51218); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/index.js + 1 modules var dropdown = __webpack_require__(38854); // 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: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules var es_form = __webpack_require__(78241); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules var input = __webpack_require__(1056); ;// CONCATENATED MODULE: ./src/pages/Demo/Warehouse/components/AddFile.less?modules // extracted by mini-css-extract-plugin /* harmony default export */ var AddFilemodules = ({"wrap":"wrap___SO6Mn","modal":"modal___zNd_3","title":"title___EX56C","path":"path___IqyHA","colorBlue":"colorBlue___MSdA7","width240":"width240___mU1C0","filePath":"filePath___v0Tze"}); // EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js var jsx_runtime = __webpack_require__(37712); ;// CONCATENATED MODULE: ./src/pages/Demo/Warehouse/components/AddFolder.tsx var _excluded = ["shixunsDetail", "globalSetting", "loading", "user", "dispatch", "taskData", "isRepository"]; var AddFile = function AddFile(_ref) { var shixunsDetail = _ref.shixunsDetail, globalSetting = _ref.globalSetting, loading = _ref.loading, user = _ref.user, dispatch = _ref.dispatch, taskData = _ref.taskData, isRepository = _ref.isRepository, props = objectWithoutProperties_default()(_ref, _excluded); var location = (0,_umi_production_exports.useLocation)(); var params = objectSpread2_default()(objectSpread2_default()({}, (0,_umi_production_exports.useParams)()), (0,_umi_production_exports.useLocation)().query); var _useState = (0,_react_17_0_2_react.useState)({}), _useState2 = slicedToArray_default()(_useState, 2), formValue = _useState2[0], setFormValue = _useState2[1]; var shixunId = (0,_react_17_0_2_react.useRef)(); var _Form$useForm = es_form/* default */.Z.useForm(), _Form$useForm2 = slicedToArray_default()(_Form$useForm, 1), form = _Form$useForm2[0]; var _useState3 = (0,_react_17_0_2_react.useState)(''), _useState4 = slicedToArray_default()(_useState3, 2), filePath = _useState4[0], setFilePath = _useState4[1]; (0,_react_17_0_2_react.useEffect)(function () { if (props.visible) { form.resetFields(); } }, [props.visible]); (0,_react_17_0_2_react.useEffect)(function () { var pathArray = sessionStorage.getItem('pathArray'); if (pathArray) { // 拼接成绝对路径 var joinPath = pathArray.split(',').join('/'); var path = joinPath.indexOf('/') === 0 ? joinPath.substr(1) : joinPath; setFilePath(path); } }, []); (0,_react_17_0_2_react.useEffect)(function () { var _location$pathname; shixunId.current = (_location$pathname = location.pathname) === null || _location$pathname === void 0 || (_location$pathname = _location$pathname.split('/')) === null || _location$pathname === void 0 ? void 0 : _location$pathname[2]; }, []); var handleFinish = /*#__PURE__*/function () { var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() { var values, res, _args = arguments; return regeneratorRuntime_default()().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: values = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}; _context.next = 3; return dispatch({ type: 'shixunsDetail/addRepositoryFile', payload: { id: taskData.myshixun.identifier, message: values.commitMessage, content: '', path: (!!props.defaultPath ? props.defaultPath + "/" : "") + values.path + '/' + (values.file || '.gitkeep'), secret_repository: isRepository ? undefined : true } }); case 3: res = _context.sent; if ((res === null || res === void 0 ? void 0 : res.status) === 0) { message/* default */.ZP.success("添加成功"); props.onOK({ path: (!!props.defaultPath ? props.defaultPath + "/" : "") + values.path + '/' + (values.file || '.gitkeep'), name: values.path.split("/")[values.path.split("/").length - 1] }); props.onClose(); } case 5: case "end": return _context.stop(); } }, _callee); })); return function handleFinish() { return _ref2.apply(this, arguments); }; }(); var handleReturn = function handleReturn() { var _location$pathname2; _umi_production_exports.history.push("/shixuns/".concat(shixunId.current, "/").concat((_location$pathname2 = location.pathname) === null || _location$pathname2 === void 0 || (_location$pathname2 = _location$pathname2.split('/')) === null || _location$pathname2 === void 0 ? void 0 : _location$pathname2[3]).concat(filePath ? "/master/shixun_show/".concat(filePath) : "")); }; return /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, { width: "60%", centered: true, open: props.visible, wrapClassName: AddFilemodules.modal, onOk: function onOk() { form.submit(); }, onCancel: props.onClose, title: "\u65B0\u5EFA\u6587\u4EF6\u5939", children: /*#__PURE__*/(0,jsx_runtime.jsx)("section", { className: AddFilemodules.bg, children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", { className: AddFilemodules.wrap, children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, { className: "mt10", form: form, scrollToFirstError: true, layout: "vertical", onFinish: handleFinish, onChange: function onChange() { var _value$path, _value$file, _arr$filter, _arr2$filter; var value = objectSpread2_default()({}, form.getFieldsValue()); var arr = value === null || value === void 0 || (_value$path = value.path) === null || _value$path === void 0 ? void 0 : _value$path.split(""); var arr2 = value === null || value === void 0 || (_value$file = value.file) === null || _value$file === void 0 ? void 0 : _value$file.split(""); if (!!(arr !== null && arr !== void 0 && (_arr$filter = arr.filter(function (item) { return item == "/"; })) !== null && _arr$filter !== void 0 && _arr$filter.length)) { value.path = value.path.substring(0, value.path.length - 1); } if (!!(arr2 !== null && arr2 !== void 0 && (_arr2$filter = arr2.filter(function (item) { return item == "/"; })) !== null && _arr2$filter !== void 0 && _arr2$filter.length)) { value.file = value.file.substring(0, value.path.length - 1); } form.setFieldsValue(objectSpread2_default()({}, value)); setFormValue(value); } // onValuesChange={() => setFormValue({ ...form.getFieldsValue() })} , children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, { label: "\u6587\u4EF6\u5939\u540D\u79F0\uFF1A", name: "path", children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, { children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { className: AddFilemodules.filePath, children: props.defaultPath + "/" }) }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { flex: "1", children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, { name: "path", rules: [{ required: true, message: '请输入文件夹名称' }, { whitespace: true, message: '请勿输入空格' }], children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, { placeholder: "\u8BF7\u8F93\u5165\u6587\u4EF6\u5939\u540D\u79F0", size: 'middle' }) }) })] }) }), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, { label: "\u6587\u4EF6\u540D\u79F0\uFF1A", name: "file" // rules={[ // { required: true, message: '请输入文件名称' }, // { whitespace: true, message: '请勿输入空格' } // ]} , children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, { placeholder: "\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\uFF0C\u5982\u679C\u4E0D\u586B\u5199\u7CFB\u7EDF\u5C06\u5728\u6587\u4EF6\u5939\u4E0B\u521B\u5EFA.gitkeep\u7684\u9ED8\u8BA4\u6587\u4EF6", size: 'middle' }) }), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, { label: "\u63D0\u4EA4\u4FE1\u606F\uFF1A", name: "commitMessage", rules: [{ required: true, message: '请输入提交信息' }, { whitespace: true, message: '请勿输入空格' }], children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, { placeholder: "\u8BF7\u8F93\u5165\u672C\u6B21\u63D0\u4EA4\u7684\u4E3B\u8981\u4FE1\u606F\uFF0C\u5408\u7406\u7684\u63CF\u8FF0\u4FE1\u606F\u6709\u5229\u4E8E\u4EE3\u7801\u5386\u53F2\u8BB0\u5F55\u7684\u7BA1\u7406", size: 'middle' }) })] }) }) }) }); }; /* harmony default export */ var AddFolder = ((0,_umi_production_exports.connect)(function (_ref3) { var shixunsDetail = _ref3.shixunsDetail, loading = _ref3.loading, globalSetting = _ref3.globalSetting, user = _ref3.user; return { shixunsDetail: shixunsDetail, globalSetting: globalSetting, user: user, loading: loading.models.index }; })(AddFile)); // EXTERNAL MODULE: ./src/components/markdown-editor/code-block/index.tsx var code_block = __webpack_require__(9746); ;// CONCATENATED MODULE: ./src/pages/Demo/Warehouse/components/AddFile.tsx var AddFile_excluded = ["shixunsDetail", "globalSetting", "loading", "user", "taskData", "dispatch", "isRepository", "onClose"]; var AddFile_AddFile = function AddFile(_ref) { var shixunsDetail = _ref.shixunsDetail, globalSetting = _ref.globalSetting, loading = _ref.loading, user = _ref.user, taskData = _ref.taskData, dispatch = _ref.dispatch, isRepository = _ref.isRepository, onClose = _ref.onClose, props = objectWithoutProperties_default()(_ref, AddFile_excluded); var location = (0,_umi_production_exports.useLocation)(); var params = objectSpread2_default()(objectSpread2_default()({}, (0,_umi_production_exports.useParams)()), (0,_umi_production_exports.useLocation)().query); var _useState = (0,_react_17_0_2_react.useState)({}), _useState2 = slicedToArray_default()(_useState, 2), formValue = _useState2[0], setFormValue = _useState2[1]; var shixunId = (0,_react_17_0_2_react.useRef)(); var _Form$useForm = es_form/* default */.Z.useForm(), _Form$useForm2 = slicedToArray_default()(_Form$useForm, 1), form = _Form$useForm2[0]; var _useState3 = (0,_react_17_0_2_react.useState)(''), _useState4 = slicedToArray_default()(_useState3, 2), filePath = _useState4[0], setFilePath = _useState4[1]; (0,_react_17_0_2_react.useEffect)(function () { if (props.visible) { form.resetFields(); } }, [props.visible]); (0,_react_17_0_2_react.useEffect)(function () { var pathArray = sessionStorage.getItem('pathArray'); if (pathArray) { // 拼接成绝对路径 var joinPath = pathArray.split(',').join('/'); var path = joinPath.indexOf('/') === 0 ? joinPath.substr(1) : joinPath; setFilePath(path); } }, []); (0,_react_17_0_2_react.useEffect)(function () { var _location$pathname; shixunId.current = (_location$pathname = location.pathname) === null || _location$pathname === void 0 || (_location$pathname = _location$pathname.split('/')) === null || _location$pathname === void 0 ? void 0 : _location$pathname[2]; }, []); var handleFinish = /*#__PURE__*/function () { var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() { var values, res, _args = arguments; return regeneratorRuntime_default()().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: values = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}; _context.next = 3; return (0,service/* addMyRepositoryFile */.MI)({ // id: params.id, id: taskData.myshixun.identifier, message: values.commitMessage, content: values.codeMirror, path: (!!props.defaultPath ? props.defaultPath + "/" : "") + values.path, secret_repository: isRepository ? undefined : true }); case 3: res = _context.sent; if ((res === null || res === void 0 ? void 0 : res.status) === 0) { message/* default */.ZP.success("添加成功"); props.onOK({ path: (!!props.defaultPath ? props.defaultPath + "/" : "") + values.path, name: values.path.split("/")[values.path.split("/").length - 1] }); onClose(); // const returnUrl = isRepository.current ? // `/shixuns/${shixunId.current}/repository${filePath ? `/master/shixun_show/${filePath}` : ""}` : // `/shixuns/${shixunId.current}/secret_repository`; // history.replace(returnUrl); } case 5: case "end": return _context.stop(); } }, _callee); })); return function handleFinish() { return _ref2.apply(this, arguments); }; }(); var handleReturn = function handleReturn() { var _location$pathname2; _umi_production_exports.history.push("/shixuns/".concat(shixunId.current, "/").concat((_location$pathname2 = location.pathname) === null || _location$pathname2 === void 0 || (_location$pathname2 = _location$pathname2.split('/')) === null || _location$pathname2 === void 0 ? void 0 : _location$pathname2[3]).concat(filePath ? "/master/shixun_show/".concat(filePath) : "")); }; return /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, { width: "60%", open: props.visible, wrapClassName: AddFilemodules.modal, centered: true, onOk: function onOk() { form.submit(); }, onCancel: onClose, title: "\u65B0\u5EFA\u6587\u4EF6", children: /*#__PURE__*/(0,jsx_runtime.jsx)("section", { className: AddFilemodules.bg, children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", { className: AddFilemodules.wrap, children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, { className: "mt10", form: form, scrollToFirstError: true, layout: "vertical", onFinish: handleFinish, onChange: function onChange() { var _value$path, _arr$filter; var value = objectSpread2_default()({}, form.getFieldsValue()); var arr = value === null || value === void 0 || (_value$path = value.path) === null || _value$path === void 0 ? void 0 : _value$path.split(""); if ((arr === null || arr === void 0 || (_arr$filter = arr.filter(function (item) { return item == "/"; })) === null || _arr$filter === void 0 ? void 0 : _arr$filter.length) > 1) { value.path = value.path.substring(0, value.path.length - 1); } form.setFieldsValue(objectSpread2_default()({}, value)); setFormValue(value); }, children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, { label: "\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A", name: "path", children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, { children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { className: AddFilemodules.filePath, children: props.defaultPath + "/" }) }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { flex: "1", children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, { name: "path", rules: [{ required: true, message: '请输入文件名称' }, { whitespace: true, message: '请勿输入空格' }], children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, { placeholder: "\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0", size: 'middle' }) }) })] }) }), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, { label: "\u63D0\u4EA4\u4FE1\u606F\uFF1A", name: "commitMessage", rules: [{ required: true, message: '请输入提交信息' }, { whitespace: true, message: '请勿输入空格' }], children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, { placeholder: "\u8BF7\u8F93\u5165\u672C\u6B21\u63D0\u4EA4\u7684\u4E3B\u8981\u4FE1\u606F\uFF0C\u5408\u7406\u7684\u63CF\u8FF0\u4FE1\u606F\u6709\u5229\u4E8E\u4EE3\u7801\u5386\u53F2\u8BB0\u5F55\u7684\u7BA1\u7406", size: 'middle' }) }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", { className: "mt10 mb20", children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, { name: "codeMirror", label: "\u6587\u4EF6\u5185\u5BB9\uFF1A", rules: [{ required: true, message: '请输入文件内容' }], children: /*#__PURE__*/(0,jsx_runtime.jsx)(code_block/* MyCodeMirror */.h, { options: { modal: "javascript", lineNumbers: true, theme: "railscasts", indentUnit: 4, matchBrackets: true, autoRefresh: true, smartIndent: true, extraKeys: { "Alt-/": "autocomplete" }, autofocus: true, styleActiveLine: true, lint: true, linkurl: '', gutters: ["CodeMirror-linenumbers", "breakpoints", "CodeMirror-lint-markers"] } }) }) })] }) }) }) }); }; /* harmony default export */ var components_AddFile = ((0,_umi_production_exports.connect)(function (_ref3) { var shixunsDetail = _ref3.shixunsDetail, loading = _ref3.loading, globalSetting = _ref3.globalSetting, user = _ref3.user; return { shixunsDetail: shixunsDetail, globalSetting: globalSetting, user: user, loading: loading.models.index }; })(AddFile_AddFile)); ;// CONCATENATED MODULE: ./src/pages/Demo/Warehouse/components/RenameFile.tsx var RenameFile_excluded = ["shixunsDetail", "globalSetting", "loading", "user", "dispatch", "isRepository", "taskData"]; var RenameFile_AddFile = function AddFile(_ref) { var shixunsDetail = _ref.shixunsDetail, globalSetting = _ref.globalSetting, loading = _ref.loading, user = _ref.user, dispatch = _ref.dispatch, isRepository = _ref.isRepository, taskData = _ref.taskData, props = objectWithoutProperties_default()(_ref, RenameFile_excluded); var location = (0,_umi_production_exports.useLocation)(); var params = objectSpread2_default()(objectSpread2_default()({}, (0,_umi_production_exports.useParams)()), (0,_umi_production_exports.useLocation)().query); var _useState = (0,_react_17_0_2_react.useState)({}), _useState2 = slicedToArray_default()(_useState, 2), formValue = _useState2[0], setFormValue = _useState2[1]; var shixunId = (0,_react_17_0_2_react.useRef)(); var _Form$useForm = es_form/* default */.Z.useForm(), _Form$useForm2 = slicedToArray_default()(_Form$useForm, 1), form = _Form$useForm2[0]; var _useState3 = (0,_react_17_0_2_react.useState)(''), _useState4 = slicedToArray_default()(_useState3, 2), filePath = _useState4[0], setFilePath = _useState4[1]; var _useState5 = (0,_react_17_0_2_react.useState)(''), _useState6 = slicedToArray_default()(_useState5, 2), fileName = _useState6[0], setFileName = _useState6[1]; (0,_react_17_0_2_react.useEffect)(function () { if (props.visible) { form.resetFields(); } }, [props.visible]); (0,_react_17_0_2_react.useEffect)(function () { var pathArray = props.defaultPath.split("/"); // if (pathArray) { // // 拼接成绝对路径 // const joinPath = pathArray.split(',').join('/'); // const path = joinPath.indexOf('/') === 0 ? joinPath.substr(1) : joinPath; // setFilePath(path); // } if (pathArray.length === 1) { setFilePath(""); setFileName(props.defaultPath); } else { setFileName(pathArray.pop()); setFilePath(pathArray.join("/") + "/"); } }, [props.defaultPath]); (0,_react_17_0_2_react.useEffect)(function () { var _location$pathname; shixunId.current = (_location$pathname = location.pathname) === null || _location$pathname === void 0 || (_location$pathname = _location$pathname.split('/')) === null || _location$pathname === void 0 ? void 0 : _location$pathname[2]; }, []); var handleFinish = /*#__PURE__*/function () { var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() { var _taskData$shixun; var values, res, _args = arguments; return regeneratorRuntime_default()().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: values = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}; _context.next = 3; return (0,service/* moveMyGitFile */.g7)({ id: taskData === null || taskData === void 0 || (_taskData$shixun = taskData.shixun) === null || _taskData$shixun === void 0 ? void 0 : _taskData$shixun.identifier, from: props.defaultPath, to: filePath + values.path, message: values.commitMessage || "".concat(props.defaultPath, " rename to ").concat(filePath).concat(values.path, " ") }); case 3: res = _context.sent; if ((res === null || res === void 0 ? void 0 : res.status) === 0) { message/* default */.ZP.success("操作成功"); props.onOK({ path: values.path, name: values.path }); props.onClose(); // const returnUrl = isRepository.current ? // `/shixuns/${shixunId.current}/repository${filePath ? `/master/shixun_show/${filePath}` : ""}` : // `/shixuns/${shixunId.current}/secret_repository`; // history.replace(returnUrl); } case 5: case "end": return _context.stop(); } }, _callee); })); return function handleFinish() { return _ref2.apply(this, arguments); }; }(); var handleReturn = function handleReturn() { var _location$pathname2; _umi_production_exports.history.push("/shixuns/".concat(shixunId.current, "/").concat((_location$pathname2 = location.pathname) === null || _location$pathname2 === void 0 || (_location$pathname2 = _location$pathname2.split('/')) === null || _location$pathname2 === void 0 ? void 0 : _location$pathname2[3]).concat(filePath ? "/master/shixun_show/".concat(filePath) : "")); }; return /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, { width: "40%", open: props.visible, wrapClassName: AddFilemodules.modal, centered: true, onOk: function onOk() { form.submit(); }, onCancel: props.onClose, title: "\u63D0\u4EA4\u8BF4\u660E", children: /*#__PURE__*/(0,jsx_runtime.jsx)("section", { className: AddFilemodules.bg, children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", { className: AddFilemodules.wrap, children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, { className: "mt10", form: form, scrollToFirstError: true, layout: "vertical", onFinish: handleFinish, onChange: function onChange() { var _value$path, _arr$filter; var value = objectSpread2_default()({}, form.getFieldsValue()); var arr = value === null || value === void 0 || (_value$path = value.path) === null || _value$path === void 0 ? void 0 : _value$path.split(""); if ((arr === null || arr === void 0 || (_arr$filter = arr.filter(function (item) { return item == "/"; })) === null || _arr$filter === void 0 ? void 0 : _arr$filter.length) > 1) { value.path = value.path.substring(0, value.path.length - 1); } form.setFieldsValue(objectSpread2_default()({}, value)); setFormValue(value); }, children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, { label: "\u91CD\u547D\u540D\uFF1A", name: "path", children: /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, { children: /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { flex: "1", children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, { name: "path", rules: [{ required: true, message: '请输入文件名称' }, { whitespace: true, message: '请勿输入空格' }], children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, { placeholder: "\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0", size: 'middle', defaultValue: fileName }) }) }) }) }), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, { label: "\u63D0\u4EA4\u4FE1\u606F\uFF1A", name: "commitMessage", children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, { placeholder: "\u5982\u4E0D\u586B\u5199\uFF0C\u9ED8\u8BA4\u63D0\u4EA4\u4FE1\u606F\u662F\uFF08".concat(props.defaultPath, " rename to \u65B0\u7684\u540D\u79F0 \uFF09"), size: 'middle' }) })] }) }) }) }); }; /* harmony default export */ var RenameFile = ((0,_umi_production_exports.connect)(function (_ref3) { var shixunsDetail = _ref3.shixunsDetail, loading = _ref3.loading, globalSetting = _ref3.globalSetting, user = _ref3.user; return { shixunsDetail: shixunsDetail, globalSetting: globalSetting, user: user, loading: loading.models.index }; })(RenameFile_AddFile)); // EXTERNAL MODULE: ./src/utils/env.ts + 1 modules var env = __webpack_require__(26078); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/upload/index.js + 24 modules var upload = __webpack_require__(6557); // EXTERNAL MODULE: ./src/pages/Shixuns/Detail/Repository/components/SelectFilePathModal/index.tsx + 1 modules var SelectFilePathModal = __webpack_require__(99497); ;// CONCATENATED MODULE: ./src/pages/Demo/Warehouse/components/UploadFile.less?modules // extracted by mini-css-extract-plugin /* harmony default export */ var UploadFilemodules = ({"wrap":"wrap___zK3Vy","title":"title___BgjCb","path":"path___POFX3","colorBlue":"colorBlue___H4_iQ"}); ;// CONCATENATED MODULE: ./src/pages/Demo/Warehouse/components/UploadFile.tsx var UploadFile_excluded = ["shixunsDetail", "globalSetting", "loading", "user", "taskData", "dispatch", "isRepository"]; // import SelectFilePathModal from '../../../../De/components/SelectFilePathModal'; var Dragger = upload/* default */.Z.Dragger; var UploadFile = function UploadFile(_ref) { var _taskData$myshixun; var shixunsDetail = _ref.shixunsDetail, globalSetting = _ref.globalSetting, loading = _ref.loading, user = _ref.user, taskData = _ref.taskData, dispatch = _ref.dispatch, isRepository = _ref.isRepository, props = objectWithoutProperties_default()(_ref, UploadFile_excluded); var location = (0,_umi_production_exports.useLocation)(); var params = objectSpread2_default()(objectSpread2_default()({}, (0,_umi_production_exports.useParams)()), (0,_umi_production_exports.useLocation)().query); var _useState = (0,_react_17_0_2_react.useState)({}), _useState2 = slicedToArray_default()(_useState, 2), formValue = _useState2[0], setFormValue = _useState2[1]; var shixunId = (0,_react_17_0_2_react.useRef)(); var _Form$useForm = es_form/* default */.Z.useForm(), _Form$useForm2 = slicedToArray_default()(_Form$useForm, 1), form = _Form$useForm2[0]; var _useState3 = (0,_react_17_0_2_react.useState)([]), _useState4 = slicedToArray_default()(_useState3, 2), fileList = _useState4[0], setFileList = _useState4[1]; var _useState5 = (0,_react_17_0_2_react.useState)(), _useState6 = slicedToArray_default()(_useState5, 2), filePath = _useState6[0], setFilePath = _useState6[1]; var filename; (0,_react_17_0_2_react.useEffect)(function () { if (props.visible) { form.resetFields(); setFileList([]); } }, [props.visible]); (0,_react_17_0_2_react.useEffect)(function () { shixunId.current = params.id; }, []); (0,_react_17_0_2_react.useEffect)(function () { var pathArray = sessionStorage.getItem('pathArray'); if (pathArray) { // 拼接成绝对路径 var joinPath = pathArray.split(',').join('/'); var path = joinPath.indexOf('/') === 0 ? joinPath.substr(1) : joinPath; setFilePath(path); } }, []); var handleChangeFile = function handleChangeFile(info) { filename = info.file.name; if (info.file.status === 'done' || info.file.status === "uploading") { var _info$file$response, _info$file$response2, _info$file$response3; setFileList(info.fileList); if (!info.file.response) { return; } if (((_info$file$response = info.file.response) === null || _info$file$response === void 0 ? void 0 : _info$file$response.status) === 0) { message/* default */.ZP.success("上传成功!"); return; } setFileList(fileList.filter(function (item) { return item.uid !== info.file.uid; })); ((_info$file$response2 = info.file.response) === null || _info$file$response2 === void 0 ? void 0 : _info$file$response2.message) && message/* default */.ZP.info((_info$file$response3 = info.file.response) === null || _info$file$response3 === void 0 ? void 0 : _info$file$response3.message); } }; var handleRemoveFile = /*#__PURE__*/function () { var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(info) { var res; return regeneratorRuntime_default()().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: if (info.response) { _context.next = 3; break; } message/* default */.ZP.info("还未上传完成,无法进行删除操作!"); return _context.abrupt("return"); case 3: _context.next = 5; return dispatch({ type: 'shixunsDetail/deleteGitFile', payload: { id: params.id, path: filePath ? "".concat(filePath, "/").concat(info.name) : info.name, message: form.getFieldValue('commitMessage') || "\u5220\u9664\u4E86".concat(filePath ? "".concat(filePath, "/").concat(info.name) : info.name), secret_repository: isRepository ? null : true } }); case 5: res = _context.sent; if (res.status === 0) { setFileList(fileList.filter(function (item) { return item.uid !== info.uid; })); message/* default */.ZP.info("删除成功"); } case 7: case "end": return _context.stop(); } }, _callee); })); return function handleRemoveFile(_x) { return _ref2.apply(this, arguments); }; }(); var draggerProps = { height: 300, multiple: true, withCredentials: true, data: function () { var _data = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() { return regeneratorRuntime_default()().wrap(function _callee4$(_context4) { while (1) switch (_context4.prev = _context4.next) { case 0: return _context4.abrupt("return", new Promise( /*#__PURE__*/function () { var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(resolve, reject) { return regeneratorRuntime_default()().wrap(function _callee3$(_context3) { while (1) switch (_context3.prev = _context3.next) { case 0: setTimeout( /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() { var v, data; return regeneratorRuntime_default()().wrap(function _callee2$(_context2) { while (1) switch (_context2.prev = _context2.next) { case 0: _context2.next = 2; return form.getFieldsValue(); case 2: v = _context2.sent; data = objectSpread2_default()(objectSpread2_default()({}, { path: !!props.defaultPath ? props.defaultPath : "", message: formValue.commitMessage || "\u4E0A\u4F20\u4E86".concat(filename) }), isRepository ? {} : { secret_repository: true }); resolve(data); case 5: case "end": return _context2.stop(); } }, _callee2); })), 200); case 1: case "end": return _context3.stop(); } }, _callee3); })); return function (_x2, _x3) { return _ref3.apply(this, arguments); }; }())); case 1: case "end": return _context4.stop(); } }, _callee4); })); function data() { return _data.apply(this, arguments); } return data; }(), fileList: fileList, method: "post", action: "".concat(env/* default */.Z.API_SERVER, "/api/myshixuns/").concat(taskData === null || taskData === void 0 || (_taskData$myshixun = taskData.myshixun) === null || _taskData$myshixun === void 0 ? void 0 : _taskData$myshixun.identifier, "/upload_git_file.json"), onChange: handleChangeFile, onRemove: handleRemoveFile, beforeUpload: function beforeUpload(file) { filename = file.name; // if (!form.getFieldValue('commitMessage')) { // message.info("上传文件请先填写提交信息"); // return false; // } } }; var handleFinish = /*#__PURE__*/function () { var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5(values) { return regeneratorRuntime_default()().wrap(function _callee5$(_context5) { while (1) switch (_context5.prev = _context5.next) { case 0: _context5.next = 2; return form.validateFields(); case 2: props.onClose(); props.onOK({ path: props.defaultPath }); handleReturn(); case 5: case "end": return _context5.stop(); } }, _callee5); })); return function handleFinish(_x4) { return _ref5.apply(this, arguments); }; }(); var handleReturn = function handleReturn() { // history.push(`/shixuns/${shixunId.current}/${location.pathname?.split('/')?.[3]}${filePath ? `/master/shixun_show/${filePath}` : ""}`) }; return /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, { open: props.visible, onOk: handleFinish, centered: true, onCancel: props.onClose, width: "70%", children: /*#__PURE__*/(0,jsx_runtime.jsxs)("section", { className: UploadFilemodules.bg, children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", { className: UploadFilemodules.wrap, children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", { className: UploadFilemodules.title, children: "\u4E0A\u4F20\u6587\u4EF6" }), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, { className: "mt10", form: form, scrollToFirstError: true, layout: "vertical", onFinish: handleFinish, onValuesChange: function onValuesChange() { return setFormValue(objectSpread2_default()({}, form.getFieldsValue())); }, children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, { label: "\u63D0\u4EA4\u4FE1\u606F\uFF1A", name: "commitMessage", rules: [{ required: true, message: '请输入提交信息' }, { whitespace: true, message: '请勿输入空格' }], children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, { placeholder: "\u5FC5\u586B\uFF0C\u63CF\u8FF0\u4E3B\u8981\u4FEE\u6539\u5185\u5BB9\uFF08\u76F8\u5F53\u4E8EGit Commit message\u7684Header\uFF09" }) }), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, { label: "\u9009\u62E9\u6587\u4EF6", name: "file", rules: [{ required: true, message: '请选择文件' }], children: /*#__PURE__*/(0,jsx_runtime.jsxs)(Dragger, objectSpread2_default()(objectSpread2_default()({}, draggerProps), {}, { children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", { children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", { className: "iconfont icon-shangchuan font50 ".concat(UploadFilemodules.colorBlue) }) }), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { className: "font14 mt30", children: ["\u62D6\u62FD\u6587\u4EF6\u6216", /*#__PURE__*/(0,jsx_runtime.jsx)("span", { className: "".concat(UploadFilemodules.colorBlue, " ml5"), children: "\u70B9\u51FB\u6B64\u5904\u4E0A\u4F20" })] })] })) })] })] }), /*#__PURE__*/(0,jsx_runtime.jsx)(SelectFilePathModal/* default */.Z, { onFinish: function onFinish(path) { return setFilePath(path); } })] }) }); }; /* harmony default export */ var components_UploadFile = ((0,_umi_production_exports.connect)(function (_ref6) { var shixunsDetail = _ref6.shixunsDetail, loading = _ref6.loading, globalSetting = _ref6.globalSetting, user = _ref6.user; return { shixunsDetail: shixunsDetail, globalSetting: globalSetting, user: user, loading: loading.models.index }; })(UploadFile)); ;// CONCATENATED MODULE: ./src/pages/Demo/Warehouse/components/Tree.less?modules // extracted by mini-css-extract-plugin /* harmony default export */ var Treemodules = ({"flex_box_center":"flex_box_center___MMlsc","flex_space_between":"flex_space_between___ti22L","flex_box_vertical_center":"flex_box_vertical_center___YL4jC","flex_box_center_end":"flex_box_center_end___vx3wA","flex_box_column":"flex_box_column___eKe0F","headLeft":"headLeft___dsKhq","colorBlue":"colorBlue___gaxVL","wrap":"wrap___NLIaW","nodata":"nodata___zv745","nodataText":"nodataText___EWDiS","content":"content___i5G9Y","gitCode":"gitCode___W15AY","ellipsis":"ellipsis___sEcFA","menu":"menu___sjQxY","overlayClass":"overlayClass___ofgjv","tips":"tips___WEDOk"}); ;// CONCATENATED MODULE: ./src/pages/Demo/Warehouse/components/SelectFilePathModal/index.less?modules // extracted by mini-css-extract-plugin /* harmony default export */ var SelectFilePathModalmodules = ({"wrap":"wrap___WB5qS","content":"content___HZdqT","mainPathWrap":"mainPathWrap___XMF09","colorBlue":"colorBlue___N9Dtz"}); ;// CONCATENATED MODULE: ./src/pages/Demo/Warehouse/components/SelectFilePathModal/index.tsx var SelectFilePathModal_SelectFilePathModal = function SelectFilePathModal(_ref) { var shixunsDetail = _ref.shixunsDetail, globalSetting = _ref.globalSetting, loading = _ref.loading, dispatch = _ref.dispatch, title = _ref.title, _ref$pathList = _ref.pathList, propsPathList = _ref$pathList === void 0 ? [] : _ref$pathList, _ref$showInputPath = _ref.showInputPath, showInputPath = _ref$showInputPath === void 0 ? false : _ref$showInputPath, _ref$isMergeSelectFil = _ref.isMergeSelectFile, isMergeSelectFile = _ref$isMergeSelectFil === void 0 ? false : _ref$isMergeSelectFil, _ref$onFinish = _ref.onFinish, onFinish = _ref$onFinish === void 0 ? function () {} : _ref$onFinish; var _Form$useForm = es_form/* default */.Z.useForm(), _Form$useForm2 = slicedToArray_default()(_Form$useForm, 1), form = _Form$useForm2[0]; var params = objectSpread2_default()(objectSpread2_default()({}, (0,_umi_production_exports.useParams)()), (0,_umi_production_exports.useLocation)().query); var location = (0,_umi_production_exports.useLocation)(); var isRepository = (0,_react_17_0_2_react.useRef)(); var _useState = (0,_react_17_0_2_react.useState)(''), _useState2 = slicedToArray_default()(_useState, 2), selectPath = _useState2[0], setSelectPath = _useState2[1]; var _useState3 = (0,_react_17_0_2_react.useState)(''), _useState4 = slicedToArray_default()(_useState3, 2), originPath = _useState4[0], setOriginPath = _useState4[1]; var _useState5 = (0,_react_17_0_2_react.useState)([]), _useState6 = slicedToArray_default()(_useState5, 2), mainPathList = _useState6[0], setMainPathList = _useState6[1]; var _useState7 = (0,_react_17_0_2_react.useState)([]), _useState8 = slicedToArray_default()(_useState7, 2), treeList = _useState8[0], setTreeList = _useState8[1]; (0,_react_17_0_2_react.useEffect)(function () { var _location$pathname; isRepository.current = ((_location$pathname = location.pathname) === null || _location$pathname === void 0 || (_location$pathname = _location$pathname.split('/')) === null || _location$pathname === void 0 ? void 0 : _location$pathname[3]) === "repository"; }, []); (0,_react_17_0_2_react.useEffect)(function () { if (shixunsDetail.actionTabs.key !== 'Repository-SelectFilePath') { return; } var path = propsPathList.join('/'); var arr = []; propsPathList.map(function (item, index) { if (index === 0) { arr.push({ val: "根目录", path: "" }, { val: "/".concat(item), path: path }); } else { arr.push({ val: "/".concat(item), path: path }); } }); setMainPathList(arr); setSelectPath(path); setOriginPath(path); handleGetPathData(path); }, [shixunsDetail.actionTabs.key]); var handleGetPathData = /*#__PURE__*/function () { var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(path) { var res; return regeneratorRuntime_default()().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: _context.next = 2; return dispatch({ type: isRepository.current ? 'shixunsDetail/getRepository' : 'shixunsDetail/getSecretRepository', payload: { id: params.id, path: path } }); case 2: res = _context.sent; if (res) { setTreeList(res.trees || []); } case 4: case "end": return _context.stop(); } }, _callee); })); return function handleGetPathData(_x) { return _ref2.apply(this, arguments); }; }(); var handleClickTree = function handleClickTree(item) { var newPath = selectPath; if (item.type === "tree") { mainPathList.length ? mainPathList.push({ val: "/".concat(item.name), path: item.name }) : mainPathList.push({ val: "根目录", path: "" }, { val: "/".concat(item.name), path: item.name }); setMainPathList(mainPathList); newPath = selectPath ? "".concat(selectPath, "/").concat(item.name) : item.name; setSelectPath(newPath); } handleGetPathData(newPath); }; var handleClickMainPath = function handleClickMainPath(item, index) { var currentPathList = mainPathList.filter(function (_, key) { return key <= index; }); setMainPathList(currentPathList); // 排除 ”根目录“,将选中的路径连接,去掉第一个字符串 “/”,获取绝对路径 var currentPath = currentPathList.filter(function (_, key) { return key !== 0; }).map(function (item) { return item.val; }).join('').substr(1); setSelectPath(currentPath); handleGetPathData(currentPath); }; var handleOk = /*#__PURE__*/function () { var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() { var values, path, res; return regeneratorRuntime_default()().wrap(function _callee2$(_context2) { while (1) switch (_context2.prev = _context2.next) { case 0: values = form === null || form === void 0 ? void 0 : form.getFieldsValue(); path = selectPath ? "".concat(selectPath).concat(values !== null && values !== void 0 && values.name ? "/".concat(values === null || values === void 0 ? void 0 : values.name) : '') : values === null || values === void 0 ? void 0 : values.name; if (!isMergeSelectFile) { _context2.next = 6; break; } onFinish(path); handleCancel(); return _context2.abrupt("return"); case 6: if (!showInputPath) { _context2.next = 16; break; } _context2.next = 9; return form.validateFields(); case 9: _context2.next = 11; return dispatch({ type: 'shixunsDetail/uploadGitFolder', payload: objectSpread2_default()(objectSpread2_default()({}, { id: params.id, path: path }), isRepository.current ? {} : { secret_repository: true }) }); case 11: res = _context2.sent; onFinish(originPath); if (res.status === 0) { message/* default */.ZP.info('新建成功'); } _context2.next = 18; break; case 16: onFinish(path); message/* default */.ZP.success("选择文件目录成功"); case 18: handleCancel(); case 19: case "end": return _context2.stop(); } }, _callee2); })); return function handleOk() { return _ref3.apply(this, arguments); }; }(); var handleCancel = function handleCancel() { dispatch({ type: 'shixunsDetail/setActionTabs', payload: {} }); form.resetFields(); }; return /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, { centered: true, title: title || "新建文件夹", closable: false, keyboard: false, open: shixunsDetail.actionTabs.key === 'Repository-SelectFilePath', onOk: handleOk, onCancel: handleCancel, children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { className: SelectFilePathModalmodules.wrap, children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", { className: SelectFilePathModalmodules.content, children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", { className: SelectFilePathModalmodules.mainPathWrap, children: !!(mainPathList !== null && mainPathList !== void 0 && mainPathList.length) && mainPathList.map(function (item, index) { return /*#__PURE__*/(0,jsx_runtime.jsx)("a", { onClick: function onClick() { return handleClickMainPath(item, index); }, children: item.val }, index); }) }), !!(treeList !== null && treeList !== void 0 && treeList.length) && treeList.map(function (item, index) { return item.type === "tree" && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { onClick: function onClick() { return handleClickTree(item); }, children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { className: "iconfont icon-wenjianjia ".concat(SelectFilePathModalmodules.colorBlue) }), item.name] }, index); })] }), /*#__PURE__*/(0,jsx_runtime.jsx)("label", { className: "mt5", children: "\u9009\u4E2D\u7684\u65B0\u5EFA\u6587\u4EF6\u5939\u76EE\u5F55\uFF1A" }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", { className: "mt5 mb5", children: selectPath }), showInputPath && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z, { form: form, scrollToFirstError: true, className: "mt20", children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, { name: "name", rules: [{ required: true, message: '请输入名称' }, { whitespace: true, message: '请勿输入空格' }], children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, { placeholder: "\u8BF7\u8F93\u5165\u65B0\u6587\u4EF6\u5939\u540D/\u5B50\u6587\u4EF6\u5939\u540D\u3002\uFF08\u5982\uFF1Asrc/step1\uFF09" }) }) })] }) }); }; /* harmony default export */ var components_SelectFilePathModal = ((0,_umi_production_exports.connect)(function (_ref4) { var shixunsDetail = _ref4.shixunsDetail, loading = _ref4.loading, globalSetting = _ref4.globalSetting; return { shixunsDetail: shixunsDetail, globalSetting: globalSetting, loading: loading.models.index }; })(SelectFilePathModal_SelectFilePathModal)); // EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/EllipsisOutlined.js + 1 modules var EllipsisOutlined = __webpack_require__(93319); // EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/DownOutlined.js + 1 modules var DownOutlined = __webpack_require__(42884); // EXTERNAL MODULE: ./src/service/shixuns.ts var shixuns = __webpack_require__(25544); // EXTERNAL MODULE: ./node_modules/_lodash@4.17.21@lodash/lodash.js var lodash = __webpack_require__(89392); // EXTERNAL MODULE: ./src/utils/verifyLogin.tsx + 2 modules var verifyLogin = __webpack_require__(39090); // EXTERNAL MODULE: ./src/components/ImagesIcon/index.ts + 32 modules var ImagesIcon = __webpack_require__(43553); ;// CONCATENATED MODULE: ./src/pages/Demo/Warehouse/components/Tree.tsx var Tree_excluded = ["shixunsDetail", "globalSetting", "loading", "user", "activeKey", "dispatch", "taskData", "practiceSetting", "isRepository", "treeData", "setTreeData", "params"]; // import Edit from './components/Edit' // import Right from '../components/Right' var DirectoryTree = tree/* default */.Z.DirectoryTree; var Repository = function Repository(_ref) { var _taskData$challenge3, _shixunsDetail$detail4, _shixunsDetail$detail5; var shixunsDetail = _ref.shixunsDetail, globalSetting = _ref.globalSetting, loading = _ref.loading, user = _ref.user, activeKey = _ref.activeKey, dispatch = _ref.dispatch, taskData = _ref.taskData, practiceSetting = _ref.practiceSetting, isRepository = _ref.isRepository, treeData = _ref.treeData, setTreeData = _ref.setTreeData, params = _ref.params, props = objectWithoutProperties_default()(_ref, Tree_excluded); var location = (0,_umi_production_exports.useLocation)(); // const isRepository = useRef() var _useState = (0,_react_17_0_2_react.useState)(), _useState2 = slicedToArray_default()(_useState, 2), checkedValue = _useState2[0], setCheckedValue = _useState2[1]; // const [treeData, setTreeData] = useState([]); var _useState3 = (0,_react_17_0_2_react.useState)(false), _useState4 = slicedToArray_default()(_useState3, 2), showAddFile = _useState4[0], setShowAddFile = _useState4[1]; var _useState5 = (0,_react_17_0_2_react.useState)(false), _useState6 = slicedToArray_default()(_useState5, 2), showRenameFile = _useState6[0], setShowRenameFile = _useState6[1]; var _useState7 = (0,_react_17_0_2_react.useState)(false), _useState8 = slicedToArray_default()(_useState7, 2), showAddFolder = _useState8[0], setShowAddFolder = _useState8[1]; var _useState9 = (0,_react_17_0_2_react.useState)(false), _useState10 = slicedToArray_default()(_useState9, 2), showUploadFile = _useState10[0], setShowUploadFile = _useState10[1]; var _useState11 = (0,_react_17_0_2_react.useState)(""), _useState12 = slicedToArray_default()(_useState11, 2), defaultPath = _useState12[0], setDefaultPath = _useState12[1]; var _useState13 = (0,_react_17_0_2_react.useState)([]), _useState14 = slicedToArray_default()(_useState13, 2), expandedKeys = _useState14[0], setExpandedKeys = _useState14[1]; var _useState15 = (0,_react_17_0_2_react.useState)([]), _useState16 = slicedToArray_default()(_useState15, 2), selectedKeys = _useState16[0], setSelectedKeys = _useState16[1]; var _useState17 = (0,_react_17_0_2_react.useState)([]), _useState18 = slicedToArray_default()(_useState17, 2), treeList = _useState18[0], setTreeList = _useState18[1]; var _useState19 = (0,_react_17_0_2_react.useState)(false), _useState20 = slicedToArray_default()(_useState19, 2), visibleTip = _useState20[0], setVisibleTip = _useState20[1]; var _useState21 = (0,_react_17_0_2_react.useState)(), _useState22 = slicedToArray_default()(_useState21, 2), commitInfo = _useState22[0], setCommitInfo = _useState22[1]; var _useState23 = (0,_react_17_0_2_react.useState)(), _useState24 = slicedToArray_default()(_useState23, 2), secretDirPath = _useState24[0], setSecretDirPath = _useState24[1]; var _useState25 = (0,_react_17_0_2_react.useState)(""), _useState26 = slicedToArray_default()(_useState25, 2), pathList = _useState26[0], setPathList = _useState26[1]; var _useState27 = (0,_react_17_0_2_react.useState)(), _useState28 = slicedToArray_default()(_useState27, 2), newMergeValue = _useState28[0], setNewMergeValue = _useState28[1]; var _useState29 = (0,_react_17_0_2_react.useState)(false), _useState30 = slicedToArray_default()(_useState29, 2), isMergeSelectFile = _useState30[0], setIsMergeSelectFile = _useState30[1]; (0,_react_17_0_2_react.useEffect)(function () { setTreeData([]); handleGetRepository(""); if (!localStorage.warehouseHideTip) { setVisibleTip(true); } }, [location.pathname, isRepository]); (0,_react_17_0_2_react.useEffect)(function () { var _taskData$challenge; if (taskData !== null && taskData !== void 0 && (_taskData$challenge = taskData.challenge) !== null && _taskData$challenge !== void 0 && _taskData$challenge.path && treeData !== null && treeData !== void 0 && treeData.length) { var _taskData$challenge2, _cloneDeep; var sePath = taskData === null || taskData === void 0 || (_taskData$challenge2 = taskData.challenge) === null || _taskData$challenge2 === void 0 || (_taskData$challenge2 = _taskData$challenge2.path) === null || _taskData$challenge2 === void 0 ? void 0 : _taskData$challenge2.replaceAll(';', ''); var filterTreeData = (_cloneDeep = (0,lodash.cloneDeep)(treeData)) === null || _cloneDeep === void 0 ? void 0 : _cloneDeep.filter(function (e) { var _sePath$split; return e.name === (sePath === null || sePath === void 0 || (_sePath$split = sePath.split('/')) === null || _sePath$split === void 0 ? void 0 : _sePath$split[0]); }); initToPath(sePath); if ((treeData === null || treeData === void 0 ? void 0 : treeData.length) !== 1) { console.log(filterTreeData, 'filterTreeData'); setTreeData(filterTreeData); } } }, [taskData === null || taskData === void 0 || (_taskData$challenge3 = taskData.challenge) === null || _taskData$challenge3 === void 0 ? void 0 : _taskData$challenge3.path, treeData]); var initToPath = function initToPath(path) { selectPath(path); selectedKeys = [path]; setSelectedKeys([path]); }; var handleMergeSelectFile = /*#__PURE__*/function () { var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() { var path, res, _args = arguments; return regeneratorRuntime_default()().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: path = _args.length > 0 && _args[0] !== undefined ? _args[0] : ''; _context.next = 3; return (0,shixuns/* setSecretDir */.Zt)({ id: params.id, secret_dir_path: path }); case 3: res = _context.sent; res && setNewMergeValue(path); case 5: case "end": return _context.stop(); } }, _callee); })); return function handleMergeSelectFile() { return _ref2.apply(this, arguments); }; }(); var menu = function menu(item) { return /*#__PURE__*/(0,jsx_runtime.jsxs)(es_menu/* default */.Z, { className: Treemodules.menu, onClick: function onClick(value) { setDefaultPath(item.path || ''); switch (value.key) { case "1": (0,util/* trackEvent */.L9)(['实践项目', '设置', '代码仓库', '新建文件']); setShowAddFile(true); break; case "2": (0,util/* trackEvent */.L9)(['实践项目', '设置', '代码仓库', '新建文件夹']); setShowAddFolder(true); break; case "3": (0,util/* trackEvent */.L9)(['实践项目', '设置', '代码仓库', '上传']); setShowUploadFile(true); break; case "4": (0,util/* trackEvent */.L9)(['实践项目', '设置', '代码仓库', '重命名']); setShowRenameFile(true); break; case "5": (0,util/* trackEvent */.L9)(['实践项目', '设置', '代码仓库', '删除']); handleDeleteFile(item.path, item.name, item); break; case "6": (0,util/* trackEvent */.L9)(['实践项目', '设置', '代码仓库', '复制路径']); copyFilePath(item); break; } }, children: [(item.type === 'topTree' || item.type === 'tree') && /*#__PURE__*/(0,jsx_runtime.jsx)(es_menu/* default */.Z.Item, { children: "\u65B0\u5EFA\u6587\u4EF6" }, "1"), (item.type === 'topTree' || item.type === 'tree') && /*#__PURE__*/(0,jsx_runtime.jsx)(es_menu/* default */.Z.Item, { children: "\u65B0\u5EFA\u6587\u4EF6\u5939" }, "2"), (item.type === 'topTree' || item.type === 'tree') && /*#__PURE__*/(0,jsx_runtime.jsx)(es_menu/* default */.Z.Item, { children: "\u4E0A\u4F20" }, "3"), item.type !== 'topTree' && item.type !== 'tree' && /*#__PURE__*/(0,jsx_runtime.jsx)(es_menu/* default */.Z.Item, { children: "\u91CD\u547D\u540D" }, "4"), item.type !== 'topTree' && /*#__PURE__*/(0,jsx_runtime.jsx)(lib.CopyToClipboard, { text: "/data/workspace/myshixun/".concat(!isRepository ? "secret/" : "").concat(item === null || item === void 0 ? void 0 : item.path), onCopy: function onCopy() { return message/* default */.ZP.success('复制成功'); }, children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_menu/* default */.Z.Item, { children: /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, { children: "\u590D\u5236\u8DEF\u5F84" }) }, "6") }), item.type !== 'topTree' && /*#__PURE__*/(0,jsx_runtime.jsx)(es_menu/* default */.Z.Item, { children: "\u5220\u9664" }, "5")] }); }; var createDom = function createDom(data, path) { return data.map(function (item) { if (path == '') { item.path = path + item.name; } else { item.path = path + "/" + item.name; } item.title = /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, { className: "font14", children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { flex: "1", children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, { children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { flex: "20px", children: item.type === 'blob' && /*#__PURE__*/(0,jsx_runtime.jsx)("span", { className: "iconfont icon-wenjian11 font12" }) }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { flex: "1", children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { className: " multi_ellipsis1", children: item.name }) })] }) }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { children: (item.type === 'blob' || item.type === 'tree') && /*#__PURE__*/(0,jsx_runtime.jsx)(dropdown/* default */.Z, { dropdownRender: function dropdownRender() { return menu(item); }, className: Treemodules.ellipsis, children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", { className: "iconfont icon-gengduo2 c-555a88" }) }) })] }); item.disableCheckbox = checkedValue && checkedValue !== item.name; item.className = item.type === 'tree' ? Treemodules.pl23 : ''; item.checkable = item.type !== 'tree'; item.isLeaf = item.type !== 'tree'; item.children = item.type === 'tree' && []; item.key = item.path; return item; }); }; var selectPath = function selectPath(path) { dispatch({ type: 'practiceSetting/setSideBarTabs', payload: { selectPath: path } }); }; var insertFile = /*#__PURE__*/function () { var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(path, name) { var pathArr; return regeneratorRuntime_default()().wrap(function _callee2$(_context2) { while (1) switch (_context2.prev = _context2.next) { case 0: pathArr = path.split("/"); _context2.next = 3; return handleGetRepository(defaultPath); case 3: setTimeout(function () { selectPath(path); expandedKeys = [pathArr[0] || '']; selectedKeys = [path]; setSelectedKeys(toConsumableArray_default()(selectedKeys)); setExpandedKeys(toConsumableArray_default()(expandedKeys)); }, 150); case 4: case "end": return _context2.stop(); } }, _callee2); })); return function insertFile(_x, _x2) { return _ref3.apply(this, arguments); }; }(); var insertData = function insertData(data, path) { console.log(data, 'data'); if (path == '') { setTreeData(toConsumableArray_default()(data)); } else { var d = updateTreeData(treeData, path, data); setTreeData([].concat(d)); } }; function updateTreeData(list, key, children) { return list.map(function (node) { if (node.key === key) { node.children = toConsumableArray_default()(children); return objectSpread2_default()({}, node); } else if (node.children) { return objectSpread2_default()(objectSpread2_default()({}, node), {}, { children: updateTreeData(node.children, key, children) }); } return node; }); } var handleGetRepository = /*#__PURE__*/function () { var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() { var _taskData$myshixun; var path, res, _res$trees, _res$commits, d, _args3 = arguments; return regeneratorRuntime_default()().wrap(function _callee3$(_context3) { while (1) switch (_context3.prev = _context3.next) { case 0: path = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : ''; // const res = await dispatch({ // type: isRepository ? 'shixunsDetail/getRepository' : 'shixunsDetail/getSecretRepository', // payload: { // id: params.id, // path // } // }) console.log("location:", location); // return _context3.next = 4; return (0,service/* fetchRepos */.pU)(taskData === null || taskData === void 0 || (_taskData$myshixun = taskData.myshixun) === null || _taskData$myshixun === void 0 ? void 0 : _taskData$myshixun.identifier, { path: path }); case 4: res = _context3.sent; if (res) { if (!!((_res$trees = res.trees) !== null && _res$trees !== void 0 && _res$trees.length)) { d = createDom(toConsumableArray_default()(res.trees), path); insertData(d, path); setTreeList(res.trees || []); setSecretDirPath((res === null || res === void 0 ? void 0 : res.secret_dir_path) || ''); console.log("handleGetRepository:", d, path); setTimeout(function () { return console.log(treeData); }, 2000); } else if (path == '') { setTreeData([]); } setCommitInfo(((_res$commits = res.commits) === null || _res$commits === void 0 ? void 0 : _res$commits[0]) || {}); } return _context3.abrupt("return", res); case 7: case "end": return _context3.stop(); } }, _callee3); })); return function handleGetRepository() { return _ref4.apply(this, arguments); }; }(); var loadData = /*#__PURE__*/function () { var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5(selectedKeys) { return regeneratorRuntime_default()().wrap(function _callee5$(_context5) { while (1) switch (_context5.prev = _context5.next) { case 0: return _context5.abrupt("return", new Promise( /*#__PURE__*/function () { var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(resolve, reject) { return regeneratorRuntime_default()().wrap(function _callee4$(_context4) { while (1) switch (_context4.prev = _context4.next) { case 0: if (!!selectedKeys.children.length) { resolve(); } setPathList(selectedKeys.path); _context4.next = 4; return handleGetRepository(selectedKeys.path); case 4: resolve(); case 5: case "end": return _context4.stop(); } }, _callee4); })); return function (_x4, _x5) { return _ref6.apply(this, arguments); }; }())); case 1: case "end": return _context5.stop(); } }, _callee5); })); return function loadData(_x3) { return _ref5.apply(this, arguments); }; }(); var handleSelectTree = /*#__PURE__*/function () { var _ref7 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6(selectedKeys, data) { var toNext, _practiceSetting$side; return regeneratorRuntime_default()().wrap(function _callee6$(_context6) { while (1) switch (_context6.prev = _context6.next) { case 0: console.log("handleSelectTree", selectedKeys, data.nativeEvent.target.nodeName, data); toNext = function toNext() { selectPath(data.node.path); selectedKeys = [data.node.path]; setSelectedKeys(toConsumableArray_default()(selectedKeys)); }; if (!(data.nativeEvent.target.nodeName === 'svg' || data.nativeEvent.target.nodeName === 'LI' || data.nativeEvent.target.nodeName === 'I')) { _context6.next = 4; break; } return _context6.abrupt("return"); case 4: if (data.node.type === 'blob') { if (practiceSetting !== null && practiceSetting !== void 0 && (_practiceSetting$side = practiceSetting.sideBar) !== null && _practiceSetting$side !== void 0 && _practiceSetting$side.confirmLeave) { modal/* default */.Z.confirm({ title: "离开此页提示", content: "系统可能不会保存您所做的更改。", okText: "离开", cancelText: "取消", onOk: function onOk() { toNext(); dispatch({ type: 'practiceSetting/setSideBarTabs', payload: { confirmLeave: false } }); } }); } else { toNext(); } } case 5: case "end": return _context6.stop(); } }, _callee6); })); return function handleSelectTree(_x6, _x7) { return _ref7.apply(this, arguments); }; }(); var handleDeleteFile = function handleDeleteFile(path, name, item) { modal/* default */.Z.confirm({ centered: true, title: "\u786E\u8BA4\u9700\u8981\u5220\u9664\u8BE5\u6587\u4EF6".concat(item.children ? "夹" : "", "?"), okText: '确定', cancelText: '取消', onOk: function () { var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() { var _taskData$myshixun2; var res, pathArr, res2; return regeneratorRuntime_default()().wrap(function _callee7$(_context7) { while (1) switch (_context7.prev = _context7.next) { case 0: _context7.next = 2; return (0,service/* deleteMyGitFile */.bD)({ id: taskData === null || taskData === void 0 || (_taskData$myshixun2 = taskData.myshixun) === null || _taskData$myshixun2 === void 0 ? void 0 : _taskData$myshixun2.identifier, path: path, message: "\u5220\u9664".concat(path) }); case 2: res = _context7.sent; pathArr = path.split("/"); if (!((res === null || res === void 0 ? void 0 : res.status) === 0)) { _context7.next = 20; break; } message/* default */.ZP.info("删除成功"); pathArr.splice(pathArr.length - 1, 1); _context7.next = 9; return handleGetRepository(pathArr.length > 1 ? pathArr.join("/") : ""); case 9: res2 = _context7.sent; if (!(res2 !== null && res2 !== void 0 && res2.trees)) { _context7.next = 13; break; } _context7.next = 16; break; case 13: pathArr.splice(pathArr.length - 1, 1); _context7.next = 16; return handleGetRepository(pathArr.length > 1 ? pathArr.join("/") : ""); case 16: selectPath(''); return _context7.abrupt("return", true); case 20: if ((res === null || res === void 0 ? void 0 : res.status) === -3) { modal/* default */.Z.info({ title: "删除失败", content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { children: ["\u8BE5\u6587\u4EF6\u201C", path, "\u201D\u5DF2\u7ECF\u88AB\u4EFB\u52A1\u5173\u5361\u7684\u5B66\u5458\u4EFB\u52A1\u6587\u4EF6\u6216\u8BC4\u6D4B\u6267\u884C\u6587\u4EF6\u4F7F\u7528\uFF0C\u8BF7\u5148\u4FEE\u6539\u4EFB\u52A1\u5173\u5361\u4E2D\u8BC4\u6D4B\u8BBE\u7F6E\u7684\u6587\u4EF6\u8DEF\u5F84\u540E\u518D\u5220\u9664\u3002"] }), okText: "我知道了", // cancelText: "取消", onOk: function onOk() { // window.location.href = (`/shixuns/${params.id}/edit/${res?.message}/tab=2`) } }); } case 21: case "end": return _context7.stop(); } }, _callee7); })); function onOk() { return _onOk.apply(this, arguments); } return onOk; }() }); }; var copyFilePath = function copyFilePath(item) { //事件待定 console.log(item, 'item'); }; var handleExpand = /*#__PURE__*/function () { var _ref8 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8(key, node) { return regeneratorRuntime_default()().wrap(function _callee8$(_context8) { while (1) switch (_context8.prev = _context8.next) { case 0: console.log("handleExpand", node); if (!(node.nativeEvent.target.nodeName === "svg" || node.nativeEvent.target.nodeName === "path" || node.nativeEvent.target.nodeName === "LI")) { _context8.next = 5; break; } return _context8.abrupt("return", true); case 5: _context8.next = 7; return loadData(node.node); case 7: if (expandedKeys.includes(node.node.path)) { expandedKeys.splice(expandedKeys.indexOf(node.node.path), 1); } else { expandedKeys.push(node.node.path); } case 8: setExpandedKeys(toConsumableArray_default()(expandedKeys)); case 9: case "end": return _context8.stop(); } }, _callee8); })); return function handleExpand(_x8, _x9) { return _ref8.apply(this, arguments); }; }(); var closeTip = function closeTip() { setVisibleTip(false); localStorage.warehouseHideTip = true; }; var handleChange = /*#__PURE__*/function () { var _ref9 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9(checked) { var _shixunsDetail$detail; var content, title, okText, cancelText; return regeneratorRuntime_default()().wrap(function _callee9$(_context9) { while (1) switch (_context9.prev = _context9.next) { case 0: title = ''; _context9.t0 = isRepository; _context9.next = _context9.t0 === true ? 4 : _context9.t0 === false ? 9 : 11; break; case 4: title = '开启版本库'; okText = "开启"; cancelText = "不开启"; content = /*#__PURE__*/(0,jsx_runtime.jsx)("div", { children: "\u65B0\u5EFA\u5B9E\u8DF5\u9898\u5173\u5361\u65F6\uFF0C\u9700\u8981\u4F7F\u7528\u4EE3\u7801\u4ED3\u5E93\uFF1B\u5982\u679C\u53EA\u6709\u9009\u62E9\u9898\u5173\u5361\uFF0C\u5219\u4E0D\u9700\u8981\u4EE3\u7801\u4ED3\u5E93\u3002\u4EE3\u7801\u4ED3\u5E93\u542F\u7528\u540E\uFF0C\u5C06\u65E0\u6CD5\u5173\u95ED\u3002" }); return _context9.abrupt("break", 11); case 9: if (shixunsDetail !== null && shixunsDetail !== void 0 && (_shixunsDetail$detail = shixunsDetail.detail) !== null && _shixunsDetail$detail !== void 0 && _shixunsDetail$detail.secret_repository) { title = '关闭私密代码仓库'; okText = "确定"; cancelText = "取消"; content = /*#__PURE__*/(0,jsx_runtime.jsx)("div", { children: "\u5173\u95ED\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93\u540E\uFF0C\u5DF2\u521B\u5EFA\u7684\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93\u53CA\u5176\u5185\u5BB9\uFF0C\u5C06\u88AB\u5220\u9664\u3002\u786E\u8BA4\u8981\u5173\u95ED\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93\uFF1F" }); } else { title = '开启私密代码仓库'; okText = "不使用"; cancelText = "使用"; content = /*#__PURE__*/(0,jsx_runtime.jsx)("div", { children: "\u79C1\u5BC6\u7248\u672C\u5E93\u7684\u6587\u4EF6\u5BF9\u5B66\u5458\u59CB\u7EC8\u9690\u85CF\uFF0C\u65E0\u6CD5\u8BBF\u95EE\u67E5\u770B\u3002\u9002\u7528\u4E8E\u547D\u4EE4\u884C\u3001\u56FE\u5F62\u5316\u684C\u9762\u4E24\u7C7B\u5B9E\u8BAD\uFF0C\u5176\u4ED6\u7C7B\u578B\u5B9E\u8BAD\u4E0D\u5EFA\u8BAE\u4F7F\u7528\u79C1\u5BC6\u7248\u672C\u5E93\u3002" }); } return _context9.abrupt("break", 11); case 11: if (!(!isRepository && (0,verifyLogin/* ShixunStatusModel */.gy)(dispatch, '不能开启/关闭私密代码仓库'))) { _context9.next = 13; break; } return _context9.abrupt("return"); case 13: modal/* default */.Z.confirm({ title: title, okText: okText, cancelText: cancelText, content: content, onOk: function onOk() { var _shixunsDetail$detail2; (0,util/* trackEvent */.L9)(['实践项目', '设置', '代码仓库', title]); if (!isRepository && !(shixunsDetail !== null && shixunsDetail !== void 0 && (_shixunsDetail$detail2 = shixunsDetail.detail) !== null && _shixunsDetail$detail2 !== void 0 && _shixunsDetail$detail2.secret_repository)) {} else { handleChangeNext(checked); } }, onCancel: function onCancel() { var _shixunsDetail$detail3; if (!isRepository && !(shixunsDetail !== null && shixunsDetail !== void 0 && (_shixunsDetail$detail3 = shixunsDetail.detail) !== null && _shixunsDetail$detail3 !== void 0 && _shixunsDetail$detail3.secret_repository)) { handleChangeNext(checked); } } }); case 14: case "end": return _context9.stop(); } }, _callee9); })); return function handleChange(_x10) { return _ref9.apply(this, arguments); }; }(); var handleChangeNext = /*#__PURE__*/function () { var _ref10 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee10(checked) { return regeneratorRuntime_default()().wrap(function _callee10$(_context10) { while (1) switch (_context10.prev = _context10.next) { case 0: if (!isRepository) { _context10.next = 6; break; } _context10.next = 3; return (0,shixuns/* createRepository */.h4)(objectSpread2_default()({}, params)); case 3: dispatch({ type: 'practiceSetting/getCommonData', payload: objectSpread2_default()({}, params) }); _context10.next = 8; break; case 6: _context10.next = 8; return (0,shixuns/* createSecretRepository */.K0)(objectSpread2_default()(objectSpread2_default()({}, params), {}, { is_secret_repository: checked })); case 8: handleGetRepository(); dispatch({ type: "shixunsDetail/getShixunsDetail", payload: { id: params.id } }); case 10: case "end": return _context10.stop(); } }, _callee10); })); return function handleChangeNext(_x11) { return _ref10.apply(this, arguments); }; }(); var onDragEnter = function onDragEnter(info) { console.log(info); // expandedKeys 需要受控时设置 // this.setState({ // expandedKeys: info.expandedKeys, // }); }; var onDrop = /*#__PURE__*/function () { var _ref11 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee11(info) { var dropKey, dragKey, dropPos, dropPosition, res, p, loop, data, dragObj, ar, i; return regeneratorRuntime_default()().wrap(function _callee11$(_context11) { while (1) switch (_context11.prev = _context11.next) { case 0: console.log(info); dropKey = info.node.key; dragKey = info.dragNode.key; dropPos = info.node.pos.split('-'); dropPosition = info.dropPosition - Number(dropPos[dropPos.length - 1]); if (!(info.node.type !== 'tree' || info.dragNode.path.split("/").length === 1)) { _context11.next = 8; break; } message/* default */.ZP.warning("未移动文件目录位置"); return _context11.abrupt("return"); case 8: _context11.next = 10; return dispatch({ type: "shixunsDetail/moveGitFile", payload: { id: params.id, from: info.dragNode.path, to: info.node.path + '/' + info.dragNode.name, message: "".concat(info.dragNode.path, " move to ").concat(info.node.path + '/' + info.dragNode.name, " ") } }); case 10: res = _context11.sent; if (!(res.status === 0)) { _context11.next = 22; break; } selectPath(''); p = info.dragNode.path.split("/"); p.pop(); _context11.next = 17; return handleGetRepository(info.node.path); case 17: _context11.next = 19; return handleGetRepository(p.join("/")); case 19: p.pop(); _context11.next = 22; return handleGetRepository(p.join("/")); case 22: return _context11.abrupt("return"); case 28: case "end": return _context11.stop(); } }, _callee11); })); return function onDrop(_x12) { return _ref11.apply(this, arguments); }; }(); return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", { className: Treemodules.bg, children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", { className: Treemodules.contentbg, children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { className: Treemodules.wrap, children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, { className: Treemodules.gitCode, children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, { flex: "1", children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", { className: "iconfont icon-daimacangku2 mr8" }), isRepository ? "代码仓库" : "私密代码仓库"] }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { children: /*#__PURE__*/(0,jsx_runtime.jsx)(dropdown/* default */.Z, { dropdownRender: function dropdownRender() { return menu({ type: "topTree" }); }, className: "current", children: /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, { open: visibleTip, title: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { className: "font16", children: [/*#__PURE__*/(0,jsx_runtime.jsx)(EllipsisOutlined/* default */.Z, { style: { position: "relative", left: -35 }, onClick: function onClick() { return closeTip(); } }), "\u70B9\u51FB\u6B64\u5904\u65B0\u5EFA\u6587\u4EF6\u3001\u65B0\u5EFA\u6587\u4EF6\u5939\u3001\u4E0A\u4F20\u6587\u4EF6\u3002", /*#__PURE__*/(0,jsx_runtime.jsx)("span", { onClick: function onClick() { return closeTip(); }, className: "iconfont icon-guanbi1 ml8 current font14" })] }), overlayClassName: Treemodules.overlayClass, overlayStyle: { maxWidth: 500 }, arrowPointAtCenter: true, placement: "right", color: "#F7B500" }) }) })] }), !!treeData.length && !isRepository && /*#__PURE__*/(0,jsx_runtime.jsx)("div", { className: "mt20 pl20 pr20 font14 c-white", children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", { children: "\u5B9E\u8BAD\u8BC4\u6D4B\u7684\u65F6\u5019\uFF0C\u7CFB\u7EDF\u4F1A\u4E34\u65F6\u5C06\u79C1\u5BC6\u4EE3\u7801\u5E93\u79FB\u52A8\u666E\u901A\u4EE3\u7801\u5E93\u7684secret\u76EE\u5F55\u4E0B\u9762\uFF0C\u8BC4\u6D4B\u7ED3\u675F\u4F1A\u6E05\u7A7Asecret\u76EE\u5F55\u5185\u5BB9\u3002\u5982\u679C\u79C1\u5BC6\u4EE3\u7801\u5E93\u4E2D\u5B58\u5728\u6587\u4EF6src/test.sh\uFF0C\u5728\u666E\u901A\u4EE3\u7801\u5E93\u8C03\u7528\u8BE5\u6587\u4EF6\u5219\u4F7F\u7528\u8DEF\u5F84\uFF1Asecret/src/test.sh" }) }), treeData.length ? /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, { children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", { className: Treemodules.content, children: /*#__PURE__*/(0,jsx_runtime.jsx)(DirectoryTree // checkable={editable} , { disabled: !!loading.effects['shixunsDetail/getFileContent'], multiple: true, showIcon: false, treeData: treeData, switcherIcon: /*#__PURE__*/(0,jsx_runtime.jsx)(DownOutlined/* default */.Z, { style: { fontWeight: "bold", fontSize: 14, position: "relative", top: 3, marginLeft: 22 } }), onExpand: handleExpand, expandedKeys: expandedKeys, selectedKeys: selectedKeys // loadData={loadData} // loadedKeys={[]} , onSelect: handleSelectTree, draggable: { icon: false }, onDragEnter: onDragEnter, onDrop: onDrop, allowDrop: function allowDrop(_ref12) { var dropNode = _ref12.dropNode, dropPosition = _ref12.dropPosition; return false; } // onCheck={handleCheckTree} }) }) }) : '', !treeData.length && isRepository && (shixunsDetail === null || shixunsDetail === void 0 || (_shixunsDetail$detail4 = shixunsDetail.detail) === null || _shixunsDetail$detail4 === void 0 ? void 0 : _shixunsDetail$detail4.init_repository) && /*#__PURE__*/(0,jsx_runtime.jsx)(NoData, {}), !treeData.length && !isRepository && (shixunsDetail === null || shixunsDetail === void 0 || (_shixunsDetail$detail5 = shixunsDetail.detail) === null || _shixunsDetail$detail5 === void 0 ? void 0 : _shixunsDetail$detail5.secret_repository) && /*#__PURE__*/(0,jsx_runtime.jsx)(NoData, {})] }) }), /*#__PURE__*/(0,jsx_runtime.jsx)(RenameFile, { taskData: taskData, open: showRenameFile, defaultPath: defaultPath, onClose: function onClose() { return setShowRenameFile(false); }, isRepository: !isRepository, onOK: /*#__PURE__*/function () { var _ref13 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee12(data) { var pathArr; return regeneratorRuntime_default()().wrap(function _callee12$(_context12) { while (1) switch (_context12.prev = _context12.next) { case 0: // insertFile(data.path, data.name) pathArr = defaultPath.split("/"); pathArr.pop(); _context12.next = 4; return handleGetRepository(pathArr.join("/")); case 4: selectPath(""); case 5: case "end": return _context12.stop(); } }, _callee12); })); return function (_x13) { return _ref13.apply(this, arguments); }; }() }), /*#__PURE__*/(0,jsx_runtime.jsx)(components_AddFile, { taskData: taskData, visible: showAddFile, defaultPath: defaultPath, onClose: function onClose() { return setShowAddFile(false); }, isRepository: isRepository, onOK: function onOK(data) { insertFile(data.path, data.name); } }), /*#__PURE__*/(0,jsx_runtime.jsx)(AddFolder, { taskData: taskData, visible: showAddFolder, defaultPath: defaultPath, onClose: function onClose() { return setShowAddFolder(false); }, isRepository: isRepository, onOK: function onOK(data) { insertFile(data.path, data.name); } }), /*#__PURE__*/(0,jsx_runtime.jsx)(components_UploadFile, { taskData: taskData, defaultPath: defaultPath, visible: showUploadFile, isRepository: isRepository, onClose: function onClose() { return setShowUploadFile(false); }, onOK: /*#__PURE__*/function () { var _ref14 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee13(data) { var pathArr; return regeneratorRuntime_default()().wrap(function _callee13$(_context13) { while (1) switch (_context13.prev = _context13.next) { case 0: pathArr = defaultPath.split("/"); _context13.next = 3; return handleGetRepository(defaultPath); case 3: expandedKeys = [pathArr[0] || '']; selectedKeys = [defaultPath]; setSelectedKeys(toConsumableArray_default()(selectedKeys)); setExpandedKeys(toConsumableArray_default()(expandedKeys)); case 7: case "end": return _context13.stop(); } }, _callee13); })); return function (_x14) { return _ref14.apply(this, arguments); }; }() }), /*#__PURE__*/(0,jsx_runtime.jsx)(components_SelectFilePathModal, { pathList: defaultPath === null || defaultPath === void 0 ? void 0 : defaultPath.split("/"), showInputPath: true, isMergeSelectFile: isMergeSelectFile, onFinish: function onFinish(path) { isMergeSelectFile ? handleMergeSelectFile(path) : handleGetRepository(path); setIsMergeSelectFile(false); } })] }); }; var NoData = function NoData() { return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { className: "mt20 pb50 ".concat(Treemodules.nodata), children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", { className: Treemodules.headLeft, children: ["\u63D0\u793A\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u6B64\u5904\u5B58\u653E\u672C\u5B9E\u8BAD\u6240\u9700\u7684\u6240\u6709\u4EE3\u7801\u7B49\u76F8\u5173\u6587\u4EF6\uFF0C\u4F60\u53EF\u4EE5\u901A\u8FC7\u4EE5\u4E0B", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u4E24\u79CD\u65B9\u5F0F\u6765\u4F7F\u7528\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "1\u3001", /*#__PURE__*/(0,jsx_runtime.jsx)("a", { href: "/forums/2784", target: "_blank", children: "Git\u5BA2\u6237\u7AEF" }), " \u4E0A\u4F20\u5DF2\u6709\u6587\u4EF6\u6765\u5F00\u59CB\u4F7F\u7528\u3002", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "2\u3001\u76F4\u63A5\u5728\u5E73\u53F0\u4E0A\u521B\u5EFA\u6587\u4EF6\u76EE\u5F55\u4EE5\u53CA\u76F8\u5173\u4EE3\u7801\u6587\u4EF6\u3002"] }), /*#__PURE__*/(0,jsx_runtime.jsx)("img", { width: "100%", src: ImagesIcon/* repositoryNoneDataIcon */.Oe })] }); }; /* harmony default export */ var Tree = ((0,_umi_production_exports.connect)(function (_ref15) { var shixunsDetail = _ref15.shixunsDetail, loading = _ref15.loading, globalSetting = _ref15.globalSetting, practiceSetting = _ref15.practiceSetting, user = _ref15.user; return { shixunsDetail: shixunsDetail, globalSetting: globalSetting, user: user, practiceSetting: practiceSetting, loading: loading }; })(Repository)); ;// CONCATENATED MODULE: ./src/pages/Demo/Warehouse/components/Commit.less?modules // extracted by mini-css-extract-plugin /* harmony default export */ var Commitmodules = ({"flex_box_center":"flex_box_center___e0Vsb","flex_space_between":"flex_space_between___fOYBZ","flex_box_vertical_center":"flex_box_vertical_center___etkby","flex_box_center_end":"flex_box_center_end___T2Etw","flex_box_column":"flex_box_column___pALN8","commitWrap":"commitWrap___Mdvi5","wrap":"wrap___ORj56","colorGray":"colorGray___Q64q1","content":"content___PuAlb","itemTime":"itemTime___IfizK","imageUrl":"imageUrl___BCM2C","blueLight":"blueLight___D24GG","divider":"divider___pIU7h","empty":"empty___F575C"}); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/index.js + 1 modules var divider = __webpack_require__(28103); ;// CONCATENATED MODULE: ./src/pages/Demo/Warehouse/components/Commit.tsx var Commit_excluded = ["shixunsDetail", "globalSetting", "loading", "user", "dispatch", "isRepository"]; // import Right from '../../components/Right'; var Commit = function Commit(_ref) { var shixunsDetail = _ref.shixunsDetail, globalSetting = _ref.globalSetting, loading = _ref.loading, user = _ref.user, dispatch = _ref.dispatch, isRepository = _ref.isRepository, props = objectWithoutProperties_default()(_ref, Commit_excluded); var params = objectSpread2_default()(objectSpread2_default()({}, (0,_umi_production_exports.useParams)()), (0,_umi_production_exports.useLocation)().query); var _useState = (0,_react_17_0_2_react.useState)([]), _useState2 = slicedToArray_default()(_useState, 2), commitList = _useState2[0], setCommitList = _useState2[1]; (0,_react_17_0_2_react.useEffect)(function () { getRepositoryCommit(); }, [isRepository]); var getRepositoryCommit = /*#__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 dispatch({ type: 'shixunsDetail/getRepositoryCommit', payload: { id: params.id, secret_repository: isRepository ? undefined : true } }); case 2: res = _context.sent; if (res) { setCommitList(res.commits || []); } case 4: case "end": return _context.stop(); } }, _callee); })); return function getRepositoryCommit() { return _ref2.apply(this, arguments); }; }(); return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { children: [commitList == '' && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { className: Commitmodules.empty, children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", { src: ImagesIcon/* emptyIcon2 */.em, width: "258" }), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", { className: "c-grey-c font14", children: "\u6682\u65E0\u63D0\u4EA4\u8BB0\u5F55" })] }), commitList != '' && /*#__PURE__*/(0,jsx_runtime.jsx)("section", { className: Commitmodules.bg, children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", { className: Commitmodules.wrap, children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", { className: Commitmodules.content, children: commitList === null || commitList === void 0 ? void 0 : commitList.map(function (item) { var _item$author, _item$author2; return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { children: [/*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, { align: "middle", className: "c-white font16", children: /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { children: item.title }) }), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, { align: "middle", className: "mt20 ", children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", { className: Commitmodules.imageUrl, src: env/* default */.Z.IMG_SERVER + '/' + ((_item$author = item.author) === null || _item$author === void 0 ? void 0 : _item$author.image_url) }) }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { className: Commitmodules.blueLight, children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { className: "ml20", children: (_item$author2 = item.author) === null || _item$author2 === void 0 ? void 0 : _item$author2.username }) }), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, { children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", { className: "ml20 ".concat(Commitmodules.blueLight), children: "\u63D0\u4EA4\u4E8E" }), /*#__PURE__*/(0,jsx_runtime.jsx)("span", { className: "ml20 ".concat(Commitmodules.blueLight), children: item.time })] })] }), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, { className: Commitmodules.divider })] }); }) }) }) })] }); }; /* harmony default export */ var components_Commit = ((0,_umi_production_exports.connect)(function (_ref3) { var shixunsDetail = _ref3.shixunsDetail, loading = _ref3.loading, globalSetting = _ref3.globalSetting, user = _ref3.user; return { shixunsDetail: shixunsDetail, globalSetting: globalSetting, user: user, loading: loading.models.index }; })(Commit)); // EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 1 modules var PreviewAll = __webpack_require__(1498); ;// CONCATENATED MODULE: ./src/pages/Demo/Warehouse/index.tsx var Warehouse_excluded = ["globalSetting", "loading", "dispatch", "practiceSetting", "shixunsDetail", "taskData", "taskId", "onEditRepCode"]; // import Complete from '../../components/Complete'; var TabPane = tabs/* default */.Z.TabPane; var Warehouse = function Warehouse(_ref) { var _taskData$user, _practiceSetting$side2, _practiceSetting$side7, _practiceSetting$side9, _practiceSetting$side10, _shixunsDetail$detail4; var globalSetting = _ref.globalSetting, loading = _ref.loading, dispatch = _ref.dispatch, practiceSetting = _ref.practiceSetting, shixunsDetail = _ref.shixunsDetail, taskData = _ref.taskData, taskId = _ref.taskId, onEditRepCode = _ref.onEditRepCode, props = objectWithoutProperties_default()(_ref, Warehouse_excluded); var hasNextGame = !(taskData !== null && taskData !== void 0 && taskData.is_last_game) && ((taskData === null || taskData === void 0 ? void 0 : taskData.shixun.status) > 0 || (taskData === null || taskData === void 0 || (_taskData$user = taskData.user) === null || _taskData$user === void 0 ? void 0 : _taskData$user.identity) < 5); var _useState = (0,_react_17_0_2_react.useState)("1"), _useState2 = slicedToArray_default()(_useState, 2), activeKey = _useState2[0], setActiveKey = _useState2[1]; var _useState3 = (0,_react_17_0_2_react.useState)("1"), _useState4 = slicedToArray_default()(_useState3, 2), tabKey = _useState4[0], setTabKey = _useState4[1]; var _useState5 = (0,_react_17_0_2_react.useState)(true), _useState6 = slicedToArray_default()(_useState5, 2), widthBool = _useState6[0], setWidthBool = _useState6[1]; var _useState7 = (0,_react_17_0_2_react.useState)({}), _useState8 = slicedToArray_default()(_useState7, 2), codeMirrorValue = _useState8[0], setCodeMirrorValue = _useState8[1]; var codeMirrorSourceValue = (0,_react_17_0_2_react.useRef)(); // let [codeMirrorSourceValue, setCodeMirrorSourceValue] = useState() var _useState9 = (0,_react_17_0_2_react.useState)(true), _useState10 = slicedToArray_default()(_useState9, 2), isRepository = _useState10[0], setIsRepository = _useState10[1]; var _useState11 = (0,_react_17_0_2_react.useState)(["2", "1"]), _useState12 = slicedToArray_default()(_useState11, 2), filePath = _useState12[0], setFilePath = _useState12[1]; var _useState13 = (0,_react_17_0_2_react.useState)([]), _useState14 = slicedToArray_default()(_useState13, 2), treeData = _useState14[0], setTreeData = _useState14[1]; var ref = (0,_react_17_0_2_react.useRef)(); var params = objectSpread2_default()(objectSpread2_default()({}, (0,_umi_production_exports.useParams)()), {}, { taskId: taskId }); var _useState15 = (0,_react_17_0_2_react.useState)(false), _useState16 = slicedToArray_default()(_useState15, 2), isLoading = _useState16[0], setIsLoading = _useState16[1]; var menuData = [{ id: "1", name: "代码仓库" }, { id: "2", name: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", { children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", { children: "\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93" }), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, { title: "\u79C1\u5BC6\u7248\u672C\u5E93\u7684\u6587\u4EF6\u5BF9\u5B66\u5458\u59CB\u7EC8\u9690\u85CF\uFF0C\u65E0\u6CD5\u8BBF\u95EE\u67E5\u770B\u3002", children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", { className: "iconfont icon-xiaowenhao", style: { marginLeft: 2, fontSize: 14 } }) })] }) }]; // useEffect(() => { // window.addEventListener('click', handleSkip); // return () => { // window.removeEventListener('click', handleSkip); // } // }, [widthBool]) (0,_react_17_0_2_react.useEffect)(function () { var _practiceSetting$side; var path = practiceSetting === null || practiceSetting === void 0 || (_practiceSetting$side = practiceSetting.sideBar) === null || _practiceSetting$side === void 0 ? void 0 : _practiceSetting$side.selectPath.split("/"); setFilePath(path); }, [practiceSetting === null || practiceSetting === void 0 || (_practiceSetting$side2 = practiceSetting.sideBar) === null || _practiceSetting$side2 === void 0 ? void 0 : _practiceSetting$side2.selectPath]); //父级找元素 // const parentIndexOf = (node: any, parent: any) => { // if (node.id === parent) { return node; } // for (let i = 0, n = node; n = n.parentNode; i++) { // if (n.id === parent) { return n; } // if (n == document.documentElement) { return false; } //找不到目标父节点,防止死循环 // } // } // const handleSkip = async (e: any) => { // if (!parentIndexOf(e.target, 'latex-drawer') && widthBool) { // setWidthBool(false) // } // } var messageData = function messageData(data) { if (data.data === "compileResltDone") { setIsLoading(false); } }; (0,_react_17_0_2_react.useEffect)(function () { window.addEventListener("message", messageData); return function () { window.removeEventListener("message", messageData); }; }, []); var updateCodeMirrorValue = function updateCodeMirrorValue(value) { // console.log(value, codeMirrorSourceValue, value === codeMirrorSourceValue.current, ":codeMirrorSourceValue") // if(!codeMirrorValue?.content) return; if ((codeMirrorValue === null || codeMirrorValue === void 0 ? void 0 : codeMirrorValue.file_type) === 'txt') { codeMirrorValue.content = value; setCodeMirrorValue(objectSpread2_default()({}, codeMirrorValue)); onEditRepCode(value); } // else { // codeMirrorValue.data = value; // setCodeMirrorValue({ ...codeMirrorValue }); // } }; (0,_react_17_0_2_react.useEffect)(function () { var _practiceSetting$side3; console.log(practiceSetting === null || practiceSetting === void 0 || (_practiceSetting$side3 = practiceSetting.sideBar) === null || _practiceSetting$side3 === void 0 ? void 0 : _practiceSetting$side3.selectPath, 'sideBar'); new Promise( /*#__PURE__*/function () { var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(resolve, reject) { var _practiceSetting$side4, _practiceSetting$side5; var _practiceSetting$side6, res, _res$content, _res$content2, _res$content3; return regeneratorRuntime_default()().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: if (!((practiceSetting === null || practiceSetting === void 0 || (_practiceSetting$side4 = practiceSetting.sideBar) === null || _practiceSetting$side4 === void 0 ? void 0 : _practiceSetting$side4.selectPath) !== '' && practiceSetting !== null && practiceSetting !== void 0 && (_practiceSetting$side5 = practiceSetting.sideBar) !== null && _practiceSetting$side5 !== void 0 && _practiceSetting$side5.selectPath)) { _context.next = 5; break; } _context.next = 3; return (0,service/* fetchCode */.li)(taskId, { path: practiceSetting === null || practiceSetting === void 0 || (_practiceSetting$side6 = practiceSetting.sideBar) === null || _practiceSetting$side6 === void 0 ? void 0 : _practiceSetting$side6.selectPath }); case 3: res = _context.sent; if (res !== null && res !== void 0 && res.content || (res === null || res === void 0 ? void 0 : res.content) == '') { try { if ((res === null || res === void 0 ? void 0 : res.file_type) === 'txt') { res.content = window.decodeURIComponent(escape(window.atob((_res$content = res.content) === null || _res$content === void 0 ? void 0 : _res$content.content))); setCodeMirrorValue(objectSpread2_default()({}, res)); // setCodeMirrorValue(codeMirrorValue) } else { res.content = (_res$content2 = res.content) === null || _res$content2 === void 0 ? void 0 : _res$content2.content; setCodeMirrorValue(objectSpread2_default()({}, res)); // res.content = res.content // setCodeMirrorValue(codeMirrorValue) } } catch (e) { if (codeMirrorValue.content) res.content = window.atob((_res$content3 = res.content) === null || _res$content3 === void 0 ? void 0 : _res$content3.content); setCodeMirrorValue(objectSpread2_default()({}, res)); message/* default */.ZP.warning("请确认文件字符集编码是否为UTF-8"); } } else { dispatch({ type: 'practiceSetting/setSideBarTabs', payload: { selectPath: '' } }); } case 5: case "end": return _context.stop(); } }, _callee); })); return function (_x, _x2) { return _ref2.apply(this, arguments); }; }()); }, [practiceSetting === null || practiceSetting === void 0 || (_practiceSetting$side7 = practiceSetting.sideBar) === null || _practiceSetting$side7 === void 0 ? void 0 : _practiceSetting$side7.selectPath]); var menu = /*#__PURE__*/(0,jsx_runtime.jsxs)(es_menu/* default */.Z, { className: Warehousemodules.menu, onClick: function onClick(value) { var _shixunsDetail$detail; if (!(shixunsDetail !== null && shixunsDetail !== void 0 && (_shixunsDetail$detail = shixunsDetail.detail) !== null && _shixunsDetail$detail !== void 0 && _shixunsDetail$detail.secret_repository) && value.key === "2") { setTabKey("1"); } setActiveKey(value.key); if (value.key === "1") { setIsRepository(true); } else { setIsRepository(false); } }, children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_menu/* default */.Z.Item, { disabled: true, children: "\u5207\u6362\u4ED3\u5E93" }, "0"), menuData.filter(function (item) { var _shixunsDetail$detail2, _shixunsDetail$detail3; if (!(shixunsDetail !== null && shixunsDetail !== void 0 && (_shixunsDetail$detail2 = shixunsDetail.detail) !== null && _shixunsDetail$detail2 !== void 0 && _shixunsDetail$detail2.init_repository) || shixunsDetail !== null && shixunsDetail !== void 0 && (_shixunsDetail$detail3 = shixunsDetail.detail) !== null && _shixunsDetail$detail3 !== void 0 && _shixunsDetail$detail3.is_jupyter_lab) { return item.id !== '2'; } return item; }).map(function (item, key) { return /*#__PURE__*/(0,jsx_runtime.jsx)(es_menu/* default */.Z.Item, { className: "leaveClick", children: item.name }, item.id); })] }); var handleSave = /*#__PURE__*/function () { var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() { var _taskData$myshixun, _practiceSetting$side8, _taskData$game, _document$getElementB; var res; return regeneratorRuntime_default()().wrap(function _callee2$(_context2) { while (1) switch (_context2.prev = _context2.next) { case 0: setIsLoading(true); // const res = await dispatch({ // type: 'shixunsDetail/updateRepositoryFile', // payload: { // id: params.id, // path: shixunsDetail?.fileContent?.params?.path, // content: codeMirrorValue, // secret_repository: isRepository ? null : true, // } // }) _context2.next = 3; return (0,service/* updateCode */.n4)(taskData === null || taskData === void 0 || (_taskData$myshixun = taskData.myshixun) === null || _taskData$myshixun === void 0 ? void 0 : _taskData$myshixun.identifier, objectSpread2_default()(objectSpread2_default()({ path: practiceSetting === null || practiceSetting === void 0 || (_practiceSetting$side8 = practiceSetting.sideBar) === null || _practiceSetting$side8 === void 0 ? void 0 : _practiceSetting$side8.selectPath }, codeMirrorValue), {}, { evaluate: 0, game_id: taskData === null || taskData === void 0 || (_taskData$game = taskData.game) === null || _taskData$game === void 0 ? void 0 : _taskData$game.id })); case 3: res = _context2.sent; (_document$getElementB = document.getElementById("latexIframeRef")) === null || _document$getElementB === void 0 || (_document$getElementB = _document$getElementB.contentWindow) === null || _document$getElementB === void 0 || _document$getElementB.postMessage('compile', '*'); if (res !== null && res !== void 0 && res.content) { dispatch({ type: 'practiceSetting/setSideBarTabs', payload: objectSpread2_default()(objectSpread2_default()({}, practiceSetting.sideBar), {}, { confirmLeave: false }) }); } case 6: case "end": return _context2.stop(); } }, _callee2); })); return function handleSave() { return _ref3.apply(this, arguments); }; }(); return /*#__PURE__*/(0,jsx_runtime.jsx)("div", { className: Warehousemodules.warehouse, children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { className: Warehousemodules.content, children: [tabKey === '1' && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("aside", { className: Warehousemodules.left, id: "latex-drawer", style: { width: widthBool ? '36%' : '0%' }, children: [/*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, { spinning: !!loading.effects['shixunsDetail/getRepository'], wrapperClassName: "".concat(Warehousemodules.loading, " ").concat(Warehousemodules.bottom0), children: /*#__PURE__*/(0,jsx_runtime.jsx)(Tree, { taskData: taskData, params: params, setTreeData: setTreeData, treeData: treeData, activeKey: activeKey, isRepository: isRepository }) }), /*#__PURE__*/(0,jsx_runtime.jsx)("span", { onClick: function onClick() { return setWidthBool(false); }, className: "".concat(Warehousemodules.close, " iconfont icon-quxiao") })] }), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", { className: Warehousemodules.right, ref: ref, children: [(practiceSetting === null || practiceSetting === void 0 || (_practiceSetting$side9 = practiceSetting.sideBar) === null || _practiceSetting$side9 === void 0 ? void 0 : _practiceSetting$side9.selectPath) !== '' && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(spin/* default */.Z, { spinning: !!loading.effects['shixunsDetail/getFileContent'], wrapperClassName: Warehousemodules.loading, children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", { className: Warehousemodules.filePathWrp, children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, { align: "middle", className: "w100", children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", { onClick: function onClick() { return setWidthBool(true); }, className: "iconfont icon-daimacangku2 c-white current" }) }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { flex: "40px", children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", { className: Warehousemodules.line, style: { marginLeft: 20 } }) }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { className: Warehousemodules.filePath, children: filePath.map(function (item, key) { return /*#__PURE__*/(0,jsx_runtime.jsx)("span", { className: "c-blue", children: item }); }) })] }) }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", { className: !!loading.effects['shixunsDetail/getFileContent'] ? "hide" : "show", children: /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, { className: "darkBlue", style: { top: 66, height: "calc(100% - 60px)", position: 'absolute' }, filename: codeMirrorValue.filename, type: codeMirrorValue.file_type === "office" ? "download" : codeMirrorValue.file_type, data: codeMirrorValue.content, monacoEditor: { value: codeMirrorValue.content, language: codeMirrorValue.language, onChange: function onChange(value) { return updateCodeMirrorValue(value); }, options: { fontSize: 14, minimap: { enabled: false } } } }) })] }), (codeMirrorValue === null || codeMirrorValue === void 0 ? void 0 : codeMirrorValue.file_type) === "txt" && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { className: Warehousemodules.footer, children: [(taskData === null || taskData === void 0 ? void 0 : taskData.prev_game) && /*#__PURE__*/(0,jsx_runtime.jsx)("a", { href: "/tasks/".concat(taskData === null || taskData === void 0 ? void 0 : taskData.prev_game).concat(location.search), style: { marginRight: 'auto' }, onClick: function onClick(e) { e.preventDefault(); setTimeout(function () { return window.location.href = "/tasks/".concat(taskData === null || taskData === void 0 ? void 0 : taskData.prev_game).concat(location.search); }, 300); }, children: "\u4E0A\u4E00\u5173" }), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, { type: "primary", size: 'middle', loading: isLoading, onClick: handleSave, children: "\u5F00\u59CB\u7F16\u8BD1" }), hasNextGame && /*#__PURE__*/(0,jsx_runtime.jsx)("a", { href: "/tasks/".concat(taskData === null || taskData === void 0 ? void 0 : taskData.next_game).concat(location.search), style: { marginLeft: 'auto' }, onClick: function onClick(e) { var _taskData$shixun, _taskData$user2; e.preventDefault(); if (taskData !== null && taskData !== void 0 && (_taskData$shixun = taskData.shixun) !== null && _taskData$shixun !== void 0 && _taskData$shixun.task_pass || (taskData === null || taskData === void 0 ? void 0 : taskData.game.status) === 2 || (taskData === null || taskData === void 0 || (_taskData$user2 = taskData.user) === null || _taskData$user2 === void 0 ? void 0 : _taskData$user2.identity) < 5) { setTimeout(function () { return window.location.href = "/tasks/".concat(taskData === null || taskData === void 0 ? void 0 : taskData.next_game).concat(location.search); }, 300); return; } modal/* default */.Z.warning({ centered: true, width: 530, title: '提示', okText: '我知道了', content: /*#__PURE__*/(0,jsx_runtime.jsx)("p", { children: "\u8BE5\u5B9E\u8DF5\u9879\u76EE\u8BBE\u7F6E\u4E86\u4E0D\u5141\u8BB8\u8DF3\u5173\u3002\u901A\u8FC7\u5F53\u524D\u5173\u5361\u540E\uFF0C\u624D\u80FD\u8FDB\u5165\u4E0B\u4E00\u5173\u3002" }) }); }, children: "\u4E0B\u4E00\u5173" })] })] }), (practiceSetting === null || practiceSetting === void 0 || (_practiceSetting$side10 = practiceSetting.sideBar) === null || _practiceSetting$side10 === void 0 ? void 0 : _practiceSetting$side10.selectPath) == '' && (shixunsDetail === null || shixunsDetail === void 0 || (_shixunsDetail$detail4 = shixunsDetail.detail) === null || _shixunsDetail$detail4 === void 0 ? void 0 : _shixunsDetail$detail4.init_repository) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { className: Warehousemodules.empty, children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", { src: ImagesIcon/* emptyIcon */.x7, width: "258" }), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", { className: "c-grey-c", children: [!!(treeData !== null && treeData !== void 0 && treeData.length) && '在左侧代码仓库区域点击目录打开文件', !(treeData !== null && treeData !== void 0 && treeData.length) && '请先在左侧上传文件或新建文件!'] })] })] })] }), tabKey === '2' && /*#__PURE__*/(0,jsx_runtime.jsx)("div", { className: Warehousemodules.commit, children: /*#__PURE__*/(0,jsx_runtime.jsx)(components_Commit, { isRepository: isRepository }) })] }) }); }; /* harmony default export */ var Demo_Warehouse = ((0,_umi_production_exports.connect)(function (_ref4) { var loading = _ref4.loading, globalSetting = _ref4.globalSetting, practiceSetting = _ref4.practiceSetting, shixunsDetail = _ref4.shixunsDetail; return { globalSetting: globalSetting, loading: loading, practiceSetting: practiceSetting, shixunsDetail: shixunsDetail }; })(Warehouse)); ;// CONCATENATED MODULE: ./src/pages/Demo/index.tsx // let output = 'item\tgraph\nmyserver1.cpu.load5\tmyserver1.cpu.load\nmyserver1.cpu.load15\tmyserver1.cpu.load' // let actual_output = 'item\tgraph\r\nmyserver1.cpu.load5\tmyserver1.cpu.load\r\nmyserver1.cpu.load15\tmyserver1.cpu.load\r\n' /* harmony default export */ var Demo = (function (_ref) { var taskId = _ref.taskId, taskData = _ref.taskData, onEditRepCode = _ref.onEditRepCode; var iframeRef = (0,_react_17_0_2_react.useRef)(); var codeAreaContainerRef = (0,_react_17_0_2_react.useRef)(); var iframeSrc = (0,_react_17_0_2_react.useMemo)(function () { if (taskData) { var _taskData$challenge, _taskData$shixun, _taskData$myshixun; var path = taskData === null || taskData === void 0 || (_taskData$challenge = taskData.challenge) === null || _taskData$challenge === void 0 || (_taskData$challenge = _taskData$challenge.path) === null || _taskData$challenge === void 0 || (_taskData$challenge = _taskData$challenge.replace(";", ";")) === null || _taskData$challenge === void 0 ? void 0 : _taskData$challenge.split(";")[0]; return "https://latexjs.educoder.net/index.html?id=".concat(taskData === null || taskData === void 0 || (_taskData$shixun = taskData.shixun) === null || _taskData$shixun === void 0 ? void 0 : _taskData$shixun.identifier, "&path=").concat(path, "&taskId=").concat(taskId, "&myshixunId=").concat(taskData === null || taskData === void 0 || (_taskData$myshixun = taskData.myshixun) === null || _taskData$myshixun === void 0 ? void 0 : _taskData$myshixun.identifier, "&token=").concat((0,util/* getCookie */.ej)("_educoder_session")); } }, [taskData]); var test1 = function test1() { (0,fetch/* default */.ZP)("/api/home/test_sign.json", { method: "get", params: { id: 1, name: undefined, age: null, c: { a: 112 }, aa: [], test: "12321313", b: "" } }); }; var test2 = function test2() { (0,fetch/* default */.ZP)("/api/home/test_sign.json", { method: "get", params: {} }); }; var test3 = function test3() { (0,fetch/* default */.ZP)("/api/home/test_sign.json", { method: "post", body: { id: 1, name: undefined, age: null, c: {}, cc: { n: 1, p: 22 }, aa: [], dd: ["SDafadsf", "&&"], test: "12321313", b: "sadfjsdfjdkljflsajflasf&&&fdsahfasfasfasdfsadf" } }); }; var test4 = function test4() { (0,fetch/* default */.ZP)("/api/home/test_sign.json", { method: "post" // body:{ // } }); }; return /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, { style: { height: "100vh" }, ref: codeAreaContainerRef, children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { flex: "1", children: (taskData === null || taskData === void 0 ? void 0 : taskData.shixun) && /*#__PURE__*/(0,jsx_runtime.jsx)(Demo_Warehouse, { taskId: taskId, taskData: taskData, onEditRepCode: onEditRepCode }) }), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, { flex: "1", className: Demomodules.wrap, children: [/*#__PURE__*/(0,jsx_runtime.jsx)("iframe", { ref: iframeRef, id: "latexIframeRef", style: { width: "100%", border: "none", height: "100%" }, src: iframeSrc }), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", { className: Demomodules.full, onClick: function onClick() { if ((0,fullscreen/* IsFull */.vp)()) { (0,fullscreen/* exitFull */.BU)(); } else { (0,fullscreen/* requestFullScreen */.Dj)(codeAreaContainerRef.current); } }, children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", { className: "iconfont icon-quanping mr5 font12" }), "\u5168\u5C4F / \u9000\u51FA\u5168\u5C4F"] })] })] }); }); /***/ }), /***/ 99497: /*!**************************************************************************************************!*\ !*** ./src/pages/Shixuns/Detail/Repository/components/SelectFilePathModal/index.tsx + 1 modules ***! \**************************************************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { Z: function() { return /* binding */ components_SelectFilePathModal; } }); // 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); // EXTERNAL MODULE: ./src/.umi-production/exports.ts + 8 modules var _umi_production_exports = __webpack_require__(7181); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules var es_form = __webpack_require__(78241); // 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/modal/index.js + 16 modules var modal = __webpack_require__(43418); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules var input = __webpack_require__(1056); ;// CONCATENATED MODULE: ./src/pages/Shixuns/Detail/Repository/components/SelectFilePathModal/index.less?modules // extracted by mini-css-extract-plugin /* harmony default export */ var SelectFilePathModalmodules = ({"wrap":"wrap___TwY3U","content":"content___Ks95W","mainPathWrap":"mainPathWrap___CrMaa","colorBlue":"colorBlue___dvWbP"}); // EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js var jsx_runtime = __webpack_require__(37712); ;// CONCATENATED MODULE: ./src/pages/Shixuns/Detail/Repository/components/SelectFilePathModal/index.tsx var SelectFilePathModal = function SelectFilePathModal(_ref) { var shixunsDetail = _ref.shixunsDetail, globalSetting = _ref.globalSetting, loading = _ref.loading, dispatch = _ref.dispatch, title = _ref.title, _ref$pathList = _ref.pathList, propsPathList = _ref$pathList === void 0 ? [] : _ref$pathList, _ref$showInputPath = _ref.showInputPath, showInputPath = _ref$showInputPath === void 0 ? false : _ref$showInputPath, _ref$isMergeSelectFil = _ref.isMergeSelectFile, isMergeSelectFile = _ref$isMergeSelectFil === void 0 ? false : _ref$isMergeSelectFil, _ref$onFinish = _ref.onFinish, onFinish = _ref$onFinish === void 0 ? function () {} : _ref$onFinish; var _Form$useForm = es_form/* default */.Z.useForm(), _Form$useForm2 = slicedToArray_default()(_Form$useForm, 1), form = _Form$useForm2[0]; var params = (0,_umi_production_exports.useParams)(); var location = (0,_umi_production_exports.useLocation)(); var isRepository = (0,_react_17_0_2_react.useRef)(); var _useState = (0,_react_17_0_2_react.useState)(''), _useState2 = slicedToArray_default()(_useState, 2), selectPath = _useState2[0], setSelectPath = _useState2[1]; var _useState3 = (0,_react_17_0_2_react.useState)(''), _useState4 = slicedToArray_default()(_useState3, 2), originPath = _useState4[0], setOriginPath = _useState4[1]; var _useState5 = (0,_react_17_0_2_react.useState)([]), _useState6 = slicedToArray_default()(_useState5, 2), mainPathList = _useState6[0], setMainPathList = _useState6[1]; var _useState7 = (0,_react_17_0_2_react.useState)([]), _useState8 = slicedToArray_default()(_useState7, 2), treeList = _useState8[0], setTreeList = _useState8[1]; (0,_react_17_0_2_react.useEffect)(function () { var _location$pathname; isRepository.current = ((_location$pathname = location.pathname) === null || _location$pathname === void 0 || (_location$pathname = _location$pathname.split('/')) === null || _location$pathname === void 0 ? void 0 : _location$pathname[3]) === "repository"; }, []); (0,_react_17_0_2_react.useEffect)(function () { if (shixunsDetail.actionTabs.key !== 'Repository-SelectFilePath') { return; } var path = propsPathList.join('/'); var arr = []; propsPathList.map(function (item, index) { if (index === 0) { arr.push({ val: "根目录", path: "" }, { val: "/".concat(item), path: path }); } else { arr.push({ val: "/".concat(item), path: path }); } }); setMainPathList(arr); setSelectPath(path); setOriginPath(path); handleGetPathData(path); }, [shixunsDetail.actionTabs.key]); var handleGetPathData = /*#__PURE__*/function () { var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(path) { var res; return regeneratorRuntime_default()().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: _context.next = 2; return dispatch({ type: isRepository.current ? 'shixunsDetail/getRepository' : 'shixunsDetail/getSecretRepository', payload: { id: params.id, path: path } }); case 2: res = _context.sent; if (res) { setTreeList(res.trees || []); } case 4: case "end": return _context.stop(); } }, _callee); })); return function handleGetPathData(_x) { return _ref2.apply(this, arguments); }; }(); var handleClickTree = function handleClickTree(item) { var newPath = selectPath; if (item.type === "tree") { mainPathList.length ? mainPathList.push({ val: "/".concat(item.name), path: item.name }) : mainPathList.push({ val: "根目录", path: "" }, { val: "/".concat(item.name), path: item.name }); setMainPathList(mainPathList); newPath = selectPath ? "".concat(selectPath, "/").concat(item.name) : item.name; setSelectPath(newPath); } handleGetPathData(newPath); }; var handleClickMainPath = function handleClickMainPath(item, index) { var currentPathList = mainPathList.filter(function (_, key) { return key <= index; }); setMainPathList(currentPathList); // 排除 ”根目录“,将选中的路径连接,去掉第一个字符串 “/”,获取绝对路径 var currentPath = currentPathList.filter(function (_, key) { return key !== 0; }).map(function (item) { return item.val; }).join('').substr(1); setSelectPath(currentPath); handleGetPathData(currentPath); }; var handleOk = /*#__PURE__*/function () { var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() { var values, path, res; return regeneratorRuntime_default()().wrap(function _callee2$(_context2) { while (1) switch (_context2.prev = _context2.next) { case 0: values = form === null || form === void 0 ? void 0 : form.getFieldsValue(); path = selectPath ? "".concat(selectPath).concat(values !== null && values !== void 0 && values.name ? "/".concat(values === null || values === void 0 ? void 0 : values.name) : '') : values === null || values === void 0 ? void 0 : values.name; if (!isMergeSelectFile) { _context2.next = 6; break; } onFinish(path); handleCancel(); return _context2.abrupt("return"); case 6: if (!showInputPath) { _context2.next = 16; break; } _context2.next = 9; return form.validateFields(); case 9: _context2.next = 11; return dispatch({ type: 'shixunsDetail/uploadGitFolder', payload: objectSpread2_default()(objectSpread2_default()({}, { id: params.id, path: path }), isRepository.current ? {} : { secret_repository: true }) }); case 11: res = _context2.sent; onFinish(originPath); if (res.status === 0) { message/* default */.ZP.info('新建成功'); } _context2.next = 18; break; case 16: onFinish(path); message/* default */.ZP.success("选择文件目录成功"); case 18: handleCancel(); case 19: case "end": return _context2.stop(); } }, _callee2); })); return function handleOk() { return _ref3.apply(this, arguments); }; }(); var handleCancel = function handleCancel() { dispatch({ type: 'shixunsDetail/setActionTabs', payload: {} }); form.resetFields(); }; return /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, { centered: true, title: title || "新建文件夹", closable: false, keyboard: false, open: shixunsDetail.actionTabs.key === 'Repository-SelectFilePath', onOk: handleOk, onCancel: handleCancel, children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { className: SelectFilePathModalmodules.wrap, children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", { className: SelectFilePathModalmodules.content, children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", { className: SelectFilePathModalmodules.mainPathWrap, children: !!(mainPathList !== null && mainPathList !== void 0 && mainPathList.length) && mainPathList.map(function (item, index) { return /*#__PURE__*/(0,jsx_runtime.jsx)("a", { onClick: function onClick() { return handleClickMainPath(item, index); }, children: item.val }, index); }) }), !!(treeList !== null && treeList !== void 0 && treeList.length) && treeList.map(function (item, index) { return item.type === "tree" && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", { onClick: function onClick() { return handleClickTree(item); }, children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { className: "iconfont icon-wenjianjia ".concat(SelectFilePathModalmodules.colorBlue) }), item.name] }, index); })] }), /*#__PURE__*/(0,jsx_runtime.jsx)("label", { className: "mt5", children: "\u9009\u4E2D\u7684\u65B0\u5EFA\u6587\u4EF6\u5939\u76EE\u5F55\uFF1A" }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", { className: "mt5 mb5", children: selectPath }), showInputPath && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z, { form: form, scrollToFirstError: true, className: "mt20", children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, { name: "name", rules: [{ required: true, message: '请输入名称' }, { whitespace: true, message: '请勿输入空格' }], children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, { placeholder: "\u8BF7\u8F93\u5165\u65B0\u6587\u4EF6\u5939\u540D/\u5B50\u6587\u4EF6\u5939\u540D\u3002\uFF08\u5982\uFF1Asrc/step1\uFF09" }) }) })] }) }); }; /* harmony default export */ var components_SelectFilePathModal = ((0,_umi_production_exports.connect)(function (_ref4) { var shixunsDetail = _ref4.shixunsDetail, loading = _ref4.loading, globalSetting = _ref4.globalSetting; return { shixunsDetail: shixunsDetail, globalSetting: globalSetting, loading: loading.models.index }; })(SelectFilePathModal)); /***/ }), /***/ 57616: /*!*********************************!*\ !*** ./src/utils/fullscreen.ts ***! \*********************************/ /***/ (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; }, /* harmony export */ gH: function() { return /* binding */ fullscreenChange; }, /* harmony export */ vp: function() { return /* binding */ IsFull; } /* harmony export */ }); function requestFullScreen(element) { try { if (element.mozRequestFullScreen) { element.mozRequestFullScreen(); } else if (element.webkitRequestFullScreen) { element.webkitRequestFullScreen(); } } catch (e) { console.log(e, ":e"); } } function exitFull() { if (window.top.document.webkitExitFullscreen) { window.top.document.webkitExitFullscreen(); } else if (document.exitFullscreen) { window.top.document.exitFullscreen(); } else if (document.msExitFullscreen) { window.top.document.msExitFullscreen(); } else if (document.mozCancelFullScreen) { window.top.document.mozCancelFullScreen(); } } // esliint disabled var fullscreenChange = function fullscreenChange() { //['fullscreenchange','msfullscreenchange','webkitfullscreenchange', 'mozfullscreenchange'] if (document.webkitExitFullscreen) { // document.webkitExitFullscreen() return 'webkitfullscreenchange'; } else if (document.exitFullscreen) { // document.exitFullscreen() return 'fullscreenchange'; } else if (document.msExitFullscreen) { // document.msExitFullscreen() return 'msfullscreenchange'; } else if (document.mozCancelFullScreen) { // document.mozCancelFullScreen() return 'mozfullscreenchange'; } }; //判断是否全屏 function IsFull() { var fullscreenElement = window.top.document.fullscreenElement || window.top.document.mozFullscreenElement || window.top.document.webkitFullscreenElement; var fullscreenEnabled = document.fullscreenEnabled || document.mozFullscreenEnabled || document.webkitFullscreenEnabled; console.log("fullscreenElement", fullscreenElement); if (fullscreenElement == null) { return false; } else { return true; } } // document.addEventListener("mozfullscreenchange", function (event) { // console.log("mozfullscreenchange ", event); // if (IsFull()) { // console.log('进入全屏') // $("#closescreen").show(); // $("#openscreen").hide(); // } else { // console.log('退出全屏') // $("#closescreen").hide(); // $("#openscreen").show(); // } // }); // document.addEventListener("webkitfullscreenchange", function (event) { // console.log("webkitfullscreenchange", event); // if (IsFull()) { // console.log('进入全屏') // $("#closescreen").show(); // $("#openscreen").hide(); // } else { // console.log('退出全屏') // $("#closescreen").hide(); // $("#openscreen").show(); // } // }); // document.addEventListener("msfullscreenchange", function (event) { // console.log("msfullscreenchange", event); // if (IsFull()) { // console.log('进入全屏') // $("#closescreen").show(); // $("#openscreen").hide(); // } else { // console.log('退出全屏') // $("#closescreen").hide(); // $("#openscreen").show(); // } // }); /***/ }), /***/ 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; } /***/ }), /***/ 28103: /*!***********************************************************************!*\ !*** ./node_modules/_antd@5.9.0@antd/es/divider/index.js + 1 modules ***! \***********************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { Z: function() { return /* binding */ divider; } }); // 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/style/index.js var style = __webpack_require__(17313); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js var genComponentStyleHook = __webpack_require__(83116); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js var statistic = __webpack_require__(37613); ;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/style/index.js // ============================== Shared ============================== const genSharedDividerStyle = token => { const { componentCls, sizePaddingEdgeHorizontal, colorSplit, lineWidth, textPaddingInline, orientationMargin, verticalMarginInline } = token; return { [componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), { borderBlockStart: `${lineWidth}px solid ${colorSplit}`, // vertical '&-vertical': { position: 'relative', top: '-0.06em', display: 'inline-block', height: '0.9em', marginInline: verticalMarginInline, marginBlock: 0, verticalAlign: 'middle', borderTop: 0, borderInlineStart: `${lineWidth}px solid ${colorSplit}` }, '&-horizontal': { display: 'flex', clear: 'both', width: '100%', minWidth: '100%', margin: `${token.dividerHorizontalGutterMargin}px 0` }, [`&-horizontal${componentCls}-with-text`]: { display: 'flex', alignItems: 'center', margin: `${token.dividerHorizontalWithTextGutterMargin}px 0`, color: token.colorTextHeading, fontWeight: 500, fontSize: token.fontSizeLG, whiteSpace: 'nowrap', textAlign: 'center', borderBlockStart: `0 ${colorSplit}`, '&::before, &::after': { position: 'relative', width: '50%', borderBlockStart: `${lineWidth}px solid transparent`, // Chrome not accept `inherit` in `border-top` borderBlockStartColor: 'inherit', borderBlockEnd: 0, transform: 'translateY(50%)', content: "''" } }, [`&-horizontal${componentCls}-with-text-left`]: { '&::before': { width: `${orientationMargin * 100}%` }, '&::after': { width: `${100 - orientationMargin * 100}%` } }, [`&-horizontal${componentCls}-with-text-right`]: { '&::before': { width: `${100 - orientationMargin * 100}%` }, '&::after': { width: `${orientationMargin * 100}%` } }, [`${componentCls}-inner-text`]: { display: 'inline-block', paddingBlock: 0, paddingInline: textPaddingInline }, '&-dashed': { background: 'none', borderColor: colorSplit, borderStyle: 'dashed', borderWidth: `${lineWidth}px 0 0` }, [`&-horizontal${componentCls}-with-text${componentCls}-dashed`]: { '&::before, &::after': { borderStyle: 'dashed none none' } }, [`&-vertical${componentCls}-dashed`]: { borderInlineStartWidth: lineWidth, borderInlineEnd: 0, borderBlockStart: 0, borderBlockEnd: 0 }, [`&-plain${componentCls}-with-text`]: { color: token.colorText, fontWeight: 'normal', fontSize: token.fontSize }, [`&-horizontal${componentCls}-with-text-left${componentCls}-no-default-orientation-margin-left`]: { '&::before': { width: 0 }, '&::after': { width: '100%' }, [`${componentCls}-inner-text`]: { paddingInlineStart: sizePaddingEdgeHorizontal } }, [`&-horizontal${componentCls}-with-text-right${componentCls}-no-default-orientation-margin-right`]: { '&::before': { width: '100%' }, '&::after': { width: 0 }, [`${componentCls}-inner-text`]: { paddingInlineEnd: sizePaddingEdgeHorizontal } } }) }; }; // ============================== Export ============================== /* harmony default export */ var divider_style = ((0,genComponentStyleHook/* default */.Z)('Divider', token => { const dividerToken = (0,statistic/* merge */.TS)(token, { dividerHorizontalWithTextGutterMargin: token.margin, dividerHorizontalGutterMargin: token.marginLG, sizePaddingEdgeHorizontal: 0 }); return [genSharedDividerStyle(dividerToken)]; }, token => ({ textPaddingInline: '1em', orientationMargin: 0.05, verticalMarginInline: token.marginXS }))); ;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/divider/index.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 Divider = props => { const { getPrefixCls, direction, divider } = _react_17_0_2_react.useContext(context/* ConfigContext */.E_); const { prefixCls: customizePrefixCls, type = 'horizontal', orientation = 'center', orientationMargin, className, rootClassName, children, dashed, plain, style } = props, restProps = __rest(props, ["prefixCls", "type", "orientation", "orientationMargin", "className", "rootClassName", "children", "dashed", "plain", "style"]); const prefixCls = getPrefixCls('divider', customizePrefixCls); const [wrapSSR, hashId] = divider_style(prefixCls); const orientationPrefix = orientation.length > 0 ? `-${orientation}` : orientation; const hasChildren = !!children; const hasCustomMarginLeft = orientation === 'left' && orientationMargin != null; const hasCustomMarginRight = orientation === 'right' && orientationMargin != null; const classString = _classnames_2_3_2_classnames_default()(prefixCls, divider === null || divider === void 0 ? void 0 : divider.className, hashId, `${prefixCls}-${type}`, { [`${prefixCls}-with-text`]: hasChildren, [`${prefixCls}-with-text${orientationPrefix}`]: hasChildren, [`${prefixCls}-dashed`]: !!dashed, [`${prefixCls}-plain`]: !!plain, [`${prefixCls}-rtl`]: direction === 'rtl', [`${prefixCls}-no-default-orientation-margin-left`]: hasCustomMarginLeft, [`${prefixCls}-no-default-orientation-margin-right`]: hasCustomMarginRight }, className, rootClassName); const memoizedOrientationMargin = _react_17_0_2_react.useMemo(() => { if (typeof orientationMargin === 'number') { return orientationMargin; } if (/^\d+$/.test(orientationMargin)) { return Number(orientationMargin); } return orientationMargin; }, [orientationMargin]); const innerStyle = Object.assign(Object.assign({}, hasCustomMarginLeft && { marginLeft: memoizedOrientationMargin }), hasCustomMarginRight && { marginRight: memoizedOrientationMargin }); // Warning children not work in vertical mode if (false) {} return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({ className: classString, style: Object.assign(Object.assign({}, divider === null || divider === void 0 ? void 0 : divider.style), style) }, restProps, { role: "separator" }), children && type !== 'vertical' && /*#__PURE__*/_react_17_0_2_react.createElement("span", { className: `${prefixCls}-inner-text`, style: innerStyle }, children))); }; if (false) {} /* harmony default export */ var divider = (Divider); /***/ }), /***/ 38854: /*!************************************************************************!*\ !*** ./node_modules/_antd@5.9.0@antd/es/dropdown/index.js + 1 modules ***! \************************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { Z: function() { return /* binding */ es_dropdown; } }); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/dropdown.js var dropdown = __webpack_require__(91857); // 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/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/EllipsisOutlined.js + 1 modules var EllipsisOutlined = __webpack_require__(93319); // 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/context.js var context = __webpack_require__(36355); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/space/index.js + 3 modules var space = __webpack_require__(81327); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/space/Compact.js var Compact = __webpack_require__(33234); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/style/index.js + 1 modules var style = __webpack_require__(47211); ;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/dropdown-button.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 DropdownButton = props => { const { getPopupContainer: getContextPopupContainer, getPrefixCls, direction } = _react_17_0_2_react.useContext(context/* ConfigContext */.E_); const { prefixCls: customizePrefixCls, type = 'default', danger, disabled, loading, onClick, htmlType, children, className, menu, arrow, autoFocus, overlay, trigger, align, open, onOpenChange, placement, getPopupContainer, href, icon = /*#__PURE__*/_react_17_0_2_react.createElement(EllipsisOutlined/* default */.Z, null), title, buttonsRender = buttons => buttons, mouseEnterDelay, mouseLeaveDelay, overlayClassName, overlayStyle, destroyPopupOnHide, dropdownRender } = props, restProps = __rest(props, ["prefixCls", "type", "danger", "disabled", "loading", "onClick", "htmlType", "children", "className", "menu", "arrow", "autoFocus", "overlay", "trigger", "align", "open", "onOpenChange", "placement", "getPopupContainer", "href", "icon", "title", "buttonsRender", "mouseEnterDelay", "mouseLeaveDelay", "overlayClassName", "overlayStyle", "destroyPopupOnHide", "dropdownRender"]); const prefixCls = getPrefixCls('dropdown', customizePrefixCls); const buttonPrefixCls = `${prefixCls}-button`; const [wrapSSR, hashId] = (0,style/* default */.Z)(prefixCls); const dropdownProps = { menu, arrow, autoFocus, align, disabled, trigger: disabled ? [] : trigger, onOpenChange, getPopupContainer: getPopupContainer || getContextPopupContainer, mouseEnterDelay, mouseLeaveDelay, overlayClassName, overlayStyle, destroyPopupOnHide, dropdownRender }; const { compactSize, compactItemClassnames } = (0,Compact/* useCompactItemContext */.ri)(prefixCls, direction); const classes = _classnames_2_3_2_classnames_default()(buttonPrefixCls, compactItemClassnames, className, hashId); if ('overlay' in props) { dropdownProps.overlay = overlay; } if ('open' in props) { dropdownProps.open = open; } if ('placement' in props) { dropdownProps.placement = placement; } else { dropdownProps.placement = direction === 'rtl' ? 'bottomLeft' : 'bottomRight'; } const leftButton = /*#__PURE__*/_react_17_0_2_react.createElement(es_button/* default */.ZP, { type: type, danger: danger, disabled: disabled, loading: loading, onClick: onClick, htmlType: htmlType, href: href, title: title }, children); const rightButton = /*#__PURE__*/_react_17_0_2_react.createElement(es_button/* default */.ZP, { type: type, danger: danger, icon: icon }); const [leftButtonToRender, rightButtonToRender] = buttonsRender([leftButton, rightButton]); return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement(space/* default */.Z.Compact, Object.assign({ className: classes, size: compactSize, block: true }, restProps), leftButtonToRender, /*#__PURE__*/_react_17_0_2_react.createElement(dropdown/* default */.Z, Object.assign({}, dropdownProps), rightButtonToRender))); }; DropdownButton.__ANT_BUTTON = true; /* harmony default export */ var dropdown_button = (DropdownButton); ;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/dropdown/index.js "use client"; const Dropdown = dropdown/* default */.Z; Dropdown.Button = dropdown_button; /* harmony default export */ var es_dropdown = (Dropdown); /***/ }), /***/ 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); /***/ }), /***/ 57809: /*!**********************************************************!*\ !*** ./node_modules/_antd@5.9.0@antd/es/select/index.js ***! \**********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; /* 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_select__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-select */ 77861); /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! rc-util/es/omit */ 99468); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 59301); /* harmony import */ var _util_PurePanel__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../_util/PurePanel */ 53487); /* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../_util/motion */ 62892); /* harmony import */ var _util_statusUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../_util/statusUtils */ 19080); /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config-provider */ 36355); /* harmony import */ var _config_provider_DisabledContext__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../config-provider/DisabledContext */ 1684); /* harmony import */ var _config_provider_defaultRenderEmpty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../config-provider/defaultRenderEmpty */ 93891); /* harmony import */ var _config_provider_hooks_useSize__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../config-provider/hooks/useSize */ 19716); /* harmony import */ var _form_context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../form/context */ 32441); /* harmony import */ var _space_Compact__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../space/Compact */ 33234); /* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./style */ 14154); /* harmony import */ var _useBuiltinPlacements__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./useBuiltinPlacements */ 58582); /* harmony import */ var _useShowArrow__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./useShowArrow */ 84443); /* harmony import */ var _utils_iconUtil__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils/iconUtil */ 66339); "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; }; // TODO: 4.0 - codemod should help to change `filterOption` to support node props. const SECRET_COMBOBOX_MODE_DO_NOT_USE = 'SECRET_COMBOBOX_MODE_DO_NOT_USE'; const InternalSelect = (_a, ref) => { var _b; var { prefixCls: customizePrefixCls, bordered = true, className, rootClassName, getPopupContainer, popupClassName, dropdownClassName, listHeight = 256, placement, listItemHeight = 24, size: customizeSize, disabled: customDisabled, notFoundContent, status: customStatus, builtinPlacements, dropdownMatchSelectWidth, popupMatchSelectWidth, direction: propDirection, style, allowClear } = _a, props = __rest(_a, ["prefixCls", "bordered", "className", "rootClassName", "getPopupContainer", "popupClassName", "dropdownClassName", "listHeight", "placement", "listItemHeight", "size", "disabled", "notFoundContent", "status", "builtinPlacements", "dropdownMatchSelectWidth", "popupMatchSelectWidth", "direction", "style", "allowClear"]); const { getPopupContainer: getContextPopupContainer, getPrefixCls, renderEmpty, direction: contextDirection, virtual, popupMatchSelectWidth: contextPopupMatchSelectWidth, popupOverflow, select } = react__WEBPACK_IMPORTED_MODULE_2__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_3__/* .ConfigContext */ .E_); const prefixCls = getPrefixCls('select', customizePrefixCls); const rootPrefixCls = getPrefixCls(); const direction = propDirection !== null && propDirection !== void 0 ? propDirection : contextDirection; const { compactSize, compactItemClassnames } = (0,_space_Compact__WEBPACK_IMPORTED_MODULE_4__/* .useCompactItemContext */ .ri)(prefixCls, direction); const [wrapSSR, hashId] = (0,_style__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)(prefixCls); const mode = react__WEBPACK_IMPORTED_MODULE_2__.useMemo(() => { const { mode: m } = props; if (m === 'combobox') { return undefined; } if (m === SECRET_COMBOBOX_MODE_DO_NOT_USE) { return 'combobox'; } return m; }, [props.mode]); const isMultiple = mode === 'multiple' || mode === 'tags'; const showSuffixIcon = (0,_useShowArrow__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(props.suffixIcon, props.showArrow); const mergedPopupMatchSelectWidth = (_b = popupMatchSelectWidth !== null && popupMatchSelectWidth !== void 0 ? popupMatchSelectWidth : dropdownMatchSelectWidth) !== null && _b !== void 0 ? _b : contextPopupMatchSelectWidth; // ===================== Form Status ===================== const { status: contextStatus, hasFeedback, isFormItemInput, feedbackIcon } = react__WEBPACK_IMPORTED_MODULE_2__.useContext(_form_context__WEBPACK_IMPORTED_MODULE_7__/* .FormItemInputContext */ .aM); const mergedStatus = (0,_util_statusUtils__WEBPACK_IMPORTED_MODULE_8__/* .getMergedStatus */ .F)(contextStatus, customStatus); // ===================== Empty ===================== let mergedNotFound; if (notFoundContent !== undefined) { mergedNotFound = notFoundContent; } else if (mode === 'combobox') { mergedNotFound = null; } else { mergedNotFound = (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Select')) || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(_config_provider_defaultRenderEmpty__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z, { componentName: "Select" }); } // ===================== Icons ===================== const { suffixIcon, itemIcon, removeIcon, clearIcon } = (0,_utils_iconUtil__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z)(Object.assign(Object.assign({}, props), { multiple: isMultiple, hasFeedback, feedbackIcon, showSuffixIcon, prefixCls, showArrow: props.showArrow, componentName: 'Select' })); const mergedAllowClear = allowClear === true ? { clearIcon } : allowClear; const selectProps = (0,rc_util_es_omit__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z)(props, ['suffixIcon', 'itemIcon']); const rcSelectRtlDropdownClassName = classnames__WEBPACK_IMPORTED_MODULE_0___default()(popupClassName || dropdownClassName, { [`${prefixCls}-dropdown-${direction}`]: direction === 'rtl' }, rootClassName, hashId); const mergedSize = (0,_config_provider_hooks_useSize__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z)(ctx => { var _a; return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx; }); // ===================== Disabled ===================== const disabled = react__WEBPACK_IMPORTED_MODULE_2__.useContext(_config_provider_DisabledContext__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z); const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled; const mergedClassName = classnames__WEBPACK_IMPORTED_MODULE_0___default()({ [`${prefixCls}-lg`]: mergedSize === 'large', [`${prefixCls}-sm`]: mergedSize === 'small', [`${prefixCls}-rtl`]: direction === 'rtl', [`${prefixCls}-borderless`]: !bordered, [`${prefixCls}-in-form-item`]: isFormItemInput }, (0,_util_statusUtils__WEBPACK_IMPORTED_MODULE_8__/* .getStatusClassNames */ .Z)(prefixCls, mergedStatus, hasFeedback), compactItemClassnames, select === null || select === void 0 ? void 0 : select.className, className, rootClassName, hashId); // ===================== Placement ===================== const memoPlacement = react__WEBPACK_IMPORTED_MODULE_2__.useMemo(() => { if (placement !== undefined) { return placement; } return direction === 'rtl' ? 'bottomRight' : 'bottomLeft'; }, [placement, direction]); const mergedBuiltinPlacements = (0,_useBuiltinPlacements__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z)(builtinPlacements, popupOverflow); // ====================== Warning ====================== if (false) {} // ====================== Render ======================= return wrapSSR( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(rc_select__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .ZP, Object.assign({ ref: ref, virtual: virtual, showSearch: select === null || select === void 0 ? void 0 : select.showSearch }, selectProps, { style: Object.assign(Object.assign({}, select === null || select === void 0 ? void 0 : select.style), style), dropdownMatchSelectWidth: mergedPopupMatchSelectWidth, builtinPlacements: mergedBuiltinPlacements, transitionName: (0,_util_motion__WEBPACK_IMPORTED_MODULE_15__/* .getTransitionName */ .m)(rootPrefixCls, 'slide-up', props.transitionName), listHeight: listHeight, listItemHeight: listItemHeight, mode: mode, prefixCls: prefixCls, placement: memoPlacement, direction: direction, suffixIcon: suffixIcon, menuItemSelectedIcon: itemIcon, removeIcon: removeIcon, allowClear: mergedAllowClear, notFoundContent: mergedNotFound, className: mergedClassName, getPopupContainer: getPopupContainer || getContextPopupContainer, dropdownClassName: rcSelectRtlDropdownClassName, disabled: mergedDisabled }))); }; if (false) {} const Select = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.forwardRef(InternalSelect); // We don't care debug panel /* istanbul ignore next */ const PurePanel = (0,_util_PurePanel__WEBPACK_IMPORTED_MODULE_16__/* ["default"] */ .Z)(Select); Select.SECRET_COMBOBOX_MODE_DO_NOT_USE = SECRET_COMBOBOX_MODE_DO_NOT_USE; Select.Option = rc_select__WEBPACK_IMPORTED_MODULE_1__/* .Option */ .Wx; Select.OptGroup = rc_select__WEBPACK_IMPORTED_MODULE_1__/* .OptGroup */ .Xo; Select._InternalPanelDoNotUseOrYouWillBeFired = PurePanel; if (false) {} /* harmony default export */ __webpack_exports__["default"] = (Select); /***/ }), /***/ 81327: /*!*********************************************************************!*\ !*** ./node_modules/_antd@5.9.0@antd/es/space/index.js + 3 modules ***! \*********************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { Z: function() { return /* binding */ space; } }); // UNUSED EXPORTS: SpaceContext // EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js var _react_17_0_2_react = __webpack_require__(59301); // 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-util@5.38.1@rc-util/es/Children/toArray.js var toArray = __webpack_require__(45659); // 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/space/Compact.js var Compact = __webpack_require__(33234); ;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/space/context.js const SpaceContext = /*#__PURE__*/_react_17_0_2_react.createContext({ latestIndex: 0 }); const SpaceContextProvider = SpaceContext.Provider; ;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/space/Item.js "use client"; const Item = _ref => { let { className, index, children, split, style } = _ref; const { latestIndex } = _react_17_0_2_react.useContext(SpaceContext); if (children === null || children === undefined) { return null; } return /*#__PURE__*/_react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /*#__PURE__*/_react_17_0_2_react.createElement("div", { className: className, style: style }, children), index < latestIndex && split && /*#__PURE__*/_react_17_0_2_react.createElement("span", { className: `${className}-split` }, split)); }; /* harmony default export */ var space_Item = (Item); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/space/style/index.js + 1 modules var space_style = __webpack_require__(2856); ;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/space/utils.js function isPresetSize(size) { return ['small', 'middle', 'large'].includes(size); } function isValidGapNumber(size) { if (!size) { // The case of size = 0 is deliberately excluded here, because the default value of the gap attribute in CSS is 0, so if the user passes 0 in, we can directly ignore it. return false; } return typeof size === 'number' && !Number.isNaN(size); } ;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/space/index.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 Space = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => { var _a, _b; const { getPrefixCls, space, direction: directionConfig } = _react_17_0_2_react.useContext(context/* ConfigContext */.E_); const { size = (space === null || space === void 0 ? void 0 : space.size) || 'small', align, className, rootClassName, children, direction = 'horizontal', prefixCls: customizePrefixCls, split, style, wrap = false, classNames: customClassNames, styles } = props, otherProps = __rest(props, ["size", "align", "className", "rootClassName", "children", "direction", "prefixCls", "split", "style", "wrap", "classNames", "styles"]); const [horizontalSize, verticalSize] = Array.isArray(size) ? size : [size, size]; const isPresetVerticalSize = isPresetSize(verticalSize); const isPresetHorizontalSize = isPresetSize(horizontalSize); const isValidVerticalSize = isValidGapNumber(verticalSize); const isValidHorizontalSize = isValidGapNumber(horizontalSize); const childNodes = (0,toArray/* default */.Z)(children, { keepEmpty: true }); const mergedAlign = align === undefined && direction === 'horizontal' ? 'center' : align; const prefixCls = getPrefixCls('space', customizePrefixCls); const [wrapSSR, hashId] = (0,space_style/* default */.Z)(prefixCls); const cls = _classnames_2_3_2_classnames_default()(prefixCls, space === null || space === void 0 ? void 0 : space.className, hashId, `${prefixCls}-${direction}`, { [`${prefixCls}-rtl`]: directionConfig === 'rtl', [`${prefixCls}-align-${mergedAlign}`]: mergedAlign, [`${prefixCls}-gap-row-${verticalSize}`]: isPresetVerticalSize, [`${prefixCls}-gap-col-${horizontalSize}`]: isPresetHorizontalSize }, className, rootClassName); const itemClassName = _classnames_2_3_2_classnames_default()(`${prefixCls}-item`, (_a = customClassNames === null || customClassNames === void 0 ? void 0 : customClassNames.item) !== null && _a !== void 0 ? _a : (_b = space === null || space === void 0 ? void 0 : space.classNames) === null || _b === void 0 ? void 0 : _b.item); // Calculate latest one let latestIndex = 0; const nodes = childNodes.map((child, i) => { var _a, _b; if (child !== null && child !== undefined) { latestIndex = i; } const key = child && child.key || `${itemClassName}-${i}`; return /*#__PURE__*/_react_17_0_2_react.createElement(space_Item, { className: itemClassName, key: key, index: i, split: split, style: (_a = styles === null || styles === void 0 ? void 0 : styles.item) !== null && _a !== void 0 ? _a : (_b = space === null || space === void 0 ? void 0 : space.styles) === null || _b === void 0 ? void 0 : _b.item }, child); }); const spaceContext = _react_17_0_2_react.useMemo(() => ({ latestIndex }), [latestIndex]); // =========================== Render =========================== if (childNodes.length === 0) { return null; } const gapStyle = {}; if (wrap) { gapStyle.flexWrap = 'wrap'; } if (!isPresetHorizontalSize && isValidHorizontalSize) { gapStyle.columnGap = horizontalSize; } if (!isPresetVerticalSize && isValidVerticalSize) { gapStyle.rowGap = verticalSize; } return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({ ref: ref, className: cls, style: Object.assign(Object.assign(Object.assign({}, gapStyle), space === null || space === void 0 ? void 0 : space.style), style) }, otherProps), /*#__PURE__*/_react_17_0_2_react.createElement(SpaceContextProvider, { value: spaceContext }, nodes))); }); if (false) {} const CompoundedSpace = Space; CompoundedSpace.Compact = Compact/* default */.ZP; /* harmony default export */ var space = (CompoundedSpace); /***/ }), /***/ 51218: /*!********************************************************************!*\ !*** ./node_modules/_antd@5.9.0@antd/es/tree/index.js + 8 modules ***! \********************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { Z: function() { return /* binding */ tree; } }); // EXTERNAL MODULE: ./node_modules/_rc-tree@5.7.12@rc-tree/es/index.js + 7 modules var es = __webpack_require__(10253); // 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/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/FileOutlined.js + 1 modules var FileOutlined = __webpack_require__(87970); // EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/FolderOpenOutlined.js + 1 modules var FolderOpenOutlined = __webpack_require__(80354); // 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/FolderOutlined.js // This icon file is generated automatically. var FolderOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z" } }] }, "name": "folder", "theme": "outlined" }; /* harmony default export */ var asn_FolderOutlined = (FolderOutlined); // 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/FolderOutlined.js // GENERATE BY ./scripts/generate.ts // DON NOT EDIT IT MANUALLY var FolderOutlined_FolderOutlined = function FolderOutlined(props, ref) { return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { ref: ref, icon: asn_FolderOutlined })); }; if (false) {} /* harmony default export */ var icons_FolderOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(FolderOutlined_FolderOutlined)); // 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-tree@5.7.12@rc-tree/es/util.js var util = __webpack_require__(35654); // EXTERNAL MODULE: ./node_modules/_rc-tree@5.7.12@rc-tree/es/utils/treeUtil.js var treeUtil = __webpack_require__(71430); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js var context = __webpack_require__(36355); ;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/HolderOutlined.js // This icon file is generated automatically. var HolderOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z" } }] }, "name": "holder", "theme": "outlined" }; /* harmony default export */ var asn_HolderOutlined = (HolderOutlined); ;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/HolderOutlined.js // GENERATE BY ./scripts/generate.ts // DON NOT EDIT IT MANUALLY var HolderOutlined_HolderOutlined = function HolderOutlined(props, ref) { return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { ref: ref, icon: asn_HolderOutlined })); }; if (false) {} /* harmony default export */ var icons_HolderOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(HolderOutlined_HolderOutlined)); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/motion.js var _util_motion = __webpack_require__(62892); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tree/style/index.js var tree_style = __webpack_require__(20648); ;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/tree/utils/dropIndicator.js "use client"; const offset = 4; function dropIndicatorRender(props) { const { dropPosition, dropLevelOffset, prefixCls, indent, direction = 'ltr' } = props; const startPosition = direction === 'ltr' ? 'left' : 'right'; const endPosition = direction === 'ltr' ? 'right' : 'left'; const style = { [startPosition]: -dropLevelOffset * indent + offset, [endPosition]: 0 }; switch (dropPosition) { case -1: style.top = -3; break; case 1: style.bottom = -3; break; default: // dropPosition === 0 style.bottom = -3; style[startPosition] = indent + offset; break; } return /*#__PURE__*/_react_17_0_2_react.createElement("div", { style: style, className: `${prefixCls}-drop-indicator` }); } // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tree/utils/iconUtil.js + 2 modules var iconUtil = __webpack_require__(1711); ;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/tree/Tree.js "use client"; const Tree = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => { const { getPrefixCls, direction, virtual, tree } = _react_17_0_2_react.useContext(context/* ConfigContext */.E_); const { prefixCls: customizePrefixCls, className, showIcon = false, showLine, switcherIcon, blockNode = false, children, checkable = false, selectable = true, draggable, motion: customMotion, style } = props; const prefixCls = getPrefixCls('tree', customizePrefixCls); const rootPrefixCls = getPrefixCls(); const motion = customMotion !== null && customMotion !== void 0 ? customMotion : Object.assign(Object.assign({}, (0,_util_motion/* default */.Z)(rootPrefixCls)), { motionAppear: false }); const newProps = Object.assign(Object.assign({}, props), { checkable, selectable, showIcon, motion, blockNode, showLine: Boolean(showLine), dropIndicatorRender: dropIndicatorRender }); const [wrapSSR, hashId] = (0,tree_style/* default */.ZP)(prefixCls); const draggableConfig = _react_17_0_2_react.useMemo(() => { if (!draggable) { return false; } let mergedDraggable = {}; switch (typeof draggable) { case 'function': mergedDraggable.nodeDraggable = draggable; break; case 'object': mergedDraggable = Object.assign({}, draggable); break; default: break; // Do nothing } if (mergedDraggable.icon !== false) { mergedDraggable.icon = mergedDraggable.icon || /*#__PURE__*/_react_17_0_2_react.createElement(icons_HolderOutlined, null); } return mergedDraggable; }, [draggable]); const renderSwitcherIcon = nodeProps => /*#__PURE__*/_react_17_0_2_react.createElement(iconUtil/* default */.Z, { prefixCls: prefixCls, switcherIcon: switcherIcon, treeNodeProps: nodeProps, showLine: showLine }); return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement(es/* default */.Z, Object.assign({ itemHeight: 20, ref: ref, virtual: virtual }, newProps, { // newProps may contain style so declare style below it style: Object.assign(Object.assign({}, tree === null || tree === void 0 ? void 0 : tree.style), style), prefixCls: prefixCls, className: _classnames_2_3_2_classnames_default()({ [`${prefixCls}-icon-hide`]: !showIcon, [`${prefixCls}-block-node`]: blockNode, [`${prefixCls}-unselectable`]: !selectable, [`${prefixCls}-rtl`]: direction === 'rtl' }, tree === null || tree === void 0 ? void 0 : tree.className, className, hashId), direction: direction, checkable: checkable ? /*#__PURE__*/_react_17_0_2_react.createElement("span", { className: `${prefixCls}-checkbox-inner` }) : checkable, selectable: selectable, switcherIcon: renderSwitcherIcon, draggable: draggableConfig }), children)); }); if (false) {} /* harmony default export */ var tree_Tree = (Tree); ;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/tree/utils/dictUtil.js var Record; (function (Record) { Record[Record["None"] = 0] = "None"; Record[Record["Start"] = 1] = "Start"; Record[Record["End"] = 2] = "End"; })(Record || (Record = {})); function traverseNodesKey(treeData, callback) { function processNode(dataNode) { const { key, children } = dataNode; if (callback(key, dataNode) !== false) { traverseNodesKey(children || [], callback); } } treeData.forEach(processNode); } /** 计算选中范围,只考虑expanded情况以优化性能 */ function calcRangeKeys(_ref) { let { treeData, expandedKeys, startKey, endKey } = _ref; const keys = []; let record = Record.None; if (startKey && startKey === endKey) { return [startKey]; } if (!startKey || !endKey) { return []; } function matchKey(key) { return key === startKey || key === endKey; } traverseNodesKey(treeData, key => { if (record === Record.End) { return false; } if (matchKey(key)) { // Match test keys.push(key); if (record === Record.None) { record = Record.Start; } else if (record === Record.Start) { record = Record.End; return false; } } else if (record === Record.Start) { // Append selection keys.push(key); } return expandedKeys.includes(key); }); return keys; } function convertDirectoryKeysToNodes(treeData, keys) { const restKeys = (0,toConsumableArray/* default */.Z)(keys); const nodes = []; traverseNodesKey(treeData, (key, node) => { const index = restKeys.indexOf(key); if (index !== -1) { nodes.push(node); restKeys.splice(index, 1); } return !!restKeys.length; }); return nodes; } ;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/tree/DirectoryTree.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; }; function getIcon(props) { const { isLeaf, expanded } = props; if (isLeaf) { return /*#__PURE__*/_react_17_0_2_react.createElement(FileOutlined/* default */.Z, null); } return expanded ? /*#__PURE__*/_react_17_0_2_react.createElement(FolderOpenOutlined/* default */.Z, null) : /*#__PURE__*/_react_17_0_2_react.createElement(icons_FolderOutlined, null); } function getTreeData(_ref) { let { treeData, children } = _ref; return treeData || (0,treeUtil/* convertTreeToData */.zn)(children); } const DirectoryTree = (_a, ref) => { var { defaultExpandAll, defaultExpandParent, defaultExpandedKeys } = _a, props = __rest(_a, ["defaultExpandAll", "defaultExpandParent", "defaultExpandedKeys"]); // Shift click usage const lastSelectedKey = _react_17_0_2_react.useRef(); const cachedSelectedKeys = _react_17_0_2_react.useRef(); const getInitExpandedKeys = () => { const { keyEntities } = (0,treeUtil/* convertDataToEntities */.I8)(getTreeData(props)); let initExpandedKeys; // Expanded keys if (defaultExpandAll) { initExpandedKeys = Object.keys(keyEntities); } else if (defaultExpandParent) { initExpandedKeys = (0,util/* conductExpandParent */.r7)(props.expandedKeys || defaultExpandedKeys || [], keyEntities); } else { initExpandedKeys = props.expandedKeys || defaultExpandedKeys; } return initExpandedKeys; }; const [selectedKeys, setSelectedKeys] = _react_17_0_2_react.useState(props.selectedKeys || props.defaultSelectedKeys || []); const [expandedKeys, setExpandedKeys] = _react_17_0_2_react.useState(() => getInitExpandedKeys()); _react_17_0_2_react.useEffect(() => { if ('selectedKeys' in props) { setSelectedKeys(props.selectedKeys); } }, [props.selectedKeys]); _react_17_0_2_react.useEffect(() => { if ('expandedKeys' in props) { setExpandedKeys(props.expandedKeys); } }, [props.expandedKeys]); const onExpand = (keys, info) => { var _a; if (!('expandedKeys' in props)) { setExpandedKeys(keys); } // Call origin function return (_a = props.onExpand) === null || _a === void 0 ? void 0 : _a.call(props, keys, info); }; const onSelect = (keys, event) => { var _a; const { multiple } = props; const { node, nativeEvent } = event; const { key = '' } = node; const treeData = getTreeData(props); // const newState: DirectoryTreeState = {}; // We need wrap this event since some value is not same const newEvent = Object.assign(Object.assign({}, event), { selected: true }); // Windows / Mac single pick const ctrlPick = (nativeEvent === null || nativeEvent === void 0 ? void 0 : nativeEvent.ctrlKey) || (nativeEvent === null || nativeEvent === void 0 ? void 0 : nativeEvent.metaKey); const shiftPick = nativeEvent === null || nativeEvent === void 0 ? void 0 : nativeEvent.shiftKey; // Generate new selected keys let newSelectedKeys; if (multiple && ctrlPick) { // Control click newSelectedKeys = keys; lastSelectedKey.current = key; cachedSelectedKeys.current = newSelectedKeys; newEvent.selectedNodes = convertDirectoryKeysToNodes(treeData, newSelectedKeys); } else if (multiple && shiftPick) { // Shift click newSelectedKeys = Array.from(new Set([].concat((0,toConsumableArray/* default */.Z)(cachedSelectedKeys.current || []), (0,toConsumableArray/* default */.Z)(calcRangeKeys({ treeData, expandedKeys, startKey: key, endKey: lastSelectedKey.current }))))); newEvent.selectedNodes = convertDirectoryKeysToNodes(treeData, newSelectedKeys); } else { // Single click newSelectedKeys = [key]; lastSelectedKey.current = key; cachedSelectedKeys.current = newSelectedKeys; newEvent.selectedNodes = convertDirectoryKeysToNodes(treeData, newSelectedKeys); } (_a = props.onSelect) === null || _a === void 0 ? void 0 : _a.call(props, newSelectedKeys, newEvent); if (!('selectedKeys' in props)) { setSelectedKeys(newSelectedKeys); } }; const { getPrefixCls, direction } = _react_17_0_2_react.useContext(context/* ConfigContext */.E_); const { prefixCls: customizePrefixCls, className, showIcon = true, expandAction = 'click' } = props, otherProps = __rest(props, ["prefixCls", "className", "showIcon", "expandAction"]); const prefixCls = getPrefixCls('tree', customizePrefixCls); const connectClassName = _classnames_2_3_2_classnames_default()(`${prefixCls}-directory`, { [`${prefixCls}-directory-rtl`]: direction === 'rtl' }, className); return /*#__PURE__*/_react_17_0_2_react.createElement(tree_Tree, Object.assign({ icon: getIcon, ref: ref, blockNode: true }, otherProps, { showIcon: showIcon, expandAction: expandAction, prefixCls: prefixCls, className: connectClassName, expandedKeys: expandedKeys, selectedKeys: selectedKeys, onSelect: onSelect, onExpand: onExpand })); }; const ForwardDirectoryTree = /*#__PURE__*/_react_17_0_2_react.forwardRef(DirectoryTree); if (false) {} /* harmony default export */ var tree_DirectoryTree = (ForwardDirectoryTree); ;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/tree/index.js "use client"; const es_tree_Tree = tree_Tree; es_tree_Tree.DirectoryTree = tree_DirectoryTree; es_tree_Tree.TreeNode = es/* TreeNode */.O; /* harmony default export */ var tree = (es_tree_Tree); /***/ }), /***/ 25769: /*!**************************************************************************!*\ !*** ./node_modules/_copy-to-clipboard@3.3.3@copy-to-clipboard/index.js ***! \**************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var deselectCurrent = __webpack_require__(/*! toggle-selection */ 98040); var clipboardToIE11Formatting = { "text/plain": "Text", "text/html": "Url", "default": "Text" } var defaultMessage = "Copy to clipboard: #{key}, Enter"; function format(message) { var copyKey = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C"; return message.replace(/#{\s*key\s*}/g, copyKey); } function copy(text, options) { var debug, message, reselectPrevious, range, selection, mark, success = false; if (!options) { options = {}; } debug = options.debug || false; try { reselectPrevious = deselectCurrent(); range = document.createRange(); selection = document.getSelection(); mark = document.createElement("span"); mark.textContent = text; // avoid screen readers from reading out loud the text mark.ariaHidden = "true" // reset user styles for span element mark.style.all = "unset"; // prevents scrolling to the end of the page mark.style.position = "fixed"; mark.style.top = 0; mark.style.clip = "rect(0, 0, 0, 0)"; // used to preserve spaces and line breaks mark.style.whiteSpace = "pre"; // do not inherit user-select (it may be `none`) mark.style.webkitUserSelect = "text"; mark.style.MozUserSelect = "text"; mark.style.msUserSelect = "text"; mark.style.userSelect = "text"; mark.addEventListener("copy", function(e) { e.stopPropagation(); if (options.format) { e.preventDefault(); if (typeof e.clipboardData === "undefined") { // IE 11 debug && console.warn("unable to use e.clipboardData"); debug && console.warn("trying IE specific stuff"); window.clipboardData.clearData(); var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting["default"] window.clipboardData.setData(format, text); } else { // all other browsers e.clipboardData.clearData(); e.clipboardData.setData(options.format, text); } } if (options.onCopy) { e.preventDefault(); options.onCopy(e.clipboardData); } }); document.body.appendChild(mark); range.selectNodeContents(mark); selection.addRange(range); var successful = document.execCommand("copy"); if (!successful) { throw new Error("copy command was unsuccessful"); } success = true; } catch (err) { debug && console.error("unable to copy using execCommand: ", err); debug && console.warn("trying IE specific stuff"); try { window.clipboardData.setData(options.format || "text", text); options.onCopy && options.onCopy(window.clipboardData); success = true; } catch (err) { debug && console.error("unable to copy using clipboardData: ", err); debug && console.error("falling back to prompt"); message = format("message" in options ? options.message : defaultMessage); window.prompt(message, text); } } finally { if (selection) { if (typeof selection.removeRange == "function") { selection.removeRange(range); } else { selection.removeAllRanges(); } } if (mark) { document.body.removeChild(mark); } reselectPrevious(); } return success; } module.exports = copy; /***/ }), /***/ 83145: /*!**********************************************************************************************!*\ !*** ./node_modules/_react-copy-to-clipboard@5.0.2@react-copy-to-clipboard/lib/Component.js ***! \**********************************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CopyToClipboard = void 0; var _react = _interopRequireDefault(__webpack_require__(/*! react */ 59301)); var _copyToClipboard = _interopRequireDefault(__webpack_require__(/*! copy-to-clipboard */ 25769)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var CopyToClipboard = /*#__PURE__*/ function (_React$PureComponent) { _inherits(CopyToClipboard, _React$PureComponent); function CopyToClipboard() { var _getPrototypeOf2; var _this; _classCallCheck(this, CopyToClipboard); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(CopyToClipboard)).call.apply(_getPrototypeOf2, [this].concat(args))); _defineProperty(_assertThisInitialized(_this), "onClick", function (event) { var _this$props = _this.props, text = _this$props.text, onCopy = _this$props.onCopy, children = _this$props.children, options = _this$props.options; var elem = _react["default"].Children.only(children); var result = (0, _copyToClipboard["default"])(text, options); if (onCopy) { onCopy(text, result); } // Bypass onClick if it was present if (elem && elem.props && typeof elem.props.onClick === 'function') { elem.props.onClick(event); } }); return _this; } _createClass(CopyToClipboard, [{ key: "render", value: function render() { var _this$props2 = this.props, _text = _this$props2.text, _onCopy = _this$props2.onCopy, _options = _this$props2.options, children = _this$props2.children, props = _objectWithoutProperties(_this$props2, ["text", "onCopy", "options", "children"]); var elem = _react["default"].Children.only(children); return _react["default"].cloneElement(elem, _objectSpread({}, props, { onClick: this.onClick })); } }]); return CopyToClipboard; }(_react["default"].PureComponent); exports.CopyToClipboard = CopyToClipboard; _defineProperty(CopyToClipboard, "defaultProps", { onCopy: undefined, options: undefined }); /***/ }), /***/ 56102: /*!******************************************************************************************!*\ !*** ./node_modules/_react-copy-to-clipboard@5.0.2@react-copy-to-clipboard/lib/index.js ***! \******************************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var _require = __webpack_require__(/*! ./Component */ 83145), CopyToClipboard = _require.CopyToClipboard; CopyToClipboard.CopyToClipboard = CopyToClipboard; module.exports = CopyToClipboard; /***/ }), /***/ 98040: /*!************************************************************************!*\ !*** ./node_modules/_toggle-selection@1.0.6@toggle-selection/index.js ***! \************************************************************************/ /***/ (function(module) { module.exports = function () { var selection = document.getSelection(); if (!selection.rangeCount) { return function () {}; } var active = document.activeElement; var ranges = []; for (var i = 0; i < selection.rangeCount; i++) { ranges.push(selection.getRangeAt(i)); } switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML case 'INPUT': case 'TEXTAREA': active.blur(); break; default: active = null; break; } selection.removeAllRanges(); return function () { selection.type === 'Caret' && selection.removeAllRanges(); if (!selection.rangeCount) { ranges.forEach(function(range) { selection.addRange(range); }); } active && active.focus(); }; }; /***/ }) }]);