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__Search__index.ea7f5841.a...

2111 lines
83 KiB

(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[198],{
/***/ "07cG":
/*!***************************************************!*\
!*** ./src/components/Spinner/index.less?modules ***!
\***************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
module.exports = {"ldsRing":"ldsRing___2F8W7","idsRingWrapper":"idsRingWrapper___fC2cF","ldsring":"ldsring___3A88y"};
/***/ }),
/***/ "55Ip":
/*!***************************************************************!*\
!*** ./node_modules/react-router-dom/esm/react-router-dom.js ***!
\***************************************************************/
/*! exports provided: MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter, BrowserRouter, HashRouter, Link, NavLink */
/*! exports used: Link, NavLink */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export BrowserRouter */
/* unused harmony export HashRouter */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Link; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return NavLink; });
/* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-router */ "Ty5D");
/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ "dI71");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "cDcd");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var history__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! history */ "YS25");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "17x9");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "wx14");
/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ "zLVn");
/* harmony import */ var tiny_invariant__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! tiny-invariant */ "9R94");
/**
* The public API for a <Router> that uses HTML5 history.
*/
var BrowserRouter =
/*#__PURE__*/
function (_React$Component) {
Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(BrowserRouter, _React$Component);
function BrowserRouter() {
var _this;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
_this.history = Object(history__WEBPACK_IMPORTED_MODULE_3__[/* createBrowserHistory */ "a"])(_this.props);
return _this;
}
var _proto = BrowserRouter.prototype;
_proto.render = function render() {
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[/* Router */ "c"], {
history: this.history,
children: this.props.children
});
};
return BrowserRouter;
}(react__WEBPACK_IMPORTED_MODULE_2___default.a.Component);
if (false) {}
/**
* The public API for a <Router> that uses window.location.hash.
*/
var HashRouter =
/*#__PURE__*/
function (_React$Component) {
Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(HashRouter, _React$Component);
function HashRouter() {
var _this;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
_this.history = Object(history__WEBPACK_IMPORTED_MODULE_3__[/* createHashHistory */ "b"])(_this.props);
return _this;
}
var _proto = HashRouter.prototype;
_proto.render = function render() {
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[/* Router */ "c"], {
history: this.history,
children: this.props.children
});
};
return HashRouter;
}(react__WEBPACK_IMPORTED_MODULE_2___default.a.Component);
if (false) {}
var resolveToLocation = function resolveToLocation(to, currentLocation) {
return typeof to === "function" ? to(currentLocation) : to;
};
var normalizeToLocation = function normalizeToLocation(to, currentLocation) {
return typeof to === "string" ? Object(history__WEBPACK_IMPORTED_MODULE_3__[/* createLocation */ "c"])(to, null, null, currentLocation) : to;
};
var forwardRefShim = function forwardRefShim(C) {
return C;
};
var forwardRef = react__WEBPACK_IMPORTED_MODULE_2___default.a.forwardRef;
if (typeof forwardRef === "undefined") {
forwardRef = forwardRefShim;
}
function isModifiedEvent(event) {
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
}
var LinkAnchor = forwardRef(function (_ref, forwardedRef) {
var innerRef = _ref.innerRef,
navigate = _ref.navigate,
_onClick = _ref.onClick,
rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref, ["innerRef", "navigate", "onClick"]);
var target = rest.target;
var props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({}, rest, {
onClick: function onClick(event) {
try {
if (_onClick) _onClick(event);
} catch (ex) {
event.preventDefault();
throw ex;
}
if (!event.defaultPrevented && // onClick prevented default
event.button === 0 && ( // ignore everything but left clicks
!target || target === "_self") && // let browser handle "target=_blank" etc.
!isModifiedEvent(event) // ignore clicks with modifier keys
) {
event.preventDefault();
navigate();
}
}
}); // React 15 compat
if (forwardRefShim !== forwardRef) {
props.ref = forwardedRef || innerRef;
} else {
props.ref = innerRef;
}
/* eslint-disable-next-line jsx-a11y/anchor-has-content */
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("a", props);
});
if (false) {}
/**
* The public API for rendering a history-aware <a>.
*/
var Link = forwardRef(function (_ref2, forwardedRef) {
var _ref2$component = _ref2.component,
component = _ref2$component === void 0 ? LinkAnchor : _ref2$component,
replace = _ref2.replace,
to = _ref2.to,
innerRef = _ref2.innerRef,
rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref2, ["component", "replace", "to", "innerRef"]);
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[/* __RouterContext */ "e"].Consumer, null, function (context) {
!context ? false ? undefined : Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(false) : void 0;
var history = context.history;
var location = normalizeToLocation(resolveToLocation(to, context.location), context.location);
var href = location ? history.createHref(location) : "";
var props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({}, rest, {
href: href,
navigate: function navigate() {
var location = resolveToLocation(to, context.location);
var method = replace ? history.replace : history.push;
method(location);
}
}); // React 15 compat
if (forwardRefShim !== forwardRef) {
props.ref = forwardedRef || innerRef;
} else {
props.innerRef = innerRef;
}
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(component, props);
});
});
if (false) { var refType, toType; }
var forwardRefShim$1 = function forwardRefShim(C) {
return C;
};
var forwardRef$1 = react__WEBPACK_IMPORTED_MODULE_2___default.a.forwardRef;
if (typeof forwardRef$1 === "undefined") {
forwardRef$1 = forwardRefShim$1;
}
function joinClassnames() {
for (var _len = arguments.length, classnames = new Array(_len), _key = 0; _key < _len; _key++) {
classnames[_key] = arguments[_key];
}
return classnames.filter(function (i) {
return i;
}).join(" ");
}
/**
* A <Link> wrapper that knows if it's "active" or not.
*/
var NavLink = forwardRef$1(function (_ref, forwardedRef) {
var _ref$ariaCurrent = _ref["aria-current"],
ariaCurrent = _ref$ariaCurrent === void 0 ? "page" : _ref$ariaCurrent,
_ref$activeClassName = _ref.activeClassName,
activeClassName = _ref$activeClassName === void 0 ? "active" : _ref$activeClassName,
activeStyle = _ref.activeStyle,
classNameProp = _ref.className,
exact = _ref.exact,
isActiveProp = _ref.isActive,
locationProp = _ref.location,
sensitive = _ref.sensitive,
strict = _ref.strict,
styleProp = _ref.style,
to = _ref.to,
innerRef = _ref.innerRef,
rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref, ["aria-current", "activeClassName", "activeStyle", "className", "exact", "isActive", "location", "sensitive", "strict", "style", "to", "innerRef"]);
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[/* __RouterContext */ "e"].Consumer, null, function (context) {
!context ? false ? undefined : Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(false) : void 0;
var currentLocation = locationProp || context.location;
var toLocation = normalizeToLocation(resolveToLocation(to, currentLocation), currentLocation);
var path = toLocation.pathname; // Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202
var escapedPath = path && path.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
var match = escapedPath ? Object(react_router__WEBPACK_IMPORTED_MODULE_0__[/* matchPath */ "f"])(currentLocation.pathname, {
path: escapedPath,
exact: exact,
sensitive: sensitive,
strict: strict
}) : null;
var isActive = !!(isActiveProp ? isActiveProp(match, currentLocation) : match);
var className = isActive ? joinClassnames(classNameProp, activeClassName) : classNameProp;
var style = isActive ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({}, styleProp, {}, activeStyle) : styleProp;
var props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({
"aria-current": isActive && ariaCurrent || null,
className: className,
style: style,
to: toLocation
}, rest); // React 15 compat
if (forwardRefShim$1 !== forwardRef$1) {
props.ref = forwardedRef || innerRef;
} else {
props.innerRef = innerRef;
}
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(Link, props);
});
});
if (false) { var ariaCurrentType; }
//# sourceMappingURL=react-router-dom.js.map
/***/ }),
/***/ "BU3w":
/*!***************************************************!*\
!*** ./node_modules/rc-util/es/Dom/dynamicCSS.js ***!
\***************************************************/
/*! exports provided: injectCSS, updateCSS */
/*! exports used: updateCSS */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export injectCSS */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return updateCSS; });
/* harmony import */ var _canUseDom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./canUseDom */ "MNnm");
var MARK_KEY = "rc-util-key";
function getContainer(option) {
if (option.attachTo) {
return option.attachTo;
}
var head = document.querySelector('head');
return head || document.body;
}
function injectCSS(css) {
var _option$csp;
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
if (!Object(_canUseDom__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])()) {
return null;
}
var styleNode = document.createElement('style');
if ((_option$csp = option.csp) === null || _option$csp === void 0 ? void 0 : _option$csp.nonce) {
var _option$csp2;
styleNode.nonce = (_option$csp2 = option.csp) === null || _option$csp2 === void 0 ? void 0 : _option$csp2.nonce;
}
styleNode.innerHTML = css;
var container = getContainer(option);
var firstChild = container.firstChild;
if (option.prepend && container.prepend) {
// Use `prepend` first
container.prepend(styleNode);
} else if (option.prepend && firstChild) {
// Fallback to `insertBefore` like IE not support `prepend`
container.insertBefore(styleNode, firstChild);
} else {
container.appendChild(styleNode);
}
return styleNode;
}
var containerCache = new Map();
function updateCSS(css, key) {
var option = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var container = getContainer(option); // Get real parent
if (!containerCache.has(container)) {
var placeholderStyle = injectCSS('', option);
var parentNode = placeholderStyle.parentNode;
containerCache.set(container, parentNode);
parentNode.removeChild(placeholderStyle);
}
var existNode = Array.from(containerCache.get(container).children).find(function (node) {
return node.tagName === 'STYLE' && node[MARK_KEY] === key;
});
if (existNode) {
var _option$csp3, _option$csp4;
if (((_option$csp3 = option.csp) === null || _option$csp3 === void 0 ? void 0 : _option$csp3.nonce) && existNode.nonce !== ((_option$csp4 = option.csp) === null || _option$csp4 === void 0 ? void 0 : _option$csp4.nonce)) {
var _option$csp5;
existNode.nonce = (_option$csp5 = option.csp) === null || _option$csp5 === void 0 ? void 0 : _option$csp5.nonce;
}
if (existNode.innerHTML !== css) {
existNode.innerHTML = css;
}
return existNode;
}
var newNode = injectCSS(css, option);
newNode[MARK_KEY] = key;
return newNode;
}
/***/ }),
/***/ "Gytx":
/*!********************************************!*\
!*** ./node_modules/shallowequal/index.js ***!
\********************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
//
module.exports = function shallowEqual(objA, objB, compare, compareContext) {
var ret = compare ? compare.call(compareContext, objA, objB) : void 0;
if (ret !== void 0) {
return !!ret;
}
if (objA === objB) {
return true;
}
if (typeof objA !== "object" || !objA || typeof objB !== "object" || !objB) {
return false;
}
var keysA = Object.keys(objA);
var keysB = Object.keys(objB);
if (keysA.length !== keysB.length) {
return false;
}
var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);
// Test for A's keys different from B.
for (var idx = 0; idx < keysA.length; idx++) {
var key = keysA[idx];
if (!bHasOwnProperty(key)) {
return false;
}
var valueA = objA[key];
var valueB = objB[key];
ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;
if (ret === false || (ret === void 0 && valueA !== valueB)) {
return false;
}
}
return true;
};
/***/ }),
/***/ "IxHN":
/*!******************************************!*\
!*** ./src/components/Spinner/index.tsx ***!
\******************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "cDcd");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _index_less_modules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less?modules */ "07cG");
/* harmony import */ var _index_less_modules__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less_modules__WEBPACK_IMPORTED_MODULE_1__);
/* harmony default export */ __webpack_exports__["a"] = (function (_ref) {
var message = _ref.message,
className = _ref.className,
children = _ref.children,
_ref$style = _ref.style,
style = _ref$style === void 0 ? {} : _ref$style;
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
className: "".concat(_index_less_modules__WEBPACK_IMPORTED_MODULE_1___default.a.idsRingWrapper, " ").concat(className)
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_1___default.a.ldsRing
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null)), message ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p", {
style: style
}, message) : null, children);
});
/***/ }),
/***/ "TGq3":
/*!***********************************************!*\
!*** ./src/assets/images/icons/lockclose.svg ***!
\***********************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "static/lockclose.365036e8.svg";
/***/ }),
/***/ "XQ9l":
/*!************************************************!*\
!*** ./src/pages/Search/index.tsx + 1 modules ***!
\************************************************/
/*! exports provided: default */
/*! all exports used */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/SearchOutlined.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Search/components/ShixunFilter.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Search/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/umiExports.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/Spinner/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/icons/lockclose.svg (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Search/bg.jpg (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/checkbox/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/checkbox/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/pagination/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/pagination/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tag/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tag/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router-dom/esm/react-router-dom.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router/esm/react-router.js */
/*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXTERNAL MODULE: ./node_modules/antd/es/tag/style/index.js
var style = __webpack_require__("+BJd");
// EXTERNAL MODULE: ./node_modules/antd/es/tag/index.js + 1 modules
var tag = __webpack_require__("mr32");
// EXTERNAL MODULE: ./node_modules/antd/es/pagination/style/index.js
var pagination_style = __webpack_require__("DjyN");
// EXTERNAL MODULE: ./node_modules/antd/es/pagination/index.js + 2 modules
var pagination = __webpack_require__("NUBc");
// EXTERNAL MODULE: ./node_modules/antd/es/row/style/index.js
var row_style = __webpack_require__("14J3");
// EXTERNAL MODULE: ./node_modules/antd/es/row/index.js
var row = __webpack_require__("BMrR");
// EXTERNAL MODULE: ./node_modules/antd/es/col/style/index.js
var col_style = __webpack_require__("jCWc");
// EXTERNAL MODULE: ./node_modules/antd/es/col/index.js
var col = __webpack_require__("kPKH");
// EXTERNAL MODULE: ./node_modules/antd/es/checkbox/style/index.js
var checkbox_style = __webpack_require__("sRBo");
// EXTERNAL MODULE: ./node_modules/antd/es/checkbox/index.js + 2 modules
var es_checkbox = __webpack_require__("kaz8");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("9og8");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = __webpack_require__("tJVT");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("k1fw");
// EXTERNAL MODULE: ./node_modules/antd/es/input/style/index.js
var input_style = __webpack_require__("5NDa");
// EXTERNAL MODULE: ./node_modules/antd/es/input/index.js + 3 modules
var input = __webpack_require__("5rEg");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js
var regenerator = __webpack_require__("WmNS");
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
// EXTERNAL MODULE: external "window.React"
var external_window_React_ = __webpack_require__("cDcd");
var external_window_React_default = /*#__PURE__*/__webpack_require__.n(external_window_React_);
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__("ErOA");
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/SearchOutlined.js + 1 modules
var SearchOutlined = __webpack_require__("l+S1");
// EXTERNAL MODULE: ./node_modules/react-router/esm/react-router.js
var react_router = __webpack_require__("Ty5D");
// EXTERNAL MODULE: ./node_modules/react-router-dom/esm/react-router-dom.js
var react_router_dom = __webpack_require__("55Ip");
// EXTERNAL MODULE: ./src/pages/Search/index.less?modules
var Searchmodules = __webpack_require__("weW1");
var Searchmodules_default = /*#__PURE__*/__webpack_require__.n(Searchmodules);
// EXTERNAL MODULE: ./src/pages/Search/bg.jpg
var bg = __webpack_require__("nzYX");
var bg_default = /*#__PURE__*/__webpack_require__.n(bg);
// EXTERNAL MODULE: ./src/assets/images/icons/lockclose.svg
var lockclose = __webpack_require__("TGq3");
var lockclose_default = /*#__PURE__*/__webpack_require__.n(lockclose);
// EXTERNAL MODULE: ./src/components/Spinner/index.tsx
var Spinner = __webpack_require__("IxHN");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
var objectWithoutProperties = __webpack_require__("PpiC");
// EXTERNAL MODULE: ./src/.umi-production/core/umiExports.ts + 17 modules
var umiExports = __webpack_require__("9kvl");
// EXTERNAL MODULE: ./src/pages/Search/components/ShixunFilter.less?modules
var ShixunFiltermodules = __webpack_require__("armg");
var ShixunFiltermodules_default = /*#__PURE__*/__webpack_require__.n(ShixunFiltermodules);
// CONCATENATED MODULE: ./src/pages/Search/components/ShixunFilter.tsx
var ShixunFilter_ShixunsListPage = function ShixunsListPage(_ref) {
var shixunsList = _ref.shixunsList,
dispatch = _ref.dispatch,
location = _ref.location,
history = _ref.history,
onChange = _ref.onChange,
props = Object(objectWithoutProperties["a" /* default */])(_ref, ["shixunsList", "dispatch", "location", "history", "onChange"]);
// useEffect(() => {
// query = Object.assign(
// {},
// query,
// location.query,
// )
// },[])
var _useState = Object(external_window_React_["useState"])({
diff: 0
}),
_useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
query = _useState2[0],
setQuery = _useState2[1];
Object(external_window_React_["useEffect"])(function () {
dispatch({
type: 'shixunsList/getMenus',
payload: {}
});
}, [shixunsList.name]);
var difficulty = [{
name: '全部',
id: 0
}, {
name: '初级',
id: 1
}, {
name: '中级',
id: 2
}, {
name: '中高级',
id: 3
}, {
name: '高级',
id: 4
}];
var dataType = [{
name: '最新',
id: 'new'
}, {
name: '最热',
id: 'hot'
}];
var menuChange = function menuChange(tag_level, sub_discipline_id, discipline_id) {
// query.tag_level = tag_level
// query.tag_id = tag_id
// query.page = 1
// query.current_id = current_id
// query.page = 1
// dispatch({
// type: 'shixunsList/getShixuns',
// payload: { ...query },
// })
setQuery({
tag_level: tag_level,
sub_discipline_id: sub_discipline_id,
discipline_id: discipline_id,
diff: query.diff
});
onChange({
tag_level: tag_level,
sub_discipline_id: sub_discipline_id,
discipline_id: discipline_id
});
};
return /*#__PURE__*/external_window_React_default.a.createElement("section", null, /*#__PURE__*/external_window_React_default.a.createElement("aside", {
className: ShixunFiltermodules_default.a.wrp
}, /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: "edu-container"
}, /*#__PURE__*/external_window_React_default.a.createElement("ul", {
className: ShixunFiltermodules_default.a.menu
}, /*#__PURE__*/external_window_React_default.a.createElement("span", {
className: "mr10"
}, "\u65B9\u5411\uFF1A"), /*#__PURE__*/external_window_React_default.a.createElement("li", {
className: !query.discipline_id ? ShixunFiltermodules_default.a.actived : '',
onClick: function onClick() {
menuChange(null, null, null);
}
}, /*#__PURE__*/external_window_React_default.a.createElement("strong", null, "\u5168\u90E8")), shixunsList.menus && shixunsList.menus.map(function (v, k) {
return /*#__PURE__*/external_window_React_default.a.createElement("li", {
key: k,
className: query.discipline_id == v.id ? ShixunFiltermodules_default.a.actived : ''
}, /*#__PURE__*/external_window_React_default.a.createElement("strong", {
onClick: function onClick() {
menuChange(1, null, v.id);
}
}, v.name), /*#__PURE__*/external_window_React_default.a.createElement("div", null, v.sub_repertoires.map(function (val, key) {
return /*#__PURE__*/external_window_React_default.a.createElement("div", {
key: key,
className: "mt5"
}, /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: query.sub_discipline_id == val.id && query.tag_level == 2 ? "".concat(ShixunFiltermodules_default.a.actived2, " ").concat(ShixunFiltermodules_default.a.subTag) : ShixunFiltermodules_default.a.subTag,
onClick: function onClick() {
menuChange(2, val.id, v.id);
}
}, val.name), /*#__PURE__*/external_window_React_default.a.createElement("ul", {
className: "mt5"
}, val.tags && val.tags.map(function (value, index) {
return /*#__PURE__*/external_window_React_default.a.createElement("li", {
key: index,
className: query.sub_discipline_id == value.id && query.tag_level == 3 ? ShixunFiltermodules_default.a.actived2 : '',
onClick: function onClick() {
menuChange(3, value.id, v.id);
}
}, value.name);
})));
})));
})), /*#__PURE__*/external_window_React_default.a.createElement("ul", {
className: ShixunFiltermodules_default.a.menu
}, /*#__PURE__*/external_window_React_default.a.createElement("span", {
className: "mr10"
}, "\u7B5B\u9009\uFF1A"), difficulty.map(function (v, k) {
return /*#__PURE__*/external_window_React_default.a.createElement("li", {
key: k,
className: query.diff === v.id ? ShixunFiltermodules_default.a.actived : '',
onClick: function onClick() {
query.diff = v.id;
setQuery(Object(objectSpread2["a" /* default */])({}, query));
onChange(Object(objectSpread2["a" /* default */])({}, query));
}
}, /*#__PURE__*/external_window_React_default.a.createElement("strong", null, v.name));
})))));
};
/* harmony default export */ var ShixunFilter = (Object(umiExports["a" /* connect */])(function (_ref2) {
var shixunsList = _ref2.shixunsList;
return {
shixunsList: shixunsList
};
})(ShixunFilter_ShixunsListPage));
// CONCATENATED MODULE: ./src/pages/Search/index.tsx
var Search = input["a" /* default */].Search;
var Navs = [{
id: 'subject',
title: '实践课程'
}, {
id: 'shixun',
title: '实践项目'
}, {
id: 'course',
title: '教学课堂'
} // { id: 'memo', title: '交流问答' },
];
var Types;
(function (Types) {
Types[Types["GET_LIST"] = 0] = "GET_LIST";
Types[Types["CHANGE_PAGE"] = 1] = "CHANGE_PAGE";
Types[Types["CHANGE_KEYWORD"] = 2] = "CHANGE_KEYWORD";
Types[Types["CHANGE_TYPE"] = 3] = "CHANGE_TYPE";
Types[Types["CHANGE_All"] = 4] = "CHANGE_All";
Types[Types["SET_LOADING"] = 5] = "SET_LOADING";
})(Types || (Types = {}));
function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = encodeURI(window.location.search).substr(1).match(reg);
if (r != null) return unescape(r[2]).replace(/\+/g, "%2B");
return null;
}
function reducer(state, action) {
switch (action.type) {
case Types.GET_LIST:
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), action.payload);
case Types.CHANGE_PAGE:
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), {}, {
page: action.payload
});
case Types.CHANGE_KEYWORD:
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), action.payload);
case Types.CHANGE_TYPE:
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), action.payload);
case Types.CHANGE_All:
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), action.payload);
case Types.SET_LOADING:
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), {}, {
loading: action.payload
});
default:
throw new Error();
}
}
/* harmony default export */ var pages_Search = __webpack_exports__["default"] = (function () {
var lo = Object(react_router["h" /* useLocation */])(); // @ts-ignore
var _lo$query = lo.query,
value = _lo$query.value,
tabs = _lo$query.tabs;
var initialState = {
keyword: '',
page: 1,
list: [],
type: tabs || 'subject',
order_by: null,
sort_by: null,
can_copy: null,
loading: false,
count: 0,
searchIndex: 1
};
var _useState = Object(external_window_React_["useState"])({}),
_useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
shixunQuery = _useState2[0],
setShixunQuery = _useState2[1];
var _useReducer = Object(external_window_React_["useReducer"])(reducer, Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, initialState), {}, {
keyword: value
})),
_useReducer2 = Object(slicedToArray["a" /* default */])(_useReducer, 2),
state = _useReducer2[0],
dispatch = _useReducer2[1];
var keyword = state.keyword,
page = state.page,
list = state.list,
type = state.type,
count = state.count,
loading = state.loading,
order_by = state.order_by,
sort_by = state.sort_by,
can_copy = state.can_copy,
searchIndex = state.searchIndex;
Object(external_window_React_["useEffect"])(function () {
state.type = tabs || 'subject';
dispatch({
type: Types.CHANGE_KEYWORD,
payload: {
keyword: getQueryString("value"),
page: 1,
searchIndex: searchIndex + 1
}
});
}, [lo]);
var childPanel = {
subject: /*#__PURE__*/external_window_React_default.a.createElement(SubjectPanel, {
data: list
}),
memo: /*#__PURE__*/external_window_React_default.a.createElement(MemoPanel, {
data: list
}),
shixun: /*#__PURE__*/external_window_React_default.a.createElement(ShiXunPanel, {
data: list
}),
course: /*#__PURE__*/external_window_React_default.a.createElement(CoursePanel, {
data: list
})
};
var getData = function getData() {
var didCancel = false;
function init() {
return _init.apply(this, arguments);
}
function _init() {
_init = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
var response, results, count;
return regenerator_default.a.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
dispatch({
type: Types.SET_LOADING,
payload: true
});
_context.next = 3;
return Object(fetch["c" /* get */])("search.json", Object(objectSpread2["a" /* default */])({
keyword: keyword,
page: page,
type: type,
order_by: order_by,
can_copy: can_copy,
sort_by: sort_by
}, shixunQuery));
case 3:
response = _context.sent;
results = response.results, count = response.count;
if (!didCancel) {
dispatch({
type: Types.GET_LIST,
payload: {
count: count,
list: results,
loading: false
}
});
}
case 6:
case "end":
return _context.stop();
}
}
}, _callee);
}));
return _init.apply(this, arguments);
}
if (!didCancel) {
init();
}
return function () {
didCancel = true;
};
};
Object(external_window_React_["useEffect"])(function () {
getData();
}, [page, type, shixunQuery, order_by, sort_by, can_copy, searchIndex]);
function onChangeKeyword(value) {
dispatch({
type: Types.CHANGE_KEYWORD,
payload: {
keyword: value,
page: 1
}
});
}
function onChangeType(e) {
dispatch({
type: Types.CHANGE_TYPE,
payload: {
type: e.target.id,
page: 1
}
});
}
function onPageChange(value) {
dispatch({
type: Types.CHANGE_PAGE,
payload: value
});
}
function onChangeAll(val) {
dispatch({
type: Types.CHANGE_All,
payload: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), val), {}, {
page: 1
})
});
}
return /*#__PURE__*/external_window_React_default.a.createElement(external_window_React_["Fragment"], null, /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: Searchmodules_default.a['search-container']
}, /*#__PURE__*/external_window_React_default.a.createElement("img", {
src: bg_default.a,
alt: "bg"
}), /*#__PURE__*/external_window_React_default.a.createElement(Search, {
className: Searchmodules_default.a["btn-search"],
value: decodeURIComponent(keyword),
enterButton: /*#__PURE__*/external_window_React_default.a.createElement("span", null, /*#__PURE__*/external_window_React_default.a.createElement(SearchOutlined["a" /* default */], {
style: {
fontSize: 18,
marginRight: 10
}
}), " \u641C\u7D22"),
onChange: function onChange(e) {
onChangeKeyword(e.target.value);
},
onSearch: getData
})), /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: Searchmodules_default.a["navs-container"]
}, /*#__PURE__*/external_window_React_default.a.createElement("ul", {
className: Searchmodules_default.a["navs"]
}, Navs.map(function (item) {
return /*#__PURE__*/external_window_React_default.a.createElement("li", {
key: item.id
}, /*#__PURE__*/external_window_React_default.a.createElement("a", {
id: item.id,
className: item.id === type ? Searchmodules_default.a.active : '',
onClick: onChangeType
}, item.title));
}))), type === 'shixun' && /*#__PURE__*/external_window_React_default.a.createElement(ShixunFilter, {
onChange: function onChange(p) {
onChangeAll({});
setShixunQuery(Object(objectSpread2["a" /* default */])({}, p));
}
}), /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: Searchmodules_default.a["search-result-container"]
}, /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: Searchmodules_default.a["search-result-body"]
}, loading && /*#__PURE__*/external_window_React_default.a.createElement(Spinner["a" /* default */], {
message: "\u6B63\u5728\u52AA\u529B\u52A0\u8F7D\u6570\u636E\u4E2D..."
}), /*#__PURE__*/external_window_React_default.a.createElement(row["a" /* default */], {
align: "middle"
}, type === 'shixun' && /*#__PURE__*/external_window_React_default.a.createElement(col["a" /* default */], {
flex: "1"
}, /*#__PURE__*/external_window_React_default.a.createElement("span", {
className: "current ml10",
onClick: function onClick() {
onChangeAll({
sort_by: "myshixuns_count",
order_by: order_by === null ? "desc" : order_by === 'asc' ? null : "asc"
});
}
}, /*#__PURE__*/external_window_React_default.a.createElement("span", {
className: "".concat(sort_by === 'myshixuns_count' && !!order_by && 'c-light-primary', " font14")
}, "\u70ED\u5EA6"), /*#__PURE__*/external_window_React_default.a.createElement("p", {
className: "edu-sorter current ".concat(sort_by === 'myshixuns_count' && order_by)
}, /*#__PURE__*/external_window_React_default.a.createElement("span", {
className: "iconfont icon-sanjiaoxing-up"
}), /*#__PURE__*/external_window_React_default.a.createElement("span", {
className: "iconfont icon-sanjiaoxing-down"
}))), /*#__PURE__*/external_window_React_default.a.createElement("span", {
className: "current ml40",
onClick: function onClick() {
onChangeAll({
sort_by: "averge_star",
order_by: order_by === null ? "desc" : order_by === 'asc' ? null : "asc"
});
}
}, /*#__PURE__*/external_window_React_default.a.createElement("span", {
className: "".concat(sort_by === 'averge_star' && !!order_by && 'c-light-primary', " font14")
}, "\u8BC4\u5206"), /*#__PURE__*/external_window_React_default.a.createElement("p", {
className: "edu-sorter current ".concat(sort_by === 'averge_star' && order_by)
}, /*#__PURE__*/external_window_React_default.a.createElement("span", {
className: "iconfont icon-sanjiaoxing-up"
}), /*#__PURE__*/external_window_React_default.a.createElement("span", {
className: "iconfont icon-sanjiaoxing-down"
}))), /*#__PURE__*/external_window_React_default.a.createElement("span", {
className: "ml100"
}, /*#__PURE__*/external_window_React_default.a.createElement(es_checkbox["a" /* default */], {
onClick: function onClick(e) {
onChangeAll({
can_copy: e.target.checked ? true : null
});
}
}, "\u5141\u8BB8\u590D\u5236"))), /*#__PURE__*/external_window_React_default.a.createElement(col["a" /* default */], null, /*#__PURE__*/external_window_React_default.a.createElement("p", {
className: Searchmodules_default.a.tip
}, "\u5171\u627E\u5230\u76F8\u5173\u7ED3\u679C", /*#__PURE__*/external_window_React_default.a.createElement(external_window_React_default.a.Fragment, null, " ", count, " "), "\u4E2A"))), childPanel[type])), /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: Searchmodules_default.a["search-footer"]
}, /*#__PURE__*/external_window_React_default.a.createElement(pagination["a" /* default */], {
showQuickJumper: true,
current: page,
onChange: onPageChange,
pageSize: 20,
showSizeChanger: false,
hideOnSinglePage: true,
total: count
})));
});
function Desc(_ref) {
var data = _ref.data;
return /*#__PURE__*/external_window_React_default.a.createElement(external_window_React_default.a.Fragment, null, data ? /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: Searchmodules_default.a.desc
}, data === null || data === void 0 ? void 0 : data.map(function (value) {
return /*#__PURE__*/external_window_React_default.a.createElement("span", {
key: value,
dangerouslySetInnerHTML: {
__html: value
}
});
})) : /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: Searchmodules_default.a.desc
}));
}
function MemoPanel(_ref2) {
var data = _ref2.data;
return /*#__PURE__*/external_window_React_default.a.createElement("ul", {
className: Searchmodules_default.a["search-panel"]
}, data === null || data === void 0 ? void 0 : data.map(function (item) {
var _item$content, _item$content2, _item$content2$author;
return /*#__PURE__*/external_window_React_default.a.createElement("li", {
key: item.id
}, /*#__PURE__*/external_window_React_default.a.createElement(react_router_dom["a" /* Link */], {
target: "_blank",
to: "/forums/".concat(item.id)
}, /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: Searchmodules_default.a.title,
dangerouslySetInnerHTML: {
__html: item.title
}
}), /*#__PURE__*/external_window_React_default.a.createElement(Desc, {
data: item.content.content
}), /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: Searchmodules_default.a.detail
}, /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: Searchmodules_default.a.sum
}, item !== null && item !== void 0 && (_item$content = item.content) !== null && _item$content !== void 0 && _item$content.author_name ? /*#__PURE__*/external_window_React_default.a.createElement("aside", {
dangerouslySetInnerHTML: {
__html: item === null || item === void 0 ? void 0 : (_item$content2 = item.content) === null || _item$content2 === void 0 ? void 0 : (_item$content2$author = _item$content2.author_name) === null || _item$content2$author === void 0 ? void 0 : _item$content2$author[0]
}
}) : /*#__PURE__*/external_window_React_default.a.createElement("aside", null, item.author_name), /*#__PURE__*/external_window_React_default.a.createElement("aside", null, "\u8BBF\u95EE\u4EBA\u6570\uFF1A", item.visits_count)))));
}));
}
function CoursePanel(_ref3) {
var data = _ref3.data;
return /*#__PURE__*/external_window_React_default.a.createElement("ul", {
className: Searchmodules_default.a["search-panel"]
}, data === null || data === void 0 ? void 0 : data.map(function (item) {
var _item$content3, _item$content4, _item$content4$author;
return /*#__PURE__*/external_window_React_default.a.createElement("li", {
key: item.id,
className: Searchmodules_default.a["search-course-item"]
}, !item.is_accessible && /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: Searchmodules_default.a["lock-search-course-item"]
}, /*#__PURE__*/external_window_React_default.a.createElement("img", {
src: lockclose_default.a
}), "\u975E\u6210\u5458\u4E0D\u80FD\u8BBF\u95EE"), /*#__PURE__*/external_window_React_default.a.createElement(react_router_dom["a" /* Link */], {
target: "_blank",
to: "".concat(item === null || item === void 0 ? void 0 : item.first_category_url)
}, /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: Searchmodules_default.a.title,
dangerouslySetInnerHTML: {
__html: item.title
}
}), /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: "".concat(Searchmodules_default.a["detail"], " mt20")
}, /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: Searchmodules_default.a.sum
}, item !== null && item !== void 0 && (_item$content3 = item.content) !== null && _item$content3 !== void 0 && _item$content3.author_name ? /*#__PURE__*/external_window_React_default.a.createElement("aside", {
dangerouslySetInnerHTML: {
__html: item === null || item === void 0 ? void 0 : (_item$content4 = item.content) === null || _item$content4 === void 0 ? void 0 : (_item$content4$author = _item$content4.author_name) === null || _item$content4$author === void 0 ? void 0 : _item$content4$author[0]
}
}) : /*#__PURE__*/external_window_React_default.a.createElement("aside", null, item.author_name), !!item.author_school_name && /*#__PURE__*/external_window_React_default.a.createElement("aside", {
style: {
marginLeft: -13
}
}, item.author_school_name), /*#__PURE__*/external_window_React_default.a.createElement("aside", null, "\u6210\u5458\u6570\uFF1A", item.members_count)))));
}));
}
function SubjectPanel(_ref4) {
var data = _ref4.data;
return /*#__PURE__*/external_window_React_default.a.createElement("ul", {
className: Searchmodules_default.a["search-panel"]
}, data === null || data === void 0 ? void 0 : data.map(function (item) {
var _item$content5, _item$content6, _item$content6$author;
return /*#__PURE__*/external_window_React_default.a.createElement("li", {
key: item.id
}, /*#__PURE__*/external_window_React_default.a.createElement(react_router_dom["a" /* Link */], {
target: "_blank",
to: "/paths/".concat(item.identifier)
}, /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: Searchmodules_default.a.title,
dangerouslySetInnerHTML: {
__html: item.title
}
}), /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: "".concat(Searchmodules_default.a["detail"], " mt20")
}, /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: Searchmodules_default.a.sum
}, item !== null && item !== void 0 && (_item$content5 = item.content) !== null && _item$content5 !== void 0 && _item$content5.author_name ? /*#__PURE__*/external_window_React_default.a.createElement("aside", {
dangerouslySetInnerHTML: {
__html: item === null || item === void 0 ? void 0 : (_item$content6 = item.content) === null || _item$content6 === void 0 ? void 0 : (_item$content6$author = _item$content6.author_name) === null || _item$content6$author === void 0 ? void 0 : _item$content6$author[0]
}
}) : /*#__PURE__*/external_window_React_default.a.createElement("aside", null, item.author_name), !!item.author_school_name && /*#__PURE__*/external_window_React_default.a.createElement("aside", {
style: {
marginLeft: -13
}
}, item.author_school_name), /*#__PURE__*/external_window_React_default.a.createElement("aside", null, "\u6848\u4F8B\u6570 \uFF1A", item.shixuns_count), /*#__PURE__*/external_window_React_default.a.createElement("aside", null, "\u5B66\u4E60\u4EBA\u6570\uFF1A", item.myshixuns_count)))));
}));
}
function ShiXunPanel(_ref5) {
var data = _ref5.data;
return /*#__PURE__*/external_window_React_default.a.createElement("ul", {
className: Searchmodules_default.a["search-panel"]
}, data === null || data === void 0 ? void 0 : data.map(function (item) {
var _item$content7, _item$content7$challe, _item$content8, _item$content8$tag_na, _item$content9, _item$content10, _item$content10$autho;
return /*#__PURE__*/external_window_React_default.a.createElement("li", {
key: item.id
}, /*#__PURE__*/external_window_React_default.a.createElement(react_router_dom["a" /* Link */], {
target: "_blank",
to: "/shixuns/".concat(item.identifier, "/challenges ")
}, /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: "flex-container"
}, /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: Searchmodules_default.a.title,
dangerouslySetInnerHTML: {
__html: item.title
}
}), item.is_jupyter ? /*#__PURE__*/external_window_React_default.a.createElement(tag["a" /* default */], {
color: "red",
className: "ml10"
}, "Jupyter") // <span className="label-red">Jupyter</span>
: null, item.can_copy && /*#__PURE__*/external_window_React_default.a.createElement(tag["a" /* default */], {
color: "green",
className: "ml10"
}, "\u5141\u8BB8\u590D\u5236")), /*#__PURE__*/external_window_React_default.a.createElement(Desc, {
data: item.content.description
}), /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: Searchmodules_default.a.detail
}, /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: Searchmodules_default.a.info
}, !item.content.challenge_names ? null : /*#__PURE__*/external_window_React_default.a.createElement(external_window_React_["Fragment"], null, item === null || item === void 0 ? void 0 : (_item$content7 = item.content) === null || _item$content7 === void 0 ? void 0 : (_item$content7$challe = _item$content7.challenge_names) === null || _item$content7$challe === void 0 ? void 0 : _item$content7$challe.map(function (value) {
return /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: "flex-container",
key: value
}, /*#__PURE__*/external_window_React_default.a.createElement("span", {
dangerouslySetInnerHTML: {
__html: value
}
}));
})), !item.content.tag_names ? null : /*#__PURE__*/external_window_React_default.a.createElement(external_window_React_["Fragment"], null, item === null || item === void 0 ? void 0 : (_item$content8 = item.content) === null || _item$content8 === void 0 ? void 0 : (_item$content8$tag_na = _item$content8.tag_names) === null || _item$content8$tag_na === void 0 ? void 0 : _item$content8$tag_na.map(function (value) {
return /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: "flex-container",
key: value
}, /*#__PURE__*/external_window_React_default.a.createElement("span", null, "\u5173\u5361\u6807\u7B7E\uFF1A"), /*#__PURE__*/external_window_React_default.a.createElement("span", {
dangerouslySetInnerHTML: {
__html: value
}
}));
}))), /*#__PURE__*/external_window_React_default.a.createElement("div", {
className: Searchmodules_default.a.sum
}, item !== null && item !== void 0 && (_item$content9 = item.content) !== null && _item$content9 !== void 0 && _item$content9.author_name ? /*#__PURE__*/external_window_React_default.a.createElement("aside", {
dangerouslySetInnerHTML: {
__html: item === null || item === void 0 ? void 0 : (_item$content10 = item.content) === null || _item$content10 === void 0 ? void 0 : (_item$content10$autho = _item$content10.author_name) === null || _item$content10$autho === void 0 ? void 0 : _item$content10$autho[0]
}
}) : /*#__PURE__*/external_window_React_default.a.createElement("aside", null, item.author_name), !!item.author_school_name && /*#__PURE__*/external_window_React_default.a.createElement("aside", {
style: {
marginLeft: -13
}
}, item.author_school_name), /*#__PURE__*/external_window_React_default.a.createElement("aside", null, "\u4EFB\u52A1\uFF1A", item.challenges_count), /*#__PURE__*/external_window_React_default.a.createElement("aside", null, "\u5B66\u4E60\u4EBA\u6570\uFF1A", item.study_count), /*#__PURE__*/external_window_React_default.a.createElement("aside", null, "\u8BC4\u5206\uFF1A", item.star)))));
}));
}
/***/ }),
/***/ "Y1PL":
/*!**********************************************************!*\
!*** ./node_modules/rc-textarea/es/index.js + 7 modules ***!
\**********************************************************/
/*! exports provided: ResizableTextArea, default */
/*! all exports used */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/findDOMNode.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/omit.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, "ResizableTextArea", function() { return /* reexport */ es_ResizableTextArea; });
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__("wx14");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
var classCallCheck = __webpack_require__("1OyB");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
var createClass = __webpack_require__("vuIU");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
var inherits = __webpack_require__("Ji7U");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 1 modules
var createSuper = __webpack_require__("LK+K");
// EXTERNAL MODULE: external "window.React"
var external_window_React_ = __webpack_require__("cDcd");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("VTBJ");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__("rePB");
// EXTERNAL MODULE: ./node_modules/rc-util/es/Children/toArray.js
var toArray = __webpack_require__("Zm9Q");
// EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js
var warning = __webpack_require__("Kwbf");
// EXTERNAL MODULE: ./node_modules/rc-util/es/ref.js
var ref = __webpack_require__("c+Xe");
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/findDOMNode.js
var findDOMNode = __webpack_require__("m+aA");
// EXTERNAL MODULE: ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js
var ResizeObserver_es = __webpack_require__("bdgK");
// CONCATENATED MODULE: ./node_modules/rc-textarea/node_modules/rc-resize-observer/es/utils/observerUtil.js
// =============================== Const ===============================
var elementListeners = new Map();
function observerUtil_onResize(entities) {
entities.forEach(function (entity) {
var _elementListeners$get;
var target = entity.target;
(_elementListeners$get = elementListeners.get(target)) === null || _elementListeners$get === void 0 ? void 0 : _elementListeners$get.forEach(function (listener) {
return listener(target);
});
});
} // Note: ResizeObserver polyfill not support option to measure border-box resize
var resizeObserver = new ResizeObserver_es["default"](observerUtil_onResize); // Dev env only
var _el = false ? undefined : null; // eslint-disable-line
var _rs = false ? undefined : null; // eslint-disable-line
// ============================== Observe ==============================
function observe(element, callback) {
if (!elementListeners.has(element)) {
elementListeners.set(element, new Set());
resizeObserver.observe(element);
}
elementListeners.get(element).add(callback);
}
function unobserve(element, callback) {
if (elementListeners.has(element)) {
elementListeners.get(element).delete(callback);
if (!elementListeners.get(element).size) {
resizeObserver.unobserve(element);
elementListeners.delete(element);
}
}
}
// CONCATENATED MODULE: ./node_modules/rc-textarea/node_modules/rc-resize-observer/es/SingleObserver/DomWrapper.js
/**
* Fallback to findDOMNode if origin ref do not provide any dom element
*/
var DomWrapper_DomWrapper = /*#__PURE__*/function (_React$Component) {
Object(inherits["a" /* default */])(DomWrapper, _React$Component);
var _super = Object(createSuper["a" /* default */])(DomWrapper);
function DomWrapper() {
Object(classCallCheck["a" /* default */])(this, DomWrapper);
return _super.apply(this, arguments);
}
Object(createClass["a" /* default */])(DomWrapper, [{
key: "render",
value: function render() {
return this.props.children;
}
}]);
return DomWrapper;
}(external_window_React_["Component"]);
// CONCATENATED MODULE: ./node_modules/rc-textarea/node_modules/rc-resize-observer/es/Collection.js
var CollectionContext = /*#__PURE__*/external_window_React_["createContext"](null);
/**
* Collect all the resize event from children ResizeObserver
*/
function Collection(_ref) {
var children = _ref.children,
onBatchResize = _ref.onBatchResize;
var resizeIdRef = external_window_React_["useRef"](0);
var resizeInfosRef = external_window_React_["useRef"]([]);
var onCollectionResize = external_window_React_["useContext"](CollectionContext);
var onResize = external_window_React_["useCallback"](function (size, element, data) {
resizeIdRef.current += 1;
var currentId = resizeIdRef.current;
resizeInfosRef.current.push({
size: size,
element: element,
data: data
});
Promise.resolve().then(function () {
if (currentId === resizeIdRef.current) {
onBatchResize === null || onBatchResize === void 0 ? void 0 : onBatchResize(resizeInfosRef.current);
resizeInfosRef.current = [];
}
}); // Continue bubbling if parent exist
onCollectionResize === null || onCollectionResize === void 0 ? void 0 : onCollectionResize(size, element, data);
}, [onBatchResize, onCollectionResize]);
return /*#__PURE__*/external_window_React_["createElement"](CollectionContext.Provider, {
value: onResize
}, children);
}
// CONCATENATED MODULE: ./node_modules/rc-textarea/node_modules/rc-resize-observer/es/SingleObserver/index.js
function SingleObserver(props) {
var children = props.children,
disabled = props.disabled;
var elementRef = external_window_React_["useRef"](null);
var wrapperRef = external_window_React_["useRef"](null);
var onCollectionResize = external_window_React_["useContext"](CollectionContext); // ============================= Size =============================
var sizeRef = external_window_React_["useRef"]({
width: -1,
height: -1,
offsetWidth: -1,
offsetHeight: -1
}); // ============================= Ref ==============================
var canRef = /*#__PURE__*/external_window_React_["isValidElement"](children) && Object(ref["c" /* supportRef */])(children);
var originRef = canRef ? children.ref : null;
var mergedRef = external_window_React_["useMemo"](function () {
return Object(ref["a" /* composeRef */])(originRef, elementRef);
}, [originRef, elementRef]); // =========================== Observe ============================
var propsRef = external_window_React_["useRef"](props);
propsRef.current = props; // Handler
var onInternalResize = external_window_React_["useCallback"](function (target) {
var _propsRef$current = propsRef.current,
onResize = _propsRef$current.onResize,
data = _propsRef$current.data;
var _target$getBoundingCl = target.getBoundingClientRect(),
width = _target$getBoundingCl.width,
height = _target$getBoundingCl.height;
var offsetWidth = target.offsetWidth,
offsetHeight = target.offsetHeight;
/**
* Resize observer trigger when content size changed.
* In most case we just care about element size,
* let's use `boundary` instead of `contentRect` here to avoid shaking.
*/
var fixedWidth = Math.floor(width);
var fixedHeight = Math.floor(height);
if (sizeRef.current.width !== fixedWidth || sizeRef.current.height !== fixedHeight || sizeRef.current.offsetWidth !== offsetWidth || sizeRef.current.offsetHeight !== offsetHeight) {
var size = {
width: fixedWidth,
height: fixedHeight,
offsetWidth: offsetWidth,
offsetHeight: offsetHeight
};
sizeRef.current = size; // IE is strange, right?
var mergedOffsetWidth = offsetWidth === Math.round(width) ? width : offsetWidth;
var mergedOffsetHeight = offsetHeight === Math.round(height) ? height : offsetHeight;
var sizeInfo = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, size), {}, {
offsetWidth: mergedOffsetWidth,
offsetHeight: mergedOffsetHeight
}); // Let collection know what happened
onCollectionResize === null || onCollectionResize === void 0 ? void 0 : onCollectionResize(sizeInfo, target, data);
if (onResize) {
// defer the callback but not defer to next frame
Promise.resolve().then(function () {
onResize(sizeInfo, target);
});
}
}
}, []); // Dynamic observe
external_window_React_["useEffect"](function () {
var currentElement = Object(findDOMNode["a" /* default */])(elementRef.current) || Object(findDOMNode["a" /* default */])(wrapperRef.current);
if (currentElement && !disabled) {
observe(currentElement, onInternalResize);
}
return function () {
return unobserve(currentElement, onInternalResize);
};
}, [elementRef.current, disabled]); // ============================ Render ============================
return /*#__PURE__*/external_window_React_["createElement"](DomWrapper_DomWrapper, {
ref: wrapperRef
}, canRef ? /*#__PURE__*/external_window_React_["cloneElement"](children, {
ref: mergedRef
}) : children);
}
// CONCATENATED MODULE: ./node_modules/rc-textarea/node_modules/rc-resize-observer/es/index.js
var INTERNAL_PREFIX_KEY = 'rc-observer-key';
function ResizeObserver(props) {
var children = props.children;
var childNodes = Object(toArray["a" /* default */])(children);
if (false) {}
return childNodes.map(function (child, index) {
var key = (child === null || child === void 0 ? void 0 : child.key) || "".concat(INTERNAL_PREFIX_KEY, "-").concat(index);
return /*#__PURE__*/external_window_React_["createElement"](SingleObserver, Object(esm_extends["a" /* default */])({}, props, {
key: key
}), child);
});
}
ResizeObserver.Collection = Collection;
/* harmony default export */ var es = (ResizeObserver);
// EXTERNAL MODULE: ./node_modules/rc-util/es/omit.js
var omit = __webpack_require__("bT9E");
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__("TSYQ");
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// CONCATENATED MODULE: ./node_modules/rc-textarea/es/calculateNodeHeight.js
// Thanks to https://github.com/andreypopp/react-textarea-autosize/
/**
* calculateNodeHeight(uiTextNode, useCache = false)
*/
var HIDDEN_TEXTAREA_STYLE = "\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n";
var SIZING_STYLE = ['letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'font-variant', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-left', 'padding-right', 'border-width', 'box-sizing', 'word-break'];
var computedStyleCache = {};
var hiddenTextarea;
function calculateNodeStyling(node) {
var useCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var nodeRef = node.getAttribute('id') || node.getAttribute('data-reactid') || node.getAttribute('name');
if (useCache && computedStyleCache[nodeRef]) {
return computedStyleCache[nodeRef];
}
var style = window.getComputedStyle(node);
var boxSizing = style.getPropertyValue('box-sizing') || style.getPropertyValue('-moz-box-sizing') || style.getPropertyValue('-webkit-box-sizing');
var paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top'));
var borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width'));
var sizingStyle = SIZING_STYLE.map(function (name) {
return "".concat(name, ":").concat(style.getPropertyValue(name));
}).join(';');
var nodeInfo = {
sizingStyle: sizingStyle,
paddingSize: paddingSize,
borderSize: borderSize,
boxSizing: boxSizing
};
if (useCache && nodeRef) {
computedStyleCache[nodeRef] = nodeInfo;
}
return nodeInfo;
}
function calculateNodeHeight(uiTextNode) {
var useCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var minRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
var maxRows = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
if (!hiddenTextarea) {
hiddenTextarea = document.createElement('textarea');
hiddenTextarea.setAttribute('tab-index', '-1');
hiddenTextarea.setAttribute('aria-hidden', 'true');
document.body.appendChild(hiddenTextarea);
} // Fix wrap="off" issue
// https://github.com/ant-design/ant-design/issues/6577
if (uiTextNode.getAttribute('wrap')) {
hiddenTextarea.setAttribute('wrap', uiTextNode.getAttribute('wrap'));
} else {
hiddenTextarea.removeAttribute('wrap');
} // Copy all CSS properties that have an impact on the height of the content in
// the textbox
var _calculateNodeStyling = calculateNodeStyling(uiTextNode, useCache),
paddingSize = _calculateNodeStyling.paddingSize,
borderSize = _calculateNodeStyling.borderSize,
boxSizing = _calculateNodeStyling.boxSizing,
sizingStyle = _calculateNodeStyling.sizingStyle; // Need to have the overflow attribute to hide the scrollbar otherwise
// text-lines will not calculated properly as the shadow will technically be
// narrower for content
hiddenTextarea.setAttribute('style', "".concat(sizingStyle, ";").concat(HIDDEN_TEXTAREA_STYLE));
hiddenTextarea.value = uiTextNode.value || uiTextNode.placeholder || '';
var minHeight = Number.MIN_SAFE_INTEGER;
var maxHeight = Number.MAX_SAFE_INTEGER;
var height = hiddenTextarea.scrollHeight;
var overflowY;
if (boxSizing === 'border-box') {
// border-box: add border, since height = content + padding + border
height += borderSize;
} else if (boxSizing === 'content-box') {
// remove padding, since height = content
height -= paddingSize;
}
if (minRows !== null || maxRows !== null) {
// measure height of a textarea with a single row
hiddenTextarea.value = ' ';
var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
if (minRows !== null) {
minHeight = singleRowHeight * minRows;
if (boxSizing === 'border-box') {
minHeight = minHeight + paddingSize + borderSize;
}
height = Math.max(minHeight, height);
}
if (maxRows !== null) {
maxHeight = singleRowHeight * maxRows;
if (boxSizing === 'border-box') {
maxHeight = maxHeight + paddingSize + borderSize;
}
overflowY = height > maxHeight ? '' : 'hidden';
height = Math.min(maxHeight, height);
}
}
return {
height: height,
minHeight: minHeight,
maxHeight: maxHeight,
overflowY: overflowY,
resize: 'none'
};
}
// EXTERNAL MODULE: ./node_modules/shallowequal/index.js
var shallowequal = __webpack_require__("Gytx");
var shallowequal_default = /*#__PURE__*/__webpack_require__.n(shallowequal);
// CONCATENATED MODULE: ./node_modules/rc-textarea/es/ResizableTextArea.js
// eslint-disable-next-line @typescript-eslint/naming-convention
var RESIZE_STATUS;
(function (RESIZE_STATUS) {
RESIZE_STATUS[RESIZE_STATUS["NONE"] = 0] = "NONE";
RESIZE_STATUS[RESIZE_STATUS["RESIZING"] = 1] = "RESIZING";
RESIZE_STATUS[RESIZE_STATUS["RESIZED"] = 2] = "RESIZED";
})(RESIZE_STATUS || (RESIZE_STATUS = {}));
var ResizableTextArea_ResizableTextArea = /*#__PURE__*/function (_React$Component) {
Object(inherits["a" /* default */])(ResizableTextArea, _React$Component);
var _super = Object(createSuper["a" /* default */])(ResizableTextArea);
function ResizableTextArea(props) {
var _this;
Object(classCallCheck["a" /* default */])(this, ResizableTextArea);
_this = _super.call(this, props);
_this.nextFrameActionId = void 0;
_this.resizeFrameId = void 0;
_this.textArea = void 0;
_this.saveTextArea = function (textArea) {
_this.textArea = textArea;
};
_this.handleResize = function (size) {
var resizeStatus = _this.state.resizeStatus;
var _this$props = _this.props,
autoSize = _this$props.autoSize,
onResize = _this$props.onResize;
if (resizeStatus !== RESIZE_STATUS.NONE) {
return;
}
if (typeof onResize === 'function') {
onResize(size);
}
if (autoSize) {
_this.resizeOnNextFrame();
}
};
_this.resizeOnNextFrame = function () {
cancelAnimationFrame(_this.nextFrameActionId);
_this.nextFrameActionId = requestAnimationFrame(_this.resizeTextarea);
};
_this.resizeTextarea = function () {
var autoSize = _this.props.autoSize;
if (!autoSize || !_this.textArea) {
return;
}
var minRows = autoSize.minRows,
maxRows = autoSize.maxRows;
var textareaStyles = calculateNodeHeight(_this.textArea, false, minRows, maxRows);
_this.setState({
textareaStyles: textareaStyles,
resizeStatus: RESIZE_STATUS.RESIZING
}, function () {
cancelAnimationFrame(_this.resizeFrameId);
_this.resizeFrameId = requestAnimationFrame(function () {
_this.setState({
resizeStatus: RESIZE_STATUS.RESIZED
}, function () {
_this.resizeFrameId = requestAnimationFrame(function () {
_this.setState({
resizeStatus: RESIZE_STATUS.NONE
});
_this.fixFirefoxAutoScroll();
});
});
});
});
};
_this.renderTextArea = function () {
var _this$props2 = _this.props,
_this$props2$prefixCl = _this$props2.prefixCls,
prefixCls = _this$props2$prefixCl === void 0 ? 'rc-textarea' : _this$props2$prefixCl,
autoSize = _this$props2.autoSize,
onResize = _this$props2.onResize,
className = _this$props2.className,
disabled = _this$props2.disabled;
var _this$state = _this.state,
textareaStyles = _this$state.textareaStyles,
resizeStatus = _this$state.resizeStatus;
var otherProps = Object(omit["a" /* default */])(_this.props, ['prefixCls', 'onPressEnter', 'autoSize', 'defaultValue', 'onResize']);
var cls = classnames_default()(prefixCls, className, Object(defineProperty["a" /* default */])({}, "".concat(prefixCls, "-disabled"), disabled)); // Fix https://github.com/ant-design/ant-design/issues/6776
// Make sure it could be reset when using form.getFieldDecorator
if ('value' in otherProps) {
otherProps.value = otherProps.value || '';
}
var style = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, _this.props.style), textareaStyles), resizeStatus === RESIZE_STATUS.RESIZING ? // React will warning when mix `overflow` & `overflowY`.
// We need to define this separately.
{
overflowX: 'hidden',
overflowY: 'hidden'
} : null);
return /*#__PURE__*/external_window_React_["createElement"](es, {
onResize: _this.handleResize,
disabled: !(autoSize || onResize)
}, /*#__PURE__*/external_window_React_["createElement"]("textarea", Object(esm_extends["a" /* default */])({}, otherProps, {
className: cls,
style: style,
ref: _this.saveTextArea
})));
};
_this.state = {
textareaStyles: {},
resizeStatus: RESIZE_STATUS.NONE
};
return _this;
}
Object(createClass["a" /* default */])(ResizableTextArea, [{
key: "componentDidUpdate",
value: function componentDidUpdate(prevProps) {
// Re-render with the new content or new autoSize property then recalculate the height as required.
if (prevProps.value !== this.props.value || !shallowequal_default()(prevProps.autoSize, this.props.autoSize)) {
this.resizeTextarea();
}
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
cancelAnimationFrame(this.nextFrameActionId);
cancelAnimationFrame(this.resizeFrameId);
} // https://github.com/ant-design/ant-design/issues/21870
}, {
key: "fixFirefoxAutoScroll",
value: function fixFirefoxAutoScroll() {
try {
if (document.activeElement === this.textArea) {
var currentStart = this.textArea.selectionStart;
var currentEnd = this.textArea.selectionEnd;
this.textArea.setSelectionRange(currentStart, currentEnd);
}
} catch (e) {// Fix error in Chrome:
// Failed to read the 'selectionStart' property from 'HTMLInputElement'
// http://stackoverflow.com/q/21177489/3040605
}
}
}, {
key: "render",
value: function render() {
return this.renderTextArea();
}
}]);
return ResizableTextArea;
}(external_window_React_["Component"]);
/* harmony default export */ var es_ResizableTextArea = (ResizableTextArea_ResizableTextArea);
// CONCATENATED MODULE: ./node_modules/rc-textarea/es/index.js
var es_TextArea = /*#__PURE__*/function (_React$Component) {
Object(inherits["a" /* default */])(TextArea, _React$Component);
var _super = Object(createSuper["a" /* default */])(TextArea);
function TextArea(props) {
var _this;
Object(classCallCheck["a" /* default */])(this, TextArea);
_this = _super.call(this, props);
_this.resizableTextArea = void 0;
_this.focus = function () {
_this.resizableTextArea.textArea.focus();
};
_this.saveTextArea = function (resizableTextArea) {
_this.resizableTextArea = resizableTextArea;
};
_this.handleChange = function (e) {
var onChange = _this.props.onChange;
_this.setValue(e.target.value, function () {
_this.resizableTextArea.resizeTextarea();
});
if (onChange) {
onChange(e);
}
};
_this.handleKeyDown = function (e) {
var _this$props = _this.props,
onPressEnter = _this$props.onPressEnter,
onKeyDown = _this$props.onKeyDown;
if (e.keyCode === 13 && onPressEnter) {
onPressEnter(e);
}
if (onKeyDown) {
onKeyDown(e);
}
};
var value = typeof props.value === 'undefined' || props.value === null ? props.defaultValue : props.value;
_this.state = {
value: value
};
return _this;
}
Object(createClass["a" /* default */])(TextArea, [{
key: "setValue",
value: function setValue(value, callback) {
if (!('value' in this.props)) {
this.setState({
value: value
}, callback);
}
}
}, {
key: "blur",
value: function blur() {
this.resizableTextArea.textArea.blur();
}
}, {
key: "render",
value: function render() {
return /*#__PURE__*/external_window_React_["createElement"](es_ResizableTextArea, Object(esm_extends["a" /* default */])({}, this.props, {
value: this.state.value,
onKeyDown: this.handleKeyDown,
onChange: this.handleChange,
ref: this.saveTextArea
}));
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(nextProps) {
if ('value' in nextProps) {
return {
value: nextProps.value
};
}
return null;
}
}]);
return TextArea;
}(external_window_React_["Component"]);
/* harmony default export */ var rc_textarea_es = __webpack_exports__["default"] = (es_TextArea);
/***/ }),
/***/ "armg":
/*!***************************************************************!*\
!*** ./src/pages/Search/components/ShixunFilter.less?modules ***!
\***************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
module.exports = {"flex_box_center":"flex_box_center___2BNeC","flex_space_between":"flex_space_between___WX6BG","flex_box_vertical_center":"flex_box_vertical_center___HQGLX","flex_box_center_end":"flex_box_center_end___373U9","flex_box_column":"flex_box_column___2Oj3z","wrp":"wrp___304SC","menu":"menu___3sDtV","actived":"actived___2XIg-","actived2":"actived2___32V2S","subTag":"subTag___1gyEu","search":"search___2HpFX"};
/***/ }),
/***/ "bT9E":
/*!*****************************************!*\
!*** ./node_modules/rc-util/es/omit.js ***!
\*****************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return omit; });
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "VTBJ");
function omit(obj, fields) {
var clone = Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, obj);
if (Array.isArray(fields)) {
fields.forEach(function (key) {
delete clone[key];
});
}
return clone;
}
/***/ }),
/***/ "nzYX":
/*!*********************************!*\
!*** ./src/pages/Search/bg.jpg ***!
\*********************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "static/bg.08b15d1c.jpg";
/***/ }),
/***/ "weW1":
/*!*********************************************!*\
!*** ./src/pages/Search/index.less?modules ***!
\*********************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
module.exports = {"flex_box_center":"flex_box_center___3bI2k","flex_space_between":"flex_space_between___24sog","flex_box_vertical_center":"flex_box_vertical_center___7d_ez","flex_box_center_end":"flex_box_center_end___soKEo","flex_box_column":"flex_box_column___2sf4J","search-container":"search-container___1XwVq","btn-search":"btn-search___2uzVB","navs-container":"navs-container___1JibK","navs":"navs___2LZH1","active":"active___3B0jC","search-result-container":"search-result-container___RikUS","search-panel":"search-panel___2mNWK","search-course-item":"search-course-item___3Dksy","lock-search-course-item":"lock-search-course-item___432y5","desc":"desc___21sW7","title":"title___1vjrx","mt20":"mt20___2-CU4","detail":"detail___2A_xT","info":"info___1LJoY","sum":"sum___1s-xG","label-red":"label-red___h6zoB","search-footer":"search-footer___-ezba","search-result-body":"search-result-body___w2NM-","tip":"tip___f5Ff8"};
/***/ })
}]);