diff --git a/asset-manifest.json b/asset-manifest.json index 4fa2cd2..2416cb8 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,16 +1,16 @@ { "files": { "main.css": "./static/css/main.05645924.css", - "main.js": "./static/js/main.80bf03e3.js", + "main.js": "./static/js/main.a323ee9f.js", "static/media/dice.svg": "./static/media/dice.d63a5372a4a2539d94608f83595aeb11.svg", "static/media/add.svg": "./static/media/add.4e7976ab3b03447dee324df90be0feb2.svg", "index.html": "./index.html", "static/media/back.svg": "./static/media/back.85f9a6f9103cbe9e07b0e93fa7c01de3.svg", "main.05645924.css.map": "./static/css/main.05645924.css.map", - "main.80bf03e3.js.map": "./static/js/main.80bf03e3.js.map" + "main.a323ee9f.js.map": "./static/js/main.a323ee9f.js.map" }, "entrypoints": [ "static/css/main.05645924.css", - "static/js/main.80bf03e3.js" + "static/js/main.a323ee9f.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index 839b519..4f22e05 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -
a||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.p = \"./\";","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","import _typeof from \"./typeof.js\";\nimport assertThisInitialized from \"./assertThisInitialized.js\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return assertThisInitialized(self);\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nimport possibleConstructorReturn from \"./possibleConstructorReturn.js\";\nexport default function _createSuper(Derived) {\n var hasNativeReflectConstruct = isNativeReflectConstruct();\n return function _createSuperInternal() {\n var Super = getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = getPrototypeOf(this).constructor;\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return possibleConstructorReturn(this, result);\n };\n}","export default function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","var _path;\n\nvar _excluded = [\"title\", \"titleId\"];\n\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgBack(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 30 30\",\n fill: \"#ffffff\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M15,27c6.627,0,12-5.373,12-12S21.627,3,15,3S3,8.373,3,15S8.373,27,15,27z M9.293,14.293l4-4 C13.488,10.098,13.744,10,14,10s0.512,0.098,0.707,0.293c0.391,0.391,0.391,1.023,0,1.414L12.414,14H20c0.552,0,1,0.447,1,1 s-0.448,1-1,1h-7.586l2.293,2.293c0.391,0.391,0.391,1.023,0,1.414s-1.023,0.391-1.414,0l-4-4 C8.902,15.316,8.902,14.684,9.293,14.293z\",\n fill: \"#ffffff\"\n })));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgBack);\nexport default __webpack_public_path__ + \"static/media/back.85f9a6f9103cbe9e07b0e93fa7c01de3.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\n\nvar _excluded = [\"title\", \"titleId\"];\n\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgAdd(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 30 30\",\n fill: \"#ffffff\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M 6 4 C 4.895 4 4 4.895 4 6 L 4 9 C 4 9.552 4.448 10 5 10 L 25 10 C 25.552 10 26 9.552 26 9 L 26 6 C 26 4.895 25.105 4 24 4 L 6 4 z M 5 12 C 4.448 12 4 12.448 4 13 L 4 17 C 4 17.552 4.448 18 5 18 L 15.517578 18 C 17.132578 15.589 19.88 14 23 14 C 24.054 14 25.06 14.190437 26 14.523438 L 26 13 C 26 12.448 25.552 12 25 12 L 5 12 z M 23 16 C 19.134 16 16 19.134 16 23 C 16 26.866 19.134 30 23 30 C 26.866 30 30 26.866 30 23 C 30 19.134 26.866 16 23 16 z M 23 19 C 23.552 19 24 19.447 24 20 L 24 22 L 26 22 C 26.552 22 27 22.447 27 23 C 27 23.553 26.552 24 26 24 L 24 24 L 24 26 C 24 26.553 23.552 27 23 27 C 22.448 27 22 26.553 22 26 L 22 24 L 20 24 C 19.448 24 19 23.553 19 23 C 19 22.447 19.448 22 20 22 L 22 22 L 22 20 C 22 19.447 22.448 19 23 19 z M 5 20 C 4.448 20 4 20.448 4 21 L 4 24 C 4 25.105 4.895 26 6 26 L 14.523438 26 C 14.190437 25.06 14 24.054 14 23 C 14 21.946 14.190437 20.94 14.523438 20 L 5 20 z\",\n fill: \"#ffffff\"\n })));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgAdd);\nexport default __webpack_public_path__ + \"static/media/add.4e7976ab3b03447dee324df90be0feb2.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\n\nvar _excluded = [\"title\", \"titleId\"];\n\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgDice(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 48 48\",\n fill: \"#ffffff\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M40.018,11.05L28.332,5.033c-0.001,0-0.002-0.001-0.003-0.001c-2.711-1.39-5.948-1.388-8.661,0.001L7.982,11.05 C6.143,11.997,5,13.87,5,15.939v16.121c0,2.069,1.143,3.943,2.982,4.89l11.688,6.018c1.354,0.694,2.842,1.041,4.328,1.041 c1.488,0,2.976-0.347,4.333-1.042l11.686-6.017c1.84-0.947,2.982-2.82,2.982-4.89V15.939C43,13.87,41.857,11.997,40.018,11.05z M24,11c1.381,0,2.5,0.672,2.5,1.5S25.381,14,24,14s-2.5-0.672-2.5-1.5S22.619,11,24,11z M9.5,25C8.672,25,8,23.881,8,22.5 C8,21.119,8.672,20,9.5,20s1.5,1.119,1.5,2.5C11,23.881,10.328,25,9.5,25z M13.5,31c-0.828,0-1.5-1.119-1.5-2.5 c0-1.381,0.672-2.5,1.5-2.5s1.5,1.119,1.5,2.5C15,29.881,14.328,31,13.5,31z M17.5,37c-0.828,0-1.5-1.119-1.5-2.5 c0-1.381,0.672-2.5,1.5-2.5s1.5,1.119,1.5,2.5C19,35.881,18.328,37,17.5,37z M31.5,35c-0.828,0-1.5-1.119-1.5-2.5 c0-1.381,0.672-2.5,1.5-2.5s1.5,1.119,1.5,2.5C33,33.881,32.328,35,31.5,35z M36.5,26c-0.828,0-1.5-1.119-1.5-2.5 c0-1.381,0.672-2.5,1.5-2.5s1.5,1.119,1.5,2.5C38,24.881,37.328,26,36.5,26z M39.138,16.857l-10.832,5.089 c-0.884,0.46-1.834,0.753-2.806,0.908v16.632c0,0.829-0.672,1.5-1.5,1.5s-1.5-0.671-1.5-1.5V22.849 c-0.984-0.159-1.952-0.458-2.859-0.93L8.862,16.857c-0.75-0.352-1.072-1.246-0.72-1.995c0.352-0.751,1.246-1.073,1.995-0.72 l10.832,5.089c1.918,0.995,4.144,0.993,6.007,0.026l10.886-5.115c0.749-0.353,1.643-0.03,1.995,0.72 C40.21,15.612,39.888,16.505,39.138,16.857z\",\n fill: \"#ffffff\"\n })));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgDice);\nexport default __webpack_public_path__ + \"static/media/dice.d63a5372a4a2539d94608f83595aeb11.svg\";\nexport { ForwardRef as ReactComponent };","import unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nexport default function _createForOfIteratorHelper(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n\n if (!it) {\n if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n\n var F = function F() {};\n\n return {\n s: F,\n n: function n() {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function e(_e) {\n throw _e;\n },\n f: F\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function s() {\n it = it.call(o);\n },\n n: function n() {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function e(_e2) {\n didErr = true;\n err = _e2;\n },\n f: function f() {\n try {\n if (!normalCompletion && it[\"return\"] != null) it[\"return\"]();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}","export const nextUniqueId = (() => {\n let id = 0;\n return () => {\n return id++;\n }\n})();\n\nexport function normalize_score_from_isop(score) {\n /*** Copied from PKU-Helper source file `score_parser.js` ***/\n if(score==='合格') return 'P';\n else if(score==='不合格') return 'NP';\n else if(score==='缓考') return 'I';\n else if(score==='免修') return 'EX';\n else return score;\n}\n\nexport function isValidScore(score: String) {\n return ((new Set([\"P\", \"F\", \"W\", \"NP\", \"I\", \"EX\"])).has(score) || (score !== \"\" && Number(score) >= 0 && Number(score) <= 100));\n}\n\nexport function calcAvgGPA(course_infos) {\n // 计算总绩点\n let creditTotal = 0.0;\n let GPATotal = 0.0;\n for (let info of course_infos) {\n let score = parseFloat(info.score)\n if (isNaN(score)) {\n if (info.score === \"P\") { }\n else if (info.score === \"F\") { }\n else if (info.score === \"W\") { }\n else if (info.score === \"NP\") { }\n else if (info.score === \"I\") { }\n else if (info.score === \"EX\") { }\n else { console.log(\"无法解析成绩! 注意——仅支持本科生成绩单——什么?您是本科生仍遇到此报错?请联系作者!\") }\n }\n else {\n if (score >= 60 && score <= 100) {\n let credit = info.credit;\n let GPA = score2gpa(score);\n GPATotal += GPA * credit;\n creditTotal += credit;\n }\n else {\n /* 按照 PKU-Helper 的计算规则, [0, 60) 的课程也不参与绩点计算 */\n }\n }\n }\n return GPATotal / creditTotal; // 加权平均\n}\n\nexport function score2gpa(score) {\n console.assert(60 <= score && score <= 100, `成绩 ${score} 无法进行 GPA 计算`);\n return 4 - 3 * (100 - score) ** 2 / 1600;\n}\n\nexport function gpa2score(gpa) {\n console.assert(0 <= gpa && gpa <= 100, `GPA ${gpa} 无法进行分数折合!`);\n return 100 - Math.sqrt((6400 - 1600 * gpa) / 3);\n}\n\nexport function score2gpa_printable(score: String) {\n if (score === \"P\") { return \"通过\"}\n else if (score === \"F\") { return \"未通过\"}\n else if (score === \"W\") { return \"退课\"}\n else if (score === \"NP\") { return \"未通过\"}\n else if (score === \"I\") { return \"缓考\"}\n else if (score === \"EX\") { return \"免修\"}\n else if (Number(score) < 60) { return \"-\" }\n else { return score2gpa(Number(score)).toFixed(3);}\n}\n\nexport function gpa2score_printable(gpa) {\n return gpa2score(Number(gpa)).toFixed(1);\n}\n\nexport function coursesGroupBySemester(course_infos) {\n /* 把所有课程根据 semester 分组 */\n const semester_names = [...new Set(course_infos.map(info => info.semester.join(\"-\")))].sort();\n return semester_names.map(sem_name => ({\n semester: sem_name.split(\"-\").map(Number),\n course_infos: course_infos.filter(info => info.semester.join(\"-\") === sem_name),\n }));\n}\n\nexport function score2sortVal(course_info) {\n // 百分制成绩 => Number()\n // 非百分制成绩 => 认为 P > EX > I > NP > F > W, 分别赋予 -1, -2, -3, -4, -5, -6\n let score = Number(course_info.score);\n if (isNaN(score)) {\n switch (course_info.score) {\n case \"P\": return -1;\n case \"EX\": return -2;\n case \"I\": return -3;\n case \"NP\": return -4;\n case \"F\": return -5;\n case \"W\": return -6;\n default:\n console.log(`Unexpected error occurred! (course_info = ${course_info})`)\n return -7;\n }\n }\n return score;\n}\n\n","import {score2gpa} from \"./miscs.js\";\n\n// 100 分的颜色\nconst HSL_100 = {\n h: 90,\n s: 100,\n l: 70,\n}\n\n// 60 分的颜色\nconst HSL_60 = {\n h: -20,\n s: 90,\n l: 60,\n}\n\n// P / W / I / EX 的颜色\nconst HSL_P = {\n h: 218, s: 20, l: 85\n};\n\n// F / NP 的颜色\nconst HSL_F = {\n h: -10, s: 50, l: 50\n};\n\n\nexport function score2hsl(score_str: String) {\n /* H: [0, 360] S: [0, 100] L: [0, 100] */\n if (score_str === \"F\" || score_str === \"NP\") {\n return HSL_F;\n }\n else if (score_str === \"P\" || score_str === \"W\" || score_str === \"I\" || score_str === \"EX\") {\n return HSL_P;\n }\n else if (Number(score_str) < 60) {\n return HSL_F;\n }\n else {\n let score = Number(score_str);\n let prop = score2proportion(score) / 100;\n // 线性插值\n let h = prop * HSL_100.h + (1 - prop) * HSL_60.h;\n let s = prop * HSL_100.s + (1 - prop) * HSL_60.s;\n let l = prop * HSL_100.l + (1 - prop) * HSL_60.l;\n return {h, s, l};\n }\n}\n\nexport function score2proportion(score_str: String) {\n /* -> [0, 100] */\n let score = Number(score_str);\n if (score >= 60 && score <= 100) {\n let gpa = score2gpa(score);\n return 100 * (gpa - 1.0) / 3;\n }\n else {\n return 100;\n }\n}\n\nexport function hsl2hslprintable({ h, s, l }) {\n return `hsl(${h},${s}%,${l}%)`;\n}","import { nextUniqueId } from \"./miscs\";\n\nexport function seemsByPageCopy(elem) {\n return (elem.getElementsByClassName(\"semester-block\").length !== 0);\n}\n\nexport function getDOMChild(node, indices) {\n // indices 如 [1,0,0,0,1,2]\n let ret = node;\n for (let i of indices) {\n ret = ret.children[i];\n }\n return ret;\n}\n\nexport function parseCourseInfoAll(DOMElem) {\n // 从粘贴的 DOM 中 解析出所需的所有课程信息.\n let course_infos = [];\n let semester_blocks = [...DOMElem.getElementsByClassName(\"semester-block\")];\n for (let block of semester_blocks.slice(0, -1)) { /* 最后一项是 \"总绩点\", 不是一个 \"学期\", 因此丢掉 */\n console.log(\"b\", block);\n let semester_name = getDOMChild(block, [0,0,1,0,0]).innerText;\n console.log(\"semester_name\", semester_name);\n if (semester_name === \"新增成绩\") {\n continue; // 防止用户输入中有 「新增成绩」 尚未 「已阅」\n }\n let course_rows = block.getElementsByClassName(\"course-row\");\n for (let row of course_rows) {\n let name = getDOMChild(row, [0,1,0,0,0]).innerText;\n // console.log(\"name\", name);\n let semester = semester_name.match(/(\\d+)学年 第(\\d+)学期/).slice(1, 3).map(Number); // \"19学年 第2学期\" --> [19, 2]\n let credit = Number(getDOMChild(row, [0,0,0,0]).innerText);\n // console.log(\"credit\", credit);\n let score = getDOMChild(row, [0,2,0,0]).innerText;\n // console.log(\"score\", score);\n let type_teacher = getDOMChild(row, [0,1,0,1]).innerText.split(\"-\");\n // console.log(\"type_teacher\", type_teacher);\n let type = type_teacher[0].trim();\n // console.log(\"type\", type);\n let teacher = type_teacher[1].trim();\n // console.log(\"teacher\", teacher);\n let course_info = {\n is_user_created: false,\n unique_id: nextUniqueId(),\n name,\n semester,\n credit,\n score,\n original_score: score,\n type,\n teacher,\n };\n course_infos.push(course_info);\n }\n }\n course_infos = course_infos.filter(info => info.semester !== \"新增成绩\");\n return course_infos;\n}\n","import { nextUniqueId } from \"./miscs\";\n\n// 随机生成整数 (min 和 max 都是 inclusive 的!)\nexport function randint(min: Int, max: Int) {\n let rand = Math.random();\n while (rand === 0 || rand === 1) {rand = Math.random();}\n return Math.floor((max - min + 1) * rand + min);\n}\n\n// 列表中随机选一个元素\nexport function random_choice(list: Array) {\n return list[randint(0, list.length - 1)];\n}\n\n// 随机生成学分\nexport function random_credit(): Number {\n return randint(1, 5);\n}\n\n// 随机生成课程名\nexport function random_course_name() {\n const prefixes = [\"西方\", \"现代\", \"高级\", \"宏观\", \"学术\", \"高等\", \"计算\", \"工程\", \"大学\", \"应用\", \"公共\",\n \"普通\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", ];\n const concepts = [\"数学\", \"语言\", \"外国语\", \"物理\", \"化学\", \"生物\", \"医学\", \"计算\", \"信息\", \"电子\",\n \"法学\", \"哲学\", \"心理\", \"社会\", \"传播\", \"新闻\", \"历史\", \"考古\", \"摄影\",\n \"运筹\", \"天体\", \"地理\", \"光学\", \"系统\", \"机械\", \"电磁学\", \"农学\", \"游戏设计\", \"戏曲\",\n \"音乐\", \"太极拳\", \"生殖\", \"航空\", \"航天\", \"健美\", \"环境\", \"美术\", \"文化\", \"统计\",\n \"力学\", \"几何\", ]\n const connectives = [\"与\", \"中的\", \"\", \"\"]\n const suffixes = [\"概论\", \"基础\", \"导论\", \"实践\", \"(A)\", \"(B)\", \"(C)\", \"(实验班)\", \"(上)\", \"(下)\", \"理论\",\n \"设计\", \"分析\", \"方法\", \"研讨班\", \"通识\", \"实验\", \"研究\", \"原理\", \"赏析\", \"实习\",\n \"\", \"\", ];\n\n // 生成模式: prefix concept (connective concept)? suffix\n let prefix = random_choice(prefixes);\n let concept = random_choice(concepts);\n let have_second = random_choice([true, false]);\n let connective = have_second ? random_choice(connectives) : \"\";\n let concept2 = have_second ? random_choice(concepts) : \"\";\n let suffix = random_choice(suffixes);\n return \"\".concat(prefix, concept, connective, concept2, suffix);\n}\n\n// 随机生成成绩\nexport function random_score() {\n let seed = Math.random();\n if (seed < 0.05) return \"W\";\n if (seed < 0.10) return \"P\";\n if (seed < 0.11) return \"F\";\n if (seed < 0.12) return \"59\";\n if (seed < 0.25) return String(randint(60, 75));\n if (seed < 0.80) return String(randint(75, 93));\n if (seed < 0.95) return String(randint(93, 99));\n return \"100\";\n}\n\n// 获取前一年 (注意 0 的前一年是 99)\nconst prevYear = (year) => ((year === 0) ? 99 : (year - 1));\n\n// 根据当前时间, 计算当前所处学期\nexport function nowSemester() {\n\n let now = new Date();\n let month = Number(now.getMonth()) + 1; // 0 表示 1 月, 这里进行修正\n let year = Number(now.getFullYear()) % 100; // 0, 1, ..., 99\n\n let semester; // 取值 1, 2 或 3\n // 决定学期 (semester) 的规则:\n // 如果现在是 9、10、11、12、1、2 月, 认为是第 1 学期 (秋季);\n // 如果现在是 3、4、5、6、7 月, 认为是第 2 学期 (春季);\n // 如果现在是 8 月, 认为是第 3 学期 (暑期);\n switch (month) {\n case 9: case 10: case 11: case 12: case 1: case 2: semester = 1; break;\n case 3: case 4: case 5: case 6: case 7: semester = 2; break;\n case 8: semester = 3; break;\n default: break;\n }\n\n let acd_year; // 取值 0, 1, ..., 99\n // 决定学年 (acd_year) 的规则: 假设现在是 19 年, 那么:\n // 如果现在是 9, 10, 11, 12 月, 那么学年为 19\n // 如果现在是 1, 2, 3, 4, 5, 6, 7, 8, 那么学年为 18\n if (9 <= month && month <= 12) {\n acd_year = year;\n } else {\n acd_year = prevYear(year);\n }\n\n return [acd_year, semester]\n}\n\n\n// 随机生成一张成绩单\nexport function randomGenerateSomeCourseInfo() {\n\n // 先生成一个名为 semesters 形如 [[19, 1], [19, 2], [20, 1], [20, 2], [20, 3], [21, 1], [21, 2]] 的列表\n let [nowYear, nowSem] = nowSemester();\n let lastYear = prevYear(nowYear);\n let twoYearsAgo = prevYear(lastYear);\n let semesters = [\n [twoYearsAgo, 1], [twoYearsAgo, 2],\n [lastYear, 1], [lastYear, 2], [lastYear, 3],\n ...[...Array(nowSem).keys()].map(sem => [nowYear, sem + 1]),\n ];\n\n // 然后为 semesters 中的每个学期随机生成一些课程\n let generated_infos = [];\n for (let semester of semesters) {\n let num_courses = randint(4, 8);\n for (let _ = 0; _ < num_courses; _++) {\n let score = random_score();\n generated_infos.push({\n credit: random_credit(),\n is_user_created: false,\n name: random_course_name(),\n score,\n original_score: score,\n semester,\n teacher: \"随机生成的课程\",\n type: \"随机生成的课程\",\n unique_id: nextUniqueId(),\n });\n }\n }\n return generated_infos;\n}\n","import \"./css/App.css\";\nimport { Component, useState } from \"react\";\nimport back_icon from \"./icons/back.svg\";\nimport add_icon from \"./icons/add.svg\";\nimport random_icon from \"./icons/dice.svg\";\nimport { calcAvgGPA, coursesGroupBySemester, gpa2score, gpa2score_printable, score2gpa_printable, score2sortVal, isValidScore, nextUniqueId, } from \"./utils/miscs.js\";\nimport { hsl2hslprintable, score2hsl, score2proportion } from \"./utils/color.js\";\nimport { seemsByPageCopy, parseCourseInfoAll } from \"./utils/from-paste.js\";\nimport {\n randomGenerateSomeCourseInfo,\n random_course_name,\n random_credit,\n random_score,\n nowSemester\n} from \"./utils/random-generate.js\";\nimport { seemsLikeToken, fetchCourseInfoAll } from \"./utils/from-api.js\";\n\n\n/* ------------------------------ 顶栏 ------------------------------ */\nfunction TitleBar() {\n return (\n a||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.p = \"./\";","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","import _typeof from \"./typeof.js\";\nimport assertThisInitialized from \"./assertThisInitialized.js\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return assertThisInitialized(self);\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nimport possibleConstructorReturn from \"./possibleConstructorReturn.js\";\nexport default function _createSuper(Derived) {\n var hasNativeReflectConstruct = isNativeReflectConstruct();\n return function _createSuperInternal() {\n var Super = getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = getPrototypeOf(this).constructor;\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return possibleConstructorReturn(this, result);\n };\n}","export default function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","var _path;\n\nvar _excluded = [\"title\", \"titleId\"];\n\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgBack(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 30 30\",\n fill: \"#ffffff\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M15,27c6.627,0,12-5.373,12-12S21.627,3,15,3S3,8.373,3,15S8.373,27,15,27z M9.293,14.293l4-4 C13.488,10.098,13.744,10,14,10s0.512,0.098,0.707,0.293c0.391,0.391,0.391,1.023,0,1.414L12.414,14H20c0.552,0,1,0.447,1,1 s-0.448,1-1,1h-7.586l2.293,2.293c0.391,0.391,0.391,1.023,0,1.414s-1.023,0.391-1.414,0l-4-4 C8.902,15.316,8.902,14.684,9.293,14.293z\",\n fill: \"#ffffff\"\n })));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgBack);\nexport default __webpack_public_path__ + \"static/media/back.85f9a6f9103cbe9e07b0e93fa7c01de3.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\n\nvar _excluded = [\"title\", \"titleId\"];\n\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgAdd(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 30 30\",\n fill: \"#ffffff\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M 6 4 C 4.895 4 4 4.895 4 6 L 4 9 C 4 9.552 4.448 10 5 10 L 25 10 C 25.552 10 26 9.552 26 9 L 26 6 C 26 4.895 25.105 4 24 4 L 6 4 z M 5 12 C 4.448 12 4 12.448 4 13 L 4 17 C 4 17.552 4.448 18 5 18 L 15.517578 18 C 17.132578 15.589 19.88 14 23 14 C 24.054 14 25.06 14.190437 26 14.523438 L 26 13 C 26 12.448 25.552 12 25 12 L 5 12 z M 23 16 C 19.134 16 16 19.134 16 23 C 16 26.866 19.134 30 23 30 C 26.866 30 30 26.866 30 23 C 30 19.134 26.866 16 23 16 z M 23 19 C 23.552 19 24 19.447 24 20 L 24 22 L 26 22 C 26.552 22 27 22.447 27 23 C 27 23.553 26.552 24 26 24 L 24 24 L 24 26 C 24 26.553 23.552 27 23 27 C 22.448 27 22 26.553 22 26 L 22 24 L 20 24 C 19.448 24 19 23.553 19 23 C 19 22.447 19.448 22 20 22 L 22 22 L 22 20 C 22 19.447 22.448 19 23 19 z M 5 20 C 4.448 20 4 20.448 4 21 L 4 24 C 4 25.105 4.895 26 6 26 L 14.523438 26 C 14.190437 25.06 14 24.054 14 23 C 14 21.946 14.190437 20.94 14.523438 20 L 5 20 z\",\n fill: \"#ffffff\"\n })));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgAdd);\nexport default __webpack_public_path__ + \"static/media/add.4e7976ab3b03447dee324df90be0feb2.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\n\nvar _excluded = [\"title\", \"titleId\"];\n\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgDice(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 48 48\",\n fill: \"#ffffff\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M40.018,11.05L28.332,5.033c-0.001,0-0.002-0.001-0.003-0.001c-2.711-1.39-5.948-1.388-8.661,0.001L7.982,11.05 C6.143,11.997,5,13.87,5,15.939v16.121c0,2.069,1.143,3.943,2.982,4.89l11.688,6.018c1.354,0.694,2.842,1.041,4.328,1.041 c1.488,0,2.976-0.347,4.333-1.042l11.686-6.017c1.84-0.947,2.982-2.82,2.982-4.89V15.939C43,13.87,41.857,11.997,40.018,11.05z M24,11c1.381,0,2.5,0.672,2.5,1.5S25.381,14,24,14s-2.5-0.672-2.5-1.5S22.619,11,24,11z M9.5,25C8.672,25,8,23.881,8,22.5 C8,21.119,8.672,20,9.5,20s1.5,1.119,1.5,2.5C11,23.881,10.328,25,9.5,25z M13.5,31c-0.828,0-1.5-1.119-1.5-2.5 c0-1.381,0.672-2.5,1.5-2.5s1.5,1.119,1.5,2.5C15,29.881,14.328,31,13.5,31z M17.5,37c-0.828,0-1.5-1.119-1.5-2.5 c0-1.381,0.672-2.5,1.5-2.5s1.5,1.119,1.5,2.5C19,35.881,18.328,37,17.5,37z M31.5,35c-0.828,0-1.5-1.119-1.5-2.5 c0-1.381,0.672-2.5,1.5-2.5s1.5,1.119,1.5,2.5C33,33.881,32.328,35,31.5,35z M36.5,26c-0.828,0-1.5-1.119-1.5-2.5 c0-1.381,0.672-2.5,1.5-2.5s1.5,1.119,1.5,2.5C38,24.881,37.328,26,36.5,26z M39.138,16.857l-10.832,5.089 c-0.884,0.46-1.834,0.753-2.806,0.908v16.632c0,0.829-0.672,1.5-1.5,1.5s-1.5-0.671-1.5-1.5V22.849 c-0.984-0.159-1.952-0.458-2.859-0.93L8.862,16.857c-0.75-0.352-1.072-1.246-0.72-1.995c0.352-0.751,1.246-1.073,1.995-0.72 l10.832,5.089c1.918,0.995,4.144,0.993,6.007,0.026l10.886-5.115c0.749-0.353,1.643-0.03,1.995,0.72 C40.21,15.612,39.888,16.505,39.138,16.857z\",\n fill: \"#ffffff\"\n })));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgDice);\nexport default __webpack_public_path__ + \"static/media/dice.d63a5372a4a2539d94608f83595aeb11.svg\";\nexport { ForwardRef as ReactComponent };","import unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nexport default function _createForOfIteratorHelper(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n\n if (!it) {\n if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n\n var F = function F() {};\n\n return {\n s: F,\n n: function n() {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function e(_e) {\n throw _e;\n },\n f: F\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function s() {\n it = it.call(o);\n },\n n: function n() {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function e(_e2) {\n didErr = true;\n err = _e2;\n },\n f: function f() {\n try {\n if (!normalCompletion && it[\"return\"] != null) it[\"return\"]();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}","export const nextUniqueId = (() => {\n let id = 0;\n return () => {\n return id++;\n }\n})();\n\nexport function normalize_score_from_isop(score) {\n /*** Copied from PKU-Helper source file `score_parser.js` ***/\n if(score==='合格') return 'P';\n else if(score==='不合格') return 'NP';\n else if(score==='缓考') return 'I';\n else if(score==='免修') return 'EX';\n else return score;\n}\n\nexport function isValidScore(score: String) {\n return ((new Set([\"P\", \"F\", \"W\", \"NP\", \"I\", \"EX\"])).has(score) || (score !== \"\" && Number(score) >= 0 && Number(score) <= 100));\n}\n\nexport function calcAvgGPA(course_infos) {\n // 计算总绩点\n let creditTotal = 0.0;\n let GPATotal = 0.0;\n for (let info of course_infos) {\n let score = parseFloat(info.score)\n if (isNaN(score)) {\n if (info.score === \"P\") { }\n else if (info.score === \"F\") { }\n else if (info.score === \"W\") { }\n else if (info.score === \"NP\") { }\n else if (info.score === \"I\") { }\n else if (info.score === \"EX\") { }\n else { console.log(\"无法解析成绩! 注意——仅支持本科生成绩单——什么?您是本科生仍遇到此报错?请联系作者!\") }\n }\n else {\n if (score >= 60 && score <= 100) {\n let credit = info.credit;\n let GPA = score2gpa(score);\n GPATotal += GPA * credit;\n creditTotal += credit;\n }\n else {\n /* 按照 PKU-Helper 的计算规则, [0, 60) 的课程也不参与绩点计算 */\n }\n }\n }\n return GPATotal / creditTotal; // 加权平均\n}\n\nexport function score2gpa(score) {\n console.assert(60 <= score && score <= 100, `成绩 ${score} 无法进行 GPA 计算`);\n return 4 - 3 * (100 - score) ** 2 / 1600;\n}\n\nexport function gpa2score(gpa) {\n console.assert(0 <= gpa && gpa <= 100, `GPA ${gpa} 无法进行分数折合!`);\n return 100 - Math.sqrt((6400 - 1600 * gpa) / 3);\n}\n\nexport function score2gpa_printable(score: String) {\n if (score === \"P\") { return \"通过\"}\n else if (score === \"F\") { return \"未通过\"}\n else if (score === \"W\") { return \"退课\"}\n else if (score === \"NP\") { return \"未通过\"}\n else if (score === \"I\") { return \"缓考\"}\n else if (score === \"EX\") { return \"免修\"}\n else if (Number(score) < 60) { return \"-\" }\n else { return score2gpa(Number(score)).toFixed(3);}\n}\n\nexport function gpa2score_printable(gpa) {\n return gpa2score(Number(gpa)).toFixed(1);\n}\n\nexport function coursesGroupBySemester(course_infos) {\n /* 把所有课程根据 semester 分组 */\n const semester_names = [...new Set(course_infos.map(info => info.semester.join(\"-\")))].sort();\n return semester_names.map(sem_name => ({\n semester: sem_name.split(\"-\").map(Number),\n course_infos: course_infos.filter(info => info.semester.join(\"-\") === sem_name),\n }));\n}\n\nexport function score2sortVal(course_info) {\n // 百分制成绩 => Number()\n // 非百分制成绩 => 认为 P > EX > I > NP > F > W, 分别赋予 -1, -2, -3, -4, -5, -6\n let score = Number(course_info.score);\n if (isNaN(score)) {\n switch (course_info.score) {\n case \"P\": return -1;\n case \"EX\": return -2;\n case \"I\": return -3;\n case \"NP\": return -4;\n case \"F\": return -5;\n case \"W\": return -6;\n default:\n console.log(`Unexpected error occurred! (course_info = ${course_info})`)\n return -7;\n }\n }\n return score;\n}\n\n","import {score2gpa} from \"./miscs.js\";\n\n// 100 分的颜色\nconst HSL_100 = {\n h: 90,\n s: 100,\n l: 70,\n}\n\n// 60 分的颜色\nconst HSL_60 = {\n h: -20,\n s: 90,\n l: 60,\n}\n\n// P / W / I / EX 的颜色\nconst HSL_P = {\n h: 218, s: 20, l: 85\n};\n\n// F / NP 的颜色\nconst HSL_F = {\n h: -10, s: 50, l: 50\n};\n\n\nexport function score2hsl(score_str: String) {\n /* H: [0, 360] S: [0, 100] L: [0, 100] */\n if (score_str === \"F\" || score_str === \"NP\") {\n return HSL_F;\n }\n else if (score_str === \"P\" || score_str === \"W\" || score_str === \"I\" || score_str === \"EX\") {\n return HSL_P;\n }\n else if (Number(score_str) < 60) {\n return HSL_F;\n }\n else {\n let score = Number(score_str);\n let prop = score2proportion(score) / 100;\n // 线性插值\n let h = prop * HSL_100.h + (1 - prop) * HSL_60.h;\n let s = prop * HSL_100.s + (1 - prop) * HSL_60.s;\n let l = prop * HSL_100.l + (1 - prop) * HSL_60.l;\n return {h, s, l};\n }\n}\n\nexport function score2proportion(score_str: String) {\n /* -> [0, 100] */\n let score = Number(score_str);\n if (score >= 60 && score <= 100) {\n let gpa = score2gpa(score);\n return 100 * (gpa - 1.0) / 3;\n }\n else {\n return 100;\n }\n}\n\nexport function hsl2hslprintable({ h, s, l }) {\n return `hsl(${h},${s}%,${l}%)`;\n}","import { nextUniqueId } from \"./miscs\";\n\nexport function seemsByPageCopy(elem) {\n return (elem.getElementsByClassName(\"semester-block\").length !== 0);\n}\n\nexport function getDOMChild(node, indices) {\n // indices 如 [1,0,0,0,1,2]\n let ret = node;\n for (let i of indices) {\n ret = ret.children[i];\n }\n return ret;\n}\n\nexport function parseCourseInfoAll(DOMElem) {\n // 从粘贴的 DOM 中 解析出所需的所有课程信息.\n let course_infos = [];\n let semester_blocks = [...DOMElem.getElementsByClassName(\"semester-block\")];\n for (let block of semester_blocks.slice(0, -1)) { /* 最后一项是 \"总绩点\", 不是一个 \"学期\", 因此丢掉 */\n console.log(\"b\", block);\n let semester_name = getDOMChild(block, [0,0,1,0,0]).innerText;\n console.log(\"semester_name\", semester_name);\n if (semester_name === \"新增成绩\") {\n continue; // 防止用户输入中有 「新增成绩」 尚未 「已阅」\n }\n let course_rows = block.getElementsByClassName(\"course-row\");\n for (let row of course_rows) {\n let name = getDOMChild(row, [0,1,0,0,0]).innerText;\n // console.log(\"name\", name);\n let semester = semester_name.match(/(\\d+)学年 第(\\d+)学期/).slice(1, 3).map(Number); // \"19学年 第2学期\" --> [19, 2]\n let credit = Number(getDOMChild(row, [0,0,0,0]).innerText);\n // console.log(\"credit\", credit);\n let score = getDOMChild(row, [0,2,0,0]).innerText;\n // console.log(\"score\", score);\n let type_teacher = getDOMChild(row, [0,1,0,1]).innerText.split(\"-\");\n // console.log(\"type_teacher\", type_teacher);\n let type = type_teacher[0].trim();\n // console.log(\"type\", type);\n let teacher = type_teacher[1].trim();\n // console.log(\"teacher\", teacher);\n let course_info = {\n is_user_created: false,\n unique_id: nextUniqueId(),\n name,\n semester,\n credit,\n score,\n original_score: score,\n type,\n teacher,\n };\n course_infos.push(course_info);\n }\n }\n course_infos = course_infos.filter(info => info.semester !== \"新增成绩\");\n return course_infos;\n}\n","import { nextUniqueId } from \"./miscs\";\n\n// 随机生成整数 (min 和 max 都是 inclusive 的!)\nexport function randint(min: Int, max: Int) {\n let rand = Math.random();\n while (rand === 0 || rand === 1) {rand = Math.random();}\n return Math.floor((max - min + 1) * rand + min);\n}\n\n// 列表中随机选一个元素\nexport function random_choice(list: Array) {\n return list[randint(0, list.length - 1)];\n}\n\n// 随机生成学分\nexport function random_credit(): Number {\n return randint(1, 5);\n}\n\n// 随机生成课程名\nexport function random_course_name() {\n const prefixes = [\"西方\", \"现代\", \"高级\", \"宏观\", \"学术\", \"高等\", \"计算\", \"工程\", \"大学\", \"应用\", \"公共\",\n \"普通\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", ];\n const concepts = [\"数学\", \"语言\", \"外国语\", \"物理\", \"化学\", \"生物\", \"医学\", \"计算\", \"信息\", \"电子\",\n \"法学\", \"哲学\", \"心理\", \"社会\", \"传播\", \"新闻\", \"历史\", \"考古\", \"摄影\",\n \"运筹\", \"天体\", \"地理\", \"光学\", \"系统\", \"机械\", \"电磁学\", \"农学\", \"游戏设计\", \"戏曲\",\n \"音乐\", \"太极拳\", \"生殖\", \"航空\", \"航天\", \"健美\", \"环境\", \"美术\", \"文化\", \"统计\",\n \"力学\", \"几何\", ]\n const connectives = [\"与\", \"中的\", \"\", \"\"]\n const suffixes = [\"概论\", \"基础\", \"导论\", \"实践\", \"(A)\", \"(B)\", \"(C)\", \"(实验班)\", \"(上)\", \"(下)\", \"理论\",\n \"设计\", \"分析\", \"方法\", \"研讨班\", \"通识\", \"实验\", \"研究\", \"原理\", \"赏析\", \"实习\",\n \"\", \"\", ];\n\n // 生成模式: prefix concept (connective concept)? suffix\n let prefix = random_choice(prefixes);\n let concept = random_choice(concepts);\n let have_second = random_choice([true, false]);\n let connective = have_second ? random_choice(connectives) : \"\";\n let concept2 = have_second ? random_choice(concepts) : \"\";\n let suffix = random_choice(suffixes);\n return \"\".concat(prefix, concept, connective, concept2, suffix);\n}\n\n// 随机生成成绩\nexport function random_score() {\n let seed = Math.random();\n if (seed < 0.05) return \"W\";\n if (seed < 0.10) return \"P\";\n if (seed < 0.11) return \"F\";\n if (seed < 0.12) return \"59\";\n if (seed < 0.25) return String(randint(60, 75));\n if (seed < 0.80) return String(randint(75, 93));\n if (seed < 0.95) return String(randint(93, 99));\n return \"100\";\n}\n\n// 获取前一年 (注意 0 的前一年是 99)\nconst prevYear = (year) => ((year === 0) ? 99 : (year - 1));\n\n// 根据当前时间, 计算当前所处学期\nexport function nowSemester() {\n\n let now = new Date();\n let month = Number(now.getMonth()) + 1; // 0 表示 1 月, 这里进行修正\n let year = Number(now.getFullYear()) % 100; // 0, 1, ..., 99\n\n let semester; // 取值 1, 2 或 3\n // 决定学期 (semester) 的规则:\n // 如果现在是 9、10、11、12、1、2 月, 认为是第 1 学期 (秋季);\n // 如果现在是 3、4、5、6、7 月, 认为是第 2 学期 (春季);\n // 如果现在是 8 月, 认为是第 3 学期 (暑期);\n switch (month) {\n case 9: case 10: case 11: case 12: case 1: case 2: semester = 1; break;\n case 3: case 4: case 5: case 6: case 7: semester = 2; break;\n case 8: semester = 3; break;\n default: break;\n }\n\n let acd_year; // 取值 0, 1, ..., 99\n // 决定学年 (acd_year) 的规则: 假设现在是 19 年, 那么:\n // 如果现在是 9, 10, 11, 12 月, 那么学年为 19\n // 如果现在是 1, 2, 3, 4, 5, 6, 7, 8, 那么学年为 18\n if (9 <= month && month <= 12) {\n acd_year = year;\n } else {\n acd_year = prevYear(year);\n }\n\n return [acd_year, semester]\n}\n\n\n// 随机生成一张成绩单\nexport function randomGenerateSomeCourseInfo() {\n\n // 先生成一个名为 semesters 形如 [[19, 1], [19, 2], [20, 1], [20, 2], [20, 3], [21, 1], [21, 2]] 的列表\n let [nowYear, nowSem] = nowSemester();\n let lastYear = prevYear(nowYear);\n let twoYearsAgo = prevYear(lastYear);\n let semesters = [\n [twoYearsAgo, 1], [twoYearsAgo, 2],\n [lastYear, 1], [lastYear, 2], [lastYear, 3],\n ...[...Array(nowSem).keys()].map(sem => [nowYear, sem + 1]),\n ];\n\n // 然后为 semesters 中的每个学期随机生成一些课程\n let generated_infos = [];\n for (let semester of semesters) {\n let num_courses = randint(4, 8);\n for (let _ = 0; _ < num_courses; _++) {\n let score = random_score();\n generated_infos.push({\n credit: random_credit(),\n is_user_created: false,\n name: random_course_name(),\n score,\n original_score: score,\n semester,\n teacher: \"随机生成的课程\",\n type: \"随机生成的课程\",\n unique_id: nextUniqueId(),\n });\n }\n }\n return generated_infos;\n}\n","import \"./css/App.css\";\nimport { Component, useState } from \"react\";\nimport back_icon from \"./icons/back.svg\";\nimport add_icon from \"./icons/add.svg\";\nimport random_icon from \"./icons/dice.svg\";\nimport { calcAvgGPA, coursesGroupBySemester, gpa2score, gpa2score_printable, score2gpa_printable, score2sortVal, isValidScore, nextUniqueId, } from \"./utils/miscs.js\";\nimport { hsl2hslprintable, score2hsl, score2proportion } from \"./utils/color.js\";\nimport { seemsByPageCopy, parseCourseInfoAll } from \"./utils/from-paste.js\";\nimport {\n randomGenerateSomeCourseInfo,\n random_course_name,\n random_credit,\n random_score,\n nowSemester\n} from \"./utils/random-generate.js\";\nimport { seemsLikeToken, fetchCourseInfoAll } from \"./utils/from-api.js\";\n\n\n/* ------------------------------ 顶栏 ------------------------------ */\nfunction TitleBar() {\n return (\n
\n 【无法复制?】\n
\n 2. 请刷新树洞成绩查询页后,再尝试全选复制。
\n 3. 若仍无法复制,请尝试禁用 user-select: none
,或考虑贡献本仓库。\n
\n \n \n
\n \n \n \n {[...Array(all_semester.length).keys()].map(i =>\n 学期 当期绩点 累计绩点 \n )}\n \n {`${all_semester[i][0]}年第${all_semester[i][1]}学期`} \n { Number.isNaN(all_gpa[i]) ? \"-.---\" : all_gpa[i].toFixed(3) } {/* 如果是 NaN, 则更友好地显示为 -.--- */}\n { Number.isNaN(all_accumulatedGPA[i]) ? \"-.---\" : all_accumulatedGPA[i].toFixed(3) } {/* 如果是 NaN, 则更友好地显示为 -.--- */}\n
\n
\n 学期: (1, 2, 3)
\n 课名:
\n 学分: (≥ 1 的整数)
\n 成绩: (如:59,84,P,W,...)
\n
\n n}return!1}(n,t,l,r)&&(t=null),r||null===l?function(e){return!!f.call(m,e)||!f.call(p,e)&&(d.test(e)?m[e]=!0:(p[e]=!0,!1))}(n)&&(null===t?e.removeAttribute(n):e.setAttribute(n,""+t)):l.mustUseProperty?e[l.propertyName]=null===t?3!==l.type&&"":t:(n=l.attributeName,r=l.attributeNamespace,null===t?e.removeAttribute(n):(t=3===(l=l.type)||4===l&&!0===t?"":""+t,r?e.setAttributeNS(r,n,t):e.setAttribute(n,t))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var n=e.replace(v,y);g[n]=new h(n,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var n=e.replace(v,y);g[n]=new h(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var n=e.replace(v,y);g[n]=new h(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new h(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new h("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new h(e,1,!1,e.toLowerCase(),null,!0,!0)}));var k=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),S=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),N=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),I=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var L=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var R=Symbol.iterator;function O(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=R&&e[R]||e["@@iterator"])?e:null}var M,F=Object.assign;function D(e){if(void 0===M)try{throw Error()}catch(t){var n=t.stack.trim().match(/\n( *(at )?)/);M=n&&n[1]||""}return"\n"+M+e}var U=!1;function A(e,n){if(!e||U)return"";U=!0;var t=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(s){var r=s}Reflect.construct(e,[],n)}else{try{n.call()}catch(s){r=s}e.call(n.prototype)}else{try{throw Error()}catch(s){r=s}e()}}catch(s){if(s&&r&&"string"===typeof s.stack){for(var l=s.stack.split("\n"),a=r.stack.split("\n"),o=l.length-1,u=a.length-1;1<=o&&0<=u&&l[o]!==a[u];)u--;for(;1<=o&&0<=u;o--,u--)if(l[o]!==a[u]){if(1!==o||1!==u)do{if(o--,0>--u||l[o]!==a[u]){var i="\n"+l[o].replace(" at new "," at ");return e.displayName&&i.includes("b}return!1}function t(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var z={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){z[a]=new t(a,0,!1,a,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];z[b]=new t(b,1,!1,a[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){z[a]=new t(a,2,!1,a.toLowerCase(),null,!1,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){z[a]=new t(a,2,!1,a,null,!1,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){z[a]=new t(a,3,!1,a.toLowerCase(),null,!1,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){z[a]=new t(a,3,!0,a,null,!1,!1)});[\"capture\",\"download\"].forEach(function(a){z[a]=new t(a,4,!1,a,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){z[a]=new t(a,6,!1,a,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(a){z[a]=new t(a,5,!1,a.toLowerCase(),null,!1,!1)});var qa=/[\\-:]([a-z])/g;function ra(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(qa,\nra);z[b]=new t(b,1,!1,a,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(qa,ra);z[b]=new t(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(qa,ra);z[b]=new t(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){z[a]=new t(a,1,!1,a.toLowerCase(),null,!1,!1)});\nz.xlinkHref=new t(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){z[a]=new t(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction sa(a,b,c,d){var e=z.hasOwnProperty(b)?z[b]:null;if(null!==e?0!==e.type:d||!(2
\n 【无法复制?】\n
\n 2. 请刷新树洞成绩查询页后,再尝试全选复制。
\n 3. 若仍无法复制,请尝试禁用 user-select: none
。\n
\n \n \n
\n \n \n \n {[...Array(all_semester.length).keys()].map(i =>\n 学期 当期绩点 累计绩点 \n )}\n \n {`${all_semester[i][0]}年第${all_semester[i][1]}学期`} \n { Number.isNaN(all_gpa[i]) ? \"-.---\" : all_gpa[i].toFixed(3) } {/* 如果是 NaN, 则更友好地显示为 -.--- */}\n { Number.isNaN(all_accumulatedGPA[i]) ? \"-.---\" : all_accumulatedGPA[i].toFixed(3) } {/* 如果是 NaN, 则更友好地显示为 -.--- */}\n
\n
\n 学期: (1, 2, 3)
\n 课名:
\n 学分: (≥ 1 的整数)
\n 成绩: (如:59,84,P,W,...)
\n
\n