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

2654 lines
144 KiB

(self["webpackChunk"] = self["webpackChunk"] || []).push([[48431,84480,46681],{
/***/ 68742:
/*!***********************************************************************************************************!*\
!*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ArrowLeftOutlined.js + 1 modules ***!
\***********************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ icons_ArrowLeftOutlined; }
});
// 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/ArrowLeftOutlined.js
// This icon file is generated automatically.
var ArrowLeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z" } }] }, "name": "arrow-left", "theme": "outlined" };
/* harmony default export */ var asn_ArrowLeftOutlined = (ArrowLeftOutlined);
// 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/ArrowLeftOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var ArrowLeftOutlined_ArrowLeftOutlined = function ArrowLeftOutlined(props, ref) {
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_ArrowLeftOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_ArrowLeftOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(ArrowLeftOutlined_ArrowLeftOutlined));
/***/ }),
/***/ 70740:
/*!********************************************************************************************************************!*\
!*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/DeliveredProcedureOutlined.js + 1 modules ***!
\********************************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ icons_DeliveredProcedureOutlined; }
});
// 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/DeliveredProcedureOutlined.js
// This icon file is generated automatically.
var DeliveredProcedureOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M632 698.3l141.9-112a8 8 0 000-12.6L632 461.7c-5.3-4.2-13-.4-13 6.3v76H295c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h324v76c0 6.7 7.8 10.4 13 6.3zm261.3-405L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v278c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V422c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-83.5c0-17-6.7-33.2-18.7-45.2zM640 288H384V184h256v104zm264 436h-56c-4.4 0-8 3.6-8 8v108H184V732c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v148c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V732c0-4.4-3.6-8-8-8z" } }] }, "name": "delivered-procedure", "theme": "outlined" };
/* harmony default export */ var asn_DeliveredProcedureOutlined = (DeliveredProcedureOutlined);
// 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/DeliveredProcedureOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var DeliveredProcedureOutlined_DeliveredProcedureOutlined = function DeliveredProcedureOutlined(props, ref) {
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_DeliveredProcedureOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_DeliveredProcedureOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(DeliveredProcedureOutlined_DeliveredProcedureOutlined));
/***/ }),
/***/ 378:
/*!******************************************************************************************************!*\
!*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/PlusOutlined.js + 1 modules ***!
\******************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ icons_PlusOutlined; }
});
// 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/PlusOutlined.js
// This icon file is generated automatically.
var PlusOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z" } }, { "tag": "path", "attrs": { "d": "M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z" } }] }, "name": "plus", "theme": "outlined" };
/* harmony default export */ var asn_PlusOutlined = (PlusOutlined);
// 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/PlusOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var PlusOutlined_PlusOutlined = function PlusOutlined(props, ref) {
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_PlusOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_PlusOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(PlusOutlined_PlusOutlined));
/***/ }),
/***/ 91671:
/*!********************************************************************************************************!*\
!*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ReloadOutlined.js + 1 modules ***!
\********************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ icons_ReloadOutlined; }
});
// 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/ReloadOutlined.js
// This icon file is generated automatically.
var ReloadOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z" } }] }, "name": "reload", "theme": "outlined" };
/* harmony default export */ var asn_ReloadOutlined = (ReloadOutlined);
// 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/ReloadOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var ReloadOutlined_ReloadOutlined = function ReloadOutlined(props, ref) {
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_ReloadOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_ReloadOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(ReloadOutlined_ReloadOutlined));
/***/ }),
/***/ 15470:
/*!*********************************************************************************************************!*\
!*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/SettingOutlined.js + 1 modules ***!
\*********************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ icons_SettingOutlined; }
});
// 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/SettingOutlined.js
// This icon file is generated automatically.
var SettingOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z" } }] }, "name": "setting", "theme": "outlined" };
/* harmony default export */ var asn_SettingOutlined = (SettingOutlined);
// 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/SettingOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var SettingOutlined_SettingOutlined = function SettingOutlined(props, ref) {
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_SettingOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_SettingOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(SettingOutlined_SettingOutlined));
/***/ }),
/***/ 95048:
/*!**************************************************************!*\
!*** ./src/pages/Classrooms/Lists/Exercise/Export/index.tsx ***!
\**************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/createForOfIteratorHelper.js */ 98190);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js */ 10574);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js */ 26801);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js */ 39343);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js */ 11006);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectWithoutProperties.js */ 27161);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! umi */ 51649);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! antd */ 56613);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! antd */ 13209);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! antd */ 36166);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! antd */ 9154);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! antd */ 85436);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! antd */ 70681);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! antd */ 7277);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! antd */ 36915);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! antd */ 21710);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! antd */ 5436);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! antd */ 46570);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! antd */ 87732);
/* harmony import */ var jszip__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! jszip */ 86129);
/* harmony import */ var jszip__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(jszip__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var _ant_design_icons__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! @ant-design/icons */ 68742);
/* harmony import */ var _ant_design_icons__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! @ant-design/icons */ 42813);
/* harmony import */ var _ant_design_icons__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! @ant-design/icons */ 70740);
/* harmony import */ var _ant_design_icons__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! @ant-design/icons */ 28720);
/* harmony import */ var _ant_design_icons__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! @ant-design/icons */ 15470);
/* harmony import */ var _index_less_modules__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./index.less?modules */ 64416);
/* harmony import */ var _components_RenderHtml__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/components/RenderHtml */ 55523);
/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @/utils/util */ 27291);
/* harmony import */ var _Review_component_Fill__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../Review/component/Fill */ 32981);
/* harmony import */ var _Review_component_Shixun__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Review/component/Shixun */ 44798);
/* harmony import */ var _Review_component_Program__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../Review/component/Program */ 98949);
/* harmony import */ var _components_Head__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./components/Head */ 46759);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! moment */ 9498);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var html2pdf_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! html2pdf.js */ 44425);
/* harmony import */ var html2pdf_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(html2pdf_js__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var _utils_authority__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @/utils/authority */ 76107);
/* harmony import */ var _utils_enum__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @/utils/enum */ 15350);
/* harmony import */ var _pages_Classrooms_Lists_Exercise_Review_component_AnswerComments__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @/pages/Classrooms/Lists/Exercise/Review/component/AnswerComments */ 2042);
/* harmony import */ var js_base64__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! js-base64 */ 24334);
/* harmony import */ var js_base64__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(js_base64__WEBPACK_IMPORTED_MODULE_21__);
/* harmony import */ var _utils_export__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @/utils/export */ 64125);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
var _excluded = ["exercise", "globalSetting", "loading", "user", "dispatch"];
var PageCount = 30;
var TextArea = antd__WEBPACK_IMPORTED_MODULE_24__/* ["default"] */ .Z.TextArea;
var questionType = (/* unused pure expression or super */ null && (['单选题', '多选题', '判断题', '填空题', '简答题', '实训题', '编程题']));
var Export = function Export(_ref) {
var _userInfo$course, _exportData$exercise3, _exportData$exercise_2, _exportData$exercise4, _exportData$exercise5, _exportData$exercise6, _exportData$exercise7, _exportData$exercise8;
var exercise = _ref.exercise,
globalSetting = _ref.globalSetting,
loading = _ref.loading,
user = _ref.user,
dispatch = _ref.dispatch,
props = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_5___default()(_ref, _excluded);
var params = (0,umi__WEBPACK_IMPORTED_MODULE_7__.useParams)();
var userInfo = user.userInfo;
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_6__.useState)({}),
_useState2 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_useState, 2),
changeScoreData = _useState2[0],
setChangeScoreData = _useState2[1];
var exportElement = (0,react__WEBPACK_IMPORTED_MODULE_6__.useRef)();
var isExportBlank = (0,react__WEBPACK_IMPORTED_MODULE_6__.useRef)(false);
var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_6__.useState)(false),
_useState4 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_useState3, 2),
isLoading = _useState4[0],
setIsLoading = _useState4[1];
var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_6__.useState)({}),
_useState6 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_useState5, 2),
exportData = _useState6[0],
setExportData = _useState6[1];
var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_6__.useState)(new (jszip__WEBPACK_IMPORTED_MODULE_8___default())()),
_useState8 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_useState7, 2),
zip = _useState8[0],
setZip = _useState8[1];
var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_6__.useState)([]),
_useState10 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_useState9, 2),
allStudents = _useState10[0],
setAllStudents = _useState10[1];
var _useState11 = (0,react__WEBPACK_IMPORTED_MODULE_6__.useState)(false),
_useState12 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_useState11, 2),
autoHeight = _useState12[0],
setAutoHeight = _useState12[1];
var _useState13 = (0,react__WEBPACK_IMPORTED_MODULE_6__.useState)(false),
_useState14 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_useState13, 2),
isshowanswer = _useState14[0],
setisshowanswer = _useState14[1]; //导出空白试卷加答案时显示答案
var _useState15 = (0,react__WEBPACK_IMPORTED_MODULE_6__.useState)(false),
_useState16 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_useState15, 2),
userScoreVisible = _useState16[0],
setUserScoreVisible = _useState16[1]; //导出所有学生试卷时需要显示学生得分
var _useState17 = (0,react__WEBPACK_IMPORTED_MODULE_6__.useState)(false),
_useState18 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_useState17, 2),
userCommentVisible = _useState18[0],
setUserCommentVisible = _useState18[1]; //导出所有学生试卷时需要显示评语
var _useState19 = (0,react__WEBPACK_IMPORTED_MODULE_6__.useState)(false),
_useState20 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_useState19, 2),
newuserCommentVisible = _useState20[0],
setnewUserCommentVisible = _useState20[1]; //导出所有学生试卷时只需求最新的
var _useState21 = (0,react__WEBPACK_IMPORTED_MODULE_6__.useState)(false),
_useState22 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_useState21, 2),
ismodal = _useState22[0],
setismodal = _useState22[1];
var _useState23 = (0,react__WEBPACK_IMPORTED_MODULE_6__.useState)(false),
_useState24 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_useState23, 2),
exportTypeModal = _useState24[0],
setExportTypeModal = _useState24[1];
var _useState25 = (0,react__WEBPACK_IMPORTED_MODULE_6__.useState)(""),
_useState26 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_useState25, 2),
exportType = _useState26[0],
setExportType = _useState26[1];
(0,react__WEBPACK_IMPORTED_MODULE_6__.useEffect)(function () {
if (userInfo !== null && userInfo !== void 0 && userInfo.login) {
getData();
}
try {
setAllStudents(JSON.parse(localStorage.total_exercise_users));
} catch (e) {}
}, [params.userId, params.coursesId, params.exerciseId, userInfo]);
var handleRemoveSurplusCanvas = function handleRemoveSurplusCanvas() {
document.querySelectorAll('canvas').forEach(function (item) {
(!item.clientWidth || !item.clientHeight) && item.remove();
});
};
var scrollView = function scrollView() {
document.body.scrollIntoView();
};
var randomQuestion = function randomQuestion(res) {
var _res$exercise_answer_, _res$exercise, _res$exercise2;
var random_id = res === null || res === void 0 || (_res$exercise_answer_ = res.exercise_answer_user) === null || _res$exercise_answer_ === void 0 ? void 0 : _res$exercise_answer_.user_id;
if (res !== null && res !== void 0 && (_res$exercise = res.exercise) !== null && _res$exercise !== void 0 && _res$exercise.question_random || res !== null && res !== void 0 && (_res$exercise2 = res.exercise) !== null && _res$exercise2 !== void 0 && _res$exercise2.choice_random) {
var _res$exercise_questio;
var _key = 1;
res.exercise.question_random = res === null || res === void 0 || (_res$exercise_questio = res.exercise_question_types) === null || _res$exercise_questio === void 0 ? void 0 : _res$exercise_questio.map(function (item) {
var _res$exercise3, _res$exercise4;
if (res !== null && res !== void 0 && (_res$exercise3 = res.exercise) !== null && _res$exercise3 !== void 0 && _res$exercise3.choice_random) {
if (item.question_type === 0 || item.question_type === 1) {
item.items.map(function (i) {
i.question_choices = (0,_utils_util__WEBPACK_IMPORTED_MODULE_11__/* .randomArray */ .M2)(i.question_choices, random_id);
return i;
});
}
if (item.question_type === 7) {
item.items.forEach(function (i) {
i.sub_exercise_questions.forEach(function (k) {
k.question_choices = (0,_utils_util__WEBPACK_IMPORTED_MODULE_11__/* .randomArray */ .M2)(k.question_choices, random_id);
});
});
}
}
if (res !== null && res !== void 0 && (_res$exercise4 = res.exercise) !== null && _res$exercise4 !== void 0 && _res$exercise4.question_random) {
item.items = (0,_utils_util__WEBPACK_IMPORTED_MODULE_11__/* .randomArray */ .M2)(item.items, random_id);
}
item.items.map(function (i) {
i.question_num = _key;
_key++;
return i;
});
return item;
});
}
};
var getData = /*#__PURE__*/function () {
var _ref2 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee() {
var res;
return _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
dispatch({
type: "exercise/getExerciseExportHeadData",
payload: {
id: params.exerciseId || params.categoryId,
identify: params.userId || null
}
});
if (!params.userId) {
_context.next = 9;
break;
}
_context.next = 4;
return dispatch({
type: "exercise/getReviewExercise",
payload: {
exerciseId: params.exerciseId,
login: params.userId
}
});
case 4:
res = _context.sent;
randomQuestion(res);
isExportBlank.current = false;
_context.next = 13;
break;
case 9:
_context.next = 11;
return dispatch({
type: 'exercise/editExercise',
payload: {
coursesId: params.coursesId,
categoryId: params.exerciseId
}
});
case 11:
res = _context.sent;
isExportBlank.current = true;
case 13:
setExportData(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, res || {}));
setTimeout(function () {
var nbPages = 1;
var sourceHtml = document.getElementById("export-id-all");
var max_page_height = 860; //Is the max size of page i want. in px
var current_page_height = 0; //
// let dom = Array.from(document.getElementById("export-all").children);
// dom.map((item, key) => {
// current_page_height += item.scrollHeight
// if (max_page_height <= current_page_height) {
// current_page_height = item.scrollHeight;
// ++nbPages;
// let li = document.createElement("li")
// li.className = 'html2pdf__page-break'
// li.innerHTML = ' '
// document.getElementById("export-all").insertBefore(li, item)
// }
// })
}, 1500);
case 15:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getData() {
return _ref2.apply(this, arguments);
};
}();
var download = function download() {
zip.generateAsync({
type: "blob"
}).then(function (content) {
var _exportData$exercise, _exercise$exerciseExp, _exportData$exercise2;
var link = document.createElement('a');
link.href = window.URL.createObjectURL(content);
link.download = Object.keys(zip.files).length > 1 ? (exportData === null || exportData === void 0 || (_exportData$exercise = exportData.exercise) === null || _exportData$exercise === void 0 ? void 0 : _exportData$exercise.exercise_name) + '.zip' : ((exercise === null || exercise === void 0 || (_exercise$exerciseExp = exercise.exerciseExportHeadData) === null || _exercise$exerciseExp === void 0 ? void 0 : _exercise$exerciseExp.user) || (exportData === null || exportData === void 0 || (_exportData$exercise2 = exportData.exercise) === null || _exportData$exercise2 === void 0 ? void 0 : _exportData$exercise2.exercise_name)) + '.zip';
document.body.appendChild(link);
var evt = document.createEvent("MouseEvents");
evt.initEvent("click", false, false);
link.dispatchEvent(evt);
document.body.removeChild(link);
setZip(new (jszip__WEBPACK_IMPORTED_MODULE_8___default())());
});
setisshowanswer(false);
setUserCommentVisible(false);
setUserScoreVisible(false);
setAutoHeight(false);
};
var exportReport = /*#__PURE__*/function () {
var _ref3 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee6(type) {
var _exercise$exerciseExp2;
var nums, modal, pages, title, _exercise$exerciseExp3, _exercise$exerciseExp4, opt, worker, _loop, i, next, _next;
return _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee6$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
_next = function _next3() {
_next = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee5() {
var res;
return _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee5$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
nums++;
isExportBlank.current = false;
scrollView();
_context7.next = 5;
return dispatch({
type: "exercise/getExerciseExportHeadData",
payload: {
id: params.exerciseId || params.categoryId,
identify: allStudents[nums - 1]['user_login']
}
});
case 5:
_context7.next = 7;
return dispatch({
type: "exercise/getReviewExercise",
payload: {
exerciseId: params.exerciseId,
login: allStudents[nums - 1]['user_login']
}
});
case 7:
res = _context7.sent;
randomQuestion(res);
setExportData(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, res || {}));
setTimeout( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee4() {
var worker, _loop2, _i;
return _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee4$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
handleRemoveSurplusCanvas();
// const pdfUrl = await html2pdf()
// .from(document.getElementById("export-all"))
// .set(opt)
// // .toPdf()
// .output('blob')
// setIsLoading(false)
worker = html2pdf_js__WEBPACK_IMPORTED_MODULE_17___default()();
_loop2 = /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _loop2(_i) {
return _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _loop2$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return worker.set(opt).from(pages[_i]).toContainer().toCanvas().toPdf().get('pdf').then( /*#__PURE__*/function () {
var _ref6 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee3(pdf) {
return _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee3$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
if (!(_i < pages.length - 1)) {
_context4.next = 3;
break;
}
_context4.next = 3;
return pdf.addPage();
case 3:
case "end":
return _context4.stop();
}
}, _callee3);
}));
return function (_x3) {
return _ref6.apply(this, arguments);
};
}());
case 2:
case "end":
return _context5.stop();
}
}, _loop2);
});
_i = 0;
case 4:
if (!(_i < pages.length)) {
_context6.next = 9;
break;
}
return _context6.delegateYield(_loop2(_i), "t0", 6);
case 6:
_i++;
_context6.next = 4;
break;
case 9:
zip.file("".concat(allStudents[nums - 1]['user_name'], "-").concat(moment__WEBPACK_IMPORTED_MODULE_16___default()().format('YYYY-MM-DD HH:mm:ss'), ".pdf"), worker.output("blob"));
modal.update({
content: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("div", {
children: ["\u5F53\u524D\u8FDB\u5EA6: ", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("span", {
className: "c-blue",
children: nums + 1
}), "/", allStudents === null || allStudents === void 0 ? void 0 : allStudents.length]
})
});
if (nums == (allStudents === null || allStudents === void 0 ? void 0 : allStudents.length)) {
modal.destroy();
setIsLoading(false);
download();
} else {
next();
}
case 12:
case "end":
return _context6.stop();
}
}, _callee4);
})), 2600);
case 11:
case "end":
return _context7.stop();
}
}, _callee5);
}));
return _next.apply(this, arguments);
};
next = function _next2() {
return _next.apply(this, arguments);
};
if (type === "all") {
isExportBlank.current = false;
} else if (!params.userId) {
isExportBlank.current = true;
}
scrollView();
setAutoHeight(true);
nums = 0;
if (type !== 'all') setIsLoading(true);
// else
modal = antd__WEBPACK_IMPORTED_MODULE_25__/* ["default"] */ .Z.info({
width: 460,
title: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("div", {
children: ["\u6B63\u5728\u5BFC\u51FA\u8BD5\u5377,", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("span", {
className: "c-red",
children: "\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3"
})]
}),
content: type === 'all' ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("div", {
children: ["\u5F53\u524D\u8FDB\u5EA6: ", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("span", {
className: "c-blue",
children: nums + 1
}), "/", allStudents === null || allStudents === void 0 ? void 0 : allStudents.length]
}) : null,
maskClosable: false,
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.modal,
onOk: function onOk() {}
});
handleRemoveSurplusCanvas();
_context8.next = 11;
return new Promise(function (resolve, reject) {
setTimeout(function () {
resolve('');
}, 1000);
});
case 11:
// const opt = {
// // margin: [10, 10],
// html2canvas: { letterRendering: true, useCORS: true, allowTaint: false },
// // filename: 'test.pdf',
// // enableLinks: false,
// jsPDF: { unit: 'in', format: 'letter', orientation: 'portrait' }
// // pagebreak: { mode: ['avoid-all', 'css', 'legacy'] },
// // image: { type: 'jpeg', quality: 0.98 }
// }
// let title = `${moment().format('YYYY-MM-DD HH:mm:ss')}`;
// if (exercise.exerciseExportHeadData?.user) {
// title = `${exercise.exerciseExportHeadData?.student_id || ''}${exercise.exerciseExportHeadData?.user}`
// }
// const pdfUrl = await html2pdf()
// .from(document.getElementById("export-all"))
// .set(opt)
// // .toPdf()
// .output('blob')
// setIsLoading(false)
// if (type !== 'all')
// zip.file(`${title}-${moment().format('YYYY-MM-DD HH:mm:ss')}.pdf`, pdfUrl);
// if (type !== 'all') {
// modal.destroy()
// download()
// return;
// }
pages = exportElement.current.children;
title = "".concat(moment__WEBPACK_IMPORTED_MODULE_16___default()().format('YYYY-MM-DD HH:mm:ss'));
if ((_exercise$exerciseExp2 = exercise.exerciseExportHeadData) !== null && _exercise$exerciseExp2 !== void 0 && _exercise$exerciseExp2.user) {
title = "".concat(((_exercise$exerciseExp3 = exercise.exerciseExportHeadData) === null || _exercise$exerciseExp3 === void 0 ? void 0 : _exercise$exerciseExp3.student_id) || '').concat((_exercise$exerciseExp4 = exercise.exerciseExportHeadData) === null || _exercise$exerciseExp4 === void 0 ? void 0 : _exercise$exerciseExp4.user);
}
opt = {
html2canvas: {
letterRendering: true,
useCORS: true,
allowTaint: false
},
jsPDF: {
unit: 'in',
format: 'letter',
orientation: 'portrait'
},
pagebreak: {
mode: ['avoid-all']
}
};
worker = html2pdf_js__WEBPACK_IMPORTED_MODULE_17___default()();
_loop = /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _loop(i) {
return _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _loop$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return worker.set(opt).from(pages[i]).toContainer().toCanvas().toPdf().get('pdf').then( /*#__PURE__*/function () {
var _ref4 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee2(pdf) {
return _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
if (!(i < pages.length - 1)) {
_context2.next = 3;
break;
}
_context2.next = 3;
return pdf.addPage();
case 3:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return function (_x2) {
return _ref4.apply(this, arguments);
};
}());
case 2:
case "end":
return _context3.stop();
}
}, _loop);
});
i = 0;
case 18:
if (!(i < pages.length)) {
_context8.next = 23;
break;
}
return _context8.delegateYield(_loop(i), "t0", 20);
case 20:
i++;
_context8.next = 18;
break;
case 23:
if (!!(allStudents !== null && allStudents !== void 0 && allStudents.length) && type === 'all') {
next();
} else {
// zip.file(`${shixunWorkReport.username}.pdf`, pdfUrl);
zip.file("".concat(title, ".pdf"), worker.output("blob"), {
base64: false
});
// worker.save()
modal.destroy();
setIsLoading(false);
download();
}
// openNewWindow(pdfUrl)
case 24:
case "end":
return _context8.stop();
}
}, _callee6);
}));
return function exportReport(_x) {
return _ref3.apply(this, arguments);
};
}();
var exportReport2 = /*#__PURE__*/function () {
var _ref7 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee9(type) {
var _exercise$exerciseExp5;
var nums, modal, pages, title, _exercise$exerciseExp6, _exercise$exerciseExp7, next, _next4;
return _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee9$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
_next4 = function _next6() {
_next4 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee8() {
var res;
return _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee8$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
nums++;
isExportBlank.current = false;
scrollView();
_context10.next = 5;
return dispatch({
type: "exercise/getExerciseExportHeadData",
payload: {
id: params.exerciseId || params.categoryId,
identify: allStudents[nums - 1]['user_login']
}
});
case 5:
_context10.next = 7;
return dispatch({
type: "exercise/getReviewExercise",
payload: {
exerciseId: params.exerciseId,
login: allStudents[nums - 1]['user_login']
}
});
case 7:
res = _context10.sent;
randomQuestion(res);
setExportData(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, res || {}));
setTimeout( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee7() {
var exerciseId, urlStr;
return _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee7$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
// 获取word下载地址
exerciseId = params.exerciseId;
urlStr = setUrlQuery({
url: ENV.API_SERVER + "/api/exercises/".concat(exerciseId, "/user_exercise_detail.json"),
query: {
exercise_id: exerciseId,
login: allStudents[nums - 1]['user_login'],
middle_export: 1,
is_export_comment: newuserCommentVisible ? 1 : 0
}
}); // 通过下载地址获取到blol 并放到zip文件夹中
_context9.next = 4;
return getBlob(urlStr).then(function (blob) {
zip.file("".concat(allStudents[nums - 1]['user_name'], ".docx"), blob);
});
case 4:
modal.update({
content: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("div", {
children: ["\u5F53\u524D\u8FDB\u5EA6: ", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("span", {
className: "c-blue",
children: nums + 1
}), "/", allStudents === null || allStudents === void 0 ? void 0 : allStudents.length]
})
});
if (nums == (allStudents === null || allStudents === void 0 ? void 0 : allStudents.length)) {
modal.destroy();
setIsLoading(false);
download();
} else {
next();
}
case 6:
case "end":
return _context9.stop();
}
}, _callee7);
})), 2600);
case 11:
case "end":
return _context10.stop();
}
}, _callee8);
}));
return _next4.apply(this, arguments);
};
next = function _next5() {
return _next4.apply(this, arguments);
};
isExportBlank.current = false;
scrollView();
setAutoHeight(true);
nums = 0;
if (type !== 'all') setIsLoading(true);
modal = antd__WEBPACK_IMPORTED_MODULE_25__/* ["default"] */ .Z.info({
width: 460,
title: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("div", {
children: ["\u6B63\u5728\u5BFC\u51FA\u8BD5\u5377,", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("span", {
className: "c-red",
children: "\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3"
})]
}),
content: type === 'all' ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("div", {
children: ["\u5F53\u524D\u8FDB\u5EA6: ", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("span", {
className: "c-blue",
children: nums + 1
}), "/", allStudents === null || allStudents === void 0 ? void 0 : allStudents.length]
}) : null,
maskClosable: false,
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.modal,
onOk: function onOk() {}
});
_context11.next = 10;
return new Promise(function (resolve, reject) {
setTimeout(function () {
resolve('');
}, 1000);
});
case 10:
pages = exportElement.current.children;
title = "".concat(moment__WEBPACK_IMPORTED_MODULE_16___default()().format('YYYY-MM-DD HH:mm:ss'));
if ((_exercise$exerciseExp5 = exercise.exerciseExportHeadData) !== null && _exercise$exerciseExp5 !== void 0 && _exercise$exerciseExp5.user) {
title = "".concat(((_exercise$exerciseExp6 = exercise.exerciseExportHeadData) === null || _exercise$exerciseExp6 === void 0 ? void 0 : _exercise$exerciseExp6.student_id) || '').concat((_exercise$exerciseExp7 = exercise.exerciseExportHeadData) === null || _exercise$exerciseExp7 === void 0 ? void 0 : _exercise$exerciseExp7.user);
}
// if (!!allStudents?.length && type === 'all') {
next();
// }
case 14:
case "end":
return _context11.stop();
}
}, _callee9);
}));
return function exportReport2(_x4) {
return _ref7.apply(this, arguments);
};
}();
var setPdfFooter = function setPdfFooter(pdf) {
var totalPages = pdf.internal.getNumberOfPages();
for (var pageNumber = 1; pageNumber <= totalPages; pageNumber += 1) {
pdf.setPage(pageNumber);
pdf.setFontSize(9);
pdf.setTextColor('#6a6a6a');
pdf.text("".concat(pageNumber, " / ").concat(totalPages), pdf.internal.pageSize.getWidth() - 20, pdf.internal.pageSize.getHeight() - 6);
}
};
var renderQuestion = function renderQuestion(item, i) {
var _item$question_choice, _item$question_choice2, _item$question_choice3, _changeScoreData$item, _item$user_answer4, _item$user_answer_lig, _item$user_answer5, _item$sub_exercise_qu, _item$program_attr, _item$standard_answer, _item$standard_answer2, _item$standard_answer3, _item$standard_answer4, _item$standard_answer5, _item$standard_answer6;
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.Fragment, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("div", {
style: {
display: 'flex'
},
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.programTitle,
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("span", {
style: {
flexShrink: 0
},
className: "font18",
children: [i, "."]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_components_RenderHtml__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
value: item.question_title
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("span", {
style: {
flexShrink: 0
},
className: "font16",
children: ["\uFF08", (item === null || item === void 0 ? void 0 : item.question_type) === 7 ? "\u5171".concat(item === null || item === void 0 ? void 0 : item.sub_q_count, "\u5C0F\u9898") : '', " ", item.question_score, "\u5206\uFF09"]
})]
}),
// 单选题
item.question_type === _utils_enum__WEBPACK_IMPORTED_MODULE_19__/* .QuestionType */ .c.Single && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.Fragment, {
children: (_item$question_choice = item.question_choices) === null || _item$question_choice === void 0 ? void 0 : _item$question_choice.map(function (val, key) {
var _item$user_answer;
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_26__/* ["default"] */ .Z, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_27__/* ["default"] */ .Z, {
flex: "25px",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("div", {
style: {
width: 25,
overflow: "hidden"
},
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_28__/* ["default"] */ .ZP, {
checked: (_item$user_answer = item.user_answer) === null || _item$user_answer === void 0 ? void 0 : _item$user_answer.includes(val.choice_id),
style: {
width: 25
}
})
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_27__/* ["default"] */ .Z, {
flex: "1",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_components_RenderHtml__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
value: val.choice_text || ""
})
})]
}, key);
})
}),
// 多选题
item.question_type === _utils_enum__WEBPACK_IMPORTED_MODULE_19__/* .QuestionType */ .c.Multiple && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.Fragment, {
children: (_item$question_choice2 = item.question_choices) === null || _item$question_choice2 === void 0 ? void 0 : _item$question_choice2.map(function (val, key) {
var _item$user_answer2;
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_26__/* ["default"] */ .Z, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_27__/* ["default"] */ .Z, {
flex: "25px",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("div", {
style: {
width: 25,
overflow: "hidden"
},
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_29__/* ["default"] */ .Z, {
checked: (_item$user_answer2 = item.user_answer) === null || _item$user_answer2 === void 0 ? void 0 : _item$user_answer2.includes(val.choice_id),
style: {
width: 25
}
})
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_27__/* ["default"] */ .Z, {
flex: "1",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_components_RenderHtml__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
value: val.choice_text || ""
})
})]
}, key);
// return <div className=""><Checkbox checked={item.user_answer?.includes(val.choice_id)}>
// {val.choice_text}
// </Checkbox></div>
})
}),
// 判断题
item.question_type === _utils_enum__WEBPACK_IMPORTED_MODULE_19__/* .QuestionType */ .c.Judge && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("div", {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.flexRow,
children: (_item$question_choice3 = item.question_choices) === null || _item$question_choice3 === void 0 ? void 0 : _item$question_choice3.map(function (val, key) {
var _item$user_answer3;
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_26__/* ["default"] */ .Z, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_27__/* ["default"] */ .Z, {
flex: "25px",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("div", {
style: {
width: 25,
overflow: "hidden"
},
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_28__/* ["default"] */ .ZP, {
checked: (_item$user_answer3 = item.user_answer) === null || _item$user_answer3 === void 0 ? void 0 : _item$user_answer3.includes(val.choice_id),
style: {
width: 25
}
})
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_27__/* ["default"] */ .Z, {
flex: "1",
children: val.choice_text
})]
}, key);
// return <div className=""><Radio checked={item.user_answer?.includes(val.choice_id)}>
// {val.choice_text}
// </Radio></div>
})
}), item.question_type === _utils_enum__WEBPACK_IMPORTED_MODULE_19__/* .QuestionType */ .c.Fill && !isExportBlank.current && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_Review_component_Fill__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z, {
item: item,
answerData: exportData,
changeScoreData: changeScoreData,
textValue: (_changeScoreData$item = changeScoreData[item.q_position]) === null || _changeScoreData$item === void 0 ? void 0 : _changeScoreData$item.text,
textOnChange: function textOnChange(value) {
changeScoreData[item.q_position].text = value;
setChangeScoreData(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, changeScoreData));
},
seeAnswerVisible: false
}), item.question_type === _utils_enum__WEBPACK_IMPORTED_MODULE_19__/* .QuestionType */ .c.Shixun && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_Review_component_Shixun__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, {
item: item,
answerData: exportData,
hasChangeScore: false,
autoHeight: autoHeight
}), item.question_type === _utils_enum__WEBPACK_IMPORTED_MODULE_19__/* .QuestionType */ .c.Subjective && item !== null && item !== void 0 && (_item$user_answer4 = item.user_answer) !== null && _item$user_answer4 !== void 0 && _item$user_answer4[0] ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("div", {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.simpleBg,
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("aside", {
className: "font14 c-light-primary mb5",
children: "\u5B66\u751F\u7B54\u9898"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("div", {
children: userCommentVisible ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_components_RenderHtml__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
value: item === null || item === void 0 || (_item$user_answer_lig = item.user_answer_light) === null || _item$user_answer_lig === void 0 ? void 0 : _item$user_answer_lig[0]
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_components_RenderHtml__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
value: item === null || item === void 0 || (_item$user_answer5 = item.user_answer) === null || _item$user_answer5 === void 0 ? void 0 : _item$user_answer5[0]
})
})]
}) : null, item.question_type === _utils_enum__WEBPACK_IMPORTED_MODULE_19__/* .QuestionType */ .c.Program && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_Review_component_Program__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z, {
item: item,
answerData: exportData,
autoHeight: autoHeight
}), item.question_type === _utils_enum__WEBPACK_IMPORTED_MODULE_19__/* .QuestionType */ .c.Combine && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.Fragment, {
children: (_item$sub_exercise_qu = item.sub_exercise_questions) === null || _item$sub_exercise_qu === void 0 ? void 0 : _item$sub_exercise_qu.map(function (val, key) {
var _val$question_choices, _val$standard_answer;
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("div", {
style: {
marginLeft: 10
},
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("span", {
style: {
fontSize: '16px'
},
children: [i, ".", key + 1, "\uFF08\u5355\u9009\u9898\uFF09", val === null || val === void 0 ? void 0 : val.question_title, "\uFF08", val === null || val === void 0 ? void 0 : val.question_score, "\u5206\uFF09"]
}), (_val$question_choices = val.question_choices) === null || _val$question_choices === void 0 ? void 0 : _val$question_choices.map(function (vals, keys) {
var _val$user_answer;
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_26__/* ["default"] */ .Z, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_27__/* ["default"] */ .Z, {
flex: "25px",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("div", {
style: {
width: 25,
overflow: "hidden"
},
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_28__/* ["default"] */ .ZP, {
checked: (_val$user_answer = val.user_answer) === null || _val$user_answer === void 0 ? void 0 : _val$user_answer.includes(vals.choice_id),
style: {
width: 25
}
})
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_27__/* ["default"] */ .Z, {
flex: "1",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_components_RenderHtml__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
value: vals.choice_text || ""
})
})]
}, keys);
}), (val === null || val === void 0 ? void 0 : val.standard_answer_show) && isshowanswer && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("span", {
className: "font16 ",
children: ["\u6B63\u786E\u7B54\u6848\uFF1A", val === null || val === void 0 ? void 0 : val.standard_answer_show]
}), ((val === null || val === void 0 ? void 0 : val.standard_answer_show) || (val === null || val === void 0 || (_val$standard_answer = val.standard_answer) === null || _val$standard_answer === void 0 ? void 0 : _val$standard_answer.length) > 0) && isshowanswer && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_26__/* ["default"] */ .Z, {
style: {
marginTop: 14
},
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("span", {
className: "font16 ",
children: "\u89E3\u6790\uFF1A"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_components_RenderHtml__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.renderHtml,
value: (val === null || val === void 0 ? void 0 : val.analysis) || '暂无解析'
})]
})]
});
})
}), item.question_type === 8 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.Fragment, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("div", {
style: {
padding: "20px 30px"
},
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_components_RenderHtml__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
showProgramFill: true,
disabledFill: true,
value: js_base64__WEBPACK_IMPORTED_MODULE_21__.Base64.decode((item === null || item === void 0 || (_item$program_attr = item.program_attr) === null || _item$program_attr === void 0 ? void 0 : _item$program_attr.code) || '')
})
})
}), isshowanswer && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("div", {
style: {
marginTop: 10
},
children: [(item === null || item === void 0 ? void 0 : item.question_type) < 3 && (item === null || item === void 0 ? void 0 : item.standard_answer_show) && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("span", {
className: "font16 ",
children: ["\u6B63\u786E\u7B54\u6848\uFF1A", item === null || item === void 0 ? void 0 : item.standard_answer_show]
}), !!(item !== null && item !== void 0 && (_item$standard_answer = item.standard_answer) !== null && _item$standard_answer !== void 0 && _item$standard_answer.length) && isshowanswer && (item === null || item === void 0 ? void 0 : item.question_type) === 3 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("div", {
children: item === null || item === void 0 || (_item$standard_answer2 = item.standard_answer) === null || _item$standard_answer2 === void 0 ? void 0 : _item$standard_answer2.map(function (answer, index) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("div", {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("span", {
children: ["\u53C2\u8003\u7B54\u6848\uFF1A\uFF08\u586B\u7A7A", index + 1, "\uFF09:"]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("div", {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(TextArea, {
autoSize: true,
disabled: true,
value: answer === null || answer === void 0 ? void 0 : answer.answer_text[0]
})
})]
});
})
}), !!(item !== null && item !== void 0 && (_item$standard_answer3 = item.standard_answer) !== null && _item$standard_answer3 !== void 0 && _item$standard_answer3.length) && isshowanswer && (item === null || item === void 0 ? void 0 : item.question_type) === 8 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("div", {
children: item === null || item === void 0 || (_item$standard_answer4 = item.standard_answer) === null || _item$standard_answer4 === void 0 ? void 0 : _item$standard_answer4.map(function (answer, index) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("div", {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("span", {
children: ["\u53C2\u8003\u7B54\u6848\uFF1A\uFF08\u586B\u7A7A", index + 1, "\uFF09:"]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("div", {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(TextArea, {
autoSize: true,
disabled: true,
value: (answer === null || answer === void 0 ? void 0 : answer.answer_text) || ''
})
})]
});
})
}), (item === null || item === void 0 ? void 0 : item.standard_answer) && (item === null || item === void 0 ? void 0 : item.question_type) === 4 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("div", {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("p", {
className: "mt10 mb0",
children: "\u53C2\u8003\u7B54\u6848\uFF1A"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("div", {
style: {
border: "1px solid #eee",
background: "#f5f5f5",
borderRadius: 4,
padding: 5
},
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_components_RenderHtml__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
value: item === null || item === void 0 || (_item$standard_answer5 = item.standard_answer) === null || _item$standard_answer5 === void 0 ? void 0 : _item$standard_answer5[0]
})
})]
}), (item === null || item === void 0 ? void 0 : item.answer_text) && (item === null || item === void 0 ? void 0 : item.question_type) === 6 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("div", {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("p", {
className: "mt10 mb0",
children: "\u53C2\u8003\u7B54\u6848\uFF1A"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("div", {
style: {
border: "1px solid #eee",
background: "#f5f5f5",
borderRadius: 4,
padding: 5
},
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_components_RenderHtml__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
value: item === null || item === void 0 ? void 0 : item.answer_text
})
})]
}), (item === null || item === void 0 ? void 0 : item.question_type) <= 4 && ((item === null || item === void 0 ? void 0 : item.standard_answer_show) || (item === null || item === void 0 || (_item$standard_answer6 = item.standard_answer) === null || _item$standard_answer6 === void 0 ? void 0 : _item$standard_answer6.length) > 0) && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_26__/* ["default"] */ .Z, {
style: {
marginTop: 14
},
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("span", {
className: "font16 ",
children: "\u89E3\u6790\uFF1A"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_components_RenderHtml__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.renderHtml,
value: (item === null || item === void 0 ? void 0 : item.analysis) || '暂无解析'
})]
})]
}), userScoreVisible && !Number.isNaN(parseFloat(item === null || item === void 0 ? void 0 : item.user_score)) && (item === null || item === void 0 ? void 0 : item.question_type) !== _utils_enum__WEBPACK_IMPORTED_MODULE_19__/* .QuestionType */ .c.Shixun && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("span", {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("span", {
style: {
color: '#0152d9'
},
children: "\u5B66\u751F\u5F97\u5206\uFF1A"
}), item === null || item === void 0 ? void 0 : item.user_score, "\u5206"]
}), (item === null || item === void 0 ? void 0 : item.answer_comments) && userCommentVisible && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_pages_Classrooms_Lists_Exercise_Review_component_AnswerComments__WEBPACK_IMPORTED_MODULE_20__/* ["default"] */ .Z, {
newuserCommentVisible: newuserCommentVisible,
list: item === null || item === void 0 ? void 0 : item.answer_comments
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_30__/* ["default"] */ .Z, {
style: isExportBlank.current ? {
marginTop: 30
} : {}
})]
});
};
//转换中文
var toChinesNum = function toChinesNum(num) {
var changeNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九']; //changeNum[0] = "零"
var unit = ["", "十", "百", "千", "万"];
num = parseInt(num);
var getWan = function getWan(temp) {
var strArr = temp.toString().split("").reverse();
var newNum = "";
for (var i = 0; i < strArr.length; i++) {
newNum = (i == 0 && strArr[i] == 0 ? "" : i > 0 && strArr[i] == 0 && strArr[i - 1] == 0 ? "" : changeNum[strArr[i]] + (strArr[i] == 0 ? unit[0] : unit[i])) + newNum;
}
return newNum;
};
var overWan = Math.floor(num / 10000);
var noWan = num % 10000;
if (noWan.toString().length < 4) noWan = "0" + noWan;
return overWan ? getWan(overWan) + "万" + getWan(noWan) : getWan(num);
};
var renderDom = function renderDom(er, key, index) {
if (er.category) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("div", {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("div", {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("span", {
className: "font16 c-light-primary",
children: [toChinesNum(er === null || er === void 0 ? void 0 : er.category), "\u3001", er.name]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("span", {
className: "c-grey-999",
children: ["\uFF08\u5171", er.count, "\u9898\uFF0C", (er === null || er === void 0 ? void 0 : er.question_type) === 7 ? "\u5305\u542B".concat(er === null || er === void 0 ? void 0 : er.sub_count, "\u5C0F\u9898\uFF1B") : '', "\u5171", er.score, "\u5206\uFF09"]
})]
}), renderQuestion(er.questionDetail, key)]
});
} else {
return renderQuestion(er.questionDetail, key);
}
};
var renderClassifyQuestion = (0,react__WEBPACK_IMPORTED_MODULE_6__.useCallback)(function () {
var _exercise$exerciseExp8, _Array, _exportData$exercise_;
var step = (exercise === null || exercise === void 0 || (_exercise$exerciseExp8 = exercise.exerciseExportHeadData) === null || _exercise$exerciseExp8 === void 0 || (_exercise$exerciseExp8 = _exercise$exerciseExp8.exercise_header) === null || _exercise$exerciseExp8 === void 0 ? void 0 : _exercise$exerciseExp8.export_page_num) || 40;
var newData = [];
var questionIndex = 1; //小题题号
var _iterator = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0___default()((exportData === null || exportData === void 0 || (_exportData$exercise_ = exportData.exercise_question_types) === null || _exportData$exercise_ === void 0 ? void 0 : _exportData$exercise_.entries()) || []),
_step;
try {
var _loop3 = function _loop3() {
var _step$value = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_step.value, 2),
categoryIndex = _step$value[0],
questionItem = _step$value[1];
questionItem.items.forEach(function (question, index) {
if (index === 0) {
newData.push(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default()({}, questionItem), {}, {
items: null,
category: categoryIndex + 1,
questionDetail: question,
questionIndex: questionIndex
}));
} else {
newData.push({
questionDetail: question,
questionIndex: questionIndex
});
}
questionIndex++;
});
};
for (_iterator.s(); !(_step = _iterator.n()).done;) {
_loop3();
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
if (newData !== null && newData !== void 0 && newData.length) return (_Array = new Array(Math.ceil((newData === null || newData === void 0 ? void 0 : newData.length) / step))) === null || _Array === void 0 || (_Array = _Array.fill([])) === null || _Array === void 0 || (_Array = _Array.map(function (item, key) {
return newData.slice(key * step, key * step + step);
})) === null || _Array === void 0 ? void 0 : _Array.map(function (i, k) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("div", {
className: "pl60 pr30",
style: {
minHeight: k === 0 ? 1000 : "auto"
},
children: [k === 0 && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.Fragment, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_components_Head__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .Z, {
isExportBlank: isExportBlank.current
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_30__/* ["default"] */ .Z, {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.divider
})]
}), i === null || i === void 0 ? void 0 : i.map(function (item, index) {
return renderDom(item, item.questionIndex, index);
})]
}, k);
});
return null;
}, [exportData, exercise, autoHeight]);
var _useState27 = (0,react__WEBPACK_IMPORTED_MODULE_6__.useState)({
num: 1
}),
_useState28 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_useState27, 2),
paginationParams = _useState28[0],
setPaginationParams = _useState28[1];
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("section", {
className: "edu-container",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("section", {
className: "animated fadeIn",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("aside", {
className: "mt10",
children: userInfo && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_31__/* ["default"] */ .Z, {
separator: ">",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_31__/* ["default"] */ .Z.Item, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(umi__WEBPACK_IMPORTED_MODULE_7__.Link, {
to: "/classrooms/".concat(params.coursesId, "/exercise"),
children: userInfo === null || userInfo === void 0 || (_userInfo$course = userInfo.course) === null || _userInfo$course === void 0 ? void 0 : _userInfo$course.course_name
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_31__/* ["default"] */ .Z.Item, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(umi__WEBPACK_IMPORTED_MODULE_7__.Link, {
to: "/classrooms/".concat(params.coursesId, "/exercise"),
children: "\u8BD5\u5377\u5217\u8868"
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_31__/* ["default"] */ .Z.Item, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(umi__WEBPACK_IMPORTED_MODULE_7__.Link, {
to: "/classrooms/".concat(params.coursesId, "/exercise/").concat(exportData === null || exportData === void 0 || (_exportData$exercise3 = exportData.exercise) === null || _exportData$exercise3 === void 0 ? void 0 : _exportData$exercise3.id, "/detail"),
children: "\u8BD5\u5377\u8BE6\u60C5"
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_31__/* ["default"] */ .Z.Item, {
children: (exportData === null || exportData === void 0 || (_exportData$exercise_2 = exportData.exercise_answer_user) === null || _exportData$exercise_2 === void 0 ? void 0 : _exportData$exercise_2.user_name) || (exportData === null || exportData === void 0 || (_exportData$exercise4 = exportData.exercise) === null || _exportData$exercise4 === void 0 ? void 0 : _exportData$exercise4.exercise_name)
})]
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("aside", {
className: [_index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.title, 'mt20'].join(' '),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_26__/* ["default"] */ .Z, {
style: {
width: "100%"
},
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_27__/* ["default"] */ .Z, {
flex: "1",
style: {
lineHeight: '24px'
},
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(umi__WEBPACK_IMPORTED_MODULE_7__.Link, {
to: "/classrooms/".concat(params.coursesId, "/exercise/").concat(exportData === null || exportData === void 0 || (_exportData$exercise5 = exportData.exercise) === null || _exportData$exercise5 === void 0 ? void 0 : _exportData$exercise5.id, "/detail"),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_ant_design_icons__WEBPACK_IMPORTED_MODULE_32__/* ["default"] */ .Z, {
className: "font16 c-black"
})
}), (0,_utils_util__WEBPACK_IMPORTED_MODULE_11__/* .exerciseTips */ .vB)((_exportData$exercise6 = exportData.exercise) === null || _exportData$exercise6 === void 0 ? void 0 : _exportData$exercise6.exercise_status), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("strong", {
className: "font20 ml5",
children: exportData === null || exportData === void 0 || (_exportData$exercise7 = exportData.exercise) === null || _exportData$exercise7 === void 0 ? void 0 : _exportData$exercise7.exercise_name
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_27__/* ["default"] */ .Z, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_33__/* ["default"] */ .Z, {
menu: {
items: [{
label: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_34__/* ["default"] */ .ZP, {
type: "text",
onClick: function onClick() {
setisshowanswer(true);
setExportType('');
setExportTypeModal(true);
},
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_ant_design_icons__WEBPACK_IMPORTED_MODULE_35__/* ["default"] */ .Z, {}), "\u5BFC\u51FA\u7A7A\u767D\u8BD5\u5377+\u7B54\u6848"]
}),
key: '1',
show: true
}, {
label: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_34__/* ["default"] */ .ZP, {
type: "text",
onClick: function onClick() {
setExportType('');
setExportTypeModal(true);
},
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_ant_design_icons__WEBPACK_IMPORTED_MODULE_35__/* ["default"] */ .Z, {}), "\u5BFC\u51FA\u7A7A\u767D\u8BD5\u5377"]
}),
key: '2',
show: true
}, {
label: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_34__/* ["default"] */ .ZP, {
type: "text",
onClick: function onClick() {
setExportType('');
setnewUserCommentVisible(false);
setismodal(true);
},
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_ant_design_icons__WEBPACK_IMPORTED_MODULE_35__/* ["default"] */ .Z, {}), "\u5BFC\u51FA\u6240\u6709\u5B66\u751F\u8BD5\u5377"]
}),
key: '3',
show: (0,_utils_authority__WEBPACK_IMPORTED_MODULE_18__/* .isAdmin */ .GJ)()
}].filter(function (item) {
return item.show;
}).map(function (item) {
return {
label: item.label,
key: item.key
};
})
},
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_34__/* ["default"] */ .ZP, {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.exportBtn,
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_ant_design_icons__WEBPACK_IMPORTED_MODULE_36__/* ["default"] */ .Z, {}), "\u5BFC\u51FA", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_ant_design_icons__WEBPACK_IMPORTED_MODULE_37__/* ["default"] */ .Z, {})]
})
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_27__/* ["default"] */ .Z, {
className: "ml20",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_34__/* ["default"] */ .ZP, {
icon: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_ant_design_icons__WEBPACK_IMPORTED_MODULE_38__/* ["default"] */ .Z, {}),
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.exportBtn,
onClick: function onClick() {
dispatch({
type: 'exercise/setActionTabs',
payload: {
key: 'exportSetting'
}
});
},
children: "\u5BFC\u51FA\u8BBE\u7F6E"
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_27__/* ["default"] */ .Z, {})]
})
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_25__/* ["default"] */ .Z, {
title: '导出试卷选择',
open: ismodal,
footer: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("div", {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_34__/* ["default"] */ .ZP, {
type: "primary",
onClick: function onClick() {
setUserCommentVisible(true);
setUserScoreVisible(true);
if (exportType == '') {
antd__WEBPACK_IMPORTED_MODULE_39__/* ["default"] */ .ZP.info('请选择一种导出格式');
return;
} else if (exportType == 'pdf') {
exportReport("all");
} else if (exportType == 'word') {
(allStudents === null || allStudents === void 0 ? void 0 : allStudents.length) > 0 ? exportReport2("all") : antd__WEBPACK_IMPORTED_MODULE_39__/* ["default"] */ .ZP.info('没有可导出的学生试卷');
}
setismodal(false);
},
children: "\u662F"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_34__/* ["default"] */ .ZP, {
onClick: function onClick() {
setismodal(false);
},
children: "\u5426"
})]
}),
onCancel: function onCancel() {
return setismodal(false);
},
children: ["\u662F\u5426\u8FDE\u540C\u8BC4\u9605\u6559\u5E08\u3001\u6559\u5E08\u8BC4\u8BED\u4E00\u8D77\u5BFC\u51FA\uFF1F", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("p", {
style: {
display: 'flex',
alignItems: "center"
},
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_29__/* ["default"] */ .Z, {
style: {
fontSize: 14
},
onChange: function onChange(e) {
setnewUserCommentVisible(e.target.checked);
},
children: "\u53EA\u5BFC\u51FA\u6700\u65B0\u7684\u8BC4\u9605\u8BB0\u5F55"
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("div", {
style: {
fontSize: 16,
margin: '15px 0'
},
children: "\u8BF7\u9009\u62E9\u9700\u8981\u5BFC\u51FA\u7684\u683C\u5F0F"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("div", {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.export_type_modal,
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("div", {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.export_type_modal_con,
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("div", {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.type_item,
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("div", {
className: "".concat(_index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.img_warp, " ").concat(exportType == 'pdf' ? _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.img_warp_active : ''),
onClick: function onClick() {
return setExportType('pdf');
},
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("img", {
src: __webpack_require__(/*! @/assets/images/file_type/pdf_img.png */ 45614),
width: 70,
height: 70
})
}), "pdf\u683C\u5F0F"]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("div", {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.type_item,
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("div", {
className: "".concat(_index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.img_warp, " ").concat(exportType == 'word' ? _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.img_warp_active : ''),
onClick: function onClick() {
return setExportType('word');
},
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("img", {
src: __webpack_require__(/*! @/assets/images/file_type/word_img.png */ 38347),
width: 70,
height: 70
})
}), "word\u683C\u5F0F"]
})]
})
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("div", {
className: "".concat(_index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.bg, " pt30 mt20"),
children: [(exportData === null || exportData === void 0 || (_exportData$exercise8 = exportData.exercise) === null || _exportData$exercise8 === void 0 ? void 0 : _exportData$exercise8.is_random) && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_40__/* ["default"] */ .Z, {
className: "".concat(_index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.paginationWrapper),
showTotal: function showTotal(total) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("span", {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.totalText,
style: {
marginLeft: 20
},
children: ["\u5171\u8BA1", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("span", {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.num,
children: total
}), "\u4EFD\u8BD5\u5377"]
});
},
total: exportData === null || exportData === void 0 ? void 0 : exportData.exercise_count,
pageSize: 1,
current: paginationParams.num,
showSizeChanger: false,
onChange: /*#__PURE__*/function () {
var _ref9 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee10(page) {
var res;
return _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee10$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
setPaginationParams({
num: page
});
_context12.next = 3;
return dispatch({
type: 'exercise/editExercise',
payload: {
coursesId: params.coursesId,
categoryId: params.exerciseId,
num: page - 1
}
});
case 3:
res = _context12.sent;
setExportData(res);
case 5:
case "end":
return _context12.stop();
}
}, _callee10);
}));
return function (_x5) {
return _ref9.apply(this, arguments);
};
}(),
showQuickJumper: true,
hideOnSinglePage: false
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("section", {
id: "export-all",
className: [_index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.bg, 'pt30', 'pb30', 'mt20', 'mb20', 'relative'].join(' '),
ref: exportElement,
children: renderClassifyQuestion()
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(antd__WEBPACK_IMPORTED_MODULE_25__/* ["default"] */ .Z, {
width: 450,
title: "\u8BF7\u9009\u62E9\u9700\u8981\u5BFC\u51FA\u7684\u683C\u5F0F",
open: exportTypeModal,
onCancel: function onCancel() {
return setExportTypeModal(false);
},
onOk: /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee11() {
return _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee11$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
if (!(exportType == '')) {
_context13.next = 5;
break;
}
antd__WEBPACK_IMPORTED_MODULE_39__/* ["default"] */ .ZP.info('请选择一种导出格式');
return _context13.abrupt("return");
case 5:
if (exportType == 'pdf') {
exportReport("");
} else if (exportType == 'word') {
(0,_utils_export__WEBPACK_IMPORTED_MODULE_22__/* .exportClassroomsPaper */ .YX)({
coursesId: params.coursesId,
categoryId: params.exerciseId,
middle_export: 1,
export_type: isshowanswer ? 1 : 0
});
}
case 6:
setExportTypeModal(false);
case 7:
case "end":
return _context13.stop();
}
}, _callee11);
})),
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("div", {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.export_type_modal,
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("div", {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.export_type_modal_con,
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("div", {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.type_item,
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("div", {
className: "".concat(_index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.img_warp, " ").concat(exportType == 'pdf' ? _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.img_warp_active : ''),
onClick: function onClick() {
return setExportType('pdf');
},
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("img", {
src: __webpack_require__(/*! @/assets/images/file_type/pdf_img.png */ 45614),
width: 70,
height: 70
})
}), "pdf\u683C\u5F0F"]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)("div", {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.type_item,
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("div", {
className: "".concat(_index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.img_warp, " ").concat(exportType == 'word' ? _index_less_modules__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z.img_warp_active : ''),
onClick: function onClick() {
return setExportType('word');
},
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("img", {
src: __webpack_require__(/*! @/assets/images/file_type/word_img.png */ 38347),
width: 70,
height: 70
})
}), "word\u683C\u5F0F"]
})]
})
})
})]
});
};
/* harmony default export */ __webpack_exports__["default"] = ((0,umi__WEBPACK_IMPORTED_MODULE_7__.connect)(function (_ref11) {
var exercise = _ref11.exercise,
loading = _ref11.loading,
user = _ref11.user,
globalSetting = _ref11.globalSetting;
return {
exercise: exercise,
globalSetting: globalSetting,
user: user,
loading: loading.effects
};
})(Export));
/***/ }),
/***/ 36915:
/*!**************************************************************************!*\
!*** ./node_modules/_antd@5.7.1@antd/es/breadcrumb/index.js + 6 modules ***!
\**************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ breadcrumb; }
});
// 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.0@rc-util/es/Children/toArray.js
var toArray = __webpack_require__(38930);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.0@rc-util/es/pickAttrs.js
var pickAttrs = __webpack_require__(5090);
// 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.7.1@antd/es/_util/reactNode.js
var reactNode = __webpack_require__(63553);
// EXTERNAL MODULE: ./node_modules/_antd@5.7.1@antd/es/config-provider/context.js
var context = __webpack_require__(16182);
// 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: ./node_modules/_antd@5.7.1@antd/es/dropdown/dropdown.js
var dropdown = __webpack_require__(38685);
;// CONCATENATED MODULE: ./node_modules/_antd@5.7.1@antd/es/breadcrumb/BreadcrumbSeparator.js
const BreadcrumbSeparator = _ref => {
let {
children
} = _ref;
const {
getPrefixCls
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
const prefixCls = getPrefixCls('breadcrumb');
return /*#__PURE__*/_react_17_0_2_react.createElement("li", {
className: `${prefixCls}-separator`,
"aria-hidden": "true"
}, children === '' ? children : children || '/');
};
BreadcrumbSeparator.__ANT_BREADCRUMB_SEPARATOR = true;
/* harmony default export */ var breadcrumb_BreadcrumbSeparator = (BreadcrumbSeparator);
;// CONCATENATED MODULE: ./node_modules/_antd@5.7.1@antd/es/breadcrumb/useItemRender.js
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 getBreadcrumbName(route, params) {
if (route.title === undefined || route.title === null) {
return null;
}
const paramsKeys = Object.keys(params).join('|');
return typeof route.title === 'object' ? route.title : String(route.title).replace(new RegExp(`:(${paramsKeys})`, 'g'), (replacement, key) => params[key] || replacement);
}
function renderItem(prefixCls, item, children, href) {
if (children === null || children === undefined) {
return null;
}
const {
className,
onClick
} = item,
restItem = __rest(item, ["className", "onClick"]);
const passedProps = Object.assign(Object.assign({}, (0,pickAttrs/* default */.Z)(restItem, {
data: true,
aria: true
})), {
onClick
});
if (href !== undefined) {
return /*#__PURE__*/_react_17_0_2_react.createElement("a", Object.assign({}, passedProps, {
className: _classnames_2_3_2_classnames_default()(`${prefixCls}-link`, className),
href: href
}), children);
}
return /*#__PURE__*/_react_17_0_2_react.createElement("span", Object.assign({}, passedProps, {
className: _classnames_2_3_2_classnames_default()(`${prefixCls}-link`, className)
}), children);
}
function useItemRender(prefixCls, itemRender) {
const mergedItemRender = (item, params, routes, path, href) => {
if (itemRender) {
return itemRender(item, params, routes, path);
}
const name = getBreadcrumbName(item, params);
return renderItem(prefixCls, item, name, href);
};
return mergedItemRender;
}
;// CONCATENATED MODULE: ./node_modules/_antd@5.7.1@antd/es/breadcrumb/BreadcrumbItem.js
var BreadcrumbItem_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 InternalBreadcrumbItem = props => {
const {
prefixCls,
separator = '/',
children,
menu,
overlay,
dropdownProps,
href
} = props;
// Warning for deprecated usage
if (false) {}
/** If overlay is have Wrap a Dropdown */
const renderBreadcrumbNode = breadcrumbItem => {
if (menu || overlay) {
const mergeDropDownProps = Object.assign({}, dropdownProps);
if (menu) {
const _a = menu || {},
{
items
} = _a,
menuProps = BreadcrumbItem_rest(_a, ["items"]);
mergeDropDownProps.menu = Object.assign(Object.assign({}, menuProps), {
items: items === null || items === void 0 ? void 0 : items.map((_a, index) => {
var {
key,
title,
label,
path
} = _a,
itemProps = BreadcrumbItem_rest(_a, ["key", "title", "label", "path"]);
let mergedLabel = label !== null && label !== void 0 ? label : title;
if (path) {
mergedLabel = /*#__PURE__*/_react_17_0_2_react.createElement("a", {
href: `${href}${path}`
}, mergedLabel);
}
return Object.assign(Object.assign({}, itemProps), {
key: key !== null && key !== void 0 ? key : index,
label: mergedLabel
});
})
});
} else if (overlay) {
mergeDropDownProps.overlay = overlay;
}
return /*#__PURE__*/_react_17_0_2_react.createElement(dropdown/* default */.Z, Object.assign({
placement: "bottom"
}, mergeDropDownProps), /*#__PURE__*/_react_17_0_2_react.createElement("span", {
className: `${prefixCls}-overlay-link`
}, breadcrumbItem, /*#__PURE__*/_react_17_0_2_react.createElement(DownOutlined/* default */.Z, null)));
}
return breadcrumbItem;
};
// wrap to dropDown
const link = renderBreadcrumbNode(children);
if (link !== undefined && link !== null) {
return /*#__PURE__*/_react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /*#__PURE__*/_react_17_0_2_react.createElement("li", null, link), separator && /*#__PURE__*/_react_17_0_2_react.createElement(breadcrumb_BreadcrumbSeparator, null, separator));
}
return null;
};
const BreadcrumbItem = props => {
const {
prefixCls: customizePrefixCls,
children,
href
} = props,
restProps = BreadcrumbItem_rest(props, ["prefixCls", "children", "href"]);
const {
getPrefixCls
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
const prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
return /*#__PURE__*/_react_17_0_2_react.createElement(InternalBreadcrumbItem, Object.assign({}, restProps, {
prefixCls: prefixCls
}), renderItem(prefixCls, restProps, children, href));
};
BreadcrumbItem.__ANT_BREADCRUMB_ITEM = true;
/* harmony default export */ var breadcrumb_BreadcrumbItem = (BreadcrumbItem);
// EXTERNAL MODULE: ./node_modules/_antd@5.7.1@antd/es/style/index.js
var style = __webpack_require__(39970);
// EXTERNAL MODULE: ./node_modules/_antd@5.7.1@antd/es/theme/util/genComponentStyleHook.js
var genComponentStyleHook = __webpack_require__(70770);
// EXTERNAL MODULE: ./node_modules/_antd@5.7.1@antd/es/theme/util/statistic.js
var statistic = __webpack_require__(3562);
;// CONCATENATED MODULE: ./node_modules/_antd@5.7.1@antd/es/breadcrumb/style/index.js
const genBreadcrumbStyle = token => {
const {
componentCls,
iconCls
} = token;
return {
[componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
color: token.itemColor,
fontSize: token.fontSize,
[iconCls]: {
fontSize: token.iconFontSize
},
ol: {
display: 'flex',
flexWrap: 'wrap',
margin: 0,
padding: 0,
listStyle: 'none'
},
a: Object.assign({
color: token.linkColor,
transition: `color ${token.motionDurationMid}`,
padding: `0 ${token.paddingXXS}px`,
borderRadius: token.borderRadiusSM,
height: token.lineHeight * token.fontSize,
display: 'inline-block',
marginInline: -token.marginXXS,
'&:hover': {
color: token.linkHoverColor,
backgroundColor: token.colorBgTextHover
}
}, (0,style/* genFocusStyle */.Qy)(token)),
[`li:last-child`]: {
color: token.lastItemColor
},
[`${componentCls}-separator`]: {
marginInline: token.separatorMargin,
color: token.separatorColor
},
[`${componentCls}-link`]: {
[`
> ${iconCls} + span,
> ${iconCls} + a
`]: {
marginInlineStart: token.marginXXS
}
},
[`${componentCls}-overlay-link`]: {
borderRadius: token.borderRadiusSM,
height: token.lineHeight * token.fontSize,
display: 'inline-block',
padding: `0 ${token.paddingXXS}px`,
marginInline: -token.marginXXS,
[`> ${iconCls}`]: {
marginInlineStart: token.marginXXS,
fontSize: token.fontSizeIcon
},
'&:hover': {
color: token.linkHoverColor,
backgroundColor: token.colorBgTextHover,
a: {
color: token.linkHoverColor
}
},
a: {
'&:hover': {
backgroundColor: 'transparent'
}
}
},
// rtl style
[`&${token.componentCls}-rtl`]: {
direction: 'rtl'
}
})
};
};
// ============================== Export ==============================
/* harmony default export */ var breadcrumb_style = ((0,genComponentStyleHook/* default */.Z)('Breadcrumb', token => {
const BreadcrumbToken = (0,statistic/* merge */.TS)(token, {});
return [genBreadcrumbStyle(BreadcrumbToken)];
}, token => ({
itemColor: token.colorTextDescription,
lastItemColor: token.colorText,
iconFontSize: token.fontSize,
linkColor: token.colorTextDescription,
linkHoverColor: token.colorText,
separatorColor: token.colorTextDescription,
separatorMargin: token.marginXS
})));
;// CONCATENATED MODULE: ./node_modules/_antd@5.7.1@antd/es/breadcrumb/useItems.js
var useItems_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 route2item(route) {
const {
breadcrumbName,
children
} = route,
rest = useItems_rest(route, ["breadcrumbName", "children"]);
const clone = Object.assign({
title: breadcrumbName
}, rest);
if (children) {
clone.menu = {
items: children.map(_a => {
var {
breadcrumbName: itemBreadcrumbName
} = _a,
itemProps = useItems_rest(_a, ["breadcrumbName"]);
return Object.assign(Object.assign({}, itemProps), {
title: itemBreadcrumbName
});
})
};
}
return clone;
}
function useItems(items, routes) {
return (0,_react_17_0_2_react.useMemo)(() => {
if (items) {
return items;
}
if (routes) {
return routes.map(route2item);
}
return null;
}, [items, routes]);
}
;// CONCATENATED MODULE: ./node_modules/_antd@5.7.1@antd/es/breadcrumb/Breadcrumb.js
var Breadcrumb_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 getPath = (params, path) => {
if (path === undefined) {
return path;
}
let mergedPath = (path || '').replace(/^\//, '');
Object.keys(params).forEach(key => {
mergedPath = mergedPath.replace(`:${key}`, params[key]);
});
return mergedPath;
};
const Breadcrumb = props => {
const {
prefixCls: customizePrefixCls,
separator = '/',
style,
className,
rootClassName,
routes: legacyRoutes,
items,
children,
itemRender,
params = {}
} = props,
restProps = Breadcrumb_rest(props, ["prefixCls", "separator", "style", "className", "rootClassName", "routes", "items", "children", "itemRender", "params"]);
const {
getPrefixCls,
direction,
breadcrumb
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
let crumbs;
const prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
const [wrapSSR, hashId] = breadcrumb_style(prefixCls);
const mergedItems = useItems(items, legacyRoutes);
if (false) {}
const mergedItemRender = useItemRender(prefixCls, itemRender);
if (mergedItems && mergedItems.length > 0) {
// generated by route
const paths = [];
const itemRenderRoutes = items || legacyRoutes;
crumbs = mergedItems.map((item, index) => {
const {
path,
key,
type,
menu,
overlay,
onClick,
className: itemClassName,
separator: itemSeparator,
dropdownProps
} = item;
const mergedPath = getPath(params, path);
if (mergedPath !== undefined) {
paths.push(mergedPath);
}
const mergedKey = key !== null && key !== void 0 ? key : index;
if (type === 'separator') {
return /*#__PURE__*/_react_17_0_2_react.createElement(breadcrumb_BreadcrumbSeparator, {
key: mergedKey
}, itemSeparator);
}
const itemProps = {};
const isLastItem = index === mergedItems.length - 1;
if (menu) {
itemProps.menu = menu;
} else if (overlay) {
itemProps.overlay = overlay;
}
let {
href
} = item;
if (paths.length && mergedPath !== undefined) {
href = `#/${paths.join('/')}`;
}
return /*#__PURE__*/_react_17_0_2_react.createElement(InternalBreadcrumbItem, Object.assign({
key: mergedKey
}, itemProps, (0,pickAttrs/* default */.Z)(item, {
data: true,
aria: true
}), {
className: itemClassName,
dropdownProps: dropdownProps,
href: href,
separator: isLastItem ? '' : separator,
onClick: onClick,
prefixCls: prefixCls
}), mergedItemRender(item, params, itemRenderRoutes, paths, href));
});
} else if (children) {
const childrenLength = (0,toArray/* default */.Z)(children).length;
crumbs = (0,toArray/* default */.Z)(children).map((element, index) => {
if (!element) {
return element;
}
// =================== Warning =====================
if (false) {}
false ? 0 : void 0;
const isLastItem = index === childrenLength - 1;
return (0,reactNode/* cloneElement */.Tm)(element, {
separator: isLastItem ? '' : separator,
key: index
});
});
}
const breadcrumbClassName = _classnames_2_3_2_classnames_default()(prefixCls, breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.className, {
[`${prefixCls}-rtl`]: direction === 'rtl'
}, className, rootClassName, hashId);
const mergedStyle = Object.assign(Object.assign({}, breadcrumb === null || breadcrumb === void 0 ? void 0 : breadcrumb.style), style);
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("nav", Object.assign({
className: breadcrumbClassName,
style: mergedStyle
}, restProps), /*#__PURE__*/_react_17_0_2_react.createElement("ol", null, crumbs)));
};
Breadcrumb.Item = breadcrumb_BreadcrumbItem;
Breadcrumb.Separator = breadcrumb_BreadcrumbSeparator;
if (false) {}
/* harmony default export */ var breadcrumb_Breadcrumb = (Breadcrumb);
;// CONCATENATED MODULE: ./node_modules/_antd@5.7.1@antd/es/breadcrumb/index.js
'use client';
/* harmony default export */ var breadcrumb = (breadcrumb_Breadcrumb);
/***/ }),
/***/ 7277:
/*!***********************************************************************!*\
!*** ./node_modules/_antd@5.7.1@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.7.1@antd/es/config-provider/context.js
var context = __webpack_require__(16182);
// EXTERNAL MODULE: ./node_modules/_antd@5.7.1@antd/es/style/index.js
var style = __webpack_require__(39970);
// EXTERNAL MODULE: ./node_modules/_antd@5.7.1@antd/es/theme/util/genComponentStyleHook.js
var genComponentStyleHook = __webpack_require__(70770);
// EXTERNAL MODULE: ./node_modules/_antd@5.7.1@antd/es/theme/util/statistic.js
var statistic = __webpack_require__(3562);
;// CONCATENATED MODULE: ./node_modules/_antd@5.7.1@antd/es/divider/style/index.js
// ============================== Shared ==============================
const genSharedDividerStyle = token => {
const {
componentCls,
sizePaddingEdgeHorizontal,
colorSplit,
lineWidth
} = 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',
margin: `0 ${token.dividerVerticalGutterMargin}px`,
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: '5%'
},
'&::after': {
width: '95%'
}
},
[`&-horizontal${componentCls}-with-text-right`]: {
'&::before': {
width: '95%'
},
'&::after': {
width: '5%'
}
},
[`${componentCls}-inner-text`]: {
display: 'inline-block',
padding: '0 1em'
},
'&-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, {
dividerVerticalGutterMargin: token.marginXS,
dividerHorizontalWithTextGutterMargin: token.margin,
dividerHorizontalGutterMargin: token.marginLG
});
return [genSharedDividerStyle(dividerToken)];
}, {
sizePaddingEdgeHorizontal: 0
}));
;// CONCATENATED MODULE: ./node_modules/_antd@5.7.1@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);
/***/ }),
/***/ 24334:
/*!***********************************************************!*\
!*** ./node_modules/_js-base64@2.6.4@js-base64/base64.js ***!
\***********************************************************/
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
* base64.js
*
* Licensed under the BSD 3-Clause License.
* http://opensource.org/licenses/BSD-3-Clause
*
* References:
* http://en.wikipedia.org/wiki/Base64
*/
;(function (global, factory) {
true
? module.exports = factory(global)
: 0
}((
typeof self !== 'undefined' ? self
: typeof window !== 'undefined' ? window
: typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g
: this
), function(global) {
'use strict';
// existing version for noConflict()
global = global || {};
var _Base64 = global.Base64;
var version = "2.6.4";
// constants
var b64chars
= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
var b64tab = function(bin) {
var t = {};
for (var i = 0, l = bin.length; i < l; i++) t[bin.charAt(i)] = i;
return t;
}(b64chars);
var fromCharCode = String.fromCharCode;
// encoder stuff
var cb_utob = function(c) {
if (c.length < 2) {
var cc = c.charCodeAt(0);
return cc < 0x80 ? c
: cc < 0x800 ? (fromCharCode(0xc0 | (cc >>> 6))
+ fromCharCode(0x80 | (cc & 0x3f)))
: (fromCharCode(0xe0 | ((cc >>> 12) & 0x0f))
+ fromCharCode(0x80 | ((cc >>> 6) & 0x3f))
+ fromCharCode(0x80 | ( cc & 0x3f)));
} else {
var cc = 0x10000
+ (c.charCodeAt(0) - 0xD800) * 0x400
+ (c.charCodeAt(1) - 0xDC00);
return (fromCharCode(0xf0 | ((cc >>> 18) & 0x07))
+ fromCharCode(0x80 | ((cc >>> 12) & 0x3f))
+ fromCharCode(0x80 | ((cc >>> 6) & 0x3f))
+ fromCharCode(0x80 | ( cc & 0x3f)));
}
};
var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
var utob = function(u) {
return u.replace(re_utob, cb_utob);
};
var cb_encode = function(ccc) {
var padlen = [0, 2, 1][ccc.length % 3],
ord = ccc.charCodeAt(0) << 16
| ((ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8)
| ((ccc.length > 2 ? ccc.charCodeAt(2) : 0)),
chars = [
b64chars.charAt( ord >>> 18),
b64chars.charAt((ord >>> 12) & 63),
padlen >= 2 ? '=' : b64chars.charAt((ord >>> 6) & 63),
padlen >= 1 ? '=' : b64chars.charAt(ord & 63)
];
return chars.join('');
};
var btoa = global.btoa && typeof global.btoa == 'function'
? function(b){ return global.btoa(b) } : function(b) {
if (b.match(/[^\x00-\xFF]/)) throw new RangeError(
'The string contains invalid characters.'
);
return b.replace(/[\s\S]{1,3}/g, cb_encode);
};
var _encode = function(u) {
return btoa(utob(String(u)));
};
var mkUriSafe = function (b64) {
return b64.replace(/[+\/]/g, function(m0) {
return m0 == '+' ? '-' : '_';
}).replace(/=/g, '');
};
var encode = function(u, urisafe) {
return urisafe ? mkUriSafe(_encode(u)) : _encode(u);
};
var encodeURI = function(u) { return encode(u, true) };
var fromUint8Array;
if (global.Uint8Array) fromUint8Array = function(a, urisafe) {
// return btoa(fromCharCode.apply(null, a));
var b64 = '';
for (var i = 0, l = a.length; i < l; i += 3) {
var a0 = a[i], a1 = a[i+1], a2 = a[i+2];
var ord = a0 << 16 | a1 << 8 | a2;
b64 += b64chars.charAt( ord >>> 18)
+ b64chars.charAt((ord >>> 12) & 63)
+ ( typeof a1 != 'undefined'
? b64chars.charAt((ord >>> 6) & 63) : '=')
+ ( typeof a2 != 'undefined'
? b64chars.charAt( ord & 63) : '=');
}
return urisafe ? mkUriSafe(b64) : b64;
};
// decoder stuff
var re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
var cb_btou = function(cccc) {
switch(cccc.length) {
case 4:
var cp = ((0x07 & cccc.charCodeAt(0)) << 18)
| ((0x3f & cccc.charCodeAt(1)) << 12)
| ((0x3f & cccc.charCodeAt(2)) << 6)
| (0x3f & cccc.charCodeAt(3)),
offset = cp - 0x10000;
return (fromCharCode((offset >>> 10) + 0xD800)
+ fromCharCode((offset & 0x3FF) + 0xDC00));
case 3:
return fromCharCode(
((0x0f & cccc.charCodeAt(0)) << 12)
| ((0x3f & cccc.charCodeAt(1)) << 6)
| (0x3f & cccc.charCodeAt(2))
);
default:
return fromCharCode(
((0x1f & cccc.charCodeAt(0)) << 6)
| (0x3f & cccc.charCodeAt(1))
);
}
};
var btou = function(b) {
return b.replace(re_btou, cb_btou);
};
var cb_decode = function(cccc) {
var len = cccc.length,
padlen = len % 4,
n = (len > 0 ? b64tab[cccc.charAt(0)] << 18 : 0)
| (len > 1 ? b64tab[cccc.charAt(1)] << 12 : 0)
| (len > 2 ? b64tab[cccc.charAt(2)] << 6 : 0)
| (len > 3 ? b64tab[cccc.charAt(3)] : 0),
chars = [
fromCharCode( n >>> 16),
fromCharCode((n >>> 8) & 0xff),
fromCharCode( n & 0xff)
];
chars.length -= [0, 0, 2, 1][padlen];
return chars.join('');
};
var _atob = global.atob && typeof global.atob == 'function'
? function(a){ return global.atob(a) } : function(a){
return a.replace(/\S{1,4}/g, cb_decode);
};
var atob = function(a) {
return _atob(String(a).replace(/[^A-Za-z0-9\+\/]/g, ''));
};
var _decode = function(a) { return btou(_atob(a)) };
var _fromURI = function(a) {
return String(a).replace(/[-_]/g, function(m0) {
return m0 == '-' ? '+' : '/'
}).replace(/[^A-Za-z0-9\+\/]/g, '');
};
var decode = function(a){
return _decode(_fromURI(a));
};
var toUint8Array;
if (global.Uint8Array) toUint8Array = function(a) {
return Uint8Array.from(atob(_fromURI(a)), function(c) {
return c.charCodeAt(0);
});
};
var noConflict = function() {
var Base64 = global.Base64;
global.Base64 = _Base64;
return Base64;
};
// export Base64
global.Base64 = {
VERSION: version,
atob: atob,
btoa: btoa,
fromBase64: decode,
toBase64: encode,
utob: utob,
encode: encode,
encodeURI: encodeURI,
btou: btou,
decode: decode,
noConflict: noConflict,
fromUint8Array: fromUint8Array,
toUint8Array: toUint8Array
};
// if ES5 is available, make Base64.extendString() available
if (typeof Object.defineProperty === 'function') {
var noEnum = function(v){
return {value:v,enumerable:false,writable:true,configurable:true};
};
global.Base64.extendString = function () {
Object.defineProperty(
String.prototype, 'fromBase64', noEnum(function () {
return decode(this)
}));
Object.defineProperty(
String.prototype, 'toBase64', noEnum(function (urisafe) {
return encode(this, urisafe)
}));
Object.defineProperty(
String.prototype, 'toBase64URI', noEnum(function () {
return encode(this, true)
}));
};
}
//
// export Base64 to the namespace
//
if (global['Meteor']) { // Meteor.js
Base64 = global.Base64;
}
// module.exports and AMD are mutually exclusive.
// module.exports has precedence.
if ( true && module.exports) {
module.exports.Base64 = global.Base64;
}
else if (true) {
// AMD. Register as an anonymous module.
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function(){ return global.Base64 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
}
// that's it!
return {Base64: global.Base64}
}));
/***/ })
}]);